diff --git a/frontend-dist/Inter-Black.woff.a3efb88f6f.efe3f25b.woff b/frontend-dist/Inter-Black.woff.a3efb88f6f.efe3f25b.woff new file mode 100644 index 0000000000..8fd1bd5311 Binary files /dev/null and b/frontend-dist/Inter-Black.woff.a3efb88f6f.efe3f25b.woff differ diff --git a/frontend-dist/Inter-Black.woff2.a3efb88f6f.1f333c9f.woff2 b/frontend-dist/Inter-Black.woff2.a3efb88f6f.1f333c9f.woff2 new file mode 100644 index 0000000000..c354e63907 Binary files /dev/null and b/frontend-dist/Inter-Black.woff2.a3efb88f6f.1f333c9f.woff2 differ diff --git a/frontend-dist/Inter-BlackItalic.woff.a3efb88f6f.f6e2e726.woff b/frontend-dist/Inter-BlackItalic.woff.a3efb88f6f.f6e2e726.woff new file mode 100644 index 0000000000..be6a45bcf1 Binary files /dev/null and b/frontend-dist/Inter-BlackItalic.woff.a3efb88f6f.f6e2e726.woff differ diff --git a/frontend-dist/Inter-BlackItalic.woff2.a3efb88f6f.89710fff.woff2 b/frontend-dist/Inter-BlackItalic.woff2.a3efb88f6f.89710fff.woff2 new file mode 100644 index 0000000000..8b2efe9526 Binary files /dev/null and b/frontend-dist/Inter-BlackItalic.woff2.a3efb88f6f.89710fff.woff2 differ diff --git a/frontend-dist/Inter-Bold.woff.a3efb88f6f.d92ed350.woff b/frontend-dist/Inter-Bold.woff.a3efb88f6f.d92ed350.woff new file mode 100644 index 0000000000..b5221b0e8a Binary files /dev/null and b/frontend-dist/Inter-Bold.woff.a3efb88f6f.d92ed350.woff differ diff --git a/frontend-dist/Inter-Bold.woff2.a3efb88f6f.e8bd971d.woff2 b/frontend-dist/Inter-Bold.woff2.a3efb88f6f.e8bd971d.woff2 new file mode 100644 index 0000000000..619c3a7410 Binary files /dev/null and b/frontend-dist/Inter-Bold.woff2.a3efb88f6f.e8bd971d.woff2 differ diff --git a/frontend-dist/Inter-BoldItalic.woff.a3efb88f6f.39f68e5f.woff b/frontend-dist/Inter-BoldItalic.woff.a3efb88f6f.39f68e5f.woff new file mode 100644 index 0000000000..da912559ef Binary files /dev/null and b/frontend-dist/Inter-BoldItalic.woff.a3efb88f6f.39f68e5f.woff differ diff --git a/frontend-dist/Inter-BoldItalic.woff2.a3efb88f6f.cd6e580e.woff2 b/frontend-dist/Inter-BoldItalic.woff2.a3efb88f6f.cd6e580e.woff2 new file mode 100644 index 0000000000..4022cc8d9a Binary files /dev/null and b/frontend-dist/Inter-BoldItalic.woff2.a3efb88f6f.cd6e580e.woff2 differ diff --git a/frontend-dist/Inter-ExtraBold.woff.a3efb88f6f.cd51bf91.woff b/frontend-dist/Inter-ExtraBold.woff.a3efb88f6f.cd51bf91.woff new file mode 100644 index 0000000000..7221d72ef0 Binary files /dev/null and b/frontend-dist/Inter-ExtraBold.woff.a3efb88f6f.cd51bf91.woff differ diff --git a/frontend-dist/Inter-ExtraBold.woff2.a3efb88f6f.ffc04ff0.woff2 b/frontend-dist/Inter-ExtraBold.woff2.a3efb88f6f.ffc04ff0.woff2 new file mode 100644 index 0000000000..d3d23b43e5 Binary files /dev/null and b/frontend-dist/Inter-ExtraBold.woff2.a3efb88f6f.ffc04ff0.woff2 differ diff --git a/frontend-dist/Inter-ExtraBoldItalic.woff.a3efb88f6f.122106d3.woff b/frontend-dist/Inter-ExtraBoldItalic.woff.a3efb88f6f.122106d3.woff new file mode 100644 index 0000000000..8520a31855 Binary files /dev/null and b/frontend-dist/Inter-ExtraBoldItalic.woff.a3efb88f6f.122106d3.woff differ diff --git a/frontend-dist/Inter-ExtraBoldItalic.woff2.a3efb88f6f.de4f3979.woff2 b/frontend-dist/Inter-ExtraBoldItalic.woff2.a3efb88f6f.de4f3979.woff2 new file mode 100644 index 0000000000..863748b2e3 Binary files /dev/null and b/frontend-dist/Inter-ExtraBoldItalic.woff2.a3efb88f6f.de4f3979.woff2 differ diff --git a/frontend-dist/Inter-ExtraLight.woff.a3efb88f6f.018d6d24.woff b/frontend-dist/Inter-ExtraLight.woff.a3efb88f6f.018d6d24.woff new file mode 100644 index 0000000000..5590441093 Binary files /dev/null and b/frontend-dist/Inter-ExtraLight.woff.a3efb88f6f.018d6d24.woff differ diff --git a/frontend-dist/Inter-ExtraLight.woff2.a3efb88f6f.735b820a.woff2 b/frontend-dist/Inter-ExtraLight.woff2.a3efb88f6f.735b820a.woff2 new file mode 100644 index 0000000000..7cb6e49fb6 Binary files /dev/null and b/frontend-dist/Inter-ExtraLight.woff2.a3efb88f6f.735b820a.woff2 differ diff --git a/frontend-dist/Inter-ExtraLightItalic.woff.a3efb88f6f.c051c5b4.woff b/frontend-dist/Inter-ExtraLightItalic.woff.a3efb88f6f.c051c5b4.woff new file mode 100644 index 0000000000..0a9f00de8e Binary files /dev/null and b/frontend-dist/Inter-ExtraLightItalic.woff.a3efb88f6f.c051c5b4.woff differ diff --git a/frontend-dist/Inter-ExtraLightItalic.woff2.a3efb88f6f.75944d4e.woff2 b/frontend-dist/Inter-ExtraLightItalic.woff2.a3efb88f6f.75944d4e.woff2 new file mode 100644 index 0000000000..e636442002 Binary files /dev/null and b/frontend-dist/Inter-ExtraLightItalic.woff2.a3efb88f6f.75944d4e.woff2 differ diff --git a/frontend-dist/Inter-Italic.woff.a3efb88f6f.d9effa31.woff b/frontend-dist/Inter-Italic.woff.a3efb88f6f.d9effa31.woff new file mode 100644 index 0000000000..f2c424804c Binary files /dev/null and b/frontend-dist/Inter-Italic.woff.a3efb88f6f.d9effa31.woff differ diff --git a/frontend-dist/Inter-Italic.woff2.a3efb88f6f.85eee0c1.woff2 b/frontend-dist/Inter-Italic.woff2.a3efb88f6f.85eee0c1.woff2 new file mode 100644 index 0000000000..b749909b0a Binary files /dev/null and b/frontend-dist/Inter-Italic.woff2.a3efb88f6f.85eee0c1.woff2 differ diff --git a/frontend-dist/Inter-Light.woff.a3efb88f6f.0cf765a1.woff b/frontend-dist/Inter-Light.woff.a3efb88f6f.0cf765a1.woff new file mode 100644 index 0000000000..15672799ed Binary files /dev/null and b/frontend-dist/Inter-Light.woff.a3efb88f6f.0cf765a1.woff differ diff --git a/frontend-dist/Inter-Light.woff2.a3efb88f6f.f86a8a97.woff2 b/frontend-dist/Inter-Light.woff2.a3efb88f6f.f86a8a97.woff2 new file mode 100644 index 0000000000..ac2e1275ef Binary files /dev/null and b/frontend-dist/Inter-Light.woff2.a3efb88f6f.f86a8a97.woff2 differ diff --git a/frontend-dist/Inter-LightItalic.woff.a3efb88f6f.6c91af65.woff b/frontend-dist/Inter-LightItalic.woff.a3efb88f6f.6c91af65.woff new file mode 100644 index 0000000000..ebbb05b38e Binary files /dev/null and b/frontend-dist/Inter-LightItalic.woff.a3efb88f6f.6c91af65.woff differ diff --git a/frontend-dist/Inter-LightItalic.woff2.a3efb88f6f.cb22faff.woff2 b/frontend-dist/Inter-LightItalic.woff2.a3efb88f6f.cb22faff.woff2 new file mode 100644 index 0000000000..d51474ca18 Binary files /dev/null and b/frontend-dist/Inter-LightItalic.woff2.a3efb88f6f.cb22faff.woff2 differ diff --git a/frontend-dist/Inter-Medium.woff.a3efb88f6f.cb391d89.woff b/frontend-dist/Inter-Medium.woff.a3efb88f6f.cb391d89.woff new file mode 100644 index 0000000000..dac813a74e Binary files /dev/null and b/frontend-dist/Inter-Medium.woff.a3efb88f6f.cb391d89.woff differ diff --git a/frontend-dist/Inter-Medium.woff2.a3efb88f6f.4f0ea984.woff2 b/frontend-dist/Inter-Medium.woff2.a3efb88f6f.4f0ea984.woff2 new file mode 100644 index 0000000000..ab9850258e Binary files /dev/null and b/frontend-dist/Inter-Medium.woff2.a3efb88f6f.4f0ea984.woff2 differ diff --git a/frontend-dist/Inter-MediumItalic.woff.a3efb88f6f.1f636c25.woff b/frontend-dist/Inter-MediumItalic.woff.a3efb88f6f.1f636c25.woff new file mode 100644 index 0000000000..ae6e45fe3b Binary files /dev/null and b/frontend-dist/Inter-MediumItalic.woff.a3efb88f6f.1f636c25.woff differ diff --git a/frontend-dist/Inter-MediumItalic.woff2.a3efb88f6f.2b734b7a.woff2 b/frontend-dist/Inter-MediumItalic.woff2.a3efb88f6f.2b734b7a.woff2 new file mode 100644 index 0000000000..ceb866e424 Binary files /dev/null and b/frontend-dist/Inter-MediumItalic.woff2.a3efb88f6f.2b734b7a.woff2 differ diff --git a/frontend-dist/Inter-Regular.woff.a3efb88f6f.d9325c13.woff b/frontend-dist/Inter-Regular.woff.a3efb88f6f.d9325c13.woff new file mode 100644 index 0000000000..e3200e0b97 Binary files /dev/null and b/frontend-dist/Inter-Regular.woff.a3efb88f6f.d9325c13.woff differ diff --git a/frontend-dist/Inter-Regular.woff2.a3efb88f6f.c52a047f.woff2 b/frontend-dist/Inter-Regular.woff2.a3efb88f6f.c52a047f.woff2 new file mode 100644 index 0000000000..28ae0b6abb Binary files /dev/null and b/frontend-dist/Inter-Regular.woff2.a3efb88f6f.c52a047f.woff2 differ diff --git a/frontend-dist/Inter-SemiBold.woff.a3efb88f6f.c6670c13.woff b/frontend-dist/Inter-SemiBold.woff.a3efb88f6f.c6670c13.woff new file mode 100644 index 0000000000..295fbdfa95 Binary files /dev/null and b/frontend-dist/Inter-SemiBold.woff.a3efb88f6f.c6670c13.woff differ diff --git a/frontend-dist/Inter-SemiBold.woff2.a3efb88f6f.08366574.woff2 b/frontend-dist/Inter-SemiBold.woff2.a3efb88f6f.08366574.woff2 new file mode 100644 index 0000000000..41ebbbb022 Binary files /dev/null and b/frontend-dist/Inter-SemiBold.woff2.a3efb88f6f.08366574.woff2 differ diff --git a/frontend-dist/Inter-SemiBoldItalic.woff.a3efb88f6f.13394743.woff b/frontend-dist/Inter-SemiBoldItalic.woff.a3efb88f6f.13394743.woff new file mode 100644 index 0000000000..34d759f726 Binary files /dev/null and b/frontend-dist/Inter-SemiBoldItalic.woff.a3efb88f6f.13394743.woff differ diff --git a/frontend-dist/Inter-SemiBoldItalic.woff2.a3efb88f6f.5c7db07d.woff2 b/frontend-dist/Inter-SemiBoldItalic.woff2.a3efb88f6f.5c7db07d.woff2 new file mode 100644 index 0000000000..4dd025adf2 Binary files /dev/null and b/frontend-dist/Inter-SemiBoldItalic.woff2.a3efb88f6f.5c7db07d.woff2 differ diff --git a/frontend-dist/Inter-Thin.woff.a3efb88f6f.832f7e9d.woff b/frontend-dist/Inter-Thin.woff.a3efb88f6f.832f7e9d.woff new file mode 100644 index 0000000000..07ea92efba Binary files /dev/null and b/frontend-dist/Inter-Thin.woff.a3efb88f6f.832f7e9d.woff differ diff --git a/frontend-dist/Inter-Thin.woff2.a3efb88f6f.099a7dc1.woff2 b/frontend-dist/Inter-Thin.woff2.a3efb88f6f.099a7dc1.woff2 new file mode 100644 index 0000000000..72707dcd31 Binary files /dev/null and b/frontend-dist/Inter-Thin.woff2.a3efb88f6f.099a7dc1.woff2 differ diff --git a/frontend-dist/Inter-ThinItalic.woff.a3efb88f6f.9a9e646f.woff b/frontend-dist/Inter-ThinItalic.woff.a3efb88f6f.9a9e646f.woff new file mode 100644 index 0000000000..d35d6173ce Binary files /dev/null and b/frontend-dist/Inter-ThinItalic.woff.a3efb88f6f.9a9e646f.woff differ diff --git a/frontend-dist/Inter-ThinItalic.woff2.a3efb88f6f.f5b32cfe.woff2 b/frontend-dist/Inter-ThinItalic.woff2.a3efb88f6f.f5b32cfe.woff2 new file mode 100644 index 0000000000..884fe458c0 Binary files /dev/null and b/frontend-dist/Inter-ThinItalic.woff2.a3efb88f6f.f5b32cfe.woff2 differ diff --git a/frontend-dist/Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2 b/frontend-dist/Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2 new file mode 100644 index 0000000000..b1d4bdc363 Binary files /dev/null and b/frontend-dist/Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2 differ diff --git a/frontend-dist/Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2 b/frontend-dist/Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2 new file mode 100644 index 0000000000..f56c09796f Binary files /dev/null and b/frontend-dist/Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2 differ diff --git a/frontend-dist/Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2 b/frontend-dist/Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2 new file mode 100644 index 0000000000..0c41431927 Binary files /dev/null and b/frontend-dist/Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2 differ diff --git a/frontend-dist/JuliaMono-Bold.24b57d33.woff2 b/frontend-dist/JuliaMono-Bold.24b57d33.woff2 new file mode 100644 index 0000000000..212ccec354 Binary files /dev/null and b/frontend-dist/JuliaMono-Bold.24b57d33.woff2 differ diff --git a/frontend-dist/JuliaMono-BoldLatin.7ec5c608.woff2 b/frontend-dist/JuliaMono-BoldLatin.7ec5c608.woff2 new file mode 100644 index 0000000000..1f8dde89e5 Binary files /dev/null and b/frontend-dist/JuliaMono-BoldLatin.7ec5c608.woff2 differ diff --git a/frontend-dist/JuliaMono-Regular.e0106c6f.woff2 b/frontend-dist/JuliaMono-Regular.e0106c6f.woff2 new file mode 100644 index 0000000000..c2db127372 Binary files /dev/null and b/frontend-dist/JuliaMono-Regular.e0106c6f.woff2 differ diff --git a/frontend-dist/JuliaMono-RegularItalic.3159f647.woff2 b/frontend-dist/JuliaMono-RegularItalic.3159f647.woff2 new file mode 100644 index 0000000000..987502fedb Binary files /dev/null and b/frontend-dist/JuliaMono-RegularItalic.3159f647.woff2 differ diff --git a/frontend-dist/JuliaMono-RegularLatin.26c56b70.woff2 b/frontend-dist/JuliaMono-RegularLatin.26c56b70.woff2 new file mode 100644 index 0000000000..f159a92853 Binary files /dev/null and b/frontend-dist/JuliaMono-RegularLatin.26c56b70.woff2 differ diff --git a/frontend-dist/Vollkorn-Black.0ebdfbf5.woff2 b/frontend-dist/Vollkorn-Black.0ebdfbf5.woff2 new file mode 100644 index 0000000000..b51a37a406 Binary files /dev/null and b/frontend-dist/Vollkorn-Black.0ebdfbf5.woff2 differ diff --git a/frontend-dist/Vollkorn-BlackItalic.4095acfe.woff2 b/frontend-dist/Vollkorn-BlackItalic.4095acfe.woff2 new file mode 100644 index 0000000000..bb2e060ce4 Binary files /dev/null and b/frontend-dist/Vollkorn-BlackItalic.4095acfe.woff2 differ diff --git a/frontend-dist/Vollkorn-Bold.6e1feb70.woff2 b/frontend-dist/Vollkorn-Bold.6e1feb70.woff2 new file mode 100644 index 0000000000..cfb12e1520 Binary files /dev/null and b/frontend-dist/Vollkorn-Bold.6e1feb70.woff2 differ diff --git a/frontend-dist/Vollkorn-BoldItalic.a48ab300.woff2 b/frontend-dist/Vollkorn-BoldItalic.a48ab300.woff2 new file mode 100644 index 0000000000..23d7a6c844 Binary files /dev/null and b/frontend-dist/Vollkorn-BoldItalic.a48ab300.woff2 differ diff --git a/frontend-dist/Vollkorn-SemiBold.8072eb6c.woff2 b/frontend-dist/Vollkorn-SemiBold.8072eb6c.woff2 new file mode 100644 index 0000000000..78b781055b Binary files /dev/null and b/frontend-dist/Vollkorn-SemiBold.8072eb6c.woff2 differ diff --git a/frontend-dist/Vollkorn-SemiBoldItalic.5c3cd265.woff2 b/frontend-dist/Vollkorn-SemiBoldItalic.5c3cd265.woff2 new file mode 100644 index 0000000000..2162ab8ef4 Binary files /dev/null and b/frontend-dist/Vollkorn-SemiBoldItalic.5c3cd265.woff2 differ diff --git a/frontend-dist/add-outline.e3c93c35.svg b/frontend-dist/add-outline.e3c93c35.svg new file mode 100644 index 0000000000..7c7fb14877 --- /dev/null +++ b/frontend-dist/add-outline.e3c93c35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/alegreya-sans-all-400-italic.f87bfe89.woff b/frontend-dist/alegreya-sans-all-400-italic.f87bfe89.woff new file mode 100644 index 0000000000..75ef6a5671 Binary files /dev/null and b/frontend-dist/alegreya-sans-all-400-italic.f87bfe89.woff differ diff --git a/frontend-dist/alegreya-sans-all-400-normal.a91dc265.woff b/frontend-dist/alegreya-sans-all-400-normal.a91dc265.woff new file mode 100644 index 0000000000..0658fd17cc Binary files /dev/null and b/frontend-dist/alegreya-sans-all-400-normal.a91dc265.woff differ diff --git a/frontend-dist/alegreya-sans-all-500-italic.8917c3da.woff b/frontend-dist/alegreya-sans-all-500-italic.8917c3da.woff new file mode 100644 index 0000000000..02b7436cd3 Binary files /dev/null and b/frontend-dist/alegreya-sans-all-500-italic.8917c3da.woff differ diff --git a/frontend-dist/alegreya-sans-all-500-normal.5db27a5b.woff b/frontend-dist/alegreya-sans-all-500-normal.5db27a5b.woff new file mode 100644 index 0000000000..4a6b7ff755 Binary files /dev/null and b/frontend-dist/alegreya-sans-all-500-normal.5db27a5b.woff differ diff --git a/frontend-dist/alegreya-sans-all-700-italic.a6d70e05.woff b/frontend-dist/alegreya-sans-all-700-italic.a6d70e05.woff new file mode 100644 index 0000000000..5118953a73 Binary files /dev/null and b/frontend-dist/alegreya-sans-all-700-italic.a6d70e05.woff differ diff --git a/frontend-dist/alegreya-sans-all-700-normal.29d7dfa9.woff b/frontend-dist/alegreya-sans-all-700-normal.29d7dfa9.woff new file mode 100644 index 0000000000..b8c1d8a284 Binary files /dev/null and b/frontend-dist/alegreya-sans-all-700-normal.29d7dfa9.woff differ diff --git a/frontend-dist/alegreya-sans-cyrillic-400-italic.8c81649c.woff2 b/frontend-dist/alegreya-sans-cyrillic-400-italic.8c81649c.woff2 new file mode 100644 index 0000000000..3ebce2cffa Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-400-italic.8c81649c.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-400-normal.ab3d1dcc.woff2 b/frontend-dist/alegreya-sans-cyrillic-400-normal.ab3d1dcc.woff2 new file mode 100644 index 0000000000..3434d6ed9e Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-400-normal.ab3d1dcc.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-500-italic.a40f95be.woff2 b/frontend-dist/alegreya-sans-cyrillic-500-italic.a40f95be.woff2 new file mode 100644 index 0000000000..7338c02062 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-500-italic.a40f95be.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-500-normal.8a029e9d.woff2 b/frontend-dist/alegreya-sans-cyrillic-500-normal.8a029e9d.woff2 new file mode 100644 index 0000000000..c3c821ba91 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-500-normal.8a029e9d.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-700-italic.c4ef17a2.woff2 b/frontend-dist/alegreya-sans-cyrillic-700-italic.c4ef17a2.woff2 new file mode 100644 index 0000000000..ad187b0b86 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-700-italic.c4ef17a2.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-700-normal.5a5aa5e3.woff2 b/frontend-dist/alegreya-sans-cyrillic-700-normal.5a5aa5e3.woff2 new file mode 100644 index 0000000000..dafc6f88c2 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-700-normal.5a5aa5e3.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-400-italic.7c2a4a40.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-400-italic.7c2a4a40.woff2 new file mode 100644 index 0000000000..4ead31cd71 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-400-italic.7c2a4a40.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-400-normal.5f5cc2ef.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-400-normal.5f5cc2ef.woff2 new file mode 100644 index 0000000000..f81ae10995 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-400-normal.5f5cc2ef.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-500-italic.78248b65.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-500-italic.78248b65.woff2 new file mode 100644 index 0000000000..387eb05d64 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-500-italic.78248b65.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-500-normal.0e6ee102.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-500-normal.0e6ee102.woff2 new file mode 100644 index 0000000000..5f05b9e7d0 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-500-normal.0e6ee102.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-700-italic.69b0617e.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-700-italic.69b0617e.woff2 new file mode 100644 index 0000000000..ae9dc86ec0 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-700-italic.69b0617e.woff2 differ diff --git a/frontend-dist/alegreya-sans-cyrillic-ext-700-normal.2e02b08f.woff2 b/frontend-dist/alegreya-sans-cyrillic-ext-700-normal.2e02b08f.woff2 new file mode 100644 index 0000000000..43b5ba1286 Binary files /dev/null and b/frontend-dist/alegreya-sans-cyrillic-ext-700-normal.2e02b08f.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-400-italic.1b909c63.woff2 b/frontend-dist/alegreya-sans-greek-400-italic.1b909c63.woff2 new file mode 100644 index 0000000000..c1cebd7a3f Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-400-italic.1b909c63.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-400-normal.4e5a8597.woff2 b/frontend-dist/alegreya-sans-greek-400-normal.4e5a8597.woff2 new file mode 100644 index 0000000000..19ba95016c Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-400-normal.4e5a8597.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-500-italic.19d09eea.woff2 b/frontend-dist/alegreya-sans-greek-500-italic.19d09eea.woff2 new file mode 100644 index 0000000000..5b9906e9c0 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-500-italic.19d09eea.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-500-normal.54a6041f.woff2 b/frontend-dist/alegreya-sans-greek-500-normal.54a6041f.woff2 new file mode 100644 index 0000000000..5cb0e6b5a0 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-500-normal.54a6041f.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-700-italic.5aef27cf.woff2 b/frontend-dist/alegreya-sans-greek-700-italic.5aef27cf.woff2 new file mode 100644 index 0000000000..2a17d2edfa Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-700-italic.5aef27cf.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-700-normal.452fc62e.woff2 b/frontend-dist/alegreya-sans-greek-700-normal.452fc62e.woff2 new file mode 100644 index 0000000000..7415e7b66d Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-700-normal.452fc62e.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-400-italic.550f5118.woff2 b/frontend-dist/alegreya-sans-greek-ext-400-italic.550f5118.woff2 new file mode 100644 index 0000000000..4ddc332622 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-400-italic.550f5118.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-400-normal.b82a0aea.woff2 b/frontend-dist/alegreya-sans-greek-ext-400-normal.b82a0aea.woff2 new file mode 100644 index 0000000000..f85a41731d Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-400-normal.b82a0aea.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-500-italic.8b2e952b.woff2 b/frontend-dist/alegreya-sans-greek-ext-500-italic.8b2e952b.woff2 new file mode 100644 index 0000000000..77cf5e4551 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-500-italic.8b2e952b.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-500-normal.00f2c6f3.woff2 b/frontend-dist/alegreya-sans-greek-ext-500-normal.00f2c6f3.woff2 new file mode 100644 index 0000000000..a6681017e2 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-500-normal.00f2c6f3.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-700-italic.a1ccc0c2.woff2 b/frontend-dist/alegreya-sans-greek-ext-700-italic.a1ccc0c2.woff2 new file mode 100644 index 0000000000..ad23a55e70 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-700-italic.a1ccc0c2.woff2 differ diff --git a/frontend-dist/alegreya-sans-greek-ext-700-normal.ca9ee8e1.woff2 b/frontend-dist/alegreya-sans-greek-ext-700-normal.ca9ee8e1.woff2 new file mode 100644 index 0000000000..49c5654293 Binary files /dev/null and b/frontend-dist/alegreya-sans-greek-ext-700-normal.ca9ee8e1.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-400-italic.ec56f658.woff2 b/frontend-dist/alegreya-sans-latin-400-italic.ec56f658.woff2 new file mode 100644 index 0000000000..df999c7eb2 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-400-italic.ec56f658.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-400-normal.62b57001.woff2 b/frontend-dist/alegreya-sans-latin-400-normal.62b57001.woff2 new file mode 100644 index 0000000000..5d98f5cde9 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-400-normal.62b57001.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-500-italic.6d8350bf.woff2 b/frontend-dist/alegreya-sans-latin-500-italic.6d8350bf.woff2 new file mode 100644 index 0000000000..7cd291700f Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-500-italic.6d8350bf.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-500-normal.4428c984.woff2 b/frontend-dist/alegreya-sans-latin-500-normal.4428c984.woff2 new file mode 100644 index 0000000000..cf40f1fce9 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-500-normal.4428c984.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-700-italic.abc64c8a.woff2 b/frontend-dist/alegreya-sans-latin-700-italic.abc64c8a.woff2 new file mode 100644 index 0000000000..befb4809c6 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-700-italic.abc64c8a.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-700-normal.96e2fcc9.woff2 b/frontend-dist/alegreya-sans-latin-700-normal.96e2fcc9.woff2 new file mode 100644 index 0000000000..de0826d1b8 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-700-normal.96e2fcc9.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-400-italic.b9ce632b.woff2 b/frontend-dist/alegreya-sans-latin-ext-400-italic.b9ce632b.woff2 new file mode 100644 index 0000000000..c15ce0ec2c Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-400-italic.b9ce632b.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-400-normal.1c1602b0.woff2 b/frontend-dist/alegreya-sans-latin-ext-400-normal.1c1602b0.woff2 new file mode 100644 index 0000000000..cc81c0133c Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-400-normal.1c1602b0.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-500-italic.d15c8f11.woff2 b/frontend-dist/alegreya-sans-latin-ext-500-italic.d15c8f11.woff2 new file mode 100644 index 0000000000..c707422915 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-500-italic.d15c8f11.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-500-normal.637067c1.woff2 b/frontend-dist/alegreya-sans-latin-ext-500-normal.637067c1.woff2 new file mode 100644 index 0000000000..6b61635fa8 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-500-normal.637067c1.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-700-italic.733aea09.woff2 b/frontend-dist/alegreya-sans-latin-ext-700-italic.733aea09.woff2 new file mode 100644 index 0000000000..631822edac Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-700-italic.733aea09.woff2 differ diff --git a/frontend-dist/alegreya-sans-latin-ext-700-normal.b5306f41.woff2 b/frontend-dist/alegreya-sans-latin-ext-700-normal.b5306f41.woff2 new file mode 100644 index 0000000000..1896761236 Binary files /dev/null and b/frontend-dist/alegreya-sans-latin-ext-700-normal.b5306f41.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-400-italic.d08e8dff.woff2 b/frontend-dist/alegreya-sans-vietnamese-400-italic.d08e8dff.woff2 new file mode 100644 index 0000000000..5552c00e3d Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-400-italic.d08e8dff.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-400-normal.bdc8a622.woff2 b/frontend-dist/alegreya-sans-vietnamese-400-normal.bdc8a622.woff2 new file mode 100644 index 0000000000..3ec2c8eb20 Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-400-normal.bdc8a622.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-500-italic.3ff20df8.woff2 b/frontend-dist/alegreya-sans-vietnamese-500-italic.3ff20df8.woff2 new file mode 100644 index 0000000000..528c2f36f7 Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-500-italic.3ff20df8.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-500-normal.97e250df.woff2 b/frontend-dist/alegreya-sans-vietnamese-500-normal.97e250df.woff2 new file mode 100644 index 0000000000..7f1f015cb3 Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-500-normal.97e250df.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-700-italic.7de0cccc.woff2 b/frontend-dist/alegreya-sans-vietnamese-700-italic.7de0cccc.woff2 new file mode 100644 index 0000000000..8bdb25ba3c Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-700-italic.7de0cccc.woff2 differ diff --git a/frontend-dist/alegreya-sans-vietnamese-700-normal.59390763.woff2 b/frontend-dist/alegreya-sans-vietnamese-700-normal.59390763.woff2 new file mode 100644 index 0000000000..bc5e38d57d Binary files /dev/null and b/frontend-dist/alegreya-sans-vietnamese-700-normal.59390763.woff2 differ diff --git a/frontend-dist/arrow-back-outline.9ae1bed8.svg b/frontend-dist/arrow-back-outline.9ae1bed8.svg new file mode 100644 index 0000000000..8fc34ff6ec --- /dev/null +++ b/frontend-dist/arrow-back-outline.9ae1bed8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/arrow-forward-outline.f5f68f5c.svg b/frontend-dist/arrow-forward-outline.f5f68f5c.svg new file mode 100644 index 0000000000..32a9f4f309 --- /dev/null +++ b/frontend-dist/arrow-forward-outline.f5f68f5c.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/arrow-redo-circle-outline.dfa899f4.svg b/frontend-dist/arrow-redo-circle-outline.dfa899f4.svg new file mode 100644 index 0000000000..d0d9e1124d --- /dev/null +++ b/frontend-dist/arrow-redo-circle-outline.dfa899f4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/arrow-undo-outline.d8c99108.svg b/frontend-dist/arrow-undo-outline.d8c99108.svg new file mode 100644 index 0000000000..a5d529e729 --- /dev/null +++ b/frontend-dist/arrow-undo-outline.d8c99108.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/arrow-up-circle-outline.3f146ffe.svg b/frontend-dist/arrow-up-circle-outline.3f146ffe.svg new file mode 100644 index 0000000000..ba46f260f7 --- /dev/null +++ b/frontend-dist/arrow-up-circle-outline.3f146ffe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/ban-outline.c97da9b4.svg b/frontend-dist/ban-outline.c97da9b4.svg new file mode 100644 index 0000000000..c52ff62277 --- /dev/null +++ b/frontend-dist/ban-outline.c97da9b4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/caret-down-outline.4253a2fe.svg b/frontend-dist/caret-down-outline.4253a2fe.svg new file mode 100644 index 0000000000..c4c15b4722 --- /dev/null +++ b/frontend-dist/caret-down-outline.4253a2fe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/caret-forward-circle-outline.d0bf2b34.svg b/frontend-dist/caret-forward-circle-outline.d0bf2b34.svg new file mode 100644 index 0000000000..093c8e4ca2 --- /dev/null +++ b/frontend-dist/caret-forward-circle-outline.d0bf2b34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/caret-forward-outline.348a84b6.svg b/frontend-dist/caret-forward-outline.348a84b6.svg new file mode 100644 index 0000000000..888285c953 --- /dev/null +++ b/frontend-dist/caret-forward-outline.348a84b6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/chatbox-ellipses-outline.4334a3a4.svg b/frontend-dist/chatbox-ellipses-outline.4334a3a4.svg new file mode 100644 index 0000000000..4e04a58545 --- /dev/null +++ b/frontend-dist/chatbox-ellipses-outline.4334a3a4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/checkmark-outline.4fb8c646.svg b/frontend-dist/checkmark-outline.4fb8c646.svg new file mode 100644 index 0000000000..f62dcf9212 --- /dev/null +++ b/frontend-dist/checkmark-outline.4fb8c646.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/chevron-down-outline.1efaf1cc.svg b/frontend-dist/chevron-down-outline.1efaf1cc.svg new file mode 100644 index 0000000000..e7a50cd112 --- /dev/null +++ b/frontend-dist/chevron-down-outline.1efaf1cc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/chevron-forward-circle-outline.babf2a99.svg b/frontend-dist/chevron-forward-circle-outline.babf2a99.svg new file mode 100644 index 0000000000..9e63a3c049 --- /dev/null +++ b/frontend-dist/chevron-forward-circle-outline.babf2a99.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/close-circle-outline.4baeedb9.svg b/frontend-dist/close-circle-outline.4baeedb9.svg new file mode 100644 index 0000000000..588e2d4c82 --- /dev/null +++ b/frontend-dist/close-circle-outline.4baeedb9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/close-circle.d0f6eac6.svg b/frontend-dist/close-circle.d0f6eac6.svg new file mode 100644 index 0000000000..cce96081a3 --- /dev/null +++ b/frontend-dist/close-circle.d0f6eac6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/close-outline.9c22a232.svg b/frontend-dist/close-outline.9c22a232.svg new file mode 100644 index 0000000000..17d07818e6 --- /dev/null +++ b/frontend-dist/close-outline.9c22a232.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/cloud-download-outline.8c1ff9bb.svg b/frontend-dist/cloud-download-outline.8c1ff9bb.svg new file mode 100644 index 0000000000..939a8c238e --- /dev/null +++ b/frontend-dist/cloud-download-outline.8c1ff9bb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/cloud-offline-outline.ac2eade9.svg b/frontend-dist/cloud-offline-outline.ac2eade9.svg new file mode 100644 index 0000000000..426ff3b0d9 --- /dev/null +++ b/frontend-dist/cloud-offline-outline.ac2eade9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/copy-outline.0f561529.svg b/frontend-dist/copy-outline.0f561529.svg new file mode 100644 index 0000000000..01e29db632 --- /dev/null +++ b/frontend-dist/copy-outline.0f561529.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/document-lock-outline.69d176a4.svg b/frontend-dist/document-lock-outline.69d176a4.svg new file mode 100644 index 0000000000..b602b075c3 --- /dev/null +++ b/frontend-dist/document-lock-outline.69d176a4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/document-text-outline.8d1e2333.svg b/frontend-dist/document-text-outline.8d1e2333.svg new file mode 100644 index 0000000000..dacd264f49 --- /dev/null +++ b/frontend-dist/document-text-outline.8d1e2333.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/download-outline.523a74d8.svg b/frontend-dist/download-outline.523a74d8.svg new file mode 100644 index 0000000000..8f0e680543 --- /dev/null +++ b/frontend-dist/download-outline.523a74d8.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/easel-outline.9b064e1f.svg b/frontend-dist/easel-outline.9b064e1f.svg new file mode 100644 index 0000000000..cb8186f590 --- /dev/null +++ b/frontend-dist/easel-outline.9b064e1f.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/editor.14f23ca4.css b/frontend-dist/editor.14f23ca4.css new file mode 100644 index 0000000000..a72f73526c --- /dev/null +++ b/frontend-dist/editor.14f23ca4.css @@ -0,0 +1 @@ +main{cursor:auto;margin-top:20px}#helpbox-wrapper,body header#pluto-nav,footer,pluto-cell>button,pluto-input>button,pluto-runarea,pluto-shoulder,preamble>button{display:none!important}@media print{.edit_or_run,nav#undo_delete,pkg-status-mark{display:none!important}pluto-input .cm-editor{border-left:1px solid var(--normal-cell-color);border-radius:4px!important}} \ No newline at end of file diff --git a/frontend-dist/editor.1587a4b9.css b/frontend-dist/editor.1587a4b9.css new file mode 100644 index 0000000000..769b5bf1b7 --- /dev/null +++ b/frontend-dist/editor.1587a4b9.css @@ -0,0 +1 @@ +dialog{background:#fff;border:solid;color:#000;display:block;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}dialog:not([open]){display:none}dialog+.backdrop{background:rgba(0,0,0,.1)}._dialog_overlay,dialog+.backdrop{bottom:0;left:0;position:fixed;right:0;top:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-cyrillic-ext-500-normal.d362a132.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-cyrillic-500-normal.8ed3add8.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-greek-500-normal.dd57b097.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-vietnamese-500-normal.1320bb60.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-latin-ext-500-normal.415f7d14.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:500;src:url(roboto-mono-latin-500-normal.98ad1d4e.woff2) format("woff2"),url(roboto-mono-all-500-normal.cc559149.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-cyrillic-ext-700-normal.5c7aabac.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-cyrillic-700-normal.5e6410cf.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-greek-700-normal.b101f80c.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-vietnamese-700-normal.edb1435b.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-latin-ext-700-normal.c497b002.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(roboto-mono-latin-700-normal.447ac127.woff2) format("woff2"),url(roboto-mono-all-700-normal.393c796d.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-cyrillic-ext-400-normal.5f5cc2ef.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-cyrillic-400-normal.ab3d1dcc.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-greek-ext-400-normal.b82a0aea.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-greek-400-normal.4e5a8597.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-vietnamese-400-normal.bdc8a622.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-latin-ext-400-normal.1c1602b0.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:400;src:url(alegreya-sans-latin-400-normal.62b57001.woff2) format("woff2"),url(alegreya-sans-all-400-normal.a91dc265.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-cyrillic-ext-500-normal.0e6ee102.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-cyrillic-500-normal.8a029e9d.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-greek-ext-500-normal.00f2c6f3.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-greek-500-normal.54a6041f.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-vietnamese-500-normal.97e250df.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-latin-ext-500-normal.637067c1.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:500;src:url(alegreya-sans-latin-500-normal.4428c984.woff2) format("woff2"),url(alegreya-sans-all-500-normal.5db27a5b.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-cyrillic-ext-700-normal.2e02b08f.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-cyrillic-700-normal.5a5aa5e3.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-greek-ext-700-normal.ca9ee8e1.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-greek-700-normal.452fc62e.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-vietnamese-700-normal.59390763.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-latin-ext-700-normal.b5306f41.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:normal;font-weight:700;src:url(alegreya-sans-latin-700-normal.96e2fcc9.woff2) format("woff2"),url(alegreya-sans-all-700-normal.29d7dfa9.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-cyrillic-ext-400-italic.7c2a4a40.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-cyrillic-400-italic.8c81649c.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-greek-ext-400-italic.550f5118.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-greek-400-italic.1b909c63.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-vietnamese-400-italic.d08e8dff.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-latin-ext-400-italic.b9ce632b.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:400;src:url(alegreya-sans-latin-400-italic.ec56f658.woff2) format("woff2"),url(alegreya-sans-all-400-italic.f87bfe89.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-cyrillic-ext-500-italic.78248b65.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-cyrillic-500-italic.a40f95be.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-greek-ext-500-italic.8b2e952b.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-greek-500-italic.19d09eea.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-vietnamese-500-italic.3ff20df8.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-latin-ext-500-italic.d15c8f11.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:500;src:url(alegreya-sans-latin-500-italic.6d8350bf.woff2) format("woff2"),url(alegreya-sans-all-500-italic.8917c3da.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-cyrillic-ext-700-italic.69b0617e.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-cyrillic-700-italic.c4ef17a2.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-greek-ext-700-italic.a1ccc0c2.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-greek-700-italic.5aef27cf.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-vietnamese-700-italic.7de0cccc.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-latin-ext-700-italic.733aea09.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Alegreya Sans;font-style:italic;font-weight:700;src:url(alegreya-sans-latin-700-italic.abc64c8a.woff2) format("woff2"),url(alegreya-sans-all-700-italic.a6d70e05.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Lato;font-style:normal;font-weight:400;src:url(lato-latin-ext-400-normal.e1ce8ad3.woff2) format("woff2"),url(lato-all-400-normal.a1a68bdf.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Lato;font-style:normal;font-weight:400;src:url(lato-latin-400-normal.77db3602.woff2) format("woff2"),url(lato-all-400-normal.a1a68bdf.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Lato;font-style:italic;font-weight:400;src:url(lato-latin-ext-400-italic.336aaf51.woff2) format("woff2"),url(lato-all-400-italic.c29c8c6c.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Lato;font-style:italic;font-weight:400;src:url(lato-latin-400-italic.6edbc86c.woff2) format("woff2"),url(lato-all-400-italic.c29c8c6c.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}:root{--pluto-cell-spacing:17px;--pluto-operator-ligatures:none;--julia-mono-font-stack:JuliaMono,Menlo,"Roboto Mono","Lucida Sans Typewriter","Source Code Pro",monospace;--sans-serif-font-stack:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--lato-ui-font-stack:"Lato",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Cantarell,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",system-ui,sans-serif;--system-ui-font-stack:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Cantarell,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",system-ui,sans-serif;color-scheme:light dark}html{font-size:17px}*{box-sizing:border-box}body{background-color:var(--main-bg-color);margin:0;min-height:100vh;overflow-anchor:none;overflow-x:hidden;position:relative}pluto-editor{align-items:center;display:flex;flex:1 1 auto;flex-direction:column;min-width:0}main{align-content:center;flex:1;max-width:731px;padding:0 6px 4rem 25px;width:100%}body:not(.disable_ui) main{padding-bottom:16rem}body:not(.disable_ui){overscroll-behavior:contain}@media screen and (min-width:calc(700px + 25px + 6px)) and (max-width:calc(700px + 25px + 6px + 500px)){body:not(.disable_ui) pluto-editor.fullscreen main{align-self:flex-start;margin-left:0}}@media screen and (min-width:calc(700px + 25px + 6px + 500px)) and (max-width:calc(700px + 25px + 6px + 500px + 500px)){body:not(.disable_ui) pluto-editor.fullscreen main{align-self:flex-end;margin-right:500px}}pluto-notebook{background:var(--main-bg-color);display:block}pluto-output{color:var(--pluto-output-color);font-family:Alegreya Sans,sans-serif;font-size:1em;font-weight:400}pluto-output h1,pluto-output h2,pluto-output h3,pluto-output h4,pluto-output h5,pluto-output h6{font-feature-settings:"lnum","pnum";color:var(--pluto-output-h-color);font-family:Vollkorn,serif;font-weight:600;margin-block-end:0;margin-block-start:1rem}pluto-output h1,pluto-output h2{font-weight:700;margin-block-start:2rem}pluto-output h1:first-child,pluto-output h2:first-child{margin-block-start:calc(2rem - var(--pluto-cell-spacing))}pluto-output h1{border-bottom:3px solid var(--rule-color);font-size:2.2rem;margin-bottom:.5rem}pluto-output h2{border-bottom:2px dotted var(--rule-color);font-size:1.8rem;margin-bottom:.5rem}pluto-output h1:empty,pluto-output h2:empty{border-bottom:none}pluto-output h3{font-size:1.6rem}pluto-output h4{font-size:1.4rem}pluto-output h5{font-size:1.2rem}pluto-output h6{font-size:1rem}pluto-output h3:first-child,pluto-output h4:first-child,pluto-output h5:first-child,pluto-output h6:first-child{margin-block-start:0}pluto-output br,pluto-output p{line-height:1.45em;margin-block-end:var(--pluto-cell-spacing);margin-block-start:0;word-spacing:.053em}pluto-output br{margin-block-end:0}pluto-output p:first-child{margin-block-start:0}b,strong{font-weight:bolder}pluto-output li p+ol,pluto-output li p+ul{margin-block-start:calc(var(--pluto-cell-spacing)*-1)}pluto-output p:last-child{margin-block-end:0}pluto-output img,pluto-output video{max-width:100%}a{color:var(--black);text-decoration-color:var(--a-underline);text-decoration-thickness:2px}a:hover{text-decoration-color:var(--black)}.cm-cursor{border-left:1.2px solid var(--cursor-color)!important}pluto-output code{font-family:var(--julia-mono-font-stack);font-size:.75em;font-variant-ligatures:none}pluto-output code .cm-editor .cm-line{font-family:var(--julia-mono-font-stack)}pluto-output pre>code{font-size:inherit}pluto-output.rich_output code{background-color:var(--pluto-output-bg-color);border-radius:8px;padding:.18em}pluto-output.rich_output pre>code{background-color:transparent;padding:0}pluto-log-dot pre,pluto-output pre{display:inline-block;font-family:var(--julia-mono-font-stack);font-size:.75rem;font-variant-ligatures:none;margin:0;tab-size:4;-moz-tab-size:4;white-space:pre-wrap;word-break:break-all}pluto-display pre{white-space:pre;word-break:normal}pluto-output hr{border:none;border-top:3px solid var(--rule-color);margin-left:0;margin-right:0}pluto-output blockquote{margin-left:1rem;margin-right:1rem}pluto-output.rich_output pre:not(.no-block),pluto-output blockquote{background-color:var(--blockquote-bg);border-radius:15px;color:var(--blockquote-color);display:block;margin-block-end:var(--pluto-cell-spacing);margin-block-start:0;padding:15px}pluto-output.rich_output pre:not(.no-block):last-child,pluto-output blockquote:last-child{margin-block-end:0}pluto-output div.admonition{border-radius:8px;margin-block-end:1em;margin-block-start:1em}pluto-output div.admonition .admonition-title{font-feature-settings:"lnum","pnum";color:var(--admonition-title-color);font-family:Vollkorn,sans-serif;font-weight:600;margin-block-end:0;padding-left:.3em}pluto-output div.admonition .admonition-title~*{margin-block-end:.5em;margin-block-start:.5em;transition:filter .1s linear}pluto-output div.admonition{background:var(--jl-message-color);border:5px solid var(--jl-message-accent-color);padding-left:.5rem;padding-right:.5rem}pluto-output div.admonition .admonition-title{background:var(--jl-message-accent-color);margin:-1px -.55rem}pluto-output div.admonition.hint,pluto-output div.admonition.info,pluto-output div.admonition.note{background:var(--jl-info-color);border:5px solid var(--jl-info-accent-color)}pluto-output div.admonition.hint .admonition-title,pluto-output div.admonition.info .admonition-title,pluto-output div.admonition.note .admonition-title{background:var(--jl-info-accent-color)}pluto-output div.admonition.warning{background:var(--jl-warn-color);border:5px solid var(--jl-warn-accent-color)}pluto-output div.admonition.warning .admonition-title{background:var(--jl-warn-accent-color)}pluto-output div.admonition.danger{background:var(--jl-danger-color);border:5px solid var(--jl-danger-accent-color)}pluto-output div.admonition.danger .admonition-title{background:var(--jl-danger-accent-color)}pluto-output div.admonition.hint .admonition-title~*{filter:blur(.25em)}pluto-output div.admonition.hint:focus-within .admonition-title~*,pluto-output div.admonition.hint:hover .admonition-title~*{filter:blur(0)}pluto-output div.footnote{margin-block-end:1em;margin-block-start:1em}pluto-output div.footnote p.footnote-title:before{content:"["}pluto-output div.footnote p.footnote-title:after{content:"]: "}pluto-output a.footnote,pluto-output div.footnote p.footnote-title{font-family:Roboto Mono,monospace;font-size:.75rem;font-weight:700;letter-spacing:-.05em;margin-block-end:0}pluto-output div.footnote p.footnote-title~*{border-left:5px solid var(--footnote-border-color);margin-block-end:0;margin-left:.1em;padding-bottom:var(--pluto-cell-spacing);padding-left:.4em}pluto-output div.footnote p:last-child{padding-bottom:0}pluto-output.scroll_y{max-height:80vh;max-height:502px;overflow:auto}pluto-output table{border:2px solid var(--table-border-color);border-collapse:collapse;border-left:none;border-right:none;margin:0 auto;margin-block-end:var(--pluto-cell-spacing);margin-block-start:var(--pluto-cell-spacing)}pluto-output table>thead{border-bottom:1px solid var(--table-border-color)}pluto-output table>tbody td{font-family:var(--julia-mono-font-stack);font-size:.75rem;font-variant-ligatures:none}pluto-output table>tbody td code{font-size:.75rem}pluto-output table td,pluto-output table th{padding:.2rem .5rem}pluto-output table>tbody tr:hover{background-color:var(--table-bg-hover-color)}pluto-output table pre{white-space:pre}kbd,pluto-output kbd{border:1px solid var(--kbd-border-color);border-radius:3px;font-family:Space Mono,monospace;font-size:.7rem;letter-spacing:-.7px;padding:0 5px}pluto-output mjx-assistive-mml{height:1px}.raw-html-wrapper>div.markdown{overflow:hidden}header#pluto-nav{background-color:var(--header-bg-color);border-bottom:1px solid var(--header-border-color);font-family:Roboto Mono,monospace;font-size:.75rem;font-weight:400;min-height:60px;transform:translateY(0);transition:background-color .5s ease-in-out,transform .25s cubic-bezier(.18,.89,.49,1.13);width:100%;z-index:60}header#pluto-nav.show_export{position:sticky;top:0;transform:translateY(130px)}aside#export{background:var(--export-bg-color);color:var(--export-color);height:130px;position:absolute;top:0;transform:translateY(-100%);width:100%}aside#export:before{background:inherit;bottom:100%;content:"";height:100px;left:0;position:absolute;right:0}aside#export div#container{display:flex;flex-direction:row;margin:0 auto;max-width:1000px;padding-right:10em;position:relative}header aside#export div#container{overflow-x:hidden}header.show_export aside#export div#container{overflow-x:auto}a.export_card{background:var(--export-card-bg-color);border:5px solid transparent;box-shadow:0 2px 10px var(--export-card-shadow-color);color:var(--export-card-title-color);margin:20px 5px;text-decoration:none;width:169px}a.export_card,div.export_title{border-radius:8px;flex:0 0 auto;height:90px}div.export_title{font-size:1rem;font-weight:700;margin-top:10px;text-orientation:sideways-right;transform:rotate(180deg);writing-mode:vertical-lr}a.export_card header{font-feature-settings:"lnum","pnum";font-family:Vollkorn,sans;font-size:1rem;margin-block:0}a.export_card section{color:var(--export-card-text-color);font-weight:500;padding:3px}aside#export .export_small_btns{background:var(--export-bg-color);border-radius:.9em;display:flex;flex-direction:row;padding:.9em;position:absolute;right:.8em;top:0}body.static_preview button.toggle_export{display:none}nav#at_the_top h1{color:var(--nav-h1-text-color);letter-spacing:2px}nav#at_the_top{display:flex;flex-direction:row;flex-wrap:wrap;margin:0 auto;max-width:1000px;min-height:60px;padding-left:20px;padding-right:20px;z-index:100}nav#at_the_top>*{align-self:center;flex:0 0 auto;margin:10px 0}nav#at_the_top>.flex_grow_1{flex-grow:1}nav#at_the_top>.flex_grow_2{flex-grow:2}nav#at_the_top h1{border-bottom:none;display:inline;font-size:1.8rem;font-weight:700}nav#at_the_top img#logo-big,nav#at_the_top img#logo-small{filter:var(--image-filters);height:39px;margin-bottom:-8px}nav#at_the_top img#logo-small{display:none}@media (max-width:800px){nav#at_the_top img#logo-small{display:unset}nav#at_the_top img#logo-big{display:none}}nav#at_the_top>div.desktop_picker,nav#at_the_top>pluto-filepicker{display:flex;flex-direction:row;flex-grow:1;width:210px}nav#at_the_top>div.desktop_picker span,nav#at_the_top>pluto-filepicker .cm-editor{background:none;border:2px solid var(--footer-input-border-color);border-radius:3px;border-bottom-right-radius:0;border-right:none;border-top-right-radius:0;color:var(--nav-filepicker-color);display:inline-block;font-family:inherit;font-size:.8rem;font-style:normal;font-weight:500;height:calc(1rem + 12px);letter-spacing:1px;min-width:10rem}pluto-filepicker .cm-scroller{scrollbar-width:none}pluto-filepicker .cm-scroller::-webkit-scrollbar{display:none}div.desktop_picker button,pluto-filepicker button{cursor:pointer;height:auto}pluto-filepicker button:disabled{cursor:not-allowed}div.desktop_picker span{cursor:pointer;line-height:1.8;overflow-x:hidden;padding:0 5px;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.export_small_btns button,button.start_stop_recording,button.toggle_export{background:none;border:none;cursor:pointer;opacity:.5}.export_small_btns button span,button.start_stop_recording span,button.toggle_export span{background-size:25px 25px;content:" "!important;display:block;height:25px;width:25px}nav#at_the_top button.start_stop_recording span{background-image:url(radio-button-on-outline.778acac1.svg)}nav#at_the_top button.start_stop_recording.stop span{background-image:url(stop-circle-outline.6623356d.svg)}nav#at_the_top button.toggle_export span{background-image:url(share-outline.50164ded.svg);filter:var(--image-filters)}aside#export button.toggle_export span{background-image:url(close-outline.9c22a232.svg);filter:invert(1)}aside#export button.toggle_frontmatter_edit span{background-image:url(newspaper-outline.e481c39c.svg);filter:invert(1)}aside#export button.toggle_presentation span{background-image:url(easel-outline.9b064e1f.svg);filter:invert(1)}nav#at_the_top:after{align-self:center;margin-left:auto}.cm-tooltip-autocomplete li.file.new:before{color:#000;content:"👉"}.cm-tooltip-autocomplete li.file:before{color:#000;content:"📄"}.cm-tooltip-autocomplete li.dir:before{color:#000;content:"📁"}@media (any-pointer:fine){nav#at_the_top>div.desktop_picker span,nav#at_the_top>pluto-filepicker .cm-editor{border:2px solid transparent;border-right:none;transition:border .15s ease-in-out}nav#at_the_top>div.desktop_picker button,nav#at_the_top>pluto-filepicker button{opacity:0;transition:opacity .15s ease-in-out}header:focus-within>nav#at_the_top>div.desktop_picker span,header:focus-within>nav#at_the_top>pluto-filepicker .cm-editor,header:hover>nav#at_the_top>div.desktop_picker span,header:hover>nav#at_the_top>pluto-filepicker .cm-editor{border:2px solid var(--footer-input-border-color);border-right:none}header:focus-within>nav#at_the_top>div.desktop_picker button,header:focus-within>nav#at_the_top>pluto-filepicker button,header:hover>nav#at_the_top>div.desktop_picker button,header:hover>nav#at_the_top>pluto-filepicker button{opacity:1}}body.binder header#pluto-nav>nav#at_the_top>pluto-filepicker>*{display:none}body.binder header#pluto-nav>nav#at_the_top>pluto-filepicker>a{display:block;font-family:var(--julia-mono-font-stack);font-size:16px;opacity:.8;text-decoration:none}body.binder.loading header#pluto-nav,body.disconnected header#pluto-nav,body.nbpkg_restart_recommended header#pluto-nav,body.nbpkg_restart_required header#pluto-nav,body.process_dead header#pluto-nav{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);position:sticky;top:0}body.nbpkg_restart_recommended header#pluto-nav{background-color:var(--restart-recc-header-color)}body.nbpkg_restart_required header#pluto-nav{background-color:var(--restart-req-header-color)}body.process_dead header#pluto-nav{background-color:var(--dead-process-header-color)}body.loading header#pluto-nav{background-color:var(--loading-header-color)}body.disconnected header#pluto-nav{background-color:var(--disconnected-header-color)}body.binder.loading header#pluto-nav{background-color:var(--binder-loading-header-color)}nav#at_the_top>#process_status{background:var(--nav-process-status-bg-color);border-radius:10px;color:var(--nav-process-status-color);font-size:1rem;font-weight:500;margin:5px 5px 5px 1em;padding:5px 10px;z-index:10}nav#at_the_top>#process_status:empty{display:none}loading-bar{animation:move-background 2s ease-in-out infinite;background:linear-gradient(90deg,var(--loading-grad-color-1),var(--loading-grad-color-2),var(--loading-grad-color-1));background-size:100vw 100%;display:block;height:6px;left:0;opacity:0;position:fixed;top:0;transition:width 2s cubic-bezier(.14,.71,0,.99),opacity .2s linear;width:10vw;z-index:12000}loading-bar.slow{transition:width 10s cubic-bezier(.14,.71,0,.99),opacity .5s linear}@media (prefers-reduced-motion){loading-bar{transition:none}}body.binder.loading #binder_spinners{opacity:.25}@keyframes move-background{0%{background-position-x:0}to{background-position-x:100vw}}.outline-frame{box-sizing:border-box;height:100vh;left:0;pointer-events:none;position:fixed;top:0;width:100vw;z-index:9990}body.recording_waiting_to_start .outline-frame.recording{border:12px solid #be6f6fba}body.is_recording .outline-frame.recording{border:12px solid #dc3535ba}.outline-frame.playback{border:12px solid #357ddcba;box-shadow:inset 0 0 20px 20px #919bff2b;opacity:1;position:absolute;transition:top .3s ease-in-out,opacity .3s ease-in-out}body.is_recording header#pluto-nav,body.recording_waiting_to_start header#pluto-nav{display:none}#record-ui-container{display:flex;flex-direction:row;flex-wrap:wrap;position:fixed;top:3px;z-index:9999}#record-ui-container>.overlay-button{border-color:#e86f6c;margin:0 3px}#record-ui-container>.overlay-button.record-no-audio{border-color:#dcc6c6}#record-ui-container>.overlay-button.playback{border-color:#c6c6dc}span.pluto-icon.stop-recording-icon:after{background-image:url(stop-circle-outline.6623356d.svg)}span.pluto-icon.microphone-icon:after{background-image:url(mic-outline.e10eafe2.svg)}span.pluto-icon.info-icon:after{background-image:url(information-circle-outline.008b2bb9.svg)}span.pluto-icon.mute-icon:after{background-image:url(mic-off-outline.251c22b7.svg)}span.pluto-icon.follow-recording-icon:after{background-image:url(arrow-undo-outline.d8c99108.svg)}div.recording-playback{bottom:16px;position:fixed;width:min(500px,90vw);z-index:9999}.raw-html-wrapper.preamble,div.recording-playback audio{width:100%}main>preamble{display:flex;height:20px;margin-top:5px;padding-right:5px;pointer-events:none;position:sticky;top:5px;z-index:200}.overlay-button{background:var(--overlay-button-bg);border:3px solid var(--overlay-button-border);border-radius:12px;font-family:Segoe UI Emoji,Roboto Mono,monospace;font-size:.75rem;height:35px;padding:5px 8px;pointer-events:all;white-space:nowrap}.overlay-button,.overlay-button button:not(.asdfdsf){color:var(--overlay-button-color)}main>preamble #saveall-container{margin-left:auto}pluto-editor.fullscreen main>preamble #saveall-container{transform:translateX(max(0px,100vw - 700px - 25px))}@media screen and (min-width:calc(700px + 25px + 6px + 500px)){pluto-editor.fullscreen main>preamble #saveall-container{transform:translateX(500px)}}main>preamble #saveall-container.ask_to_save{border-color:var(--overlay-button-border-save)}main>preamble #saveall-container.saved,main>preamble #saveall-container.saving{border-color:transparent}main>preamble #saveall-container.saved>span,main>preamble #saveall-container.saving>span{opacity:.5}span.pluto-icon:after{background-image:url(sync-circle-outline.65b15d76.svg);background-position-x:right;background-position-y:1px;background-repeat:no-repeat;background-size:1.3em;content:"";display:inline-block;filter:var(--image-filters);height:1.3em;margin-bottom:-.3em;padding-right:1.5em;transform:translateY(-.1em)}.overlay-button span.saved-icon:after,main>preamble span.saved-icon:after{background-image:url(checkmark-outline.4fb8c646.svg);filter:var(--image-filters)}#saveall-container .only-on-hover{display:none}#saveall-container:hover .only-on-hover{display:inline}pluto-cell{break-inside:avoid;display:block;margin-top:var(--pluto-cell-spacing);min-height:25px;position:relative}pluto-output{align-items:baseline;background-color:var(--pluto-output-bg-color);display:block;overflow-x:auto;padding-left:10px;padding-right:10px}.scroll_y{max-height:80vh;overflow-y:auto}pluto-output:focus{outline:none}pluto-output:not(.rich_output){display:flex;flex-wrap:wrap;padding-bottom:3px;padding-top:3px}pluto-output>assignee{font-family:var(--julia-mono-font-stack);font-size:.75rem;font-variant-ligatures:none}pluto-output>assignee:after{content:"\a0=\a0";opacity:.6}.errored pluto-output>assignee,pluto-output>assignee:empty{display:none}pluto-output>div{flex-shrink:0;overflow-y:hidden}pluto-output div.raw-html-wrapper{display:contents}pluto-output:not(.rich_output)>div>pre{display:flex}.bonds_disabled:where(.offer_binder,.offer_local) bond{filter:grayscale(1);opacity:.6}pluto-display,pluto-display>div{display:contents}.isolated-cell>pluto-output{padding:0}.hidden-cell{display:none}pluto-cell.depends_on_disabled_cells>pluto-input .cm-editor,pluto-cell.depends_on_disabled_cells>pluto-logs-container,pluto-cell.depends_on_disabled_cells>pluto-output,pluto-cell.depends_on_disabled_cells>pluto-trafficlight,pluto-cell.running_disabled>pluto-input .cm-editor,pluto-cell.running_disabled>pluto-logs-container,pluto-cell.running_disabled>pluto-output,pluto-cell.running_disabled>pluto-trafficlight{opacity:.3}pluto-cell.running_disabled>pluto-input .cm-editor,pluto-cell.running_disabled>pluto-output{background-color:var(--disabled-cell-bg-color)}pluto-cell.depends_on_skipped_cells .depends_on_skipped_marker,pluto-cell.skip_as_script .skip_as_script_marker{background-color:var(--skip-as-script-background-color);border-radius:0 4px 4px 0;bottom:0;cursor:help;display:block;position:absolute;right:-3px;top:0;width:4px;z-index:20}pluto-cell.depends_on_skipped_cells .depends_on_skipped_marker{background-color:var(--depends-on-skip-as-script-background-color)}pluto-cell.depends_on_skipped_cells pluto-input .cm-editor,pluto-cell.skip_as_script pluto-input .cm-editor{border-bottom-right-radius:0}pluto-cell.selected{background:var(--selected-cell-bg-color);border-radius:0 3px 3px 0}pluto-cell.selected>pluto-input>div.cm-editor,pluto-cell.selected>pluto-output{opacity:.7}main{cursor:vertical-text}pluto-cell{cursor:auto}pluto-output>div{scrollbar-color:transparent transparent;scrollbar-width:thin}pluto-cell:hover>pluto-output>div{scrollbar-color:var(--hover-scrollbar-color-1) var(--hover-scrollbar-color-2)}pluto-output>div::-webkit-scrollbar{background:transparent;height:6px}pluto-output>div::-webkit-scrollbar-thumb{background:transparent}pluto-cell:hover>pluto-output>div::-webkit-scrollbar{background:var(--hover-scrollbar-color-2)}pluto-cell:hover>pluto-output>div::-webkit-scrollbar-thumb{background:var(--hover-scrollbar-color-1)}pluto-input .cm-editor{border:1px solid var(--normal-cell-color);border-bottom-right-radius:4px;border-left:none;min-height:25px;scroll-margin-block:20vh;transition:border-color .15s ease-in-out;z-index:20}pluto-input:focus-within .cm-editor{z-index:21}pluto-input .cm-editor .cm-line{transition:background-color .15s ease-in-out}pluto-input .cm-editor .cm-line.cm-highlighted-line,pluto-input .cm-editor span.cm-highlighted-range{background-color:#bdbdbd68;border-radius:3px}pluto-cell:not(.show_input)>pluto-input{display:none}pluto-cell.code_differs>pluto-input>.cm-editor{border:1px solid var(--code-differs-cell-color);border-left:none}.overlay-button button,button.floating_back_button,nav#slide_controls>button,pluto-cell>button,pluto-input>button,pluto-runarea>button,pluto-shoulder>button{background:none;border:none;color:var(--ui-button-color);cursor:pointer;font-family:Segoe UI Emoji,Roboto Mono,monospace;font-size:.75rem;margin:0;opacity:50%;padding:1px;position:absolute;z-index:30}.overlay-button button{position:relative}pluto-shoulder{--invisible-border:calc(var(--pluto-cell-spacing)*0.5);--shoulder-width:calc(28px + var(--invisible-border));--border-radius:calc(5px + var(--invisible-border));align-items:flex-start;border:var(--invisible-border) solid transparent;border-radius:var(--border-radius) 0 0 var(--border-radius);border-right:none;bottom:calc(0px - var(--invisible-border));cursor:move;display:flex;flex-direction:row;justify-content:flex-end;left:calc(0px - var(--shoulder-width));position:absolute;top:calc(0px - var(--invisible-border));width:var(--shoulder-width)}pluto-editor.fullscreen pluto-shoulder{--shoulder-width:2000px}pluto-shoulder:hover{background:var(--shoulder-hover-bg-color);background-clip:padding-box}pluto-shoulder>button{flex:0 0 auto;padding:4px 5px 4px 10px;position:sticky;top:0}pluto-cell:focus-within>pluto-shoulder>button{padding-right:9px}pluto-shoulder>button>span:after{background-image:url(eye-outline.6e6e0f7c.svg);filter:var(--image-filters)}pluto-cell.code_folded>pluto-shoulder>button>span:after{background-image:url(eye-off-outline.a37e03db.svg);filter:var(--image-filters)}pluto-trafficlight{--patternHeight:22.62741699797px;background:var(--normal-cell-color);border-bottom-left-radius:4px;border-left-color:var(--normal-cell-color);border-top-left-radius:4px;bottom:0;box-sizing:content-box;left:-4px;margin-right:-1px;overflow:hidden;pointer-events:none;position:absolute;top:0;width:4px}pluto-trafficlight:after{content:"";height:calc(100% + var(--patternHeight)*10);left:0;opacity:0;position:absolute;top:calc(0px - var(--patternHeight)*10);width:100%}pluto-cell.activate_animation pluto-trafficlight:after{animation:scrollbackground 10s linear 0s infinite running}body:not(.___) pluto-cell.code_folded>pluto-trafficlight{background:none}@media screen and (any-pointer:fine){body:not(.disable_ui) pluto-cell:hover>pluto-trafficlight{background:var(--normal-cell-color);transition:background .05s ease-in}}body:not(.___) pluto-cell:focus-within>pluto-trafficlight{background-clip:padding-box;background-color:var(--normal-cell-color);border-left-style:solid;border-left-width:4px;margin-left:-4px}body:not(.___) pluto-cell.selected>pluto-trafficlight{background:var(--selected-cell-color);background-clip:padding-box;border-left-color:var(--selected-cell-color)}body:not(.___) pluto-cell.code_differs>pluto-trafficlight{background:var(--code-differs-cell-color);background-clip:padding-box;border-left-color:var(--code-differs-cell-color)}body:not(.___) pluto-cell.errored>pluto-trafficlight{background:var(--error-cell-color);background-clip:padding-box;border-left-color:var(--error-cell-color)}body:not(.___) pluto-cell.queued>pluto-trafficlight:after{animation-duration:20s;background:repeating-linear-gradient(-45deg,transparent,transparent 8px,var(--normal-cell-color) 8px,var(--normal-cell-color) 16px);background-clip:padding-box;background-size:4px var(--patternHeight);opacity:.99}body:not(.___) pluto-cell.running>pluto-trafficlight:after{background:repeating-linear-gradient(-45deg,var(--normal-cell-color),var(--normal-cell-color) 8px,var(--dark-normal-cell-color) 8px,var(--dark-normal-cell-color) 16px);background-clip:content-box;background-size:4px var(--patternHeight);opacity:.99}body:not(.___) pluto-cell.queued.errored>pluto-trafficlight:after,body:not(.___) pluto-cell.running.errored>pluto-trafficlight:after{background:repeating-linear-gradient(-45deg,var(--light-error-cell-color),var(--light-error-cell-color) 8px,var(--bright-error-cell-color) 8px,var(--bright-error-cell-color) 16px);background-clip:content-box;background-size:4px var(--patternHeight);opacity:.99}@keyframes scrollbackground{0%{transform:translate(0)}to{transform:translateY(calc(var(--patternHeight)*10))}}pluto-cell>button>span,pluto-input>button>span{pointer-events:none}@media screen and (any-pointer:fine){pluto-cell>button,pluto-cell>pluto-runarea,pluto-input>button,pluto-runarea>button,pluto-shoulder>button{opacity:0;transition:opacity .25s ease-in-out}.export_small_btns button,button.start_stop_recording,button.toggle_export,pluto-cell:hover>button,pluto-cell:hover>pluto-input>button,pluto-cell:hover>pluto-shoulder>button,pluto-cell>pluto-runarea>button{opacity:.4;transition:opacity .25s ease-in-out}.export_small_btns button:hover,.overlay-button button:hover,button.start_stop_recording:hover,button.toggle_export:hover,pluto-cell:hover>pluto-runarea,pluto-cell>button:hover,pluto-cell>pluto-input>button:hover,pluto-cell>pluto-runarea>button:hover,pluto-cell>pluto-shoulder>button:hover{opacity:1;transition:opacity .05s ease-in-out}}@media screen and (pointer:coarse){pluto-cell>button,pluto-cell>pluto-runarea{opacity:0;transition:opacity .25s ease-in-out}pluto-input>button,pluto-shoulder>button{opacity:.25;transition:opacity .25s ease-in-out}pluto-cell:focus-within>button,pluto-cell:focus-within>pluto-input>button,pluto-cell:focus-within>pluto-runarea,pluto-cell:focus-within>pluto-shoulder>button{opacity:.25;transition:opacity .25s ease-in-out}pluto-cell>button:focus-within,pluto-cell>pluto-input>button:focus-within,pluto-cell>pluto-input>button:focus-within pluto-cell>pluto-runarea>button:focus-within,pluto-cell>pluto-runarea,pluto-cell>pluto-shoulder>button:focus-within{opacity:1;transition:opacity .05s ease-in-out}}pluto-cell>button>span:after,pluto-input>button>span:after,pluto-runarea>button>span:after,pluto-shoulder>button>span:after{background-size:17px 17px;content:" "!important;display:block;height:17px;width:17px}pluto-cell>button.add_cell{--hit-box-extend:20px;left:-12px;margin-left:calc(var(--hit-box-extend)*-1);margin-right:calc(var(--hit-box-extend)*-1);padding-left:var(--hit-box-extend);padding-right:var(--hit-box-extend)}pluto-cell>button.add_cell.before{margin-top:calc(-9.5px - var(--pluto-cell-spacing)*.5)!important}pluto-cell>button.add_cell.after{bottom:1px;margin-bottom:calc(-10.5px - var(--pluto-cell-spacing)*.5)}pluto-cell>button.add_cell>span:after{background-image:url(add-outline.e3c93c35.svg);filter:var(--image-filters)}pluto-input>button.input_context_menu ul{background-color:var(--input-context-menu-bg-color);border:1px solid var(--input-context-menu-border-color);border-radius:6px;display:grid;grid-template-columns:max-content;left:100%;margin:0;padding:0;position:absolute;top:-8px}@media screen and (min-width:921px){pluto-input>button.input_context_menu ul{left:calc(100% - 3px)}}@media screen and (max-width:920px){pluto-input>button.input_context_menu{z-index:31}pluto-input>button.input_context_menu ul{left:unset;right:0}}.input_context_menu li{align-items:center;border-radius:2px;color:var(--input-context-menu-li-color);display:flex;font-family:Roboto Mono,system-ui;font-size:.8rem;height:32px;justify-content:flex-start;letter-spacing:-.02em;list-style:none;margin-block-end:0;padding:8px;position:relative}.input_context_menu li:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.input_context_menu li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}.input_context_menu li.coming_soon{color:var(--input-context-menu-soon-color)}.input_context_menu li.coming_soon:hover{background-color:var(--input-context-menu-hover-bg-color);cursor:not-allowed}.input_context_menu li:hover{background-color:var(--input-context-menu-hover-bg-color);transition-duration:.2s;transition-property:background-color}.ctx_icon,.icon{--size:17px;background-position:50%;background-size:var(--size) var(--size);height:var(--size);margin-right:calc(var(--size)/3);margin-top:1px;width:var(--size)}.ctx_icon{filter:var(--image-filters)}.ctx_icon.hide_logs,.ctx_icon.show_logs{background-image:url(document-text-outline.8d1e2333.svg)}.ctx_icon.enable_cell{background-image:url(caret-forward-circle-outline.d0bf2b34.svg)}.ctx_icon.disable_cell{background-image:url(ban-outline.c97da9b4.svg);background-repeat:no-repeat;background-size:15px}.ctx_icon.delete{background-image:url(close-circle-outline.4baeedb9.svg)}.ctx_icon.run_as_script{background-image:url(document-lock-outline.69d176a4.svg)}.ctx_icon.skip_as_script{background-image:url(document-text-outline.8d1e2333.svg)}.ctx_icon.copy_output{background-image:url(copy-outline.0f561529.svg)}pluto-input>button.input_context_menu{padding:5px;right:0}pluto-input>button.input_context_menu.open{opacity:1}pluto-input>button.input_context_menu>span.icon:after{background-image:url(ellipsis-horizontal-circle-outline.6279ed30.svg);filter:var(--image-filters)}pkg-status-mark{display:inline-block;height:1em;margin:0 .6em 0 .2em;width:1em}body.nbpkg_disabled pkg-status-mark:not(.disable_pkg){display:none}pkg-status-mark>button{background:none;border:none;cursor:context-menu;margin:0;padding:0;position:relative;top:-.2em}pkg-status-mark>button>span:after{background-image:url(time-outline.7c1877f0.svg);background-size:1.5em;content:" "!important;display:inline-block;filter:var(--image-filters);height:1.5em;opacity:.3;width:1.5em}pkg-status-mark.installed>button>span:after{background-image:url(checkmark-outline.4fb8c646.svg);filter:var(--image-filters)}pkg-status-mark.busy>button>span:after{animation:loadspin 3s ease-in-out infinite;background-image:url(sync-outline.9a1bd27b.svg);filter:var(--image-filters)}pkg-status-mark.not_found>button>span:after{background-image:url(cloud-offline-outline.ac2eade9.svg);filter:var(--image-filters);opacity:.6}pkg-status-mark.will_be_installed>button>span:after{background-image:url(cloud-download-outline.8c1ff9bb.svg);filter:var(--image-filters);opacity:.6}pkg-status-mark.disable_pkg>button>span:after{background-image:url(chatbox-ellipses-outline.4334a3a4.svg);filter:var(--image-filters);opacity:.6}pluto-popup{--max-size:251px;display:block;font-family:var(--system-ui-font-stack);margin-left:.4rem;margin-top:-1rem;opacity:0;overflow-wrap:break-word;pointer-events:none;position:absolute;transform:scale(.2);transform-origin:left;transition:transform .5s ease-in-out,opacity .1s ease-in-out;width:min(90vw,var(--max-size));z-index:1800}pluto-popup.visible{opacity:1;pointer-events:auto;transform:scale(1);transition:transform .2s ease-in-out,opacity .2s ease-in-out}pluto-popup.big{--max-size:25em}pluto-popup>*{background:var(--overlay-button-bg);border:3px solid var(--overlay-button-border);border-radius:10px;color:var(--black);display:block;max-width:100%;padding:8px;position:absolute}pluto-popup>div>:first-child{margin-block-start:0}pluto-popup h1{font-size:1.6em}pluto-popup.warn>*{background:var(--pluto-logs-warn-color);border-color:var(--pluto-logs-warn-accent-color)}pluto-popup code.auto_disabled_variable{font-family:var(--julia-mono-font-stack);font-size:.8rem;font-variant-ligatures:none}pluto-popup>pkg-popup{background:var(--pkg-popup-bg);border:3px solid var(--pkg-popup-border-color)}pkg-popup.busy{border:3px solid #aa80bc}pkg-version{font-family:Space Mono,monospace;font-size:.75rem;opacity:.5}pkg-popup .pkg-buttons{display:inline-flex;flex-direction:row;float:right;height:1em}a.stdout-info img,pkg-popup .pkg-buttons img{filter:var(--image-filters)}a.stdout-info,pkg-popup .pkg-buttons>*{background:var(--pkg-popup-buttons-bg-color);border-radius:10px;box-sizing:content-box;display:block;height:17px;margin-left:-4px;padding:4px;z-index:52}pkg-popup .toggle-terminal{right:20px}pkg-terminal{background:var(--pkg-terminal-bg-color);border:3px solid var(--pkg-terminal-border-color);border-radius:6px;color:#fff;cursor:text;display:block;margin-top:6px;padding:3px}pkg-terminal>.scroller{max-height:10rem;overflow-y:auto;padding:4px;width:100%}pkg-terminal pre{font-family:Space Mono,monospace;font-size:.6rem;margin:0;white-space:pre-wrap;word-break:break-all}pkg-popup pkg-terminal{display:none}pkg-popup.showterminal pkg-terminal{display:block}@keyframes loadspin{0%{transform:rotate(0deg)}25%{transform:rotate(180deg)}50%{transform:rotate(180deg)}75%{transform:rotate(1turn)}to{transform:rotate(1turn)}}pluto-runarea{background-color:var(--pluto-runarea-bg-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:none;display:block;height:17px;margin-right:3px;min-width:75px;position:absolute;right:0;z-index:19}pluto-runarea>span{color:var(--pluto-runarea-span-color);display:inline-block;font-family:Roboto Mono,monospace;font-size:.6em;font-style:italic;left:22px;position:absolute;text-align:center;top:1px;width:45px}pluto-runarea>button.runcell{left:1px;top:-1px}pluto-runarea>button.runcell>span:after{background-image:url(caret-forward-circle-outline.d0bf2b34.svg);filter:var(--image-filters)}pluto-runarea.interrupt>button.runcell>span:after{background-image:url(stop-circle-outline.6623356d.svg);filter:var(--image-filters)}pluto-runarea.jump>button.runcell>span:after{background-image:url(arrow-redo-circle-outline.dfa899f4.svg);filter:var(--image-filters)}pluto-runarea.save>button.runcell>span:after{background-image:url(chevron-forward-circle-outline.babf2a99.svg);filter:var(--image-filters)}pluto-cell:not(.show_input)>pluto-runarea{display:none}pluto-cell.code_folded.show_input>pluto-input:not(:focus-within){opacity:.4}pluto-cell.code_differs>pluto-runarea,pluto-cell:focus-within>pluto-runarea{opacity:100%}pluto-cell.code_differs>pluto-runarea>button{animation-duration:4s;animation-iteration-count:infinite;animation-name:👀}@keyframes 👀{0%,80%,to{opacity:50%;transform:scale(1)}90%{opacity:100%;transform:scale(1.2)}}dropruler{background:var(--dropruler-bg-color);display:none;height:4px;left:0;margin-top:calc(-2px - var(--pluto-cell-spacing)*.5);position:absolute;right:0}#helpbox-wrapper{bottom:0;display:none;height:0;position:sticky;width:100%;z-index:50}@media (min-width:500px){#helpbox-wrapper{display:block}}pluto-helpbox{background-color:var(--helpbox-bg-color);border-bottom:none;border-right:none;border-top-left-radius:9px;border-top-right-radius:9px;bottom:0;box-shadow:0 0 11px 0 var(--helpbox-box-shadow-color);color:var(--helpbox-text-color);display:flex;flex-direction:column;height:95vh;height:min(70vh,900px);position:absolute;right:20px;width:calc(100vw - 781px);width:clamp(300px,calc(100vw - 781px),450px)}pluto-helpbox>section{display:flex;flex-direction:column;height:100%;overflow:auto;padding:10px}pluto-helpbox>header{--border-radius:0.4em;background-color:var(--helpbox-header-bg-color);border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);color:var(--helpbox-header-color);display:flex;font-family:var(--system-ui-font-stack);font-size:.9rem;font-weight:500;gap:.5em;padding:.6em}pluto-helpbox>header>button.helpbox-tab-key>.tabicon{--size:1.1em;background-size:var(--size);display:inline-block;filter:var(--image-filters);height:var(--size);margin-bottom:calc(var(--size)*-.15);margin-right:.6em;width:var(--size)}pluto-helpbox>header>button.helpbox-docs>.tabicon{background-image:url(search.1ca5b3b3.svg)}pluto-helpbox>header>button.helpbox-process>.tabicon{background-image:url(terminal.6b804248.svg);background-image:url(pulse.27a877a7.svg)}pluto-helpbox>header>button.helpbox-tab-key:disabled>.tabicon{opacity:.5}pluto-helpbox .live-docs-searchbox{display:flex;margin:1em}pluto-helpbox .live-docs-searchbox input{background-color:inherit;background:var(--helpbox-search-bg-color);border:none;border:3px solid var(--helpbox-search-border-color);border-radius:.3em;color:inherit;flex-grow:1;font-family:var(--julia-mono-font-stack);font-size:.9rem;margin:auto;padding:.5em}pluto-helpbox .live-docs-searchbox.notfound input{color:var(--helpbox-notfound-search-color)}pluto-helpbox .live-docs-searchbox input:focus{outline:none}button.helpbox-tab-key{background:var(--helpbox-header-tab-bg-color);border:none;border-radius:var(--border-radius);cursor:pointer;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;overflow:hidden;padding:.5em .6em;text-overflow:ellipsis;white-space:nowrap}button.helpbox-process.busy{outline:6px solid var(--process-busy)}@media (prefers-reduced-motion:no-preference){button.helpbox-process.busy{animation:outline-heartbeat .8s ease-in infinite;animation-direction:alternate}}@keyframes outline-heartbeat{0%{outline-offset:-1px;outline-width:3px}to{outline-offset:0;outline-width:6px}}button.active.helpbox-tab-key{animation:none;outline:3px solid #99afb9}pluto-helpbox>header>button.helpbox-close{background:none;border:15px solid transparent;cursor:pointer;margin:-15px -15px -15px auto}pluto-helpbox>header>button.helpbox-close>span{background-image:url(chevron-down-outline.1efaf1cc.svg);background-size:1em 1em;content:" "!important;display:block;filter:var(--image-filters);height:1em;width:1em}pluto-helpbox.hidden{height:auto;width:auto}pluto-helpbox.hidden>section{display:none}.helpbox-docs{font-family:Lato,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:.9rem;line-height:1.5}.helpbox-docs .cm-line,.helpbox-docs code,.helpbox-docs pre{font-family:Roboto Mono,SFMono-Regular,Menlo,Consolas,Liberation Mono,DejaVu Sans Mono,monospace;font-size:.95em;line-height:normal}.helpbox-docs pre code{font-size:1em}.helpbox-docs code .cm-editor .cm-content,.helpbox-docs pre code.hljs{padding:0}.helpbox-docs img{max-width:100%}.helpbox-docs>section h1,.helpbox-docs>section h2,.helpbox-docs>section h3,.helpbox-docs>section h4,.helpbox-docs>section h5,.helpbox-docs>section h6{border-bottom:none;font-family:inherit;font-size:1rem}.helpbox-docs>section h1{font-size:1.3rem;overflow-wrap:anywhere}.helpbox-docs>section pre{-webkit-overflow-scrolling:touch;word-wrap:normal;background:var(--code-section-bg-color);border:1px solid var(--code-section-border-color);border-radius:4px;overflow-x:auto;padding:.7rem .5rem;white-space:pre}.helpbox-docs>section hr{border:none;border-top:3px solid var(--rule-color)}.pluto-docs-binding{background:var(--docs-binding-bg);border-radius:1em;color:var(--pluto-output-color);margin:.5em;padding:1em}.pluto-docs-binding>span{background:var(--pluto-output-bg-color);border-radius:.4rem;color:var(--black);display:inline-block;font-family:var(--julia-mono-font-stack);font-size:.9rem;font-weight:700;margin-top:-1em;padding:.235rem;transform:translate(-1.2em,-73%)}.pluto-docs-binding h1{font-size:1.4em}.pluto-docs-binding h2{font-size:1.3em}.pluto-docs-binding h3,.pluto-docs-binding h4,.pluto-docs-binding h5,.pluto-docs-binding h6{font-size:1.1em}pl-status{--status-color:var(--process-undefined);--indent:0.7rem;border-left:3px solid transparent;border-radius:.2em;display:flex;flex:0 0 auto;flex-direction:column;font-family:var(--system-ui-font-stack);font-size:.9rem;margin-left:var(--indent);margin-top:.4em;overflow:hidden}pl-status:before{background:pink;bottom:3px;display:inline-block;flex:1 2 auto;height:10px;left:0;right:0;top:3px;width:3px}pl-status.busy{--status-color:var(--process-busy)}pl-status.finished{--status-color:var(--process-finished)}pl-status.can_open{border-color:#98989854;cursor:auto}pl-status.can_open>div{border-bottom-left-radius:0;border-top-left-radius:0;cursor:pointer}pl-status.can_open.is_open{border-color:var(--status-color)}pl-status[data-depth="0"],pl-status[data-depth="1"]{margin-left:0}pl-status>div{align-items:center;background:var(--process-item-bg);border-radius:.4em;display:flex;flex-direction:row;padding:.2em}pl-status>div>.status-icon{background-color:var(--status-color);border-radius:50%;content:"";display:inline-block;flex:0 0 auto;height:1em;margin:0 .5em;width:1em}pl-status.busy>div>.status-icon{animation:identifier-spin 1.7s linear infinite;border-color:transparent #7ab881 #7ab881 transparent;border-style:solid;border-width:3px}@keyframes identifier-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.subprogress-counter{font-size:.8em;opacity:.5}pl-status .status-time{font-size:.7rem;font-variant-numeric:tabular-nums;margin-left:auto;opacity:.6;padding-left:.5em;padding-right:.5em}.discrete-progress-bar{align-items:stretch;background:var(--process-item-bg);border-radius:4px;contain:strict;display:flex;flex-direction:row;gap:2px;height:1em;padding:3px}.discrete-progress-bar>div{background:var(--process-undefined);border-radius:2px;flex:1 1 auto}.discrete-progress-bar>div.done{background:var(--process-finished)}.discrete-progress-bar>div.busy{background:var(--process-busy)}.discrete-progress-bar.mid{gap:1px}.discrete-progress-bar.big{gap:0}pl-status pkg-terminal{margin-left:var(--indent)}pluto-helpbox.helpbox-process>section{padding-bottom:3.6rem}.notify-when-done{bottom:.3em;display:flex;font-family:var(--system-ui-font-stack);font-size:.8rem;font-weight:700;justify-content:center;left:0;opacity:0;position:absolute;right:0;transition:opacity .2s;user-select:none}.notify-when-done.visible{opacity:1}.notify-when-done.visible label{cursor:pointer}.notify-when-done label{align-items:center;background:var(--process-notify-bg);border-radius:1000px;box-shadow:0 3px 5px #0000003b;display:flex;padding:.3em .6em}.notify-when-done label:before{background-image:url(notifications-outline.aa91b431.svg);background-size:contain;content:"";display:inline-block;filter:var(--image-filters);height:1em;margin-bottom:-.2em;margin-right:.3em;width:1em}footer{background-color:var(--footer-bg-color);color:var(--footer-color);font-family:Roboto Mono,monospace;font-size:.75rem;min-height:3.5rem;width:100%;z-index:70}footer form{display:flex;flex-wrap:wrap;min-height:1.5rem;opacity:1;transition:opacity 5s}footer form>*{flex:0 0 auto}footer form>a,footer form>label{align-self:center}footer form>a,footer form>label{margin-right:1em}footer a{color:var(--footer-atag-color);font-weight:700;opacity:.6}@media (max-width:650px){footer form>label{display:none}}footer input{background:var(--white);border:2px solid var(--footer-input-border-color);border-radius:3px 0 0 3px;border-right:none;font-family:inherit;font-size:inherit;margin:0;padding:3px}footer button,header#pluto-nav pluto-filepicker button{background:var(--footer-filepicker-focus-color);border:3px solid var(--footer-filepicker-focus-color);border-radius:0 3px 3px 0;color:var(--footer-filepicker-button-color);font-family:inherit;font-size:.75rem;font-weight:600;height:auto;margin:0}footer #info{align-items:center;display:flex;flex-direction:row;justify-content:flex-end;margin:0 auto;max-width:9400px;padding:1rem;text-align:right}nav#undo_delete{background-color:var(--white);border-radius:3px;bottom:0;box-shadow:0 0 10px 2px var(--undo-delete-box-shadow-color);color:var(--black);display:block;font-family:Roboto Mono,monospace;font-size:.75rem;left:0;margin:.75rem;opacity:1;padding:.5rem;position:fixed;transition:box-shadow .2s linear,margin-bottom .2s ease-out,opacity .05s linear;z-index:2000}nav#undo_delete.hidden{box-shadow:0 0 10px -5px var(--undo-delete-box-shadow-color);margin-bottom:0;opacity:0;pointer-events:none}@keyframes shadow-fadeout{0%{box-shadow:0 0 10px 2px var(--undo-delete-box-shadow-color);opacity:1}80%{opacity:1}to{opacity:0}}pluto-logs-container{display:block;margin-right:1.3rem;max-height:50vh;overflow-x:hidden;overflow-y:auto;z-index:25}pluto-logs-container:not(:empty){background:var(--pluto-logs-bg-color);padding:6px}pluto-logs-container>header{font-family:Roboto Mono,monospace;font-size:1.3rem;font-weight:700;opacity:.6;padding:.2em .2em 0}pluto-logs-container pluto-progress-bars pluto-progress:not(:first-child){margin-top:10px}pluto-logs-container pluto-progress-bar{--c:var(--pluto-logs-progress-fill);align-items:center;background:linear-gradient(90deg,var(--c),var(--c));background-repeat:no-repeat;display:grid;padding:.3em .6em;transition:background-size .5s cubic-bezier(.14,.71,0,.99),opacity .2s linear;width:100%}pluto-logs-container pluto-progress-bar.collapsed{height:0}pluto-logs{display:flex;flex-direction:column}pluto-logs:not(:first-child):not(:empty){margin-top:10px}pluto-log-dot{display:flex;flex-direction:column;flex-grow:1;font-family:Roboto Mono,monospace;font-size:.6rem;min-height:18px;min-width:18px;padding:.6em .9em .6em .3em;position:relative}pluto-log-dot-positioner{--bg-color:var(--pluto-logs-info-color);--accent-color:var(--pluto-logs-info-accent-color);--icon-image:unset;background:var(--bg-color);background:linear-gradient(148deg,var(--bg-color),transparent);background-size:200% 100%;border-radius:6px;color:var(--accent-color);display:flex;flex-direction:row;margin:2px}pluto-log-truncated{display:grid;font-family:var(--system-ui-font-stack);font-style:italic;opacity:.7;padding:.7em;place-items:center}pluto-log-icon:before{background-image:var(--icon-image);background-size:1em;content:"";display:inline-flex;filter:var(--image-filters);height:1em;margin:.3em;width:1em}pluto-log-dot-positioner.Info{--icon-image:url(information-circle-outline.008b2bb9.svg)}pluto-log-dot-positioner.Info pluto-log-icon:before{opacity:.4}pluto-log-dot-positioner.Warn{--bg-color:var(--pluto-logs-warn-color);--accent-color:var(--pluto-logs-warn-accent-color);--icon-image:url(warning-outline.d84ed9e8.svg)}pluto-log-dot-positioner.Error{--bg-color:var(--pluto-logs-danger-color);--accent-color:var(--pluto-logs-danger-accent-color);--icon-image:url(close-circle-outline.4baeedb9.svg)}pluto-log-dot-positioner.Debug{--bg-color:var(--pluto-logs-debug-color);--accent-color:var(--pluto-logs-debug-accent-color);--icon-image:url(information-circle-outline.008b2bb9.svg)}pluto-log-dot-positioner.Stdout{--icon-image:url(terminal-outline.79a23031.svg)}pluto-log-dot-positioner.Stdout pluto-log-icon:before{opacity:.4}pluto-log-dot.Progress{align-items:stretch;align-self:center;background:var(--pluto-logs-progress-bg);border-radius:6px;display:flex;flex:0 1 200px;flex-direction:row;font-size:.7rem;outline:3px solid var(--pluto-logs-progress-border);outline-offset:-2px;overflow:hidden;padding:0}pluto-log-dot.Stdout{--inner:#71624b;--outer:#50483f;background:radial-gradient(var(--inner),var(--inner) 20%,var(--outer));border:6px solid #b7b7b7;border-radius:8px;color:#c0ffab;min-width:18em;text-shadow:1px 1px 2px #0000005e}pluto-log-dot.Stdout:after,pluto-log-dot.Stdout:before{bottom:0;content:" ";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}pluto-log-dot.Stdout:before{background:linear-gradient(349deg,#000,transparent);opacity:.3}pluto-log-dot.Stdout:after{--crt-spacing:7px;animation:scroll-crt 1s linear infinite;animation-play-state:paused;background:linear-gradient(180deg,#534837,transparent,#1a1a1a);background-repeat:repeat;background-size:100% var(--crt-spacing);opacity:.2}pluto-log-dot.Stdout pre:before{content:" ";float:right;width:24px}a.stdout-info{pointer-events:auto;position:absolute;right:2px;top:2px;z-index:unset}@keyframes scroll-crt{0%{background-position:0 0}to{background-position:0 var(--crt-spacing)}}@media (prefers-reduced-motion:no-preference){pluto-log-dot.Stdout:hover:after{animation-play-state:running}}@media (prefers-contrast:more){pluto-log-dot.Stdout:after{display:none!important}}pluto-log-dot jlerror{background:var(--main-bg-color);border-radius:.5rem;display:block;padding:.6rem}pluto-log-dot jlpair,pluto-log-dot jltree{font-size:.6rem}pluto-log-dot>img{max-width:100px}pluto-log-dot-kwarg{display:flex;flex-direction:row;flex-wrap:wrap}pluto-log-dot-kwarg>*{flex:0 1 auto}pluto-log-dot-kwarg>pluto-key{color:var(--pluto-logs-key-color);margin-right:calc(1em - 30px)}pluto-log-dot-kwarg>pluto-key:after{content:": "}pluto-log-dot-kwarg>pluto-value{margin-left:30px;overflow-x:auto}body.presentation pluto-output h1,body.presentation pluto-output h2{margin-top:100vh}body.presentation pluto-notebook{padding-bottom:100vh}body.presentation #helpbox-wrapper{display:none!important}nav#slide_controls{display:none}body.presentation nav#slide_controls{bottom:0;display:flex;position:fixed;right:0;z-index:100}nav#slide_controls>button{padding:5px;position:static}button.floating_back_button>span:after,nav#slide_controls>button>span:after{background-size:30px 30px;content:" "!important;display:block;height:30px;width:30px}button.floating_back_button>span:after,nav#slide_controls>button.prev>span:after{background-image:url(arrow-back-outline.9ae1bed8.svg);filter:var(--image-filters)}nav#slide_controls>button.next>span:after{background-image:url(arrow-forward-outline.f5f68f5c.svg);filter:var(--image-filters)}button.floating_back_button{display:none}.static_preview.offer_local button.floating_back_button{display:flex;left:1em;position:fixed;top:1em;z-index:1000}.cm-editor .cm-tooltip{border:1px solid var(--cm-editor-tooltip-border-color);border-radius:4px;box-shadow:3px 3px 4px rgb(0 0 0/20%)}.cm-tooltip-lint{font-family:JuliaMono;font-size:.75rem;z-index:100}.cm-tooltip-autocomplete{box-sizing:content-box;max-height:320px;z-index:100}.cm-tooltip.cm-completionInfo.cm-completionInfo-right:empty{display:none}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{border-radius:3px;height:16px;line-height:16px;overflow-y:hidden}pluto-input .cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{height:unset}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--cm-editor-li-aria-selected-bg-color);color:var(--cm-editor-li-aria-selected-color)}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li[aria-selected] .cm-completionLabel{border-color:transparent}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li .cm-completionDetail{float:right;font-family:var(--julia-mono-font-stack);font-size:.8em;font-style:normal;margin-right:.5em}.cm-editor .cm-tooltip.cm-tooltip-autocomplete li.c_notexported{color:var(--cm-editor-li-notexported-color)}.cm-editor .cm-completionIcon{opacity:1;transform:translateY(-1.5px);width:1em}.cm-completionIcon:before{color:transparent;content:"⚫";font-family:var(--julia-mono-font-stack)!important;font-size:.75rem;margin-right:.5em;opacity:1}[data-pluto-variable]{font-weight:inherit}.cm-editor .cm-tooltip.cm-tooltip-autocomplete li.c_from_notebook .cm-completionLabel,[data-pluto-variable],[data-pluto-variable]:hover{font-weight:700;text-decoration:underline;text-decoration-color:#ced2ef;text-decoration-skip-ink:none;text-decoration-thickness:3px}@media (prefers-color-scheme:dark){[data-pluto-variable],[data-pluto-variable]:hover{text-decoration-color:#5d5f70}}body.disable_ui [data-cell-variable],body.disable_ui [data-pluto-variable]{cursor:pointer}body:not(.disable_ui) [data-ctrl-down=true][data-cell-variable],body:not(.disable_ui) [data-ctrl-down=true][data-pluto-variable]{cursor:pointer;text-decoration-color:#d177e6}body:not(.disable_ui) [data-ctrl-down=true][data-pluto-variable]:hover,body:not(.disable_ui) [data-ctrl-down=true][data-pluto-variable]:hover *{color:transparent!important;text-shadow:0 0 #af5bc3}[data-cell-variable]{text-decoration:none}[data-ctrl-down=true][data-cell-variable]:hover *{color:transparent!important;text-shadow:0 0 #af5bc3}.cm-tooltip.cm-tooltip-autocomplete{background:var(--autocomplete-menu-bg-color);margin-left:-1.5em;padding:0}pluto-input .cm-editor .cm-scroller{overflow-y:hidden}.cm-editor .cm-tooltip-autocomplete .cm-completionLabel,pluto-input .cm-editor .cm-content,pluto-input .cm-editor .cm-scroller{font-family:var(--julia-mono-font-stack)!important;font-size:.75rem;font-variant-ligatures:none}pluto-input .cm-editor .cm-content{padding:2px 0}.cm-editor .cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:var(--cm-selection-background-blurred)}.cm-editor.cm-focused .cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:var(--cm-selection-background)}.cm-editor{background:var(--code-background);color:var(--cm-editor-text-color)}.cm-editor.cm-focused:not(.__){outline:unset}.cm-editor .cm-gutter{min-height:23px;min-width:31px}.cm-editor .cm-gutters{background:transparent;border-right:1px solid transparent}pluto-cell.code_differs .cm-editor .cm-gutters{background-color:var(--cm-code-differs-gutters-color)}.cm-editor .cm-lineNumbers .cm-gutterElement{color:transparent}.cm-editor .cm-lineNumbers .cm-gutterElement:after{color:var(--cm-line-numbers-color);content:"⋅";font-size:.75rem;pointer-events:none;position:absolute;right:3px}.cm-editor .cm-lineNumbers .cm-gutterElement:hover{color:var(--cm-line-numbers-color)}.cm-editor .cm-lineNumbers .cm-gutterElement:hover:after{color:transparent}@media print{.cm-editor .cm-lineNumbers .cm-gutterElement{color:var(--cm-line-numbers-color)!important}.cm-editor .cm-lineNumbers .cm-gutterElement:after{color:transparent!important}}.cm-completionIcon-c_Number:before{color:var(--cm-number-color)}.cm-completionIcon-c_String:before,.cm-completionIcon-completion_dict:before,.cm-completionIcon-completion_path:before{color:var(--cm-string-color)}.cm-completionIcon-c_Any:before,pluto-output>assignee,pluto-popup code.auto_disabled_variable{color:var(--cm-var-color)!important;font-weight:700}.cm-completionIcon-c_Function:before{color:var(--cm-function-color)}.cm-completionIcon-c_Array:before{color:var(--cm-bracket-color)}.cm-completionIcon-c_Module:before,.cm-completionIcon-c_package:before{color:var(--cm-link-color)}.cm-editor .cm-activeLine{background:unset}.cm-selectionMatch{background:none!important;text-shadow:0 0 8px rgba(0,0,0,.5)}@media (prefers-color-scheme:dark){.cm-selectionMatch{background:none!important;text-shadow:0 0 8px hsla(0,0%,100%,.5)}}.cm-editor .cm-matchingBracket,.cm-editor .cm-nonmatchingBracket{background-color:unset;color:unset}pluto-input:focus-within .cm-editor .cm-matchingBracket{background-color:var(--cm-matchingBracket-bg-color);border-radius:2px;color:var(--cm-matchingBracket-color)!important;font-weight:700}.cm-editor .cm-placeholder{color:var(--cm-placeholder-text-color);font-style:italic}.cm-completionMatchedText{text-decoration:unset!important}.awesome-wrapping-plugin-the-line{--correction:0px;margin-left:calc(var(--indented));text-indent:calc(var(--indented)*-1)}.awesome-wrapping-plugin-the-line>*{text-indent:0}.awesome-wrapping-plugin-the-tabs{margin-left:-1px;vertical-align:top;white-space:pre}pluto-cell.hooked_up{--pluto-cell-force-color:#00b9ff7a}pluto-cell.hooked_up pluto-trafficlight{background-color:var(--pluto-cell-force-color)!important}pluto-cell.hooked_up pluto-input .cm-editor{border-color:var(--pluto-cell-force-color);border-width:2px;border-left:none;border-top:none}pluto-cell.hooked_up>pluto-runarea{background-color:var(--pluto-cell-force-color);opacity:1}pluto-cell.hooked_up pluto-runarea>span{color:#0000004f}pluto-cell.hooked_up pluto-output{border-bottom:2px solid;border-right:2px solid;border-color:var(--pluto-cell-force-color);border-top:2px solid;border-top-color:var(--pluto-cell-force-color);border-top-right-radius:4px}.fm-table{display:grid;gap:.3em 1em;grid-template-columns:auto 1fr min-content}.pluto-frontmatter{background:var(--export-bg-color);border-radius:1em;color:var(--export-color);font-family:var(--system-ui-font-stack);padding:1em 1.5em;width:min(31rem,90vw)}.pluto-frontmatter button{background-color:var(--frontmatter-button-bg-color);border:2px solid var(--frontmatter-button-bg-color);border-radius:.5em;cursor:pointer;font-weight:500}.pluto-frontmatter button:hover{border-color:var(--frontmatter-input-border-color)}.pluto-frontmatter input{background-color:var(--frontmatter-input-bg-color);border:2px solid var(--frontmatter-input-border-color);border-radius:.5em;padding:.3em .5em}.pluto-frontmatter rbl-tag-input{color:var(--black)}.pluto-frontmatter label{font-weight:500}.pluto-frontmatter .deletefield{align-self:stretch;background-color:transparent;border-width:0;color:var(--export-color);margin-left:-1em}.pluto-frontmatter .addentry{grid-column:1/3;margin-top:.5em}.pluto-frontmatter fieldset{grid-column:1/4}.pluto-frontmatter .final{display:flex;gap:.5em;justify-content:flex-end;margin-top:2rem} \ No newline at end of file diff --git a/frontend-dist/editor.1f4cf2ca.css b/frontend-dist/editor.1f4cf2ca.css new file mode 100644 index 0000000000..5174971568 --- /dev/null +++ b/frontend-dist/editor.1f4cf2ca.css @@ -0,0 +1 @@ +pluto-tree,pluto-tree-pair{font-family:var(--julia-mono-font-stack);font-size:.75rem}pluto-tree{color:var(--pluto-tree-color);cursor:pointer;white-space:pre}pluto-tree,pluto-tree-items{align-items:flex-start;display:inline-flex;flex-direction:column}pluto-tree.collapsed,pluto-tree.collapsed pluto-tree,pluto-tree.collapsed pluto-tree-items{align-items:baseline;flex-direction:row}pluto-tree-items{cursor:auto}pluto-tree-prefix{align-items:baseline;display:inline-flex;flex-direction:row}pluto-tree>pluto-tree-prefix:before{background-image:url(caret-down-outline.4253a2fe.svg);background-size:100%;bottom:-2px;content:"";cursor:pointer;display:inline-block;filter:var(--image-filters);height:1em;opacity:.5;position:relative;width:1em}pluto-tree.collapsed pluto-tree>pluto-tree-prefix:before{display:none}pluto-tree.collapsed>pluto-tree-prefix:before{background-image:url(caret-forward-outline.348a84b6.svg)}pluto-tree p-r>p-v{color:var(--pluto-output-color);display:inline-flex}pluto-tree.collapsed pluto-tree-items.Array>p-r>p-k,pluto-tree.collapsed pluto-tree-items.Set>p-r>p-k,pluto-tree.collapsed pluto-tree-items.struct>p-r>p-k,pluto-tree.collapsed pluto-tree-items.Tuple>p-r>p-k{display:none}pluto-tree>pluto-tree-prefix>.long{display:block}pluto-tree.collapsed>pluto-tree-prefix>.long,pluto-tree>pluto-tree-prefix>.short{display:none}pluto-tree.collapsed>pluto-tree-prefix>.short{display:block}pluto-tree p-r{margin-left:3em}pluto-tree.collapsed p-r{margin-left:.5em}pluto-tree.collapsed p-r:first-child{margin-left:0}pluto-tree pluto-tree-items.Array>p-r>p-k,pluto-tree pluto-tree-items.Set>p-r>p-k,pluto-tree pluto-tree-items.Tuple>p-r>p-k{margin-right:1em;opacity:.5;user-select:none}pluto-tree.Array>pluto-tree-prefix:after{content:"["}pluto-tree pluto-tree-items.Array:after{content:"]"}pluto-tree.Set>pluto-tree-prefix:after{content:"(["}pluto-tree pluto-tree-items.Set:after{content:"])"}pluto-tree.Dict>pluto-tree-prefix:after,pluto-tree.NamedTuple>pluto-tree-prefix:after,pluto-tree.struct>pluto-tree-prefix:after,pluto-tree.Tuple>pluto-tree-prefix:after{content:"("}pluto-tree pluto-tree-items.Dict:after,pluto-tree pluto-tree-items.NamedTuple:after,pluto-tree pluto-tree-items.struct:after,pluto-tree pluto-tree-items.Tuple:after{content:")"}pluto-tree pluto-tree-items.Array>p-r>p-k:after,pluto-tree pluto-tree-items.Set>p-r>p-k:after,pluto-tree pluto-tree-items.Tuple>p-r>p-k:after{content:":"}pluto-tree-pair>p-r>p-k:after,pluto-tree pluto-tree-items.Dict>p-r>p-k:after{content:" => "}pluto-tree pluto-tree-items.NamedTuple>p-r>p-k:after,pluto-tree pluto-tree-items.struct>p-r>p-k:after{content:" = "}pluto-tree.collapsed p-r:after{content:","}pluto-tree.collapsed p-r:last-child:after{content:""}pluto-tree-more{cursor:pointer;display:inline-block;padding:.6em 0;white-space:nowrap;width:100%}pluto-tree-more:before{background-image:url(ellipsis-vertical.a30e7430.svg);background-size:100%;bottom:-.1em;content:"";display:inline-block;filter:var(--image-filters);height:1em;margin-left:.2em;margin-right:.5em;opacity:.5;position:relative;width:1em}pluto-tree-more.loading:before{animation:loadspin 3s ease-in-out infinite;background-image:url(sync-outline.9a1bd27b.svg)}@keyframes loadspin{0%{transform:rotate(0deg)}25%{transform:rotate(180deg)}50%{transform:rotate(180deg)}75%{transform:rotate(1turn)}to{transform:rotate(1turn)}}pluto-tree.collapsed pluto-tree-more{margin:0}pluto-tree.collapsed pluto-tree-more:before{background-image:url(ellipsis-horizontal.c9a6cc29.svg)}pluto-tree.collapsed img{max-height:4rem;max-width:4rem}pluto-tree img{max-height:8rem;max-width:12rem}pluto-tree p-r pre{white-space:pre;word-break:normal}jlerror{font-family:Roboto Mono,monospace;font-size:.75rem}jlerror>header{color:var(--jlerror-header-color)}jlerror>header>p{margin-block-end:.2em}jlerror>header>p:first-child{font-weight:700}jlerror>section>ol>li>mark{background:var(--jlerror-mark-bg-color);border-radius:6px;color:var(--jlerror-mark-color);font-family:var(--julia-mono-font-stack);font-variant-ligatures:none}jlerror>section>ol>li>em>a{background:var(--jlerror-a-bg-color);border-left:3px solid var(--jlerror-a-border-left-color);border-radius:4px;padding:1px 7px;text-decoration:none}jlerror>section>ol>li>span{opacity:.8;padding:0 1em}table.pluto-table{table-layout:fixed}table.pluto-table td{max-width:300px;overflow:auto}table.pluto-table .schema-types{color:var(--pluto-schema-types-color);font-family:var(--julia-mono-font-stack);font-size:.75rem;opacity:0}table.pluto-table .schema-types th{background-color:var(--main-bg-color);border-bottom:1px solid var(--pluto-schema-types-border-color);height:2rem}table.pluto-table thead:hover .schema-types{opacity:1}table.pluto-table .schema-names th{transform:translateY(.5em);transition:transform .1s ease-in-out}table.pluto-table .schema-names th:first-child,table.pluto-table .schema-types th:first-child{left:-10px;z-index:2}table.pluto-table .schema-names th,table.pluto-table .schema-types th:first-child{background-color:var(--main-bg-color);height:2rem;position:sticky;top:calc(.25rem - var(--pluto-cell-spacing));z-index:1}table.pluto-table thead:hover .schema-names th{transform:translate(0)}table.pluto-table tbody th:first-child{background-color:var(--main-bg-color);left:-10px;position:sticky}table.pluto-table .pluto-tree-more-td{overflow:unset;text-align:left}table.pluto-table .pluto-tree-more-td pluto-tree-more{left:0;max-width:650px;overflow:unset;position:sticky;top:2rem}table.pluto-table tr.empty div{align-items:center;display:flex;flex-flow:column nowrap;font-size:1.5rem;justify-content:center;width:100%}table.pluto-table tr.empty small{font-size:.5rem}pluto-tree.collapsed p-v>pre{max-height:2em;overflow-y:hidden} \ No newline at end of file diff --git a/frontend-dist/editor.6386bd9d.js b/frontend-dist/editor.6386bd9d.js new file mode 100644 index 0000000000..dd344f6c83 --- /dev/null +++ b/frontend-dist/editor.6386bd9d.js @@ -0,0 +1,8 @@ +/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.11 - 2020-06-02 + * Desc: Include this file in any page being loaded into an iframe + * to force the iframe to resize to the content size. + * Requires: iframeResizer.min.js on host page. + * Copyright: (c) 2020 David J. Bradshaw - dave@bradshaw.net + * License: MIT + */ +!function(e){if("undefined"!=typeof window){var t=!0,n=10,o="",i=0,r="",a=null,u="",c=!1,s={resize:1,click:1},d=128,l=!0,f=1,m="bodyOffset",h=m,g=!0,p="",v={},y=32,b=null,w=!1,T="[iFrameSizer]",E=T.length,O="",S={max:1,min:1,bodyScroll:1,documentElementScroll:1},M="child",I=!0,N=window.parent,A="*",C=0,z=!1,k=null,R=16,x=1,L="scroll",F=L,P=window,D=function(){re("onMessage function not defined")},j=function(){},q=function(){},H={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},B=!1;try{var J=Object.create({},{passive:{get:function(){B=!0}}});window.addEventListener("test",ee,J),window.removeEventListener("test",ee,J)}catch(e){}var U,V,K,Q,X,Y,G=Date.now||function(){return(new Date).getTime()},Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return H.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",we()))},taggedElement:function(){return be("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return H.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",we())},taggedElement:function(){return be("right","data-iframe-width")}},_=(U=Te,X=null,Y=0,function(){var e=G(),t=R-(e-(Y=Y||e));return V=this,K=arguments,t<=0||R{function e(e,t,i,n){Object.defineProperty(e,t,{get:i,set:n,enumerable:!0,configurable:!0})}function t(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};var n={},r={},o=i.parcelRequire94c2;null==o&&((o=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var i={id:e,exports:{}};return n[e]=i,t.call(i.exports,i,i.exports),i.exports}var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){r[e]=t},i.parcelRequire94c2=o),o.register("jTduX",(function(t,i){var n,r;e(t.exports,"register",(()=>n),(e=>n=e)),e(t.exports,"resolve",(()=>r),(e=>r=e));var o={};n=function(e){for(var t=Object.keys(e),i=0;iwe)),e(s,"render",(()=>M)),e(s,"Component",(()=>w)),e(s,"useEffect",(()=>se)),e(s,"useLayoutEffect",(()=>ae)),e(s,"useState",(()=>oe)),e(s,"useRef",(()=>le)),e(s,"useMemo",(()=>Oe)),e(s,"useCallback",(()=>ce)),e(s,"useErrorBoundary",(()=>de)),e(s,"createContext",(()=>j)),e(s,"createRef",(()=>_)),e(s,"useContext",(()=>ue)),e(s,"h",(()=>Q)),e(s,"cloneElement",(()=>U)),e(s,"hydrate",(()=>I));var a,l,O,c,u,d,h,f,p={},m=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $(e,t){for(var i in t)e[i]=t[i];return e}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function Q(e,t,i){var n,r,o,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?a.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return y(e,s,n,r,null)}function y(e,t,i,n,r){var o={type:e,props:t,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++O};return null==r&&null!=l.vnode&&l.vnode(o),o}function _(){return{current:null}}function P(e){return e.children}function w(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var i;tt&&c.sort(h));S.__r=0}function k(e,t,i,n,r,o,s,a,l,O){var c,u,d,h,f,g,$,b=n&&n.__k||m,Q=b.length;for(i.__k=[],c=0;c0?y(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=i,h.__b=i.__b+1,null===(d=b[c])||d&&h.key==d.key&&h.type===d.type)b[c]=void 0;else for(u=0;u=0;t--)if((i=e.__k[t])&&(n=W(i)))return n;return null}function A(e,t,i){"-"===t[0]?e.setProperty(t,i??""):e[t]=null==i?"":"number"!=typeof i||g.test(t)?i:i+"px"}function N(e,t,i,n,r){var o;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)i&&t in i||A(e.style,t,"");if(i)for(t in i)n&&i[t]===n[t]||A(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=i,i?n||e.addEventListener(t,o?q:C,o):e.removeEventListener(t,o?q:C,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=i??"";break e}catch{}"function"==typeof i||(null==i||!1===i&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,i))}}function C(e){return this.l[e.type+!1](l.event?l.event(e):e)}function q(e){return this.l[e.type+!0](l.event?l.event(e):e)}function E(e,t,i,n,r,o,s,O,c){var u,d,h,f,m,g,Q,y,_,X,x,S,T,R,W,A=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(c=i.__h,O=t.__e=i.__e,t.__h=null,o=[O]),(u=l.__b)&&u(t);try{e:if("function"==typeof A){if(y=t.props,_=(u=A.contextType)&&n[u.__c],X=u?_?_.props.value:u.__:n,i.__c?Q=(d=t.__c=i.__c).__=d.__E:("prototype"in A&&A.prototype.render?t.__c=d=new A(y,X):(t.__c=d=new w(y,X),d.constructor=A,d.render=z),_&&_.sub(d),d.props=y,d.state||(d.state={}),d.context=X,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=A.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=$({},d.__s)),$(d.__s,A.getDerivedStateFromProps(y,d.__s))),f=d.props,m=d.state,d.__v=t,h)null==A.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==A.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,X),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,X)||t.__v===i.__v){for(t.__v!==i.__v&&(d.props=y,d.state=d.__s,d.__d=!1),d.__e=!1,t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x2&&(s.children=arguments.length>3?a.call(arguments,2):i),y(e.type,s,n||e.key,r||e.ref,null)}function j(e,t){var i={__c:t="__cC"+f++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,n;return this.getChildContext||(i=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some((function(e){e.__e=!0,x(e)}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}a=m.slice,l={__e:function(e,t,i,n){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,n||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},O=0,w.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=$({},this.state),"function"==typeof e&&(e=e($({},i),this.props)),e&&$(i,e),null!=e&&this.__v&&(t&&this._sb.push(t),x(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},w.prototype.render=P,c=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,h=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,f=0;var D,G,L,B,K=0,F=[],H=[],J=l.__b,ee=l.__r,te=l.diffed,ie=l.__c,ne=l.unmount;function re(e,t){l.__h&&l.__h(G,e,K||t),K=0;var i=G.__H||(G.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({__V:H}),i.__[e]}function oe(e){return K=1,function(e,t,i){var n=re(D++,2);if(n.t=e,!n.__c&&(n.__=[i?i(t):be(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],i=n.t(t,e);t!==i&&(n.__N=[i,n.__[1]],n.__c.setState({}))}],n.__c=G,!G.u)){var r=function(e,t,i){if(!n.__c.__H)return!0;var r=n.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,i);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&n.__c.props===e)&&(!o||o.call(this,e,t,i))};G.u=!0;var o=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(e,t,i){if(this.__e){var n=o;o=void 0,r(e,t,i),o=n}s&&s.call(this,e,t,i)},G.shouldComponentUpdate=r}return n.__N||n.__}(be,e)}function se(e,t){var i=re(D++,3);!l.__s&&$e(i.__H,t)&&(i.__=e,i.i=t,G.__H.__h.push(i))}function ae(e,t){var i=re(D++,4);!l.__s&&$e(i.__H,t)&&(i.__=e,i.i=t,G.__h.push(i))}function le(e){return K=5,Oe((function(){return{current:e}}),[])}function Oe(e,t){var i=re(D++,7);return $e(i.__H,t)?(i.__V=e(),i.i=t,i.__h=e,i.__V):i.__}function ce(e,t){return K=8,Oe((function(){return e}),t)}function ue(e){var t=G.context[e.__c],i=re(D++,9);return i.c=e,t?(null==i.__&&(i.__=!0,t.sub(G)),t.props.value):e.__}function de(e){var t=re(D++,10),i=oe();return t.__=e,G.componentDidCatch||(G.componentDidCatch=function(e,n){t.__&&t.__(e,n),i[1](e)}),[i[0],function(){i[1](void 0)}]}function he(){for(var e;e=F.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(me),e.__H.__h.forEach(ge),e.__H.__h=[]}catch(t){e.__H.__h=[],l.__e(t,e.__v)}}l.__b=function(e){G=null,J&&J(e)},l.__r=function(e){ee&&ee(e),D=0;var t=(G=e.__c).__H;t&&(L===G?(t.__h=[],G.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=H,e.__N=e.i=void 0}))):(t.__h.forEach(me),t.__h.forEach(ge),t.__h=[])),L=G},l.diffed=function(e){te&&te(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==F.push(t)&&B===l.requestAnimationFrame||((B=l.requestAnimationFrame)||pe)(he)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==H&&(e.__=e.__V),e.i=void 0,e.__V=H}))),L=G=null},l.__c=function(e,t){t.some((function(e){try{e.__h.forEach(me),e.__h=e.__h.filter((function(e){return!e.__||ge(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],l.__e(i,e.__v)}})),ie&&ie(e,t)},l.unmount=function(e){ne&&ne(e);var t,i=e.__c;i&&i.__H&&(i.__H.__.forEach((function(e){try{me(e)}catch(e){t=e}})),i.__H=void 0,t&&l.__e(t,i.__v))};var fe="function"==typeof requestAnimationFrame;function pe(e){var t,i=function(){clearTimeout(n),fe&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(i,100);fe&&(t=requestAnimationFrame(i))}function me(e){var t=G,i=e.__c;"function"==typeof i&&(e.__c=void 0,i()),G=t}function ge(e){var t=G;e.__c=e.__(),G=t}function $e(e,t){return!e||e.length!==t.length||t.some((function(t,i){return t!==e[i]}))}function be(e,t){return"function"==typeof t?t(e):t}var Qe={};t(Qe),e(Qe,"default",(()=>Pe));var ye=function(e,t,i,n){var r;t[0]=0;for(var o=1;o=5&&((r||!e&&5===n)&&(s.push(n,0,r,i),n=6),e&&(s.push(n,e,0,i),n=6)),r=""},l=0;l"===t?(n=1,r=""):r=t+r[0]:o?t===o?o="":r+=t:'"'===t||"'"===t?o=t:">"===t?(a(),n=1):n&&("="===t?(n=5,i=r,r=""):"/"===t&&(n<5||">"===e[l][O+1])?(a(),3===n&&(s=s[0]),n=s,(s=s[0]).push(2,0,n),n=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),n=2):r+=t),3===n&&"!--"===r&&(n=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}const we=Pe.bind(Q);try{null==window.process&&(window.process={}),null==window.process.env&&(window.process.env={}),window.process.env.NODE_ENV="production"}catch(e){console.warn("Couldn't set window.process.env, this might break some things")}function ve(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:Ne(e)?2:Ce(e)?3:0}function Te(e,t){return 2===ke(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Re(e,t){return 2===ke(e)?e.get(t):e[t]}function We(e,t,i){var n=ke(e);2===n?e.set(t,i):3===n?(e.delete(t),e.add(i)):e[t]=i}function Ae(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Ne(e){return Ot&&e instanceof Map}function Ce(e){return ct&&e instanceof Set}function qe(e){return e.o||e.t}function Ee(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mt(e);delete t[ft];for(var i=pt(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Ye),Object.freeze(e),t&&Se(e,(function(e,t){return Ve(t,!0)}),!0)),e}function Ye(){ve(2)}function Ze(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ze(e){var t=gt[e];return t||ve(18,e),t}function Me(e,t){gt[e]||(gt[e]=t)}function Ie(){return at}function Ue(e,t){t&&(ze("Patches"),e.u=[],e.s=[],e.v=t)}function je(e){De(e),e.p.forEach(Le),e.p=null}function De(e){e===at&&(at=e.l)}function Ge(e){return at={p:[],l:at,h:e,m:!0,_:0}}function Le(e){var t=e[ft];0===t.i||1===t.i?t.j():t.g=!0}function Be(e,t){t._=t.p.length;var i=t.p[0],n=void 0!==e&&e!==i;return t.h.O||ze("ES5").S(t,e,n),n?(i[ft].P&&(je(t),ve(4)),xe(e)&&(e=Ke(t,e),t.l||He(t,e)),t.u&&ze("Patches").M(i[ft],e,t.u,t.s)):e=Ke(t,i,[]),je(t),t.u&&t.v(t.u,t.s),e!==dt?e:void 0}function Ke(e,t,i){if(Ze(t))return t;var n=t[ft];if(!n)return Se(t,(function(r,o){return Fe(e,n,t,r,o,i)}),!0),t;if(n.A!==e)return t;if(!n.P)return He(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Ee(n.k):n.o;Se(3===n.i?new Set(r):r,(function(t,o){return Fe(e,n,r,t,o,i)})),He(e,r,!1),i&&e.u&&ze("Patches").R(n,i,e.u,e.s)}return n.o}function Fe(e,t,i,n,r,o){if(Xe(r)){var s=Ke(e,r,o&&t&&3!==t.i&&!Te(t.D,n)?o.concat(n):void 0);if(We(i,n,s),!Xe(s))return;e.m=!1}if(xe(r)&&!Ze(r)){if(!e.h.N&&e._<1)return;Ke(e,r),t&&t.A.l||He(e,r)}}function He(e,t,i){void 0===i&&(i=!1),e.h.N&&e.m&&Ve(t,i)}function Je(e,t){var i=e[ft];return(i?qe(i):e)[t]}function et(e,t){if(t in e)for(var i=Object.getPrototypeOf(e);i;){var n=Object.getOwnPropertyDescriptor(i,t);if(n)return n;i=Object.getPrototypeOf(i)}}function tt(e){e.P||(e.P=!0,e.l&&tt(e.l))}function it(e){e.o||(e.o=Ee(e.t))}function nt(e,t,i){var n=Ne(t)?ze("MapSet").T(t,i):Ce(t)?ze("MapSet").F(t,i):e.O?function(e,t){var i=Array.isArray(e),n={i:i?1:0,A:t?t.A:Ie(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},r=n,o=$t;i&&(r=[n],o=bt);var s=Proxy.revocable(r,o),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(t,i):ze("ES5").J(t,i);return(i?i.A:Ie()).p.push(n),n}function rt(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ee(e)}function ot(){function e(t){if(!xe(t))return t;if(Array.isArray(t))return t.map(e);if(Ne(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(Ce(t))return new Set(Array.from(t).map(e));var i=Object.create(Object.getPrototypeOf(t));for(var n in t)i[n]=e(t[n]);return i}function t(t){return Xe(t)?e(t):t}var i="add";Me("Patches",{$:function(t,n){return n.forEach((function(n){for(var r=n.path,o=n.op,s=t,a=0;a1?o-1:0),a=1;a1?i-1:0),o=1;o=0;i--){var n=t[i];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}var r=ze("Patches").$;return Xe(e)?r(e,t):this.produce(e,(function(e){return r(e,t.slice(i+1))}))},e}(),yt=new Qt,_t=yt.produce,Pt=yt.produceWithPatches.bind(yt),wt=yt.setAutoFreeze.bind(yt),vt=(yt.setUseProxies.bind(yt),yt.applyPatches.bind(yt)),Xt=(yt.createDraft.bind(yt),yt.finishDraft.bind(yt),_t);ot(),wt(!1);var xt=window._;let St=()=>{let e=new window.observablehq.Library;return{DOM:e.DOM,Files:e.Files,Generators:e.Generators,Promises:e.Promises,now:e.now,svg:e.svg(),html:e.html(),require:e.require()}};const kt=St(),Tt=St();kt.DOM,kt.Files,kt.Generators;let Rt=kt.Promises;kt.now,kt.svg,kt.html,kt.require;const Wt=function e(t,i,n){function r(s,a){if(!i[s]){if(!t[s]){var l=void 0;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var O=new Error("Cannot find module '"+s+"'");throw O.code="MODULE_NOT_FOUND",O}var c=i[s]={exports:{}};t[s][0].call(c.exports,(function(e){var i=t[s][1][e];return r(i||e)}),c,c.exports,e,t,i,n)}return i[s].exports}for(var o=void 0,s=0;s>>6,i[n++]=128|63&o):o<55296||o>57343?(i[n++]=224|o>>>12,i[n++]=128|o>>>6&63,i[n++]=128|63&o):(o=65536+(o-55296<<10|e.charCodeAt(s++)-56320),i[n++]=240|o>>>18,i[n++]=128|o>>>12&63,i[n++]=128|o>>>6&63,i[n++]=128|63&o);return n-t}function r(e,t,i){var n=this,r=0|t;i||(i=n.length);for(var o="",s=0;r=65536?(s-=65536,o+=String.fromCharCode(55296+(s>>>10),56320+(1023&s))):o+=String.fromCharCode(s));return o}function o(e,t,i,n){var r;i||(i=0),n||0===n||(n=this.length),t||(t=0);var o=n-i;if(e===this&&i=0;r--)e[r+t]=this[r+i];else for(r=0;rthis.buffer.length)throw new Error(m);return this.offset=i,t}return{bufferish:h,write:e,fetch:l,flush:t,push:c,pull:u,read:O,reserve:i,offset:0}}function s(){function e(){var e=this.start;if(e1?this.bufferish.concat(e):e[0];return e.length=0,t}function n(e){var t=0|e;if(this.buffer){var i=this.buffer.length,n=0|this.offset,r=n+t;if(rthis.minBufferSize)this.flush(),this.push(e);else{var i=this.reserve(t);h.prototype.copy.call(e,this.buffer,i)}}return{bufferish:h,write:a,fetch:e,flush:t,push:c,pull:i,read:O,reserve:n,send:r,maxBufferSize:p,minBufferSize:f,offset:0,start:0}}function a(){throw new Error("method not implemented: write()")}function l(){throw new Error("method not implemented: fetch()")}function O(){return this.buffers&&this.buffers.length?(this.flush(),this.pull()):this.fetch()}function c(e){(this.buffers||(this.buffers=[])).push(e)}function u(){return(this.buffers||(this.buffers=[])).shift()}function d(e){function t(t){for(var i in e)t[i]=e[i];return t}return t}i.FlexDecoder=n,i.FlexEncoder=r;var h=e("./bufferish"),f=2048,p=65536,m="BUFFER_SHORTAGE";n.mixin=d(o()),n.mixin(n.prototype),r.mixin=d(s()),r.mixin(r.prototype)},{"./bufferish":8}],22:[function(e,t,i){function n(e){function t(e){var t=O(e),n=i[t];if(!n)throw new Error("Invalid type: "+(t?"0x"+t.toString(16):t));return n(e)}var i=c.getReadToken(e);return t}function r(){var e=this.options;return this.decode=n(e),e&&e.preset&&l.setExtUnpackers(this),this}function o(e,t){(this.extUnpackers||(this.extUnpackers=[]))[e]=u.filter(t)}function s(e){function t(t){return new a(t,e)}return(this.extUnpackers||(this.extUnpackers=[]))[e]||t}var a=e("./ext-buffer").ExtBuffer,l=e("./ext-unpacker"),O=e("./read-format").readUint8,c=e("./read-token"),u=e("./codec-base");u.install({addExtUnpacker:o,getExtUnpacker:s,init:r}),i.preset=r.call(u.preset)},{"./codec-base":9,"./ext-buffer":17,"./ext-unpacker":19,"./read-format":23,"./read-token":24}],23:[function(e,t,i){function n(e){var t=S.hasArrayBuffer&&e&&e.binarraybuffer,i=e&&e.int64;return{map:T&&e&&e.usemap?o:r,array:s,str:a,bin:t?O:l,ext:c,uint8:u,uint16:h,uint32:p,uint64:g(8,i?Q:$),int8:d,int16:f,int32:m,int64:g(8,i?y:b),float32:g(4,_),float64:g(8,P)}}function r(e,t){var i,n={},r=new Array(t),o=new Array(t),s=e.codec.decode;for(i=0;i>>8,r[n]=i}}function O(e){return function(t,i){var n=t.reserve(5),r=t.buffer;r[n++]=e,r[n++]=i>>>24,r[n++]=i>>>16,r[n++]=i>>>8,r[n]=i}}function c(e,t,i,n){return function(r,o){var s=r.reserve(t+1);r.buffer[s++]=e,i.call(r.buffer,o,s,n)}}function u(e,t){new g(this,t,e)}function d(e,t){new $(this,t,e)}function h(e,t){p.write(this,e,t,!1,23,4)}function f(e,t){p.write(this,e,t,!1,52,8)}var p=e("ieee754"),m=e("int64-buffer"),g=m.Uint64BE,$=m.Int64BE,b=e("./write-uint8").uint8,Q=e("./bufferish"),y=Q.global,_=Q.hasBuffer&&"TYPED_ARRAY_SUPPORT"in y&&!y.TYPED_ARRAY_SUPPORT,P=Q.hasBuffer&&y.prototype||{};i.getWriteToken=n},{"./bufferish":8,"./write-uint8":28,ieee754:32,"int64-buffer":33}],27:[function(e,t,i){function n(e){function t(e,t){k[t?195:194](e,t)}function i(e,t){var i=0|t;return t!==i?void k[203](e,t):void k[-32<=i&&i<=127?255&i:0<=i?i<=255?204:i<=65535?205:206:-128<=i?208:-32768<=i?209:210](e,i)}function n(e,t){k[207](e,t.toArray())}function o(e,t){k[211](e,t.toArray())}function m(e){return e<32?1:e<=255?2:e<=65535?3:5}function g(e){return e<32?1:e<=65535?3:5}function $(e){function t(t,i){var n=i.length,r=5+3*n;t.offset=t.reserve(r);var o=t.buffer,s=e(n),a=t.offset+s;n=O.write.call(o,i,a);var l=e(n);if(s!==l){var c=a+l-s,u=a+n;O.copy.call(o,o,c,a,u)}k[1===l?160+n:l<=3?215+l:219](t,n),t.offset+=n}return t}function b(e,t){if(null===t)return y(e,t);if(W(t))return A(e,t);if(r(t))return _(e,t);if(s.isUint64BE(t))return n(e,t);if(a.isInt64BE(t))return o(e,t);var i=e.codec.getExtPacker(t);return i&&(t=i(t)),t instanceof d?v(e,t):void N(e,t)}function Q(e,t){return W(t)?S(e,t):void b(e,t)}function y(e,t){k[192](e,t)}function _(e,t){var i=t.length;k[i<16?144+i:i<=65535?220:221](e,i);for(var n=e.codec.encode,r=0;r=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),s.alloc(+e)}function g(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return L(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function $(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,i);case"utf8":case"utf-8":return k(this,t,i);case"ascii":return R(this,t,i);case"latin1":case"binary":return W(this,t,i);case"base64":return S(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function Q(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,i,n,r);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):y(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,i,n,r){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,l=e.length,O=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,l/=2,O/=2,i/=2}if(r){var c=-1;for(s=i;sl&&(i=l-O),s=i;s>=0;s--){for(var u=!0,d=0;dr&&(n=r):n=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:O>223?3:O>191?2:1;if(r+u<=i)switch(u){case 1:O<128&&(c=O);break;case 2:128==(192&(o=e[r+1]))&&(l=(31&O)<<6|63&o)>127&&(c=l);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(l=(15&O)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&O)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,u=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=u}return T(n)}function T(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var i="",n=0;nn)&&(i=n);for(var r="",o=t;oi)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,i,n,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function E(e,t,i,n){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-i,2);r>>8*(n?r:1-r)}function V(e,t,i,n){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-i,4);r>>8*(n?r:3-r)&255}function Y(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Z(e,t,i,n,r){return r||Y(e,t,i,4,34028234663852886e22,-34028234663852886e22),H.write(e,t,i,n,23,4),i+4}function z(e,t,i,n,r){return r||Y(e,t,i,8,17976931348623157e292,-17976931348623157e292),H.write(e,t,i,n,52,8),i+8}function M(e){if((e=I(e).replace(te,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function I(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){t=t||1/0;for(var i,n=e.length,r=null,o=[],s=0;s55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function D(e){for(var t=[],i=0;i>8,r=i%256,o.push(r),o.push(n);return o}function L(e){return F.toByteArray(M(e))}function B(e,t,i,n){for(var r=0;r=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function K(e){return e!=e}var F=e("base64-js"),H=e("ieee754"),J=e("isarray");n.Buffer=s,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),n.kMaxLength=r(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,i){return a(null,e,t,i)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,i){return O(null,e,t,i)},s.allocUnsafe=function(e){return c(null,e)},s.allocUnsafeSlow=function(e){return c(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,r=0,o=Math.min(i,n);r0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,i,n,r){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(n>>>=0),a=(i>>>=0)-(t>>>=0),l=Math.min(o,a),O=this.slice(n,r),c=e.slice(t,i),u=0;ur)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,e,t,i);case"utf8":case"utf-8":return P(this,e,t,i);case"ascii":return w(this,e,t,i);case"latin1":case"binary":return v(this,e,t,i);case"base64":return X(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(r*=256);)n+=this[e+--t]*r;return n},s.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||C(e,t,this.length);for(var n=this[e],r=1,o=0;++o=(r*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||C(e,t,this.length);for(var n=t,r=1,o=this[e+--n];n>0&&(r*=256);)o+=this[e+--n]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),H.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),H.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),H.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),H.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,i,n){e=+e,t|=0,i|=0,n||q(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+r]=e/o&255;return t+i},s.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):V(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);q(this,e,t,i,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+i},s.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var r=Math.pow(2,8*i-1);q(this,e,t,i,r-1,-r)}var o=i-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):V(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):V(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,i){return Z(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return Z(this,e,t,!1,i)},s.prototype.writeDoubleLE=function(e,t,i){return z(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return z(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--r)e[r+t]=this[r+i];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function o(e){var t,i,r,o,s,a,l=e.length;s=n(e),a=new u(3*l/4-s),r=s>0?l-4:l;var O=0;for(t=0,i=0;t>16&255,a[O++]=o>>8&255,a[O++]=255&o;return 2===s?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[O++]=255&o):1===s&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[O++]=o>>8&255,a[O++]=255&o),a}function s(e){return O[e>>18&63]+O[e>>12&63]+O[e>>6&63]+O[63&e]}function a(e,t,i){for(var n,r=[],o=t;oc?c:l+s));return 1===n?(t=e[i-1],r+=O[t>>2],r+=O[t<<4&63],r+="=="):2===n&&(t=(e[i-2]<<8)+e[i-1],r+=O[t>>10],r+=O[t>>4&63],r+=O[t<<2&63],r+="="),o.push(r),o.join("")}i.byteLength=r,i.toByteArray=o,i.fromByteArray=l;for(var O=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,f=d.length;h>1,c=-7,u=i?r-1:0,d=i?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+u],u+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+u],u+=d,c-=8);if(0===o)o=1-O;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=O}return(h?-1:1)*s*Math.pow(2,o-n)},i.write=function(e,t,i,n,r,o){var s,a,l,O=8*o-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,f=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=c?(a=0,s=c):s+u>=1?(a=(t*l-1)*Math.pow(2,r),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,r),s=0));r>=8;e[i+h]=255&a,h+=f,a/=256,r-=8);for(s=s<0;e[i+h]=255&s,h+=f,s/=256,O-=8);e[i+h-f]|=128*p}},{}],33:[function(e,t,i){(function(e){!function(t){function i(e,i,h){function Q(e,t,i,n){return this instanceof Q?w(this,e,t,i,n):new Q(e,t,i,n)}function P(e){return!(!e||!e[Z])}function w(e,t,i,n,r){g&&$&&(t instanceof $&&(t=new g(t)),n instanceof $&&(n=new g(n))),t||i||n||f?(s(t,i)||(r=i,n=t,i=0,t=new(f||Array)(8)),e.buffer=t,e.offset=i|=0,p!==typeof n&&("string"==typeof n?v(t,i,n,r||10):s(n,r)?a(t,i,n,r):"number"==typeof r?(S(t,i+T,n),S(t,i+R,r)):n>0?q(t,i,n):n<0?E(t,i,n):a(t,i,b,0))):e.buffer=l(b,0)}function v(e,t,i,n){var r=0,o=i.length,s=0,a=0;"-"===i[0]&&r++;for(var l=r;r=0))break;a=a*n+O,s=s*n+Math.floor(a/y),a%=y}l&&(s=~s,a?a=y-a:s++),S(e,t+T,s),S(e,t+R,a)}function X(){var e=this.buffer,t=this.offset,i=k(e,t+T),n=k(e,t+R);return h||(i|=0),i?i*y+n:n}function x(e){var t=this.buffer,i=this.offset,n=k(t,i+T),r=k(t,i+R),o="",s=!h&&2147483648&n;for(s&&(n=~n,r=y-r),e=e||10;;){var a=n%e*y+r;if(n=Math.floor(n/e),r=Math.floor(a/e),o=(a%e).toString(e)+o,!n&&!r)break}return s&&(o="-"+o),o}function S(e,t,i){e[t+C]=255&i,i>>=8,e[t+N]=255&i,i>>=8,e[t+A]=255&i,i>>=8,e[t+W]=255&i}function k(e,t){return e[t+W]*_+(e[t+A]<<16)+(e[t+N]<<8)+e[t+C]}var T=i?0:4,R=i?4:0,W=i?0:3,A=i?1:2,N=i?2:1,C=i?3:0,q=i?O:u,E=i?c:d,V=Q.prototype,Y="is"+e,Z="_"+Y;return V.buffer=void 0,V.offset=0,V[Z]=!0,V.toNumber=X,V.toString=x,V.toJSON=X,V.toArray=n,m&&(V.toBuffer=r),g&&(V.toArrayBuffer=o),Q[Y]=P,t[e]=Q,Q}function n(e){var t=this.buffer,i=this.offset;return f=null,!1!==e&&0===i&&8===t.length&&Q(t)?t:l(t,i)}function r(t){var i=this.buffer,n=this.offset;if(f=m,!1!==t&&0===n&&8===i.length&&e.isBuffer(i))return i;var r=new m(8);return a(r,0,i,n),r}function o(e){var t=this.buffer,i=this.offset,n=t.buffer;if(f=g,!1!==e&&0===i&&n instanceof $&&8===n.byteLength)return n;var r=new g(8);return a(r,0,t,i),r.buffer}function s(e,t){var i=e&&e.length;return t|=0,i&&t+8<=i&&"string"!=typeof e[t]}function a(e,t,i,n){t|=0,n|=0;for(var r=0;r<8;r++)e[t++]=255&i[n++]}function l(e,t){return Array.prototype.slice.call(e,t,t+8)}function O(e,t,i){for(var n=t+8;n>t;)e[--n]=255&i,i/=256}function c(e,t,i){var n=t+8;for(i++;n>t;)e[--n]=255&-i^255,i/=256}function u(e,t,i){for(var n=t+8;tnew Uint8Array(e.buffer,e.byteOffset,e.byteLength);Nt.addExtPacker(17,Int8Array,Ct),Nt.addExtPacker(18,Uint8Array,Ct),Nt.addExtPacker(19,Int16Array,Ct),Nt.addExtPacker(20,Uint16Array,Ct),Nt.addExtPacker(21,Int32Array,Ct),Nt.addExtPacker(22,Uint32Array,Ct),Nt.addExtPacker(23,Float32Array,Ct),Nt.addExtPacker(24,Float64Array,Ct),Nt.addExtPacker(18,Uint8ClampedArray,Ct),Nt.addExtPacker(18,ArrayBuffer,(e=>new Uint8Array(e))),Nt.addExtPacker(18,DataView,Ct),Nt.addExtPacker(13,Date,(e=>new BigInt64Array([BigInt(+e)]))),Nt.addExtUnpacker(13,(e=>{if("getBigInt64"in DataView.prototype){let t=new DataView(e.buffer,e.byteOffset,e.byteLength).getBigInt64(0,!0);if(t>Number.MAX_SAFE_INTEGER)throw new Error("Can't read too big number as date (how far in the future is this?!)");return new Date(Number(t))}return new Date(NaN)})),Nt.addExtUnpacker(17,(e=>new Int8Array(e.buffer))),Nt.addExtUnpacker(18,(e=>new Uint8Array(e.buffer))),Nt.addExtUnpacker(19,(e=>new Int16Array(e.buffer))),Nt.addExtUnpacker(20,(e=>new Uint16Array(e.buffer))),Nt.addExtUnpacker(21,(e=>new Int32Array(e.buffer))),Nt.addExtUnpacker(22,(e=>new Uint32Array(e.buffer))),Nt.addExtUnpacker(23,(e=>new Float32Array(e.buffer))),Nt.addExtUnpacker(24,(e=>new Float64Array(e.buffer)));const qt=e=>At.encode(e,{codec:Nt}),Et=e=>At.decode(e,{codec:Nt});var Vt=e=>void 0===e||"auto"===e||"instant"===e||"smooth"===e;function Yt(e,t){this.scrollLeft=e,this.scrollTop=t}var Zt=(e,t,i="cannot convert to dictionary.")=>`Failed to execute '${e}' on '${t}': ${i}`,zt=(e,t,i)=>Zt(e,t,`The provided value '${i}' is not a valid enum value of type ScrollBehavior.`),Mt=(e,t,i)=>{var n;let r=`__SEAMLESS.BACKUP$${t}`;return!e[r]&&e[t]&&!(null!==(n=e[t])&&void 0!==n&&n.__isPolyfill)&&(e[r]=e[t]),e[r]||i},It=e=>{let t=typeof e;return null!==e&&("object"===t||"function"===t)},Ut=()=>"scrollBehavior"in window.document.documentElement.style,jt=e=>{Object.defineProperty(e,"__isPolyfill",{value:!0})},Dt=(e,t)=>{jt(t),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach((i=>{Mt(i,e),i[e]=t}))},Gt=e=>e.ownerDocument.scrollingElement||e.ownerDocument.documentElement,Lt=e=>.5*(1-Math.cos(Math.PI*e));function Bt(){var e;let t;return t=null!==(e=window.performance)&&void 0!==e&&e.now?()=>window.performance.now():()=>window.Date.now(),Bt=t,t()}var Kt=e=>{let t=(Bt()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();let i=(e.timingFunc||Lt)(t),n=e.startX+(e.targetX-e.startX)*i,r=e.startY+(e.targetY-e.startY)*i;e.method(n,r),e.rafId=window.requestAnimationFrame((()=>{Kt(e)}))},Ft=e=>isFinite(e)?Number(e):0,Ht=e=>(t,i,n)=>{let[r,o]=(e=>e.window===e)(t)?[Gt(t.document.documentElement),"Window"]:[t,"Element"],s=i??{};if(!It(s))throw new TypeError(Zt(e,o));if(!Vt(s.behavior))throw new TypeError(zt(e,o,s.behavior));"scrollBy"===e&&(s.left=Ft(s.left)+r.scrollLeft,s.top=Ft(s.top)+r.scrollTop),((e,t,i)=>{var n,r;if(!(e=>{var t;return null!==(t=e.isConnected)&&void 0!==t?t:!(e.ownerDocument&&1&e.ownerDocument.compareDocumentPosition(e))})(e))return;let o=e.scrollLeft,s=e.scrollTop,a=Ft(null!==(n=t.left)&&void 0!==n?n:o),l=Ft(null!==(r=t.top)&&void 0!==r?r:s);if(a===o&&l===s)return;let O=Mt(HTMLElement.prototype,"scroll",Yt),c=Mt(Object.getPrototypeOf(e),"scroll",O).bind(e);if("smooth"!==t.behavior)return void c(a,l);let u=()=>{window.removeEventListener("wheel",h),window.removeEventListener("touchmove",h)},d=Object.assign(Object.assign({},i),{timeStamp:Bt(),startX:o,startY:s,targetX:a,targetY:l,rafId:0,method:c,callback:u}),h=()=>{window.cancelAnimationFrame(d.rafId),u()};window.addEventListener("wheel",h,{passive:!0,once:!0}),window.addEventListener("touchmove",h,{passive:!0,once:!0}),Kt(d)})(r,s,n)},Jt=Ht("scroll"),ei=Ht("scrollTo"),ti=Ht("scrollBy"),ii=Jt,ni=(e,t)=>i=>{if(Ut())return;let n={scroll:Jt,scrollTo:ei,scrollBy:ti}[e];t(e,(function(){let e=arguments;if(1===arguments.length)return void n(this,e[0],i);let t=e[0],r=e[1];n(this,{left:t,top:r})}))},ri=ni("scroll",Dt),oi=ni("scrollTo",Dt),si=ni("scrollBy",Dt),ai=(e,t)=>{jt(t),Mt(window,e),window[e]=t},li=ni("scroll",ai),Oi=ni("scrollTo",ai),ci=ni("scrollBy",ai),ui=e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},di=(e,t,i,n)=>{let r=0;switch(t||(r^=2),e){case 0:r=r>>1|(1&r)<<1,[i,n]=[n,i];break;case 1:case 3:r^=1;break;case 4:r^=2}return[r,i,n]},hi=e=>1==(1&di(ui(e.writingMode),"rtl"!==e.direction,void 0,void 0)[0]),fi=(e,t,i,n,r,o,s)=>0!==e?e:ri||r>t&&o=i&&s>=n?2:o>i&&sn?3:null,pi=e=>"visible"!==e&&"clip"!==e,mi=(e,t)=>(e.clientHeight{let t=e.parentNode,i=e.parentElement;if(null===i&&null!==t){if(11===t.nodeType)return t.host;if(9===t.nodeType)return(e=>{var t;try{return(null===(t=e.ownerDocument.defaultView)||void 0===t?void 0:t.frameElement)||null}catch{return null}})(e)}return i},$i=(e,t,i)=>ei?i:e,bi=(e,t,i)=>{switch(e){case 1:return(t+i)/2;case 3:return i;case 2:case 0:return t}},Qi=(e,t)=>{var i,n,r;let o=null===(i=e.ownerDocument.defaultView)||void 0===i?void 0:i.visualViewport,[s,a,l,O]=e===Gt(e)?[0,0,null!==(n=null==o?void 0:o.width)&&void 0!==n?n:e.clientWidth,null!==(r=null==o?void 0:o.height)&&void 0!==r?r:e.clientHeight]:[t.left,t.top,e.clientWidth,e.clientHeight],c=s+e.clientLeft,u=a+e.clientTop;return[u,c+l,u+O,c]},yi=(e,t)=>{let i=[],n=e.ownerDocument,r=n.defaultView;if(!r)return i;let o=window.getComputedStyle(e),s="rtl"!==o.direction,a=ui(o.writingMode||o.getPropertyValue("-webkit-writing-mode")||o.getPropertyValue("-ms-writing-mode")),[l,O]=((e,t,i)=>{let[n,r,o]=di(t,i,e.block||"start",e.inline||"nearest");return[r,o].map(((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e==!(n>>t&1)?2:3}}))})(t,a,s),[c,u,d,h]=((e,t,i)=>{let{top:n,right:r,bottom:o,left:s}=t,a=(e=>["scroll-margin","scroll-snap-margin"].filter((t=>t in e.documentElement.style))[0])(e.ownerDocument);if(!a)return[n,r,o,s];let l=e=>{let t=i.getPropertyValue(`${a}-${e}`);return parseInt(t,10)||0};return[n-l("top"),r+l("right"),o+l("bottom"),s-l("left")]})(e,e.getBoundingClientRect(),o);for(let o=gi(e);null!==o;o=gi(o)){if(n!==o.ownerDocument){if(n=o.ownerDocument,r=n.defaultView,!r)break;let{left:e,top:t}=o.getBoundingClientRect();c+=t,u+=e,d+=t,h+=e}let e=r.getComputedStyle(o);if("fixed"===e.position)break;if(!mi(o,e))continue;let s=o.getBoundingClientRect(),[a,f,p,m]=Qi(o,s),g=fi(l,m,f,o.clientWidth,h,u,u-h),$=fi(O,a,p,o.clientHeight,c,d,d-c),b=null===g?0:bi(g,h,u)-bi(g,m,f),Q=null===$?0:bi($,c,d)-bi($,a,p),y=hi(e)?$i(b,-o.scrollWidth+o.clientWidth-o.scrollLeft,-o.scrollLeft):$i(b,-o.scrollLeft,o.scrollWidth-o.clientWidth-o.scrollLeft),_=$i(Q,-o.scrollTop,o.scrollHeight-o.clientHeight-o.scrollTop);i.push([o,{left:o.scrollLeft+y,top:o.scrollTop+_,behavior:t.behavior}]),c=Math.max(c-_,a),u=Math.min(u-y,f),d=Math.min(d-_,p),h=Math.max(h-y,m)}return i},_i=(e,t,i)=>{let n=t||{};if(!Vt(n.behavior))throw new TypeError(zt("scrollIntoView","Element",n.behavior));yi(e,n).forEach((([e,t])=>{ii(e,t,i)}))};function Pi(e){_i(this,{block:e??1?"start":"end",inline:"nearest"})}var wi,vi=e=>{if(Ut())return;let t=Mt(window.HTMLElement.prototype,"scrollIntoView",Pi);Dt("scrollIntoView",(function(){let i=arguments,n=i[0];1===i.length&&It(n)?_i(this,n,e):t.apply(this,i)}))};null==Blob.prototype.text&&(Blob.prototype.text=function(){const e=new FileReader,t=new Promise(((t,i)=>{e.onload=()=>{t(e.result)},e.onerror=t=>{e.abort(),i(t)}}));return e.readAsText(this),t}),null==Blob.prototype.arrayBuffer&&(Blob.prototype.arrayBuffer=function(){return new Response(this).arrayBuffer()}),Ut()||(ri(wi),oi(wi),si(wi),vi(wi),li(wi),Oi(wi),ci(wi));const Xi=(e,t)=>{const i="http://delete-me.com/",n=new URL(e,i);return Object.entries(t).forEach((([e,t])=>{null!=t&&n.searchParams.append(e,t)})),n.toString().replace(i,"")};console.assert("https://example.com/?a=b+c"===Xi("https://example.com/",{a:"b c"})),console.assert("https://example.com/?a=b+c"===Xi(new URL("https://example.com/"),{a:"b c"})),console.assert("https://example.com/?a=b+c&xx=123"===Xi(new URL("https://example.com/"),{a:"b c",asdf:null,xx:"123"})),console.assert("index.html?a=b+c"===Xi("index.html",{a:"b c"})),console.assert("index.html?x=123&a=b+c"===Xi("index.html?x=123",{a:"b c"})),console.assert("index.html?x=123&a=b+c#asdf"===Xi("index.html?x=123#asdf",{a:"b c"}));const xi=(e,t)=>Promise.race([e,new Promise(((e,i)=>{setTimeout((()=>{i(new Error("Promise timed out."))}),t)}))]),Si=()=>crypto.getRandomValues(new Uint32Array(1))[0].toString(36),ki=e=>e.readyState==WebSocket.OPEN||e.readyState==WebSocket.CONNECTING,Ti=e=>{e.onopen=()=>{Ti(e)},e.onmessage=e.onclose=e.onerror=null;try{e.close(1e3,"byebye")}catch(e){}},Ri=(e,{on_message:t,on_socket_close:i},n=30)=>new Promise(((r,o)=>{const s=new WebSocket(e);let a=!1;const l=setTimeout((()=>{console.warn("Creating websocket timed out",(new Date).toLocaleTimeString()),Ti(s),o("Socket timeout")}),1e3*n),O=e=>{const t=qt(e);s.send(t)};let c=Promise.resolve();s.onmessage=e=>{c=c.then((async()=>{try{const i=await e.data.arrayBuffer(),n=Et(new Uint8Array(i));try{t(n)}catch(t){console.error("Failed to process message from websocket",t,{message:n}),alert(`Something went wrong! You might need to refresh the page.\n\nPlease open an issue on https://github.com/fonsp/Pluto.jl with this info:\n\nFailed to process update\n${t.message}\n\n${JSON.stringify(e)}`)}}catch(t){console.error("Failed to unpack message from websocket",t,{event:e}),alert(`Something went wrong! You might need to refresh the page.\n\nPlease open an issue on https://github.com/fonsp/Pluto.jl with this info:\n\nFailed to unpack message\n${t}\n\n${JSON.stringify(e)}`)}}))},s.onerror=async e=>{console.error(`Socket did an oopsie - ${e.type}`,(new Date).toLocaleTimeString(),"was open:",a,e),await(e=>new Promise((t=>{ki(e)?t(!0):setTimeout((()=>{t(ki(e))}),1e3)})))(s)?(console.log("The socket somehow recovered from an error?! Onbegrijpelijk"),console.log(s),console.log(s.readyState)):a?(i(),Ti(s)):o(e)},s.onclose=async e=>{console.error(`Socket did an oopsie - ${e.type}`,(new Date).toLocaleTimeString(),"was open:",a,e),a?(i(),Ti(s)):o(e)},s.onopen=()=>{console.log("Socket opened",(new Date).toLocaleTimeString()),clearInterval(l),a=!0,r({socket:s,send:O})},console.log("Waiting for socket to open...",(new Date).toLocaleTimeString())}));const Wi=e=>{let t=null,i=[],n=null;return async(r,o,s,a)=>{if("update_notebook"===r){if(null!=n&&n!=s.notebook_id)throw new Error("Switched notebook inbetween same-tick updates??? WHAT?!?!");return i=[...i,...o.updates],n=s.notebook_id,null==t&&(t=new Promise((e=>setTimeout(e,0))).then((async()=>{let o=i;return t=null,i=[],n=null,await e(r,{updates:o},s,a)}))),await t}return await e(r,o,s,a)}},Ai=e=>{const t=new URL("./",e);t.protocol=t.protocol.replace("http","ws");return Xi(t,{secret:new URL(e).searchParams.get("secret")})},Ni=()=>Ai(window.location.href),Ci=async({on_unrequested_update:e,on_reconnect:t,on_connection_status:i,connect_metadata:n={},ws_address:r=Ni()})=>{let o=null;const s={send:null,session_options:null,version_info:{julia:"unknown",pluto:"unknown",dismiss_update_notification:!1},notebook_exists:!0,kill:null},a=Si(),l=new Map,O=async(t,i={},n={},r=!0)=>{if(null==o)throw new Error("No connection established yet");const s=Si(),O={type:t,client_id:a,request_id:s,body:i,...n};let c=(()=>{let e=()=>{},t=()=>{};return{current:new Promise(((i,n)=>{e=i,t=n})),resolve:e,reject:t}})();return l.set(s,(t=>{c.resolve(t),!1===r&&e(t,!0)})),o.send(O),await c.current};s.send=Wi(O);const c=async()=>{(async()=>{try{const e=new URL(window.location.href),t=await fetch("possible_binder_token_please");if(!t.ok)return;const i=await t.text();""!==i&&e.searchParams.get("token")!==i&&(e.searchParams.set("token",i),history.replaceState({},"",e.toString()))}catch(e){console.warn("Error while setting binder url:",e)}})();try{o=await Ri(String(r),{on_message:t=>{const i=t.initiator_id==a,n=t.request_id;if(i&&n){const e=l.get(n);if(e)return e(t),void l.delete(n)}e(t,i)},on_socket_close:async()=>{i(!1,!1),console.log("Starting new websocket",(new Date).toLocaleTimeString()),await Rt.delay(500),await c(),console.log("Starting state sync",(new Date).toLocaleTimeString());const e=t();console.log(`State sync ${e?"":"not "}successful`,(new Date).toLocaleTimeString()),i(e,!1),e||alert("Connection out of sync 😥\n\nRefresh the page to continue")}}),console.log("Hello?");const u=await O("connect",{},n);if(console.log("Hello!"),s.kill=()=>{o&&o.socket.close()},s.session_options=u.message.options,s.version_info=u.message.version_info,s.notebook_exists=u.message.notebook_exists,console.log("Client object: ",s),null!=n.notebook_id&&!u.message.notebook_exists)return i(!1,!0),{};i(!0,!1);const d=()=>{O("ping",{},{}).then((()=>{setTimeout(d,28e3)})).catch((()=>{}))};return d(),u.message}catch(e){return console.error("connect() failed",e),await Rt.delay(5e3),await c()}};return await c(),s};let qi=async e=>e(),Ei=null;o.register("dLidm",(function(e,t){e.exports=o("aFTz8")(o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("9OeRT")).then((()=>o("dN8oq")))})),o.register("aFTz8",(function(e,t){"use strict";var i=o("l8cOo");e.exports=i((function(e){return new Promise((function(t,i){var n=document.getElementsByTagName("script");if([].concat(n).some((function(t){return t.src===e})))t();else{var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=e,r.onerror=function(e){r.onerror=r.onload=null,r.remove(),i(e)},r.onload=function(){r.onerror=r.onload=null,t()},document.getElementsByTagName("head")[0].appendChild(r)}}))}))})),o.register("l8cOo",(function(e,t){"use strict";var i={},n={},r={};function o(e){switch(e){case"preload":return n;case"prefetch":return r;default:return i}}e.exports=function(e,t){return function(i){var n=o(t);return n[i]?n[i]:n[i]=e.apply(null,arguments).catch((function(e){throw delete n[i],e}))}}})),o.register("8LcMF",(function(t,i){var n;e(t.exports,"getBundleURL",(()=>n),(e=>n=e));var r={};function o(e){return(""+e).replace(/^((?:https?|file|ftp):\/\/.+)\/[^/]+$/,"$1")+"/"}n=function(e){var t=r[e];return t||(t=function(){try{throw new Error}catch(t){var e=(""+t.stack).match(/(https?|file|ftp):\/\/[^)\n]+/g);if(e)return o(e[2])}return"/"}(),r[e]=t),t}})),o.register("cQdD1",(function(e,t){e.exports=Promise.all([o("aFTz8")(o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("9OeRT")),o("aFTz8")(o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("eSSrR"))]).then((()=>o("4Odpp")))}));const Vi=async()=>(null==Ei&&(Ei=qi((async()=>{let[{initializeApp:e},t]=await Promise.all([o("dLidm"),o("cQdD1")]),{getFirestore:i,addDoc:n,doc:r,collection:s}=t,a=s(i(e({apiKey:"AIzaSyC0DqEcaM8AZ6cvApXuNcNU2RgZZOj7F68",authDomain:"localhost",projectId:"pluto-feedback"})),"feedback");return console.log("🔥base loaded"),async e=>{await n(a,e)}}))),await Ei),Yi=async()=>{try{const e=document.querySelector("form#feedback");e.addEventListener("submit",(t=>{const i=prompt("Would you like us to contact you?\n\nEmail: (leave blank to stay anonymous 👀)");t.preventDefault(),qi((async()=>{try{let n=await Vi();await xi(n({feedback:new FormData(t.target).get("opinion"),timestamp:Date.now(),email:i||""}),5e3);let r="Submitted. Thank you for your feedback! 💕";console.log(r),alert(r),e.querySelector("#opinion").value=""}catch(e){let t="Whoops, failed to send feedback 😢\nWe would really like to hear from you! Please got to https://github.com/fonsp/Pluto.jl/issues to report this failure:\n\n";console.error(t),console.error(e),alert(t+e)}}))})),e.addEventListener("focusin",(()=>{Vi()}))}catch(e){console.error("Something went wrong loading the feedback form:",e),document.querySelector("form#feedback").style.opacity=0;for(let e of"Oh noooooooooooooooooo...")document.querySelector("form#feedback input").value+=e,await new Promise((e=>setTimeout(e,200)))}};function Zi(e){return e.replace(/\r\n/g,"\n").split(/# ╔═╡ \S+\n/).map((e=>e.trim())).filter((e=>""!==e))}const zi="julia> ";function Mi(e){const t=e.replace(/\r\n/g,"\n").split(zi),i=" ".repeat(prompt.length);return t.map((function(e){return(i+e).split("\n").filter((e=>e.startsWith(i))).map((e=>e.replace(i,""))).join("\n")})).map((e=>e.trim())).filter((e=>""!==e))}const Ii=e=>{var t;return e.trim().startsWith(zi)?Mi:(null===(t=e.match(/# ╔═╡ ........-....-....-....-............/g))||void 0===t?void 0:t.length)?Zi:null},Ui=new TextEncoder,ji=new TextDecoder,Di=(e,t)=>ji.decode(Ui.encode(e).slice(0,t)).length,Gi=(e,t,i)=>{const n=Ui.encode(e);return ji.decode(n.slice(t,i))};console.assert("e é hannes ❤ is a dog"===((e,t,i,n)=>{const r=Ui.encode(e),o=Ui.encode(n),s=new Uint8Array(r.length+o.length-(i-t));return s.set(r.slice(0,t),0),s.set(o,t),s.set(r.slice(i),t+o.length),ji.decode(s)})("e é 🐶 is a dog",5,9,"hannes ❤")),console.assert("🐶"===Gi("e é 🐶 is a dog",5,9));let Li=/Mac/.test(navigator.platform),Bi=Li?"Cmd":"Ctrl",Ki=e=>e.ctrlKey||Li&&e.metaKey;o.register("6kwV5",(function(e,t){}));var Fi=o("6kwV5");class Hi{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),en.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),en.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new rn(this),r=new rn(e);for(let e=t,o=t;;){if(n.next(e),r.next(e),e=0,n.lineBreak!=r.lineBreak||n.done!=r.done||n.value!=r.value)return!1;if(o+=n.value.length,n.done||o>=i)return!0}}iter(e=1){return new rn(this,e)}iterRange(e,t=this.length){return new on(this,e,t)}iterLines(e,t){let i;if(null==e)i=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new sn(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Ji(e):en.from(Ji.split(e,[])):Hi.empty}}class Ji extends Hi{constructor(e,t=function(e){let t=-1;for(let i of e)t+=i.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let r=0;;r++){let o=this.text[r],s=n+o.length;if((t?i:s)>=e)return new an(n,s,i,o);n=s+1,i++}}decompose(e,t,i,n){let r=e<=0&&t>=this.length?this:new Ji(nn(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=i.pop(),t=tn(r.text,e.text.slice(),0,r.length);if(t.length<=32)i.push(new Ji(t,e.length+r.length));else{let e=t.length>>1;i.push(new Ji(t.slice(0,e)),new Ji(t.slice(e)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Ji))return super.replace(e,t,i);let n=tn(this.text,tn(i.text,nn(this.text,0,e)),t),r=this.length+i.length-(t-e);return n.length<=32?new Ji(n,r):en.from(Ji.split(n,[]),r)}sliceString(e,t=this.length,i="\n"){let n="";for(let r=0,o=0;r<=t&&oe&&o&&(n+=i),er&&(n+=s.slice(Math.max(0,e-r),t-r)),r=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let r of e)i.push(r),n+=r.length+1,32==i.length&&(t.push(new Ji(i,n)),i=[],n=-1);return n>-1&&t.push(new Ji(i,n)),t}}class en extends Hi{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,i,n){for(let r=0;;r++){let o=this.children[r],s=n+o.length,a=i+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,i,n);n=s+1,i=a+1}}decompose(e,t,i,n){for(let r=0,o=0;o<=t&&r=o){let r=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!r?i.push(s):s.decompose(e-o,t-o,i,r)}o=a+1}}replace(e,t,i){if(i.lines=r&&t<=s){let a=o.replace(e-r,t-r,i),l=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let r=this.children.slice();return r[n]=a,new en(r,this.length-(t-e)+i.length)}return super.replace(r,s,a)}r=s+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){let n="";for(let r=0,o=0;re&&r&&(n+=i),eo&&(n+=s.sliceString(e-o,t-o,i)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof en))return 0;let i=0,[n,r,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,r+=t){if(n==o||r==s)return i;let a=this.children[n],l=e.children[r];if(a!=l)return i+a.scanIdentical(l,t);i+=a.length+1}}static from(e,t=e.reduce(((e,t)=>e+t.length+1),-1)){let i=0;for(let t of e)i+=t.lines;if(i<32){let i=[];for(let t of e)t.flatten(i);return new Ji(i,t)}let n=Math.max(32,i>>5),r=n<<1,o=n>>1,s=[],a=0,l=-1,O=[];function c(e){let t;if(e.lines>r&&e instanceof en)for(let t of e.children)c(t);else e.lines>o&&(a>o||!a)?(u(),s.push(e)):e instanceof Ji&&a&&(t=O[O.length-1])instanceof Ji&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,O[O.length-1]=new Ji(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>n&&u(),a+=e.lines,l+=e.length+1,O.push(e))}function u(){0!=a&&(s.push(1==O.length?O[0]:en.from(O,l)),l=-1,a=O.length=0)}for(let t of e)c(t);return u(),1==s.length?s[0]:new en(s,t)}}function tn(e,t,i=0,n=1e9){for(let r=0,o=0,s=!0;o=i&&(l>n&&(a=a.slice(0,n-r)),r0?1:(e instanceof Ji?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],r=this.offsets[i],o=r>>1,s=n instanceof Ji?n.text.length:n.children.length;if(o==(t>0?s:0)){if(0==i)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[i]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof Ji){let r=n.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=n.children[o+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof Ji?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class on{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new rn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class sn{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Hi.prototype[Symbol.iterator]=function(){return this.iter()},rn.prototype[Symbol.iterator]=on.prototype[Symbol.iterator]=sn.prototype[Symbol.iterator]=function(){return this});let an=class{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}},ln="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,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,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e=>e?parseInt(e,36):1));for(let e=1;ee)return ln[t-1]<=e;return!1}function cn(e){return e>=127462&&e<=127487}function un(e,t,i=!0,n=!0){return(i?dn:hn)(e,t,n)}function dn(e,t,i){if(t==e.length)return t;t&&fn(e.charCodeAt(t))&&pn(e.charCodeAt(t-1))&&t--;let n=mn(e,t);for(t+=$n(n);t=0&&cn(mn(e,n));)i++,n-=2;if(i%2==0)break;t+=2}}}return t}function hn(e,t,i){for(;t>0;){let n=dn(e,t-2,i);if(n=56320&&e<57344}function pn(e){return e>=55296&&e<56320}function mn(e,t){let i=e.charCodeAt(t);if(!pn(i)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return fn(n)?n-56320+(i-55296<<10)+65536:i}function gn(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function $n(e){return e<65536?1:2}const bn=/\r\n?|\n/;var Qn,yn=((Qn=yn||(yn={}))[Qn.Simple=0]="Simple",Qn[Qn.TrackDel=1]="TrackDel",Qn[Qn.TrackBefore=2]="TrackBefore",Qn[Qn.TrackAfter=3]="TrackAfter",Qn);class _n{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-n);r+=s}else{if(i!=yn.Simple&&l>=e&&(i==yn.TrackDel&&ne||i==yn.TrackBefore&&ne))return null;if(l>e||l==e&&t<0&&!s)return e==n||t<0?r:r+a;r+=a}n=l}if(e>n)throw new RangeError(`Position ${e} is out of range for changeset of length ${n}`);return r}touchesRange(e,t=e){for(let i=0,n=0;i=0&&n<=t&&r>=e)return!(nt)||"cover";n=r}return!1}toString(){let e="";for(let t=0;t=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((e=>"number"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new _n(e)}static create(e){return new _n(e)}}class Pn extends _n{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Xn(this,((t,i,n,r,o)=>e=e.replace(n,n+(i-t),o)),!1),e}mapDesc(e,t=!1){return xn(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,r=0;n=0){t[n]=s,t[n+1]=o;let a=n>>1;for(;i.length0&&vn(i,t,r.text),r.forward(e),s+=e}let l=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,i){let n=[],r=[],o=0,s=null;function a(e=!1){if(!e&&!n.length)return;os||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let c=O?"string"==typeof O?Hi.of(O.split(i||bn)):O:Hi.empty,u=c.length;if(e==s&&0==u)return;eo&&wn(n,e-o,-1),wn(n,s-e,u),vn(r,n,c),o=s}}(e),a(!s),s}static empty(e){return new Pn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;nt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)t.push(r[0],0);else{for(;i.length=0&&i<=0&&i==e[r+1]?e[r]+=t:0==t&&0==e[r]?e[r+1]+=i:n?(e[r]+=t,e[r+1]+=i):e.push(t,i)}function vn(e,t,i){if(0==i.length)return;let n=t.length-2>>1;if(n>1])),!(i||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(r,O,o,c,u),r=O,o=c}}}function xn(e,t,i,n=!1){let r=[],o=n?[]:null,s=new kn(e),a=new kn(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);wn(r,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len=0&&e=0)){if(s.done&&a.done)return o?Pn.createSet(r,o):_n.create(r);throw new Error("Mismatched change set lengths")}{let t=0,i=s.len;for(;i;)if(-1==a.ins){let e=Math.min(i,a.len);t+=e,i-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||s.ins>=0&&s.len>t)&&(e||n.length>i),o.forward2(t),s.forward(t)}}else wn(n,0,s.ins,e),r&&vn(r,n,s.text),s.next()}}class kn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Hi.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?Hi.empty:t[i].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Tn{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let e=3&this.flags;return 3==e?null:e}get goalColumn(){let e=this.flags>>5;return 33554431==e?void 0:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new Tn(i,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Rn.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Rn.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Rn.range(e.anchor,e.head)}static create(e,t,i){return new Tn(e,t,i)}}class Rn{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Rn.create(this.ranges.map((i=>i.map(e,t))),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Rn(e.ranges.map((e=>Tn.fromJSON(e))),e.main)}static single(e,t=e){return new Rn([Rn.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;ne?4:0)|r)}static normalized(e,t=0){let i=e[t];e.sort(((e,t)=>e.from-t.from)),t=e.indexOf(i);for(let i=1;in.head?Rn.range(s,o):Rn.range(o,s))}}return new Rn(e,t)}}function Wn(e,t){for(let i of e.ranges)if(i.to>t)throw new RangeError("Selection points outside of document")}let An=0;class Nn{constructor(e,t,i,n,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=An++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}static define(e={}){return new Nn(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:Cn),!!e.static,e.enables)}of(e){return new qn([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qn(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qn(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(i=>t(i.field(e))))}}function Cn(e,t){return e==t||e.length==t.length&&e.every(((e,i)=>e===t[i]))}class qn{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=An++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,r=this.id,o=e[r]>>1,s=2==this.type,a=!1,l=!1,O=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:0==(1&(null!==(t=e[i.id])&&void 0!==t?t:1))&&O.push(e[i.id]);return{create:e=>(e.values[o]=i(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||Vn(e,O)){let t=i(e);if(s?!En(t,e.values[o],n):!n(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[r];if(null!=l){let r=Jn(t,l);if(this.dependencies.every((i=>i instanceof Nn?t.facet(i)===e.facet(i):!(i instanceof zn)||t.field(i,!1)==e.field(i,!1)))||(s?En(a=i(e),r,n):n(a=i(e),r)))return e.values[o]=r,0}else a=i(e);return e.values[o]=a,1}}}}function En(e,t,i){if(e.length!=t.length)return!1;for(let n=0;ne[t.id])),r=i.map((e=>e.type)),o=n.filter((e=>!(1&e))),s=e[t.id]>>1;function a(e){let i=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Zn).find((e=>e.field==this));return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,i)=>{let n=e.values[t],r=this.updateF(n,i);return this.compareF(n,r)?0:(e.values[t]=r,1)},reconfigure:(e,i)=>null!=i.config.address[this.id]?(e.values[t]=i.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Zn.of({field:this,create:e})]}get extension(){return this}}const Mn=4,In=3,Un=2,jn=1;function Dn(e){return t=>new Ln(t,e)}const Gn={highest:Dn(0),high:Dn(jn),default:Dn(Un),low:Dn(In),lowest:Dn(Mn)};class Ln{constructor(e,t){this.inner=e,this.prec=t}}class Bn{of(e){return new Kn(this,e)}reconfigure(e){return Bn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Kn{constructor(e,t){this.compartment=e,this.inner=t}}class Fn{constructor(e,t,i,n,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let n=[],r=Object.create(null),o=new Map;for(let i of function(e,t,i){let n=[[],[],[],[],[]],r=new Map;return function e(o,s){let a=r.get(o);if(null!=a){if(a<=s)return;let e=n[a].indexOf(o);e>-1&&n[a].splice(e,1),o instanceof Kn&&i.delete(o.compartment)}if(r.set(o,s),Array.isArray(o))for(let t of o)e(t,s);else if(o instanceof Kn){if(i.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=t.get(o.compartment)||o.inner;i.set(o.compartment,n),e(n,s)}else if(o instanceof Ln)e(o.inner,o.prec);else if(o instanceof zn)n[s].push(o),o.provides&&e(o.provides,s);else if(o instanceof qn)n[s].push(o),o.facet.extensions&&e(o.facet.extensions,Un);else{let t=o.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,s)}}(e,Un),n.reduce(((e,t)=>e.concat(t)))}(e,t,o))i instanceof zn?n.push(i):(r[i.facet.id]||(r[i.facet.id]=[])).push(i);let s=Object.create(null),a=[],l=[];for(let e of n)s[e.id]=l.length<<1,l.push((t=>e.slot(t)));let O=null==i?void 0:i.config.facets;for(let e in r){let t=r[e],n=t[0].facet,o=O&&O[e]||[];if(t.every((e=>0==e.type)))if(s[n.id]=a.length<<1|1,Cn(o,t))a.push(i.facet(n));else{let e=n.combine(t.map((e=>e.value)));a.push(i&&n.compare(e,i.facet(n))?i.facet(n):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));s[n.id]=l.length<<1,l.push((e=>Yn(e,n,t)))}}let c=l.map((e=>e(s)));return new Fn(e,o,c,s,a,r)}}function Hn(e,t){if(1&t)return 2;let i=t>>1,n=e.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[i]=4;let r=e.computeSlot(e,e.config.dynamicSlots[i]);return e.status[i]=2|r}function Jn(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const er=Nn.define(),tr=Nn.define({combine:e=>e.some((e=>e)),static:!0}),ir=Nn.define({combine:e=>e.length?e[0]:void 0,static:!0}),nr=Nn.define(),rr=Nn.define(),or=Nn.define(),sr=Nn.define({combine:e=>!!e.length&&e[0]});class ar{constructor(e,t){this.type=e,this.value=t}static define(){return new lr}}class lr{of(e){return new ar(this,e)}}class Or{constructor(e){this.map=e}of(e){return new cr(this,e)}}class cr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new cr(this.type,t)}is(e){return this.type==e}static define(e={}){return new Or(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let e=n.map(t);e&&i.push(e)}return i}}cr.reconfigure=cr.define(),cr.appendConfig=cr.define();class ur{constructor(e,t,i,n,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Wn(i,t.newLength),r.some((e=>e.type==ur.time))||(this.annotations=r.concat(ur.time.of(Date.now())))}static create(e,t,i,n,r,o){return new ur(e,t,i,n,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ur.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function dr(e,t){let i=[];for(let n=0,r=0;;){let o,s;if(n=e[n]))o=e[n++],s=e[n++];else{if(!(r=0;r--){let o=i[r](e);o&&Object.keys(o).length&&(n=hr(n,fr(t,o,e.changes.newLength),!0))}return n==e?e:ur.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(e){let t=e.startState,i=!0;for(let n of t.facet(nr)){let t=n(e);if(!1===t){i=!1;break}Array.isArray(t)&&(i=!0===i?t:dr(i,t))}if(!0!==i){let n,r;if(!1===i)r=e.changes.invertedDesc,n=Pn.empty(t.doc.length);else{let t=e.changes.filter(i);n=t.changes,r=t.filtered.mapDesc(t.changes).invertedDesc}e=ur.create(t,n,e.selection&&e.selection.map(r),cr.mapEffects(e.effects,r),e.annotations,e.scrollIntoView)}let n=t.facet(rr);for(let i=n.length-1;i>=0;i--){let r=n[i](e);e=r instanceof ur?r:Array.isArray(r)&&1==r.length&&r[0]instanceof ur?r[0]:pr(t,gr(r),!1)}return e}(r):r)}ur.time=ar.define(),ur.userEvent=ar.define(),ur.addToHistory=ar.define(),ur.remote=ar.define();const mr=[];function gr(e){return null==e?mr:Array.isArray(e)?e:[e]}var $r=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}($r||($r={}));const br=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Qr;try{Qr=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function yr(e){return t=>{if(!/\S/.test(t))return $r.Space;if(function(e){if(Qr)return Qr.test(e);for(let t=0;t"€"&&(i.toUpperCase()!=i.toLowerCase()||br.test(i)))return!0}return!1}(t))return $r.Word;for(let i=0;i-1)return $r.Word;return $r.Other}}class _r{constructor(e,t,i,n,r,o){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let e=0;er.set(t,e))),i=null),r.set(t.value.compartment,t.value.extension)):t.is(cr.reconfigure)?(i=null,n=t.value):t.is(cr.appendConfig)&&(i=null,n=gr(n).concat(t.value));i?t=e.startState.values.slice():(i=Fn.resolve(n,r,this),t=new _r(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values),new _r(i,e.newDoc,e.newSelection,t,((t,i)=>i.update(t,e)),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:e},range:Rn.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),r=[i.range],o=gr(i.effects);for(let i=1;ir.spec.fromJSON(o,e))))}return _r.create({doc:e.doc,selection:Rn.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=Fn.resolve(e.extensions||[],new Map),i=e.doc instanceof Hi?e.doc:Hi.of((e.doc||"").split(t.staticFacet(_r.lineSeparator)||bn)),n=e.selection?e.selection instanceof Rn?e.selection:Rn.single(e.selection.anchor,e.selection.head):Rn.single(0);return Wn(n,i.length),t.staticFacet(tr)||(n=n.asSingle()),new _r(t,i,n,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(_r.tabSize)}get lineBreak(){return this.facet(_r.lineSeparator)||"\n"}get readOnly(){return this.facet(sr)}phrase(e,...t){for(let t of this.facet(_r.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,((e,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>t.length?e:t[n-1]}))),e}languageDataAt(e,t,i=-1){let n=[];for(let r of this.facet(er))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&n.push(o[e]);return n}charCategorizer(e){return yr(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,s=e-i;for(;o>0;){let e=un(t,o,!1);if(r(t.slice(e,o))!=$r.Word)break;o=e}for(;se.length?e[0]:4}),_r.lineSeparator=ir,_r.readOnly=sr,_r.phrases=Nn.define({compare(e,t){let i=Object.keys(e),n=Object.keys(t);return i.length==n.length&&i.every((i=>e[i]==t[i]))}}),_r.languageData=er,_r.changeFilter=nr,_r.transactionFilter=rr,_r.transactionExtender=or,Bn.reconfigure=cr.define();class wr{eq(e){return this==e}range(e,t=e){return vr.create(e,t,this)}}wr.prototype.startSide=wr.prototype.endSide=0,wr.prototype.point=!1,wr.prototype.mapMode=yn.TrackDel;let vr=class e{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(t,i,n){return new e(t,i,n)}};function Xr(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class xr{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,n=0){let r=i?this.to:this.from;for(let o=n,s=r.length;;){if(o==s)return o;let n=o+s>>1,a=r[n]-e||(i?this.value[n].endSide:this.value[n].startSide)-t;if(n==o)return a>=0?o:s;a>=0?s=n:o=n+1}}between(e,t,i,n){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rO||l==O&&c.startSide>0&&c.endSide<=0)continue;(O-l||c.endSide-c.startSide)<0||(o<0&&(o=l),c.point&&(s=Math.max(s,O-l)),i.push(c),n.push(l-o),r.push(O-o))}return{mapped:i.length?new xr(n,r,i,s):null,pos:o}}}class Sr{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new Sr(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:r=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(i&&(t=t.slice().sort(Xr)),this.isEmpty)return t.length?Sr.of(t):this;let s=new Rr(this,null,-1).goto(0),a=0,l=[],O=new kr;for(;s.value||a=0){let e=t[a++];O.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||rs.to||r=r&&e<=r+o.length&&!1===o.between(r,e-r,t-r,i))return}this.nextLayer.between(e,t,i)}}iter(e=0){return Wr.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Wr.from(e).goto(t)}static compare(e,t,i,n,r=-1){let o=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),s=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r)),a=Tr(o,s,i),l=new Nr(o,a,r),O=new Nr(s,a,r);i.iterGaps(((e,t,i)=>Cr(l,e,O,t,i,n))),i.empty&&0==i.length&&Cr(l,0,O,0,0,n)}static eq(e,t,i=0,n){null==n&&(n=999999999);let r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),o=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(r.length!=o.length)return!1;if(!r.length)return!0;let s=Tr(r,o),a=new Nr(r,s,0).goto(i),l=new Nr(o,s,0).goto(i);for(;;){if(a.to!=l.to||!qr(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,i,n,r=-1){let o=new Nr(e,null,r).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,i);if(o.point){let i=o.activeForPoint(o.to),r=o.pointFroms&&(n.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>i)return a+(o.point&&o.to>i?1:0);s=o.to,o.next()}}static of(e,t=!1){let i=new kr;for(let n of e instanceof vr?[e]:t?function(e){if(e.length>1)for(let t=e[0],i=1;i0)return e.slice().sort(Xr);t=n}return e}(e):e)i.add(n.from,n.to,n.value);return i.finish()}}Sr.empty=new Sr([],[],null,-1),Sr.empty.nextLayer=Sr.empty;class kr{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new xr(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new kr)).add(e,t,i)}addInner(e,t,i){let n=e-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(Sr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Sr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Tr(e,t,i){let n=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Rr(o,t,i,r));return 1==n.length?n[0]:new Wr(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)Ar(this.heap,e);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)Ar(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Ar(this.heap,0)}}}function Ar(e,t){for(let i=e[t];;){let n=1+(t<<1);if(n>=e.length)break;let r=e[n];if(n+1=0&&(r=e[n+1],n++),i.compare(r)<0)break;e[n]=i,e[t]=r,t=n}}class Nr{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Wr.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Er(this.active,e),Er(this.activeTo,e),Er(this.activeRank,e),this.minActive=Yr(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:r}=this.cursor;for(;t-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&Er(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[t]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Cr(e,t,i,n,r,o){e.goto(t),i.goto(n);let s=n+r,a=n,l=n-t;for(;;){let t=e.to+l-i.to||e.endSide-i.endSide,n=t<0?e.to+l:i.to,r=Math.min(n,s);if(e.point||i.point?e.point&&i.point&&(e.point==i.point||e.point.eq(i.point))&&qr(e.activeForPoint(e.to+l),i.activeForPoint(i.to))||o.comparePoint(a,r,e.point,i.point):r>a&&!qr(e.active,i.active)&&o.compareRange(a,r,e.active,i.active),n>s)break;a=n,t<=0&&e.next(),t>=0&&i.next()}}function qr(e,t){if(e.length!=t.length)return!1;for(let i=0;i=t;i--)e[i+1]=e[i];e[t]=i}function Yr(e,t){let i=-1,n=1e9;for(let r=0;r=t)return n;if(n==e.length)break;r+=9==e.charCodeAt(n)?i-r%i:1,n=un(e,n)}return!0===n?-1:e.length}const Mr=1024;let Ir=0;class Ur{constructor(e,t){this.from=e,this.to=t}}class jr{constructor(e={}){this.id=Ir++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=Lr.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}jr.closedBy=new jr({deserialize:e=>e.split(" ")}),jr.openedBy=new jr({deserialize:e=>e.split(" ")}),jr.group=new jr({deserialize:e=>e.split(" ")}),jr.contextHash=new jr({perNode:!0}),jr.lookAhead=new jr({perNode:!0}),jr.mounted=new jr({perNode:!0});class Dr{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const Gr=Object.create(null);class Lr{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):Gr,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new Lr(e.name||"",t,e.id,i);if(e.props)for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(jr.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(jr.group),n=-1;n<(i?i.length:0);n++){let r=t[n<0?e.name:i[n]];if(r)return r}}}}Lr.none=new Lr("",Object.create(null),0,8);class Br{constructor(e){this.types=e;for(let t=0;t=n&&(o.type.isAnonymous||!1!==t(o))){if(o.firstChild())continue;e=!0}for(;e&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:po(Lr.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,i)=>new Jr(this.type,e,t,i,this.propValues)),e.makeTree||((e,t,i)=>new Jr(Lr.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:n,maxBufferLength:r=Mr,reused:o=[],minRepeatType:s=n.types.length}=e,a=Array.isArray(i)?new eo(i,i.length):i,l=n.types,O=0,c=0;function u(e,t,i,p,m){let{id:g,start:$,end:b,size:Q}=a,y=c;for(;Q<0;){if(a.next(),-1==Q){let t=o[g];return i.push(t),void p.push($-e)}if(-3==Q)return void(O=g);if(-4==Q)return void(c=g);throw new RangeError(`Unrecognized record size: ${Q}`)}let _,P,w=l[g],v=$-e;if(b-$<=r&&(P=function(e,t){let i=a.fork(),n=0,o=0,l=0,O=i.end-r,c={size:0,start:0,skip:0};e:for(let r=i.pos-e;i.pos>r;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=o,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-e;if(e<0||a=s?4:0,d=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break e;u+=4}else i.id>=s&&(u+=4);i.next()}o=d,n+=e,l+=u}return(t<0||n==e)&&(c.size=n,c.start=o,c.skip=l),c.size>4?c:void 0}(a.pos-t,m))){let t=new Uint16Array(P.size-P.skip),i=a.pos-P.size,r=t.length;for(;a.pos>i;)r=f(P.start,t,r);_=new to(t,b-P.start,n),v=P.start-e}else{let e=a.pos-Q;a.next();let t=[],i=[],n=g>=s?g:-1,o=0,l=b;for(;a.pos>e;)n>=0&&a.id==n&&a.size>=0?(a.end<=l-r&&(d(t,i,$,o,a.end,l,n,y),o=t.length,l=a.end),a.next()):u($,e,t,i,n);if(n>=0&&o>0&&o-1&&o>0){let e=function(e){return(t,i,n)=>{let r,o,s=0,a=t.length-1;if(a>=0&&(r=t[a])instanceof Jr){if(!a&&r.type==e&&r.length==n)return r;(o=r.prop(jr.lookAhead))&&(s=i[a]+r.length+o)}return h(e,t,i,n,s)}}(w);_=po(w,t,i,0,t.length,0,b-$,e,e)}else _=h(w,t,i,b-$,y-b)}i.push(_),p.push(v)}function d(e,t,i,r,o,s,a,l){let O=[],c=[];for(;e.length>r;)O.push(e.pop()),c.push(t.pop()+i-o);e.push(h(n.types[a],O,c,s-o,l-s)),t.push(o-i)}function h(e,t,i,n,r=0,o){if(O){let e=[jr.contextHash,O];o=o?[e].concat(o):[e]}if(r>25){let e=[jr.lookAhead,r];o=o?[e].concat(o):[e]}return new Jr(e,t,i,n,o)}function f(e,t,i){let{id:n,start:r,end:o,size:l}=a;if(a.next(),l>=0&&n4){let n=a.pos-(l-4);for(;a.pos>n;)i=f(e,t,i)}t[--i]=s,t[--i]=o-e,t[--i]=r-e,t[--i]=n}else-3==l?O=n:-4==l&&(c=n);return i}let p=[],m=[];for(;a.pos>0;)u(e.start||0,e.bufferStart||0,p,m,-1);let g=null!==(t=e.length)&&void 0!==t?t:p.length?m[0]+p[0].length:0;return new Jr(l[e.topID],p.reverse(),m.reverse(),g)}(e)}}Jr.empty=new Jr(Lr.none,[],[],0);class eo{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new eo(this.buffer,this.index)}}class to{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Lr.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return s}slice(e,t,i){let n=this.buffer,r=new Uint16Array(t-e),o=0;for(let s=e,a=0;s=t&&it;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function no(e,t){let i=e.childBefore(t);for(;i;){let t=i.lastChild;if(!t||t.to!=i.to)break;t.type.isError&&t.from==t.to?(e=i,i=t.prevSibling):i=t}return e}function ro(e,t,i,n){for(var r;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to0?s.length:-1;e!=l;e+=t){let l=s[e],O=a[e]+o.from;if(io(n,i,O,O+l.length))if(l instanceof to){if(r&Hr.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,i-O,n);if(s>-1)return new Oo(new lo(o,l,e,O),null,s)}else if(r&Hr.IncludeAnonymous||!l.type.isAnonymous||uo(l)){let s;if(!(r&Hr.IgnoreMounts)&&l.props&&(s=l.prop(jr.mounted))&&!s.overlay)return new oo(s.tree,O,e,o);let a=new oo(l,O,e,o);return r&Hr.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,i,n)}}if(r&Hr.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let n;if(!(i&Hr.IgnoreOverlays)&&(n=this._tree.prop(jr.mounted))&&n.overlay){let i=e-this.from;for(let{from:e,to:r}of n.overlay)if((t>0?e<=i:e=i:r>i))return new oo(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new co(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return ro(this,e,t,!1)}resolveInner(e,t=0){return ro(this,e,t,!0)}enterUnfinishedNodesBefore(e){return no(this,e)}getChild(e,t=null,i=null){let n=so(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return so(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return ao(this,e)}}function so(e,t,i,n){let r=e.cursor(),o=[];if(!r.firstChild())return o;if(null!=i)for(;!r.type.is(i);)if(!r.nextSibling())return o;for(;;){if(null!=n&&r.type.is(n))return o;if(r.type.is(t)&&o.push(r.node),!r.nextSibling())return null==n?o:[]}}function ao(e,t,i=t.length-1){for(let n=e.parent;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class lo{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class Oo{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new Oo(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&Hr.ExcludeBuffers)return null;let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new Oo(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Oo(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Oo(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new co(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,r=i.buffer[this.index+3];if(r>n){let o=i.buffer[this.index+1];e.push(i.slice(n,r,o)),t.push(0)}return new Jr(this.type,e,t,this.to-this.from)}resolve(e,t=0){return ro(this,e,t,!1)}resolveInner(e,t=0){return ro(this,e,t,!0)}enterUnfinishedNodesBefore(e){return no(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let n=so(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return so(this,e,t,i)}get node(){return this}matchContext(e){return ao(this,e)}}class co{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof oo)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof oo?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?!(i&Hr.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Hr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Hr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let e=i<0?0:this.stack[i]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(e)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index-1)for(let n=t+e,r=e<0?-1:i._tree.children.length;n!=r;n+=e){let e=i._tree.children[n];if(this.mode&Hr.IncludeAnonymous||e instanceof to||!e.type.isAnonymous||uo(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==n){if(n==this.index)return o;t=o,i=r+1;break e}n=this.stack[--r]}for(let e=i;e=0;r--){if(r<0)return ao(this.node,e,n);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}}function uo(e){return e.children.some((e=>e instanceof to||!e.type.isAnonymous||uo(e)))}const ho=new WeakMap;function fo(e,t){if(!e.isAnonymous||t instanceof to||t.type!=e)return 1;let i=ho.get(t);if(null==i){i=1;for(let n of t.children){if(n.type!=e||!(n instanceof Jr)){i=1;break}i+=fo(e,n)}ho.set(t,i)}return i}function po(e,t,i,n,r,o,s,a,l){let O=0;for(let i=n;i=c)break;f+=t}if(O==r+1){if(f>c){let e=i[r];t(e.children,e.positions,0,e.children.length,n[r]+a);continue}u.push(i[r])}else{let t=n[O-1]+i[O-1].length-h;u.push(po(e,i,n,r,O,h,t,null,l))}d.push(h+a-o)}}(t,i,n,r,0),(a||l)(u,d,s)}class mo{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof Oo?this.setBuffer(e.context.buffer,e.index,t):e instanceof oo&&this.map.set(e.tree,t)}get(e){return e instanceof Oo?this.getBuffer(e.context.buffer,e.index):e instanceof oo?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class go{constructor(e,t,i,n,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=(r?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],i=!1){let n=[new go(0,e.length,e,0,!1,i)];for(let i of t)i.to>e.length&&n.push(i);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],r=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let O=s=i)for(;o&&o.from=t.from||c<=t.to||l){let e=Math.max(t.from,a)-l,i=Math.min(t.to,c)-l;t=e>=i?null:new go(e,i,t.tree,t.offset+l,s>0,!!O)}if(t&&n.push(t),o.to>c)break;o=rnew Ur(e.from,e.to))):[new Ur(0,0)]:[new Ur(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class bo{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Qo(e){return(t,i,n,r)=>new wo(t,e,i,n,r)}class yo{constructor(e,t,i,n,r){this.parser=e,this.parse=t,this.overlay=i,this.target=n,this.ranges=r}}class _o{constructor(e,t,i,n,r,o,s){this.parser=e,this.predicate=t,this.mounts=i,this.index=n,this.start=r,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const Po=new jr({perNode:!0});class wo{constructor(e,t,i,n,r){this.nest=t,this.input=i,this.fragments=n,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new Jr(e.type,e.children,e.positions,e.length,e.propValues.concat([[Po,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[jr.mounted.id]=new Dr(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;te.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay));if(e)for(let i of e.mount.overlay){let r=i.from+e.pos,o=i.to+e.pos;r>=n.from&&o<=n.to&&!t.ranges.some((e=>e.fromr))&&t.ranges.push({from:r,to:o})}}a=!1}else if(i&&(o=vo(i.ranges,n.from,n.to)))a=2!=o;else if(!n.type.isAnonymous&&n.fromnew Ur(e.from-n.from,e.to-n.from))):null,n.tree,e)),r.overlay?e.length&&(i={ranges:e,depth:0,prev:i}):a=!1}}else t&&(s=t.predicate(n))&&(!0===s&&(s=new Ur(n.from,n.to)),s.fromnew Ur(e.from-t.start,e.to-t.start))),t.target,e)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function vo(e,t,i){for(let n of e){if(n.from>=i)break;if(n.to>t)return n.from<=t&&n.to>=i?2:1}return 0}function Xo(e,t,i,n,r,o){if(t=t.to);n++);let s=r.children[n],a=s.buffer;r.children[n]=function e(i,n,r,l,O){let c=i;for(;a[c+2]+o<=t.from;)c=a[c+3];let u=[],d=[];Xo(s,i,c,u,d,l);let h=a[c+1],f=a[c+2],p=h+o==t.from&&f+o==t.to&&a[c]==t.type.id;return u.push(p?t.toTree():e(c+4,a[c+3],s.set.types[a[c]],h,f-h)),d.push(h-l),Xo(s,a[c+3],n,u,d,l),new Jr(r,u,d,O)}(0,a.length,Lr.none,0,s.length);for(let n=0;n<=i;n++)e.childAfter(t.from)}class So{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Hr.IncludeAnonymous|Hr.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,Hr.IgnoreOverlays|Hr.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof Jr))break;t=t.children[0]}return!1}}let ko=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=null!==(t=i.tree.prop(Po))&&void 0!==t?t:i.to,this.inner=new So(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(Po))&&void 0!==e?e:t.to,this.inner=new So(t.tree,-t.offset)}}findMounts(e,t){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=null===(i=e.tree)||void 0===i?void 0:i.prop(jr.mounted);if(r&&r.parser==t)for(let t=this.fragI;t=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}};function To(e,t){let i=null,n=t;for(let r=1,o=0;r=a)break;e.to<=s||(i||(n=i=t.slice()),e.froma&&i.splice(o+1,0,new Ur(a,e.to))):e.to>a?i[o--]=new Ur(a,e.to):i.splice(o--,1))}}return n}function Ro(e,t,i,n){let r=0,o=0,s=!1,a=!1,l=-1e9,O=[];for(;;){let c=r==e.length?1e9:s?e[r].to:e[r].from,u=o==t.length?1e9:a?t[o].to:t[o].from;if(s!=a){let e=Math.max(l,i),t=Math.min(c,u,n);enew Ur(e.from+n,e.to+n))),a,l);for(let t=0,n=a;;t++){let a=t==s.length,O=a?l:s[t].from;if(O>n&&i.push(new go(n,O,r.tree,-e,o.from>=n||o.openStart,o.to<=O||o.openEnd)),a)break;n=s[t].to}}else i.push(new go(a,l,r.tree,-e,o.from>=e||o.openStart,o.to<=s||o.openEnd))}return i}class Ao{constructor(e,t,i,n,r,o,s,a,l,O=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=r,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=O,this.parent=c}toString(){return`[${this.stack.filter(((e,t)=>t%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new Ao(e,[],t,i,i,0,[],0,n?new No(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,i=65535&e,{parser:n}=this.p,r=n.dynamicPrecedence(i);if(r&&(this.score+=r),0==t)return this.pushState(n.getGoto(this.state,i,!0),this.reducePos),io;)this.stack.pop();this.reduceContext(i,s)}storeNode(e,t,i,n=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==i)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=i)}}if(r&&this.pos!=i){let r=this.buffer.length;if(r>0&&0!=this.buffer[r-4])for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,n>4&&(n-=4);this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=i,this.buffer[r+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i){let n=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let r=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,i){65536&e?this.reduce(e):this.shift(e,t,i)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new Ao(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new qo(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==(65536&i))return!0;if(0==i)return!1;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n,r=0;r1&t&&e==n))||i.push(t[e],n)}t=i}let i=[];for(let e=0;e>19,n=65535&e,r=this.stack.length-3*i;if(r<0||t.getGoto(this.stack[r],n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class No{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}var Co;!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Co||(Co={}));class qo{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,i=e>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class Eo{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Eo(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new Eo(this.stack,this.pos,this.index)}}class Vo{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Yo=new Vo;class Zo{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Yo,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];r+=e.from-i.to,i=e}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,i,n=this.chunkOff+e;if(n>=0&&n=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Yo,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class zo{constructor(e,t){this.data=e,this.id=t}token(e,t){!function(e,t,i,n){let r=0,o=1<0){let i=e[n];if(a.allows(i)&&(-1==t.token.value||t.token.value==i||s.overrides(i,t.token.value))){t.acceptToken(i);break}}let n=t.next,l=0,O=e[r+2];if(!(t.next<0&&O>l&&65535==e[i+3*O-3]&&65535==e[i+3*O-3])){for(;l>1,s=i+o+(o<<1),a=e[s],c=e[s+1]||65536;if(n=c)){r=e[s+2],t.advance();continue e}l=o+1}}break}r=e[i+3*O-1]}}(this.data,e,t,this.id)}}zo.prototype.contextual=zo.prototype.fallback=zo.prototype.extend=!1;class Mo{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Io(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,r=0;n=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,i=!0),o+=r,i)break;o*=46}i?i[r++]=o:i=new t(o)}return i}const Uo=void 0!==Fi&&Fi.env&&/\bparse\b/.test(void 0);let jo=null;var Do;function Go(e,t,i){let n=e.cursor(Hr.IncludeAnonymous);for(n.moveTo(t);;)if(!(i<0?n.childBefore(t):n.childAfter(t)))for(;;){if((i<0?n.tot)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:e.length}}!function(e){e[e.Margin=25]="Margin"}(Do||(Do={}));class Lo{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new Vo))}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:r}=n,o=n.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let n=0;nO.end+25&&(a=Math.max(O.lookAhead,a)),0!=O.value)){let n=t;if(O.extended>-1&&(t=this.addActions(e,O.extended,O.end,t)),t=this.addActions(e,O.value,O.end,t),!l.extend&&(i=O,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||(i=new Vo,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Vo,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(r>>1)){0==(1&r)?e.value=r>>1:e.extended=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t4*e.bufferLength?new class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Go(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Go(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof Jr){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,r=this.stacks=[];for(let o=0;on)r.push(s);else{if(this.advanceStack(s,r,i))continue;{e||(e=[],t=[]),e.push(s);let i=this.tokens.getMainToken(s);t.push(i.value,i.end)}}break}}if(!r.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,r);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort(((e,t)=>t.score-e.score));r.length>e;)r.pop();r.some((e=>e.reducePos>n))&&this.recovering--}else if(r.length>1)e:for(let e=0;e500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){r.splice(e--,1);continue e}r.splice(i--,1)}}}this.minStackPos=r[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let s=this.fragments.nodeAt(n);s;){let n=this.parser.nodeSet.types[s.type.id]==s.type?r.getGoto(e.state,s.type.id):-1;if(n>-1&&s.length&&(!t||(s.prop(jr.contextHash)||0)==i))return e.useNode(s,n),Uo&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(s.type.id)})`),!0;if(!(s instanceof Jr)||0==s.children.length||s.positions[0]>0)break;let a=s.children[0];if(!(a instanceof Jr&&0==s.positions[0]))break;s=a}}let s=r.stateSlot(e.state,4);if(s>0)return e.reduce(s),Uo&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(65535&s)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let s=0;sn?t.push(d):i.push(d)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Fo(e,t),!0}}runRecovery(e,t,i){let n=null,r=!1;for(let o=0;o ":"";if(s.deadEnd){if(r)continue;if(r=!0,s.restart(),Uo&&console.log(O+this.stackID(s)+" (restarted)"),this.advanceFully(s,i))continue}let c=s.split(),u=O;for(let e=0;c.forceReduce()&&e<10&&(Uo&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));e++)Uo&&(u=this.stackID(c)+" -> ");for(let e of s.recoverByInsert(a))Uo&&console.log(O+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,i);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),Uo&&console.log(O+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),Fo(s,i)):(!n||n.scoree;class es{constructor(e){this.start=e.start,this.shift=e.shift||Jo,this.reduce=e.reduce||Jo,this.reuse=e.reuse||Jo,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class ts extends $o{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let i=0;ie.topRules[t][1])),n=[];for(let e=0;e=0)r(n,e,t[i++]);else{let o=t[i+-n];for(let s=-n;s>0;s--)r(t[i++],e,o);i++}}}this.nodeSet=new Br(t.map(((t,r)=>Lr.define({name:r>=this.minRepeatTerm?void 0:t,id:r,props:n[r],top:i.indexOf(r)>-1,error:0==r,skipped:e.skippedNodes&&e.skippedNodes.indexOf(r)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Mr;let o=Io(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new zo(o,e):e)),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new Ko(this,e,t,i);for(let r of this.wrappers)n=r(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let r=n[t+1];;){let t=n[r++],o=1&t,s=n[r++];if(o&&i)return s;for(let i=r+(t>>1);r0}validAction(e,t){if(t==this.stateSlot(e,4))return!0;for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])return!1;i=is(this.data,i+2)}if(t==is(this.data,i+1))return!0}}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=is(this.data,i+2)}if(0==(1&this.data[i+2])){let e=this.data[i+1];t.some(((t,i)=>1&i&&t==e))||t.push(this.data[i],e)}}return t}overrides(e,t){let i=ns(this.data,this.tokenPrecTable,t);return i<0||ns(this.data,this.tokenPrecTable,e){let i=e.tokenizers.find((e=>e.from==t));return i?i.to:t}))),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map(((i,n)=>{let r=e.specializers.find((e=>e.from==i.external));if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[n]=rs(o),o}))),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map((()=>!1));if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;ee.external(i,n)<<1|t}return e.get}const os=".".codePointAt(0),ss="\\".codePointAt(0),as="`".codePointAt(0),ls="$".codePointAt(0),Os="#".codePointAt(0),cs="=".codePointAt(0),us="(".codePointAt(0),ds="{".codePointAt(0),hs="[".codePointAt(0),fs=":".codePointAt(0),ps='"'.codePointAt(0),ms="'".codePointAt(0),gs="\n".codePointAt(0),$s="A".codePointAt(0),bs="Z".codePointAt(0),Qs="a".codePointAt(0),ys="z".codePointAt(0),_s="0".codePointAt(0),Ps="9".codePointAt(0),ws="_".codePointAt(0),vs="!".codePointAt(0),Xs=/^\p{Lu}/u,xs=/^\p{Ll}/u,Ss=/^\p{Lt}/u,ks=/^\p{Lm}/u,Ts=/^\p{Lo}/u,Rs=/^\p{Me}/u,Ws=/^\p{Mn}/u,As=/^\p{Mc}/u,Ns=/^\p{Nd}/u,Cs=/^\p{Nl}/u,qs=/^\p{No}/u,Es=/^\p{Pc}/u,Vs=/^\p{Sc}/u,Ys=/^\p{Sk}/u,Zs=/^\p{So}/u,zs=/^\p{Emoji}/u,Ms=new Mo(((e,t)=>{e.peek(0)===gs&&t.canShift(254)&&e.acceptToken(254,1)}));function Is(e,t){return Xs.test(e)||xs.test(e)||Ss.test(e)||ks.test(e)||Ts.test(e)||Cs.test(e)||Vs.test(e)||zs.test(e)||Zs.test(e)&&!(t>=8592&&t<=8703)&&65532!=t&&65533!=t&&9023!=t&&166!=t||t>=8512&&t<=10780&&(t>=8512&&t<=8516||8767==t||8894==t||8895==t||8868==t||8869==t||t>=8706&&t<=8755&&(8706==t||8709==t||8710==t||8711==t||8718==t||8719==t||8720==t||8721==t||8734==t||8735==t||t>=8747)||t>=8896&&t<=8899||t>=9720&&t<=9727||t>=9839&&(9839==t||10200==t||10201==t||t>=10176&&t<=10177||t>=10672&&t<=10676||t>=10752&&t<=10758||t>=10761&&t<=10774||10779==t||10780==t))||t>=120513&&(120513==t||120539==t||120571==t||120597==t||120629==t||120655==t||120687==t||120713==t||120745==t||120771==t)||t>=8314&&t<=8318||t>=8330&&t<=8334||t>=8736&&t<=8738||t>=10651&&t<=10671||8472==t||8494==t||t>=12443&&t<=12444||t>=120782&&t<=120801}function Us(e,t){let i=e.peek(t);if(i>=$s&&i<=bs||i>=Qs&&i<=ys||i==ws)return 1;if(i<161||i>1114111)return 0;{let n=js(e,t);return Is(n,i)?n.length:0}}function js(e,t){let i=1,n=e.peek(t),r=String.fromCodePoint(n);for(;;){let o=e.peek(t+i);if(!(55296<=n&&n<=56319&&56320<=o&&o<=57343))break;r+=String.fromCodePoint(o),n=o,i+=1}return r}const Ds=e=>new Mo(((t,i)=>{let n=!0,r=0,o=1;for(;;){let e=t.peek(r);if(-1===e)break;if(n){if(n=!1,o=Us(t,r),0===o)break}else if(e>=$s&&e<=bs||e>=Qs&&e<=ys||e>=_s&&e<=Ps||e==ws||e==vs);else{if(e<161||e>1114111)break;{let i=js(t,r);if(o=i.length,Is(i,e));else if(!(Ws.test(i)||As.test(i)||Ns.test(i)||Es.test(i)||Ys.test(i)||Rs.test(i)||qs.test(i)||e>=8242&&e<=8247||8279==e))break}}r+=o,o=1}0!==r&&t.acceptToken(e,r)})),Gs=Ds(1),Ls=Ds(255),Bs=(e,t)=>{let i=e.peek(t),n=e.peek(t+1);return i===ls&&(0!==Us(e,t+1)||n==us)},Ks=({till:e,term:t})=>new Mo(((i,n)=>{let r=0,o=!1;for(;;){let n=i.peek(r);if(-1===n)break;if(o)o=!1;else if(n===ss)o=!0;else if(Bs(i,r)||e(i,r))return void(r>0&&i.acceptToken(t,r));r+=1}})),Fs=({till:e,term:t})=>new Mo(((i,n)=>{let r=0,o=!1;for(;;){let n=i.peek(r);if(-1===n)break;if(o)o=!1;else if(n===ss)o=!0;else if(e(i,r))return void(r>0&&i.acceptToken(t,r));r+=1}})),Hs=(e,t)=>e.peek(t)===ps&&e.peek(t+1)===ps&&e.peek(t+2)===ps,Js=(e,t)=>e.peek(t)===ps,ea=(e,t)=>e.peek(t)===as,ta=Ks({term:256,till:Hs}),ia=Ks({term:257,till:Js}),na=Ks({term:258,till:ea}),ra=Fs({term:259,till:Hs}),oa=Fs({term:260,till:Js}),sa=Fs({term:261,till:ea}),aa=(e,t)=>e.peek(t)===Os&&e.peek(t+1)===cs,la=(e,t)=>e.peek(t)===cs&&e.peek(t+1)===Os,Oa=new Mo(((e,t)=>{if(aa(e,0)){let t=1,i=2;for(;-1!==e.peek(i);)if(la(e,i)){if(t-=1,0===t)return void e.acceptToken(2,i+2);i+=2}else aa(e,i)?(t+=1,i+=2):i+=1;e.acceptToken(2,i)}})),ca=(e,t)=>{let i=e.peek(t);return i>=9&&i<14||i>=32&&i<33||i>=133&&i<134||i>=160&&i<161||i>=5760&&i<5761||i>=8192&&i<8203||i>=8232&&i<8234||i>=8239&&i<8240||i>=8287&&i<8288||i>=12288&&i<12289},ua=new Mo(((e,t)=>{e.peek(0)!==us||ca(e,-1)||!t.canShift(245)?e.peek(0)!==fs||ca(e,-1)||!t.canShift(246)?e.peek(0)!==ds||ca(e,-1)||!t.canShift(247)?e.peek(0)!==hs||ca(e,-1)||!t.canShift(248)?e.peek(0)!==ms||ca(e,-1)||!t.canShift(249)?e.peek(0)!==ps||ca(e,-1)||!t.canShift(250)?e.peek(0)!==as||ca(e,-1)||!t.canShift(251)?e.peek(0)!==os||ca(e,-1)||!t.canShift(252)?ca(e,-1)||ca(e,0)||-1===e.peek(0)||!t.canShift(253)||e.acceptToken(253,0):e.acceptToken(252,0):e.acceptToken(251,0):e.acceptToken(250,0):e.acceptToken(249,0):e.acceptToken(248,0):e.acceptToken(247,0):e.acceptToken(246,0):e.acceptToken(245,0)}),{extend:!0}),da={__proto__:null,if:14,elseif:20,else:24,end:26,try:30,catch:34,finally:40,for:44,primitive:74,type:76,abstract:84,mutable:90,struct:92,module:98,baremodule:104,macro:110,in:132,isa:134,function:152,do:164,where:170,true:204,false:204,begin:264,while:320,let:326,const:334,global:342,local:346,quote:350,break:354,continue:358,return:362,using:366,import:368,as:376,export:384},ha=ts.deserialize({version:14,states:"%<^Q$tQNSOOOOQj'#IP'#IPOOQj'#Gt'#GtO${QNSO'#IOO*cQNTO'#DoO*mQNTO'#DoO/eQNTO'#IRO0OQMyO'#IlOOQk'#Il'#IlO0TQNTO'#IlOOQk'#Do'#DoO:sQNTO'#DoO>{QN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OAPAQARASATAUAVAWAXAYAZA[A]A^A_A`AaAbAcAdAeAfAgAhAiAjAkAlAmAnAoApAqArAsAtAuBxByBzB{B|B}CdCeCfCgChCiCjDUDVDWDXQ.Q+hR0^.RS+t({.OR.`+pQ+o({S._+p.O^0b.X0d0k1u1y2S2dU0g.Z0i1wR1X/bS#P_#QS#T`#UT#Wa#XT+u({/bW,g)T+l-k0UR.l+xR.y,RR-Y*Sg$Yw ArgumentList ListCompherension ForClause IfClause Parameters FunctionDefinition function Definition TypedExpression CallExpression BroadcastDot DoClause do DoClauseArguments CallExpression where TypeParameters MacroExpression MacroIdentifier MacroName Operator MacroFieldExpression FieldExpression SubscriptExpression AssignmentExpression Symbol SymbolName CallExpression BroadcastDot ArgumentList AssignmentExpression Parameters BooleanLiteral Character String $ ( ) TripleString CommandString PrefixedString Prefix FieldEpxression String TripleString CommandString ParenthesizedExpression TupleExpression ArrayExpression ArrayComprehensionExpression ForClause ForBinding AssignOperator = ∈ IfClause MatrixExpression MatrixRow GeneratorExpression TypedExpression ParameterizedIdentifier TypeArgumentList begin MacroFieldName MacroArgumentList AssignmentExpression BareTupleExpression UnaryExpression Operator BinaryExpression TernaryExpression FunctionExpression AssignmentExpression CoefficientExpression TransposeExpression Coefficient CallExpression FieldExpression ParenthesizedExpression SpreadExpression AssignmentExpression ArrayExpression ArrayComprehensionExpression MatrixExpression MatrixRow GeneratorExpression TypedExpression ParameterizedIdentifier AssignOperator WhileStatement while WhileBinding LetStatement let LetBinding VariableDeclaration ConstStatement const AssignmentExpression BareTupleExpression GlobalStatement global LocalStatement local QuoteStatement quote BreakStatement break ContinueStatement continue ReturnStatement return ImportStatement using import Import ScopedIdentifier RenamedIdentifier as SelectedImport RenamedImport ExportStatement export CompoundExpression MacroExpression MacroFieldExpression MacroFieldName MacroArgumentList UnaryExpression Operator BinaryExpression TernaryExpression FunctionExpression AssignmentExpression CoefficientExpression TransposeExpression SpreadExpression FunctionAssignmentExpression",maxTerm:331,nodeProps:[["closedBy",-2,5,8,"end else elseif",-15,11,19,21,36,41,44,48,51,54,75,81,159,162,174,193,"end",14,"end catch finally",16,"end finally",-9,34,58,93,118,119,126,151,152,153,"]",-2,62,131,"}",-7,63,70,99,116,128,148,155,")"],["group",-35,7,10,12,13,15,17,20,22,37,38,42,45,46,49,52,55,66,67,76,82,85,132,160,163,167,171,173,175,177,179,181,183,184,188,192,"keyword",-9,27,28,65,90,105,106,107,123,124,"operator"]],skippedNodes:[0,2,3],repeatNodeCount:36,tokenData:"#%S~R.[XYHwYZHwpqHwqrJursK[stKotuLWuvL]vwLjwxLzxyNWyzN]z{L]{|Nb|}Nj}!ONo!O!P! _!P!Q!He!Q!R!Me!R![!N_![!]#!c!]!^#!s!^!_#!x!_!`##b!`!a!Js!b!c##o!}#O##t#O#P!Kc#P#Q##y#Q#R!Kh#S#T#$O#o#p#$T#p#q#$Y#q#r#$v#r#s!Lx$r$s!KR$w$x!L_%o%p!Kc&a&bL]%!]%!^!Kc%#t%#u! T%#u%#v!MP%#v%#w! T%#w%#x!MP%#x%#y! T%$O%$P! T%$P%$Q! T%$Q%$R! T%$R%$S! T%$S%$T! T%$U%$V! T%$W%$X! T%$X%$Y! T%$Y%$Z! T%$[%$]! T%$_%$`! T%$`%$a! T%$a%$b! T%$b%$c! T%$d%$e! T%$r%$s! T%$s%$t! T%$v%$w! T%$w%$x! T%$z%${! T%$|%$}! T%$}%%O! T%%P%%Q! T%%R%%S! T%%S%%T! T%%T%%U! T%%U%%V! T%%V%%W! T%%W%%X! T%%Y%%Z! T%%[%%]! T%%b%%c! T%%c%%d! T%%d%%e! T%%e%%f! T%%h%%i! T%%j%%k! T%%|%%}! T%%}%&O!MP%&O%&P! T%&P%&Q! T%&Q%&R! T%&R%&S! T%&S%&T! T%&T%&U! T%&U%&V! T%&V%&W! T%&W%&X! T%&X%&Y! T%&b%&c#${%&c%&dKV%&d%&eKV%&e%&fKV%&f%&gKV%&g%&hKV%&m%&n!L_%&n%&o!L_%&q%&r!Kc%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_~!MPO&z~'_~~!MUO'd~~!M]O'eP'a~~!MbP'a~!_!`Le~!MjVx~!O!P!NP!Q![!N_!g!h!IX!z!{!Ns#R#S!N_#X#Y!IX#l#m!Ns~!NURx~!Q![!Hv!g!h!IX#X#Y!IX~!NdTx~!O!P!NP!Q![!N_!g!h!IX#R#S!N_#X#Y!IX~!NvR!Q![# P!c!i# P#T#Z# P~# UWx~!Q![# P!c!g# P!g!h# n!h!i# P#R#S# P#T#X# P#X#Y# n#Y#Z# P~# sYx~{|!Ie}!O!Ie!Q![# P!c!g# P!g!h# n!h!i# P#R#S# P#T#X# P#X#Y# n#Y#Z# P~#!hQ'R~![!]#!n!_!`Le~#!sO&|~~#!xO&t~~#!}S'eP![!]##Z!^!_!JU!_!`KV#p#q!J^~##bO&}~'eP~##iQ&{~&z~!_!`J}!`!a!Jn~##tO'n~~##yO'S~~#$OO'X~~#$TO'v~~#$YO'Y~~#$_S'b~{|!LR!_!`!Ld!`!a!Lj#p#q#$k~#$pQ'|~!_!`!Ld#p#q!L_~#${O'Z~R#%SO'yQ'eP",tokenizers:[ua,Ms,Ls,Gs,Oa,ta,ia,na,ra,oa,sa,0,1],topRules:{SourceFile:[0,4]},dynamicPrecedences:{30:2,33:2,95:10,143:5,189:1,204:5,207:2,302:1,304:1,305:10,308:1,318:1,326:1,328:10,329:10,331:1},specialized:[{term:1,get:e=>da[e]||-1}],tokenPrec:51925}),fa="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),pa="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),ma="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class ga{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function r(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),O=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let i in t){let s=t[i];if(/&/.test(i))r(i.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");r(n(i),s,a,O)}else null!=s&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+s+";")}(a.length||O)&&o.push((!i||l||s?e:e.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)r(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=ma[fa]||1;return ma[fa]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[pa]||new ba(e)).mount(Array.isArray(t)?t:[t])}}let $a=null;class ba{constructor(e){if(!e.head&&e.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if($a)return e.adoptedStyleSheets=[$a.sheet].concat(e.adoptedStyleSheets),e[pa]=$a;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),$a=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[pa]=this}mount(e){let t=this.sheet,i=0,n=0;for(let r=0;r-1&&(this.modules.splice(s,1),n--,s=-1),-1==s){if(this.modules.splice(n++,0,o),t)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_a="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Pa="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),wa="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),va=Pa||_a&&+_a[1]<57,Xa=0;Xa<10;Xa++)Qa[48+Xa]=Qa[96+Xa]=String(Xa);for(Xa=1;Xa<=24;Xa++)Qa[Xa+111]="F"+Xa;for(Xa=65;Xa<=90;Xa++)Qa[Xa]=String.fromCharCode(Xa+32),ya[Xa]=String.fromCharCode(Xa);for(var xa in Qa)ya.hasOwnProperty(xa)||(ya[xa]=Qa[xa]);function Sa(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function ka(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Ta(e,t){if(!t.anchorNode)return!1;try{return ka(e,t.anchorNode)}catch(e){return!1}}function Ra(e){return 3==e.nodeType?Ma(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Wa(e,t,i,n){return!!i&&(Na(e,t,i,n,-1)||Na(e,t,i,n,1))}function Aa(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Na(e,t,i,n,r){for(;;){if(e==i&&t==n)return!0;if(t==(r<0?0:Ca(e))){if("DIV"==e.nodeName)return!1;let i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=Aa(e)+(r<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?Ca(e):0}}}function Ca(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function qa(e,t){let i=t?e.left:e.right;return{left:i,right:i,top:e.top,bottom:e.bottom}}function Ea(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class Va{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}}let Ya,Za=null;function za(e){if(e.setActive)return e.setActive();if(Za)return e.focus(Za);let t=[];for(let i=e;i&&(t.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(e.focus(null==Za?{get preventScroll(){return Za={preventScroll:!0},!0}}:void 0),!Za){Za=!1;for(let e=0;et)return i.domBoundsAround(e,t,l);if(c>=e&&-1==n&&(n=a,r=l),l>t&&i.dom.parentNode==this.dom){o=a,s=O;break}O=c,l=c+i.breakAfter}return{from:r,to:s<0?i+this.length:s,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Da){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ka(e,t,i,n,r,o,s,a,l){let{children:O}=e,c=O.length?O[t]:null,u=o.length?o[o.length-1]:null,d=u?u.breakAfter:s;if(!(t==n&&c&&!s&&!d&&o.length<2&&c.merge(i,r,o.length?u:null,0==i,a,l))){if(n0&&(!s&&o.length&&c.merge(i,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(i2);var Ol={mac:ll||/Mac/.test(Ha.platform),windows:/Win/.test(Ha.platform),linux:/Linux|X11/.test(Ha.platform),ie:nl,ie_version:tl?Ja.documentMode||6:il?+il[1]:el?+el[1]:0,gecko:rl,gecko_version:rl?+(/Firefox\/(\d+)/.exec(Ha.userAgent)||[0,0])[1]:0,chrome:!!ol,chrome_version:ol?+ol[1]:0,ios:ll,android:/Android\b/.test(Ha.userAgent),webkit:sl,safari:al,webkit_version:sl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Ja.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class cl extends Ga{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,i){return(!i||i instanceof cl&&!(this.length-(t-e)+i.length>256))&&(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new cl(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new ja(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return dl(this.dom,e,t)}}class ul extends Ga{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let e of t)e.setParent(this)}setAttrs(e){if(Ua(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,n,r,o){return!(i&&(!(i instanceof ul&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(n=r),i=s,r++}let o=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new ul(this.mark,t,o)}domAtPos(e){return Ql(this,e)}coordsAt(e,t){return _l(this,e,t)}}function dl(e,t,i){let n=e.nodeValue.length;t>n&&(t=n);let r=t,o=t,s=0;0==t&&i<0||t==n&&i>=0?Ol.chrome||Ol.gecko||(t?(r--,s=1):o=0)?0:a.length-1];return Ol.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(e=>e.width))||l),s?qa(l,s<0):l||null}class hl extends Ga{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||hl)(e,t,i)}split(e){let t=hl.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,n,r,o){return!(i&&(!(i instanceof hl&&this.widget.compare(i.widget))||e>0&&r<=0||t0)?ja.before(this.dom):ja.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),r=null;if(!n.length)return null;for(let t=e>0?n.length-1:0;r=n[t],!(e>0?0==t:t==n.length-1||r.top0?-1:1);return this.length?r:qa(r,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class fl extends hl{domAtPos(e){let{topView:t,text:i}=this.widget;return t?pl(e,0,t,i,this.length-t.length,((e,t)=>e.domAtPos(t)),((e,t)=>new ja(e,Math.min(t,e.nodeValue.length)))):new ja(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:n}=this.widget;return i?gl(e,t,i,n,this.length-i.length):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:n}=this.widget;return i?pl(e,t,i,n,this.length-i.length,((e,t,i)=>e.coordsAt(t,i)),((e,t,i)=>dl(e,t,i))):dl(n,e,t)}destroy(){var e;super.destroy(),null===(e=this.widget.topView)||void 0===e||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function pl(e,t,i,n,r,o,s){if(i instanceof ul){for(let a=i.dom.firstChild;a;a=a.nextSibling){let i=Ga.get(a);if(i){let l=ka(a,n),O=i.length+(l?r:0);if(e0?ja.before(this.dom):ja.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Hi.empty}get isHidden(){return!0}}function Ql(e,t){let i=e.dom,{children:n}=e,r=0;for(let e=0;re&&t0;e--){let t=n[e-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let e=r;e0&&t instanceof ul&&r.length&&(n=r[r.length-1])instanceof ul&&n.mark.eq(t.mark)?yl(n,t.children[0],i-1):(r.push(t),t.setParent(e)),e.length+=t.length}function _l(e,t,i){let n=null,r=-1,o=null,s=-1;!function e(t,a){for(let l=0,O=0;l=a&&(c.children.length?e(c,a-O):(!o||o.isHidden&&i>0)&&(u>a||O==u&&c.getSide()>0)?(o=c,s=a-O):(O0?3e8:-4e8:t>0?1e8:-1e8,new Rl(e,t,t,i,e.widget||null,!1)}static replace(e){let t,i,n=!!e.block;if(e.isBlockGap)t=-5e8,i=4e8;else{let{start:r,end:o}=Wl(e,n);t=(r?n?-3e8:-1:5e8)-1,i=1+(o?n?2e8:1:-6e8)}return new Rl(e,t,i,n,e.widget||null,!0)}static line(e){return new Tl(e)}static set(e,t=!1){return Sr.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Sl.none=Sr.empty;class kl extends Sl{constructor(e){let{start:t,end:i}=Wl(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof kl&&this.tagName==e.tagName&&this.class==e.class&&wl(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}kl.prototype.point=!1;class Tl extends Sl{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Tl&&this.spec.class==e.spec.class&&wl(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Tl.prototype.mapMode=yn.TrackBefore,Tl.prototype.point=!0;class Rl extends Sl{constructor(e,t,i,n,r,o){super(t,i,r,e),this.block=n,this.isReplace=o,this.mapMode=n?t<=0?yn.TrackBefore:yn.TrackAfter:yn.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof Rl&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Wl(e,t=!1){let{inclusiveStart:i,inclusiveEnd:n}=e;return null==i&&(i=e.inclusive),null==n&&(n=e.inclusive),{start:null!=i?i:t,end:null!=n?n:t}}function Al(e,t,i,n=0){let r=i.length-1;r>=0&&i[r]+n>=e?i[r]=Math.max(i[r],t):i.push(e,t)}Rl.prototype.point=!0;class Nl extends Ga{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,n,r,o){if(i){if(!(i instanceof Nl))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Fa(this,e,t,i?i.children:[],r,o),!0}split(e){let t=new Nl;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:i,off:n}=this.childPos(e);n&&(t.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let e=i;e0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){wl(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){yl(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Pl(t,this.attrs||{})),i&&(this.attrs=Pl({class:i},this.attrs||{}))}domAtPos(e){return Ql(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var i;this.dom?4&this.dirty&&(Ua(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(vl(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&Ga.get(n)instanceof ul;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=Ga.get(n))||void 0===i?void 0:i.isEditable)||Ol.ios&&this.children.some((e=>e instanceof cl))))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let i of this.children){if(!(i instanceof cl)||/[^ -~]/.test(i.text))return null;let n=Ra(i.dom);if(1!=n.length)return null;t+=n[0].width,e=n[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let i=_l(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=i.bottom-i.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(r instanceof Nl)return r;if(o>t)break}n=o+r.breakAfter}return null}}class Cl extends Ga{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,n,r,o){return!(i&&(!(i instanceof Cl&&this.widget.compare(i.widget))||e>0&&r<=0||t0;){if(this.textOff==this.text.length){let{value:t,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(El(new cl(this.text.slice(this.textOff,this.textOff+n)),t),i),this.atCursorPos=!0,this.textOff+=n,e-=n,i=0}}span(e,t,i,n){this.buildText(t-e,i,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,i,n,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Rl){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(i instanceof Rl)if(i.block){let{type:e}=i;e!=xl.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Cl(i.widget||new Vl("div"),s,e))}else{let o=hl.create(i.widget||new Vl("span"),s,s?0:i.startSide),a=this.atCursorPos&&!o.isEditable&&r<=n.length&&(e0),l=!o.isEditable&&(en.length||i.startSide<=0),O=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),a&&(O.append(El(new bl(1),n),r),r=n.length+Math.max(0,r-n.length)),O.append(El(o,n),r),this.atCursorPos=l,this.pendingBuffer=l?en.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,n,r){let o=new ql(e,t,i,r);return o.openEnd=Sr.spans(n,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function El(e,t){for(let i of t)e=new ul(i,[e],e.length);return e}class Vl extends Xl{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Yl=Nn.define(),Zl=Nn.define(),zl=Nn.define(),Ml=Nn.define(),Il=Nn.define(),Ul=Nn.define(),jl=Nn.define(),Dl=Nn.define({combine:e=>e.some((e=>e))}),Gl=Nn.define({combine:e=>e.some((e=>e))});class Ll{constructor(e,t="nearest",i="nearest",n=5,r=5){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=r}map(e){return e.empty?this:new Ll(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const Bl=cr.define({map:(e,t)=>e.map(t)});function Kl(e,t,i){let n=e.facet(Ml);n.length?n[0](t):window.onerror?window.onerror(String(t),i,void 0,void 0,t):i?console.error(i+":",t):console.error(t)}const Fl=Nn.define({combine:e=>!e.length||e[0]});let Hl=0;const Jl=Nn.define();class eO{constructor(e,t,i,n){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=n(this)}static define(e,t){const{eventHandlers:i,provide:n,decorations:r}=t||{};return new eO(Hl++,e,i,(e=>{let t=[Jl.of(e)];return r&&t.push(rO.of((t=>{let i=t.plugin(e);return i?r(i):Sl.none}))),n&&t.push(n(e)),t}))}static fromClass(e,t){return eO.define((t=>new e(t)),t)}}class tO{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Kl(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Kl(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Kl(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const iO=Nn.define(),nO=Nn.define(),rO=Nn.define(),oO=Nn.define(),sO=Nn.define(),aO=Nn.define();class lO{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new lO(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toAO)break;r+=2}if(!a)return i;new lO(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,s=a.toB}}}class OO{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Pn.empty(this.startState.doc.length);for(let e of i)this.changes=this.changes.compose(e.changes);let n=[];this.changes.iterChangedRanges(((e,t,i,r)=>n.push(new lO(e,t,i,r)))),this.changedRanges=n}static create(e,t,i){return new OO(e,t,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e=>e.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var cO=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(cO||(cO={}));const uO=cO.LTR,dO=cO.RTL;function hO(e){let t=[];for(let i=0;i=t){if(s.level==i)return o;(r<0||(0!=n?n<0?s.fromt:e[r].level>s.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}const yO=[];function _O(e){return[new QO(0,e,0)]}let PO="";function wO(e,t,i,n,r){var o;let s=n.head-e.from,a=-1;if(0==s){if(!r||!e.length)return null;t[0].level!=i&&(s=t[0].side(!1,i),a=0)}else if(s==e.length){if(r)return null;let e=t[t.length-1];e.level!=i&&(s=e.side(!0,i),a=t.length-1)}a<0&&(a=QO.find(t,s,null!==(o=n.bidiLevel)&&void 0!==o?o:-1,n.assoc));let l=t[a];s==l.side(r,i)&&(l=t[a+=r?1:-1],s=l.side(!r,i));let O=r==(l.dir==i),c=un(e.text,s,O);if(PO=e.text.slice(Math.min(s,c),Math.max(s,c)),c!=l.side(r,i))return Rn.cursor(c+e.from,O?-1:1,l.level);let u=a==(r?t.length-1:0)?null:t[a+(r?1:-1)];return u||l.level==i?u&&u.level1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);i=o+s}}readNode(e){if(e.cmIgnore)return;let t=Ga.get(e),i=t&&t.overrideDOMText;if(null!=i){this.findPointInside(e,i.length);for(let e=i.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function XO(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class xO{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class SO extends Ga{constructor(e){super(),this.view=e,this.compositionDeco=Sl.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Nl],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new lO(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every((({fromA:e,toA:t})=>tthis.minWidthTo))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Sl.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let i=TO(e);if(!i)return Sl.none;let{from:n,to:r,node:o,text:s}=i,a=t.mapPos(n,1),l=Math.max(a,t.mapPos(r,-1)),{state:O}=e,c=3==o.nodeType?o.nodeValue:new vO([],O).readRange(o.firstChild,null).text;if(l-a{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=Ol.chrome||Ol.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.dirty=0,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let n=[];if(this.view.viewport.from||this.view.viewport.to=0?e[t]:null;if(!n)break;let{fromA:r,toA:o,fromB:s,toB:a}=n,{content:l,breakAtStart:O,openStart:c,openEnd:u}=ql.build(this.view.state.doc,s,a,this.decorations,this.dynamicDecorationMap),{i:d,off:h}=i.findPos(o,1),{i:f,off:p}=i.findPos(r,-1);Ka(this,f,p,d,h,l,O,c,u)}}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,r=!n&&Ta(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.domAtPos(s.anchor),l=s.empty?a:this.domAtPos(s.head);if(Ol.gecko&&s.empty&&!this.compositionDeco.size&&function(e){return 1==e.node.nodeType&&e.node.firstChild&&(0==e.offset||"false"==e.node.childNodes[e.offset-1].contentEditable)&&(e.offset==e.node.childNodes.length||"false"==e.node.childNodes[e.offset].contentEditable)}(a)){let e=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null))),a=l=new ja(e,0),o=!0}let O=this.view.observer.selectionRange;!o&&O.focusNode&&Wa(a.node,a.offset,O.anchorNode,O.anchorOffset)&&Wa(l.node,l.offset,O.focusNode,O.focusOffset)||(this.view.observer.ignore((()=>{Ol.android&&Ol.chrome&&this.dom.contains(O.focusNode)&&function(e,t){for(let i=e;i&&i!=t;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(O.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Sa(this.view.root);if(e)if(s.empty){if(Ol.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(ts.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new ja(O.anchorNode,O.anchorOffset),this.impreciseHead=l.precise?null:new ja(O.focusNode,O.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=Sa(e.root),{anchorNode:n,anchorOffset:r}=e.observer.selectionRange;if(!(i&&t.empty&&t.assoc&&i.modify))return;let o=Nl.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let O=this.domAtPos(t.head+t.assoc);i.collapse(O.node,O.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(n,r)}nearest(e){for(let t=e;t;){let e=Ga.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;to||e==o&&r.type!=xl.WidgetBefore&&r.type!=xl.WidgetAfter&&(!n||2==t||this.children[n-1].breakAfter||this.children[n-1].type==xl.WidgetBefore&&t>-2))return r.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==cO.LTR;for(let e=0,l=0;ln)break;if(e>=i){let i=O.dom.getBoundingClientRect();if(t.push(i.height),o){let t=O.dom.lastChild,n=t?Ra(t):[];if(n.length){let t=n[n.length-1],o=a?t.right-i.left:i.right-t.left;o>s&&(s=o,this.minWidth=r,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+O.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?cO.RTL:cO.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Nl){let t=e.measureTextSize();if(t)return t}let e,t,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let r=Ra(n.firstChild)[0];e=n.getBoundingClientRect().height,t=r?r.width/27:7,i=r?r.height:e,n.remove()})),{lineHeight:e,charWidth:t,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Ba(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let r=n==t.viewports.length?null:t.viewports[n],o=r?r.from-1:this.length;if(o>i){let n=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push(Sl.replace({widget:new kO(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return Sl.set(e)}updateDeco(){let e=this.view.state.facet(rO).map(((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e));for(let t=e.length;ti.anchor?-1:1);if(!n)return;!i.empty&&(t=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,t.left),top:Math.min(n.top,t.top),right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)});let r=0,o=0,s=0,a=0;for(let e of this.view.state.facet(sO).map((e=>e(this.view))))if(e){let{left:t,right:i,top:n,bottom:l}=e;null!=t&&(r=Math.max(r,t)),null!=i&&(o=Math.max(o,i)),null!=n&&(s=Math.max(s,n)),null!=l&&(a=Math.max(a,l))}let l={left:n.left-r,top:n.top-s,right:n.right+o,bottom:n.bottom+a};!function(e,t,i,n,r,o,s,a){let l=e.ownerDocument,O=l.defaultView||window;for(let c=e;c;)if(1==c.nodeType){let e,u=c==l.body;if(u)e=Ea(O);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();e={left:t.left,right:t.left+c.clientWidth,top:t.top,bottom:t.top+c.clientHeight}}let d=0,h=0;if("nearest"==r)t.top0&&t.bottom>e.bottom+h&&(h=t.bottom-e.bottom+h+s)):t.bottom>e.bottom&&(h=t.bottom-e.bottom+s,i<0&&t.top-h0&&t.right>e.right+d&&(d=t.right-e.right+d+o)):t.right>e.right&&(d=t.right-e.right+o,i<0&&t.left0))break;i=i.childNodes[n-1],n=Ca(i)}if(i>=0)for(let n=e,r=t;;){if(3==n.nodeType)return n;if(!(1==n.nodeType&&r=0))break;n=n.childNodes[r],r=0}return null}class AO{constructor(){this.changes=[]}compareRange(e,t){Al(e,t,this.changes)}comparePoint(e,t){Al(e,t,this.changes)}}function NO(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function CO(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function qO(e,t){return e.topt.top+1}function EO(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function YO(e,t,i){let n,r,o,s,a,l,O,c,u=!1;for(let d=e.firstChild;d;d=d.nextSibling){let e=Ra(d);for(let h=0;hm||s==m&&o>p){n=d,r=f,o=p,s=m;let a=m?i0?h0)}0==p?i>f.bottom&&(!O||O.bottomf.top)&&(l=d,c=f):O&&qO(O,f)?O=VO(O,f.bottom):c&&qO(c,f)&&(c=EO(c,f.top))}}if(O&&O.bottom>=i?(n=a,r=O):c&&c.top<=i&&(n=l,r=c),!n)return{node:e,offset:0};let d=Math.max(r.left,Math.min(r.right,t));return 3==n.nodeType?ZO(n,d,i):u&&"false"!=n.contentEditable?YO(n,d,i):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,n)+(t>=(r.left+r.right)/2?1:0)}}function ZO(e,t,i){let n=e.nodeValue.length,r=-1,o=1e9,s=0;for(let a=0;ai?O.top-i:i-O.bottom)-1;if(O.left-1<=t&&O.right+1>=t&&c=(O.left+O.right)/2,n=i;if((Ol.chrome||Ol.gecko)&&Ma(e,a).getBoundingClientRect().left==O.right&&(n=!i),c<=0)return{node:e,offset:a+(n?1:0)};r=a+(n?1:0),o=c}}}return{node:e,offset:r>-1?r:s>0?e.nodeValue.length:0}}function zO(e,t,i,n=-1){var r,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:O}=e.viewState,{x:c,y:u}=t,d=u-l;if(d<0)return 0;if(d>O)return e.state.doc.length;for(let t=e.defaultLineHeight/2,r=!1;s=e.elementAtHeight(d),s.type!=xl.Text;)for(;d=n>0?s.bottom+t:s.top-t,!(d>=0&&d<=O);){if(r)return i?null:0;r=!0,n=-n}u=l+d;let h=s.from;if(he.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:i?null:MO(e,a,s,c,u);let f=e.dom.ownerDocument,p=e.root.elementFromPoint?e.root:f,m=p.elementFromPoint(c,u);m&&!e.contentDOM.contains(m)&&(m=null),m||(c=Math.max(a.left+1,Math.min(a.right-1,c)),m=p.elementFromPoint(c,u),m&&!e.contentDOM.contains(m)&&(m=null));let g,$=-1;if(m&&0!=(null===(r=e.docView.nearest(m))||void 0===r?void 0:r.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,u);e&&({offsetNode:g,offset:$}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(c,u);t&&(({startContainer:g,startOffset:$}=t),(!e.contentDOM.contains(g)||Ol.safari&&function(e,t,i){let n;if(3!=e.nodeType||t!=(n=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Ma(e,n-1,n).getBoundingClientRect().left>i}(g,$,c)||Ol.chrome&&function(e,t,i){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return i-(1==e.nodeType?e.getBoundingClientRect():Ma(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(g,$,c))&&(g=void 0))}if(!g||!e.docView.dom.contains(g)){let t=Nl.find(e.docView,h);if(!t)return d>s.top+s.height/2?s.to:s.from;({node:g,offset:$}=YO(t.dom,c,u))}let b=e.docView.nearest(g);if(!b)return null;if(b.isWidget&&1==(null===(o=b.dom)||void 0===o?void 0:o.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight&&(o+=Math.floor((r-i.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength);let s=e.state.sliceDoc(i.from,i.to);return i.from+zr(s,o,e.state.tabSize)}function IO(e,t,i,n){let r=e.state.doc.lineAt(t.head),o=e.bidiSpans(r),s=e.textDirectionAt(r.from);for(let a=t,l=null;;){let t=wO(r,o,s,a,i),O=PO;if(!t){if(r.number==(i?e.state.doc.lines:1))return a;O="\n",r=e.state.doc.line(r.number+(i?1:-1)),o=e.bidiSpans(r),t=Rn.cursor(i?r.from:r.to)}if(l){if(!l(O))return a}else{if(!n)return t;l=n(O)}a=t}}function UO(e,t,i){let n=e.state.facet(oO).map((t=>t(e)));for(;;){let e=!1;for(let r of n)r.between(i.from-1,i.from+1,((n,r,o)=>{i.from>n&&i.fromi.from?Rn.cursor(n,1):Rn.cursor(r,-1),e=!0)}));if(!e)return i}}class jO{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let t=(t,i)=>{this.ignoreDuringComposition(i)||"keydown"==i.type&&this.keydown(e,i)||(this.mustFlushObserver(i)&&e.observer.forceFlush(),this.runCustomHandlers(i.type,e,i)?i.preventDefault():t(e,i))};for(let i in HO){let n=HO[i];e.contentDOM.addEventListener(i,(i=>{FO(e,i)&&t(n,i)}),JO[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",(i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(HO.mousedown,i),!i.defaultPrevented&&2==i.button)){let t=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout((()=>e.contentDOM.style.minHeight=t),200)}})),e.scrollDOM.addEventListener("drop",(i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(HO.drop,i)})),Ol.chrome&&102==Ol.chrome_version&&e.scrollDOM.addEventListener("wheel",(()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout((()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""}),100)}),{passive:!0}),this.notifiedFocused=e.hasFocus,Ol.safari&&e.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let n;this.customHandlers=[];for(let r of t)if(n=null===(i=r.update(e).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:n});for(let t in n)this.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(this.registeredEvents.push(t),e.contentDOM.addEventListener(t,(i=>{FO(e,i)&&this.runCustomHandlers(t,e,i)&&i.preventDefault()})))}}runCustomHandlers(e,t,i){for(let n of this.customHandlers){let r=n.handlers[e];if(r)try{if(r.call(n.plugin,i,t)||i.defaultPrevented)return!0}catch(e){Kl(t.state,e)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,t,e)}catch(t){Kl(e.state,t)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()e.keyCode==t.keyCode)))&&!t.ctrlKey||GO.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)||(this.pendingIOSKey=i||t,setTimeout((()=>this.flushIOSKey(e)),250),0))}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,Ia(e.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(Ol.safari&&!Ol.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}mustFlushObserver(e){return"keydown"==e.type&&229!=e.keyCode}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const DO=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GO="dthko",LO=[16,17,18,20,91,92,224,225];function BO(e){return.7*Math.max(0,e)+8}class KO{constructor(e,t,i,n){this.view=e,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let i=e.parentNode;i&&i!=t.body;)if(1==i.nodeType){if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.assignedSlot||i.parentNode}else{if(11!=i.nodeType)break;i=i.host}return null}(e.contentDOM);let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(_r.allowMultipleSelections)&&function(e,t){let i=e.state.facet(Yl);return i.length?i[0](t):Ol.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let i=e.state.facet(Zl);return i.length?i[0](t):Ol.mac?!t.altKey:!t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:i}=e.state.selection;if(i.empty)return!1;let n=Sa(e.root);if(!n||0==n.rangeCount)return!0;let r=n.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&i.top<=t.clientY&&i.bottom>=t.clientY)return!0}return!1}(e,t)||1!=uc(t))&&null}start(e){!1===this.dragging&&(e.preventDefault(),this.select(e))}move(e){var t;if(0==e.buttons)return this.destroy();if(!1!==this.dragging)return;this.select(this.lastEvent=e);let i=0,n=0,r=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=r.left+6?i=-BO(r.left-e.clientX):e.clientX>=r.right-6&&(i=BO(e.clientX-r.right)),e.clientY<=r.top+6?n=-BO(r.top-e.clientY):e.clientY>=r.bottom-6&&(n=BO(e.clientY-r.bottom)),this.setScrollSpeed(i,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function FO(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let i,n=t.target;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Ga.get(n))&&i.ignoreEvent(t))return!1;return!0}const HO=Object.create(null),JO=Object.create(null),ec=Ol.ie&&Ol.ie_version<15||Ol.ios&&Ol.webkit_version<604;function tc(e,t){let i,{state:n}=e,r=1,o=n.toText(t),s=o.lines==n.selection.ranges.length;if(null!=hc&&n.selection.ranges.every((e=>e.empty))&&hc==o.toString()){let e=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==e)return{range:i};e=a.from;let l=n.toText((s?o.line(r++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:l},range:Rn.cursor(i.from+l.length)}}))}else i=s?n.changeByRange((e=>{let t=o.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:Rn.cursor(e.from+t.length)}})):n.replaceSelection(o);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function ic(e,t,i,n){if(1==n)return Rn.cursor(t,i);if(2==n)return function(e,t,i=1){let n=e.charCategorizer(t),r=e.doc.lineAt(t),o=t-r.from;if(0==r.length)return Rn.cursor(t);0==o?i=1:o==r.length&&(i=-1);let s=o,a=o;i<0?s=un(r.text,o,!1):a=un(r.text,o);let l=n(r.text.slice(s,a));for(;s>0;){let e=un(r.text,s,!1);if(n(r.text.slice(e,s))!=l)break;s=e}for(;a{e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now())},HO.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},HO.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},JO.touchstart=JO.touchmove={passive:!0},HO.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return;let i=null;for(let n of e.state.facet(zl))if(i=n(e,t),i)break;if(i||0!=t.button||(i=function(e,t){let i=sc(e,t),n=uc(t),r=e.state.selection;return{update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),r=r.map(e.changes))},get(t,o,s){let a,l=sc(e,t),O=ic(e,l.pos,l.bias,n);if(i.pos!=l.pos&&!o){let t=ic(e,i.pos,i.bias,n),r=Math.min(t.from,O.from),o=Math.max(t.to,O.to);O=r1&&(a=function(e,t){for(let i=0;i=t)return Rn.create(e.ranges.slice(0,i).concat(e.ranges.slice(i+1)),e.mainIndex==i?0:e.mainIndex-(e.mainIndex>i?1:0))}return null}(r,l.pos))?a:s?r.addRange(O):Rn.create([O])}}}(e,t)),i){let n=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new KO(e,t,i,n)),n&&e.observer.ignore((()=>za(e.contentDOM))),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}};let nc=(e,t)=>e>=t.top&&e<=t.bottom,rc=(e,t,i)=>nc(t,i)&&e>=i.left&&e<=i.right;function oc(e,t,i,n){let r=Nl.find(e.docView,t);if(!r)return 1;let o=t-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;let s=r.coordsAt(o,-1);if(s&&rc(i,n,s))return-1;let a=r.coordsAt(o,1);return a&&rc(i,n,a)?1:s&&nc(n,s)?-1:1}function sc(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:i,bias:oc(e,i,t.clientX,t.clientY)}}const ac=Ol.ie&&Ol.ie_version<=11;let lc=null,Oc=0,cc=0;function uc(e){if(!ac)return e.detail;let t=lc,i=cc;return lc=e,cc=Date.now(),Oc=!t||i>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Oc+1)%3:1}function dc(e,t,i,n){if(!i)return;let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:o}=e.inputState,s=n&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:i},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}HO.dragstart=(e,t)=>{let{selection:{main:i}}=e.state,{mouseSelection:n}=e.inputState;n&&(n.dragging=i),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(i.from,i.to)),t.dataTransfer.effectAllowed="copyMove")},HO.drop=(e,t)=>{if(!t.dataTransfer)return;if(e.state.readOnly)return t.preventDefault();let i=t.dataTransfer.files;if(i&&i.length){t.preventDefault();let n=Array(i.length),r=0,o=()=>{++r==i.length&&dc(e,t,n.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),o()},t.readAsText(i[e])}}else dc(e,t,t.dataTransfer.getData("Text"),!0)},HO.paste=(e,t)=>{if(e.state.readOnly)return t.preventDefault();e.observer.flush();let i=ec?null:t.clipboardData;i?(tc(e,i.getData("text/plain")||i.getData("text/uri-text")),t.preventDefault()):function(e){let t=e.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{e.focus(),i.remove(),tc(e,i.value)}),50)}(e)};let hc=null;HO.copy=HO.cut=(e,t)=>{let{text:i,ranges:n,linewise:r}=function(e){let t=[],i=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),i.push(n));if(!t.length){let r=-1;for(let{from:n}of e.selection.ranges){let o=e.doc.lineAt(n);o.number>r&&(t.push(o.text),i.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),r=o.number}n=!0}return{text:t.join(e.lineBreak),ranges:i,linewise:n}}(e.state);if(!i&&!r)return;hc=r?i:null;let o=ec?null:t.clipboardData;o?(t.preventDefault(),o.clearData(),o.setData("text/plain",i)):function(e,t){let i=e.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout((()=>{n.remove(),e.focus()}),50)}(e,i),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})};const fc=ar.define();function pc(e,t){let i=[];for(let n of e.facet(jl)){let r=n(e,t);r&&i.push(r)}return i?e.update({effects:i,annotations:fc.of(!0)}):null}function mc(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let i=pc(e.state,t);i?e.dispatch(i):e.update([])}}),10)}HO.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),mc(e)},HO.blur=e=>{e.observer.clearSelectionRange(),mc(e)},HO.compositionstart=HO.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},HO.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Ol.chrome&&Ol.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])}),50)},HO.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},HO.beforeinput=(e,t)=>{var i;let n;if(Ol.chrome&&Ol.android&&(n=DO.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}};const gc=["pre-wrap","normal","pre-line","break-spaces"];class $c{constructor(e){this.lineWrapping=e,this.doc=Hi.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return gc.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=r,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return _c.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let r=this,o=i.doc;for(let s=n.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:O,toB:c}=n[s],u=r.lineAt(a,yc.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=l?u:r.lineAt(l,yc.ByPosNoHeight,i,0,0);for(c+=d.to-l,l=d.to;s>0&&u.from<=n[s-1].toA;)a=n[s-1].fromA,O=n[s-1].fromB,s--,a2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),i+=1+r.break,n-=r.size}else{if(!(r>2*n))break;{let t=e[i];t.break?e.splice(i,1,t.left,null,t.right):e.splice(i,1,t.left,t.right),i+=2+t.break,r-=t.size}}else if(n=r&&o(this.blockAt(0,i,n,r))}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class wc extends Pc{constructor(e,t){super(e,t,xl.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let n=i[0];return 1==i.length&&(n instanceof wc||n instanceof vc&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof vc?n=new wc(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):_c.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setHeight(e,n.heights[n.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class vc extends _c{constructor(e){super(e,0)}heightMetrics(e,t){let i,n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,o=r-n+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);i=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else i=this.height/o;return{firstLine:n,lastLine:r,perLine:i,perChar:s}}blockAt(e,t,i,n){let{firstLine:r,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let r=n+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),o=t.doc.lineAt(r),l=s+o.length*a,O=Math.max(i,e-l/2);return new Qc(o.from,o.length,O,l,xl.Text)}{let n=Math.max(0,Math.min(o-r,Math.floor((e-i)/s))),{from:a,length:l}=t.doc.line(r+n);return new Qc(a,l,i+s*n,s,xl.Text)}}lineAt(e,t,i,n,r){if(t==yc.ByHeight)return this.blockAt(e,i,n,r);if(t==yc.ByPosNoHeight){let{from:t,to:n}=i.doc.lineAt(e);return new Qc(t,n-t,0,0,xl.Text)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(i,r),l=i.doc.lineAt(e),O=s+l.length*a,c=l.number-o,u=n+s*c+a*(l.from-r-c);return new Qc(l.from,l.length,Math.max(n,Math.min(u,n+this.height-O)),O,xl.Text)}forEachLine(e,t,i,n,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(i,r);for(let O=e,c=n;O<=t;){let t=i.doc.lineAt(O);if(O==e){let i=t.number-s;c+=a*i+l*(e-r-i)}let n=a+l*t.length;o(new Qc(t.from,t.length,c,n,xl.Text)),c+=n,O=t.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let e=i[i.length-1];e instanceof vc?i[i.length-1]=new vc(e.length+n):i.push(null,new vc(n-1))}if(e>0){let t=i[0];t instanceof vc?i[0]=new vc(e+t.length):i.unshift(new vc(e-1),null)}return _c.of(i)}decomposeLeft(e,t){t.push(new vc(e-1),null)}decomposeRight(e,t){t.push(null,new vc(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let r=t+this.length;if(n&&n.from<=t+this.length&&n.more){let i=[],o=Math.max(t,n.from),s=-1;for(n.from>t&&i.push(new vc(n.from-t-1).updateHeight(e,t));o<=r&&n.more;){let t=e.doc.lineAt(o).length;i.length&&i.push(null);let r=n.heights[n.index++];-1==s?s=r:Math.abs(r-s)>=.001&&(s=-2);let a=new wc(t,r);a.outdated=!1,i.push(a),o+=t+1}o<=r&&i.push(null,new vc(r-o).updateHeight(e,o));let a=_c.of(i);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Xc extends _c{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return 1&this.flags}blockAt(e,t,i,n){let r=i+this.left.height;return es))return l;let O=t==yc.ByPosNoHeight?yc.ByPosNoHeight:yc.ByPos;return a?l.join(this.right.lineAt(s,O,i,o,s)):this.left.lineAt(s,O,i,n,r).join(l)}forEachLine(e,t,i,n,r,o){let s=n+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,s,a,o);else{let l=this.lineAt(a,yc.ByPos,i,n,r);e=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,i,s,a,o)}}replace(e,t,i){let n=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let e of i)r.push(e);if(e>0&&xc(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e2*t.size||t.size>2*e.size?_c.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:r,right:o}=this,s=t+r.length+this.break,a=null;return n&&n.from<=t+r.length&&n.more?a=r=r.updateHeight(e,t,i,n):r.updateHeight(e,t,i),n&&n.from<=s+o.length&&n.more?a=o=o.updateHeight(e,s,i,n):o.updateHeight(e,s,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xc(e,t){let i,n;null==e[t]&&(i=e[t-1])instanceof vc&&(n=e[t+1])instanceof vc&&e.splice(t-1,3,new vc(i.length+1+n.length))}class Sc{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof wc?i.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new wc(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=5)&&this.addLineDeco(n,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new wc(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new vc(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof wc)return e;let t=new wc(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type!=xl.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=xl.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof wc||this.isCovered?(this.writtenToi.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();o=Math.max(o,n.left),s=Math.min(s,n.right),a=Math.max(a,n.top),l=t==e.parentNode?n.bottom:Math.min(l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-i.left,right:Math.max(o,s)-i.left,top:a-(i.top+t),bottom:Math.max(a,l)-(i.top+t)}}function Rc(e,t){let i=e.getBoundingClientRect();return{left:0,right:i.right-i.left,top:t,bottom:i.bottom-(i.top+t)}}class Wc{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new $c(t),this.stateDeco=e.facet(rO).filter((e=>"function"!=typeof e)),this.heightMap=_c.empty().applyChanges(this.stateDeco,Hi.empty,this.heightOracle.setDoc(e.doc),[new lO(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Sl.set(this.lineGaps.map((e=>e.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some((({from:e,to:t})=>n>=e&&n<=t))){let{from:t,to:i}=this.lineBlockAt(n);e.push(new Cc(t,i))}}this.viewports=e.sort(((e,t)=>e.from-t.from)),this.scaler=this.heightMap.height<=7e6?Yc:new Zc(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(1==this.scaler.scale?e:zc(e,this.scaler))}))}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(rO).filter((e=>"function"!=typeof e));let n=e.changedRanges,r=lO.extendWithRanges(n,function(e,t,i){let n=new kc;return Sr.compare(e,t,i,n,0),n.changes}(i,this.stateDeco,e?e.changes:Pn.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2);let s=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let a=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Gl)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),n=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?cO.RTL:cO.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,O=0,c=parseInt(i.paddingTop)||0,u=parseInt(i.paddingBottom)||0;this.paddingTop==c&&this.paddingBottom==u||(this.paddingTop=c,this.paddingBottom=u,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let d=(this.printing?Rc:Tc)(t,this.paddingTop),h=d.top-this.pixelViewport.top,f=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=s.width;if(this.contentDOMWidth==m&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(t)&&(o=!0),o||n.lineWrapping&&Math.abs(m-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=i>0&&n.refresh(r,i,s,a,m/s,t),o&&(e.docView.minWidth=0,l|=8)}h>0&&f>0?O=Math.max(h,f):h<0&&f<0&&(O=Math.min(h,f)),n.heightChanged=!1;for(let i of this.viewports){let r=i.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(i);this.heightMap=(o?_c.empty().applyChanges(this.stateDeco,Hi.empty,this.heightOracle,[new lO(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new bc(i.from,r))}n.heightChanged&&(l|=2)}let g=!this.viewportIsAppropriate(this.viewport,O)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return g&&(this.viewport=this.getViewport(O,this.scrollTarget)),this.updateForViewport(),(2&l||g)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new Cc(n.lineAt(o-1e3*i,yc.ByHeight,r,0,0).from,n.lineAt(s+1e3*(1-i),yc.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let i,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=n.lineAt(e,yc.ByPos,r,0,0);i="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e=s+Math.max(10,Math.min(i,250)))&&n>o-2e3&&r>1,o=n<<1;if(this.defaultTextDirection!=cO.LTR&&!i)return[];let s=[],a=(n,o,l,O)=>{if(o-nn&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)e.fromt))));if(!d){if(oe.from<=o&&e.to>=o))){let e=t.moveToLineBoundary(Rn.cursor(o),!1,!0).head;e>n&&(o=e)}d=new Wc(n,o,this.gapSize(l,n,o,O))}s.push(d)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,r,e,t),se.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Sr.spans(e,this.viewport.from,this.viewport.to,{span(e,i){t.push({from:e,to:i})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some(((e,i)=>e.from!=t[i].from||e.to!=t[i].to));return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||zc(this.heightMap.lineAt(e,yc.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return zc(this.heightMap.lineAt(this.scaler.fromDOM(e),yc.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return zc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Cc{constructor(e,t){this.from=e,this.to=t}}function qc(e,t,i){let n=[],r=e,o=0;return Sr.spans(i,e,t,{span(){},point(e,t){e>r&&(n.push({from:r,to:e}),o+=e-r),r=t}},20),r=1)return t[t.length-1].to;let n=Math.floor(e*i);for(let e=0;;e++){let{from:i,to:r}=t[e],o=r-i;if(n<=o)return i+n;n-=o}}function Vc(e,t){let i=0;for(let{from:n,to:r}of e.ranges){if(t<=r){i+=t-n;break}i+=r-n}return i/e.total}const Yc={toDOM:e=>e,fromDOM:e=>e,scale:1};class Zc{constructor(e,t,i){let n=0,r=0,o=0;this.viewports=i.map((({from:i,to:r})=>{let o=t.lineAt(i,yc.ByPos,e,0,0).top,s=t.lineAt(r,yc.ByPos,e,0,0).bottom;return n+=s-o,{from:i,to:r,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(t.height-n);for(let e of this.viewports)e.domTop=o+(e.top-r)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),r=e.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let r=tzc(e,t))):e.type)}const Mc=Nn.define({combine:e=>e.join(" ")}),Ic=Nn.define({combine:e=>e.indexOf(!0)>-1}),Uc=ga.newName(),jc=ga.newName(),Dc=ga.newName(),Gc={"&light":"."+jc,"&dark":"."+Dc};function Lc(e,t,i){return new ga(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!i||!i[t])throw new RangeError(`Unsupported selector: ${t}`);return i[t]})):e+" "+t})}const Bc=Lc("."+Uc,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Gc);class Kc{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let t=r||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:o}=e.observer.selectionRange;return i&&(t.push(new xO(i,n)),r==i&&o==n||t.push(new xO(r,o))),t}(e),i=new vO(t,e.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(e,t){if(0==e.length)return null;let i=e[0].pos,n=2==e.length?e[1].pos:i;return i>-1&&n>-1?Rn.single(i+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,i=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!ka(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!ka(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=Rn.single(n,i)}}}function Fc(e,t){let i,{newSel:n}=t,r=e.state.selection.main;if(t.bounds){let{from:n,to:o}=t.bounds,s=r.from,a=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||Ol.android&&t.text.length0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;"end"==n&&(i-=s+Math.max(0,o-Math.min(s,a))-o);s=s?o-i:0,a=o+(a-s),s=o):a=a?o-i:0,s=o+(s-a),a=o);return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(n,o,"￿"),t.text,s-n,a);l&&(Ol.chrome&&13==e.inputState.lastKeyCode&&l.toB==l.from+2&&"￿￿"==t.text.slice(l.from,l.toB)&&l.toB--,i={from:n+l.from,to:n+l.toA,insert:Hi.of(t.text.slice(l.from,l.toB).split("￿"))})}else n&&(!e.hasFocus&&e.state.facet(Fl)||n.main.eq(r))&&(n=null);if(!i&&!n)return!1;if(!i&&t.typeOver&&!r.empty&&n&&n.main.empty?i={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,r.to)}:i&&i.from>=r.from&&i.to<=r.to&&(i.from!=r.from||i.to!=r.to)&&r.to-r.from-(i.to-i.from)<=4?i={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,i.from).append(i.insert).append(e.state.doc.slice(i.to,r.to))}:(Ol.mac||Ol.android)&&i&&i.from==i.to&&i.from==r.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=Rn.single(n.main.anchor-1,n.main.head-1)),i={from:r.from,to:r.to,insert:Hi.of([" "])}):Ol.chrome&&i&&i.from==i.to&&i.from==r.head&&"\n "==i.insert.toString()&&e.lineWrapping&&(n&&(n=Rn.single(n.main.anchor-1,n.main.head-1)),i={from:r.from,to:r.to,insert:Hi.of([" "])}),i){let t=e.state;if(Ol.ios&&e.inputState.flushIOSKey(e))return!0;if(Ol.android&&(i.from==r.from&&i.to==r.to&&1==i.insert.length&&2==i.insert.lines&&Ia(e.contentDOM,"Enter",13)||i.from==r.from-1&&i.to==r.to&&0==i.insert.length&&Ia(e.contentDOM,"Backspace",8)||i.from==r.from&&i.to==r.to+1&&0==i.insert.length&&Ia(e.contentDOM,"Delete",46)))return!0;let o,s=i.insert.toString();if(e.state.facet(Ul).some((t=>t(e,i.from,i.to,s))))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,i.from>=r.from&&i.to<=r.to&&i.to-i.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==i.from+i.insert.length)&&e.inputState.composing<0){let n=r.fromi.to?t.sliceDoc(i.to,r.to):"";o=t.replaceSelection(e.state.toText(n+i.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=t.changes(i),a=n&&n.main.to<=s.newLength?n.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&i.to<=r.to&&i.to>=r.to-10){let n=e.state.sliceDoc(i.from,i.to),l=TO(e)||e.state.doc.lineAt(r.head),O=r.to-i.to,c=r.to-r.from;o=t.changeByRange((o=>{if(o.from==r.from&&o.to==r.to)return{changes:s,range:a||o.map(s)};let u=o.to-O,d=u-n.length;if(o.to-o.from!=c||e.state.sliceDoc(d,u)!=n||l&&o.to>=l.from&&o.from<=l.to)return{range:o};let h=t.changes({from:d,to:u,insert:i.insert}),f=o.to-r.to;return{changes:h,range:a?Rn.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):o.map(h)}}))}else o={changes:s,selection:a&&t.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(o,{scrollIntoView:!0,userEvent:a}),!0}if(n&&!n.main.eq(r)){let t=!1,i="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),i=e.inputState.lastSelectionOrigin),e.dispatch({selection:n,scrollIntoView:t,userEvent:i}),!0}return!1}const Hc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Jc=Ol.ie&&Ol.ie_version<=11;class eu{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Va,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t=>{for(let e of t)this.queue.push(e);(Ol.ie&&Ol.ie_version<=11||Ol.ios&&e.composing)&&t.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),Jc&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)this.view.requestMeasure())),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some(((t,i)=>t!=e[i])))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(Fl)?i.root.activeElement!=this.dom:!Ta(i.dom,n))return;let r=n.anchorNode&&i.docView.nearest(n.anchorNode);r&&r.ignoreEvent(e)?t||(this.selectionChanged=!1):(Ol.ie&&Ol.ie_version<=11||Ol.android&&Ol.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Wa(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ol.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),!t)return null;let n=t.startContainer,r=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return Wa(a.node,a.offset,o,s)&&([n,r,o,s]=[o,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:s}}(this.view)||Sa(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=Ta(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),!this.flush()&&e.force&&Ia(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(n=!0),-1==t?({from:t,to:i}=e):(t=Math.min(e.from,t),i=Math.max(e.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&Ta(this.dom,this.selectionRange);return e<0&&!n?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Kc(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,n=Fc(this.view,t);return this.view.state==i&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){let i=tu(t,e.previousSibling||e.target.previousSibling,-1),n=tu(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(n=this.resizeContent)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function tu(e,t,i){for(;t;){let n=Ga.get(t);if(n&&n.parent==e)return n;let r=t.parentNode;t=r!=e.dom?r:i>0?t.nextSibling:t.previousSibling}return null}class iu{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new Nc(e.state||_r.create(e)),this.plugins=this.state.facet(Jl).map((e=>new tO(e)));for(let e of this.plugins)e.update(this);this.observer=new eu(this),this.inputState=new jO(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new SO(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(1==e.length&&e[0]instanceof ur?e[0]:this.state.update(...e))}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,i=!1,n=!1,r=this.state;for(let t of e){if(t.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed)return void(this.viewState.state=r);let o=this.hasFocus,s=0,a=null;e.some((e=>e.annotation(fc)))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=pc(r,o),a||(s=1));let l=this.observer.delayedAndroidKey,O=null;if(l?(this.observer.clearDelayedAndroidKey(),O=this.observer.readChange(),(O&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(O=null)):this.observer.clear(),r.facet(_r.phrases)!=this.state.facet(_r.phrases))return this.setState(r);t=OO.create(this,r,e),t.flags|=s;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new Ll(e.empty?e:Rn.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Bl)&&(c=e.value)}this.viewState.update(t,c),this.bidiCache=ou.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),i=this.docView.update(t),this.state.facet(aO)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(i,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(Mc)!=t.state.facet(Mc)&&(this.viewState.mustMeasureContent=!0),(i||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(Il))e(t);(a||O)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),O&&!Fc(this,O)&&l.force&&Ia(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Nc(e),this.plugins=e.facet(Jl).map((e=>new tO(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new SO(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Jl),i=e.state.facet(Jl);if(t!=i){let n=[];for(let r of i){let i=t.indexOf(r);if(i<0)n.push(new tO(r));else{let t=this.plugins[i];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:n,clientHeight:r}=this.scrollDOM,o=n>i-r-4?i:n;try{for(let e=0;;e++){this.updateState=1;let i=this.viewport,n=this.viewState.lineBlockAtHeight(o),r=this.viewState.measure(this);if(!r&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&r||([this.measureRequests,s]=[s,this.measureRequests]);let a=s.map((e=>{try{return e.read(this)}catch(e){return Kl(this.state,e),ru}})),l=OO.create(this,this.state,[]),O=!1,c=!1;l.flags|=r,t?t.flags|=r:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),O=this.docView.update(l));for(let e=0;e1||e<-1)&&(this.scrollDOM.scrollTop+=e,c=!0)}if(O&&this.docView.updateSelection(!0),this.viewport.from==i.from&&this.viewport.to==i.to&&!c&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Il))e(t)}get themeClasses(){return Uc+" "+(this.state.facet(Ic)?Dc:jc)+" "+this.state.facet(Mc)}updateAttrs(){let e=su(this,iO,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Fl)?"true":"false",class:"cm-content",style:`${Ol.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),su(this,nO,t);let i=this.observer.ignore((()=>{let i=vl(this.contentDOM,this.contentAttrs,t),n=vl(this.dom,this.editorAttrs,e);return i||n}));return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let e of i.effects)e.is(iu.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(aO),ga.mount(this.root,this.styleModules.concat(Bc).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e))||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return UO(this,e,IO(this,e,t,i))}moveByGroup(e,t){return UO(this,e,IO(this,e,t,(t=>function(e,t,i){let n=e.state.charCategorizer(t),r=n(i);return e=>{let t=n(e);return r==$r.Space&&(r=t),r==t}}(this,e.head,t))))}moveToLineBoundary(e,t,i=!0){return function(e,t,i,n){let r=e.state.doc.lineAt(t.head),o=n&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(r.from),s=e.posAtCoords({x:i==(n==cO.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return Rn.cursor(s,i?-1:1)}let s=Nl.find(e.docView,t.head),a=s?i?s.posAtEnd:s.posAtStart:i?r.to:r.from;return Rn.cursor(a,i?-1:1)}(this,e,t,i)}moveVertically(e,t,i){return UO(this,e,function(e,t,i,n){let r=t.head,o=i?1:-1;if(r==(i?e.state.doc.length:0))return Rn.cursor(r,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),O=e.coordsAtPos(r),c=e.documentTop;if(O)null==a&&(a=O.left-l.left),s=o<0?O.top:O.bottom;else{let t=e.viewState.lineBlockAt(r);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),s=(o<0?t.top:t.bottom)+c}let u=l.left+a,d=null!=n?n:e.defaultLineHeight>>1;for(let i=0;;i+=10){let n=s+(d+i)*o,O=zO(e,{x:u,y:n},!1,o);if(nl.bottom||(o<0?Or))return Rn.cursor(O,t.assoc,void 0,a)}}(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),zO(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(e),r=this.bidiSpans(n);return qa(i,r[QO.find(r,e-n.from,-1,t)].dir==cO.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Dl)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>nu)return _O(e.length);let t=this.textDirectionAt(e.from);for(let i of this.bidiCache)if(i.from==e.from&&i.dir==t)return i.order;let i=function(e,t){let i=e.length,n=t==uO?1:2,r=t==uO?2:1;if(!e||1==n&&!bO.test(e))return _O(i);for(let t=0,r=n,o=n;t=0;e-=3)if(gO[e+1]==-o){let t=gO[e+2],i=2&t?n:4&t?1&t?r:n:0;i&&(yO[a]=yO[gO[e]]=i),l=e;break}}else{if(189==gO.length)break;gO[l++]=a,gO[l++]=t,gO[l++]=O}else if(2==(s=yO[a])||1==s){let e=s==n;O=e?0:1;for(let t=l-3;t>=0;t-=3){let i=gO[t+2];if(2&i)break;if(e)gO[t+2]|=2;else{if(4&i)break;gO[t+2]|=4}}}for(let e=0;et;){let e=i,n=2!=yO[--i];for(;i>t&&n==(2!=yO[i-1]);)i--;o.push(new QO(i,e,n?2:1))}else o.push(new QO(t,e,0))}else for(let e=0;eDate.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{za(this.contentDOM),this.docView.updateSelection()}))}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Bl.of(new Ll("number"==typeof e?Rn.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return eO.define((()=>({})),{eventHandlers:e})}static theme(e,t){let i=ga.newName(),n=[Mc.of(i),aO.of(Lc(`.${i}`,e))];return t&&t.dark&&n.push(Ic.of(!0)),n}static baseTheme(e){return Gn.lowest(aO.of(Lc("."+Uc,e,Gc)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&Ga.get(i)||Ga.get(e);return(null===(t=null==n?void 0:n.rootView)||void 0===t?void 0:t.view)||null}}iu.styleModule=aO,iu.inputHandler=Ul,iu.focusChangeEffect=jl,iu.perLineTextDirection=Dl,iu.exceptionSink=Ml,iu.updateListener=Il,iu.editable=Fl,iu.mouseSelectionStyle=zl,iu.dragMovesSelection=Zl,iu.clickAddsSelectionRange=Yl,iu.decorations=rO,iu.atomicRanges=oO,iu.scrollMargins=sO,iu.darkTheme=Ic,iu.contentAttributes=nO,iu.editorAttributes=iO,iu.lineWrapping=iu.contentAttributes.of({class:"cm-lineWrapping"}),iu.announce=cr.define();const nu=4096,ru={};class ou{constructor(e,t,i,n){this.from=e,this.to=t,this.dir=i,this.order=n}static update(e,t){if(t.empty)return e;let i=[],n=e.length?e[e.length-1].dir:cO.LTR;for(let r=Math.max(0,e.length-10);r=0;r--){let t=n[r],o="function"==typeof t?t(e):t;o&&Pl(o,i)}return i}const au=Ol.mac?"mac":Ol.windows?"win":Ol.linux?"linux":"key";function lu(e,t,i){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==i&&t.shiftKey&&(e="Shift-"+e),e}const Ou=Gn.default(iu.domEventHandlers({keydown:(e,t)=>fu(du(t.state),e,t,"editor")})),cu=Nn.define({enables:Ou}),uu=new WeakMap;function du(e){let t=e.facet(cu),i=uu.get(t);return i||uu.set(t,i=function(e,t=au){let i=Object.create(null),n=Object.create(null),r=(e,t)=>{let i=n[e];if(null==i)n[e]=t;else if(i!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,n,o,s)=>{var a,l;let O=i[e]||(i[e]=Object.create(null)),c=n.split(/ (?!$)/).map((e=>function(e,t){const i=e.split(/-(?!$)/);let n,r,o,s,a=i[i.length-1];"Space"==a&&(a=" ");for(let e=0;e{let n=hu={view:t,prefix:i,scope:e};return setTimeout((()=>{hu==n&&(hu=null)}),4e3),!0}]})}let u=c.join(" ");r(u,!1);let d=O[u]||(O[u]={preventDefault:!1,run:(null===(l=null===(a=O._any)||void 0===a?void 0:a.run)||void 0===l?void 0:l.slice())||[]});o&&d.run.push(o),s&&(d.preventDefault=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=i[t]||(i[t]=Object.create(null));e._any||(e._any={preventDefault:!1,run:[]});for(let t in e)e[t].run.push(n.any)}let r=n[t]||n.key;if(r)for(let t of e)o(t,r,n.run,n.preventDefault),n.shift&&o(t,"Shift-"+r,n.shift,n.preventDefault)}return i}(t.reduce(((e,t)=>e.concat(t)),[]))),i}let hu=null;function fu(e,t,i,n){let r=function(e){var t=!(va&&(e.ctrlKey||e.altKey||e.metaKey)||wa&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?ya:Qa)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),o=$n(mn(r,0))==r.length&&" "!=r,s="",a=!1;hu&&hu.view==i&&hu.scope==n&&(s=hu.prefix+" ",(a=LO.indexOf(t.keyCode)<0)&&(hu=null));let l,O,c=new Set,u=e=>{if(e){for(let n of e.run)if(!c.has(n)&&(c.add(n),n(i,t)))return!0;e.preventDefault&&(a=!0)}return!1},d=e[n];if(d){if(u(d[s+lu(r,t,!o)]))return!0;if(o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Ol.windows&&t.ctrlKey&&t.altKey)&&(l=Qa[t.keyCode])&&l!=r){if(u(d[s+lu(l,t,!0)]))return!0;if(t.shiftKey&&(O=ya[t.keyCode])!=r&&O!=l&&u(d[s+lu(O,t,!1)]))return!0}else if(o&&t.shiftKey&&u(d[s+lu(r,t,!0)]))return!0;if(u(d._any))return!0}return a}class pu{constructor(e,t,i,n,r){this.className=e,this.left=t,this.top=i,this.width=n,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let r=mu(e);return[new pu(t,n.left-r.left,n.top-r.top,null,n.bottom-n.top)]}return function(e,t,i){if(i.to<=e.viewport.from||i.from>=e.viewport.to)return[];let n=Math.max(i.from,e.viewport.from),r=Math.min(i.to,e.viewport.to),o=e.textDirection==cO.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=mu(e),O=s.querySelector(".cm-line"),c=O&&window.getComputedStyle(O),u=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),d=a.right-(c?parseInt(c.paddingRight):0),h=$u(e,n),f=$u(e,r),p=h.type==xl.Text?h:null,m=f.type==xl.Text?f:null;if(e.lineWrapping&&(p&&(p=gu(e,n,p)),m&&(m=gu(e,r,m))),p&&m&&p.from==m.from)return $(b(i.from,i.to,p));{let t=p?b(i.from,null,p):Q(h,!1),n=m?b(null,i.to,m):Q(f,!0),r=[];return(p||h).to<(m||f).from-1?r.push(g(u,t.bottom,d,n.top)):t.bottomO&&n.from=o)break;a>r&&l(Math.max(e,r),null==t&&e<=O,Math.min(a,o),null==i&&a>=c,s.dir)}if(r=n.to+1,r>=o)break}return 0==a.length&&l(O,null==t,c,null==i,e.textDirection),{top:r,bottom:s,horizontal:a}}function Q(e,t){let i=a.top+(t?e.top:e.bottom);return{top:i,bottom:i,horizontal:[]}}}(e,t,i)}}function mu(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==cO.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function gu(e,t,i){let n=Rn.cursor(t);return{from:Math.max(i.from,e.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,e.moveToLineBoundary(n,!0,!0).from),type:xl.Text}}function $u(e,t){let i=e.lineBlockAt(t);if(Array.isArray(i.type))for(let e of i.type)if(e.to>t||e.to==t&&(e.to==i.to||e.type==xl.Text))return e;return i}class bu{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Qu)!=e.state.facet(Qu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Qu);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Qu=Nn.define();function yu(e){return[eO.define((t=>new bu(t,e))),Qu.of(e)]}const _u=!Ol.ios,Pu=Nn.define({combine:e=>Pr(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function wu(e={}){return[Pu.of(e),Xu,Su,Tu,Gl.of(!0)]}function vu(e){return e.startState.facet(Pu)!=e.state.facet(Pu)}const Xu=yu({above:!0,markers(e){let{state:t}=e,i=t.facet(Pu),n=[];for(let r of t.selection.ranges){let o=r==t.selection.main;if(r.empty?!o||_u:i.drawRangeCursor){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=r.empty?r:Rn.cursor(r.head,r.head>r.anchor?-1:1);for(let r of pu.forRange(e,t,i))n.push(r)}}return n},update(e,t){e.transactions.some((e=>e.selection))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let i=vu(e);return i&&xu(e.state,t),e.docChanged||e.selectionSet||i},mount(e,t){xu(t.state,e)},class:"cm-cursorLayer"});function xu(e,t){t.style.animationDuration=e.facet(Pu).cursorBlinkRate+"ms"}const Su=yu({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:pu.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||vu(e),class:"cm-selectionLayer"}),ku={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};_u&&(ku[".cm-line"].caretColor="transparent !important");const Tu=Gn.highest(iu.theme(ku));function Ru(e,t,i,n,r){t.lastIndex=0;for(let o,s=e.iterRange(i,n),a=i;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=t.exec(s.value);)r(a+o.index,o)}class Wu{constructor(e){const{regexp:t,decoration:i,decorate:n,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,n)this.addMatch=(e,t,i,r)=>n(r,i,i+e[0].length,e,t);else if("function"==typeof i)this.addMatch=(e,t,n,r)=>{let o=i(e,t,n);o&&r(n,n+e[0].length,o)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,n,r)=>r(n,n+e[0].length,i)}this.boundary=r,this.maxLength=o}createDeco(e){let t=new kr,i=t.add.bind(t);for(let{from:t,to:n}of function(e,t){let i=e.visibleRanges;if(1==i.length&&i[0].from==e.viewport.from&&i[0].to==e.viewport.to)return i;let n=[];for(let{from:r,to:o}of i)r=Math.max(e.state.doc.lineAt(r).from,r-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),n.length&&n[n.length-1].to>=r?n[n.length-1].to=o:n.push({from:r,to:o});return n}(e,this.maxLength))Ru(e.state.doc,this.regexp,t,n,((t,n)=>this.addMatch(n,e,t,i)));return t.finish()}updateDeco(e,t){let i=1e9,n=-1;return e.docChanged&&e.changes.iterChanges(((t,r,o,s)=>{s>e.view.viewport.from&&o1e3?this.createDeco(e.view):n>-1?this.updateRange(e.view,t.map(e.changes),i,n):t}updateRange(e,t,i,n){for(let r of e.visibleRanges){let o=Math.max(r.from,i),s=Math.min(r.to,n);if(s>o){let i=e.state.doc.lineAt(o),n=i.toi.from;o--)if(this.boundary.test(i.text[o-1-i.from])){a=o;break}for(;sc.push(i.range(e,t));if(i==n)for(this.regexp.lastIndex=a-i.from;(O=this.regexp.exec(i.text))&&O.indexthis.addMatch(i,e,t,u)));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>el,add:c})}}return t}}const Au=null!=/x/.unicode?"gu":"g",Nu=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",Au),Cu={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let qu=null;const Eu=Nn.define({combine(e){let t=Pr(e,{render:null,specialChars:Nu,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==qu&&"undefined"!=typeof document&&document.body){let t=document.body.style;qu=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return qu||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,Au)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Au)),t}});function Vu(e={}){return[Eu.of(e),Yu||(Yu=eO.fromClass(class{constructor(e){this.view=e,this.decorations=Sl.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Eu)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new Wu({regexp:e.specialChars,decoration:(t,i,n)=>{let{doc:r}=i.state,o=mn(t[0],0);if(9==o){let e=r.lineAt(n),t=i.state.tabSize,o=Zr(e.text,t,n-e.from);return Sl.replace({widget:new zu((t-o%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[o]||(this.decorationCache[o]=Sl.replace({widget:new Zu(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Eu);e.startState.facet(Eu)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let Yu=null;class Zu extends Xl{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),i=e.state.phrase("Control character")+" "+(Cu[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,t);if(n)return n;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class zu extends Xl{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Mu extends Xl{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?Ra(e.firstChild):[];return t.length?qa(t[0],"rtl"!=window.getComputedStyle(e).direction):null}ignoreEvent(){return!1}}function Iu(e){return eO.fromClass(class{constructor(t){this.view=t,this.placeholder=Sl.set([Sl.widget({widget:new Mu(e),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?Sl.none:this.placeholder}},{decorations:e=>e.decorations})}function Uu(e,t){let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),n=e.state.doc.lineAt(i),r=i-n.from,o=r>2e3?-1:r==n.length?function(e,t){let i=e.coordsAtPos(e.viewport.from);return i?Math.round(Math.abs((i.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Zr(n.text,e.state.tabSize,i-n.from);return{line:n.number,col:o,off:r}}function ju(e,t){let i=Uu(e,t),n=e.state.selection;return i?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(i.line).from),r=e.state.doc.lineAt(t);i={line:r.number,col:i.col,off:Math.min(i.off,r.length)},n=n.map(e.changes)}},get(t,r,o){let s=Uu(e,t);if(!s)return n;let a=function(e,t,i){let n=Math.min(t.line,i.line),r=Math.max(t.line,i.line),o=[];if(t.off>2e3||i.off>2e3||t.col<0||i.col<0){let s=Math.min(t.off,i.off),a=Math.max(t.off,i.off);for(let t=n;t<=r;t++){let i=e.doc.line(t);i.length<=a&&o.push(Rn.range(i.from+s,i.to+a))}}else{let s=Math.min(t.col,i.col),a=Math.max(t.col,i.col);for(let t=n;t<=r;t++){let i=e.doc.line(t),n=zr(i.text,s,e.tabSize,!0);if(n<0)o.push(Rn.cursor(i.to));else{let t=zr(i.text,a,e.tabSize);o.push(Rn.range(i.from+n,i.from+t))}}}return o}(e.state,i,s);return a.length?o?Rn.create(a.concat(n.ranges)):Rn.create(a):n}}:null}function Du(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return iu.mouseSelectionStyle.of(((e,i)=>t(i)?ju(e,i):null))}const Gu="-10000px";class Lu{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter((e=>e)),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),n=i.filter((e=>e));if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let r=[];for(let t=0;t{var t,i,n;return{position:Ol.ios?"absolute":(null===(t=e.find((e=>e.position)))||void 0===t?void 0:t.position)||"fixed",parent:(null===(i=e.find((e=>e.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=e.find((e=>e.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||Bu}}}),Fu=new WeakMap,Hu=eO.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Ku);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Lu(e,td,(e=>this.createTooltip(e))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e);t&&this.observeIntersection();let i=t||e.geometryChanged,n=e.state.facet(Ku);if(n.position!=this.position){this.position=n.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top=Gu,this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)})),size:this.manager.tooltipViews.map((({dom:e})=>e.getBoundingClientRect())),space:this.view.state.facet(Ku).tooltipSpace(this.view)}}writeMeasure(e){var t;let{editor:i,space:n}=e,r=[];for(let o=0;o=Math.min(i.bottom,n.bottom)||O.rightMath.min(i.right,n.right)+.1){l.style.top=Gu;continue}let u=s.arrow?a.dom.querySelector(".cm-tooltip-arrow"):null,d=u?7:0,h=c.right-c.left,f=null!==(t=Fu.get(a))&&void 0!==t?t:c.bottom-c.top,p=a.offset||ed,m=this.view.textDirection==cO.LTR,g=c.width>n.right-n.left?m?n.left:n.right-c.width:m?Math.min(O.left-(u?14:0)+p.x,n.right-h):Math.max(n.left,O.left-h+(u?14:0)-p.x),$=!!s.above;!s.strictSide&&($?O.top-(c.bottom-c.top)-p.yn.bottom)&&$==n.bottom-O.bottom>O.top-n.top&&($=!$);let b=($?O.top-n.top:n.bottom-O.bottom)-d;if(bg&&e.topQ&&(Q=$?e.top-f-2-d:e.bottom+d+2);"absolute"==this.position?(l.style.top=Q-e.parent.top+"px",l.style.left=g-e.parent.left+"px"):(l.style.top=Q+"px",l.style.left=g+"px"),u&&(u.style.left=O.left+(m?p.x:-p.x)-(g+14-7)+"px"),!0!==a.overlap&&r.push({left:g,top:Q,right:y,bottom:Q+f}),l.classList.toggle("cm-tooltip-above",$),l.classList.toggle("cm-tooltip-below",!$),a.positioned&&a.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=Gu}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Ju=iu.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ed={x:0,y:0},td=Nn.define({enables:[Hu,Ju]}),id=Nn.define();class nd{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Lu(e,id,(e=>this.createHostedView(e)))}static create(e){return new nd(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}}const rd=td.compute([id],(e=>{let t=e.facet(id).filter((e=>e));return 0===t.length?null:{pos:Math.min(...t.map((e=>e.pos))),end:Math.max(...t.filter((e=>null!=e.end)).map((e=>e.end))),create:nd.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class od{constructor(e,t,i,n,r){this.view=e,this.source=t,this.field=i,this.setHover=n,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;ei.bottom||e.xi.right+this.view.defaultCharacterWidth)return;let n=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find((e=>e.from<=t&&e.to>=t)),r=n&&n.dir==cO.RTL?-1:1,o=this.source(this.view,t,e.x{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))}),(e=>Kl(this.view.state,e,"hover tooltip")))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!sd(this.lastMove.target)||this.pending){let{pos:n}=i||this.pending,r=null!==(t=null==i?void 0:i.end)&&void 0!==t?t:n;(n==r?this.view.posAtCoords(this.lastMove)==n:function(e,t,i,n,r,o){let s=document.createRange(),a=e.domAtPos(t),l=e.domAtPos(i);s.setEnd(l.node,l.offset),s.setStart(a.node,a.offset);let O=s.getClientRects();s.detach();for(let e=0;e-1?i.panels[n]:null}const ud=eO.fromClass(class{constructor(e){this.input=e.state.facet(fd),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(Od);this.top=new dd(e,!0,t.topContainer),this.bottom=new dd(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(Od);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new dd(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new dd(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=e.state.facet(fd);if(i!=this.input){let t=i.filter((e=>e)),n=[],r=[],o=[],s=[];for(let i of t){let t,a=this.specs.indexOf(i);a<0?(t=i(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),n.push(t),(t.top?r:o).push(t)}this.specs=t,this.panels=n,this.top.sync(r),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>iu.scrollMargins.of((t=>{let i=t.plugin(e);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class dd{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=hd(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=hd(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function hd(e){let t=e.nextSibling;return e.remove(),t}const fd=Nn.define({enables:ud});class pd extends wr{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}pd.prototype.elementClass="",pd.prototype.toDOM=void 0,pd.prototype.mapMode=yn.TrackBefore,pd.prototype.startSide=pd.prototype.endSide=-1,pd.prototype.point=!0;const md=Nn.define(),gd=Nn.define();const $d=Nn.define({combine:e=>e.some((e=>e))});function bd(e){let t=[Qd];return e&&!1===e.fixed&&t.push($d.of(!0)),t}const Qd=eO.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=e.state.facet(gd).map((t=>new wd(e,t)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet($d),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,i=e.view.viewport,n=Math.min(t.to,i.to)-Math.max(t.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet($d)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let i=Sr.iter(this.view.state.facet(md),this.view.viewport.from),n=[],r=this.gutters.map((e=>new Pd(e,this.view.viewport,-this.view.documentPadding.top)));for(let e of this.view.viewportLineBlocks){let t;if(Array.isArray(e.type)){for(let i of e.type)if(i.type==xl.Text){t=i;break}}else t=e.type==xl.Text?e:void 0;if(t){n.length&&(n=[]),_d(i,n,e.from);for(let e of r)e.line(this.view,t,n)}}for(let e of r)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(gd),i=e.state.facet(gd),n=e.docChanged||e.heightChanged||e.viewportChanged||!Sr.eq(e.startState.facet(md),e.state.facet(md),e.view.viewport.from,e.view.viewport.to);if(t==i)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let r=[];for(let n of i){let i=t.indexOf(n);i<0?r.push(new wd(this.view,n)):(this.gutters[i].update(e),r.push(this.gutters[i]))}for(let e of this.gutters)e.dom.remove(),r.indexOf(e)<0&&e.destroy();for(let e of r)this.dom.appendChild(e.dom);this.gutters=r}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>iu.scrollMargins.of((t=>{let i=t.plugin(e);return i&&0!=i.gutters.length&&i.fixed?t.textDirection==cO.LTR?{left:i.dom.offsetWidth}:{right:i.dom.offsetWidth}:null}))});function yd(e){return Array.isArray(e)?e:[e]}function _d(e,t,i){for(;e.value&&e.from<=i;)e.from==i&&t.push(e.value),e.next()}class Pd{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Sr.iter(e.markers,t.from)}line(e,t,i){let n=[];_d(this.cursor,n,t.from),i.length&&(n=n.concat(i));let r=this.gutter.config.lineMarker(e,t,n);r&&n.unshift(r);let o=this.gutter;if(0==n.length&&!o.config.renderEmptyElements)return;let s=t.top-this.height;if(this.i==o.elements.length){let i=new vd(e,t.height,s,n);o.elements.push(i),o.dom.appendChild(i.dom)}else o.elements[this.i].update(e,t.height,s,n);this.height=t.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class wd{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,(n=>{let r,o=n.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();r=(e.top+e.bottom)/2}else r=n.clientY;let s=e.lineBlockAtHeight(r-e.documentTop);t.domEventHandlers[i](e,s,n)&&n.preventDefault()}));this.markers=yd(t.markers(e)),t.initialSpacer&&(this.spacer=new vd(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=yd(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let i=e.view.viewport;return!Sr.eq(this.markers,t,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class vd{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let i=0;iPr(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let e in t){let n=i[e],r=t[e];i[e]=n?(e,t,i)=>n(e,t,i)||r(e,t,i):r}return i}})});class Sd extends pd{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function kd(e,t){return e.state.facet(xd).formatNumber(t,e.state)}const Td=gd.compute([xd],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Xd),lineMarker:(e,t,i)=>i.some((e=>e.toDOM))?null:new Sd(kd(e,e.state.doc.lineAt(t.from).number)),lineMarkerChange:e=>e.startState.facet(xd)!=e.state.facet(xd),initialSpacer:e=>new Sd(kd(e,Wd(e.state.doc.lines))),updateSpacer(e,t){let i=kd(t.view,Wd(t.view.state.doc.lines));return i==e.number?e:new Sd(i)},domEventHandlers:e.facet(xd).domEventHandlers})));function Rd(e={}){return[xd.of(e),bd(),Td]}function Wd(e){let t=9;for(;tt.modified.indexOf(e)>-1?t:qd.get(t.base||t,t.modified.concat(e).sort(((e,t)=>e.id-t.id)))}}let Cd=0;class qd{constructor(){this.instances=[],this.id=Cd++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find((i=>i.base==e&&function(e,t){return e.length==t.length&&e.every(((e,i)=>e==t[i]))}(t,i.modified)));if(i)return i;let n=[],r=new Nd(n,e,t);for(let e of t)e.instances.push(r);let o=function(e){let t=[[]];for(let i=0;it.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)n.push(qd.get(t,e));return r}}function Ed(e){let t=Object.create(null);for(let i in e){let n=e[i];Array.isArray(n)||(n=[n]);for(let e of i.split(" "))if(e){let i=[],r=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){r=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!n)throw new RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){r=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=i.length-1,a=i[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new Yd(n,r,s>0?i.slice(0,s):null);t[a]=l.sort(t[a])}}return Vd.add(t)}const Vd=new jr;class Yd{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=r;for(let n of e)for(let e of n.set){let n=i[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}function zd(e,t,i,n=0,r=e.length){let o=new Md(n,Array.isArray(t)?t:[t],i);o.highlightRange(e.cursor(),n,r,"",o.highlighters),o.flush(r)}Yd.empty=new Yd([],2,null);class Md{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,r){let{type:o,from:s,to:a}=e;if(s>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter((e=>!e.scope||e.scope(o))));let l=n,O=function(e){let t=e.type.prop(Vd);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||Yd.empty,c=function(e,t){let i=null;for(let n of e){let e=n.style(t);e&&(i=i?i+" "+e:e)}return i}(r,O.tags);if(c&&(l&&(l+=" "),l+=c,1==O.mode&&(n+=(n?" ":"")+c)),this.startSpan(e.from,l),O.opaque)return;let u=e.tree&&e.tree.prop(jr.mounted);if(u&&u.overlay){let o=e.node.enter(u.overlay[0].from+s,1),O=this.highlighters.filter((e=>!e.scope||e.scope(u.tree.type))),c=e.firstChild();for(let d=0,h=s;;d++){let f=d=p)&&e.nextSibling()););if(!f||p>i)break;h=f.to+s,h>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(i,h),n,O),this.startSpan(h,l))}c&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,n,r),this.startSpan(Math.min(i,e.to),l)}}while(e.nextSibling());e.parent()}}}const Id=Nd.define,Ud=Id(),jd=Id(),Dd=Id(jd),Gd=Id(jd),Ld=Id(),Bd=Id(Ld),Kd=Id(Ld),Fd=Id(),Hd=Id(Fd),Jd=Id(),eh=Id(),th=Id(),ih=Id(th),nh=Id(),rh={comment:Ud,lineComment:Id(Ud),blockComment:Id(Ud),docComment:Id(Ud),name:jd,variableName:Id(jd),typeName:Dd,tagName:Id(Dd),propertyName:Gd,attributeName:Id(Gd),className:Id(jd),labelName:Id(jd),namespace:Id(jd),macroName:Id(jd),literal:Ld,string:Bd,docString:Id(Bd),character:Id(Bd),attributeValue:Id(Bd),number:Kd,integer:Id(Kd),float:Id(Kd),bool:Id(Ld),regexp:Id(Ld),escape:Id(Ld),color:Id(Ld),url:Id(Ld),keyword:Jd,self:Id(Jd),null:Id(Jd),atom:Id(Jd),unit:Id(Jd),modifier:Id(Jd),operatorKeyword:Id(Jd),controlKeyword:Id(Jd),definitionKeyword:Id(Jd),moduleKeyword:Id(Jd),operator:eh,derefOperator:Id(eh),arithmeticOperator:Id(eh),logicOperator:Id(eh),bitwiseOperator:Id(eh),compareOperator:Id(eh),updateOperator:Id(eh),definitionOperator:Id(eh),typeOperator:Id(eh),controlOperator:Id(eh),punctuation:th,separator:Id(th),bracket:ih,angleBracket:Id(ih),squareBracket:Id(ih),paren:Id(ih),brace:Id(ih),content:Fd,heading:Hd,heading1:Id(Hd),heading2:Id(Hd),heading3:Id(Hd),heading4:Id(Hd),heading5:Id(Hd),heading6:Id(Hd),contentSeparator:Id(Fd),list:Id(Fd),quote:Id(Fd),emphasis:Id(Fd),strong:Id(Fd),link:Id(Fd),monospace:Id(Fd),strikethrough:Id(Fd),inserted:Id(),deleted:Id(),changed:Id(),invalid:Id(),meta:nh,documentMeta:Id(nh),annotation:Id(nh),processingInstruction:Id(nh),definition:Nd.defineModifier(),constant:Nd.defineModifier(),function:Nd.defineModifier(),standard:Nd.defineModifier(),local:Nd.defineModifier(),special:Nd.defineModifier()};var oh;Zd([{tag:rh.link,class:"tok-link"},{tag:rh.heading,class:"tok-heading"},{tag:rh.emphasis,class:"tok-emphasis"},{tag:rh.strong,class:"tok-strong"},{tag:rh.keyword,class:"tok-keyword"},{tag:rh.atom,class:"tok-atom"},{tag:rh.bool,class:"tok-bool"},{tag:rh.url,class:"tok-url"},{tag:rh.labelName,class:"tok-labelName"},{tag:rh.inserted,class:"tok-inserted"},{tag:rh.deleted,class:"tok-deleted"},{tag:rh.literal,class:"tok-literal"},{tag:rh.string,class:"tok-string"},{tag:rh.number,class:"tok-number"},{tag:[rh.regexp,rh.escape,rh.special(rh.string)],class:"tok-string2"},{tag:rh.variableName,class:"tok-variableName"},{tag:rh.local(rh.variableName),class:"tok-variableName tok-local"},{tag:rh.definition(rh.variableName),class:"tok-variableName tok-definition"},{tag:rh.special(rh.variableName),class:"tok-variableName2"},{tag:rh.definition(rh.propertyName),class:"tok-propertyName tok-definition"},{tag:rh.typeName,class:"tok-typeName"},{tag:rh.namespace,class:"tok-namespace"},{tag:rh.className,class:"tok-className"},{tag:rh.macroName,class:"tok-macroName"},{tag:rh.propertyName,class:"tok-propertyName"},{tag:rh.operator,class:"tok-operator"},{tag:rh.comment,class:"tok-comment"},{tag:rh.meta,class:"tok-meta"},{tag:rh.invalid,class:"tok-invalid"},{tag:rh.punctuation,class:"tok-punctuation"}]);const sh=new jr;function ah(e){return Nn.define({combine:e?t=>t.concat(e):void 0})}const lh=new jr;class Oh{constructor(e,t,i=[],n=""){this.data=e,this.name=n,_r.prototype.hasOwnProperty("tree")||Object.defineProperty(_r.prototype,"tree",{get(){return dh(this)}}),this.parser=t,this.extension=[yh.of(this),_r.languageData.of(((e,t,i)=>{let n=ch(e,t,i),r=n.type.prop(sh);if(!r)return[];let o=e.facet(r),s=n.type.prop(lh);if(s){let r=n.resolve(t-n.from,i);for(let t of s)if(t.test(r,e)){let i=e.facet(t.facet);return"replace"==t.type?i:i.concat(o)}}return o}))].concat(i)}isActiveAt(e,t,i=-1){return ch(e,t,i).type.prop(sh)==this.data}findRegions(e){let t=e.facet(yh);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=(e,t)=>{if(e.prop(sh)==this.data)return void i.push({from:t,to:t+e.length});let r=e.prop(jr.mounted);if(r){if(r.tree.prop(sh)==this.data){if(r.overlay)for(let e of r.overlay)i.push({from:e.from+t,to:e.to+t});else i.push({from:t,to:t+e.length});return}if(r.overlay){let e=i.length;if(n(r.tree,r.overlay[0].from+t),i.length>e)return}}for(let i=0;ie.isTop?t:void 0))]}),e.name)}configure(e,t){return new uh(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function dh(e){let t=e.field(Oh.state,!1);return t?t.tree:Jr.empty}class hh{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let fh=null;class ph{constructor(e,t,i=[],n,r,o,s,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=r,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new ph(e,t,[],Jr.empty,0,i,[],null)}startParse(){return this.parser.startParse(new hh(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=Jr.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((()=>{for(;!(t=this.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(go.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=fh;fh=this;try{return e()}finally{fh=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=mh(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:r,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,i,n,r)=>t.push({fromA:e,toA:i,fromB:n,toB:r}))),i=go.applyChanges(i,t),n=Jr.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);ie.from&&(this.fragments=mh(this.fragments,i,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends $o{createParse(t,i,n){let r=n[0].from,o=n[n.length-1].to;return{parsedPos:r,advance(){let t=fh;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new Jr(Lr.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return fh}}function mh(e,t,i){return go.applyChanges(e,[{fromA:t,toA:i,fromB:t,toB:i}])}class gh{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new gh(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=ph.create(e.facet(yh).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new gh(i)}}Oh.state=zn.define({create:gh.init,update(e,t){for(let e of t.effects)if(e.is(Oh.setState))return e.value;return t.startState.facet(yh)!=t.state.facet(yh)?gh.init(t.state):e.apply(t)}});let $h=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&($h=e=>{let t=-1,i=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(i):cancelIdleCallback(t)});const bh="undefined"!=typeof navigator&&(null===(oh=navigator.scheduling)||void 0===oh?void 0:oh.isInputPending)?()=>navigator.scheduling.isInputPending():null,Qh=eO.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Oh.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Oh.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=$h(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndn+1e3,a=r.context.work((()=>bh&&bh()||Date.now()>o),n+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Oh.setState.of(new gh(r.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>Kl(this.view.state,e))).then((()=>this.workScheduled--)),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),yh=Nn.define({combine:e=>e.length?e[0]:null,enables:e=>[Oh.state,Qh,iu.contentAttributes.compute([e],(t=>{let i=t.facet(e);return i&&i.name?{"data-language":i.name}:{}}))]});class _h{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ph{constructor(e,t,i,n,r,o){this.name=e,this.alias=t,this.extensions=i,this.filename=n,this.loadFunc=r,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((e=>this.support=e),(e=>{throw this.loading=null,e})))}static of(e){let{load:t,support:i}=e;if(!t){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(i)}return new Ph(e.name,(e.alias||[]).concat(e.name).map((e=>e.toLowerCase())),e.extensions||[],e.filename,t,i)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let i=/\.([^.]+)$/.exec(t);if(i)for(let t of e)if(t.extensions.indexOf(i[1])>-1)return t;return null}static matchLanguageName(e,t,i=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some((e=>e==t)))return i;if(i)for(let i of e)for(let e of i.alias){let n=t.indexOf(e);if(n>-1&&(e.length>2||!/\w/.test(t[n-1])&&!/\w/.test(t[n+e.length])))return i}return null}}const wh=Nn.define(),vh=Nn.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((e=>e!=t[0])))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Xh(e){let t=e.facet(vh);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function xh(e,t){let i="",n=e.tabSize,r=e.facet(vh)[0];if("\t"==r){for(;t>=n;)i+="\t",t-=n;r=" "}for(let e=0;e=i.from&&n<=i.to?r&&n==e?{text:"",from:e}:(t<0?n-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return Zr(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:n}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(n);if(e>-1)return e}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Th=new jr;function Rh(e){let t=e.type.prop(Th);if(t)return t;let i,n=e.firstChild;if(n&&(i=n.type.prop(jr.closedBy))){let t=e.lastChild,n=t&&i.indexOf(t.name)>-1;return e=>Eh(e,!0,1,void 0,n&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?Ah:null}function Wh(e,t,i){for(;e;e=e.parent){let n=Rh(e);if(n)return n(Nh.create(i,t,e))}return null}function Ah(){return 0}class Nh extends kh{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new Nh(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(Ch(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Wh(e,this.pos,this.base):0}}function Ch(e,t){for(let i=t;i;i=i.parent)if(e==i)return!0;return!1}function qh({closing:e,align:t=!0,units:i=1}){return n=>Eh(n,t,i,e)}function Eh(e,t,i,n,r){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=n&&o.slice(s,s+n.length)==n||r==e.pos+s,l=t?function(e){let t=e.node,i=t.childAfter(t.from),n=t.lastChild;if(!i)return null;let r=e.options.simulateBreak,o=e.state.doc.lineAt(i.from),s=null==r||r<=o.from?o.to:Math.min(o.to,r);for(let e=i.to;;){let r=t.childAfter(e);if(!r||r==n)return null;if(!r.type.isSkipped)return r.from{let n=e&&e.test(i.textAfter);return i.baseIndent+(n?0:t*i.unit)}}const Yh=Nn.define(),Zh=new jr;function zh(e){let t=e.firstChild,i=e.lastChild;return t&&t.toi)continue;if(r&&o.from=t&&n.to>i&&(r=n)}}return r}(e,t,i)}function Uh(e,t){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return i>=n?void 0:{from:i,to:n}}const jh=cr.define({map:Uh}),Dh=cr.define({map:Uh});function Gh(e){let t=[];for(let{head:i}of e.state.selection.ranges)t.some((e=>e.from<=i&&e.to>=i))||t.push(e.lineBlockAt(i));return t}const Lh=zn.define({create:()=>Sl.none,update(e,t){e=e.map(t.changes);for(let i of t.effects)i.is(jh)&&!Kh(e,i.value.from,i.value.to)?e=e.update({add:[rf.range(i.value.from,i.value.to)]}):i.is(Dh)&&(e=e.update({filter:(e,t)=>i.value.from!=e||i.value.to!=t,filterFrom:i.value.from,filterTo:i.value.to}));if(t.selection){let i=!1,{head:n}=t.selection.main;e.between(n,n,((e,t)=>{en&&(i=!0)})),i&&(e=e.update({filterFrom:n,filterTo:n,filter:(e,t)=>t<=n||e>=n}))}return e},provide:e=>iu.decorations.from(e),toJSON(e,t){let i=[];return e.between(0,t.doc.length,((e,t)=>{i.push(e,t)})),i},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let i=0;i{(!r||r.from>e)&&(r={from:e,to:t})})),r}function Kh(e,t,i){let n=!1;return e.between(t,t,((e,r)=>{e==t&&r==i&&(n=!0)})),n}function Fh(e,t){return e.field(Lh,!1)?t:t.concat(cr.appendConfig.of(nf()))}function Hh(e,t,i=!0){let n=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return iu.announce.of(`${e.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${r}.`)}const Jh=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of Gh(e)){let i=Ih(e.state,t.from,t.to);if(i)return e.dispatch({effects:Fh(e.state,[jh.of(i),Hh(e,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(Lh,!1))return!1;let t=[];for(let i of Gh(e)){let n=Bh(e.state,i.from,i.to);n&&t.push(Dh.of(n),Hh(e,n,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,i=[];for(let n=0;n{let t=e.state.field(Lh,!1);if(!t||!t.size)return!1;let i=[];return t.between(0,e.state.doc.length,((e,t)=>{i.push(Dh.of({from:e,to:t}))})),e.dispatch({effects:i}),!0}}],ef={placeholderDOM:null,placeholderText:"…"},tf=Nn.define({combine:e=>Pr(e,ef)});function nf(e){let t=[Lh,of];return e&&t.push(tf.of(e)),t}const rf=Sl.replace({widget:new class extends Xl{toDOM(e){let{state:t}=e,i=t.facet(tf),n=t=>{let i=e.lineBlockAt(e.posAtDOM(t.target)),n=Bh(e.state,i.from,i.to);n&&e.dispatch({effects:Dh.of(n)}),t.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,n);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=n,r}}});const of=iu.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class sf{constructor(e,t){let i;function n(e){let t=ga.newName();return(i||(i=Object.create(null)))["."+t]=e,t}this.specs=e;const r="string"==typeof t.all?t.all:t.all?n(t.all):void 0,o=t.scope;this.scope=o instanceof Oh?e=>e.prop(sh)==o.data:o?e=>e==o:void 0,this.style=Zd(e.map((e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))}))),{all:r}).style,this.module=i?new ga(i):null,this.themeType=t.themeType}static define(e,t){return new sf(e,t||{})}}const af=Nn.define(),lf=Nn.define({combine:e=>e.length?[e[0]]:null});function Of(e){let t=e.facet(af);return t.length?t:e.facet(lf)}function cf(e,t){let i,n=[uf];return e instanceof sf&&(e.module&&n.push(iu.styleModule.of(e.module)),i=e.themeType),(null==t?void 0:t.fallback)?n.push(lf.of(e)):i?n.push(af.computeN([iu.darkTheme],(t=>t.facet(iu.darkTheme)==("dark"==i)?[e]:[]))):n.push(af.of(e)),n}const uf=Gn.high(eO.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=dh(e.state),this.decorations=this.buildDeco(e,Of(e.state))}update(e){let t=dh(e.state),i=Of(e.state),n=i!=Of(e.startState);t.length{i.add(e,t,this.markCache[n]||(this.markCache[n]=Sl.mark({class:n})))}),n,r);return i.finish()}},{decorations:e=>e.decorations})),df=(sf.define([{tag:rh.meta,color:"#404740"},{tag:rh.link,textDecoration:"underline"},{tag:rh.heading,textDecoration:"underline",fontWeight:"bold"},{tag:rh.emphasis,fontStyle:"italic"},{tag:rh.strong,fontWeight:"bold"},{tag:rh.strikethrough,textDecoration:"line-through"},{tag:rh.keyword,color:"#708"},{tag:[rh.atom,rh.bool,rh.url,rh.contentSeparator,rh.labelName],color:"#219"},{tag:[rh.literal,rh.inserted],color:"#164"},{tag:[rh.string,rh.deleted],color:"#a11"},{tag:[rh.regexp,rh.escape,rh.special(rh.string)],color:"#e40"},{tag:rh.definition(rh.variableName),color:"#00f"},{tag:rh.local(rh.variableName),color:"#30a"},{tag:[rh.typeName,rh.namespace],color:"#085"},{tag:rh.className,color:"#167"},{tag:[rh.special(rh.variableName),rh.macroName],color:"#256"},{tag:rh.definition(rh.propertyName),color:"#00c"},{tag:rh.comment,color:"#940"},{tag:rh.invalid,color:"#f00"}]),iu.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Nn.define({combine:e=>Pr(e,{afterCursor:!0,brackets:"()[]{}",maxScanDistance:1e4,renderMatch:pf})})),hf=Sl.mark({class:"cm-matchingBracket"}),ff=Sl.mark({class:"cm-nonmatchingBracket"});function pf(e){let t=[],i=e.matched?hf:ff;return t.push(i.range(e.start.from,e.start.to)),e.end&&t.push(i.range(e.end.from,e.end.to)),t}zn.define({create:()=>Sl.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let i=[],n=t.state.facet(df);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=bf(t.state,e.head,-1,n)||e.head>0&&bf(t.state,e.head-1,1,n)||n.afterCursor&&(bf(t.state,e.head,1,n)||e.headiu.decorations.from(e)});const mf=new jr;function gf(e,t,i){let n=e.prop(t<0?jr.openedBy:jr.closedBy);if(n)return n;if(1==e.name.length){let n=i.indexOf(e.name);if(n>-1&&n%2==(t<0?1:0))return[i[n+t]]}return null}function $f(e){let t=e.type.prop(mf);return t?t(e.node):e}function bf(e,t,i,n={}){let r=n.maxScanDistance||1e4,o=n.brackets||"()[]{}",s=dh(e),a=s.resolveInner(t,i);for(let n=a;n;n=n.parent){let r=gf(n.type,i,o);if(r&&n.from0?t>=s.from&&ts.from&&t<=s.to))return Qf(e,t,i,n,s,r,o)}}return function(e,t,i,n,r,o,s){let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=i>0)return null;let O={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=o;){let o=c.value;i<0&&(e+=o.length);let a=t+e*i;for(let e=i>0?0:o.length-1,t=i>0?o.length:-1;e!=t;e+=i){let t=s.indexOf(o[e]);if(!(t<0||n.resolveInner(a+e,1).type!=r))if(t%2==0==i>0)u++;else{if(1==u)return{start:O,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}i>0&&(e+=o.length)}return c.done?{start:O,matched:!1}:null}(e,t,i,s,a.type,r,o)}function Qf(e,t,i,n,r,o,s){let a=n.parent,l={from:r.from,to:r.to},O=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==O&&o.indexOf(c.type.name)>-1&&c.from-1||(Pf.push(e),console.warn(t))}function Xf(e,t){let i=null;for(let n of t.split(".")){let t=e[n]||rh[n];t?"function"==typeof t?i?i=t(i):vf(n,`Modifier ${n} used at start of tag`):i?vf(n,`Tag ${n} used as modifier`):i=t:vf(n,`Unknown highlighting tag ${n}`)}if(!i)return 0;let n=t.replace(/ /g,"_"),r=Lr.define({id:_f.length,name:n,props:[Ed({[n]:i})]});return _f.push(r),r.id}class xf{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=dh(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),n=t.text.slice(i-t.from,this.pos-t.from),r=n.search(Af(e,!1));return r<0?null:{from:i+r,to:this.pos,text:n.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Sf(e){let t=Object.keys(e).join(""),i=/\w/.test(t);return i&&(t=t.replace(/\w/g,"")),`[${i?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function kf(e){let t=e.map((e=>"string"==typeof e?{label:e}:e)),[i,n]=t.every((e=>/^\w+$/.test(e.label)))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),i=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e{let r=e.matchBefore(n);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:i}:null}}function Tf(e,t){return i=>{for(let t=dh(i.state).resolveInner(i.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(i)}}class Rf{constructor(e,t,i,n){this.completion=e,this.source=t,this.match=i,this.score=n}}function Wf(e){return e.selection.main.from}function Af(e,t){var i;let{source:n}=e,r=t&&"^"!=n[0],o="$"!=n[n.length-1];return r||o?new RegExp(`${r?"^":""}(?:${n})${o?"$":""}`,null!==(i=e.flags)&&void 0!==i?i:e.ignoreCase?"i":""):e}const Nf=ar.define();function Cf(e,t,i,n){let{main:r}=e.selection,o=n-i;return Object.assign(Object.assign({},e.changeByRange((s=>s!=r&&o&&e.sliceDoc(s.from-o,s.from+n-r.from)!=e.sliceDoc(i,n)?{range:s}:{changes:{from:s.from-o,to:n==r.from?s.to:s.from+n-r.from,insert:t},range:Rn.cursor(s.from-o+t.length)}))),{userEvent:"input.complete"})}function qf(e,t){const i=t.completion.apply||t.completion.label;let n=t.source;"string"==typeof i?e.dispatch(Object.assign(Object.assign({},Cf(e.state,i,n.from,n.to)),{annotations:Nf.of(t.completion)})):i(e,t.completion,n.from,n.to)}const Ef=new WeakMap;function Vf(e){if(!Array.isArray(e))return e;let t=Ef.get(e);return t||Ef.set(e,t=kf(e)),t}const Yf=cr.define(),Zf=cr.define();class zf{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:($=gn(l))!=$.toLowerCase()?1:$!=$.toUpperCase()?2:0;(!n||1==b&&p||0==g&&0!=b)&&(t[c]==l||i[c]==l&&(u=!0)?o[c++]=n:o.length&&(m=!1)),g=b,n+=$n(l)}return c==a&&0==o[0]&&m?this.result((u?-200:0)-100,o,e):d==a&&0==h?[-200-e.length+(f==e.length?0:-100),0,f]:s>-1?[-700-e.length,s,s+this.pattern.length]:d==a?[-900-e.length,h,f]:c==a?this.result((u?-200:0)-100-700+(m?0:-1100),o,e):2==t.length?null:this.result((n[0]?-700:0)-200-1100,n,e)}result(e,t,i){let n=[e-i.length],r=1;for(let e of t){let t=e+(this.astral?$n(mn(i,e)):1);r>1&&n[r-1]==e?n[r-1]=t:(n[r++]=e,n[r++]=t)}return n}}const Mf=Nn.define({combine:e=>Pr(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Uf,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>If(e(i),t(i)),optionClass:(e,t)=>i=>If(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})});function If(e,t){return e?t?e+" "+t:e:t}function Uf(e,t,i,n,r){let o,s,a=e.textDirection==cO.RTL,l=a,O=!1,c="top",u=t.left-r.left,d=r.right-t.right,h=n.right-n.left,f=n.bottom-n.top;if(l&&u=f||e>t.top?o=i.bottom-t.top:(c="bottom",o=t.bottom-i.top)}return{style:`${c}: ${o}px; max-width: ${s}px`,class:"cm-completionInfo-"+(O?a?"left-narrow":"right-narrow":l?"left":"right")}}function jf(e,t,i){if(e<=i)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/i);return{from:e*i,to:(e+1)*i}}let n=Math.floor((e-t)/i);return{from:e-(n+1)*i,to:e-n*i}}class Df{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:n,selected:r}=i.open,o=e.state.facet(Mf);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map((e=>"cm-completionIcon-"+e))),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:r}=e,o=0;for(let e=1;eo&&n.appendChild(document.createTextNode(r.slice(o,t)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(r.slice(t,s))),a.className="cm-completionMatchedText",o=s}return oe.position-t.position)).map((e=>e.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=jf(n.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(t=>{for(let i,r=t.target;r&&r!=this.dom;r=r.parentNode)if("LI"==r.nodeName&&(i=/-(\d+)$/.exec(r.id))&&+i[1]{let i=e.state.field(this.stateField,!1);i&&i.tooltip&&e.state.facet(Mf).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Zf.of(null)})})),this.list=this.dom.appendChild(this.createListBox(n,i.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}mount(){this.updateSel()}update(e){var t,i,n;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=o&&(this.updateSel(),(null===(t=r.open)||void 0===t?void 0:t.disabled)!=(null===(i=o.open)||void 0===i?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(n=r.open)||void 0===n?void 0:n.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=jf(t.options.length,t.selected,this.view.state.facet(Mf).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:n}=i;if(!n)return;let r="string"==typeof n?document.createTextNode(n):n(i);if(!r)return;"then"in r?r.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)})).catch((e=>Kl(this.view.state,e,"completion info"))):this.addInfoPane(r)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return t&&function(e,t){let i=e.getBoundingClientRect(),n=t.getBoundingClientRect();n.topi.bottom&&(e.scrollTop+=n.bottom-i.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return n.top>Math.min(r.bottom,t.bottom)-10||n.bottomi.from||0==i.from)&&(r=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}const O=n.appendChild(document.createElement("li"));O.id=t+"-"+o,O.setAttribute("role","option");let c=this.optionClass(s);c&&(O.className=c);for(let e of this.optionContent){let t=e(s,this.view.state,a);t&&O.appendChild(t)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew Df(t,e)}function Lf(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class Bf{constructor(e,t,i,n,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=n,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Bf(this.options,Hf(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,n,r){let o=function(e,t){let i=[],n=null,r=e=>{i.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some((t=>t.name==e))||n.push("string"==typeof t?{name:e}:t)}};for(let n of e)if(n.hasResult())if(!1===n.result.filter){let e=n.result.getMatch;for(let t of n.result.options){let o=[1e9-i.length];if(e)for(let i of e(t))o.push(i);r(new Rf(t,n,o,o[0]))}}else{let e,i=new zf(t.sliceDoc(n.from,n.to));for(let t of n.result.options)(e=i.match(t.label))&&r(new Rf(t,n,e,e[0]+(t.boost||0)))}if(n){let e=Object.create(null),t=0,r=(e,t)=>{var i,n;return(null!==(i=e.rank)&&void 0!==i?i:1e9)-(null!==(n=t.rank)&&void 0!==n?n:1e9)||(e.namet.score-e.score||a(e.completion,t.completion))))!s||s.label!=e.completion.label||s.detail!=e.completion.detail||null!=s.type&&null!=e.completion.type&&s.type!=e.completion.type||s.apply!=e.completion.apply?o.push(e):Lf(e.completion)>Lf(s)&&(o[o.length-1]=e),s=e.completion;return o}(e,t);if(!o.length)return n&&e.some((e=>1==e.state))?new Bf(n.options,n.attrs,n.tooltip,n.timestamp,n.selected,!0):null;let s=t.facet(Mf).selectOnOpen?0:-1;if(n&&n.selected!=s&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:Gf(op),above:r.aboveCursor},n?n.timestamp:Date.now(),s,!1)}map(e){return new Bf(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Kf{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Kf(Jf,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Mf),n=(i.override||t.languageDataAt("autocomplete",Wf(t)).map(Vf)).map((t=>(this.active.find((e=>e.source==t))||new tp(t,this.active.some((e=>0!=e.state))?1:0)).update(e,i)));n.length==this.active.length&&n.every(((e,t)=>e==this.active[t]))&&(n=this.active);let r=this.open;r&&e.docChanged&&(r=r.map(e.changes)),e.selection||n.some((t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to)))||!function(e,t){if(e==t)return!0;for(let i=0,n=0;;){for(;i1==e.state))&&(r=null),!r&&n.every((e=>1!=e.state))&&n.some((e=>e.hasResult()))&&(n=n.map((e=>e.hasResult()?new tp(e.source,0):e)));for(let t of e.effects)t.is(rp)&&(r=r&&r.setSelected(t.value,this.id));return n==this.active&&r==this.open?this:new Kf(n,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Ff}}const Ff={"aria-autocomplete":"list"};function Hf(e,t){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(i["aria-activedescendant"]=e+"-"+t),i}const Jf=[];function ep(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class tp{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=ep(e),n=this;i?n=n.handleUserEvent(e,i,t):e.docChanged?n=n.handleChange(e):e.selection&&0!=n.state&&(n=new tp(n.source,0));for(let t of e.effects)if(t.is(Yf))n=new tp(n.source,1,t.value?Wf(e.state):-1);else if(t.is(Zf))n=new tp(n.source,0);else if(t.is(np))for(let e of t.value)e.source==n.source&&(n=e);return n}handleUserEvent(e,t,i){return"delete"!=t&&i.activateOnTyping?new tp(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Wf(e.startState))?new tp(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new tp(this.source,this.state,e.mapPos(this.explicitPos))}}class ip extends tp{constructor(e,t,i,n,r){super(e,2,t),this.result=i,this.from=n,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var n;let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=Wf(e.state);if((this.explicitPos<0?s<=r:so||"delete"==t&&Wf(e.startState)==this.from)return new tp(this.source,"input"==t&&i.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,i,n){if(!e)return!1;let r=t.sliceDoc(i,n);return"function"==typeof e?e(r,i,n,t):Af(e,!0).test(r)}(this.result.validFor,e.state,r,o)?new ip(this.source,l,this.result,r,o):this.result.update&&(a=this.result.update(this.result,r,o,new xf(e.state,s,l>=0)))?new ip(this.source,l,a,a.from,null!==(n=a.to)&&void 0!==n?n:Wf(e.state)):new tp(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new tp(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new ip(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const np=cr.define({map:(e,t)=>e.map((e=>e.map(t)))}),rp=cr.define(),op=zn.define({create:()=>Kf.start(),update:(e,t)=>e.update(t),provide:e=>[td.from(e,(e=>e.tooltip)),iu.contentAttributes.from(e,(e=>e.attrs))]});function sp(e,t="option"){return i=>{let n=i.state.field(op,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+o*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),i.dispatch({effects:rp.of(a)}),!0}}const ap=e=>{let t=e.state.field(op,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp!!e.state.field(op,!1)&&(e.dispatch({effects:Yf.of(!0)}),!0),Op=e=>{let t=e.state.field(op,!1);return!(!t||!t.active.some((e=>0!=e.state))||(e.dispatch({effects:Zf.of(null)}),0))};class cp{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const up=eO.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(op).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(op);if(!e.selectionSet&&!e.docChanged&&e.startState.field(op)==t)return;let i=e.transactions.some((e=>(e.selection||e.docChanged)&&!ep(e)));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){Kl(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some((e=>1==e.state&&!this.running.some((t=>t.active.source==e.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let t of e.transactions)"input"==ep(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(op);for(let e of t.active)1!=e.state||this.running.some((t=>t.active.source==e.source))||this.startQuery(e)}startQuery(e){let{state:t}=this.view,i=Wf(t),n=new xf(t,i,e.explicitPos==i),r=new cp(e,n);this.running.push(r),Promise.resolve(e.source(n)).then((e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:Zf.of(null)}),Kl(this.view.state,e)}))}scheduleAccept(){this.running.every((e=>void 0!==e.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],i=this.view.state.facet(Mf);for(let n=0;ne.source==r.active.source));if(o&&1==o.state)if(null==r.done){let e=new tp(r.active.source,0);for(let t of r.updates)e=e.update(t,i);1!=e.state&&t.push(e)}else this.startQuery(o)}t.length&&this.view.dispatch({effects:np.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(op,!1);if(t&&t.tooltip&&this.view.state.facet(Mf).closeOnBlur){let i=t.open&&ad(this.view,t.open.tooltip);i&&i.dom.contains(e.relatedTarget)||this.view.dispatch({effects:Zf.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Yf.of(!1)})),20),this.composing=0}}}),dp=iu.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class hp{constructor(e,t,i,n){this.field=e,this.line=t,this.from=i,this.to=n}}class fp{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,yn.TrackDel),i=e.mapPos(this.to,1,yn.TrackDel);return null==t||null==i?null:new fp(this.field,t,i)}}class pp{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],n=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let r of this.lines){if(i.length){let i=o,s=/^\t*/.exec(r)[0].length;for(let t=0;tnew fp(e.field,n[e.line]+e.from,n[e.line]+e.to)));return{text:i,ranges:s}}static parse(e){let t,i=[],n=[],r=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}r.push(new hp(a,n.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of r)t.line==n.length&&t.from>e.index&&(t.from--,t.to--)}n.push(o)}return new pp(n,r)}}let mp=Sl.widget({widget:new class extends Xl{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),gp=Sl.mark({class:"cm-snippetField"});class $p{constructor(e,t){this.ranges=e,this.active=t,this.deco=Sl.set(e.map((e=>(e.from==e.to?mp:gp).range(e.from,e.to))))}map(e){let t=[];for(let i of this.ranges){let n=i.map(e);if(!n)return null;t.push(n)}return new $p(t,this.active)}selectionInsideField(e){return e.ranges.every((e=>this.ranges.some((t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))))}}const bp=cr.define({map:(e,t)=>e&&e.map(t)}),Qp=cr.define(),yp=zn.define({create:()=>null,update(e,t){for(let i of t.effects){if(i.is(bp))return i.value;if(i.is(Qp)&&e)return new $p(e.ranges,i.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>iu.decorations.from(e,(e=>e?e.deco:Sl.none))});function _p(e,t){return Rn.create(e.filter((e=>e.field==t)).map((e=>Rn.range(e.from,e.to))))}function Pp(e){let t=pp.parse(e);return(e,i,n,r)=>{let{text:o,ranges:s}=t.instantiate(e.state,n),a={changes:{from:n,to:r,insert:Hi.of(o)},scrollIntoView:!0,annotations:Nf.of(i)};if(s.length&&(a.selection=_p(s,0)),s.length>1){let t=new $p(s,0),i=a.effects=[bp.of(t)];void 0===e.state.field(yp,!1)&&i.push(cr.appendConfig.of([yp,Tp,Wp,dp]))}e.dispatch(e.state.update(a))}}function wp(e){return({state:t,dispatch:i})=>{let n=t.field(yp,!1);if(!n||e<0&&0==n.active)return!1;let r=n.active+e,o=e>0&&!n.ranges.some((t=>t.field==r+e));return i(t.update({selection:_p(n.ranges,r),effects:bp.of(o?null:new $p(n.ranges,r))})),!0}}const vp=({state:e,dispatch:t})=>!!e.field(yp,!1)&&(t(e.update({effects:bp.of(null)})),!0),Xp=wp(1),xp=wp(-1),Sp=[{key:"Tab",run:Xp,shift:xp},{key:"Escape",run:vp}],kp=Nn.define({combine:e=>e.length?e[0]:Sp}),Tp=Gn.highest(cu.compute([kp],(e=>e.facet(kp))));function Rp(e,t){return Object.assign(Object.assign({},t),{apply:Pp(e)})}const Wp=iu.domEventHandlers({mousedown(e,t){let i,n=t.state.field(yp,!1);if(!n||null==(i=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let r=n.ranges.find((e=>e.from<=i&&e.to>=i));return!(!r||r.field==n.active||(t.dispatch({selection:_p(n.ranges,r.field),effects:bp.of(n.ranges.some((e=>e.field>r.field))?new $p(n.ranges,r.field):null)}),0))}});function Ap(e,t){return new RegExp(t(e.source),e.unicode?"u":"")}const Np=Object.create(null);function Cp(e){return Np[e]||(Np[e]=new WeakMap)}function qp(e,t,i,n,r){for(let o=e.iterLines(),s=0;!o.next().done;){let e,{value:a}=o;for(t.lastIndex=0;e=t.exec(a);)if(!n[e[0]]&&s+e.index!=r&&(i.push({type:"text",label:e[0]}),n[e[0]]=!0,i.length>=2e3))return;s+=a.length+1}}function Ep(e,t,i,n,r){let o=e.length>=1e3,s=o&&t.get(e);if(s)return s;let a=[],l=Object.create(null);if(e.children){let o=0;for(let s of e.children){if(s.length>=1e3)for(let e of Ep(s,t,i,n-o,r-o))l[e.label]||(l[e.label]=!0,a.push(e));else qp(s,i,a,l,r-o);o+=s.length+1}}else qp(e,i,a,l,r);return o&&a.length<2e3&&t.set(e,a),a}const Vp={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Yp=cr.define({map(e,t){let i=t.mapPos(e,-1,yn.TrackAfter);return null==i?void 0:i}}),Zp=new class extends wr{};Zp.startSide=1,Zp.endSide=-1;const zp=zn.define({create:()=>Sr.empty,update(e,t){if(t.selection){let i=t.state.doc.lineAt(t.selection.main.head).from,n=t.startState.doc.lineAt(t.startState.selection.main.head).from;i!=t.changes.mapPos(n,-1)&&(e=Sr.empty)}e=e.map(t.changes);for(let i of t.effects)i.is(Yp)&&(e=e.update({add:[Zp.range(i.value,i.value+1)]}));return e}});function Mp(){return[Dp,zp]}function Ip(e){for(let t=0;t<8;t+=2)if("()[]{}<>".charCodeAt(t)==e)return"()[]{}<>".charAt(t+1);return gn(e<128?e:e+1)}function Up(e,t){return e.languageDataAt("closeBrackets",t)[0]||Vp}const jp="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Dp=iu.inputHandler.of(((e,t,i,n)=>{if((jp?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let r=e.state.selection.main;if(n.length>2||2==n.length&&1==$n(mn(n,0))||t!=r.from||i!=r.to)return!1;let o=Bp(e.state,n);return!!o&&(e.dispatch(o),!0)})),Gp=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Up(e,e.selection.main.head).brackets||Vp.brackets,n=null,r=e.changeByRange((t=>{if(t.empty){let n=function(e,t){let i=e.sliceString(t-2,t);return $n(mn(i,0))==i.length?i:i.slice(1)}(e.doc,t.head);for(let r of i)if(r==n&&Fp(e.doc,t.head)==Ip(mn(r,0)))return{changes:{from:t.head-r.length,to:t.head+r.length},range:Rn.cursor(t.head-r.length)}}return{range:n=t}}));return n||t(e.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!n},Lp=[{key:"Backspace",run:Gp}];function Bp(e,t){let i=Up(e,e.selection.main.head),n=i.brackets||Vp.brackets;for(let r of n){let o=Ip(mn(r,0));if(t==r)return o==r?em(e,r,n.indexOf(r+r+r)>-1,i):Hp(e,r,o,i.before||Vp.before);if(t==o&&Kp(e,e.selection.main.from))return Jp(e,r,o)}return null}function Kp(e,t){let i=!1;return e.field(zp).between(0,e.doc.length,(e=>{e==t&&(i=!0)})),i}function Fp(e,t){let i=e.sliceString(t,t+2);return i.slice(0,$n(mn(i,0)))}function Hp(e,t,i,n){let r=null,o=e.changeByRange((o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:i,from:o.to}],effects:Yp.of(o.to+t.length),range:Rn.range(o.anchor+t.length,o.head+t.length)};let s=Fp(e.doc,o.head);return!s||/\s/.test(s)||n.indexOf(s)>-1?{changes:{insert:t+i,from:o.head},effects:Yp.of(o.head+t.length),range:Rn.cursor(o.head+t.length)}:{range:r=o}}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Jp(e,t,i){let n=null,r=e.changeByRange((t=>t.empty&&Fp(e.doc,t.head)==i?{changes:{from:t.head,to:t.head+i.length,insert:i},range:Rn.cursor(t.head+i.length)}:n={range:t}));return n?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function em(e,t,i,n){let r=n.stringPrefixes||Vp.stringPrefixes,o=null,s=e.changeByRange((n=>{if(!n.empty)return{changes:[{insert:t,from:n.from},{insert:t,from:n.to}],effects:Yp.of(n.to+t.length),range:Rn.range(n.anchor+t.length,n.head+t.length)};let s,a=n.head,l=Fp(e.doc,a);if(l==t){if(tm(e,a))return{changes:{insert:t+t,from:a},effects:Yp.of(a+t.length),range:Rn.cursor(a+t.length)};if(Kp(e,a)){let n=i&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+n.length,insert:n},range:Rn.cursor(a+n.length)}}}else{if(i&&e.sliceDoc(a-2*t.length,a)==t+t&&(s=im(e,a-2*t.length,r))>-1&&tm(e,s))return{changes:{insert:t+t+t+t,from:a},effects:Yp.of(a+t.length),range:Rn.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=$r.Word&&im(e,a,r)>-1&&!function(e,t,i,n){let r=dh(e).resolveInner(t,-1),o=n.reduce(((e,t)=>Math.max(e,t.length)),0);for(let s=0;s<5;s++){let s=e.sliceDoc(r.from,Math.min(r.to,r.from+i.length+o)),a=s.indexOf(i);if(!a||a>-1&&n.indexOf(s.slice(0,a))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>i.length+a;){if(e.sliceDoc(t.to-i.length,t.to)==i)return!1;t=t.firstChild}return!0}let l=r.to==t&&r.parent;if(!l)break;r=l}return!1}(e,a,t,r))return{changes:{insert:t+t,from:a},effects:Yp.of(a+t.length),range:Rn.cursor(a+t.length)}}return{range:o=n}}));return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function tm(e,t){let i=dh(e).resolveInner(t+1);return i.parent&&i.from==t}function im(e,t,i){let n=e.charCategorizer(t);if(n(e.sliceDoc(t-1,t))!=$r.Word)return t;for(let r of i){let i=t-r.length;if(e.sliceDoc(i,t)==r&&n(e.sliceDoc(i-1,i))!=$r.Word)return i}return-1}const nm=[{key:"Ctrl-Space",run:lp},{key:"Escape",run:Op},{key:"ArrowDown",run:sp(!0)},{key:"ArrowUp",run:sp(!1)},{key:"PageDown",run:sp(!0,"page")},{key:"PageUp",run:sp(!1,"page")},{key:"Enter",run:ap}],rm=Gn.highest(cu.computeN([Mf],(e=>e.facet(Mf).defaultKeymap?[nm]:[])));const om=new WeakMap;var sm=Object.freeze({__proto__:null,CompletionContext:xf,acceptCompletion:ap,autocompletion:function(e={}){return[op,Mf.of(e),up,rm,dp]},clearSnippet:vp,closeBrackets:Mp,closeBracketsKeymap:Lp,closeCompletion:Op,completeAnyWord:e=>{let t=e.state.languageDataAt("wordChars",e.pos).join(""),i=function(e){let t=e.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${t}]+`,"ug")}catch(e){return new RegExp(`[w${t}]`,"g")}}(t),n=e.matchBefore(Ap(i,(e=>e+"$")));if(!n&&!e.explicit)return null;let r=n?n.from:e.pos;return{from:r,options:Ep(e.state.doc,Cp(t),i,5e4,r),validFor:Ap(i,(e=>"^"+e))}},completeFromList:kf,completionKeymap:nm,completionStatus:function(e){let t=e.field(op,!1);return t&&t.active.some((e=>1==e.state))?"pending":t&&t.active.some((e=>0!=e.state))?"active":null},currentCompletions:function(e){var t;let i=null===(t=e.field(op,!1))||void 0===t?void 0:t.open;if(!i||i.disabled)return[];let n=om.get(i.options);return n||om.set(i.options,n=i.options.map((e=>e.completion))),n},deleteBracketPair:Gp,ifIn:function(e,t){return i=>{for(let n=dh(i.state).resolveInner(i.pos,-1);n;n=n.parent){if(e.indexOf(n.name)>-1)return t(i);if(n.type.isTop)break}return null}},ifNotIn:Tf,insertBracket:Bp,insertCompletionText:Cf,moveCompletionSelection:sp,nextSnippetField:Xp,pickedCompletion:Nf,prevSnippetField:xp,selectedCompletion:function(e){var t;let i=null===(t=e.field(op,!1))||void 0===t?void 0:t.open;return i&&!i.disabled&&i.selected>=0?i.options[i.selected].completion:null},selectedCompletionIndex:function(e){var t;let i=null===(t=e.field(op,!1))||void 0===t?void 0:t.open;return i&&!i.disabled&&i.selected>=0?i.selected:null},setSelectedCompletion:function(e){return rp.of(e)},snippet:Pp,snippetCompletion:Rp,snippetKeymap:kp,startCompletion:lp});function am({closing:e,units:t=1}){return i=>function(e,t,i){let n=e.textAfter,r=n.match(/^\s*/)[0].length,o=!1;switch(i.length){case 1:o=n.slice(r,r+i[0].length)===i[0];break;case 2:o=n.slice(r,r+i[0].length)===i[0]||n.slice(r,r+i[1].length)===i[1];break;case 3:o=n.slice(r,r+i[0].length)===i[0]||n.slice(r,r+i[1].length)===i[1]||n.slice(r,r+i[2].length)===i[2];break;default:o=i.some((e=>n.slice(r,r+e.length)===e))}return e.baseIndent+(o?0:e.unit*t)}(i,t,e)}function lm(e){return e.baseIndent}let Om=function(){let e={indents:{VariableDeclaration:Vh(),AssignmentExpression:Vh()},keywords:[]};for(let t of ha.nodeSet.types){let i,n=t.prop(jr.group);"keyword"===(null!=n?n[0]:null)&&e.keywords.push(t);let r=t.prop(jr.closedBy);i=r?am({closing:r}):lm,e.indents[t.name]=i}return e}(),cm=Ed({String:rh.string,TripleString:rh.string,CommandString:rh.string,StringWithoutInterpolation:rh.string,TripleStringWithoutInterpolation:rh.string,CommandStringWithoutInterpolation:rh.string,"String/$ TripleString/$ CommandString/$":rh.special(rh.brace),"String/( TripleString/( CommandString/(":rh.special(rh.brace),"String/) TripleString/) CommandString/)":rh.special(rh.brace),Comment:rh.lineComment,BlockComment:rh.comment,"mutable struct StructDefinition/end":rh.definitionKeyword,"primitive type PrimitiveDefinition/end":rh.definitionKeyword,"const local global":rh.definitionKeyword,"ForStatement/for ForBinding/in ForStatement/end":rh.controlKeyword,"WhileStatement/while WhileStatement/end":rh.controlKeyword,"IfClause/if IfClause/elseif ElseClause/else IfStatement/end":rh.controlKeyword,"default break return":rh.controlKeyword,"TryStatement/try CatchClause/catch FinallyClause/finally TryStatement/end":rh.controlKeyword,"( )":rh.paren,"[ ]":rh.paren,"{ }":rh.paren,[Om.keywords.map((e=>e.name)).join(" ")]:rh.keyword,BooleanLiteral:rh.bool,Number:rh.number,"Coefficient/PrefixedString!":rh.unit,"Type! TypeParameters!":rh.typeName,"StructDefinition/Identifier StructDefinition/AssignmentExpression/Identifier StructDefinition/TypedExpression/Identifier StructDefinition/AssignmentExpression/TypedExpression/Identifier":rh.definition(rh.propertyName),":: <:":rh.typeOperator,Identifier:rh.variableName,"MacroIdentifier! MacroFieldExpression!":rh.macroName,"MacroDefinition/Definition!":rh.definition(rh.macroName),"FieldName!":rh.propertyName,FieldExpression:rh.propertyName,"FieldExpression .":rh.derefOperator,"Symbol!":rh.atom}),um=uh.define({parser:ha.configure({props:[cm,Th.add(Object.assign(Object.assign({},Om.indents),{ModuleDefinition:lm,BareModuleDefinition:lm,VariableDeclaration:Vh(),AssignmentExpression:Vh()}))]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*(\]|\}|\)|end|else|elseif|catch|finally)/,closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});const dm=um.data.of({autocomplete:kf(Om.keywords.map((e=>({label:e.name,type:"keyword"}))))});let hm={enableKeywordCompletion:!1};function fm(e=hm){let t=[];return(e=Object.assign(Object.assign({},hm),e)).enableKeywordCompletion&&t.push(dm),new _h(um,t)}function pm(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let r=e(t,i);return!!r&&(n(i.update(r)),!0)}}const mm=pm((function(e,t,i=t.selection.ranges){let n=[],r=-1;for(let{from:e,to:o}of i){let i=n.length,s=1e9,a=bm(t,e).line;if(a){for(let i=e;i<=o;){let l=t.doc.lineAt(i);if(l.from>r&&(e==o||o>l.from)){r=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,i=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:i,indent:r,empty:o,single:s}of n)!s&&o||e.push({from:t.from+r,insert:i+" "});let i=t.changes(e);return{changes:i,selection:t.selection.map(i,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:i,token:r}of n)if(i>=0){let n=t.from+i,o=n+r.length;" "==t.text[o-t.from]&&o++,e.push({from:n,to:o})}return{changes:e}}return null}),0),gm=pm(Qm,0),$m=pm(((e,t)=>Qm(e,t,function(e){let t=[];for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),r=i.to<=n.to?n:e.doc.lineAt(i.to),o=t.length-1;o>=0&&t[o].to>n.from?t[o].to=r.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:r.to})}return t}(t))),0);function bm(e,t){let i=e.languageDataAt("commentTokens",t);return i.length?i[0]:{}}function Qm(e,t,i=t.selection.ranges){let n=i.map((e=>bm(t,e.from).block));if(!n.every((e=>e)))return null;let r=i.map(((e,i)=>function(e,{open:t,close:i},n,r){let o,s,a=e.sliceDoc(n-50,n),l=e.sliceDoc(r,r+50),O=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-O;if(a.slice(u-t.length,u)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-O,margin:O&&1},close:{pos:r+c,margin:c&&1}};r-n<=100?o=s=e.sliceDoc(n,r):(o=e.sliceDoc(n,n+50),s=e.sliceDoc(r-50,r));let d=/^\s*/.exec(o)[0].length,h=/\s*$/.exec(s)[0].length,f=s.length-h-i.length;return o.slice(d,d+t.length)==t&&s.slice(f,f+i.length)==i?{open:{pos:n+d+t.length,margin:/\s/.test(o.charAt(d+t.length))?1:0},close:{pos:r-h-i.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(t,n[i],e.from,e.to)));if(2!=e&&!r.every((e=>e)))return{changes:t.changes(i.map(((e,t)=>r[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}])))};if(1!=e&&r.some((e=>e))){let e=[];for(let t,i=0;iPr(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,n)=>e(i,n)||t(i,n)})});const vm=zn.define({create:()=>zm.empty,update(e,t){let i=t.state.facet(wm),n=t.annotation(ym);if(n){let r=t.docChanged?Rn.single(function(e){let t=0;return e.iterChangedRanges(((e,i)=>t=i)),t}(t.changes)):void 0,o=Wm.fromTransaction(t,r),s=n.side,a=0==s?e.undone:e.done;return a=o?Am(a,a.length,i.minDepth,o):qm(a,t.startState.selection),new zm(0==s?n.rest:a,0==s?a:n.rest)}let r=t.annotation(_m);if("full"!=r&&"before"!=r||(e=e.isolate()),!1===t.annotation(ur.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=Wm.fromTransaction(t),s=t.annotation(ur.time),a=t.annotation(ur.userEvent);return o?e=e.addChanges(o,s,a,i,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,i.newGroupDelay)),"full"!=r&&"after"!=r||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new zm(e.done.map(Wm.fromJSON),e.undone.map(Wm.fromJSON))});function Xm(e={}){return[vm,wm.of(e),iu.domEventHandlers({beforeinput(e,t){let i="historyUndo"==e.inputType?Sm:"historyRedo"==e.inputType?km:null;return!!i&&(e.preventDefault(),i(t))}})]}function xm(e,t){return function({state:i,dispatch:n}){if(!t&&i.readOnly)return!1;let r=i.field(vm,!1);if(!r)return!1;let o=r.pop(e,i,t);return!!o&&(n(o),!0)}}const Sm=xm(0,!1),km=xm(1,!1),Tm=xm(0,!0),Rm=xm(1,!0);class Wm{constructor(e,t,i,n,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=r}setSelAfter(e){return new Wm(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((e=>e.toJSON()))}}static fromJSON(e){return new Wm(e.changes&&Pn.fromJSON(e.changes),[],e.mapped&&_n.fromJSON(e.mapped),e.startSelection&&Rn.fromJSON(e.startSelection),e.selectionsAfter.map(Rn.fromJSON))}static fromTransaction(e,t){let i=Cm;for(let t of e.startState.facet(Pm)){let n=t(e);n.length&&(i=i.concat(n))}return!i.length&&e.changes.empty?null:new Wm(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Cm)}static selection(e){return new Wm(void 0,Cm,void 0,void 0,e)}}function Am(e,t,i,n){let r=t+1>i+20?t-i-1:0,o=e.slice(r,t);return o.push(n),o}function Nm(e,t){return e.length?t.length?e.concat(t):e:t}const Cm=[];function qm(e,t){if(e.length){let i=e[e.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),Am(e,e.length-1,1e9,i.setSelAfter(n)))}return[Wm.selection([t])]}function Em(e){let t=e[e.length-1],i=e.slice();return i[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),i}function Vm(e,t){if(!e.length)return e;let i=e.length,n=Cm;for(;i;){let r=Ym(e[i-1],t,n);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,i);return t[i-1]=r,t}t=r.mapped,i--,n=r.selectionsAfter}return n.length?[Wm.selection(n)]:Cm}function Ym(e,t,i){let n=Nm(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):Cm,i);if(!e.changes)return Wm.selection(n);let r=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new Wm(r,cr.mapEffects(e.effects,t),s,e.startSelection.map(o),n)}const Zm=/^(input\.type|delete)($|\.)/;class zm{constructor(e,t,i=0,n){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new zm(this.done,this.undone):this}addChanges(e,t,i,n,r){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!i||Zm.test(i))&&(!s.selectionsAfter.length&&t-this.prevTimei.push(e,t))),t.iterChangedRanges(((e,t,r,o)=>{for(let e=0;e=t&&r<=s&&(n=!0)}})),n}(s.changes,e.changes))||"input.type.compose"==i)?Am(o,o.length-1,n.minDepth,new Wm(e.changes.compose(s.changes),Nm(e.effects,s.effects),s.mapped,s.startSelection,Cm)):Am(o,o.length,n.minDepth,e),new zm(o,Cm,t,i)}addSelection(e,t,i,n){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:Cm;return r.length>0&&t-this.prevTimee.empty!=t.ranges[i].empty)).length}(r[r.length-1],e)?this:new zm(qm(this.done,e),this.undone,t,i)}addMapping(e){return new zm(Vm(this.done,e),Vm(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=0==e?this.done:this.undone;if(0==n.length)return null;let r=n[n.length-1];if(i&&r.selectionsAfter.length)return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:ym.of({side:e,rest:Em(n)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let i=1==n.length?Cm:n.slice(0,n.length-1);return r.mapped&&(i=Vm(i,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:ym.of({side:e,rest:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}zm.empty=new zm(Cm,Cm);const Mm=[{key:"Mod-z",run:Sm,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:km,preventDefault:!0},{linux:"Ctrl-Shift-z",run:km,preventDefault:!0},{key:"Mod-u",run:Tm,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Rm,preventDefault:!0}];function Im(e,t){return Rn.create(e.ranges.map(t),e.mainIndex)}function Um(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function jm({state:e,dispatch:t},i){let n=Im(e.selection,i);return!n.eq(e.selection)&&(t(Um(e,n)),!0)}function Dm(e,t){return Rn.cursor(t?e.to:e.from)}function Gm(e,t){return jm(e,(i=>i.empty?e.moveByChar(i,t):Dm(i,t)))}function Lm(e){return e.textDirectionAt(e.state.selection.main.head)==cO.LTR}const Bm=e=>Gm(e,!Lm(e)),Km=e=>Gm(e,Lm(e));function Fm(e,t){return jm(e,(i=>i.empty?e.moveByGroup(i,t):Dm(i,t)))}function Hm(e,t,i){if(t.type.prop(i))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Jm(e,t,i){let n,r,o=dh(e).resolveInner(t.head),s=i?jr.closedBy:jr.openedBy;for(let n=t.head;;){let t=i?o.childAfter(n):o.childBefore(n);if(!t)break;Hm(e,t,s)?o=t:n=i?t.to:t.from}return r=o.type.prop(s)&&(n=i?bf(e,o.from,1):bf(e,o.to,-1))&&n.matched?i?n.end.to:n.end.from:i?o.to:o.from,Rn.cursor(r,i?-1:1)}function eg(e,t){return jm(e,(i=>{if(!i.empty)return Dm(i,t);let n=e.moveVertically(i,t);return n.head!=i.head?n:e.moveToLineBoundary(i,t)}))}const tg=e=>eg(e,!1),ig=e=>eg(e,!0);function ng(e){let t,i=e.scrollDOM.clientHeighti.empty?e.moveVertically(i,t,n.height):Dm(i,t)));if(o.eq(r.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+n.marginTop,l=s.bottom-n.marginBottom;t&&t.top>a&&t.bottomrg(e,!1),sg=e=>rg(e,!0);function ag(e,t,i){let n=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,i);if(r.head==t.head&&r.head!=(i?n.to:n.from)&&(r=e.moveToLineBoundary(t,i,!1)),!i&&r.head==n.from&&n.length){let i=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&t.head!=n.from+i&&(r=Rn.cursor(n.from+i))}return r}function lg(e,t){let i=Im(e.state.selection,(e=>{let i=t(e);return Rn.range(e.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(e.state.selection)&&(e.dispatch(Um(e.state,i)),!0)}function Og(e,t){return lg(e,(i=>e.moveByChar(i,t)))}const cg=e=>Og(e,!Lm(e)),ug=e=>Og(e,Lm(e));function dg(e,t){return lg(e,(i=>e.moveByGroup(i,t)))}function hg(e,t){return lg(e,(i=>e.moveVertically(i,t)))}const fg=e=>hg(e,!1),pg=e=>hg(e,!0);function mg(e,t){return lg(e,(i=>e.moveVertically(i,t,ng(e).height)))}const gg=e=>mg(e,!1),$g=e=>mg(e,!0),bg=({state:e,dispatch:t})=>(t(Um(e,{anchor:0})),!0),Qg=({state:e,dispatch:t})=>(t(Um(e,{anchor:e.doc.length})),!0),yg=({state:e,dispatch:t})=>(t(Um(e,{anchor:e.selection.main.anchor,head:0})),!0),_g=({state:e,dispatch:t})=>(t(Um(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function Pg(e,t){if(e.state.readOnly)return!1;let i="delete.selection",{state:n}=e,r=n.changeByRange((n=>{let{from:r,to:o}=n;if(r==o){let n=t(r);nr&&(i="delete.forward",n=wg(e,n,!0)),r=Math.min(r,n),o=Math.max(o,n)}else r=wg(e,r,!1),o=wg(e,o,!0);return r==o?{range:n}:{changes:{from:r,to:o},range:Rn.cursor(r)}}));return!r.changes.empty&&(e.dispatch(n.update(r,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?iu.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function wg(e,t,i){if(e instanceof iu)for(let n of e.state.facet(iu.atomicRanges).map((t=>t(e))))n.between(t,t,((e,n)=>{et&&(t=i?n:e)}));return t}const vg=(e,t)=>Pg(e,(i=>{let n,r,{state:o}=e,s=o.doc.lineAt(i);if(!t&&i>s.from&&ivg(e,!1),xg=e=>vg(e,!0),Sg=(e,t)=>Pg(e,(i=>{let n=i,{state:r}=e,o=r.doc.lineAt(n),s=r.charCategorizer(n);for(let e=null;;){if(n==(t?o.to:o.from)){n==i&&o.number!=(t?r.doc.lines:1)&&(n+=t?1:-1);break}let a=un(o.text,n-o.from,t)+o.from,l=o.text.slice(Math.min(n,a)-o.from,Math.max(n,a)-o.from),O=s(l);if(null!=e&&O!=e)break;" "==l&&n==i||(e=O),n=a}return n})),kg=e=>Sg(e,!1),Tg=e=>Pg(e,(t=>{let i=e.lineBlockAt(t).to;return t=r.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(n)}else t.push({from:r.from,to:o.to,ranges:[n]});i=o.number+1}return t}function Wg(e,t,i){if(e.readOnly)return!1;let n=[],r=[];for(let t of Rg(e)){if(i?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(i?t.to+1:t.from-1),s=o.length+1;if(i){n.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let i of t.ranges)r.push(Rn.range(Math.min(e.doc.length,i.anchor+s),Math.min(e.doc.length,i.head+s)))}else{n.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)r.push(Rn.range(e.anchor-s,e.head-s))}}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:Rn.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Ag(e,t,i){if(e.readOnly)return!1;let n=[];for(let t of Rg(e))i?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ng=qg(!1),Cg=qg(!0);function qg(e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let n=t.changeByRange((i=>{let{from:n,to:r}=i,o=t.doc.lineAt(n),s=!e&&n==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let i,n=dh(e).resolveInner(t),r=n.childBefore(t),o=n.childAfter(t);return r&&o&&r.to<=t&&o.from>=t&&(i=r.type.prop(jr.closedBy))&&i.indexOf(o.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(o.from).from?{from:r.to,to:o.from}:null}(t,n);e&&(n=r=(r<=o.to?o:t.doc.lineAt(r)).to);let a=new kh(t,{simulateBreak:n,simulateDoubleBreak:!!s}),l=Sh(a,n);for(null==l&&(l=/^\s*/.exec(t.doc.lineAt(n).text)[0].length);ro.from&&n{let r=[];for(let o=n.from;o<=n.to;){let s=e.doc.lineAt(o);s.number>i&&(n.empty||n.to>s.from)&&(t(s,r,n),i=s.number),o=s.to+1}let o=e.changes(r);return{changes:r,range:Rn.range(o.mapPos(n.anchor,1),o.mapPos(n.head,1))}}))}const Vg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Eg(e,((t,i)=>{i.push({from:t.from,insert:e.facet(vh)})})),{userEvent:"input.indent"})),!0),Yg=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Eg(e,((t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let r=Zr(n,e.tabSize),o=0,s=xh(e,Math.max(0,r-Xh(e)));for(;ojm(e,(t=>Rn.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>lg(e,(t=>Rn.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>jm(e,(t=>Rn.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>lg(e,(t=>Rn.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:xg},{key:"Ctrl-h",run:Xg},{key:"Ctrl-k",run:Tg},{key:"Ctrl-Alt-h",run:kg},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:Hi.of(["",""])},range:Rn.cursor(e.from)})));return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange((t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let i=t.from,n=e.doc.lineAt(i),r=i==n.from?i-1:un(n.text,i-n.from,!1)+n.from,o=i==n.to?i+1:un(n.text,i-n.from,!0)+n.from;return{changes:{from:r,to:o,insert:e.doc.slice(i,o).append(e.doc.slice(r,i))},range:Rn.cursor(o)}}));return!i.changes.empty&&(t(e.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:sg}],zg=[{key:"ArrowLeft",run:Bm,shift:cg,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>Fm(e,!Lm(e)),shift:e=>dg(e,!Lm(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>jm(e,(t=>ag(e,t,!Lm(e)))),shift:e=>lg(e,(t=>ag(e,t,!Lm(e)))),preventDefault:!0},{key:"ArrowRight",run:Km,shift:ug,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>Fm(e,Lm(e)),shift:e=>dg(e,Lm(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>jm(e,(t=>ag(e,t,Lm(e)))),shift:e=>lg(e,(t=>ag(e,t,Lm(e)))),preventDefault:!0},{key:"ArrowUp",run:tg,shift:fg,preventDefault:!0},{mac:"Cmd-ArrowUp",run:bg,shift:yg},{mac:"Ctrl-ArrowUp",run:og,shift:gg},{key:"ArrowDown",run:ig,shift:pg,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Qg,shift:_g},{mac:"Ctrl-ArrowDown",run:sg,shift:$g},{key:"PageUp",run:og,shift:gg},{key:"PageDown",run:sg,shift:$g},{key:"Home",run:e=>jm(e,(t=>ag(e,t,!1))),shift:e=>lg(e,(t=>ag(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:bg,shift:yg},{key:"End",run:e=>jm(e,(t=>ag(e,t,!0))),shift:e=>lg(e,(t=>ag(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:Qg,shift:_g},{key:"Enter",run:Ng},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Xg,shift:Xg},{key:"Delete",run:xg},{key:"Mod-Backspace",mac:"Alt-Backspace",run:kg},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Sg(e,!0)},{mac:"Mod-Backspace",run:e=>Pg(e,(t=>{let i=e.lineBlockAt(t).from;return t>i?i:Math.max(0,t-1)}))},{mac:"Mod-Delete",run:Tg}].concat(Zg.map((e=>({mac:e.key,run:e.run,shift:e.shift})))),Mg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>jm(e,(t=>Jm(e.state,t,!Lm(e)))),shift:e=>lg(e,(t=>Jm(e.state,t,!Lm(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>jm(e,(t=>Jm(e.state,t,Lm(e)))),shift:e=>lg(e,(t=>Jm(e.state,t,Lm(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Wg(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Ag(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Wg(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Ag(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let i=e.selection,n=null;return i.ranges.length>1?n=Rn.create([i.main]):i.main.empty||(n=Rn.create([Rn.cursor(i.main.head)])),!!n&&(t(Um(e,n)),!0)}},{key:"Mod-Enter",run:Cg},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let i=Rg(e).map((({from:t,to:i})=>Rn.range(t,Math.min(i+1,e.doc.length))));return t(e.update({selection:Rn.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let i=Im(e.selection,(t=>{var i;let n=dh(e).resolveInner(t.head,1);for(;!(n.from=t.to||n.to>t.to&&n.from<=t.from)&&(null===(i=n.parent)||void 0===i?void 0:i.parent);)n=n.parent;return Rn.range(n.to,n.from)}));return t(Um(e,i)),!0},preventDefault:!0},{key:"Mod-[",run:Yg},{key:"Mod-]",run:Vg},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Object.create(null),n=new kh(e,{overrideIndentation:e=>{let t=i[e];return null==t?-1:t}}),r=Eg(e,((t,r,o)=>{let s=Sh(n,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=xh(e,s);(a!=l||o.from{if(e.state.readOnly)return!1;let{state:t}=e,i=t.changes(Rg(t).map((({from:e,to:i})=>(e>0?e--:ie.moveVertically(t,!0))).map(i);return e.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,i){let n=!1,r=Im(e.selection,(t=>{let r=bf(e,t.head,-1)||bf(e,t.head,1)||t.head>0&&bf(e,t.head-1,1)||t.head{let{state:t}=e,i=t.doc.lineAt(t.selection.main.from),n=bm(e.state,i.from);return n.line?mm(e):!!n.block&&$m(e)}},{key:"Alt-A",run:gm}].concat(zg);function Ig(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=i[n];"string"==typeof r?e.setAttribute(n,r):null!=r&&(e[n]=r)}t++}for(;te.normalize("NFKD"):e=>e;class Dg{constructor(e,t,i=0,n=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,n),this.bufferStart=i,this.normalize=r?e=>r(jg(e)):jg,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return mn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=gn(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=$n(e);let n=this.normalize(t);for(let e=0,r=i;;e++){let o=n.charCodeAt(e),s=this.match(o,r);if(s)return this.value=s,this;if(e==n.length-1)break;r==i&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,n=i+t[0].length;if(this.matchPos=Jg(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,t)))return this.value={from:i,to:n,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=t){let n=new Fg(t,e.sliceString(t,i));return Kg.set(e,n),n}if(n.from==t&&n.to==i)return n;let{text:r,from:o}=n;return o>t&&(r=e.sliceString(t,o)+r,o=t),n.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,i=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,i,t)))return this.value={from:e,to:i,match:t},this.matchPos=Jg(this.text,i+(e==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Fg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Jg(e,t){if(t>=e.length)return t;let i,n=e.lineAt(t);for(;t=56320&&i<57344;)t++;return t}function e$(e){let t=Ig("input",{class:"cm-textfield",name:"line"});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!i)return;let{state:n}=e,r=n.doc.lineAt(n.selection.main.head),[,o,s,a,l]=i,O=a?+a.slice(1):0,c=s?+s:r.number;if(s&&l){let e=c/100;o&&(e=e*("-"==o?-1:1)+r.number/n.doc.lines),c=Math.round(n.doc.lines*e)}else s&&o&&(c=c*("-"==o?-1:1)+r.number);let u=n.doc.line(Math.max(1,Math.min(n.doc.lines,c)));e.dispatch({effects:t$.of(!1),selection:Rn.cursor(u.from+Math.max(0,Math.min(O,u.length))),scrollIntoView:!0}),e.focus()}return{dom:Ig("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:t$.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),i())},onsubmit:e=>{e.preventDefault(),i()}},Ig("label",e.state.phrase("Go to line"),": ",t)," ",Ig("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Bg.prototype[Symbol.iterator]=Hg.prototype[Symbol.iterator]=function(){return this});const t$=cr.define(),i$=(zn.define({create:()=>!0,update(e,t){for(let i of t.effects)i.is(t$)&&(e=i.value);return e},provide:e=>fd.from(e,(e=>e?e$:null))}),iu.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),{highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1}),n$=Nn.define({combine:e=>Pr(e,i$,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function r$(e){let t=[O$,l$];return e&&t.push(n$.of(e)),t}const o$=Sl.mark({class:"cm-selectionMatch"}),s$=Sl.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function a$(e,t,i,n){return!(0!=i&&e(t.sliceDoc(i-1,i))==$r.Word||n!=t.doc.length&&e(t.sliceDoc(n,n+1))==$r.Word)}const l$=eO.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(n$),{state:i}=e,n=i.selection;if(n.ranges.length>1)return Sl.none;let r,o=n.main,s=null;if(o.empty){if(!t.highlightWordAroundCursor)return Sl.none;let e=i.wordAt(o.head);if(!e)return Sl.none;s=i.charCategorizer(o.head),r=i.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e200)return Sl.none;if(t.wholeWords){if(r=i.sliceDoc(o.from,o.to),s=i.charCategorizer(o.head),!a$(s,i,o.from,o.to)||!function(e,t,i,n){return e(t.sliceDoc(i,i+1))==$r.Word&&e(t.sliceDoc(n-1,n))==$r.Word}(s,i,o.from,o.to))return Sl.none}else if(r=i.sliceDoc(o.from,o.to).trim(),!r)return Sl.none}let a=[];for(let n of e.visibleRanges){let e=new Dg(i.doc,r,n.from,n.to);for(;!e.next().done;){let{from:n,to:r}=e.value;if((!s||a$(s,i,n,r))&&(o.empty&&n<=o.from&&r>=o.to?a.push(s$.range(n,r)):(n>=o.to||r<=o.from)&&a.push(o$.range(n,r)),a.length>t.maxMatches))return Sl.none}}return Sl.set(a)}},{decorations:e=>e.decorations}),O$=iu.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const c$=({state:e,dispatch:t})=>{let{ranges:i}=e.selection;if(i.some((e=>e.from===e.to)))return(({state:e,dispatch:t})=>{let{selection:i}=e,n=Rn.create(i.ranges.map((t=>e.wordAt(t.head)||Rn.cursor(t.head))),i.mainIndex);return!n.eq(i)&&(t(e.update({selection:n})),!0)})({state:e,dispatch:t});let n=e.sliceDoc(i[0].from,i[0].to);if(e.selection.ranges.some((t=>e.sliceDoc(t.from,t.to)!=n)))return!1;let r=function(e,t){let{main:i,ranges:n}=e.selection,r=e.wordAt(i.head),o=r&&r.from==i.from&&r.to==i.to;for(let i=!1,r=new Dg(e.doc,t,n[n.length-1].to);;){if(r.next(),!r.done){if(i&&n.some((e=>e.from==r.value.from)))continue;if(o){let t=e.wordAt(r.value.from);if(!t||t.from!=r.value.from||t.to!=r.value.to)continue}return r.value}if(i)return null;r=new Dg(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(e,n);return!!r&&(t(e.update({selection:e.selection.addRange(Rn.range(r.from,r.to),!1),effects:iu.scrollIntoView(r.to)})),!0)},u$=Nn.define({combine:e=>Pr(e,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Z$(e),scrollToMatch:e=>iu.scrollIntoView(e)})});class d${constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Lg),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,((e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"))}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Q$(this):new p$(this)}getCursor(e,t=0,i){let n=e.doc?e:_r.create({doc:e});return null==i&&(i=n.doc.length),this.regexp?m$(this,n,t,i):f$(this,n,t,i)}}class h${constructor(e){this.spec=e}}function f$(e,t,i,n){return new Dg(t.doc,e.unquoted,i,n,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(i,n,r,o)=>((o>i||o+r.length=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=f$(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}function m$(e,t,i,n){return new Bg(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?b$(t.charCategorizer(t.selection.main.head)):void 0},i,n)}function g$(e,t){return e.slice(un(e,t,!1),t)}function $$(e,t){return e.slice(t,un(e,t))}function b$(e){return(t,i,n)=>!n[0].length||(e(g$(n.input,n.index))!=$r.Word||e($$(n.input,n.index))!=$r.Word)&&(e($$(n.input,n.index+n[0].length))!=$r.Word||e(g$(n.input,n.index+n[0].length))!=$r.Word)}class Q$ extends h${nextMatch(e,t,i){let n=m$(this.spec,e,i,e.doc.length).next();return n.done&&(n=m$(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=1;;n++){let r=Math.max(t,i-1e4*n),o=m$(this.spec,e,r,i),s=null;for(;!o.next().done;)s=o.value;if(s&&(r==t||s.from>r+10))return s;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,((t,i)=>"$"==i?"$":"&"==i?e.match[0]:"0"!=i&&+i=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=m$(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}const y$=cr.define(),_$=cr.define(),P$=zn.define({create:e=>new w$(C$(e).create(),null),update(e,t){for(let i of t.effects)i.is(y$)?e=new w$(i.value.create(),e.panel):i.is(_$)&&(e=new w$(e.query,i.value?N$:null));return e},provide:e=>fd.from(e,(e=>e.panel))});class w${constructor(e,t){this.query=e,this.panel=t}}const v$=Sl.mark({class:"cm-searchMatch"}),X$=Sl.mark({class:"cm-searchMatch cm-searchMatch-selected"}),x$=eO.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(P$))}update(e){let t=e.state.field(P$);(t!=e.startState.field(P$)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Sl.none;let{view:i}=this,n=new kr;for(let t=0,r=i.visibleRanges,o=r.length;tr[t+1].from-500;)a=r[++t].to;e.highlight(i.state,s,a,((e,t)=>{let r=i.state.selection.ranges.some((i=>i.from==e&&i.to==t));n.add(e,t,r?X$:v$)}))}return n.finish()}},{decorations:e=>e.decorations});function S$(e){return t=>{let i=t.state.field(P$,!1);return i&&i.query.spec.valid?e(t,i):V$(t)}}const k$=S$(((e,{query:t})=>{let{to:i}=e.state.selection.main,n=t.nextMatch(e.state,i,i);if(!n)return!1;let r=Rn.single(n.from,n.to),o=e.state.facet(u$);return e.dispatch({selection:r,effects:[I$(e,n),o.scrollToMatch(r.main,e)],userEvent:"select.search"}),E$(e),!0})),T$=S$(((e,{query:t})=>{let{state:i}=e,{from:n}=i.selection.main,r=t.prevMatch(i,n,n);if(!r)return!1;let o=Rn.single(r.from,r.to),s=e.state.facet(u$);return e.dispatch({selection:o,effects:[I$(e,r),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),E$(e),!0})),R$=S$(((e,{query:t})=>{let i=t.matchAll(e.state,1e3);return!(!i||!i.length||(e.dispatch({selection:Rn.create(i.map((e=>Rn.range(e.from,e.to)))),userEvent:"select.search.matches"}),0))})),W$=S$(((e,{query:t})=>{let{state:i}=e,{from:n,to:r}=i.selection.main;if(i.readOnly)return!1;let o=t.nextMatch(i,n,n);if(!o)return!1;let s,a,l=[],O=[];if(o.from==n&&o.to==r&&(a=i.toText(t.getReplacement(o)),l.push({from:o.from,to:o.to,insert:a}),o=t.nextMatch(i,o.from,o.to),O.push(iu.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(n).number)+"."))),o){let t=0==l.length||l[0].from>=o.to?0:o.to-o.from-a.length;s=Rn.single(o.from-t,o.to-t),O.push(I$(e,o)),O.push(i.facet(u$).scrollToMatch(s.main,e))}return e.dispatch({changes:l,selection:s,effects:O,userEvent:"input.replace"}),!0})),A$=S$(((e,{query:t})=>{if(e.state.readOnly)return!1;let i=t.matchAll(e.state,1e9).map((e=>{let{from:i,to:n}=e;return{from:i,to:n,insert:t.getReplacement(e)}}));if(!i.length)return!1;let n=e.state.phrase("replaced $ matches",i.length)+".";return e.dispatch({changes:i,effects:iu.announce.of(n),userEvent:"input.replace.all"}),!0}));function N$(e){return e.state.facet(u$).createPanel(e)}function C$(e,t){var i,n,r,o;let s=e.selection.main,a=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!a)return t;let l=e.facet(u$);return new d$({search:(null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==t?void 0:t.caseSensitive)&&void 0!==n?n:l.caseSensitive,literal:null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:l.wholeWord})}function q$(e){let t=cd(e,N$);return t&&t.dom.querySelector("[main-field]")}function E$(e){let t=q$(e);t&&t==e.root.activeElement&&t.select()}const V$=e=>{let t=e.state.field(P$,!1);if(t&&t.panel){let i=q$(e);if(i&&i!=e.root.activeElement){let n=C$(e.state,t.query.spec);n.valid&&e.dispatch({effects:y$.of(n)}),i.focus(),i.select()}}else e.dispatch({effects:[_$.of(!0),t?y$.of(C$(e.state,t.query.spec)):cr.appendConfig.of(j$)]});return!0},Y$=e=>{let t=e.state.field(P$,!1);if(!t||!t.panel)return!1;let i=cd(e,N$);return i&&i.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:_$.of(!1)}),!0};class Z${constructor(e){this.view=e;let t=this.query=e.state.field(P$).query.spec;function i(e,t,i){return Ig("button",{class:"cm-button",name:e,onclick:t,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Ig("input",{value:t.search,placeholder:z$(e,"Find"),"aria-label":z$(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ig("input",{value:t.replace,placeholder:z$(e,"Replace"),"aria-label":z$(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ig("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Ig("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Ig("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Ig("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,i("next",(()=>k$(e)),[z$(e,"next")]),i("prev",(()=>T$(e)),[z$(e,"previous")]),i("select",(()=>R$(e)),[z$(e,"all")]),Ig("label",null,[this.caseField,z$(e,"match case")]),Ig("label",null,[this.reField,z$(e,"regexp")]),Ig("label",null,[this.wordField,z$(e,"by word")]),...e.state.readOnly?[]:[Ig("br"),this.replaceField,i("replace",(()=>W$(e)),[z$(e,"replace")]),i("replaceAll",(()=>A$(e)),[z$(e,"replace all")])],Ig("button",{name:"close",onclick:()=>Y$(e),"aria-label":z$(e,"close"),type:"button"},["×"])])}commit(){let e=new d$({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:y$.of(e)}))}keydown(e){!function(e,t,i){return fu(du(e.state),t,e,i)}(this.view,e,"search-panel")?13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?T$:k$)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),W$(this.view)):e.preventDefault()}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(y$)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(u$).top}}function z$(e,t){return e.state.phrase(t)}const M$=/[\s\.,:;?!]/;function I$(e,{from:t,to:i}){let n=e.state.doc.lineAt(t),r=e.state.doc.lineAt(i).to,o=Math.max(n.from,t-30),s=Math.min(r,i+30),a=e.state.sliceDoc(o,s);if(o!=n.from)for(let e=0;e<30;e++)if(!M$.test(a[e+1])&&M$.test(a[e])){a=a.slice(e);break}if(s!=r)for(let e=a.length-1;e>a.length-30;e--)if(!M$.test(a[e-1])&&M$.test(a[e])){a=a.slice(0,e);break}return iu.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${n.number}.`)}const U$=iu.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),j$=[P$,Gn.lowest(x$),U$];class D${constructor(e,t,i,n,r,o,s){this.type=e,this.value=t,this.from=i,this.hash=n,this.end=r,this.children=o,this.positions=s,this.hashProp=[[jr.contextHash,n]]}static create(e,t,i,n,r){return new D$(e,t,i,n+(n<<8)+e+(t<<4)|0,r,[],[])}addChild(e,t){e.prop(jr.contextHash)!=this.hash&&(e=new Jr(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let i=this.children.length-1;return i>=0&&(t=Math.max(t,this.positions[i]+this.children[i].length+this.from)),new Jr(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,i)=>new Jr(Lr.none,e,t,i,this.hashProp)})}}var G$;!function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.URL=33]="URL",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel"}(G$||(G$={}));class L${constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class B${constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return J$(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,i=0){for(let n=t;n=t.stack[i.depth+1].value+i.baseIndent)return!0;if(i.indent>=i.baseIndent+4)return!1;let n=(e.type==G$.OrderedList?sb:ob)(i,t,!1);return n>0&&(e.type!=G$.BulletList||nb(i,t,!1)<0)&&i.text.charCodeAt(i.pos+n-1)==e.value}const F$={[G$.Blockquote]:(e,t,i)=>62==i.next&&(i.markers.push(Nb(G$.QuoteMark,t.lineStart+i.pos,t.lineStart+i.pos+1)),i.moveBase(i.pos+(H$(i.text.charCodeAt(i.pos+1))?2:1)),e.end=t.lineStart+i.text.length,!0),[G$.ListItem]:(e,t,i)=>!(i.indent-1||(i.moveBaseColumn(i.baseIndent+e.value),0)),[G$.OrderedList]:K$,[G$.BulletList]:K$,[G$.Document]:()=>!0};function H$(e){return 32==e||9==e||10==e||13==e}function J$(e,t=0){for(;ti&&H$(e.charCodeAt(t-1));)t--;return t}function tb(e){if(96!=e.next&&126!=e.next)return-1;let t=e.pos+1;for(;t-1&&e.depth==t.stack.length||n<3?-1:1}function rb(e,t){for(let i=e.stack.length-1;i>=0;i--)if(e.stack[i].type==t)return!0;return!1}function ob(e,t,i){return 45!=e.next&&43!=e.next&&42!=e.next||e.pos!=e.text.length-1&&!H$(e.text.charCodeAt(e.pos+1))||!(!i||rb(t,G$.BulletList)||e.skipSpace(e.pos+2)=48&&r<=57;){if(n++,n==e.text.length)return-1;r=e.text.charCodeAt(n)}return n==e.pos||n>e.pos+9||46!=r&&41!=r||ne.pos+1||49!=e.next)?-1:n+1-e.pos}function ab(e){if(35!=e.next)return-1;let t=e.pos+1;for(;t6?-1:i}function lb(e){if(45!=e.next&&61!=e.next||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t/,ub=/\?>/,db=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(n);if(o)return e.append(Nb(G$.Comment,i,i+1+o[0].length));let s=/^\?[^]*?\?>/.exec(n);if(s)return e.append(Nb(G$.ProcessingInstruction,i,i+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(n);return a?e.append(Nb(G$.HTMLTag,i,i+1+a[0].length)):-1},Emphasis(e,t,i){if(95!=t&&42!=t)return-1;let n=i+1;for(;e.char(n)==t;)n++;let r=e.slice(i-1,i),o=e.slice(n,n+1),s=zb.test(r),a=zb.test(o),l=/\s|^$/.test(r),O=/\s|^$/.test(o),c=!O&&(!a||l||s),u=!l&&(!s||O||a),d=c&&(42==t||!u||s),h=u&&(42==t||!c||a);return e.append(new Yb(95==t?Cb:qb,i,n,(d?1:0)|(h?2:0)))},HardBreak(e,t,i){if(92==t&&10==e.char(i+1))return e.append(Nb(G$.HardBreak,i,i+2));if(32==t){let t=i+1;for(;32==e.char(t);)t++;if(10==e.char(t)&&t>=i+2)return e.append(Nb(G$.HardBreak,i,t+1))}return-1},Link:(e,t,i)=>91==t?e.append(new Yb(Eb,i,i+1,1)):-1,Image:(e,t,i)=>33==t&&91==e.char(i+1)?e.append(new Yb(Vb,i,i+2,1)):-1,LinkEnd(e,t,i){if(93!=t)return-1;for(let t=e.parts.length-1;t>=0;t--){let n=e.parts[t];if(n instanceof Yb&&(n.type==Eb||n.type==Vb)){if(!n.side||e.skipSpace(n.to)==i&&!/[(\[]/.test(e.slice(i+1,i+2)))return e.parts[t]=null,-1;let r=e.takeContent(t),o=e.parts[t]=Ib(e,r,n.type==Eb?G$.Link:G$.Image,n.from,i+1);if(n.type==Eb)for(let i=0;it?Nb(G$.URL,t+i,r+i):r==e.length&&null}}function jb(e,t,i){let n=e.charCodeAt(t);if(39!=n&&34!=n&&40!=n)return!1;let r=40==n?41:n;for(let n=t+1,o=!1;n=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,i,n,r){return this.append(new Yb(e,t,i,(n?1:0)|(r?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t=e;s--){let e=this.parts[s];if(e instanceof Yb&&1&e.side&&e.type==i.type&&!(r&&(1&i.side||2&e.side)&&(e.to-e.from+o)%3==0&&((e.to-e.from)%3||o%3))){n=e;break}}if(!n)continue;let a=i.type.resolve,l=[],O=n.from,c=i.to;if(r){let e=Math.min(2,n.to-n.from,o);O=n.to-e,c=i.from+e,a=1==e?"Emphasis":"StrongEmphasis"}n.type.mark&&l.push(this.elt(n.type.mark,O,n.to));for(let e=s+1;e=0;t--){let i=this.parts[t];if(i instanceof Yb&&i.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return J$(this.text,e-this.offset)+this.offset}elt(e,t,i,n){return"string"==typeof e?Nb(this.parser.getNodeType(e),t,i,n):new Ab(e,t)}}function Lb(e,t){if(!t.length)return e;if(!e.length)return t;let i=e.slice(),n=0;for(let e of t){for(;n(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&"\n"!=this.input.read(e-1,e);)e--;this.fragmentEnd=e?e-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let n=e+this.fragment.offset;for(;i.to<=n;)if(!i.parent())return!1;for(;;){if(i.from>=n)return this.fragment.from<=t;if(!i.childAfter(n))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(jr.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,n=this.fragmentEnd-(this.fragment.openEnd?1:0),r=e.absoluteLineStart,o=r,s=e.block.children.length,a=o,l=s;for(;;){if(t.to-i>n){if(t.type.isAnonymous&&t.firstChild())continue;break}if(e.dontInject.add(t.tree),e.addNode(t.tree,t.from-i),t.type.is("Block")&&(Bb.indexOf(t.type.id)<0?(o=t.to-i,s=e.block.children.length):(o=a,s=l,a=t.to-i,l=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>s;)e.block.children.pop(),e.block.positions.pop();return o-r}}const Fb=Ed({"Blockquote/...":rh.quote,HorizontalRule:rh.contentSeparator,"ATXHeading1/... SetextHeading1/...":rh.heading1,"ATXHeading2/... SetextHeading2/...":rh.heading2,"ATXHeading3/...":rh.heading3,"ATXHeading4/...":rh.heading4,"ATXHeading5/...":rh.heading5,"ATXHeading6/...":rh.heading6,"Comment CommentBlock":rh.comment,Escape:rh.escape,Entity:rh.character,"Emphasis/...":rh.emphasis,"StrongEmphasis/...":rh.strong,"Link/... Image/...":rh.link,"OrderedList/... BulletList/...":rh.list,"BlockQuote/...":rh.quote,"InlineCode CodeText":rh.monospace,URL:rh.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":rh.processingInstruction,"CodeInfo LinkLabel":rh.labelName,LinkTitle:rh.string,Paragraph:rh.content}),Hb=new vb(new Br(kb).extend(Fb),Object.keys(mb).map((e=>mb[e])),Object.keys(mb).map((e=>Qb[e])),Object.keys(mb),yb,F$,Object.keys(Mb).map((e=>Mb[e])),Object.keys(Mb),[]);function Jb(e,t,i){let n=[];for(let r=e.firstChild,o=t;;r=r.nextSibling){let e=r?r.from:i;if(e>o&&n.push({from:o,to:e}),!r)break;o=r.to}return n}function eQ(e){let{codeParser:t,htmlParser:i}=e,n=Qo(((e,n)=>{let r=e.type.id;if(!t||r!=G$.CodeBlock&&r!=G$.FencedCode){if(i&&(r==G$.HTMLBlock||r==G$.HTMLTag))return{parser:i,overlay:Jb(e.node,e.from,e.to)}}else{let i="";if(r==G$.FencedCode){let t=e.node.getChild(G$.CodeInfo);t&&(i=n.read(t.from,t.to))}let o=t(i);if(o)return{parser:o,overlay:e=>e.type.id==G$.CodeText}}return null}));return{wrap:n}}const tQ={resolve:"Strikethrough",mark:"StrikethroughMark"},iQ={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":rh.strikethrough}},{name:"StrikethroughMark",style:rh.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,i){if(126!=t||126!=e.char(i+1)||126==e.char(i+2))return-1;let n=e.slice(i-1,i),r=e.slice(i+2,i+3),o=/\s|^$/.test(n),s=/\s|^$/.test(r),a=zb.test(n),l=zb.test(r);return e.addDelimiter(tQ,i,i+2,!s&&(!l||o||a),!o&&(!a||s||l))},after:"Emphasis"}]};function nQ(e,t,i=0,n,r=0){let o=0,s=!0,a=-1,l=-1,O=!1,c=()=>{n.push(e.elt("TableCell",r+a,r+l,e.parser.parseInline(t.slice(a,l),r+a)))};for(let u=i;u-1)&&o++,s=!1,n&&(a>-1&&c(),n.push(e.elt("TableDelimiter",u+r,u+r+1))),a=l=-1),O=!O&&92==i}return a>-1&&(o++,n&&c()),o}function rQ(e,t){for(let i=t;irQ(t.content,0)?new sQ:null,endLeaf(e,t,i){if(i.parsers.some((e=>e instanceof sQ))||!rQ(t.text,t.basePos))return!1;let n=e.scanLine(e.absoluteLineEnd+1).text;return oQ.test(n)&&nQ(e,t.text,t.basePos)==nQ(e,n,t.basePos)},before:"SetextHeading"}]};class lQ{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const OQ={defineNodes:[{name:"Task",block:!0,style:rh.list},{name:"TaskMarker",style:rh.atom}],parseBlock:[{name:"TaskList",leaf:(e,t)=>/^\[[ xX]\]/.test(t.content)&&"ListItem"==e.parentType().name?new lQ:null,after:"SetextHeading"}]},cQ=[aQ,OQ,iQ];function uQ(e,t,i){return(n,r,o)=>{if(r!=e||n.char(o+1)==e)return-1;let s=[n.elt(i,o,o+1)];for(let r=o+1;r=65&&e<=90||95==e||e>=97&&e<=122||e>=161}function bQ(e){return 9==e||10==e||13==e||32==e}let QQ=null,yQ=null,_Q=0;function PQ(e,t){let i=e.pos+t;if(_Q==i&&yQ==e)return QQ;let n=e.peek(t);for(;bQ(n);)n=e.peek(++t);let r="";for(;$Q(n);)r+=String.fromCharCode(n),n=e.peek(++t);return yQ=e,_Q=i,QQ=r?r.toLowerCase():n==wQ||n==vQ?void 0:null}const wQ=63,vQ=33;function XQ(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;txQ.indexOf(t)>-1?new XQ(PQ(n,1)||"",e):e,reduce:(e,t)=>18==t&&e?e.parent:e,reuse(e,t,i,n){let r=t.type.id;return 4==r||35==r?new XQ(PQ(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),kQ=new Mo(((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let i=47==e.next;i&&e.advance();let n=PQ(e,0);if(void 0===n)return;if(!n)return e.acceptToken(i?12:4);let r=t.context?t.context.name:null;if(i){if(n==r)return e.acceptToken(9);if(r&&mQ[r])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(10);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(11)}else{if("script"==n)return e.acceptToken(5);if("style"==n)return e.acceptToken(6);if("textarea"==n)return e.acceptToken(7);if(pQ.hasOwnProperty(n))return e.acceptToken(8);r&&gQ[r]&&gQ[r][n]?e.acceptToken(57,-1):e.acceptToken(4)}}),{contextual:!0}),TQ=new Mo((e=>{for(let t=0,i=0;;i++){if(e.next<0){i&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){i>3&&e.acceptToken(58,-2);break}t=0}e.advance()}}));function RQ(e,t,i){let n=2+e.length;return new Mo((r=>{for(let o=0,s=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(t);break}if(0==o&&60==r.next||1==o&&47==r.next||o>=2&&os?r.acceptToken(t,-s):r.acceptToken(i,-(s-2));break}if((10==r.next||13==r.next)&&a){r.acceptToken(t,1);break}o=s=0}else s++;r.advance()}}))}const WQ=RQ("script",54,1),AQ=RQ("style",55,2),NQ=RQ("textarea",56,3),CQ=Ed({"Text RawText":rh.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":rh.angleBracket,TagName:rh.tagName,"MismatchedCloseTag/TagName":[rh.tagName,rh.invalid],AttributeName:rh.attributeName,"AttributeValue UnquotedAttributeValue":rh.attributeValue,Is:rh.definitionOperator,"EntityReference CharacterReference":rh.character,Comment:rh.blockComment,ProcessingInst:rh.processingInstruction,DoctypeDecl:rh.documentMeta}),qQ=ts.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO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ZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:SQ,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[CQ],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(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=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let a=e.type.id;if(27==a)return YQ(e,t,i);if(30==a)return YQ(e,t,n);if(33==a)return YQ(e,t,r);if(35==a&&o.length){let i,n=e.node,r=VQ(n,t);for(let s of o)if(s.tag==r&&(!s.attrs||s.attrs(i||(i=EQ(n,t))))){let t=n.parent.lastChild;return{parser:s.parser,overlay:[{from:e.to,to:36==t.type.id?t.from:n.parent.to}]}}}if(s&&21==a){let i,n=e.node;if(i=n.firstChild){let e=s[t.read(i.from,i.to)];if(e)for(let i of e){if(i.tagName&&i.tagName!=VQ(n.parent,t))continue;let e=n.lastChild;if(24==e.type.id)return{parser:i.parser,overlay:[{from:e.from+1,to:e.to-1}]};if(25==e.type.id)return{parser:i.parser,overlay:[{from:e.from,to:e.to}]}}}}return null}))}const zQ=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function MQ(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function IQ(e){return e>=48&&e<=57}const UQ=new Mo(((e,t)=>{for(let i=!1,n=0,r=0;;r++){let{next:o}=e;if(!(MQ(o)||45==o||95==o||i&&IQ(o))){i&&e.acceptToken(40==o?95:2==n&&t.canShift(2)?2:96);break}!i&&(45!=o||r>0)&&(i=!0),n===r&&45==o&&n++,e.advance()}})),jQ=new Mo((e=>{if(zQ.includes(e.peek(-1))){let{next:t}=e;(MQ(t)||95==t||35==t||46==t||91==t||58==t||45==t)&&e.acceptToken(94)}})),DQ=new Mo((e=>{if(!zQ.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),MQ(t)){do{e.advance()}while(MQ(e.next));e.acceptToken(1)}}})),GQ=Ed({"AtKeyword import charset namespace keyframes media supports":rh.definitionKeyword,"from to selector":rh.keyword,NamespaceName:rh.namespace,KeyframeName:rh.labelName,TagName:rh.tagName,ClassName:rh.className,PseudoClassName:rh.constant(rh.className),IdName:rh.labelName,"FeatureName PropertyName":rh.propertyName,AttributeName:rh.attributeName,NumberLiteral:rh.number,KeywordQuery:rh.keyword,UnaryQueryOp:rh.operatorKeyword,"CallTag ValueName":rh.atom,VariableName:rh.variableName,Callee:rh.operatorKeyword,Unit:rh.unit,"UniversalSelector NestingSelector":rh.definitionOperator,MatchOp:rh.compareOperator,"ChildOp SiblingOp, LogicOp":rh.logicOperator,BinOp:rh.arithmeticOperator,Important:rh.modifier,Comment:rh.blockComment,ParenthesizedContent:rh.special(rh.name),ColorLiteral:rh.color,StringLiteral:rh.string,":":rh.punctuation,"PseudoOp #":rh.derefOperator,"; ,":rh.separator,"( )":rh.paren,"[ ]":rh.squareBracket,"{ }":rh.brace}),LQ={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},BQ={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},KQ={__proto__:null,not:128,only:128,from:158,to:160},FQ=ts.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO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y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[jQ,DQ,UQ,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>LQ[e]||-1},{term:56,get:e=>BQ[e]||-1},{term:96,get:e=>KQ[e]||-1}],tokenPrec:1123});let HQ=null;function JQ(){if(!HQ&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],i=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))),i.has(n)||(t.push(n),i.add(n)));HQ=t.sort().map((e=>({type:"property",label:e})))}return HQ||[]}const ey=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((e=>({type:"class",label:e}))),ty=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((e=>({type:"keyword",label:e}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((e=>({type:"constant",label:e})))),iy=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((e=>({type:"type",label:e}))),ny=/^(\w[\w-]*|-\w[\w-]*|)$/,ry=/^-(-[\w-]*)?$/;const oy=new mo,sy=["Declaration"];function ay(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function ly(e,t){if(t.to-t.from>4096){let i=oy.get(t);if(i)return i;let n=[],r=new Set,o=t.cursor(Hr.IncludeAnonymous);if(o.firstChild())do{for(let t of ly(e,o.node))r.has(t.label)||(r.add(t.label),n.push(t))}while(o.nextSibling());return oy.set(t,n),n}{let i=[],n=new Set;return t.cursor().iterate((t=>{var r;if("VariableName"==t.name&&t.matchContext(sy)&&":"==(null===(r=t.node.nextSibling)||void 0===r?void 0:r.name)){let r=e.sliceString(t.from,t.to);n.has(r)||(n.add(r),i.push({label:r,type:"variable"}))}})),i}}const Oy=e=>{let{state:t,pos:i}=e,n=dh(t).resolveInner(i,-1),r=n.type.isError&&n.from==n.to-1&&"-"==t.doc.sliceString(n.from,n.to);if("PropertyName"==n.name||(r||"TagName"==n.name)&&/^(Block|Styles)$/.test(n.resolve(n.to).name))return{from:n.from,options:JQ(),validFor:ny};if("ValueName"==n.name)return{from:n.from,options:ty,validFor:ny};if("PseudoClassName"==n.name)return{from:n.from,options:ey,validFor:ny};if("VariableName"==n.name||(e.explicit||r)&&function(e,t){var i;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null===(i=e.parent)||void 0===i?void 0:i.firstChild;return"Callee"==(null==n?void 0:n.name)&&"var"==t.sliceString(n.from,n.to)}(n,t.doc))return{from:"VariableName"==n.name?n.from:i,options:ly(t.doc,ay(n)),validFor:ry};if("TagName"==n.name){for(let{parent:e}=n;e;e=e.parent)if("Block"==e.name)return{from:n.from,options:JQ(),validFor:ny};return{from:n.from,options:iy,validFor:ny}}if(!e.explicit)return null;let o=n.resolve(i),s=o.childBefore(i);return s&&":"==s.name&&"PseudoClassSelector"==o.name?{from:i,options:ey,validFor:ny}:s&&":"==s.name&&"Declaration"==o.name||"ArgList"==o.name?{from:i,options:ty,validFor:ny}:"Block"==o.name||"Styles"==o.name?{from:i,options:JQ(),validFor:ny}:null},cy=uh.define({name:"css",parser:FQ.configure({props:[Th.add({Declaration:Vh()}),Zh.add({Block:zh})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});const uy=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],dy=new es({start:!1,shift:(e,t)=>5==t||6==t||286==t?e:287==t,strict:!1}),hy=new Mo(((e,t)=>{let{next:i}=e;(125==i||-1==i||t.context)&&t.canShift(284)&&e.acceptToken(284)}),{contextual:!0,fallback:!0}),fy=new Mo(((e,t)=>{let i,{next:n}=e;uy.indexOf(n)>-1||(47!=n||47!=(i=e.peek(1))&&42!=i)&&125!=n&&59!=n&&-1!=n&&!t.context&&t.canShift(281)&&e.acceptToken(281)}),{contextual:!0}),py=new Mo(((e,t)=>{let{next:i}=e;if((43==i||45==i)&&(e.advance(),i==e.next)){e.advance();let i=!t.context&&t.canShift(2);e.acceptToken(i?2:3)}}),{contextual:!0}),my=new Mo((e=>{for(let t=!1,i=0;;i++){let{next:n}=e;if(n<0){i&&e.acceptToken(282);break}if(96==n){i?e.acceptToken(282):e.acceptToken(283,1);break}if(123==n&&t){1==i?e.acceptToken(4,1):e.acceptToken(282,-1);break}if(10==n&&i){e.advance(),e.acceptToken(282);break}92==n&&e.advance(),t=36==n,e.advance()}})),gy=new Mo(((e,t)=>{if(101==e.next&&t.dialectEnabled(1)){e.advance();for(let t=0;t<6;t++){if(e.next!="xtends".charCodeAt(t))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||95==e.next||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(1)}})),$y=Ed({"get set async static":rh.modifier,"for while do if else switch try catch finally return throw break continue default case":rh.controlKeyword,"in of await yield void typeof delete instanceof":rh.operatorKeyword,"let var const function class extends":rh.definitionKeyword,"import export from":rh.moduleKeyword,"with debugger as new":rh.keyword,TemplateString:rh.special(rh.string),super:rh.atom,BooleanLiteral:rh.bool,this:rh.self,null:rh.null,Star:rh.modifier,VariableName:rh.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":rh.function(rh.variableName),VariableDefinition:rh.definition(rh.variableName),Label:rh.labelName,PropertyName:rh.propertyName,PrivatePropertyName:rh.special(rh.propertyName),"CallExpression/MemberExpression/PropertyName":rh.function(rh.propertyName),"FunctionDeclaration/VariableDefinition":rh.function(rh.definition(rh.variableName)),"ClassDeclaration/VariableDefinition":rh.definition(rh.className),PropertyDefinition:rh.definition(rh.propertyName),PrivatePropertyDefinition:rh.definition(rh.special(rh.propertyName)),UpdateOp:rh.updateOperator,LineComment:rh.lineComment,BlockComment:rh.blockComment,Number:rh.number,String:rh.string,ArithOp:rh.arithmeticOperator,LogicOp:rh.logicOperator,BitOp:rh.bitwiseOperator,CompareOp:rh.compareOperator,RegExp:rh.regexp,Equals:rh.definitionOperator,Arrow:rh.function(rh.punctuation),": Spread":rh.punctuation,"( )":rh.paren,"[ ]":rh.squareBracket,"{ }":rh.brace,"InterpolationStart InterpolationEnd":rh.special(rh.brace),".":rh.derefOperator,", ;":rh.separator,TypeName:rh.typeName,TypeDefinition:rh.definition(rh.typeName),"type enum interface implements namespace module declare":rh.definitionKeyword,"abstract global Privacy readonly override":rh.modifier,"is keyof unique infer":rh.operatorKeyword,JSXAttributeValue:rh.attributeValue,JSXText:rh.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":rh.angleBracket,"JSXIdentifier JSXNameSpacedName":rh.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":rh.attributeName}),by={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:48,true:56,false:56,void:66,typeof:70,null:86,super:88,new:122,await:139,yield:141,delete:142,class:152,extends:154,public:197,private:197,protected:197,readonly:199,instanceof:220,in:222,const:224,import:256,keyof:307,unique:311,infer:317,is:351,abstract:371,implements:373,type:375,let:378,var:380,interface:387,enum:391,namespace:397,module:399,declare:403,global:407,for:428,of:437,while:440,with:444,do:448,if:452,else:454,switch:458,case:464,try:470,catch:474,finally:478,return:482,throw:486,break:490,continue:494,debugger:498},Qy={__proto__:null,async:109,get:111,set:113,public:161,private:161,protected:161,static:163,abstract:165,override:167,readonly:173,new:355},yy={__proto__:null,"<":129},_y=ts.deserialize({version:14,states:"$8SO`QdOOO'QQ(C|O'#ChO'XOWO'#DVO)dQdO'#D]O)tQdO'#DhO){QdO'#DrO-xQdO'#DxOOQO'#E]'#E]O.]Q`O'#E[O.bQ`O'#E[OOQ(C['#Ef'#EfO0aQ(C|O'#ItO2wQ(C|O'#IuO3eQ`O'#EzO3jQ!bO'#FaOOQ(C['#FS'#FSO3rO#tO'#FSO4QQ&jO'#FhO5bQ`O'#FgOOQ(C['#Iu'#IuOOQ(CW'#It'#ItOOQS'#J^'#J^O5gQ`O'#HpO5lQ(ChO'#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qQ6S3qQ6V3xQ6b:`Q6f:gQ6g:hQ7g6WQ7z6{Q8Z7jQ8m8]Q8y8oQ9_!WR:|;aR!aRR&Y!bS&U!b+`S+]&V&^R0Q+fR'P!yR'S!zT!tU$ZS!sU$ZU$xrs*mS&s!r!uQ,T&tQ,W&wQ.l)zS0k,S,UR4X0l`!dR!]!`$u%x&`)x+hh!qUrs!r!u$Z&t&w)z,S,U0lQ/d*mQ/w+YQ3p/oT:s&W)yT!gR$uS!fR$uS%y!]&`S&O!`)xS+S%x+hT+_&W)yT&]!b$vQ#i^R'{#nT'q#i'rR1Z,lT(a#v(cR(i#yQ-})]Q2U.RQ2|.{Q4{2TQ5l3QQ6t4}Q7U5kQ7y6zQ8S7WR8i8TlhOSj}!n$]%c%f%g%i*o*t/g/jQ%]yR*d%YV$yrs*mR.u*TR*c%WQ$qpR)u$rR)k$lT%az%dT%bz%dT/i*t/j",nodeNames:"⚠ extends ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:332,context:dy,nodeProps:[["closedBy",4,"InterpolationEnd",40,"]",51,"}",66,")",132,"JSXSelfCloseEndTag JSXEndTag",146,"JSXEndTag"],["group",-26,8,15,17,58,184,188,191,192,194,197,200,211,213,219,221,223,225,228,234,240,242,244,246,248,250,251,"Statement",-30,12,13,24,27,28,41,43,44,45,47,52,60,68,74,75,91,92,101,103,119,122,124,125,126,127,129,130,148,149,151,"Expression",-22,23,25,29,32,34,152,154,156,157,159,160,161,163,164,165,167,168,169,178,180,182,183,"Type",-3,79,85,90,"ClassItem"],["openedBy",30,"InterpolationStart",46,"[",50,"{",65,"(",131,"JSXStartTag",141,"JSXStartTag JSXStartCloseTag"]],propSources:[$y],skippedNodes:[0,5,6],repeatNodeCount:28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`#o%T#p#q!=P#q~%T6X!?oR!S5}nQ$UWO!^%T!_#o%T#p~%TX!@PR!kP$UWO!^%T!_#o%T#p~%T7Z!@gr$UW'Y7R#zS']$y'g3SOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`7Z!CO_$UW'Z7R#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[gy,fy,py,my,0,1,2,3,4,5,6,7,8,9,hy],topRules:{Script:[0,7]},dialects:{jsx:12107,ts:12109},dynamicPrecedences:{149:1,176:1},specialized:[{term:289,get:e=>by[e]||-1},{term:299,get:e=>Qy[e]||-1},{term:63,get:e=>yy[e]||-1}],tokenPrec:12130}),Py=[Rp("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Rp("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Rp("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Rp("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Rp("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Rp("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),Rp("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Rp("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),Rp("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Rp('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Rp('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],wy=new mo,vy=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Xy(e){return(t,i)=>{let n=t.node.getChild("VariableDefinition");return n&&i(n,e),!0}}const xy=["FunctionDeclaration"],Sy={FunctionDeclaration:Xy("function"),ClassDeclaration:Xy("class"),ClassExpression:()=>!0,EnumDeclaration:Xy("constant"),TypeAliasDeclaration:Xy("type"),NamespaceDeclaration:Xy("namespace"),VariableDefinition(e,t){e.matchContext(xy)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function ky(e,t){let i=wy.get(t);if(i)return i;let n=[],r=!0;function o(t,i){let r=e.sliceString(t.from,t.to);n.push({label:r,type:i})}return t.cursor(Hr.IncludeAnonymous).iterate((t=>{if(r)r=!1;else if(t.name){let e=Sy[t.name];if(e&&e(t,o)||vy.has(t.name))return!1}else if(t.to-t.from>8192){for(let i of ky(e,t.node))n.push(i);return!1}})),wy.set(t,n),n}const Ty=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Ry=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Wy(e){let t=dh(e.state).resolveInner(e.pos,-1);if(Ry.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&Ty.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)vy.has(i.name)&&(n=n.concat(ky(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:Ty}}const Ay=uh.define({name:"javascript",parser:_y.configure({props:[Th.add({IfStatement:Vh({except:/^\s*({|else\b)/}),TryStatement:Vh({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,i=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(i?0:n?1:2)*e.unit},Block:qh({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Vh({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),Zh.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zh,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Ny={test:e=>/^JSX/.test(e.name),facet:ah({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Cy=Ay.configure({dialect:"ts"},"typescript"),qy=Ay.configure({dialect:"jsx",props:[lh.add((e=>e.isTop?[Ny]:void 0))]}),Ey=Ay.configure({dialect:"jsx ts",props:[lh.add((e=>e.isTop?[Ny]:void 0))]},"typescript"),Vy="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map((e=>({label:e,type:"keyword"})));function Yy(e={}){let t=e.jsx?e.typescript?Ey:qy:e.typescript?Cy:Ay;return new _h(t,[Ay.data.of({autocomplete:Tf(Ry,kf(Py.concat(Vy)))}),Ay.data.of({autocomplete:Wy}),e.jsx?My:[]])}function Zy(e,t,i=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,i));return""}const zy="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),My=iu.inputHandler.of(((e,t,i,n)=>{if((zy?e.composing:e.compositionStarted)||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!Ay.isActiveAt(e.state,t,-1))return!1;let{state:r}=e,o=r.changeByRange((e=>{var t;let i,{head:o}=e,s=dh(r).resolveInner(o,-1);if("JSXStartTag"==s.name&&(s=s.parent),"JSXAttributeValue"==s.name&&s.to>o);else{if(">"==n&&"JSXFragmentTag"==s.name)return{range:Rn.cursor(o+1),changes:{from:o,insert:">"}};if("/"==n&&"JSXFragmentTag"==s.name){let e=s.parent,n=null==e?void 0:e.parent;if(e.from==o-1&&"JSXEndTag"!=(null===(t=n.lastChild)||void 0===t?void 0:t.name)&&(i=Zy(r.doc,null==n?void 0:n.firstChild,o))){let e=`/${i}>`;return{range:Rn.cursor(o+e.length),changes:{from:o,insert:e}}}}else if(">"==n){let e=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(s);if(e&&!function(e){return e&&("JSXEndTag"==e.name||"JSXSelfCloseEndTag"==e.name)}(e.lastChild)&&"`}}}}return{range:e}}));return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)})),Iy=["_blank","_self","_top","_parent"],Uy=["ascii","utf-8","utf-16","latin1","latin1"],jy=["get","post","put","delete"],Dy=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Gy=["true","false"],Ly={},By={a:{attrs:{href:null,ping:null,type:null,media:null,target:Iy,hreflang:null}},abbr:Ly,address:Ly,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ly,aside:Ly,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ly,base:{attrs:{href:null,target:Iy}},bdi:Ly,bdo:Ly,blockquote:{attrs:{cite:null}},body:Ly,br:Ly,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Dy,formmethod:jy,formnovalidate:["novalidate"],formtarget:Iy,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ly,center:Ly,cite:Ly,code:Ly,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ly,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ly,div:Ly,dl:Ly,dt:Ly,em:Ly,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ly,figure:Ly,footer:Ly,form:{attrs:{action:null,name:null,"accept-charset":Uy,autocomplete:["on","off"],enctype:Dy,method:jy,novalidate:["novalidate"],target:Iy}},h1:Ly,h2:Ly,h3:Ly,h4:Ly,h5:Ly,h6:Ly,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ly,hgroup:Ly,hr:Ly,html:{attrs:{manifest:null}},i:Ly,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Dy,formmethod:jy,formnovalidate:["novalidate"],formtarget:Iy,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ly,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ly,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ly,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Uy,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ly,noscript:Ly,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ly,param:{attrs:{name:null,value:null}},pre:Ly,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ly,rt:Ly,ruby:Ly,samp:Ly,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Uy}},section:Ly,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ly,source:{attrs:{src:null,type:null,media:null}},span:Ly,strong:Ly,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ly,summary:Ly,sup:Ly,table:Ly,tbody:Ly,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ly,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ly,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ly,time:{attrs:{datetime:null}},title:Ly,tr:Ly,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ly,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ly},Ky={accesskey:null,class:null,contenteditable:Gy,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Gy,autocorrect:Gy,autocapitalize:Gy,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Gy,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Gy,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Gy,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Gy,"aria-hidden":Gy,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Gy,"aria-multiselectable":Gy,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Gy,"aria-relevant":null,"aria-required":Gy,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Fy="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e=>"on"+e));for(let e of Fy)Ky[e]=null;class Hy{constructor(e,t){this.tags=Object.assign(Object.assign({},By),e),this.globalAttrs=Object.assign(Object.assign({},Ky),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Jy(e,t,i=e.length){if(!t)return"";let n=t.firstChild,r=n&&n.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,i)):""}function e_(e,t=!1){for(let i=e.parent;i;i=i.parent)if("Element"==i.name){if(!t)return i;t=!1}return null}function t_(e,t,i){let n=i.tags[Jy(e,e_(t,!0))];return(null==n?void 0:n.children)||i.allTags}function i_(e,t){let i=[];for(let n=t;n=e_(n);){let r=Jy(e,n);if(r&&"CloseTag"==n.lastChild.name)break;r&&i.indexOf(r)<0&&("EndTag"==t.name||t.from>=n.firstChild.to)&&i.push(r)}return i}Hy.default=new Hy;const n_=/^[:\-\.\w\u00b7-\uffff]*$/;function r_(e,t,i,n,r){let o=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:t_(e.doc,i,t).map((e=>({label:e,type:"type"}))).concat(i_(e.doc,i).map(((e,t)=>({label:"/"+e,apply:"/"+e+o,type:"type",boost:99-t})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function o_(e,t,i,n){let r=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:i_(e.doc,t).map(((e,t)=>({label:e,apply:e+r,type:"type",boost:99-t}))),validFor:n_}}function s_(e,t){let{state:i,pos:n}=t,r=dh(i).resolveInner(n),o=r.resolve(n,-1);for(let e,t=n;r==o&&(e=o.childBefore(t));){let i=e.lastChild;if(!i||!i.type.isError||i.from({label:e,type:"property"}))),validFor:n_}}(i,e,o,"AttributeName"==o.name?o.from:n,n):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(e,t,i,n,r){var o;let s,a=null===(o=i.parent)||void 0===o?void 0:o.getChild("AttributeName"),l=[];if(a){let o=e.sliceDoc(a.from,a.to),O=t.globalAttrs[o];if(!O){let n=e_(i),r=n?t.tags[Jy(e.doc,n)]:null;O=(null==r?void 0:r.attrs)&&r.attrs[o]}if(O){let t=e.sliceDoc(n,r).toLowerCase(),i='"',o='"';/^['"]/.test(t)?(s='"'==t[0]?/^[^"]*$/:/^[^']*$/,i="",o=e.sliceDoc(r,r+1)==t[0]?"":t[0],t=t.slice(1),n++):s=/^[^\s<>='"]*$/;for(let e of O)l.push({label:e,apply:i+e+o,type:"constant"})}}return{from:n,to:r,options:l,validFor:s}}(i,e,o,"Is"==o.name?n:o.from,n):!t.explicit||"Element"!=r.name&&"Text"!=r.name&&"Document"!=r.name?null:function(e,t,i,n){let r=[],o=0;for(let n of t_(e.doc,i,t))r.push({label:"<"+n,type:"type"});for(let t of i_(e.doc,i))r.push({label:"",type:"type",boost:99-o++});return{from:n,to:n,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,e,o,n)}function a_(e){let{extraTags:t,extraGlobalAttributes:i}=e,n=i||t?new Hy(t,i):Hy.default;return e=>s_(n,e)}const l_=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:Cy.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:qy.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:Ey.parser},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:Ay.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:cy.parser}],O_=[{name:"style",parser:cy.parser.configure({top:"Styles"})}].concat(Fy.map((e=>({name:e,parser:Ay.parser})))),c_=uh.define({name:"html",parser:qQ.configure({props:[Th.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),u_=c_.configure({wrap:ZQ(l_,O_)});function d_(e={}){let t,i="";!1===e.matchClosingTags&&(i="noMatch"),!0===e.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=ZQ((e.nestedLanguages||[]).concat(l_),(e.nestedAttributes||[]).concat(O_)));let n=t?c_.configure({wrap:t,dialect:i}):i?u_.configure({dialect:i}):u_;return new _h(n,[u_.data.of({autocomplete:a_(e)}),!1!==e.autoCloseTags?f_:[],Yy().support,new _h(cy,cy.data.of({autocomplete:Oy})).support])}const h_=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),f_=iu.inputHandler.of(((e,t,i,n)=>{if(e.composing||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!u_.isActiveAt(e.state,t,-1))return!1;let{state:r}=e,o=r.changeByRange((t=>{var i,o,s;let a,{head:l}=t,O=dh(r).resolveInner(l,-1);if("TagName"!=O.name&&"StartTag"!=O.name||(O=O.parent),">"==n&&"OpenTag"==O.name){if("CloseTag"!=(null===(o=null===(i=O.parent)||void 0===i?void 0:i.lastChild)||void 0===o?void 0:o.name)&&(a=Jy(r.doc,O.parent,l))&&!h_.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),i=`${t?"":">"}`;return{range:Rn.cursor(l+1),changes:{from:l+(t?1:0),insert:i}}}}else if("/"==n&&"OpenTag"==O.name){let t=O.parent,i=null==t?void 0:t.parent;if(t.from==l-1&&"CloseTag"!=(null===(s=i.lastChild)||void 0===s?void 0:s.name)&&(a=Jy(r.doc,i,l))&&!h_.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),i=`/${a}${t?"":">"}`,n=l+i.length+(t?1:0);return{range:Rn.cursor(n),changes:{from:l,insert:i}}}}return{range:t}}));return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)})),p_=ah({commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}}}),m_=new jr,g_=Hb.configure({props:[Zh.add((e=>!e.is("Block")||e.is("Document")||null!=$_(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to}))),m_.add($_),Th.add({Document:()=>null}),sh.add({Document:p_})]});function $_(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function b_(e,t){let i=e;for(;;){let e,n=i.nextSibling;if(!n||null!=(e=$_(n.type))&&e<=t)break;i=n}return i.to}const Q_=Yh.of(((e,t,i)=>{for(let n=dh(e).resolveInner(i,-1);n&&!(n.fromi)return{from:i,to:t}}return null}));function y_(e){return new Oh(p_,e,[Q_],"markdown")}const __=y_(g_),P_=y_(g_.configure([cQ,hQ,dQ,fQ]));class w_{constructor(e,t,i,n,r,o,s){this.node=e,this.from=t,this.to=i,this.spaceBefore=n,this.spaceAfter=r,this.type=o,this.item=s}blank(e,t=!0){let i=this.spaceBefore+("Blockquote"==this.node.name?">":"");if(null!=e){for(;i.length0;e--)i+=" ";return i+(t?this.spaceAfter:"")}marker(e,t){let i="OrderedList"==this.node.name?String(+X_(this.item,e)[2]+t):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function v_(e,t){let i=[];for(let t=e;t&&"Document"!=t.name;t=t.parent)"ListItem"!=t.name&&"Blockquote"!=t.name&&"FencedCode"!=t.name||i.push(t);let n=[];for(let e=i.length-1;e>=0;e--){let r,o=i[e],s=t.lineAt(o.from),a=o.from-s.from;if("FencedCode"==o.name)n.push(new w_(o,a,a,"","","",null));else if("Blockquote"==o.name&&(r=/^[ \t]*>( ?)/.exec(s.text.slice(a))))n.push(new w_(o,a,a+r[0].length,"",r[1],">",null));else if("ListItem"==o.name&&"OrderedList"==o.parent.name&&(r=/^([ \t]*)\d+([.)])([ \t]*)/.exec(s.text.slice(a)))){let e=r[3],t=r[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),n.push(new w_(o.parent,a,a+t,r[1],e,r[2],o))}else if("ListItem"==o.name&&"BulletList"==o.parent.name&&(r=/^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)/.exec(s.text.slice(a)))){let e=r[4],t=r[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let i=r[2];r[3]&&(i+=r[3].replace(/[xX]/," ")),n.push(new w_(o.parent,a,a+t,r[1],e,i,o))}}return n}function X_(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function x_(e,t,i,n=0){for(let r=-1,o=e;;){if("ListItem"==o.name){let e=X_(o,t),s=+e[2];if(r>=0){if(s!=r+1)return;i.push({from:o.from+e[1].length,to:o.from+e[0].length,insert:String(r+2+n)})}r=s}let e=o.nextSibling;if(!e)break;o=e}}function S_(e){return"QuoteMark"==e.name||"ListMark"==e.name}const k_=[{key:"Enter",run:({state:e,dispatch:t})=>{let i=dh(e),{doc:n}=e,r=null,o=e.changeByRange((t=>{if(!t.empty||!P_.isActiveAt(e,t.from))return r={range:t};let o=t.from,s=n.lineAt(o),a=v_(i.resolveInner(o,-1),n);for(;a.length&&a[a.length-1].from>o-s.from;)a.pop();if(!a.length)return r={range:t};let l=a[a.length-1];if(l.to-l.spaceAfter.length>o-s.from)return r={range:t};let O=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&O){if(l.node.firstChild.to>=o||s.from>0&&!/[^\s>]/.test(n.lineAt(s.from-1).text)){let e,t=a.length>1?a[a.length-2]:null,i="";t&&t.item?(e=s.from+t.from,i=t.marker(n,1)):e=s.from+(t?t.to:0);let r=[{from:e,to:o,insert:i}];return"OrderedList"==l.node.name&&x_(l.item,n,r,-2),t&&"OrderedList"==t.node.name&&x_(t.item,n,r),{range:Rn.cursor(e+i.length),changes:r}}{let t="";for(let e=0,i=a.length-2;e<=i;e++)t+=a[e].blank(e\s*$/.exec(i.text);if(r&&r.index==l.from){let n=e.changes([{from:i.from+r.index,to:i.to},{from:s.from+l.from,to:s.to}]);return{range:t.map(n),changes:n}}}let c=[];"OrderedList"==l.node.name&&x_(l.item,n,c);let u=l.item&&l.item.from]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=a.length-1;e<=t;e++)d+=e!=t||u?a[e].blank(es.from&&/\s/.test(s.text.charAt(h-s.from-1));)h--;return d=e.lineBreak+d,c.push({from:h,to:o,insert:d}),{range:Rn.cursor(h+d.length),changes:c}}));return!r&&(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)}},{key:"Backspace",run:({state:e,dispatch:t})=>{let i=dh(e),n=null,r=e.changeByRange((t=>{let r=t.from,{doc:o}=e;if(t.empty&&P_.isActiveAt(e,t.from)){let e=o.lineAt(r),n=v_(function(e,t){let i,n=e.resolveInner(t,-1),r=t;for(S_(n)&&(r=n.from,n=n.parent);i=n.childBefore(r);)if(S_(i))r=i.from;else{if("OrderedList"!=i.name&&"BulletList"!=i.name)break;n=i.lastChild,r=n.to}return n}(i,r),o);if(n.length){let i=n[n.length-1],o=i.to-i.spaceAfter.length+(i.spaceAfter?1:0);if(r-e.from>o&&!/\S/.test(e.text.slice(o,r-e.from)))return{range:Rn.cursor(e.from+o),changes:{from:e.from+o,to:r}};if(r-e.from==o&&(!i.item||e.from<=i.item.from||!/\S/.test(e.text.slice(0,i.to)))){let n=e.from+i.from;if(i.item&&i.node.from{if(i&&e){let t=null;if(i=/\S*/.exec(i)[0],t="function"==typeof e?e(i):Ph.matchLanguageName(e,i,!0),t instanceof Ph)return t.support?t.support.language.parser:ph.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}(t,o):void 0;return s.push(eQ({codeParser:l,htmlParser:T_.language.parser})),n&&a.push(Gn.high(cu.of(k_))),new _h(y_(r.configure(s)),a)}function W_(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function A_(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function N_(e,t,i){for(let n=!1;;){if(e.next<0)return;if(e.next==t&&!n)return void e.advance();n=i&&!n&&92==e.next,e.advance()}}function C_(e,t){for(;95==e.next||W_(e.next);)null!=t&&(t+=String.fromCharCode(e.next)),e.advance();return t}function q_(e,t){for(;48==e.next||49==e.next;)e.advance();t&&e.next==t&&e.advance()}function E_(e,t){for(;;){if(46==e.next){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(69==e.next||101==e.next)for(e.advance(),43!=e.next&&45!=e.next||e.advance();e.next>=48&&e.next<=57;)e.advance()}function V_(e){for(;!(e.next<0||10==e.next);)e.advance()}function Y_(e,t){for(let i=0;i!=&|~^/",specialVar:"?",identifierQuotes:'"',words:z_(I_,M_)};function j_(e){return new Mo((t=>{var i;let{next:n}=t;if(t.advance(),Y_(n,Z_)){for(;Y_(t.next,Z_);)t.advance();t.acceptToken(36)}else if(36==n&&36==t.next&&e.doubleDollarQuotedStrings)(function(e){for(;;){if(e.next<0||e.peek(1)<0)return;if(36==e.next&&36==e.peek(1))return void e.advance(2);e.advance()}})(t),t.acceptToken(3);else if(39==n||34==n&&e.doubleQuotedStrings)N_(t,n,e.backslashEscapes),t.acceptToken(3);else if(35==n&&e.hashComments||47==n&&47==t.next&&e.slashComments)V_(t),t.acceptToken(1);else if(45!=n||45!=t.next||e.spaceAfterDashes&&32!=t.peek(1))if(47==n&&42==t.next){t.advance();for(let e=1;;){let i=t.next;if(t.next<0)break;if(t.advance(),42==i&&47==t.next){if(e--,t.advance(),!e)break}else 47==i&&42==t.next&&(e++,t.advance())}t.acceptToken(2)}else if(101!=n&&69!=n||39!=t.next)if(110!=n&&78!=n||39!=t.next||!e.charSetCasts)if(95==n&&e.charSetCasts)for(let i=0;;i++){if(39==t.next&&i>1){t.advance(),N_(t,39,e.backslashEscapes),t.acceptToken(3);break}if(!W_(t.next))break;t.advance()}else if(40==n)t.acceptToken(7);else if(41==n)t.acceptToken(8);else if(123==n)t.acceptToken(9);else if(125==n)t.acceptToken(10);else if(91==n)t.acceptToken(11);else if(93==n)t.acceptToken(12);else if(59==n)t.acceptToken(13);else if(e.unquotedBitLiterals&&48==n&&98==t.next)t.advance(),q_(t),t.acceptToken(22);else if(98!=n&&66!=n||39!=t.next&&34!=t.next){if(48==n&&(120==t.next||88==t.next)||(120==n||88==n)&&39==t.next){let e=39==t.next;for(t.advance();A_(t.next);)t.advance();e&&39==t.next&&t.advance(),t.acceptToken(4)}else if(46==n&&t.next>=48&&t.next<=57)E_(t,!0),t.acceptToken(4);else if(46==n)t.acceptToken(14);else if(n>=48&&n<=57)E_(t,!1),t.acceptToken(4);else if(Y_(n,e.operatorChars)){for(;Y_(t.next,e.operatorChars);)t.advance();t.acceptToken(15)}else if(Y_(n,e.specialVar))t.next==n&&t.advance(),function(e){if(39==e.next||34==e.next||96==e.next){let t=e.next;e.advance(),N_(e,t,!1)}else C_(e)}(t),t.acceptToken(17);else if(Y_(n,e.identifierQuotes))N_(t,n,!1),t.acceptToken(19);else if(58==n||44==n)t.acceptToken(16);else if(W_(n)){let r=C_(t,String.fromCharCode(n));t.acceptToken(46==t.next?18:null!==(i=e.words[r.toLowerCase()])&&void 0!==i?i:18)}}else{const i=t.next;t.advance(),e.treatBitsAsBytes?(N_(t,i,e.backslashEscapes),t.acceptToken(23)):(q_(t,i),t.acceptToken(22))}else t.advance(),N_(t,39,e.backslashEscapes),t.acceptToken(3);else t.advance(),N_(t,39,!0);else V_(t),t.acceptToken(1)}))}const D_=j_(U_),G_=ts.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,D_],topRules:{Script:[0,25]},tokenPrec:0});function L_(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function B_(e,t){let i=e.sliceString(t.from,t.to),n=/^([`'"])(.*)\1$/.exec(i);return n?n[2]:i}function K_(e){return e&&("Identifier"==e.name||"QuotedIdentifier"==e.name)}function F_(e,t){if("CompositeIdentifier"==t.name){let i=[];for(let n=t.firstChild;n;n=n.nextSibling)K_(n)&&i.push(B_(e,n));return i}return[B_(e,t)]}function H_(e,t){for(let i=[];;){if(!t||"."!=t.name)return i;let n=L_(t);if(!K_(n))return i;i.unshift(B_(e,n)),t=L_(n)}}function J_(e,t){let i=dh(e).resolveInner(t,-1),n=function(e,t){let i;for(let e=t;!i;e=e.parent){if(!e)return null;"Statement"==e.name&&(i=e)}let n=null;for(let t=i.firstChild,r=!1,o=null;t;t=t.nextSibling){let i="Keyword"==t.name?e.sliceString(t.from,t.to).toLowerCase():null,s=null;if(r)if("as"==i&&o&&K_(t.nextSibling))s=B_(e,t.nextSibling);else{if(i&&eP.has(i))break;o&&K_(t)&&(s=B_(e,t))}else r="from"==i;s&&(n||(n=Object.create(null)),n[s]=F_(e,o)),o=/Identifier$/.test(t.name)?t:null}return n}(e.doc,i);return"Identifier"==i.name||"QuotedIdentifier"==i.name||"Keyword"==i.name?{from:i.from,quoted:"QuotedIdentifier"==i.name?e.doc.sliceString(i.from,i.from+1):null,parents:H_(e.doc,L_(i)),aliases:n}:"."==i.name?{from:t,quoted:null,parents:H_(e.doc,i),aliases:n}:{from:t,quoted:null,parents:[],empty:!0,aliases:n}}const eP=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function tP(e,t){return e?t.map((t=>Object.assign(Object.assign({},t),{label:e+t.label+e,apply:void 0}))):t}const iP=/^\w*$/,nP=/^[`'"]?\w*[`'"]?$/;class rP{constructor(){this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null));return t[e]||(t[e]=new rP)}childCompletions(e){return this.children?Object.keys(this.children).filter((e=>e)).map((t=>({label:t,type:e}))):[]}}let oP=G_.configure({props:[Th.add({Statement:Vh()}),Zh.add({Statement:e=>({from:e.firstChild.to,to:e.to}),BlockComment:e=>({from:e.from+2,to:e.to-2})}),Ed({Keyword:rh.keyword,Type:rh.typeName,Builtin:rh.standard(rh.name),Bits:rh.number,Bytes:rh.string,Bool:rh.bool,Null:rh.null,Number:rh.number,String:rh.string,Identifier:rh.name,QuotedIdentifier:rh.special(rh.string),SpecialVar:rh.special(rh.name),LineComment:rh.lineComment,BlockComment:rh.blockComment,Operator:rh.operator,"Semi Punctuation":rh.punctuation,"( )":rh.paren,"{ }":rh.brace,"[ ]":rh.squareBracket})]});class sP{constructor(e,t){this.dialect=e,this.language=t}get extension(){return this.language.extension}static define(e){let t=function(e,t,i,n){let r={};for(let t in U_)r[t]=(e.hasOwnProperty(t)?e:U_)[t];return t&&(r.words=z_(t,i||"",n)),r}(e,e.keywords,e.types,e.builtin),i=uh.define({name:"sql",parser:oP.configure({tokenizers:[{from:D_,to:j_(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new sP(t,i)}}function aP(e,t=!1){return function(e,t){return Tf(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],kf(Object.keys(e).map((i=>({label:t?i.toUpperCase():i,type:21==e[i]?"type":20==e[i]?"keyword":"variable",boost:-1})))))}(e.dialect.words,t)}function lP(e,t=!1){return e.language.data.of({autocomplete:aP(e,t)})}function OP(e){return e.schema?function(e,t,i,n,r){let o=new rP,s=o.child(r||"");for(let t in e){let i=t.indexOf(".");(i>-1?o.child(t.slice(0,i)):s).child(i>-1?t.slice(i+1):t).list=e[t].map((e=>"string"==typeof e?{label:e,type:"property"}:e))}s.list=(t||s.childCompletions("type")).concat(n?s.child(n).list:[]);for(let e in o.children){let t=o.child(e);t.list.length||(t.list=t.childCompletions("type"))}return o.list=s.list.concat(i||o.childCompletions("type")),e=>{let{parents:t,from:i,quoted:r,empty:a,aliases:l}=J_(e.state,e.pos);if(a&&!e.explicit)return null;l&&1==t.length&&(t=l[t[0]]||t);let O=o;for(let e of t){for(;!O.children||!O.children[e];)if(O==o)O=s;else{if(O!=s||!n)return null;O=O.child(n)}O=O.child(e)}let c=r&&e.state.sliceDoc(e.pos,e.pos+1)==r,u=O.list;return O==o&&l&&(u=u.concat(Object.keys(l).map((e=>({label:e,type:"constant"}))))),{from:i,to:c?e.pos+1:void 0,options:tP(r,u),validFor:r?nP:iP}}}(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema):()=>null}function cP(e){return e.schema?(e.dialect||uP).language.data.of({autocomplete:OP(e)}):[]}const uP=sP.define({}),dP=sP.define({charSetCasts:!0,doubleDollarQuotedStrings:!0,operatorChars:"+-*/<>=~!@#%^&|`?",specialVar:"",keywords:I_+"a abort abs absent access according ada admin aggregate alias also always analyse analyze array_agg array_max_cardinality asensitive assert assignment asymmetric atomic attach attribute attributes avg backward base64 begin_frame begin_partition bernoulli bit_length blocked bom c cache called cardinality catalog_name ceil ceiling chain char_length character_length character_set_catalog character_set_name character_set_schema characteristics characters checkpoint class class_origin cluster coalesce cobol collation_catalog collation_name collation_schema collect column_name columns command_function command_function_code comment comments committed concurrently condition_number configuration conflict connection_name constant constraint_catalog constraint_name constraint_schema contains content control conversion convert copy corr cost covar_pop covar_samp csv cume_dist current_catalog current_row current_schema cursor_name database datalink datatype datetime_interval_code datetime_interval_precision db debug defaults defined definer degree delimiter delimiters dense_rank depends derived detach detail dictionary disable discard dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue document dump dynamic_function dynamic_function_code element elsif empty enable encoding encrypted end_frame end_partition endexec enforced enum errcode error event every exclude excluding exclusive exp explain expression extension extract family file filter final first_value flag floor following force foreach fortran forward frame_row freeze fs functions fusion g generated granted greatest groups handler header hex hierarchy hint id ignore ilike immediately immutable implementation implicit import include including increment indent index indexes info inherit inherits inline insensitive instance instantiable instead integrity intersection invoker isnull k key_member key_type label lag last_value lead leakproof least length library like_regex link listen ln load location lock locked log logged lower m mapping matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text min minvalue mod mode more move multiset mumps name namespace nfc nfd nfkc nfkd nil normalize normalized nothing notice notify notnull nowait nth_value ntile nullable nullif nulls number occurrences_regex octet_length octets off offset oids operator options ordering others over overlay overriding owned owner p parallel parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partition pascal passing passthrough password percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding prepared print_strict_params procedural procedures program publication query quote raise range rank reassign recheck recovery refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex rename repeatable replace replica requiring reset respect restart restore result_oid returned_cardinality returned_length returned_octet_length returned_sqlstate returning reverse routine_catalog routine_name routine_schema routines row_count row_number rowtype rule scale schema_name schemas scope scope_catalog scope_name scope_schema security selective self sensitive sequence sequences serializable server server_name setof share show simple skip slice snapshot source specific_name sqlcode sqlerror sqrt stable stacked standalone statement statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time t table_name tables tablesample tablespace temp template ties token top_level_count transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex trigger_catalog trigger_name trigger_schema trim trim_array truncate trusted type types uescape unbounded uncommitted unencrypted unlink unlisten unlogged unnamed untyped upper uri use_column use_variable user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema vacuum valid validate validator value_of var_pop var_samp varbinary variable_conflict variadic verbose version versioning views volatile warning whitespace width_bucket window within wrapper xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate yes",types:M_+"bigint int8 bigserial serial8 varbit bool box bytea cidr circle precision float8 inet int4 json jsonb line lseg macaddr macaddr8 money numeric pg_lsn point polygon float4 int2 smallserial serial2 serial serial4 text timetz timestamptz tsquery tsvector txid_snapshot uuid xml"}),hP=new Set([23,47,48,255,63,121,54,55,230,60,61,58,59,71,142,143,146]),fP=new Mo(((e,t)=>{if(e.next<0)e.acceptToken(194);else if(10!=e.next&&13!=e.next);else if(t.context.depth<0)e.acceptToken(192,1);else{e.advance();let t=0;for(;32==e.next||9==e.next;)e.advance(),t++;let i=10==e.next||13==e.next||35==e.next;e.acceptToken(i?193:191,-t)}}),{contextual:!0,fallback:!0}),pP=new Mo(((e,t)=>{let i=t.context.depth;if(i<0)return;let n=e.peek(-1);if((10==n||13==n)&&t.context.depth>=0){let t=0,n=0;for(;;){if(32==e.next)t++;else{if(9!=e.next)break;t+=8-t%8}e.advance(),n++}t!=i&&10!=e.next&&13!=e.next&&35!=e.next&&(te.depth<0&&hP.has(t)?e.parent:e,shift:(e,t,i,n)=>189==t?new mP(e,function(e){let t=0;for(let i=0;ie.hash}),$P=new Mo((e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let i=e.peek(t);if(32!=i&&9!=i)return void(40!=i&&46!=i&&10!=i&&13!=i&&35!=i&&e.acceptToken(1))}})),bP=Ed({'async "*" "**" FormatConversion FormatSpec':rh.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":rh.controlKeyword,"in not and or is del":rh.operatorKeyword,"from def class global nonlocal lambda":rh.definitionKeyword,import:rh.moduleKeyword,"with as print":rh.keyword,Boolean:rh.bool,None:rh.null,VariableName:rh.variableName,"CallExpression/VariableName":rh.function(rh.variableName),"FunctionDefinition/VariableName":rh.function(rh.definition(rh.variableName)),"ClassDefinition/VariableName":rh.definition(rh.className),PropertyName:rh.propertyName,"CallExpression/MemberExpression/PropertyName":rh.function(rh.propertyName),Comment:rh.lineComment,Number:rh.number,String:rh.string,FormatString:rh.special(rh.string),UpdateOp:rh.updateOperator,ArithOp:rh.arithmeticOperator,BitOp:rh.bitwiseOperator,CompareOp:rh.compareOperator,AssignOp:rh.definitionOperator,Ellipsis:rh.punctuation,At:rh.meta,"( )":rh.paren,"[ ]":rh.squareBracket,"{ }":rh.brace,".":rh.derefOperator,", ;":rh.separator}),QP={__proto__:null,await:40,or:50,and:52,in:56,not:58,is:60,if:66,else:68,lambda:72,yield:90,from:92,async:98,for:100,None:152,True:154,False:154,del:168,pass:172,break:176,continue:180,return:184,raise:192,import:196,as:198,global:202,nonlocal:204,assert:208,elif:218,while:222,try:228,except:230,finally:232,with:236,def:240,class:250,match:261,case:267},yP=ts.deserialize({version:14,states:"!L`O`Q$IXOOO%fQ$I[O'#G|OOQ$IS'#Cm'#CmOOQ$IS'#Cn'#CnO'UQ$IWO'#ClO(wQ$I[O'#G{OOQ$IS'#G|'#G|OOQ$IS'#DS'#DSOOQ$IS'#G{'#G{O)eQ$IWO'#CsO)uQ$IWO'#DdO*VQ$IWO'#DhOOQ$IS'#Ds'#DsO*jO`O'#DsO*rOpO'#DsO*zO!bO'#DtO+VO#tO'#DtO+bO&jO'#DtO+mO,UO'#DtO-oQ$I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*{+S+j+k+n+v+w+x+z+{,O,S,U,W,Y,Z,],o,q,x,{-n-o.b/o/p/qQ#xtW%X!p!t/j/tQ%Y!qQ%Z!rQ%]!uQ%g/iS'q%[/nQ's/kQ't/lQ,P*^Q-Q,QS-q-O.yR/v/xU#|u-s/wR(p&b[gOr#n$n)c+cX!yX#^$U$XQ#WZQ$RvR$[|Q%c!zQ%j!}Q%p#RQ'e$|Q(Q%fQ(U%kQ(^%qQ(a%rQ*h(ZQ-P,PQ-u-QR.d-tQ$ZxQ'|%dR*_'}Q-t-OR/T.yR#QYR#VZR%R!jQ%P!jV)}'h*O+v!]!mP!o#j#w$Y$h$t$v$w$x$y$z${%f%k%q%r&e&}'d(j(u)Y*Z*d+Z,V.w/mR%U!lR%z#^Q(g%zR*w(hQ$e!RQ&l$XQ)_'OR+_)`Q#rlQ$^!OQ$a!PR&t$`Q(z&sR+Q(}Q(z&sQ+P(|R+Q(}R$c!QXpOr)c+cQ$j!UR'P$kQ$q!XR'Q$lR)u'^Q)s'^V,r+q,s-]Q-l,wQ.W-fR.X-gU-e,w-f-gQ.]-iQ.h-{Q.m.RU.o.T.p/PQ.t.YQ/S.uQ/U.zU/W.{/Y/bQ/c/[Q/g/aR/h/dR.[-hR.j-{",nodeNames:"⚠ print Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatConversion FormatSpec ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:267,context:gP,nodeProps:[["group",-14,4,80,82,83,85,87,89,91,93,94,95,97,100,103,"Statement Statement",-22,6,16,19,23,38,47,48,54,55,58,59,60,61,62,65,68,69,70,74,75,76,77,"Expression",-10,105,107,110,112,113,117,119,124,126,129,"Statement",-9,134,135,138,139,141,142,143,144,145,"Pattern"],["openedBy",21,"(",52,"[",56,"{"],["closedBy",22,")",53,"]",57,"}"]],propSources:[bP],skippedNodes:[0,2],repeatNodeCount:38,tokenData:"&JdMgR!^OX$}XY!&]Y[$}[]!&]]p$}pq!&]qr!(grs!,^st!IYtu$}uv$5[vw$7nwx$8zxy%'vyz%(|z{%*S{|%,r|}%.O}!O%/U!O!P%1k!P!Q%UZ&^7[&WW&f#tOr(}rs)}sw(}wx>wx#O(}#O#P2]#P#o(}#o#p:X#p#q(}#q#r2q#r~(}:Y?QX&^7[&WW&f#tOr>wrs?ms#O>w#O#PAP#P#o>w#o#p8Y#p#q>w#q#r6g#r~>w:Y?rX&^7[Or>wrs@_s#O>w#O#PAP#P#o>w#o#p8Y#p#q>w#q#r6g#r~>w:Y@dX&^7[Or>wrs-}s#O>w#O#PAP#P#o>w#o#p8Y#p#q>w#q#r6g#r~>w:YAUT&^7[O#o>w#o#p6g#p#q>w#q#r6g#r~>w`x#O!`x#O!gZ&WW&R,XOY!wZ]!Ad]^>w^r!Adrs!Bhs#O!Ad#O#P!C[#P#o!Ad#o#p!9f#p#q!Ad#q#r!7x#r~!AdEc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p#q$}#q#r!$g#r$g$}$g~&+nGZ&9gZ&^7[&TS&Z`&d!b&`,XOr'Prs&:Ysw'Pwx(Rx#O'P#O#PAe#P#o'P#o#pEu#p#q'P#q#rAy#r~'PGZ&:eZ&^7[&TS&Z`&d!bOr'Prs&;Wsw'Pwx(Rx#O'P#O#PAe#P#o'P#o#pEu#p#q'P#q#rAy#r~'PD]&;eX&^7[&TS&e,X&Z`&d!bOwGgwx,kx#OGg#O#PH_#P#oGg#o#pET#p#qGg#q#rD_#r~GgGk&<_Z&^7[&WW&ap&f#t&Y,XOrIqrs)}swIqwx&=Qx#OIq#O#PJs#P#oIq#o#p! T#p#qIq#q#rKX#r~IqGk&=]Z&^7[&WW&ap&f#tOrIqrs)}swIqwx&>Ox#OIq#O#PJs#P#oIq#o#p! T#p#qIq#q#rKX#r~IqFT&>]X&^7[&WW&c,X&ap&f#tOr!!urs?ms#O!!u#O#P!#m#P#o!!u#o#pNc#p#q!!u#q#rMm#r~!!uMg&?_c&^7[&TS&WW&Q&j&Z`&ap&d!b&f#t%m,XOr$}rs&9Ysw$}wx&x!i!t&+n!t!u&5j!u!}&+n!}#O$}#O#P!$R#P#R$}#R#S&+n#S#T$}#T#U&+n#U#V&5j#V#Y&+n#Y#Z&>x#Z#o&+n#o#p!%i#p#q$}#q#r!$g#r$g$}$g~&+nG{&CXZ!V,X&^7[&TS&WW&Z`&ap&d!b&f#tOr$}rs&Rsw$}wxHsx#O$}#O#P!$R#P#o$}#o#p!%i#p#q$}#q#r!$g#r~$}QP[e]||-1}],tokenPrec:7282}),_P=new mo,PP=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function wP(e){return(t,i,n)=>{if(n)return!1;let r=t.node.getChild("VariableName");return r&&i(r,e),!0}}const vP={FunctionDefinition:wP("function"),ClassDefinition:wP("class"),ForStatement(e,t,i){if(i)for(let i=e.node.firstChild;i;i=i.nextSibling)if("VariableName"==i.name)t(i,"variable");else if("in"==i.name)break},ImportStatement(e,t){var i,n;let{node:r}=e,o="from"==(null===(i=r.firstChild)||void 0===i?void 0:i.name);for(let e=r.getChild("import");e;e=e.nextSibling)"VariableName"==e.name&&"as"!=(null===(n=e.nextSibling)||void 0===n?void 0:n.name)&&t(e,o?"variable":"namespace")},AssignStatement(e,t){for(let i=e.node.firstChild;i;i=i.nextSibling)if("VariableName"==i.name)t(i,"variable");else if(":"==i.name||"AssignOp"==i.name)break},ParamList(e,t){for(let i=null,n=e.node.firstChild;n;n=n.nextSibling)"VariableName"!=n.name||i&&/\*|AssignOp/.test(i.name)||t(n,"variable"),i=n},CapturePattern:wP("variable"),AsPattern:wP("variable"),__proto__:null};function XP(e,t){let i=_P.get(t);if(i)return i;let n=[],r=!0;function o(t,i){let r=e.sliceString(t.from,t.to);n.push({label:r,type:i})}return t.cursor(Hr.IncludeAnonymous).iterate((t=>{if(t.name){let e=vP[t.name];if(e&&e(t,o,r)||!r&&PP.has(t.name))return!1;r=!1}else if(t.to-t.from>8192){for(let i of XP(e,t.node))n.push(i);return!1}})),_P.set(t,n),n}const xP=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,SP=["String","FormatString","Comment","PropertyName"];function kP(e){let t=dh(e.state).resolveInner(e.pos,-1);if(SP.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&xP.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)PP.has(i.name)&&(n=n.concat(XP(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:xP}}const TP=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map((e=>({label:e,type:"constant"}))).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map((e=>({label:e,type:"type"})))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map((e=>({label:e,type:"class"})))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map((e=>({label:e,type:"function"})))),RP=[Rp("def ${name}(${params}):\n\t${}",{label:"def",detail:"function",type:"keyword"}),Rp("for ${name} in ${collection}:\n\t${}",{label:"for",detail:"loop",type:"keyword"}),Rp("while ${}:\n\t${}",{label:"while",detail:"loop",type:"keyword"}),Rp("try:\n\t${}\nexcept ${error}:\n\t${}",{label:"try",detail:"/ except block",type:"keyword"}),Rp("if ${}:\n\t\n",{label:"if",detail:"block",type:"keyword"}),Rp("if ${}:\n\t${}\nelse:\n\t${}",{label:"if",detail:"/ else block",type:"keyword"}),Rp("class ${name}:\n\tdef __init__(self, ${params}):\n\t\t\t${}",{label:"class",detail:"definition",type:"keyword"}),Rp("import ${module}",{label:"import",detail:"statement",type:"keyword"}),Rp("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],WP=Tf(SP,kf(TP.concat(RP)));function AP(e,t){let i=e.lineIndent(t.from),n=e.lineAt(e.pos,-1),r=n.from+n.text.length;return/^\s*($|#)/.test(n.text)&&e.node.toi?null:i+e.unit}const NP=uh.define({name:"python",parser:yP.configure({props:[Th.add({Body:e=>{var t;return null!==(t=AP(e,e.node))&&void 0!==t?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":qh({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":qh({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":qh({closing:"]"}),"String FormatString":()=>null,Script:e=>{if(e.pos+/\s*/.exec(e.textAfter)[0].length>=e.node.to){let t=null;for(let i=e.node,n=i.to;i=i.lastChild,i&&i.to==n;)"Body"==i.type.name&&(t=i);if(t){let i=AP(e,t);if(null!=i)return i}}return e.continue()}}),Zh.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":zh,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});class CP{constructor(e,t,i,n){this.origin=e,this.changes=t,this.effects=i,this.clientID=n}}class qP{constructor(e,t){this.version=e,this.unconfirmed=t}}const EP=Nn.define({combine(e){let t=Pr(e,{startVersion:0,clientID:null,sharedEffects:()=>[]});return null==t.clientID&&(t.clientID=e.length&&e[0].generatedID||""),t}}),VP=ar.define();zn.define({create:e=>new qP(e.facet(EP).startVersion,[]),update(e,t){let i=t.annotation(VP);if(i)return i;let{sharedEffects:n,clientID:r}=t.startState.facet(EP),o=n(t);return o.length||!t.changes.empty?new qP(e.version,e.unconfirmed.concat(new CP(t,t.changes,o,r))):e}});class YP{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class ZP{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let n=e,r=i.facet(FP).markerFilter;r&&(n=r(n));let o=Sl.set(n.map((e=>e.from==e.to||e.from==e.to-1&&i.doc.lineAt(e.from).to==e.from?Sl.widget({widget:new ew(e),diagnostic:e}).range(e.from):Sl.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to))),!0);return new ZP(o,t,zP(o))}}function zP(e,t=null,i=0){let n=null;return e.between(i,1e9,((e,i,{spec:r})=>{if(!t||r.diagnostic==t)return n=new YP(e,i,r.diagnostic),!1})),n}function MP(e,t){return e.field(GP,!1)?t:t.concat(cr.appendConfig.of(ow))}function IP(e,t){return{effects:MP(e,[UP.of(t)])}}const UP=cr.define(),jP=cr.define(),DP=cr.define(),GP=zn.define({create:()=>new ZP(Sl.none,null,null),update(e,t){if(t.docChanged){let i=e.diagnostics.map(t.changes),n=null;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);n=zP(i,e.selected.diagnostic,r)||zP(i,null,r)}e=new ZP(i,e.panel,n)}for(let i of t.effects)i.is(UP)?e=ZP.init(i.value,e.panel,t.state):i.is(jP)?e=new ZP(e.diagnostics,i.value?iw.open:null,e.selected):i.is(DP)&&(e=new ZP(e.diagnostics,e.panel,i.value));return e},provide:e=>[fd.from(e,(e=>e.panel)),iu.decorations.from(e,(e=>e.diagnostics))]}),LP=Sl.mark({class:"cm-lintRange cm-lintRange-active"});function BP(e,t){return Ig("ul",{class:"cm-tooltip-lint"},t.map((t=>JP(e,t,!1))))}const KP=e=>{let t=e.state.field(GP,!1);return!(!t||!t.panel||(e.dispatch({effects:jP.of(!1)}),0))},FP=(eO.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(FP);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){let e=Date.now();if(ePromise.resolve(e(this.view))))).then((t=>{let i=t.reduce(((e,t)=>e.concat(t)));this.view.state.doc==e.doc&&this.view.dispatch(IP(this.view.state,i))}),(e=>{Kl(this.view.state,e)}))}}update(e){let t=e.state.facet(FP);(e.docChanged||t!=e.startState.facet(FP)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),Nn.define({combine:e=>Object.assign({sources:e.map((e=>e.source))},Pr(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}));function HP(e){let t=[];if(e)e:for(let{name:i}of e){for(let e=0;ee.toLowerCase()==n.toLowerCase()))){t.push(n);continue e}}t.push("")}return t}function JP(e,t,i){var n;let r=i?HP(t.actions):[];return Ig("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Ig("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(n=t.actions)||void 0===n?void 0:n.map(((i,n)=>{let o=!1,s=n=>{if(n.preventDefault(),o)return;o=!0;let r=zP(e.state.field(GP).diagnostics,t);r&&i.apply(e,r.from,r.to)},{name:a}=i,l=r[n]?a.indexOf(r[n]):-1,O=l<0?a:[a.slice(0,l),Ig("u",a.slice(l,l+1)),a.slice(l+1)];return Ig("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${r[n]})"`}.`},O)})),t.source&&Ig("div",{class:"cm-diagnosticSource"},t.source))}class ew extends Xl{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Ig("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class tw{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=JP(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class iw{constructor(e){this.view=e,this.items=[],this.list=Ig("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)KP(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=HP(i.actions);for(let r=0;r{for(let t=0;tKP(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(GP).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=i;ei&&(this.items.splice(i,l-i),n=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),r=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.topt.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=zP(this.view.state.field(GP).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:DP.of(t)})}static open(e){return new iw(e)}}function nw(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}(``,'width="6" height="3"')}const rw=iu.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:nw("#d11")},".cm-lintRange-warning":{backgroundImage:nw("orange")},".cm-lintRange-info":{backgroundImage:nw("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),ow=[GP,iu.decorations.compute([GP],(e=>{let{selected:t,panel:i}=e.field(GP);return t&&i&&t.from!=t.to?Sl.set([LP.range(t.from,t.to)]):Sl.none})),function(e,t={}){let i=cr.define(),n=zn.define({create:()=>null,update(e,n){if(e&&(t.hideOnChange&&(n.docChanged||n.selection)||t.hideOn&&t.hideOn(n,e)))return null;if(e&&n.docChanged){let t=n.changes.mapPos(e.pos,-1,yn.TrackDel);if(null==t)return null;let i=Object.assign(Object.create(null),e);i.pos=t,null!=e.end&&(i.end=n.changes.mapPos(e.end)),e=i}for(let t of n.effects)t.is(i)&&(e=t.value),t.is(ld)&&(e=null);return e},provide:e=>id.from(e)});return[n,eO.define((r=>new od(r,e,n,i,t.hoverTime||300))),rd]}((function(e,t,i){let{diagnostics:n}=e.state.field(GP),r=[],o=2e8,s=0;n.between(t-(i<0?1:0),t+(i>0?1:0),((e,n,{spec:a})=>{t>=e&&t<=n&&(e==n||(t>e||i>0)&&(t({dom:BP(e,r)})}:null}),{hideOn:function(e,t){return!(!e.effects.some((e=>e.is(UP)))&&!e.changes.touchesRange(t.pos))}}),rw],sw=e=>e.toLowerCase().normalize("NFD").replace(/[^a-z1-9]/g,"");let{autocompletion:aw,completionKeymap:lw}=sm,Ow=lw.find((e=>"Ctrl-Space"===e.key)),cw=lw.find((e=>"Enter"===e.key)),uw=lw.find((e=>"Escape"===e.key));const dw=e=>{if(null==e)throw new Error("Unexpected null value");return e},hw=(e,t,i=!0)=>{let n=e.hasFocus;e.dispatch({changes:{from:0,to:e.state.doc.length,insert:t},selection:Rn.cursor(t.length),scrollIntoView:i}),n||e.contentDOM.blur()},fw=!!window.plutoDesktop;fw&&console.log("Running in Desktop Environment! Found following properties/methods:",window.plutoDesktop);const pw=({value:e,suggest_new_file:t,button_label:i,placeholder:n,on_submit:r,on_desktop_submit:o,client:s})=>{const[a,l]=oe(!0),[O,c]=oe(""),u=le(""),d=le(null),h=le(null),f=()=>{const e=h.current;null!=e&&(null!=t&&0===e.state.doc.length&&(hw(e,t.base,!1),m()),window.dispatchEvent(new CustomEvent("collapse_cell_selection",{})))};const p=()=>{const e=h.current;if(null!=e){if(!fw){if(e.state.doc.toString()===u.current)return f(),!0}return(async e=>{await e()})((async()=>{try{fw&&o?await o((await(async e=>{try{const t=new URL(e);if(!["http:","https:","ftp:","ftps:"].includes(t.protocol))throw"Not a web URL";if("gist.github.com"===t.host){console.log("Gist URL detected");const e=t.pathname.substring(1).split("/")[1],i=await(await fetch(`https://api.github.com/gists/${e}`,{headers:{Accept:"application/vnd.github.v3+json"}}).then((e=>e.ok?e:Promise.reject(e)))).json();console.log(i);const n=Object.values(i.files),r=n.find((e=>sw("#file-"+e.filename)===sw(t.hash)));return null!=r?{type:"url",path_or_url:r.raw_url}:{type:"url",path_or_url:n[0].raw_url}}return"github.com"===t.host&&t.searchParams.set("raw","true"),{type:"url",path_or_url:t.href}}catch(t){return'"'===e[e.length-1]&&'"'===e[0]&&(e=e.slice(1,-1)),{type:"path",path_or_url:e}}})(O)).path_or_url):await r(e.state.doc.toString()),e.dom.blur()}catch(t){hw(e,u.current,!0),e.dom.blur()}})),!0}},m=()=>{const e=h.current;if(null==e)return;let t=e.state.selection.main;return t.from===t.to&&e.state.doc.length===t.to?dw(Ow).run(e):void 0};return ae((()=>{const i=window.matchMedia("(prefers-color-scheme: dark)").matches,r=()=>(p(),!0);h.current=new iu({state:_r.create({doc:"",extensions:[wu(),iu.domEventHandlers({focus:(e,i)=>(setTimeout((()=>{t?f():0===i.state.doc.length&&m()}),0),!0),blur:(e,t)=>{setTimeout((()=>{t.hasFocus||hw(t,u.current,!0)}),200)}}),iu.updateListener.of((e=>{e.docChanged&&l(0===e.state.doc.length)})),iu.theme({"&":{fontSize:"inherit"},".cm-scroller":{fontFamily:"inherit",overflowY:"hidden",overflowX:"auto"}},{dark:i}),Xm(),aw({activateOnTyping:!0,override:[mw({suggest_new_file:t,client:s})],defaultKeymap:!1,maxRenderedOptions:512,optionClass:e=>e.type??""}),iu.updateListener.of((e=>{e.transactions.forEach((t=>{null!=t.annotation(sm.pickedCompletion)&&(e.view.dispatch({effects:iu.scrollIntoView(e.state.doc.length),selection:Rn.cursor(e.state.doc.length)}),m())}))})),cu.of([{key:"Enter",run:e=>dw(cw).run(e)},{key:"Enter",run:r},{key:"Ctrl-Enter",mac:"Cmd-Enter",run:r},{key:"Ctrl-Shift-Enter",mac:"Cmd-Shift-Enter",run:r},{key:"Escape",run:t=>(dw(uw).run(t),t.dispatch({changes:{from:0,to:t.state.doc.length,insert:u.current},selection:Rn.cursor(e.length),effects:iu.scrollIntoView(u.current.length)}),document.activeElement.blur(),!0),preventDefault:!0},{key:"Tab",run:e=>dw(cw).run(e)?(m(),!0):m()}]),cu.of(lw),Iu(n)]})});const o=h.current;fw||d.current.insertBefore(o.dom,d.current.firstElementChild)}),[]),ae((()=>{if(u.current!=e){if(null==h.current)return;hw(h.current,e,!0),u.current=e}})),fw?we`
+ {c(e.target.value)}} + /> +
+ +
+
`:we` + + + + `},mw=({client:e,suggest_new_file:t})=>i=>{i.state.selection.main.to;const n=i.state.doc.toString();return e.send("completepath",{query:n}).then((e=>{const i=n.split("/").pop().split("\\").pop(),r=e.message.results,o=Di(n,e.message.start),s=Di(n,e.message.stop);if(r.length>=1&&r[0]==i)return null;let a=r.map((e=>{let t=e.endsWith("/")||e.endsWith("\\");return{label:e,type:t?"dir":"file",boost:t?1:0}}));if(null!=t)for(let e=3;e>=0;e--){const t=".jl".substring(0,e);if(i.endsWith(t)){let t=i+".jl".substring(e);if(".jl"==t&&(t="notebook.jl"),3==e)return null;r.includes(t)||a.push({label:t+" (new)",apply:t,type:"file new",boost:-99});break}}return{options:a,from:o,to:s}}))},gw=e=>e?Object.entries(e).reduce(((e,[t,i])=>i?t+" "+e:e),""):null;let $w=j(),bw=j(null),Qw=j(null);class yw extends Set{constructor(e){super(),this.callback=e}delete(e){let t=super.delete(e);return t&&0===this.size&&this.callback(),t}}const _w=()=>"visible"===document.visibilityState?Promise.resolve():new Promise((e=>{const t=()=>{_w().then(e),document.removeEventListener("visibilitychange",t)};document.addEventListener("visibilitychange",t)})),Pw=({any_code_differs:e,last_update_time:t,last_hot_reload_time:i,connected:n})=>{let r=ue($w);const[o,s]=oe(""),[a,l]=oe(""),O=le(null),c=le(null);se((()=>(clearTimeout(null==O?void 0:O.current),e?s("ask_to_save"):Date.now()-t<1e3?(s("saved"),O.current=setTimeout((()=>{s("")}),1e3)):s(""),()=>clearTimeout(null==O?void 0:O.current))),[e]);const[u,d]=oe(!1);return se((()=>{n&&setTimeout((()=>d(!0)),1e3)}),[n]),se((()=>{if(console.log("Hottt",i,u),u)return l("reloaded_from_file"),console.log("set state"),_w().then((()=>{c.current=setTimeout((()=>{l(""),console.log("reset state")}),8e3)})),()=>clearTimeout(null==c?void 0:c.current)}),[i]),we` + ${"ask_to_save"===o?we` +
+ +
+ `:"saved"===o||"saving"===o?we` +
+ Saved +
+ `:"reloaded_from_file"===a?we` +
+ File change detected, notebook updated +
+ `:null} +
`};var ww={};t(ww),e(ww,"default",(()=>vw.default));var vw={};e(vw,"default",(()=>zw),(e=>zw=e));var Xw=Object.create,xw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,kw=Object.getOwnPropertyNames,Tw=Object.getPrototypeOf,Rw=Object.prototype.hasOwnProperty,Ww=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of kw(t))!Rw.call(e,r)&&r!==i&&xw(e,r,{get:()=>t[r],enumerable:!(n=Sw(t,r))||n.enumerable});return e},Aw=(e,t,i)=>(i=null!=e?Xw(Tw(e)):{},Ww(!t&&e&&e.__esModule?i:xw(i,"default",{value:e,enumerable:!0}),e)),Nw=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))(((e,t)=>{var i=Symbol("baseMap"),n=class{constructor(e){this.value=e}};function r(e){if(!Array.isArray(e))throw new TypeError("The keys parameter must be an array")}function o({[i]:e},t,n){for(let i of t){if(!e.has(i)){if(!n)return;e.set(i,new WeakMap)}e=e.get(i)}return e}t.exports=class extends WeakMap{constructor(){super(),this[i]=new WeakMap;let[e]=arguments;if(null!=e){if("function"!=typeof e[Symbol.iterator])throw new TypeError(typeof e+" is not iterable (cannot read property Symbol(Symbol.iterator))");for(let[t,i]of e)this.set(t,i)}}set(e,t){return r(e),o(this,e,!0).set(n,t),this}get(e){r(e);let t=o(this,e);return t?t.get(n):void 0}has(e){r(e);let t=o(this,e);return!!t&&t.has(n)}delete(e){r(e);let t=o(this,e);return!!t&&t.delete(n)}get[Symbol.toStringTag](){return"ManyKeysWeakMap"}}})),Cw={};((e,t)=>{for(var i in t)xw(e,i,{get:t[i],enumerable:!0})})(Cw,{default:()=>zw});var qw=Aw(Nw());((e,t,i)=>{Ww(e,t,"default"),i&&Ww(i,t,"default")})(Cw,Aw(Nw()));var Ew,Vw,{default:Yw,...Zw}=qw,zw=void 0!==Yw?Yw:Zw;Ew=ww,Vw=vw,Object.keys(Vw).forEach((function(e){"default"===e||"__esModule"===e||Ew.hasOwnProperty(e)||Object.defineProperty(Ew,e,{enumerable:!0,get:function(){return Vw[e]}})}));let Mw=e=>fm().language.parser.parse(e).topNode.firstChild;const Iw=!1;let Uw=(e,t=(e=>e),i=new Map)=>(...n)=>{let r=t(...n),o=i.get(r);if(null!=o)return o;{let t=e(...n);if(null==t)throw new Error("Memoized function returned undefined");return i.set(r,t),t}},jw=(e,t=((...e)=>e))=>Uw(e,t,new vw.default),Dw=e=>Uw(e,(e=>e),new WeakMap),Gw=function*(e){if(e.firstChild())try{do{yield e}while(e.nextSibling())}finally{e.parent()}},Lw=function*(e){if(e.firstChild){let t=e.firstChild;do{yield t}while(t=t.nextSibling)}},Bw=(e,t,i,n=!1)=>{if(n){console.group("Current haystack:",e?e.node.name:null),console.groupCollapsed("Details");try{console.log("template:",t),console.log("haystack_cursor:",e?e.node.toString():null),"node"in t?(console.log("template.node:",t.node),console.log("template.node.toString():",t.node.toString())):"pattern"in t&&console.log("template.pattern:",t.pattern)}finally{console.groupEnd()}}try{if("pattern"in t){let r=t.pattern;if("function"!=typeof r)throw new Error(`Unknown pattern "${r}"`);let o={};n&&(o={...i},console.groupCollapsed(`Matching against pattern: ${t.pattern.name}()`));let s=null;try{s=r(e,i,n)}finally{n&&console.groupEnd()}if(n)if(s){if(console.log("✅ because the pattern was happy! All hail the pattern!"),!xt.isEqual(i,o)){let e=xt.omit(i,Object.keys(o));console.log(" WE EVEN GOT NEW MATCHES SAY WHAAAAAAT:",e)}}else console.log("❌ because... well, you should ask the pattern that!");return s}if(!("node"in t))throw console.log("template:",t),new Error("waaaah");{let{node:r,children:o}=t;if(n&&console.log(`Matching against node: ${t.node.name}`),!e)return"end"===r.name?(n&&console.log("✅ No node left to match, but it was the end anyway"),!0):(n&&console.log("❌ because no cursor left to match against"),!1);if(e.type.isError)return n&&console.log("✅ because ⚠"),!0;if(e.name!==r.name)return n&&console.log(`❌ because name mismatch "${e.name}" !== "${r.name}"`),!1;if(!e.firstChild()){if(0!==t.children.length){n&&console.log("Haystack node is empty, but template has children... lets see");for(let e of t.children)if(!Bw(null,e,i,n))return n&&console.log("❌ because child template wasn't okay with having no children",e),!1;return n&&console.log("✅ All template children we're fine with having no children to check on"),!0}return n&&console.log("✅ Template also has no children, yayyy"),!0}try{let r=!1;for(let t of o){if(r){if(n&&console.log("Haystack is empty, but there are more children in template... lets see"),!Bw(null,t,i,n))return n&&console.log("❌ template child did not accept null for an answer",t,e.toString()),!1;n&&console.log("👌🏽 This template child was fine with null");continue}for(;("Comment"===e.name||"BlockComment"===e.name)&&e.nextSibling(););if(!Bw(e,t,i,n))return n&&console.log("❌ because a child mismatch",t,e.toString()),!1;r=!e.nextSibling()}if(n&&!r){let i=[];do{i.push(e.node)}while(e.nextSibling());for(let t of i)e.prevSibling();console.warn("We did match all the children of the template, but there are more in the haystack... Might want to actually not match this?",i,t)}return n&&console.log("✅ because all children match"),!0}finally{e.parent()}}}finally{n&&console.groupEnd()}};class Kw{constructor(e,t){let i=[],n=[];i.push(e[0]);for(let[r,o]of xt.zip(e.slice(1),t))if(o instanceof Kw){i[i.length-1]+=o.template[0];for(let[e,t]of xt.zip(o.template.slice(1),o.substitutions))n.push(t),i.push(e);i[i.length-1]+=r}else n.push(o),i.push(r);this.template=i,this.substitutions=n}}let Fw=(e,t)=>{for(let i of t)if(e.from===i.from&&e.to===i.to){i.used=!0;let t=i.generator.next({name:e.name,from:e.from,to:e.to,node:e});if(t.done)return t.value;throw new Error("Template generator not done providing ast node")}return{name:e.name,from:e.from,to:e.to,children:Array.from(Lw(e)).map((e=>Fw(e,t))),node:e}},Hw=function*(e){try{if(e instanceof Kw){let t="",i=[];for(let[n,r]of xt.zip(e.template,e.substitutions))if(t+=n,r){let e=Hw(r),n=uv(e.next());i.push({from:t.length,to:t.length+n.length,generator:e}),t+=n}let n=yield t,r=i.map((e=>({from:e.from+n.from,to:e.to+n.from,generator:e.generator,used:!1})));Iw;let o=Fw(n.node,r),s=r.filter((e=>!e.used)).map((e=>({text:t.slice(e.from,e.to),from:e.from,to:e.to})));if(s.length>0)throw new Error(`Some substitutions not applied, this means it couldn't be matched to a AST position: ${JSON.stringify(s)}`);return o}if("function"==typeof e)return yield*e();throw console.log("julia_code_object:",e),new Error("Unknown substition type")}finally{}},Jw=jw(((e,...t)=>new Kw(e,t))),ev=new WeakMap,tv=(e,...t)=>{let i=ev.get(e);if(null!=i){let{input:e,result:t}=i;return t}{let i=new Kw(e,t);return ev.set(e,{input:t,result:i}),i}},iv=Dw((e=>{let t=Hw(e),i=uv(t.next()),n=Mw(i),r=dv(t.next({from:0,to:i.length,name:n.name,node:n}));return{template_description:r,match(e,t=!1){if("node"in r&&r.node.name!==e.name)return;if(e.type.isError)return null;"cursor"in e&&(e=e.cursor());let i={};t&&console.groupCollapsed(`Starting a match at ${e.name}`);try{return Bw(e,r,i,t)?i:null}finally{t&&console.groupEnd()}}}})),nv=Dw((e=>{let t=Hw(e),i=uv(t.next());return t.return(),i})),rv=(Dw((e=>Mw(nv(e)))),Dw((e=>Hi.of([nv(e)]))),e=>{let t={},i=Uw((i=>Dw((n=>e(i,n===t?void 0:n)))));return(e,n=t)=>i(e)(n)});function*ov(){return yield"expression",{pattern:function(e,t,i=!1){return e?!e.type.is("keyword")||(i&&console.log("❌ Keywords are not allowed!"),!1):(i&&console.log("❌ I want anything!! YOU GIVE ME NULL???"),!1)}}}const sv={any:ov,many:rv(((e,t=ov)=>function*(){let i=Hw(t),n=yield uv(i.next()),r=null,o=null;return n.node.firstChild&&n.node.from===n.node.firstChild.from&&n.node.to===n.node.firstChild.to?(r=n.node,o=dv(i.next({...n,node:n.node.firstChild}))):o=dv(i.next(n)),{narrowed_node:r,sub_template:o,pattern:function(t,i,n=!1){if(!t)return n&&console.log("✅ Nothing to see here... I'm fine with that - many"),!0;if(r){if(t.name!==r.name)return n&&console.log("❌ Tried to go in, but she wasn't my type - many"),t.prevSibling(),!0;t.firstChild()}try{let s=[];for(;;){if(t.type.isError)return t.prevSibling(),n&&console.log("✋ I don't do errors - many"),!0;let e={};if(!Bw(t,o,e,n)){t.prevSibling();break}if(s.push({node:t.node,match:e}),!t.nextSibling())break}return null!=e&&(i[e]=s),!0}finally{r&&t.parent()}}}})),maybe:Dw((e=>function*(){let t=yield*Hw(e);return{sub_template:t,pattern:function(e,i,n=!1){if(!e)return!0;if(e.type.isError)return!0;return!1===Bw(e,t,i,n)&&e.prevSibling(),!0}}})),anything_that_fits:Dw((e=>function*(){return yield*Hw(e),{pattern:function(e,t,i=!1){return!0}}})),something_with_the_same_type_as:Dw((e=>function*(){let t=Hw(e),i=uv(t.next()),n=yield i;return t.return(),{pattern:function(e,t,i=!1){return null!=e&&n.name===e.name}}})),as:rv(((e,t=ov)=>function*(){let i=yield*Hw(t);return{sub_template:i,pattern:function(t,n,r=!1){let o=Bw(t,i,n,r);return!0===o&&(n[e]=null==t?void 0:t.node),null!=t&&o}}})),Identifier:function*(){return yield"identifier",{pattern:function(e,t,i=!1){return null!=e&&"Identifier"===Ov(e)}}},Number:function*(){return yield"69",{pattern:function(e,t,i=!1){return null!=e&&"Number"===Ov(e)}}},String:function*(){return yield'"A113"',{pattern:function(e,t,i=!1){return null!=e&&("StringWithoutInterpolation"===Ov(e)||"TripleStringWithoutInterpolation"===Ov(e))}}}};let av=jw(((e,t)=>{let i=Hw(e),n=uv(i.next()),r=Mw(n),o=null;if(o=t.match(r)){let{content:e}=o,t=[];for(;e.firstChild&&e.firstChild.from==e.from&&e.firstChild.to==e.to;)t.push(e.type),e=e.firstChild;if(null==e)throw console.log("match:",o),new Error("No content match?");let n=dv(i.next({name:e.name,node:e,from:r.from,to:r.to}));return{possible_parents:t,template_description:n,match(e,i=!1){if(e.type.isError)return i&&console.log(`❌ Short circuiting because haystack(${e.name}) is an error`),!1;"cursor"in e&&(e=e.cursor());let r=0;for(let n of t){if(e.type!==n)break;{let t=e.from,o=e.to;if(e.firstChild()){if(e.from!==t||e.to!==o){e.parent(),i&&console.log(`❌ Was matching possible parent (${n}), but it wasn't filling?! That's weird.... ${e.toString()}`);for(let t=0;te.firstChild&&e.firstChild.from===e.from&&e.firstChild.to===e.to?lv(e.firstChild):e,Ov=e=>{let t=e.from,i=e.to;if(e.firstChild())try{if(e.from===t&&e.to===i)return Ov(e)}finally{e.parent()}return e.name},cv=e=>t=>{let i=iv(e(sv.as("content",t)));return av(e(t),i)};let uv=e=>{if(e.done)throw new Error("Expected `yield`-d value, but got `return`");return e.value},dv=e=>{if(e.done)return e.value;throw new Error("Expected `yield`-d value, but got `return`")},hv=(e,t)=>{if(e===t)return e;let i=[...e.usages,...t.usages],n=new Map(e.definitions);for(let[e,i]of t.definitions)n.set(e,i);return{usages:i,definitions:n,locals:[...e.locals,...t.locals]}},fv=function*(e){for(let t of Gw(e))if("InterpolationExpression"===t.name)yield e;else if("QuoteExpression"===t.name||"QuoteStatement"===t.name)for(let e of fv(t))yield*fv(e);else yield*fv(t)},pv=e=>{let t=cv(e);return function(e,i=!1){return null==e?(e,...i)=>t(tv(e,...i)):function(n,...r){return t(tv(n,...r)).match(e,i)}}},mv=pv((e=>Jw`[i for i in i ${e}]`)),gv=pv((e=>Jw`${e} = nothing`)),$v=pv((e=>Jw`function f(${e}) end`)),bv=pv((e=>Jw`f(${e})`)),Qv=pv((e=>Jw`f(; ${e})`)),yv=(e,t,i,n=!1)=>{let r=null;if(r=bv(e)`; ${sv.many("named_args")}`){let{named_args:e=[]}=r;for(let{node:r}of e)i=yv(r,t,i,n);return i}if(r=$v(e)`${sv.Identifier}`)return Tv(i,t,e);if(r=$v(e)`${sv.as("subject")}...`)return _v(r.subject,t,i,null,n);if(r=$v(e)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:o}=r;return i=_v(e,t,i,o.to,n),i=Rv(o.cursor(),t,i,n)}if((r=$v(e)`${sv.as("name")}::${sv.as("type")}`)??(r=$v(e)`${sv.as("name")}:`)??(r=$v(e)`::${sv.as("type")}`)){let{name:e,type:o}=r;return e&&(i=_v(e,t,i,o.to,n)),o&&(i=Rv(o.cursor(),t,i,n)),i}return i=_v(e,t,i),n&&console.warn("UNKNOWN FUNCTION DEFINITION ARGUMENT:",e.toString()),i},_v=(e,t,i,n=null,r=!1)=>{let o=null;r&&console.group("Explorering pattern:",e.toString());try{if(o=gv(e)`${sv.Identifier}`)return r&&console.log("It's an identifier, adding it to the scope"),Tv(i,t,e,n);if(o=gv(e)`${sv.as("object")}::${sv.as("type")}`){let{object:e,type:n}=o;return i=Rv(n.cursor(),t,i,r),i=Tv(i,t,e)}if(o=gv(e)`${sv.as("subject")}...`)return _v(o.subject,t,i,n,r);if(o=$v(e)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:n}=o;return i=_v(e,t,i,n.from,r),i=Rv(n.cursor(),t,i,r)}if(o=gv(e)`(; ${sv.many("named_tuples")})`){let{named_tuples:e}=o;for(let o of e)i=_v(o.node.cursor(),t,i,n,r);return i}if((o=gv(e)`${sv.as("first")}, ${sv.many("rest")}`)??(o=gv(e)`(${sv.as("first")}, ${sv.many("rest")})`)){for(let{node:e}of[{node:o.first},...o.rest??[]])i=_v(e.cursor(),t,i,n,r);return i}if(o=wv(e)`${sv.as("prefix")}${sv.as("string",sv.String)}`){let{prefix:n,string:s}=o;if("var"===t.sliceString(n.from,n.to)){let n=t.sliceString(s.from+1,s.to-1);0!==n.length&&i.definitions.set(n,{from:e.from,to:e.to,valid_from:e.to})}else i=Rv("cursor"in e?e.cursor():e,t,i,r);return i}if(o=gv(e)`${sv.as("object")}[${sv.as("property")}]`){let{object:e,property:n}=o;return i=Rv(e.cursor(),t,i,r),n&&(i=Rv(n.cursor(),t,i,r)),i}if(o=gv(e)`${sv.as("object")}.${sv.as("property")}`){let{object:e,property:n}=o;return i=Rv(e.cursor(),t,i,r)}return r&&console.warn("UNKNOWN PATTERN:",e.toString(),t.sliceString(e.from,e.to)),i}finally{r&&console.groupEnd()}},Pv=function(e,t,i,n=!1){let r=null;if("Definition"!==e.name||!e.firstChild()){if("Identifier"===e.name)return{inner:Tv(i,t,e),outer:Tv(xv(),t,e)};if(r=wv(e)`${sv.as("subject")}{ ${sv.many("parameters")} }`){let{subject:e,parameters:n}=r,o=xv();if(e){let n=Pv(e.cursor(),t,i);o=n.outer,i=n.inner}for(let{node:e}of n){let{inner:n}=Pv(e.cursor(),t,i);i=n}return{inner:i,outer:o}}if(r=wv(e)`${sv.as("subject")} <: ${sv.maybe(sv.as("type"))}`){let{subject:e,type:n}=r,o=xv();return e&&({outer:o,inner:i}=Pv(e.cursor(),t,i)),n&&(i=Rv(n.cursor(),t,i)),{inner:i,outer:o}}return n&&console.warn(`Unknown thing in definition: "${t.sliceString(e.from,e.to)}", "${e.toString()}"`),{inner:i,outer:xv()}}try{return Pv(e,t,i)}finally{e.parent()}},wv=(vv=iv,function(e,t=!1){return null==e?(e,...t)=>vv(tv(e,...t)):function(i,...n){return vv(tv(i,...n)).match(e,t)}});var vv;let Xv=(e,t,i,n=!1)=>{let r=null,o=pv((e=>Jw`${e} x y z`));if(r=o(e)`${sv.as("macro",tv`@${sv.any}`)}`){let{macro:e}=r,n=t.sliceString(e.from,e.to);return i.usages.push({usage:e,definition:i.definitions.get(n)??null,name:n}),i}if(r=o(e)`${sv.as("object")}.@${sv.as("macro")}`){let{object:e}=r,n=t.sliceString(e.from,e.to);return i.usages.push({usage:e,definition:i.definitions.get(n)??null,name:n}),i}if(r=o(e)`@${sv.as("object")}.${sv.as("macro")}`){let{object:e}=r,n=t.sliceString(e.from,e.to);return i.usages.push({usage:e,definition:i.definitions.get(n)??null,name:n}),i}return n&&console.warn("Mwep mweeeep",e.toString()),i},xv=()=>({usages:[],definitions:new Map,locals:[]}),Sv=e=>({usages:[],definitions:new Map(e.definitions),locals:[]}),kv=(e,t,i)=>({usages:[...t.usages,...e.usages],definitions:t.definitions,locals:[]}),Tv=(e,t,i,n=null)=>(n=null===n?i.to:n,e.definitions.set(t.sliceString(i.from,i.to),{from:i.from,to:i.to,valid_from:n}),e),Rv=(e,t,i={usages:[],definitions:new Map,locals:[]},n=!1)=>{"cursor"in e&&(e=e.cursor());let r=null;if(n){console.group(`Explorer: ${e.name}`),console.groupCollapsed("Details");try{console.log(`Full tree: ${e.toString()}`),console.log("Full text:",t.sliceString(e.from,e.to)),console.log("scopestate:",i)}finally{console.groupEnd()}r=e.node}try{let r=null;if(e.type.is("keyword")||"SourceFile"===e.name||"BooleanLiteral"===e.name||"Character"===e.name||"String"===e.name||"Number"===e.name||"Comment"===e.name||"BinaryExpression"===e.name||"Operator"===e.name||"MacroArgumentList"===e.name||"ReturnStatement"===e.name||"BareTupleExpression"===e.name||"ParenthesizedExpression"===e.name||"Type"===e.name||"InterpolationExpression"===e.name||"SpreadExpression"===e.name||"CompoundExpression"===e.name||"ParameterizedIdentifier"===e.name||"TypeArgumentList"===e.name||"TernaryExpression"===e.name||"Coefficient"===e.name||"TripleString"===e.name||"RangeExpression"===e.name||"SubscriptExpression"===e.name||"UnaryExpression"===e.name||"ConstStatement"===e.name||"GlobalStatement"===e.name||"ContinueStatement"===e.name||"MatrixExpression"===e.name||"MatrixRow"===e.name||"ArrayExpression"===e.name){for(let r of Gw(e))i=Rv(r,t,i,n);return i}if("Identifier"===e.name||"MacroIdentifier"===e.name){let n=t.sliceString(e.from,e.to);return i.usages.push({name:n,usage:{from:e.from,to:e.to},definition:i.definitions.get(n)??null}),i}if(r=wv(e)`:${sv.any}`)return i;if(r=wv(e)`${sv.Number}`)return i;if(r=wv(e)`${sv.String}`)return i;if(r=wv(e)`${sv.as("object")}.${sv.as("property")}`){let{object:e,property:o}=r;return e&&(i=Rv(e.cursor(),t,i,n)),i}if(r=wv(e)`${sv.as("assignee")} = ${sv.maybe(sv.as("value"))}`){let{assignee:e,value:o}=r;return o&&(i=Rv(o.cursor(),t,i,n)),e&&(i=_v(e.cursor(),t,i,(null==o?void 0:o.to)??null,n)),i}if(r=wv(e)` + ${sv.as("macro",sv.anything_that_fits(tv`@macro`))}(${sv.many("args")}) ${sv.maybe(tv`do ${sv.maybe(sv.many("do_args"))} + ${sv.many("do_expressions")} + end`)}} + `){let{macro:o,args:s=[],do_args:a,do_expressions:l}=r;o&&Xv(o.cursor(),t,i,n);for(let{node:e}of s)if(r=bv(e)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:o}=r;o&&(i=Rv(o.cursor(),t,i,n))}else i=Rv(e.cursor(),t,i,n);if(a&&l){let r=Sv(i),o=a.firstChild;if("Identifier"===o.name)r=Tv(r,t,o);else if("ArgumentList"===o.name)for(let e of Lw(o))r=yv(e,t,r);else if("BareTupleExpression"===o.name)for(let e of Lw(o))r=yv(e,t,r);else n&&console.warn("Unrecognized do args",o.toString());for(let{node:e}of l)r=Rv(e.cursor(),t,r,n);return kv(r,i,e.to)}return i}if(r=wv(e)`${sv.as("macro",sv.anything_that_fits(tv`@macro`))} ${sv.many("args")}`){let{macro:e,args:o=[]}=r;e&&Xv(e.cursor(),t,i,n);for(let{node:e}of o)i=Rv(e.cursor(),t,i,n);return i}if((r=wv(e)` + struct ${sv.as("defined_as")} + ${sv.many("expressions")} + end + `)??(r=wv(e)` + mutable struct ${sv.as("defined_as")} + ${sv.many("expressions")} + end + `)){let{defined_as:o,expressions:s=[]}=r;o=lv(o);let a=Sv(i),l=xv();o&&({inner:a,outer:l}=Pv(o.cursor(),t,a));for(let{node:i}of s)if("Identifier"===e.name);else if(r=wv(i)`${sv.as("subject")}::${sv.as("type")}`){let{subject:e,type:i}=r;a=Rv(i.cursor(),t,a,n)}else if(r=wv(i)`${sv.as("assignee")} = ${sv.as("value")}`){let{assignee:e,value:i}=r;if(r=wv(e)`${sv.as("subject")}::${sv.as("type")}`){let{subject:e,type:i}=r;a=Rv(i.cursor(),t,a,n)}a=Rv(i.cursor(),t,a,n)}return i=kv(a,i,e.to),i=hv(i,l)}if(r=wv(e)`abstract type ${sv.as("name")} end`){let{name:e}=r;if(e){let{outer:n}=Pv(e.cursor(),t,i);i=hv(i,n)}return i}if((r=wv(e)`quote ${sv.many("body")} end`)??(r=wv(e)`:(${sv.many("body")})`)){for(let r of function*(e){if("QuoteExpression"!==e.name&&"QuoteStatement"!==e.name)throw new Error("Expected QuotedExpression or QuoteStatement");yield*fv(e)}(e))i=Rv(r,t,i,n);return i}if(r=wv(e)` + module ${sv.as("name")} + ${sv.many("expressions")} + end + `){let{name:e,expressions:n=[]}=r;e&&(i=Tv(i,t,e));let o=xv();for(let{node:e}of n)o=Rv(e.cursor(),t,o);i=hv(i,{usages:Array.from(o.usages).filter((e=>null!=e.definition)),definitions:new Map,locals:[]});for(let{node:e}of n)i=Rv(e.cursor(),t,i);return i}if(r=wv(e)`${sv.as("prefix")}${sv.as("string",sv.String)}`){let{prefix:n,string:o}=r,s=t.sliceString(n.from,n.to);if("var"===s){let n=t.sliceString(o.from+1,o.to-1);return 0!==n.length&&i.usages.push({name:n,usage:{from:e.from,to:e.to},definition:i.definitions.get(n)??null}),i}{let e=`@${s}_str`;i.usages.push({name:e,usage:{from:n.from,to:n.to},definition:i.definitions.get(e)??null})}return i}if(r=wv(e)`${sv.Number}${sv.as("unit")}`)return Rv(r.unit.cursor(),t,i,n);if((r=wv(e)`import ${sv.any}: ${sv.many("specifiers")}`)??(r=wv(e)`using ${sv.any}: ${sv.many("specifiers")}`)){let{specifiers:e=[]}=r,o=pv((e=>Jw`import X: ${e}`));for(let{node:s}of e)if(r=o(s)`${sv.as("name")} as ${sv.as("alias")}`){let{alias:e}=r;i=Tv(i,t,e)}else if(r=o(s)`${sv.as("name",sv.Identifier)}`){let{name:e}=r;i=Tv(i,t,e)}else(r=o(s)`@${sv.any}`)?i=Tv(i,t,s):n&&console.warn("Hmmmm, I don't know what to do with this selected import specifier:",s.toString());return i}if(r=wv(e)`import ${sv.many("specifiers")}`){let{specifiers:e=[]}=r,o=pv((e=>Jw`import ${e}`));for(let{node:s}of e)if(r=o(s)`${sv.any} as ${sv.as("alias")}`){let{alias:e}=r;i=Tv(i,t,e)}else if(r=o(s)`${sv.as("package")}.${sv.as("name",sv.Identifier)}`)i=Tv(i,t,r.name);else if(r=o(s)`.${sv.as("scoped")}`){let e=null;for(;e=o(r.scoped)`.${sv.as("scoped")}`;)r=e;i=Tv(i,t,r.scoped)}else(r=o(s)`${sv.as("name",sv.Identifier)}`)?i=Tv(i,t,r.name):n&&console.warn("Hmmm, I don't know what to do with this import specifier:",s);return i}if(r=wv(e)`using ${sv.many()}`)return i;if(r=wv(e)` + for ${sv.many("bindings",sv.something_with_the_same_type_as(tv`x in y`))}; + ${sv.many("expressions")} + end + `){let o=cv((e=>Jw`for ${e}; x end`)),s=e=>(...t)=>o(tv(...t)).match(e),{bindings:a,expressions:l}=r,O=Sv(i);for(let{node:e}of a){let i=null;if((i=s(e)`${sv.as("name")} in ${sv.as("range")}`)??(i=s(e)`${sv.as("name")} ∈ ${sv.as("range")}`)??(i=s(e)`${sv.as("name")} = ${sv.as("range")}`)){let{name:e,range:r}=i;r&&(O=Rv(r.cursor(),t,O,n)),e&&(O=_v(e,t,O,(null==r?void 0:r.to)??null,n))}else n&&console.warn("Unrecognized for loop binding",e.toString())}for(let{node:e}of l)O=Rv(e.cursor(),t,O,n);return kv(O,i,e.to)}if((r=wv(e)` + ${sv.as("callee")}(${sv.many("args")}) ${sv.maybe(tv`do ${sv.maybe(sv.many("do_args"))} + ${sv.many("do_expressions")} + end`)} + `)??(r=wv(e)` + ${sv.as("callee")}.(${sv.many("args")}) + `)){let{callee:o,args:s=[],do_args:a=[],do_expressions:l=[]}=r;i=Rv(o.cursor(),t,i,n);for(let{node:r}of s){let o=null;if(o=bv(r)`; ${sv.many("named_args")}`){let{named_args:e=[]}=o;for(let{node:r}of e){let e=null;if(e=Qv(r)`${sv.as("name")} = ${sv.as("value")}`){let{name:r,value:o}=e;i=Rv(o.cursor(),t,i,n)}else i=Rv(r.cursor(),t,i,n)}}else if(o=bv(r)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:r}=o;r&&(i=Rv(r.cursor(),t,i,n))}else{if(o=bv(r)`${sv.as("result")} ${sv.many("clauses",sv.anything_that_fits(tv`for x = y`))}`){let{result:r,clauses:s}=o,a=Sv(i);for(let{node:e}of s){let i=null;if((i=mv(e)`for ${sv.as("variable")} = ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")} in ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")} ∈ ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")}`)){let{variable:e,value:r}=i;r&&(a=Rv(r.cursor(),t,a,n)),e&&(a=_v(e,t,a))}else if(i=mv(e)`if ${sv.maybe(sv.as("if"))}`){let{if:e}=i;e&&(a=Rv(e.cursor(),t,a,n))}else n&&console.log("Hmmm, can't parse for binding",e)}return a=Rv(r.cursor(),t,a,n),kv(a,i,e.to)}i=Rv(r.cursor(),t,i,n)}}let O=Sv(i);for(let{node:e}of a)O=yv(e,t,O);for(let{node:e}of l)O=Rv(e.cursor(),t,O,n);return kv(O,i,e.to)}if(r=wv(e)`(${sv.many("tuple_elements")},)`){let{tuple_elements:o=[]}=r,s=pv((e=>Jw`(${e},)`)),a=o.map((({node:t})=>null!=s(e)`${sv.Identifier} = ${sv.any}`));if(a.every((e=>!0===e))||a.every((e=>!1===e)))for(let{node:r}of o){let o=null;if(o=s(e)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:r}=o;r&&(i=Rv(r.cursor(),t,i,n))}else i=Rv(r.cursor(),t,i,n)}else for(let{node:r}of o){let o=null;if(o=s(e)`${sv.as("name")} = ${sv.as("value")}`){let{name:e,value:r}=o;r&&(i=Rv(r.cursor(),t,i,n)),e&&(i=Tv(i,t,e,(null==r?void 0:r.to)??null))}else i=Rv(r.cursor(),t,i,n)}return i}if((r=wv(e)`(${sv.many("args")}) -> ${sv.many("body")}`)??(r=wv(e)`${sv.as("arg")} -> ${sv.many("body")}`)??(r=wv(e)`${sv.as("name")}(${sv.many("args")})::${sv.as("return_type")} = ${sv.many("body")}`)??(r=wv(e)`${sv.as("name")}(${sv.many("args")}) = ${sv.many("body")}`)??(r=wv(e)`${sv.as("name")}(${sv.many("args")}) = ${sv.many("body",sv.anything_that_fits(tv`x, y`))}`)??(r=wv(e)` + function ${sv.as("name")}(${sv.many("args")})::${sv.as("return_type")} where ${sv.as("type_param")} + ${sv.many("body")} + end + `)??(r=wv(e)` + function ${sv.as("name")}(${sv.many("args")}) where ${sv.as("type_param")} + ${sv.many("body")} + end + `)??(r=wv(e)` + function ${sv.as("name")}(${sv.many("args")})::${sv.as("return_type")} + ${sv.many("body")} + end + `)??(r=wv(e)` + function ${sv.as("name")}(${sv.many("args")}) + ${sv.many("body")} + end + `)??(r=wv(e)` + function ${sv.as("name",sv.Identifier)} end + `)??(r=wv(e)`macro ${sv.as("macro_name")} end`)??(r=wv(e)` + macro ${sv.as("macro_name")}(${sv.many("args")}) + ${sv.many("body")} + end + `)){let{name:o,macro_name:s,arg:a,args:l=[],return_type:O,type_param:c,body:u=[]}=r;a&&l.push({node:a}),o?i=Tv(i,t,o):s&&i.definitions.set(`@${t.sliceString(s.from,s.to)}`,{from:s.from,to:s.to,valid_from:s.to});let d=Sv(i);if(c){let e=pv((e=>Jw`function X() where ${e} end`)),i=pv((e=>Jw`function X() where {${e}} end`)),r=[{node:c}],o=e(c)`{${sv.many("type_params")}}`;o&&(r=o.type_params);for(let{node:e}of r){let r=null;if(r=i(e)`${sv.as("defined",sv.Identifier)} <: ${sv.as("parent_type")}`){let{defined:e,parent_type:i}=r;d=Rv(i,t,d,n),d=Tv(d,t,e)}else if(r=i(e)`${sv.as("defined",sv.Identifier)}`){let{defined:e}=r;d=Tv(d,t,e)}else n&&console.warn("Can't handle type param:",e)}}O&&(d=Rv(lv(O).cursor(),t,d,n));for(let{node:e}of l)d=yv(e.cursor(),t,d,n);for(let{node:e}of u)d=Rv(e.cursor(),t,d,n);return kv(d,i,e.to)}if(r=wv(e)` + let ${sv.many("assignments",tv`${sv.as("assignee")} = ${sv.as("value")}`)} + ${sv.many("body",sv.any)} + end + `){let{assignments:o=[],body:s=[]}=r,a=Sv(i);for(let{match:{assignee:e,value:r}}of o)e&&(a=_v(e,t,a,(null==r?void 0:r.to)??null,n)),r&&(i=Rv(r.cursor(),t,i,n));for(let{node:e}of s)a=Rv(e.cursor(),t,a,n);return kv(a,i,e.to)}if((r=wv(e)`[ + ${sv.as("result")} + ${sv.many("clauses",sv.anything_that_fits(tv`for x = y`))} + ]`)??(r=wv(e)`(${sv.as("result")} ${sv.many("clauses",sv.anything_that_fits(tv`for x = y`))})`)){let{result:o,clauses:s}=r,a=Sv(i);for(let{node:e}of s){let i=null;if((i=mv(e)`for ${sv.as("variable")} = ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")} in ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")} ∈ ${sv.maybe(sv.as("value"))}`)??(i=mv(e)`for ${sv.as("variable")}`)){let{variable:e,value:r}=i;r&&(a=Rv(r.cursor(),t,a,n)),e&&(a=_v(e,t,a))}else if(i=mv(e)`if ${sv.maybe(sv.as("if"))}`){let{if:e}=i;e&&(a=Rv(e.cursor(),t,a,n))}else n&&console.warn("Hmmm, can't parse for binding",e)}return a=Rv(o.cursor(),t,a,n),kv(a,i,e.to)}n&&(console.groupCollapsed("Cycling through all children of",e.name),console.log("text:",t.sliceString(e.from,e.to)),console.groupEnd());for(let r of Gw(e))i=Rv(r,t,i,n);return i}finally{n&&console.groupEnd()}},Wv=zn.define({create(e){try{let t=dh(e).cursor();return Rv(t,e.doc,void 0)}catch(e){return console.error("Something went wrong while parsing variables...",e),{usages:[],definitions:new Map,locals:[]}}},update(e,t){try{if(dh(t.state)!=dh(t.startState)){let e=dh(t.state).cursor();return Rv(e,t.state.doc)}return e}catch(e){return console.error("Something went wrong while parsing variables...",e),{usages:[],definitions:new Map,locals:[]}}}}),Av=e=>"SubscriptExpression"===e.name||"FieldExpression"===e.name?(e.firstChild(),Av(e)):"Identifier"===e.name?(e.firstChild(),e.node):null,Nv=["Identifier","FieldExpression","SubscriptExpression","MacroFieldExpression","MacroIdentifier","Operator","Definition","ParameterizedIdentifier"],Cv=["import","export","try","catch","finally","quote","do","struct","mutable","module","baremodule","if","let"],qv=e=>{if(Cv.includes(e.name))return!0;if(Nv.includes(e.name)){if(e.firstChild()){do{if("Number"!==e.name&&"TypeArgumentList"!==e.name&&"FieldName"!==e.name&&"MacroName"!==e.name&&"MacroFieldName"!==e.name&&!qv(e))return!1}while(e.nextSibling());return e.parent(),!0}return!0}return!1},Ev=(e,t=!1)=>{let i=e.selection.main,n=e.field(Wv);if(i.from!==i.to)return e.doc.sliceString(i.from,i.to).trim();{let r=e.doc.lineAt(i.from).text;if("?"===r[0])return r.slice(1);let o=dh(e).cursor();t&&console.log("Full tree:",o.toString()),o.moveTo(i.to,-1);let s=0;do{t&&console.group(`Iteration #${s}`);try{if(t&&console.log("cursor",o.toString()),s>100){console.group("Infinite loop while checking docs"),console.log("Selection:",i,e.doc.sliceString(i.from,i.to).trim()),console.log("Current node:",o.name,e.doc.sliceString(o.from,o.to).trim()),console.groupEnd();break}s+=1;let r=o.node.cursor(),a=[];for(;r.parent();)a.push(r.name);let l=o.node.parent;if(null==l)break;t&&console.log("parents:",a);let O=a.indexOf("StructDefinition");if(-1!==O)if(a.includes("AssignmentExpression")&&a.indexOf("AssignmentExpression")e.usage.from===t.from&&e.usage.to===t.to));if(null==(null==i?void 0:i.definition))return e.doc.sliceString(o.from,o.to)}if("FunctionDefinition"===l.name)return;if("AssignmentExpression"===l.name)return}finally{t&&console.groupEnd()}}while(o.parent())}},Vv=(e,{scopestate:t,global_definitions:i})=>Sl.set(Yv(t.usages.map((({definition:e,usage:t,name:n})=>null==e?i[n]?Sl.mark({tagName:"a",attributes:{title:`${Bi}-Click to jump to the definition of ${n}.`,"data-pluto-variable":n,href:`#${n}`}}).range(t.from,t.to):null:Sl.mark({tagName:"a",attributes:{title:`${Bi}-Click to jump to the definition of ${n}.`,"data-cell-variable":n,"data-cell-variable-from":`${e.from}`,"data-cell-variable-to":`${e.to}`,href:"#"}}).range(t.from,t.to)))),!0);const Yv=e=>e.filter((e=>null!=e)),Zv=Nn.define({combine:e=>e[0],compare:xt.isEqual}),zv=eO.fromClass(class{constructor(e){let t=e.state.facet(Zv);this.decorations=Vv(e.state,{scopestate:e.state.field(Wv),global_definitions:t})}update(e){let t=e.state.facet(Zv);(e.docChanged||e.viewportChanged||t!==e.startState.facet(Zv))&&(this.decorations=Vv(e.state,{scopestate:e.state.field(Wv),global_definitions:t}))}},{decorations:e=>e.decorations,eventHandlers:{click:(e,t)=>{if(e.target instanceof Element){let n=e.target.closest("[data-pluto-variable]");if(n){var i;let r=n.getAttribute("data-pluto-variable");if(null==r)return!1;if(!Ki(e)&&!t.state.readOnly)return!1;e.preventDefault();let o=`[id='${encodeURI(r)}']`;null===(i=document.querySelector(o))||void 0===i||i.scrollIntoView({behavior:"smooth",block:"center"});let s=t.state.facet(Zv);if(s[r])return window.dispatchEvent(new CustomEvent("cell_focus",{detail:{cell_id:s[r],line:0,definition_of:r}})),!0}let r=e.target.closest("[data-cell-variable]");if(r){let i=r.getAttribute("data-cell-variable"),n=Number(r.getAttribute("data-cell-variable-from")),o=Number(r.getAttribute("data-cell-variable-to"));return null!=i&&null!=n&&null!=o&&(!(!Ki(e)&&!t.state.readOnly)&&(e.preventDefault(),t.dispatch({scrollIntoView:!0,selection:{anchor:n,head:o}}),t.focus(),!0))}}}}}),Mv=u_.parser,Iv=P_.parser.configure(eQ({htmlParser:Mv})),Uv=dP.language.parser,jv=function(e={}){let t=e.dialect||uP;return new _h(t.language,[cP(e),lP(t,!!e.upperCaseKeywords)])}({dialect:dP}),Dv=NP.parser,Gv=["md","mermaid","cm","markdown","mdx","mdl","markdownliteral"].flatMap((e=>[e,`@${e}`])),Lv=new Set(["TripleString","String","CommandString","TripleStringWithoutInterpolation","StringWithoutInterpolation","CommandStringWithoutInterpolation"]),Bv=Qo(((e,t)=>{var i,n,r;if(!Lv.has(e.type.name))return null;const o="TripleString"===e.name||"TripleStringWithoutInterpolation"===e.name?3:1,s=e.from+o,a=Math.min(e.to-o,t.length);if(s>=a)return null;const l=(null===(i=e.node)||void 0===i?void 0:i.prevSibling)||(null===(n=e.node)||void 0===n||null===(r=n.parent)||void 0===r?void 0:r.prevSibling);if(null==l||"MacroIdentifier"!==l.name&&"Prefix"!==l.name)return null;const O="MacroIdentifier"===l.name,c=t.read(l.from,l.to);let u=null;if("@htl"===c||"html"===c)u=Mv;else if(Gv.includes(c))u=Iv;else if("@javascript"===c||"@js"===c||"js"===c||"javascript"===c)u=Ay.parser;else if("py"===c||"pyr"===c||"python"===c||"@python"===c)u=Dv;else{if("sql"!==c)return null;u=Uv}let d=[];if(null!=e.node.firstChild){let t=s,i=e.node.firstChild.cursor();do{t!==i.from&&d.push({from:t,to:i.from}),t=i.to}while(i.nextSibling());te.flatMap((({from:e,to:i})=>{const n=t.read(e,i),r=[];let o=e;for(let{index:t}of n.matchAll(/\\\$/g)){let i=e+t;o!==i&&r.push({from:o,to:i}),o=i+1}return o!==i&&r.push({from:o,to:i}),r})))(d,t)),[...Gv].includes(c)?{parser:u,overlay:[{from:s,to:a}]}:{parser:u,overlay:d}})),Kv=e=>{const t=fm(e);return t.language.parser=t.language.parser.configure({wrap:Bv}),t};let Fv=({focus_on_open:e,desired_doc_query:t,on_update_doc_query:i,notebook:n})=>{let r=ue($w),o=le(null),[s,a]=oe({shown_query:null,searched_query:null,body:"

Welcome to the Live docs! Keep this little window open while you work on the notebook, and you will get documentation of everything you type!

You can also type a query above.


Still stuck? Here are some tips.

",loading:!1}),l=e=>a(Xt((t=>e(t))));se((()=>{s.loading||(null==t||/[^\s]/.test(t))&&s.searched_query!==t&&O(t)}),[t,s.loading,s.searched_query]),ae((()=>{e&&o.current&&(o.current.focus({preventScroll:!0}),o.current.select())}),[e,o.current]);let O=e=>{l((t=>{t.loading=!0,t.searched_query=e})),Promise.race([kt.Promises.delay(2e3,!1),r.send("docs",{query:e.replace(/^\?/,"")},{notebook_id:n.notebook_id}).then((t=>"⌛"!==t.message.status&&("👍"===t.message.status?(l((i=>{i.shown_query=e,i.body=t.message.doc})),!0):void 0)))]).then((()=>{l((e=>{e.loading=!1}))}))},c=Oe((()=>we`<${vT} body=${Jv(s.body)} />`),[s.body]),u=!1===s.loading&&""!==s.searched_query&&s.searched_query!==s.shown_query;return we` +
+ i(e.target.value)} + value=${t} + type="search" + > + +
+
null!=e&&Hv(e,i)}> +

${s.shown_query}

+ ${c} +
+ `};const Hv=(e,t)=>{for(let t of e.querySelectorAll("code:not([class])"))XT(t,"julia");for(let i of e.querySelectorAll("a")){const e=i.getAttribute("href");if(null!=e&&e.startsWith("@ref")){const n=e.length>4?e.substr(5):i.textContent;i.onclick=e=>{t(n),e.preventDefault()}}}},Jv=e=>e.replace(/Main\.var"workspace\#\d+"\./g,"").replace(/Main\.workspace\#\d+\./g,"").replace(/ in Main\.var"workspace\#\d+"/g,"").replace(/ in Main\.workspace\#\d+/g,"").replace(/#==#[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\:\d+/g,""),eX=e=>null==e?[null]:Object.entries(e).flat(),tX=({nbpkg:e,package_name:t,available_versions:i,is_disable_pkg:n})=>{let r="error",o="error",s=we`error`,a=!1;const l=(null==e?void 0:e.installed_versions[t])??null,O=((null==e?void 0:e.busy_packages)??[]).includes(t)||!((null==e?void 0:e.instantiated)??1);if(n){r="disable_pkg",o=`${t} disables Pluto's built-in package manager.`,s=we`${t} disables Pluto's built-in package manager.`}else null!=l||xt.isEqual(i,["stdlib"])?null==l||"stdlib"===l?(r="installed",o=`${t} is part of Julia's pre-installed 'standard library'.`,s=we`${t} is part of Julia's pre-installed standard library.`):O?(r="busy",o=`${t} (v${l}) is installing...`,s=we`
${t} v${l}
+ is installing...`):(r="installed",o=`${t} (v${l}) is installed in the notebook.`,s=we`
${t} v${l}
+ is installed in the notebook.`,u=i,a=!("stdlib"===(c=l)||!xt.isArray(u))&&xt.last(u)!==c):null!=i&&xt.isArray(i)&&(0===i.length?(r="not_found",o=`The package "${t}" could not be found in the registry. Did you make a typo?`,s=we`The package "${t}" could not be found in the registry. +
Did you make a typo?
`):(r="will_be_installed",o=`${t} (v${xt.last(i)}) will be installed in the notebook when you run this cell.`,s=we`
${t} v${xt.last(i)}
+ will be installed in the notebook when you run this cell.`));var c,u;return{status:r,hint:s,hint_raw:o,available_versions:i,chosen_version:l,busy:O,offer_update:a}},iX=({package_name:e,pluto_actions:t,notebook_id:i,nbpkg:n})=>{const[r,o]=oe(null);se((()=>{(t.get_avaible_versions({package_name:e,notebook_id:i})??Promise.resolve([])).then((e=>{o(e)}))}),[e]);const{status:s,hint_raw:a}=tX({nbpkg:n,package_name:e,is_disable_pkg:!1,available_versions:r});return we` + + + + `},nX=({package_name:e})=>{const{hint_raw:t}=tX({nbpkg:null,package_name:e,is_disable_pkg:!0,available_versions:null});return we` + + + + `};var rX=AnsiUp=window.AnsiUp;const oX=({value:e})=>{const t=le(null);return se((()=>{if(!t.current)return;t.current.innerHTML=(new rX).ansi_to_html(e);const i=t.current.parentElement;i&&(i.scrollTop=1e5)}),[t.current,e]),e?we`
`:null};var sX;sX=o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("gLApS");const aX=new URL(sX);var lX;lX=o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("hfbF0");const OX=new URL(lX);var cX;cX=o("8LcMF").getBundleURL("7rd1W")+o("jTduX").resolve("8ladp");const uX=new URL(cX),dX=e=>{window.dispatchEvent(new CustomEvent("open pluto popup",{detail:e}))},hX=({notebook:e,disable_input:t})=>{const[i,n]=oe(null),r=le(null);r.current=i;const o=le(null),s=le(""),a=e=>{const t=e.detail.source_element;if(o.current=t,null==t)s.current="top: 20%; left: 50%; transform: translate(-50%, -50%); position: fixed;";else{const e=t.getBoundingClientRect(),i=document.body.getBoundingClientRect();s.current=`top: ${.5*(e.top+e.bottom)-i.top}px; left: min(max(0px,100vw - 251px - 30px), ${e.right-i.left}px);`}n(e.detail)},l=()=>{n(null)};se((()=>{const e=e=>{null!=r.current&&null!=e.target&&null==e.target.closest("pluto-popup")&&(null!=o.current&&o.current.contains(e.target)||l())},t=e=>{"Escape"===e.key&&l()};return window.addEventListener("open pluto popup",a),window.addEventListener("close pluto popup",l),window.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{window.removeEventListener("open pluto popup",a),window.removeEventListener("close pluto popup",l),window.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}}),[]);const O=null==i?void 0:i.type;return we` + ${"nbpkg"===O?we`<${fX} + notebook=${e} + disable_input=${t} + recent_event=${i} + clear_recent_event=${()=>n(null)} + />`:"info"===O||"warn"===O?we`
${null==i?void 0:i.body}
`:null} +
`},fX=({notebook:e,recent_event:t,clear_recent_event:i,disable_input:n})=>{var r,o,s,a,l;let O=ue($w);const[c,u]=oe(null);var d;se((()=>{let i=!0;return null==t?u(null):"nbpkg"===(null==t?void 0:t.type)&&(O.get_avaible_versions({package_name:t.package_name,notebook_id:e.notebook_id})??Promise.resolve([])).then((n=>{i&&u(tX({nbpkg:e.nbpkg,package_name:t.package_name,is_disable_pkg:t.is_disable_pkg,available_versions:n}))})),()=>{i=!1}}),[t,...(d=e.nbpkg,null==d?[null]:Object.entries(d).flatMap((([e,t])=>"terminal_outputs"===e?[]:[t])))]),se((()=>{var t;((null===(t=e.nbpkg)||void 0===t?void 0:t.enabled)??1)||i()}),[(null===(r=e.nbpkg)||void 0===r?void 0:r.enabled)??!0]);const[h,f]=oe(!1),p=null!=t&&(((null===(o=e.nbpkg)||void 0===o?void 0:o.busy_packages)??[]).includes(t.package_name)||!((null===(s=e.nbpkg)||void 0===s?void 0:s.instantiated)??1)),m=$X(p,2);se((()=>{f(m)}),[m]);const g=null==(null===(a=e.nbpkg)||void 0===a?void 0:a.terminal_outputs)?"Loading...":(null===(l=e.nbpkg)||void 0===l?void 0:l.terminal_outputs[null==t?void 0:t.package_name])??"",$=(null==c?void 0:c.offer_update)??!1;return we` + ${(null==c?void 0:c.hint)??"Loading..."} + + <${oX} value=${g??"Loading..."} /> + `},pX=({runtime:e,running:t,queued:i,code_differs:n,on_run:r,on_interrupt:o,set_cell_disabled:s,depends_on_disabled_cells:a,running_disabled:l,on_jump:O})=>{const c=r,u=gX(t),d=null==u?null:1e6*u,h=(ue($w),t||i?"interrupt":l?"save":a&&!n?"jump":"run");return we` + + + ${mX(t?d??e:e)} + + `},mX=e=>{if(null==e)return"---";let t=e;const i=["n","μ","m",""];let n=0;for(;n=1e3;)n+=1,t/=1e3;return t.toFixed(e<100||t>=100?0:1)+" "+i[n]+"s"},gX=e=>{const[t,i]=oe(0),[n,r]=oe(0);return se((()=>{let t;if(e){const e=+new Date;r(e),i(e),t=setInterval((()=>i(+new Date)),50)}return()=>{t&&clearInterval(t)}}),[e]),e?t-n:void 0},$X=(e,t=5)=>{const[i,n]=oe(e),r=Oe((()=>xt.debounce(n,1e3*t)),[n]);return se((()=>(e?(n(!0),r.cancel()):r(!1),()=>{})),[e]),i},bX=({total:e,done:t,busy:i})=>(e=Math.max(1,e),we` +
=8&&e<48,big:e>=48})} + data-total=${e} + > + ${[...Array(e)].map(((e,n)=>we`
=t&&n
`))} +
+ `);let QX=({status:e})=>{const t=Object.values(e.subtasks).every(kX),[i,n]=oe(!1);se((()=>{if(i&&t){console.log("all done");let t=null,i=setTimeout((()=>{n(!1);let i=WX(e);t=new Notification("Pluto: notebook ready",{tag:"notebook ready",body:`✓ All ${i} steps completed`,lang:"en-US",dir:"ltr",icon:CW}),t.onclick=e=>{parent.focus(),window.focus(),null==t||t.close()}}),3e3);const r=()=>{"visible"===document.visibilityState&&(null==t||t.close())};return document.addEventListener("visibilitychange",r),document.body.addEventListener("click",r),()=>{null==t||t.close(),clearTimeout(i),document.removeEventListener("visibilitychange",r),document.body.removeEventListener("click",r)}}}),[t]);const r=MX(!t,2500)||i;return we` +
+ +
+ `},yX=({status:e,notebook:t,backend_launch_logs:i,my_clock_is_ahead_by:n})=>we` +
+ <${XX} + status_tree=${e} + path=${[]} + my_clock_is_ahead_by=${n} + nbpkg=${t.nbpkg} + backend_launch_logs=${i} + /> + <${QX} status=${e} /> +
+ `;const _X="\nworkspace\n\ncreate_process\ninit_process\n\n\npkg\n\nanalysis\nwaiting_for_others\nresolve\nremove\nadd\ninstantiate\ninstantiate1\ninstantiate2\ninstantiate3\nprecompile\n\nrun\n\n\nsaving\n\n".split("\n").map((e=>e.trim())).filter((e=>e.length>0)),PX=["saving"],wX={workspace:"Workspace setup",create_process:"Start Julia",init_process:"Initialize",pkg:"Package management",instantiate1:"instantiate",instantiate2:"instantiate",instantiate3:"instantiate",run:"Evaluating cells",evaluate:"Running code",registry_update:"Updating package registry",waiting_for_others:"Waiting for other notebooks to finish package operations",backend_launch:"Connecting to backend",backend_requesting:"Requesting a worker",backend_created:"Starting Pluto server",backend_responded:"Opening notebook file",backend_notebook_running:"Switching to live editing"},vX=e=>1e9*e,XX=({status_tree:e,path:t,my_clock_is_ahead_by:i,nbpkg:n,backend_launch_logs:r})=>{var o;if(null==e)return null;const s=t.reduce(((e,t)=>e.subtasks[t]),e);if(!s)return null;const[a,l]=oe(t.length<1),O=t.length>0&&TX(s),c=O&&kX(s),u=O&&!c,d=s.started_at??0,h=s.finished_at??0,f=(gX(u)??0)/1e3,p=Date.now()/1e3,m=Math.max(f,p-d-("local"===s.timing?0:i));se((()=>{if(u){let e=setTimeout((()=>{l(!0)}),Math.max(100,500-200*t.length));return()=>clearTimeout(e)}}),[u]),CX((([e])=>{if(!e&&c){let e=setTimeout((()=>{l(!1)}),1800-200*t.length);return()=>clearTimeout(e)}}),[c]);const g=a?Object.values(s.subtasks).every((e=>xX(e.name)))&&Object.values(s.subtasks).length>0?(()=>{let e=Object.values(s.subtasks),t=e.reduce(((e,t)=>e+(kX(t)?1:0)),0),i=e.reduce(((e,t)=>e+(RX(t)?1:0)),0),n=e.length;return we`<${bX} busy=${i} done=${t} total=${n} />`})():Object.entries(s.subtasks).sort(((e,t)=>SX(e[1],t[1]))).map((([o,s])=>PX.includes(o)?null:we`<${XX} + key=${o} + status_tree=${e} + my_clock_is_ahead_by=${i} + path=${[...t,o]} + nbpkg=${n} + backend_launch_logs=${r} + />`)):null;let $=null;if(O){let e=AX(s),t=WX(s);e>1&&($=we`${" "}(${t}/${e})`)}return 0===t.length?g:we`0})} + > +
{l(!a)}} + > + + ${(e=>{const t=wX[e];return null!=t?t:xX(e)?`Step ${e}`:e})(s.name)}${$} + ${c?mX(vX(h-d)):u?mX(vX(m)):null} +
+ ${g} + ${a&&"pkg"===s.name?we`<${oX} value=${null==n||null===(o=n.terminal_outputs)||void 0===o?void 0:o.nbpkg_sync} />`:a&&"backend_launch"===s.name?we`<${oX} value=${r} />`:void 0} +
`},xX=e=>/^\d+$/.test(e),SX=(e,t)=>{const i=_X.indexOf(e.name),n=_X.indexOf(t.name);if(-1===i&&-1===n)return null!=e.started_at||null!=t.started_at?(e.started_at??1/0)-(t.started_at??1/0):xX(e.name)&&xX(t.name)?parseInt(e.name)-parseInt(t.name):e.name.localeCompare(t.name);{let e=e=>-1===e?1/0:e;return e(i)-e(n)}},kX=e=>null!=e.finished_at,TX=e=>null!=e.started_at,RX=e=>TX(e)&&!kX(e),WX=e=>Object.values(e.subtasks).reduce(((e,t)=>e+WX(t)),kX(e)?1:0),AX=e=>Object.values(e.subtasks).reduce(((e,t)=>e+AX(t)),1),NX=(e,t,i,n={})=>({name:e,subtasks:n,timing:"local",started_at:Oe((()=>t||i?Date.now()/1e3:null),[t||i]),finished_at:Oe((()=>i?Date.now()/1e3:null),[i])}),CX=(e,t)=>{const i=le(t);se((()=>{let n=e(i.current);return i.current=t,n}),t)},qX={wait_for_user:0,requesting:.4,created:.6,responded:.7,notebook_running:.9,ready:1},EX=e=>e.endsWith("/")?e:e+"/",VX=e=>fetch(`https://stats.plutojl.org/count?p=/${e}&s=${screen.width},${screen.height},${devicePixelRatio}#skip_sw`,{cache:"no-cache"}).catch((()=>{})),YX=async({setStatePromise:e,connect:t,launch_params:i})=>{try{VX("binder-start"),await e(Xt((e=>{e.backend_launch_phase=qX.requesting,e.disable_ui=!1,e.notebook.status_tree=null})));const{binder_session_url:n,binder_session_token:r}=await((e,{on_log:t})=>new Promise(((i,n)=>{console.log("Starting binder connection to",e);try{let r=new EventSource(e);r.onerror=t=>{console.error("Binder error: Lost connection to "+e,t),r.close(),n(t)};let o=null,s="",a=e=>{console.log("Binder: ",e,` at ${(new Date).toLocaleTimeString()}`),s=`${s}${e}\n`,t(s)};r.onmessage=t=>{let s=JSON.parse(t.data);switch(s.phase&&s.phase!==o&&(o=s.phase.toLowerCase(),a(`\n\n⏱️ Binder subphase: ${o}\n`)),s.message&&a(s.message.replace("] ","]\n")),s.phase){case"failed":console.error("Binder error: Failed to build",e,s),r.close(),n(new Error(s));break;case"ready":r.close(),i({binder_session_url:EX(s.url)+"pluto/",binder_session_token:s.token})}}}catch(e){console.error(e),n("Failed to open event source the mybinder.org. This probably means that the URL is invalid.")}})))(i.binder_url.replace("mybinder.org/v2/","mybinder.org/build/"),{on_log:t=>e(Xt((e=>{e.backend_launch_logs=t})))}),o=e=>Xi(e,{token:r});console.log("Binder URL:",o(n)),window.shutdown_binder=()=>{fetch(o(new URL("../api/shutdown",n)),{method:"POST"})},await e(Xt((e=>{e.backend_launch_phase=qX.created,e.binder_session_url=n,e.binder_session_token=r}))),await fetch(o(n)),await e(Xt((e=>{e.backend_launch_phase=qX.responded})));let s=async()=>{const e=o(Xi(new URL("notebookupload",n),{name:new URLSearchParams(window.location.search).get("name")}));return console.log("downloading locally and uploading ",e,i.notebookfile),fetch(e,{method:"POST",body:await(await fetch(new Request(i.notebookfile,{integrity:i.notebookfile_integrity}))).arrayBuffer()})},a=async(e,t)=>{const i=Xi(new URL("open",n),{[e]:t});return console.log(`open ${e}:`,i),fetch(o(i),{method:"POST"})},l=(e,t)=>()=>a(e,t),O=i.notebookfile.startsWith("data:")?[s]:[l("path",i.notebookfile),l("url",new URL(i.notebookfile,window.location.href).href),s],c=new Response;for(let e of O)if(c=await e(),c.ok)break;if(!c.ok){let e=await c.blob();return void(window.location.href=URL.createObjectURL(e))}const u=await c.text(),d=o(Xi(new URL("edit",n),{id:u}));console.info("notebook_id:",u),await e(Xt((e=>{e.notebook.notebook_id=u,e.backend_launch_phase=qX.notebook_running,e.refresh_target=d}))),console.log("Connecting WebSocket");const h=t(o(new URL("channels",Ai(n))));await xi(h,2e4).catch((e=>{console.error("Failed to establish connection within 20 seconds. Navigating to the edit URL directly.",e),window.parent.location.href=d}))}catch(e){console.error("Failed to initialize binder!",e),alert("Something went wrong! 😮\n\nWe failed to initialize the binder connection. Please try again with a different browser, or come back later.")}},ZX=e=>window.dispatchEvent(new CustomEvent("open_bottom_right_panel",{detail:e}));let zX=({desired_doc_query:e,on_update_doc_query:t,notebook:i,connected:n,backend_launch_phase:r,backend_launch_logs:o})=>{let s=le();const a=le(!1),[l,O]=oe(null),c=null==l;se((()=>{let e=e=>{console.log(e.detail),a.current=!1,O(e.detail),"none"===window.getComputedStyle(s.current).display&&alert("This browser window is too small to show docs.\n\nMake the window bigger, or try zooming out.")};return window.addEventListener("open_bottom_right_panel",e),()=>window.removeEventListener("open_bottom_right_panel",e)}),[]);const u=IX(i,r),[d,h]=Oe((()=>null==u?[0,0]:[AX(u)-1,WX(u)-(kX(u)?1:0)]),[u]),f=h{let t=ue($w);const[i,n]=oe(0);return se((()=>{if(e){let e=async()=>{let e=()=>t.send("current_time").then((e=>e.message.time)),i=()=>Date.now()/1e3;for(let t=0;t<16;t++)await e();let r=await i(),o=await e(),s=await e(),a=(r+await i())/2-(o+s)/2;isNaN(a)||n(a)};e();let i=setInterval(e,6e4);return()=>clearInterval(i)}}),[e]),i})({connected:n});return we` + + `};const MX=(e,t)=>{const[i,n]=oe(!1);return se((()=>{if(e){let e=setTimeout((()=>{n(!0)}),t);return()=>clearTimeout(e)}n(!1)}),[e]),i},IX=(e,t)=>{var i;const n=UX(t);return null==t?e.status_tree:{name:"notebook",started_at:0,finished_at:null,subtasks:{...null===(i=e.status_tree)||void 0===i?void 0:i.subtasks,backend_launch:n}}},UX=e=>{let t=e??-1;const i=Object.fromEntries(["requesting","created","responded","notebook_running"].map((e=>{let i=qX[e],n=`backend_${e}`;return[n,NX(n,t>=i,t>i)]})));return NX("backend_launch",null!=e&&e>qX.wait_for_user,e===qX.ready,i)};let{autocompletion:jX,completionKeymap:DX,completionStatus:GX,acceptCompletion:LX}=sm,BX=jX()[0];const KX=cr.define(),FX=zn.define({create:()=>!1,update(e,t){var i,n;for(let e of t.effects)if(e.is(KX))return!0;return(null==(null===(i=t.startState.field(BX,!1))||void 0===i?void 0:i.open)||null!=(null===(n=t.state.field(BX,!1))||void 0===n?void 0:n.open))&&((null==t.startState.field(BX,!1).open||t.startState.field(BX,!1)===t.state.field(BX,!1))&&e)}});const HX=[{key:"Tab",run:e=>{if(LX(e))return!0;let t=e.state.selection.main,i=e.state.sliceDoc(t.from-1,t.from);return!!t.empty&&(!/^(\t| |\n|\=|\)|)$/.test(i)&&(e.dispatch({effects:KX.of(10)}),sm.startCompletion(e)))}},{key:"?",run:e=>{var t;return!!((null===(t=e.state.field(BX,!1))||void 0===t?void 0:t.open)??!1)&&(ZX("docs"),!0)}},{key:".",run:e=>(LX(e),!1)}];let JX=e=>iu.updateListener.of((t=>{let i=t.state.field(BX,!1),n=null==i?void 0:i.open;if(null==n)return;let r=n.options[n.selected],o=r.completion.apply??r.completion.label;if("string"!=typeof o)return;let s=t.state.update({changes:{from:r.source.from,to:Math.min(r.source.to,t.state.doc.length),insert:o}}),a=Ev(s.state);null!=a&&e(a)}));let ex=e=>async t=>{let i=t.state.sliceDoc(0,t.pos),n=await e({text:i});if(!n)return null;let{start:r,stop:o,results:s}=n,a=!function(e){const t=dh(e.state).resolve(e.pos);return null!=t&&("TripleString"===t.name||"String"===t.name)}(t);return{from:r,to:o,filter:!1,options:s.map((([e,t,i,n,r,o])=>({label:e,apply:o&&a?o:e,detail:o??void 0})))}},tx=e=>/^[@a-zA-Z_][a-zA-Z0-9!_]*\"?$/.test(e)?null:":"===e?`:(${e})`:`:${e}`;const ix=function*(e,t,i){let n=0;for(let[r,{valid_from:o}]of e.entries())!t.has(r)&&o{const t=ex(e),i=(e=>async t=>{let i=t.state.sliceDoc(0,t.pos),n=(e=>e.matchBefore(/\.\:[^\s"'`()\[\].]*/))(t);n&&(i=i.slice(0,n.from+1)+i.slice(n.from+2));let r=await e({text:i});if(!r)return null;let{start:o,stop:s,results:a}=r;n&&(s+=1);const l=t.state.field(Wv).definitions,O=new Set;let c="."===i.slice(0,o).slice(-1);return{from:o,to:s,options:[...a.map((([e,t,i,n,r],o)=>{let s=c?tx(e)??e:e;return l.has(e)&&O.add(e),{label:e,apply:s,type:gw({c_notexported:!i,[`c_${t}`]:null!=t,[`completion_${r}`]:null!=r,c_from_notebook:n})??void 0,boost:50-o/a.length}})),...a.filter((([e])=>c&&null!=tx(e))).map((([e,t,i],n)=>{let r=tx(e)??"";return{label:r,apply:r,type:(i?"":"c_notexported ")+(null==t?"":"c_"+t),boost:-99-n/a.length,is_not_exported:!i}})),...Array.from(ix(l,O,t.pos))]}})(e);return e=>{let n=(e=>e.matchBefore(/\\[^\s"'.`]*/))(e)||(e=>e.matchBefore(/~\//))(e);return null===n?i(e):t(e)}},rx=async e=>{const t=await sm.completeAnyWord(e);return null===t?null:{from:t.from,options:t.options.map((({label:e},t)=>({label:e,apply:e,type:void 0,boost:0-t})))}};let ox=({request_autocomplete:e,on_update_doc_query:t})=>{let i=null,n=null;return[FX,jX({activateOnTyping:!1,override:[nx((async t=>{if(xt.isEqual(t,i)){let e=await n;if(null!=e)return e}return i=t,n=e(t),await n})),rx],defaultKeymap:!1,maxRenderedOptions:512,optionClass:e=>e.type??""}),iu.updateListener.of((e=>{let t=e.state.field(BX,!1),i=e.state.field(FX,!1);null!=(null==t?void 0:t.open)&&i&&"active"===GX(e.state)&&1===t.open.options.length&&((e,t)=>{let i=t.completion.apply||t.completion.label,n=t.source;"string"==typeof i?e.dispatch({changes:{from:n.from,to:n.to,insert:i},selection:{anchor:n.from+i.length},userEvent:"input.complete"}):i(e,t.completion,n.from,n.to)})(e.view,t.open.options[0])})),iu.updateListener.of((e=>{for(let i of e.transactions){var t;let n=i.annotation(sm.pickedCompletion);n&&"string"==typeof n.apply&&n.apply.endsWith("/")&&(null===(t=n.type)||void 0===t?void 0:t.match(/(^| )completion_path( |$)/))&&sm.startCompletion(e.view)}})),JX(t),cu.of(HX),cu.of(DX)]};class sx extends Xl{constructor(e){super(),this.element=e}eq(e){return!1}toDOM(){let e=document.createElement("span");return M(this.element,e),e}updateDOM(e){return M(this.element,e),!0}}const ax=["Pkg.activate","Pkg.API.activate","Pkg.develop","Pkg.API.develop","Pkg.add","Pkg.API.add","quickactivate","@quickactivate"];function lx(e,{pluto_actions:t,notebook_id:i,nbpkg:n}){let r=new Set,o=e.visibleRanges.flatMap((({from:o,to:s})=>{let a=function({doc:e,tree:t,from:i,to:n}){let r=0,o=[];return function({tree:e,enter:t,leave:i,from:n=0,to:r=e.length}){let o=e.cursor();for(;;){let e=!1;if(o.from<=r&&o.to>=n&&(o.type.isAnonymous||!1!==t(o))){if(o.firstChild())continue;o.type.isAnonymous||(e=!0)}for(;e&&i&&i(o),e=o.type.isAnonymous,!o.nextSibling();){if(!o.parent())return;e=!0}}}({tree:t,from:i,to:n,enter:t=>{if("QuoteExpression"!==t.name&&"QuoteStatement"!==t.name||r++,"InterpolationExpression"===t.name&&r--,0!==r)return;if("CallExpression"===t.name||"MacroExpression"===t.name){let i=t.node.firstChild,n=e.sliceString(i.from,i.to);return void(ax.includes(n)&&o.push({type:"package_disabler",name:n,from:t.to,to:t.to}))}let i=cv((e=>Jw`import A, ${e}`)),n=e=>{let t=null;return(t=i(tv`${sv.as("package")}.${sv.any}`).match(e))?n(t.package):(t=i(tv`.${sv.maybe(sv.any)}`).match(e))?null:(t=i(tv`${sv.Identifier}`).match(e))?e:void console.warn("Unknown nested import specifier: "+e.toString())},s=null;if((s=iv(tv`import ${sv.as("specifier")}: ${sv.many()}`).match(t))??(s=iv(tv`import ${sv.as("specifier")}, ${sv.many("specifiers")}`).match(t))??(s=iv(tv`using ${sv.as("specifier")}: ${sv.many()}`).match(t))??(s=iv(tv`using ${sv.as("specifier")}, ${sv.many("specifiers")}`).match(t))){let{specifier:r,specifiers:a=[]}=s;r&&(a=[{node:r},...a]);for(let{node:t}of a){t=lv(t);let r=null;if(r=i(tv`${sv.as("package")} as ${sv.maybe(sv.any)}`).match(t)){let t=n(r.package);t&&o.push({type:"package",name:e.sliceString(t.from,t.to),from:t.to,to:t.to})}else if(r=i(tv`${sv.as("package")}.${sv.any}`).match(t)){let t=n(r.package);t&&o.push({type:"package",name:e.sliceString(t.from,t.to),from:t.to,to:t.to})}else if(r=i(tv`.${sv.as("scoped")}`).match(t));else if(r=i(tv`${sv.as("package")}`).match(t)){let t=n(r.package);t&&o.push({type:"package",name:e.sliceString(t.from,t.to),from:t.to,to:t.to})}else console.warn("Unknown import specifier: "+t.toString())}if(s=null,s=iv(tv`using ${sv.as("specifier")}, ${sv.many("specifiers")}`).match(t)){let{specifier:t}=s;t&&("\n"!==e.sliceString(t.to,t.to+1)&&""!==e.sliceString(t.to,t.to+1)||o.push({type:"implicit_using",name:e.sliceString(t.from,t.to),from:t.to,to:t.to}))}return!1}if("ImportStatement"===t.name)throw new Error("What")},leave:e=>{"QuoteExpression"!==e.name&&"QuoteStatement"!==e.name||r--,"InterpolationExpression"===e.name&&r++}}),o}({doc:e.state.doc,tree:dh(e.state),from:o,to:s});return a.map((e=>{if("package"===e.type){let{name:o}=e;if("Base"!==o&&"Core"!==o&&!r.has(o)){return r.add(o),Sl.widget({widget:new sx(we` + <${iX} + key=${o} + package_name=${o} + pluto_actions=${t} + notebook_id=${i} + nbpkg=${n} + /> + `),side:1}).range(e.to)}}else{if("package_disabler"===e.type){return Sl.widget({widget:new sx(we` <${nX} package_name=${e.name} /> `),side:1}).range(e.to)}if("implicit_using"===e.type&&"HypertextLiteral"===e.name){return Sl.widget({widget:new sx(we` +
+ : @htl, @htl_str +
+
`),side:1}).range(e.to)}}}))})).filter((e=>null!=e));return Sl.set(o,!0)}const Ox=Nn.define({combine:e=>e[0],compare:xt.isEqual}),cx=({pluto_actions:e,notebook_id_ref:t})=>eO.fromClass(class{update_decos(i){const n=lx(i,{pluto_actions:e,notebook_id:t.current,nbpkg:i.state.facet(Ox)});this.decorations=n}constructor(e){this.update_decos(e)}update(e){(e.docChanged||e.viewportChanged||e.state.facet(Ox)!==e.startState.facet(Ox))&&this.update_decos(e.view)}},{decorations:e=>e.decorations,eventHandlers:{pointerdown:(e,t)=>{e.target}}}),ux=cr.define({}),dx=zn.define({create:()=>({defaultCharacterWidth:null,measuredSpaceWidth:null,measuredTabWidth:null}),update(e,t){for(let e of t.effects)if(e.is(ux))return e.value;return e}});let hx=iu.updateListener.of((e=>{let t=e.view.defaultCharacterWidth,{defaultCharacterWidth:i,measuredSpaceWidth:n}=e.view.state.field(dx,!1);if(i!==t){let i,n;e.view.dispatch({effects:[ux.of({defaultCharacterWidth:t,measuredSpaceWidth:i,measuredTabWidth:n})]})}})),fx=zn.define({create:()=>Sl.none,update(e,t){let i=t.startState.field(dx,!1),n=i.measuredSpaceWidth??i.defaultCharacterWidth,{measuredSpaceWidth:r,defaultCharacterWidth:o}=t.state.field(dx,!1),s=r??o;if(null==s)return Sl.none;if(!t.docChanged&&e!==Sl.none&&n===s)return e;let a=[];for(let e of xt.range(0,t.state.doc.lines)){let i=t.state.doc.line(e+1);if(0===i.length)continue;let n=0;for(let e of i.text){if("\t"!==e)break;n++}const r=Math.min(n,12),o=4*r*s,l=Sl.line({attributes:{style:`--indented: ${o}px;`,class:"awesome-wrapping-plugin-the-line"}});if(a.push(l.range(i.from,i.from)),0!==r&&a.push(Sl.mark({class:"awesome-wrapping-plugin-the-tabs"}).range(i.from,i.from+r)),n>r)for(let e of xt.range(r,n))a.push(Sl.replace({widget:new sx(we``),block:!1}).range(i.from+e,i.from+e+1))}return Sl.set(a)},provide:e=>iu.decorations.from(e)}),px=Sl.mark({class:"indentation-so-dont-break"}),mx=(zn.define({create:()=>Sl.none,update(e,t){let i=[];for(const e of t.newDoc)for(const t of e.matchAll(/[^ \t]+([ \t]|$)+/g))null!=t.index&&0!==t.index&&i.push(px.range(0+t.index,0+t.index+t[0].length));return Sl.set(i,!0)},provide:e=>iu.decorations.from(e)}),[dx,hx,fx]),gx=sm.autocompletion()[0],$x=iu.domEventHandlers({keydown:(e,t)=>{var i;let n=t.state.selection.main;if(!n.empty)return!1;if(!e.repeat)return!1;if("Backspace"===e.key&&0===t.state.doc.length)return!0;if("Delete"===e.key&&0===t.state.doc.length)return!0;let r=(null===(i=t.state.field(gx,!1))||void 0===i?void 0:i.open)??!1;return"ArrowUp"!==e.key||r?"ArrowDown"!==e.key||r?"ArrowLeft"===e.key&&e.repeat?!!t.moveByChar(n,!1).eq(n):"ArrowRight"===e.key?!!t.moveByChar(n,!0).eq(n):void 0:!!t.moveVertically(t.state.selection.main,!0).eq(n):!!t.moveVertically(t.state.selection.main,!1).eq(n)}}),bx=({focus_on_neighbor:e})=>(({focus_on_neighbor:e})=>cu.of([{key:"PageUp",run:()=>(e({cell_delta:-1,line:0,character:0}),!0)},{key:"PageDown",run:()=>(e({cell_delta:1,line:0,character:0}),!0)},{key:"ArrowLeft",run:t=>{let i=t.state.selection.main;return!!i.empty&&!!t.moveByChar(i,!1).eq(i)&&(e({cell_delta:-1,line:1/0,character:1/0}),!0)}},{key:"ArrowUp",run:t=>{let i=t.state.selection.main;return!!i.empty&&!!t.moveVertically(i,!1).eq(i)&&(e({cell_delta:-1,line:1/0,character:1/0}),!0)}},{key:"ArrowRight",run:t=>{let i=t.state.selection.main;return!!i.empty&&!!t.moveByChar(i,!0).eq(i)&&(e({cell_delta:1,line:0,character:0}),!0)}},{key:"ArrowDown",run:t=>{let i=t.state.selection.main;return!!i.empty&&!!t.moveVertically(i,!0).eq(i)&&(e({cell_delta:1,line:0,character:0}),!0)}}]))({focus_on_neighbor:e}),Qx=({pluto_actions:e,cell_id:t})=>iu.domEventHandlers({paste:(i,n)=>{if(!n.hasFocus)return console.log("CodeMirror, why are you registring this paste? You aren't focused!"),!0;i.stopPropagation();const r=i.clipboardData.getData("text/plain"),o=Ii(r);return null!=o&&(0===n.state.selection.main.from&&n.state.selection.main.to===n.state.doc.length?(e.add_deserialized_cells(r,t,o),e.confirm_delete_multiple("This Should Never Be Visible",[t]),!0):(n.state.selection.main.to===n.state.doc.length||0===n.state.selection.main.from)&&(e.add_deserialized_cells(r,t,o),!0))}});const yx=iu.baseTheme({".cm-matchingBracket":{backgroundColor:"#328c8252"},".cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),_x="()[]{}",Px=Nn.define({combine:e=>Pr(e,{afterCursor:!0,brackets:_x,maxScanDistance:1e4})}),wx=Sl.mark({class:"cm-matchingBracket"}),vx=(Sl.mark({class:"cm-nonmatchingBracket"}),[zn.define({create:()=>Sl.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let i=[],n=t.state.facet(Px);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=xx(t.state,e.head,-1,n)||e.head>0&&xx(t.state,e.head-1,1,n)||n.afterCursor&&(xx(t.state,e.head,1,n)||e.headiu.decorations.from(e)}),yx]);function Xx(e={}){return[Px.of(e),vx]}function xx(e,t,i,n={}){let r=n.maxScanDistance||1e4,o=n.brackets||_x,s=dh(e),a=s.resolveInner(t,i),l=function(e){var t;if("end"===e.name&&(e="IfStatement"===e.parent.name?null===(i=e.parent)||void 0===i||null===(t=i.firstChild)||void 0===t?void 0:t.firstChild:e.parent.firstChild),null==e)return[];if("mutable"===e.name||"struct"===e.name){"struct"===e.name&&(e=e.parent.firstChild);let t=e.parent.getChild("struct"),i=e.parent.lastChild;return"end"===i.name&&t?[{from:e.from,to:t.to},{from:i.from,to:i.to}]:null}if("struct"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("quote"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("begin"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("do"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("for"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("let"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("macro"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("function"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("while"===e.name){let t=e.parent.lastChild;return"end"===t.name?[{from:e.from,to:e.to},{from:t.from,to:t.to}]:null}if("type"===e.name&&(e=e.parent.firstChild),"abstract"===e.name||"primitive"===e.name){let t=e.parent.lastChild,i="end"===t.name,n=e.parent.getChild("type");return i&&n?[{from:e.from,to:n.to},{from:t.from,to:t.to}]:null}if("try"===e.name||"catch"===e.name||"finally"===e.name){var i,n;"catch"===e.name&&(e=e.parent),"finally"===e.name&&(e=e.parent);let t=e.parent.firstChild,r=e.parent.lastChild;if("end"!==r.name)return null;let o=null===(i=e.parent.getChild("CatchClause"))||void 0===i?void 0:i.firstChild,s=null===(n=e.parent.getChild("FinallyClause"))||void 0===n?void 0:n.firstChild;return[{from:t.from,to:t.to},o&&{from:o.from,to:o.to},s&&{from:s.from,to:s.to},{from:r.from,to:r.to}].filter((e=>null!=e))}if("if"===e.name||"else"===e.name||"elseif"===e.name){"if"===e.name&&(e=e.parent),"else"===e.name&&(e=e.parent),"elseif"===e.name&&(e=e.parent.parent);let t=e.parent.firstChild,i=e.parent.lastChild;if("end"!==i.name)return null;let n=[];n.push({from:t.from,to:t.to});for(let t of e.parent.getChildren("ElseifClause")){let e=t.firstChild;n.push({from:e.from,to:e.to})}for(let t of e.parent.getChildren("ElseClause")){let e=t.firstChild;n.push({from:e.from,to:e.to})}return n.push({from:i.from,to:i.to}),n}return null}(a);return l||function(e,t,i,n,r,o,s){let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=i>0)return null;let O={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=o;){let o=c.value;i<0&&(e+=o.length);let a=t+e*i;for(let e=i>0?0:o.length-1,t=i>0?o.length:-1;e!=t;e+=i){let t=s.indexOf(o[e]);if(!(t<0||n.resolve(a+e,1).type!=r))if(t%2==0==i>0)u++;else{if(1==u)return t>>1==l>>1?[O,{from:a+e,to:a+e+1}]:null;u--}}i>0&&(e+=o.length)}return c.done?[O]:null}(e,t,i,s,a.type,r,o)}const Sx=Sl.line({attributes:{class:"cm-highlighted-line"}}),kx=Sl.mark({attributes:{class:"cm-highlighted-range"}});const Tx=Nn.define({combine:e=>e[0],compare:(e,t)=>e===t}),Rx=Nn.define({combine:e=>e[0],compare:(e,t)=>e===t}),Wx=()=>eO.fromClass(class{updateDecos(e){this.decorations=function(e){let t=e.state.facet(Tx);if(null==t||null==t||t<0||t>e.state.doc.lines)return Sl.set([]);let i=e.state.doc.line(t);return Sl.set([Sx.range(i.from,i.from)])}(e)}constructor(e){this.decorations=Sl.set([]),this.updateDecos(e)}update(e){(e.docChanged||e.state.facet(Tx)!==e.startState.facet(Tx))&&this.updateDecos(e.view)}},{decorations:e=>e.decorations}),Ax=()=>eO.fromClass(class{updateDecos(e){this.decorations=function(e){let t=e.state.facet(Rx);if(null==t)return Sl.set([]);let{from:i,to:n}=t;return i<0||i==n?Sl.set([]):Sl.set([kx.range(i,n)])}(e)}constructor(e){this.decorations=Sl.set([]),this.updateDecos(e)}update(e){(e.docChanged||e.state.facet(Rx)!==e.startState.facet(Rx))&&this.updateDecos(e.view)}},{decorations:e=>e.decorations});function Nx(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let r=e(t,i.selection.ranges,i);return!!r&&(n(i.update(r)),!0)}}const Cx=Nx(Zx,0),qx=(Nx(Zx,1),Nx(Zx,2),Nx(Yx,0)),Ex=(Nx(Yx,1),Nx(Yx,2),[{key:"Mod-/",run:e=>{let t=Vx(e.state);return t.line?Cx(e):!!t.block&&qx(e)}},{key:"Alt-A",run:qx}]);function Vx(e,t=e.selection.main.head){let i=e.languageDataAt("commentTokens",t);return i.length?i[0]:{}}function Yx(e,t,i){let n=t.map((e=>Vx(i,e.from).block));if(!n.every((e=>e)))return null;let r=t.map(((e,t)=>function(e,{open:t,close:i},n,r){let o,s,a=e.sliceDoc(n-50,n),l=e.sliceDoc(r,r+50),O=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-O;if(a.slice(u-t.length,u)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-O,margin:O&&1},close:{pos:r+c,margin:c&&1}};r-n<=100?o=s=e.sliceDoc(n,r):(o=e.sliceDoc(n,n+50),s=e.sliceDoc(r-50,r));let d=/^\s*/.exec(o)[0].length,h=/\s*$/.exec(s)[0].length,f=s.length-h-i.length;return o.slice(d,d+t.length)==t&&s.slice(f,f+i.length)==i?{open:{pos:n+d+t.length,margin:/\s/.test(o.charAt(d+t.length))?1:0},close:{pos:r-h-i.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(i,n[t],e.from,e.to)));if(2!=e&&!r.every((e=>e))){let e=0;return i.changeByRange((t=>{let{open:i,close:o}=n[e++];if(r[e])return{range:t};let s=i.length+1;return{changes:[{from:t.from,insert:i+" "},{from:t.to,insert:" "+o}],range:Rn.range(t.anchor+s,t.head+s)}}))}if(1!=e&&r.some((e=>e))){let e=[];for(let t,i=0;ir&&(e==o||o>a.from)){r=a.from;let e=s??Vx(i,t).line;if(!e)continue;let o=/^\s*/.exec(a.text)[0].length,O=o==a.length,c=a.text.slice(o,o+e.length)==e?o:-1;oe.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:i,indent:r,empty:o,single:s}of n)!s&&o||e.push({from:t.from+r,insert:i+" "});let t=i.changes(e);return{changes:t,selection:i.selection.map(t,1)}}if(1!=e&&n.some((e=>e.comment>=0))){let e=[];for(let{line:t,comment:i,token:r}of n)if(i>=0){let n=t.from+i,o=n+r.length;" "==t.text[o-t.from]&&o++,e.push({from:n,to:o})}return{changes:e}}return null}let zx={key:"Mod-d",run:({state:e,dispatch:t})=>{if(e.selection.main.empty){var i,n;let r=["Identifier","FieldName"],o=dh(e).cursorAt(e.selection.main.from,-1),s=dh(e).cursorAt(e.selection.main.from,1);for(let e of r){let i=o.name===e?o:s.name===e?s:null;if(i)return t({selection:{anchor:i.from,head:i.to}}),!0}let a=e.doc.lineAt(e.selection.main.from),l=e.selection.main.from-a.from,O=a.text.slice(0,l),c=a.text.slice(l),u=(null===(i=O.match(/(\w+)$/))||void 0===i?void 0:i[0])??"",d=(null===(n=c.match(/^(\w+)/))||void 0===n?void 0:n[0])??"";t({selection:{anchor:e.selection.main.from-u.length,head:e.selection.main.from+d.length}})}else c$({state:e,dispatch:t});return!1},shift:({state:e,dispatch:t})=>{if(1===e.selection.ranges.length)return!1;let i=e.selection.ranges.at(e.selection.mainIndex-1),n=e.selection.ranges.filter((e=>e!==i)),r=n.indexOf(e.selection.main),o=(s=n,a=e.selection.mainIndex-1,s.slice(a,a+1)[0]);var s,a;return t({selection:Rn.create(n,r),effects:null==o?[]:iu.scrollIntoView(o.from)}),!0},preventDefault:!0};const Mx="true"===window.localStorage.getItem("ENABLE_CM_MIXED_PARSER");Mx&&console.log("YOU ENABLED THE CODEMIRROR MIXED LANGUAGE PARSER\nThanks! Awesome!\nPlease let us know if you find any bugs...\nIf enough people do this, we can make it the default parser.\n"),window.PLUTO_TOGGLE_CM_MIXED_PARSER=()=>{window.localStorage.setItem("ENABLE_CM_MIXED_PARSER",String(!Mx)),window.location.reload()};const Ix=sf.define([{tag:rh.propertyName,color:"var(--cm-property-color)"},{tag:rh.unit,color:"var(--cm-tag-color)"},{tag:rh.literal,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.macroName,color:"var(--cm-macro-color)",fontWeight:700},{tag:rh.special(rh.brace),color:"var(--cm-macro-color)",fontWeight:700},{tag:rh.standard(rh.variableName),color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.bool,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic"},{tag:rh.atom,color:"var(--cm-atom-color)"},{tag:rh.number,color:"var(--cm-number-color)"},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.string,color:"var(--cm-string-color)"},{tag:rh.variableName,color:"var(--cm-var-color)",fontWeight:700},{tag:rh.typeName,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.typeOperator,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.bracket,color:"var(--cm-bracket-color)"},{tag:rh.brace,color:"var(--cm-bracket-color)"},{tag:rh.tagName,color:"var(--cm-tag-color)"},{tag:rh.link,color:"var(--cm-link-color)"},{tag:rh.invalid,color:"var(--cm-error-color)",background:"var(--cm-error-bg-color)"}],{all:{color:"var(--cm-editor-text-color)"},scope:fm().language}),Ux=sf.define([{tag:rh.propertyName,color:"var(--cm-property-color)"},{tag:rh.unit,color:"var(--cm-tag-color)"},{tag:rh.literal,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.macroName,color:"var(--cm-macro-color)",fontWeight:700},{tag:rh.standard(rh.variableName),color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.bool,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.atom,color:"var(--cm-atom-color)"},{tag:rh.number,color:"var(--cm-number-color)"},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.string,color:"var(--cm-string-color)"},{tag:rh.variableName,color:"var(--cm-var-color)",fontWeight:700},{tag:rh.typeName,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.typeOperator,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.bracket,color:"var(--cm-bracket-color)"},{tag:rh.brace,color:"var(--cm-bracket-color)"},{tag:rh.tagName,color:"var(--cm-tag-color)"},{tag:rh.link,color:"var(--cm-link-color)"},{tag:rh.invalid,color:"var(--cm-error-color)",background:"var(--cm-error-bg-color)"},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic",filter:"none"}],{scope:Ay,all:{color:"var(--cm-editor-text-color)",filter:"contrast(0.5)"}}),jx=sf.define([{tag:rh.propertyName,color:"var(--cm-property-color)"},{tag:rh.unit,color:"var(--cm-tag-color)"},{tag:rh.literal,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.macroName,color:"var(--cm-macro-color)",fontWeight:700},{tag:rh.standard(rh.variableName),color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.bool,color:"var(--cm-builtin-color)",fontWeight:700},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic"},{tag:rh.atom,color:"var(--cm-atom-color)"},{tag:rh.number,color:"var(--cm-number-color)"},{tag:rh.keyword,color:"var(--cm-keyword-color)"},{tag:rh.string,color:"var(--cm-string-color)"},{tag:rh.variableName,color:"var(--cm-var-color)",fontWeight:700},{tag:rh.typeName,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.typeOperator,color:"var(--cm-type-color)",fontStyle:"italic"},{tag:rh.bracket,color:"var(--cm-bracket-color)"},{tag:rh.brace,color:"var(--cm-bracket-color)"},{tag:rh.tagName,color:"var(--cm-tag-color)"},{tag:rh.link,color:"var(--cm-link-color)"},{tag:rh.invalid,color:"var(--cm-error-color)",background:"var(--cm-error-bg-color)"}],{scope:NP,all:{color:"var(--cm-editor-text-color)",filter:"contrast(0.5)"}}),Dx=sf.define([{tag:rh.propertyName,color:"var(--cm-css-accent-color)",fontWeight:700},{tag:rh.variableName,color:"var(--cm-css-accent-color)",fontWeight:700},{tag:rh.definitionOperator,color:"var(--cm-css-color)"},{tag:rh.keyword,color:"var(--cm-css-color)"},{tag:rh.modifier,color:"var(--cm-css-accent-color)"},{tag:rh.punctuation,opacity:.5},{tag:rh.literal,color:"var(--cm-css-color)"},{tag:rh.tagName,color:"var(--cm-css-color)",fontWeight:700},{tag:rh.className,color:"var(--cm-css-why-doesnt-codemirror-highlight-all-the-text-aaa)"},{tag:rh.constant(rh.className),color:"var(--cm-css-why-doesnt-codemirror-highlight-all-the-text-aaa)"},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic"}],{scope:cy,all:{color:"var(--cm-css-color)"}}),Gx=sf.define([{tag:rh.tagName,color:"var(--cm-html-accent-color)",fontWeight:600},{tag:rh.attributeName,color:"var(--cm-html-accent-color)",fontWeight:600},{tag:rh.attributeValue,color:"var(--cm-html-accent-color)"},{tag:rh.angleBracket,color:"var(--cm-html-accent-color)",fontWeight:600,opacity:.7},{tag:rh.content,color:"var(--cm-html-color)",fontWeight:400},{tag:rh.documentMeta,color:"var(--cm-html-accent-color)"},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic"}],{scope:u_,all:{color:"var(--cm-html-color)"}}),Lx=sf.define([{tag:rh.content,color:"var(--cm-md-color)"},{tag:rh.quote,color:"var(--cm-md-color)"},{tag:rh.link,textDecoration:"underline"},{tag:rh.url,color:"var(--cm-md-color)",textDecoration:"none"},{tag:rh.emphasis,fontStyle:"italic"},{tag:rh.strong,fontWeight:"bolder"},{tag:rh.heading,color:"var(--cm-md-color)",fontWeight:700},{tag:rh.comment,color:"var(--cm-comment-color)",fontStyle:"italic"},{tag:rh.processingInstruction,color:"var(--cm-md-accent-color) !important",opacity:"0.5"},{tag:rh.monospace,color:"var(--cm-md-accent-color)"}],{scope:P_,all:{color:"var(--cm-md-color)"}}),Bx=e=>e.state.doc.toString(),Kx=(e,t)=>e.dispatch({changes:{from:0,to:e.state.doc.length,insert:t}}),Fx=(e,t,i,n)=>e.dispatch({changes:{from:i,to:n,insert:t}});let Hx=(e,t)=>{let i=le(new Bn),n=le(i.current.of(t));return ae((()=>{var n,r;null===(n=e.current)||void 0===n||null===(r=n.dispatch)||void 0===r||r.call(n,{effects:i.current.reconfigure(t)})}),[t]),n.current},Jx=(e,{line:t,ch:i})=>{let n=e.line(xt.clamp(t+1,1,e.lines)),r=xt.clamp(i,0,n.length);return n.from+r};const eS=({local_code:e,remote_code:t,disable_input:i,focus_after_creation:n,cm_forced_focus:r,set_cm_forced_focus:o,show_input:s,on_submit:a,on_delete:l,on_add_after:O,on_change:c,on_update_doc_query:u,on_focus_neighbor:d,on_line_heights:h,nbpkg:f,cell_id:p,notebook_id:m,any_logs:g,show_logs:$,set_show_logs:b,set_cell_disabled:Q,cm_highlighted_line:y,cm_highlighted_range:_,metadata:P,global_definition_locations:w,cm_diagnostics:v})=>{let X=ue($w);const{disabled:x,skip_as_script:S}=P;let[k,T]=oe(null);if(k){const e=k;throw T(null),e}const R=le(m);R.current=m;const W=le(null),A=le(null),N=le(null);let C=Hx(W,Ox.of(f)),q=Hx(W,Zv.of(w)),E=Hx(W,Tx.of(y)),V=Hx(W,Rx.of(_)),Y=Hx(W,_r.readOnly.of(i)),Z=Hx(W,Oe((()=>iu.updateListener.of((e=>{e.docChanged&&c(e.state.doc.toString())}))),[c]));return ae((()=>{if(null==A.current)return;const t=e=>((async e=>{await e()})((async()=>{await O();e.state.doc.toString()!==N.current&&a()})),!0);let i=sm.completionKeymap.find((e=>"Enter"===e.key));const r=()=>{const e=W.current,t=Bx(e),i=t.trim(),n=t.length-t.trimStart().length;if(console.table({value:t,trimmed:i,offset:n}),i.startsWith('md"')&&i.endsWith('"')){let t,r;if(i.startsWith('md"""')&&i.endsWith('"""')?(t=5,r=i.length-3):(t=3,r=i.length-1),t>=r||""==i.substring(t,r).trim())Kx(e,"");else{for(;/\s/.test(i[t]);)++t;for(;/\s/.test(i[r-1]);)--r;Fx(e,"",r+n,e.state.doc.length),Fx(e,"",0,t+n)}}else{let t='md"""\n',i='\n"""',n=e.state.selection.main;e.dispatch({changes:[{from:0,to:0,insert:t},{from:e.state.doc.length,to:e.state.doc.length,insert:i}],selection:0===n.from?{anchor:n.from+t.length,head:n.to+t.length}:void 0})}return!0},s=e=>!e.state.facet(_r.readOnly)&&(0===e.state.doc.length&&(d(p,1),l(),!0)),c=e=>!e.state.facet(_r.readOnly)&&(0===e.state.doc.length&&(d(p,-1,1/0,1/0),l(),!0)),f=[{key:"Shift-Enter",run:()=>(a(),!0)},{key:"Ctrl-Enter",mac:"Cmd-Enter",run:t},{key:"Ctrl-Enter",run:t},{key:"Tab",run:e=>{var t;if(e.state.readOnly)return!1;if(null==i||null===(t=i.run)||void 0===t?void 0:t.call(i,e))return!0;let n=e.state.selection.main;return n.empty?(e.dispatch({changes:{from:n.from,to:n.to,insert:"\t"},selection:Rn.cursor(n.from+1)}),!0):Vg(e)},shift:Yg},{key:"Ctrl-m",mac:"Cmd-m",run:r},{key:"Ctrl-m",run:r},{key:"Ctrl-M",run:r},{key:"Delete",run:s},{key:"Ctrl-Delete",run:s},{key:"Backspace",run:c},{key:"Ctrl-Backspace",run:c},zx];let m=!1;const g=iu.updateListener.of((e=>{if(e.view.hasFocus&&(e.docChanged||e.selectionSet)){let t=e.state;try{let e=Ev(t,m);null!=e&&u(e)}finally{}}})),$=window.matchMedia("(prefers-color-scheme: dark)").matches,b=W.current=new iu({state:_r.create({doc:e,extensions:[iu.theme({},{dark:$}),C,E,V,q,Y,Wx(),Ax(),$x,cx({pluto_actions:X,notebook_id_ref:R}),Wv,cf(Ix),cf(Gx),cf(Lx),cf(Ux),cf(jx),cf(Dx),Rd(),Vu(),Xm(),wu(),_r.allowMultipleSelections.of(!0),iu.clickAddsSelectionRange.of((e=>e.altKey&&!e.shiftKey)),_r.transactionFilter.of((e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,r=i.lineAt(n);if(n>r.from+200)return e;let o=i.sliceString(r.from,n);if(!t.some((e=>e.test(o))))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let i=Sh(s,t.from);if(null==i)continue;let n=/^\s*/.exec(t.text)[0],r=xh(s,i);n!=r&&l.push({from:t.from,to:t.from+n.length,insert:r})}return l.length?[e,{changes:l,sequential:!0}]:e})),_r.languageData.of(((e,t,i)=>[{closeBrackets:{brackets:["(","[","{"]}}])),Mp(),Du({eventFilter:e=>e.altKey&&e.shiftKey&&0==e.button}),r$(),Xx(),g,iu.domEventHandlers({blur:(e,t)=>{document.activeElement===t.contentDOM||(setTimeout((()=>{t.dispatch({selection:{anchor:t.state.selection.main.head},scrollIntoView:!1}),t.contentDOM.blur()}),0),o(null))}}),Qx({pluto_actions:X,cell_id:p}),iu.updateListener.of((e=>{e.docChanged&&e.state.doc.length>0&&"?"===e.state.sliceDoc(0,1)&&ZX("docs")})),_r.tabSize.of(4),vh.of("\t"),...Mx?[Kv(),R_({defaultCodeLanguage:Kv()}),d_(),Yy(),new _h(NP,[NP.data.of({autocomplete:kP}),NP.data.of({autocomplete:WP})]),jv]:[fm()],zv,ox({request_autocomplete:async({text:e})=>{let t=await xi(X.send("complete",{query:e},{notebook_id:R.current}),5e3).catch(console.warn);if(!t)return null;let{message:i}=t;return{start:Di(e,i.start),stop:Di(e,i.stop),results:i.results}},on_update_doc_query:u}),cu.of(f),cu.of(Ex),bx({focus_on_neighbor:({cell_delta:e,line:t,character:i})=>d(p,e,t,i)}),cu.of([...Lp,...Mg,...Mm,...Jh]),Iu("Enter cell code..."),iu.lineWrapping,mx,iu.updateListener.of((e=>{e.docChanged&&e.view.dispatch(IP(e.state,[]))})),Z,iu.exceptionSink.of((e=>{T(e),console.error("EditorView exception!",e)}))]}),parent:A.current});b.dom.CodeMirror={getValue:()=>Bx(b),setValue:e=>Kx(b,e)},n&&setTimeout((()=>{let e=W.current;null!=e&&(e.dom.scrollIntoView({behavior:"smooth",block:"nearest"}),e.dispatch({selection:{anchor:e.state.doc.length,head:e.state.doc.length}}),e.focus())}));const Q=A.current.querySelector("div.cm-content");if(Q){const e=new ResizeObserver((()=>{const e=Q.children,t=xt.map(e,(e=>e.offsetTop)),i=[...t.slice(1).map(((e,i)=>e-t[i])),15];h(i)}));return e.observe(Q),()=>{e.unobserve(Q)}}}),[]),se((()=>{if(null==W.current)return;const e=W.current,t=v;e.dispatch(IP(e.state,t))}),[v]),se((()=>{if(null==W.current)return;const e=Bx(W.current)??"";null==N.current&&""===t&&""!==e||(N.current=t,e!==t&&Kx(W.current,t))}),[t]),se((()=>{const e=W.current;if(null!=e)if(null==r)e.dispatch({selection:{anchor:e.state.selection.main.head,head:e.state.selection.main.head}});else{let i={anchor:Jx(e.state.doc,r[0]),head:Jx(e.state.doc,r[1])};if(null===(t=r[2])||void 0===t?void 0:t.definition_of){var t;let n=e.state.field(Wv),o=null==n?void 0:n.definitions.get(null===(t=r[2])||void 0===t?void 0:t.definition_of);o&&(i={anchor:o.from,head:o.to})}e.dom.scrollIntoView({behavior:"smooth",block:"nearest"}),e.focus(),e.dispatch({scrollIntoView:!0,selection:i,effects:[iu.scrollIntoView(Rn.range(i.anchor,i.head),{yMargin:80})]})}}),[r]),we` + + <${tS} + on_delete=${l} + cell_id=${p} + run_cell=${a} + skip_as_script=${S} + running_disabled=${x} + any_logs=${g} + show_logs=${$} + set_show_logs=${b} + set_cell_disabled=${Q} + /> + + `},tS=({on_delete:e,cell_id:t,run_cell:i,skip_as_script:n,running_disabled:r,any_logs:o,show_logs:s,set_show_logs:a,set_cell_disabled:l})=>{const O=le(null);let c=ue($w);const[u,d]=oe(!1);return we` `},iS=({frame:e,cell_id:t})=>{const i=e.file.indexOf("#==#");if(-1!=i){const n=e.file.substr(i+4,36),r=we`{window.dispatchEvent(new CustomEvent("cell_focus",{detail:{cell_id:n,line:e.line-1}})),t.preventDefault()}} + > + ${n==t?"Local":"Other"}: ${e.line} + `;return we`${r}`}return we`${e.file}:${e.line}`},nS=({frame:e})=>{const t=e.call.indexOf("(");return-1!=t?we`${e.call.substr(0,t)}${e.call.substr(t)}`:we`${e.call}`},rS=e=>e.flatMap(((t,i)=>i===e.length-1?[t]:i===e.length-2?[t," and "]:[t,", "])),oS=({cell_id:e,diagnostics:t})=>(se((()=>(window.dispatchEvent(new CustomEvent("cell_diagnostics",{detail:{cell_id:e,diagnostics:t}})),()=>window.dispatchEvent(new CustomEvent("cell_diagnostics",{detail:{cell_id:e,diagnostics:[]}})))),[t]),we` + +

Syntax error

+
+
    + ${t.map((({message:t,from:i,to:n,line:r})=>we`
  1. window.dispatchEvent(new CustomEvent("cell_highlight_range",{detail:{cell_id:e,from:i,to:n}}))} + onmouseleave=${()=>window.dispatchEvent(new CustomEvent("cell_highlight_range",{detail:{cell_id:e,from:null,to:null}}))} + > + ${t}@ + <${iS} frame=${{file:"#==#"+e,line:r}} cell_id=${e} /> +
  2. `))} +
+
+
+ `),sS=({msg:e,stacktrace:t,cell_id:i})=>{var n;let r=ue($w);const o={pattern:/.?/,display:e=>e.split("\n").map((e=>we`

${e}

`))},s=[{pattern:/syntax: extra token after end of expression/,display:e=>{const t=we`{e.preventDefault(),r.wrap_remote_cell(i,"begin")}} + >Wrap all code in a begin ... end block.`;if(e.includes("\n\nBoundaries: ")){const n=JSON.parse(e.split("\n\nBoundaries: ")[1]).map((e=>e-1)),o=we`

+ {e.preventDefault(),r.split_remote_cell(i,n,!0)}} + >Split this cell into ${n.length} cells, or +

`;return we`

Multiple expressions in one cell.

+

How would you like to fix it?

+
    +
  • ${o}
  • +
  • ${t}
  • +
`}return we`

Multiple expressions in one cell.

+

${t}

`}},{pattern:/LoadError: cannot assign a value to variable workspace#\d+\..+ from module workspace#\d+/,display:()=>we`

Tried to reevaluate an include call, this is not supported. You might need to restart this notebook from the main menu.

+

+ For a workaround, use the alternative version of include described here: + GH issue 115 +

+

In the future, include will be deprecated, and this will be the default.

`},{pattern:/MethodError: no method matching .*\nClosest candidates are:/,display:e=>e.split("\n").map((e=>we`

${e}

`))},{pattern:/Cyclic references among (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Cyclic references among (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>we`${e}`));return we`

Cyclic references among${" "}${rS(e)}.

`}return we`

${e}

`}))},{pattern:/Multiple definitions for (.*)\./,display:e=>e.split("\n").map((e=>{const t=e.match(/Multiple definitions for (.*)\./);if(t){let e=t[1].split(/, | and /).map((e=>we`{const n=document.querySelector(`pluto-cell:not([id='${i}']) span[id='${encodeURI(e)}']`);t.preventDefault(),null==n||n.scrollIntoView()}}>${e}`));return we`

Multiple definitions for${" "}${rS(e)}.

`}return we`

${e}

`}))},{pattern:/^syntax: (.*)$/,display:o.display,show_stacktrace:()=>!1},{pattern:/^UndefVarError: (.*) not defined\.?$/,display:e=>{const t=r.get_notebook(),n=aS(t,i),o=e.match(/UndefVarError: (.*) not defined/);let s=(null==o?void 0:o[1])??"";const a=Object.values((null==t?void 0:t.cell_dependencies)??{}).some((e=>Object.keys(e.downstream_cells_map).includes(s)));if(0===Object.keys(n).length||!a)return we`

${e}

`;const l=Object.keys(n).map((e=>we`{t.preventDefault();const i=document.querySelector(`pluto-cell[id='${n[e]}']`);null==i||i.scrollIntoView()}}>${e}`));return we`

Another cell defining ${rS(l)} contains errors.

`},show_stacktrace:()=>{const e=aS(r.get_notebook(),i);return 0===Object.keys(e).length}},o],a=s.find((({pattern:t})=>t.test(e)))??o;return we` +
${a.display(e)}
+ ${0!=t.length&&((null===(n=a.show_stacktrace)||void 0===n?void 0:n.call(a))??1)?we`
+
    + ${t.map((e=>we`
  1. + <${nS} frame=${e} /> + @ + <${iS} frame=${e} cell_id=${i} /> + ${e.inlined?we`[inlined]`:null} +
  2. `))} +
+
`:null} +
`},aS=(e,t,i=[])=>{var n;let r={};if(null!=e&&(null==e||null===(o=e.cell_results)||void 0===o||null===(n=o[t])||void 0===n?void 0:n.errored)){var o;Object.keys(null===(o=e.cell_dependencies[t])||void 0===o?void 0:o.upstream_cells_map).forEach((n=>{if(!i.includes(n)){var o;i.push(n);(null===(o=e.cell_dependencies[t])||void 0===o?void 0:o.upstream_cells_map[n]).forEach((o=>{let s=aS(e,o,i)??{};r={...r,...s},0===Object.keys(s).length&&e.cell_results[o].errored&&o!==t&&(r[n]=o)}))}}))}return r},lS=({mime:e,body:t,cell_id:i,persist_js_state:n})=>{switch(e){case"image/png":case"image/jpg":case"image/jpeg":case"image/gif":case"image/bmp":case"image/svg+xml":return we`<${mT} mime=${e} body=${t} />`;case"text/plain":return we`
${t}
`;case"application/vnd.pluto.tree+object":return we`<${dS} cell_id=${i} body=${t} persist_js_state=${n} />`;default:return gT({mime:e,body:t,cell_id:i,persist_js_state:n,last_run_timestamp:null})}},OS=({on_click_more:e})=>{const[t,i]=oe(!1);return we`{t||!1!==e()&&i(!0)}} + >more`},cS=({prefix:e,prefix_short:t})=>we`${e}${t}`,uS=({pluto_actions:e,cell_id:t,node_ref:i,objectid:n,dim:r})=>{(e??i.current.closest("pluto-cell")._internal_pluto_actions).reshow_cell(t??i.current.closest("pluto-cell").id,n,r)},dS=({mime:e,body:t,cell_id:i,persist_js_state:n})=>{let r=ue($w);const o=le(null),s=e=>we`<${lS} cell_id=${i} mime=${e[1]} body=${e[0]} persist_js_state=${n} />`,a=we`<${OS} on_click_more=${()=>{if(null==o.current||null!=o.current.closest("pluto-tree.collapsed"))return!1;uS({pluto_actions:r,cell_id:i,node_ref:o,objectid:t.objectid,dim:1})}} />`;let l=null;switch(t.type){case"Pair":const e=t.key_value;return we`${s(e[0])}${s(e[1])}`;case"circular":return we`circular reference`;case"Array":case"Set":case"Tuple":l=we`${cS(t)}${t.elements.map((e=>"more"===e?a:we`${"Set"===t.type?"":we`${e[0]}`}${s(e[1])}`))}`;break;case"Dict":l=we`${cS(t)}${t.elements.map((e=>"more"===e?a:we`${s(e[0])}${s(e[1])}`))}`;break;case"NamedTuple":l=we`${cS(t)}${t.elements.map((e=>"more"===e?a:we`${e[0]}${s(e[1])}`))}`;break;case"struct":l=we`${cS(t)}${t.elements.map((e=>we`${e[0]}${s(e[1])}`))}`}return we``},hS=({colspan:e=999})=>we` + + +
(This table has no columns)
+ + +`,fS=({colspan:e=999})=>we` + +
+
+ (This table has no rows) +
+ +`,pS=({mime:e,body:t,cell_id:i,persist_js_state:n})=>{var r,o,s,a,l;let O=ue($w);const c=le(null),u=e=>we`<${OS} + on_click_more=${()=>{uS({pluto_actions:O,cell_id:i,node_ref:c,objectid:t.objectid,dim:e})}} + />`,d=3+((null==t||null===(r=t.schema)||void 0===r||null===(o=r.names)||void 0===o?void 0:o.length)??1),h=0===((null==t||null===(s=t.schema)||void 0===s||null===(a=s.names)||void 0===a?void 0:a.length)??0)?we`<${hS} colspan=${d} />`:we` + + ${["",...t.schema.names].map((e=>we`${"more"===e?u(2):e}`))} + + + ${["",...t.schema.types].map((e=>we`${"more"===e?null:e}`))} + + `,f=we` + ${0!==((null===(l=t.rows)||void 0===l?void 0:l.length)??0)?t.rows.map((e=>we` + ${"more"===e?we`${u(1)}`:we`${e[0]} + ${e[1].map((e=>{return we`${"more"===e?null:(t=e,we`<${lS} cell_id=${i} mime=${t[1]} body=${t[0]} persist_js_state=${n} />`)}`;var t}))}`} + `)):we`<${fS} colspan=${d} />`} + `;return we` + ${h}${f} +
`};function mS(e){if(!(e instanceof HTMLInputElement))return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,(e=>e.value)):e.value;switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":var t;return e.multiple?e.files:null===(t=e.files)||void 0===t?void 0:t[0];default:return e.value}}function gS(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}const $S=(e,t)=>{if(!(e instanceof HTMLInputElement&&"file"===e.type))if(null!=t){if(e instanceof HTMLInputElement)switch(e.type){case"range":case"number":return void(e.valueAsNumber!==t&&(e.valueAsNumber=t));case"date":return void(null!=e.valueAsDate&&Number(e.valueAsDate)===Number(t)||(e.valueAsDate=t));case"checkbox":return void(e.checked!==t&&(e.checked=t));case"file":return}else if(e instanceof HTMLSelectElement&&e.multiple){for(let i of Array.from(e.options))i.selected=t.includes(i.value);return}e.value!==t&&(e.value=t)}else e.value=t},bS=(e,t)=>{e.forEach((e=>{let i=e.getAttribute("def");if(null!=i&&null!=e.firstElementChild&&null!=t[i]){let n=t[i].value;try{$S(e.firstElementChild,n)}catch(t){console.error("Error while setting input value",e.firstElementChild,"to value",n,": ",t)}}}))},QS=(e,t,i,n)=>{let r=!1;n.then((()=>{r=!0})),e.forEach((async e=>{const n=e.getAttribute("def"),o=e.firstElementChild;if(null!=n&&null!=o){var s;const e=mS(o);const a=Object.keys(i).includes(n)&&xt.isEqual(null===(s=i[n])||void 0===s?void 0:s.value,e)?null:t(n,e).catch(console.error);let l=!1;for(let e of function(e){return kt.Generators.observe((function(t){var i=gS(e),n=mS(e);function r(){t(mS(e))}return e.addEventListener(i,r),void 0!==n&&t(n),function(){e.removeEventListener(i,r)}}))}(o)){if(r)break;if(!1===l){l=!0;continue}const i=await yS(await e);await a,await t(n,i).catch(console.error)}}}))},yS=async e=>e instanceof FileList?Promise.all(Array.from(e).map((e=>yS(e)))):e instanceof File?await new Promise((t=>{const i=new FileReader;i.onload=()=>t({name:e.name,type:e.type,data:new Uint8Array(i.result)}),i.onerror=()=>t({name:e.name,type:e.type,data:null}),i.readAsArrayBuffer(e)})):e;function _S(e){this.getChildContext=()=>e.context;const{context:t,children:i,...n}=e;return U(i,n)}function PS(){if(this.on_connect)this.on_connect();else{const e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e);const t=e.detail.context;this._vdom=Q(_S,{...this._props,context:t},SS(this,this._vdomComponent)),(this.hasAttribute("hydrate")?I:M)(this._vdom,this._root)}}function wS(e){return e.replace(/-(\w)/g,((e,t)=>t?t.toUpperCase():""))}function vS(e,t,i){if(!this._vdom)return;i=null==i?void 0:i;const n={};n[e]=i,n[wS(e)]=i,this._vdom=U(this._vdom,n),M(this._vdom,this._root)}function XS(){const e=setTimeout((()=>{M(this._vdom=null,this._root)}),500);this.on_connect=()=>clearTimeout(e)}function xS(e,t){return Q("slot",{...e,ref:e=>{e?(this.ref=e,this._listener||(this._listener=e=>{e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",this._listener))):this.ref.removeEventListener("_preact",this._listener)}})}function SS(e,t){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;let i=[],n={},r=0,o=e.attributes,s=e.childNodes;for(r=o.length;r--;)"slot"!==o[r].name&&(n[o[r].name]=o[r].value,n[wS(o[r].name)]=o[r].value);for(r=s.length;r--;){const e=SS(s[r],null),t=s[r].slot;t?n[t]=Q(xS,{name:t},e):i[r]=e}const a=t?Q(xS,null,i):i;return Q(t||e.nodeName.toLowerCase(),n,a)} +/*! + Highlight.js v11.4.0 (git: 2d0e7c1094) + (c) 2006-2022 Ivan Sagalaev and other contributors + License: BSD-3-Clause + */var kS={exports:{}};function TS(e){return e instanceof Map?e.clear=e.delete=e.set=()=>{throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{throw Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{var i=e[t];"object"!=typeof i||Object.isFrozen(i)||TS(i)})),e}kS.exports=TS,kS.exports.default=TS;var RS=kS.exports;class WS{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function AS(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function NS(e,...t){const i=Object.create(null);for(const t in e)i[t]=e[t];return t.forEach((e=>{for(const t in e)i[t]=e[t]})),i}const CS=e=>!!e.kind;class qS{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=AS(e)}openNode(e){if(!CS(e))return;let t=e.kind;t=e.sublanguage?"language-"+t:((e,{prefix:t})=>{if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(t,{prefix:this.classPrefix}),this.span(t)}closeNode(e){CS(e)&&(this.buffer+="")}value(){return this.buffer}span(e){this.buffer+=``}}class ES{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ES._collapse(e)})))}}class VS extends ES{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const i=e.root;i.kind=t,i.sublanguage=!0,this.add(i)}toHTML(){return new qS(this,this.options).value()}finalize(){return!0}}function YS(e){return e?"string"==typeof e?e:e.source:null}function ZS(e){return IS("(?=",e,")")}function zS(e){return IS("(?:",e,")*")}function MS(e){return IS("(?:",e,")?")}function IS(...e){return e.map((e=>YS(e))).join("")}function US(...e){const t=(e=>{const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}})(e);return"("+(t.capture?"":"?:")+e.map((e=>YS(e))).join("|")+")"}function jS(e){return RegExp(e.toString()+"|").exec("").length-1}const DS=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function GS(e,{joinWith:t}){let i=0;return e.map((e=>{i+=1;const t=i;let n=YS(e),r="";for(;n.length>0;){const e=DS.exec(n);if(!e){r+=n;break}r+=n.substring(0,e.index),n=n.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0],"("===e[0]&&i++)}return r})).map((e=>`(${e})`)).join(t)}const LS="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",BS={begin:"\\\\[\\s\\S]",relevance:0},KS={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[BS]},FS={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[BS]},HS=(e,t,i={})=>{const n=NS({scope:"comment",begin:e,end:t,contains:[]},i);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=US("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:IS(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},JS=HS("//","$"),ek=HS("/\\*","\\*/"),tk=HS("#","$");var ik=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:LS,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=IS(t,/.*\b/,e.binary,/\b.*/)),NS({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:BS,APOS_STRING_MODE:KS,QUOTE_STRING_MODE:FS,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:HS,C_LINE_COMMENT_MODE:JS,C_BLOCK_COMMENT_MODE:ek,HASH_COMMENT_MODE:tk,NUMBER_MODE:{scope:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{scope:"number",begin:LS,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:"\\b(0b[01]+)",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[BS,{begin:/\[/,end:/\]/,relevance:0,contains:[BS]}]}]},TITLE_MODE:{scope:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{scope:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function nk(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function rk(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function ok(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=nk,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function sk(e,t){Array.isArray(e.illegal)&&(e.illegal=US(...e.illegal))}function ak(e,t){if(e.match){if(e.begin||e.end)throw Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function lk(e,t){void 0===e.relevance&&(e.relevance=1)}const Ok=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=i.keywords,e.begin=IS(i.beforeMatch,ZS(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},ck=["of","and","for","in","not","or","if","then","parent","list","value"];function uk(e,t,i="keyword"){const n=Object.create(null);function r(e,i){t&&(i=i.map((e=>e.toLowerCase()))),i.forEach((t=>{const i=t.split("|");n[i[0]]=[e,dk(i[0],i[1])]}))}return"string"==typeof e?r(i,e.split(" ")):Array.isArray(e)?r(i,e):Object.keys(e).forEach((i=>{Object.assign(n,uk(e[i],t,i))})),n}function dk(e,t){return t?Number(t):(e=>ck.includes(e.toLowerCase()))(e)?0:1}const hk={},fk=e=>{console.error(e)},pk=(e,...t)=>{console.log("WARN: "+e,...t)},mk=(e,t)=>{hk[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),hk[`${e}/${t}`]=!0)},gk=Error();function $k(e,t,{key:i}){let n=0;const r=e[i],o={},s={};for(let e=1;e<=t.length;e++)s[e+n]=r[e],o[e+n]=!0,n+=jS(t[e-1]);e[i]=s,e[i]._emit=o,e[i]._multi=!0}function bk(e){(e=>{e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),(e=>{if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw fk("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),gk;if("object"!=typeof e.beginScope||null===e.beginScope)throw fk("beginScope must be object"),gk;$k(e,e.begin,{key:"beginScope"}),e.begin=GS(e.begin,{joinWith:""})}})(e),(e=>{if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw fk("skip, excludeEnd, returnEnd not compatible with endScope: {}"),gk;if("object"!=typeof e.endScope||null===e.endScope)throw fk("endScope must be object"),gk;$k(e,e.end,{key:"endScope"}),e.end=GS(e.end,{joinWith:""})}})(e)}function Qk(e){function t(t,i){return RegExp(YS(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(i?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=jS(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(GS(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const i=t.findIndex(((e,t)=>t>0&&void 0!==e)),n=this.matchIndexes[i];return t.splice(0,i),Object.assign(t,n)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new i;return this.rules.slice(e).forEach((([e,i])=>t.addRule(e,i))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let i=t.exec(e);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,i=t.exec(e)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=NS(e.classNameAliases||{}),function i(r,o){const s=r;if(r.isCompiled)return s;[rk,ak,bk,Ok].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[ok,sk,lk].forEach((e=>e(r,o))),r.isCompiled=!0;let a=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),a=r.keywords.$pattern,delete r.keywords.$pattern),a=a||/\w+/,r.keywords&&(r.keywords=uk(r.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=t(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=t(s.end)),s.terminatorEnd=YS(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>NS(e,{variants:null},t)))),e.cachedVariants?e.cachedVariants:yk(e)?NS(e,{starts:e.starts?NS(e.starts):null}):Object.isFrozen(e)?NS(e):e))("self"===e?r:e)))),r.contains.forEach((e=>{i(e,s)})),r.starts&&i(r.starts,o),s.matcher=(e=>{const t=new n;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(s),s}(e)}function yk(e){return!!e&&(e.endsWithParent||yk(e.starts))}class _k extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Pk=AS,wk=NS,vk=Symbol("nomatch");var Xk=(e=>{const t=Object.create(null),i=Object.create(null),n=[];let r=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:VS};function l(e){return a.noHighlightRe.test(e)}function O(e,t,i){let n="",r="";"object"==typeof t?(n=e,i=t.ignoreIllegals,r=t.language):(mk("10.7.0","highlight(lang, code, ...args) has been deprecated."),mk("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,n=t),void 0===i&&(i=!0);const o={code:n,language:r};$("before:highlight",o);const s=o.result?o.result:c(o.language,o.code,i);return s.code=o.code,$("after:highlight",s),s}function c(e,i,n,s){const l=Object.create(null);function O(){if(!w.keywords)return void X.addText(x);let e=0;w.keywordPatternRe.lastIndex=0;let t=w.keywordPatternRe.exec(x),i="";for(;t;){i+=x.substring(e,t.index);const r=y.case_insensitive?t[0].toLowerCase():t[0],o=(n=r,w.keywords[n]);if(o){const[e,n]=o;if(X.addText(i),i="",l[r]=(l[r]||0)+1,l[r]<=7&&(S+=n),e.startsWith("_"))i+=t[0];else{const i=y.classNameAliases[e]||e;X.addKeyword(t[0],i)}}else i+=t[0];e=w.keywordPatternRe.lastIndex,t=w.keywordPatternRe.exec(x)}var n;i+=x.substr(e),X.addText(i)}function d(){null!=w.subLanguage?(()=>{if(""===x)return;let e=null;if("string"==typeof w.subLanguage){if(!t[w.subLanguage])return void X.addText(x);e=c(w.subLanguage,x,!0,v[w.subLanguage]),v[w.subLanguage]=e._top}else e=u(x,w.subLanguage.length?w.subLanguage:null);w.relevance>0&&(S+=e.relevance),X.addSublanguage(e._emitter,e.language)})():O(),x=""}function h(e,t){let i=1;for(;void 0!==t[i];){if(!e._emit[i]){i++;continue}const n=y.classNameAliases[e[i]]||e[i],r=t[i];n?X.addKeyword(r,n):(x=r,O(),x=""),i++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&X.openNode(y.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(X.addKeyword(x,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),x=""):e.beginScope._multi&&(h(e.beginScope,t),x="")),w=Object.create(e,{parent:{value:w}}),w}function m(e,t,i){let n=((e,t)=>{const i=e&&e.exec(t);return i&&0===i.index})(e.endRe,i);if(n){if(e["on:end"]){const i=new WS(e);e["on:end"](t,i),i.isMatchIgnored&&(n=!1)}if(n){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,i)}function g(e){return 0===w.matcher.regexIndex?(x+=e[0],1):(R=!0,0)}function $(e){const t=e[0],n=i.substr(e.index),r=m(w,e,n);if(!r)return vk;const o=w;w.endScope&&w.endScope._wrap?(d(),X.addKeyword(t,w.endScope._wrap)):w.endScope&&w.endScope._multi?(d(),h(w.endScope,e)):o.skip?x+=t:(o.returnEnd||o.excludeEnd||(x+=t),d(),o.excludeEnd&&(x=t));do{w.scope&&X.closeNode(),w.skip||w.subLanguage||(S+=w.relevance),w=w.parent}while(w!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let b={};function Q(t,o){const s=o&&o[0];if(x+=t,null==s)return d(),0;if("begin"===b.type&&"end"===o.type&&b.index===o.index&&""===s){if(x+=i.slice(o.index,o.index+1),!r){const t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=b.rule,t}return 1}if(b=o,"begin"===o.type)return(e=>{const t=e[0],i=e.rule,n=new WS(i),r=[i.__beforeBegin,i["on:begin"]];for(const i of r)if(i&&(i(e,n),n.isMatchIgnored))return g(t);return i.skip?x+=t:(i.excludeBegin&&(x+=t),d(),i.returnBegin||i.excludeBegin||(x=t)),f(i,e),i.returnBegin?0:t.length})(o);if("illegal"===o.type&&!n){const e=Error('Illegal lexeme "'+s+'" for mode "'+(w.scope||"")+'"');throw e.mode=w,e}if("end"===o.type){const e=$(o);if(e!==vk)return e}if("illegal"===o.type&&""===s)return 1;if(T>1e5&&T>3*o.index)throw Error("potential infinite loop, way more iterations than matches");return x+=s,s.length}const y=p(e);if(!y)throw fk(o.replace("{}",e)),Error('Unknown language: "'+e+'"');const _=Qk(y);let P="",w=s||_;const v={},X=new a.__emitter(a);(()=>{const e=[];for(let t=w;t!==y;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>X.openNode(e)))})();let x="",S=0,k=0,T=0,R=!1;try{for(w.matcher.considerAll();;){T++,R?R=!1:w.matcher.considerAll(),w.matcher.lastIndex=k;const e=w.matcher.exec(i);if(!e)break;const t=Q(i.substring(k,e.index),e);k=e.index+t}return Q(i.substr(k)),X.closeAllNodes(),X.finalize(),P=X.toHTML(),{language:e,value:P,relevance:S,illegal:!1,_emitter:X,_top:w}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:Pk(i),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:k,context:i.slice(k-100,k+100),mode:t.mode,resultSoFar:P},_emitter:X};if(r)return{language:e,value:Pk(i),illegal:!1,relevance:0,errorRaised:t,_emitter:X,_top:w};throw t}}function u(e,i){i=i||a.languages||Object.keys(t);const n=(e=>{const t={value:Pk(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t})(e),r=i.filter(p).filter(g).map((t=>c(t,e,!1)));r.unshift(n);const o=r.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(p(e.language).supersetOf===t.language)return 1;if(p(t.language).supersetOf===e.language)return-1}return 0})),[l,O]=o,u=l;return u.secondBest=O,u}function d(e){let t=null;const n=(e=>{let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const i=a.languageDetectRe.exec(t);if(i){const t=p(i[1]);return t||(pk(o.replace("{}",i[1])),pk("Falling back to no-highlight mode for this block.",e)),t?i[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||p(e)))})(e);if(l(n))return;if($("before:highlightElement",{el:e,language:n}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML))throw new _k("One of your code blocks includes unescaped HTML.",e.innerHTML);t=e;const r=t.textContent,s=n?O(r,{language:n,ignoreIllegals:!0}):u(r);e.innerHTML=s.value,((e,t,n)=>{const r=t&&i[t]||n;e.classList.add("hljs"),e.classList.add("language-"+r)})(e,n,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),$("after:highlightElement",{el:e,result:s,text:r})}let h=!1;function f(){"loading"!==document.readyState?document.querySelectorAll(a.cssSelector).forEach(d):h=!0}function p(e){return e=(e||"").toLowerCase(),t[e]||t[i[e]]}function m(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{i[e.toLowerCase()]=t}))}function g(e){const t=p(e);return t&&!t.disableAutodetect}function $(e,t){const i=e;n.forEach((e=>{e[i]&&e[i](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{h&&f()}),!1),Object.assign(e,{highlight:O,highlightAuto:u,highlightAll:f,highlightElement:d,highlightBlock:e=>(mk("10.7.0","highlightBlock will be removed entirely in v12.0"),mk("10.7.0","Please use highlightElement now."),d(e)),configure:e=>{a=wk(a,e)},initHighlighting:()=>{f(),mk("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:()=>{f(),mk("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:(i,n)=>{let o=null;try{o=n(e)}catch(e){if(fk("Language definition for '{}' could not be registered.".replace("{}",i)),!r)throw e;fk(e),o=s}o.name||(o.name=i),t[i]=o,o.rawDefinition=n.bind(null,e),o.aliases&&m(o.aliases,{languageName:i})},unregisterLanguage:e=>{delete t[e];for(const t of Object.keys(i))i[t]===e&&delete i[t]},listLanguages:()=>Object.keys(t),getLanguage:p,registerAliases:m,autoDetection:g,inherit:wk,addPlugin:e=>{(e=>{e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),n.push(e)}}),e.debugMode=()=>{r=!1},e.safeMode=()=>{r=!0},e.versionString="11.4.0",e.regex={concat:IS,lookahead:ZS,either:US,optional:MS,anyNumberOfTimes:zS};for(const e in ik)"object"==typeof ik[e]&&RS(ik[e]);return Object.assign(e,ik),e})({});const xk=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),Sk=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],kk=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Tk=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Rk=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Wk=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-height","max-width","min-height","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),Ak=Tk.concat(Rk);var Nk={className:"number",variants:[{begin:"(\\b([0-9](_*[0-9])*)((\\.([0-9](_*[0-9])*))|\\.)?|(\\.([0-9](_*[0-9])*)))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b"},{begin:"\\b([0-9](_*[0-9])*)((\\.([0-9](_*[0-9])*))[fFdD]?\\b|\\.([fFdD]\\b)?)"},{begin:"(\\.([0-9](_*[0-9])*))[fFdD]?\\b"},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{begin:"\\b0[xX](([0-9a-fA-F](_*[0-9a-fA-F])*)\\.?|([0-9a-fA-F](_*[0-9a-fA-F])*)?\\.([0-9a-fA-F](_*[0-9a-fA-F])*))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b"},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX]([0-9a-fA-F](_*[0-9a-fA-F])*)[lL]?\\b"},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ck(e,t,i){return-1===i?"":e.replace(t,(n=>Ck(e,t,i-1)))}const qk="[A-Za-z$_][0-9A-Za-z$_]*",Ek=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Vk=["true","false","null","undefined","NaN","Infinity"],Yk=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Zk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],zk=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Mk=["arguments","this","super","console","window","document","localStorage","module","global"],Ik=[].concat(zk,Yk,Zk);function Uk(e){const t=e.regex,i=qk,n={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const i=e[0].length+e.index,n=e.input[i];if("<"===n||","===n)return void t.ignoreMatch();let r;">"===n&&(((e,{after:t})=>{const i="",v={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(w)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[m]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:p,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,O,c,u,d,a,$,{className:"attr",begin:i+t.lookahead(":"),relevance:0},v,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[d,e.REGEXP_MODE,{className:"function",begin:w,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:""},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:n.begin,"on:begin":n.isTrulyOpeningTag,end:n.end}],subLanguage:"xml",contains:[{begin:n.begin,end:n.end,skip:!0,contains:["self"]}]}]},b,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[m,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[m]},Q,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},g,P,{match:/\$[(.]/}]}}const jk=e=>IS(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Dk=["Protocol","Type"].map(jk),Gk=["init","self"].map(jk),Lk=["Any","Self"],Bk=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Kk=["false","nil","true"],Fk=["assignment","associativity","higherThan","left","lowerThan","none","right"],Hk=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],Jk=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],eT=US(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),tT=US(eT,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),iT=IS(eT,tT,"*"),nT=US(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),rT=US(nT,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),oT=IS(nT,rT,"*"),sT=IS(/[A-Z]/,rT,"*"),aT=["autoclosure",IS(/convention\(/,US("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",IS(/objc\(/,oT,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],lT=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var OT=Object.freeze({__proto__:null,grmr_bash:e=>{const t=e.regex,i={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]};r.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),O={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),O,a,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},i]}},grmr_c:e=>{const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="[a-zA-Z_]\\w*::",r="(decltype\\(auto\\)|"+t.optional(n)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},O={className:"title",begin:t.optional(n)+e.IDENT_RE,relevance:0},c=t.optional(n)+e.IDENT_RE+"\\s*\\(",u={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},d=[l,o,i,e.C_BLOCK_COMMENT_MODE,a,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:d.concat([{begin:/\(/,end:/\)/,keywords:u,contains:d.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+r+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:c,returnBegin:!0,contains:[e.inherit(O,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,s,a,o,{begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,s,a,o]}]},o,i,e.C_BLOCK_COMMENT_MODE,l]};return{name:"C",aliases:["h"],keywords:u,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:l,strings:s,keywords:u}}},grmr_cpp:e=>{const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="[a-zA-Z_]\\w*::",r="(?!struct)(decltype\\(auto\\)|"+t.optional(n)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},O={className:"title",begin:t.optional(n)+e.IDENT_RE,relevance:0},c=t.optional(n)+e.IDENT_RE+"\\s*\\(",u={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},d={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},h=[d,l,o,i,e.C_BLOCK_COMMENT_MODE,a,s],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:h.concat([{begin:/\(/,end:/\)/,keywords:u,contains:h.concat(["self"]),relevance:0}]),relevance:0},p={className:"function",begin:"("+r+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:c,returnBegin:!0,contains:[O],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,a]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,s,a,o,{begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,s,a,o]}]},o,i,e.C_BLOCK_COMMENT_MODE,l]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:u,illegal:"",keywords:u,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:u},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},grmr_csharp:e=>{const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),n={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(r,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},O={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},c=e.inherit(O,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[O,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.C_BLOCK_COMMENT_MODE],a.contains=[c,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[O,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},u,n,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial",relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,d],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,n,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}},grmr_css:e=>{const t=e.regex,i=xk(e),n=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Tk.join("|")+")"},{begin:":(:)?("+Rk.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Wk.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:kk.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Sk.join("|")+")\\b"}]}},grmr_diff:e=>{const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}},grmr_go:e=>{const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"{const t=e.regex,i={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},n=e.COMMENT();n.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[n,o,r,s,i,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[n,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[n,a,o,r,s,i]}}]}},grmr_java:e=>{e.regex;const t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=t+Ck("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),n={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},r={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},o={className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t,/\s+/,t,/\s+/,/=/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:n,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Nk,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Nk,r]}},grmr_javascript:Uk,grmr_json:e=>({name:"JSON",contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,{beginKeywords:"true false null"},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}),grmr_kotlin:e=>{const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},n={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},r={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[r,n]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r,n]}]};n.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"})]}]},l=Nk,O=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),c={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},u=c;return u.variants[1].contains=[c],c.variants[1].contains=[u],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,O,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[c,e.C_LINE_COMMENT_MODE,O],relevance:0},e.C_LINE_COMMENT_MODE,O,s,a,o,e.C_NUMBER_MODE]},O]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}},grmr_less:e=>{const t=xk(e),i=Ak,n="([\\w-]+|@\\{[\\w-]+\\})",r=[],o=[],s=e=>({className:"string",begin:"~?"+e+".*?"+e}),a=(e,t,i)=>({className:e,begin:t,relevance:i}),l={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:kk.join(" ")},O={begin:"\\(",end:"\\)",contains:o,keywords:l,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s("'"),s('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,O,a("variable","@@?[\\w-]+",10),a("variable","@\\{[\\w-]+\\}"),a("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT);const c=o.concat({begin:/\{/,end:/\}/,contains:r}),u={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},d={begin:n+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Wk.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},h={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:l,returnEnd:!0,contains:o,relevance:0}},f={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},p={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,a("keyword","all\\b"),a("variable","@\\{[\\w-]+\\}"),{begin:"\\b("+Sk.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,a("selector-tag",n,0),a("selector-id","#"+n),a("selector-class","\\."+n,0),a("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Tk.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Rk.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:c},{begin:"!important"},t.FUNCTION_DISPATCH]},m={begin:`[\\w-]+:(:)?(${i.join("|")})`,returnBegin:!0,contains:[p]};return r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,f,m,d,p),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:r}},grmr_lua:e=>{const t="\\[=*\\[",i="\\]=*\\]",n={begin:t,end:i,contains:["self"]},r=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",i,{contains:[n],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:i,contains:[n],relevance:5}])}},grmr_makefile:e=>{const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{const t=e.regex,i=t.concat(/[A-Z_]/,t.optional(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(r,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[r,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[r,o,a,s]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}},grmr_markdown:e=>{const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},n={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};n.contains.push(r),r.contains.push(n);let o=[t,i];return n.contains=n.contains.concat(o),r.contains=r.contains.concat(o),o=o.concat(n,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:o}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},n,r,{className:"quote",begin:"^>\\s+",contains:o,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}},grmr_objectivec:e=>{const t=/[a-zA-Z@][a-zA-Z0-9_]*/,i={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{$pattern:t,keyword:["int","float","while","char","export","sizeof","typedef","const","struct","for","union","unsigned","long","volatile","static","bool","mutable","if","do","return","goto","void","enum","else","break","extern","asm","case","short","default","double","register","explicit","signed","typename","this","switch","continue","wchar_t","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","super","unichar","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["BOOL","dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"]},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+i.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}},grmr_perl:e=>{const t=e.regex,i=/[dualxmsipngr]{0,12}/,n={$pattern:/[\w.]+/,keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0"},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,r,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],O=(e,n,r="\\1")=>{const o="\\1"===r?r:t.concat(r,n);return t.concat(t.concat("(?:",e,")"),n,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,r,i)},c=(e,n,r)=>t.concat(t.concat("(?:",e,")"),n,/(?:\\.|[^\\\/])*?/,r,i),u=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:O("s|tr|y",t.either(...l,{capture:!0}))},{begin:O("s|tr|y","\\(","\\)")},{begin:O("s|tr|y","\\[","\\]")},{begin:O("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:c("(?:m|qr)?",/\//,/\//)},{begin:c("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:c("m|qr",/\(/,/\)/)},{begin:c("m|qr",/\[/,/\]/)},{begin:c("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=u,o.contains=u,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:u}},grmr_php:e=>{const t=e.regex,i="[a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$]))",n=t.concat("([a-zA-Z_\\x7f-\\xff]",i),r=t.concat("([A-Z]",i),o={scope:"variable",match:"\\$+"+n},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",O={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},c={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},u=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],d=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],h={keyword:u,literal:(e=>{const t=[];return["false","null","true"].forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(),built_in:d},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),p={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",f(d).join("\\b|"),"\\b)"),t.concat(/\\?/,n),t.concat(l,"*",/\(/)],scope:{1:"keyword",4:"title.class"}}]},m={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(u).join("\\b|"),"|",f(d).join("\\b|"),"\\b)"),n,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"}},g=t.concat(n,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),g],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]};return{case_insensitive:!1,keywords:h,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,m,$,{match:[/const/,/\s/,n,/\s*=/],scope:{1:"keyword",3:"variable.constant"}},p,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:h,contains:["self",o,$,e.C_BLOCK_COMMENT_MODE,O,c]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},O,c]}},grmr_php_template:e=>({name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}),grmr_plaintext:e=>({name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}),grmr_python:e=>{const t=e.regex,i=/[\p{XID_Start}_]\p{XID_Continue}*/u,n=["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],r={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:r,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},O="[0-9](_?[0-9])*",c=`(\\b(${O}))?\\.(${O})|\\b(${O})\\.`,u="\\b|"+n.join("|"),d={className:"number",relevance:0,variants:[{begin:`(\\b(${O})|(${c}))[eE][+-]?(${O})[jJ]?(?=${u})`},{begin:`(${c})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${O})[jJ](?=${u})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:r,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:["self",o,d,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,d,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:r,illegal:/(<\/|->|\?)|=>/,contains:[o,d,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,f,l]}]}},grmr_python_repl:e=>({aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}),grmr_r:e=>{const t=e.regex,i=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,n=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:i,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:i},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,n]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,n]},{scope:{1:"punctuation",2:"number"},match:[o,n]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,n]}]},{scope:{3:"operator"},match:[i,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}},grmr_ruby:e=>{const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__",built_in:"proc lambda",literal:"true false nil"},r={className:"doctag",begin:"@[A-Za-z]+"},o={begin:"#<",end:">"},s=[e.COMMENT("#","$",{contains:[r]}),e.COMMENT("^=begin","^=end",{contains:[r],relevance:10}),e.COMMENT("^__END__","\\n$")],a={className:"subst",begin:/#\{/,end:/\}/,keywords:n},l={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,a]})]}]},O="[0-9](_?[0-9])*",c={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${O}))?([eE][+-]?(${O})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},u={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:n},d=[l,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE,relevance:0}]}].concat(s)},{className:"function",begin:t.concat(/def\s+/,t.lookahead(i+"\\s*(\\(|;|$)")),relevance:0,keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:i}),u].concat(s)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[l,{begin:i}],relevance:0},c,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:n},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(o,s),relevance:0}].concat(o,s);a.contains=d,u.contains=d;const h=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",contains:d}}];return s.unshift(o),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(h).concat(s).concat(d)}},grmr_rust:e=>{const t=e.regex,i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},n="([ui](8|16|32|64|128|size)|f(32|64))?",r=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bin!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"],keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:r},illegal:""},i]}},grmr_scss:e=>{const t=xk(e),i=Rk,n=Tk,r="@[a-z-]+",o={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Sk.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Wk.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:kk.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}},grmr_shell:e=>({name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}),grmr_sql:e=>{const t=e.regex,i=e.COMMENT("--","$"),n=["true","false","unknown"],r=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),O={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:t,when:i}={})=>{const n=i;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:n(e)?e+"|0":e))})(l,{when:e=>e.length<3}),literal:n,type:r,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:n,type:r}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},O,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},grmr_swift:e=>{const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,i],r={match:[/\./,US(...Dk,...Gk)],className:{2:"keyword"}},o={match:IS(/\./,US(...Bk)),relevance:0},s=Bk.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:US(...Bk.filter((e=>"string"!=typeof e)).concat(Lk).map(jk),...Gk)}]},l={$pattern:US(/\b\w+/,/#\w+/),keyword:s.concat(Hk),literal:Kk},O=[r,o,a],c=[{match:IS(/\./,US(...Jk)),relevance:0},{className:"built_in",match:IS(/\b/,US(...Jk),/(?=\()/)}],u={match:/->/,relevance:0},d=[u,{className:"operator",relevance:0,variants:[{match:iT},{match:`\\.(\\.|${tT})+`}]}],h="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{match:`\\b0x(${h})(\\.(${h}))?([pP][+-]?(([0-9]_*)+))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},p=(e="")=>({className:"subst",variants:[{match:IS(/\\/,e,/[0\\tnr"']/)},{match:IS(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),m=(e="")=>({className:"subst",match:IS(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),g=(e="")=>({className:"subst",label:"interpol",begin:IS(/\\/,e,/\(/),end:/\)/}),$=(e="")=>({begin:IS(e,/"""/),end:IS(/"""/,e),contains:[p(e),m(e),g(e)]}),b=(e="")=>({begin:IS(e,/"/),end:IS(/"/,e),contains:[p(e),g(e)]}),Q={className:"string",variants:[$(),$("#"),$("##"),$("###"),b(),b("#"),b("##"),b("###")]},y={match:IS(/`/,oT,/`/)},_=[y,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${rT}+`}],P=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:lT,contains:[...d,f,Q]}]}},{className:"keyword",match:IS(/@/,US(...aT))},{className:"meta",match:IS(/@/,oT)}],w={match:ZS(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:IS(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,rT,"+")},{className:"type",match:sT,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:IS(/\s+&\s+/,ZS(sT)),relevance:0}]},v={begin://,keywords:l,contains:[...n,...O,...P,u,w]};w.contains.push(v);const X={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:IS(oT,/\s*:/),keywords:"_|0",relevance:0},...n,...O,...c,...d,f,Q,..._,...P,w]},x={begin://,contains:[...n,w]},S={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:US(ZS(IS(oT,/\s*:/)),ZS(IS(oT,/\s+/,oT,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:oT}]},...n,...O,...d,f,Q,...P,w,X],endsParent:!0,illegal:/["']/},k={match:[/func/,/\s+/,US(y.match,oT,iT)],className:{1:"keyword",3:"title.function"},contains:[x,S,t],illegal:[/\[/,/%/]},T={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[x,S,t],illegal:/\[|%/},R={match:[/operator/,/\s+/,iT],className:{1:"keyword",3:"title"}},W={begin:[/precedencegroup/,/\s+/,sT],className:{1:"keyword",3:"title"},contains:[w],keywords:[...Fk,...Kk],end:/}/};for(const e of Q.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const i=[...O,...c,...d,f,Q,..._];t.contains=[...i,{begin:/\(/,end:/\)/,contains:["self",...i]}]}return{name:"Swift",keywords:l,contains:[...n,k,T,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...O]},R,W,{beginKeywords:"import",end:/$/,contains:[...n],relevance:0},...O,...c,...d,f,Q,..._,...P,w,X]}},grmr_typescript:e=>{const t=Uk(e),i=["any","void","number","boolean","string","object","never","enum"],n={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},r={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},o={$pattern:qk,keyword:Ek.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]),literal:Vk,built_in:Ik.concat(i),"variable.language":Mk},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},a=(e,t,i)=>{const n=e.contains.findIndex((e=>e.label===t));if(-1===n)throw Error("can not find mode to replace");e.contains.splice(n,1,i)};return Object.assign(t.keywords,o),t.exports.PARAMS_CONTAINS.push(s),t.contains=t.contains.concat([s,n,r]),a(t,"shebang",e.SHEBANG()),a(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),t.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t},grmr_vbnet:e=>{const t=e.regex,i=/\d{1,2}\/\d{1,2}\/\d{4}/,n=/\d{4}-\d{1,2}-\d{1,2}/,r=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(n,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,t.either(n,i),/ +/,t.either(r,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}},grmr_yaml:e=>{const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",n={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},r=e.inherit(n,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},s={begin:/\{/,end:/\}/,contains:[o],illegal:"\\n",relevance:0},a={begin:"\\[",end:"\\]",contains:[o],illegal:"\\n",relevance:0},l=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},s,a,n],O=[...l];return O.pop(),O.push(r),o.contains=O,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:l}}});const cT=Xk;for(const e of Object.keys(OT)){const t=e.replace("grmr_","").replace("_","-");cT.registerLanguage(t,OT[e])} +/*! `julia` grammar compiled for Highlight.js 11.4.0 */var uT=e=>{var t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",i={$pattern:t,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quote","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel","AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},n={keywords:i,illegal:/<\//},r={className:"subst",begin:/\$\(/,end:/\)/,keywords:i},o={className:"variable",begin:"\\$"+t},s={className:"string",contains:[e.BACKSLASH_ESCAPE,r,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,r,o],begin:"`",end:"`"},l={className:"meta",begin:"@"+t};return n.name="Julia",n.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},s,a,l,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],r.contains=n.contains,n},dT=uT,hT=e=>({name:"Julia REPL",contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]});cT.registerLanguage("julia",dT),cT.registerLanguage("julia-repl",hT),window.hljs=cT;var fT=cT;class pT extends w{constructor(){super(),this.state={},this.old_height=0,this.resize_observer=new ResizeObserver((e=>{const t=this.base.offsetHeight;if(document.body.querySelector("pluto-cell:focus-within")){var i;const e=document.body.querySelectorAll("pluto-cell:focus-within ~ pluto-cell > pluto-output");"SUMMARY"===(null===(i=document.activeElement)||void 0===i?void 0:i.tagName)||0!==e.length&&Array.from(e).includes(this.base)||window.scrollBy(0,t-this.old_height)}this.old_height=t}))}shouldComponentUpdate({last_run_timestamp:e}){return e!==this.props.last_run_timestamp}componentDidMount(){this.resize_observer.observe(this.base)}componentWillUnmount(){this.resize_observer.unobserve(this.base)}render(){const e=this.props.errored||!this.props.body||"application/vnd.pluto.tree+object"!==this.props.mime&&"application/vnd.pluto.table+object"!==this.props.mime&&"text/plain"!==this.props.mime,t=!this.props.errored&&e;return we` + + ${this.props.rootassignee} + <${gT} ...${this.props} /> + + `}}let mT=({body:e,mime:t})=>{let i=le();return ae((()=>{let n=URL.createObjectURL(new Blob([e],{type:t}));return i.current.onload=i.current.onerror=()=>{i.current&&(i.current.style.display=null)},""===i.current.src&&(i.current.style.display="none"),i.current.type=t,i.current.src=n,()=>URL.revokeObjectURL(n)}),[e,t]),we``};const gT=({mime:e,body:t,cell_id:i,persist_js_state:n=!1,last_run_timestamp:r})=>{switch(e){case"image/png":case"image/jpg":case"image/jpeg":case"image/gif":case"image/bmp":case"image/svg+xml":return we`
<${mT} mime=${e} body=${t} />
`;case"text/html":return t.startsWith("`:we`<${vT} + cell_id=${i} + body=${t} + persist_js_state=${n} + last_run_timestamp=${r} + />`;case"application/vnd.pluto.tree+object":return we`
+ <${dS} cell_id=${i} body=${t} persist_js_state=${n} /> +
`;case"application/vnd.pluto.table+object":return we`<${pS} cell_id=${i} body=${t} persist_js_state=${n} />`;case"application/vnd.pluto.parseerror+object":return we`
<${oS} cell_id=${i} ...${t} />
`;case"application/vnd.pluto.stacktrace+object":return we`
<${sS} cell_id=${i} ...${t} />
`;case"application/vnd.pluto.divelement+object":return(({cell_id:e,style:t,classname:i,children:n,persist_js_state:r=!1})=>we`
${n.map((t=>we`<${lS} cell_id=${e} mime=${t[1]} body=${t[0]} persist_js_state=${r} />`))}
`)({cell_id:i,...t,persist_js_state:n});case"text/plain":return t?we`
+
${t}
+
`:we`
`;case null:case void 0:case"":return we``;default:return we`
🛑
`}};!function(e,t,i,n){function r(){const t=Reflect.construct(HTMLElement,[],r);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:"open"}):t,t}r.prototype=Object.create(HTMLElement.prototype),r.prototype.constructor=r,r.prototype.connectedCallback=PS,r.prototype.attributeChangedCallback=vS,r.prototype.disconnectedCallback=XS,i=i||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=i,i.forEach((e=>{Object.defineProperty(r.prototype,e,{get(){return this._vdom.props[e]},set(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());const i=typeof t;null!=t&&"string"!==i&&"boolean"!==i&&"number"!==i||this.setAttribute(e,t)}})})),customElements.define(t||e.tagName||e.displayName||e.name,r)}(gT,"pluto-display",["mime","body","cell_id","persist_js_state","last_run_timestamp"]);let $T=({body:e})=>{let t=le();return ae((()=>{let i=URL.createObjectURL(new Blob([e],{type:"text/html"}));return t.current.src=i,PT((async()=>{await new Promise((e=>t.current.addEventListener("load",(()=>e(null)))));let e=t.current.contentWindow.document,i=document.querySelector("#iframe-resizer-content-window-script"),n=e.createElement("script");n.src=i.src,n.crossOrigin="anonymous",e.head.appendChild(n),new Promise((e=>n.addEventListener("load",(()=>e(null))))),window.iFrameResize({checkOrigin:!1},t.current)})),()=>URL.revokeObjectURL(i)}),[e]),we``},bT=async({environment:e,code:t})=>{const i=`"use strict"; return (async () => {${t}})()`;let{this:n,...r}=e,o=Object.keys(r),s=Object.values(r);return await Function(...o,i).bind(n)(...s)},QT=0,yT=async(e,t)=>{let i=document.createElement("script");for(let t of e.attributes)i.attributes.setNamedItem(t.cloneNode(!0));const n=`____FUNCTION_TO_RUN_INSIDE_SCRIPT_${QT}`;i.textContent=`{\n window.${n}.result = window.${n}.function_to_run(window.${n}.currentScript)\n }`,window[n]={function_to_run:t,currentScript:i,result:null};const r=e.parentNode;if(null==r)throw"Failed to execute script it has no parent in DOM.";r.replaceChild(i,e);let o=await window[n].result;return window[n]={function_to_run:t,result:null},{node:i,result:o}};const _T=e=>e instanceof Element&&e.nodeType===Node.ELEMENT_NODE;let PT=e=>e(),wT=e=>{try{const t=e.getAttribute("shadowroot"),i=e.parentElement.attachShadow({mode:t});i.appendChild(e.content),e.remove();return Array.from(i.querySelectorAll("script, template[shadowroot]")).flatMap((e=>"SCRIPT"===e.nodeName?[e]:"TEMPLATE"===e.nodeName?wT(e):void 0))}catch(t){return console.error("Couldn't attach declarative shadow dom to",e,"because of",t),[]}},vT=({body:e,className:t="",persist_js_state:i=!1,last_run_timestamp:n})=>{let r=ue($w),o=ue(bw),s=ue(Qw),a=le(new Map),l=le((()=>{})),O=le(null);return ae((()=>{O.current&&o&&bS(O.current.querySelectorAll("bond"),o)}),[e,i,r,o]),ae((()=>{const t=O.current;if(null==t)return;let n=new Promise((e=>{l.current=()=>{e(null)}}));document.createElement("p-dumpster").append(...t.childNodes),t.innerHTML=e;const c=[...Array.from(t.querySelectorAll("template[shadowroot]")).flatMap((e=>wT(e))),...Array.from(t.querySelectorAll("script"))];return PT((async()=>{try{var e;if(null==s||s.add(t),a.current=await(async({root_node:e,script_nodes:t,previous_results_map:i,invalidation:n,pluto_actions:r})=>{let o=new Map;for(let e of t)if(null!=e.src&&""!==e.src);else{let t=e.id,n=t?i.get(t):null;_T(n)&&(null===(a=e.parentElement)||void 0===a||a.insertBefore(n,e))}for(let l of t){if(QT+=1,null!=l.src&&""!==l.src){let e=Array.from(document.head.querySelectorAll("script")).find((e=>e.src===l.src));null==e&&(e=document.createElement("script"),e.src=l.src,e.type="module"===l.type?"module":"text/javascript",e.pluto_is_loading_me=!0);let t=e;null!=t.pluto_is_loading_me&&(await new Promise((e=>{t.addEventListener("load",e),t.addEventListener("error",e),document.head.appendChild(t)})),t.pluto_is_loading_me=void 0)}else try{let t=l.innerText,O=l.id,c=O?i.get(O):null;if("module"===l.type&&console.warn("We don't (yet) fully support
\ No newline at end of file diff --git a/frontend-dist/ellipsis-horizontal-circle-outline.6279ed30.svg b/frontend-dist/ellipsis-horizontal-circle-outline.6279ed30.svg new file mode 100644 index 0000000000..4b8d05ea8e --- /dev/null +++ b/frontend-dist/ellipsis-horizontal-circle-outline.6279ed30.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/ellipsis-horizontal-outline.abb6e818.svg b/frontend-dist/ellipsis-horizontal-outline.abb6e818.svg new file mode 100644 index 0000000000..bf94f28aca --- /dev/null +++ b/frontend-dist/ellipsis-horizontal-outline.abb6e818.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/ellipsis-horizontal.c9a6cc29.svg b/frontend-dist/ellipsis-horizontal.c9a6cc29.svg new file mode 100644 index 0000000000..5df322580b --- /dev/null +++ b/frontend-dist/ellipsis-horizontal.c9a6cc29.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/ellipsis-vertical.a30e7430.svg b/frontend-dist/ellipsis-vertical.a30e7430.svg new file mode 100644 index 0000000000..27f793a2cb --- /dev/null +++ b/frontend-dist/ellipsis-vertical.a30e7430.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/error.jl.html b/frontend-dist/error.jl.html new file mode 100644 index 0000000000..7c839e6848 --- /dev/null +++ b/frontend-dist/error.jl.html @@ -0,0 +1 @@ +$TITLE$STYLE

$TITLE

$ADVICE


Go back


$BODYTITLE

$BODY
\ No newline at end of file diff --git a/frontend-dist/eye-off-outline.a37e03db.svg b/frontend-dist/eye-off-outline.a37e03db.svg new file mode 100644 index 0000000000..4a7e915939 --- /dev/null +++ b/frontend-dist/eye-off-outline.a37e03db.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/eye-outline.6e6e0f7c.svg b/frontend-dist/eye-outline.6e6e0f7c.svg new file mode 100644 index 0000000000..6901ef405b --- /dev/null +++ b/frontend-dist/eye-outline.6e6e0f7c.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/favicon-16x16.347d2855.png b/frontend-dist/favicon-16x16.347d2855.png new file mode 100644 index 0000000000..bd77b08001 Binary files /dev/null and b/frontend-dist/favicon-16x16.347d2855.png differ diff --git a/frontend-dist/favicon-32x32.8789add4.png b/frontend-dist/favicon-32x32.8789add4.png new file mode 100644 index 0000000000..96580877eb Binary files /dev/null and b/frontend-dist/favicon-32x32.8789add4.png differ diff --git a/frontend-dist/favicon-96x96.48689391.png b/frontend-dist/favicon-96x96.48689391.png new file mode 100644 index 0000000000..1d5d57d5b2 Binary files /dev/null and b/frontend-dist/favicon-96x96.48689391.png differ diff --git a/frontend-dist/favicon_unsaturated.d1387b25.svg b/frontend-dist/favicon_unsaturated.d1387b25.svg new file mode 100644 index 0000000000..ccc316f314 --- /dev/null +++ b/frontend-dist/favicon_unsaturated.d1387b25.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/firebase-app.42556901.js b/frontend-dist/firebase-app.42556901.js new file mode 100644 index 0000000000..24e12ac5f5 --- /dev/null +++ b/frontend-dist/firebase-app.42556901.js @@ -0,0 +1,213 @@ +(()=>{function e(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire94c2.register("dN8oq",(function(t,n){e(t.exports,"FirebaseError",(()=>r)),e(t.exports,"_DEFAULT_ENTRY_NAME",(()=>O)),e(t.exports,"_apps",(()=>C)),e(t.exports,"_components",(()=>D)),e(t.exports,"_addComponent",(()=>A)),e(t.exports,"_addOrOverwriteComponent",(()=>N)),e(t.exports,"_registerComponent",(()=>R)),e(t.exports,"_getProvider",(()=>S)),e(t.exports,"_removeServiceInstance",(()=>$)),e(t.exports,"_clearComponents",(()=>j)),e(t.exports,"SDK_VERSION",(()=>k)),e(t.exports,"initializeApp",(()=>z)),e(t.exports,"getApp",(()=>T)),e(t.exports,"getApps",(()=>P)),e(t.exports,"deleteApp",(()=>x)),e(t.exports,"registerVersion",(()=>M)),e(t.exports,"onLog",(()=>U)),e(t.exports,"setLogLevel",(()=>B)); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class i{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,r.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,s.prototype.create)}}class s{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,s=this.errors[e],a=s?function(e,t){return e.replace(o,((e,n)=>{const i=t[n];return null!=i?String(i):`<${n}?>`}))}(s,n):"Error",c=`${this.serviceName}: ${a} (${i}).`;return new r(i,c,n)}}const o=/\{\$([^}]+)}/g;function a(e,t){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);for(const r of n){if(!i.includes(r))return!1;const n=e[r],s=t[r];if(c(n)&&c(s)){if(!a(n,s))return!1}else if(n!==s)return!1}for(const e of i)if(!n.includes(e))return!1;return!0}function c(e){return null!==e&&"object"==typeof e}class l{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const p="[DEFAULT]"; +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class h{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new i;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),i=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(i)return null;throw e}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(e))try{this.getOrInitializeService({instanceIdentifier:p})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e="[DEFAULT]"){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e="[DEFAULT]"){return this.instances.has(e)}getOptions(e="[DEFAULT]"){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(i)}return i}onInit(e,t){var n;const i=this.normalizeInstanceIdentifier(t),r=null!==(n=this.onInitCallbacks.get(i))&&void 0!==n?n:new Set;r.add(e),this.onInitCallbacks.set(i,r);const s=this.instances.get(i);return s&&e(s,i),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(i=e,i===p?void 0:i),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var i;return n||null}normalizeInstanceIdentifier(e="[DEFAULT]"){return this.component?this.component.multipleInstances?e:p:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class f{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new h(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const d=[];var u,m;(m=u||(u={}))[m.DEBUG=0]="DEBUG",m[m.VERBOSE=1]="VERBOSE",m[m.INFO=2]="INFO",m[m.WARN=3]="WARN",m[m.ERROR=4]="ERROR",m[m.SILENT=5]="SILENT";const g={debug:u.DEBUG,verbose:u.VERBOSE,info:u.INFO,warn:u.WARN,error:u.ERROR,silent:u.SILENT},b=u.INFO,v={[u.DEBUG]:"log",[u.VERBOSE]:"log",[u.INFO]:"info",[u.WARN]:"warn",[u.ERROR]:"error"},I=(e,t,...n)=>{if(t{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const E="https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js",y="0.7.6",_=new class{constructor(e){this.name=e,this._logLevel=b,this._logHandler=I,this._userLogHandler=null,d.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in u))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?g[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,u.DEBUG,...e),this._logHandler(this,u.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,u.VERBOSE,...e),this._logHandler(this,u.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,u.INFO,...e),this._logHandler(this,u.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,u.WARN,...e),this._logHandler(this,u.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,u.ERROR,...e),this._logHandler(this,u.ERROR,...e)}}("https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js"),O="[DEFAULT]",L={[E]:"fire-core","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-check":"fire-app-check","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},C=new Map,D=new Map;function A(e,t){try{e.container.addComponent(t)}catch(n){_.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function N(e,t){e.container.addOrOverwriteComponent(t)}function R(e){const t=e.name;if(D.has(t))return _.debug(`There were multiple attempts to register component ${t}.`),!1;D.set(t,e);for(const t of C.values())A(t,e);return!0}function S(e,t){return e.container.getProvider(t)}function $(e,t,n=O){S(e,t).clearInstance(n)}function j(){D.clear()} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const H=new s("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."}); +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class F{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new l("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw H.create("app-deleted",{appName:this._name})}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const k="9.3.0";function z(e,t={}){if("object"!=typeof t){t={name:t}}const n=Object.assign({name:O,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw H.create("bad-app-name",{appName:String(i)});const r=C.get(i);if(r){if(a(e,r.options)&&a(n,r.config))return r;throw H.create("duplicate-app",{appName:i})}const s=new f(i);for(const e of D.values())s.addComponent(e);const o=new F(e,n,s);return C.set(i,o),o}function T(e=O){const t=C.get(e);if(!t)throw H.create("no-app",{appName:e});return t}function P(){return Array.from(C.values())}async function x(e){const t=e.name;C.has(t)&&(C.delete(t),await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function M(e,t,n){var i;let r=null!==(i=L[e])&&void 0!==i?i:e;n&&(r+=`-${n}`);const s=r.match(/\s|\//),o=t.match(/\s|\//);if(s||o){const e=[`Unable to register library "${r}" with version "${t}":`];return s&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void _.warn(e.join(" "))}R(new l(`${r}-version`,(()=>({library:r,version:t})),"VERSION"))}function U(e,t){if(null!==e&&"function"!=typeof e)throw H.create("invalid-log-argument");!function(e,t){for(const n of d){let i=null;t&&t.level&&(i=g[t.level]),n.userLogHandler=null===e?null:(t,n,...r)=>{const s=r.map((e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((e=>e)).join(" ");n>=(null!=i?i:t.logLevel)&&e({level:u[n].toLowerCase(),message:s,args:r,type:t.name})}}}(e,t)}function B(e){var t;t=e,d.forEach((e=>{e.setLogLevel(t)}))} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var V;V="",R(new l("platform-logger",(e=>new w(e)),"PRIVATE")),M(E,y,V),M(E,y,"esm2017"),M("fire-js",""); +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +M("firebase","9.3.0","cdn")}))})(); \ No newline at end of file diff --git a/frontend-dist/firebase-app.bead1f66.js b/frontend-dist/firebase-app.bead1f66.js new file mode 100644 index 0000000000..81f08f63da --- /dev/null +++ b/frontend-dist/firebase-app.bead1f66.js @@ -0,0 +1,213 @@ +function e(e,t,n,i){Object.defineProperty(e,t,{get:n,set:i,enumerable:!0,configurable:!0})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequire94c2.register("aFiVA",(function(t,n){e(t.exports,"FirebaseError",(()=>r)),e(t.exports,"_DEFAULT_ENTRY_NAME",(()=>O)),e(t.exports,"_apps",(()=>C)),e(t.exports,"_components",(()=>D)),e(t.exports,"_addComponent",(()=>A)),e(t.exports,"_addOrOverwriteComponent",(()=>R)),e(t.exports,"_registerComponent",(()=>N)),e(t.exports,"_getProvider",(()=>S)),e(t.exports,"_removeServiceInstance",(()=>$)),e(t.exports,"_clearComponents",(()=>j)),e(t.exports,"SDK_VERSION",(()=>k)),e(t.exports,"initializeApp",(()=>z)),e(t.exports,"getApp",(()=>T)),e(t.exports,"getApps",(()=>P)),e(t.exports,"deleteApp",(()=>x)),e(t.exports,"registerVersion",(()=>M)),e(t.exports,"onLog",(()=>U)),e(t.exports,"setLogLevel",(()=>B)); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class i{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class r extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,r.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,s.prototype.create)}}class s{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,s=this.errors[e],a=s?function(e,t){return e.replace(o,((e,n)=>{const i=t[n];return null!=i?String(i):`<${n}?>`}))}(s,n):"Error",c=`${this.serviceName}: ${a} (${i}).`;return new r(i,c,n)}}const o=/\{\$([^}]+)}/g;function a(e,t){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);for(const r of n){if(!i.includes(r))return!1;const n=e[r],s=t[r];if(c(n)&&c(s)){if(!a(n,s))return!1}else if(n!==s)return!1}for(const e of i)if(!n.includes(e))return!1;return!0}function c(e){return null!==e&&"object"==typeof e}class l{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const p="[DEFAULT]"; +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class h{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new i;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),i=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(i)return null;throw e}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */(e))try{this.getOrInitializeService({instanceIdentifier:p})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e="[DEFAULT]"){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e="[DEFAULT]"){return this.instances.has(e)}getOptions(e="[DEFAULT]"){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(i)}return i}onInit(e,t){var n;const i=this.normalizeInstanceIdentifier(t),r=null!==(n=this.onInitCallbacks.get(i))&&void 0!==n?n:new Set;r.add(e),this.onInitCallbacks.set(i,r);const s=this.instances.get(i);return s&&e(s,i),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(i=e,i===p?void 0:i),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var i;return n||null}normalizeInstanceIdentifier(e="[DEFAULT]"){return this.component?this.component.multipleInstances?e:p:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class f{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new h(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const d=[];var u,m;(m=u||(u={}))[m.DEBUG=0]="DEBUG",m[m.VERBOSE=1]="VERBOSE",m[m.INFO=2]="INFO",m[m.WARN=3]="WARN",m[m.ERROR=4]="ERROR",m[m.SILENT=5]="SILENT";const g={debug:u.DEBUG,verbose:u.VERBOSE,info:u.INFO,warn:u.WARN,error:u.ERROR,silent:u.SILENT},b=u.INFO,v={[u.DEBUG]:"log",[u.VERBOSE]:"log",[u.INFO]:"info",[u.WARN]:"warn",[u.ERROR]:"error"},I=(e,t,...n)=>{if(t{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const E="https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js",y="0.7.6",_=new class{constructor(e){this.name=e,this._logLevel=b,this._logHandler=I,this._userLogHandler=null,d.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in u))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?g[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,u.DEBUG,...e),this._logHandler(this,u.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,u.VERBOSE,...e),this._logHandler(this,u.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,u.INFO,...e),this._logHandler(this,u.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,u.WARN,...e),this._logHandler(this,u.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,u.ERROR,...e),this._logHandler(this,u.ERROR,...e)}}("https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js"),O="[DEFAULT]",L={[E]:"fire-core","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-check":"fire-app-check","https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},C=new Map,D=new Map;function A(e,t){try{e.container.addComponent(t)}catch(n){_.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function R(e,t){e.container.addOrOverwriteComponent(t)}function N(e){const t=e.name;if(D.has(t))return _.debug(`There were multiple attempts to register component ${t}.`),!1;D.set(t,e);for(const t of C.values())A(t,e);return!0}function S(e,t){return e.container.getProvider(t)}function $(e,t,n=O){S(e,t).clearInstance(n)}function j(){D.clear()} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const F=new s("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."}); +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class H{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new l("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw F.create("app-deleted",{appName:this._name})}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const k="9.3.0";function z(e,t={}){if("object"!=typeof t){t={name:t}}const n=Object.assign({name:O,automaticDataCollectionEnabled:!1},t),i=n.name;if("string"!=typeof i||!i)throw F.create("bad-app-name",{appName:String(i)});const r=C.get(i);if(r){if(a(e,r.options)&&a(n,r.config))return r;throw F.create("duplicate-app",{appName:i})}const s=new f(i);for(const e of D.values())s.addComponent(e);const o=new H(e,n,s);return C.set(i,o),o}function T(e=O){const t=C.get(e);if(!t)throw F.create("no-app",{appName:e});return t}function P(){return Array.from(C.values())}async function x(e){const t=e.name;C.has(t)&&(C.delete(t),await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function M(e,t,n){var i;let r=null!==(i=L[e])&&void 0!==i?i:e;n&&(r+=`-${n}`);const s=r.match(/\s|\//),o=t.match(/\s|\//);if(s||o){const e=[`Unable to register library "${r}" with version "${t}":`];return s&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void _.warn(e.join(" "))}N(new l(`${r}-version`,(()=>({library:r,version:t})),"VERSION"))}function U(e,t){if(null!==e&&"function"!=typeof e)throw F.create("invalid-log-argument");!function(e,t){for(const n of d){let i=null;t&&t.level&&(i=g[t.level]),n.userLogHandler=null===e?null:(t,n,...r)=>{const s=r.map((e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((e=>e)).join(" ");n>=(null!=i?i:t.logLevel)&&e({level:u[n].toLowerCase(),message:s,args:r,type:t.name})}}}(e,t)}function B(e){var t;t=e,d.forEach((e=>{e.setLogLevel(t)}))} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var V;V="",N(new l("platform-logger",(e=>new w(e)),"PRIVATE")),M(E,y,V),M(E,y,"esm2017"),M("fire-js",""); +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +M("firebase","9.3.0","cdn")})); \ No newline at end of file diff --git a/frontend-dist/firebase-firestore.460b9b58.js b/frontend-dist/firebase-firestore.460b9b58.js new file mode 100644 index 0000000000..da4afed70a --- /dev/null +++ b/frontend-dist/firebase-firestore.460b9b58.js @@ -0,0 +1,2039 @@ +var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function e(t,e,n,s){Object.defineProperty(t,e,{get:n,set:s,enumerable:!0,configurable:!0})}var n=t.parcelRequire94c2;n.register("2rOxx",(function(s,r){e(s.exports,"setLogLevel",(()=>Ps)),e(s.exports,"_logWarn",(()=>qs)),e(s.exports,"_debugAssert",(()=>$s)),e(s.exports,"FirestoreError",(()=>zs)),e(s.exports,"_EmptyCredentialsProvider",(()=>Ys)),e(s.exports,"Timestamp",(()=>ar)),e(s.exports,"_FieldPath",(()=>mr)),e(s.exports,"_isBase64Available",(()=>yr)),e(s.exports,"_DocumentKey",(()=>xr)),e(s.exports,"_DatabaseId",(()=>$l)),e(s.exports,"_validateIsNotUsedTogether",(()=>zl)),e(s.exports,"_cast",(()=>Xl)),e(s.exports,"connectFirestoreEmulator",(()=>ed)),e(s.exports,"DocumentReference",(()=>nd)),e(s.exports,"CollectionReference",(()=>rd)),e(s.exports,"Query",(()=>sd)),e(s.exports,"collection",(()=>id)),e(s.exports,"collectionGroup",(()=>od)),e(s.exports,"doc",(()=>ad)),e(s.exports,"refEqual",(()=>cd)),e(s.exports,"queryEqual",(()=>ud)),e(s.exports,"LoadBundleTask",(()=>dd)),e(s.exports,"CACHE_SIZE_UNLIMITED",(()=>fd)),e(s.exports,"Firestore",(()=>gd)),e(s.exports,"initializeFirestore",(()=>md)),e(s.exports,"getFirestore",(()=>pd)),e(s.exports,"ensureFirestoreConfigured",(()=>yd)),e(s.exports,"enableIndexedDbPersistence",(()=>vd)),e(s.exports,"enableMultiTabIndexedDbPersistence",(()=>bd)),e(s.exports,"clearIndexedDbPersistence",(()=>Ed)),e(s.exports,"waitForPendingWrites",(()=>Id)),e(s.exports,"enableNetwork",(()=>Sd)),e(s.exports,"disableNetwork",(()=>_d)),e(s.exports,"terminate",(()=>Nd)),e(s.exports,"loadBundle",(()=>Ad)),e(s.exports,"namedQuery",(()=>Dd)),e(s.exports,"FieldPath",(()=>Cd)),e(s.exports,"documentId",(()=>kd)),e(s.exports,"Bytes",(()=>Rd)),e(s.exports,"FieldValue",(()=>Ld)),e(s.exports,"GeoPoint",(()=>Od)),e(s.exports,"SnapshotMetadata",(()=>lf)),e(s.exports,"DocumentSnapshot",(()=>df)),e(s.exports,"QueryDocumentSnapshot",(()=>ff)),e(s.exports,"QuerySnapshot",(()=>gf)),e(s.exports,"snapshotEqual",(()=>pf)),e(s.exports,"QueryConstraint",(()=>wf)),e(s.exports,"query",(()=>vf)),e(s.exports,"where",(()=>Tf)),e(s.exports,"orderBy",(()=>If)),e(s.exports,"limit",(()=>_f)),e(s.exports,"limitToLast",(()=>Nf)),e(s.exports,"startAt",(()=>Df)),e(s.exports,"startAfter",(()=>xf)),e(s.exports,"endBefore",(()=>kf)),e(s.exports,"endAt",(()=>Rf)),e(s.exports,"AbstractUserDataWriter",(()=>Pf)),e(s.exports,"WriteBatch",(()=>qf)),e(s.exports,"getDoc",(()=>jf)),e(s.exports,"getDocFromCache",(()=>$f)),e(s.exports,"getDocFromServer",(()=>Gf)),e(s.exports,"getDocs",(()=>Hf)),e(s.exports,"getDocsFromCache",(()=>zf)),e(s.exports,"getDocsFromServer",(()=>Qf)),e(s.exports,"setDoc",(()=>Wf)),e(s.exports,"executeWrite",(()=>eg)),e(s.exports,"updateDoc",(()=>Yf)),e(s.exports,"deleteDoc",(()=>Xf)),e(s.exports,"addDoc",(()=>Jf)),e(s.exports,"onSnapshot",(()=>Zf)),e(s.exports,"onSnapshotsInSync",(()=>tg)),e(s.exports,"Transaction",(()=>sg)),e(s.exports,"runTransaction",(()=>rg)),e(s.exports,"deleteField",(()=>ig)),e(s.exports,"serverTimestamp",(()=>og)),e(s.exports,"arrayUnion",(()=>ag)),e(s.exports,"arrayRemove",(()=>cg)),e(s.exports,"increment",(()=>ug)),e(s.exports,"writeBatch",(()=>hg));var i=n("aFiVA"),o=n("fnbc9"); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const a=function(t){const e=[];let n=0;for(let s=0;s>6|192,e[n++]=63&r|128):55296==(64512&r)&&s+1>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128)}return e},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let e=0;e>2,h=(3&r)<<4|o>>4;let l=(15&o)<<2|c>>6,d=63&c;a||(d=64,i||(l=64)),s.push(n[u],n[h],n[l],n[d])}return s.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(a(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let n=0,s=0;for(;n191&&r<224){const i=t[n++];e[s++]=String.fromCharCode((31&r)<<6|63&i)}else if(r>239&&r<365){const i=((7&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536;e[s++]=String.fromCharCode(55296+(i>>10)),e[s++]=String.fromCharCode(56320+(1023&i))}else{const i=t[n++],o=t[n++];e[s++]=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let e=0;e>4;if(s.push(c),64!==o){const t=i<<4&240|o>>2;if(s.push(t),64!==a){const t=o<<6&192|a;s.push(t)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},u=function(t){return function(t){const e=a(t);return c.encodeByteArray(e,!0)}(t).replace(/\./g,"")}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function l(){return!function(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(t){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function d(t,e){if(t===e)return!0;const n=Object.keys(t),s=Object.keys(e);for(const r of n){if(!s.includes(r))return!1;const n=t[r],i=e[r];if(f(n)&&f(i)){if(!d(n,i))return!1}else if(n!==i)return!1}for(const t of s)if(!n.includes(t))return!1;return!0}function f(t){return null!==t&&"object"==typeof t} +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function g(t){return t&&t._delegate?t._delegate:t}class m{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var p,y;(y=p||(p={}))[y.DEBUG=0]="DEBUG",y[y.VERBOSE=1]="VERBOSE",y[y.INFO=2]="INFO",y[y.WARN=3]="WARN",y[y.ERROR=4]="ERROR",y[y.SILENT=5]="SILENT";const w={debug:p.DEBUG,verbose:p.VERBOSE,info:p.INFO,warn:p.WARN,error:p.ERROR,silent:p.SILENT},v=p.INFO,b={[p.DEBUG]:"log",[p.VERBOSE]:"log",[p.INFO]:"info",[p.WARN]:"warn",[p.ERROR]:"error"},T=(t,e,...n)=>{if(e>>0),C=0;function k(t,e,n){return t.call.apply(t.bind,arguments)}function R(t,e,n){if(!t)throw Error();if(2e?1:0}t:{var z=_.navigator;if(z){var Q=z.userAgent;if(Q){K=Q;break t}}K=""}function W(t,e,n){for(const s in t)e.call(n,t[s],s,t)}function Y(t){const e={};for(const n in t)e[n]=t[n];return e}var X="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function J(t,e){let n,s;for(let e=1;eparseFloat(ut)){tt=String(lt);break t}}tt=ut}var dt,ft={};function gt(){return function(t){var e=ft;return Object.prototype.hasOwnProperty.call(e,9)?e[9]:e[9]=t(9)}((function(){let t=0;const e=$(String(tt)).split("."),n=$("9").split("."),s=Math.max(e.length,n.length);for(let o=0;0==t&&o>>0);function Ut(t){return"function"==typeof t?t:(t[Vt]||(t[Vt]=function(e){return t.handleEvent(e)}),t[Vt])}function qt(){F.call(this),this.i=new _t(this),this.P=this,this.I=null}function Bt(t,e){var n,s=t.I;if(s)for(n=[];s;s=s.I)n.push(s);if(t=t.P,s=e.type||e,"string"==typeof e)e=new wt(e,t);else if(e instanceof wt)e.target=e.target||t;else{var r=e;J(e=new wt(s,t),r)}if(r=!0,n)for(var i=n.length-1;0<=i;i--){var o=e.g=n[i];r=jt(o,s,!0,e)&&r}if(r=jt(o=e.g=t,s,!0,e)&&r,r=jt(o,s,!1,e)&&r,n)for(i=0;inew zt),(t=>t.reset()));class zt{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}function Qt(t){_.setTimeout((()=>{throw t}),0)}function Wt(t,e){Gt||function(){var t=_.Promise.resolve(void 0);Gt=function(){t.then(Jt)}}(),Yt||(Gt(),Yt=!0),Xt.add(t,e)}var Yt=!1,Xt=new class{constructor(){this.h=this.g=null}add(t,e){const n=Ht.get();n.set(t,e),this.h?this.h.next=n:this.g=n,this.h=n}};function Jt(){for(var t;t=$t();){try{t.h.call(t.g)}catch(t){Qt(t)}var e=Ht;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Yt=!1}function Zt(t,e){qt.call(this),this.h=t||1,this.g=e||_,this.j=L(this.kb,this),this.l=Date.now()}function te(t){t.da=!1,t.S&&(t.g.clearTimeout(t.S),t.S=null)}function ee(t,e,n){if("function"==typeof t)n&&(t=L(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=L(t.handleEvent,t)}return 2147483647{t.g=null,t.i&&(t.i=!1,ne(t))}),t.j);const e=t.h;t.h=null,t.m.apply(null,e)}M(Zt,qt),(E=Zt.prototype).da=!1,E.S=null,E.kb=function(){if(this.da){var t=Date.now()-this.l;0s.length)){var r=s[1];if(Array.isArray(r)&&!(1>r.length)){var i=r[0];if("noop"!=i&&"stop"!=i&&"close"!=i)for(var o=1;oe.length?Le:(e=e.substr(s,n),t.C=s+n,e))}function Ue(t){t.Y=Date.now()+t.P,qe(t,t.P)}function qe(t,e){if(null!=t.B)throw Error("WatchDog timer not null");t.B=we(L(t.eb,t),e)}function Be(t){t.B&&(_.clearTimeout(t.B),t.B=null)}function je(t){0==t.l.G||t.I||ds(t.l,t)}function Ke(t){Be(t);var e=t.L;e&&"function"==typeof e.na&&e.na(),t.L=null,te(t.W),ae(t.V),t.g&&(e=t.g,t.g=null,e.abort(),e.na())}function $e(t,e){try{var n=t.l;if(0!=n.G&&(n.g==t||In(n.i,t)))if(n.I=t.N,!t.J&&In(n.i,t)&&3==n.G){try{var s=n.Ca.g.parse(e)}catch(t){s=null}if(Array.isArray(s)&&3==s.length){var r=s;if(0==r[0]){t:if(!n.u){if(n.g){if(!(n.g.F+3e3r[2]&&n.N&&0==n.A&&!n.v&&(n.v=we(L(n.ab,n),6e3));if(1>=En(n.i)&&n.ka){try{n.ka()}catch(t){}n.ka=void 0}}else gs(n,11)}else if((t.J||n.g==t)&&ls(n),!j(e))for(r=n.Ca.g.parse(e),e=0;eh)&&(3!=h||it||this.g&&(this.h.h||this.g.ga()||Wn(this.g)))){this.I||4!=h||7==e||ge(8==e||0>=l?3:2),Be(this);var n=this.g.ba();this.N=n;e:if(Fe(this)){var s=Wn(this.g);t="";var r=s.length,i=4==Qn(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){Ke(this),je(this);var o="";break e}this.h.i=new _.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function en(t,e,n){e instanceof fn?(t.h=e,function(t,e){e&&!t.j&&(gn(t),t.i=null,t.g.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(mn(this,e),yn(this,n,t))}),t)),t.j=e}(t.h,t.g)):(n||(e=on(e,ln)),t.h=new fn(e,t.g))}function nn(t,e,n){t.h.set(e,n)}function sn(t){return nn(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function rn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function on(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,an),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function an(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Ye.prototype.toString=function(){var t=[],e=this.j;e&&t.push(on(e,cn,!0),":");var n=this.i;return(n||"file"==e)&&(t.push("//"),(e=this.s)&&t.push(on(e,cn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&t.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&t.push("/"),t.push(on(n,"/"==n.charAt(0)?hn:un,!0))),(n=this.h.toString())&&t.push("?",n),(n=this.o)&&t.push("#",on(n,dn)),t.join("")};var cn=/[#\/\?@]/g,un=/[#\?:]/g,hn=/[#\?]/g,ln=/[#\?@]/g,dn=/#/g;function fn(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function gn(t){t.g||(t.g=new He,t.h=0,t.i&&function(t,e){if(t){t=t.split("&");for(var n=0;n2*t.i&&ze(t)))}function pn(t,e){return gn(t),e=wn(t,e),Qe(t.g.h,e)}function yn(t,e,n){mn(t,e),0=t.j}function En(t){return t.h?1:t.g?t.g.size:0}function In(t,e){return t.h?t.h==e:!!t.g&&t.g.has(e)}function Sn(t,e){t.g?t.g.add(e):t.h=e}function _n(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}function Nn(t){if(null!=t.h)return t.i.concat(t.h.D);if(null!=t.g&&0!==t.g.size){let e=t.i;for(const n of t.g.values())e=e.concat(n.D);return e}return B(t.i)}function An(){}function Dn(){this.g=new An}function xn(t,e,n){const s=n||"";try{Ge(t,(function(t,n){let r=t;D(t)&&(r=Kt(t)),e.push(s+n+"="+encodeURIComponent(r))}))}catch(t){throw e.push(s+"type="+encodeURIComponent("_badmap")),t}}function Cn(t,e,n,s,r){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,r(s)}catch(t){}}function kn(t){this.l=t.$b||null,this.j=t.ib||!1}function Rn(t,e){qt.call(this),this.D=t,this.u=e,this.m=void 0,this.readyState=Ln,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}vn.prototype.cancel=function(){if(this.i=Nn(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const t of this.g.values())t.cancel();this.g.clear()}},An.prototype.stringify=function(t){return _.JSON.stringify(t,void 0)},An.prototype.parse=function(t){return _.JSON.parse(t,void 0)},M(kn,Te),kn.prototype.g=function(){return new Rn(this.l,this.j)},kn.prototype.i=function(t){return function(){return t}}({}),M(Rn,qt);var Ln=0;function On(t){t.j.read().then(t.Sa.bind(t)).catch(t.ha.bind(t))}function Mn(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Fn(t)}function Fn(t){t.onreadystatechange&&t.onreadystatechange.call(t)}(E=Rn.prototype).open=function(t,e){if(this.readyState!=Ln)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Fn(this)},E.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.D||_).fetch(new Request(this.B,e)).then(this.Va.bind(this),this.ha.bind(this))},E.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Mn(this)),this.readyState=Ln},E.Va=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Fn(this)),this.g&&(this.readyState=3,Fn(this),this.g)))if("arraybuffer"===this.responseType)t.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(void 0!==_.ReadableStream&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;On(this)}else t.text().then(this.Ua.bind(this),this.ha.bind(this))},E.Sa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?Mn(this):Fn(this),3==this.readyState&&On(this)}},E.Ua=function(t){this.g&&(this.response=this.responseText=t,Mn(this))},E.Ta=function(t){this.g&&(this.response=t,Mn(this))},E.ha=function(){this.g&&Mn(this)},E.setRequestHeader=function(t,e){this.v.append(t,e)},E.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""},E.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(Rn.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(t){this.m=t?"include":"same-origin"}});var Pn=_.JSON.parse;function Vn(t){qt.call(this),this.headers=new He,this.u=t||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Un,this.K=this.L=!1}M(Vn,qt);var Un="",qn=/^https?$/i,Bn=["POST","PUT"];function jn(t){return"content-type"==t.toLowerCase()}function Kn(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,$n(t),Hn(t)}function $n(t){t.D||(t.D=!0,Bt(t,"complete"),Bt(t,"error"))}function Gn(t){if(t.h&&void 0!==S&&(!t.C[1]||4!=Qn(t)||2!=t.ba()))if(t.v&&4==Qn(t))ee(t.Fa,0,t);else if(Bt(t,"readystatechange"),4==Qn(t)){t.h=!1;try{const a=t.ba();t:switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break t;default:e=!1}var n;if(!(n=e)){var s;if(s=0===a){var r=String(t.H).match(We)[1]||null;if(!r&&_.self&&_.self.location){var i=_.self.location.protocol;r=i.substr(0,i.length-1)}s=!qn.test(r?r.toLowerCase():"")}n=s}if(n)Bt(t,"complete"),Bt(t,"success");else{t.m=6;try{var o=2n)e=Math.max(0,r[o].h-100),i=!1;else try{xn(a,t,"req"+n+"_")}catch(t){s&&s(a)}}if(i){s=t.join("&");break t}}}return t=t.l.splice(0,n),e.D=t,s}function as(t){t.g||t.u||(t.Y=1,Wt(t.Ga,t),t.A=0)}function cs(t){return!(t.g||t.u||3<=t.A)&&(t.Y++,t.u=we(L(t.Ga,t),fs(t,t.A)),t.A++,!0)}function us(t){null!=t.B&&(_.clearTimeout(t.B),t.B=null)}function hs(t){t.g=new xe(t,t.h,"rpc",t.Y),null===t.o&&(t.g.H=t.s),t.g.O=0;var e=Xe(t.oa);nn(e,"RID","rpc"),nn(e,"SID",t.J),nn(e,"CI",t.N?"0":"1"),nn(e,"AID",t.U),is(t,e),nn(e,"TYPE","xmlhttp"),t.o&&t.s&&Yn(e,t.o,t.s),t.K&&t.g.setTimeout(t.K);var n=t.g;t=t.la,n.K=1,n.v=sn(Xe(e)),n.s=null,n.U=!0,Me(n,t)}function ls(t){null!=t.v&&(_.clearTimeout(t.v),t.v=null)}function ds(t,e){var n=null;if(t.g==e){ls(t),us(t),t.g=null;var s=2}else{if(!In(t.i,e))return;n=e.D,_n(t.i,e),s=1}if(t.I=e.N,0!=t.G)if(e.i)if(1==s){n=e.s?e.s.length:0,e=Date.now()-e.F;var r=t.C;Bt(s=de(),new ye(s,n,e,r)),ss(t)}else as(t);else if(3==(r=e.o)||0==r&&0=t.i.j-(t.m?1:0)||(t.m?(t.l=e.D.concat(t.l),0):1==t.G||2==t.G||t.C>=(t.Xa?0:t.Ya)||(t.m=we(L(t.Ha,t,e),fs(t,t.C)),t.C++,0)))}(t,e)||2==s&&cs(t)))switch(n&&0e?null:"string"==typeof t?t.charAt(e):t[e]}(r.T()),n=_.FormData&&t instanceof _.FormData,!(0<=V(Bn,e))||s||n||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r.forEach((function(t,e){this.g.setRequestHeader(e,t)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{zn(this),0=this.O)){var t=2*this.O;this.h.info("BP detection timer enabled: "+t),this.B=we(L(this.bb,this),t)}},E.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,pe(10),ts(this),hs(this))},E.ab=function(){null!=this.v&&(this.v=null,ts(this),cs(this),pe(19))},E.jb=function(t){t?(this.h.info("Successfully pinged google.com"),pe(2)):(this.h.info("Failed to ping google.com"),pe(1))},(E=ws.prototype).xa=function(){},E.wa=function(){},E.va=function(){},E.ua=function(){},E.Oa=function(){},vs.prototype.g=function(t,e){return new bs(t,e)},M(bs,qt),bs.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var t=this.g,e=this.l,n=this.h||void 0;t.Wa&&(t.h.info("Origin Trials enabled."),Wt(L(t.hb,t,e))),pe(0),t.W=e,t.aa=n||{},t.N=t.X,t.F=ps(t,null,t.W),ss(t)},bs.prototype.close=function(){Zn(this.g)},bs.prototype.u=function(t){if("string"==typeof t){var e={};e.__data__=t,ns(this.g,e)}else this.v?((e={}).__data__=Kt(t),ns(this.g,e)):ns(this.g,t)},bs.prototype.M=function(){this.g.j=null,delete this.j,Zn(this.g),delete this.g,bs.Z.M.call(this)},M(Ts,Ne),M(Es,Ae),M(Is,ws),Is.prototype.xa=function(){Bt(this.g,"a")},Is.prototype.wa=function(t){Bt(this.g,new Ts(t))},Is.prototype.va=function(t){Bt(this.g,new Es(t))},Is.prototype.ua=function(){Bt(this.g,"b")},vs.prototype.createWebChannel=vs.prototype.g,bs.prototype.send=bs.prototype.u,bs.prototype.open=bs.prototype.m,bs.prototype.close=bs.prototype.close,ve.NO_ERROR=0,ve.TIMEOUT=8,ve.HTTP_ERROR=6,be.COMPLETE="complete",Ie.EventType=_e,_e.OPEN="a",_e.CLOSE="b",_e.ERROR="c",_e.MESSAGE="d",qt.prototype.listen=qt.prototype.N,Vn.prototype.listenOnce=Vn.prototype.O,Vn.prototype.getLastError=Vn.prototype.La,Vn.prototype.getLastErrorCode=Vn.prototype.Da,Vn.prototype.getStatus=Vn.prototype.ba,Vn.prototype.getResponseJson=Vn.prototype.Qa,Vn.prototype.getResponseText=Vn.prototype.ga,Vn.prototype.send=Vn.prototype.ea;var Ss=ve,_s=be,Ns=he,As=10,Ds=11,xs=kn,Cs=Ie,ks=Vn;const Rs="@firebase/firestore"; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ls{constructor(t){this.uid=t}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}Ls.UNAUTHENTICATED=new Ls(null),Ls.GOOGLE_CREDENTIALS=new Ls("google-credentials-uid"),Ls.FIRST_PARTY=new Ls("first-party-uid"),Ls.MOCK_USER=new Ls("mock-user"); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +let Os="9.3.0"; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ms=new class{constructor(t){this.name=t,this._logLevel=v,this._logHandler=T,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in p))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel="string"==typeof t?w[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,p.DEBUG,...t),this._logHandler(this,p.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,p.VERBOSE,...t),this._logHandler(this,p.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,p.INFO,...t),this._logHandler(this,p.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,p.WARN,...t),this._logHandler(this,p.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,p.ERROR,...t),this._logHandler(this,p.ERROR,...t)}}("@firebase/firestore");function Fs(){return Ms.logLevel}function Ps(t){Ms.setLogLevel(t)}function Vs(t,...e){if(Ms.logLevel<=p.DEBUG){const n=e.map(Bs);Ms.debug(`Firestore (${Os}): ${t}`,...n)}}function Us(t,...e){if(Ms.logLevel<=p.ERROR){const n=e.map(Bs);Ms.error(`Firestore (${Os}): ${t}`,...n)}}function qs(t,...e){if(Ms.logLevel<=p.WARN){const n=e.map(Bs);Ms.warn(`Firestore (${Os}): ${t}`,...n)}}function Bs(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var e} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function js(t="Unexpected state"){const e=`FIRESTORE (${Os}) INTERNAL ASSERTION FAILED: `+t;throw Us(e),new Error(e)}function Ks(t,e){t||js()}function $s(t,e){t||js()}function Gs(t,e){return t} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Hs={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class zs extends Error{constructor(t,e){super(e),this.code=t,this.message=e,this.name="FirebaseError",this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qs{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ws{constructor(t,e){this.user=e,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization=`Bearer ${t}`}}class Ys{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable((()=>e(Ls.UNAUTHENTICATED)))}shutdown(){}}class Xs{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable((()=>e(this.token.user)))}shutdown(){this.changeListener=null}}class Js{constructor(t){this.t=t,this.currentUser=Ls.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){let n=this.i;const s=t=>this.i!==n?(n=this.i,e(t)):Promise.resolve();let r=new Qs;this.o=()=>{this.i++,this.currentUser=this.u(),r.resolve(),r=new Qs,t.enqueueRetryable((()=>s(this.currentUser)))};const i=()=>{const e=r;t.enqueueRetryable((async()=>{await e.promise,await s(this.currentUser)}))},o=t=>{Vs("FirebaseCredentialsProvider","Auth detected"),this.auth=t,this.auth.addAuthTokenListener(this.o),i()};this.t.onInit((t=>o(t))),setTimeout((()=>{if(!this.auth){const t=this.t.getImmediate({optional:!0});t?o(t):(Vs("FirebaseCredentialsProvider","Auth not yet detected"),r.resolve(),r=new Qs)}}),0),i()}getToken(){const t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then((e=>this.i!==t?(Vs("FirebaseCredentialsProvider","getToken aborted due to token change."),this.getToken()):e?(Ks("string"==typeof e.accessToken),new Ws(e.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return Ks(null===t||"string"==typeof t),new Ls(t)}}class Zs{constructor(t,e,n){this.h=t,this.l=e,this.m=n,this.type="FirstParty",this.user=Ls.FIRST_PARTY}get authHeaders(){const t={"X-Goog-AuthUser":this.l},e=this.h.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),this.m&&(t["X-Goog-Iam-Authorization-Token"]=this.m),t}}class tr{constructor(t,e,n){this.h=t,this.l=e,this.m=n}getToken(){return Promise.resolve(new Zs(this.h,this.l,this.m))}start(t,e){t.enqueueRetryable((()=>e(Ls.FIRST_PARTY)))}shutdown(){}invalidateToken(){}} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class er{constructor(t,e){this.previousValue=t,e&&(e.sequenceNumberHandler=t=>this.g(t),this.p=t=>e.writeSequenceNumber(t))}g(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.p&&this.p(t),t}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function nr(t){const e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(let e=0;ee?1:0}function ir(t,e,n){return t.length===e.length&&t.every(((t,s)=>n(t,e[s])))}function or(t){return t+"\0"} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ar{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return ar.fromMillis(Date.now())}static fromDate(t){return ar.fromMillis(t.getTime())}static fromMillis(t){const e=Math.floor(t/1e3),n=Math.floor(1e6*(t-1e3*e));return new ar(e,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?rr(this.nanoseconds,t.nanoseconds):rr(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class cr{constructor(t){this.timestamp=t}static fromTimestamp(t){return new cr(t)}static min(){return new cr(new ar(0,0))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ur(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function hr(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function lr(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dr{constructor(t,e,n){void 0===e?e=0:e>t.length&&js(),void 0===n?n=t.length-e:n>t.length-e&&js(),this.segments=t,this.offset=e,this.len=n}get length(){return this.len}isEqual(t){return 0===dr.comparator(this,t)}child(t){const e=this.segments.slice(this.offset,this.limit());return t instanceof dr?t.forEach((t=>{e.push(t)})):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return t=void 0===t?1:t,this.construct(this.segments,this.offset+t,this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return 0===this.length}isPrefixOf(t){if(t.lengthr)return 1}return t.lengthe.length?1:0}}class fr extends dr{construct(t,e,n){return new fr(t,e,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...t){const e=[];for(const n of t){if(n.indexOf("//")>=0)throw new zs(Hs.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);e.push(...n.split("/").filter((t=>t.length>0)))}return new fr(e)}static emptyPath(){return new fr([])}}const gr=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class mr extends dr{construct(t,e,n){return new mr(t,e,n)}static isValidIdentifier(t){return gr.test(t)}canonicalString(){return this.toArray().map((t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),mr.isValidIdentifier(t)||(t="`"+t+"`"),t))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new mr(["__name__"])}static fromServerFormat(t){const e=[];let n="",s=0;const r=()=>{if(0===n.length)throw new zs(Hs.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(n),n=""};let i=!1;for(;st.isEqual(e)))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function yr(){return"undefined"!=typeof atob} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class wr{constructor(t){this.binaryString=t}static fromBase64String(t){const e=atob(t);return new wr(e)}static fromUint8Array(t){const e=function(t){let e="";for(let n=0;n=Number.MIN_SAFE_INTEGER} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xr{constructor(t){this.path=t}static fromPath(t){return new xr(fr.fromString(t))}static fromName(t){return new xr(fr.fromString(t).popFirst(5))}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}isEqual(t){return null!==t&&0===fr.comparator(this.path,t.path)}toString(){return this.path.toString()}static comparator(t,e){return fr.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new xr(new fr(t.slice()))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Cr(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Ir(t)?4:10:js()}function kr(t,e){const n=Cr(t);if(n!==Cr(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return _r(t).isEqual(_r(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;const n=br(t.timestampValue),s=br(e.timestampValue);return n.seconds===s.seconds&&n.nanos===s.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return Er(t.bytesValue).isEqual(Er(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return Tr(t.geoPointValue.latitude)===Tr(e.geoPointValue.latitude)&&Tr(t.geoPointValue.longitude)===Tr(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return Tr(t.integerValue)===Tr(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){const n=Tr(t.doubleValue),s=Tr(e.doubleValue);return n===s?Ar(n)===Ar(s):isNaN(n)&&isNaN(s)}return!1}(t,e);case 9:return ir(t.arrayValue.values||[],e.arrayValue.values||[],kr);case 10:return function(t,e){const n=t.mapValue.fields||{},s=e.mapValue.fields||{};if(ur(n)!==ur(s))return!1;for(const t in n)if(n.hasOwnProperty(t)&&(void 0===s[t]||!kr(n[t],s[t])))return!1;return!0}(t,e);default:return js()}}function Rr(t,e){return void 0!==(t.values||[]).find((t=>kr(t,e)))}function Lr(t,e){const n=Cr(t),s=Cr(e);if(n!==s)return rr(n,s);switch(n){case 0:return 0;case 1:return rr(t.booleanValue,e.booleanValue);case 2:return function(t,e){const n=Tr(t.integerValue||t.doubleValue),s=Tr(e.integerValue||e.doubleValue);return ns?1:n===s?0:isNaN(n)?isNaN(s)?0:-1:1}(t,e);case 3:return Or(t.timestampValue,e.timestampValue);case 4:return Or(_r(t),_r(e));case 5:return rr(t.stringValue,e.stringValue);case 6:return function(t,e){const n=Er(t),s=Er(e);return n.compareTo(s)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){const n=t.split("/"),s=e.split("/");for(let t=0;te.mapValue.fields[t]=Kr(n))),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Kr(t.arrayValue.values[n]);return e}return Object.assign({},t)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class $r{constructor(t){this.value=t}static empty(){return new $r({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let n=0;n{if(!e.isImmediateParentOf(r)){const t=this.getFieldsMap(e);this.applyChanges(t,n,s),n={},s=[],e=r.popLast()}t?n[r.lastSegment()]=Kr(t):s.push(r.lastSegment())}));const r=this.getFieldsMap(e);this.applyChanges(r,n,s)}delete(t){const e=this.field(t.popLast());jr(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return kr(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let n=0;nt[e]=n));for(const e of n)delete t[e]}clone(){return new $r(Kr(this.value))}}function Gr(t){const e=[];return hr(t.fields,((t,n)=>{const s=new mr([t]);if(jr(n)){const t=Gr(n.mapValue).fields;if(0===t.length)e.push(s);else for(const n of t)e.push(s.child(n))}else e.push(s)})),new pr(e) +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class Hr{constructor(t,e,n,s,r){this.key=t,this.documentType=e,this.version=n,this.data=s,this.documentState=r}static newInvalidDocument(t){return new Hr(t,0,cr.min(),$r.empty(),0)}static newFoundDocument(t,e,n){return new Hr(t,1,e,n,0)}static newNoDocument(t,e){return new Hr(t,2,e,$r.empty(),0)}static newUnknownDocument(t,e){return new Hr(t,3,e,$r.empty(),2)}convertToFoundDocument(t,e){return this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=$r.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=$r.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(t){return t instanceof Hr&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}clone(){return new Hr(this.key,this.documentType,this.version,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zr{constructor(t,e=null,n=[],s=[],r=null,i=null,o=null){this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=s,this.limit=r,this.startAt=i,this.endAt=o,this.A=null}}function Qr(t,e=null,n=[],s=[],r=null,i=null,o=null){return new zr(t,e,n,s,r,i,o)}function Wr(t){const e=Gs(t);if(null===e.A){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map((t=>function(t){return t.field.canonicalString()+t.op.toString()+Mr(t.value)}(t))).join(","),t+="|ob:",t+=e.orderBy.map((t=>function(t){return t.field.canonicalString()+t.dir}(t))).join(","),Nr(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=ci(e.startAt)),e.endAt&&(t+="|ub:",t+=ci(e.endAt)),e.A=t}return e.A}function Yr(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n":return t>0;case">=":return t>=0;default:return js()}}v(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class Zr extends Jr{constructor(t,e,n){super(t,e,n),this.key=xr.fromName(n.referenceValue)}matches(t){const e=xr.comparator(t.key,this.key);return this.P(e)}}class ti extends Jr{constructor(t,e){super(t,"in",e),this.keys=ni("in",e)}matches(t){return this.keys.some((e=>e.isEqual(t.key)))}}class ei extends Jr{constructor(t,e){super(t,"not-in",e),this.keys=ni("not-in",e)}matches(t){return!this.keys.some((e=>e.isEqual(t.key)))}}function ni(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((t=>xr.fromName(t.referenceValue)))}class si extends Jr{constructor(t,e){super(t,"array-contains",e)}matches(t){const e=t.data.field(this.field);return Ur(e)&&Rr(e.arrayValue,this.value)}}class ri extends Jr{constructor(t,e){super(t,"in",e)}matches(t){const e=t.data.field(this.field);return null!==e&&Rr(this.value.arrayValue,e)}}class ii extends Jr{constructor(t,e){super(t,"not-in",e)}matches(t){if(Rr(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const e=t.data.field(this.field);return null!==e&&!Rr(this.value.arrayValue,e)}}class oi extends Jr{constructor(t,e){super(t,"array-contains-any",e)}matches(t){const e=t.data.field(this.field);return!(!Ur(e)||!e.arrayValue.values)&&e.arrayValue.values.some((t=>Rr(this.value.arrayValue,t)))}}class ai{constructor(t,e){this.position=t,this.before=e}}function ci(t){return`${t.before?"b":"a"}:${t.position.map((t=>Mr(t))).join(",")}`}class ui{constructor(t,e="asc"){this.field=t,this.dir=e}}function hi(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function li(t,e,n){let s=0;for(let r=0;r0?t.explicitOrderBy[0].field:null}function vi(t){for(const e of t.filters)if(e.v())return e.field;return null}function bi(t){return null!==t.collectionGroup}function Ti(t){const e=Gs(t);if(null===e.V){e.V=[];const t=vi(e),n=wi(e);if(null!==t&&null===n)t.isKeyField()||e.V.push(new ui(t)),e.V.push(new ui(mr.keyField(),"asc"));else{let t=!1;for(const n of e.explicitOrderBy)e.V.push(n),n.field.isKeyField()&&(t=!0);if(!t){const t=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.V.push(new ui(mr.keyField(),t))}}}return e.V}function Ei(t){const e=Gs(t);if(!e.S)if("F"===e.limitType)e.S=Qr(e.path,e.collectionGroup,Ti(e),e.filters,e.limit,e.startAt,e.endAt);else{const t=[];for(const n of Ti(e)){const e="desc"===n.dir?"asc":"desc";t.push(new ui(n.field,e))}const n=e.endAt?new ai(e.endAt.position,!e.endAt.before):null,s=e.startAt?new ai(e.startAt.position,!e.startAt.before):null;e.S=Qr(e.path,e.collectionGroup,t,e.filters,e.limit,n,s)}return e.S}function Ii(t,e,n){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Si(t,e){return Yr(Ei(t),Ei(e))&&t.limitType===e.limitType}function _i(t){return`${Wr(Ei(t))}|lt:${t.limitType}`}function Ni(t){return`Query(target=${function(t){let e=t.path.canonicalString();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=`, filters: [${t.filters.map((t=>{var e;return`${(e=t).field.canonicalString()} ${e.op} ${Mr(e.value)}`})).join(", ")}]`),Nr(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=`, orderBy: [${t.orderBy.map((t=>function(t){return`${t.field.canonicalString()} (${t.dir})`}(t))).join(", ")}]`),t.startAt&&(e+=", startAt: "+ci(t.startAt)),t.endAt&&(e+=", endAt: "+ci(t.endAt)),`Target(${e})`}(Ei(t))}; limitType=${t.limitType})`}function Ai(t,e){return e.isFoundDocument()&&function(t,e){const n=e.key.path;return null!==t.collectionGroup?e.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(n):xr.isDocumentKey(t.path)?t.path.isEqual(n):t.path.isImmediateParentOf(n)}(t,e)&&function(t,e){for(const n of t.explicitOrderBy)if(!n.field.isKeyField()&&null===e.data.field(n.field))return!1;return!0}(t,e)&&function(t,e){for(const n of t.filters)if(!n.matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!li(t.startAt,Ti(t),e))&&(!t.endAt||!li(t.endAt,Ti(t),e))}(t,e)}function Di(t){return(e,n)=>{let s=!1;for(const r of Ti(t)){const t=xi(r,e,n);if(0!==t)return t;s=s||r.field.isKeyField()}return 0}}function xi(t,e,n){const s=t.field.isKeyField()?xr.comparator(e.key,n.key):function(t,e,n){const s=e.data.field(t),r=n.data.field(t);return null!==s&&null!==r?Lr(s,r):js()}(t.field,e,n);switch(t.dir){case"asc":return s;case"desc":return-1*s;default:return js()}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ci(t,e){if(t.D){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Ar(e)?"-0":e}}function ki(t){return{integerValue:""+t}}function Ri(t,e){return Dr(e)?ki(e):Ci(t,e)} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Li{constructor(){this._=void 0}}function Oi(t,e,n){return t instanceof Pi?function(t,e){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof Vi?Ui(t,e):t instanceof qi?Bi(t,e):function(t,e){const n=Fi(t,e),s=Ki(n)+Ki(t.C);return Vr(n)&&Vr(t.C)?ki(s):Ci(t.N,s)}(t,e)}function Mi(t,e,n){return t instanceof Vi?Ui(t,e):t instanceof qi?Bi(t,e):n}function Fi(t,e){var n;return t instanceof ji?Vr(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null}class Pi extends Li{}class Vi extends Li{constructor(t){super(),this.elements=t}}function Ui(t,e){const n=$i(e);for(const e of t.elements)n.some((t=>kr(t,e)))||n.push(e);return{arrayValue:{values:n}}}class qi extends Li{constructor(t){super(),this.elements=t}}function Bi(t,e){let n=$i(e);for(const e of t.elements)n=n.filter((t=>!kr(t,e)));return{arrayValue:{values:n}}}class ji extends Li{constructor(t,e){super(),this.N=t,this.C=e}}function Ki(t){return Tr(t.integerValue||t.doubleValue)}function $i(t){return Ur(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Gi{constructor(t,e){this.field=t,this.transform=e}}class Hi{constructor(t,e){this.version=t,this.transformResults=e}}class zi{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new zi}static exists(t){return new zi(void 0,t)}static updateTime(t){return new zi(t)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Qi(t,e){return void 0!==t.updateTime?e.isFoundDocument()&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e.isFoundDocument()}class Wi{}function Yi(t,e,n){t instanceof eo?function(t,e,n){const s=t.value.clone(),r=ro(t.fieldTransforms,e,n.transformResults);s.setAll(r),e.convertToFoundDocument(n.version,s).setHasCommittedMutations()}(t,e,n):t instanceof no?function(t,e,n){if(!Qi(t.precondition,e))return void e.convertToUnknownDocument(n.version);const s=ro(t.fieldTransforms,e,n.transformResults),r=e.data;r.setAll(so(t)),r.setAll(s),e.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(t,e,n):function(t,e,n){e.convertToNoDocument(n.version).setHasCommittedMutations()}(0,e,n)}function Xi(t,e,n){t instanceof eo?function(t,e,n){if(!Qi(t.precondition,e))return;const s=t.value.clone(),r=io(t.fieldTransforms,n,e);s.setAll(r),e.convertToFoundDocument(to(e),s).setHasLocalMutations()}(t,e,n):t instanceof no?function(t,e,n){if(!Qi(t.precondition,e))return;const s=io(t.fieldTransforms,n,e),r=e.data;r.setAll(so(t)),r.setAll(s),e.convertToFoundDocument(to(e),r).setHasLocalMutations()}(t,e,n):function(t,e){Qi(t.precondition,e)&&e.convertToNoDocument(cr.min())}(t,e)}function Ji(t,e){let n=null;for(const s of t.fieldTransforms){const t=e.data.field(s.field),r=Fi(s.transform,t||null);null!=r&&(null==n&&(n=$r.empty()),n.set(s.field,r))}return n||null}function Zi(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(t,e){return void 0===t&&void 0===e||!(!t||!e)&&ir(t,e,((t,e)=>function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof Vi&&e instanceof Vi||t instanceof qi&&e instanceof qi?ir(t.elements,e.elements,kr):t instanceof ji&&e instanceof ji?kr(t.C,e.C):t instanceof Pi&&e instanceof Pi}(t.transform,e.transform)}(t,e)))}(t.fieldTransforms,e.fieldTransforms)&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}function to(t){return t.isFoundDocument()?t.version:cr.min()}class eo extends Wi{constructor(t,e,n,s=[]){super(),this.key=t,this.value=e,this.precondition=n,this.fieldTransforms=s,this.type=0}}class no extends Wi{constructor(t,e,n,s,r=[]){super(),this.key=t,this.data=e,this.fieldMask=n,this.precondition=s,this.fieldTransforms=r,this.type=1}}function so(t){const e=new Map;return t.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const s=t.data.field(n);e.set(n,s)}})),e}function ro(t,e,n){const s=new Map;Ks(t.length===n.length);for(let r=0;r0&&(e=e.right)}return null}indexOf(t){let e=0,n=this.root;for(;!n.isEmpty();){const s=this.comparator(t,n.key);if(0===s)return e+n.left.size;s<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal(((e,n)=>(t(e,n),!1)))}toString(){const t=[];return this.inorderTraversal(((e,n)=>(t.push(`${e}:${n}`),!1))),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new mo(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new mo(this.root,t,this.comparator,!1)}getReverseIterator(){return new mo(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new mo(this.root,t,this.comparator,!0)}}class mo{constructor(t,e,n,s){this.isReverse=s,this.nodeStack=[];let r=1;for(;!t.isEmpty();)if(r=e?n(t.key,e):1,s&&(r*=-1),r<0)t=this.isReverse?t.left:t.right;else{if(0===r){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class po{constructor(t,e,n,s,r){this.key=t,this.value=e,this.color=null!=n?n:po.RED,this.left=null!=s?s:po.EMPTY,this.right=null!=r?r:po.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,n,s,r){return new po(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=s?s:this.left,null!=r?r:this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,n){let s=this;const r=n(t,s.key);return s=r<0?s.copy(null,null,null,s.left.insert(t,e,n),null):0===r?s.copy(null,e,null,null,null):s.copy(null,null,null,null,s.right.insert(t,e,n)),s.fixUp()}removeMin(){if(this.left.isEmpty())return po.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let n,s=this;if(e(t,s.key)<0)s.left.isEmpty()||s.left.isRed()||s.left.left.isRed()||(s=s.moveRedLeft()),s=s.copy(null,null,null,s.left.remove(t,e),null);else{if(s.left.isRed()&&(s=s.rotateRight()),s.right.isEmpty()||s.right.isRed()||s.right.left.isRed()||(s=s.moveRedRight()),0===e(t,s.key)){if(s.right.isEmpty())return po.EMPTY;n=s.right.min(),s=s.copy(n.key,n.value,null,null,s.right.removeMin())}s=s.copy(null,null,null,null,s.right.remove(t,e))}return s.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,po.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,po.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw js();if(this.right.isRed())throw js();const t=this.left.check();if(t!==this.right.check())throw js();return t+(this.isRed()?0:1)}}po.EMPTY=null,po.RED=!0,po.BLACK=!1,po.EMPTY=new class{constructor(){this.size=0}get key(){throw js()}get value(){throw js()}get color(){throw js()}get left(){throw js()}get right(){throw js()}copy(t,e,n,s,r){return this}insert(t,e,n){return new po(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class yo{constructor(t){this.comparator=t,this.data=new go(this.comparator)}has(t){return null!==this.data.get(t)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal(((e,n)=>(t(e),!1)))}forEachInRange(t,e){const n=this.data.getIteratorFrom(t[0]);for(;n.hasNext();){const s=n.getNext();if(this.comparator(s.key,t[1])>=0)return;e(s.key)}}forEachWhile(t,e){let n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return}firstAfterOrEqual(t){const e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new wo(this.data.getIterator())}getIteratorFrom(t){return new wo(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(t)})),e}isEqual(t){if(!(t instanceof yo))return!1;if(this.size!==t.size)return!1;const e=this.data.getIterator(),n=t.data.getIterator();for(;e.hasNext();){const t=e.getNext().key,s=n.getNext().key;if(0!==this.comparator(t,s))return!1}return!0}toArray(){const t=[];return this.forEach((e=>{t.push(e)})),t}toString(){const t=[];return this.forEach((e=>t.push(e))),"SortedSet("+t.toString()+")"}copy(t){const e=new yo(this.comparator);return e.data=t,e}}class wo{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vo=new go(xr.comparator);function bo(){return vo}const To=new go(xr.comparator);function Eo(){return To}const Io=new go(xr.comparator);function So(){return Io}const _o=new yo(xr.comparator);function No(...t){let e=_o;for(const n of t)e=e.add(n);return e}const Ao=new yo(rr);function Do(){return Ao} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xo{constructor(t,e,n,s,r){this.snapshotVersion=t,this.targetChanges=e,this.targetMismatches=n,this.documentUpdates=s,this.resolvedLimboDocuments=r}static createSynthesizedRemoteEventForCurrentChange(t,e){const n=new Map;return n.set(t,Co.createSynthesizedTargetChangeForCurrentChange(t,e)),new xo(cr.min(),n,Do(),bo(),No())}}class Co{constructor(t,e,n,s,r){this.resumeToken=t,this.current=e,this.addedDocuments=n,this.modifiedDocuments=s,this.removedDocuments=r}static createSynthesizedTargetChangeForCurrentChange(t,e){return new Co(wr.EMPTY_BYTE_STRING,e,No(),No(),No())}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ko{constructor(t,e,n,s){this.k=t,this.removedTargetIds=e,this.key=n,this.$=s}}class Ro{constructor(t,e){this.targetId=t,this.O=e}}class Lo{constructor(t,e,n=wr.EMPTY_BYTE_STRING,s=null){this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=s}}class Oo{constructor(){this.F=0,this.M=Po(),this.L=wr.EMPTY_BYTE_STRING,this.B=!1,this.U=!0}get current(){return this.B}get resumeToken(){return this.L}get q(){return 0!==this.F}get K(){return this.U}j(t){t.approximateByteSize()>0&&(this.U=!0,this.L=t)}W(){let t=No(),e=No(),n=No();return this.M.forEach(((s,r)=>{switch(r){case 0:t=t.add(s);break;case 2:e=e.add(s);break;case 1:n=n.add(s);break;default:js()}})),new Co(this.L,this.B,t,e,n)}G(){this.U=!1,this.M=Po()}H(t,e){this.U=!0,this.M=this.M.insert(t,e)}J(t){this.U=!0,this.M=this.M.remove(t)}Y(){this.F+=1}X(){this.F-=1}Z(){this.U=!0,this.B=!0}}class Mo{constructor(t){this.tt=t,this.et=new Map,this.nt=bo(),this.st=Fo(),this.it=new yo(rr)}rt(t){for(const e of t.k)t.$&&t.$.isFoundDocument()?this.ot(e,t.$):this.ct(e,t.key,t.$);for(const e of t.removedTargetIds)this.ct(e,t.key,t.$)}at(t){this.forEachTarget(t,(e=>{const n=this.ut(e);switch(t.state){case 0:this.ht(e)&&n.j(t.resumeToken);break;case 1:n.X(),n.q||n.G(),n.j(t.resumeToken);break;case 2:n.X(),n.q||this.removeTarget(e);break;case 3:this.ht(e)&&(n.Z(),n.j(t.resumeToken));break;case 4:this.ht(e)&&(this.lt(e),n.j(t.resumeToken));break;default:js()}}))}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.et.forEach(((t,n)=>{this.ht(n)&&e(n)}))}ft(t){const e=t.targetId,n=t.O.count,s=this.dt(e);if(s){const t=s.target;if(Xr(t))if(0===n){const n=new xr(t.path);this.ct(e,n,Hr.newNoDocument(n,cr.min()))}else Ks(1===n);else this.wt(e)!==n&&(this.lt(e),this.it=this.it.add(e))}}_t(t){const e=new Map;this.et.forEach(((n,s)=>{const r=this.dt(s);if(r){if(n.current&&Xr(r.target)){const e=new xr(r.target.path);null!==this.nt.get(e)||this.gt(s,e)||this.ct(s,e,Hr.newNoDocument(e,t))}n.K&&(e.set(s,n.W()),n.G())}}));let n=No();this.st.forEach(((t,e)=>{let s=!0;e.forEachWhile((t=>{const e=this.dt(t);return!e||2===e.purpose||(s=!1,!1)})),s&&(n=n.add(t))}));const s=new xo(t,e,this.it,this.nt,n);return this.nt=bo(),this.st=Fo(),this.it=new yo(rr),s}ot(t,e){if(!this.ht(t))return;const n=this.gt(t,e.key)?2:0;this.ut(t).H(e.key,n),this.nt=this.nt.insert(e.key,e),this.st=this.st.insert(e.key,this.yt(e.key).add(t))}ct(t,e,n){if(!this.ht(t))return;const s=this.ut(t);this.gt(t,e)?s.H(e,1):s.J(e),this.st=this.st.insert(e,this.yt(e).delete(t)),n&&(this.nt=this.nt.insert(e,n))}removeTarget(t){this.et.delete(t)}wt(t){const e=this.ut(t).W();return this.tt.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Y(t){this.ut(t).Y()}ut(t){let e=this.et.get(t);return e||(e=new Oo,this.et.set(t,e)),e}yt(t){let e=this.st.get(t);return e||(e=new yo(rr),this.st=this.st.insert(t,e)),e}ht(t){const e=null!==this.dt(t);return e||Vs("WatchChangeAggregator","Detected inactive target",t),e}dt(t){const e=this.et.get(t);return e&&e.q?null:this.tt.Tt(t)}lt(t){this.et.set(t,new Oo),this.tt.getRemoteKeysForTarget(t).forEach((e=>{this.ct(t,e,null)}))}gt(t,e){return this.tt.getRemoteKeysForTarget(t).has(e)}}function Fo(){return new go(xr.comparator)}function Po(){return new go(xr.comparator)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Vo={asc:"ASCENDING",desc:"DESCENDING"},Uo={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"};class qo{constructor(t,e){this.databaseId=t,this.D=e}}function Bo(t,e){return t.D?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function jo(t,e){return t.D?e.toBase64():e.toUint8Array()}function Ko(t,e){return Bo(t,e.toTimestamp())}function $o(t){return Ks(!!t),cr.fromTimestamp(function(t){const e=br(t);return new ar(e.seconds,e.nanos)}(t))}function Go(t,e){return function(t){return new fr(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).canonicalString()}function Ho(t){const e=fr.fromString(t);return Ks(pa(e)),e}function zo(t,e){return Go(t.databaseId,e.path)}function Qo(t,e){const n=Ho(e);if(n.get(1)!==t.databaseId.projectId)throw new zs(Hs.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new zs(Hs.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new xr(Jo(n))}function Wo(t,e){return Go(t.databaseId,e)}function Yo(t){const e=Ho(t);return 4===e.length?fr.emptyPath():Jo(e)}function Xo(t){return new fr(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function Jo(t){return Ks(t.length>4&&"documents"===t.get(4)),t.popFirst(5)}function Zo(t,e,n){return{name:zo(t,e),fields:n.value.mapValue.fields}}function ta(t,e,n){const s=Qo(t,e.name),r=$o(e.updateTime),i=new $r({mapValue:{fields:e.fields}}),o=Hr.newFoundDocument(s,r,i);return n&&o.setHasCommittedMutations(),n?o.setHasCommittedMutations():o}function ea(t,e){let n;if(e instanceof eo)n={update:Zo(t,e.key,e.value)};else if(e instanceof oo)n={delete:zo(t,e.key)};else if(e instanceof no)n={update:Zo(t,e.key,e.data),updateMask:ma(e.fieldMask)};else{if(!(e instanceof ao))return js();n={verify:zo(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((t=>function(t,e){const n=e.transform;if(n instanceof Pi)return{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Vi)return{fieldPath:e.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof qi)return{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof ji)return{fieldPath:e.field.canonicalString(),increment:n.C};throw js()}(0,t)))),e.precondition.isNone||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Ko(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:js()}(t,e.precondition)),n}function na(t,e){const n=e.currentDocument?function(t){return void 0!==t.updateTime?zi.updateTime($o(t.updateTime)):void 0!==t.exists?zi.exists(t.exists):zi.none()}(e.currentDocument):zi.none(),s=e.updateTransforms?e.updateTransforms.map((e=>function(t,e){let n=null;if("setToServerValue"in e)Ks("REQUEST_TIME"===e.setToServerValue),n=new Pi;else if("appendMissingElements"in e){const t=e.appendMissingElements.values||[];n=new Vi(t)}else if("removeAllFromArray"in e){const t=e.removeAllFromArray.values||[];n=new qi(t)}else"increment"in e?n=new ji(t,e.increment):js();const s=mr.fromServerFormat(e.fieldPath);return new Gi(s,n)}(t,e))):[];if(e.update){e.update.name;const r=Qo(t,e.update.name),i=new $r({mapValue:{fields:e.update.fields}});if(e.updateMask){const t=function(t){const e=t.fieldPaths||[];return new pr(e.map((t=>mr.fromServerFormat(t))))}(e.updateMask);return new no(r,i,t,n,s)}return new eo(r,i,n,s)}if(e.delete){const s=Qo(t,e.delete);return new oo(s,n)}if(e.verify){const s=Qo(t,e.verify);return new ao(s,n)}return js()}function sa(t,e){return{documents:[Wo(t,e.path)]}}function ra(t,e){const n={structuredQuery:{}},s=e.path;null!==e.collectionGroup?(n.parent=Wo(t,s),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Wo(t,s.popLast()),n.structuredQuery.from=[{collectionId:s.lastSegment()}]);const r=function(t){if(0===t.length)return;const e=t.map((t=>function(t){if("=="===t.op){if(Br(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NAN"}};if(qr(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(Br(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NOT_NAN"}};if(qr(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:la(t.field),op:ha(t.op),value:t.value}}}(t)));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}(e.filters);r&&(n.structuredQuery.where=r);const i=function(t){if(0!==t.length)return t.map((t=>function(t){return{field:la(t.field),direction:ua(t.dir)}}(t)))}(e.orderBy);i&&(n.structuredQuery.orderBy=i);const o=function(t,e){return t.D||Nr(e)?e:{value:e}}(t,e.limit);return null!==o&&(n.structuredQuery.limit=o),e.startAt&&(n.structuredQuery.startAt=aa(e.startAt)),e.endAt&&(n.structuredQuery.endAt=aa(e.endAt)),n}function ia(t){let e=Yo(t.parent);const n=t.structuredQuery,s=n.from?n.from.length:0;let r=null;if(s>0){Ks(1===s);const t=n.from[0];t.allDescendants?r=t.collectionId:e=e.child(t.collectionId)}let i=[];n.where&&(i=oa(n.where));let o=[];n.orderBy&&(o=n.orderBy.map((t=>function(t){return new ui(da(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t))));let a=null;n.limit&&(a=function(t){let e;return e="object"==typeof t?t.value:t,Nr(e)?null:e}(n.limit));let c=null;n.startAt&&(c=ca(n.startAt));let u=null;return n.endAt&&(u=ca(n.endAt)),gi(e,r,o,i,a,"F",c,u)}function oa(t){return t?void 0!==t.unaryFilter?[ga(t)]:void 0!==t.fieldFilter?[fa(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((t=>oa(t))).reduce(((t,e)=>t.concat(e))):js():[]}function aa(t){return{before:t.before,values:t.position}}function ca(t){const e=!!t.before,n=t.values||[];return new ai(n,e)}function ua(t){return Vo[t]}function ha(t){return Uo[t]}function la(t){return{fieldPath:t.canonicalString()}}function da(t){return mr.fromServerFormat(t.fieldPath)}function fa(t){return Jr.create(da(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return js()}}(t.fieldFilter.op),t.fieldFilter.value)}function ga(t){switch(t.unaryFilter.op){case"IS_NAN":const e=da(t.unaryFilter.field);return Jr.create(e,"==",{doubleValue:NaN});case"IS_NULL":const n=da(t.unaryFilter.field);return Jr.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=da(t.unaryFilter.field);return Jr.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const r=da(t.unaryFilter.field);return Jr.create(r,"!=",{nullValue:"NULL_VALUE"});default:return js()}}function ma(t){const e=[];return t.fields.forEach((t=>e.push(t.canonicalString()))),{fieldPaths:e}}function pa(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ya(t){let e="";for(let n=0;n0&&(e=va(e)),e=wa(t.get(n),e);return va(e)}function wa(t,e){let n=e;const s=t.length;for(let e=0;e=2),2===e)return Ks(""===t.charAt(0)&&""===t.charAt(1)),fr.emptyPath();const n=e-2,s=[];let r="";for(let i=0;in)&&js(),t.charAt(e+1)){case"":const n=t.substring(i,e);let o;0===r.length?o=n:(r+=n,o=r,r=""),s.push(o);break;case"":r+=t.substring(i,e),r+="\0";break;case"":r+=t.substring(i,e+1);break;default:js()}i=e+2}return new fr(s)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ta{constructor(t,e){this.seconds=t,this.nanoseconds=e}}class Ea{constructor(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n}}Ea.store="owner",Ea.key="owner";class Ia{constructor(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n}}Ia.store="mutationQueues",Ia.keyPath="userId";class Sa{constructor(t,e,n,s,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=s,this.mutations=r}}Sa.store="mutations",Sa.keyPath="batchId",Sa.userMutationsIndex="userMutationsIndex",Sa.userMutationsKeyPath=["userId","batchId"];class _a{constructor(){}static prefixForUser(t){return[t]}static prefixForPath(t,e){return[t,ya(e)]}static key(t,e,n){return[t,ya(e),n]}}_a.store="documentMutations",_a.PLACEHOLDER=new _a;class Na{constructor(t,e){this.path=t,this.readTime=e}}class Aa{constructor(t,e){this.path=t,this.version=e}}class Da{constructor(t,e,n,s,r,i){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=s,this.readTime=r,this.parentPath=i}}Da.store="remoteDocuments",Da.readTimeIndex="readTimeIndex",Da.readTimeIndexPath="readTime",Da.collectionReadTimeIndex="collectionReadTimeIndex",Da.collectionReadTimeIndexPath=["parentPath","readTime"];class xa{constructor(t){this.byteSize=t}}xa.store="remoteDocumentGlobal",xa.key="remoteDocumentGlobalKey";class Ca{constructor(t,e,n,s,r,i,o){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=s,this.lastListenSequenceNumber=r,this.lastLimboFreeSnapshotVersion=i,this.query=o}}Ca.store="targets",Ca.keyPath="targetId",Ca.queryTargetsIndexName="queryTargetsIndex",Ca.queryTargetsKeyPath=["canonicalId","targetId"];class ka{constructor(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n}}ka.store="targetDocuments",ka.keyPath=["targetId","path"],ka.documentTargetsIndex="documentTargetsIndex",ka.documentTargetsKeyPath=["path","targetId"];class Ra{constructor(t,e,n,s){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=s}}Ra.key="targetGlobalKey",Ra.store="targetGlobal";class La{constructor(t,e){this.collectionId=t,this.parent=e}}La.store="collectionParents",La.keyPath=["collectionId","parent"];class Oa{constructor(t,e,n,s){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=s}}Oa.store="clientMetadata",Oa.keyPath="clientId";class Ma{constructor(t,e,n){this.bundleId=t,this.createTime=e,this.version=n}}Ma.store="bundles",Ma.keyPath="bundleId";class Fa{constructor(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n}}Fa.store="namedQueries",Fa.keyPath="name";const Pa=[Ia.store,Sa.store,_a.store,Da.store,Ca.store,Ea.store,Ra.store,ka.store,Oa.store,xa.store,La.store,Ma.store,Fa.store],Va="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Ua{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((t=>t()))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qa{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)}),(t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)}))}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&js(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new qa(((n,s)=>{this.nextCallback=e=>{this.wrapSuccess(t,e).next(n,s)},this.catchCallback=t=>{this.wrapFailure(e,t).next(n,s)}}))}toPromise(){return new Promise(((t,e)=>{this.next(t,e)}))}wrapUserFunction(t){try{const e=t();return e instanceof qa?e:qa.resolve(e)}catch(t){return qa.reject(t)}}wrapSuccess(t,e){return t?this.wrapUserFunction((()=>t(e))):qa.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction((()=>t(e))):qa.reject(e)}static resolve(t){return new qa(((e,n)=>{e(t)}))}static reject(t){return new qa(((e,n)=>{n(t)}))}static waitFor(t){return new qa(((e,n)=>{let s=0,r=0,i=!1;t.forEach((t=>{++s,t.next((()=>{++r,i&&r===s&&e()}),(t=>n(t)))})),i=!0,r===s&&e()}))}static or(t){let e=qa.resolve(!1);for(const n of t)e=e.next((t=>t?qa.resolve(t):n()));return e}static forEach(t,e){const n=[];return t.forEach(((t,s)=>{n.push(e.call(this,t,s))})),this.waitFor(n)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ba{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.Et=new Qs,this.transaction.oncomplete=()=>{this.Et.resolve()},this.transaction.onabort=()=>{e.error?this.Et.reject(new $a(t,e.error)):this.Et.resolve()},this.transaction.onerror=e=>{const n=Wa(e.target.error);this.Et.reject(new $a(t,n))}}static open(t,e,n,s){try{return new Ba(e,t.transaction(s,n))}catch(t){throw new $a(e,t)}}get It(){return this.Et.promise}abort(t){t&&this.Et.reject(t),this.aborted||(Vs("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}store(t){const e=this.transaction.objectStore(t);return new Ha(e)}}class ja{constructor(t,e,n){this.name=t,this.version=e,this.At=n,12.2===ja.Rt(h())&&Us("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return Vs("SimpleDb","Removing database:",t),za(window.indexedDB.deleteDatabase(t)).toPromise()}static bt(){if("object"!=typeof indexedDB)return!1;if(ja.Pt())return!0;const t=h(),e=ja.Rt(t),n=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||n||r)}static Pt(){var t;return void 0!==o&&"YES"===(void 0===(t={})?void 0:t.Vt)}static St(t,e){return t.store(e)}static Rt(t){const e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static vt(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}async Dt(t){return this.db||(Vs("SimpleDb","Opening database:",this.name),this.db=await new Promise(((e,n)=>{const s=indexedDB.open(this.name,this.version);s.onsuccess=t=>{const n=t.target.result;e(n)},s.onblocked=()=>{n(new $a(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},s.onerror=e=>{const s=e.target.error;"VersionError"===s.name?n(new zs(Hs.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):"InvalidStateError"===s.name?n(new zs(Hs.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+s)):n(new $a(t,s))},s.onupgradeneeded=t=>{Vs("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',t.oldVersion);const e=t.target.result;this.At.Ct(e,s.transaction,t.oldVersion,this.version).next((()=>{Vs("SimpleDb","Database upgrade to version "+this.version+" complete")}))}}))),this.Nt&&(this.db.onversionchange=t=>this.Nt(t)),this.db}xt(t){this.Nt=t,this.db&&(this.db.onversionchange=e=>t(e))}async runTransaction(t,e,n,s){const r="readonly"===e;let i=0;for(;;){++i;try{this.db=await this.Dt(t);const e=Ba.open(this.db,t,r?"readonly":"readwrite",n),i=s(e).catch((t=>(e.abort(t),qa.reject(t)))).toPromise();return i.catch((()=>{})),await e.It,i}catch(t){const e="FirebaseError"!==t.name&&i<3;if(Vs("SimpleDb","Transaction failed with error:",t.message,"Retrying:",e),this.close(),!e)return Promise.reject(t)}}}close(){this.db&&this.db.close(),this.db=void 0}}class Ka{constructor(t){this.kt=t,this.$t=!1,this.Ot=null}get isDone(){return this.$t}get Ft(){return this.Ot}set cursor(t){this.kt=t}done(){this.$t=!0}Mt(t){this.Ot=t}delete(){return za(this.kt.delete())}}class $a extends zs{constructor(t,e){super(Hs.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}}function Ga(t){return"IndexedDbTransactionError"===t.name}class Ha{constructor(t){this.store=t}put(t,e){let n;return void 0!==e?(Vs("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(Vs("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),za(n)}add(t){return Vs("SimpleDb","ADD",this.store.name,t,t),za(this.store.add(t))}get(t){return za(this.store.get(t)).next((e=>(void 0===e&&(e=null),Vs("SimpleDb","GET",this.store.name,t,e),e)))}delete(t){return Vs("SimpleDb","DELETE",this.store.name,t),za(this.store.delete(t))}count(){return Vs("SimpleDb","COUNT",this.store.name),za(this.store.count())}Lt(t,e){const n=this.cursor(this.options(t,e)),s=[];return this.Bt(n,((t,e)=>{s.push(e)})).next((()=>s))}Ut(t,e){Vs("SimpleDb","DELETE ALL",this.store.name);const n=this.options(t,e);n.qt=!1;const s=this.cursor(n);return this.Bt(s,((t,e,n)=>n.delete()))}Kt(t,e){let n;e?n=t:(n={},e=t);const s=this.cursor(n);return this.Bt(s,e)}jt(t){const e=this.cursor({});return new qa(((n,s)=>{e.onerror=t=>{const e=Wa(t.target.error);s(e)},e.onsuccess=e=>{const s=e.target.result;s?t(s.primaryKey,s.value).next((t=>{t?s.continue():n()})):n()}}))}Bt(t,e){const n=[];return new qa(((s,r)=>{t.onerror=t=>{r(t.target.error)},t.onsuccess=t=>{const r=t.target.result;if(!r)return void s();const i=new Ka(r),o=e(r.primaryKey,r.value,i);if(o instanceof qa){const t=o.catch((t=>(i.done(),qa.reject(t))));n.push(t)}i.isDone?s():null===i.Ft?r.continue():r.continue(i.Ft)}})).next((()=>qa.waitFor(n)))}options(t,e){let n;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){const n=this.store.index(t.index);return t.qt?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}}function za(t){return new qa(((e,n)=>{t.onsuccess=t=>{const n=t.target.result;e(n)},t.onerror=t=>{const e=Wa(t.target.error);n(e)}}))}let Qa=!1;function Wa(t){const e=ja.Rt(h());if(e>=12.2&&e<13){const e="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(e)>=0){const t=new zs("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return Qa||(Qa=!0,setTimeout((()=>{throw t}),0)),t}}return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ya extends Ua{constructor(t,e){super(),this.Qt=t,this.currentSequenceNumber=e}}function Xa(t,e){const n=Gs(t);return ja.St(n.Qt,e)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ja{constructor(t,e,n,s){this.batchId=t,this.localWriteTime=e,this.baseMutations=n,this.mutations=s}applyToRemoteDocument(t,e){const n=e.mutationResults;for(let e=0;e{const n=t.get(e.key),s=n;this.applyToLocalView(s),n.isValidDocument()||s.convertToNoDocument(cr.min())}))}keys(){return this.mutations.reduce(((t,e)=>t.add(e.key)),No())}isEqual(t){return this.batchId===t.batchId&&ir(this.mutations,t.mutations,((t,e)=>Zi(t,e)))&&ir(this.baseMutations,t.baseMutations,((t,e)=>Zi(t,e)))}}class Za{constructor(t,e,n,s){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.docVersions=s}static from(t,e,n){Ks(t.mutations.length===n.length);let s=So();const r=t.mutations;for(let t=0;tna(t.Wt,e)));for(let t=0;tna(t.Wt,e))),r=ar.fromMillis(e.localWriteTimeMs);return new Ja(e.batchId,r,n,s)}function uc(t){const e=ac(t.readTime),n=void 0!==t.lastLimboFreeSnapshotVersion?ac(t.lastLimboFreeSnapshotVersion):cr.min();let s;var r;return void 0!==t.query.documents?(Ks(1===(r=t.query).documents.length),s=Ei(mi(Yo(r.documents[0])))):s=function(t){return Ei(ia(t))}(t.query),new tc(s,t.targetId,0,t.lastListenSequenceNumber,e,n,wr.fromBase64String(t.resumeToken))}function hc(t,e){const n=oc(e.snapshotVersion),s=oc(e.lastLimboFreeSnapshotVersion);let r;r=Xr(e.target)?sa(t.Wt,e.target):ra(t.Wt,e.target);const i=e.resumeToken.toBase64();return new Ca(e.targetId,Wr(e.target),n,i,e.sequenceNumber,s,r)}function lc(t){const e=ia({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?Ii(e,e.limit,"L"):e} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dc{getBundleMetadata(t,e){return fc(t).get(e).next((t=>{if(t)return{id:(e=t).bundleId,createTime:ac(e.createTime),version:e.version};var e}))}saveBundleMetadata(t,e){var n;return fc(t).put({bundleId:(n=e).id,createTime:oc($o(n.createTime)),version:n.version})}getNamedQuery(t,e){return gc(t).get(e).next((t=>{if(t)return{name:(e=t).name,query:lc(e.bundledQuery),readTime:ac(e.readTime)};var e}))}saveNamedQuery(t,e){return gc(t).put(function(t){return{name:t.name,readTime:oc($o(t.readTime)),bundledQuery:t.bundledQuery}}(e))}}function fc(t){return Xa(t,Ma.store)}function gc(t){return Xa(t,Fa.store)} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class mc{constructor(){this.Gt=new pc}addToCollectionParentIndex(t,e){return this.Gt.add(e),qa.resolve()}getCollectionParents(t,e){return qa.resolve(this.Gt.getEntries(e))}}class pc{constructor(){this.index={}}add(t){const e=t.lastSegment(),n=t.popLast(),s=this.index[e]||new yo(fr.comparator),r=!s.has(n);return this.index[e]=s.add(n),r}has(t){const e=t.lastSegment(),n=t.popLast(),s=this.index[e];return s&&s.has(n)}getEntries(t){return(this.index[t]||new yo(fr.comparator)).toArray()}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class yc{constructor(){this.zt=new pc}addToCollectionParentIndex(t,e){if(!this.zt.has(e)){const n=e.lastSegment(),s=e.popLast();t.addOnCommittedListener((()=>{this.zt.add(e)}));const r={collectionId:n,parent:ya(s)};return wc(t).put(r)}return qa.resolve()}getCollectionParents(t,e){const n=[],s=IDBKeyRange.bound([e,""],[or(e),""],!1,!0);return wc(t).Lt(s).next((t=>{for(const s of t){if(s.collectionId!==e)break;n.push(ba(s.parent))}return n}))}}function wc(t){return Xa(t,La.store)} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vc={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class bc{constructor(t,e,n){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=n}static withCacheSize(t){return new bc(t,bc.DEFAULT_COLLECTION_PERCENTILE,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Tc(t,e,n){const s=t.store(Sa.store),r=t.store(_a.store),i=[],o=IDBKeyRange.only(n.batchId);let a=0;const c=s.Kt({range:o},((t,e,n)=>(a++,n.delete())));i.push(c.next((()=>{Ks(1===a)})));const u=[];for(const t of n.mutations){const s=_a.key(e,t.key.path,n.batchId);i.push(r.delete(s)),u.push(t.key)}return qa.waitFor(i).next((()=>u))}function Ec(t){if(!t)return 0;let e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw js();e=t.noDocument}return JSON.stringify(e).length} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */bc.DEFAULT_COLLECTION_PERCENTILE=10,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,bc.DEFAULT=new bc(41943040,bc.DEFAULT_COLLECTION_PERCENTILE,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),bc.DISABLED=new bc(-1,0,0);class Ic{constructor(t,e,n,s){this.userId=t,this.N=e,this.Ht=n,this.referenceDelegate=s,this.Jt={}}static Yt(t,e,n,s){Ks(""!==t.uid);const r=t.isAuthenticated()?t.uid:"";return new Ic(r,e,n,s)}checkEmpty(t){let e=!0;const n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return _c(t).Kt({index:Sa.userMutationsIndex,range:n},((t,n,s)=>{e=!1,s.done()})).next((()=>e))}addMutationBatch(t,e,n,s){const r=Nc(t),i=_c(t);return i.add({}).next((o=>{Ks("number"==typeof o);const a=new Ja(o,e,n,s),c=function(t,e,n){const s=n.baseMutations.map((e=>ea(t.Wt,e))),r=n.mutations.map((e=>ea(t.Wt,e)));return new Sa(e,n.batchId,n.localWriteTime.toMillis(),s,r)}(this.N,this.userId,a),u=[];let h=new yo(((t,e)=>rr(t.canonicalString(),e.canonicalString())));for(const t of s){const e=_a.key(this.userId,t.key.path,o);h=h.add(t.key.path.popLast()),u.push(i.put(c)),u.push(r.put(e,_a.PLACEHOLDER))}return h.forEach((e=>{u.push(this.Ht.addToCollectionParentIndex(t,e))})),t.addOnCommittedListener((()=>{this.Jt[o]=a.keys()})),qa.waitFor(u).next((()=>a))}))}lookupMutationBatch(t,e){return _c(t).get(e).next((t=>t?(Ks(t.userId===this.userId),cc(this.N,t)):null))}Xt(t,e){return this.Jt[e]?qa.resolve(this.Jt[e]):this.lookupMutationBatch(t,e).next((t=>{if(t){const n=t.keys();return this.Jt[e]=n,n}return null}))}getNextMutationBatchAfterBatchId(t,e){const n=e+1,s=IDBKeyRange.lowerBound([this.userId,n]);let r=null;return _c(t).Kt({index:Sa.userMutationsIndex,range:s},((t,e,s)=>{e.userId===this.userId&&(Ks(e.batchId>=n),r=cc(this.N,e)),s.done()})).next((()=>r))}getHighestUnacknowledgedBatchId(t){const e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let n=-1;return _c(t).Kt({index:Sa.userMutationsIndex,range:e,reverse:!0},((t,e,s)=>{n=e.batchId,s.done()})).next((()=>n))}getAllMutationBatches(t){const e=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return _c(t).Lt(Sa.userMutationsIndex,e).next((t=>t.map((t=>cc(this.N,t)))))}getAllMutationBatchesAffectingDocumentKey(t,e){const n=_a.prefixForPath(this.userId,e.path),s=IDBKeyRange.lowerBound(n),r=[];return Nc(t).Kt({range:s},((n,s,i)=>{const[o,a,c]=n,u=ba(a);if(o===this.userId&&e.path.isEqual(u))return _c(t).get(c).next((t=>{if(!t)throw js();Ks(t.userId===this.userId),r.push(cc(this.N,t))}));i.done()})).next((()=>r))}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new yo(rr);const s=[];return e.forEach((e=>{const r=_a.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=Nc(t).Kt({range:i},((t,s,r)=>{const[i,o,a]=t,c=ba(o);i===this.userId&&e.path.isEqual(c)?n=n.add(a):r.done()}));s.push(o)})),qa.waitFor(s).next((()=>this.Zt(t,n)))}getAllMutationBatchesAffectingQuery(t,e){const n=e.path,s=n.length+1,r=_a.prefixForPath(this.userId,n),i=IDBKeyRange.lowerBound(r);let o=new yo(rr);return Nc(t).Kt({range:i},((t,e,r)=>{const[i,a,c]=t,u=ba(a);i===this.userId&&n.isPrefixOf(u)?u.length===s&&(o=o.add(c)):r.done()})).next((()=>this.Zt(t,o)))}Zt(t,e){const n=[],s=[];return e.forEach((e=>{s.push(_c(t).get(e).next((t=>{if(null===t)throw js();Ks(t.userId===this.userId),n.push(cc(this.N,t))})))})),qa.waitFor(s).next((()=>n))}removeMutationBatch(t,e){return Tc(t.Qt,this.userId,e).next((n=>(t.addOnCommittedListener((()=>{this.te(e.batchId)})),qa.forEach(n,(e=>this.referenceDelegate.markPotentiallyOrphaned(t,e))))))}te(t){delete this.Jt[t]}performConsistencyCheck(t){return this.checkEmpty(t).next((e=>{if(!e)return qa.resolve();const n=IDBKeyRange.lowerBound(_a.prefixForUser(this.userId)),s=[];return Nc(t).Kt({range:n},((t,e,n)=>{if(t[0]===this.userId){const e=ba(t[1]);s.push(e)}else n.done()})).next((()=>{Ks(0===s.length)}))}))}containsKey(t,e){return Sc(t,this.userId,e)}ee(t){return Ac(t).get(this.userId).next((t=>t||new Ia(this.userId,-1,"")))}}function Sc(t,e,n){const s=_a.prefixForPath(e,n.path),r=s[1],i=IDBKeyRange.lowerBound(s);let o=!1;return Nc(t).Kt({range:i,qt:!0},((t,n,s)=>{const[i,a,c]=t;i===e&&a===r&&(o=!0),s.done()})).next((()=>o))}function _c(t){return Xa(t,Sa.store)}function Nc(t){return Xa(t,_a.store)}function Ac(t){return Xa(t,Ia.store)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Dc{constructor(t){this.ne=t}next(){return this.ne+=2,this.ne}static se(){return new Dc(0)}static ie(){return new Dc(-1)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xc{constructor(t,e){this.referenceDelegate=t,this.N=e}allocateTargetId(t){return this.re(t).next((e=>{const n=new Dc(e.highestTargetId);return e.highestTargetId=n.next(),this.oe(t,e).next((()=>e.highestTargetId))}))}getLastRemoteSnapshotVersion(t){return this.re(t).next((t=>cr.fromTimestamp(new ar(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))))}getHighestSequenceNumber(t){return this.re(t).next((t=>t.highestListenSequenceNumber))}setTargetsMetadata(t,e,n){return this.re(t).next((s=>(s.highestListenSequenceNumber=e,n&&(s.lastRemoteSnapshotVersion=n.toTimestamp()),e>s.highestListenSequenceNumber&&(s.highestListenSequenceNumber=e),this.oe(t,s))))}addTargetData(t,e){return this.ce(t,e).next((()=>this.re(t).next((n=>(n.targetCount+=1,this.ae(e,n),this.oe(t,n))))))}updateTargetData(t,e){return this.ce(t,e)}removeTargetData(t,e){return this.removeMatchingKeysForTargetId(t,e.targetId).next((()=>Cc(t).delete(e.targetId))).next((()=>this.re(t))).next((e=>(Ks(e.targetCount>0),e.targetCount-=1,this.oe(t,e))))}removeTargets(t,e,n){let s=0;const r=[];return Cc(t).Kt(((i,o)=>{const a=uc(o);a.sequenceNumber<=e&&null===n.get(a.targetId)&&(s++,r.push(this.removeTargetData(t,a)))})).next((()=>qa.waitFor(r))).next((()=>s))}forEachTarget(t,e){return Cc(t).Kt(((t,n)=>{const s=uc(n);e(s)}))}re(t){return kc(t).get(Ra.key).next((t=>(Ks(null!==t),t)))}oe(t,e){return kc(t).put(Ra.key,e)}ce(t,e){return Cc(t).put(hc(this.N,e))}ae(t,e){let n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n}getTargetCount(t){return this.re(t).next((t=>t.targetCount))}getTargetData(t,e){const n=Wr(e),s=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]);let r=null;return Cc(t).Kt({range:s,index:Ca.queryTargetsIndexName},((t,n,s)=>{const i=uc(n);Yr(e,i.target)&&(r=i,s.done())})).next((()=>r))}addMatchingKeys(t,e,n){const s=[],r=Rc(t);return e.forEach((e=>{const i=ya(e.path);s.push(r.put(new ka(n,i))),s.push(this.referenceDelegate.addReference(t,n,e))})),qa.waitFor(s)}removeMatchingKeys(t,e,n){const s=Rc(t);return qa.forEach(e,(e=>{const r=ya(e.path);return qa.waitFor([s.delete([n,r]),this.referenceDelegate.removeReference(t,n,e)])}))}removeMatchingKeysForTargetId(t,e){const n=Rc(t),s=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(s)}getMatchingKeysForTargetId(t,e){const n=IDBKeyRange.bound([e],[e+1],!1,!0),s=Rc(t);let r=No();return s.Kt({range:n,qt:!0},((t,e,n)=>{const s=ba(t[1]),i=new xr(s);r=r.add(i)})).next((()=>r))}containsKey(t,e){const n=ya(e.path),s=IDBKeyRange.bound([n],[or(n)],!1,!0);let r=0;return Rc(t).Kt({index:ka.documentTargetsIndex,qt:!0,range:s},(([t,e],n,s)=>{0!==t&&(r++,s.done())})).next((()=>r>0))}Tt(t,e){return Cc(t).get(e).next((t=>t?uc(t):null))}}function Cc(t){return Xa(t,Ca.store)}function kc(t){return Xa(t,Ra.store)}function Rc(t){return Xa(t,ka.store)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Lc(t){if(t.code!==Hs.FAILED_PRECONDITION||t.message!==Va)throw t;Vs("LocalStore","Unexpectedly lost primary lease")} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Oc([t,e],[n,s]){const r=rr(t,n);return 0===r?rr(e,s):r}class Mc{constructor(t){this.ue=t,this.buffer=new yo(Oc),this.he=0}le(){return++this.he}fe(t){const e=[t,this.le()];if(this.buffer.size{this.we=null,this.de=!0;try{await t.collectGarbage(this.garbageCollector)}catch(t){Ga(t)?Vs("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",t):await Lc(t)}await this._e(t)}))}}class Pc{constructor(t,e){this.me=t,this.params=e}calculateTargetCount(t,e){return this.me.ge(t).next((t=>Math.floor(e/100*t)))}nthSequenceNumber(t,e){if(0===e)return qa.resolve(er.T);const n=new Mc(e);return this.me.forEachTarget(t,(t=>n.fe(t.sequenceNumber))).next((()=>this.me.ye(t,(t=>n.fe(t))))).next((()=>n.maxValue))}removeTargets(t,e,n){return this.me.removeTargets(t,e,n)}removeOrphanedDocuments(t,e){return this.me.removeOrphanedDocuments(t,e)}collect(t,e){return-1===this.params.cacheSizeCollectionThreshold?(Vs("LruGarbageCollector","Garbage collection skipped; disabled"),qa.resolve(vc)):this.getCacheSize(t).next((n=>n(e>this.params.maximumSequenceNumbersToCollect?(Vs("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${e}`),s=this.params.maximumSequenceNumbersToCollect):s=e,i=Date.now(),this.nthSequenceNumber(t,s)))).next((s=>(n=s,o=Date.now(),this.removeTargets(t,n,e)))).next((e=>(r=e,a=Date.now(),this.removeOrphanedDocuments(t,n)))).next((t=>(c=Date.now(),Fs()<=p.DEBUG&&Vs("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${i-u}ms\n\tDetermined least recently used ${s} in `+(o-i)+"ms\n"+`\tRemoved ${r} targets in `+(a-o)+"ms\n"+`\tRemoved ${t} documents in `+(c-a)+"ms\n"+`Total Duration: ${c-u}ms`),qa.resolve({didRun:!0,sequenceNumbersCollected:s,targetsRemoved:r,documentsRemoved:t}))))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Vc{constructor(t,e){this.db=t,this.garbageCollector=function(t,e){return new Pc(t,e)}(this,e)}ge(t){const e=this.Te(t);return this.db.getTargetCache().getTargetCount(t).next((t=>e.next((e=>t+e))))}Te(t){let e=0;return this.ye(t,(t=>{e++})).next((()=>e))}forEachTarget(t,e){return this.db.getTargetCache().forEachTarget(t,e)}ye(t,e){return this.Ee(t,((t,n)=>e(n)))}addReference(t,e,n){return Uc(t,n)}removeReference(t,e,n){return Uc(t,n)}removeTargets(t,e,n){return this.db.getTargetCache().removeTargets(t,e,n)}markPotentiallyOrphaned(t,e){return Uc(t,e)}Ie(t,e){return function(t,e){let n=!1;return Ac(t).jt((s=>Sc(t,s,e).next((t=>(t&&(n=!0),qa.resolve(!t)))))).next((()=>n))}(t,e)}removeOrphanedDocuments(t,e){const n=this.db.getRemoteDocumentCache().newChangeBuffer(),s=[];let r=0;return this.Ee(t,((i,o)=>{if(o<=e){const e=this.Ie(t,i).next((e=>{if(!e)return r++,n.getEntry(t,i).next((()=>(n.removeEntry(i),Rc(t).delete([0,ya(i.path)]))))}));s.push(e)}})).next((()=>qa.waitFor(s))).next((()=>n.apply(t))).next((()=>r))}removeTarget(t,e){const n=e.withSequenceNumber(t.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(t,n)}updateLimboDocument(t,e){return Uc(t,e)}Ee(t,e){const n=Rc(t);let s,r=er.T;return n.Kt({index:ka.documentTargetsIndex},(([t,n],{path:i,sequenceNumber:o})=>{0===t?(r!==er.T&&e(new xr(ba(s)),r),r=o,s=i):r=er.T})).next((()=>{r!==er.T&&e(new xr(ba(s)),r)}))}getCacheSize(t){return this.db.getRemoteDocumentCache().getSize(t)}}function Uc(t,e){return Rc(t).put(function(t,e){return new ka(0,ya(t.path),e)}(e,t.currentSequenceNumber))} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qc{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={}}get(t){const e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(const[e,s]of n)if(this.equalsFn(e,t))return s}has(t){return void 0!==this.get(t)}set(t,e){const n=this.mapKeyFn(t),s=this.inner[n];if(void 0!==s){for(let n=0;n{for(const[e,s]of n)t(e,s)}))}isEmpty(){return lr(this.inner)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Bc{constructor(){this.changes=new qc((t=>t.toString()),((t,e)=>t.isEqual(e))),this.changesApplied=!1}getReadTime(t){const e=this.changes.get(t);return e?e.readTime:cr.min()}addEntry(t,e){this.assertNotApplied(),this.changes.set(t.key,{document:t,readTime:e})}removeEntry(t,e=null){this.assertNotApplied(),this.changes.set(t,{document:Hr.newInvalidDocument(t),readTime:e})}getEntry(t,e){this.assertNotApplied();const n=this.changes.get(e);return void 0!==n?qa.resolve(n.document):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class jc{constructor(t,e){this.N=t,this.Ht=e}addEntry(t,e,n){return Gc(t).put(Hc(e),n)}removeEntry(t,e){const n=Gc(t),s=Hc(e);return n.delete(s)}updateMetadata(t,e){return this.getMetadata(t).next((n=>(n.byteSize+=e,this.Ae(t,n))))}getEntry(t,e){return Gc(t).get(Hc(e)).next((t=>this.Re(e,t)))}be(t,e){return Gc(t).get(Hc(e)).next((t=>({document:this.Re(e,t),size:Ec(t)})))}getEntries(t,e){let n=bo();return this.Pe(t,e,((t,e)=>{const s=this.Re(t,e);n=n.insert(t,s)})).next((()=>n))}ve(t,e){let n=bo(),s=new go(xr.comparator);return this.Pe(t,e,((t,e)=>{const r=this.Re(t,e);n=n.insert(t,r),s=s.insert(t,Ec(e))})).next((()=>({documents:n,Ve:s})))}Pe(t,e,n){if(e.isEmpty())return qa.resolve();const s=IDBKeyRange.bound(e.first().path.toArray(),e.last().path.toArray()),r=e.getIterator();let i=r.getNext();return Gc(t).Kt({range:s},((t,e,s)=>{const o=xr.fromSegments(t);for(;i&&xr.comparator(i,o)<0;)n(i,null),i=r.getNext();i&&i.isEqual(o)&&(n(i,e),i=r.hasNext()?r.getNext():null),i?s.Mt(i.path.toArray()):s.done()})).next((()=>{for(;i;)n(i,null),i=r.hasNext()?r.getNext():null}))}getDocumentsMatchingQuery(t,e,n){let s=bo();const r=e.path.length+1,i={};if(n.isEqual(cr.min())){const t=e.path.toArray();i.range=IDBKeyRange.lowerBound(t)}else{const t=e.path.toArray(),s=rc(n);i.range=IDBKeyRange.lowerBound([t,s],!0),i.index=Da.collectionReadTimeIndex}return Gc(t).Kt(i,((t,n,i)=>{if(t.length!==r)return;const o=nc(this.N,n);e.path.isPrefixOf(o.key.path)?Ai(e,o)&&(s=s.insert(o.key,o)):i.done()})).next((()=>s))}newChangeBuffer(t){return new Kc(this,!!t&&t.trackRemovals)}getSize(t){return this.getMetadata(t).next((t=>t.byteSize))}getMetadata(t){return $c(t).get(xa.key).next((t=>(Ks(!!t),t)))}Ae(t,e){return $c(t).put(xa.key,e)}Re(t,e){if(e){const t=nc(this.N,e);if(!t.isNoDocument()||!t.version.isEqual(cr.min()))return t}return Hr.newInvalidDocument(t)}}class Kc extends Bc{constructor(t,e){super(),this.Se=t,this.trackRemovals=e,this.De=new qc((t=>t.toString()),((t,e)=>t.isEqual(e)))}applyChanges(t){const e=[];let n=0,s=new yo(((t,e)=>rr(t.canonicalString(),e.canonicalString())));return this.changes.forEach(((r,i)=>{const o=this.De.get(r);if(i.document.isValidDocument()){const a=sc(this.Se.N,i.document,this.getReadTime(r));s=s.add(r.path.popLast());const c=Ec(a);n+=c-o,e.push(this.Se.addEntry(t,r,a))}else if(n-=o,this.trackRemovals){const n=sc(this.Se.N,Hr.newNoDocument(r,cr.min()),this.getReadTime(r));e.push(this.Se.addEntry(t,r,n))}else e.push(this.Se.removeEntry(t,r))})),s.forEach((n=>{e.push(this.Se.Ht.addToCollectionParentIndex(t,n))})),e.push(this.Se.updateMetadata(t,n)),qa.waitFor(e)}getFromCache(t,e){return this.Se.be(t,e).next((t=>(this.De.set(e,t.size),t.document)))}getAllFromCache(t,e){return this.Se.ve(t,e).next((({documents:t,Ve:e})=>(e.forEach(((t,e)=>{this.De.set(t,e)})),t)))}}function $c(t){return Xa(t,xa.store)}function Gc(t){return Xa(t,Da.store)}function Hc(t){return t.path.toArray()} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zc{constructor(t){this.N=t}Ct(t,e,n,s){Ks(n=0&&s<=11);const r=new Ba("createOrUpgrade",e);n<1&&s>=1&&(function(t){t.createObjectStore(Ea.store)}(t),function(t){t.createObjectStore(Ia.store,{keyPath:Ia.keyPath}),t.createObjectStore(Sa.store,{keyPath:Sa.keyPath,autoIncrement:!0}).createIndex(Sa.userMutationsIndex,Sa.userMutationsKeyPath,{unique:!0}),t.createObjectStore(_a.store)}(t),Qc(t),function(t){t.createObjectStore(Da.store)}(t));let i=qa.resolve();return n<3&&s>=3&&(0!==n&&(function(t){t.deleteObjectStore(ka.store),t.deleteObjectStore(Ca.store),t.deleteObjectStore(Ra.store)}(t),Qc(t)),i=i.next((()=>function(t){const e=t.store(Ra.store),n=new Ra(0,0,cr.min().toTimestamp(),0);return e.put(Ra.key,n)}(r)))),n<4&&s>=4&&(0!==n&&(i=i.next((()=>function(t,e){return e.store(Sa.store).Lt().next((n=>{t.deleteObjectStore(Sa.store),t.createObjectStore(Sa.store,{keyPath:Sa.keyPath,autoIncrement:!0}).createIndex(Sa.userMutationsIndex,Sa.userMutationsKeyPath,{unique:!0});const s=e.store(Sa.store),r=n.map((t=>s.put(t)));return qa.waitFor(r)}))}(t,r)))),i=i.next((()=>{!function(t){t.createObjectStore(Oa.store,{keyPath:Oa.keyPath})}(t)}))),n<5&&s>=5&&(i=i.next((()=>this.Ce(r)))),n<6&&s>=6&&(i=i.next((()=>(function(t){t.createObjectStore(xa.store)}(t),this.Ne(r))))),n<7&&s>=7&&(i=i.next((()=>this.xe(r)))),n<8&&s>=8&&(i=i.next((()=>this.ke(t,r)))),n<9&&s>=9&&(i=i.next((()=>{!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){const e=t.objectStore(Da.store);e.createIndex(Da.readTimeIndex,Da.readTimeIndexPath,{unique:!1}),e.createIndex(Da.collectionReadTimeIndex,Da.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&s>=10&&(i=i.next((()=>this.$e(r)))),n<11&&s>=11&&(i=i.next((()=>{!function(t){t.createObjectStore(Ma.store,{keyPath:Ma.keyPath})}(t),function(t){t.createObjectStore(Fa.store,{keyPath:Fa.keyPath})}(t)}))),i}Ne(t){let e=0;return t.store(Da.store).Kt(((t,n)=>{e+=Ec(n)})).next((()=>{const n=new xa(e);return t.store(xa.store).put(xa.key,n)}))}Ce(t){const e=t.store(Ia.store),n=t.store(Sa.store);return e.Lt().next((e=>qa.forEach(e,(e=>{const s=IDBKeyRange.bound([e.userId,-1],[e.userId,e.lastAcknowledgedBatchId]);return n.Lt(Sa.userMutationsIndex,s).next((n=>qa.forEach(n,(n=>{Ks(n.userId===e.userId);const s=cc(this.N,n);return Tc(t,e.userId,s).next((()=>{}))}))))}))))}xe(t){const e=t.store(ka.store),n=t.store(Da.store);return t.store(Ra.store).get(Ra.key).next((t=>{const s=[];return n.Kt(((n,r)=>{const i=new fr(n),o=function(t){return[0,ya(t)]}(i);s.push(e.get(o).next((n=>n?qa.resolve():(n=>e.put(new ka(0,ya(n),t.highestListenSequenceNumber)))(i))))})).next((()=>qa.waitFor(s)))}))}ke(t,e){t.createObjectStore(La.store,{keyPath:La.keyPath});const n=e.store(La.store),s=new pc,r=t=>{if(s.add(t)){const e=t.lastSegment(),s=t.popLast();return n.put({collectionId:e,parent:ya(s)})}};return e.store(Da.store).Kt({qt:!0},((t,e)=>{const n=new fr(t);return r(n.popLast())})).next((()=>e.store(_a.store).Kt({qt:!0},(([t,e,n],s)=>{const i=ba(e);return r(i.popLast())}))))}$e(t){const e=t.store(Ca.store);return e.Kt(((t,n)=>{const s=uc(n),r=hc(this.N,s);return e.put(r)}))}}function Qc(t){t.createObjectStore(ka.store,{keyPath:ka.keyPath}).createIndex(ka.documentTargetsIndex,ka.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Ca.store,{keyPath:Ca.keyPath}).createIndex(Ca.queryTargetsIndexName,Ca.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Ra.store)}const Wc="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class Yc{constructor(t,e,n,s,r,i,o,a,c,u){if(this.allowTabSynchronization=t,this.persistenceKey=e,this.clientId=n,this.Oe=r,this.window=i,this.document=o,this.Fe=c,this.Me=u,this.Le=null,this.Be=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Ue=null,this.inForeground=!1,this.qe=null,this.Ke=null,this.je=Number.NEGATIVE_INFINITY,this.Qe=t=>Promise.resolve(),!Yc.bt())throw new zs(Hs.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new Vc(this,s),this.We=e+"main",this.N=new ec(a),this.Ge=new ja(this.We,11,new zc(this.N)),this.ze=new xc(this.referenceDelegate,this.N),this.Ht=new yc,this.He=function(t,e){return new jc(t,e)}(this.N,this.Ht),this.Je=new dc,this.window&&this.window.localStorage?this.Ye=this.window.localStorage:(this.Ye=null,!1===u&&Us("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.Xe().then((()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new zs(Hs.FAILED_PRECONDITION,Wc);return this.Ze(),this.tn(),this.en(),this.runTransaction("getHighestListenSequenceNumber","readonly",(t=>this.ze.getHighestSequenceNumber(t)))})).then((t=>{this.Le=new er(t,this.Fe)})).then((()=>{this.Be=!0})).catch((t=>(this.Ge&&this.Ge.close(),Promise.reject(t))))}nn(t){return this.Qe=async e=>{if(this.started)return t(e)},t(this.isPrimary)}setDatabaseDeletedListener(t){this.Ge.xt((async e=>{null===e.newVersion&&await t()}))}setNetworkEnabled(t){this.networkEnabled!==t&&(this.networkEnabled=t,this.Oe.enqueueAndForget((async()=>{this.started&&await this.Xe()})))}Xe(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(t=>Jc(t).put(new Oa(this.clientId,Date.now(),this.networkEnabled,this.inForeground)).next((()=>{if(this.isPrimary)return this.sn(t).next((t=>{t||(this.isPrimary=!1,this.Oe.enqueueRetryable((()=>this.Qe(!1))))}))})).next((()=>this.rn(t))).next((e=>this.isPrimary&&!e?this.on(t).next((()=>!1)):!!e&&this.cn(t).next((()=>!0)))))).catch((t=>{if(Ga(t))return Vs("IndexedDbPersistence","Failed to extend owner lease: ",t),this.isPrimary;if(!this.allowTabSynchronization)throw t;return Vs("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((t=>{this.isPrimary!==t&&this.Oe.enqueueRetryable((()=>this.Qe(t))),this.isPrimary=t}))}sn(t){return Xc(t).get(Ea.key).next((t=>qa.resolve(this.an(t))))}un(t){return Jc(t).delete(this.clientId)}async hn(){if(this.isPrimary&&!this.ln(this.je,18e5)){this.je=Date.now();const t=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(t=>{const e=Xa(t,Oa.store);return e.Lt().next((t=>{const n=this.fn(t,18e5),s=t.filter((t=>-1===n.indexOf(t)));return qa.forEach(s,(t=>e.delete(t.clientId))).next((()=>s))}))})).catch((()=>[]));if(this.Ye)for(const e of t)this.Ye.removeItem(this.dn(e.clientId))}}en(){this.Ke=this.Oe.enqueueAfterDelay("client_metadata_refresh",4e3,(()=>this.Xe().then((()=>this.hn())).then((()=>this.en()))))}an(t){return!!t&&t.ownerId===this.clientId}rn(t){return this.Me?qa.resolve(!0):Xc(t).get(Ea.key).next((e=>{if(null!==e&&this.ln(e.leaseTimestampMs,5e3)&&!this.wn(e.ownerId)){if(this.an(e)&&this.networkEnabled)return!0;if(!this.an(e)){if(!e.allowTabSynchronization)throw new zs(Hs.FAILED_PRECONDITION,Wc);return!1}}return!(!this.networkEnabled||!this.inForeground)||Jc(t).Lt().next((t=>void 0===this.fn(t,5e3).find((t=>{if(this.clientId!==t.clientId){const e=!this.networkEnabled&&t.networkEnabled,n=!this.inForeground&&t.inForeground,s=this.networkEnabled===t.networkEnabled;if(e||n&&s)return!0}return!1}))))})).next((t=>(this.isPrimary!==t&&Vs("IndexedDbPersistence",`Client ${t?"is":"is not"} eligible for a primary lease.`),t)))}async shutdown(){this.Be=!1,this._n(),this.Ke&&(this.Ke.cancel(),this.Ke=null),this.mn(),this.gn(),await this.Ge.runTransaction("shutdown","readwrite",[Ea.store,Oa.store],(t=>{const e=new Ya(t,er.T);return this.on(e).next((()=>this.un(e)))})),this.Ge.close(),this.yn()}fn(t,e){return t.filter((t=>this.ln(t.updateTimeMs,e)&&!this.wn(t.clientId)))}pn(){return this.runTransaction("getActiveClients","readonly",(t=>Jc(t).Lt().next((t=>this.fn(t,18e5).map((t=>t.clientId))))))}get started(){return this.Be}getMutationQueue(t){return Ic.Yt(t,this.N,this.Ht,this.referenceDelegate)}getTargetCache(){return this.ze}getRemoteDocumentCache(){return this.He}getIndexManager(){return this.Ht}getBundleCache(){return this.Je}runTransaction(t,e,n){Vs("IndexedDbPersistence","Starting transaction:",t);const s="readonly"===e?"readonly":"readwrite";let r;return this.Ge.runTransaction(t,s,Pa,(s=>(r=new Ya(s,this.Le?this.Le.next():er.T),"readwrite-primary"===e?this.sn(r).next((t=>!!t||this.rn(r))).next((e=>{if(!e)throw Us(`Failed to obtain primary lease for action '${t}'.`),this.isPrimary=!1,this.Oe.enqueueRetryable((()=>this.Qe(!1))),new zs(Hs.FAILED_PRECONDITION,Va);return n(r)})).next((t=>this.cn(r).next((()=>t)))):this.Tn(r).next((()=>n(r)))))).then((t=>(r.raiseOnCommittedEvent(),t)))}Tn(t){return Xc(t).get(Ea.key).next((t=>{if(null!==t&&this.ln(t.leaseTimestampMs,5e3)&&!this.wn(t.ownerId)&&!this.an(t)&&!(this.Me||this.allowTabSynchronization&&t.allowTabSynchronization))throw new zs(Hs.FAILED_PRECONDITION,Wc)}))}cn(t){const e=new Ea(this.clientId,this.allowTabSynchronization,Date.now());return Xc(t).put(Ea.key,e)}static bt(){return ja.bt()}on(t){const e=Xc(t);return e.get(Ea.key).next((t=>this.an(t)?(Vs("IndexedDbPersistence","Releasing primary lease."),e.delete(Ea.key)):qa.resolve()))}ln(t,e){const n=Date.now();return!(tn&&(Us(`Detected an update time that is in the future: ${t} > ${n}`),1))}Ze(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.qe=()=>{this.Oe.enqueueAndForget((()=>(this.inForeground="visible"===this.document.visibilityState,this.Xe())))},this.document.addEventListener("visibilitychange",this.qe),this.inForeground="visible"===this.document.visibilityState)}mn(){this.qe&&(this.document.removeEventListener("visibilitychange",this.qe),this.qe=null)}tn(){var t;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.Ue=()=>{this._n(),l()&&navigator.appVersion.match("Version/14")&&this.Oe.enterRestrictedMode(!0),this.Oe.enqueueAndForget((()=>this.shutdown()))},this.window.addEventListener("pagehide",this.Ue))}gn(){this.Ue&&(this.window.removeEventListener("pagehide",this.Ue),this.Ue=null)}wn(t){var e;try{const n=null!==(null===(e=this.Ye)||void 0===e?void 0:e.getItem(this.dn(t)));return Vs("IndexedDbPersistence",`Client '${t}' ${n?"is":"is not"} zombied in LocalStorage`),n}catch(t){return Us("IndexedDbPersistence","Failed to get zombied client id.",t),!1}}_n(){if(this.Ye)try{this.Ye.setItem(this.dn(this.clientId),String(Date.now()))}catch(t){Us("Failed to set zombie client id.",t)}}yn(){if(this.Ye)try{this.Ye.removeItem(this.dn(this.clientId))}catch(t){}}dn(t){return`firestore_zombie_${this.persistenceKey}_${t}`}}function Xc(t){return Xa(t,Ea.store)}function Jc(t){return Xa(t,Oa.store)}function Zc(t,e){let n=t.projectId;return t.isDefaultDatabase||(n+="."+t.database),"firestore/"+e+"/"+n+"/" +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class tu{constructor(t,e){this.progress=t,this.En=e}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eu{constructor(t,e,n){this.He=t,this.In=e,this.Ht=n}An(t,e){return this.In.getAllMutationBatchesAffectingDocumentKey(t,e).next((n=>this.Rn(t,e,n)))}Rn(t,e,n){return this.He.getEntry(t,e).next((t=>{for(const e of n)e.applyToLocalView(t);return t}))}bn(t,e){t.forEach(((t,n)=>{for(const t of e)t.applyToLocalView(n)}))}Pn(t,e){return this.He.getEntries(t,e).next((e=>this.vn(t,e).next((()=>e))))}vn(t,e){return this.In.getAllMutationBatchesAffectingDocumentKeys(t,e).next((t=>this.bn(e,t)))}getDocumentsMatchingQuery(t,e,n){return function(t){return xr.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.Vn(t,e.path):bi(e)?this.Sn(t,e,n):this.Dn(t,e,n)}Vn(t,e){return this.An(t,new xr(e)).next((t=>{let e=Eo();return t.isFoundDocument()&&(e=e.insert(t.key,t)),e}))}Sn(t,e,n){const s=e.collectionGroup;let r=Eo();return this.Ht.getCollectionParents(t,s).next((i=>qa.forEach(i,(i=>{const o=function(t,e){return new fi(e,null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(e,i.child(s));return this.Dn(t,o,n).next((t=>{t.forEach(((t,e)=>{r=r.insert(t,e)}))}))})).next((()=>r))))}Dn(t,e,n){let s,r;return this.He.getDocumentsMatchingQuery(t,e,n).next((n=>(s=n,this.In.getAllMutationBatchesAffectingQuery(t,e)))).next((e=>(r=e,this.Cn(t,r,s).next((t=>{s=t;for(const t of r)for(const e of t.mutations){const n=e.key;let r=s.get(n);null==r&&(r=Hr.newInvalidDocument(n),s=s.insert(n,r)),Xi(e,r,t.localWriteTime),r.isFoundDocument()||(s=s.remove(n))}}))))).next((()=>(s.forEach(((t,n)=>{Ai(e,n)||(s=s.remove(t))})),s)))}Cn(t,e,n){let s=No();for(const t of e)for(const e of t.mutations)e instanceof no&&null===n.get(e.key)&&(s=s.add(e.key));let r=n;return this.He.getEntries(t,s).next((t=>(t.forEach(((t,e)=>{e.isFoundDocument()&&(r=r.insert(t,e))})),r)))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nu{constructor(t,e,n,s){this.targetId=t,this.fromCache=e,this.Nn=n,this.xn=s}static kn(t,e){let n=No(),s=No();for(const t of e.docChanges)switch(t.type){case 0:n=n.add(t.doc.key);break;case 1:s=s.add(t.doc.key)}return new nu(t,e.fromCache,n,s)}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class su{$n(t){this.On=t}getDocumentsMatchingQuery(t,e,n,s){return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.explicitOrderBy.length||1===t.explicitOrderBy.length&&t.explicitOrderBy[0].field.isKeyField())}(e)||n.isEqual(cr.min())?this.Fn(t,e):this.On.Pn(t,s).next((r=>{const i=this.Mn(e,r);return(pi(e)||yi(e))&&this.Ln(e.limitType,i,s,n)?this.Fn(t,e):(Fs()<=p.DEBUG&&Vs("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),Ni(e)),this.On.getDocumentsMatchingQuery(t,e,n).next((t=>(i.forEach((e=>{t=t.insert(e.key,e)})),t))))}))}Mn(t,e){let n=new yo(Di(t));return e.forEach(((e,s)=>{Ai(t,s)&&(n=n.add(s))})),n}Ln(t,e,n,s){if(n.size!==e.size)return!0;const r="F"===t?e.last():e.first();return!!r&&(r.hasPendingWrites||r.version.compareTo(s)>0)}Fn(t,e){return Fs()<=p.DEBUG&&Vs("QueryEngine","Using full collection scan to execute query:",Ni(e)),this.On.getDocumentsMatchingQuery(t,e,cr.min())}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ru{constructor(t,e,n,s){this.persistence=t,this.Bn=e,this.N=s,this.Un=new go(rr),this.qn=new qc((t=>Wr(t)),Yr),this.Kn=cr.min(),this.In=t.getMutationQueue(n),this.jn=t.getRemoteDocumentCache(),this.ze=t.getTargetCache(),this.Qn=new eu(this.jn,this.In,this.persistence.getIndexManager()),this.Je=t.getBundleCache(),this.Bn.$n(this.Qn)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(e=>t.collect(e,this.Un)))}}function iu(t,e,n,s){return new ru(t,e,n,s)}async function ou(t,e){const n=Gs(t);let s=n.In,r=n.Qn;const i=await n.persistence.runTransaction("Handle user change","readonly",(t=>{let i;return n.In.getAllMutationBatches(t).next((o=>(i=o,s=n.persistence.getMutationQueue(e),r=new eu(n.jn,s,n.persistence.getIndexManager()),s.getAllMutationBatches(t)))).next((e=>{const n=[],s=[];let o=No();for(const t of i){n.push(t.batchId);for(const e of t.mutations)o=o.add(e.key)}for(const t of e){s.push(t.batchId);for(const e of t.mutations)o=o.add(e.key)}return r.Pn(t,o).next((t=>({Wn:t,removedBatchIds:n,addedBatchIds:s})))}))}));return n.In=s,n.Qn=r,n.Bn.$n(n.Qn),i}function au(t){const e=Gs(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(t=>e.ze.getLastRemoteSnapshotVersion(t)))}function cu(t,e,n,s,r){let i=No();return n.forEach((t=>i=i.add(t))),e.getEntries(t,i).next((t=>{let i=bo();return n.forEach(((n,o)=>{const a=t.get(n),c=(null==r?void 0:r.get(n))||s;o.isNoDocument()&&o.version.isEqual(cr.min())?(e.removeEntry(n,c),i=i.insert(n,o)):!a.isValidDocument()||o.version.compareTo(a.version)>0||0===o.version.compareTo(a.version)&&a.hasPendingWrites?(e.addEntry(o,c),i=i.insert(n,o)):Vs("LocalStore","Ignoring outdated watch update for ",n,". Current version:",a.version," Watch version:",o.version)})),i}))}function uu(t,e){const n=Gs(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(t=>(void 0===e&&(e=-1),n.In.getNextMutationBatchAfterBatchId(t,e))))}function hu(t,e){const n=Gs(t);return n.persistence.runTransaction("Allocate target","readwrite",(t=>{let s;return n.ze.getTargetData(t,e).next((r=>r?(s=r,qa.resolve(s)):n.ze.allocateTargetId(t).next((r=>(s=new tc(e,r,0,t.currentSequenceNumber),n.ze.addTargetData(t,s).next((()=>s)))))))})).then((t=>{const s=n.Un.get(t.targetId);return(null===s||t.snapshotVersion.compareTo(s.snapshotVersion)>0)&&(n.Un=n.Un.insert(t.targetId,t),n.qn.set(e,t.targetId)),t}))}async function lu(t,e,n){const s=Gs(t),r=s.Un.get(e),i=n?"readwrite":"readwrite-primary";try{n||await s.persistence.runTransaction("Release target",i,(t=>s.persistence.referenceDelegate.removeTarget(t,r)))}catch(t){if(!Ga(t))throw t;Vs("LocalStore",`Failed to update sequence numbers for target ${e}: ${t}`)}s.Un=s.Un.remove(e),s.qn.delete(r.target)}function du(t,e,n){const s=Gs(t);let r=cr.min(),i=No();return s.persistence.runTransaction("Execute query","readonly",(t=>function(t,e,n){const s=Gs(t),r=s.qn.get(n);return void 0!==r?qa.resolve(s.Un.get(r)):s.ze.getTargetData(e,n)}(s,t,Ei(e)).next((e=>{if(e)return r=e.lastLimboFreeSnapshotVersion,s.ze.getMatchingKeysForTargetId(t,e.targetId).next((t=>{i=t}))})).next((()=>s.Bn.getDocumentsMatchingQuery(t,e,n?r:cr.min(),n?i:No()))).next((t=>({documents:t,Gn:i})))))}function fu(t,e){const n=Gs(t),s=Gs(n.ze),r=n.Un.get(e);return r?Promise.resolve(r.target):n.persistence.runTransaction("Get target data","readonly",(t=>s.Tt(t,e).next((t=>t?t.target:null))))}function gu(t){const e=Gs(t);return e.persistence.runTransaction("Get new document changes","readonly",(t=>function(t,e,n){const s=Gs(t);let r=bo(),i=rc(n);const o=Gc(e),a=IDBKeyRange.lowerBound(i,!0);return o.Kt({index:Da.readTimeIndex,range:a},((t,e)=>{const n=nc(s.N,e);r=r.insert(n.key,n),i=e.readTime})).next((()=>({En:r,readTime:ic(i)})))}(e.jn,t,e.Kn))).then((({En:t,readTime:n})=>(e.Kn=n,t)))}async function mu(t,e,n=No()){const s=await hu(t,Ei(lc(e.bundledQuery))),r=Gs(t);return r.persistence.runTransaction("Save named query","readwrite",(t=>{const i=$o(e.readTime);if(s.snapshotVersion.compareTo(i)>=0)return r.Je.saveNamedQuery(t,e);const o=s.withResumeToken(wr.EMPTY_BYTE_STRING,i);return r.Un=r.Un.insert(o.targetId,o),r.ze.updateTargetData(t,o).next((()=>r.ze.removeMatchingKeysForTargetId(t,s.targetId))).next((()=>r.ze.addMatchingKeys(t,n,s.targetId))).next((()=>r.Je.saveNamedQuery(t,e)))}))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class pu{constructor(t){this.N=t,this.Yn=new Map,this.Xn=new Map}getBundleMetadata(t,e){return qa.resolve(this.Yn.get(e))}saveBundleMetadata(t,e){var n;return this.Yn.set(e.id,{id:(n=e).id,version:n.version,createTime:$o(n.createTime)}),qa.resolve()}getNamedQuery(t,e){return qa.resolve(this.Xn.get(e))}saveNamedQuery(t,e){return this.Xn.set(e.name,function(t){return{name:t.name,query:lc(t.bundledQuery),readTime:$o(t.readTime)}}(e)),qa.resolve()}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class yu{constructor(){this.Zn=new yo(wu.ts),this.es=new yo(wu.ns)}isEmpty(){return this.Zn.isEmpty()}addReference(t,e){const n=new wu(t,e);this.Zn=this.Zn.add(n),this.es=this.es.add(n)}ss(t,e){t.forEach((t=>this.addReference(t,e)))}removeReference(t,e){this.rs(new wu(t,e))}os(t,e){t.forEach((t=>this.removeReference(t,e)))}cs(t){const e=new xr(new fr([])),n=new wu(e,t),s=new wu(e,t+1),r=[];return this.es.forEachInRange([n,s],(t=>{this.rs(t),r.push(t.key)})),r}us(){this.Zn.forEach((t=>this.rs(t)))}rs(t){this.Zn=this.Zn.delete(t),this.es=this.es.delete(t)}hs(t){const e=new xr(new fr([])),n=new wu(e,t),s=new wu(e,t+1);let r=No();return this.es.forEachInRange([n,s],(t=>{r=r.add(t.key)})),r}containsKey(t){const e=new wu(t,0),n=this.Zn.firstAfterOrEqual(e);return null!==n&&t.isEqual(n.key)}}class wu{constructor(t,e){this.key=t,this.ls=e}static ts(t,e){return xr.comparator(t.key,e.key)||rr(t.ls,e.ls)}static ns(t,e){return rr(t.ls,e.ls)||xr.comparator(t.key,e.key)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class vu{constructor(t,e){this.Ht=t,this.referenceDelegate=e,this.In=[],this.fs=1,this.ds=new yo(wu.ts)}checkEmpty(t){return qa.resolve(0===this.In.length)}addMutationBatch(t,e,n,s){const r=this.fs;this.fs++,this.In.length>0&&this.In[this.In.length-1];const i=new Ja(r,e,n,s);this.In.push(i);for(const e of s)this.ds=this.ds.add(new wu(e.key,r)),this.Ht.addToCollectionParentIndex(t,e.key.path.popLast());return qa.resolve(i)}lookupMutationBatch(t,e){return qa.resolve(this.ws(e))}getNextMutationBatchAfterBatchId(t,e){const n=e+1,s=this._s(n),r=s<0?0:s;return qa.resolve(this.In.length>r?this.In[r]:null)}getHighestUnacknowledgedBatchId(){return qa.resolve(0===this.In.length?-1:this.fs-1)}getAllMutationBatches(t){return qa.resolve(this.In.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){const n=new wu(e,0),s=new wu(e,Number.POSITIVE_INFINITY),r=[];return this.ds.forEachInRange([n,s],(t=>{const e=this.ws(t.ls);r.push(e)})),qa.resolve(r)}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new yo(rr);return e.forEach((t=>{const e=new wu(t,0),s=new wu(t,Number.POSITIVE_INFINITY);this.ds.forEachInRange([e,s],(t=>{n=n.add(t.ls)}))})),qa.resolve(this.gs(n))}getAllMutationBatchesAffectingQuery(t,e){const n=e.path,s=n.length+1;let r=n;xr.isDocumentKey(r)||(r=r.child(""));const i=new wu(new xr(r),0);let o=new yo(rr);return this.ds.forEachWhile((t=>{const e=t.key.path;return!!n.isPrefixOf(e)&&(e.length===s&&(o=o.add(t.ls)),!0)}),i),qa.resolve(this.gs(o))}gs(t){const e=[];return t.forEach((t=>{const n=this.ws(t);null!==n&&e.push(n)})),e}removeMutationBatch(t,e){Ks(0===this.ys(e.batchId,"removed")),this.In.shift();let n=this.ds;return qa.forEach(e.mutations,(s=>{const r=new wu(s.key,e.batchId);return n=n.delete(r),this.referenceDelegate.markPotentiallyOrphaned(t,s.key)})).next((()=>{this.ds=n}))}te(t){}containsKey(t,e){const n=new wu(e,0),s=this.ds.firstAfterOrEqual(n);return qa.resolve(e.isEqual(s&&s.key))}performConsistencyCheck(t){return this.In.length,qa.resolve()}ys(t,e){return this._s(t)}_s(t){return 0===this.In.length?0:t-this.In[0].batchId}ws(t){const e=this._s(t);return e<0||e>=this.In.length?null:this.In[e]}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class bu{constructor(t,e){this.Ht=t,this.ps=e,this.docs=new go(xr.comparator),this.size=0}addEntry(t,e,n){const s=e.key,r=this.docs.get(s),i=r?r.size:0,o=this.ps(e);return this.docs=this.docs.insert(s,{document:e.clone(),size:o,readTime:n}),this.size+=o-i,this.Ht.addToCollectionParentIndex(t,s.path.popLast())}removeEntry(t){const e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){const n=this.docs.get(e);return qa.resolve(n?n.document.clone():Hr.newInvalidDocument(e))}getEntries(t,e){let n=bo();return e.forEach((t=>{const e=this.docs.get(t);n=n.insert(t,e?e.document.clone():Hr.newInvalidDocument(t))})),qa.resolve(n)}getDocumentsMatchingQuery(t,e,n){let s=bo();const r=new xr(e.path.child("")),i=this.docs.getIteratorFrom(r);for(;i.hasNext();){const{key:t,value:{document:r,readTime:o}}=i.getNext();if(!e.path.isPrefixOf(t.path))break;o.compareTo(n)<=0||Ai(e,r)&&(s=s.insert(r.key,r.clone()))}return qa.resolve(s)}Ts(t,e){return qa.forEach(this.docs,(t=>e(t)))}newChangeBuffer(t){return new Tu(this)}getSize(t){return qa.resolve(this.size)}}class Tu extends Bc{constructor(t){super(),this.Se=t}applyChanges(t){const e=[];return this.changes.forEach(((n,s)=>{s.document.isValidDocument()?e.push(this.Se.addEntry(t,s.document,this.getReadTime(n))):this.Se.removeEntry(n)})),qa.waitFor(e)}getFromCache(t,e){return this.Se.getEntry(t,e)}getAllFromCache(t,e){return this.Se.getEntries(t,e)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Eu{constructor(t){this.persistence=t,this.Es=new qc((t=>Wr(t)),Yr),this.lastRemoteSnapshotVersion=cr.min(),this.highestTargetId=0,this.Is=0,this.As=new yu,this.targetCount=0,this.Rs=Dc.se()}forEachTarget(t,e){return this.Es.forEach(((t,n)=>e(n))),qa.resolve()}getLastRemoteSnapshotVersion(t){return qa.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return qa.resolve(this.Is)}allocateTargetId(t){return this.highestTargetId=this.Rs.next(),qa.resolve(this.highestTargetId)}setTargetsMetadata(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.Is&&(this.Is=e),qa.resolve()}ce(t){this.Es.set(t.target,t);const e=t.targetId;e>this.highestTargetId&&(this.Rs=new Dc(e),this.highestTargetId=e),t.sequenceNumber>this.Is&&(this.Is=t.sequenceNumber)}addTargetData(t,e){return this.ce(e),this.targetCount+=1,qa.resolve()}updateTargetData(t,e){return this.ce(e),qa.resolve()}removeTargetData(t,e){return this.Es.delete(e.target),this.As.cs(e.targetId),this.targetCount-=1,qa.resolve()}removeTargets(t,e,n){let s=0;const r=[];return this.Es.forEach(((i,o)=>{o.sequenceNumber<=e&&null===n.get(o.targetId)&&(this.Es.delete(i),r.push(this.removeMatchingKeysForTargetId(t,o.targetId)),s++)})),qa.waitFor(r).next((()=>s))}getTargetCount(t){return qa.resolve(this.targetCount)}getTargetData(t,e){const n=this.Es.get(e)||null;return qa.resolve(n)}addMatchingKeys(t,e,n){return this.As.ss(e,n),qa.resolve()}removeMatchingKeys(t,e,n){this.As.os(e,n);const s=this.persistence.referenceDelegate,r=[];return s&&e.forEach((e=>{r.push(s.markPotentiallyOrphaned(t,e))})),qa.waitFor(r)}removeMatchingKeysForTargetId(t,e){return this.As.cs(e),qa.resolve()}getMatchingKeysForTargetId(t,e){const n=this.As.hs(e);return qa.resolve(n)}containsKey(t,e){return qa.resolve(this.As.containsKey(e))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Iu{constructor(t,e){this.bs={},this.Le=new er(0),this.Be=!1,this.Be=!0,this.referenceDelegate=t(this),this.ze=new Eu(this),this.Ht=new mc,this.He=function(t,e){return new bu(t,e)}(this.Ht,(t=>this.referenceDelegate.Ps(t))),this.N=new ec(e),this.Je=new pu(this.N)}start(){return Promise.resolve()}shutdown(){return this.Be=!1,Promise.resolve()}get started(){return this.Be}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(){return this.Ht}getMutationQueue(t){let e=this.bs[t.toKey()];return e||(e=new vu(this.Ht,this.referenceDelegate),this.bs[t.toKey()]=e),e}getTargetCache(){return this.ze}getRemoteDocumentCache(){return this.He}getBundleCache(){return this.Je}runTransaction(t,e,n){Vs("MemoryPersistence","Starting transaction:",t);const s=new Su(this.Le.next());return this.referenceDelegate.vs(),n(s).next((t=>this.referenceDelegate.Vs(s).next((()=>t)))).toPromise().then((t=>(s.raiseOnCommittedEvent(),t)))}Ss(t,e){return qa.or(Object.values(this.bs).map((n=>()=>n.containsKey(t,e))))}}class Su extends Ua{constructor(t){super(),this.currentSequenceNumber=t}}class _u{constructor(t){this.persistence=t,this.Ds=new yu,this.Cs=null}static Ns(t){return new _u(t)}get xs(){if(this.Cs)return this.Cs;throw js()}addReference(t,e,n){return this.Ds.addReference(n,e),this.xs.delete(n.toString()),qa.resolve()}removeReference(t,e,n){return this.Ds.removeReference(n,e),this.xs.add(n.toString()),qa.resolve()}markPotentiallyOrphaned(t,e){return this.xs.add(e.toString()),qa.resolve()}removeTarget(t,e){this.Ds.cs(e.targetId).forEach((t=>this.xs.add(t.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(t,e.targetId).next((t=>{t.forEach((t=>this.xs.add(t.toString())))})).next((()=>n.removeTargetData(t,e)))}vs(){this.Cs=new Set}Vs(t){const e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return qa.forEach(this.xs,(n=>{const s=xr.fromPath(n);return this.ks(t,s).next((t=>{t||e.removeEntry(s)}))})).next((()=>(this.Cs=null,e.apply(t))))}updateLimboDocument(t,e){return this.ks(t,e).next((t=>{t?this.xs.delete(e.toString()):this.xs.add(e.toString())}))}Ps(t){return 0}ks(t,e){return qa.or([()=>qa.resolve(this.Ds.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Ss(t,e)])}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Nu(t,e){return`firestore_clients_${t}_${e}`}function Au(t,e,n){let s=`firestore_mutations_${t}_${n}`;return e.isAuthenticated()&&(s+=`_${e.uid}`),s}function Du(t,e){return`firestore_targets_${t}_${e}`}class xu{constructor(t,e,n,s){this.user=t,this.batchId=e,this.state=n,this.error=s}static $s(t,e,n){const s=JSON.parse(n);let r,i="object"==typeof s&&-1!==["pending","acknowledged","rejected"].indexOf(s.state)&&(void 0===s.error||"object"==typeof s.error);return i&&s.error&&(i="string"==typeof s.error.message&&"string"==typeof s.error.code,i&&(r=new zs(s.error.code,s.error.message))),i?new xu(t,e,s.state,r):(Us("SharedClientState",`Failed to parse mutation state for ID '${e}': ${n}`),null)}Os(){const t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)}}class Cu{constructor(t,e,n){this.targetId=t,this.state=e,this.error=n}static $s(t,e){const n=JSON.parse(e);let s,r="object"==typeof n&&-1!==["not-current","current","rejected"].indexOf(n.state)&&(void 0===n.error||"object"==typeof n.error);return r&&n.error&&(r="string"==typeof n.error.message&&"string"==typeof n.error.code,r&&(s=new zs(n.error.code,n.error.message))),r?new Cu(t,n.state,s):(Us("SharedClientState",`Failed to parse target state for ID '${t}': ${e}`),null)}Os(){const t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)}}class ku{constructor(t,e){this.clientId=t,this.activeTargetIds=e}static $s(t,e){const n=JSON.parse(e);let s="object"==typeof n&&n.activeTargetIds instanceof Array,r=Do();for(let t=0;s&&tthis.shutdown())),this.started=!0}writeSequenceNumber(t){this.setItem(this.Qs,JSON.stringify(t))}getAllActiveQueryTargets(){return this.ti(this.qs)}isActiveQueryTarget(t){let e=!1;return this.qs.forEach(((n,s)=>{s.activeTargetIds.has(t)&&(e=!0)})),e}addPendingMutation(t){this.ei(t,"pending")}updateMutationState(t,e,n){this.ei(t,e,n),this.ni(t)}addLocalQueryTarget(t){let e="not-current";if(this.isActiveQueryTarget(t)){const n=this.storage.getItem(Du(this.persistenceKey,t));if(n){const s=Cu.$s(t,n);s&&(e=s.state)}}return this.si.Fs(t),this.Ys(),e}removeLocalQueryTarget(t){this.si.Ms(t),this.Ys()}isLocalQueryTarget(t){return this.si.activeTargetIds.has(t)}clearQueryState(t){this.removeItem(Du(this.persistenceKey,t))}updateQueryState(t,e,n){this.ii(t,e,n)}handleUserChange(t,e,n){e.forEach((t=>{this.ni(t)})),this.currentUser=t,n.forEach((t=>{this.addPendingMutation(t)}))}setOnlineState(t){this.ri(t)}notifyBundleLoaded(){this.oi()}shutdown(){this.started&&(this.window.removeEventListener("storage",this.Bs),this.removeItem(this.js),this.started=!1)}getItem(t){const e=this.storage.getItem(t);return Vs("SharedClientState","READ",t,e),e}setItem(t,e){Vs("SharedClientState","SET",t,e),this.storage.setItem(t,e)}removeItem(t){Vs("SharedClientState","REMOVE",t),this.storage.removeItem(t)}Us(t){const e=t;if(e.storageArea===this.storage){if(Vs("SharedClientState","EVENT",e.key,e.newValue),e.key===this.js)return void Us("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Oe.enqueueRetryable((async()=>{if(this.started){if(null!==e.key)if(this.Ws.test(e.key)){if(null==e.newValue){const t=this.ci(e.key);return this.ai(t,null)}{const t=this.ui(e.key,e.newValue);if(t)return this.ai(t.clientId,t)}}else if(this.Gs.test(e.key)){if(null!==e.newValue){const t=this.hi(e.key,e.newValue);if(t)return this.li(t)}}else if(this.zs.test(e.key)){if(null!==e.newValue){const t=this.fi(e.key,e.newValue);if(t)return this.di(t)}}else if(e.key===this.Hs){if(null!==e.newValue){const t=this.Xs(e.newValue);if(t)return this.Zs(t)}}else if(e.key===this.Qs){const t=function(t){let e=er.T;if(null!=t)try{const n=JSON.parse(t);Ks("number"==typeof n),e=n}catch(t){Us("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(e.newValue);t!==er.T&&this.sequenceNumberHandler(t)}else if(e.key===this.Js)return this.syncEngine.wi()}else this.Ks.push(e)}))}}get si(){return this.qs.get(this.Ls)}Ys(){this.setItem(this.js,this.si.Os())}ei(t,e,n){const s=new xu(this.currentUser,t,e,n),r=Au(this.persistenceKey,this.currentUser,t);this.setItem(r,s.Os())}ni(t){const e=Au(this.persistenceKey,this.currentUser,t);this.removeItem(e)}ri(t){const e={clientId:this.Ls,onlineState:t};this.storage.setItem(this.Hs,JSON.stringify(e))}ii(t,e,n){const s=Du(this.persistenceKey,t),r=new Cu(t,e,n);this.setItem(s,r.Os())}oi(){this.setItem(this.Js,"value-not-used")}ci(t){const e=this.Ws.exec(t);return e?e[1]:null}ui(t,e){const n=this.ci(t);return ku.$s(n,e)}hi(t,e){const n=this.Gs.exec(t),s=Number(n[1]),r=void 0!==n[2]?n[2]:null;return xu.$s(new Ls(r),s,e)}fi(t,e){const n=this.zs.exec(t),s=Number(n[1]);return Cu.$s(s,e)}Xs(t){return Ru.$s(t)}async li(t){if(t.user.uid===this.currentUser.uid)return this.syncEngine._i(t.batchId,t.state,t.error);Vs("SharedClientState",`Ignoring mutation for non-active user ${t.user.uid}`)}di(t){return this.syncEngine.mi(t.targetId,t.state,t.error)}ai(t,e){const n=e?this.qs.insert(t,e):this.qs.remove(t),s=this.ti(this.qs),r=this.ti(n),i=[],o=[];return r.forEach((t=>{s.has(t)||i.push(t)})),s.forEach((t=>{r.has(t)||o.push(t)})),this.syncEngine.gi(i,o).then((()=>{this.qs=n}))}Zs(t){this.qs.get(t.clientId)&&this.onlineStateHandler(t.onlineState)}ti(t){let e=Do();return t.forEach(((t,n)=>{e=e.unionWith(n.activeTargetIds)})),e}}class Mu{constructor(){this.yi=new Lu,this.pi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,n){}addLocalQueryTarget(t){return this.yi.Fs(t),this.pi[t]||"not-current"}updateQueryState(t,e,n){this.pi[t]=e}removeLocalQueryTarget(t){this.yi.Ms(t)}isLocalQueryTarget(t){return this.yi.activeTargetIds.has(t)}clearQueryState(t){delete this.pi[t]}getAllActiveQueryTargets(){return this.yi.activeTargetIds}isActiveQueryTarget(t){return this.yi.activeTargetIds.has(t)}start(){return this.yi=new Lu,Promise.resolve()}handleUserChange(t,e,n){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Fu{Ti(t){}shutdown(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Pu{constructor(){this.Ei=()=>this.Ii(),this.Ai=()=>this.Ri(),this.bi=[],this.Pi()}Ti(t){this.bi.push(t)}shutdown(){window.removeEventListener("online",this.Ei),window.removeEventListener("offline",this.Ai)}Pi(){window.addEventListener("online",this.Ei),window.addEventListener("offline",this.Ai)}Ii(){Vs("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.bi)t(0)}Ri(){Vs("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.bi)t(1)}static bt(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Vu={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Uu{constructor(t){this.vi=t.vi,this.Vi=t.Vi}Si(t){this.Di=t}Ci(t){this.Ni=t}onMessage(t){this.xi=t}close(){this.Vi()}send(t){this.vi(t)}ki(){this.Di()}$i(t){this.Ni(t)}Oi(t){this.xi(t)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qu extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const e=t.ssl?"https":"http";this.Fi=e+"://"+t.host,this.Mi="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}Li(t,e,n,s){const r=this.Bi(t,e);Vs("RestConnection","Sending: ",r,n);const i={};return this.Ui(i,s),this.qi(t,r,i,n).then((t=>(Vs("RestConnection","Received: ",t),t)),(e=>{throw qs("RestConnection",`${t} failed with error: `,e,"url: ",r,"request:",n),e}))}Ki(t,e,n,s){return this.Li(t,e,n,s)}Ui(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/"+Os,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),e)for(const n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n])}Bi(t,e){const n=Vu[t];return`${this.Fi}/v1/${e}:${n}`}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams}qi(t,e,n,s){return new Promise(((r,i)=>{const o=new ks;o.listenOnce(_s.COMPLETE,(()=>{try{switch(o.getLastErrorCode()){case Ss.NO_ERROR:const e=o.getResponseJson();Vs("Connection","XHR received:",JSON.stringify(e)),r(e);break;case Ss.TIMEOUT:Vs("Connection",'RPC "'+t+'" timed out'),i(new zs(Hs.DEADLINE_EXCEEDED,"Request time out"));break;case Ss.HTTP_ERROR:const n=o.getStatus();if(Vs("Connection",'RPC "'+t+'" failed with status:',n,"response text:",o.getResponseText()),n>0){const t=o.getResponseJson().error;if(t&&t.status&&t.message){const e=function(t){const e=t.toLowerCase().replace(/_/g,"-");return Object.values(Hs).indexOf(e)>=0?e:Hs.UNKNOWN}(t.status);i(new zs(e,t.message))}else i(new zs(Hs.UNKNOWN,"Server responded with status "+o.getStatus()))}else i(new zs(Hs.UNAVAILABLE,"Connection failed."));break;default:js()}}finally{Vs("Connection",'RPC "'+t+'" completed.')}}));const a=JSON.stringify(s);o.send(e,"POST",a,n,15)}))}ji(t,e){const n=[this.Fi,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=new vs,r=de(),i={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(i.xmlHttpFactory=new xs({})),this.Ui(i.initMessageHeaders,e),"undefined"!=typeof window&&(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())||"object"==typeof navigator&&"ReactNative"===navigator.product||h().indexOf("Electron/")>=0||function(){const t=h();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}()||h().indexOf("MSAppHost/")>=0||function(){const t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}()||(i.httpHeadersOverwriteParam="$httpHeaders");const o=n.join("");Vs("Connection","Creating WebChannel: "+o,i);const a=s.createWebChannel(o,i);let c=!1,u=!1;const l=new Uu({vi:t=>{u?Vs("Connection","Not sending because WebChannel is closed:",t):(c||(Vs("Connection","Opening WebChannel transport."),a.open(),c=!0),Vs("Connection","WebChannel sending:",t),a.send(t))},Vi:()=>a.close()}),d=(t,e,n)=>{t.listen(e,(t=>{try{n(t)}catch(t){setTimeout((()=>{throw t}),0)}}))};return d(a,Cs.EventType.OPEN,(()=>{u||Vs("Connection","WebChannel transport opened.")})),d(a,Cs.EventType.CLOSE,(()=>{u||(u=!0,Vs("Connection","WebChannel transport closed"),l.$i())})),d(a,Cs.EventType.ERROR,(t=>{u||(u=!0,qs("Connection","WebChannel transport errored:",t),l.$i(new zs(Hs.UNAVAILABLE,"The operation could not be completed")))})),d(a,Cs.EventType.MESSAGE,(t=>{var e;if(!u){const n=t.data[0];Ks(!!n);const s=n,r=s.error||(null===(e=s[0])||void 0===e?void 0:e.error);if(r){Vs("Connection","WebChannel received error:",r);const t=r.status;let e=function(t){const e=uo[t];if(void 0!==e)return fo(e)}(t),n=r.message;void 0===e&&(e=Hs.INTERNAL,n="Unknown error status: "+t+" with message "+r.message),u=!0,l.$i(new zs(e,n)),a.close()}else Vs("Connection","WebChannel received:",n),l.Oi(n)}})),d(r,Ns.STAT_EVENT,(t=>{t.stat===As?Vs("Connection","Detected buffering proxy"):t.stat===Ds&&Vs("Connection","Detected no buffering proxy")})),setTimeout((()=>{l.ki()}),0),l}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Bu(){return"undefined"!=typeof window?window:null}function ju(){return"undefined"!=typeof document?document:null} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ku(t){return new qo(t,!0)}class $u{constructor(t,e,n=1e3,s=1.5,r=6e4){this.Oe=t,this.timerId=e,this.Qi=n,this.Wi=s,this.Gi=r,this.zi=0,this.Hi=null,this.Ji=Date.now(),this.reset()}reset(){this.zi=0}Yi(){this.zi=this.Gi}Xi(t){this.cancel();const e=Math.floor(this.zi+this.Zi()),n=Math.max(0,Date.now()-this.Ji),s=Math.max(0,e-n);s>0&&Vs("ExponentialBackoff",`Backing off for ${s} ms (base delay: ${this.zi} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`),this.Hi=this.Oe.enqueueAfterDelay(this.timerId,s,(()=>(this.Ji=Date.now(),t()))),this.zi*=this.Wi,this.zithis.Gi&&(this.zi=this.Gi)}tr(){null!==this.Hi&&(this.Hi.skipDelay(),this.Hi=null)}cancel(){null!==this.Hi&&(this.Hi.cancel(),this.Hi=null)}Zi(){return(Math.random()-.5)*this.zi}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Gu{constructor(t,e,n,s,r,i,o){this.Oe=t,this.er=n,this.nr=s,this.sr=r,this.credentialsProvider=i,this.listener=o,this.state=0,this.ir=0,this.rr=null,this.cr=null,this.stream=null,this.ar=new $u(t,e)}ur(){return 1===this.state||5===this.state||this.hr()}hr(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.lr()}async stop(){this.ur()&&await this.close(0)}dr(){this.state=0,this.ar.reset()}wr(){this.hr()&&null===this.rr&&(this.rr=this.Oe.enqueueAfterDelay(this.er,6e4,(()=>this._r())))}mr(t){this.gr(),this.stream.send(t)}async _r(){if(this.hr())return this.close(0)}gr(){this.rr&&(this.rr.cancel(),this.rr=null)}yr(){this.cr&&(this.cr.cancel(),this.cr=null)}async close(t,e){this.gr(),this.yr(),this.ar.cancel(),this.ir++,4!==t?this.ar.reset():e&&e.code===Hs.RESOURCE_EXHAUSTED?(Us(e.toString()),Us("Using maximum backoff delay to prevent overloading the backend."),this.ar.Yi()):e&&e.code===Hs.UNAUTHENTICATED&&3!==this.state&&this.credentialsProvider.invalidateToken(),null!==this.stream&&(this.pr(),this.stream.close(),this.stream=null),this.state=t,await this.listener.Ci(e)}pr(){}auth(){this.state=1;const t=this.Tr(this.ir),e=this.ir;this.credentialsProvider.getToken().then((t=>{this.ir===e&&this.Er(t)}),(e=>{t((()=>{const t=new zs(Hs.UNKNOWN,"Fetching auth token failed: "+e.message);return this.Ir(t)}))}))}Er(t){const e=this.Tr(this.ir);this.stream=this.Ar(t),this.stream.Si((()=>{e((()=>(this.state=2,this.cr=this.Oe.enqueueAfterDelay(this.nr,1e4,(()=>(this.hr()&&(this.state=3),Promise.resolve()))),this.listener.Si())))})),this.stream.Ci((t=>{e((()=>this.Ir(t)))})),this.stream.onMessage((t=>{e((()=>this.onMessage(t)))}))}lr(){this.state=5,this.ar.Xi((async()=>{this.state=0,this.start()}))}Ir(t){return Vs("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}Tr(t){return e=>{this.Oe.enqueueAndForget((()=>this.ir===t?e():(Vs("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Hu extends Gu{constructor(t,e,n,s,r){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,n,r),this.N=s}Ar(t){return this.sr.ji("Listen",t)}onMessage(t){this.ar.reset();const e=function(t,e){let n;if("targetChange"in e){e.targetChange;const s=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:js()}(e.targetChange.targetChangeType||"NO_CHANGE"),r=e.targetChange.targetIds||[],i=function(t,e){return t.D?(Ks(void 0===e||"string"==typeof e),wr.fromBase64String(e||"")):(Ks(void 0===e||e instanceof Uint8Array),wr.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(t){const e=void 0===t.code?Hs.UNKNOWN:fo(t.code);return new zs(e,t.message||"")}(o);n=new Lo(s,r,i,a||null)}else if("documentChange"in e){e.documentChange;const s=e.documentChange;s.document,s.document.name,s.document.updateTime;const r=Qo(t,s.document.name),i=$o(s.document.updateTime),o=new $r({mapValue:{fields:s.document.fields}}),a=Hr.newFoundDocument(r,i,o),c=s.targetIds||[],u=s.removedTargetIds||[];n=new ko(c,u,a.key,a)}else if("documentDelete"in e){e.documentDelete;const s=e.documentDelete;s.document;const r=Qo(t,s.document),i=s.readTime?$o(s.readTime):cr.min(),o=Hr.newNoDocument(r,i),a=s.removedTargetIds||[];n=new ko([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const s=e.documentRemove;s.document;const r=Qo(t,s.document),i=s.removedTargetIds||[];n=new ko([],i,r,null)}else{if(!("filter"in e))return js();{e.filter;const t=e.filter;t.targetId;const s=t.count||0,r=new co(s),i=t.targetId;n=new Ro(i,r)}}return n}(this.N,t),n=function(t){if(!("targetChange"in t))return cr.min();const e=t.targetChange;return e.targetIds&&e.targetIds.length?cr.min():e.readTime?$o(e.readTime):cr.min()}(t);return this.listener.Rr(e,n)}br(t){const e={};e.database=Xo(this.N),e.addTarget=function(t,e){let n;const s=e.target;return n=Xr(s)?{documents:sa(t,s)}:{query:ra(t,s)},n.targetId=e.targetId,e.resumeToken.approximateByteSize()>0?n.resumeToken=jo(t,e.resumeToken):e.snapshotVersion.compareTo(cr.min())>0&&(n.readTime=Bo(t,e.snapshotVersion.toTimestamp())),n}(this.N,t);const n=function(t,e){const n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return js()}}(0,e.purpose);return null==n?null:{"goog-listen-tags":n}}(this.N,t);n&&(e.labels=n),this.mr(e)}Pr(t){const e={};e.database=Xo(this.N),e.removeTarget=t,this.mr(e)}}class zu extends Gu{constructor(t,e,n,s,r){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,n,r),this.N=s,this.vr=!1}get Vr(){return this.vr}start(){this.vr=!1,this.lastStreamToken=void 0,super.start()}pr(){this.vr&&this.Sr([])}Ar(t){return this.sr.ji("Write",t)}onMessage(t){if(Ks(!!t.streamToken),this.lastStreamToken=t.streamToken,this.vr){this.ar.reset();const e=function(t,e){return t&&t.length>0?(Ks(void 0!==e),t.map((t=>function(t,e){let n=t.updateTime?$o(t.updateTime):$o(e);return n.isEqual(cr.min())&&(n=$o(e)),new Hi(n,t.transformResults||[])}(t,e)))):[]}(t.writeResults,t.commitTime),n=$o(t.commitTime);return this.listener.Dr(n,e)}return Ks(!t.writeResults||0===t.writeResults.length),this.vr=!0,this.listener.Cr()}Nr(){const t={};t.database=Xo(this.N),this.mr(t)}Sr(t){const e={streamToken:this.lastStreamToken,writes:t.map((t=>ea(this.N,t)))};this.mr(e)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qu extends class{}{constructor(t,e,n){super(),this.credentials=t,this.sr=e,this.N=n,this.kr=!1}$r(){if(this.kr)throw new zs(Hs.FAILED_PRECONDITION,"The client has already been terminated.")}Li(t,e,n){return this.$r(),this.credentials.getToken().then((s=>this.sr.Li(t,e,n,s))).catch((t=>{throw"FirebaseError"===t.name?(t.code===Hs.UNAUTHENTICATED&&this.credentials.invalidateToken(),t):new zs(Hs.UNKNOWN,t.toString())}))}Ki(t,e,n){return this.$r(),this.credentials.getToken().then((s=>this.sr.Ki(t,e,n,s))).catch((t=>{throw"FirebaseError"===t.name?(t.code===Hs.UNAUTHENTICATED&&this.credentials.invalidateToken(),t):new zs(Hs.UNKNOWN,t.toString())}))}terminate(){this.kr=!0}}class Wu{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.Or=0,this.Fr=null,this.Mr=!0}Lr(){0===this.Or&&(this.Br("Unknown"),this.Fr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.Fr=null,this.Ur("Backend didn't respond within 10 seconds."),this.Br("Offline"),Promise.resolve()))))}qr(t){"Online"===this.state?this.Br("Unknown"):(this.Or++,this.Or>=1&&(this.Kr(),this.Ur(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.Br("Offline")))}set(t){this.Kr(),this.Or=0,"Online"===t&&(this.Mr=!1),this.Br(t)}Br(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}Ur(t){const e=`Could not reach Cloud Firestore backend. ${t}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Mr?(Us(e),this.Mr=!1):Vs("OnlineStateTracker",e)}Kr(){null!==this.Fr&&(this.Fr.cancel(),this.Fr=null)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Yu{constructor(t,e,n,s,r){this.localStore=t,this.datastore=e,this.asyncQueue=n,this.remoteSyncer={},this.jr=[],this.Qr=new Map,this.Wr=new Set,this.Gr=[],this.zr=r,this.zr.Ti((t=>{n.enqueueAndForget((async()=>{ih(this)&&(Vs("RemoteStore","Restarting streams for network reachability change."),await async function(t){const e=Gs(t);e.Wr.add(4),await Ju(e),e.Hr.set("Unknown"),e.Wr.delete(4),await Xu(e)}(this))}))})),this.Hr=new Wu(n,s)}}async function Xu(t){if(ih(t))for(const e of t.Gr)await e(!0)}async function Ju(t){for(const e of t.Gr)await e(!1)}function Zu(t,e){const n=Gs(t);n.Qr.has(e.targetId)||(n.Qr.set(e.targetId,e),rh(n)?sh(n):Eh(n).hr()&&eh(n,e))}function th(t,e){const n=Gs(t),s=Eh(n);n.Qr.delete(e),s.hr()&&nh(n,e),0===n.Qr.size&&(s.hr()?s.wr():ih(n)&&n.Hr.set("Unknown"))}function eh(t,e){t.Jr.Y(e.targetId),Eh(t).br(e)}function nh(t,e){t.Jr.Y(e),Eh(t).Pr(e)}function sh(t){t.Jr=new Mo({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),Tt:e=>t.Qr.get(e)||null}),Eh(t).start(),t.Hr.Lr()}function rh(t){return ih(t)&&!Eh(t).ur()&&t.Qr.size>0}function ih(t){return 0===Gs(t).Wr.size}function oh(t){t.Jr=void 0}async function ah(t){t.Qr.forEach(((e,n)=>{eh(t,e)}))}async function ch(t,e){oh(t),rh(t)?(t.Hr.qr(e),sh(t)):t.Hr.set("Unknown")}async function uh(t,e,n){if(t.Hr.set("Online"),e instanceof Lo&&2===e.state&&e.cause)try{await async function(t,e){const n=e.cause;for(const s of e.targetIds)t.Qr.has(s)&&(await t.remoteSyncer.rejectListen(s,n),t.Qr.delete(s),t.Jr.removeTarget(s))}(t,e)}catch(n){Vs("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),n),await hh(t,n)}else if(e instanceof ko?t.Jr.rt(e):e instanceof Ro?t.Jr.ft(e):t.Jr.at(e),!n.isEqual(cr.min()))try{const e=await au(t.localStore);n.compareTo(e)>=0&&await function(t,e){const n=t.Jr._t(e);return n.targetChanges.forEach(((n,s)=>{if(n.resumeToken.approximateByteSize()>0){const r=t.Qr.get(s);r&&t.Qr.set(s,r.withResumeToken(n.resumeToken,e))}})),n.targetMismatches.forEach((e=>{const n=t.Qr.get(e);if(!n)return;t.Qr.set(e,n.withResumeToken(wr.EMPTY_BYTE_STRING,n.snapshotVersion)),nh(t,e);const s=new tc(n.target,e,1,n.sequenceNumber);eh(t,s)})),t.remoteSyncer.applyRemoteEvent(n)}(t,n)}catch(e){Vs("RemoteStore","Failed to raise snapshot:",e),await hh(t,e)}}async function hh(t,e,n){if(!Ga(e))throw e;t.Wr.add(1),await Ju(t),t.Hr.set("Offline"),n||(n=()=>au(t.localStore)),t.asyncQueue.enqueueRetryable((async()=>{Vs("RemoteStore","Retrying IndexedDB access"),await n(),t.Wr.delete(1),await Xu(t)}))}function lh(t,e){return e().catch((n=>hh(t,n,e)))}async function dh(t){const e=Gs(t),n=Ih(e);let s=e.jr.length>0?e.jr[e.jr.length-1].batchId:-1;for(;fh(e);)try{const t=await uu(e.localStore,s);if(null===t){0===e.jr.length&&n.wr();break}s=t.batchId,gh(e,t)}catch(t){await hh(e,t)}mh(e)&&ph(e)}function fh(t){return ih(t)&&t.jr.length<10}function gh(t,e){t.jr.push(e);const n=Ih(t);n.hr()&&n.Vr&&n.Sr(e.mutations)}function mh(t){return ih(t)&&!Ih(t).ur()&&t.jr.length>0}function ph(t){Ih(t).start()}async function yh(t){Ih(t).Nr()}async function wh(t){const e=Ih(t);for(const n of t.jr)e.Sr(n.mutations)}async function vh(t,e,n){const s=t.jr.shift(),r=Za.from(s,e,n);await lh(t,(()=>t.remoteSyncer.applySuccessfulWrite(r))),await dh(t)}async function bh(t,e){e&&Ih(t).Vr&&await async function(t,e){if(lo(n=e.code)&&n!==Hs.ABORTED){const n=t.jr.shift();Ih(t).dr(),await lh(t,(()=>t.remoteSyncer.rejectFailedWrite(n.batchId,e))),await dh(t)}var n}(t,e),mh(t)&&ph(t)}async function Th(t,e){const n=Gs(t);e?(n.Wr.delete(2),await Xu(n)):e||(n.Wr.add(2),await Ju(n),n.Hr.set("Unknown"))}function Eh(t){return t.Yr||(t.Yr=function(t,e,n){const s=Gs(t);return s.$r(),new Hu(e,s.sr,s.credentials,s.N,n)}(t.datastore,t.asyncQueue,{Si:ah.bind(null,t),Ci:ch.bind(null,t),Rr:uh.bind(null,t)}),t.Gr.push((async e=>{e?(t.Yr.dr(),rh(t)?sh(t):t.Hr.set("Unknown")):(await t.Yr.stop(),oh(t))}))),t.Yr}function Ih(t){return t.Xr||(t.Xr=function(t,e,n){const s=Gs(t);return s.$r(),new zu(e,s.sr,s.credentials,s.N,n)}(t.datastore,t.asyncQueue,{Si:yh.bind(null,t),Ci:bh.bind(null,t),Cr:wh.bind(null,t),Dr:vh.bind(null,t)}),t.Gr.push((async e=>{e?(t.Xr.dr(),await dh(t)):(await t.Xr.stop(),t.jr.length>0&&(Vs("RemoteStore",`Stopping write stream with ${t.jr.length} pending writes`),t.jr=[]))}))),t.Xr +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class Sh{constructor(t,e,n,s,r){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=s,this.removalCallback=r,this.deferred=new Qs,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((t=>{}))}static createAndSchedule(t,e,n,s,r){const i=Date.now()+n,o=new Sh(t,e,i,s,r);return o.start(n),o}start(t){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new zs(Hs.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((t=>this.deferred.resolve(t)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function _h(t,e){if(Us("AsyncQueue",`${e}: ${t}`),Ga(t))return new zs(Hs.UNAVAILABLE,`${e}: ${t}`);throw t} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Nh{constructor(t){this.comparator=t?(e,n)=>t(e,n)||xr.comparator(e.key,n.key):(t,e)=>xr.comparator(t.key,e.key),this.keyedMap=Eo(),this.sortedSet=new go(this.comparator)}static emptySet(t){return new Nh(t.comparator)}has(t){return null!=this.keyedMap.get(t)}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal(((e,n)=>(t(e),!1)))}add(t){const e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){const e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof Nh))return!1;if(this.size!==t.size)return!1;const e=this.sortedSet.getIterator(),n=t.sortedSet.getIterator();for(;e.hasNext();){const t=e.getNext().key,s=n.getNext().key;if(!t.isEqual(s))return!1}return!0}toString(){const t=[];return this.forEach((e=>{t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"}copy(t,e){const n=new Nh;return n.comparator=this.comparator,n.keyedMap=t,n.sortedSet=e,n}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ah{constructor(){this.Zr=new go(xr.comparator)}track(t){const e=t.doc.key,n=this.Zr.get(e);n?0!==t.type&&3===n.type?this.Zr=this.Zr.insert(e,t):3===t.type&&1!==n.type?this.Zr=this.Zr.insert(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.Zr=this.Zr.insert(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.Zr=this.Zr.insert(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.Zr=this.Zr.remove(e):1===t.type&&2===n.type?this.Zr=this.Zr.insert(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.Zr=this.Zr.insert(e,{type:2,doc:t.doc}):js():this.Zr=this.Zr.insert(e,t)}eo(){const t=[];return this.Zr.inorderTraversal(((e,n)=>{t.push(n)})),t}}class Dh{constructor(t,e,n,s,r,i,o,a){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=s,this.mutatedKeys=r,this.fromCache=i,this.syncStateChanged=o,this.excludesMetadataChanges=a}static fromInitialDocuments(t,e,n,s){const r=[];return e.forEach((t=>{r.push({type:0,doc:t})})),new Dh(t,e,Nh.emptySet(e),r,n,s,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&Si(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(let t=0;t_i(t)),Si),this.onlineState="Unknown",this.so=new Set}}async function kh(t,e){const n=Gs(t),s=e.query;let r=!1,i=n.queries.get(s);if(i||(r=!0,i=new xh),r)try{i.no=await n.onListen(s)}catch(t){const n=_h(t,`Initialization of query '${Ni(e.query)}' failed`);return void e.onError(n)}n.queries.set(s,i),i.listeners.push(e),e.io(n.onlineState),i.no&&e.ro(i.no)&&Mh(n)}async function Rh(t,e){const n=Gs(t),s=e.query;let r=!1;const i=n.queries.get(s);if(i){const t=i.listeners.indexOf(e);t>=0&&(i.listeners.splice(t,1),r=0===i.listeners.length)}if(r)return n.queries.delete(s),n.onUnlisten(s)}function Lh(t,e){const n=Gs(t);let s=!1;for(const t of e){const e=t.query,r=n.queries.get(e);if(r){for(const e of r.listeners)e.ro(t)&&(s=!0);r.no=t}}s&&Mh(n)}function Oh(t,e,n){const s=Gs(t),r=s.queries.get(e);if(r)for(const t of r.listeners)t.onError(n);s.queries.delete(e)}function Mh(t){t.so.forEach((t=>{t.next()}))}class Fh{constructor(t,e,n){this.query=t,this.oo=e,this.co=!1,this.ao=null,this.onlineState="Unknown",this.options=n||{}}ro(t){if(!this.options.includeMetadataChanges){const e=[];for(const n of t.docChanges)3!==n.type&&e.push(n);t=new Dh(t.query,t.docs,t.oldDocs,e,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0)}let e=!1;return this.co?this.uo(t)&&(this.oo.next(t),e=!0):this.ho(t,this.onlineState)&&(this.lo(t),e=!0),this.ao=t,e}onError(t){this.oo.error(t)}io(t){this.onlineState=t;let e=!1;return this.ao&&!this.co&&this.ho(this.ao,t)&&(this.lo(this.ao),e=!0),e}ho(t,e){if(!t.fromCache)return!0;const n="Offline"!==e;return!(this.options.fo&&n||t.docs.isEmpty()&&"Offline"!==e)}uo(t){if(t.docChanges.length>0)return!0;const e=this.ao&&this.ao.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges}lo(t){t=Dh.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache),this.co=!0,this.oo.next(t)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ph{constructor(t,e){this.payload=t,this.byteLength=e}wo(){return"metadata"in this.payload}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Vh{constructor(t){this.N=t}zn(t){return Qo(this.N,t)}Hn(t){return t.metadata.exists?ta(this.N,t.document,!1):Hr.newNoDocument(this.zn(t.metadata.name),this.Jn(t.metadata.readTime))}Jn(t){return $o(t)}}class Uh{constructor(t,e,n){this._o=t,this.localStore=e,this.N=n,this.queries=[],this.documents=[],this.progress=qh(t)}mo(t){this.progress.bytesLoaded+=t.byteLength;let e=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++e):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++e),e!==this.progress.documentsLoaded?(this.progress.documentsLoaded=e,Object.assign({},this.progress)):null}yo(t){const e=new Map,n=new Vh(this.N);for(const s of t)if(s.metadata.queries){const t=n.zn(s.metadata.name);for(const n of s.metadata.queries){const s=(e.get(n)||No()).add(t);e.set(n,s)}}return e}async complete(){const t=await async function(t,e,n,s){const r=Gs(t);let i=No(),o=bo(),a=So();for(const t of n){const n=e.zn(t.metadata.name);t.document&&(i=i.add(n)),o=o.insert(n,e.Hn(t)),a=a.insert(n,e.Jn(t.metadata.readTime))}const c=r.jn.newChangeBuffer({trackRemovals:!0}),u=await hu(r,function(t){return Ei(mi(fr.fromString(`__bundle__/docs/${t}`)))}(s));return r.persistence.runTransaction("Apply bundle documents","readwrite",(t=>cu(t,c,o,cr.min(),a).next((e=>(c.apply(t),e))).next((e=>r.ze.removeMatchingKeysForTargetId(t,u.targetId).next((()=>r.ze.addMatchingKeys(t,i,u.targetId))).next((()=>r.Qn.vn(t,e))).next((()=>e))))))}(this.localStore,new Vh(this.N),this.documents,this._o.id),e=this.yo(this.documents);for(const t of this.queries)await mu(this.localStore,t,e.get(t.name));return this.progress.taskState="Success",new tu(Object.assign({},this.progress),t)}}function qh(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Bh{constructor(t){this.key=t}}class jh{constructor(t){this.key=t}}class Kh{constructor(t,e){this.query=t,this.po=e,this.To=null,this.current=!1,this.Eo=No(),this.mutatedKeys=No(),this.Io=Di(t),this.Ao=new Nh(this.Io)}get Ro(){return this.po}bo(t,e){const n=e?e.Po:new Ah,s=e?e.Ao:this.Ao;let r=e?e.mutatedKeys:this.mutatedKeys,i=s,o=!1;const a=pi(this.query)&&s.size===this.query.limit?s.last():null,c=yi(this.query)&&s.size===this.query.limit?s.first():null;if(t.inorderTraversal(((t,e)=>{const u=s.get(t),h=Ai(this.query,e)?e:null,l=!!u&&this.mutatedKeys.has(u.key),d=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations);let f=!1;u&&h?u.data.isEqual(h.data)?l!==d&&(n.track({type:3,doc:h}),f=!0):this.vo(u,h)||(n.track({type:2,doc:h}),f=!0,(a&&this.Io(h,a)>0||c&&this.Io(h,c)<0)&&(o=!0)):!u&&h?(n.track({type:0,doc:h}),f=!0):u&&!h&&(n.track({type:1,doc:u}),f=!0,(a||c)&&(o=!0)),f&&(h?(i=i.add(h),r=d?r.add(t):r.delete(t)):(i=i.delete(t),r=r.delete(t)))})),pi(this.query)||yi(this.query))for(;i.size>this.query.limit;){const t=pi(this.query)?i.last():i.first();i=i.delete(t.key),r=r.delete(t.key),n.track({type:1,doc:t})}return{Ao:i,Po:n,Ln:o,mutatedKeys:r}}vo(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,n){const s=this.Ao;this.Ao=t.Ao,this.mutatedKeys=t.mutatedKeys;const r=t.Po.eo();r.sort(((t,e)=>function(t,e){const n=t=>{switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return js()}};return n(t)-n(e)}(t.type,e.type)||this.Io(t.doc,e.doc))),this.Vo(n);const i=e?this.So():[],o=0===this.Eo.size&&this.current?1:0,a=o!==this.To;return this.To=o,0!==r.length||a?{snapshot:new Dh(this.query,t.Ao,s,r,t.mutatedKeys,0===o,a,!1),Do:i}:{Do:i}}io(t){return this.current&&"Offline"===t?(this.current=!1,this.applyChanges({Ao:this.Ao,Po:new Ah,mutatedKeys:this.mutatedKeys,Ln:!1},!1)):{Do:[]}}Co(t){return!this.po.has(t)&&!!this.Ao.has(t)&&!this.Ao.get(t).hasLocalMutations}Vo(t){t&&(t.addedDocuments.forEach((t=>this.po=this.po.add(t))),t.modifiedDocuments.forEach((t=>{})),t.removedDocuments.forEach((t=>this.po=this.po.delete(t))),this.current=t.current)}So(){if(!this.current)return[];const t=this.Eo;this.Eo=No(),this.Ao.forEach((t=>{this.Co(t.key)&&(this.Eo=this.Eo.add(t.key))}));const e=[];return t.forEach((t=>{this.Eo.has(t)||e.push(new jh(t))})),this.Eo.forEach((n=>{t.has(n)||e.push(new Bh(n))})),e}No(t){this.po=t.Gn,this.Eo=No();const e=this.bo(t.documents);return this.applyChanges(e,!0)}xo(){return Dh.fromInitialDocuments(this.query,this.Ao,this.mutatedKeys,0===this.To)}}class $h{constructor(t,e,n){this.query=t,this.targetId=e,this.view=n}}class Gh{constructor(t){this.key=t,this.ko=!1}}class Hh{constructor(t,e,n,s,r,i){this.localStore=t,this.remoteStore=e,this.eventManager=n,this.sharedClientState=s,this.currentUser=r,this.maxConcurrentLimboResolutions=i,this.$o={},this.Oo=new qc((t=>_i(t)),Si),this.Fo=new Map,this.Mo=new Set,this.Lo=new go(xr.comparator),this.Bo=new Map,this.Uo=new yu,this.qo={},this.Ko=new Map,this.jo=Dc.ie(),this.onlineState="Unknown",this.Qo=void 0}get isPrimaryClient(){return!0===this.Qo}}async function zh(t,e){const n=vl(t);let s,r;const i=n.Oo.get(e);if(i)s=i.targetId,n.sharedClientState.addLocalQueryTarget(s),r=i.view.xo();else{const t=await hu(n.localStore,Ei(e)),i=n.sharedClientState.addLocalQueryTarget(t.targetId);s=t.targetId,r=await Qh(n,e,s,"current"===i),n.isPrimaryClient&&Zu(n.remoteStore,t)}return r}async function Qh(t,e,n,s){t.Wo=(e,n,s)=>async function(t,e,n,s){let r=e.view.bo(n);r.Ln&&(r=await du(t.localStore,e.query,!1).then((({documents:t})=>e.view.bo(t,r))));const i=s&&s.targetChanges.get(e.targetId),o=e.view.applyChanges(r,t.isPrimaryClient,i);return il(t,e.targetId,o.Do),o.snapshot}(t,e,n,s);const r=await du(t.localStore,e,!0),i=new Kh(e,r.Gn),o=i.bo(r.documents),a=Co.createSynthesizedTargetChangeForCurrentChange(n,s&&"Offline"!==t.onlineState),c=i.applyChanges(o,t.isPrimaryClient,a);il(t,n,c.Do);const u=new $h(e,n,i);return t.Oo.set(e,u),t.Fo.has(n)?t.Fo.get(n).push(e):t.Fo.set(n,[e]),c.snapshot}async function Wh(t,e){const n=Gs(t),s=n.Oo.get(e),r=n.Fo.get(s.targetId);if(r.length>1)return n.Fo.set(s.targetId,r.filter((t=>!Si(t,e)))),void n.Oo.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(s.targetId),n.sharedClientState.isActiveQueryTarget(s.targetId)||await lu(n.localStore,s.targetId,!1).then((()=>{n.sharedClientState.clearQueryState(s.targetId),th(n.remoteStore,s.targetId),sl(n,s.targetId)})).catch(Lc)):(sl(n,s.targetId),await lu(n.localStore,s.targetId,!0))}async function Yh(t,e){const n=Gs(t);try{const t=await function(t,e){const n=Gs(t),s=e.snapshotVersion;let r=n.Un;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(t=>{const i=n.jn.newChangeBuffer({trackRemovals:!0});r=n.Un;const o=[];e.targetChanges.forEach(((e,i)=>{const a=r.get(i);if(!a)return;o.push(n.ze.removeMatchingKeys(t,e.removedDocuments,i).next((()=>n.ze.addMatchingKeys(t,e.addedDocuments,i))));const c=e.resumeToken;if(c.approximateByteSize()>0){const u=a.withResumeToken(c,s).withSequenceNumber(t.currentSequenceNumber);r=r.insert(i,u),function(t,e,n){return Ks(e.resumeToken.approximateByteSize()>0),0===t.resumeToken.approximateByteSize()||e.snapshotVersion.toMicroseconds()-t.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(a,u,e)&&o.push(n.ze.updateTargetData(t,u))}}));let a=bo();if(e.documentUpdates.forEach(((s,r)=>{e.resolvedLimboDocuments.has(s)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(t,s))})),o.push(cu(t,i,e.documentUpdates,s,void 0).next((t=>{a=t}))),!s.isEqual(cr.min())){const e=n.ze.getLastRemoteSnapshotVersion(t).next((e=>n.ze.setTargetsMetadata(t,t.currentSequenceNumber,s)));o.push(e)}return qa.waitFor(o).next((()=>i.apply(t))).next((()=>n.Qn.vn(t,a))).next((()=>a))})).then((t=>(n.Un=r,t)))}(n.localStore,e);e.targetChanges.forEach(((t,e)=>{const s=n.Bo.get(e);s&&(Ks(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1),t.addedDocuments.size>0?s.ko=!0:t.modifiedDocuments.size>0?Ks(s.ko):t.removedDocuments.size>0&&(Ks(s.ko),s.ko=!1))})),await cl(n,t,e)}catch(t){await Lc(t)}}function Xh(t,e,n){const s=Gs(t);if(s.isPrimaryClient&&0===n||!s.isPrimaryClient&&1===n){const t=[];s.Oo.forEach(((n,s)=>{const r=s.view.io(e);r.snapshot&&t.push(r.snapshot)})),function(t,e){const n=Gs(t);n.onlineState=e;let s=!1;n.queries.forEach(((t,n)=>{for(const t of n.listeners)t.io(e)&&(s=!0)})),s&&Mh(n)}(s.eventManager,e),t.length&&s.$o.Rr(t),s.onlineState=e,s.isPrimaryClient&&s.sharedClientState.setOnlineState(e)}}async function Jh(t,e,n){const s=Gs(t);s.sharedClientState.updateQueryState(e,"rejected",n);const r=s.Bo.get(e),i=r&&r.key;if(i){let t=new go(xr.comparator);t=t.insert(i,Hr.newNoDocument(i,cr.min()));const n=No().add(i),r=new xo(cr.min(),new Map,new yo(rr),t,n);await Yh(s,r),s.Lo=s.Lo.remove(i),s.Bo.delete(e),al(s)}else await lu(s.localStore,e,!1).then((()=>sl(s,e,n))).catch(Lc)}async function Zh(t,e){const n=Gs(t),s=e.batch.batchId;try{const t=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(t=>{const s=e.batch.keys(),r=n.jn.newChangeBuffer({trackRemovals:!0});return function(t,e,n,s){const r=n.batch,i=r.keys();let o=qa.resolve();return i.forEach((t=>{o=o.next((()=>s.getEntry(e,t))).next((e=>{const i=n.docVersions.get(t);Ks(null!==i),e.version.compareTo(i)<0&&(r.applyToRemoteDocument(e,n),e.isValidDocument()&&s.addEntry(e,n.commitVersion))}))})),o.next((()=>t.In.removeMutationBatch(e,r)))}(n,t,e,r).next((()=>r.apply(t))).next((()=>n.In.performConsistencyCheck(t))).next((()=>n.Qn.Pn(t,s)))}))}(n.localStore,e);nl(n,s,null),el(n,s),n.sharedClientState.updateMutationState(s,"acknowledged"),await cl(n,t)}catch(t){await Lc(t)}}async function tl(t,e,n){const s=Gs(t);try{const t=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(t=>{let s;return n.In.lookupMutationBatch(t,e).next((e=>(Ks(null!==e),s=e.keys(),n.In.removeMutationBatch(t,e)))).next((()=>n.In.performConsistencyCheck(t))).next((()=>n.Qn.Pn(t,s)))}))}(s.localStore,e);nl(s,e,n),el(s,e),s.sharedClientState.updateMutationState(e,"rejected",n),await cl(s,t)}catch(t){await Lc(t)}}function el(t,e){(t.Ko.get(e)||[]).forEach((t=>{t.resolve()})),t.Ko.delete(e)}function nl(t,e,n){const s=Gs(t);let r=s.qo[s.currentUser.toKey()];if(r){const t=r.get(e);t&&(n?t.reject(n):t.resolve(),r=r.remove(e)),s.qo[s.currentUser.toKey()]=r}}function sl(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const s of t.Fo.get(e))t.Oo.delete(s),n&&t.$o.Go(s,n);t.Fo.delete(e),t.isPrimaryClient&&t.Uo.cs(e).forEach((e=>{t.Uo.containsKey(e)||rl(t,e)}))}function rl(t,e){t.Mo.delete(e.path.canonicalString());const n=t.Lo.get(e);null!==n&&(th(t.remoteStore,n),t.Lo=t.Lo.remove(e),t.Bo.delete(n),al(t))}function il(t,e,n){for(const s of n)s instanceof Bh?(t.Uo.addReference(s.key,e),ol(t,s)):s instanceof jh?(Vs("SyncEngine","Document no longer in limbo: "+s.key),t.Uo.removeReference(s.key,e),t.Uo.containsKey(s.key)||rl(t,s.key)):js()}function ol(t,e){const n=e.key,s=n.path.canonicalString();t.Lo.get(n)||t.Mo.has(s)||(Vs("SyncEngine","New document in limbo: "+n),t.Mo.add(s),al(t))}function al(t){for(;t.Mo.size>0&&t.Lo.size{o.push(s.Wo(a,e,n).then((t=>{if(t){s.isPrimaryClient&&s.sharedClientState.updateQueryState(a.targetId,t.fromCache?"not-current":"current"),r.push(t);const e=nu.kn(a.targetId,t);i.push(e)}})))})),await Promise.all(o),s.$o.Rr(r),await async function(t,e){const n=Gs(t);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(t=>qa.forEach(e,(e=>qa.forEach(e.Nn,(s=>n.persistence.referenceDelegate.addReference(t,e.targetId,s))).next((()=>qa.forEach(e.xn,(s=>n.persistence.referenceDelegate.removeReference(t,e.targetId,s)))))))))}catch(t){if(!Ga(t))throw t;Vs("LocalStore","Failed to update sequence numbers: "+t)}for(const t of e){const e=t.targetId;if(!t.fromCache){const t=n.Un.get(e),s=t.snapshotVersion,r=t.withLastLimboFreeSnapshotVersion(s);n.Un=n.Un.insert(e,r)}}}(s.localStore,i))}async function ul(t,e){const n=Gs(t);if(!n.currentUser.isEqual(e)){Vs("SyncEngine","User change. New user:",e.toKey());const t=await ou(n.localStore,e);n.currentUser=e,function(t,e){t.Ko.forEach((t=>{t.forEach((t=>{t.reject(new zs(Hs.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.Ko.clear()}(n),n.sharedClientState.handleUserChange(e,t.removedBatchIds,t.addedBatchIds),await cl(n,t.Wn)}}function hl(t,e){const n=Gs(t),s=n.Bo.get(e);if(s&&s.ko)return No().add(s.key);{let t=No();const s=n.Fo.get(e);if(!s)return t;for(const e of s){const s=n.Oo.get(e);t=t.unionWith(s.view.Ro)}return t}}async function ll(t,e){const n=Gs(t),s=await du(n.localStore,e.query,!0),r=e.view.No(s);return n.isPrimaryClient&&il(n,e.targetId,r.Do),r}async function dl(t){const e=Gs(t);return gu(e.localStore).then((t=>cl(e,t)))}async function fl(t,e,n,s){const r=Gs(t),i=await function(t,e){const n=Gs(t),s=Gs(n.In);return n.persistence.runTransaction("Lookup mutation documents","readonly",(t=>s.Xt(t,e).next((e=>e?n.Qn.Pn(t,e):qa.resolve(null)))))}(r.localStore,e);null!==i?("pending"===n?await dh(r.remoteStore):"acknowledged"===n||"rejected"===n?(nl(r,e,s||null),el(r,e),function(t,e){Gs(Gs(t).In).te(e)}(r.localStore,e)):js(),await cl(r,i)):Vs("SyncEngine","Cannot apply mutation batch with id: "+e)}async function gl(t,e,n){const s=Gs(t),r=[],i=[];for(const t of e){let e;const n=s.Fo.get(t);if(n&&0!==n.length){e=await hu(s.localStore,Ei(n[0]));for(const t of n){const e=s.Oo.get(t),n=await ll(s,e);n.snapshot&&i.push(n.snapshot)}}else{const n=await fu(s.localStore,t);e=await hu(s.localStore,n),await Qh(s,ml(n),t,!1)}r.push(e)}return s.$o.Rr(i),r}function ml(t){return gi(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function pl(t){const e=Gs(t);return Gs(Gs(e.localStore).persistence).pn()}async function yl(t,e,n,s){const r=Gs(t);if(r.Qo)Vs("SyncEngine","Ignoring unexpected query state notification.");else if(r.Fo.has(e))switch(n){case"current":case"not-current":{const t=await gu(r.localStore),s=xo.createSynthesizedRemoteEventForCurrentChange(e,"current"===n);await cl(r,t,s);break}case"rejected":await lu(r.localStore,e,!0),sl(r,e,s);break;default:js()}}async function wl(t,e,n){const s=vl(t);if(s.Qo){for(const t of e){if(s.Fo.has(t)){Vs("SyncEngine","Adding an already active target "+t);continue}const e=await fu(s.localStore,t),n=await hu(s.localStore,e);await Qh(s,ml(e),n.targetId,!1),Zu(s.remoteStore,n)}for(const t of n)s.Fo.has(t)&&await lu(s.localStore,t,!1).then((()=>{th(s.remoteStore,t),sl(s,t)})).catch(Lc)}}function vl(t){const e=Gs(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=Yh.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=hl.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=Jh.bind(null,e),e.$o.Rr=Lh.bind(null,e.eventManager),e.$o.Go=Oh.bind(null,e.eventManager),e}function bl(t){const e=Gs(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=Zh.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=tl.bind(null,e),e}class Tl{constructor(){this.synchronizeTabs=!1}async initialize(t){this.N=Ku(t.databaseInfo.databaseId),this.sharedClientState=this.Ho(t),this.persistence=this.Jo(t),await this.persistence.start(),this.gcScheduler=this.Yo(t),this.localStore=this.Xo(t)}Yo(t){return null}Xo(t){return iu(this.persistence,new su,t.initialUser,this.N)}Jo(t){return new Iu(_u.Ns,this.N)}Ho(t){return new Mu}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class El extends Tl{constructor(t,e,n){super(),this.Zo=t,this.cacheSizeBytes=e,this.forceOwnership=n,this.synchronizeTabs=!1}async initialize(t){await super.initialize(t),await async function(t){const e=Gs(t);return e.persistence.runTransaction("Synchronize last document change read time","readonly",(t=>function(t){const e=Gc(t);let n=cr.min();return e.Kt({index:Da.readTimeIndex,reverse:!0},((t,e,s)=>{e.readTime&&(n=ic(e.readTime)),s.done()})).next((()=>n))}(t))).then((t=>{e.Kn=t}))}(this.localStore),await this.Zo.initialize(this,t),await bl(this.Zo.syncEngine),await dh(this.Zo.remoteStore),await this.persistence.nn((()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(this.localStore),Promise.resolve())))}Xo(t){return iu(this.persistence,new su,t.initialUser,this.N)}Yo(t){const e=this.persistence.referenceDelegate.garbageCollector;return new Fc(e,t.asyncQueue)}Jo(t){const e=Zc(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?bc.withCacheSize(this.cacheSizeBytes):bc.DEFAULT;return new Yc(this.synchronizeTabs,e,t.clientId,n,t.asyncQueue,Bu(),ju(),this.N,this.sharedClientState,!!this.forceOwnership)}Ho(t){return new Mu}}class Il extends El{constructor(t,e){super(t,e,!1),this.Zo=t,this.cacheSizeBytes=e,this.synchronizeTabs=!0}async initialize(t){await super.initialize(t);const e=this.Zo.syncEngine;this.sharedClientState instanceof Ou&&(this.sharedClientState.syncEngine={_i:fl.bind(null,e),mi:yl.bind(null,e),gi:wl.bind(null,e),pn:pl.bind(null,e),wi:dl.bind(null,e)},await this.sharedClientState.start()),await this.persistence.nn((async t=>{await async function(t,e){const n=Gs(t);if(vl(n),bl(n),!0===e&&!0!==n.Qo){const t=n.sharedClientState.getAllActiveQueryTargets(),e=await gl(n,t.toArray());n.Qo=!0,await Th(n.remoteStore,!0);for(const t of e)Zu(n.remoteStore,t)}else if(!1===e&&!1!==n.Qo){const t=[];let e=Promise.resolve();n.Fo.forEach(((s,r)=>{n.sharedClientState.isLocalQueryTarget(r)?t.push(r):e=e.then((()=>(sl(n,r),lu(n.localStore,r,!0)))),th(n.remoteStore,r)})),await e,await gl(n,t),function(t){const e=Gs(t);e.Bo.forEach(((t,n)=>{th(e.remoteStore,n)})),e.Uo.us(),e.Bo=new Map,e.Lo=new go(xr.comparator)}(n),n.Qo=!1,await Th(n.remoteStore,!1)}}(this.Zo.syncEngine,t),this.gcScheduler&&(t&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):t||this.gcScheduler.stop())}))}Ho(t){const e=Bu();if(!Ou.bt(e))throw new zs(Hs.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const n=Zc(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey);return new Ou(e,t.asyncQueue,n,t.clientId,t.initialUser)}}class Sl{async initialize(t,e){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=t=>Xh(this.syncEngine,t,1),this.remoteStore.remoteSyncer.handleCredentialChange=ul.bind(null,this.syncEngine),await Th(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(t){return new Ch}createDatastore(t){const e=Ku(t.databaseInfo.databaseId),n=(s=t.databaseInfo,new qu(s));var s;return function(t,e,n){return new Qu(t,e,n)}(t.credentials,n,e)}createRemoteStore(t){var e,n,s,r,i;return e=this.localStore,n=this.datastore,s=t.asyncQueue,r=t=>Xh(this.syncEngine,t,0),i=Pu.bt()?new Pu:new Fu,new Yu(e,n,s,r,i)}createSyncEngine(t,e){return function(t,e,n,s,r,i,o){const a=new Hh(t,e,n,s,r,i);return o&&(a.Qo=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){return async function(t){const e=Gs(t);Vs("RemoteStore","RemoteStore shutting down."),e.Wr.add(5),await Ju(e),e.zr.shutdown(),e.Hr.set("Unknown")}(this.remoteStore)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _l(t,e=10240){let n=0;return{async read(){if(n{this.muted||t(e)}),0)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Al{constructor(t,e){this.nc=t,this.N=e,this.metadata=new Qs,this.buffer=new Uint8Array,this.sc=new TextDecoder("utf-8"),this.ic().then((t=>{t&&t.wo()?this.metadata.resolve(t.payload.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(null==t?void 0:t.payload)}`))}),(t=>this.metadata.reject(t)))}close(){return this.nc.cancel()}async getMetadata(){return this.metadata.promise}async zo(){return await this.getMetadata(),this.ic()}async ic(){const t=await this.rc();if(null===t)return null;const e=this.sc.decode(t),n=Number(e);isNaN(n)&&this.oc(`length string (${e}) is not valid number`);const s=await this.cc(n);return new Ph(JSON.parse(s),t.length+n)}ac(){return this.buffer.findIndex((t=>t==="{".charCodeAt(0)))}async rc(){for(;this.ac()<0&&!await this.uc(););if(0===this.buffer.length)return null;const t=this.ac();t<0&&this.oc("Reached the end of bundle when a length string is expected.");const e=this.buffer.slice(0,t);return this.buffer=this.buffer.slice(t),e}async cc(t){for(;this.buffer.length0)throw new zs(Hs.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");const e=await async function(t,e){const n=Gs(t),s=Xo(n.N)+"/documents",r={documents:e.map((t=>zo(n.N,t)))},i=await n.Ki("BatchGetDocuments",s,r),o=new Map;i.forEach((t=>{const e=function(t,e){return"found"in e?function(t,e){Ks(!!e.found),e.found.name,e.found.updateTime;const n=Qo(t,e.found.name),s=$o(e.found.updateTime),r=new $r({mapValue:{fields:e.found.fields}});return Hr.newFoundDocument(n,s,r)}(t,e):"missing"in e?function(t,e){Ks(!!e.missing),Ks(!!e.readTime);const n=Qo(t,e.missing),s=$o(e.readTime);return Hr.newNoDocument(n,s)}(t,e):js()}(n.N,t);o.set(e.key.toString(),e)}));const a=[];return e.forEach((t=>{const e=o.get(t.toString());Ks(!!e),a.push(e)})),a}(this.datastore,t);return e.forEach((t=>this.recordVersion(t))),e}set(t,e){this.write(e.toMutation(t,this.precondition(t))),this.writtenDocs.add(t.toString())}update(t,e){try{this.write(e.toMutation(t,this.preconditionForUpdate(t)))}catch(t){this.lastWriteError=t}this.writtenDocs.add(t.toString())}delete(t){this.write(new oo(t,this.precondition(t))),this.writtenDocs.add(t.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;const t=this.readVersions;this.mutations.forEach((e=>{t.delete(e.key.toString())})),t.forEach(((t,e)=>{const n=xr.fromPath(e);this.mutations.push(new ao(n,this.precondition(n)))})),await async function(t,e){const n=Gs(t),s=Xo(n.N)+"/documents",r={writes:e.map((t=>ea(n.N,t)))};await n.Li("Commit",s,r)}(this.datastore,this.mutations),this.committed=!0}recordVersion(t){let e;if(t.isFoundDocument())e=t.version;else{if(!t.isNoDocument())throw js();e=cr.min()}const n=this.readVersions.get(t.key.toString());if(n){if(!e.isEqual(n))throw new zs(Hs.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(t.key.toString(),e)}precondition(t){const e=this.readVersions.get(t.toString());return!this.writtenDocs.has(t.toString())&&e?zi.updateTime(e):zi.none()}preconditionForUpdate(t){const e=this.readVersions.get(t.toString());if(!this.writtenDocs.has(t.toString())&&e){if(e.isEqual(cr.min()))throw new zs(Hs.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return zi.updateTime(e)}return zi.exists(!0)}write(t){this.ensureCommitNotCalled(),this.mutations.push(t)}ensureCommitNotCalled(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xl{constructor(t,e,n,s){this.asyncQueue=t,this.datastore=e,this.updateFunction=n,this.deferred=s,this.hc=5,this.ar=new $u(this.asyncQueue,"transaction_retry")}run(){this.hc-=1,this.lc()}lc(){this.ar.Xi((async()=>{const t=new Dl(this.datastore),e=this.fc(t);e&&e.then((e=>{this.asyncQueue.enqueueAndForget((()=>t.commit().then((()=>{this.deferred.resolve(e)})).catch((t=>{this.dc(t)}))))})).catch((t=>{this.dc(t)}))}))}fc(t){try{const e=this.updateFunction(t);return!Nr(e)&&e.catch&&e.then?e:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.deferred.reject(t),null}}dc(t){this.hc>0&&this.wc(t)?(this.hc-=1,this.asyncQueue.enqueueAndForget((()=>(this.lc(),Promise.resolve())))):this.deferred.reject(t)}wc(t){if("FirebaseError"===t.name){const e=t.code;return"aborted"===e||"failed-precondition"===e||!lo(e)}return!1}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cl{constructor(t,e,n){this.credentials=t,this.asyncQueue=e,this.databaseInfo=n,this.user=Ls.UNAUTHENTICATED,this.clientId=sr.I(),this.credentialListener=()=>Promise.resolve(),this.credentials.start(e,(async t=>{Vs("FirestoreClient","Received user=",t.uid),await this.credentialListener(t),this.user=t}))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.credentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new zs(Hs.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const t=new Qs;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.credentials.shutdown(),t.resolve()}catch(e){const n=_h(e,"Failed to shutdown persistence");t.reject(n)}})),t.promise}}async function kl(t,e){t.asyncQueue.verifyOperationInProgress(),Vs("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let s=n.initialUser;t.setCredentialChangeListener((async t=>{s.isEqual(t)||(await ou(e.localStore,t),s=t)})),e.persistence.setDatabaseDeletedListener((()=>t.terminate())),t.offlineComponents=e}async function Rl(t,e){t.asyncQueue.verifyOperationInProgress();const n=await Ll(t);Vs("FirestoreClient","Initializing OnlineComponentProvider");const s=await t.getConfiguration();await e.initialize(n,s),t.setCredentialChangeListener((t=>async function(t,e){const n=Gs(t);n.asyncQueue.verifyOperationInProgress(),Vs("RemoteStore","RemoteStore received new credentials");const s=ih(n);n.Wr.add(3),await Ju(n),s&&n.Hr.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Wr.delete(3),await Xu(n)}(e.remoteStore,t))),t.onlineComponents=e}async function Ll(t){return t.offlineComponents||(Vs("FirestoreClient","Using default OfflineComponentProvider"),await kl(t,new Tl)),t.offlineComponents}async function Ol(t){return t.onlineComponents||(Vs("FirestoreClient","Using default OnlineComponentProvider"),await Rl(t,new Sl)),t.onlineComponents}function Ml(t){return Ll(t).then((t=>t.persistence))}function Fl(t){return Ll(t).then((t=>t.localStore))}function Pl(t){return Ol(t).then((t=>t.remoteStore))}function Vl(t){return Ol(t).then((t=>t.syncEngine))}async function Ul(t){const e=await Ol(t),n=e.eventManager;return n.onListen=zh.bind(null,e.syncEngine),n.onUnlisten=Wh.bind(null,e.syncEngine),n}function ql(t,e,n={}){const s=new Qs;return t.asyncQueue.enqueueAndForget((async()=>function(t,e,n,s,r){const i=new Nl({next:i=>{e.enqueueAndForget((()=>Rh(t,o)));const a=i.docs.has(n);!a&&i.fromCache?r.reject(new zs(Hs.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&i.fromCache&&s&&"server"===s.source?r.reject(new zs(Hs.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):r.resolve(i)},error:t=>r.reject(t)}),o=new Fh(mi(n.path),i,{includeMetadataChanges:!0,fo:!0});return kh(t,o)}(await Ul(t),t.asyncQueue,e,n,s))),s.promise}function Bl(t,e,n={}){const s=new Qs;return t.asyncQueue.enqueueAndForget((async()=>function(t,e,n,s,r){const i=new Nl({next:n=>{e.enqueueAndForget((()=>Rh(t,o))),n.fromCache&&"server"===s.source?r.reject(new zs(Hs.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):r.resolve(n)},error:t=>r.reject(t)}),o=new Fh(n,i,{includeMetadataChanges:!0,fo:!0});return kh(t,o)}(await Ul(t),t.asyncQueue,e,n,s))),s.promise}function jl(t,e,n,s){const r=function(t,e){let n;return n="string"==typeof t?(new TextEncoder).encode(t):t,function(t,e){return new Al(t,e)}(function(t,e){if(t instanceof Uint8Array)return _l(t,e);if(t instanceof ArrayBuffer)return _l(new Uint8Array(t),e);if(t instanceof ReadableStream)return t.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(n),e)}(n,Ku(e));t.asyncQueue.enqueueAndForget((async()=>{!function(t,e,n){const s=Gs(t);(async function(t,e,n){try{const s=await e.getMetadata();if(await function(t,e){const n=Gs(t),s=$o(e.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(t=>n.Je.getBundleMetadata(t,e.id))).then((t=>!!t&&t.createTime.compareTo(s)>=0))}(t.localStore,s))return await e.close(),void n._completeWith(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(s));n._updateProgress(qh(s));const r=new Uh(s,t.localStore,e.N);let i=await e.zo();for(;i;){const t=await r.mo(i);t&&n._updateProgress(t),i=await e.zo()}const o=await r.complete();await cl(t,o.En,void 0),await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Save bundle","readwrite",(t=>n.Je.saveBundleMetadata(t,e)))}(t.localStore,s),n._completeWith(o.progress)}catch(t){qs("SyncEngine",`Loading bundle failed with ${t}`),n._failWith(t)}})(s,e,n).then((()=>{s.sharedClientState.notifyBundleLoaded()}))}(await Vl(t),r,s)}))}class Kl{constructor(t,e,n,s,r,i,o,a){this.databaseId=t,this.appId=e,this.persistenceKey=n,this.host=s,this.ssl=r,this.forceLongPolling=i,this.autoDetectLongPolling=o,this.useFetchStreams=a}}class $l{constructor(t,e){this.projectId=t,this.database=e||"(default)"}get isDefaultDatabase(){return"(default)"===this.database}isEqual(t){return t instanceof $l&&t.projectId===this.projectId&&t.database===this.database}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Gl=new Map; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Hl(t,e,n){if(!n)throw new zs(Hs.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function zl(t,e,n,s){if(!0===e&&!0===s)throw new zs(Hs.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function Ql(t){if(!xr.isDocumentKey(t))throw new zs(Hs.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function Wl(t){if(xr.isDocumentKey(t))throw new zs(Hs.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Yl(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";{const e=function(t){return t.constructor?t.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return"function"==typeof t?"a function":js()}function Xl(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new zs(Hs.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Yl(t);throw new zs(Hs.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function Jl(t,e){if(e<=0)throw new zs(Hs.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Zl{constructor(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new zs(Hs.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new zs(Hs.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,zl("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class td{constructor(t,e){this._credentials=e,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Zl({}),this._settingsFrozen=!1,t instanceof $l?this._databaseId=t:(this._app=t,this._databaseId=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new zs(Hs.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new $l(t.options.projectId)}(t))}get app(){if(!this._app)throw new zs(Hs.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(t){if(this._settingsFrozen)throw new zs(Hs.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Zl(t),void 0!==t.credentials&&(this._credentials=function(t){if(!t)return new Ys;switch(t.type){case"gapi":const e=t.client;return Ks(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new tr(e,t.sessionIndex||"0",t.iamToken||null);case"provider":return t.client;default:throw new zs(Hs.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const e=Gl.get(t);e&&(Vs("ComponentProvider","Removing Datastore"),Gl.delete(t),e.terminate())}(this),Promise.resolve()}}function ed(t,e,n,s={}){var r;const i=(t=Xl(t,td))._getSettings();if("firestore.googleapis.com"!==i.host&&i.host!==e&&qs("Host has been set in both settings() and useEmulator(), emulator host will be used"),t._setSettings(Object.assign(Object.assign({},i),{host:`${e}:${n}`,ssl:!1})),s.mockUserToken){let e,n;if("string"==typeof s.mockUserToken)e=s.mockUserToken,n=Ls.MOCK_USER;else{e= +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=e||"demo-project",s=t.iat||0,r=t.sub||t.user_id;if(!r)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const i=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:s,exp:s+3600,auth_time:s,sub:r,user_id:r,firebase:{sign_in_provider:"custom",identities:{}}},t);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(i)),""].join(".")}(s.mockUserToken,null===(r=t._app)||void 0===r?void 0:r.options.projectId);const i=s.mockUserToken.sub||s.mockUserToken.user_id;if(!i)throw new zs(Hs.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new Ls(i)}t._credentials=new Xs(new Ws(e,n))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nd{constructor(t,e,n){this.converter=e,this._key=n,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new rd(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new nd(this.firestore,t,this._key)}}class sd{constructor(t,e,n){this.converter=e,this._query=n,this.type="query",this.firestore=t}withConverter(t){return new sd(this.firestore,t,this._query)}}class rd extends sd{constructor(t,e,n){super(t,e,mi(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new nd(this.firestore,null,new xr(t))}withConverter(t){return new rd(this.firestore,t,this._path)}}function id(t,e,...n){if(t=g(t),Hl("collection","path",e),t instanceof td){const s=fr.fromString(e,...n);return Wl(s),new rd(t,null,s)}{if(!(t instanceof nd||t instanceof rd))throw new zs(Hs.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const s=t._path.child(fr.fromString(e,...n));return Wl(s),new rd(t.firestore,null,s)}}function od(t,e){if(t=Xl(t,td),Hl("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new zs(Hs.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new sd(t,null,function(t){return new fi(fr.emptyPath(),t)}(e))}function ad(t,e,...n){if(t=g(t),1===arguments.length&&(e=sr.I()),Hl("doc","path",e),t instanceof td){const s=fr.fromString(e,...n);return Ql(s),new nd(t,null,new xr(s))}{if(!(t instanceof nd||t instanceof rd))throw new zs(Hs.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const s=t._path.child(fr.fromString(e,...n));return Ql(s),new nd(t.firestore,t instanceof rd?t.converter:null,new xr(s))}}function cd(t,e){return t=g(t),e=g(e),(t instanceof nd||t instanceof rd)&&(e instanceof nd||e instanceof rd)&&t.firestore===e.firestore&&t.path===e.path&&t.converter===e.converter}function ud(t,e){return t=g(t),e=g(e),t instanceof sd&&e instanceof sd&&t.firestore===e.firestore&&Si(t._query,e._query)&&t.converter===e.converter +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class hd{constructor(){this._c=Promise.resolve(),this.mc=[],this.gc=!1,this.yc=[],this.Tc=null,this.Ec=!1,this.Ic=!1,this.Ac=[],this.ar=new $u(this,"async_queue_retry"),this.Rc=()=>{const t=ju();t&&Vs("AsyncQueue","Visibility state changed to "+t.visibilityState),this.ar.tr()};const t=ju();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Rc)}get isShuttingDown(){return this.gc}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.bc(),this.Pc(t)}enterRestrictedMode(t){if(!this.gc){this.gc=!0,this.Ic=t||!1;const e=ju();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.Rc)}}enqueue(t){if(this.bc(),this.gc)return new Promise((()=>{}));const e=new Qs;return this.Pc((()=>this.gc&&this.Ic?Promise.resolve():(t().then(e.resolve,e.reject),e.promise))).then((()=>e.promise))}enqueueRetryable(t){this.enqueueAndForget((()=>(this.mc.push(t),this.vc())))}async vc(){if(0!==this.mc.length){try{await this.mc[0](),this.mc.shift(),this.ar.reset()}catch(t){if(!Ga(t))throw t;Vs("AsyncQueue","Operation failed with retryable error: "+t)}this.mc.length>0&&this.ar.Xi((()=>this.vc()))}}Pc(t){const e=this._c.then((()=>(this.Ec=!0,t().catch((t=>{this.Tc=t,this.Ec=!1;const e=function(t){let e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t);throw Us("INTERNAL UNHANDLED ERROR: ",e),t})).then((t=>(this.Ec=!1,t))))));return this._c=e,e}enqueueAfterDelay(t,e,n){this.bc(),this.Ac.indexOf(t)>-1&&(e=0);const s=Sh.createAndSchedule(this,t,e,n,(t=>this.Vc(t)));return this.yc.push(s),s}bc(){this.Tc&&js()}verifyOperationInProgress(){}async Sc(){let t;do{t=this._c,await t}while(t!==this._c)}Dc(t){for(const e of this.yc)if(e.timerId===t)return!0;return!1}Cc(t){return this.Sc().then((()=>{this.yc.sort(((t,e)=>t.targetTimeMs-e.targetTimeMs));for(const e of this.yc)if(e.skipDelay(),"all"!==t&&e.timerId===t)break;return this.Sc()}))}Nc(t){this.Ac.push(t)}Vc(t){const e=this.yc.indexOf(t);this.yc.splice(e,1)}}function ld(t){return function(t,e){if("object"!=typeof t||null===t)return!1;const n=t;for(const t of["next","error","complete"])if(t in n&&"function"==typeof n[t])return!0;return!1}(t)}class dd{constructor(){this._progressObserver={},this._taskCompletionResolver=new Qs,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(t,e,n){this._progressObserver={next:t,error:e,complete:n}}catch(t){return this._taskCompletionResolver.promise.catch(t)}then(t,e){return this._taskCompletionResolver.promise.then(t,e)}_completeWith(t){this._updateProgress(t),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(t)}_failWith(t){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(t),this._taskCompletionResolver.reject(t)}_updateProgress(t){this._lastProgress=t,this._progressObserver.next&&this._progressObserver.next(t)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const fd=-1;class gd extends td{constructor(t,e){super(t,e),this.type="firestore",this._queue=new hd,this._persistenceKey="name"in t?t.name:"[DEFAULT]"}_terminate(){return this._firestoreClient||wd(this),this._firestoreClient.terminate()}}function md(t,e){const n=i._getProvider(t,"firestore");if(n.isInitialized()){const t=n.getImmediate();if(d(n.getOptions(),e))return t;throw new zs(Hs.FAILED_PRECONDITION,"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.")}if(void 0!==e.cacheSizeBytes&&-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new zs(Hs.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return n.initialize({options:e})}function pd(t=i.getApp()){return i._getProvider(t,"firestore").getImmediate()}function yd(t){return t._firestoreClient||wd(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function wd(t){var e;const n=t._freezeSettings(),s=function(t,e,n,s){return new Kl(t,e,n,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,s.useFetchStreams)}(t._databaseId,(null===(e=t._app)||void 0===e?void 0:e.options.appId)||"",t._persistenceKey,n);t._firestoreClient=new Cl(t._credentials,t._queue,s)}function vd(t,e){xd(t=Xl(t,gd));const n=yd(t),s=t._freezeSettings(),r=new Sl;return Td(n,r,new El(r,s.cacheSizeBytes,null==e?void 0:e.forceOwnership))}function bd(t){xd(t=Xl(t,gd));const e=yd(t),n=t._freezeSettings(),s=new Sl;return Td(e,s,new Il(s,n.cacheSizeBytes))}function Td(t,e,n){const s=new Qs;return t.asyncQueue.enqueue((async()=>{try{await kl(t,n),await Rl(t,e),s.resolve()}catch(t){if(!function(t){return"FirebaseError"===t.name?t.code===Hs.FAILED_PRECONDITION||t.code===Hs.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||(22===t.code||20===t.code||11===t.code)}(t))throw t;console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+t),s.reject(t)}})).then((()=>s.promise))}function Ed(t){if(t._initialized&&!t._terminated)throw new zs(Hs.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new Qs;return t._queue.enqueueAndForgetEvenWhileRestricted((async()=>{try{await async function(t){if(!ja.bt())return Promise.resolve();const e=t+"main";await ja.delete(e)}(Zc(t._databaseId,t._persistenceKey)),e.resolve()}catch(t){e.reject(t)}})),e.promise}function Id(t){return function(t){const e=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e){const n=Gs(t);ih(n.remoteStore)||Vs("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const t=await function(t){const e=Gs(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(t=>e.In.getHighestUnacknowledgedBatchId(t)))}(n.localStore);if(-1===t)return void e.resolve();const s=n.Ko.get(t)||[];s.push(e),n.Ko.set(t,s)}catch(t){const n=_h(t,"Initialization of waitForPendingWrites() operation failed");e.reject(n)}}(await Vl(t),e))),e.promise}(yd(t=Xl(t,gd)))}function Sd(t){return function(t){return t.asyncQueue.enqueue((async()=>{const e=await Ml(t),n=await Pl(t);return e.setNetworkEnabled(!0),function(t){const e=Gs(t);return e.Wr.delete(0),Xu(e)}(n)}))}(yd(t=Xl(t,gd)))}function _d(t){return function(t){return t.asyncQueue.enqueue((async()=>{const e=await Ml(t),n=await Pl(t);return e.setNetworkEnabled(!1),async function(t){const e=Gs(t);e.Wr.add(0),await Ju(e),e.Hr.set("Offline")}(n)}))}(yd(t=Xl(t,gd)))}function Nd(t){return i._removeServiceInstance(t.app,"firestore"),t._delete()}function Ad(t,e){const n=yd(t=Xl(t,gd)),s=new dd;return jl(n,t._databaseId,e,s),s}function Dd(t,e){return function(t,e){return t.asyncQueue.enqueue((async()=>function(t,e){const n=Gs(t);return n.persistence.runTransaction("Get named query","readonly",(t=>n.Je.getNamedQuery(t,e)))}(await Fl(t),e)))}(yd(t=Xl(t,gd)),e).then((e=>e?new sd(t,null,e.query):null))}function xd(t){if(t._initialized||t._terminated)throw new zs(Hs.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cd{constructor(...t){for(let e=0;e90)throw new zs(Hs.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new zs(Hs.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return rr(this._lat,t._lat)||rr(this._long,t._long)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Md=/^__.*__$/;class Fd{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return null!==this.fieldMask?new no(t,this.data,this.fieldMask,e,this.fieldTransforms):new eo(t,this.data,e,this.fieldTransforms)}}class Pd{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return new no(t,this.data,this.fieldMask,e,this.fieldTransforms)}}function Vd(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw js()}}class Ud{constructor(t,e,n,s,r,i){this.settings=t,this.databaseId=e,this.N=n,this.ignoreUndefinedProperties=s,void 0===r&&this.xc(),this.fieldTransforms=r||[],this.fieldMask=i||[]}get path(){return this.settings.path}get kc(){return this.settings.kc}$c(t){return new Ud(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.N,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Oc(t){var e;const n=null===(e=this.path)||void 0===e?void 0:e.child(t),s=this.$c({path:n,Fc:!1});return s.Mc(t),s}Lc(t){var e;const n=null===(e=this.path)||void 0===e?void 0:e.child(t),s=this.$c({path:n,Fc:!1});return s.xc(),s}Bc(t){return this.$c({path:void 0,Fc:!0})}Uc(t){return of(t,this.settings.methodName,this.settings.qc||!1,this.path,this.settings.Kc)}contains(t){return void 0!==this.fieldMask.find((e=>t.isPrefixOf(e)))||void 0!==this.fieldTransforms.find((e=>t.isPrefixOf(e.field)))}xc(){if(this.path)for(let t=0;tc.covers(t.field)))}else c=null,u=o.fieldTransforms;return new Fd(new $r(a),c,u)}class Kd extends Ld{_toFieldTransform(t){if(2!==t.kc)throw 1===t.kc?t.Uc(`${this._methodName}() can only appear at the top level of your update data`):t.Uc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return t.fieldMask.push(t.path),null}isEqual(t){return t instanceof Kd}}function $d(t,e,n){return new Ud({kc:3,Kc:e.settings.Kc,methodName:t._methodName,Fc:n},e.databaseId,e.N,e.ignoreUndefinedProperties)}class Gd extends Ld{_toFieldTransform(t){return new Gi(t.path,new Pi)}isEqual(t){return t instanceof Gd}}class Hd extends Ld{constructor(t,e){super(t),this.Qc=e}_toFieldTransform(t){const e=$d(this,t,!0),n=this.Qc.map((t=>Jd(t,e))),s=new Vi(n);return new Gi(t.path,s)}isEqual(t){return this===t}}class zd extends Ld{constructor(t,e){super(t),this.Qc=e}_toFieldTransform(t){const e=$d(this,t,!0),n=this.Qc.map((t=>Jd(t,e))),s=new qi(n);return new Gi(t.path,s)}isEqual(t){return this===t}}class Qd extends Ld{constructor(t,e){super(t),this.Wc=e}_toFieldTransform(t){const e=new ji(t.N,Ri(t.N,this.Wc));return new Gi(t.path,e)}isEqual(t){return this===t}}function Wd(t,e,n,s){const r=t.jc(1,e,n);ef("Data must be an object, but it was:",r,s);const i=[],o=$r.empty();hr(s,((t,s)=>{const a=rf(e,t,n);s=g(s);const c=r.Lc(a);if(s instanceof Kd)i.push(a);else{const t=Jd(s,c);null!=t&&(i.push(a),o.set(a,t))}}));const a=new pr(i);return new Pd(o,a,r.fieldTransforms)}function Yd(t,e,n,s,r,i){const o=t.jc(1,e,n),a=[nf(e,s,n)],c=[r];if(i.length%2!=0)throw new zs(Hs.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let t=0;t=0;--t)if(!af(u,a[t])){const e=a[t];let n=c[t];n=g(n);const s=o.Lc(e);if(n instanceof Kd)u.push(e);else{const t=Jd(n,s);null!=t&&(u.push(e),h.set(e,t))}}const l=new pr(u);return new Pd(h,l,o.fieldTransforms)}function Xd(t,e,n,s=!1){return Jd(n,t.jc(s?4:3,e))}function Jd(t,e){if(tf(t=g(t)))return ef("Unsupported field value:",e,t),Zd(t,e);if(t instanceof Ld)return function(t,e){if(!Vd(e.kc))throw e.Uc(`${t._methodName}() can only be used with update() and set()`);if(!e.path)throw e.Uc(`${t._methodName}() is not currently supported inside arrays`);const n=t._toFieldTransform(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.Fc&&4!==e.kc)throw e.Uc("Nested arrays are not supported");return function(t,e){const n=[];let s=0;for(const r of t){let t=Jd(r,e.Bc(s));null==t&&(t={nullValue:"NULL_VALUE"}),n.push(t),s++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(null===(t=g(t)))return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Ri(e.N,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){const n=ar.fromDate(t);return{timestampValue:Bo(e.N,n)}}if(t instanceof ar){const n=new ar(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Bo(e.N,n)}}if(t instanceof Od)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof Rd)return{bytesValue:jo(e.N,t._byteString)};if(t instanceof nd){const n=e.databaseId,s=t.firestore._databaseId;if(!s.isEqual(n))throw e.Uc(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:Go(t.firestore._databaseId||e.databaseId,t._key.path)}}throw e.Uc(`Unsupported field value: ${Yl(t)}`)}(t,e)}function Zd(t,e){const n={};return lr(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):hr(t,((t,s)=>{const r=Jd(s,e.Oc(t));null!=r&&(n[t]=r)})),{mapValue:{fields:n}}}function tf(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof ar||t instanceof Od||t instanceof Rd||t instanceof nd||t instanceof Ld)}function ef(t,e,n){if(!tf(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){const s=Yl(n);throw"an object"===s?e.Uc(t+" a custom object"):e.Uc(t+" "+s)}}function nf(t,e,n){if((e=g(e))instanceof Cd)return e._internalPath;if("string"==typeof e)return rf(t,e);throw of("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}const sf=new RegExp("[~\\*/\\[\\]]");function rf(t,e,n){if(e.search(sf)>=0)throw of(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Cd(...e.split("."))._internalPath}catch(s){throw of(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function of(t,e,n,s,r){const i=s&&!s.isEmpty(),o=void 0!==r;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(i||o)&&(c+=" (found",i&&(c+=` in field ${s}`),o&&(c+=` in document ${r}`),c+=")"),new zs(Hs.INVALID_ARGUMENT,a+t+c)}function af(t,e){return t.some((t=>t.isEqual(e)))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class cf{constructor(t,e,n,s,r){this._firestore=t,this._userDataWriter=e,this._key=n,this._document=s,this._converter=r}get id(){return this._key.path.lastSegment()}get ref(){return new nd(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const t=new uf(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const e=this._document.data.field(hf("DocumentSnapshot.get",t));if(null!==e)return this._userDataWriter.convertValue(e)}}}class uf extends cf{data(){return super.data()}}function hf(t,e){return"string"==typeof e?rf(t,e):e instanceof Cd?e._internalPath:e._delegate._internalPath} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class lf{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class df extends cf{constructor(t,e,n,s,r,i){super(t,e,n,s,i),this._firestore=t,this._firestoreImpl=t,this.metadata=r}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const e=new ff(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){const n=this._document.data.field(hf("DocumentSnapshot.get",t));if(null!==n)return this._userDataWriter.convertValue(n,e.serverTimestamps)}}}class ff extends df{data(t={}){return super.data(t)}}class gf{constructor(t,e,n,s){this._firestore=t,this._userDataWriter=e,this._snapshot=s,this.metadata=new lf(s.hasPendingWrites,s.fromCache),this.query=n}get docs(){const t=[];return this.forEach((e=>t.push(e))),t}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(t,e){this._snapshot.docs.forEach((n=>{t.call(e,new ff(this._firestore,this._userDataWriter,n.key,n,new lf(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(t={}){const e=!!t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new zs(Hs.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e){if(t._snapshot.oldDocs.isEmpty()){let e=0;return t._snapshot.docChanges.map((n=>({type:"added",doc:new ff(t._firestore,t._userDataWriter,n.doc.key,n.doc,new lf(t._snapshot.mutatedKeys.has(n.doc.key),t._snapshot.fromCache),t.query.converter),oldIndex:-1,newIndex:e++})))}{let n=t._snapshot.oldDocs;return t._snapshot.docChanges.filter((t=>e||3!==t.type)).map((e=>{const s=new ff(t._firestore,t._userDataWriter,e.doc.key,e.doc,new lf(t._snapshot.mutatedKeys.has(e.doc.key),t._snapshot.fromCache),t.query.converter);let r=-1,i=-1;return 0!==e.type&&(r=n.indexOf(e.doc.key),n=n.delete(e.doc.key)),1!==e.type&&(n=n.add(e.doc),i=n.indexOf(e.doc.key)),{type:mf(e.type),doc:s,oldIndex:r,newIndex:i}}))}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function mf(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return js()}}function pf(t,e){return t instanceof df&&e instanceof df?t._firestore===e._firestore&&t._key.isEqual(e._key)&&(null===t._document?null===e._document:t._document.isEqual(e._document))&&t._converter===e._converter:t instanceof gf&&e instanceof gf&&t._firestore===e._firestore&&ud(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._snapshot.isEqual(e._snapshot)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function yf(t){if(yi(t)&&0===t.explicitOrderBy.length)throw new zs(Hs.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class wf{}function vf(t,...e){for(const n of e)t=n._apply(t);return t}class bf extends wf{constructor(t,e,n){super(),this.Gc=t,this.zc=e,this.Hc=n,this.type="where"}_apply(t){const e=Bd(t.firestore),n=function(t,e,n,s,r,i,o){let a;if(r.isKeyField()){if("array-contains"===i||"array-contains-any"===i)throw new zs(Hs.INVALID_ARGUMENT,`Invalid Query. You can't perform '${i}' queries on FieldPath.documentId().`);if("in"===i||"not-in"===i){Mf(o,i);const e=[];for(const n of o)e.push(Of(s,t,n));a={arrayValue:{values:e}}}else a=Of(s,t,o)}else"in"!==i&&"not-in"!==i&&"array-contains-any"!==i||Mf(o,i),a=Xd(n,"where",o,"in"===i||"not-in"===i);const c=Jr.create(r,i,a);return function(t,e){if(e.v()){const n=vi(t);if(null!==n&&!n.isEqual(e.field))throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${e.field.toString()}'`);const s=wi(t);null!==s&&Ff(t,e.field,s)}const n=function(t,e){for(const n of t.filters)if(e.indexOf(n.op)>=0)return n.op;return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==n)throw n===e.op?new zs(Hs.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new zs(Hs.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}(t,c),c}(t._query,0,e,t.firestore._databaseId,this.Gc,this.zc,this.Hc);return new sd(t.firestore,t.converter,function(t,e){const n=t.filters.concat([e]);return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t._query,n))}}function Tf(t,e,n){const s=e,r=hf("where",t);return new bf(r,s,n)}class Ef extends wf{constructor(t,e){super(),this.Gc=t,this.Jc=e,this.type="orderBy"}_apply(t){const e=function(t,e,n){if(null!==t.startAt)throw new zs(Hs.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new zs(Hs.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const s=new ui(e,n);return function(t,e){if(null===wi(t)){const n=vi(t);null!==n&&Ff(t,n,e.field)}}(t,s),s}(t._query,this.Gc,this.Jc);return new sd(t.firestore,t.converter,function(t,e){const n=t.explicitOrderBy.concat([e]);return new fi(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t._query,e))}}function If(t,e="asc"){const n=e,s=hf("orderBy",t);return new Ef(s,n)}class Sf extends wf{constructor(t,e,n){super(),this.type=t,this.Yc=e,this.Xc=n}_apply(t){return new sd(t.firestore,t.converter,Ii(t._query,this.Yc,this.Xc))}}function _f(t){return Jl("limit",t),new Sf("limit",t,"F")}function Nf(t){return Jl("limitToLast",t),new Sf("limitToLast",t,"L")}class Af extends wf{constructor(t,e,n){super(),this.type=t,this.Zc=e,this.ta=n}_apply(t){const e=Lf(t,this.type,this.Zc,this.ta);return new sd(t.firestore,t.converter,function(t,e){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t._query,e))}}function Df(...t){return new Af("startAt",t,!0)}function xf(...t){return new Af("startAfter",t,!1)}class Cf extends wf{constructor(t,e,n){super(),this.type=t,this.Zc=e,this.ta=n}_apply(t){const e=Lf(t,this.type,this.Zc,this.ta);return new sd(t.firestore,t.converter,function(t,e){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t._query,e))}}function kf(...t){return new Cf("endBefore",t,!0)}function Rf(...t){return new Cf("endAt",t,!1)}function Lf(t,e,n,s){if(n[0]=g(n[0]),n[0]instanceof cf)return function(t,e,n,s,r){if(!s)throw new zs(Hs.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${n}().`);const i=[];for(const n of Ti(t))if(n.field.isKeyField())i.push(Pr(e,s.key));else{const t=s.data.field(n.field);if(Ir(t))throw new zs(Hs.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+n.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===t){const t=n.field.canonicalString();throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${t}' (used as the orderBy) does not exist.`)}i.push(t)}return new ai(i,r)}(t._query,t.firestore._databaseId,e,n[0]._document,s);{const r=Bd(t.firestore);return function(t,e,n,s,r,i){const o=t.explicitOrderBy;if(r.length>o.length)throw new zs(Hs.INVALID_ARGUMENT,`Too many arguments provided to ${s}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const a=[];for(let i=0;i10)throw new zs(Hs.INVALID_ARGUMENT,`Invalid Query. '${e.toString()}' filters support a maximum of 10 elements in the value array.`)}function Ff(t,e,n){if(!n.isEqual(e))throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Pf{convertValue(t,e="none"){switch(Cr(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Tr(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(Er(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw js()}}convertObject(t,e){const n={};return hr(t.fields,((t,s)=>{n[t]=this.convertValue(s,e)})),n}convertGeoPoint(t){return new Od(Tr(t.latitude),Tr(t.longitude))}convertArray(t,e){return(t.values||[]).map((t=>this.convertValue(t,e)))}convertServerTimestamp(t,e){switch(e){case"previous":const n=Sr(t);return null==n?null:this.convertValue(n,e);case"estimate":return this.convertTimestamp(_r(t));default:return null}}convertTimestamp(t){const e=br(t);return new ar(e.seconds,e.nanos)}convertDocumentKey(t,e){const n=fr.fromString(t);Ks(pa(n));const s=new $l(n.get(1),n.get(3)),r=new xr(n.popFirst(5));return s.isEqual(e)||Us(`Document ${r} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),r}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Vf(t,e,n){let s;return s=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,s}class Uf extends Pf{constructor(t){super(),this.firestore=t}convertBytes(t){return new Rd(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new nd(this.firestore,null,e)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qf{constructor(t,e){this._firestore=t,this._commitHandler=e,this._mutations=[],this._committed=!1,this._dataReader=Bd(t)}set(t,e,n){this._verifyNotCommitted();const s=Bf(t,this._firestore),r=Vf(s.converter,e,n),i=jd(this._dataReader,"WriteBatch.set",s._key,r,null!==s.converter,n);return this._mutations.push(i.toMutation(s._key,zi.none())),this}update(t,e,n,...s){this._verifyNotCommitted();const r=Bf(t,this._firestore);let i;return i="string"==typeof(e=g(e))||e instanceof Cd?Yd(this._dataReader,"WriteBatch.update",r._key,e,n,s):Wd(this._dataReader,"WriteBatch.update",r._key,e),this._mutations.push(i.toMutation(r._key,zi.exists(!0))),this}delete(t){this._verifyNotCommitted();const e=Bf(t,this._firestore);return this._mutations=this._mutations.concat(new oo(e._key,zi.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new zs(Hs.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function Bf(t,e){if((t=g(t)).firestore!==e)throw new zs(Hs.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function jf(t){t=Xl(t,nd);const e=Xl(t.firestore,gd);return ql(yd(e),t._key).then((n=>ng(e,t,n)))}class Kf extends Pf{constructor(t){super(),this.firestore=t}convertBytes(t){return new Rd(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new nd(this.firestore,null,e)}}function $f(t){t=Xl(t,nd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){try{const s=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("read document","readonly",(t=>n.Qn.An(t,e)))}(t,e);s.isFoundDocument()?n.resolve(s):s.isNoDocument()?n.resolve(null):n.reject(new zs(Hs.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(t){const s=_h(t,`Failed to get document '${e} from cache`);n.reject(s)}}(await Fl(t),e,n))),n.promise}(n,t._key).then((n=>new df(e,s,t._key,n,new lf(null!==n&&n.hasLocalMutations,!0),t.converter)))}function Gf(t){t=Xl(t,nd);const e=Xl(t.firestore,gd);return ql(yd(e),t._key,{source:"server"}).then((n=>ng(e,t,n)))}function Hf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return yf(t._query),Bl(n,t._query).then((n=>new gf(e,s,t,n)))}function zf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){try{const s=await du(t,e,!0),r=new Kh(e,s.Gn),i=r.bo(s.documents),o=r.applyChanges(i,!1);n.resolve(o.snapshot)}catch(t){const s=_h(t,`Failed to execute query '${e} against cache`);n.reject(s)}}(await Fl(t),e,n))),n.promise}(n,t._query).then((n=>new gf(e,s,t,n)))}function Qf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return Bl(n,t._query,{source:"server"}).then((n=>new gf(e,s,t,n)))}function Wf(t,e,n){t=Xl(t,nd);const s=Xl(t.firestore,gd),r=Vf(t.converter,e,n);return eg(s,[jd(Bd(s),"setDoc",t._key,r,null!==t.converter,n).toMutation(t._key,zi.none())])}function Yf(t,e,n,...s){t=Xl(t,nd);const r=Xl(t.firestore,gd),i=Bd(r);let o;return o="string"==typeof(e=g(e))||e instanceof Cd?Yd(i,"updateDoc",t._key,e,n,s):Wd(i,"updateDoc",t._key,e),eg(r,[o.toMutation(t._key,zi.exists(!0))])}function Xf(t){return eg(Xl(t.firestore,gd),[new oo(t._key,zi.none())])}function Jf(t,e){const n=Xl(t.firestore,gd),s=ad(t),r=Vf(t.converter,e);return eg(n,[jd(Bd(t.firestore),"addDoc",s._key,r,null!==t.converter,{}).toMutation(s._key,zi.exists(!1))]).then((()=>s))}function Zf(t,...e){var n,s,r;t=g(t);let i={includeMetadataChanges:!1},o=0;"object"!=typeof e[o]||ld(e[o])||(i=e[o],o++);const a={includeMetadataChanges:i.includeMetadataChanges};if(ld(e[o])){const t=e[o];e[o]=null===(n=t.next)||void 0===n?void 0:n.bind(t),e[o+1]=null===(s=t.error)||void 0===s?void 0:s.bind(t),e[o+2]=null===(r=t.complete)||void 0===r?void 0:r.bind(t)}let c,u,h;if(t instanceof nd)u=Xl(t.firestore,gd),h=mi(t._key.path),c={next:n=>{e[o]&&e[o](ng(u,t,n))},error:e[o+1],complete:e[o+2]};else{const n=Xl(t,sd);u=Xl(n.firestore,gd),h=n._query;const s=new Kf(u);c={next:t=>{e[o]&&e[o](new gf(u,s,n,t))},error:e[o+1],complete:e[o+2]},yf(t._query)}return function(t,e,n,s){const r=new Nl(s),i=new Fh(e,r,n);return t.asyncQueue.enqueueAndForget((async()=>kh(await Ul(t),i))),()=>{r.ec(),t.asyncQueue.enqueueAndForget((async()=>Rh(await Ul(t),i)))}}(yd(u),h,a,c)}function tg(t,e){return function(t,e){const n=new Nl(e);return t.asyncQueue.enqueueAndForget((async()=>function(t,e){Gs(t).so.add(e),e.next()}(await Ul(t),n))),()=>{n.ec(),t.asyncQueue.enqueueAndForget((async()=>function(t,e){Gs(t).so.delete(e)}(await Ul(t),n)))}}(yd(t=Xl(t,gd)),ld(e)?e:{next:e})}function eg(t,e){return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){const s=bl(t);try{const t=await function(t,e){const n=Gs(t),s=ar.now(),r=e.reduce(((t,e)=>t.add(e.key)),No());let i;return n.persistence.runTransaction("Locally write mutations","readwrite",(t=>n.Qn.Pn(t,r).next((r=>{i=r;const o=[];for(const t of e){const e=Ji(t,i.get(t.key));null!=e&&o.push(new no(t.key,e,Gr(e.value.mapValue),zi.exists(!0)))}return n.In.addMutationBatch(t,s,o,e)})))).then((t=>(t.applyToLocalDocumentSet(i),{batchId:t.batchId,changes:i})))}(s.localStore,e);s.sharedClientState.addPendingMutation(t.batchId),function(t,e,n){let s=t.qo[t.currentUser.toKey()];s||(s=new go(rr)),s=s.insert(e,n),t.qo[t.currentUser.toKey()]=s}(s,t.batchId,n),await cl(s,t.changes),await dh(s.remoteStore)}catch(t){const e=_h(t,"Failed to persist write");n.reject(e)}}(await Vl(t),e,n))),n.promise}(yd(t),e)}function ng(t,e,n){const s=n.docs.get(e._key),r=new Kf(t);return new df(t,r,e._key,s,new lf(n.hasPendingWrites,n.fromCache),e.converter)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class sg extends class{constructor(t,e){this._firestore=t,this._transaction=e,this._dataReader=Bd(t)}get(t){const e=Bf(t,this._firestore),n=new Uf(this._firestore);return this._transaction.lookup([e._key]).then((t=>{if(!t||1!==t.length)return js();const s=t[0];if(s.isFoundDocument())return new cf(this._firestore,n,s.key,s,e.converter);if(s.isNoDocument())return new cf(this._firestore,n,e._key,null,e.converter);throw js()}))}set(t,e,n){const s=Bf(t,this._firestore),r=Vf(s.converter,e,n),i=jd(this._dataReader,"Transaction.set",s._key,r,null!==s.converter,n);return this._transaction.set(s._key,i),this}update(t,e,n,...s){const r=Bf(t,this._firestore);let i;return i="string"==typeof(e=g(e))||e instanceof Cd?Yd(this._dataReader,"Transaction.update",r._key,e,n,s):Wd(this._dataReader,"Transaction.update",r._key,e),this._transaction.update(r._key,i),this}delete(t){const e=Bf(t,this._firestore);return this._transaction.delete(e._key),this}}{constructor(t,e){super(t,e),this._firestore=t}get(t){const e=Bf(t,this._firestore),n=new Kf(this._firestore);return super.get(t).then((t=>new df(this._firestore,n,e._key,t._document,new lf(!1,!1),e.converter)))}}function rg(t,e){return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>{const s=await function(t){return Ol(t).then((t=>t.datastore))}(t);new xl(t.asyncQueue,s,e,n).run()})),n.promise}(yd(t=Xl(t,gd)),(n=>e(new sg(t,n))))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ig(){return new Kd("deleteField")}function og(){return new Gd("serverTimestamp")}function ag(...t){return new Hd("arrayUnion",t)}function cg(...t){return new zd("arrayRemove",t)}function ug(t){return new Qd("increment",t)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function hg(t){return yd(t=Xl(t,gd)),new qf(t,(e=>eg(t,e)))}!function(t,e=!0){!function(t){Os=t}(i.SDK_VERSION),i._registerComponent(new m("firestore",((t,{options:n})=>{const s=t.getProvider("app").getImmediate(),r=new gd(s,new Js(t.getProvider("auth-internal")));return n=Object.assign({useFetchStreams:e},n),r._setSettings(n),r}),"PUBLIC")),i.registerVersion(Rs,"3.2.1",t),i.registerVersion(Rs,"3.2.1","esm2017")}()})); \ No newline at end of file diff --git a/frontend-dist/firebase-firestore.fc4ff51d.js b/frontend-dist/firebase-firestore.fc4ff51d.js new file mode 100644 index 0000000000..f507c81654 --- /dev/null +++ b/frontend-dist/firebase-firestore.fc4ff51d.js @@ -0,0 +1,2039 @@ +(()=>{var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function e(t,e,n,s){Object.defineProperty(t,e,{get:n,set:s,enumerable:!0,configurable:!0})}var n=t.parcelRequire94c2;n.register("4Odpp",(function(s,r){e(s.exports,"setLogLevel",(()=>Ps)),e(s.exports,"_logWarn",(()=>qs)),e(s.exports,"_debugAssert",(()=>$s)),e(s.exports,"FirestoreError",(()=>zs)),e(s.exports,"_EmptyCredentialsProvider",(()=>Ys)),e(s.exports,"Timestamp",(()=>ar)),e(s.exports,"_FieldPath",(()=>mr)),e(s.exports,"_isBase64Available",(()=>yr)),e(s.exports,"_DocumentKey",(()=>xr)),e(s.exports,"_DatabaseId",(()=>$l)),e(s.exports,"_validateIsNotUsedTogether",(()=>zl)),e(s.exports,"_cast",(()=>Xl)),e(s.exports,"connectFirestoreEmulator",(()=>ed)),e(s.exports,"DocumentReference",(()=>nd)),e(s.exports,"CollectionReference",(()=>rd)),e(s.exports,"Query",(()=>sd)),e(s.exports,"collection",(()=>id)),e(s.exports,"collectionGroup",(()=>od)),e(s.exports,"doc",(()=>ad)),e(s.exports,"refEqual",(()=>cd)),e(s.exports,"queryEqual",(()=>ud)),e(s.exports,"LoadBundleTask",(()=>dd)),e(s.exports,"CACHE_SIZE_UNLIMITED",(()=>fd)),e(s.exports,"Firestore",(()=>gd)),e(s.exports,"initializeFirestore",(()=>md)),e(s.exports,"getFirestore",(()=>pd)),e(s.exports,"ensureFirestoreConfigured",(()=>yd)),e(s.exports,"enableIndexedDbPersistence",(()=>vd)),e(s.exports,"enableMultiTabIndexedDbPersistence",(()=>bd)),e(s.exports,"clearIndexedDbPersistence",(()=>Ed)),e(s.exports,"waitForPendingWrites",(()=>Id)),e(s.exports,"enableNetwork",(()=>Sd)),e(s.exports,"disableNetwork",(()=>_d)),e(s.exports,"terminate",(()=>Nd)),e(s.exports,"loadBundle",(()=>Ad)),e(s.exports,"namedQuery",(()=>Dd)),e(s.exports,"FieldPath",(()=>Cd)),e(s.exports,"documentId",(()=>kd)),e(s.exports,"Bytes",(()=>Rd)),e(s.exports,"FieldValue",(()=>Ld)),e(s.exports,"GeoPoint",(()=>Od)),e(s.exports,"SnapshotMetadata",(()=>lf)),e(s.exports,"DocumentSnapshot",(()=>df)),e(s.exports,"QueryDocumentSnapshot",(()=>ff)),e(s.exports,"QuerySnapshot",(()=>gf)),e(s.exports,"snapshotEqual",(()=>pf)),e(s.exports,"QueryConstraint",(()=>wf)),e(s.exports,"query",(()=>vf)),e(s.exports,"where",(()=>Tf)),e(s.exports,"orderBy",(()=>If)),e(s.exports,"limit",(()=>_f)),e(s.exports,"limitToLast",(()=>Nf)),e(s.exports,"startAt",(()=>Df)),e(s.exports,"startAfter",(()=>xf)),e(s.exports,"endBefore",(()=>kf)),e(s.exports,"endAt",(()=>Rf)),e(s.exports,"AbstractUserDataWriter",(()=>Pf)),e(s.exports,"WriteBatch",(()=>qf)),e(s.exports,"getDoc",(()=>jf)),e(s.exports,"getDocFromCache",(()=>$f)),e(s.exports,"getDocFromServer",(()=>Gf)),e(s.exports,"getDocs",(()=>Hf)),e(s.exports,"getDocsFromCache",(()=>zf)),e(s.exports,"getDocsFromServer",(()=>Qf)),e(s.exports,"setDoc",(()=>Wf)),e(s.exports,"executeWrite",(()=>eg)),e(s.exports,"updateDoc",(()=>Yf)),e(s.exports,"deleteDoc",(()=>Xf)),e(s.exports,"addDoc",(()=>Jf)),e(s.exports,"onSnapshot",(()=>Zf)),e(s.exports,"onSnapshotsInSync",(()=>tg)),e(s.exports,"Transaction",(()=>sg)),e(s.exports,"runTransaction",(()=>rg)),e(s.exports,"deleteField",(()=>ig)),e(s.exports,"serverTimestamp",(()=>og)),e(s.exports,"arrayUnion",(()=>ag)),e(s.exports,"arrayRemove",(()=>cg)),e(s.exports,"increment",(()=>ug)),e(s.exports,"writeBatch",(()=>hg));var i=n("dN8oq"),o=n("6kwV5"); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const a=function(t){const e=[];let n=0;for(let s=0;s>6|192,e[n++]=63&r|128):55296==(64512&r)&&s+1>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=63&r|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=63&r|128)}return e},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let e=0;e>2,h=(3&r)<<4|o>>4;let l=(15&o)<<2|c>>6,d=63&c;a||(d=64,i||(l=64)),s.push(n[u],n[h],n[l],n[d])}return s.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(a(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let n=0,s=0;for(;n191&&r<224){const i=t[n++];e[s++]=String.fromCharCode((31&r)<<6|63&i)}else if(r>239&&r<365){const i=((7&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536;e[s++]=String.fromCharCode(55296+(i>>10)),e[s++]=String.fromCharCode(56320+(1023&i))}else{const i=t[n++],o=t[n++];e[s++]=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let e=0;e>4;if(s.push(c),64!==o){const t=i<<4&240|o>>2;if(s.push(t),64!==a){const t=o<<6&192|a;s.push(t)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},u=function(t){return function(t){const e=a(t);return c.encodeByteArray(e,!0)}(t).replace(/\./g,"")}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function h(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function l(){return!function(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(t){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function d(t,e){if(t===e)return!0;const n=Object.keys(t),s=Object.keys(e);for(const r of n){if(!s.includes(r))return!1;const n=t[r],i=e[r];if(f(n)&&f(i)){if(!d(n,i))return!1}else if(n!==i)return!1}for(const t of s)if(!n.includes(t))return!1;return!0}function f(t){return null!==t&&"object"==typeof t} +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function g(t){return t&&t._delegate?t._delegate:t}class m{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var p,y;(y=p||(p={}))[y.DEBUG=0]="DEBUG",y[y.VERBOSE=1]="VERBOSE",y[y.INFO=2]="INFO",y[y.WARN=3]="WARN",y[y.ERROR=4]="ERROR",y[y.SILENT=5]="SILENT";const w={debug:p.DEBUG,verbose:p.VERBOSE,info:p.INFO,warn:p.WARN,error:p.ERROR,silent:p.SILENT},v=p.INFO,b={[p.DEBUG]:"log",[p.VERBOSE]:"log",[p.INFO]:"info",[p.WARN]:"warn",[p.ERROR]:"error"},T=(t,e,...n)=>{if(e>>0),C=0;function k(t,e,n){return t.call.apply(t.bind,arguments)}function R(t,e,n){if(!t)throw Error();if(2e?1:0}t:{var z=_.navigator;if(z){var Q=z.userAgent;if(Q){K=Q;break t}}K=""}function W(t,e,n){for(const s in t)e.call(n,t[s],s,t)}function Y(t){const e={};for(const n in t)e[n]=t[n];return e}var X="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function J(t,e){let n,s;for(let e=1;eparseFloat(ut)){tt=String(lt);break t}}tt=ut}var dt,ft={};function gt(){return function(t){var e=ft;return Object.prototype.hasOwnProperty.call(e,9)?e[9]:e[9]=t(9)}((function(){let t=0;const e=$(String(tt)).split("."),n=$("9").split("."),s=Math.max(e.length,n.length);for(let o=0;0==t&&o>>0);function Ut(t){return"function"==typeof t?t:(t[Vt]||(t[Vt]=function(e){return t.handleEvent(e)}),t[Vt])}function qt(){F.call(this),this.i=new _t(this),this.P=this,this.I=null}function Bt(t,e){var n,s=t.I;if(s)for(n=[];s;s=s.I)n.push(s);if(t=t.P,s=e.type||e,"string"==typeof e)e=new wt(e,t);else if(e instanceof wt)e.target=e.target||t;else{var r=e;J(e=new wt(s,t),r)}if(r=!0,n)for(var i=n.length-1;0<=i;i--){var o=e.g=n[i];r=jt(o,s,!0,e)&&r}if(r=jt(o=e.g=t,s,!0,e)&&r,r=jt(o,s,!1,e)&&r,n)for(i=0;inew zt),(t=>t.reset()));class zt{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}function Qt(t){_.setTimeout((()=>{throw t}),0)}function Wt(t,e){Gt||function(){var t=_.Promise.resolve(void 0);Gt=function(){t.then(Jt)}}(),Yt||(Gt(),Yt=!0),Xt.add(t,e)}var Yt=!1,Xt=new class{constructor(){this.h=this.g=null}add(t,e){const n=Ht.get();n.set(t,e),this.h?this.h.next=n:this.g=n,this.h=n}};function Jt(){for(var t;t=$t();){try{t.h.call(t.g)}catch(t){Qt(t)}var e=Ht;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Yt=!1}function Zt(t,e){qt.call(this),this.h=t||1,this.g=e||_,this.j=L(this.kb,this),this.l=Date.now()}function te(t){t.da=!1,t.S&&(t.g.clearTimeout(t.S),t.S=null)}function ee(t,e,n){if("function"==typeof t)n&&(t=L(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=L(t.handleEvent,t)}return 2147483647{t.g=null,t.i&&(t.i=!1,ne(t))}),t.j);const e=t.h;t.h=null,t.m.apply(null,e)}M(Zt,qt),(E=Zt.prototype).da=!1,E.S=null,E.kb=function(){if(this.da){var t=Date.now()-this.l;0s.length)){var r=s[1];if(Array.isArray(r)&&!(1>r.length)){var i=r[0];if("noop"!=i&&"stop"!=i&&"close"!=i)for(var o=1;oe.length?Le:(e=e.substr(s,n),t.C=s+n,e))}function Ue(t){t.Y=Date.now()+t.P,qe(t,t.P)}function qe(t,e){if(null!=t.B)throw Error("WatchDog timer not null");t.B=we(L(t.eb,t),e)}function Be(t){t.B&&(_.clearTimeout(t.B),t.B=null)}function je(t){0==t.l.G||t.I||ds(t.l,t)}function Ke(t){Be(t);var e=t.L;e&&"function"==typeof e.na&&e.na(),t.L=null,te(t.W),ae(t.V),t.g&&(e=t.g,t.g=null,e.abort(),e.na())}function $e(t,e){try{var n=t.l;if(0!=n.G&&(n.g==t||In(n.i,t)))if(n.I=t.N,!t.J&&In(n.i,t)&&3==n.G){try{var s=n.Ca.g.parse(e)}catch(t){s=null}if(Array.isArray(s)&&3==s.length){var r=s;if(0==r[0]){t:if(!n.u){if(n.g){if(!(n.g.F+3e3r[2]&&n.N&&0==n.A&&!n.v&&(n.v=we(L(n.ab,n),6e3));if(1>=En(n.i)&&n.ka){try{n.ka()}catch(t){}n.ka=void 0}}else gs(n,11)}else if((t.J||n.g==t)&&ls(n),!j(e))for(r=n.Ca.g.parse(e),e=0;eh)&&(3!=h||it||this.g&&(this.h.h||this.g.ga()||Wn(this.g)))){this.I||4!=h||7==e||ge(8==e||0>=l?3:2),Be(this);var n=this.g.ba();this.N=n;e:if(Fe(this)){var s=Wn(this.g);t="";var r=s.length,i=4==Qn(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){Ke(this),je(this);var o="";break e}this.h.i=new _.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function en(t,e,n){e instanceof fn?(t.h=e,function(t,e){e&&!t.j&&(gn(t),t.i=null,t.g.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(mn(this,e),yn(this,n,t))}),t)),t.j=e}(t.h,t.g)):(n||(e=on(e,ln)),t.h=new fn(e,t.g))}function nn(t,e,n){t.h.set(e,n)}function sn(t){return nn(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function rn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function on(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,an),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function an(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Ye.prototype.toString=function(){var t=[],e=this.j;e&&t.push(on(e,cn,!0),":");var n=this.i;return(n||"file"==e)&&(t.push("//"),(e=this.s)&&t.push(on(e,cn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&t.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&t.push("/"),t.push(on(n,"/"==n.charAt(0)?hn:un,!0))),(n=this.h.toString())&&t.push("?",n),(n=this.o)&&t.push("#",on(n,dn)),t.join("")};var cn=/[#\/\?@]/g,un=/[#\?:]/g,hn=/[#\?]/g,ln=/[#\?@]/g,dn=/#/g;function fn(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function gn(t){t.g||(t.g=new He,t.h=0,t.i&&function(t,e){if(t){t=t.split("&");for(var n=0;n2*t.i&&ze(t)))}function pn(t,e){return gn(t),e=wn(t,e),Qe(t.g.h,e)}function yn(t,e,n){mn(t,e),0=t.j}function En(t){return t.h?1:t.g?t.g.size:0}function In(t,e){return t.h?t.h==e:!!t.g&&t.g.has(e)}function Sn(t,e){t.g?t.g.add(e):t.h=e}function _n(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}function Nn(t){if(null!=t.h)return t.i.concat(t.h.D);if(null!=t.g&&0!==t.g.size){let e=t.i;for(const n of t.g.values())e=e.concat(n.D);return e}return B(t.i)}function An(){}function Dn(){this.g=new An}function xn(t,e,n){const s=n||"";try{Ge(t,(function(t,n){let r=t;D(t)&&(r=Kt(t)),e.push(s+n+"="+encodeURIComponent(r))}))}catch(t){throw e.push(s+"type="+encodeURIComponent("_badmap")),t}}function Cn(t,e,n,s,r){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,r(s)}catch(t){}}function kn(t){this.l=t.$b||null,this.j=t.ib||!1}function Rn(t,e){qt.call(this),this.D=t,this.u=e,this.m=void 0,this.readyState=Ln,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}vn.prototype.cancel=function(){if(this.i=Nn(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const t of this.g.values())t.cancel();this.g.clear()}},An.prototype.stringify=function(t){return _.JSON.stringify(t,void 0)},An.prototype.parse=function(t){return _.JSON.parse(t,void 0)},M(kn,Te),kn.prototype.g=function(){return new Rn(this.l,this.j)},kn.prototype.i=function(t){return function(){return t}}({}),M(Rn,qt);var Ln=0;function On(t){t.j.read().then(t.Sa.bind(t)).catch(t.ha.bind(t))}function Mn(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Fn(t)}function Fn(t){t.onreadystatechange&&t.onreadystatechange.call(t)}(E=Rn.prototype).open=function(t,e){if(this.readyState!=Ln)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Fn(this)},E.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.D||_).fetch(new Request(this.B,e)).then(this.Va.bind(this),this.ha.bind(this))},E.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Mn(this)),this.readyState=Ln},E.Va=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Fn(this)),this.g&&(this.readyState=3,Fn(this),this.g)))if("arraybuffer"===this.responseType)t.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(void 0!==_.ReadableStream&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;On(this)}else t.text().then(this.Ua.bind(this),this.ha.bind(this))},E.Sa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?Mn(this):Fn(this),3==this.readyState&&On(this)}},E.Ua=function(t){this.g&&(this.response=this.responseText=t,Mn(this))},E.Ta=function(t){this.g&&(this.response=t,Mn(this))},E.ha=function(){this.g&&Mn(this)},E.setRequestHeader=function(t,e){this.v.append(t,e)},E.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""},E.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(Rn.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(t){this.m=t?"include":"same-origin"}});var Pn=_.JSON.parse;function Vn(t){qt.call(this),this.headers=new He,this.u=t||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Un,this.K=this.L=!1}M(Vn,qt);var Un="",qn=/^https?$/i,Bn=["POST","PUT"];function jn(t){return"content-type"==t.toLowerCase()}function Kn(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,$n(t),Hn(t)}function $n(t){t.D||(t.D=!0,Bt(t,"complete"),Bt(t,"error"))}function Gn(t){if(t.h&&void 0!==S&&(!t.C[1]||4!=Qn(t)||2!=t.ba()))if(t.v&&4==Qn(t))ee(t.Fa,0,t);else if(Bt(t,"readystatechange"),4==Qn(t)){t.h=!1;try{const a=t.ba();t:switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break t;default:e=!1}var n;if(!(n=e)){var s;if(s=0===a){var r=String(t.H).match(We)[1]||null;if(!r&&_.self&&_.self.location){var i=_.self.location.protocol;r=i.substr(0,i.length-1)}s=!qn.test(r?r.toLowerCase():"")}n=s}if(n)Bt(t,"complete"),Bt(t,"success");else{t.m=6;try{var o=2n)e=Math.max(0,r[o].h-100),i=!1;else try{xn(a,t,"req"+n+"_")}catch(t){s&&s(a)}}if(i){s=t.join("&");break t}}}return t=t.l.splice(0,n),e.D=t,s}function as(t){t.g||t.u||(t.Y=1,Wt(t.Ga,t),t.A=0)}function cs(t){return!(t.g||t.u||3<=t.A)&&(t.Y++,t.u=we(L(t.Ga,t),fs(t,t.A)),t.A++,!0)}function us(t){null!=t.B&&(_.clearTimeout(t.B),t.B=null)}function hs(t){t.g=new xe(t,t.h,"rpc",t.Y),null===t.o&&(t.g.H=t.s),t.g.O=0;var e=Xe(t.oa);nn(e,"RID","rpc"),nn(e,"SID",t.J),nn(e,"CI",t.N?"0":"1"),nn(e,"AID",t.U),is(t,e),nn(e,"TYPE","xmlhttp"),t.o&&t.s&&Yn(e,t.o,t.s),t.K&&t.g.setTimeout(t.K);var n=t.g;t=t.la,n.K=1,n.v=sn(Xe(e)),n.s=null,n.U=!0,Me(n,t)}function ls(t){null!=t.v&&(_.clearTimeout(t.v),t.v=null)}function ds(t,e){var n=null;if(t.g==e){ls(t),us(t),t.g=null;var s=2}else{if(!In(t.i,e))return;n=e.D,_n(t.i,e),s=1}if(t.I=e.N,0!=t.G)if(e.i)if(1==s){n=e.s?e.s.length:0,e=Date.now()-e.F;var r=t.C;Bt(s=de(),new ye(s,n,e,r)),ss(t)}else as(t);else if(3==(r=e.o)||0==r&&0=t.i.j-(t.m?1:0)||(t.m?(t.l=e.D.concat(t.l),0):1==t.G||2==t.G||t.C>=(t.Xa?0:t.Ya)||(t.m=we(L(t.Ha,t,e),fs(t,t.C)),t.C++,0)))}(t,e)||2==s&&cs(t)))switch(n&&0e?null:"string"==typeof t?t.charAt(e):t[e]}(r.T()),n=_.FormData&&t instanceof _.FormData,!(0<=V(Bn,e))||s||n||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r.forEach((function(t,e){this.g.setRequestHeader(e,t)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{zn(this),0=this.O)){var t=2*this.O;this.h.info("BP detection timer enabled: "+t),this.B=we(L(this.bb,this),t)}},E.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,pe(10),ts(this),hs(this))},E.ab=function(){null!=this.v&&(this.v=null,ts(this),cs(this),pe(19))},E.jb=function(t){t?(this.h.info("Successfully pinged google.com"),pe(2)):(this.h.info("Failed to ping google.com"),pe(1))},(E=ws.prototype).xa=function(){},E.wa=function(){},E.va=function(){},E.ua=function(){},E.Oa=function(){},vs.prototype.g=function(t,e){return new bs(t,e)},M(bs,qt),bs.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var t=this.g,e=this.l,n=this.h||void 0;t.Wa&&(t.h.info("Origin Trials enabled."),Wt(L(t.hb,t,e))),pe(0),t.W=e,t.aa=n||{},t.N=t.X,t.F=ps(t,null,t.W),ss(t)},bs.prototype.close=function(){Zn(this.g)},bs.prototype.u=function(t){if("string"==typeof t){var e={};e.__data__=t,ns(this.g,e)}else this.v?((e={}).__data__=Kt(t),ns(this.g,e)):ns(this.g,t)},bs.prototype.M=function(){this.g.j=null,delete this.j,Zn(this.g),delete this.g,bs.Z.M.call(this)},M(Ts,Ne),M(Es,Ae),M(Is,ws),Is.prototype.xa=function(){Bt(this.g,"a")},Is.prototype.wa=function(t){Bt(this.g,new Ts(t))},Is.prototype.va=function(t){Bt(this.g,new Es(t))},Is.prototype.ua=function(){Bt(this.g,"b")},vs.prototype.createWebChannel=vs.prototype.g,bs.prototype.send=bs.prototype.u,bs.prototype.open=bs.prototype.m,bs.prototype.close=bs.prototype.close,ve.NO_ERROR=0,ve.TIMEOUT=8,ve.HTTP_ERROR=6,be.COMPLETE="complete",Ie.EventType=_e,_e.OPEN="a",_e.CLOSE="b",_e.ERROR="c",_e.MESSAGE="d",qt.prototype.listen=qt.prototype.N,Vn.prototype.listenOnce=Vn.prototype.O,Vn.prototype.getLastError=Vn.prototype.La,Vn.prototype.getLastErrorCode=Vn.prototype.Da,Vn.prototype.getStatus=Vn.prototype.ba,Vn.prototype.getResponseJson=Vn.prototype.Qa,Vn.prototype.getResponseText=Vn.prototype.ga,Vn.prototype.send=Vn.prototype.ea;var Ss=ve,_s=be,Ns=he,As=10,Ds=11,xs=kn,Cs=Ie,ks=Vn;const Rs="@firebase/firestore"; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ls{constructor(t){this.uid=t}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}Ls.UNAUTHENTICATED=new Ls(null),Ls.GOOGLE_CREDENTIALS=new Ls("google-credentials-uid"),Ls.FIRST_PARTY=new Ls("first-party-uid"),Ls.MOCK_USER=new Ls("mock-user"); +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +let Os="9.3.0"; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Ms=new class{constructor(t){this.name=t,this._logLevel=v,this._logHandler=T,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in p))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel="string"==typeof t?w[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,p.DEBUG,...t),this._logHandler(this,p.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,p.VERBOSE,...t),this._logHandler(this,p.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,p.INFO,...t),this._logHandler(this,p.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,p.WARN,...t),this._logHandler(this,p.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,p.ERROR,...t),this._logHandler(this,p.ERROR,...t)}}("@firebase/firestore");function Fs(){return Ms.logLevel}function Ps(t){Ms.setLogLevel(t)}function Vs(t,...e){if(Ms.logLevel<=p.DEBUG){const n=e.map(Bs);Ms.debug(`Firestore (${Os}): ${t}`,...n)}}function Us(t,...e){if(Ms.logLevel<=p.ERROR){const n=e.map(Bs);Ms.error(`Firestore (${Os}): ${t}`,...n)}}function qs(t,...e){if(Ms.logLevel<=p.WARN){const n=e.map(Bs);Ms.warn(`Firestore (${Os}): ${t}`,...n)}}function Bs(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var e} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function js(t="Unexpected state"){const e=`FIRESTORE (${Os}) INTERNAL ASSERTION FAILED: `+t;throw Us(e),new Error(e)}function Ks(t,e){t||js()}function $s(t,e){t||js()}function Gs(t,e){return t} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Hs={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class zs extends Error{constructor(t,e){super(e),this.code=t,this.message=e,this.name="FirebaseError",this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qs{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ws{constructor(t,e){this.user=e,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization=`Bearer ${t}`}}class Ys{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,e){t.enqueueRetryable((()=>e(Ls.UNAUTHENTICATED)))}shutdown(){}}class Xs{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,e){this.changeListener=e,t.enqueueRetryable((()=>e(this.token.user)))}shutdown(){this.changeListener=null}}class Js{constructor(t){this.t=t,this.currentUser=Ls.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,e){let n=this.i;const s=t=>this.i!==n?(n=this.i,e(t)):Promise.resolve();let r=new Qs;this.o=()=>{this.i++,this.currentUser=this.u(),r.resolve(),r=new Qs,t.enqueueRetryable((()=>s(this.currentUser)))};const i=()=>{const e=r;t.enqueueRetryable((async()=>{await e.promise,await s(this.currentUser)}))},o=t=>{Vs("FirebaseCredentialsProvider","Auth detected"),this.auth=t,this.auth.addAuthTokenListener(this.o),i()};this.t.onInit((t=>o(t))),setTimeout((()=>{if(!this.auth){const t=this.t.getImmediate({optional:!0});t?o(t):(Vs("FirebaseCredentialsProvider","Auth not yet detected"),r.resolve(),r=new Qs)}}),0),i()}getToken(){const t=this.i,e=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(e).then((e=>this.i!==t?(Vs("FirebaseCredentialsProvider","getToken aborted due to token change."),this.getToken()):e?(Ks("string"==typeof e.accessToken),new Ws(e.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return Ks(null===t||"string"==typeof t),new Ls(t)}}class Zs{constructor(t,e,n){this.h=t,this.l=e,this.m=n,this.type="FirstParty",this.user=Ls.FIRST_PARTY}get authHeaders(){const t={"X-Goog-AuthUser":this.l},e=this.h.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),this.m&&(t["X-Goog-Iam-Authorization-Token"]=this.m),t}}class tr{constructor(t,e,n){this.h=t,this.l=e,this.m=n}getToken(){return Promise.resolve(new Zs(this.h,this.l,this.m))}start(t,e){t.enqueueRetryable((()=>e(Ls.FIRST_PARTY)))}shutdown(){}invalidateToken(){}} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class er{constructor(t,e){this.previousValue=t,e&&(e.sequenceNumberHandler=t=>this.g(t),this.p=t=>e.writeSequenceNumber(t))}g(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.p&&this.p(t),t}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function nr(t){const e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(let e=0;ee?1:0}function ir(t,e,n){return t.length===e.length&&t.every(((t,s)=>n(t,e[s])))}function or(t){return t+"\0"} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ar{constructor(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new zs(Hs.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return ar.fromMillis(Date.now())}static fromDate(t){return ar.fromMillis(t.getTime())}static fromMillis(t){const e=Math.floor(t/1e3),n=Math.floor(1e6*(t-1e3*e));return new ar(e,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?rr(this.nanoseconds,t.nanoseconds):rr(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class cr{constructor(t){this.timestamp=t}static fromTimestamp(t){return new cr(t)}static min(){return new cr(new ar(0,0))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ur(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function hr(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function lr(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dr{constructor(t,e,n){void 0===e?e=0:e>t.length&&js(),void 0===n?n=t.length-e:n>t.length-e&&js(),this.segments=t,this.offset=e,this.len=n}get length(){return this.len}isEqual(t){return 0===dr.comparator(this,t)}child(t){const e=this.segments.slice(this.offset,this.limit());return t instanceof dr?t.forEach((t=>{e.push(t)})):e.push(t),this.construct(e)}limit(){return this.offset+this.length}popFirst(t){return t=void 0===t?1:t,this.construct(this.segments,this.offset+t,this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return 0===this.length}isPrefixOf(t){if(t.lengthr)return 1}return t.lengthe.length?1:0}}class fr extends dr{construct(t,e,n){return new fr(t,e,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...t){const e=[];for(const n of t){if(n.indexOf("//")>=0)throw new zs(Hs.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);e.push(...n.split("/").filter((t=>t.length>0)))}return new fr(e)}static emptyPath(){return new fr([])}}const gr=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class mr extends dr{construct(t,e,n){return new mr(t,e,n)}static isValidIdentifier(t){return gr.test(t)}canonicalString(){return this.toArray().map((t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),mr.isValidIdentifier(t)||(t="`"+t+"`"),t))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new mr(["__name__"])}static fromServerFormat(t){const e=[];let n="",s=0;const r=()=>{if(0===n.length)throw new zs(Hs.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);e.push(n),n=""};let i=!1;for(;st.isEqual(e)))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function yr(){return"undefined"!=typeof atob} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class wr{constructor(t){this.binaryString=t}static fromBase64String(t){const e=atob(t);return new wr(e)}static fromUint8Array(t){const e=function(t){let e="";for(let n=0;n=Number.MIN_SAFE_INTEGER} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xr{constructor(t){this.path=t}static fromPath(t){return new xr(fr.fromString(t))}static fromName(t){return new xr(fr.fromString(t).popFirst(5))}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}isEqual(t){return null!==t&&0===fr.comparator(this.path,t.path)}toString(){return this.path.toString()}static comparator(t,e){return fr.comparator(t.path,e.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new xr(new fr(t.slice()))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Cr(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Ir(t)?4:10:js()}function kr(t,e){const n=Cr(t);if(n!==Cr(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return _r(t).isEqual(_r(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;const n=br(t.timestampValue),s=br(e.timestampValue);return n.seconds===s.seconds&&n.nanos===s.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return Er(t.bytesValue).isEqual(Er(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return Tr(t.geoPointValue.latitude)===Tr(e.geoPointValue.latitude)&&Tr(t.geoPointValue.longitude)===Tr(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return Tr(t.integerValue)===Tr(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){const n=Tr(t.doubleValue),s=Tr(e.doubleValue);return n===s?Ar(n)===Ar(s):isNaN(n)&&isNaN(s)}return!1}(t,e);case 9:return ir(t.arrayValue.values||[],e.arrayValue.values||[],kr);case 10:return function(t,e){const n=t.mapValue.fields||{},s=e.mapValue.fields||{};if(ur(n)!==ur(s))return!1;for(const t in n)if(n.hasOwnProperty(t)&&(void 0===s[t]||!kr(n[t],s[t])))return!1;return!0}(t,e);default:return js()}}function Rr(t,e){return void 0!==(t.values||[]).find((t=>kr(t,e)))}function Lr(t,e){const n=Cr(t),s=Cr(e);if(n!==s)return rr(n,s);switch(n){case 0:return 0;case 1:return rr(t.booleanValue,e.booleanValue);case 2:return function(t,e){const n=Tr(t.integerValue||t.doubleValue),s=Tr(e.integerValue||e.doubleValue);return ns?1:n===s?0:isNaN(n)?isNaN(s)?0:-1:1}(t,e);case 3:return Or(t.timestampValue,e.timestampValue);case 4:return Or(_r(t),_r(e));case 5:return rr(t.stringValue,e.stringValue);case 6:return function(t,e){const n=Er(t),s=Er(e);return n.compareTo(s)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){const n=t.split("/"),s=e.split("/");for(let t=0;te.mapValue.fields[t]=Kr(n))),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Kr(t.arrayValue.values[n]);return e}return Object.assign({},t)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class $r{constructor(t){this.value=t}static empty(){return new $r({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let e=this.value;for(let n=0;n{if(!e.isImmediateParentOf(r)){const t=this.getFieldsMap(e);this.applyChanges(t,n,s),n={},s=[],e=r.popLast()}t?n[r.lastSegment()]=Kr(t):s.push(r.lastSegment())}));const r=this.getFieldsMap(e);this.applyChanges(r,n,s)}delete(t){const e=this.field(t.popLast());jr(e)&&e.mapValue.fields&&delete e.mapValue.fields[t.lastSegment()]}isEqual(t){return kr(this.value,t.value)}getFieldsMap(t){let e=this.value;e.mapValue.fields||(e.mapValue={fields:{}});for(let n=0;nt[e]=n));for(const e of n)delete t[e]}clone(){return new $r(Kr(this.value))}}function Gr(t){const e=[];return hr(t.fields,((t,n)=>{const s=new mr([t]);if(jr(n)){const t=Gr(n.mapValue).fields;if(0===t.length)e.push(s);else for(const n of t)e.push(s.child(n))}else e.push(s)})),new pr(e) +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class Hr{constructor(t,e,n,s,r){this.key=t,this.documentType=e,this.version=n,this.data=s,this.documentState=r}static newInvalidDocument(t){return new Hr(t,0,cr.min(),$r.empty(),0)}static newFoundDocument(t,e,n){return new Hr(t,1,e,n,0)}static newNoDocument(t,e){return new Hr(t,2,e,$r.empty(),0)}static newUnknownDocument(t,e){return new Hr(t,3,e,$r.empty(),2)}convertToFoundDocument(t,e){return this.version=t,this.documentType=1,this.data=e,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=$r.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=$r.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(t){return t instanceof Hr&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}clone(){return new Hr(this.key,this.documentType,this.version,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zr{constructor(t,e=null,n=[],s=[],r=null,i=null,o=null){this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=s,this.limit=r,this.startAt=i,this.endAt=o,this.A=null}}function Qr(t,e=null,n=[],s=[],r=null,i=null,o=null){return new zr(t,e,n,s,r,i,o)}function Wr(t){const e=Gs(t);if(null===e.A){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map((t=>function(t){return t.field.canonicalString()+t.op.toString()+Mr(t.value)}(t))).join(","),t+="|ob:",t+=e.orderBy.map((t=>function(t){return t.field.canonicalString()+t.dir}(t))).join(","),Nr(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=ci(e.startAt)),e.endAt&&(t+="|ub:",t+=ci(e.endAt)),e.A=t}return e.A}function Yr(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n":return t>0;case">=":return t>=0;default:return js()}}v(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class Zr extends Jr{constructor(t,e,n){super(t,e,n),this.key=xr.fromName(n.referenceValue)}matches(t){const e=xr.comparator(t.key,this.key);return this.P(e)}}class ti extends Jr{constructor(t,e){super(t,"in",e),this.keys=ni("in",e)}matches(t){return this.keys.some((e=>e.isEqual(t.key)))}}class ei extends Jr{constructor(t,e){super(t,"not-in",e),this.keys=ni("not-in",e)}matches(t){return!this.keys.some((e=>e.isEqual(t.key)))}}function ni(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((t=>xr.fromName(t.referenceValue)))}class si extends Jr{constructor(t,e){super(t,"array-contains",e)}matches(t){const e=t.data.field(this.field);return Ur(e)&&Rr(e.arrayValue,this.value)}}class ri extends Jr{constructor(t,e){super(t,"in",e)}matches(t){const e=t.data.field(this.field);return null!==e&&Rr(this.value.arrayValue,e)}}class ii extends Jr{constructor(t,e){super(t,"not-in",e)}matches(t){if(Rr(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const e=t.data.field(this.field);return null!==e&&!Rr(this.value.arrayValue,e)}}class oi extends Jr{constructor(t,e){super(t,"array-contains-any",e)}matches(t){const e=t.data.field(this.field);return!(!Ur(e)||!e.arrayValue.values)&&e.arrayValue.values.some((t=>Rr(this.value.arrayValue,t)))}}class ai{constructor(t,e){this.position=t,this.before=e}}function ci(t){return`${t.before?"b":"a"}:${t.position.map((t=>Mr(t))).join(",")}`}class ui{constructor(t,e="asc"){this.field=t,this.dir=e}}function hi(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function li(t,e,n){let s=0;for(let r=0;r0?t.explicitOrderBy[0].field:null}function vi(t){for(const e of t.filters)if(e.v())return e.field;return null}function bi(t){return null!==t.collectionGroup}function Ti(t){const e=Gs(t);if(null===e.V){e.V=[];const t=vi(e),n=wi(e);if(null!==t&&null===n)t.isKeyField()||e.V.push(new ui(t)),e.V.push(new ui(mr.keyField(),"asc"));else{let t=!1;for(const n of e.explicitOrderBy)e.V.push(n),n.field.isKeyField()&&(t=!0);if(!t){const t=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.V.push(new ui(mr.keyField(),t))}}}return e.V}function Ei(t){const e=Gs(t);if(!e.S)if("F"===e.limitType)e.S=Qr(e.path,e.collectionGroup,Ti(e),e.filters,e.limit,e.startAt,e.endAt);else{const t=[];for(const n of Ti(e)){const e="desc"===n.dir?"asc":"desc";t.push(new ui(n.field,e))}const n=e.endAt?new ai(e.endAt.position,!e.endAt.before):null,s=e.startAt?new ai(e.startAt.position,!e.startAt.before):null;e.S=Qr(e.path,e.collectionGroup,t,e.filters,e.limit,n,s)}return e.S}function Ii(t,e,n){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Si(t,e){return Yr(Ei(t),Ei(e))&&t.limitType===e.limitType}function _i(t){return`${Wr(Ei(t))}|lt:${t.limitType}`}function Ni(t){return`Query(target=${function(t){let e=t.path.canonicalString();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=`, filters: [${t.filters.map((t=>{var e;return`${(e=t).field.canonicalString()} ${e.op} ${Mr(e.value)}`})).join(", ")}]`),Nr(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=`, orderBy: [${t.orderBy.map((t=>function(t){return`${t.field.canonicalString()} (${t.dir})`}(t))).join(", ")}]`),t.startAt&&(e+=", startAt: "+ci(t.startAt)),t.endAt&&(e+=", endAt: "+ci(t.endAt)),`Target(${e})`}(Ei(t))}; limitType=${t.limitType})`}function Ai(t,e){return e.isFoundDocument()&&function(t,e){const n=e.key.path;return null!==t.collectionGroup?e.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(n):xr.isDocumentKey(t.path)?t.path.isEqual(n):t.path.isImmediateParentOf(n)}(t,e)&&function(t,e){for(const n of t.explicitOrderBy)if(!n.field.isKeyField()&&null===e.data.field(n.field))return!1;return!0}(t,e)&&function(t,e){for(const n of t.filters)if(!n.matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!li(t.startAt,Ti(t),e))&&(!t.endAt||!li(t.endAt,Ti(t),e))}(t,e)}function Di(t){return(e,n)=>{let s=!1;for(const r of Ti(t)){const t=xi(r,e,n);if(0!==t)return t;s=s||r.field.isKeyField()}return 0}}function xi(t,e,n){const s=t.field.isKeyField()?xr.comparator(e.key,n.key):function(t,e,n){const s=e.data.field(t),r=n.data.field(t);return null!==s&&null!==r?Lr(s,r):js()}(t.field,e,n);switch(t.dir){case"asc":return s;case"desc":return-1*s;default:return js()}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ci(t,e){if(t.D){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Ar(e)?"-0":e}}function ki(t){return{integerValue:""+t}}function Ri(t,e){return Dr(e)?ki(e):Ci(t,e)} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Li{constructor(){this._=void 0}}function Oi(t,e,n){return t instanceof Pi?function(t,e){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof Vi?Ui(t,e):t instanceof qi?Bi(t,e):function(t,e){const n=Fi(t,e),s=Ki(n)+Ki(t.C);return Vr(n)&&Vr(t.C)?ki(s):Ci(t.N,s)}(t,e)}function Mi(t,e,n){return t instanceof Vi?Ui(t,e):t instanceof qi?Bi(t,e):n}function Fi(t,e){var n;return t instanceof ji?Vr(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null}class Pi extends Li{}class Vi extends Li{constructor(t){super(),this.elements=t}}function Ui(t,e){const n=$i(e);for(const e of t.elements)n.some((t=>kr(t,e)))||n.push(e);return{arrayValue:{values:n}}}class qi extends Li{constructor(t){super(),this.elements=t}}function Bi(t,e){let n=$i(e);for(const e of t.elements)n=n.filter((t=>!kr(t,e)));return{arrayValue:{values:n}}}class ji extends Li{constructor(t,e){super(),this.N=t,this.C=e}}function Ki(t){return Tr(t.integerValue||t.doubleValue)}function $i(t){return Ur(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Gi{constructor(t,e){this.field=t,this.transform=e}}class Hi{constructor(t,e){this.version=t,this.transformResults=e}}class zi{constructor(t,e){this.updateTime=t,this.exists=e}static none(){return new zi}static exists(t){return new zi(void 0,t)}static updateTime(t){return new zi(t)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Qi(t,e){return void 0!==t.updateTime?e.isFoundDocument()&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e.isFoundDocument()}class Wi{}function Yi(t,e,n){t instanceof eo?function(t,e,n){const s=t.value.clone(),r=ro(t.fieldTransforms,e,n.transformResults);s.setAll(r),e.convertToFoundDocument(n.version,s).setHasCommittedMutations()}(t,e,n):t instanceof no?function(t,e,n){if(!Qi(t.precondition,e))return void e.convertToUnknownDocument(n.version);const s=ro(t.fieldTransforms,e,n.transformResults),r=e.data;r.setAll(so(t)),r.setAll(s),e.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(t,e,n):function(t,e,n){e.convertToNoDocument(n.version).setHasCommittedMutations()}(0,e,n)}function Xi(t,e,n){t instanceof eo?function(t,e,n){if(!Qi(t.precondition,e))return;const s=t.value.clone(),r=io(t.fieldTransforms,n,e);s.setAll(r),e.convertToFoundDocument(to(e),s).setHasLocalMutations()}(t,e,n):t instanceof no?function(t,e,n){if(!Qi(t.precondition,e))return;const s=io(t.fieldTransforms,n,e),r=e.data;r.setAll(so(t)),r.setAll(s),e.convertToFoundDocument(to(e),r).setHasLocalMutations()}(t,e,n):function(t,e){Qi(t.precondition,e)&&e.convertToNoDocument(cr.min())}(t,e)}function Ji(t,e){let n=null;for(const s of t.fieldTransforms){const t=e.data.field(s.field),r=Fi(s.transform,t||null);null!=r&&(null==n&&(n=$r.empty()),n.set(s.field,r))}return n||null}function Zi(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(t,e){return void 0===t&&void 0===e||!(!t||!e)&&ir(t,e,((t,e)=>function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof Vi&&e instanceof Vi||t instanceof qi&&e instanceof qi?ir(t.elements,e.elements,kr):t instanceof ji&&e instanceof ji?kr(t.C,e.C):t instanceof Pi&&e instanceof Pi}(t.transform,e.transform)}(t,e)))}(t.fieldTransforms,e.fieldTransforms)&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}function to(t){return t.isFoundDocument()?t.version:cr.min()}class eo extends Wi{constructor(t,e,n,s=[]){super(),this.key=t,this.value=e,this.precondition=n,this.fieldTransforms=s,this.type=0}}class no extends Wi{constructor(t,e,n,s,r=[]){super(),this.key=t,this.data=e,this.fieldMask=n,this.precondition=s,this.fieldTransforms=r,this.type=1}}function so(t){const e=new Map;return t.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const s=t.data.field(n);e.set(n,s)}})),e}function ro(t,e,n){const s=new Map;Ks(t.length===n.length);for(let r=0;r0&&(e=e.right)}return null}indexOf(t){let e=0,n=this.root;for(;!n.isEmpty();){const s=this.comparator(t,n.key);if(0===s)return e+n.left.size;s<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal(((e,n)=>(t(e,n),!1)))}toString(){const t=[];return this.inorderTraversal(((e,n)=>(t.push(`${e}:${n}`),!1))),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new mo(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new mo(this.root,t,this.comparator,!1)}getReverseIterator(){return new mo(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new mo(this.root,t,this.comparator,!0)}}class mo{constructor(t,e,n,s){this.isReverse=s,this.nodeStack=[];let r=1;for(;!t.isEmpty();)if(r=e?n(t.key,e):1,s&&(r*=-1),r<0)t=this.isReverse?t.left:t.right;else{if(0===r){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class po{constructor(t,e,n,s,r){this.key=t,this.value=e,this.color=null!=n?n:po.RED,this.left=null!=s?s:po.EMPTY,this.right=null!=r?r:po.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,e,n,s,r){return new po(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=s?s:this.left,null!=r?r:this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,e,n){let s=this;const r=n(t,s.key);return s=r<0?s.copy(null,null,null,s.left.insert(t,e,n),null):0===r?s.copy(null,e,null,null,null):s.copy(null,null,null,null,s.right.insert(t,e,n)),s.fixUp()}removeMin(){if(this.left.isEmpty())return po.EMPTY;let t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()}remove(t,e){let n,s=this;if(e(t,s.key)<0)s.left.isEmpty()||s.left.isRed()||s.left.left.isRed()||(s=s.moveRedLeft()),s=s.copy(null,null,null,s.left.remove(t,e),null);else{if(s.left.isRed()&&(s=s.rotateRight()),s.right.isEmpty()||s.right.isRed()||s.right.left.isRed()||(s=s.moveRedRight()),0===e(t,s.key)){if(s.right.isEmpty())return po.EMPTY;n=s.right.min(),s=s.copy(n.key,n.value,null,null,s.right.removeMin())}s=s.copy(null,null,null,null,s.right.remove(t,e))}return s.fixUp()}isRed(){return this.color}fixUp(){let t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,po.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,po.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw js();if(this.right.isRed())throw js();const t=this.left.check();if(t!==this.right.check())throw js();return t+(this.isRed()?0:1)}}po.EMPTY=null,po.RED=!0,po.BLACK=!1,po.EMPTY=new class{constructor(){this.size=0}get key(){throw js()}get value(){throw js()}get color(){throw js()}get left(){throw js()}get right(){throw js()}copy(t,e,n,s,r){return this}insert(t,e,n){return new po(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class yo{constructor(t){this.comparator=t,this.data=new go(this.comparator)}has(t){return null!==this.data.get(t)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal(((e,n)=>(t(e),!1)))}forEachInRange(t,e){const n=this.data.getIteratorFrom(t[0]);for(;n.hasNext();){const s=n.getNext();if(this.comparator(s.key,t[1])>=0)return;e(s.key)}}forEachWhile(t,e){let n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return}firstAfterOrEqual(t){const e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null}getIterator(){return new wo(this.data.getIterator())}getIteratorFrom(t){return new wo(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let e=this;return e.size{e=e.add(t)})),e}isEqual(t){if(!(t instanceof yo))return!1;if(this.size!==t.size)return!1;const e=this.data.getIterator(),n=t.data.getIterator();for(;e.hasNext();){const t=e.getNext().key,s=n.getNext().key;if(0!==this.comparator(t,s))return!1}return!0}toArray(){const t=[];return this.forEach((e=>{t.push(e)})),t}toString(){const t=[];return this.forEach((e=>t.push(e))),"SortedSet("+t.toString()+")"}copy(t){const e=new yo(this.comparator);return e.data=t,e}}class wo{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vo=new go(xr.comparator);function bo(){return vo}const To=new go(xr.comparator);function Eo(){return To}const Io=new go(xr.comparator);function So(){return Io}const _o=new yo(xr.comparator);function No(...t){let e=_o;for(const n of t)e=e.add(n);return e}const Ao=new yo(rr);function Do(){return Ao} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xo{constructor(t,e,n,s,r){this.snapshotVersion=t,this.targetChanges=e,this.targetMismatches=n,this.documentUpdates=s,this.resolvedLimboDocuments=r}static createSynthesizedRemoteEventForCurrentChange(t,e){const n=new Map;return n.set(t,Co.createSynthesizedTargetChangeForCurrentChange(t,e)),new xo(cr.min(),n,Do(),bo(),No())}}class Co{constructor(t,e,n,s,r){this.resumeToken=t,this.current=e,this.addedDocuments=n,this.modifiedDocuments=s,this.removedDocuments=r}static createSynthesizedTargetChangeForCurrentChange(t,e){return new Co(wr.EMPTY_BYTE_STRING,e,No(),No(),No())}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ko{constructor(t,e,n,s){this.k=t,this.removedTargetIds=e,this.key=n,this.$=s}}class Ro{constructor(t,e){this.targetId=t,this.O=e}}class Lo{constructor(t,e,n=wr.EMPTY_BYTE_STRING,s=null){this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=s}}class Oo{constructor(){this.F=0,this.M=Po(),this.L=wr.EMPTY_BYTE_STRING,this.B=!1,this.U=!0}get current(){return this.B}get resumeToken(){return this.L}get q(){return 0!==this.F}get K(){return this.U}j(t){t.approximateByteSize()>0&&(this.U=!0,this.L=t)}W(){let t=No(),e=No(),n=No();return this.M.forEach(((s,r)=>{switch(r){case 0:t=t.add(s);break;case 2:e=e.add(s);break;case 1:n=n.add(s);break;default:js()}})),new Co(this.L,this.B,t,e,n)}G(){this.U=!1,this.M=Po()}H(t,e){this.U=!0,this.M=this.M.insert(t,e)}J(t){this.U=!0,this.M=this.M.remove(t)}Y(){this.F+=1}X(){this.F-=1}Z(){this.U=!0,this.B=!0}}class Mo{constructor(t){this.tt=t,this.et=new Map,this.nt=bo(),this.st=Fo(),this.it=new yo(rr)}rt(t){for(const e of t.k)t.$&&t.$.isFoundDocument()?this.ot(e,t.$):this.ct(e,t.key,t.$);for(const e of t.removedTargetIds)this.ct(e,t.key,t.$)}at(t){this.forEachTarget(t,(e=>{const n=this.ut(e);switch(t.state){case 0:this.ht(e)&&n.j(t.resumeToken);break;case 1:n.X(),n.q||n.G(),n.j(t.resumeToken);break;case 2:n.X(),n.q||this.removeTarget(e);break;case 3:this.ht(e)&&(n.Z(),n.j(t.resumeToken));break;case 4:this.ht(e)&&(this.lt(e),n.j(t.resumeToken));break;default:js()}}))}forEachTarget(t,e){t.targetIds.length>0?t.targetIds.forEach(e):this.et.forEach(((t,n)=>{this.ht(n)&&e(n)}))}ft(t){const e=t.targetId,n=t.O.count,s=this.dt(e);if(s){const t=s.target;if(Xr(t))if(0===n){const n=new xr(t.path);this.ct(e,n,Hr.newNoDocument(n,cr.min()))}else Ks(1===n);else this.wt(e)!==n&&(this.lt(e),this.it=this.it.add(e))}}_t(t){const e=new Map;this.et.forEach(((n,s)=>{const r=this.dt(s);if(r){if(n.current&&Xr(r.target)){const e=new xr(r.target.path);null!==this.nt.get(e)||this.gt(s,e)||this.ct(s,e,Hr.newNoDocument(e,t))}n.K&&(e.set(s,n.W()),n.G())}}));let n=No();this.st.forEach(((t,e)=>{let s=!0;e.forEachWhile((t=>{const e=this.dt(t);return!e||2===e.purpose||(s=!1,!1)})),s&&(n=n.add(t))}));const s=new xo(t,e,this.it,this.nt,n);return this.nt=bo(),this.st=Fo(),this.it=new yo(rr),s}ot(t,e){if(!this.ht(t))return;const n=this.gt(t,e.key)?2:0;this.ut(t).H(e.key,n),this.nt=this.nt.insert(e.key,e),this.st=this.st.insert(e.key,this.yt(e.key).add(t))}ct(t,e,n){if(!this.ht(t))return;const s=this.ut(t);this.gt(t,e)?s.H(e,1):s.J(e),this.st=this.st.insert(e,this.yt(e).delete(t)),n&&(this.nt=this.nt.insert(e,n))}removeTarget(t){this.et.delete(t)}wt(t){const e=this.ut(t).W();return this.tt.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size}Y(t){this.ut(t).Y()}ut(t){let e=this.et.get(t);return e||(e=new Oo,this.et.set(t,e)),e}yt(t){let e=this.st.get(t);return e||(e=new yo(rr),this.st=this.st.insert(t,e)),e}ht(t){const e=null!==this.dt(t);return e||Vs("WatchChangeAggregator","Detected inactive target",t),e}dt(t){const e=this.et.get(t);return e&&e.q?null:this.tt.Tt(t)}lt(t){this.et.set(t,new Oo),this.tt.getRemoteKeysForTarget(t).forEach((e=>{this.ct(t,e,null)}))}gt(t,e){return this.tt.getRemoteKeysForTarget(t).has(e)}}function Fo(){return new go(xr.comparator)}function Po(){return new go(xr.comparator)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Vo={asc:"ASCENDING",desc:"DESCENDING"},Uo={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"};class qo{constructor(t,e){this.databaseId=t,this.D=e}}function Bo(t,e){return t.D?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function jo(t,e){return t.D?e.toBase64():e.toUint8Array()}function Ko(t,e){return Bo(t,e.toTimestamp())}function $o(t){return Ks(!!t),cr.fromTimestamp(function(t){const e=br(t);return new ar(e.seconds,e.nanos)}(t))}function Go(t,e){return function(t){return new fr(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).canonicalString()}function Ho(t){const e=fr.fromString(t);return Ks(pa(e)),e}function zo(t,e){return Go(t.databaseId,e.path)}function Qo(t,e){const n=Ho(e);if(n.get(1)!==t.databaseId.projectId)throw new zs(Hs.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new zs(Hs.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new xr(Jo(n))}function Wo(t,e){return Go(t.databaseId,e)}function Yo(t){const e=Ho(t);return 4===e.length?fr.emptyPath():Jo(e)}function Xo(t){return new fr(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function Jo(t){return Ks(t.length>4&&"documents"===t.get(4)),t.popFirst(5)}function Zo(t,e,n){return{name:zo(t,e),fields:n.value.mapValue.fields}}function ta(t,e,n){const s=Qo(t,e.name),r=$o(e.updateTime),i=new $r({mapValue:{fields:e.fields}}),o=Hr.newFoundDocument(s,r,i);return n&&o.setHasCommittedMutations(),n?o.setHasCommittedMutations():o}function ea(t,e){let n;if(e instanceof eo)n={update:Zo(t,e.key,e.value)};else if(e instanceof oo)n={delete:zo(t,e.key)};else if(e instanceof no)n={update:Zo(t,e.key,e.data),updateMask:ma(e.fieldMask)};else{if(!(e instanceof ao))return js();n={verify:zo(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((t=>function(t,e){const n=e.transform;if(n instanceof Pi)return{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Vi)return{fieldPath:e.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof qi)return{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof ji)return{fieldPath:e.field.canonicalString(),increment:n.C};throw js()}(0,t)))),e.precondition.isNone||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Ko(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:js()}(t,e.precondition)),n}function na(t,e){const n=e.currentDocument?function(t){return void 0!==t.updateTime?zi.updateTime($o(t.updateTime)):void 0!==t.exists?zi.exists(t.exists):zi.none()}(e.currentDocument):zi.none(),s=e.updateTransforms?e.updateTransforms.map((e=>function(t,e){let n=null;if("setToServerValue"in e)Ks("REQUEST_TIME"===e.setToServerValue),n=new Pi;else if("appendMissingElements"in e){const t=e.appendMissingElements.values||[];n=new Vi(t)}else if("removeAllFromArray"in e){const t=e.removeAllFromArray.values||[];n=new qi(t)}else"increment"in e?n=new ji(t,e.increment):js();const s=mr.fromServerFormat(e.fieldPath);return new Gi(s,n)}(t,e))):[];if(e.update){e.update.name;const r=Qo(t,e.update.name),i=new $r({mapValue:{fields:e.update.fields}});if(e.updateMask){const t=function(t){const e=t.fieldPaths||[];return new pr(e.map((t=>mr.fromServerFormat(t))))}(e.updateMask);return new no(r,i,t,n,s)}return new eo(r,i,n,s)}if(e.delete){const s=Qo(t,e.delete);return new oo(s,n)}if(e.verify){const s=Qo(t,e.verify);return new ao(s,n)}return js()}function sa(t,e){return{documents:[Wo(t,e.path)]}}function ra(t,e){const n={structuredQuery:{}},s=e.path;null!==e.collectionGroup?(n.parent=Wo(t,s),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Wo(t,s.popLast()),n.structuredQuery.from=[{collectionId:s.lastSegment()}]);const r=function(t){if(0===t.length)return;const e=t.map((t=>function(t){if("=="===t.op){if(Br(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NAN"}};if(qr(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(Br(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NOT_NAN"}};if(qr(t.value))return{unaryFilter:{field:la(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:la(t.field),op:ha(t.op),value:t.value}}}(t)));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}(e.filters);r&&(n.structuredQuery.where=r);const i=function(t){if(0!==t.length)return t.map((t=>function(t){return{field:la(t.field),direction:ua(t.dir)}}(t)))}(e.orderBy);i&&(n.structuredQuery.orderBy=i);const o=function(t,e){return t.D||Nr(e)?e:{value:e}}(t,e.limit);return null!==o&&(n.structuredQuery.limit=o),e.startAt&&(n.structuredQuery.startAt=aa(e.startAt)),e.endAt&&(n.structuredQuery.endAt=aa(e.endAt)),n}function ia(t){let e=Yo(t.parent);const n=t.structuredQuery,s=n.from?n.from.length:0;let r=null;if(s>0){Ks(1===s);const t=n.from[0];t.allDescendants?r=t.collectionId:e=e.child(t.collectionId)}let i=[];n.where&&(i=oa(n.where));let o=[];n.orderBy&&(o=n.orderBy.map((t=>function(t){return new ui(da(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t))));let a=null;n.limit&&(a=function(t){let e;return e="object"==typeof t?t.value:t,Nr(e)?null:e}(n.limit));let c=null;n.startAt&&(c=ca(n.startAt));let u=null;return n.endAt&&(u=ca(n.endAt)),gi(e,r,o,i,a,"F",c,u)}function oa(t){return t?void 0!==t.unaryFilter?[ga(t)]:void 0!==t.fieldFilter?[fa(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((t=>oa(t))).reduce(((t,e)=>t.concat(e))):js():[]}function aa(t){return{before:t.before,values:t.position}}function ca(t){const e=!!t.before,n=t.values||[];return new ai(n,e)}function ua(t){return Vo[t]}function ha(t){return Uo[t]}function la(t){return{fieldPath:t.canonicalString()}}function da(t){return mr.fromServerFormat(t.fieldPath)}function fa(t){return Jr.create(da(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return js()}}(t.fieldFilter.op),t.fieldFilter.value)}function ga(t){switch(t.unaryFilter.op){case"IS_NAN":const e=da(t.unaryFilter.field);return Jr.create(e,"==",{doubleValue:NaN});case"IS_NULL":const n=da(t.unaryFilter.field);return Jr.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=da(t.unaryFilter.field);return Jr.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const r=da(t.unaryFilter.field);return Jr.create(r,"!=",{nullValue:"NULL_VALUE"});default:return js()}}function ma(t){const e=[];return t.fields.forEach((t=>e.push(t.canonicalString()))),{fieldPaths:e}}function pa(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ya(t){let e="";for(let n=0;n0&&(e=va(e)),e=wa(t.get(n),e);return va(e)}function wa(t,e){let n=e;const s=t.length;for(let e=0;e=2),2===e)return Ks(""===t.charAt(0)&&""===t.charAt(1)),fr.emptyPath();const n=e-2,s=[];let r="";for(let i=0;in)&&js(),t.charAt(e+1)){case"":const n=t.substring(i,e);let o;0===r.length?o=n:(r+=n,o=r,r=""),s.push(o);break;case"":r+=t.substring(i,e),r+="\0";break;case"":r+=t.substring(i,e+1);break;default:js()}i=e+2}return new fr(s)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ta{constructor(t,e){this.seconds=t,this.nanoseconds=e}}class Ea{constructor(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n}}Ea.store="owner",Ea.key="owner";class Ia{constructor(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n}}Ia.store="mutationQueues",Ia.keyPath="userId";class Sa{constructor(t,e,n,s,r){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=s,this.mutations=r}}Sa.store="mutations",Sa.keyPath="batchId",Sa.userMutationsIndex="userMutationsIndex",Sa.userMutationsKeyPath=["userId","batchId"];class _a{constructor(){}static prefixForUser(t){return[t]}static prefixForPath(t,e){return[t,ya(e)]}static key(t,e,n){return[t,ya(e),n]}}_a.store="documentMutations",_a.PLACEHOLDER=new _a;class Na{constructor(t,e){this.path=t,this.readTime=e}}class Aa{constructor(t,e){this.path=t,this.version=e}}class Da{constructor(t,e,n,s,r,i){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=s,this.readTime=r,this.parentPath=i}}Da.store="remoteDocuments",Da.readTimeIndex="readTimeIndex",Da.readTimeIndexPath="readTime",Da.collectionReadTimeIndex="collectionReadTimeIndex",Da.collectionReadTimeIndexPath=["parentPath","readTime"];class xa{constructor(t){this.byteSize=t}}xa.store="remoteDocumentGlobal",xa.key="remoteDocumentGlobalKey";class Ca{constructor(t,e,n,s,r,i,o){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=s,this.lastListenSequenceNumber=r,this.lastLimboFreeSnapshotVersion=i,this.query=o}}Ca.store="targets",Ca.keyPath="targetId",Ca.queryTargetsIndexName="queryTargetsIndex",Ca.queryTargetsKeyPath=["canonicalId","targetId"];class ka{constructor(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n}}ka.store="targetDocuments",ka.keyPath=["targetId","path"],ka.documentTargetsIndex="documentTargetsIndex",ka.documentTargetsKeyPath=["path","targetId"];class Ra{constructor(t,e,n,s){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=s}}Ra.key="targetGlobalKey",Ra.store="targetGlobal";class La{constructor(t,e){this.collectionId=t,this.parent=e}}La.store="collectionParents",La.keyPath=["collectionId","parent"];class Oa{constructor(t,e,n,s){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=s}}Oa.store="clientMetadata",Oa.keyPath="clientId";class Ma{constructor(t,e,n){this.bundleId=t,this.createTime=e,this.version=n}}Ma.store="bundles",Ma.keyPath="bundleId";class Fa{constructor(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n}}Fa.store="namedQueries",Fa.keyPath="name";const Pa=[Ia.store,Sa.store,_a.store,Da.store,Ca.store,Ea.store,Ra.store,ka.store,Oa.store,xa.store,La.store,Ma.store,Fa.store],Va="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Ua{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((t=>t()))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qa{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)}),(t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)}))}catch(t){return this.next(void 0,t)}next(t,e){return this.callbackAttached&&js(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(e,this.error):this.wrapSuccess(t,this.result):new qa(((n,s)=>{this.nextCallback=e=>{this.wrapSuccess(t,e).next(n,s)},this.catchCallback=t=>{this.wrapFailure(e,t).next(n,s)}}))}toPromise(){return new Promise(((t,e)=>{this.next(t,e)}))}wrapUserFunction(t){try{const e=t();return e instanceof qa?e:qa.resolve(e)}catch(t){return qa.reject(t)}}wrapSuccess(t,e){return t?this.wrapUserFunction((()=>t(e))):qa.resolve(e)}wrapFailure(t,e){return t?this.wrapUserFunction((()=>t(e))):qa.reject(e)}static resolve(t){return new qa(((e,n)=>{e(t)}))}static reject(t){return new qa(((e,n)=>{n(t)}))}static waitFor(t){return new qa(((e,n)=>{let s=0,r=0,i=!1;t.forEach((t=>{++s,t.next((()=>{++r,i&&r===s&&e()}),(t=>n(t)))})),i=!0,r===s&&e()}))}static or(t){let e=qa.resolve(!1);for(const n of t)e=e.next((t=>t?qa.resolve(t):n()));return e}static forEach(t,e){const n=[];return t.forEach(((t,s)=>{n.push(e.call(this,t,s))})),this.waitFor(n)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ba{constructor(t,e){this.action=t,this.transaction=e,this.aborted=!1,this.Et=new Qs,this.transaction.oncomplete=()=>{this.Et.resolve()},this.transaction.onabort=()=>{e.error?this.Et.reject(new $a(t,e.error)):this.Et.resolve()},this.transaction.onerror=e=>{const n=Wa(e.target.error);this.Et.reject(new $a(t,n))}}static open(t,e,n,s){try{return new Ba(e,t.transaction(s,n))}catch(t){throw new $a(e,t)}}get It(){return this.Et.promise}abort(t){t&&this.Et.reject(t),this.aborted||(Vs("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}store(t){const e=this.transaction.objectStore(t);return new Ha(e)}}class ja{constructor(t,e,n){this.name=t,this.version=e,this.At=n,12.2===ja.Rt(h())&&Us("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(t){return Vs("SimpleDb","Removing database:",t),za(window.indexedDB.deleteDatabase(t)).toPromise()}static bt(){if("object"!=typeof indexedDB)return!1;if(ja.Pt())return!0;const t=h(),e=ja.Rt(t),n=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||n||r)}static Pt(){var t;return void 0!==o&&"YES"===(void 0===(t={})?void 0:t.Vt)}static St(t,e){return t.store(e)}static Rt(t){const e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static vt(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}async Dt(t){return this.db||(Vs("SimpleDb","Opening database:",this.name),this.db=await new Promise(((e,n)=>{const s=indexedDB.open(this.name,this.version);s.onsuccess=t=>{const n=t.target.result;e(n)},s.onblocked=()=>{n(new $a(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},s.onerror=e=>{const s=e.target.error;"VersionError"===s.name?n(new zs(Hs.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):"InvalidStateError"===s.name?n(new zs(Hs.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+s)):n(new $a(t,s))},s.onupgradeneeded=t=>{Vs("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',t.oldVersion);const e=t.target.result;this.At.Ct(e,s.transaction,t.oldVersion,this.version).next((()=>{Vs("SimpleDb","Database upgrade to version "+this.version+" complete")}))}}))),this.Nt&&(this.db.onversionchange=t=>this.Nt(t)),this.db}xt(t){this.Nt=t,this.db&&(this.db.onversionchange=e=>t(e))}async runTransaction(t,e,n,s){const r="readonly"===e;let i=0;for(;;){++i;try{this.db=await this.Dt(t);const e=Ba.open(this.db,t,r?"readonly":"readwrite",n),i=s(e).catch((t=>(e.abort(t),qa.reject(t)))).toPromise();return i.catch((()=>{})),await e.It,i}catch(t){const e="FirebaseError"!==t.name&&i<3;if(Vs("SimpleDb","Transaction failed with error:",t.message,"Retrying:",e),this.close(),!e)return Promise.reject(t)}}}close(){this.db&&this.db.close(),this.db=void 0}}class Ka{constructor(t){this.kt=t,this.$t=!1,this.Ot=null}get isDone(){return this.$t}get Ft(){return this.Ot}set cursor(t){this.kt=t}done(){this.$t=!0}Mt(t){this.Ot=t}delete(){return za(this.kt.delete())}}class $a extends zs{constructor(t,e){super(Hs.UNAVAILABLE,`IndexedDB transaction '${t}' failed: ${e}`),this.name="IndexedDbTransactionError"}}function Ga(t){return"IndexedDbTransactionError"===t.name}class Ha{constructor(t){this.store=t}put(t,e){let n;return void 0!==e?(Vs("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(Vs("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),za(n)}add(t){return Vs("SimpleDb","ADD",this.store.name,t,t),za(this.store.add(t))}get(t){return za(this.store.get(t)).next((e=>(void 0===e&&(e=null),Vs("SimpleDb","GET",this.store.name,t,e),e)))}delete(t){return Vs("SimpleDb","DELETE",this.store.name,t),za(this.store.delete(t))}count(){return Vs("SimpleDb","COUNT",this.store.name),za(this.store.count())}Lt(t,e){const n=this.cursor(this.options(t,e)),s=[];return this.Bt(n,((t,e)=>{s.push(e)})).next((()=>s))}Ut(t,e){Vs("SimpleDb","DELETE ALL",this.store.name);const n=this.options(t,e);n.qt=!1;const s=this.cursor(n);return this.Bt(s,((t,e,n)=>n.delete()))}Kt(t,e){let n;e?n=t:(n={},e=t);const s=this.cursor(n);return this.Bt(s,e)}jt(t){const e=this.cursor({});return new qa(((n,s)=>{e.onerror=t=>{const e=Wa(t.target.error);s(e)},e.onsuccess=e=>{const s=e.target.result;s?t(s.primaryKey,s.value).next((t=>{t?s.continue():n()})):n()}}))}Bt(t,e){const n=[];return new qa(((s,r)=>{t.onerror=t=>{r(t.target.error)},t.onsuccess=t=>{const r=t.target.result;if(!r)return void s();const i=new Ka(r),o=e(r.primaryKey,r.value,i);if(o instanceof qa){const t=o.catch((t=>(i.done(),qa.reject(t))));n.push(t)}i.isDone?s():null===i.Ft?r.continue():r.continue(i.Ft)}})).next((()=>qa.waitFor(n)))}options(t,e){let n;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}}cursor(t){let e="next";if(t.reverse&&(e="prev"),t.index){const n=this.store.index(t.index);return t.qt?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)}}function za(t){return new qa(((e,n)=>{t.onsuccess=t=>{const n=t.target.result;e(n)},t.onerror=t=>{const e=Wa(t.target.error);n(e)}}))}let Qa=!1;function Wa(t){const e=ja.Rt(h());if(e>=12.2&&e<13){const e="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(e)>=0){const t=new zs("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${e}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return Qa||(Qa=!0,setTimeout((()=>{throw t}),0)),t}}return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ya extends Ua{constructor(t,e){super(),this.Qt=t,this.currentSequenceNumber=e}}function Xa(t,e){const n=Gs(t);return ja.St(n.Qt,e)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ja{constructor(t,e,n,s){this.batchId=t,this.localWriteTime=e,this.baseMutations=n,this.mutations=s}applyToRemoteDocument(t,e){const n=e.mutationResults;for(let e=0;e{const n=t.get(e.key),s=n;this.applyToLocalView(s),n.isValidDocument()||s.convertToNoDocument(cr.min())}))}keys(){return this.mutations.reduce(((t,e)=>t.add(e.key)),No())}isEqual(t){return this.batchId===t.batchId&&ir(this.mutations,t.mutations,((t,e)=>Zi(t,e)))&&ir(this.baseMutations,t.baseMutations,((t,e)=>Zi(t,e)))}}class Za{constructor(t,e,n,s){this.batch=t,this.commitVersion=e,this.mutationResults=n,this.docVersions=s}static from(t,e,n){Ks(t.mutations.length===n.length);let s=So();const r=t.mutations;for(let t=0;tna(t.Wt,e)));for(let t=0;tna(t.Wt,e))),r=ar.fromMillis(e.localWriteTimeMs);return new Ja(e.batchId,r,n,s)}function uc(t){const e=ac(t.readTime),n=void 0!==t.lastLimboFreeSnapshotVersion?ac(t.lastLimboFreeSnapshotVersion):cr.min();let s;var r;return void 0!==t.query.documents?(Ks(1===(r=t.query).documents.length),s=Ei(mi(Yo(r.documents[0])))):s=function(t){return Ei(ia(t))}(t.query),new tc(s,t.targetId,0,t.lastListenSequenceNumber,e,n,wr.fromBase64String(t.resumeToken))}function hc(t,e){const n=oc(e.snapshotVersion),s=oc(e.lastLimboFreeSnapshotVersion);let r;r=Xr(e.target)?sa(t.Wt,e.target):ra(t.Wt,e.target);const i=e.resumeToken.toBase64();return new Ca(e.targetId,Wr(e.target),n,i,e.sequenceNumber,s,r)}function lc(t){const e=ia({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?Ii(e,e.limit,"L"):e} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class dc{getBundleMetadata(t,e){return fc(t).get(e).next((t=>{if(t)return{id:(e=t).bundleId,createTime:ac(e.createTime),version:e.version};var e}))}saveBundleMetadata(t,e){var n;return fc(t).put({bundleId:(n=e).id,createTime:oc($o(n.createTime)),version:n.version})}getNamedQuery(t,e){return gc(t).get(e).next((t=>{if(t)return{name:(e=t).name,query:lc(e.bundledQuery),readTime:ac(e.readTime)};var e}))}saveNamedQuery(t,e){return gc(t).put(function(t){return{name:t.name,readTime:oc($o(t.readTime)),bundledQuery:t.bundledQuery}}(e))}}function fc(t){return Xa(t,Ma.store)}function gc(t){return Xa(t,Fa.store)} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class mc{constructor(){this.Gt=new pc}addToCollectionParentIndex(t,e){return this.Gt.add(e),qa.resolve()}getCollectionParents(t,e){return qa.resolve(this.Gt.getEntries(e))}}class pc{constructor(){this.index={}}add(t){const e=t.lastSegment(),n=t.popLast(),s=this.index[e]||new yo(fr.comparator),r=!s.has(n);return this.index[e]=s.add(n),r}has(t){const e=t.lastSegment(),n=t.popLast(),s=this.index[e];return s&&s.has(n)}getEntries(t){return(this.index[t]||new yo(fr.comparator)).toArray()}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class yc{constructor(){this.zt=new pc}addToCollectionParentIndex(t,e){if(!this.zt.has(e)){const n=e.lastSegment(),s=e.popLast();t.addOnCommittedListener((()=>{this.zt.add(e)}));const r={collectionId:n,parent:ya(s)};return wc(t).put(r)}return qa.resolve()}getCollectionParents(t,e){const n=[],s=IDBKeyRange.bound([e,""],[or(e),""],!1,!0);return wc(t).Lt(s).next((t=>{for(const s of t){if(s.collectionId!==e)break;n.push(ba(s.parent))}return n}))}}function wc(t){return Xa(t,La.store)} +/** + * @license + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const vc={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class bc{constructor(t,e,n){this.cacheSizeCollectionThreshold=t,this.percentileToCollect=e,this.maximumSequenceNumbersToCollect=n}static withCacheSize(t){return new bc(t,bc.DEFAULT_COLLECTION_PERCENTILE,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Tc(t,e,n){const s=t.store(Sa.store),r=t.store(_a.store),i=[],o=IDBKeyRange.only(n.batchId);let a=0;const c=s.Kt({range:o},((t,e,n)=>(a++,n.delete())));i.push(c.next((()=>{Ks(1===a)})));const u=[];for(const t of n.mutations){const s=_a.key(e,t.key.path,n.batchId);i.push(r.delete(s)),u.push(t.key)}return qa.waitFor(i).next((()=>u))}function Ec(t){if(!t)return 0;let e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw js();e=t.noDocument}return JSON.stringify(e).length} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */bc.DEFAULT_COLLECTION_PERCENTILE=10,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,bc.DEFAULT=new bc(41943040,bc.DEFAULT_COLLECTION_PERCENTILE,bc.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),bc.DISABLED=new bc(-1,0,0);class Ic{constructor(t,e,n,s){this.userId=t,this.N=e,this.Ht=n,this.referenceDelegate=s,this.Jt={}}static Yt(t,e,n,s){Ks(""!==t.uid);const r=t.isAuthenticated()?t.uid:"";return new Ic(r,e,n,s)}checkEmpty(t){let e=!0;const n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return _c(t).Kt({index:Sa.userMutationsIndex,range:n},((t,n,s)=>{e=!1,s.done()})).next((()=>e))}addMutationBatch(t,e,n,s){const r=Nc(t),i=_c(t);return i.add({}).next((o=>{Ks("number"==typeof o);const a=new Ja(o,e,n,s),c=function(t,e,n){const s=n.baseMutations.map((e=>ea(t.Wt,e))),r=n.mutations.map((e=>ea(t.Wt,e)));return new Sa(e,n.batchId,n.localWriteTime.toMillis(),s,r)}(this.N,this.userId,a),u=[];let h=new yo(((t,e)=>rr(t.canonicalString(),e.canonicalString())));for(const t of s){const e=_a.key(this.userId,t.key.path,o);h=h.add(t.key.path.popLast()),u.push(i.put(c)),u.push(r.put(e,_a.PLACEHOLDER))}return h.forEach((e=>{u.push(this.Ht.addToCollectionParentIndex(t,e))})),t.addOnCommittedListener((()=>{this.Jt[o]=a.keys()})),qa.waitFor(u).next((()=>a))}))}lookupMutationBatch(t,e){return _c(t).get(e).next((t=>t?(Ks(t.userId===this.userId),cc(this.N,t)):null))}Xt(t,e){return this.Jt[e]?qa.resolve(this.Jt[e]):this.lookupMutationBatch(t,e).next((t=>{if(t){const n=t.keys();return this.Jt[e]=n,n}return null}))}getNextMutationBatchAfterBatchId(t,e){const n=e+1,s=IDBKeyRange.lowerBound([this.userId,n]);let r=null;return _c(t).Kt({index:Sa.userMutationsIndex,range:s},((t,e,s)=>{e.userId===this.userId&&(Ks(e.batchId>=n),r=cc(this.N,e)),s.done()})).next((()=>r))}getHighestUnacknowledgedBatchId(t){const e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let n=-1;return _c(t).Kt({index:Sa.userMutationsIndex,range:e,reverse:!0},((t,e,s)=>{n=e.batchId,s.done()})).next((()=>n))}getAllMutationBatches(t){const e=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return _c(t).Lt(Sa.userMutationsIndex,e).next((t=>t.map((t=>cc(this.N,t)))))}getAllMutationBatchesAffectingDocumentKey(t,e){const n=_a.prefixForPath(this.userId,e.path),s=IDBKeyRange.lowerBound(n),r=[];return Nc(t).Kt({range:s},((n,s,i)=>{const[o,a,c]=n,u=ba(a);if(o===this.userId&&e.path.isEqual(u))return _c(t).get(c).next((t=>{if(!t)throw js();Ks(t.userId===this.userId),r.push(cc(this.N,t))}));i.done()})).next((()=>r))}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new yo(rr);const s=[];return e.forEach((e=>{const r=_a.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=Nc(t).Kt({range:i},((t,s,r)=>{const[i,o,a]=t,c=ba(o);i===this.userId&&e.path.isEqual(c)?n=n.add(a):r.done()}));s.push(o)})),qa.waitFor(s).next((()=>this.Zt(t,n)))}getAllMutationBatchesAffectingQuery(t,e){const n=e.path,s=n.length+1,r=_a.prefixForPath(this.userId,n),i=IDBKeyRange.lowerBound(r);let o=new yo(rr);return Nc(t).Kt({range:i},((t,e,r)=>{const[i,a,c]=t,u=ba(a);i===this.userId&&n.isPrefixOf(u)?u.length===s&&(o=o.add(c)):r.done()})).next((()=>this.Zt(t,o)))}Zt(t,e){const n=[],s=[];return e.forEach((e=>{s.push(_c(t).get(e).next((t=>{if(null===t)throw js();Ks(t.userId===this.userId),n.push(cc(this.N,t))})))})),qa.waitFor(s).next((()=>n))}removeMutationBatch(t,e){return Tc(t.Qt,this.userId,e).next((n=>(t.addOnCommittedListener((()=>{this.te(e.batchId)})),qa.forEach(n,(e=>this.referenceDelegate.markPotentiallyOrphaned(t,e))))))}te(t){delete this.Jt[t]}performConsistencyCheck(t){return this.checkEmpty(t).next((e=>{if(!e)return qa.resolve();const n=IDBKeyRange.lowerBound(_a.prefixForUser(this.userId)),s=[];return Nc(t).Kt({range:n},((t,e,n)=>{if(t[0]===this.userId){const e=ba(t[1]);s.push(e)}else n.done()})).next((()=>{Ks(0===s.length)}))}))}containsKey(t,e){return Sc(t,this.userId,e)}ee(t){return Ac(t).get(this.userId).next((t=>t||new Ia(this.userId,-1,"")))}}function Sc(t,e,n){const s=_a.prefixForPath(e,n.path),r=s[1],i=IDBKeyRange.lowerBound(s);let o=!1;return Nc(t).Kt({range:i,qt:!0},((t,n,s)=>{const[i,a,c]=t;i===e&&a===r&&(o=!0),s.done()})).next((()=>o))}function _c(t){return Xa(t,Sa.store)}function Nc(t){return Xa(t,_a.store)}function Ac(t){return Xa(t,Ia.store)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Dc{constructor(t){this.ne=t}next(){return this.ne+=2,this.ne}static se(){return new Dc(0)}static ie(){return new Dc(-1)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xc{constructor(t,e){this.referenceDelegate=t,this.N=e}allocateTargetId(t){return this.re(t).next((e=>{const n=new Dc(e.highestTargetId);return e.highestTargetId=n.next(),this.oe(t,e).next((()=>e.highestTargetId))}))}getLastRemoteSnapshotVersion(t){return this.re(t).next((t=>cr.fromTimestamp(new ar(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))))}getHighestSequenceNumber(t){return this.re(t).next((t=>t.highestListenSequenceNumber))}setTargetsMetadata(t,e,n){return this.re(t).next((s=>(s.highestListenSequenceNumber=e,n&&(s.lastRemoteSnapshotVersion=n.toTimestamp()),e>s.highestListenSequenceNumber&&(s.highestListenSequenceNumber=e),this.oe(t,s))))}addTargetData(t,e){return this.ce(t,e).next((()=>this.re(t).next((n=>(n.targetCount+=1,this.ae(e,n),this.oe(t,n))))))}updateTargetData(t,e){return this.ce(t,e)}removeTargetData(t,e){return this.removeMatchingKeysForTargetId(t,e.targetId).next((()=>Cc(t).delete(e.targetId))).next((()=>this.re(t))).next((e=>(Ks(e.targetCount>0),e.targetCount-=1,this.oe(t,e))))}removeTargets(t,e,n){let s=0;const r=[];return Cc(t).Kt(((i,o)=>{const a=uc(o);a.sequenceNumber<=e&&null===n.get(a.targetId)&&(s++,r.push(this.removeTargetData(t,a)))})).next((()=>qa.waitFor(r))).next((()=>s))}forEachTarget(t,e){return Cc(t).Kt(((t,n)=>{const s=uc(n);e(s)}))}re(t){return kc(t).get(Ra.key).next((t=>(Ks(null!==t),t)))}oe(t,e){return kc(t).put(Ra.key,e)}ce(t,e){return Cc(t).put(hc(this.N,e))}ae(t,e){let n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n}getTargetCount(t){return this.re(t).next((t=>t.targetCount))}getTargetData(t,e){const n=Wr(e),s=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]);let r=null;return Cc(t).Kt({range:s,index:Ca.queryTargetsIndexName},((t,n,s)=>{const i=uc(n);Yr(e,i.target)&&(r=i,s.done())})).next((()=>r))}addMatchingKeys(t,e,n){const s=[],r=Rc(t);return e.forEach((e=>{const i=ya(e.path);s.push(r.put(new ka(n,i))),s.push(this.referenceDelegate.addReference(t,n,e))})),qa.waitFor(s)}removeMatchingKeys(t,e,n){const s=Rc(t);return qa.forEach(e,(e=>{const r=ya(e.path);return qa.waitFor([s.delete([n,r]),this.referenceDelegate.removeReference(t,n,e)])}))}removeMatchingKeysForTargetId(t,e){const n=Rc(t),s=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(s)}getMatchingKeysForTargetId(t,e){const n=IDBKeyRange.bound([e],[e+1],!1,!0),s=Rc(t);let r=No();return s.Kt({range:n,qt:!0},((t,e,n)=>{const s=ba(t[1]),i=new xr(s);r=r.add(i)})).next((()=>r))}containsKey(t,e){const n=ya(e.path),s=IDBKeyRange.bound([n],[or(n)],!1,!0);let r=0;return Rc(t).Kt({index:ka.documentTargetsIndex,qt:!0,range:s},(([t,e],n,s)=>{0!==t&&(r++,s.done())})).next((()=>r>0))}Tt(t,e){return Cc(t).get(e).next((t=>t?uc(t):null))}}function Cc(t){return Xa(t,Ca.store)}function kc(t){return Xa(t,Ra.store)}function Rc(t){return Xa(t,ka.store)} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */async function Lc(t){if(t.code!==Hs.FAILED_PRECONDITION||t.message!==Va)throw t;Vs("LocalStore","Unexpectedly lost primary lease")} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Oc([t,e],[n,s]){const r=rr(t,n);return 0===r?rr(e,s):r}class Mc{constructor(t){this.ue=t,this.buffer=new yo(Oc),this.he=0}le(){return++this.he}fe(t){const e=[t,this.le()];if(this.buffer.size{this.we=null,this.de=!0;try{await t.collectGarbage(this.garbageCollector)}catch(t){Ga(t)?Vs("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",t):await Lc(t)}await this._e(t)}))}}class Pc{constructor(t,e){this.me=t,this.params=e}calculateTargetCount(t,e){return this.me.ge(t).next((t=>Math.floor(e/100*t)))}nthSequenceNumber(t,e){if(0===e)return qa.resolve(er.T);const n=new Mc(e);return this.me.forEachTarget(t,(t=>n.fe(t.sequenceNumber))).next((()=>this.me.ye(t,(t=>n.fe(t))))).next((()=>n.maxValue))}removeTargets(t,e,n){return this.me.removeTargets(t,e,n)}removeOrphanedDocuments(t,e){return this.me.removeOrphanedDocuments(t,e)}collect(t,e){return-1===this.params.cacheSizeCollectionThreshold?(Vs("LruGarbageCollector","Garbage collection skipped; disabled"),qa.resolve(vc)):this.getCacheSize(t).next((n=>n(e>this.params.maximumSequenceNumbersToCollect?(Vs("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${e}`),s=this.params.maximumSequenceNumbersToCollect):s=e,i=Date.now(),this.nthSequenceNumber(t,s)))).next((s=>(n=s,o=Date.now(),this.removeTargets(t,n,e)))).next((e=>(r=e,a=Date.now(),this.removeOrphanedDocuments(t,n)))).next((t=>(c=Date.now(),Fs()<=p.DEBUG&&Vs("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${i-u}ms\n\tDetermined least recently used ${s} in `+(o-i)+"ms\n"+`\tRemoved ${r} targets in `+(a-o)+"ms\n"+`\tRemoved ${t} documents in `+(c-a)+"ms\n"+`Total Duration: ${c-u}ms`),qa.resolve({didRun:!0,sequenceNumbersCollected:s,targetsRemoved:r,documentsRemoved:t}))))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Vc{constructor(t,e){this.db=t,this.garbageCollector=function(t,e){return new Pc(t,e)}(this,e)}ge(t){const e=this.Te(t);return this.db.getTargetCache().getTargetCount(t).next((t=>e.next((e=>t+e))))}Te(t){let e=0;return this.ye(t,(t=>{e++})).next((()=>e))}forEachTarget(t,e){return this.db.getTargetCache().forEachTarget(t,e)}ye(t,e){return this.Ee(t,((t,n)=>e(n)))}addReference(t,e,n){return Uc(t,n)}removeReference(t,e,n){return Uc(t,n)}removeTargets(t,e,n){return this.db.getTargetCache().removeTargets(t,e,n)}markPotentiallyOrphaned(t,e){return Uc(t,e)}Ie(t,e){return function(t,e){let n=!1;return Ac(t).jt((s=>Sc(t,s,e).next((t=>(t&&(n=!0),qa.resolve(!t)))))).next((()=>n))}(t,e)}removeOrphanedDocuments(t,e){const n=this.db.getRemoteDocumentCache().newChangeBuffer(),s=[];let r=0;return this.Ee(t,((i,o)=>{if(o<=e){const e=this.Ie(t,i).next((e=>{if(!e)return r++,n.getEntry(t,i).next((()=>(n.removeEntry(i),Rc(t).delete([0,ya(i.path)]))))}));s.push(e)}})).next((()=>qa.waitFor(s))).next((()=>n.apply(t))).next((()=>r))}removeTarget(t,e){const n=e.withSequenceNumber(t.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(t,n)}updateLimboDocument(t,e){return Uc(t,e)}Ee(t,e){const n=Rc(t);let s,r=er.T;return n.Kt({index:ka.documentTargetsIndex},(([t,n],{path:i,sequenceNumber:o})=>{0===t?(r!==er.T&&e(new xr(ba(s)),r),r=o,s=i):r=er.T})).next((()=>{r!==er.T&&e(new xr(ba(s)),r)}))}getCacheSize(t){return this.db.getRemoteDocumentCache().getSize(t)}}function Uc(t,e){return Rc(t).put(function(t,e){return new ka(0,ya(t.path),e)}(e,t.currentSequenceNumber))} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qc{constructor(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={}}get(t){const e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(const[e,s]of n)if(this.equalsFn(e,t))return s}has(t){return void 0!==this.get(t)}set(t,e){const n=this.mapKeyFn(t),s=this.inner[n];if(void 0!==s){for(let n=0;n{for(const[e,s]of n)t(e,s)}))}isEmpty(){return lr(this.inner)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Bc{constructor(){this.changes=new qc((t=>t.toString()),((t,e)=>t.isEqual(e))),this.changesApplied=!1}getReadTime(t){const e=this.changes.get(t);return e?e.readTime:cr.min()}addEntry(t,e){this.assertNotApplied(),this.changes.set(t.key,{document:t,readTime:e})}removeEntry(t,e=null){this.assertNotApplied(),this.changes.set(t,{document:Hr.newInvalidDocument(t),readTime:e})}getEntry(t,e){this.assertNotApplied();const n=this.changes.get(e);return void 0!==n?qa.resolve(n.document):this.getFromCache(t,e)}getEntries(t,e){return this.getAllFromCache(t,e)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class jc{constructor(t,e){this.N=t,this.Ht=e}addEntry(t,e,n){return Gc(t).put(Hc(e),n)}removeEntry(t,e){const n=Gc(t),s=Hc(e);return n.delete(s)}updateMetadata(t,e){return this.getMetadata(t).next((n=>(n.byteSize+=e,this.Ae(t,n))))}getEntry(t,e){return Gc(t).get(Hc(e)).next((t=>this.Re(e,t)))}be(t,e){return Gc(t).get(Hc(e)).next((t=>({document:this.Re(e,t),size:Ec(t)})))}getEntries(t,e){let n=bo();return this.Pe(t,e,((t,e)=>{const s=this.Re(t,e);n=n.insert(t,s)})).next((()=>n))}ve(t,e){let n=bo(),s=new go(xr.comparator);return this.Pe(t,e,((t,e)=>{const r=this.Re(t,e);n=n.insert(t,r),s=s.insert(t,Ec(e))})).next((()=>({documents:n,Ve:s})))}Pe(t,e,n){if(e.isEmpty())return qa.resolve();const s=IDBKeyRange.bound(e.first().path.toArray(),e.last().path.toArray()),r=e.getIterator();let i=r.getNext();return Gc(t).Kt({range:s},((t,e,s)=>{const o=xr.fromSegments(t);for(;i&&xr.comparator(i,o)<0;)n(i,null),i=r.getNext();i&&i.isEqual(o)&&(n(i,e),i=r.hasNext()?r.getNext():null),i?s.Mt(i.path.toArray()):s.done()})).next((()=>{for(;i;)n(i,null),i=r.hasNext()?r.getNext():null}))}getDocumentsMatchingQuery(t,e,n){let s=bo();const r=e.path.length+1,i={};if(n.isEqual(cr.min())){const t=e.path.toArray();i.range=IDBKeyRange.lowerBound(t)}else{const t=e.path.toArray(),s=rc(n);i.range=IDBKeyRange.lowerBound([t,s],!0),i.index=Da.collectionReadTimeIndex}return Gc(t).Kt(i,((t,n,i)=>{if(t.length!==r)return;const o=nc(this.N,n);e.path.isPrefixOf(o.key.path)?Ai(e,o)&&(s=s.insert(o.key,o)):i.done()})).next((()=>s))}newChangeBuffer(t){return new Kc(this,!!t&&t.trackRemovals)}getSize(t){return this.getMetadata(t).next((t=>t.byteSize))}getMetadata(t){return $c(t).get(xa.key).next((t=>(Ks(!!t),t)))}Ae(t,e){return $c(t).put(xa.key,e)}Re(t,e){if(e){const t=nc(this.N,e);if(!t.isNoDocument()||!t.version.isEqual(cr.min()))return t}return Hr.newInvalidDocument(t)}}class Kc extends Bc{constructor(t,e){super(),this.Se=t,this.trackRemovals=e,this.De=new qc((t=>t.toString()),((t,e)=>t.isEqual(e)))}applyChanges(t){const e=[];let n=0,s=new yo(((t,e)=>rr(t.canonicalString(),e.canonicalString())));return this.changes.forEach(((r,i)=>{const o=this.De.get(r);if(i.document.isValidDocument()){const a=sc(this.Se.N,i.document,this.getReadTime(r));s=s.add(r.path.popLast());const c=Ec(a);n+=c-o,e.push(this.Se.addEntry(t,r,a))}else if(n-=o,this.trackRemovals){const n=sc(this.Se.N,Hr.newNoDocument(r,cr.min()),this.getReadTime(r));e.push(this.Se.addEntry(t,r,n))}else e.push(this.Se.removeEntry(t,r))})),s.forEach((n=>{e.push(this.Se.Ht.addToCollectionParentIndex(t,n))})),e.push(this.Se.updateMetadata(t,n)),qa.waitFor(e)}getFromCache(t,e){return this.Se.be(t,e).next((t=>(this.De.set(e,t.size),t.document)))}getAllFromCache(t,e){return this.Se.ve(t,e).next((({documents:t,Ve:e})=>(e.forEach(((t,e)=>{this.De.set(t,e)})),t)))}}function $c(t){return Xa(t,xa.store)}function Gc(t){return Xa(t,Da.store)}function Hc(t){return t.path.toArray()} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class zc{constructor(t){this.N=t}Ct(t,e,n,s){Ks(n=0&&s<=11);const r=new Ba("createOrUpgrade",e);n<1&&s>=1&&(function(t){t.createObjectStore(Ea.store)}(t),function(t){t.createObjectStore(Ia.store,{keyPath:Ia.keyPath}),t.createObjectStore(Sa.store,{keyPath:Sa.keyPath,autoIncrement:!0}).createIndex(Sa.userMutationsIndex,Sa.userMutationsKeyPath,{unique:!0}),t.createObjectStore(_a.store)}(t),Qc(t),function(t){t.createObjectStore(Da.store)}(t));let i=qa.resolve();return n<3&&s>=3&&(0!==n&&(function(t){t.deleteObjectStore(ka.store),t.deleteObjectStore(Ca.store),t.deleteObjectStore(Ra.store)}(t),Qc(t)),i=i.next((()=>function(t){const e=t.store(Ra.store),n=new Ra(0,0,cr.min().toTimestamp(),0);return e.put(Ra.key,n)}(r)))),n<4&&s>=4&&(0!==n&&(i=i.next((()=>function(t,e){return e.store(Sa.store).Lt().next((n=>{t.deleteObjectStore(Sa.store),t.createObjectStore(Sa.store,{keyPath:Sa.keyPath,autoIncrement:!0}).createIndex(Sa.userMutationsIndex,Sa.userMutationsKeyPath,{unique:!0});const s=e.store(Sa.store),r=n.map((t=>s.put(t)));return qa.waitFor(r)}))}(t,r)))),i=i.next((()=>{!function(t){t.createObjectStore(Oa.store,{keyPath:Oa.keyPath})}(t)}))),n<5&&s>=5&&(i=i.next((()=>this.Ce(r)))),n<6&&s>=6&&(i=i.next((()=>(function(t){t.createObjectStore(xa.store)}(t),this.Ne(r))))),n<7&&s>=7&&(i=i.next((()=>this.xe(r)))),n<8&&s>=8&&(i=i.next((()=>this.ke(t,r)))),n<9&&s>=9&&(i=i.next((()=>{!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){const e=t.objectStore(Da.store);e.createIndex(Da.readTimeIndex,Da.readTimeIndexPath,{unique:!1}),e.createIndex(Da.collectionReadTimeIndex,Da.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&s>=10&&(i=i.next((()=>this.$e(r)))),n<11&&s>=11&&(i=i.next((()=>{!function(t){t.createObjectStore(Ma.store,{keyPath:Ma.keyPath})}(t),function(t){t.createObjectStore(Fa.store,{keyPath:Fa.keyPath})}(t)}))),i}Ne(t){let e=0;return t.store(Da.store).Kt(((t,n)=>{e+=Ec(n)})).next((()=>{const n=new xa(e);return t.store(xa.store).put(xa.key,n)}))}Ce(t){const e=t.store(Ia.store),n=t.store(Sa.store);return e.Lt().next((e=>qa.forEach(e,(e=>{const s=IDBKeyRange.bound([e.userId,-1],[e.userId,e.lastAcknowledgedBatchId]);return n.Lt(Sa.userMutationsIndex,s).next((n=>qa.forEach(n,(n=>{Ks(n.userId===e.userId);const s=cc(this.N,n);return Tc(t,e.userId,s).next((()=>{}))}))))}))))}xe(t){const e=t.store(ka.store),n=t.store(Da.store);return t.store(Ra.store).get(Ra.key).next((t=>{const s=[];return n.Kt(((n,r)=>{const i=new fr(n),o=function(t){return[0,ya(t)]}(i);s.push(e.get(o).next((n=>n?qa.resolve():(n=>e.put(new ka(0,ya(n),t.highestListenSequenceNumber)))(i))))})).next((()=>qa.waitFor(s)))}))}ke(t,e){t.createObjectStore(La.store,{keyPath:La.keyPath});const n=e.store(La.store),s=new pc,r=t=>{if(s.add(t)){const e=t.lastSegment(),s=t.popLast();return n.put({collectionId:e,parent:ya(s)})}};return e.store(Da.store).Kt({qt:!0},((t,e)=>{const n=new fr(t);return r(n.popLast())})).next((()=>e.store(_a.store).Kt({qt:!0},(([t,e,n],s)=>{const i=ba(e);return r(i.popLast())}))))}$e(t){const e=t.store(Ca.store);return e.Kt(((t,n)=>{const s=uc(n),r=hc(this.N,s);return e.put(r)}))}}function Qc(t){t.createObjectStore(ka.store,{keyPath:ka.keyPath}).createIndex(ka.documentTargetsIndex,ka.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Ca.store,{keyPath:Ca.keyPath}).createIndex(Ca.queryTargetsIndexName,Ca.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Ra.store)}const Wc="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class Yc{constructor(t,e,n,s,r,i,o,a,c,u){if(this.allowTabSynchronization=t,this.persistenceKey=e,this.clientId=n,this.Oe=r,this.window=i,this.document=o,this.Fe=c,this.Me=u,this.Le=null,this.Be=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Ue=null,this.inForeground=!1,this.qe=null,this.Ke=null,this.je=Number.NEGATIVE_INFINITY,this.Qe=t=>Promise.resolve(),!Yc.bt())throw new zs(Hs.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new Vc(this,s),this.We=e+"main",this.N=new ec(a),this.Ge=new ja(this.We,11,new zc(this.N)),this.ze=new xc(this.referenceDelegate,this.N),this.Ht=new yc,this.He=function(t,e){return new jc(t,e)}(this.N,this.Ht),this.Je=new dc,this.window&&this.window.localStorage?this.Ye=this.window.localStorage:(this.Ye=null,!1===u&&Us("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.Xe().then((()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new zs(Hs.FAILED_PRECONDITION,Wc);return this.Ze(),this.tn(),this.en(),this.runTransaction("getHighestListenSequenceNumber","readonly",(t=>this.ze.getHighestSequenceNumber(t)))})).then((t=>{this.Le=new er(t,this.Fe)})).then((()=>{this.Be=!0})).catch((t=>(this.Ge&&this.Ge.close(),Promise.reject(t))))}nn(t){return this.Qe=async e=>{if(this.started)return t(e)},t(this.isPrimary)}setDatabaseDeletedListener(t){this.Ge.xt((async e=>{null===e.newVersion&&await t()}))}setNetworkEnabled(t){this.networkEnabled!==t&&(this.networkEnabled=t,this.Oe.enqueueAndForget((async()=>{this.started&&await this.Xe()})))}Xe(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(t=>Jc(t).put(new Oa(this.clientId,Date.now(),this.networkEnabled,this.inForeground)).next((()=>{if(this.isPrimary)return this.sn(t).next((t=>{t||(this.isPrimary=!1,this.Oe.enqueueRetryable((()=>this.Qe(!1))))}))})).next((()=>this.rn(t))).next((e=>this.isPrimary&&!e?this.on(t).next((()=>!1)):!!e&&this.cn(t).next((()=>!0)))))).catch((t=>{if(Ga(t))return Vs("IndexedDbPersistence","Failed to extend owner lease: ",t),this.isPrimary;if(!this.allowTabSynchronization)throw t;return Vs("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((t=>{this.isPrimary!==t&&this.Oe.enqueueRetryable((()=>this.Qe(t))),this.isPrimary=t}))}sn(t){return Xc(t).get(Ea.key).next((t=>qa.resolve(this.an(t))))}un(t){return Jc(t).delete(this.clientId)}async hn(){if(this.isPrimary&&!this.ln(this.je,18e5)){this.je=Date.now();const t=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(t=>{const e=Xa(t,Oa.store);return e.Lt().next((t=>{const n=this.fn(t,18e5),s=t.filter((t=>-1===n.indexOf(t)));return qa.forEach(s,(t=>e.delete(t.clientId))).next((()=>s))}))})).catch((()=>[]));if(this.Ye)for(const e of t)this.Ye.removeItem(this.dn(e.clientId))}}en(){this.Ke=this.Oe.enqueueAfterDelay("client_metadata_refresh",4e3,(()=>this.Xe().then((()=>this.hn())).then((()=>this.en()))))}an(t){return!!t&&t.ownerId===this.clientId}rn(t){return this.Me?qa.resolve(!0):Xc(t).get(Ea.key).next((e=>{if(null!==e&&this.ln(e.leaseTimestampMs,5e3)&&!this.wn(e.ownerId)){if(this.an(e)&&this.networkEnabled)return!0;if(!this.an(e)){if(!e.allowTabSynchronization)throw new zs(Hs.FAILED_PRECONDITION,Wc);return!1}}return!(!this.networkEnabled||!this.inForeground)||Jc(t).Lt().next((t=>void 0===this.fn(t,5e3).find((t=>{if(this.clientId!==t.clientId){const e=!this.networkEnabled&&t.networkEnabled,n=!this.inForeground&&t.inForeground,s=this.networkEnabled===t.networkEnabled;if(e||n&&s)return!0}return!1}))))})).next((t=>(this.isPrimary!==t&&Vs("IndexedDbPersistence",`Client ${t?"is":"is not"} eligible for a primary lease.`),t)))}async shutdown(){this.Be=!1,this._n(),this.Ke&&(this.Ke.cancel(),this.Ke=null),this.mn(),this.gn(),await this.Ge.runTransaction("shutdown","readwrite",[Ea.store,Oa.store],(t=>{const e=new Ya(t,er.T);return this.on(e).next((()=>this.un(e)))})),this.Ge.close(),this.yn()}fn(t,e){return t.filter((t=>this.ln(t.updateTimeMs,e)&&!this.wn(t.clientId)))}pn(){return this.runTransaction("getActiveClients","readonly",(t=>Jc(t).Lt().next((t=>this.fn(t,18e5).map((t=>t.clientId))))))}get started(){return this.Be}getMutationQueue(t){return Ic.Yt(t,this.N,this.Ht,this.referenceDelegate)}getTargetCache(){return this.ze}getRemoteDocumentCache(){return this.He}getIndexManager(){return this.Ht}getBundleCache(){return this.Je}runTransaction(t,e,n){Vs("IndexedDbPersistence","Starting transaction:",t);const s="readonly"===e?"readonly":"readwrite";let r;return this.Ge.runTransaction(t,s,Pa,(s=>(r=new Ya(s,this.Le?this.Le.next():er.T),"readwrite-primary"===e?this.sn(r).next((t=>!!t||this.rn(r))).next((e=>{if(!e)throw Us(`Failed to obtain primary lease for action '${t}'.`),this.isPrimary=!1,this.Oe.enqueueRetryable((()=>this.Qe(!1))),new zs(Hs.FAILED_PRECONDITION,Va);return n(r)})).next((t=>this.cn(r).next((()=>t)))):this.Tn(r).next((()=>n(r)))))).then((t=>(r.raiseOnCommittedEvent(),t)))}Tn(t){return Xc(t).get(Ea.key).next((t=>{if(null!==t&&this.ln(t.leaseTimestampMs,5e3)&&!this.wn(t.ownerId)&&!this.an(t)&&!(this.Me||this.allowTabSynchronization&&t.allowTabSynchronization))throw new zs(Hs.FAILED_PRECONDITION,Wc)}))}cn(t){const e=new Ea(this.clientId,this.allowTabSynchronization,Date.now());return Xc(t).put(Ea.key,e)}static bt(){return ja.bt()}on(t){const e=Xc(t);return e.get(Ea.key).next((t=>this.an(t)?(Vs("IndexedDbPersistence","Releasing primary lease."),e.delete(Ea.key)):qa.resolve()))}ln(t,e){const n=Date.now();return!(tn&&(Us(`Detected an update time that is in the future: ${t} > ${n}`),1))}Ze(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.qe=()=>{this.Oe.enqueueAndForget((()=>(this.inForeground="visible"===this.document.visibilityState,this.Xe())))},this.document.addEventListener("visibilitychange",this.qe),this.inForeground="visible"===this.document.visibilityState)}mn(){this.qe&&(this.document.removeEventListener("visibilitychange",this.qe),this.qe=null)}tn(){var t;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.Ue=()=>{this._n(),l()&&navigator.appVersion.match("Version/14")&&this.Oe.enterRestrictedMode(!0),this.Oe.enqueueAndForget((()=>this.shutdown()))},this.window.addEventListener("pagehide",this.Ue))}gn(){this.Ue&&(this.window.removeEventListener("pagehide",this.Ue),this.Ue=null)}wn(t){var e;try{const n=null!==(null===(e=this.Ye)||void 0===e?void 0:e.getItem(this.dn(t)));return Vs("IndexedDbPersistence",`Client '${t}' ${n?"is":"is not"} zombied in LocalStorage`),n}catch(t){return Us("IndexedDbPersistence","Failed to get zombied client id.",t),!1}}_n(){if(this.Ye)try{this.Ye.setItem(this.dn(this.clientId),String(Date.now()))}catch(t){Us("Failed to set zombie client id.",t)}}yn(){if(this.Ye)try{this.Ye.removeItem(this.dn(this.clientId))}catch(t){}}dn(t){return`firestore_zombie_${this.persistenceKey}_${t}`}}function Xc(t){return Xa(t,Ea.store)}function Jc(t){return Xa(t,Oa.store)}function Zc(t,e){let n=t.projectId;return t.isDefaultDatabase||(n+="."+t.database),"firestore/"+e+"/"+n+"/" +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class tu{constructor(t,e){this.progress=t,this.En=e}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class eu{constructor(t,e,n){this.He=t,this.In=e,this.Ht=n}An(t,e){return this.In.getAllMutationBatchesAffectingDocumentKey(t,e).next((n=>this.Rn(t,e,n)))}Rn(t,e,n){return this.He.getEntry(t,e).next((t=>{for(const e of n)e.applyToLocalView(t);return t}))}bn(t,e){t.forEach(((t,n)=>{for(const t of e)t.applyToLocalView(n)}))}Pn(t,e){return this.He.getEntries(t,e).next((e=>this.vn(t,e).next((()=>e))))}vn(t,e){return this.In.getAllMutationBatchesAffectingDocumentKeys(t,e).next((t=>this.bn(e,t)))}getDocumentsMatchingQuery(t,e,n){return function(t){return xr.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.Vn(t,e.path):bi(e)?this.Sn(t,e,n):this.Dn(t,e,n)}Vn(t,e){return this.An(t,new xr(e)).next((t=>{let e=Eo();return t.isFoundDocument()&&(e=e.insert(t.key,t)),e}))}Sn(t,e,n){const s=e.collectionGroup;let r=Eo();return this.Ht.getCollectionParents(t,s).next((i=>qa.forEach(i,(i=>{const o=function(t,e){return new fi(e,null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(e,i.child(s));return this.Dn(t,o,n).next((t=>{t.forEach(((t,e)=>{r=r.insert(t,e)}))}))})).next((()=>r))))}Dn(t,e,n){let s,r;return this.He.getDocumentsMatchingQuery(t,e,n).next((n=>(s=n,this.In.getAllMutationBatchesAffectingQuery(t,e)))).next((e=>(r=e,this.Cn(t,r,s).next((t=>{s=t;for(const t of r)for(const e of t.mutations){const n=e.key;let r=s.get(n);null==r&&(r=Hr.newInvalidDocument(n),s=s.insert(n,r)),Xi(e,r,t.localWriteTime),r.isFoundDocument()||(s=s.remove(n))}}))))).next((()=>(s.forEach(((t,n)=>{Ai(e,n)||(s=s.remove(t))})),s)))}Cn(t,e,n){let s=No();for(const t of e)for(const e of t.mutations)e instanceof no&&null===n.get(e.key)&&(s=s.add(e.key));let r=n;return this.He.getEntries(t,s).next((t=>(t.forEach(((t,e)=>{e.isFoundDocument()&&(r=r.insert(t,e))})),r)))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nu{constructor(t,e,n,s){this.targetId=t,this.fromCache=e,this.Nn=n,this.xn=s}static kn(t,e){let n=No(),s=No();for(const t of e.docChanges)switch(t.type){case 0:n=n.add(t.doc.key);break;case 1:s=s.add(t.doc.key)}return new nu(t,e.fromCache,n,s)}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class su{$n(t){this.On=t}getDocumentsMatchingQuery(t,e,n,s){return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.explicitOrderBy.length||1===t.explicitOrderBy.length&&t.explicitOrderBy[0].field.isKeyField())}(e)||n.isEqual(cr.min())?this.Fn(t,e):this.On.Pn(t,s).next((r=>{const i=this.Mn(e,r);return(pi(e)||yi(e))&&this.Ln(e.limitType,i,s,n)?this.Fn(t,e):(Fs()<=p.DEBUG&&Vs("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),Ni(e)),this.On.getDocumentsMatchingQuery(t,e,n).next((t=>(i.forEach((e=>{t=t.insert(e.key,e)})),t))))}))}Mn(t,e){let n=new yo(Di(t));return e.forEach(((e,s)=>{Ai(t,s)&&(n=n.add(s))})),n}Ln(t,e,n,s){if(n.size!==e.size)return!0;const r="F"===t?e.last():e.first();return!!r&&(r.hasPendingWrites||r.version.compareTo(s)>0)}Fn(t,e){return Fs()<=p.DEBUG&&Vs("QueryEngine","Using full collection scan to execute query:",Ni(e)),this.On.getDocumentsMatchingQuery(t,e,cr.min())}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class ru{constructor(t,e,n,s){this.persistence=t,this.Bn=e,this.N=s,this.Un=new go(rr),this.qn=new qc((t=>Wr(t)),Yr),this.Kn=cr.min(),this.In=t.getMutationQueue(n),this.jn=t.getRemoteDocumentCache(),this.ze=t.getTargetCache(),this.Qn=new eu(this.jn,this.In,this.persistence.getIndexManager()),this.Je=t.getBundleCache(),this.Bn.$n(this.Qn)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(e=>t.collect(e,this.Un)))}}function iu(t,e,n,s){return new ru(t,e,n,s)}async function ou(t,e){const n=Gs(t);let s=n.In,r=n.Qn;const i=await n.persistence.runTransaction("Handle user change","readonly",(t=>{let i;return n.In.getAllMutationBatches(t).next((o=>(i=o,s=n.persistence.getMutationQueue(e),r=new eu(n.jn,s,n.persistence.getIndexManager()),s.getAllMutationBatches(t)))).next((e=>{const n=[],s=[];let o=No();for(const t of i){n.push(t.batchId);for(const e of t.mutations)o=o.add(e.key)}for(const t of e){s.push(t.batchId);for(const e of t.mutations)o=o.add(e.key)}return r.Pn(t,o).next((t=>({Wn:t,removedBatchIds:n,addedBatchIds:s})))}))}));return n.In=s,n.Qn=r,n.Bn.$n(n.Qn),i}function au(t){const e=Gs(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(t=>e.ze.getLastRemoteSnapshotVersion(t)))}function cu(t,e,n,s,r){let i=No();return n.forEach((t=>i=i.add(t))),e.getEntries(t,i).next((t=>{let i=bo();return n.forEach(((n,o)=>{const a=t.get(n),c=(null==r?void 0:r.get(n))||s;o.isNoDocument()&&o.version.isEqual(cr.min())?(e.removeEntry(n,c),i=i.insert(n,o)):!a.isValidDocument()||o.version.compareTo(a.version)>0||0===o.version.compareTo(a.version)&&a.hasPendingWrites?(e.addEntry(o,c),i=i.insert(n,o)):Vs("LocalStore","Ignoring outdated watch update for ",n,". Current version:",a.version," Watch version:",o.version)})),i}))}function uu(t,e){const n=Gs(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(t=>(void 0===e&&(e=-1),n.In.getNextMutationBatchAfterBatchId(t,e))))}function hu(t,e){const n=Gs(t);return n.persistence.runTransaction("Allocate target","readwrite",(t=>{let s;return n.ze.getTargetData(t,e).next((r=>r?(s=r,qa.resolve(s)):n.ze.allocateTargetId(t).next((r=>(s=new tc(e,r,0,t.currentSequenceNumber),n.ze.addTargetData(t,s).next((()=>s)))))))})).then((t=>{const s=n.Un.get(t.targetId);return(null===s||t.snapshotVersion.compareTo(s.snapshotVersion)>0)&&(n.Un=n.Un.insert(t.targetId,t),n.qn.set(e,t.targetId)),t}))}async function lu(t,e,n){const s=Gs(t),r=s.Un.get(e),i=n?"readwrite":"readwrite-primary";try{n||await s.persistence.runTransaction("Release target",i,(t=>s.persistence.referenceDelegate.removeTarget(t,r)))}catch(t){if(!Ga(t))throw t;Vs("LocalStore",`Failed to update sequence numbers for target ${e}: ${t}`)}s.Un=s.Un.remove(e),s.qn.delete(r.target)}function du(t,e,n){const s=Gs(t);let r=cr.min(),i=No();return s.persistence.runTransaction("Execute query","readonly",(t=>function(t,e,n){const s=Gs(t),r=s.qn.get(n);return void 0!==r?qa.resolve(s.Un.get(r)):s.ze.getTargetData(e,n)}(s,t,Ei(e)).next((e=>{if(e)return r=e.lastLimboFreeSnapshotVersion,s.ze.getMatchingKeysForTargetId(t,e.targetId).next((t=>{i=t}))})).next((()=>s.Bn.getDocumentsMatchingQuery(t,e,n?r:cr.min(),n?i:No()))).next((t=>({documents:t,Gn:i})))))}function fu(t,e){const n=Gs(t),s=Gs(n.ze),r=n.Un.get(e);return r?Promise.resolve(r.target):n.persistence.runTransaction("Get target data","readonly",(t=>s.Tt(t,e).next((t=>t?t.target:null))))}function gu(t){const e=Gs(t);return e.persistence.runTransaction("Get new document changes","readonly",(t=>function(t,e,n){const s=Gs(t);let r=bo(),i=rc(n);const o=Gc(e),a=IDBKeyRange.lowerBound(i,!0);return o.Kt({index:Da.readTimeIndex,range:a},((t,e)=>{const n=nc(s.N,e);r=r.insert(n.key,n),i=e.readTime})).next((()=>({En:r,readTime:ic(i)})))}(e.jn,t,e.Kn))).then((({En:t,readTime:n})=>(e.Kn=n,t)))}async function mu(t,e,n=No()){const s=await hu(t,Ei(lc(e.bundledQuery))),r=Gs(t);return r.persistence.runTransaction("Save named query","readwrite",(t=>{const i=$o(e.readTime);if(s.snapshotVersion.compareTo(i)>=0)return r.Je.saveNamedQuery(t,e);const o=s.withResumeToken(wr.EMPTY_BYTE_STRING,i);return r.Un=r.Un.insert(o.targetId,o),r.ze.updateTargetData(t,o).next((()=>r.ze.removeMatchingKeysForTargetId(t,s.targetId))).next((()=>r.ze.addMatchingKeys(t,n,s.targetId))).next((()=>r.Je.saveNamedQuery(t,e)))}))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class pu{constructor(t){this.N=t,this.Yn=new Map,this.Xn=new Map}getBundleMetadata(t,e){return qa.resolve(this.Yn.get(e))}saveBundleMetadata(t,e){var n;return this.Yn.set(e.id,{id:(n=e).id,version:n.version,createTime:$o(n.createTime)}),qa.resolve()}getNamedQuery(t,e){return qa.resolve(this.Xn.get(e))}saveNamedQuery(t,e){return this.Xn.set(e.name,function(t){return{name:t.name,query:lc(t.bundledQuery),readTime:$o(t.readTime)}}(e)),qa.resolve()}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class yu{constructor(){this.Zn=new yo(wu.ts),this.es=new yo(wu.ns)}isEmpty(){return this.Zn.isEmpty()}addReference(t,e){const n=new wu(t,e);this.Zn=this.Zn.add(n),this.es=this.es.add(n)}ss(t,e){t.forEach((t=>this.addReference(t,e)))}removeReference(t,e){this.rs(new wu(t,e))}os(t,e){t.forEach((t=>this.removeReference(t,e)))}cs(t){const e=new xr(new fr([])),n=new wu(e,t),s=new wu(e,t+1),r=[];return this.es.forEachInRange([n,s],(t=>{this.rs(t),r.push(t.key)})),r}us(){this.Zn.forEach((t=>this.rs(t)))}rs(t){this.Zn=this.Zn.delete(t),this.es=this.es.delete(t)}hs(t){const e=new xr(new fr([])),n=new wu(e,t),s=new wu(e,t+1);let r=No();return this.es.forEachInRange([n,s],(t=>{r=r.add(t.key)})),r}containsKey(t){const e=new wu(t,0),n=this.Zn.firstAfterOrEqual(e);return null!==n&&t.isEqual(n.key)}}class wu{constructor(t,e){this.key=t,this.ls=e}static ts(t,e){return xr.comparator(t.key,e.key)||rr(t.ls,e.ls)}static ns(t,e){return rr(t.ls,e.ls)||xr.comparator(t.key,e.key)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class vu{constructor(t,e){this.Ht=t,this.referenceDelegate=e,this.In=[],this.fs=1,this.ds=new yo(wu.ts)}checkEmpty(t){return qa.resolve(0===this.In.length)}addMutationBatch(t,e,n,s){const r=this.fs;this.fs++,this.In.length>0&&this.In[this.In.length-1];const i=new Ja(r,e,n,s);this.In.push(i);for(const e of s)this.ds=this.ds.add(new wu(e.key,r)),this.Ht.addToCollectionParentIndex(t,e.key.path.popLast());return qa.resolve(i)}lookupMutationBatch(t,e){return qa.resolve(this.ws(e))}getNextMutationBatchAfterBatchId(t,e){const n=e+1,s=this._s(n),r=s<0?0:s;return qa.resolve(this.In.length>r?this.In[r]:null)}getHighestUnacknowledgedBatchId(){return qa.resolve(0===this.In.length?-1:this.fs-1)}getAllMutationBatches(t){return qa.resolve(this.In.slice())}getAllMutationBatchesAffectingDocumentKey(t,e){const n=new wu(e,0),s=new wu(e,Number.POSITIVE_INFINITY),r=[];return this.ds.forEachInRange([n,s],(t=>{const e=this.ws(t.ls);r.push(e)})),qa.resolve(r)}getAllMutationBatchesAffectingDocumentKeys(t,e){let n=new yo(rr);return e.forEach((t=>{const e=new wu(t,0),s=new wu(t,Number.POSITIVE_INFINITY);this.ds.forEachInRange([e,s],(t=>{n=n.add(t.ls)}))})),qa.resolve(this.gs(n))}getAllMutationBatchesAffectingQuery(t,e){const n=e.path,s=n.length+1;let r=n;xr.isDocumentKey(r)||(r=r.child(""));const i=new wu(new xr(r),0);let o=new yo(rr);return this.ds.forEachWhile((t=>{const e=t.key.path;return!!n.isPrefixOf(e)&&(e.length===s&&(o=o.add(t.ls)),!0)}),i),qa.resolve(this.gs(o))}gs(t){const e=[];return t.forEach((t=>{const n=this.ws(t);null!==n&&e.push(n)})),e}removeMutationBatch(t,e){Ks(0===this.ys(e.batchId,"removed")),this.In.shift();let n=this.ds;return qa.forEach(e.mutations,(s=>{const r=new wu(s.key,e.batchId);return n=n.delete(r),this.referenceDelegate.markPotentiallyOrphaned(t,s.key)})).next((()=>{this.ds=n}))}te(t){}containsKey(t,e){const n=new wu(e,0),s=this.ds.firstAfterOrEqual(n);return qa.resolve(e.isEqual(s&&s.key))}performConsistencyCheck(t){return this.In.length,qa.resolve()}ys(t,e){return this._s(t)}_s(t){return 0===this.In.length?0:t-this.In[0].batchId}ws(t){const e=this._s(t);return e<0||e>=this.In.length?null:this.In[e]}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class bu{constructor(t,e){this.Ht=t,this.ps=e,this.docs=new go(xr.comparator),this.size=0}addEntry(t,e,n){const s=e.key,r=this.docs.get(s),i=r?r.size:0,o=this.ps(e);return this.docs=this.docs.insert(s,{document:e.clone(),size:o,readTime:n}),this.size+=o-i,this.Ht.addToCollectionParentIndex(t,s.path.popLast())}removeEntry(t){const e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)}getEntry(t,e){const n=this.docs.get(e);return qa.resolve(n?n.document.clone():Hr.newInvalidDocument(e))}getEntries(t,e){let n=bo();return e.forEach((t=>{const e=this.docs.get(t);n=n.insert(t,e?e.document.clone():Hr.newInvalidDocument(t))})),qa.resolve(n)}getDocumentsMatchingQuery(t,e,n){let s=bo();const r=new xr(e.path.child("")),i=this.docs.getIteratorFrom(r);for(;i.hasNext();){const{key:t,value:{document:r,readTime:o}}=i.getNext();if(!e.path.isPrefixOf(t.path))break;o.compareTo(n)<=0||Ai(e,r)&&(s=s.insert(r.key,r.clone()))}return qa.resolve(s)}Ts(t,e){return qa.forEach(this.docs,(t=>e(t)))}newChangeBuffer(t){return new Tu(this)}getSize(t){return qa.resolve(this.size)}}class Tu extends Bc{constructor(t){super(),this.Se=t}applyChanges(t){const e=[];return this.changes.forEach(((n,s)=>{s.document.isValidDocument()?e.push(this.Se.addEntry(t,s.document,this.getReadTime(n))):this.Se.removeEntry(n)})),qa.waitFor(e)}getFromCache(t,e){return this.Se.getEntry(t,e)}getAllFromCache(t,e){return this.Se.getEntries(t,e)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Eu{constructor(t){this.persistence=t,this.Es=new qc((t=>Wr(t)),Yr),this.lastRemoteSnapshotVersion=cr.min(),this.highestTargetId=0,this.Is=0,this.As=new yu,this.targetCount=0,this.Rs=Dc.se()}forEachTarget(t,e){return this.Es.forEach(((t,n)=>e(n))),qa.resolve()}getLastRemoteSnapshotVersion(t){return qa.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return qa.resolve(this.Is)}allocateTargetId(t){return this.highestTargetId=this.Rs.next(),qa.resolve(this.highestTargetId)}setTargetsMetadata(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.Is&&(this.Is=e),qa.resolve()}ce(t){this.Es.set(t.target,t);const e=t.targetId;e>this.highestTargetId&&(this.Rs=new Dc(e),this.highestTargetId=e),t.sequenceNumber>this.Is&&(this.Is=t.sequenceNumber)}addTargetData(t,e){return this.ce(e),this.targetCount+=1,qa.resolve()}updateTargetData(t,e){return this.ce(e),qa.resolve()}removeTargetData(t,e){return this.Es.delete(e.target),this.As.cs(e.targetId),this.targetCount-=1,qa.resolve()}removeTargets(t,e,n){let s=0;const r=[];return this.Es.forEach(((i,o)=>{o.sequenceNumber<=e&&null===n.get(o.targetId)&&(this.Es.delete(i),r.push(this.removeMatchingKeysForTargetId(t,o.targetId)),s++)})),qa.waitFor(r).next((()=>s))}getTargetCount(t){return qa.resolve(this.targetCount)}getTargetData(t,e){const n=this.Es.get(e)||null;return qa.resolve(n)}addMatchingKeys(t,e,n){return this.As.ss(e,n),qa.resolve()}removeMatchingKeys(t,e,n){this.As.os(e,n);const s=this.persistence.referenceDelegate,r=[];return s&&e.forEach((e=>{r.push(s.markPotentiallyOrphaned(t,e))})),qa.waitFor(r)}removeMatchingKeysForTargetId(t,e){return this.As.cs(e),qa.resolve()}getMatchingKeysForTargetId(t,e){const n=this.As.hs(e);return qa.resolve(n)}containsKey(t,e){return qa.resolve(this.As.containsKey(e))}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Iu{constructor(t,e){this.bs={},this.Le=new er(0),this.Be=!1,this.Be=!0,this.referenceDelegate=t(this),this.ze=new Eu(this),this.Ht=new mc,this.He=function(t,e){return new bu(t,e)}(this.Ht,(t=>this.referenceDelegate.Ps(t))),this.N=new ec(e),this.Je=new pu(this.N)}start(){return Promise.resolve()}shutdown(){return this.Be=!1,Promise.resolve()}get started(){return this.Be}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(){return this.Ht}getMutationQueue(t){let e=this.bs[t.toKey()];return e||(e=new vu(this.Ht,this.referenceDelegate),this.bs[t.toKey()]=e),e}getTargetCache(){return this.ze}getRemoteDocumentCache(){return this.He}getBundleCache(){return this.Je}runTransaction(t,e,n){Vs("MemoryPersistence","Starting transaction:",t);const s=new Su(this.Le.next());return this.referenceDelegate.vs(),n(s).next((t=>this.referenceDelegate.Vs(s).next((()=>t)))).toPromise().then((t=>(s.raiseOnCommittedEvent(),t)))}Ss(t,e){return qa.or(Object.values(this.bs).map((n=>()=>n.containsKey(t,e))))}}class Su extends Ua{constructor(t){super(),this.currentSequenceNumber=t}}class _u{constructor(t){this.persistence=t,this.Ds=new yu,this.Cs=null}static Ns(t){return new _u(t)}get xs(){if(this.Cs)return this.Cs;throw js()}addReference(t,e,n){return this.Ds.addReference(n,e),this.xs.delete(n.toString()),qa.resolve()}removeReference(t,e,n){return this.Ds.removeReference(n,e),this.xs.add(n.toString()),qa.resolve()}markPotentiallyOrphaned(t,e){return this.xs.add(e.toString()),qa.resolve()}removeTarget(t,e){this.Ds.cs(e.targetId).forEach((t=>this.xs.add(t.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(t,e.targetId).next((t=>{t.forEach((t=>this.xs.add(t.toString())))})).next((()=>n.removeTargetData(t,e)))}vs(){this.Cs=new Set}Vs(t){const e=this.persistence.getRemoteDocumentCache().newChangeBuffer();return qa.forEach(this.xs,(n=>{const s=xr.fromPath(n);return this.ks(t,s).next((t=>{t||e.removeEntry(s)}))})).next((()=>(this.Cs=null,e.apply(t))))}updateLimboDocument(t,e){return this.ks(t,e).next((t=>{t?this.xs.delete(e.toString()):this.xs.add(e.toString())}))}Ps(t){return 0}ks(t,e){return qa.or([()=>qa.resolve(this.Ds.containsKey(e)),()=>this.persistence.getTargetCache().containsKey(t,e),()=>this.persistence.Ss(t,e)])}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Nu(t,e){return`firestore_clients_${t}_${e}`}function Au(t,e,n){let s=`firestore_mutations_${t}_${n}`;return e.isAuthenticated()&&(s+=`_${e.uid}`),s}function Du(t,e){return`firestore_targets_${t}_${e}`}class xu{constructor(t,e,n,s){this.user=t,this.batchId=e,this.state=n,this.error=s}static $s(t,e,n){const s=JSON.parse(n);let r,i="object"==typeof s&&-1!==["pending","acknowledged","rejected"].indexOf(s.state)&&(void 0===s.error||"object"==typeof s.error);return i&&s.error&&(i="string"==typeof s.error.message&&"string"==typeof s.error.code,i&&(r=new zs(s.error.code,s.error.message))),i?new xu(t,e,s.state,r):(Us("SharedClientState",`Failed to parse mutation state for ID '${e}': ${n}`),null)}Os(){const t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)}}class Cu{constructor(t,e,n){this.targetId=t,this.state=e,this.error=n}static $s(t,e){const n=JSON.parse(e);let s,r="object"==typeof n&&-1!==["not-current","current","rejected"].indexOf(n.state)&&(void 0===n.error||"object"==typeof n.error);return r&&n.error&&(r="string"==typeof n.error.message&&"string"==typeof n.error.code,r&&(s=new zs(n.error.code,n.error.message))),r?new Cu(t,n.state,s):(Us("SharedClientState",`Failed to parse target state for ID '${t}': ${e}`),null)}Os(){const t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)}}class ku{constructor(t,e){this.clientId=t,this.activeTargetIds=e}static $s(t,e){const n=JSON.parse(e);let s="object"==typeof n&&n.activeTargetIds instanceof Array,r=Do();for(let t=0;s&&tthis.shutdown())),this.started=!0}writeSequenceNumber(t){this.setItem(this.Qs,JSON.stringify(t))}getAllActiveQueryTargets(){return this.ti(this.qs)}isActiveQueryTarget(t){let e=!1;return this.qs.forEach(((n,s)=>{s.activeTargetIds.has(t)&&(e=!0)})),e}addPendingMutation(t){this.ei(t,"pending")}updateMutationState(t,e,n){this.ei(t,e,n),this.ni(t)}addLocalQueryTarget(t){let e="not-current";if(this.isActiveQueryTarget(t)){const n=this.storage.getItem(Du(this.persistenceKey,t));if(n){const s=Cu.$s(t,n);s&&(e=s.state)}}return this.si.Fs(t),this.Ys(),e}removeLocalQueryTarget(t){this.si.Ms(t),this.Ys()}isLocalQueryTarget(t){return this.si.activeTargetIds.has(t)}clearQueryState(t){this.removeItem(Du(this.persistenceKey,t))}updateQueryState(t,e,n){this.ii(t,e,n)}handleUserChange(t,e,n){e.forEach((t=>{this.ni(t)})),this.currentUser=t,n.forEach((t=>{this.addPendingMutation(t)}))}setOnlineState(t){this.ri(t)}notifyBundleLoaded(){this.oi()}shutdown(){this.started&&(this.window.removeEventListener("storage",this.Bs),this.removeItem(this.js),this.started=!1)}getItem(t){const e=this.storage.getItem(t);return Vs("SharedClientState","READ",t,e),e}setItem(t,e){Vs("SharedClientState","SET",t,e),this.storage.setItem(t,e)}removeItem(t){Vs("SharedClientState","REMOVE",t),this.storage.removeItem(t)}Us(t){const e=t;if(e.storageArea===this.storage){if(Vs("SharedClientState","EVENT",e.key,e.newValue),e.key===this.js)return void Us("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Oe.enqueueRetryable((async()=>{if(this.started){if(null!==e.key)if(this.Ws.test(e.key)){if(null==e.newValue){const t=this.ci(e.key);return this.ai(t,null)}{const t=this.ui(e.key,e.newValue);if(t)return this.ai(t.clientId,t)}}else if(this.Gs.test(e.key)){if(null!==e.newValue){const t=this.hi(e.key,e.newValue);if(t)return this.li(t)}}else if(this.zs.test(e.key)){if(null!==e.newValue){const t=this.fi(e.key,e.newValue);if(t)return this.di(t)}}else if(e.key===this.Hs){if(null!==e.newValue){const t=this.Xs(e.newValue);if(t)return this.Zs(t)}}else if(e.key===this.Qs){const t=function(t){let e=er.T;if(null!=t)try{const n=JSON.parse(t);Ks("number"==typeof n),e=n}catch(t){Us("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(e.newValue);t!==er.T&&this.sequenceNumberHandler(t)}else if(e.key===this.Js)return this.syncEngine.wi()}else this.Ks.push(e)}))}}get si(){return this.qs.get(this.Ls)}Ys(){this.setItem(this.js,this.si.Os())}ei(t,e,n){const s=new xu(this.currentUser,t,e,n),r=Au(this.persistenceKey,this.currentUser,t);this.setItem(r,s.Os())}ni(t){const e=Au(this.persistenceKey,this.currentUser,t);this.removeItem(e)}ri(t){const e={clientId:this.Ls,onlineState:t};this.storage.setItem(this.Hs,JSON.stringify(e))}ii(t,e,n){const s=Du(this.persistenceKey,t),r=new Cu(t,e,n);this.setItem(s,r.Os())}oi(){this.setItem(this.Js,"value-not-used")}ci(t){const e=this.Ws.exec(t);return e?e[1]:null}ui(t,e){const n=this.ci(t);return ku.$s(n,e)}hi(t,e){const n=this.Gs.exec(t),s=Number(n[1]),r=void 0!==n[2]?n[2]:null;return xu.$s(new Ls(r),s,e)}fi(t,e){const n=this.zs.exec(t),s=Number(n[1]);return Cu.$s(s,e)}Xs(t){return Ru.$s(t)}async li(t){if(t.user.uid===this.currentUser.uid)return this.syncEngine._i(t.batchId,t.state,t.error);Vs("SharedClientState",`Ignoring mutation for non-active user ${t.user.uid}`)}di(t){return this.syncEngine.mi(t.targetId,t.state,t.error)}ai(t,e){const n=e?this.qs.insert(t,e):this.qs.remove(t),s=this.ti(this.qs),r=this.ti(n),i=[],o=[];return r.forEach((t=>{s.has(t)||i.push(t)})),s.forEach((t=>{r.has(t)||o.push(t)})),this.syncEngine.gi(i,o).then((()=>{this.qs=n}))}Zs(t){this.qs.get(t.clientId)&&this.onlineStateHandler(t.onlineState)}ti(t){let e=Do();return t.forEach(((t,n)=>{e=e.unionWith(n.activeTargetIds)})),e}}class Mu{constructor(){this.yi=new Lu,this.pi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,e,n){}addLocalQueryTarget(t){return this.yi.Fs(t),this.pi[t]||"not-current"}updateQueryState(t,e,n){this.pi[t]=e}removeLocalQueryTarget(t){this.yi.Ms(t)}isLocalQueryTarget(t){return this.yi.activeTargetIds.has(t)}clearQueryState(t){delete this.pi[t]}getAllActiveQueryTargets(){return this.yi.activeTargetIds}isActiveQueryTarget(t){return this.yi.activeTargetIds.has(t)}start(){return this.yi=new Lu,Promise.resolve()}handleUserChange(t,e,n){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Fu{Ti(t){}shutdown(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Pu{constructor(){this.Ei=()=>this.Ii(),this.Ai=()=>this.Ri(),this.bi=[],this.Pi()}Ti(t){this.bi.push(t)}shutdown(){window.removeEventListener("online",this.Ei),window.removeEventListener("offline",this.Ai)}Pi(){window.addEventListener("online",this.Ei),window.addEventListener("offline",this.Ai)}Ii(){Vs("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.bi)t(0)}Ri(){Vs("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.bi)t(1)}static bt(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Vu={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"}; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Uu{constructor(t){this.vi=t.vi,this.Vi=t.Vi}Si(t){this.Di=t}Ci(t){this.Ni=t}onMessage(t){this.xi=t}close(){this.Vi()}send(t){this.vi(t)}ki(){this.Di()}$i(t){this.Ni(t)}Oi(t){this.xi(t)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qu extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const e=t.ssl?"https":"http";this.Fi=e+"://"+t.host,this.Mi="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}Li(t,e,n,s){const r=this.Bi(t,e);Vs("RestConnection","Sending: ",r,n);const i={};return this.Ui(i,s),this.qi(t,r,i,n).then((t=>(Vs("RestConnection","Received: ",t),t)),(e=>{throw qs("RestConnection",`${t} failed with error: `,e,"url: ",r,"request:",n),e}))}Ki(t,e,n,s){return this.Li(t,e,n,s)}Ui(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/"+Os,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),e)for(const n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n])}Bi(t,e){const n=Vu[t];return`${this.Fi}/v1/${e}:${n}`}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams}qi(t,e,n,s){return new Promise(((r,i)=>{const o=new ks;o.listenOnce(_s.COMPLETE,(()=>{try{switch(o.getLastErrorCode()){case Ss.NO_ERROR:const e=o.getResponseJson();Vs("Connection","XHR received:",JSON.stringify(e)),r(e);break;case Ss.TIMEOUT:Vs("Connection",'RPC "'+t+'" timed out'),i(new zs(Hs.DEADLINE_EXCEEDED,"Request time out"));break;case Ss.HTTP_ERROR:const n=o.getStatus();if(Vs("Connection",'RPC "'+t+'" failed with status:',n,"response text:",o.getResponseText()),n>0){const t=o.getResponseJson().error;if(t&&t.status&&t.message){const e=function(t){const e=t.toLowerCase().replace(/_/g,"-");return Object.values(Hs).indexOf(e)>=0?e:Hs.UNKNOWN}(t.status);i(new zs(e,t.message))}else i(new zs(Hs.UNKNOWN,"Server responded with status "+o.getStatus()))}else i(new zs(Hs.UNAVAILABLE,"Connection failed."));break;default:js()}}finally{Vs("Connection",'RPC "'+t+'" completed.')}}));const a=JSON.stringify(s);o.send(e,"POST",a,n,15)}))}ji(t,e){const n=[this.Fi,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=new vs,r=de(),i={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(i.xmlHttpFactory=new xs({})),this.Ui(i.initMessageHeaders,e),"undefined"!=typeof window&&(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(h())||"object"==typeof navigator&&"ReactNative"===navigator.product||h().indexOf("Electron/")>=0||function(){const t=h();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}()||h().indexOf("MSAppHost/")>=0||function(){const t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}()||(i.httpHeadersOverwriteParam="$httpHeaders");const o=n.join("");Vs("Connection","Creating WebChannel: "+o,i);const a=s.createWebChannel(o,i);let c=!1,u=!1;const l=new Uu({vi:t=>{u?Vs("Connection","Not sending because WebChannel is closed:",t):(c||(Vs("Connection","Opening WebChannel transport."),a.open(),c=!0),Vs("Connection","WebChannel sending:",t),a.send(t))},Vi:()=>a.close()}),d=(t,e,n)=>{t.listen(e,(t=>{try{n(t)}catch(t){setTimeout((()=>{throw t}),0)}}))};return d(a,Cs.EventType.OPEN,(()=>{u||Vs("Connection","WebChannel transport opened.")})),d(a,Cs.EventType.CLOSE,(()=>{u||(u=!0,Vs("Connection","WebChannel transport closed"),l.$i())})),d(a,Cs.EventType.ERROR,(t=>{u||(u=!0,qs("Connection","WebChannel transport errored:",t),l.$i(new zs(Hs.UNAVAILABLE,"The operation could not be completed")))})),d(a,Cs.EventType.MESSAGE,(t=>{var e;if(!u){const n=t.data[0];Ks(!!n);const s=n,r=s.error||(null===(e=s[0])||void 0===e?void 0:e.error);if(r){Vs("Connection","WebChannel received error:",r);const t=r.status;let e=function(t){const e=uo[t];if(void 0!==e)return fo(e)}(t),n=r.message;void 0===e&&(e=Hs.INTERNAL,n="Unknown error status: "+t+" with message "+r.message),u=!0,l.$i(new zs(e,n)),a.close()}else Vs("Connection","WebChannel received:",n),l.Oi(n)}})),d(r,Ns.STAT_EVENT,(t=>{t.stat===As?Vs("Connection","Detected buffering proxy"):t.stat===Ds&&Vs("Connection","Detected no buffering proxy")})),setTimeout((()=>{l.ki()}),0),l}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Bu(){return"undefined"!=typeof window?window:null}function ju(){return"undefined"!=typeof document?document:null} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Ku(t){return new qo(t,!0)}class $u{constructor(t,e,n=1e3,s=1.5,r=6e4){this.Oe=t,this.timerId=e,this.Qi=n,this.Wi=s,this.Gi=r,this.zi=0,this.Hi=null,this.Ji=Date.now(),this.reset()}reset(){this.zi=0}Yi(){this.zi=this.Gi}Xi(t){this.cancel();const e=Math.floor(this.zi+this.Zi()),n=Math.max(0,Date.now()-this.Ji),s=Math.max(0,e-n);s>0&&Vs("ExponentialBackoff",`Backing off for ${s} ms (base delay: ${this.zi} ms, delay with jitter: ${e} ms, last attempt: ${n} ms ago)`),this.Hi=this.Oe.enqueueAfterDelay(this.timerId,s,(()=>(this.Ji=Date.now(),t()))),this.zi*=this.Wi,this.zithis.Gi&&(this.zi=this.Gi)}tr(){null!==this.Hi&&(this.Hi.skipDelay(),this.Hi=null)}cancel(){null!==this.Hi&&(this.Hi.cancel(),this.Hi=null)}Zi(){return(Math.random()-.5)*this.zi}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Gu{constructor(t,e,n,s,r,i,o){this.Oe=t,this.er=n,this.nr=s,this.sr=r,this.credentialsProvider=i,this.listener=o,this.state=0,this.ir=0,this.rr=null,this.cr=null,this.stream=null,this.ar=new $u(t,e)}ur(){return 1===this.state||5===this.state||this.hr()}hr(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.lr()}async stop(){this.ur()&&await this.close(0)}dr(){this.state=0,this.ar.reset()}wr(){this.hr()&&null===this.rr&&(this.rr=this.Oe.enqueueAfterDelay(this.er,6e4,(()=>this._r())))}mr(t){this.gr(),this.stream.send(t)}async _r(){if(this.hr())return this.close(0)}gr(){this.rr&&(this.rr.cancel(),this.rr=null)}yr(){this.cr&&(this.cr.cancel(),this.cr=null)}async close(t,e){this.gr(),this.yr(),this.ar.cancel(),this.ir++,4!==t?this.ar.reset():e&&e.code===Hs.RESOURCE_EXHAUSTED?(Us(e.toString()),Us("Using maximum backoff delay to prevent overloading the backend."),this.ar.Yi()):e&&e.code===Hs.UNAUTHENTICATED&&3!==this.state&&this.credentialsProvider.invalidateToken(),null!==this.stream&&(this.pr(),this.stream.close(),this.stream=null),this.state=t,await this.listener.Ci(e)}pr(){}auth(){this.state=1;const t=this.Tr(this.ir),e=this.ir;this.credentialsProvider.getToken().then((t=>{this.ir===e&&this.Er(t)}),(e=>{t((()=>{const t=new zs(Hs.UNKNOWN,"Fetching auth token failed: "+e.message);return this.Ir(t)}))}))}Er(t){const e=this.Tr(this.ir);this.stream=this.Ar(t),this.stream.Si((()=>{e((()=>(this.state=2,this.cr=this.Oe.enqueueAfterDelay(this.nr,1e4,(()=>(this.hr()&&(this.state=3),Promise.resolve()))),this.listener.Si())))})),this.stream.Ci((t=>{e((()=>this.Ir(t)))})),this.stream.onMessage((t=>{e((()=>this.onMessage(t)))}))}lr(){this.state=5,this.ar.Xi((async()=>{this.state=0,this.start()}))}Ir(t){return Vs("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}Tr(t){return e=>{this.Oe.enqueueAndForget((()=>this.ir===t?e():(Vs("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Hu extends Gu{constructor(t,e,n,s,r){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",e,n,r),this.N=s}Ar(t){return this.sr.ji("Listen",t)}onMessage(t){this.ar.reset();const e=function(t,e){let n;if("targetChange"in e){e.targetChange;const s=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:js()}(e.targetChange.targetChangeType||"NO_CHANGE"),r=e.targetChange.targetIds||[],i=function(t,e){return t.D?(Ks(void 0===e||"string"==typeof e),wr.fromBase64String(e||"")):(Ks(void 0===e||e instanceof Uint8Array),wr.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(t){const e=void 0===t.code?Hs.UNKNOWN:fo(t.code);return new zs(e,t.message||"")}(o);n=new Lo(s,r,i,a||null)}else if("documentChange"in e){e.documentChange;const s=e.documentChange;s.document,s.document.name,s.document.updateTime;const r=Qo(t,s.document.name),i=$o(s.document.updateTime),o=new $r({mapValue:{fields:s.document.fields}}),a=Hr.newFoundDocument(r,i,o),c=s.targetIds||[],u=s.removedTargetIds||[];n=new ko(c,u,a.key,a)}else if("documentDelete"in e){e.documentDelete;const s=e.documentDelete;s.document;const r=Qo(t,s.document),i=s.readTime?$o(s.readTime):cr.min(),o=Hr.newNoDocument(r,i),a=s.removedTargetIds||[];n=new ko([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const s=e.documentRemove;s.document;const r=Qo(t,s.document),i=s.removedTargetIds||[];n=new ko([],i,r,null)}else{if(!("filter"in e))return js();{e.filter;const t=e.filter;t.targetId;const s=t.count||0,r=new co(s),i=t.targetId;n=new Ro(i,r)}}return n}(this.N,t),n=function(t){if(!("targetChange"in t))return cr.min();const e=t.targetChange;return e.targetIds&&e.targetIds.length?cr.min():e.readTime?$o(e.readTime):cr.min()}(t);return this.listener.Rr(e,n)}br(t){const e={};e.database=Xo(this.N),e.addTarget=function(t,e){let n;const s=e.target;return n=Xr(s)?{documents:sa(t,s)}:{query:ra(t,s)},n.targetId=e.targetId,e.resumeToken.approximateByteSize()>0?n.resumeToken=jo(t,e.resumeToken):e.snapshotVersion.compareTo(cr.min())>0&&(n.readTime=Bo(t,e.snapshotVersion.toTimestamp())),n}(this.N,t);const n=function(t,e){const n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return js()}}(0,e.purpose);return null==n?null:{"goog-listen-tags":n}}(this.N,t);n&&(e.labels=n),this.mr(e)}Pr(t){const e={};e.database=Xo(this.N),e.removeTarget=t,this.mr(e)}}class zu extends Gu{constructor(t,e,n,s,r){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",e,n,r),this.N=s,this.vr=!1}get Vr(){return this.vr}start(){this.vr=!1,this.lastStreamToken=void 0,super.start()}pr(){this.vr&&this.Sr([])}Ar(t){return this.sr.ji("Write",t)}onMessage(t){if(Ks(!!t.streamToken),this.lastStreamToken=t.streamToken,this.vr){this.ar.reset();const e=function(t,e){return t&&t.length>0?(Ks(void 0!==e),t.map((t=>function(t,e){let n=t.updateTime?$o(t.updateTime):$o(e);return n.isEqual(cr.min())&&(n=$o(e)),new Hi(n,t.transformResults||[])}(t,e)))):[]}(t.writeResults,t.commitTime),n=$o(t.commitTime);return this.listener.Dr(n,e)}return Ks(!t.writeResults||0===t.writeResults.length),this.vr=!0,this.listener.Cr()}Nr(){const t={};t.database=Xo(this.N),this.mr(t)}Sr(t){const e={streamToken:this.lastStreamToken,writes:t.map((t=>ea(this.N,t)))};this.mr(e)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Qu extends class{}{constructor(t,e,n){super(),this.credentials=t,this.sr=e,this.N=n,this.kr=!1}$r(){if(this.kr)throw new zs(Hs.FAILED_PRECONDITION,"The client has already been terminated.")}Li(t,e,n){return this.$r(),this.credentials.getToken().then((s=>this.sr.Li(t,e,n,s))).catch((t=>{throw"FirebaseError"===t.name?(t.code===Hs.UNAUTHENTICATED&&this.credentials.invalidateToken(),t):new zs(Hs.UNKNOWN,t.toString())}))}Ki(t,e,n){return this.$r(),this.credentials.getToken().then((s=>this.sr.Ki(t,e,n,s))).catch((t=>{throw"FirebaseError"===t.name?(t.code===Hs.UNAUTHENTICATED&&this.credentials.invalidateToken(),t):new zs(Hs.UNKNOWN,t.toString())}))}terminate(){this.kr=!0}}class Wu{constructor(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.Or=0,this.Fr=null,this.Mr=!0}Lr(){0===this.Or&&(this.Br("Unknown"),this.Fr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.Fr=null,this.Ur("Backend didn't respond within 10 seconds."),this.Br("Offline"),Promise.resolve()))))}qr(t){"Online"===this.state?this.Br("Unknown"):(this.Or++,this.Or>=1&&(this.Kr(),this.Ur(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.Br("Offline")))}set(t){this.Kr(),this.Or=0,"Online"===t&&(this.Mr=!1),this.Br(t)}Br(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}Ur(t){const e=`Could not reach Cloud Firestore backend. ${t}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Mr?(Us(e),this.Mr=!1):Vs("OnlineStateTracker",e)}Kr(){null!==this.Fr&&(this.Fr.cancel(),this.Fr=null)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Yu{constructor(t,e,n,s,r){this.localStore=t,this.datastore=e,this.asyncQueue=n,this.remoteSyncer={},this.jr=[],this.Qr=new Map,this.Wr=new Set,this.Gr=[],this.zr=r,this.zr.Ti((t=>{n.enqueueAndForget((async()=>{ih(this)&&(Vs("RemoteStore","Restarting streams for network reachability change."),await async function(t){const e=Gs(t);e.Wr.add(4),await Ju(e),e.Hr.set("Unknown"),e.Wr.delete(4),await Xu(e)}(this))}))})),this.Hr=new Wu(n,s)}}async function Xu(t){if(ih(t))for(const e of t.Gr)await e(!0)}async function Ju(t){for(const e of t.Gr)await e(!1)}function Zu(t,e){const n=Gs(t);n.Qr.has(e.targetId)||(n.Qr.set(e.targetId,e),rh(n)?sh(n):Eh(n).hr()&&eh(n,e))}function th(t,e){const n=Gs(t),s=Eh(n);n.Qr.delete(e),s.hr()&&nh(n,e),0===n.Qr.size&&(s.hr()?s.wr():ih(n)&&n.Hr.set("Unknown"))}function eh(t,e){t.Jr.Y(e.targetId),Eh(t).br(e)}function nh(t,e){t.Jr.Y(e),Eh(t).Pr(e)}function sh(t){t.Jr=new Mo({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),Tt:e=>t.Qr.get(e)||null}),Eh(t).start(),t.Hr.Lr()}function rh(t){return ih(t)&&!Eh(t).ur()&&t.Qr.size>0}function ih(t){return 0===Gs(t).Wr.size}function oh(t){t.Jr=void 0}async function ah(t){t.Qr.forEach(((e,n)=>{eh(t,e)}))}async function ch(t,e){oh(t),rh(t)?(t.Hr.qr(e),sh(t)):t.Hr.set("Unknown")}async function uh(t,e,n){if(t.Hr.set("Online"),e instanceof Lo&&2===e.state&&e.cause)try{await async function(t,e){const n=e.cause;for(const s of e.targetIds)t.Qr.has(s)&&(await t.remoteSyncer.rejectListen(s,n),t.Qr.delete(s),t.Jr.removeTarget(s))}(t,e)}catch(n){Vs("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),n),await hh(t,n)}else if(e instanceof ko?t.Jr.rt(e):e instanceof Ro?t.Jr.ft(e):t.Jr.at(e),!n.isEqual(cr.min()))try{const e=await au(t.localStore);n.compareTo(e)>=0&&await function(t,e){const n=t.Jr._t(e);return n.targetChanges.forEach(((n,s)=>{if(n.resumeToken.approximateByteSize()>0){const r=t.Qr.get(s);r&&t.Qr.set(s,r.withResumeToken(n.resumeToken,e))}})),n.targetMismatches.forEach((e=>{const n=t.Qr.get(e);if(!n)return;t.Qr.set(e,n.withResumeToken(wr.EMPTY_BYTE_STRING,n.snapshotVersion)),nh(t,e);const s=new tc(n.target,e,1,n.sequenceNumber);eh(t,s)})),t.remoteSyncer.applyRemoteEvent(n)}(t,n)}catch(e){Vs("RemoteStore","Failed to raise snapshot:",e),await hh(t,e)}}async function hh(t,e,n){if(!Ga(e))throw e;t.Wr.add(1),await Ju(t),t.Hr.set("Offline"),n||(n=()=>au(t.localStore)),t.asyncQueue.enqueueRetryable((async()=>{Vs("RemoteStore","Retrying IndexedDB access"),await n(),t.Wr.delete(1),await Xu(t)}))}function lh(t,e){return e().catch((n=>hh(t,n,e)))}async function dh(t){const e=Gs(t),n=Ih(e);let s=e.jr.length>0?e.jr[e.jr.length-1].batchId:-1;for(;fh(e);)try{const t=await uu(e.localStore,s);if(null===t){0===e.jr.length&&n.wr();break}s=t.batchId,gh(e,t)}catch(t){await hh(e,t)}mh(e)&&ph(e)}function fh(t){return ih(t)&&t.jr.length<10}function gh(t,e){t.jr.push(e);const n=Ih(t);n.hr()&&n.Vr&&n.Sr(e.mutations)}function mh(t){return ih(t)&&!Ih(t).ur()&&t.jr.length>0}function ph(t){Ih(t).start()}async function yh(t){Ih(t).Nr()}async function wh(t){const e=Ih(t);for(const n of t.jr)e.Sr(n.mutations)}async function vh(t,e,n){const s=t.jr.shift(),r=Za.from(s,e,n);await lh(t,(()=>t.remoteSyncer.applySuccessfulWrite(r))),await dh(t)}async function bh(t,e){e&&Ih(t).Vr&&await async function(t,e){if(lo(n=e.code)&&n!==Hs.ABORTED){const n=t.jr.shift();Ih(t).dr(),await lh(t,(()=>t.remoteSyncer.rejectFailedWrite(n.batchId,e))),await dh(t)}var n}(t,e),mh(t)&&ph(t)}async function Th(t,e){const n=Gs(t);e?(n.Wr.delete(2),await Xu(n)):e||(n.Wr.add(2),await Ju(n),n.Hr.set("Unknown"))}function Eh(t){return t.Yr||(t.Yr=function(t,e,n){const s=Gs(t);return s.$r(),new Hu(e,s.sr,s.credentials,s.N,n)}(t.datastore,t.asyncQueue,{Si:ah.bind(null,t),Ci:ch.bind(null,t),Rr:uh.bind(null,t)}),t.Gr.push((async e=>{e?(t.Yr.dr(),rh(t)?sh(t):t.Hr.set("Unknown")):(await t.Yr.stop(),oh(t))}))),t.Yr}function Ih(t){return t.Xr||(t.Xr=function(t,e,n){const s=Gs(t);return s.$r(),new zu(e,s.sr,s.credentials,s.N,n)}(t.datastore,t.asyncQueue,{Si:yh.bind(null,t),Ci:bh.bind(null,t),Cr:wh.bind(null,t),Dr:vh.bind(null,t)}),t.Gr.push((async e=>{e?(t.Xr.dr(),await dh(t)):(await t.Xr.stop(),t.jr.length>0&&(Vs("RemoteStore",`Stopping write stream with ${t.jr.length} pending writes`),t.jr=[]))}))),t.Xr +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class Sh{constructor(t,e,n,s,r){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=s,this.removalCallback=r,this.deferred=new Qs,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((t=>{}))}static createAndSchedule(t,e,n,s,r){const i=Date.now()+n,o=new Sh(t,e,i,s,r);return o.start(n),o}start(t){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new zs(Hs.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((t=>this.deferred.resolve(t)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function _h(t,e){if(Us("AsyncQueue",`${e}: ${t}`),Ga(t))return new zs(Hs.UNAVAILABLE,`${e}: ${t}`);throw t} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Nh{constructor(t){this.comparator=t?(e,n)=>t(e,n)||xr.comparator(e.key,n.key):(t,e)=>xr.comparator(t.key,e.key),this.keyedMap=Eo(),this.sortedSet=new go(this.comparator)}static emptySet(t){return new Nh(t.comparator)}has(t){return null!=this.keyedMap.get(t)}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal(((e,n)=>(t(e),!1)))}add(t){const e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))}delete(t){const e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this}isEqual(t){if(!(t instanceof Nh))return!1;if(this.size!==t.size)return!1;const e=this.sortedSet.getIterator(),n=t.sortedSet.getIterator();for(;e.hasNext();){const t=e.getNext().key,s=n.getNext().key;if(!t.isEqual(s))return!1}return!0}toString(){const t=[];return this.forEach((e=>{t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"}copy(t,e){const n=new Nh;return n.comparator=this.comparator,n.keyedMap=t,n.sortedSet=e,n}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ah{constructor(){this.Zr=new go(xr.comparator)}track(t){const e=t.doc.key,n=this.Zr.get(e);n?0!==t.type&&3===n.type?this.Zr=this.Zr.insert(e,t):3===t.type&&1!==n.type?this.Zr=this.Zr.insert(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.Zr=this.Zr.insert(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.Zr=this.Zr.insert(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.Zr=this.Zr.remove(e):1===t.type&&2===n.type?this.Zr=this.Zr.insert(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.Zr=this.Zr.insert(e,{type:2,doc:t.doc}):js():this.Zr=this.Zr.insert(e,t)}eo(){const t=[];return this.Zr.inorderTraversal(((e,n)=>{t.push(n)})),t}}class Dh{constructor(t,e,n,s,r,i,o,a){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=s,this.mutatedKeys=r,this.fromCache=i,this.syncStateChanged=o,this.excludesMetadataChanges=a}static fromInitialDocuments(t,e,n,s){const r=[];return e.forEach((t=>{r.push({type:0,doc:t})})),new Dh(t,e,Nh.emptySet(e),r,n,s,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&Si(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(let t=0;t_i(t)),Si),this.onlineState="Unknown",this.so=new Set}}async function kh(t,e){const n=Gs(t),s=e.query;let r=!1,i=n.queries.get(s);if(i||(r=!0,i=new xh),r)try{i.no=await n.onListen(s)}catch(t){const n=_h(t,`Initialization of query '${Ni(e.query)}' failed`);return void e.onError(n)}n.queries.set(s,i),i.listeners.push(e),e.io(n.onlineState),i.no&&e.ro(i.no)&&Mh(n)}async function Rh(t,e){const n=Gs(t),s=e.query;let r=!1;const i=n.queries.get(s);if(i){const t=i.listeners.indexOf(e);t>=0&&(i.listeners.splice(t,1),r=0===i.listeners.length)}if(r)return n.queries.delete(s),n.onUnlisten(s)}function Lh(t,e){const n=Gs(t);let s=!1;for(const t of e){const e=t.query,r=n.queries.get(e);if(r){for(const e of r.listeners)e.ro(t)&&(s=!0);r.no=t}}s&&Mh(n)}function Oh(t,e,n){const s=Gs(t),r=s.queries.get(e);if(r)for(const t of r.listeners)t.onError(n);s.queries.delete(e)}function Mh(t){t.so.forEach((t=>{t.next()}))}class Fh{constructor(t,e,n){this.query=t,this.oo=e,this.co=!1,this.ao=null,this.onlineState="Unknown",this.options=n||{}}ro(t){if(!this.options.includeMetadataChanges){const e=[];for(const n of t.docChanges)3!==n.type&&e.push(n);t=new Dh(t.query,t.docs,t.oldDocs,e,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0)}let e=!1;return this.co?this.uo(t)&&(this.oo.next(t),e=!0):this.ho(t,this.onlineState)&&(this.lo(t),e=!0),this.ao=t,e}onError(t){this.oo.error(t)}io(t){this.onlineState=t;let e=!1;return this.ao&&!this.co&&this.ho(this.ao,t)&&(this.lo(this.ao),e=!0),e}ho(t,e){if(!t.fromCache)return!0;const n="Offline"!==e;return!(this.options.fo&&n||t.docs.isEmpty()&&"Offline"!==e)}uo(t){if(t.docChanges.length>0)return!0;const e=this.ao&&this.ao.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges}lo(t){t=Dh.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache),this.co=!0,this.oo.next(t)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Ph{constructor(t,e){this.payload=t,this.byteLength=e}wo(){return"metadata"in this.payload}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Vh{constructor(t){this.N=t}zn(t){return Qo(this.N,t)}Hn(t){return t.metadata.exists?ta(this.N,t.document,!1):Hr.newNoDocument(this.zn(t.metadata.name),this.Jn(t.metadata.readTime))}Jn(t){return $o(t)}}class Uh{constructor(t,e,n){this._o=t,this.localStore=e,this.N=n,this.queries=[],this.documents=[],this.progress=qh(t)}mo(t){this.progress.bytesLoaded+=t.byteLength;let e=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++e):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++e),e!==this.progress.documentsLoaded?(this.progress.documentsLoaded=e,Object.assign({},this.progress)):null}yo(t){const e=new Map,n=new Vh(this.N);for(const s of t)if(s.metadata.queries){const t=n.zn(s.metadata.name);for(const n of s.metadata.queries){const s=(e.get(n)||No()).add(t);e.set(n,s)}}return e}async complete(){const t=await async function(t,e,n,s){const r=Gs(t);let i=No(),o=bo(),a=So();for(const t of n){const n=e.zn(t.metadata.name);t.document&&(i=i.add(n)),o=o.insert(n,e.Hn(t)),a=a.insert(n,e.Jn(t.metadata.readTime))}const c=r.jn.newChangeBuffer({trackRemovals:!0}),u=await hu(r,function(t){return Ei(mi(fr.fromString(`__bundle__/docs/${t}`)))}(s));return r.persistence.runTransaction("Apply bundle documents","readwrite",(t=>cu(t,c,o,cr.min(),a).next((e=>(c.apply(t),e))).next((e=>r.ze.removeMatchingKeysForTargetId(t,u.targetId).next((()=>r.ze.addMatchingKeys(t,i,u.targetId))).next((()=>r.Qn.vn(t,e))).next((()=>e))))))}(this.localStore,new Vh(this.N),this.documents,this._o.id),e=this.yo(this.documents);for(const t of this.queries)await mu(this.localStore,t,e.get(t.name));return this.progress.taskState="Success",new tu(Object.assign({},this.progress),t)}}function qh(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Bh{constructor(t){this.key=t}}class jh{constructor(t){this.key=t}}class Kh{constructor(t,e){this.query=t,this.po=e,this.To=null,this.current=!1,this.Eo=No(),this.mutatedKeys=No(),this.Io=Di(t),this.Ao=new Nh(this.Io)}get Ro(){return this.po}bo(t,e){const n=e?e.Po:new Ah,s=e?e.Ao:this.Ao;let r=e?e.mutatedKeys:this.mutatedKeys,i=s,o=!1;const a=pi(this.query)&&s.size===this.query.limit?s.last():null,c=yi(this.query)&&s.size===this.query.limit?s.first():null;if(t.inorderTraversal(((t,e)=>{const u=s.get(t),h=Ai(this.query,e)?e:null,l=!!u&&this.mutatedKeys.has(u.key),d=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations);let f=!1;u&&h?u.data.isEqual(h.data)?l!==d&&(n.track({type:3,doc:h}),f=!0):this.vo(u,h)||(n.track({type:2,doc:h}),f=!0,(a&&this.Io(h,a)>0||c&&this.Io(h,c)<0)&&(o=!0)):!u&&h?(n.track({type:0,doc:h}),f=!0):u&&!h&&(n.track({type:1,doc:u}),f=!0,(a||c)&&(o=!0)),f&&(h?(i=i.add(h),r=d?r.add(t):r.delete(t)):(i=i.delete(t),r=r.delete(t)))})),pi(this.query)||yi(this.query))for(;i.size>this.query.limit;){const t=pi(this.query)?i.last():i.first();i=i.delete(t.key),r=r.delete(t.key),n.track({type:1,doc:t})}return{Ao:i,Po:n,Ln:o,mutatedKeys:r}}vo(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations}applyChanges(t,e,n){const s=this.Ao;this.Ao=t.Ao,this.mutatedKeys=t.mutatedKeys;const r=t.Po.eo();r.sort(((t,e)=>function(t,e){const n=t=>{switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return js()}};return n(t)-n(e)}(t.type,e.type)||this.Io(t.doc,e.doc))),this.Vo(n);const i=e?this.So():[],o=0===this.Eo.size&&this.current?1:0,a=o!==this.To;return this.To=o,0!==r.length||a?{snapshot:new Dh(this.query,t.Ao,s,r,t.mutatedKeys,0===o,a,!1),Do:i}:{Do:i}}io(t){return this.current&&"Offline"===t?(this.current=!1,this.applyChanges({Ao:this.Ao,Po:new Ah,mutatedKeys:this.mutatedKeys,Ln:!1},!1)):{Do:[]}}Co(t){return!this.po.has(t)&&!!this.Ao.has(t)&&!this.Ao.get(t).hasLocalMutations}Vo(t){t&&(t.addedDocuments.forEach((t=>this.po=this.po.add(t))),t.modifiedDocuments.forEach((t=>{})),t.removedDocuments.forEach((t=>this.po=this.po.delete(t))),this.current=t.current)}So(){if(!this.current)return[];const t=this.Eo;this.Eo=No(),this.Ao.forEach((t=>{this.Co(t.key)&&(this.Eo=this.Eo.add(t.key))}));const e=[];return t.forEach((t=>{this.Eo.has(t)||e.push(new jh(t))})),this.Eo.forEach((n=>{t.has(n)||e.push(new Bh(n))})),e}No(t){this.po=t.Gn,this.Eo=No();const e=this.bo(t.documents);return this.applyChanges(e,!0)}xo(){return Dh.fromInitialDocuments(this.query,this.Ao,this.mutatedKeys,0===this.To)}}class $h{constructor(t,e,n){this.query=t,this.targetId=e,this.view=n}}class Gh{constructor(t){this.key=t,this.ko=!1}}class Hh{constructor(t,e,n,s,r,i){this.localStore=t,this.remoteStore=e,this.eventManager=n,this.sharedClientState=s,this.currentUser=r,this.maxConcurrentLimboResolutions=i,this.$o={},this.Oo=new qc((t=>_i(t)),Si),this.Fo=new Map,this.Mo=new Set,this.Lo=new go(xr.comparator),this.Bo=new Map,this.Uo=new yu,this.qo={},this.Ko=new Map,this.jo=Dc.ie(),this.onlineState="Unknown",this.Qo=void 0}get isPrimaryClient(){return!0===this.Qo}}async function zh(t,e){const n=vl(t);let s,r;const i=n.Oo.get(e);if(i)s=i.targetId,n.sharedClientState.addLocalQueryTarget(s),r=i.view.xo();else{const t=await hu(n.localStore,Ei(e)),i=n.sharedClientState.addLocalQueryTarget(t.targetId);s=t.targetId,r=await Qh(n,e,s,"current"===i),n.isPrimaryClient&&Zu(n.remoteStore,t)}return r}async function Qh(t,e,n,s){t.Wo=(e,n,s)=>async function(t,e,n,s){let r=e.view.bo(n);r.Ln&&(r=await du(t.localStore,e.query,!1).then((({documents:t})=>e.view.bo(t,r))));const i=s&&s.targetChanges.get(e.targetId),o=e.view.applyChanges(r,t.isPrimaryClient,i);return il(t,e.targetId,o.Do),o.snapshot}(t,e,n,s);const r=await du(t.localStore,e,!0),i=new Kh(e,r.Gn),o=i.bo(r.documents),a=Co.createSynthesizedTargetChangeForCurrentChange(n,s&&"Offline"!==t.onlineState),c=i.applyChanges(o,t.isPrimaryClient,a);il(t,n,c.Do);const u=new $h(e,n,i);return t.Oo.set(e,u),t.Fo.has(n)?t.Fo.get(n).push(e):t.Fo.set(n,[e]),c.snapshot}async function Wh(t,e){const n=Gs(t),s=n.Oo.get(e),r=n.Fo.get(s.targetId);if(r.length>1)return n.Fo.set(s.targetId,r.filter((t=>!Si(t,e)))),void n.Oo.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(s.targetId),n.sharedClientState.isActiveQueryTarget(s.targetId)||await lu(n.localStore,s.targetId,!1).then((()=>{n.sharedClientState.clearQueryState(s.targetId),th(n.remoteStore,s.targetId),sl(n,s.targetId)})).catch(Lc)):(sl(n,s.targetId),await lu(n.localStore,s.targetId,!0))}async function Yh(t,e){const n=Gs(t);try{const t=await function(t,e){const n=Gs(t),s=e.snapshotVersion;let r=n.Un;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(t=>{const i=n.jn.newChangeBuffer({trackRemovals:!0});r=n.Un;const o=[];e.targetChanges.forEach(((e,i)=>{const a=r.get(i);if(!a)return;o.push(n.ze.removeMatchingKeys(t,e.removedDocuments,i).next((()=>n.ze.addMatchingKeys(t,e.addedDocuments,i))));const c=e.resumeToken;if(c.approximateByteSize()>0){const u=a.withResumeToken(c,s).withSequenceNumber(t.currentSequenceNumber);r=r.insert(i,u),function(t,e,n){return Ks(e.resumeToken.approximateByteSize()>0),0===t.resumeToken.approximateByteSize()||e.snapshotVersion.toMicroseconds()-t.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(a,u,e)&&o.push(n.ze.updateTargetData(t,u))}}));let a=bo();if(e.documentUpdates.forEach(((s,r)=>{e.resolvedLimboDocuments.has(s)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(t,s))})),o.push(cu(t,i,e.documentUpdates,s,void 0).next((t=>{a=t}))),!s.isEqual(cr.min())){const e=n.ze.getLastRemoteSnapshotVersion(t).next((e=>n.ze.setTargetsMetadata(t,t.currentSequenceNumber,s)));o.push(e)}return qa.waitFor(o).next((()=>i.apply(t))).next((()=>n.Qn.vn(t,a))).next((()=>a))})).then((t=>(n.Un=r,t)))}(n.localStore,e);e.targetChanges.forEach(((t,e)=>{const s=n.Bo.get(e);s&&(Ks(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1),t.addedDocuments.size>0?s.ko=!0:t.modifiedDocuments.size>0?Ks(s.ko):t.removedDocuments.size>0&&(Ks(s.ko),s.ko=!1))})),await cl(n,t,e)}catch(t){await Lc(t)}}function Xh(t,e,n){const s=Gs(t);if(s.isPrimaryClient&&0===n||!s.isPrimaryClient&&1===n){const t=[];s.Oo.forEach(((n,s)=>{const r=s.view.io(e);r.snapshot&&t.push(r.snapshot)})),function(t,e){const n=Gs(t);n.onlineState=e;let s=!1;n.queries.forEach(((t,n)=>{for(const t of n.listeners)t.io(e)&&(s=!0)})),s&&Mh(n)}(s.eventManager,e),t.length&&s.$o.Rr(t),s.onlineState=e,s.isPrimaryClient&&s.sharedClientState.setOnlineState(e)}}async function Jh(t,e,n){const s=Gs(t);s.sharedClientState.updateQueryState(e,"rejected",n);const r=s.Bo.get(e),i=r&&r.key;if(i){let t=new go(xr.comparator);t=t.insert(i,Hr.newNoDocument(i,cr.min()));const n=No().add(i),r=new xo(cr.min(),new Map,new yo(rr),t,n);await Yh(s,r),s.Lo=s.Lo.remove(i),s.Bo.delete(e),al(s)}else await lu(s.localStore,e,!1).then((()=>sl(s,e,n))).catch(Lc)}async function Zh(t,e){const n=Gs(t),s=e.batch.batchId;try{const t=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(t=>{const s=e.batch.keys(),r=n.jn.newChangeBuffer({trackRemovals:!0});return function(t,e,n,s){const r=n.batch,i=r.keys();let o=qa.resolve();return i.forEach((t=>{o=o.next((()=>s.getEntry(e,t))).next((e=>{const i=n.docVersions.get(t);Ks(null!==i),e.version.compareTo(i)<0&&(r.applyToRemoteDocument(e,n),e.isValidDocument()&&s.addEntry(e,n.commitVersion))}))})),o.next((()=>t.In.removeMutationBatch(e,r)))}(n,t,e,r).next((()=>r.apply(t))).next((()=>n.In.performConsistencyCheck(t))).next((()=>n.Qn.Pn(t,s)))}))}(n.localStore,e);nl(n,s,null),el(n,s),n.sharedClientState.updateMutationState(s,"acknowledged"),await cl(n,t)}catch(t){await Lc(t)}}async function tl(t,e,n){const s=Gs(t);try{const t=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(t=>{let s;return n.In.lookupMutationBatch(t,e).next((e=>(Ks(null!==e),s=e.keys(),n.In.removeMutationBatch(t,e)))).next((()=>n.In.performConsistencyCheck(t))).next((()=>n.Qn.Pn(t,s)))}))}(s.localStore,e);nl(s,e,n),el(s,e),s.sharedClientState.updateMutationState(e,"rejected",n),await cl(s,t)}catch(t){await Lc(t)}}function el(t,e){(t.Ko.get(e)||[]).forEach((t=>{t.resolve()})),t.Ko.delete(e)}function nl(t,e,n){const s=Gs(t);let r=s.qo[s.currentUser.toKey()];if(r){const t=r.get(e);t&&(n?t.reject(n):t.resolve(),r=r.remove(e)),s.qo[s.currentUser.toKey()]=r}}function sl(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const s of t.Fo.get(e))t.Oo.delete(s),n&&t.$o.Go(s,n);t.Fo.delete(e),t.isPrimaryClient&&t.Uo.cs(e).forEach((e=>{t.Uo.containsKey(e)||rl(t,e)}))}function rl(t,e){t.Mo.delete(e.path.canonicalString());const n=t.Lo.get(e);null!==n&&(th(t.remoteStore,n),t.Lo=t.Lo.remove(e),t.Bo.delete(n),al(t))}function il(t,e,n){for(const s of n)s instanceof Bh?(t.Uo.addReference(s.key,e),ol(t,s)):s instanceof jh?(Vs("SyncEngine","Document no longer in limbo: "+s.key),t.Uo.removeReference(s.key,e),t.Uo.containsKey(s.key)||rl(t,s.key)):js()}function ol(t,e){const n=e.key,s=n.path.canonicalString();t.Lo.get(n)||t.Mo.has(s)||(Vs("SyncEngine","New document in limbo: "+n),t.Mo.add(s),al(t))}function al(t){for(;t.Mo.size>0&&t.Lo.size{o.push(s.Wo(a,e,n).then((t=>{if(t){s.isPrimaryClient&&s.sharedClientState.updateQueryState(a.targetId,t.fromCache?"not-current":"current"),r.push(t);const e=nu.kn(a.targetId,t);i.push(e)}})))})),await Promise.all(o),s.$o.Rr(r),await async function(t,e){const n=Gs(t);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(t=>qa.forEach(e,(e=>qa.forEach(e.Nn,(s=>n.persistence.referenceDelegate.addReference(t,e.targetId,s))).next((()=>qa.forEach(e.xn,(s=>n.persistence.referenceDelegate.removeReference(t,e.targetId,s)))))))))}catch(t){if(!Ga(t))throw t;Vs("LocalStore","Failed to update sequence numbers: "+t)}for(const t of e){const e=t.targetId;if(!t.fromCache){const t=n.Un.get(e),s=t.snapshotVersion,r=t.withLastLimboFreeSnapshotVersion(s);n.Un=n.Un.insert(e,r)}}}(s.localStore,i))}async function ul(t,e){const n=Gs(t);if(!n.currentUser.isEqual(e)){Vs("SyncEngine","User change. New user:",e.toKey());const t=await ou(n.localStore,e);n.currentUser=e,function(t,e){t.Ko.forEach((t=>{t.forEach((t=>{t.reject(new zs(Hs.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.Ko.clear()}(n),n.sharedClientState.handleUserChange(e,t.removedBatchIds,t.addedBatchIds),await cl(n,t.Wn)}}function hl(t,e){const n=Gs(t),s=n.Bo.get(e);if(s&&s.ko)return No().add(s.key);{let t=No();const s=n.Fo.get(e);if(!s)return t;for(const e of s){const s=n.Oo.get(e);t=t.unionWith(s.view.Ro)}return t}}async function ll(t,e){const n=Gs(t),s=await du(n.localStore,e.query,!0),r=e.view.No(s);return n.isPrimaryClient&&il(n,e.targetId,r.Do),r}async function dl(t){const e=Gs(t);return gu(e.localStore).then((t=>cl(e,t)))}async function fl(t,e,n,s){const r=Gs(t),i=await function(t,e){const n=Gs(t),s=Gs(n.In);return n.persistence.runTransaction("Lookup mutation documents","readonly",(t=>s.Xt(t,e).next((e=>e?n.Qn.Pn(t,e):qa.resolve(null)))))}(r.localStore,e);null!==i?("pending"===n?await dh(r.remoteStore):"acknowledged"===n||"rejected"===n?(nl(r,e,s||null),el(r,e),function(t,e){Gs(Gs(t).In).te(e)}(r.localStore,e)):js(),await cl(r,i)):Vs("SyncEngine","Cannot apply mutation batch with id: "+e)}async function gl(t,e,n){const s=Gs(t),r=[],i=[];for(const t of e){let e;const n=s.Fo.get(t);if(n&&0!==n.length){e=await hu(s.localStore,Ei(n[0]));for(const t of n){const e=s.Oo.get(t),n=await ll(s,e);n.snapshot&&i.push(n.snapshot)}}else{const n=await fu(s.localStore,t);e=await hu(s.localStore,n),await Qh(s,ml(n),t,!1)}r.push(e)}return s.$o.Rr(i),r}function ml(t){return gi(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function pl(t){const e=Gs(t);return Gs(Gs(e.localStore).persistence).pn()}async function yl(t,e,n,s){const r=Gs(t);if(r.Qo)Vs("SyncEngine","Ignoring unexpected query state notification.");else if(r.Fo.has(e))switch(n){case"current":case"not-current":{const t=await gu(r.localStore),s=xo.createSynthesizedRemoteEventForCurrentChange(e,"current"===n);await cl(r,t,s);break}case"rejected":await lu(r.localStore,e,!0),sl(r,e,s);break;default:js()}}async function wl(t,e,n){const s=vl(t);if(s.Qo){for(const t of e){if(s.Fo.has(t)){Vs("SyncEngine","Adding an already active target "+t);continue}const e=await fu(s.localStore,t),n=await hu(s.localStore,e);await Qh(s,ml(e),n.targetId,!1),Zu(s.remoteStore,n)}for(const t of n)s.Fo.has(t)&&await lu(s.localStore,t,!1).then((()=>{th(s.remoteStore,t),sl(s,t)})).catch(Lc)}}function vl(t){const e=Gs(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=Yh.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=hl.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=Jh.bind(null,e),e.$o.Rr=Lh.bind(null,e.eventManager),e.$o.Go=Oh.bind(null,e.eventManager),e}function bl(t){const e=Gs(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=Zh.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=tl.bind(null,e),e}class Tl{constructor(){this.synchronizeTabs=!1}async initialize(t){this.N=Ku(t.databaseInfo.databaseId),this.sharedClientState=this.Ho(t),this.persistence=this.Jo(t),await this.persistence.start(),this.gcScheduler=this.Yo(t),this.localStore=this.Xo(t)}Yo(t){return null}Xo(t){return iu(this.persistence,new su,t.initialUser,this.N)}Jo(t){return new Iu(_u.Ns,this.N)}Ho(t){return new Mu}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class El extends Tl{constructor(t,e,n){super(),this.Zo=t,this.cacheSizeBytes=e,this.forceOwnership=n,this.synchronizeTabs=!1}async initialize(t){await super.initialize(t),await async function(t){const e=Gs(t);return e.persistence.runTransaction("Synchronize last document change read time","readonly",(t=>function(t){const e=Gc(t);let n=cr.min();return e.Kt({index:Da.readTimeIndex,reverse:!0},((t,e,s)=>{e.readTime&&(n=ic(e.readTime)),s.done()})).next((()=>n))}(t))).then((t=>{e.Kn=t}))}(this.localStore),await this.Zo.initialize(this,t),await bl(this.Zo.syncEngine),await dh(this.Zo.remoteStore),await this.persistence.nn((()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(this.localStore),Promise.resolve())))}Xo(t){return iu(this.persistence,new su,t.initialUser,this.N)}Yo(t){const e=this.persistence.referenceDelegate.garbageCollector;return new Fc(e,t.asyncQueue)}Jo(t){const e=Zc(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?bc.withCacheSize(this.cacheSizeBytes):bc.DEFAULT;return new Yc(this.synchronizeTabs,e,t.clientId,n,t.asyncQueue,Bu(),ju(),this.N,this.sharedClientState,!!this.forceOwnership)}Ho(t){return new Mu}}class Il extends El{constructor(t,e){super(t,e,!1),this.Zo=t,this.cacheSizeBytes=e,this.synchronizeTabs=!0}async initialize(t){await super.initialize(t);const e=this.Zo.syncEngine;this.sharedClientState instanceof Ou&&(this.sharedClientState.syncEngine={_i:fl.bind(null,e),mi:yl.bind(null,e),gi:wl.bind(null,e),pn:pl.bind(null,e),wi:dl.bind(null,e)},await this.sharedClientState.start()),await this.persistence.nn((async t=>{await async function(t,e){const n=Gs(t);if(vl(n),bl(n),!0===e&&!0!==n.Qo){const t=n.sharedClientState.getAllActiveQueryTargets(),e=await gl(n,t.toArray());n.Qo=!0,await Th(n.remoteStore,!0);for(const t of e)Zu(n.remoteStore,t)}else if(!1===e&&!1!==n.Qo){const t=[];let e=Promise.resolve();n.Fo.forEach(((s,r)=>{n.sharedClientState.isLocalQueryTarget(r)?t.push(r):e=e.then((()=>(sl(n,r),lu(n.localStore,r,!0)))),th(n.remoteStore,r)})),await e,await gl(n,t),function(t){const e=Gs(t);e.Bo.forEach(((t,n)=>{th(e.remoteStore,n)})),e.Uo.us(),e.Bo=new Map,e.Lo=new go(xr.comparator)}(n),n.Qo=!1,await Th(n.remoteStore,!1)}}(this.Zo.syncEngine,t),this.gcScheduler&&(t&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):t||this.gcScheduler.stop())}))}Ho(t){const e=Bu();if(!Ou.bt(e))throw new zs(Hs.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const n=Zc(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey);return new Ou(e,t.asyncQueue,n,t.clientId,t.initialUser)}}class Sl{async initialize(t,e){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=t=>Xh(this.syncEngine,t,1),this.remoteStore.remoteSyncer.handleCredentialChange=ul.bind(null,this.syncEngine),await Th(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(t){return new Ch}createDatastore(t){const e=Ku(t.databaseInfo.databaseId),n=(s=t.databaseInfo,new qu(s));var s;return function(t,e,n){return new Qu(t,e,n)}(t.credentials,n,e)}createRemoteStore(t){var e,n,s,r,i;return e=this.localStore,n=this.datastore,s=t.asyncQueue,r=t=>Xh(this.syncEngine,t,0),i=Pu.bt()?new Pu:new Fu,new Yu(e,n,s,r,i)}createSyncEngine(t,e){return function(t,e,n,s,r,i,o){const a=new Hh(t,e,n,s,r,i);return o&&(a.Qo=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,e)}terminate(){return async function(t){const e=Gs(t);Vs("RemoteStore","RemoteStore shutting down."),e.Wr.add(5),await Ju(e),e.zr.shutdown(),e.Hr.set("Unknown")}(this.remoteStore)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function _l(t,e=10240){let n=0;return{async read(){if(n{this.muted||t(e)}),0)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Al{constructor(t,e){this.nc=t,this.N=e,this.metadata=new Qs,this.buffer=new Uint8Array,this.sc=new TextDecoder("utf-8"),this.ic().then((t=>{t&&t.wo()?this.metadata.resolve(t.payload.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(null==t?void 0:t.payload)}`))}),(t=>this.metadata.reject(t)))}close(){return this.nc.cancel()}async getMetadata(){return this.metadata.promise}async zo(){return await this.getMetadata(),this.ic()}async ic(){const t=await this.rc();if(null===t)return null;const e=this.sc.decode(t),n=Number(e);isNaN(n)&&this.oc(`length string (${e}) is not valid number`);const s=await this.cc(n);return new Ph(JSON.parse(s),t.length+n)}ac(){return this.buffer.findIndex((t=>t==="{".charCodeAt(0)))}async rc(){for(;this.ac()<0&&!await this.uc(););if(0===this.buffer.length)return null;const t=this.ac();t<0&&this.oc("Reached the end of bundle when a length string is expected.");const e=this.buffer.slice(0,t);return this.buffer=this.buffer.slice(t),e}async cc(t){for(;this.buffer.length0)throw new zs(Hs.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");const e=await async function(t,e){const n=Gs(t),s=Xo(n.N)+"/documents",r={documents:e.map((t=>zo(n.N,t)))},i=await n.Ki("BatchGetDocuments",s,r),o=new Map;i.forEach((t=>{const e=function(t,e){return"found"in e?function(t,e){Ks(!!e.found),e.found.name,e.found.updateTime;const n=Qo(t,e.found.name),s=$o(e.found.updateTime),r=new $r({mapValue:{fields:e.found.fields}});return Hr.newFoundDocument(n,s,r)}(t,e):"missing"in e?function(t,e){Ks(!!e.missing),Ks(!!e.readTime);const n=Qo(t,e.missing),s=$o(e.readTime);return Hr.newNoDocument(n,s)}(t,e):js()}(n.N,t);o.set(e.key.toString(),e)}));const a=[];return e.forEach((t=>{const e=o.get(t.toString());Ks(!!e),a.push(e)})),a}(this.datastore,t);return e.forEach((t=>this.recordVersion(t))),e}set(t,e){this.write(e.toMutation(t,this.precondition(t))),this.writtenDocs.add(t.toString())}update(t,e){try{this.write(e.toMutation(t,this.preconditionForUpdate(t)))}catch(t){this.lastWriteError=t}this.writtenDocs.add(t.toString())}delete(t){this.write(new oo(t,this.precondition(t))),this.writtenDocs.add(t.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;const t=this.readVersions;this.mutations.forEach((e=>{t.delete(e.key.toString())})),t.forEach(((t,e)=>{const n=xr.fromPath(e);this.mutations.push(new ao(n,this.precondition(n)))})),await async function(t,e){const n=Gs(t),s=Xo(n.N)+"/documents",r={writes:e.map((t=>ea(n.N,t)))};await n.Li("Commit",s,r)}(this.datastore,this.mutations),this.committed=!0}recordVersion(t){let e;if(t.isFoundDocument())e=t.version;else{if(!t.isNoDocument())throw js();e=cr.min()}const n=this.readVersions.get(t.key.toString());if(n){if(!e.isEqual(n))throw new zs(Hs.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(t.key.toString(),e)}precondition(t){const e=this.readVersions.get(t.toString());return!this.writtenDocs.has(t.toString())&&e?zi.updateTime(e):zi.none()}preconditionForUpdate(t){const e=this.readVersions.get(t.toString());if(!this.writtenDocs.has(t.toString())&&e){if(e.isEqual(cr.min()))throw new zs(Hs.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return zi.updateTime(e)}return zi.exists(!0)}write(t){this.ensureCommitNotCalled(),this.mutations.push(t)}ensureCommitNotCalled(){}} +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class xl{constructor(t,e,n,s){this.asyncQueue=t,this.datastore=e,this.updateFunction=n,this.deferred=s,this.hc=5,this.ar=new $u(this.asyncQueue,"transaction_retry")}run(){this.hc-=1,this.lc()}lc(){this.ar.Xi((async()=>{const t=new Dl(this.datastore),e=this.fc(t);e&&e.then((e=>{this.asyncQueue.enqueueAndForget((()=>t.commit().then((()=>{this.deferred.resolve(e)})).catch((t=>{this.dc(t)}))))})).catch((t=>{this.dc(t)}))}))}fc(t){try{const e=this.updateFunction(t);return!Nr(e)&&e.catch&&e.then?e:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.deferred.reject(t),null}}dc(t){this.hc>0&&this.wc(t)?(this.hc-=1,this.asyncQueue.enqueueAndForget((()=>(this.lc(),Promise.resolve())))):this.deferred.reject(t)}wc(t){if("FirebaseError"===t.name){const e=t.code;return"aborted"===e||"failed-precondition"===e||!lo(e)}return!1}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cl{constructor(t,e,n){this.credentials=t,this.asyncQueue=e,this.databaseInfo=n,this.user=Ls.UNAUTHENTICATED,this.clientId=sr.I(),this.credentialListener=()=>Promise.resolve(),this.credentials.start(e,(async t=>{Vs("FirestoreClient","Received user=",t.uid),await this.credentialListener(t),this.user=t}))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.credentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new zs(Hs.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const t=new Qs;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.credentials.shutdown(),t.resolve()}catch(e){const n=_h(e,"Failed to shutdown persistence");t.reject(n)}})),t.promise}}async function kl(t,e){t.asyncQueue.verifyOperationInProgress(),Vs("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let s=n.initialUser;t.setCredentialChangeListener((async t=>{s.isEqual(t)||(await ou(e.localStore,t),s=t)})),e.persistence.setDatabaseDeletedListener((()=>t.terminate())),t.offlineComponents=e}async function Rl(t,e){t.asyncQueue.verifyOperationInProgress();const n=await Ll(t);Vs("FirestoreClient","Initializing OnlineComponentProvider");const s=await t.getConfiguration();await e.initialize(n,s),t.setCredentialChangeListener((t=>async function(t,e){const n=Gs(t);n.asyncQueue.verifyOperationInProgress(),Vs("RemoteStore","RemoteStore received new credentials");const s=ih(n);n.Wr.add(3),await Ju(n),s&&n.Hr.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Wr.delete(3),await Xu(n)}(e.remoteStore,t))),t.onlineComponents=e}async function Ll(t){return t.offlineComponents||(Vs("FirestoreClient","Using default OfflineComponentProvider"),await kl(t,new Tl)),t.offlineComponents}async function Ol(t){return t.onlineComponents||(Vs("FirestoreClient","Using default OnlineComponentProvider"),await Rl(t,new Sl)),t.onlineComponents}function Ml(t){return Ll(t).then((t=>t.persistence))}function Fl(t){return Ll(t).then((t=>t.localStore))}function Pl(t){return Ol(t).then((t=>t.remoteStore))}function Vl(t){return Ol(t).then((t=>t.syncEngine))}async function Ul(t){const e=await Ol(t),n=e.eventManager;return n.onListen=zh.bind(null,e.syncEngine),n.onUnlisten=Wh.bind(null,e.syncEngine),n}function ql(t,e,n={}){const s=new Qs;return t.asyncQueue.enqueueAndForget((async()=>function(t,e,n,s,r){const i=new Nl({next:i=>{e.enqueueAndForget((()=>Rh(t,o)));const a=i.docs.has(n);!a&&i.fromCache?r.reject(new zs(Hs.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&i.fromCache&&s&&"server"===s.source?r.reject(new zs(Hs.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):r.resolve(i)},error:t=>r.reject(t)}),o=new Fh(mi(n.path),i,{includeMetadataChanges:!0,fo:!0});return kh(t,o)}(await Ul(t),t.asyncQueue,e,n,s))),s.promise}function Bl(t,e,n={}){const s=new Qs;return t.asyncQueue.enqueueAndForget((async()=>function(t,e,n,s,r){const i=new Nl({next:n=>{e.enqueueAndForget((()=>Rh(t,o))),n.fromCache&&"server"===s.source?r.reject(new zs(Hs.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):r.resolve(n)},error:t=>r.reject(t)}),o=new Fh(n,i,{includeMetadataChanges:!0,fo:!0});return kh(t,o)}(await Ul(t),t.asyncQueue,e,n,s))),s.promise}function jl(t,e,n,s){const r=function(t,e){let n;return n="string"==typeof t?(new TextEncoder).encode(t):t,function(t,e){return new Al(t,e)}(function(t,e){if(t instanceof Uint8Array)return _l(t,e);if(t instanceof ArrayBuffer)return _l(new Uint8Array(t),e);if(t instanceof ReadableStream)return t.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(n),e)}(n,Ku(e));t.asyncQueue.enqueueAndForget((async()=>{!function(t,e,n){const s=Gs(t);(async function(t,e,n){try{const s=await e.getMetadata();if(await function(t,e){const n=Gs(t),s=$o(e.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(t=>n.Je.getBundleMetadata(t,e.id))).then((t=>!!t&&t.createTime.compareTo(s)>=0))}(t.localStore,s))return await e.close(),void n._completeWith(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(s));n._updateProgress(qh(s));const r=new Uh(s,t.localStore,e.N);let i=await e.zo();for(;i;){const t=await r.mo(i);t&&n._updateProgress(t),i=await e.zo()}const o=await r.complete();await cl(t,o.En,void 0),await function(t,e){const n=Gs(t);return n.persistence.runTransaction("Save bundle","readwrite",(t=>n.Je.saveBundleMetadata(t,e)))}(t.localStore,s),n._completeWith(o.progress)}catch(t){qs("SyncEngine",`Loading bundle failed with ${t}`),n._failWith(t)}})(s,e,n).then((()=>{s.sharedClientState.notifyBundleLoaded()}))}(await Vl(t),r,s)}))}class Kl{constructor(t,e,n,s,r,i,o,a){this.databaseId=t,this.appId=e,this.persistenceKey=n,this.host=s,this.ssl=r,this.forceLongPolling=i,this.autoDetectLongPolling=o,this.useFetchStreams=a}}class $l{constructor(t,e){this.projectId=t,this.database=e||"(default)"}get isDefaultDatabase(){return"(default)"===this.database}isEqual(t){return t instanceof $l&&t.projectId===this.projectId&&t.database===this.database}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Gl=new Map; +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Hl(t,e,n){if(!n)throw new zs(Hs.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function zl(t,e,n,s){if(!0===e&&!0===s)throw new zs(Hs.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function Ql(t){if(!xr.isDocumentKey(t))throw new zs(Hs.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function Wl(t){if(xr.isDocumentKey(t))throw new zs(Hs.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Yl(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";{const e=function(t){return t.constructor?t.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return"function"==typeof t?"a function":js()}function Xl(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new zs(Hs.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Yl(t);throw new zs(Hs.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function Jl(t,e){if(e<=0)throw new zs(Hs.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Zl{constructor(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new zs(Hs.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new zs(Hs.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,zl("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class td{constructor(t,e){this._credentials=e,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Zl({}),this._settingsFrozen=!1,t instanceof $l?this._databaseId=t:(this._app=t,this._databaseId=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new zs(Hs.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new $l(t.options.projectId)}(t))}get app(){if(!this._app)throw new zs(Hs.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(t){if(this._settingsFrozen)throw new zs(Hs.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Zl(t),void 0!==t.credentials&&(this._credentials=function(t){if(!t)return new Ys;switch(t.type){case"gapi":const e=t.client;return Ks(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new tr(e,t.sessionIndex||"0",t.iamToken||null);case"provider":return t.client;default:throw new zs(Hs.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const e=Gl.get(t);e&&(Vs("ComponentProvider","Removing Datastore"),Gl.delete(t),e.terminate())}(this),Promise.resolve()}}function ed(t,e,n,s={}){var r;const i=(t=Xl(t,td))._getSettings();if("firestore.googleapis.com"!==i.host&&i.host!==e&&qs("Host has been set in both settings() and useEmulator(), emulator host will be used"),t._setSettings(Object.assign(Object.assign({},i),{host:`${e}:${n}`,ssl:!1})),s.mockUserToken){let e,n;if("string"==typeof s.mockUserToken)e=s.mockUserToken,n=Ls.MOCK_USER;else{e= +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +function(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=e||"demo-project",s=t.iat||0,r=t.sub||t.user_id;if(!r)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const i=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:s,exp:s+3600,auth_time:s,sub:r,user_id:r,firebase:{sign_in_provider:"custom",identities:{}}},t);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(i)),""].join(".")}(s.mockUserToken,null===(r=t._app)||void 0===r?void 0:r.options.projectId);const i=s.mockUserToken.sub||s.mockUserToken.user_id;if(!i)throw new zs(Hs.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new Ls(i)}t._credentials=new Xs(new Ws(e,n))}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class nd{constructor(t,e,n){this.converter=e,this._key=n,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new rd(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new nd(this.firestore,t,this._key)}}class sd{constructor(t,e,n){this.converter=e,this._query=n,this.type="query",this.firestore=t}withConverter(t){return new sd(this.firestore,t,this._query)}}class rd extends sd{constructor(t,e,n){super(t,e,mi(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new nd(this.firestore,null,new xr(t))}withConverter(t){return new rd(this.firestore,t,this._path)}}function id(t,e,...n){if(t=g(t),Hl("collection","path",e),t instanceof td){const s=fr.fromString(e,...n);return Wl(s),new rd(t,null,s)}{if(!(t instanceof nd||t instanceof rd))throw new zs(Hs.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const s=t._path.child(fr.fromString(e,...n));return Wl(s),new rd(t.firestore,null,s)}}function od(t,e){if(t=Xl(t,td),Hl("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new zs(Hs.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new sd(t,null,function(t){return new fi(fr.emptyPath(),t)}(e))}function ad(t,e,...n){if(t=g(t),1===arguments.length&&(e=sr.I()),Hl("doc","path",e),t instanceof td){const s=fr.fromString(e,...n);return Ql(s),new nd(t,null,new xr(s))}{if(!(t instanceof nd||t instanceof rd))throw new zs(Hs.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const s=t._path.child(fr.fromString(e,...n));return Ql(s),new nd(t.firestore,t instanceof rd?t.converter:null,new xr(s))}}function cd(t,e){return t=g(t),e=g(e),(t instanceof nd||t instanceof rd)&&(e instanceof nd||e instanceof rd)&&t.firestore===e.firestore&&t.path===e.path&&t.converter===e.converter}function ud(t,e){return t=g(t),e=g(e),t instanceof sd&&e instanceof sd&&t.firestore===e.firestore&&Si(t._query,e._query)&&t.converter===e.converter +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */}class hd{constructor(){this._c=Promise.resolve(),this.mc=[],this.gc=!1,this.yc=[],this.Tc=null,this.Ec=!1,this.Ic=!1,this.Ac=[],this.ar=new $u(this,"async_queue_retry"),this.Rc=()=>{const t=ju();t&&Vs("AsyncQueue","Visibility state changed to "+t.visibilityState),this.ar.tr()};const t=ju();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Rc)}get isShuttingDown(){return this.gc}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.bc(),this.Pc(t)}enterRestrictedMode(t){if(!this.gc){this.gc=!0,this.Ic=t||!1;const e=ju();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.Rc)}}enqueue(t){if(this.bc(),this.gc)return new Promise((()=>{}));const e=new Qs;return this.Pc((()=>this.gc&&this.Ic?Promise.resolve():(t().then(e.resolve,e.reject),e.promise))).then((()=>e.promise))}enqueueRetryable(t){this.enqueueAndForget((()=>(this.mc.push(t),this.vc())))}async vc(){if(0!==this.mc.length){try{await this.mc[0](),this.mc.shift(),this.ar.reset()}catch(t){if(!Ga(t))throw t;Vs("AsyncQueue","Operation failed with retryable error: "+t)}this.mc.length>0&&this.ar.Xi((()=>this.vc()))}}Pc(t){const e=this._c.then((()=>(this.Ec=!0,t().catch((t=>{this.Tc=t,this.Ec=!1;const e=function(t){let e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t);throw Us("INTERNAL UNHANDLED ERROR: ",e),t})).then((t=>(this.Ec=!1,t))))));return this._c=e,e}enqueueAfterDelay(t,e,n){this.bc(),this.Ac.indexOf(t)>-1&&(e=0);const s=Sh.createAndSchedule(this,t,e,n,(t=>this.Vc(t)));return this.yc.push(s),s}bc(){this.Tc&&js()}verifyOperationInProgress(){}async Sc(){let t;do{t=this._c,await t}while(t!==this._c)}Dc(t){for(const e of this.yc)if(e.timerId===t)return!0;return!1}Cc(t){return this.Sc().then((()=>{this.yc.sort(((t,e)=>t.targetTimeMs-e.targetTimeMs));for(const e of this.yc)if(e.skipDelay(),"all"!==t&&e.timerId===t)break;return this.Sc()}))}Nc(t){this.Ac.push(t)}Vc(t){const e=this.yc.indexOf(t);this.yc.splice(e,1)}}function ld(t){return function(t,e){if("object"!=typeof t||null===t)return!1;const n=t;for(const t of["next","error","complete"])if(t in n&&"function"==typeof n[t])return!0;return!1}(t)}class dd{constructor(){this._progressObserver={},this._taskCompletionResolver=new Qs,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(t,e,n){this._progressObserver={next:t,error:e,complete:n}}catch(t){return this._taskCompletionResolver.promise.catch(t)}then(t,e){return this._taskCompletionResolver.promise.then(t,e)}_completeWith(t){this._updateProgress(t),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(t)}_failWith(t){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(t),this._taskCompletionResolver.reject(t)}_updateProgress(t){this._lastProgress=t,this._progressObserver.next&&this._progressObserver.next(t)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const fd=-1;class gd extends td{constructor(t,e){super(t,e),this.type="firestore",this._queue=new hd,this._persistenceKey="name"in t?t.name:"[DEFAULT]"}_terminate(){return this._firestoreClient||wd(this),this._firestoreClient.terminate()}}function md(t,e){const n=i._getProvider(t,"firestore");if(n.isInitialized()){const t=n.getImmediate();if(d(n.getOptions(),e))return t;throw new zs(Hs.FAILED_PRECONDITION,"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.")}if(void 0!==e.cacheSizeBytes&&-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new zs(Hs.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return n.initialize({options:e})}function pd(t=i.getApp()){return i._getProvider(t,"firestore").getImmediate()}function yd(t){return t._firestoreClient||wd(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function wd(t){var e;const n=t._freezeSettings(),s=function(t,e,n,s){return new Kl(t,e,n,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,s.useFetchStreams)}(t._databaseId,(null===(e=t._app)||void 0===e?void 0:e.options.appId)||"",t._persistenceKey,n);t._firestoreClient=new Cl(t._credentials,t._queue,s)}function vd(t,e){xd(t=Xl(t,gd));const n=yd(t),s=t._freezeSettings(),r=new Sl;return Td(n,r,new El(r,s.cacheSizeBytes,null==e?void 0:e.forceOwnership))}function bd(t){xd(t=Xl(t,gd));const e=yd(t),n=t._freezeSettings(),s=new Sl;return Td(e,s,new Il(s,n.cacheSizeBytes))}function Td(t,e,n){const s=new Qs;return t.asyncQueue.enqueue((async()=>{try{await kl(t,n),await Rl(t,e),s.resolve()}catch(t){if(!function(t){return"FirebaseError"===t.name?t.code===Hs.FAILED_PRECONDITION||t.code===Hs.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||(22===t.code||20===t.code||11===t.code)}(t))throw t;console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+t),s.reject(t)}})).then((()=>s.promise))}function Ed(t){if(t._initialized&&!t._terminated)throw new zs(Hs.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const e=new Qs;return t._queue.enqueueAndForgetEvenWhileRestricted((async()=>{try{await async function(t){if(!ja.bt())return Promise.resolve();const e=t+"main";await ja.delete(e)}(Zc(t._databaseId,t._persistenceKey)),e.resolve()}catch(t){e.reject(t)}})),e.promise}function Id(t){return function(t){const e=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e){const n=Gs(t);ih(n.remoteStore)||Vs("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const t=await function(t){const e=Gs(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(t=>e.In.getHighestUnacknowledgedBatchId(t)))}(n.localStore);if(-1===t)return void e.resolve();const s=n.Ko.get(t)||[];s.push(e),n.Ko.set(t,s)}catch(t){const n=_h(t,"Initialization of waitForPendingWrites() operation failed");e.reject(n)}}(await Vl(t),e))),e.promise}(yd(t=Xl(t,gd)))}function Sd(t){return function(t){return t.asyncQueue.enqueue((async()=>{const e=await Ml(t),n=await Pl(t);return e.setNetworkEnabled(!0),function(t){const e=Gs(t);return e.Wr.delete(0),Xu(e)}(n)}))}(yd(t=Xl(t,gd)))}function _d(t){return function(t){return t.asyncQueue.enqueue((async()=>{const e=await Ml(t),n=await Pl(t);return e.setNetworkEnabled(!1),async function(t){const e=Gs(t);e.Wr.add(0),await Ju(e),e.Hr.set("Offline")}(n)}))}(yd(t=Xl(t,gd)))}function Nd(t){return i._removeServiceInstance(t.app,"firestore"),t._delete()}function Ad(t,e){const n=yd(t=Xl(t,gd)),s=new dd;return jl(n,t._databaseId,e,s),s}function Dd(t,e){return function(t,e){return t.asyncQueue.enqueue((async()=>function(t,e){const n=Gs(t);return n.persistence.runTransaction("Get named query","readonly",(t=>n.Je.getNamedQuery(t,e)))}(await Fl(t),e)))}(yd(t=Xl(t,gd)),e).then((e=>e?new sd(t,null,e.query):null))}function xd(t){if(t._initialized||t._terminated)throw new zs(Hs.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Cd{constructor(...t){for(let e=0;e90)throw new zs(Hs.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new zs(Hs.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return rr(this._lat,t._lat)||rr(this._long,t._long)}} +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */const Md=/^__.*__$/;class Fd{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return null!==this.fieldMask?new no(t,this.data,this.fieldMask,e,this.fieldTransforms):new eo(t,this.data,e,this.fieldTransforms)}}class Pd{constructor(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}toMutation(t,e){return new no(t,this.data,this.fieldMask,e,this.fieldTransforms)}}function Vd(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw js()}}class Ud{constructor(t,e,n,s,r,i){this.settings=t,this.databaseId=e,this.N=n,this.ignoreUndefinedProperties=s,void 0===r&&this.xc(),this.fieldTransforms=r||[],this.fieldMask=i||[]}get path(){return this.settings.path}get kc(){return this.settings.kc}$c(t){return new Ud(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.N,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Oc(t){var e;const n=null===(e=this.path)||void 0===e?void 0:e.child(t),s=this.$c({path:n,Fc:!1});return s.Mc(t),s}Lc(t){var e;const n=null===(e=this.path)||void 0===e?void 0:e.child(t),s=this.$c({path:n,Fc:!1});return s.xc(),s}Bc(t){return this.$c({path:void 0,Fc:!0})}Uc(t){return of(t,this.settings.methodName,this.settings.qc||!1,this.path,this.settings.Kc)}contains(t){return void 0!==this.fieldMask.find((e=>t.isPrefixOf(e)))||void 0!==this.fieldTransforms.find((e=>t.isPrefixOf(e.field)))}xc(){if(this.path)for(let t=0;tc.covers(t.field)))}else c=null,u=o.fieldTransforms;return new Fd(new $r(a),c,u)}class Kd extends Ld{_toFieldTransform(t){if(2!==t.kc)throw 1===t.kc?t.Uc(`${this._methodName}() can only appear at the top level of your update data`):t.Uc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return t.fieldMask.push(t.path),null}isEqual(t){return t instanceof Kd}}function $d(t,e,n){return new Ud({kc:3,Kc:e.settings.Kc,methodName:t._methodName,Fc:n},e.databaseId,e.N,e.ignoreUndefinedProperties)}class Gd extends Ld{_toFieldTransform(t){return new Gi(t.path,new Pi)}isEqual(t){return t instanceof Gd}}class Hd extends Ld{constructor(t,e){super(t),this.Qc=e}_toFieldTransform(t){const e=$d(this,t,!0),n=this.Qc.map((t=>Jd(t,e))),s=new Vi(n);return new Gi(t.path,s)}isEqual(t){return this===t}}class zd extends Ld{constructor(t,e){super(t),this.Qc=e}_toFieldTransform(t){const e=$d(this,t,!0),n=this.Qc.map((t=>Jd(t,e))),s=new qi(n);return new Gi(t.path,s)}isEqual(t){return this===t}}class Qd extends Ld{constructor(t,e){super(t),this.Wc=e}_toFieldTransform(t){const e=new ji(t.N,Ri(t.N,this.Wc));return new Gi(t.path,e)}isEqual(t){return this===t}}function Wd(t,e,n,s){const r=t.jc(1,e,n);ef("Data must be an object, but it was:",r,s);const i=[],o=$r.empty();hr(s,((t,s)=>{const a=rf(e,t,n);s=g(s);const c=r.Lc(a);if(s instanceof Kd)i.push(a);else{const t=Jd(s,c);null!=t&&(i.push(a),o.set(a,t))}}));const a=new pr(i);return new Pd(o,a,r.fieldTransforms)}function Yd(t,e,n,s,r,i){const o=t.jc(1,e,n),a=[nf(e,s,n)],c=[r];if(i.length%2!=0)throw new zs(Hs.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let t=0;t=0;--t)if(!af(u,a[t])){const e=a[t];let n=c[t];n=g(n);const s=o.Lc(e);if(n instanceof Kd)u.push(e);else{const t=Jd(n,s);null!=t&&(u.push(e),h.set(e,t))}}const l=new pr(u);return new Pd(h,l,o.fieldTransforms)}function Xd(t,e,n,s=!1){return Jd(n,t.jc(s?4:3,e))}function Jd(t,e){if(tf(t=g(t)))return ef("Unsupported field value:",e,t),Zd(t,e);if(t instanceof Ld)return function(t,e){if(!Vd(e.kc))throw e.Uc(`${t._methodName}() can only be used with update() and set()`);if(!e.path)throw e.Uc(`${t._methodName}() is not currently supported inside arrays`);const n=t._toFieldTransform(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.Fc&&4!==e.kc)throw e.Uc("Nested arrays are not supported");return function(t,e){const n=[];let s=0;for(const r of t){let t=Jd(r,e.Bc(s));null==t&&(t={nullValue:"NULL_VALUE"}),n.push(t),s++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(null===(t=g(t)))return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Ri(e.N,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){const n=ar.fromDate(t);return{timestampValue:Bo(e.N,n)}}if(t instanceof ar){const n=new ar(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Bo(e.N,n)}}if(t instanceof Od)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof Rd)return{bytesValue:jo(e.N,t._byteString)};if(t instanceof nd){const n=e.databaseId,s=t.firestore._databaseId;if(!s.isEqual(n))throw e.Uc(`Document reference is for database ${s.projectId}/${s.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:Go(t.firestore._databaseId||e.databaseId,t._key.path)}}throw e.Uc(`Unsupported field value: ${Yl(t)}`)}(t,e)}function Zd(t,e){const n={};return lr(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):hr(t,((t,s)=>{const r=Jd(s,e.Oc(t));null!=r&&(n[t]=r)})),{mapValue:{fields:n}}}function tf(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof ar||t instanceof Od||t instanceof Rd||t instanceof nd||t instanceof Ld)}function ef(t,e,n){if(!tf(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){const s=Yl(n);throw"an object"===s?e.Uc(t+" a custom object"):e.Uc(t+" "+s)}}function nf(t,e,n){if((e=g(e))instanceof Cd)return e._internalPath;if("string"==typeof e)return rf(t,e);throw of("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}const sf=new RegExp("[~\\*/\\[\\]]");function rf(t,e,n){if(e.search(sf)>=0)throw of(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Cd(...e.split("."))._internalPath}catch(s){throw of(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function of(t,e,n,s,r){const i=s&&!s.isEmpty(),o=void 0!==r;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let c="";return(i||o)&&(c+=" (found",i&&(c+=` in field ${s}`),o&&(c+=` in document ${r}`),c+=")"),new zs(Hs.INVALID_ARGUMENT,a+t+c)}function af(t,e){return t.some((t=>t.isEqual(e)))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class cf{constructor(t,e,n,s,r){this._firestore=t,this._userDataWriter=e,this._key=n,this._document=s,this._converter=r}get id(){return this._key.path.lastSegment()}get ref(){return new nd(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const t=new uf(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const e=this._document.data.field(hf("DocumentSnapshot.get",t));if(null!==e)return this._userDataWriter.convertValue(e)}}}class uf extends cf{data(){return super.data()}}function hf(t,e){return"string"==typeof e?rf(t,e):e instanceof Cd?e._internalPath:e._delegate._internalPath} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class lf{constructor(t,e){this.hasPendingWrites=t,this.fromCache=e}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class df extends cf{constructor(t,e,n,s,r,i){super(t,e,n,s,i),this._firestore=t,this._firestoreImpl=t,this.metadata=r}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const e=new ff(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,e={}){if(this._document){const n=this._document.data.field(hf("DocumentSnapshot.get",t));if(null!==n)return this._userDataWriter.convertValue(n,e.serverTimestamps)}}}class ff extends df{data(t={}){return super.data(t)}}class gf{constructor(t,e,n,s){this._firestore=t,this._userDataWriter=e,this._snapshot=s,this.metadata=new lf(s.hasPendingWrites,s.fromCache),this.query=n}get docs(){const t=[];return this.forEach((e=>t.push(e))),t}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(t,e){this._snapshot.docs.forEach((n=>{t.call(e,new ff(this._firestore,this._userDataWriter,n.key,n,new lf(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(t={}){const e=!!t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new zs(Hs.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e){if(t._snapshot.oldDocs.isEmpty()){let e=0;return t._snapshot.docChanges.map((n=>({type:"added",doc:new ff(t._firestore,t._userDataWriter,n.doc.key,n.doc,new lf(t._snapshot.mutatedKeys.has(n.doc.key),t._snapshot.fromCache),t.query.converter),oldIndex:-1,newIndex:e++})))}{let n=t._snapshot.oldDocs;return t._snapshot.docChanges.filter((t=>e||3!==t.type)).map((e=>{const s=new ff(t._firestore,t._userDataWriter,e.doc.key,e.doc,new lf(t._snapshot.mutatedKeys.has(e.doc.key),t._snapshot.fromCache),t.query.converter);let r=-1,i=-1;return 0!==e.type&&(r=n.indexOf(e.doc.key),n=n.delete(e.doc.key)),1!==e.type&&(n=n.add(e.doc),i=n.indexOf(e.doc.key)),{type:mf(e.type),doc:s,oldIndex:r,newIndex:i}}))}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function mf(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return js()}}function pf(t,e){return t instanceof df&&e instanceof df?t._firestore===e._firestore&&t._key.isEqual(e._key)&&(null===t._document?null===e._document:t._document.isEqual(e._document))&&t._converter===e._converter:t instanceof gf&&e instanceof gf&&t._firestore===e._firestore&&ud(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._snapshot.isEqual(e._snapshot)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function yf(t){if(yi(t)&&0===t.explicitOrderBy.length)throw new zs(Hs.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class wf{}function vf(t,...e){for(const n of e)t=n._apply(t);return t}class bf extends wf{constructor(t,e,n){super(),this.Gc=t,this.zc=e,this.Hc=n,this.type="where"}_apply(t){const e=Bd(t.firestore),n=function(t,e,n,s,r,i,o){let a;if(r.isKeyField()){if("array-contains"===i||"array-contains-any"===i)throw new zs(Hs.INVALID_ARGUMENT,`Invalid Query. You can't perform '${i}' queries on FieldPath.documentId().`);if("in"===i||"not-in"===i){Mf(o,i);const e=[];for(const n of o)e.push(Of(s,t,n));a={arrayValue:{values:e}}}else a=Of(s,t,o)}else"in"!==i&&"not-in"!==i&&"array-contains-any"!==i||Mf(o,i),a=Xd(n,"where",o,"in"===i||"not-in"===i);const c=Jr.create(r,i,a);return function(t,e){if(e.v()){const n=vi(t);if(null!==n&&!n.isEqual(e.field))throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${e.field.toString()}'`);const s=wi(t);null!==s&&Ff(t,e.field,s)}const n=function(t,e){for(const n of t.filters)if(e.indexOf(n.op)>=0)return n.op;return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==n)throw n===e.op?new zs(Hs.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new zs(Hs.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}(t,c),c}(t._query,0,e,t.firestore._databaseId,this.Gc,this.zc,this.Hc);return new sd(t.firestore,t.converter,function(t,e){const n=t.filters.concat([e]);return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t._query,n))}}function Tf(t,e,n){const s=e,r=hf("where",t);return new bf(r,s,n)}class Ef extends wf{constructor(t,e){super(),this.Gc=t,this.Jc=e,this.type="orderBy"}_apply(t){const e=function(t,e,n){if(null!==t.startAt)throw new zs(Hs.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new zs(Hs.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const s=new ui(e,n);return function(t,e){if(null===wi(t)){const n=vi(t);null!==n&&Ff(t,n,e.field)}}(t,s),s}(t._query,this.Gc,this.Jc);return new sd(t.firestore,t.converter,function(t,e){const n=t.explicitOrderBy.concat([e]);return new fi(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t._query,e))}}function If(t,e="asc"){const n=e,s=hf("orderBy",t);return new Ef(s,n)}class Sf extends wf{constructor(t,e,n){super(),this.type=t,this.Yc=e,this.Xc=n}_apply(t){return new sd(t.firestore,t.converter,Ii(t._query,this.Yc,this.Xc))}}function _f(t){return Jl("limit",t),new Sf("limit",t,"F")}function Nf(t){return Jl("limitToLast",t),new Sf("limitToLast",t,"L")}class Af extends wf{constructor(t,e,n){super(),this.type=t,this.Zc=e,this.ta=n}_apply(t){const e=Lf(t,this.type,this.Zc,this.ta);return new sd(t.firestore,t.converter,function(t,e){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t._query,e))}}function Df(...t){return new Af("startAt",t,!0)}function xf(...t){return new Af("startAfter",t,!1)}class Cf extends wf{constructor(t,e,n){super(),this.type=t,this.Zc=e,this.ta=n}_apply(t){const e=Lf(t,this.type,this.Zc,this.ta);return new sd(t.firestore,t.converter,function(t,e){return new fi(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t._query,e))}}function kf(...t){return new Cf("endBefore",t,!0)}function Rf(...t){return new Cf("endAt",t,!1)}function Lf(t,e,n,s){if(n[0]=g(n[0]),n[0]instanceof cf)return function(t,e,n,s,r){if(!s)throw new zs(Hs.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${n}().`);const i=[];for(const n of Ti(t))if(n.field.isKeyField())i.push(Pr(e,s.key));else{const t=s.data.field(n.field);if(Ir(t))throw new zs(Hs.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+n.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===t){const t=n.field.canonicalString();throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${t}' (used as the orderBy) does not exist.`)}i.push(t)}return new ai(i,r)}(t._query,t.firestore._databaseId,e,n[0]._document,s);{const r=Bd(t.firestore);return function(t,e,n,s,r,i){const o=t.explicitOrderBy;if(r.length>o.length)throw new zs(Hs.INVALID_ARGUMENT,`Too many arguments provided to ${s}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const a=[];for(let i=0;i10)throw new zs(Hs.INVALID_ARGUMENT,`Invalid Query. '${e.toString()}' filters support a maximum of 10 elements in the value array.`)}function Ff(t,e,n){if(!n.isEqual(e))throw new zs(Hs.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class Pf{convertValue(t,e="none"){switch(Cr(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Tr(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(Er(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw js()}}convertObject(t,e){const n={};return hr(t.fields,((t,s)=>{n[t]=this.convertValue(s,e)})),n}convertGeoPoint(t){return new Od(Tr(t.latitude),Tr(t.longitude))}convertArray(t,e){return(t.values||[]).map((t=>this.convertValue(t,e)))}convertServerTimestamp(t,e){switch(e){case"previous":const n=Sr(t);return null==n?null:this.convertValue(n,e);case"estimate":return this.convertTimestamp(_r(t));default:return null}}convertTimestamp(t){const e=br(t);return new ar(e.seconds,e.nanos)}convertDocumentKey(t,e){const n=fr.fromString(t);Ks(pa(n));const s=new $l(n.get(1),n.get(3)),r=new xr(n.popFirst(5));return s.isEqual(e)||Us(`Document ${r} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${e.projectId}/${e.database}) instead.`),r}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function Vf(t,e,n){let s;return s=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,s}class Uf extends Pf{constructor(t){super(),this.firestore=t}convertBytes(t){return new Rd(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new nd(this.firestore,null,e)}} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class qf{constructor(t,e){this._firestore=t,this._commitHandler=e,this._mutations=[],this._committed=!1,this._dataReader=Bd(t)}set(t,e,n){this._verifyNotCommitted();const s=Bf(t,this._firestore),r=Vf(s.converter,e,n),i=jd(this._dataReader,"WriteBatch.set",s._key,r,null!==s.converter,n);return this._mutations.push(i.toMutation(s._key,zi.none())),this}update(t,e,n,...s){this._verifyNotCommitted();const r=Bf(t,this._firestore);let i;return i="string"==typeof(e=g(e))||e instanceof Cd?Yd(this._dataReader,"WriteBatch.update",r._key,e,n,s):Wd(this._dataReader,"WriteBatch.update",r._key,e),this._mutations.push(i.toMutation(r._key,zi.exists(!0))),this}delete(t){this._verifyNotCommitted();const e=Bf(t,this._firestore);return this._mutations=this._mutations.concat(new oo(e._key,zi.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new zs(Hs.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function Bf(t,e){if((t=g(t)).firestore!==e)throw new zs(Hs.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function jf(t){t=Xl(t,nd);const e=Xl(t.firestore,gd);return ql(yd(e),t._key).then((n=>ng(e,t,n)))}class Kf extends Pf{constructor(t){super(),this.firestore=t}convertBytes(t){return new Rd(t)}convertReference(t){const e=this.convertDocumentKey(t,this.firestore._databaseId);return new nd(this.firestore,null,e)}}function $f(t){t=Xl(t,nd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){try{const s=await function(t,e){const n=Gs(t);return n.persistence.runTransaction("read document","readonly",(t=>n.Qn.An(t,e)))}(t,e);s.isFoundDocument()?n.resolve(s):s.isNoDocument()?n.resolve(null):n.reject(new zs(Hs.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(t){const s=_h(t,`Failed to get document '${e} from cache`);n.reject(s)}}(await Fl(t),e,n))),n.promise}(n,t._key).then((n=>new df(e,s,t._key,n,new lf(null!==n&&n.hasLocalMutations,!0),t.converter)))}function Gf(t){t=Xl(t,nd);const e=Xl(t.firestore,gd);return ql(yd(e),t._key,{source:"server"}).then((n=>ng(e,t,n)))}function Hf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return yf(t._query),Bl(n,t._query).then((n=>new gf(e,s,t,n)))}function zf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){try{const s=await du(t,e,!0),r=new Kh(e,s.Gn),i=r.bo(s.documents),o=r.applyChanges(i,!1);n.resolve(o.snapshot)}catch(t){const s=_h(t,`Failed to execute query '${e} against cache`);n.reject(s)}}(await Fl(t),e,n))),n.promise}(n,t._query).then((n=>new gf(e,s,t,n)))}function Qf(t){t=Xl(t,sd);const e=Xl(t.firestore,gd),n=yd(e),s=new Kf(e);return Bl(n,t._query,{source:"server"}).then((n=>new gf(e,s,t,n)))}function Wf(t,e,n){t=Xl(t,nd);const s=Xl(t.firestore,gd),r=Vf(t.converter,e,n);return eg(s,[jd(Bd(s),"setDoc",t._key,r,null!==t.converter,n).toMutation(t._key,zi.none())])}function Yf(t,e,n,...s){t=Xl(t,nd);const r=Xl(t.firestore,gd),i=Bd(r);let o;return o="string"==typeof(e=g(e))||e instanceof Cd?Yd(i,"updateDoc",t._key,e,n,s):Wd(i,"updateDoc",t._key,e),eg(r,[o.toMutation(t._key,zi.exists(!0))])}function Xf(t){return eg(Xl(t.firestore,gd),[new oo(t._key,zi.none())])}function Jf(t,e){const n=Xl(t.firestore,gd),s=ad(t),r=Vf(t.converter,e);return eg(n,[jd(Bd(t.firestore),"addDoc",s._key,r,null!==t.converter,{}).toMutation(s._key,zi.exists(!1))]).then((()=>s))}function Zf(t,...e){var n,s,r;t=g(t);let i={includeMetadataChanges:!1},o=0;"object"!=typeof e[o]||ld(e[o])||(i=e[o],o++);const a={includeMetadataChanges:i.includeMetadataChanges};if(ld(e[o])){const t=e[o];e[o]=null===(n=t.next)||void 0===n?void 0:n.bind(t),e[o+1]=null===(s=t.error)||void 0===s?void 0:s.bind(t),e[o+2]=null===(r=t.complete)||void 0===r?void 0:r.bind(t)}let c,u,h;if(t instanceof nd)u=Xl(t.firestore,gd),h=mi(t._key.path),c={next:n=>{e[o]&&e[o](ng(u,t,n))},error:e[o+1],complete:e[o+2]};else{const n=Xl(t,sd);u=Xl(n.firestore,gd),h=n._query;const s=new Kf(u);c={next:t=>{e[o]&&e[o](new gf(u,s,n,t))},error:e[o+1],complete:e[o+2]},yf(t._query)}return function(t,e,n,s){const r=new Nl(s),i=new Fh(e,r,n);return t.asyncQueue.enqueueAndForget((async()=>kh(await Ul(t),i))),()=>{r.ec(),t.asyncQueue.enqueueAndForget((async()=>Rh(await Ul(t),i)))}}(yd(u),h,a,c)}function tg(t,e){return function(t,e){const n=new Nl(e);return t.asyncQueue.enqueueAndForget((async()=>function(t,e){Gs(t).so.add(e),e.next()}(await Ul(t),n))),()=>{n.ec(),t.asyncQueue.enqueueAndForget((async()=>function(t,e){Gs(t).so.delete(e)}(await Ul(t),n)))}}(yd(t=Xl(t,gd)),ld(e)?e:{next:e})}function eg(t,e){return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>async function(t,e,n){const s=bl(t);try{const t=await function(t,e){const n=Gs(t),s=ar.now(),r=e.reduce(((t,e)=>t.add(e.key)),No());let i;return n.persistence.runTransaction("Locally write mutations","readwrite",(t=>n.Qn.Pn(t,r).next((r=>{i=r;const o=[];for(const t of e){const e=Ji(t,i.get(t.key));null!=e&&o.push(new no(t.key,e,Gr(e.value.mapValue),zi.exists(!0)))}return n.In.addMutationBatch(t,s,o,e)})))).then((t=>(t.applyToLocalDocumentSet(i),{batchId:t.batchId,changes:i})))}(s.localStore,e);s.sharedClientState.addPendingMutation(t.batchId),function(t,e,n){let s=t.qo[t.currentUser.toKey()];s||(s=new go(rr)),s=s.insert(e,n),t.qo[t.currentUser.toKey()]=s}(s,t.batchId,n),await cl(s,t.changes),await dh(s.remoteStore)}catch(t){const e=_h(t,"Failed to persist write");n.reject(e)}}(await Vl(t),e,n))),n.promise}(yd(t),e)}function ng(t,e,n){const s=n.docs.get(e._key),r=new Kf(t);return new df(t,r,e._key,s,new lf(n.hasPendingWrites,n.fromCache),e.converter)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */class sg extends class{constructor(t,e){this._firestore=t,this._transaction=e,this._dataReader=Bd(t)}get(t){const e=Bf(t,this._firestore),n=new Uf(this._firestore);return this._transaction.lookup([e._key]).then((t=>{if(!t||1!==t.length)return js();const s=t[0];if(s.isFoundDocument())return new cf(this._firestore,n,s.key,s,e.converter);if(s.isNoDocument())return new cf(this._firestore,n,e._key,null,e.converter);throw js()}))}set(t,e,n){const s=Bf(t,this._firestore),r=Vf(s.converter,e,n),i=jd(this._dataReader,"Transaction.set",s._key,r,null!==s.converter,n);return this._transaction.set(s._key,i),this}update(t,e,n,...s){const r=Bf(t,this._firestore);let i;return i="string"==typeof(e=g(e))||e instanceof Cd?Yd(this._dataReader,"Transaction.update",r._key,e,n,s):Wd(this._dataReader,"Transaction.update",r._key,e),this._transaction.update(r._key,i),this}delete(t){const e=Bf(t,this._firestore);return this._transaction.delete(e._key),this}}{constructor(t,e){super(t,e),this._firestore=t}get(t){const e=Bf(t,this._firestore),n=new Kf(this._firestore);return super.get(t).then((t=>new df(this._firestore,n,e._key,t._document,new lf(!1,!1),e.converter)))}}function rg(t,e){return function(t,e){const n=new Qs;return t.asyncQueue.enqueueAndForget((async()=>{const s=await function(t){return Ol(t).then((t=>t.datastore))}(t);new xl(t.asyncQueue,s,e,n).run()})),n.promise}(yd(t=Xl(t,gd)),(n=>e(new sg(t,n))))} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function ig(){return new Kd("deleteField")}function og(){return new Gd("serverTimestamp")}function ag(...t){return new Hd("arrayUnion",t)}function cg(...t){return new zd("arrayRemove",t)}function ug(t){return new Qd("increment",t)} +/** + * @license + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */function hg(t){return yd(t=Xl(t,gd)),new qf(t,(e=>eg(t,e)))}!function(t,e=!0){!function(t){Os=t}(i.SDK_VERSION),i._registerComponent(new m("firestore",((t,{options:n})=>{const s=t.getProvider("app").getImmediate(),r=new gd(s,new Js(t.getProvider("auth-internal")));return n=Object.assign({useFetchStreams:e},n),r._setSettings(n),r}),"PUBLIC")),i.registerVersion(Rs,"3.2.1",t),i.registerVersion(Rs,"3.2.1","esm2017")}()}))})(); \ No newline at end of file diff --git a/frontend-dist/help-circle-outline.a023036a.svg b/frontend-dist/help-circle-outline.a023036a.svg new file mode 100644 index 0000000000..17ce1e0bc9 --- /dev/null +++ b/frontend-dist/help-circle-outline.a023036a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/index.420fa7f8.css b/frontend-dist/index.420fa7f8.css new file mode 100644 index 0000000000..dbbdb511e0 --- /dev/null +++ b/frontend-dist/index.420fa7f8.css @@ -0,0 +1 @@ +*{box-sizing:border-box}html{font-size:17px}#title h1{color:var(--pluto-output-h-color);font-family:Vollkorn,serif;font-size:2em;font-style:italic;font-weight:500;letter-spacing:.08em;margin:0;padding:4rem 1rem 3rem;text-align:center}#title h1 img{filter:var(--image-filters);height:1.2em;margin-bottom:-.27em;margin-left:.1em;width:4.9em}body{background:var(--main-bg-color);margin:0;min-height:100%;position:absolute;width:100%}p{color:var(--index-text-color)}ul{list-style:none;padding-left:0}li{border-bottom:1px solid var(--welcome-recentnotebook-border);padding:.4em;white-space:nowrap}a{color:inherit;color:var(--index-clickable-text-color)}pluto-filepicker{background:var(--white);display:flex;flex-direction:row}.desktop_picker{display:flex;flex-direction:row;margin-left:5px}pluto-filepicker .cm-editor{background:none;border:2px solid var(--footer-filepicker-focus-color);border-radius:3px;border-bottom-right-radius:0;border-right:none;border-top-right-radius:0;color:var(--nav-filepicker-color);display:inline-block;flex:1 1 auto;font-family:var(--inter-ui-font-stack);font-size:.75rem;font-style:normal;font-weight:500;height:calc(1rem + 12px);letter-spacing:1px;width:100%;width:0}pluto-filepicker .cm-scroller{scrollbar-width:none}pluto-filepicker .cm-scroller::-webkit-scrollbar{display:none}.desktop_picker button,pluto-filepicker button{background:var(--footer-filepicker-focus-color);border:2px solid var(--nav-filepicker-focus-color);border-radius:3px;color:var(--white);font-family:Roboto Mono,monospace;font-size:.75rem;font-weight:600;margin:0}.desktop_picker_group{display:inline-flex}.desktop_picker_group>input{margin-left:1em}.desktop_picker>button{cursor:pointer}.desktop_picker>button.full_width{width:100%}pluto-filepicker button{border-bottom-left-radius:0;border-top-left-radius:0;cursor:pointer;flex:0 1 auto}pluto-filepicker button:disabled{cursor:not-allowed;opacity:.7}.cm-editor .cm-tooltip{border:1px solid var(--cm-editor-tooltip-border-color);border-radius:4px;box-shadow:3px 3px 4px rgb(0 0 0/20%)}.cm-tooltip-autocomplete{box-sizing:content-box;z-index:100}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul{max-height:max(3em,min(50dvh,20em))}.cm-tooltip.cm-completionInfo.cm-completionInfo-right:empty{display:none}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{border-radius:3px;height:18px;margin-bottom:unset;overflow-y:hidden}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--cm-editor-li-aria-selected-bg-color);color:var(--cm-editor-li-aria-selected-color)}.cm-editor .cm-completionIcon{display:none}.cm-completionIcon:before{color:transparent;content:"⚫";margin-right:.5em;opacity:1}.cm-tooltip.cm-tooltip-autocomplete{background:var(--autocomplete-menu-bg-color);margin-left:-1.5em;padding:0}.cm-tooltip-autocomplete li.file.new:before{content:"👉 "}.cm-tooltip-autocomplete li.file:before{content:"📄 "}.cm-tooltip-autocomplete li.dir:before{content:"📁 "}.cm-tooltip-autocomplete>ul{padding:0}.cm-editor .cm-tooltip-autocomplete .cm-completionLabel{font-family:var(--inter-ui-font-stack);font-size:.8rem;font-variant-ligatures:none;font-weight:400}body.nosessions ul#new~*{display:none}#recent{scrollbar-gutter:stable;background:var(--welcome-recentnotebook-bg);border:.2rem solid #d5d5d5;border-radius:.4rem;box-shadow:-2px 4px 9px 0 #00000012;max-height:16em;overflow-x:hidden;overflow-y:auto}#recent>li.recent{opacity:.8}#recent button{background:none;border:none;color:var(--ui-button-color);cursor:pointer;margin:0 .2em 0 0;opacity:.6;padding:1px}span.ionicon:after{background-size:1rem 1rem;content:" ";display:inline-block;filter:var(--image-filters);height:1rem;margin-bottom:-.17rem;width:1rem}#recent li.running button>span:after{background-image:url(close-circle.d0f6eac6.svg)}#recent li.recent button>span:after{background-image:url(caret-forward-circle-outline.d0bf2b34.svg)}#recent li.transitioning button>span:after{background-image:url(ellipsis-horizontal-outline.abb6e818.svg)}#recent li.new span:after{background-image:url(add-outline.e3c93c35.svg)}loading-bar{background-color:var(--loading-grad-color-1);display:none;height:6px;position:fixed;top:0;width:100vw}body.loading loading-bar{animation:load 16s ease-in-out;display:block}@keyframes load{0%{right:100vw}20%{right:30vw}to{right:0}}:root{--card-width:15rem}featured-card{--card-color:hsl(var(--card-color-hue),77%,82%);--card-border-radius:10px;--card-border-width:3px;background:var(--index-card-bg);border:var(--card-border-width) solid var(--card-color);border-radius:var(--card-border-radius);box-shadow:0 2px 6px 0 #00000014;display:block;font-family:var(--inter-ui-font-stack);hyphens:auto;margin:10px;max-width:var(--card-width);padding-bottom:.3rem;position:relative;word-break:break-word}.card-list{display:grid;place-items:center;align-items:stretch;gap:0;grid-template-columns:repeat(auto-fit,minmax(var(--card-width),1fr));justify-items:stretch}featured-card .banner img{--zz:calc(var(--card-border-radius) - var(--card-border-width));aspect-ratio:3/2;background:var(--card-color);border-radius:var(--zz) var(--zz) 0 0;flex:1 1 200px;min-width:0;object-fit:cover;width:100%}featured-card .author img{--size:1.6em;background:#b6b6b6;border-radius:100%;display:inline-block;height:var(--size);object-fit:cover;overflow:hidden;width:var(--size)}featured-card a{text-decoration:none}featured-card a.banner{display:flex}featured-card .author{font-weight:600}featured-card h3 a{-webkit-line-clamp:2;background:var(--index-card-bg);border-radius:.6em;padding:.6em .6em 0}featured-card h3 a,featured-card p{-webkit-box-orient:vertical;display:inline-block;display:-webkit-inline-box;overflow:hidden}featured-card p{-webkit-line-clamp:4;color:#838383;margin:.3rem .8rem}featured-card h3{margin:-1.1rem 0 0}featured-card.big{grid-column-end:span 2;grid-row-end:span 2}featured-card.big .banner img{height:16rem}featured-card.special:before{background:#fcf492;color:#833bc6;content:"New!";display:block;font-size:1.4rem;font-style:italic;font-weight:700;left:-9px;padding:2px 19px;pointer-events:none;position:absolute;text-shadow:0 0 1px #ff6767;text-transform:uppercase;transform:translateY(calc(-100% + 15px)) rotate(-5deg)}.navigating-away-banner{display:grid;min-height:70vh;padding:3em;place-content:center;width:100vw}.navigating-away-banner h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} \ No newline at end of file diff --git a/frontend-dist/index.a096377a.css b/frontend-dist/index.a096377a.css new file mode 100644 index 0000000000..e7fde844d5 --- /dev/null +++ b/frontend-dist/index.a096377a.css @@ -0,0 +1 @@ +@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:100;src:url(Inter-Thin.woff2.a3efb88f6f.099a7dc1.woff2) format("woff2"),url(Inter-Thin.woff.a3efb88f6f.832f7e9d.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:100;src:url(Inter-ThinItalic.woff2.a3efb88f6f.f5b32cfe.woff2) format("woff2"),url(Inter-ThinItalic.woff.a3efb88f6f.9a9e646f.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:200;src:url(Inter-ExtraLight.woff2.a3efb88f6f.735b820a.woff2) format("woff2"),url(Inter-ExtraLight.woff.a3efb88f6f.018d6d24.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:200;src:url(Inter-ExtraLightItalic.woff2.a3efb88f6f.75944d4e.woff2) format("woff2"),url(Inter-ExtraLightItalic.woff.a3efb88f6f.c051c5b4.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:300;src:url(Inter-Light.woff2.a3efb88f6f.f86a8a97.woff2) format("woff2"),url(Inter-Light.woff.a3efb88f6f.0cf765a1.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:300;src:url(Inter-LightItalic.woff2.a3efb88f6f.cb22faff.woff2) format("woff2"),url(Inter-LightItalic.woff.a3efb88f6f.6c91af65.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(Inter-Regular.woff2.a3efb88f6f.c52a047f.woff2) format("woff2"),url(Inter-Regular.woff.a3efb88f6f.d9325c13.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:400;src:url(Inter-Italic.woff2.a3efb88f6f.85eee0c1.woff2) format("woff2"),url(Inter-Italic.woff.a3efb88f6f.d9effa31.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(Inter-Medium.woff2.a3efb88f6f.4f0ea984.woff2) format("woff2"),url(Inter-Medium.woff.a3efb88f6f.cb391d89.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:500;src:url(Inter-MediumItalic.woff2.a3efb88f6f.2b734b7a.woff2) format("woff2"),url(Inter-MediumItalic.woff.a3efb88f6f.1f636c25.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(Inter-SemiBold.woff2.a3efb88f6f.08366574.woff2) format("woff2"),url(Inter-SemiBold.woff.a3efb88f6f.c6670c13.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:600;src:url(Inter-SemiBoldItalic.woff2.a3efb88f6f.5c7db07d.woff2) format("woff2"),url(Inter-SemiBoldItalic.woff.a3efb88f6f.13394743.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:700;src:url(Inter-Bold.woff2.a3efb88f6f.e8bd971d.woff2) format("woff2"),url(Inter-Bold.woff.a3efb88f6f.d92ed350.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:700;src:url(Inter-BoldItalic.woff2.a3efb88f6f.cd6e580e.woff2) format("woff2"),url(Inter-BoldItalic.woff.a3efb88f6f.39f68e5f.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:800;src:url(Inter-ExtraBold.woff2.a3efb88f6f.ffc04ff0.woff2) format("woff2"),url(Inter-ExtraBold.woff.a3efb88f6f.cd51bf91.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:800;src:url(Inter-ExtraBoldItalic.woff2.a3efb88f6f.de4f3979.woff2) format("woff2"),url(Inter-ExtraBoldItalic.woff.a3efb88f6f.122106d3.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:900;src:url(Inter-Black.woff2.a3efb88f6f.1f333c9f.woff2) format("woff2"),url(Inter-Black.woff.a3efb88f6f.efe3f25b.woff) format("woff")}@font-face{font-display:swap;font-family:Inter;font-style:italic;font-weight:900;src:url(Inter-BlackItalic.woff2.a3efb88f6f.89710fff.woff2) format("woff2"),url(Inter-BlackItalic.woff.a3efb88f6f.f6e2e726.woff) format("woff")}@font-face{font-named-instance:"Regular";font-display:swap;font-family:Inter var;font-style:normal;font-weight:100 900;src:url(Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2) format("woff2 supports variations(gvar)"),url(Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2) format("woff2-variations"),url(Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2) format("woff2")}@font-face{font-named-instance:"Italic";font-display:swap;font-family:Inter var;font-style:italic;font-weight:100 900;src:url(Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2) format("woff2 supports variations(gvar)"),url(Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2) format("woff2-variations"),url(Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2) format("woff2")}@font-face{font-display:swap;font-family:Inter var experimental;font-style:oblique 0deg 10deg;font-weight:100 900;src:url(Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2) format("woff2-variations"),url(Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2) format("woff2")}:root{--pluto-cell-spacing:17px;--pluto-operator-ligatures:none;--julia-mono-font-stack:JuliaMono,Menlo,"Roboto Mono","Lucida Sans Typewriter","Source Code Pro",monospace;--sans-serif-font-stack:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;--lato-ui-font-stack:"Lato",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Cantarell,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",system-ui,sans-serif;--inter-ui-font-stack:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Cantarell,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",system-ui,sans-serif;color-scheme:light dark}html{font-family:var(--inter-ui-font-stack);font-size:17px}main{display:block;margin:0 auto;max-width:1200px;padding:1rem}header{background-color:#f5efd2;background-size:cover;display:flex;justify-content:center;padding:1.3rem}header h1{font-weight:500;text-align:center}section#mywork,section#open{background:var(--welcome-mywork-bg);position:relative}.pluto-logo{align-items:center;color:inherit;flex-direction:row;font-family:var(--inter-ui-font-stack);font-style:normal;font-weight:800;gap:.5ch;padding:.5em;transform:translateY(.23em)}.pluto-logo img{height:1.2em;width:1.2em}#new{background:var(--welcome-open-bg);border-radius:.6rem;box-shadow:-2px 4px 9px 0 #00000012;margin:1rem;padding:1.3rem}#new.desktop_opener{align-content:center;box-shadow:none;display:flex;flex-direction:row;justify-content:space-around;position:relative}#new.desktop_opener .desktop_picker{width:100%}section{display:flex;flex-direction:row;justify-content:center}section>div{flex:1 1 auto;margin:1rem;max-width:614px;min-width:0}.pluto-logo{background:#fff;border-radius:.4em;display:flex;flex:0 1 auto;font-size:1.6rem;transform:none}section#open{position:relative}section#featured>div{max-width:900px}header>div{display:flex;flex:1 1 auto;max-width:62rem;z-index:1}section#mywork:before,section#open:after{--c:rgba(53,72,80,0.06);background:linear-gradient(0deg,transparent,var(--c));content:"";display:block;height:50px;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:0}:where(#mywork,#open) h2{--off:4px;--offm:-4px;--oc:#fff;border-radius:.4em;display:inline-block;margin:2rem 0 0}section#open:after{background:linear-gradient(0deg,var(--c),transparent);bottom:0;top:unset}div#app{background-position:0 77%;background-size:cover}.new a{font-style:italic;font-weight:500;text-decoration:none}li.new{background:var(--welcome-newnotebook-bg);position:sticky;top:0;z-index:2}h1{font-size:2.8rem;margin-block-end:0}.collection{margin:6em 0}.collection h2{font-size:2.5rem;font-weight:600;margin:0}#featured p{color:#757575;max-width:54ch}.author{backdrop-filter:blur(15px);background:var(--welcome-card-author-backdrop);border-radius:117px;color:#000;display:flex;padding:.3em .8em .3em .3em;position:absolute;right:.3em;top:.3em}.author a{align-items:center;display:flex;flex-direction:row;gap:.4ch}#github img{aspect-ratio:1;filter:var(--image-filters);width:2rem}a#github{display:block;position:absolute;right:.5rem;top:.5rem}.show-scrollbar::-webkit-scrollbar{opacity:.1;width:10px}.show-scrollbar::-webkit-scrollbar-thumb{background-color:var(--black);border-radius:1000px;opacity:.6}.show-scrollbar::-webkit-scrollbar-thumb:hover{opacity:1} \ No newline at end of file diff --git a/frontend-dist/index.d2e12636.js b/frontend-dist/index.d2e12636.js new file mode 100644 index 0000000000..14ab727130 --- /dev/null +++ b/frontend-dist/index.d2e12636.js @@ -0,0 +1,129 @@ +var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},t={},o={},n=e.parcelRequire94c2;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in o){var n=o[e];delete o[e];var r={id:e,exports:{}};return t[e]=r,n.call(r.exports,r,r.exports),r.exports}var l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,t){o[e]=t},e.parcelRequire94c2=n);var r=n("cNaMA");n("eS9BV");var l,a,i,s,u={};l=u,a="Welcome",i=()=>J,s=e=>J=e,Object.defineProperty(l,a,{get:i,set:s,enumerable:!0,configurable:!0}),n("9Ta4i");r=n("cNaMA"),r=n("cNaMA");var c=n("4zMEb");const d=async()=>{let e=await fetch("https://api.github.com/repos/fonsp/Pluto.jl/releases",{method:"GET",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer"});return(await e.json()).reverse()};n("9Ta4i");r=n("cNaMA");var p=n("2ZZ1r");r=n("cNaMA");const h=e=>{const t=`${e}\n`.replace("\r\n","\n"),o=t.indexOf("### A Pluto.jl notebook ###"),n=t.match(/# ... ........-....-....-....-............/g),r=(null==n?void 0:n.length)??0;let l=t.indexOf("# ╔═╡ Cell order:")+17+1;for(let e=1;e<=r;e++)l=t.indexOf("\n",l+1)+1;return t.slice(o,l)},m=({on_start_navigation:e})=>{const t=async t=>{var o;let n;if(console.log(t),(null===(o=((null==t?void 0:t.path)??(null==t?void 0:t.composedPath())).filter((e=>{var t;return null==e||null===(t=e.classList)||void 0===t?void 0:t.contains(".cm-editor")})))||void 0===o?void 0:o.length)>0)return;switch(t.type){case"paste":n=h(t.clipboardData.getData("text/plain"));break;case"dragstart":return void(t.dataTransfer.dropEffect="move");case"dragover":return void t.preventDefault();case"drop":t.preventDefault(),n=t.dataTransfer.types.includes("Files")?await(l=t.dataTransfer.files[0],new Promise(((e,t)=>{const{name:o,type:n}=l,r=new FileReader;r.onerror=()=>t("Failed to read file!"),r.onloadstart=()=>{},r.onprogress=({loaded:e,total:t})=>{},r.onload=()=>{},r.onloadend=()=>e({file:r.result,name:o,type:n}),r.readAsText(l)}))).then((({file:e})=>e)):h(await(r=t.dataTransfer.items[0],new Promise(((e,t)=>{try{r.getAsString((t=>{console.log(t),e(t)}))}catch(e){t(e)}}))))}var r,l;if(!n)return;e("notebook from clipboard",!1),document.body.classList.add("loading");const a=await fetch("./notebookupload",{method:"POST",body:n});if(a.ok)window.location.href=w(await a.text());else{let e=await a.blob();window.location.href=URL.createObjectURL(e)}};return r.useEffect((()=>(document.addEventListener("paste",t),document.addEventListener("drop",t),document.addEventListener("dragstart",t),document.addEventListener("dragover",t),()=>{document.removeEventListener("paste",t),document.removeEventListener("drop",t),document.removeEventListener("dragstart",t),document.removeEventListener("dragover",t)}))),r.html``};var f=n("1xJnC");const _=({client:e,connected:t,CustomPicker:o,show_samples:n,on_start_navigation:l})=>{const a=o??{text:"Open a notebook",placeholder:"Enter path or URL..."};return r.html`<${m} on_start_navigation=${l} /> +

${a.text}

+
+ <${p.FilePicker} + key=${a.placeholder} + client=${e} + value="" + on_submit=${async e=>{const t=await f.guess_notebook_location(e);"path"===t.type?(l(t.path_or_url),window.location.href=v(t.path_or_url)):confirm("Are you sure? This will download and run the file at\n\n"+t.path_or_url)&&(l(t.path_or_url),window.location.href=g(t.path_or_url))}} + on_desktop_submit=${async e=>{var t;null===(t=window.plutoDesktop)||void 0===t||t.fileSystem.openNotebook("path")}} + button_label=${window.plutoDesktop?"Open File":"Open"} + placeholder=${a.placeholder} + /> + ${window.plutoDesktop&&r.html`<${p.FilePicker} + key=${a.placeholder} + client=${e} + value="" + on_desktop_submit=${async e=>{var t;null===(t=window.plutoDesktop)||void 0===t||t.fileSystem.openNotebook("url",e)}} + button_label="Open from URL" + placeholder=${a.placeholder} + />`} +
`},v=e=>"open?"+new URLSearchParams({path:e}).toString(),g=e=>"open?"+new URLSearchParams({url:e}).toString(),w=e=>"edit?id="+e;var b=n("9Ta4i"),k=(r=n("cNaMA"),r=n("cNaMA"),n("aN0pg"));const $=(e,t=null)=>({transitioning:!1,notebook_id:t,path:e}),y=(e,t)=>e.split(/\/|\\/).slice(-t).join("/"),E=(e,t)=>{let o=1;for(const n of t)if(n!==e)for(;y(e,o)===y(n,o);)o++;return y(e,o)},P=({client:e,connected:t,remote_notebooks:o,CustomRecent:n,on_start_navigation:l})=>{const[a,i]=r.useState(null),s=r.useRef(a);s.current=a;const u=(e,t)=>{i((o=>(null==o?void 0:o.map((o=>o.path==e?{...o,...t}:o)))??null))};r.useEffect((()=>{null!=e&&t&&e.send("get_all_notebooks",{},{}).then((({message:e})=>{const t=e.notebooks.map((e=>$(e.path,e.notebook_id))),o=j(),n=[...b.default.sortBy(t,[e=>b.default.findIndex([...o,...t],(t=>t.path===e.path))]),...b.default.differenceBy(o,t,(e=>e.path))];i(n),document.body.classList.remove("loading")}))}),[null!=e&&t]),r.useEffect((()=>{const e=o;if(null!=s.current){const t=[],o=s.current.map((o=>{let n=null;if(n=o.notebook_id?e.find((e=>e.notebook_id==o.notebook_id)):e.find((e=>e.path==o.path)),null==n)return $(o.path);{const e=$(n.path,n.notebook_id);return t.push(n),e}})),n=e.filter((e=>!t.includes(e))).map((e=>$(e.path,e.notebook_id)));i([...n,...o])}}),[o]);r.useEffect((()=>{document.body.classList.toggle("nosessions",!(null==a||a.length>0))}),[a]);const c=null==a?void 0:a.map((e=>e.path));let d=null==a?r.html`
  • Loading...
  • `:a.map((t=>{const o=null!=t.notebook_id;return r.html`
  • + + {o||(l(E(t.path,c)),u(t.path,{transitioning:!0}))}} + >${E(t.path,c)} +
  • `}));return null==n?r.html` +

    My work

    + + `:r.html`<${n} cl=${k.cl} combined=${a} client=${e} recents=${d} />`},j=()=>{const e=localStorage.getItem("recent notebooks"),t=null!=e?JSON.parse(e):[];return(t instanceof Array?t:[]).map((e=>$(e)))};b=n("9Ta4i"),r=n("cNaMA");var S=n("h2NGW"),L=n("jqrYR"),T=n("41Mhf");n("9Ta4i");r=n("cNaMA");const C=({entry:e,source_url:t,direct_html_links:o})=>{var n,l,a,i,s,u;const c=null===(n=e.frontmatter)||void 0===n?void 0:n.title,d=e=>null==t?e:null==e?null:new URL(e,new URL(t,window.location.href)).href,p=o?d(e.html_path):T.with_query_params("editor.html",{statefile:d(e.statefile_path),notebookfile:d(e.notebookfile_path),notebookfile_integrity:`sha256-${L.base64url_to_base64(e.hash)}`,disable_ui:"true",pluto_server_url:".",name:null==c?null:`sample ${c}`}),h=x(e.frontmatter);return r.html` + 79*[...e].reduce(((e,t)=>e+t.charCodeAt(0)),0)%360)(e.id)}deg;`}> + + ${null==(null==h?void 0:h.name)?null:r.html` + + `} +

    ${(null==e||null===(i=e.frontmatter)||void 0===i?void 0:i.title)??e.id}

    +

    ${null==e||null===(u=e.frontmatter)||void 0===u?void 0:u.description}

    +
    + `},x=e=>A(e.author)??A({name:e.author_name,url:e.author_url,image:e.author_image}),A=e=>{if(e instanceof Array)return A(e[0]);if(null==e)return null;if("string"==typeof e)return{name:e,url:null,image:null};if(e instanceof Object){let{name:t,image:o,url:n}=e;return null==o&&null!=n&&(o=n+".png?size=48"),{name:t,url:n,image:o}}return null},N=[{title:"Featured Notebooks",description:"These notebooks from the Julia community show off what you can do with Pluto. Give it a try, you might learn something new!",collections:[{title:"Loading...",tags:[]}],notebooks:{}}],R=r.html` + +`,O=[{title:"Notebooks",tags:"everything"}],D=e=>(null==e?void 0:e.id)??e.url,M=({sources:e,direct_html_links:t})=>{const[o,n]=r.useState({});r.useEffect((()=>{if(null!=e){a(!1),n({});const t=Array.from(new Set(e.map(D)));console.log(t),console.log("123123123213123");const o=t.map((t=>{const o=e.filter((e=>D(e)===t));return F(o.map((async e=>{const{url:o,integrity:n,valid_until:r}=e;if(null!=r&&new Date(r){n((n=>({...n,[t]:{...e,source_url:o}})))}))}));Promise.any(o).catch((e=>{console.error("All featured sources failed to load: ",e),((null==e?void 0:e.errors)??[]).forEach((e=>console.error(e))),a(!0)}))}}),[e]),r.useEffect((()=>{Object.entries(o).length>0&&console.log("Sources:",o)}),[o]);const[l,a]=r.useState(!1);r.useEffect((()=>{setTimeout((()=>{a(!0)}),8e3)}),[]);const i=0===Object.entries(o).length,s=Array.from(new Set((null==e?void 0:e.map(D))??[])).map((e=>o[e])).filter((e=>null!=e));return i&&l?R:r.html` + ${(i?N:s).map((e=>{let o=(null==e?void 0:e.collections)??O;return r.html` + + `}))} + `};S.default(M,"pluto-featured",["sources","direct_html_links"]);const U=(e,t)=>{const o="everything"===t?e:e.filter((e=>t.some((t=>{var o;return((null===(o=e.frontmatter)||void 0===o?void 0:o.tags)??[]).includes(t)}))));return b.default.sortBy(o,[e=>{var t;return(e=>isNaN(e)?e:Number(e))(null==e||null===(t=e.frontmatter)||void 0===t?void 0:t.order)},"id"])},F=(e,t=[])=>e.length<=1?Promise.any([...e,...t]):e[0].catch((()=>F(e.slice(1),[...t,e[0]])));var q,I=n("cpCG6"),B={sources:[{url:"https://cdn.jsdelivr.net/gh/JuliaPluto/featured@v3/pluto_export.json",integrity:"sha256-y2E/niS8Em5a4wfSupsmDi0JaTrKSI0WF9DBkfEiQYQ="}]};const G=(null===(q=document.head.querySelector("link[rel='pluto-logo-big']"))||void 0===q?void 0:q.getAttribute("href"))??"",J=({launch_params:e})=>{const[t,o]=r.useState([]),[n,l]=r.useState(!1),[a,i]=r.useState({show_samples:!0,CustomPicker:null,CustomRecent:null}),s=r.useRef({});r.useEffect((()=>{const t=l;c.create_pluto_connection({on_unrequested_update:({message:e,type:t})=>{"notebook_list"===t&&o(e.notebooks)},on_connection_status:t,on_reconnect:()=>!0,ws_address:e.pluto_server_url?c.ws_address_from_base(e.pluto_server_url):void 0}).then((async e=>{Object.assign(s.current,e),l(!0);try{const t=await I.get_environment(e),{custom_recent:o,custom_filepicker:n,show_samples:l=!0}=t({client:e,editor:void 0,imports:{preact:r}});i((e=>({...e,CustomRecent:o,CustomPicker:n,show_samples:l})))}catch(e){}(e=>{d().then((t=>{const o=e.version_info.pluto,n=t[t.length-1].tag_name;console.log(`Pluto version ${o}`);const r=t.findIndex((e=>e.tag_name===o));-1!==r&&t.slice(r+1).filter((e=>e.body.toLowerCase().includes("recommended update"))).length>0&&(console.log(`Newer version ${n} is available`),e.version_info.dismiss_update_notification||alert("A new version of Pluto.jl is available! 🎉\n\n You have "+o+", the latest is "+n+'.\n\nYou can update Pluto.jl using the julia package manager:\n import Pkg; Pkg.update("Pluto")\nAfterwards, exit Pluto.jl and restart julia.'))})).catch((()=>{}))})(e),e.send("current_time"),e.send("completepath",{query:""},{})}))}),[]);const{show_samples:u,CustomRecent:p,CustomPicker:h}=a,[m,f]=r.useState(null),v=(e,t=!0)=>{if(t){const t=t=>{f(e)};window.addEventListener("beforeunload",t),setTimeout((()=>window.removeEventListener("beforeunload",t)),1e3)}else f(e)},g=r.useMemo((()=>e.featured_sources??(e.featured_source_url?[{url:e.featured_source_url,integrity:e.featured_source_integrity}]:B.sources)),[e]);return null!=m?r.html` + + `:r.html` +
    +

    welcome to

    +
    +
    +
    + <${P} + client=${s.current} + connected=${n} + remote_notebooks=${t} + CustomRecent=${p} + on_start_navigation=${v} + /> +
    +
    +
    +
    + <${_} + client=${s.current} + connected=${n} + CustomPicker=${h} + show_samples=${u} + on_start_navigation=${v} + /> +
    +
    + + `},W=new URLSearchParams(window.location.search),Y={featured_direct_html_links:!!(W.get("featured_direct_html_links")??window.pluto_featured_direct_html_links),featured_sources:window.pluto_featured_sources,featured_source_url:W.get("featured_source_url")??window.pluto_featured_source_url,featured_source_integrity:W.get("featured_source_integrity")??window.pluto_featured_source_integrity,pluto_server_url:W.get("pluto_server_url")??window.pluto_server_url};console.log("Launch parameters: ",Y),r.render(r.html`<${u.Welcome} launch_params=${Y} />`,document.querySelector("#app")); \ No newline at end of file diff --git a/frontend-dist/index.html b/frontend-dist/index.html new file mode 100644 index 0000000000..ef9aad3c00 --- /dev/null +++ b/frontend-dist/index.html @@ -0,0 +1 @@ +Pluto.jl

    welcome to

    My work

    Open a notebook

    Loading...

    \ No newline at end of file diff --git a/frontend-dist/information-circle-outline.008b2bb9.svg b/frontend-dist/information-circle-outline.008b2bb9.svg new file mode 100644 index 0000000000..163c7e4d5a --- /dev/null +++ b/frontend-dist/information-circle-outline.008b2bb9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/juliamono.c6034ab4.css b/frontend-dist/juliamono.c6034ab4.css new file mode 100644 index 0000000000..45b84c3479 --- /dev/null +++ b/frontend-dist/juliamono.c6034ab4.css @@ -0,0 +1 @@ +@font-face{font-display:swap;font-family:JuliaMono;font-weight:400;src:url(JuliaMono-RegularLatin.26c56b70.woff2) format("woff2");unicode-range:U+00-7f}@font-face{font-display:swap;font-family:JuliaMono;font-weight:700;src:url(JuliaMono-BoldLatin.7ec5c608.woff2) format("woff2");unicode-range:U+00-7f}@font-face{font-display:swap;font-family:JuliaMono;font-weight:400;src:url(JuliaMono-Regular.e0106c6f.woff2) format("woff2")}@font-face{font-display:swap;font-family:JuliaMono;font-weight:700;src:url(JuliaMono-Bold.24b57d33.woff2) format("woff2")}@font-face{font-display:swap;font-family:JuliaMono;font-style:italic;font-weight:400;src:url(JuliaMono-RegularItalic.3159f647.woff2) format("woff2")} \ No newline at end of file diff --git a/frontend-dist/lato-all-400-italic.c29c8c6c.woff b/frontend-dist/lato-all-400-italic.c29c8c6c.woff new file mode 100644 index 0000000000..6131624555 Binary files /dev/null and b/frontend-dist/lato-all-400-italic.c29c8c6c.woff differ diff --git a/frontend-dist/lato-all-400-normal.a1a68bdf.woff b/frontend-dist/lato-all-400-normal.a1a68bdf.woff new file mode 100644 index 0000000000..1f1fd49a12 Binary files /dev/null and b/frontend-dist/lato-all-400-normal.a1a68bdf.woff differ diff --git a/frontend-dist/lato-latin-400-italic.6edbc86c.woff2 b/frontend-dist/lato-latin-400-italic.6edbc86c.woff2 new file mode 100644 index 0000000000..3246c1286f Binary files /dev/null and b/frontend-dist/lato-latin-400-italic.6edbc86c.woff2 differ diff --git a/frontend-dist/lato-latin-400-normal.77db3602.woff2 b/frontend-dist/lato-latin-400-normal.77db3602.woff2 new file mode 100644 index 0000000000..6904b6649f Binary files /dev/null and b/frontend-dist/lato-latin-400-normal.77db3602.woff2 differ diff --git a/frontend-dist/lato-latin-ext-400-italic.336aaf51.woff2 b/frontend-dist/lato-latin-ext-400-italic.336aaf51.woff2 new file mode 100644 index 0000000000..69af6c080d Binary files /dev/null and b/frontend-dist/lato-latin-ext-400-italic.336aaf51.woff2 differ diff --git a/frontend-dist/lato-latin-ext-400-normal.e1ce8ad3.woff2 b/frontend-dist/lato-latin-ext-400-normal.e1ce8ad3.woff2 new file mode 100644 index 0000000000..0a0ee5eaed Binary files /dev/null and b/frontend-dist/lato-latin-ext-400-normal.e1ce8ad3.woff2 differ diff --git a/frontend-dist/logo.004c1d7c.svg b/frontend-dist/logo.004c1d7c.svg new file mode 100644 index 0000000000..cec701dc07 --- /dev/null +++ b/frontend-dist/logo.004c1d7c.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/mic-off-outline.251c22b7.svg b/frontend-dist/mic-off-outline.251c22b7.svg new file mode 100644 index 0000000000..5ff2a050d0 --- /dev/null +++ b/frontend-dist/mic-off-outline.251c22b7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/mic-outline.e10eafe2.svg b/frontend-dist/mic-outline.e10eafe2.svg new file mode 100644 index 0000000000..96d55c507f --- /dev/null +++ b/frontend-dist/mic-outline.e10eafe2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/newspaper-outline.e481c39c.svg b/frontend-dist/newspaper-outline.e481c39c.svg new file mode 100644 index 0000000000..c142efa0f1 --- /dev/null +++ b/frontend-dist/newspaper-outline.e481c39c.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/notifications-outline.aa91b431.svg b/frontend-dist/notifications-outline.aa91b431.svg new file mode 100644 index 0000000000..f284fa8886 --- /dev/null +++ b/frontend-dist/notifications-outline.aa91b431.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/parcel-manifest.json b/frontend-dist/parcel-manifest.json new file mode 100644 index 0000000000..cc69f24d57 --- /dev/null +++ b/frontend-dist/parcel-manifest.json @@ -0,0 +1 @@ +{"editor.html":"./editor.html","img/favicon-16x16.png":"./favicon-16x16.347d2855.png","img/favicon-32x32.png":"./favicon-32x32.8789add4.png","img/favicon-96x96.png":"./favicon-96x96.48689391.png","img/logo.svg":"./logo.004c1d7c.svg","img/favicon_unsaturated.svg":"./favicon_unsaturated.d1387b25.svg","juliamono.css":"./juliamono.c6034ab4.css",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/cormullion/juliamono@0.047/webfonts/JuliaMono-RegularLatin.woff2":"./JuliaMono-RegularLatin.26c56b70.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/cormullion/juliamono@0.047/webfonts/JuliaMono-BoldLatin.woff2":"./JuliaMono-BoldLatin.7ec5c608.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/cormullion/juliamono@0.047/webfonts/JuliaMono-Regular.woff2":"./JuliaMono-Regular.e0106c6f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/cormullion/juliamono@0.047/webfonts/JuliaMono-Bold.woff2":"./JuliaMono-Bold.24b57d33.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/cormullion/juliamono@0.047/webfonts/JuliaMono-RegularItalic.woff2":"./JuliaMono-RegularItalic.3159f647.woff2","vollkorn.css":"./vollkorn.089565a8.css",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-SemiBold.woff2":"./Vollkorn-SemiBold.8072eb6c.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-SemiBoldItalic.woff2":"./Vollkorn-SemiBoldItalic.5c3cd265.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-Bold.woff2":"./Vollkorn-Bold.6e1feb70.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-BoldItalic.woff2":"./Vollkorn-BoldItalic.a48ab300.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-Black.woff2":"./Vollkorn-Black.0ebdfbf5.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/fonsp/Vollkorn-Typeface@1/fonts/woff2/Vollkorn-BlackItalic.woff2":"./Vollkorn-BlackItalic.4095acfe.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/lodash@4.17.20/lodash.min.js":"./editor.b8733d72.js",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@observablehq/stdlib@3.3.1/dist/stdlib.js":"./editor.9f9dc874.js",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/iframe-resizer@4.2.11/js/iframeResizer.min.js":"./editor.90ede145.js",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/ansi_up@5.1.0/ansi_up.min.js":"./editor.dbeed08a.js",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/iframe-resizer@4.2.11/js/iframeResizer.contentWindow.min.js":"./editor.6386bd9d.js","editor.css":"./editor.1587a4b9.css",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-ext-500-normal.woff2":"./roboto-mono-cyrillic-ext-500-normal.d362a132.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-all-500-normal.woff":"./roboto-mono-all-500-normal.cc559149.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-500-normal.woff2":"./roboto-mono-cyrillic-500-normal.8ed3add8.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-greek-500-normal.woff2":"./roboto-mono-greek-500-normal.dd57b097.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-vietnamese-500-normal.woff2":"./roboto-mono-vietnamese-500-normal.1320bb60.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-ext-500-normal.woff2":"./roboto-mono-latin-ext-500-normal.415f7d14.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-500-normal.woff2":"./roboto-mono-latin-500-normal.98ad1d4e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-ext-700-normal.woff2":"./roboto-mono-cyrillic-ext-700-normal.5c7aabac.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-all-700-normal.woff":"./roboto-mono-all-700-normal.393c796d.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-700-normal.woff2":"./roboto-mono-cyrillic-700-normal.5e6410cf.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-greek-700-normal.woff2":"./roboto-mono-greek-700-normal.b101f80c.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-vietnamese-700-normal.woff2":"./roboto-mono-vietnamese-700-normal.edb1435b.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-ext-700-normal.woff2":"./roboto-mono-latin-ext-700-normal.c497b002.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-700-normal.woff2":"./roboto-mono-latin-700-normal.447ac127.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-400-normal.woff2":"./alegreya-sans-cyrillic-ext-400-normal.5f5cc2ef.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-400-normal.woff":"./alegreya-sans-all-400-normal.a91dc265.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-400-normal.woff2":"./alegreya-sans-cyrillic-400-normal.ab3d1dcc.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-400-normal.woff2":"./alegreya-sans-greek-ext-400-normal.b82a0aea.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-400-normal.woff2":"./alegreya-sans-greek-400-normal.4e5a8597.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-400-normal.woff2":"./alegreya-sans-vietnamese-400-normal.bdc8a622.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-400-normal.woff2":"./alegreya-sans-latin-ext-400-normal.1c1602b0.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-400-normal.woff2":"./alegreya-sans-latin-400-normal.62b57001.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-500-normal.woff2":"./alegreya-sans-cyrillic-ext-500-normal.0e6ee102.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-500-normal.woff":"./alegreya-sans-all-500-normal.5db27a5b.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-500-normal.woff2":"./alegreya-sans-cyrillic-500-normal.8a029e9d.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-500-normal.woff2":"./alegreya-sans-greek-ext-500-normal.00f2c6f3.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-500-normal.woff2":"./alegreya-sans-greek-500-normal.54a6041f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-500-normal.woff2":"./alegreya-sans-vietnamese-500-normal.97e250df.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-500-normal.woff2":"./alegreya-sans-latin-ext-500-normal.637067c1.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-500-normal.woff2":"./alegreya-sans-latin-500-normal.4428c984.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-700-normal.woff2":"./alegreya-sans-cyrillic-ext-700-normal.2e02b08f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-700-normal.woff":"./alegreya-sans-all-700-normal.29d7dfa9.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-700-normal.woff2":"./alegreya-sans-cyrillic-700-normal.5a5aa5e3.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-700-normal.woff2":"./alegreya-sans-greek-ext-700-normal.ca9ee8e1.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-700-normal.woff2":"./alegreya-sans-greek-700-normal.452fc62e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-700-normal.woff2":"./alegreya-sans-vietnamese-700-normal.59390763.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-700-normal.woff2":"./alegreya-sans-latin-ext-700-normal.b5306f41.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-700-normal.woff2":"./alegreya-sans-latin-700-normal.96e2fcc9.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-400-italic.woff2":"./alegreya-sans-cyrillic-ext-400-italic.7c2a4a40.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-400-italic.woff":"./alegreya-sans-all-400-italic.f87bfe89.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-400-italic.woff2":"./alegreya-sans-cyrillic-400-italic.8c81649c.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-400-italic.woff2":"./alegreya-sans-greek-ext-400-italic.550f5118.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-400-italic.woff2":"./alegreya-sans-greek-400-italic.1b909c63.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-400-italic.woff2":"./alegreya-sans-vietnamese-400-italic.d08e8dff.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-400-italic.woff2":"./alegreya-sans-latin-ext-400-italic.b9ce632b.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-400-italic.woff2":"./alegreya-sans-latin-400-italic.ec56f658.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-500-italic.woff2":"./alegreya-sans-cyrillic-ext-500-italic.78248b65.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-500-italic.woff":"./alegreya-sans-all-500-italic.8917c3da.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-500-italic.woff2":"./alegreya-sans-cyrillic-500-italic.a40f95be.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-500-italic.woff2":"./alegreya-sans-greek-ext-500-italic.8b2e952b.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-500-italic.woff2":"./alegreya-sans-greek-500-italic.19d09eea.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-500-italic.woff2":"./alegreya-sans-vietnamese-500-italic.3ff20df8.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-500-italic.woff2":"./alegreya-sans-latin-ext-500-italic.d15c8f11.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-500-italic.woff2":"./alegreya-sans-latin-500-italic.6d8350bf.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-ext-700-italic.woff2":"./alegreya-sans-cyrillic-ext-700-italic.69b0617e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-all-700-italic.woff":"./alegreya-sans-all-700-italic.a6d70e05.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-cyrillic-700-italic.woff2":"./alegreya-sans-cyrillic-700-italic.c4ef17a2.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-ext-700-italic.woff2":"./alegreya-sans-greek-ext-700-italic.a1ccc0c2.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-greek-700-italic.woff2":"./alegreya-sans-greek-700-italic.5aef27cf.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-vietnamese-700-italic.woff2":"./alegreya-sans-vietnamese-700-italic.7de0cccc.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-ext-700-italic.woff2":"./alegreya-sans-latin-ext-700-italic.733aea09.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/alegreya-sans@4.4.5/files/alegreya-sans-latin-700-italic.woff2":"./alegreya-sans-latin-700-italic.abc64c8a.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-latin-ext-400-normal.woff2":"./lato-latin-ext-400-normal.e1ce8ad3.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-all-400-normal.woff":"./lato-all-400-normal.a1a68bdf.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-latin-400-normal.woff2":"./lato-latin-400-normal.77db3602.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-latin-ext-400-italic.woff2":"./lato-latin-ext-400-italic.336aaf51.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-all-400-italic.woff":"./lato-all-400-italic.c29c8c6c.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/lato@4.4.5/files/lato-latin-400-italic.woff2":"./lato-latin-400-italic.6edbc86c.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/radio-button-on-outline.svg":"./radio-button-on-outline.778acac1.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/stop-circle-outline.svg":"./stop-circle-outline.6623356d.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/share-outline.svg":"./share-outline.50164ded.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/close-outline.svg":"./close-outline.9c22a232.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/newspaper-outline.svg":"./newspaper-outline.e481c39c.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/easel-outline.svg":"./easel-outline.9b064e1f.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/mic-outline.svg":"./mic-outline.e10eafe2.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/information-circle-outline.svg":"./information-circle-outline.008b2bb9.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/mic-off-outline.svg":"./mic-off-outline.251c22b7.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-undo-outline.svg":"./arrow-undo-outline.d8c99108.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/sync-circle-outline.svg":"./sync-circle-outline.65b15d76.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/checkmark-outline.svg":"./checkmark-outline.4fb8c646.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/eye-outline.svg":"./eye-outline.6e6e0f7c.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/eye-off-outline.svg":"./eye-off-outline.a37e03db.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/add-outline.svg":"./add-outline.e3c93c35.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/document-text-outline.svg":"./document-text-outline.8d1e2333.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/caret-forward-circle-outline.svg":"./caret-forward-circle-outline.d0bf2b34.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/ban-outline.svg":"./ban-outline.c97da9b4.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/close-circle-outline.svg":"./close-circle-outline.4baeedb9.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/document-lock-outline.svg":"./document-lock-outline.69d176a4.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/copy-outline.svg":"./copy-outline.0f561529.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/ellipsis-horizontal-circle-outline.svg":"./ellipsis-horizontal-circle-outline.6279ed30.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/time-outline.svg":"./time-outline.7c1877f0.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/sync-outline.svg":"./sync-outline.9a1bd27b.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/cloud-offline-outline.svg":"./cloud-offline-outline.ac2eade9.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/cloud-download-outline.svg":"./cloud-download-outline.8c1ff9bb.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/chatbox-ellipses-outline.svg":"./chatbox-ellipses-outline.4334a3a4.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-redo-circle-outline.svg":"./arrow-redo-circle-outline.dfa899f4.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/chevron-forward-circle-outline.svg":"./chevron-forward-circle-outline.babf2a99.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/search.svg":"./search.1ca5b3b3.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/terminal.svg":"./terminal.6b804248.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/pulse.svg":"./pulse.27a877a7.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/chevron-down-outline.svg":"./chevron-down-outline.1efaf1cc.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/notifications-outline.svg":"./notifications-outline.aa91b431.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/warning-outline.svg":"./warning-outline.d84ed9e8.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/terminal-outline.svg":"./terminal-outline.79a23031.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-back-outline.svg":"./arrow-back-outline.9ae1bed8.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-forward-outline.svg":"./arrow-forward-outline.f5f68f5c.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-ext-400-normal.woff2":"./roboto-mono-cyrillic-ext-400-normal.dcb520ee.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-all-400-normal.woff":"./roboto-mono-all-400-normal.364ec368.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-400-normal.woff2":"./roboto-mono-cyrillic-400-normal.638e826e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-greek-400-normal.woff2":"./roboto-mono-greek-400-normal.dd843e41.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-vietnamese-400-normal.woff2":"./roboto-mono-vietnamese-400-normal.306e7635.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-ext-400-normal.woff2":"./roboto-mono-latin-ext-400-normal.d9409874.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-400-normal.woff2":"./roboto-mono-latin-400-normal.cf1eee5f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-ext-400-italic.woff2":"./roboto-mono-cyrillic-ext-400-italic.db052448.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-all-400-italic.woff":"./roboto-mono-all-400-italic.31a14f53.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-cyrillic-400-italic.woff2":"./roboto-mono-cyrillic-400-italic.e399ed93.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-greek-400-italic.woff2":"./roboto-mono-greek-400-italic.6f7e0b2f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-vietnamese-400-italic.woff2":"./roboto-mono-vietnamese-400-italic.d8e0a32a.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-ext-400-italic.woff2":"./roboto-mono-latin-ext-400-italic.aaa9a959.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/@fontsource/roboto-mono@4.4.5/files/roboto-mono-latin-400-italic.woff2":"./roboto-mono-latin-400-italic.ef82d48f.woff2","hide-ui.css":"./editor.14f23ca4.css","binder.css":"./editor.99402935.css",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/download-outline.svg":"./download-outline.523a74d8.svg","treeview.css":"./editor.1f4cf2ca.css",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/caret-down-outline.svg":"./caret-down-outline.4253a2fe.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/caret-forward-outline.svg":"./caret-forward-outline.348a84b6.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/ellipsis-vertical.svg":"./ellipsis-vertical.a30e7430.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/ellipsis-horizontal.svg":"./ellipsis-horizontal.c9a6cc29.svg","highlightjs.css":"./editor.e82e08bd.css","editor.js":"./editor.71943471.js",".parcel-cache/.net/https/www.gstatic.com/firebasejs/9.3.0/firebase-app.js":"./firebase-app.42556901.js",".parcel-cache/.net/https/www.gstatic.com/firebasejs/9.3.0/firebase-firestore.js":"./firebase-firestore.fc4ff51d.js",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-up-circle-outline.svg":"./arrow-up-circle-outline.3f146ffe.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/help-circle-outline.svg":"./help-circle-outline.a023036a.svg",".parcel-cache/.net/https/unpkg.com/vmsg@0.4.0/vmsg.wasm":"./vmsg.56bb9389.wasm","warn_old_browsers.js":"./editor.8a3292da.js","index.html":"./index.html","welcome.css":"./index.a096377a.css",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Thin.woff2.a3efb88f6f.woff2":"./Inter-Thin.woff2.a3efb88f6f.099a7dc1.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Thin.woff.a3efb88f6f.woff":"./Inter-Thin.woff.a3efb88f6f.832f7e9d.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ThinItalic.woff2.a3efb88f6f.woff2":"./Inter-ThinItalic.woff2.a3efb88f6f.f5b32cfe.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ThinItalic.woff.a3efb88f6f.woff":"./Inter-ThinItalic.woff.a3efb88f6f.9a9e646f.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraLight.woff2.a3efb88f6f.woff2":"./Inter-ExtraLight.woff2.a3efb88f6f.735b820a.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraLight.woff.a3efb88f6f.woff":"./Inter-ExtraLight.woff.a3efb88f6f.018d6d24.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraLightItalic.woff2.a3efb88f6f.woff2":"./Inter-ExtraLightItalic.woff2.a3efb88f6f.75944d4e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraLightItalic.woff.a3efb88f6f.woff":"./Inter-ExtraLightItalic.woff.a3efb88f6f.c051c5b4.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Light.woff2.a3efb88f6f.woff2":"./Inter-Light.woff2.a3efb88f6f.f86a8a97.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Light.woff.a3efb88f6f.woff":"./Inter-Light.woff.a3efb88f6f.0cf765a1.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-LightItalic.woff2.a3efb88f6f.woff2":"./Inter-LightItalic.woff2.a3efb88f6f.cb22faff.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-LightItalic.woff.a3efb88f6f.woff":"./Inter-LightItalic.woff.a3efb88f6f.6c91af65.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Regular.woff2.a3efb88f6f.woff2":"./Inter-Regular.woff2.a3efb88f6f.c52a047f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Regular.woff.a3efb88f6f.woff":"./Inter-Regular.woff.a3efb88f6f.d9325c13.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Italic.woff2.a3efb88f6f.woff2":"./Inter-Italic.woff2.a3efb88f6f.85eee0c1.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Italic.woff.a3efb88f6f.woff":"./Inter-Italic.woff.a3efb88f6f.d9effa31.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Medium.woff2.a3efb88f6f.woff2":"./Inter-Medium.woff2.a3efb88f6f.4f0ea984.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Medium.woff.a3efb88f6f.woff":"./Inter-Medium.woff.a3efb88f6f.cb391d89.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-MediumItalic.woff2.a3efb88f6f.woff2":"./Inter-MediumItalic.woff2.a3efb88f6f.2b734b7a.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-MediumItalic.woff.a3efb88f6f.woff":"./Inter-MediumItalic.woff.a3efb88f6f.1f636c25.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-SemiBold.woff2.a3efb88f6f.woff2":"./Inter-SemiBold.woff2.a3efb88f6f.08366574.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-SemiBold.woff.a3efb88f6f.woff":"./Inter-SemiBold.woff.a3efb88f6f.c6670c13.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-SemiBoldItalic.woff2.a3efb88f6f.woff2":"./Inter-SemiBoldItalic.woff2.a3efb88f6f.5c7db07d.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-SemiBoldItalic.woff.a3efb88f6f.woff":"./Inter-SemiBoldItalic.woff.a3efb88f6f.13394743.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Bold.woff2.a3efb88f6f.woff2":"./Inter-Bold.woff2.a3efb88f6f.e8bd971d.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Bold.woff.a3efb88f6f.woff":"./Inter-Bold.woff.a3efb88f6f.d92ed350.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-BoldItalic.woff2.a3efb88f6f.woff2":"./Inter-BoldItalic.woff2.a3efb88f6f.cd6e580e.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-BoldItalic.woff.a3efb88f6f.woff":"./Inter-BoldItalic.woff.a3efb88f6f.39f68e5f.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraBold.woff2.a3efb88f6f.woff2":"./Inter-ExtraBold.woff2.a3efb88f6f.ffc04ff0.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraBold.woff.a3efb88f6f.woff":"./Inter-ExtraBold.woff.a3efb88f6f.cd51bf91.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraBoldItalic.woff2.a3efb88f6f.woff2":"./Inter-ExtraBoldItalic.woff2.a3efb88f6f.de4f3979.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-ExtraBoldItalic.woff.a3efb88f6f.woff":"./Inter-ExtraBoldItalic.woff.a3efb88f6f.122106d3.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Black.woff2.a3efb88f6f.woff2":"./Inter-Black.woff2.a3efb88f6f.1f333c9f.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-Black.woff.a3efb88f6f.woff":"./Inter-Black.woff.a3efb88f6f.efe3f25b.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-BlackItalic.woff2.a3efb88f6f.woff2":"./Inter-BlackItalic.woff2.a3efb88f6f.89710fff.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-BlackItalic.woff.a3efb88f6f.woff":"./Inter-BlackItalic.woff.a3efb88f6f.f6e2e726.woff",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-roman.var.woff2.a3efb88f6f.woff2":"./Inter-roman.var.woff2.a3efb88f6f.8120837c.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter-italic.var.woff2.a3efb88f6f.woff2":"./Inter-italic.var.woff2.a3efb88f6f.e62a3bb2.woff2",".parcel-cache/.net/https/cdn.jsdelivr.net/npm/inter-ui@3.19.3/Inter%20(web%20latin)/Inter.var.woff2.a3efb88f6f.woff2":"./Inter.var.woff2.a3efb88f6f.ca82f9aa.woff2","index.css":"./index.420fa7f8.css",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/close-circle.svg":"./close-circle.d0f6eac6.svg",".parcel-cache/.net/https/cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/ellipsis-horizontal-outline.svg":"./ellipsis-horizontal-outline.abb6e818.svg","index.js":"./index.d2e12636.js","error.jl.html":"./error.jl.html"} \ No newline at end of file diff --git a/frontend-dist/pulse.27a877a7.svg b/frontend-dist/pulse.27a877a7.svg new file mode 100644 index 0000000000..3251eb43e8 --- /dev/null +++ b/frontend-dist/pulse.27a877a7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/radio-button-on-outline.778acac1.svg b/frontend-dist/radio-button-on-outline.778acac1.svg new file mode 100644 index 0000000000..061b534687 --- /dev/null +++ b/frontend-dist/radio-button-on-outline.778acac1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/roboto-mono-all-400-italic.31a14f53.woff b/frontend-dist/roboto-mono-all-400-italic.31a14f53.woff new file mode 100644 index 0000000000..723ffe83fc Binary files /dev/null and b/frontend-dist/roboto-mono-all-400-italic.31a14f53.woff differ diff --git a/frontend-dist/roboto-mono-all-400-normal.364ec368.woff b/frontend-dist/roboto-mono-all-400-normal.364ec368.woff new file mode 100644 index 0000000000..379f9ae197 Binary files /dev/null and b/frontend-dist/roboto-mono-all-400-normal.364ec368.woff differ diff --git a/frontend-dist/roboto-mono-all-500-normal.cc559149.woff b/frontend-dist/roboto-mono-all-500-normal.cc559149.woff new file mode 100644 index 0000000000..6fc0cbe59e Binary files /dev/null and b/frontend-dist/roboto-mono-all-500-normal.cc559149.woff differ diff --git a/frontend-dist/roboto-mono-all-700-normal.393c796d.woff b/frontend-dist/roboto-mono-all-700-normal.393c796d.woff new file mode 100644 index 0000000000..bd2a43d0aa Binary files /dev/null and b/frontend-dist/roboto-mono-all-700-normal.393c796d.woff differ diff --git a/frontend-dist/roboto-mono-cyrillic-400-italic.e399ed93.woff2 b/frontend-dist/roboto-mono-cyrillic-400-italic.e399ed93.woff2 new file mode 100644 index 0000000000..8695ed91d2 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-400-italic.e399ed93.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-400-normal.638e826e.woff2 b/frontend-dist/roboto-mono-cyrillic-400-normal.638e826e.woff2 new file mode 100644 index 0000000000..68b8a8dc8c Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-400-normal.638e826e.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-500-normal.8ed3add8.woff2 b/frontend-dist/roboto-mono-cyrillic-500-normal.8ed3add8.woff2 new file mode 100644 index 0000000000..c307876e05 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-500-normal.8ed3add8.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-700-normal.5e6410cf.woff2 b/frontend-dist/roboto-mono-cyrillic-700-normal.5e6410cf.woff2 new file mode 100644 index 0000000000..1967932dfe Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-700-normal.5e6410cf.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-ext-400-italic.db052448.woff2 b/frontend-dist/roboto-mono-cyrillic-ext-400-italic.db052448.woff2 new file mode 100644 index 0000000000..85a9f5b370 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-ext-400-italic.db052448.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-ext-400-normal.dcb520ee.woff2 b/frontend-dist/roboto-mono-cyrillic-ext-400-normal.dcb520ee.woff2 new file mode 100644 index 0000000000..1630ec9c56 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-ext-400-normal.dcb520ee.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-ext-500-normal.d362a132.woff2 b/frontend-dist/roboto-mono-cyrillic-ext-500-normal.d362a132.woff2 new file mode 100644 index 0000000000..b34eed9747 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-ext-500-normal.d362a132.woff2 differ diff --git a/frontend-dist/roboto-mono-cyrillic-ext-700-normal.5c7aabac.woff2 b/frontend-dist/roboto-mono-cyrillic-ext-700-normal.5c7aabac.woff2 new file mode 100644 index 0000000000..a89f2e8413 Binary files /dev/null and b/frontend-dist/roboto-mono-cyrillic-ext-700-normal.5c7aabac.woff2 differ diff --git a/frontend-dist/roboto-mono-greek-400-italic.6f7e0b2f.woff2 b/frontend-dist/roboto-mono-greek-400-italic.6f7e0b2f.woff2 new file mode 100644 index 0000000000..7bab226ca5 Binary files /dev/null and b/frontend-dist/roboto-mono-greek-400-italic.6f7e0b2f.woff2 differ diff --git a/frontend-dist/roboto-mono-greek-400-normal.dd843e41.woff2 b/frontend-dist/roboto-mono-greek-400-normal.dd843e41.woff2 new file mode 100644 index 0000000000..466f9ec13f Binary files /dev/null and b/frontend-dist/roboto-mono-greek-400-normal.dd843e41.woff2 differ diff --git a/frontend-dist/roboto-mono-greek-500-normal.dd57b097.woff2 b/frontend-dist/roboto-mono-greek-500-normal.dd57b097.woff2 new file mode 100644 index 0000000000..72f600238f Binary files /dev/null and b/frontend-dist/roboto-mono-greek-500-normal.dd57b097.woff2 differ diff --git a/frontend-dist/roboto-mono-greek-700-normal.b101f80c.woff2 b/frontend-dist/roboto-mono-greek-700-normal.b101f80c.woff2 new file mode 100644 index 0000000000..9ab1293a88 Binary files /dev/null and b/frontend-dist/roboto-mono-greek-700-normal.b101f80c.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-400-italic.ef82d48f.woff2 b/frontend-dist/roboto-mono-latin-400-italic.ef82d48f.woff2 new file mode 100644 index 0000000000..721ca2e93a Binary files /dev/null and b/frontend-dist/roboto-mono-latin-400-italic.ef82d48f.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-400-normal.cf1eee5f.woff2 b/frontend-dist/roboto-mono-latin-400-normal.cf1eee5f.woff2 new file mode 100644 index 0000000000..ed384d22fd Binary files /dev/null and b/frontend-dist/roboto-mono-latin-400-normal.cf1eee5f.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-500-normal.98ad1d4e.woff2 b/frontend-dist/roboto-mono-latin-500-normal.98ad1d4e.woff2 new file mode 100644 index 0000000000..01b58ed2c5 Binary files /dev/null and b/frontend-dist/roboto-mono-latin-500-normal.98ad1d4e.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-700-normal.447ac127.woff2 b/frontend-dist/roboto-mono-latin-700-normal.447ac127.woff2 new file mode 100644 index 0000000000..c89a6eb38c Binary files /dev/null and b/frontend-dist/roboto-mono-latin-700-normal.447ac127.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-ext-400-italic.aaa9a959.woff2 b/frontend-dist/roboto-mono-latin-ext-400-italic.aaa9a959.woff2 new file mode 100644 index 0000000000..9831c28b9e Binary files /dev/null and b/frontend-dist/roboto-mono-latin-ext-400-italic.aaa9a959.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-ext-400-normal.d9409874.woff2 b/frontend-dist/roboto-mono-latin-ext-400-normal.d9409874.woff2 new file mode 100644 index 0000000000..d4f9a09cca Binary files /dev/null and b/frontend-dist/roboto-mono-latin-ext-400-normal.d9409874.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-ext-500-normal.415f7d14.woff2 b/frontend-dist/roboto-mono-latin-ext-500-normal.415f7d14.woff2 new file mode 100644 index 0000000000..77a97cf73e Binary files /dev/null and b/frontend-dist/roboto-mono-latin-ext-500-normal.415f7d14.woff2 differ diff --git a/frontend-dist/roboto-mono-latin-ext-700-normal.c497b002.woff2 b/frontend-dist/roboto-mono-latin-ext-700-normal.c497b002.woff2 new file mode 100644 index 0000000000..9b733dd3cc Binary files /dev/null and b/frontend-dist/roboto-mono-latin-ext-700-normal.c497b002.woff2 differ diff --git a/frontend-dist/roboto-mono-vietnamese-400-italic.d8e0a32a.woff2 b/frontend-dist/roboto-mono-vietnamese-400-italic.d8e0a32a.woff2 new file mode 100644 index 0000000000..2ec55df09d Binary files /dev/null and b/frontend-dist/roboto-mono-vietnamese-400-italic.d8e0a32a.woff2 differ diff --git a/frontend-dist/roboto-mono-vietnamese-400-normal.306e7635.woff2 b/frontend-dist/roboto-mono-vietnamese-400-normal.306e7635.woff2 new file mode 100644 index 0000000000..2cf6dfc420 Binary files /dev/null and b/frontend-dist/roboto-mono-vietnamese-400-normal.306e7635.woff2 differ diff --git a/frontend-dist/roboto-mono-vietnamese-500-normal.1320bb60.woff2 b/frontend-dist/roboto-mono-vietnamese-500-normal.1320bb60.woff2 new file mode 100644 index 0000000000..3ab766e250 Binary files /dev/null and b/frontend-dist/roboto-mono-vietnamese-500-normal.1320bb60.woff2 differ diff --git a/frontend-dist/roboto-mono-vietnamese-700-normal.edb1435b.woff2 b/frontend-dist/roboto-mono-vietnamese-700-normal.edb1435b.woff2 new file mode 100644 index 0000000000..12357bd521 Binary files /dev/null and b/frontend-dist/roboto-mono-vietnamese-700-normal.edb1435b.woff2 differ diff --git a/frontend-dist/search.1ca5b3b3.svg b/frontend-dist/search.1ca5b3b3.svg new file mode 100644 index 0000000000..c6b864ae91 --- /dev/null +++ b/frontend-dist/search.1ca5b3b3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/share-outline.50164ded.svg b/frontend-dist/share-outline.50164ded.svg new file mode 100644 index 0000000000..601cb684ac --- /dev/null +++ b/frontend-dist/share-outline.50164ded.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/stop-circle-outline.6623356d.svg b/frontend-dist/stop-circle-outline.6623356d.svg new file mode 100644 index 0000000000..30addb7f98 --- /dev/null +++ b/frontend-dist/stop-circle-outline.6623356d.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/sync-circle-outline.65b15d76.svg b/frontend-dist/sync-circle-outline.65b15d76.svg new file mode 100644 index 0000000000..3b41a36e9b --- /dev/null +++ b/frontend-dist/sync-circle-outline.65b15d76.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/sync-outline.9a1bd27b.svg b/frontend-dist/sync-outline.9a1bd27b.svg new file mode 100644 index 0000000000..9f69e76f35 --- /dev/null +++ b/frontend-dist/sync-outline.9a1bd27b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/terminal-outline.79a23031.svg b/frontend-dist/terminal-outline.79a23031.svg new file mode 100644 index 0000000000..99c52751a3 --- /dev/null +++ b/frontend-dist/terminal-outline.79a23031.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/terminal.6b804248.svg b/frontend-dist/terminal.6b804248.svg new file mode 100644 index 0000000000..030b7bb4ef --- /dev/null +++ b/frontend-dist/terminal.6b804248.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/time-outline.7c1877f0.svg b/frontend-dist/time-outline.7c1877f0.svg new file mode 100644 index 0000000000..b4d1371332 --- /dev/null +++ b/frontend-dist/time-outline.7c1877f0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend-dist/vmsg.56bb9389.wasm b/frontend-dist/vmsg.56bb9389.wasm new file mode 100644 index 0000000000..224bcc7fd1 Binary files /dev/null and b/frontend-dist/vmsg.56bb9389.wasm differ diff --git a/frontend-dist/vollkorn.089565a8.css b/frontend-dist/vollkorn.089565a8.css new file mode 100644 index 0000000000..83907db83a --- /dev/null +++ b/frontend-dist/vollkorn.089565a8.css @@ -0,0 +1 @@ +@font-face{font-display:swap;font-family:Vollkorn;font-weight:600;src:url(Vollkorn-SemiBold.8072eb6c.woff2) format("woff2")}@font-face{font-display:swap;font-family:Vollkorn;font-style:italic;font-weight:600;src:url(Vollkorn-SemiBoldItalic.5c3cd265.woff2) format("woff2")}@font-face{font-display:swap;font-family:Vollkorn;font-weight:700;src:url(Vollkorn-Bold.6e1feb70.woff2) format("woff2")}@font-face{font-display:swap;font-family:Vollkorn;font-style:italic;font-weight:700;src:url(Vollkorn-BoldItalic.a48ab300.woff2) format("woff2")}@font-face{font-display:swap;font-family:Vollkorn;font-weight:900;src:url(Vollkorn-Black.0ebdfbf5.woff2) format("woff2")}@font-face{font-display:swap;font-family:Vollkorn;font-style:italic;font-weight:900;src:url(Vollkorn-BlackItalic.4095acfe.woff2) format("woff2")} \ No newline at end of file diff --git a/frontend-dist/warning-outline.d84ed9e8.svg b/frontend-dist/warning-outline.d84ed9e8.svg new file mode 100644 index 0000000000..df490bfa15 --- /dev/null +++ b/frontend-dist/warning-outline.d84ed9e8.svg @@ -0,0 +1 @@ + \ No newline at end of file