diff --git a/3rdpartylicenses.txt b/3rdpartylicenses.txt new file mode 100644 index 0000000..283a599 --- /dev/null +++ b/3rdpartylicenses.txt @@ -0,0 +1,928 @@ +@angular/common +MIT + +@angular/core +MIT + +@angular/forms +MIT + +@angular/platform-browser +MIT + +@angular/router +MIT + +@mapbox/fusspot +BSD 2-Clause +Copyright (c) 2018 Mapbox, Inc. +This code available under the terms of the BSD 2-Clause license. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +@mapbox/mapbox-gl-geocoder +ISC +Copyright (c) 2016, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +@mapbox/mapbox-sdk +BSD-2-Clause +Copyright (c) 2018, Mapbox +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. + +@mapbox/parse-mapbox-token +BSD-2-Clause +BSD 2-Clause License + +Copyright (c) 2018, Mapbox +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +@ngneat/until-destroy +MIT + +base-64 +MIT +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +d3-array +ISC +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-axis +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-color +ISC +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-dispatch +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-drag +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-ease +BSD-3-Clause +Copyright 2010-2021 Mike Bostock +Copyright 2001 Robert Penner +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +d3-interpolate +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-scale +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-selection +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-time +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-time-format +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-timer +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-transition +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +d3-zoom +ISC +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +dayjs +MIT +MIT License + +Copyright (c) 2018-present, iamkun + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +eventemitter3 +MIT +The MIT License (MIT) + +Copyright (c) 2014 Arnout Kazemier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +events +MIT +MIT + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +fuzzy +MIT +Copyright (c) 2012 Matt York + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +is-plain-obj +MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +lodash.debounce +MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +mapbox-gl +SEE LICENSE IN LICENSE.txt + +marked +MIT +# License information + +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `` + +## Marked + +Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## Markdown + +Copyright © 2004, John Gruber +http://daringfireball.net/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. + + +nanoid +MIT +The MIT License (MIT) + +Copyright 2017 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +rxjs +Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + 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. + + + +subtag +ISC +## ISC License + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +suggestions +ISC +Copyright (c) 2015, tristen + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +xtend +MIT +The MIT License (MIT) +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +zone.js +MIT +The MIT License + +Copyright (c) 2010-2023 Google LLC. https://angular.io/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/404.html b/404.html new file mode 100644 index 0000000..8451b29 --- /dev/null +++ b/404.html @@ -0,0 +1,24 @@ + + + + + Speculative Tourism Timeline + + + + + + + + + + + + + + + + + + + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..8f0b5f7 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +www.chronomaps.net \ No newline at end of file diff --git a/arrow-next.e5fa61535aa55d94.svg b/arrow-next.e5fa61535aa55d94.svg new file mode 100644 index 0000000..983adaf --- /dev/null +++ b/arrow-next.e5fa61535aa55d94.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/fonts/manrope.ttf b/assets/fonts/manrope.ttf new file mode 100644 index 0000000..f41386f Binary files /dev/null and b/assets/fonts/manrope.ttf differ diff --git a/assets/img/404.png b/assets/img/404.png new file mode 100644 index 0000000..8095bdb Binary files /dev/null and b/assets/img/404.png differ diff --git a/assets/img/arrow-next.svg b/assets/img/arrow-next.svg new file mode 100644 index 0000000..983adaf --- /dev/null +++ b/assets/img/arrow-next.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/img/button-back.svg b/assets/img/button-back.svg new file mode 100644 index 0000000..b7f2d5c --- /dev/null +++ b/assets/img/button-back.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/button-close.svg b/assets/img/button-close.svg new file mode 100644 index 0000000..400045d --- /dev/null +++ b/assets/img/button-close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/detail-button-close.svg b/assets/img/detail-button-close.svg new file mode 100644 index 0000000..b8ea6dc --- /dev/null +++ b/assets/img/detail-button-close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/globe-logo-left.svg b/assets/img/globe-logo-left.svg new file mode 100644 index 0000000..0bd36e1 --- /dev/null +++ b/assets/img/globe-logo-left.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/img/globe-logo-up.svg b/assets/img/globe-logo-up.svg new file mode 100644 index 0000000..9ca6c19 --- /dev/null +++ b/assets/img/globe-logo-up.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/img/icon-add-new.svg b/assets/img/icon-add-new.svg new file mode 100644 index 0000000..7105e06 --- /dev/null +++ b/assets/img/icon-add-new.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/icon-audio-clip.svg b/assets/img/icon-audio-clip.svg new file mode 100644 index 0000000..a8f59f3 --- /dev/null +++ b/assets/img/icon-audio-clip.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-calendar.svg b/assets/img/icon-calendar.svg new file mode 100644 index 0000000..e69de29 diff --git a/assets/img/icon-chevron-up.svg b/assets/img/icon-chevron-up.svg new file mode 100644 index 0000000..f8ad571 --- /dev/null +++ b/assets/img/icon-chevron-up.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/icon-detail-audio.svg b/assets/img/icon-detail-audio.svg new file mode 100644 index 0000000..74a07ad --- /dev/null +++ b/assets/img/icon-detail-audio.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-detail-image.svg b/assets/img/icon-detail-image.svg new file mode 100644 index 0000000..6cd249d --- /dev/null +++ b/assets/img/icon-detail-image.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-detail-instagram.svg b/assets/img/icon-detail-instagram.svg new file mode 100644 index 0000000..f023090 --- /dev/null +++ b/assets/img/icon-detail-instagram.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-detail-twitter.svg b/assets/img/icon-detail-twitter.svg new file mode 100644 index 0000000..ec16696 --- /dev/null +++ b/assets/img/icon-detail-twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-detail-video.svg b/assets/img/icon-detail-video.svg new file mode 100644 index 0000000..98fa97b --- /dev/null +++ b/assets/img/icon-detail-video.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-detail-wikipedia.svg b/assets/img/icon-detail-wikipedia.svg new file mode 100644 index 0000000..a13e0be --- /dev/null +++ b/assets/img/icon-detail-wikipedia.svg @@ -0,0 +1,4 @@ + + + diff --git a/assets/img/icon-image.svg b/assets/img/icon-image.svg new file mode 100644 index 0000000..07e36a8 --- /dev/null +++ b/assets/img/icon-image.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-instagram.svg b/assets/img/icon-instagram.svg new file mode 100644 index 0000000..31237eb --- /dev/null +++ b/assets/img/icon-instagram.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-layers.svg b/assets/img/icon-layers.svg new file mode 100644 index 0000000..5335025 --- /dev/null +++ b/assets/img/icon-layers.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/img/icon-map-exit-fullscreen.svg b/assets/img/icon-map-exit-fullscreen.svg new file mode 100644 index 0000000..7017f37 --- /dev/null +++ b/assets/img/icon-map-exit-fullscreen.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/icon-map-fullscreen.svg b/assets/img/icon-map-fullscreen.svg new file mode 100644 index 0000000..eee89ce --- /dev/null +++ b/assets/img/icon-map-fullscreen.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/icon-pin.svg b/assets/img/icon-pin.svg new file mode 100644 index 0000000..4c77433 --- /dev/null +++ b/assets/img/icon-pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-red-check.svg b/assets/img/icon-red-check.svg new file mode 100644 index 0000000..4349386 --- /dev/null +++ b/assets/img/icon-red-check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/icon-scroll-down.svg b/assets/img/icon-scroll-down.svg new file mode 100644 index 0000000..d894e38 --- /dev/null +++ b/assets/img/icon-scroll-down.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/icon-time-line-audio.svg b/assets/img/icon-time-line-audio.svg new file mode 100644 index 0000000..a8f59f3 --- /dev/null +++ b/assets/img/icon-time-line-audio.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-time-line-image.svg b/assets/img/icon-time-line-image.svg new file mode 100644 index 0000000..07e36a8 --- /dev/null +++ b/assets/img/icon-time-line-image.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-time-line-instagram.svg b/assets/img/icon-time-line-instagram.svg new file mode 100644 index 0000000..31237eb --- /dev/null +++ b/assets/img/icon-time-line-instagram.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-time-line-twitter.svg b/assets/img/icon-time-line-twitter.svg new file mode 100644 index 0000000..c1d0f27 --- /dev/null +++ b/assets/img/icon-time-line-twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-time-line-video.svg b/assets/img/icon-time-line-video.svg new file mode 100644 index 0000000..c6c9a5e --- /dev/null +++ b/assets/img/icon-time-line-video.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-time-line-wikipedia.svg b/assets/img/icon-time-line-wikipedia.svg new file mode 100644 index 0000000..49073e7 --- /dev/null +++ b/assets/img/icon-time-line-wikipedia.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-twitter.svg b/assets/img/icon-twitter.svg new file mode 100644 index 0000000..c1d0f27 --- /dev/null +++ b/assets/img/icon-twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-wikipedia.svg b/assets/img/icon-wikipedia.svg new file mode 100644 index 0000000..49073e7 --- /dev/null +++ b/assets/img/icon-wikipedia.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/icon-youtube.svg b/assets/img/icon-youtube.svg new file mode 100644 index 0000000..fdd3d03 --- /dev/null +++ b/assets/img/icon-youtube.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/og-image.png b/assets/img/og-image.png new file mode 100644 index 0000000..2953011 Binary files /dev/null and b/assets/img/og-image.png differ diff --git a/assets/img/player-control-pause.svg b/assets/img/player-control-pause.svg new file mode 100644 index 0000000..9050e42 --- /dev/null +++ b/assets/img/player-control-pause.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/img/player-control-play.svg b/assets/img/player-control-play.svg new file mode 100644 index 0000000..5d362a2 --- /dev/null +++ b/assets/img/player-control-play.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/img/player-placeholder.png b/assets/img/player-placeholder.png new file mode 100644 index 0000000..5a57b08 Binary files /dev/null and b/assets/img/player-placeholder.png differ diff --git a/assets/img/spectours-ig-comment-icon.svg b/assets/img/spectours-ig-comment-icon.svg new file mode 100644 index 0000000..8ea1e6d --- /dev/null +++ b/assets/img/spectours-ig-comment-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-ig-heart-icon.svg b/assets/img/spectours-ig-heart-icon.svg new file mode 100644 index 0000000..afeb743 --- /dev/null +++ b/assets/img/spectours-ig-heart-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-ig-logo.svg b/assets/img/spectours-ig-logo.svg new file mode 100644 index 0000000..beeebb6 --- /dev/null +++ b/assets/img/spectours-ig-logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/spectours-ig-save-icon.svg b/assets/img/spectours-ig-save-icon.svg new file mode 100644 index 0000000..cbaaf41 --- /dev/null +++ b/assets/img/spectours-ig-save-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-ig-share-icon.svg b/assets/img/spectours-ig-share-icon.svg new file mode 100644 index 0000000..e9566de --- /dev/null +++ b/assets/img/spectours-ig-share-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-ig-view-profile.svg b/assets/img/spectours-ig-view-profile.svg new file mode 100644 index 0000000..73d5464 --- /dev/null +++ b/assets/img/spectours-ig-view-profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/spectours-timeline-dots.svg b/assets/img/spectours-timeline-dots.svg new file mode 100644 index 0000000..62a9b1c --- /dev/null +++ b/assets/img/spectours-timeline-dots.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-twitter-comment-icon.svg b/assets/img/spectours-twitter-comment-icon.svg new file mode 100644 index 0000000..8a0d4cf --- /dev/null +++ b/assets/img/spectours-twitter-comment-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-twitter-heart-icon.svg b/assets/img/spectours-twitter-heart-icon.svg new file mode 100644 index 0000000..bb71701 --- /dev/null +++ b/assets/img/spectours-twitter-heart-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-twitter-info-icon.svg b/assets/img/spectours-twitter-info-icon.svg new file mode 100644 index 0000000..c2b09ac --- /dev/null +++ b/assets/img/spectours-twitter-info-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/spectours-twitter-logo.svg b/assets/img/spectours-twitter-logo.svg new file mode 100644 index 0000000..2b8d8b7 --- /dev/null +++ b/assets/img/spectours-twitter-logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/spectours-wikipedia-logo.png b/assets/img/spectours-wikipedia-logo.png new file mode 100644 index 0000000..e898f09 Binary files /dev/null and b/assets/img/spectours-wikipedia-logo.png differ diff --git a/assets/img/st_logo.svg b/assets/img/st_logo.svg new file mode 100644 index 0000000..2be331a --- /dev/null +++ b/assets/img/st_logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/img/wawb-close.svg b/assets/img/wawb-close.svg new file mode 100644 index 0000000..354554e --- /dev/null +++ b/assets/img/wawb-close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/img/wawb-info-icon.svg b/assets/img/wawb-info-icon.svg new file mode 100644 index 0000000..0fef114 --- /dev/null +++ b/assets/img/wawb-info-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/detail-button-close.da2e963000196751.svg b/detail-button-close.da2e963000196751.svg new file mode 100644 index 0000000..b8ea6dc --- /dev/null +++ b/detail-button-close.da2e963000196751.svg @@ -0,0 +1,4 @@ + + + + diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..4aca222 Binary files /dev/null and b/favicon.ico differ diff --git a/favicons/android-chrome-192x192-1.png b/favicons/android-chrome-192x192-1.png new file mode 100644 index 0000000..546c96a Binary files /dev/null and b/favicons/android-chrome-192x192-1.png differ diff --git a/favicons/android-chrome-192x192.png b/favicons/android-chrome-192x192.png new file mode 100644 index 0000000..e04fde2 Binary files /dev/null and b/favicons/android-chrome-192x192.png differ diff --git a/favicons/android-chrome-512x512.png b/favicons/android-chrome-512x512.png new file mode 100644 index 0000000..cf6378d Binary files /dev/null and b/favicons/android-chrome-512x512.png differ diff --git a/favicons/apple-touch-icon.png b/favicons/apple-touch-icon.png new file mode 100644 index 0000000..6738c6e Binary files /dev/null and b/favicons/apple-touch-icon.png differ diff --git a/favicons/favicon-16x16.png b/favicons/favicon-16x16.png new file mode 100644 index 0000000..c078df4 Binary files /dev/null and b/favicons/favicon-16x16.png differ diff --git a/favicons/favicon-32x32.png b/favicons/favicon-32x32.png new file mode 100644 index 0000000..41d6e57 Binary files /dev/null and b/favicons/favicon-32x32.png differ diff --git a/icon-map-exit-fullscreen.8072977c6263c547.svg b/icon-map-exit-fullscreen.8072977c6263c547.svg new file mode 100644 index 0000000..7017f37 --- /dev/null +++ b/icon-map-exit-fullscreen.8072977c6263c547.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icon-map-fullscreen.156322c5e53dd53a.svg b/icon-map-fullscreen.156322c5e53dd53a.svg new file mode 100644 index 0000000..eee89ce --- /dev/null +++ b/icon-map-fullscreen.156322c5e53dd53a.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icon-red-check.7e35a1bfc3ab3329.svg b/icon-red-check.7e35a1bfc3ab3329.svg new file mode 100644 index 0000000..4349386 --- /dev/null +++ b/icon-red-check.7e35a1bfc3ab3329.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icon-scroll-down.c5242ae5ac022d04.svg b/icon-scroll-down.c5242ae5ac022d04.svg new file mode 100644 index 0000000..d894e38 --- /dev/null +++ b/icon-scroll-down.c5242ae5ac022d04.svg @@ -0,0 +1,4 @@ + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..8451b29 --- /dev/null +++ b/index.html @@ -0,0 +1,24 @@ + + + + + Speculative Tourism Timeline + + + + + + + + + + + + + + + + + + + diff --git a/main.1199c26566d54d19.js b/main.1199c26566d54d19.js new file mode 100644 index 0000000..00aa7c7 --- /dev/null +++ b/main.1199c26566d54d19.js @@ -0,0 +1 @@ +(self.webpackChunkchronomaps=self.webpackChunkchronomaps||[]).push([[179],{406:(zt,St,ze)=>{"use strict";var st=ze(564),ke=ze(498),h="\n ",W={};function ye(ft){var oe=Array.isArray(ft);return function(Se){var Ce=Me(W.plainArray,Se);if(Ce)return Ce;if(oe&&Se.length!==ft.length)return"an array with "+ft.length+" items";for(var Ye=0;YeCe.length?Ye:Ce})}},W.equal=function(oe){return function(ot){if(ot!==oe)return JSON.stringify(oe)}},W.oneOf=function(){var Ge=(Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments)).map(function(ot){return W.equal(ot)});return W.oneOfType.apply(this,Ge)},W.range=function(oe){var Ge=oe[0],ot=oe[1];return function(Ce){if(Me(W.number,Ce)||Ceot)return"number between "+Ge+" & "+ot+" (inclusive)"}},W.any=function(){},W.boolean=function(oe){if("boolean"!=typeof oe)return"boolean"},W.number=function(oe){if("number"!=typeof oe)return"number"},W.plainArray=function(oe){if(!Array.isArray(oe))return"array"},W.plainObject=function(oe){if(!st(oe))return"object"},W.string=function(oe){if("string"!=typeof oe)return"string"},W.func=function(oe){if("function"!=typeof oe)return"function"},W.validate=Me,W.processMessage=xe,zt.exports=W},564:zt=>{"use strict";var St=Object.prototype.toString;zt.exports=function(ze){var st;return"[object Object]"===St.call(ze)&&(null===(st=Object.getPrototypeOf(ze))||st===Object.getPrototypeOf({}))}},805:(zt,St,ze)=>{"use strict";var st=ze(630).x0;function ke(we){this.origin=we.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=we.accessToken,this.version="0.2.0",this.sessionID=this.generateSessionID(),this.userAgent=this.getUserAgent(),this.options=we,this.send=this.send.bind(this),this.countries=we.countries?we.countries.split(","):null,this.types=we.types?we.types.split(","):null,this.bbox=we.bbox?we.bbox:null,this.language=we.language?we.language.split(","):null,this.limit=we.limit?+we.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(we),this.eventQueue=new Array,this.flushInterval=we.flushInterval||1e3,this.maxQueueSize=we.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}ke.prototype={select:function(we,h){var W=this.getSelectedIndex(we,h),ye=this.getEventPayload("search.select",h);if(ye.resultIndex=W,ye.resultPlaceName=we.place_name,ye.resultId=we.id,(W!==this.lastSentIndex||ye.queryString!==this.lastSentInput)&&-1!=W&&(this.lastSentIndex=W,this.lastSentInput=ye.queryString,ye.queryString))return this.push(ye)},start:function(we){var h=this.getEventPayload("search.start",we);if(h.queryString)return this.push(h)},keyevent:function(we,h){if(we.key&&!we.metaKey&&-1===[9,27,37,39,13,38,40].indexOf(we.keyCode)){var W=this.getEventPayload("search.keystroke",h);if(W.lastAction=we.key,W.queryString)return this.push(W)}},send:function(we,h){if(!this.enableEventLogging)return h?h():void 0;var W=this.getRequestOptions(we);this.request(W,function(ye){return ye?this.handleError(ye,h):h?h():void 0}.bind(this))},getRequestOptions:function(we){return Array.isArray(we)||(we=[we]),{method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(we)}},getEventPayload:function(we,h){var W;W=h.options.proximity?"object"==typeof h.options.proximity?[h.options.proximity.longitude,h.options.proximity.latitude]:"ip"===h.options.proximity?[999,999]:h.options.proximity:null;var ye=h._map?h._map.getZoom():void 0,Me={event:we,created:+new Date,sessionIdentifier:this.sessionID,country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:h.options.autocomplete,fuzzyMatch:h.options.fuzzyMatch,proximity:W,limit:h.options.limit,routing:h.options.routing,worldview:h.options.worldview,mapZoom:ye,keyboardLocale:this.locale};return Me.queryString="search.select"===we?h.inputString:"search.select"!=we&&h._inputEl?h._inputEl.value:h.inputString,Me},request:function(we,h){var W=new XMLHttpRequest;for(var ye in W.onreadystatechange=function(){if(4==this.readyState)return h(204==this.status?null:this.statusText)},W.open(we.method,we.host+"/"+we.path,!0),we.headers)W.setRequestHeader(ye,we.headers[ye]);W.send(we.body)},handleError:function(we,h){if(h)return h(we)},generateSessionID:function(){return st()},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(we,h){if(h._typeahead){var ye=we.id;return h._typeahead.data.map(function(Ae){return Ae.id}).indexOf(ye)}},shouldEnableLogging:function(we){return!(!1===we.enableEventLogging||we.origin&&"https://api.mapbox.com"!==we.origin||we.localGeocoder||we.filter)},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(we,h){this.eventQueue.push(we),(this.eventQueue.length>=this.maxQueueSize||h)&&this.flush()},remove:function(){this.flush()}},zt.exports=ke},280:zt=>{zt.exports={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}}},272:zt=>{function St(){}St.prototype={isSupport:function(){return!!window.navigator.geolocation},getCurrentPosition:function(){const ze={enableHighAccuracy:!0};return new Promise(function(st,ke){window.navigator.geolocation.getCurrentPosition(st,ke,ze)})}},zt.exports=St},904:(zt,St,ze)=>{"use strict";var st=ze(28),ke=ze(220),we=ze(498),h=ze(16).EventEmitter,W=ze(280),ye=ze(658),Me=ze(725),xe=ze(805),Ae=ze(251),ct=ze(681),Vt=ze(272),Qe=ze(485);function ft(oe){this._eventEmitter=new h,this.options=we({},this.options,oe),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new Vt}ft.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",getItemValue:function(oe){return oe.place_name},render:function(oe){var Ge=oe.place_name.split(",");return'
'+Ge[0]+'
'+Ge.splice(1,Ge.length).join(",")+"
"}},addTo:function(oe){function Ge(ot,Se){if(!document.body.contains(Se))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const Ce=ot.onAdd();Se.appendChild(Ce)}if(oe._controlContainer)oe.addControl(this);else if(oe instanceof HTMLElement)Ge(this,oe);else{if("string"!=typeof oe)throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element");{const ot=document.querySelectorAll(oe);if(0===ot.length)throw new Error("Element ",oe,"not found.");if(ot.length>1)throw new Error("Geocoder can only be added to a single html element");Ge(this,ot[0])}}},onAdd:function(oe){if(oe&&"string"!=typeof oe&&(this._map=oe),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=Me(ye({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new xe(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this);var Ge=this.container=document.createElement("div");Ge.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var ot=this.createIcon("search",'');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",ke(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",function(Pt){this.eventManager.keyevent(Pt,this)}.bind(this));var Se=document.createElement("div");Se.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var Ce=this.createIcon("close",'');if(this._clearEl.appendChild(Ce),this._loadingEl=this.createIcon("loading",''),Se.appendChild(this._clearEl),Se.appendChild(this._loadingEl),Ge.appendChild(ot),Ge.appendChild(this._inputEl),Ge.appendChild(Se),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var Ye=this.createIcon("geolocate",'');this._geolocateEl.appendChild(Ye),Se.appendChild(this._geolocateEl),this._showGeolocateButton()}var Ee=this._typeahead=new st(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit});this.setRenderFunction(this.options.render),Ee.getItemValue=this.options.getItemValue;var ut=Ee.list.draw,vt=this._footerNode=function bt(){var oe=document.createElement("div");return oe.className="mapboxgl-ctrl-geocoder--powered-by",oe.innerHTML='Powered by Mapbox',oe}();return Ee.list.draw=function(){ut.call(this),vt.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),vt.addEventListener("mouseup",function(){this.selectingListItem=!1}.bind(this)),this.element.appendChild(vt)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),Ge},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then(function(oe){this._hideLoadingIcon();const Ge={geometry:{type:"Point",coordinates:[oe.coords.longitude,oe.coords.latitude]}};this._handleMarker(Ge),this._fly(Ge),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(Ge),this._showClearButton(),this.fresh=!1;const ot={limit:1,language:[this.options.language],query:Ge.geometry.coordinates,types:["address"]};this.options.localGeocoderOnly?(this._setInputValue(Ge.geometry.coordinates[0]+","+Ge.geometry.coordinates[1]),this._eventEmitter.emit("result",{result:Ge})):this.geocoderService.reverseGeocode(ot).send().then(function(Se){const Ce=Se.body.features[0];if(Ce){const Ye=Qe.transformFeatureToGeolocationText(Ce,this.options.addressAccuracy);this._setInputValue(Ye),Ce.user_coordinates=Ge.geometry.coordinates,this._eventEmitter.emit("result",{result:Ce})}else this._eventEmitter.emit("result",{result:{user_coordinates:Ge.geometry.coordinates}})}.bind(this))}.bind(this)).catch(function(oe){1===oe.code?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}.bind(this))},createIcon:function(oe,Ge){var ot=document.createElementNS("http://www.w3.org/2000/svg","svg");return ot.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+oe),ot.setAttribute("viewBox","0 0 18 18"),ot.setAttribute("xml:space","preserve"),ot.setAttribute("width",18),ot.setAttribute("height",18),ot.innerHTML=Ge,ot},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(oe){this._inputEl.value=oe,setTimeout(function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}.bind(this),1)},_onPaste:function(oe){var Ge=(oe.clipboardData||window.clipboardData).getData("text");Ge.length>=this.options.minLength&&this._geocode(Ge)},_onKeyDown:function(oe){var Ge=27,ot=9;if(oe.keyCode===Ge&&this.options.clearAndBlurOnEsc)return this._clear(oe),this._inputEl.blur();var Se=oe.target&&oe.target.shadowRoot?oe.target.shadowRoot.activeElement:oe.target;if(!Se||!Se.value)return this.fresh=!0,oe.keyCode!==ot&&this.clear(oe),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!oe.metaKey&&-1===[ot,Ge,37,39,13,38,40].indexOf(oe.keyCode)&&Se.value.length>=this.options.minLength&&this._geocode(Se.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(oe){this.options.clearOnBlur&&this._clearOnBlur(oe),this.options.collapsed&&this._collapse()},_onChange:function(){var oe=this._typeahead.selected;oe&&JSON.stringify(oe)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(oe),this.options.marker&&this._mapboxgl&&this._handleMarker(oe),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(oe),this._eventEmitter.emit("result",{result:oe}),this.eventManager.select(oe,this))},_fly:function(oe){var Ge;if(oe.properties&&W[oe.properties.short_code])Ge=we({},this.options.flyTo),this._map&&this._map.fitBounds(W[oe.properties.short_code].bbox,Ge);else if(oe.bbox){var ot=oe.bbox;Ge=we({},this.options.flyTo),this._map&&this._map.fitBounds([[ot[0],ot[1]],[ot[2],ot[3]]],Ge)}else Ge=we({},{zoom:this.options.zoom},this.options.flyTo),oe.center?Ge.center=oe.center:oe.geometry&&oe.geometry.type&&"Point"===oe.geometry.type&&oe.geometry.coordinates&&(Ge.center=oe.geometry.coordinates),this._map&&this._map.flyTo(Ge)},_requestType:function(oe,Ge){return oe.localGeocoderOnly?1:oe.reverseGeocode&&Qe.REVERSE_GEOCODE_COORD_RGX.test(Ge)?2:0},_setupConfig:function(oe,Ge){const Se=/[\s,]+/;var Ce=this,Ye=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"].reduce(function(ut,vt){return null==Ce.options[vt]||(ut[vt]=["countries","types","language"].indexOf(vt)>-1?Ce.options[vt].split(Se):Ce.options[vt],"proximity"===vt&&"number"==typeof Ce.options[vt].longitude&&"number"==typeof Ce.options[vt].latitude&&(ut[vt]=[Ce.options[vt].longitude,Ce.options[vt].latitude])),ut},{});switch(oe){case 2:var Ee=Ge.split(Se).map(function(ut){return parseFloat(ut,10)});Ce.options.flipCoordinates||Ee.reverse(),Ye=we(Ye,{query:Ee,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(ut){ut in Ye&&delete Ye[ut]});break;case 0:{const ut=Ge.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(ut)&&(Ge=Ge.replace(/,/g," ")),Ye=we(Ye,{query:Ge})}}return Ye},_geocode:function(oe){this.inputString=oe,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:oe});const Ge=this._requestType(this.options,oe),ot=this._setupConfig(Ge,oe);var Se;switch(Ge){case 1:Se=Promise.resolve();break;case 0:Se=this.geocoderService.forwardGeocode(ot).send();break;case 2:Se=this.geocoderService.reverseGeocode(ot).send()}var Ce=this.options.localGeocoder&&this.options.localGeocoder(oe)||[],Ye=[],Ee=null;return Se.catch(function(ut){Ee=ut}.bind(this)).then(function(ut){this._hideLoadingIcon();var vt={};return ut?"200"==ut.statusCode&&((vt=ut.body).request=ut.request,vt.headers=ut.headers):vt={type:"FeatureCollection",features:[]},vt.config=ot,this.fresh&&(this.eventManager.start(this),this.fresh=!1),vt.features=vt.features?Ce.concat(vt.features):Ce,this.options.externalGeocoder?(Ye=this.options.externalGeocoder(oe,vt.features)||Promise.resolve([])).then(function(Pt){return vt.features=vt.features?Pt.concat(vt.features):Pt,vt},function(){return vt}):vt}.bind(this)).then(function(ut){if(Ee)throw Ee;this.options.filter&&ut.features.length&&(ut.features=ut.features.filter(this.options.filter)),ut.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",ut),this._typeahead.update(ut.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",ut))}.bind(this)).catch(function(ut){this._hideLoadingIcon(),this._hideAttribution(),Ce.length&&this.options.localGeocoder||Ye.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(Ce)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:Ce}),this._eventEmitter.emit("error",{error:ut})}.bind(this)),Se},_clear:function(oe){oe&&oe.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(oe){this._clear(oe),this._inputEl.focus()},_clearOnBlur:function(oe){oe.relatedTarget&&this._clear(oe)},_onQueryResult:function(oe){var Ge=oe.body;if(Ge.features.length){var ot=Ge.features[0];this._typeahead.selected=ot,this._inputEl.value=ot.place_name,this._onChange()}},_updateProximity:function(){if(this._map&&this.options.trackProximity)if(this._map.getZoom()>9){var oe=this._map.getCenter().wrap();this.setProximity({longitude:oe.lng,latitude:oe.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(oe){return this._geocode(oe).then(this._onQueryResult),this},_renderError:function(){this._renderMessage("
There was an error reaching the server
")},_renderLocationError:function(){this._renderMessage("
A location error has occurred
")},_renderNoResults:function(){this._renderMessage("
No results found
")},_renderUserDeniedGeolocationError:function(){this._renderMessage("
Geolocation permission denied
")},_renderMessage:function(oe){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(oe)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var oe=this.options.language.split(",")[0],Ge=ct.language(oe),ot=Ae.placeholder[Ge];if(ot)return ot}return"Search"},setInput:function(oe){return this._inputEl.value=oe,this._typeahead.selected=null,this._typeahead.clear(),oe.length>=this.options.minLength&&this._geocode(oe),this},setProximity:function(oe,Ge=!0){return this.options.proximity=oe,Ge&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(oe){return oe&&"function"==typeof oe&&(this._typeahead.render=oe),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(oe){var Ge=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=oe||this.options.language||Ge,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(oe){return this.options.zoom=oe,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(oe){return this.options.flyTo=oe,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(oe){return this.placeholder=oe||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(oe){return this.options.bbox=oe,this},getCountries:function(){return this.options.countries},setCountries:function(oe){return this.options.countries=oe,this},getTypes:function(){return this.options.types},setTypes:function(oe){return this.options.types=oe,this},getMinLength:function(){return this.options.minLength},setMinLength:function(oe){return this.options.minLength=oe,this._typeahead&&(this._typeahead.options.minLength=oe),this},getLimit:function(){return this.options.limit},setLimit:function(oe){return this.options.limit=oe,this._typeahead&&(this._typeahead.options.limit=oe),this},getFilter:function(){return this.options.filter},setFilter:function(oe){return this.options.filter=oe,this},setOrigin:function(oe){return this.options.origin=oe,this.geocoderService=Me(ye({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(oe){return this.options.accessToken=oe,this.geocoderService=Me(ye({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(oe){return this.options.autocomplete=oe,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(oe){return this.options.fuzzyMatch=oe,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(oe){return this.options.routing=oe,this},getRouting:function(){return this.options.routing},setWorldview:function(oe){return this.options.worldview=oe,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(oe){if(this._map){this._removeMarker();var ot=we({},{color:"#4668F2"},this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(ot),oe.center?this.mapMarker.setLngLat(oe.center).addTo(this._map):oe.geometry&&oe.geometry.type&&"Point"===oe.geometry.type&&oe.geometry.coordinates&&this.mapMarker.setLngLat(oe.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(oe,Ge){return this._eventEmitter.on(oe,Ge),this},off:function(oe,Ge){return this._eventEmitter.removeListener(oe,Ge),this.eventManager.remove(),this}},zt.exports=ft},251:zt=>{"use strict";zt.exports={placeholder:{de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"\u05dc\u05d7\u05e4\u05e9",ja:"\u30b5\u30fc\u30c1",lv:"Mekl\u0113t",pt:"Procurar",sr:"\u041f\u0440\u0435\u0442\u0440\u0430\u0433\u0430",zh:"\u641c\u7d22",cs:"Vyhled\xe1v\xe1n\xed",hu:"Keres\xe9s",ka:"\u10eb\u10d8\u10d4\u10d1\u10d0",nb:"S\xf8ke",sk:"Vyh\u013ead\xe1vanie",th:"\u0e04\u0e49\u0e19\u0e2b\u0e32",fi:"Hae",is:"Leita",ko:"\uc218\uc0c9",pl:"Szukaj",sl:"Iskanje",fa:"\u062c\u0633\u062a\u062c\u0648",ru:"\u041f\u043e\u0438\u0441\u043a"}}},485:zt=>{function ze(ke){const we=ke.address||"",h=ke.text||"",W=ke.place_name||"",Me={address:W.split(",")[0],houseNumber:we,street:h,placeName:W};return ke.context.forEach(function(xe){const Ae=xe.id.split(".")[0];Me[Ae]=xe.text}),Me}zt.exports={transformFeatureToGeolocationText:function St(ke,we){const h=ze(ke),W=["address","street","place","country"];if("function"==typeof we)return we(h);const Me=W.indexOf(we);return(-1===Me?W:W.slice(Me)).reduce(function(xe,Ae){return h[Ae]?(""!==xe&&(xe+=", "),xe+h[Ae]):xe},"")},getAddressInfo:ze,REVERSE_GEOCODE_COORD_RGX:/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/}},658:(zt,St,ze)=>{"use strict";var st=ze(819);zt.exports=st},819:(zt,St,ze)=>{"use strict";var st=ze(561),ke=ze(983);function we(W){ke.call(this,W)}(we.prototype=Object.create(ke.prototype)).constructor=we,we.prototype.sendRequest=st.browserSend,we.prototype.abortRequest=st.browserAbort,zt.exports=function h(W){return new we(W)}},561:(zt,St,ze)=>{"use strict";var st=ze(896),ke=ze(43),we=ze(889),h=ze(17),W={};function xe(Qe){var It=Qe.total,bt=Qe.loaded;return{total:It,transferred:bt,percent:100*bt/It}}function Ae(Qe,It){return new Promise(function(bt,ft){It.onprogress=function(ot){Qe.emitter.emit(we.EVENT_PROGRESS_DOWNLOAD,xe(ot))};var oe=Qe.file;oe&&(It.upload.onprogress=function(ot){Qe.emitter.emit(we.EVENT_PROGRESS_UPLOAD,xe(ot))}),It.onerror=function(ot){ft(ot)},It.onabort=function(){var ot=new ke({request:Qe,type:we.ERROR_REQUEST_ABORTED});ft(ot)},It.onload=function(){if(delete W[Qe.id],It.status<200||It.status>=400){var ot=new ke({request:Qe,body:It.response,statusCode:It.status});ft(ot)}else bt(It)};var Ge=Qe.body;"string"==typeof Ge?It.send(Ge):Ge?It.send(JSON.stringify(Ge)):oe?It.send(oe):It.send(),W[Qe.id]=It}).then(function(bt){return function Me(Qe,It){return new st(Qe,{body:It.response,headers:h(It.getAllResponseHeaders()),statusCode:It.status})}(Qe,bt)})}function ct(Qe,It){var bt=Qe.url(It),ft=new window.XMLHttpRequest;return ft.open(Qe.method,bt),Object.keys(Qe.headers).forEach(function(oe){ft.setRequestHeader(oe,Qe.headers[oe])}),ft}zt.exports={browserAbort:function ye(Qe){var It=W[Qe.id];It&&(It.abort(),delete W[Qe.id])},sendRequestXhr:Ae,browserSend:function Vt(Qe){return Promise.resolve().then(function(){var It=ct(Qe,Qe.client.accessToken);return Ae(Qe,It)})},createRequestXhr:ct}},983:(zt,St,ze)=>{"use strict";var st=ze(746),ke=ze(323),we=ze(889);function h(W){if(!W||!W.accessToken)throw new Error("Cannot create a client without an access token");st(W.accessToken),this.accessToken=W.accessToken,this.origin=W.origin||we.API_ORIGIN}h.prototype.createRequest=function(ye){return new ke(this,ye)},zt.exports=h},43:(zt,St,ze)=>{"use strict";var st=ze(889);zt.exports=function ke(we){var W,h=we.type||st.ERROR_HTTP;if(we.body)try{W=JSON.parse(we.body)}catch{W=we.body}else W=null;var ye=we.message||null;ye||("string"==typeof W?ye=W:W&&"string"==typeof W.message?ye=W.message:h===st.ERROR_REQUEST_ABORTED&&(ye="Request aborted")),this.message=ye,this.type=h,this.statusCode=we.statusCode||null,this.request=we.request,this.body=W}},323:(zt,St,ze)=>{"use strict";var st=ze(746),ke=ze(498),we=ze(81),h=ze(51),W=ze(889),ye=1;function Me(xe,Ae){if(!xe)throw new Error("MapiRequest requires a client");if(!Ae||!Ae.path||!Ae.method)throw new Error("MapiRequest requires an options object with path and method properties");var ct={};Ae.body&&(ct["content-type"]="application/json");var Vt=ke(ct,Ae.headers),Qe=Object.keys(Vt).reduce(function(It,bt){return It[bt.toLowerCase()]=Vt[bt],It},{});this.id=ye++,this._options=Ae,this.emitter=new we,this.client=xe,this.response=null,this.error=null,this.sent=!1,this.aborted=!1,this.path=Ae.path,this.method=Ae.method,this.origin=Ae.origin||xe.origin,this.query=Ae.query||{},this.params=Ae.params||{},this.body=Ae.body||null,this.file=Ae.file||null,this.encoding=Ae.encoding||"utf8",this.sendFileAs=Ae.sendFileAs||null,this.headers=Qe}Me.prototype.url=function(Ae){var ct=h.prependOrigin(this.path,this.origin);ct=h.appendQueryObject(ct,this.query);var Vt=this.params,Qe=Ae??this.client.accessToken;if(Qe){ct=h.appendQueryParam(ct,"access_token",Qe);var It=st(Qe).user;Vt=ke({ownerId:It},Vt)}return h.interpolateRouteParams(ct,Vt)},Me.prototype.send=function(){var Ae=this;if(Ae.sent)throw new Error("This request has already been sent. Check the response and error properties. Create a new request with clone().");return Ae.sent=!0,Ae.client.sendRequest(Ae).then(function(ct){return Ae.response=ct,Ae.emitter.emit(W.EVENT_RESPONSE,ct),ct},function(ct){throw Ae.error=ct,Ae.emitter.emit(W.EVENT_ERROR,ct),ct})},Me.prototype.abort=function(){this._nextPageRequest&&(this._nextPageRequest.abort(),delete this._nextPageRequest),!(this.response||this.error||this.aborted)&&(this.aborted=!0,this.client.abortRequest(this))},Me.prototype.eachPage=function(Ae){var ct=this;function Vt(bt){Ae(null,bt,function ft(){delete ct._nextPageRequest;var oe=bt.nextPage();oe&&(ct._nextPageRequest=oe,It(oe))})}function Qe(bt){Ae(bt,null,function(){})}function It(bt){bt.send().then(Vt,Qe)}It(this)},Me.prototype.clone=function(){return this._extend()},Me.prototype._extend=function(Ae){var ct=ke(this._options,Ae);return new Me(this.client,ct)},zt.exports=Me},896:(zt,St,ze)=>{"use strict";var st=ze(295);function ke(we,h){this.request=we,this.headers=h.headers,this.rawBody=h.body,this.statusCode=h.statusCode;try{this.body=JSON.parse(h.body||"{}")}catch{this.body=h.body}this.links=st(this.headers.link)}ke.prototype.hasNextPage=function(){return!!this.links.next},ke.prototype.nextPage=function(){return this.hasNextPage()?this.request._extend({path:this.links.next.url}):null},zt.exports=ke},889:zt=>{"use strict";zt.exports={API_ORIGIN:"https://api.mapbox.com",EVENT_PROGRESS_DOWNLOAD:"downloadProgress",EVENT_PROGRESS_UPLOAD:"uploadProgress",EVENT_ERROR:"error",EVENT_RESPONSE:"response",ERROR_HTTP:"HttpError",ERROR_REQUEST_ABORTED:"RequestAbortedError"}},17:zt=>{"use strict";zt.exports=function ze(st){var ke={};return st&&st.trim().split(/[\r|\n]+/).forEach(function(we){var h=function St(st){var ke=st.indexOf(":");return{name:st.substring(0,ke).trim().toLowerCase(),value:st.substring(ke+1).trim()}}(we);ke[h.name]=h.value}),ke}},295:zt=>{"use strict";zt.exports=function st(ke){return ke?ke.split(/,\s*]*)>(.*)/);if(!we)return null;var h=we[1],W=we[2].split(";"),ye=null,Me=W.reduce(function(xe,Ae){var ct=function St(ke){var we=ke.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return we?{key:we[1],value:we[2]}:null}(Ae);return ct?"rel"===ct.key?(ye||(ye=ct.value),xe):(xe[ct.key]=ct.value,xe):xe},{});return ye?{url:h,rel:ye,params:Me}:null}(h);return W?(W.rel.split(/\s+/).forEach(function(Me){we[Me]||(we[Me]={url:W.url,params:W.params})}),we):we},{}):{}}},51:zt=>{"use strict";function ze(W){return Array.isArray(W)?function St(W){return W.map(encodeURIComponent).join(",")}(W):encodeURIComponent(String(W))}function st(W,ye,Me){if(!1===Me||null===Me)return W;var xe=/\?/.test(W)?"&":"?",Ae=encodeURIComponent(ye);return void 0!==Me&&""!==Me&&!0!==Me&&(Ae+="="+ze(Me)),""+W+xe+Ae}zt.exports={appendQueryObject:function ke(W,ye){if(!ye)return W;var Me=W;return Object.keys(ye).forEach(function(xe){var Ae=ye[xe];void 0!==Ae&&(Array.isArray(Ae)&&(Ae=Ae.filter(function(ct){return null!=ct}).join(",")),Me=st(Me,xe,Ae))}),Me},appendQueryParam:st,prependOrigin:function we(W,ye){if(!ye||"http"===W.slice(0,4))return W;var Me="/"===W[0]?"":"/";return""+ye.replace(/\/$/,"")+Me+W},interpolateRouteParams:function h(W,ye){return ye?W.replace(/\/:([a-zA-Z0-9]+)/g,function(Me,xe){var Ae=ye[xe];if(void 0===Ae)throw new Error("Unspecified route parameter "+xe);return"/"+ze(Ae)}):W}}},81:zt=>{"use strict";var St=Object.prototype.hasOwnProperty,ze="~";function st(){}function ke(ye,Me,xe){this.fn=ye,this.context=Me,this.once=xe||!1}function we(ye,Me,xe,Ae,ct){if("function"!=typeof xe)throw new TypeError("The listener must be a function");var Vt=new ke(xe,Ae||ye,ct),Qe=ze?ze+Me:Me;return ye._events[Qe]?ye._events[Qe].fn?ye._events[Qe]=[ye._events[Qe],Vt]:ye._events[Qe].push(Vt):(ye._events[Qe]=Vt,ye._eventsCount++),ye}function h(ye,Me){0==--ye._eventsCount?ye._events=new st:delete ye._events[Me]}function W(){this._events=new st,this._eventsCount=0}Object.create&&(st.prototype=Object.create(null),(new st).__proto__||(ze=!1)),W.prototype.eventNames=function(){var xe,Ae,Me=[];if(0===this._eventsCount)return Me;for(Ae in xe=this._events)St.call(xe,Ae)&&Me.push(ze?Ae.slice(1):Ae);return Object.getOwnPropertySymbols?Me.concat(Object.getOwnPropertySymbols(xe)):Me},W.prototype.listeners=function(Me){var Ae=this._events[ze?ze+Me:Me];if(!Ae)return[];if(Ae.fn)return[Ae.fn];for(var ct=0,Vt=Ae.length,Qe=new Array(Vt);ct{"use strict";var st=ze(498),ke=ze(253),we=ze(160),h=ze(193),W=ze(981),ye={},Me=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];ye.forwardGeocode=function(xe){ke.assertShape({query:ke.required(ke.string),mode:ke.oneOf("mapbox.places","mapbox.places-permanent"),countries:ke.arrayOf(ke.string),proximity:ke.oneOf(ke.coordinates,"ip"),types:ke.arrayOf(ke.oneOf(Me)),autocomplete:ke.boolean,bbox:ke.arrayOf(ke.number),limit:ke.number,language:ke.arrayOf(ke.string),routing:ke.boolean,fuzzyMatch:ke.boolean,worldview:ke.string})(xe),xe.mode=xe.mode||"mapbox.places";var Ae=h(st({country:xe.countries},we(xe,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:we(xe,["mode","query"]),query:Ae})},ye.reverseGeocode=function(xe){ke.assertShape({query:ke.required(ke.coordinates),mode:ke.oneOf("mapbox.places","mapbox.places-permanent"),countries:ke.arrayOf(ke.string),types:ke.arrayOf(ke.oneOf(Me)),bbox:ke.arrayOf(ke.number),limit:ke.number,language:ke.arrayOf(ke.string),reverseMode:ke.oneOf("distance","score"),routing:ke.boolean,worldview:ke.string})(xe),xe.mode=xe.mode||"mapbox.places";var Ae=h(st({country:xe.countries},we(xe,["country","types","bbox","limit","language","reverseMode","routing","worldview"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:we(xe,["mode","query"]),query:Ae})},zt.exports=W(ye)},981:(zt,St,ze)=>{"use strict";var st=ze(983),ke=ze(819);zt.exports=function we(h){return function(W){var ye;ye=st.prototype.isPrototypeOf(W)?W:ke(W);var Me=Object.create(h);return Me.client=ye,Me}}},99:zt=>{"use strict";zt.exports=function St(ze,st){return Object.keys(ze).reduce(function(ke,we){return ke[we]=st(we,ze[we]),ke},{})}},160:zt=>{"use strict";zt.exports=function St(ze,st){var ke=function(we,h){return-1!==st.indexOf(we)&&void 0!==h};return"function"==typeof st&&(ke=st),Object.keys(ze).filter(function(we){return ke(we,ze[we])}).reduce(function(we,h){return we[h]=ze[h],we},{})}},193:(zt,St,ze)=>{"use strict";var st=ze(99);zt.exports=function ke(we){return st(we,function(h,W){return"boolean"==typeof W?JSON.stringify(W):W})}},253:(zt,St,ze)=>{"use strict";var st=ze(498),ke=ze(406);zt.exports=st(ke,{file:function we(Me){return typeof window<"u"?Me instanceof global.Blob||Me instanceof global.ArrayBuffer?void 0:"Blob or ArrayBuffer":"string"!=typeof Me&&void 0===Me.pipe?"Filename or Readable stream":void 0},date:function W(Me){var xe="date";if("boolean"==typeof Me)return xe;try{var Ae=new Date(Me);if(Ae.getTime&&isNaN(Ae.getTime()))return xe}catch{return xe}},coordinates:function ye(Me){return ke.tuple(ke.number,ke.number)(Me)},assertShape:function h(Me,xe){return ke.assert(ke.strictShape(Me),xe)}})},746:(zt,St,ze)=>{"use strict";var st=ze(391),ke={};function W(ye,Me){return Object.prototype.hasOwnProperty.call(ye,Me)}zt.exports=function we(ye){if(ke[ye])return ke[ye];var Me=ye.split("."),xe=Me[0],Ae=Me[1];if(!Ae)throw new Error("Invalid token");var ct=function h(ye){try{return JSON.parse(st.decode(ye))}catch{throw new Error("Invalid token")}}(Ae),Vt={usage:xe,user:ct.u};return W(ct,"a")&&(Vt.authorization=ct.a),W(ct,"exp")&&(Vt.expires=1e3*ct.exp),W(ct,"iat")&&(Vt.created=1e3*ct.iat),W(ct,"scopes")&&(Vt.scopes=ct.scopes),W(ct,"client")&&(Vt.client=ct.client),W(ct,"ll")&&(Vt.lastLogin=ct.ll),W(ct,"iu")&&(Vt.impersonator=ct.iu),ke[ye]=Vt,Vt}},392:(zt,St,ze)=>{"use strict";function st(e,t){return Object.is(e,t)}let ke=null,we=!1,h=1;const W=Symbol("SIGNAL");function ye(e){const t=ke;return ke=e,t}const ct={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Vt(e){if(we)throw new Error("");if(null===ke)return;ke.consumerOnSignalRead(e);const t=ke.nextProducerIndex++;vt(ke),te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Se(e){vt(e);for(let t=0;t0}function vt(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function Pt(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}const Jt=Symbol("UNSET"),Ht=Symbol("COMPUTING"),Ft=Symbol("ERRORED"),un=(()=>({...ct,value:Jt,dirty:!0,error:null,equal:st,producerMustRecompute:e=>e.value===Jt||e.value===Ht,producerRecomputeValue(e){if(e.value===Ht)throw new Error("Detected cycle in computations.");const t=e.value;e.value=Ht;const n=Ge(e);let r;try{r=e.computation()}catch(o){r=Ft,e.error=o}finally{ot(e,n)}t!==Jt&&t!==Ft&&r!==Ft&&e.equal(t,r)?e.value=t:(e.value=r,e.version++)}}))();let Dn=function pt(){throw new Error};function sn(){Dn()}let mr=null;function io(e,t){ft()||sn();const n=e.value;Object.is(n,t)||e.equal(n,t)||(e.value=t,function Ir(e){e.version++,function Qe(){h++}(),bt(e),mr?.()}(e))}const hr=(()=>({...ct,equal:st,value:void 0}))();const po=()=>{},oo=(()=>({...ct,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{null!==e.schedule&&e.schedule(e.ref)},hasRun:!1,cleanupFn:po}))();function bn(e){return"function"==typeof e}function Yo(e){const n=e(r=>{Error.call(r),r.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const Lc=Yo(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((r,o)=>`${o+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function As(e,t){if(e){const n=e.indexOf(t);0<=n&&e.splice(n,1)}}class Hr{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const c of n)c.remove(this);else n.remove(this);const{initialTeardown:r}=this;if(bn(r))try{r()}catch(c){t=c instanceof Lc?c.errors:[c]}const{_finalizers:o}=this;if(o){this._finalizers=null;for(const c of o)try{Nc(c)}catch(p){t=t??[],p instanceof Lc?t=[...t,...p.errors]:t.push(p)}}if(t)throw new Lc(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Nc(t);else{if(t instanceof Hr){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}}_hasParent(t){const{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){const{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&As(n,t)}remove(t){const{_finalizers:n}=this;n&&As(n,t),t instanceof Hr&&t._removeParent(this)}}Hr.EMPTY=(()=>{const e=new Hr;return e.closed=!0,e})();const Fc=Hr.EMPTY;function Yl(e){return e instanceof Hr||e&&"closed"in e&&bn(e.remove)&&bn(e.add)&&bn(e.unsubscribe)}function Nc(e){bn(e)?e():e.unsubscribe()}const Ko={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Oa={setTimeout(e,t,...n){const{delegate:r}=Oa;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){const{delegate:t}=Oa;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Vu(e){Oa.setTimeout(()=>{const{onUnhandledError:t}=Ko;if(!t)throw e;t(e)})}function Kl(){}const Os=ka("C",void 0,void 0);function ka(e,t,n){return{kind:e,value:t,error:n}}let ks=null;function dl(e){if(Ko.useDeprecatedSynchronousErrorHandling){const t=!ks;if(t&&(ks={errorThrown:!1,error:null}),e(),t){const{errorThrown:n,error:r}=ks;if(ks=null,n)throw r}}else e()}class da extends Hr{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Yl(t)&&t.add(this)):this.destination=se}static create(t,n,r){return new ec(t,n,r)}next(t){this.isStopped?G(function Uu(e){return ka("N",e,void 0)}(t),this):this._next(t)}error(t){this.isStopped?G(function hl(e){return ka("E",void 0,e)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?G(Os,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Ql=Function.prototype.bind;function Ra(e,t){return Ql.call(e,t)}class zc{constructor(t){this.partialObserver=t}next(t){const{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){le(r)}}error(t){const{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){le(r)}else le(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){le(n)}}}class ec extends da{constructor(t,n,r){let o;if(super(),bn(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let c;this&&Ko.useDeprecatedNextContext?(c=Object.create(t),c.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Ra(t.next,c),error:t.error&&Ra(t.error,c),complete:t.complete&&Ra(t.complete,c)}):o=t}this.destination=new zc(o)}}function le(e){Ko.useDeprecatedSynchronousErrorHandling?function Jl(e){Ko.useDeprecatedSynchronousErrorHandling&&ks&&(ks.errorThrown=!0,ks.error=e)}(e):Vu(e)}function G(e,t){const{onStoppedNotification:n}=Ko;n&&Oa.setTimeout(()=>n(e,t))}const se={closed:!0,next:Kl,error:function H(e){throw e},complete:Kl},de="function"==typeof Symbol&&Symbol.observable||"@@observable";function ve(e){return e}function Oe(e){return 0===e.length?ve:1===e.length?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}let fe=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){const r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){const c=function kt(e){return e&&e instanceof da||function Dt(e){return e&&bn(e.next)&&bn(e.error)&&bn(e.complete)}(e)&&Yl(e)}(n)?n:new ec(n,r,o);return dl(()=>{const{operator:p,source:y}=this;c.add(p?p.call(c,y):y?this._subscribe(c):this._trySubscribe(c))}),c}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return new(r=$e(r))((o,c)=>{const p=new ec({next:y=>{try{n(y)}catch(x){c(x),p.unsubscribe()}},error:c,complete:o});this.subscribe(p)})}_subscribe(n){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(n)}[de](){return this}pipe(...n){return Oe(n)(this)}toPromise(n){return new(n=$e(n))((r,o)=>{let c;this.subscribe(p=>c=p,p=>o(p),()=>r(c))})}}return e.create=t=>new e(t),e})();function $e(e){var t;return null!==(t=e??Ko.Promise)&&void 0!==t?t:Promise}const Mt=Yo(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Qt=(()=>{class e extends fe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){const r=new Wn(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Mt}next(n){dl(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(n)}})}error(n){dl(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;const{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){dl(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return(null===(n=this.observers)||void 0===n?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){const{hasError:r,isStopped:o,observers:c}=this;return r||o?Fc:(this.currentObservers=null,c.push(n),new Hr(()=>{this.currentObservers=null,As(c,n)}))}_checkFinalizedStatuses(n){const{hasError:r,thrownError:o,isStopped:c}=this;r?n.error(o):c&&n.complete()}asObservable(){const n=new fe;return n.source=this,n}}return e.create=(t,n)=>new Wn(t,n),e})();class Wn extends Qt{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===r||r.call(n,t)}error(t){var n,r;null===(r=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===r||r.call(n,t)}complete(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)}_subscribe(t){var n,r;return null!==(r=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==r?r:Fc}}function Rn(e){return bn(e?.lift)}function an(e){return t=>{if(Rn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function hn(e,t,n,r,o){return new hi(e,t,n,r,o)}class hi extends da{constructor(t,n,r,o,c,p){super(t),this.onFinalize=c,this.shouldUnsubscribe=p,this._next=n?function(y){try{n(y)}catch(x){t.error(x)}}:super._next,this._error=o?function(y){try{o(y)}catch(x){t.error(x)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(y){t.error(y)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}}function yn(e,t){return an((n,r)=>{let o=0;n.subscribe(hn(r,c=>{r.next(e.call(t,c,o++))}))})}function Yi(e,t,n,r){var p,o=arguments.length,c=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,r);else for(var y=e.length-1;y>=0;y--)(p=e[y])&&(c=(o<3?p(c):o>3?p(t,n,c):p(t,n))||c);return o>3&&c&&Object.defineProperty(t,n,c),c}function Ze(e){return this instanceof Ze?(this.v=e,this):new Ze(e)}function Ki(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e=function $u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(c){n[c]=e[c]&&function(p){return new Promise(function(y,x){!function o(c,p,y,x){Promise.resolve(x).then(function(E){c({value:E,done:y})},p)}(y,x,(p=e[c](p)).done,p.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const No=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function Uc(e){return bn(e?.then)}function fl(e){return bn(e[de])}function fs(e){return Symbol.asyncIterator&&bn(e?.[Symbol.asyncIterator])}function Yr(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const ma=function Cm(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function jc(e){return bn(e?.[ma])}function $c(e){return function fa(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),c=[];return o={},p("next"),p("throw"),p("return"),o[Symbol.asyncIterator]=function(){return this},o;function p(V){r[V]&&(o[V]=function($){return new Promise(function(ce,_e){c.push([V,$,ce,_e])>1||y(V,$)})})}function y(V,$){try{!function x(V){V.value instanceof Ze?Promise.resolve(V.value.v).then(E,P):F(c[0][2],V)}(r[V]($))}catch(ce){F(c[0][3],ce)}}function E(V){y("next",V)}function P(V){y("throw",V)}function F(V,$){V($),c.shift(),c.length&&y(c[0][0],c[0][1])}}(this,arguments,function*(){const n=e.getReader();try{for(;;){const{value:r,done:o}=yield Ze(n.read());if(o)return yield Ze(void 0);yield yield Ze(r)}}finally{n.releaseLock()}})}function ud(e){return bn(e?.getReader)}function Jo(e){if(e instanceof fe)return e;if(null!=e){if(fl(e))return function Gu(e){return new fe(t=>{const n=e[de]();if(bn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(No(e))return function qu(e){return new fe(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Vu)})}(e);if(fs(e))return zo(e);if(jc(e))return function Hc(e){return new fe(t=>{for(const n of e)if(t.next(n),t.closed)return;t.complete()})}(e);if(ud(e))return function Si(e){return zo($c(e))}(e)}throw Yr(e)}function zo(e){return new fe(t=>{(function Ef(e,t){var n,r,o,c;return function ad(e,t,n,r){return new(n||(n=Promise))(function(c,p){function y(P){try{E(r.next(P))}catch(F){p(F)}}function x(P){try{E(r.throw(P))}catch(F){p(F)}}function E(P){P.done?c(P.value):function o(c){return c instanceof n?c:new n(function(p){p(c)})}(P.value).then(y,x)}E((r=r.apply(e,t||[])).next())})}(this,void 0,void 0,function*(){try{for(n=Ki(e);!(r=yield n.next()).done;)if(t.next(r.value),t.closed)return}catch(p){o={error:p}}finally{try{r&&!r.done&&(c=n.return)&&(yield c.call(n))}finally{if(o)throw o.error}}t.complete()})})(e,t).catch(n=>t.error(n))})}function Ws(e,t,n,r=0,o=!1){const c=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(c),!o)return c}function Sr(e,t,n=1/0){return bn(t)?Sr((r,o)=>yn((c,p)=>t(r,c,o,p))(Jo(e(r,o))),n):("number"==typeof t&&(n=t),an((r,o)=>function Qo(e,t,n,r,o,c,p,y){const x=[];let E=0,P=0,F=!1;const V=()=>{F&&!x.length&&!E&&t.complete()},$=_e=>E{c&&t.next(_e),E++;let Pe=!1;Jo(n(_e,P++)).subscribe(hn(t,De=>{o?.(De),c?$(De):t.next(De)},()=>{Pe=!0},void 0,()=>{if(Pe)try{for(E--;x.length&&Ece(De)):ce(De)}V()}catch(De){t.error(De)}}))};return e.subscribe(hn(t,$,()=>{F=!0,V()})),()=>{y?.()}}(r,o,e,n)))}function pl(e=1/0){return Sr(ve,e)}const Bo=new fe(e=>e.complete());function dd(e){return e&&bn(e.schedule)}function Na(e){return e[e.length-1]}function lo(e){return bn(Na(e))?e.pop():void 0}function ml(e){return dd(Na(e))?e.pop():void 0}function fd(e,t){return"number"==typeof Na(e)?e.pop():t}function ga(e,t=0){return an((n,r)=>{n.subscribe(hn(r,o=>Ws(r,e,()=>r.next(o),t),()=>Ws(r,e,()=>r.complete(),t),o=>Ws(r,e,()=>r.error(o),t)))})}function za(e,t=0){return an((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Zs(e,t){if(!e)throw new Error("Iterable cannot be null");return new fe(n=>{Ws(n,t,()=>{const r=e[Symbol.asyncIterator]();Ws(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function Ba(e,t){if(null!=e){if(fl(e))return function pd(e,t){return Jo(e).pipe(za(t),ga(t))}(e,t);if(No(e))return function Tf(e,t){return new fe(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}(e,t);if(Uc(e))return function F_(e,t){return Jo(e).pipe(za(t),ga(t))}(e,t);if(fs(e))return Zs(e,t);if(jc(e))return function Gc(e,t){return new fe(n=>{let r;return Ws(n,t,()=>{r=e[ma](),Ws(n,t,()=>{let o,c;try{({value:o,done:c}=r.next())}catch(p){return void n.error(p)}c?n.complete():n.next(o)},0,!0)}),()=>bn(r?.return)&&r.return()})}(e,t);if(ud(e))return function Df(e,t){return Zs($c(e),t)}(e,t)}throw Yr(e)}function Pr(e,t){return t?Ba(e,t):Jo(e)}function qc(...e){const t=ml(e),n=fd(e,1/0),r=e;return r.length?1===r.length?Jo(r[0]):pl(n)(Pr(r,t)):Bo}class oi extends Qt{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){const{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}}function Sn(...e){return Pr(e,ml(e))}function es(e){return e<=0?()=>Bo:an((t,n)=>{let r=0;t.subscribe(hn(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function Wc(e={}){const{connector:t=(()=>new Qt),resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return c=>{let p=null,y=null,x=null,E=0,P=!1,F=!1;const V=()=>{y?.unsubscribe(),y=null},$=()=>{V(),p=x=null,P=F=!1},ce=()=>{const _e=p;$(),_e?.unsubscribe()};return an((_e,Pe)=>{E++,!F&&!P&&V();const De=x=x??t();Pe.add(()=>{E--,0===E&&!F&&!P&&(y=md(ce,o))}),De.subscribe(Pe),p||(p=new ec({next:Ne=>De.next(Ne),error:Ne=>{F=!0,V(),y=md($,n,Ne),De.error(Ne)},complete:()=>{P=!0,V(),y=md($,r),De.complete()}}),Pr(_e).subscribe(p))})(c)}}function md(e,t,...n){return!0===t?(e(),null):!1===t?null:t(...n).pipe(es(1)).subscribe(()=>e())}function Vi(e,t){return an((n,r)=>{let o=null,c=0,p=!1;const y=()=>p&&!o&&r.complete();n.subscribe(hn(r,x=>{o?.unsubscribe();let E=0;const P=c++;Jo(e(x,P)).subscribe(o=hn(r,F=>r.next(t?t(x,F,P,E++):F),()=>{o=null,y()}))},()=>{p=!0,y()}))})}function Zc(e,t=ve){return e=e??If,an((n,r)=>{let o,c=!0;n.subscribe(hn(r,p=>{const y=t(p);(c||!e(o,y))&&(c=!1,o=y,r.next(p))}))})}function If(e,t){return e===t}function gr(e){for(let t in e)if(e[t]===gr)return t;throw Error("Could not find renamed property on target object.")}function lr(e,t){for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Gi(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(Gi).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Zu(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const Sf=gr({__forward_ref__:gr});function Kr(e){return e.__forward_ref__=Kr,e.toString=function(){return Gi(this())},e}function Pn(e){return Va(e)?e():e}function Va(e){return"function"==typeof e&&e.hasOwnProperty(Sf)&&e.__forward_ref__===Kr}function Xc(e){return e&&!!e.\u0275providers}const _a="https://g.co/ng/security#xss";class mt extends Error{constructor(t,n){super(function Ua(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,n)),this.code=t}}const Yc=gr({\u0275cmp:gr}),nc=gr({\u0275dir:gr}),Kc=gr({\u0275pipe:gr}),gd=gr({\u0275mod:gr}),Fs=gr({\u0275fac:gr}),gl=gr({__NG_ELEMENT_ID__:gr}),_d=gr({__NG_ENV_ID__:gr});function qt(e){return"string"==typeof e?e:null==e?"":String(e)}function Of(e,t){throw new mt(-201,!1)}function Mo(e,t){null==e&&function xn(e,t,n,r){throw new Error(`ASSERTION ERROR: ${e}`+(null==r?"":` [Expected=> ${n} ${r} ${t} <=Actual]`))}(t,e,null,"!=")}function tn(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function ts(e){return{providers:e.providers||[],imports:e.imports||[]}}function rc(e){return zf(e,Qc)||zf(e,eu)}function zf(e,t){return e.hasOwnProperty(t)?e[t]:null}function vd(e){return e&&(e.hasOwnProperty(xd)||e.hasOwnProperty(Dm))?e[xd]:null}const Qc=gr({\u0275prov:gr}),xd=gr({\u0275inj:gr}),eu=gr({ngInjectableDef:gr}),Dm=gr({ngInjectorDef:gr});var er=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(er||{});let wd;function ic(){return wd}function ns(e){const t=wd;return wd=e,t}function Im(e,t,n){const r=rc(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&er.Optional?null:void 0!==t?t:void Of(Gi(e))}const Jr=globalThis;class Zt{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=tn({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}const yl={},or="__NG_DI_FLAG__",vl="ngTempTokenPath",Ed=/\n/gm,jf="__source";let ja;function Ha(e){const t=ja;return ja=e,t}function Td(e,t=er.Default){if(void 0===ja)throw new mt(-203,!1);return null===ja?Im(e,void 0,t):ja.get(e,t&er.Optional?null:void 0,t)}function rn(e,t=er.Default){return(ic()||Td)(Pn(e),t)}function Nt(e,t=er.Default){return rn(e,xl(t))}function xl(e){return typeof e>"u"||"number"==typeof e?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function sc(e){const t=[];for(let n=0;nt){p=c-1;break}}}for(;cc?"":o[F+1].toLowerCase();const $=8&r?V:null;if($&&-1!==eh($,E,0)||2&r&&E!==V){if(ms(r))return!1;p=!0}}}}else{if(!p&&!ms(r)&&!ms(x))return!1;if(p&&ms(x))continue;p=!1,r=x|1&r}}return ms(r)||p}function ms(e){return 0==(1&e)}function qf(e,t,n,r){if(null===t)return-1;let o=0;if(r||!n){let c=!1;for(;o-1)for(n++;n0?'="'+y+'"':"")+"]"}else 8&r?o+="."+p:4&r&&(o+=" "+p);else""!==o&&!ms(p)&&(t+=Sd(c,o),o=""),r=p,c=c||!ms(r);n++}return""!==o&&(t+=Sd(c,o)),t}function Ei(e){return va(()=>{const t=Xf(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===bl.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Vo.Emulated,styles:e.styles||ur,_:null,schemas:e.schemas||null,tView:null,id:""};Rm(n);const r=e.dependencies;return n.directiveDefs=is(r,!1),n.pipeDefs=is(r,!0),n.id=function lc(e){let t=0;const n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const o of n)t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}(n),n})}function G_(e){return nr(e)||qi(e)}function km(e){return null!==e}function gs(e){return va(()=>({type:e.type,bootstrap:e.bootstrap||ur,declarations:e.declarations||ur,imports:e.imports||ur,exports:e.exports||ur,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Zf(e,t){if(null==e)return Qr;const n={};for(const r in e)if(e.hasOwnProperty(r)){let o=e[r],c=o;Array.isArray(o)&&(c=o[1],o=o[0]),n[o]=r,t&&(t[o]=c)}return n}function Ln(e){return va(()=>{const t=Xf(e);return Rm(t),t})}function Nr(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function nr(e){return e[Yc]||null}function qi(e){return e[nc]||null}function mo(e){return e[Kc]||null}function ei(e,t){const n=e[gd]||null;if(!n&&!0===t)throw new Error(`Type ${Gi(e)} does not have '\u0275mod' property.`);return n}function Xf(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Qr,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||ur,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Zf(e.inputs,t),outputs:Zf(e.outputs),debugInfo:null}}function Rm(e){e.features?.forEach(t=>t(e))}function is(e,t){if(!e)return null;const n=t?mo:G_;return()=>("function"==typeof e?e():e).map(r=>n(r)).filter(km)}const di=0,Ve=1,Mn=2,si=3,Eo=4,Ai=5,At=6,Tl=7,ti=8,To=9,Dl=10,jn=11,iu=12,Lm=13,ou=14,fi=15,cc=16,Il=17,Uo=18,m=19,l=20,d=21,_=22,w=23,C=25,D=1,A=7,R=9,B=10;var q=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e[e.HasChildViewsToRefresh=4]="HasChildViewsToRefresh",e}(q||{});function X(e){return Array.isArray(e)&&"object"==typeof e[D]}function K(e){return Array.isArray(e)&&!0===e[D]}function J(e){return 0!=(4&e.flags)}function Q(e){return e.componentOffset>-1}function U(e){return 1==(1&e.flags)}function Y(e){return!!e.template}function re(e){return 0!=(512&e[Mn])}function rr(e,t){return e.hasOwnProperty(Fs)?e[Fs]:null}class kr{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function $n(){return Ar}function Ar(e){return e.type.prototype.ngOnChanges&&(e.setInput=co),Do}function Do(){const e=Ks(this),t=e?.current;if(t){const n=e.previous;if(n===Qr)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function co(e,t,n,r){const o=this.declaredInputs[n],c=Ks(e)||function ai(e,t){return e[_s]=t}(e,{previous:Qr,current:null}),p=c.current||(c.current={}),y=c.previous,x=y[o];p[o]=new kr(x&&x.currentValue,t,y===Qr),e[r]=t}$n.ngInherit=!0;const _s="__ngSimpleChanges__";function Ks(e){return e[_s]||null}const Rr=function(e,t,n){},Io="svg";function ir(e){for(;Array.isArray(e);)e=e[di];return e}function Js(e,t){return ir(t[e])}function Ji(e,t){return ir(t[e.index])}function Ns(e,t){return e.data[t]}function zs(e,t){return e[t]}function So(e,t){const n=t[e];return X(n)?n:n[di]}function ah(e){return 128==(128&e[Mn])}function qa(e,t){return null==t?null:e[t]}function Uv(e){e[Il]=0}function q_(e){1024&e[Mn]||(e[Mn]|=1024,ah(e)&&lh(e))}function W_(e){return 9216&e[Mn]||e[w]?.dirty}function Fm(e){W_(e)&&lh(e)}function lh(e){let t=e[si];for(;null!==t&&!(K(t)&&t[Mn]&q.HasChildViewsToRefresh||X(t)&&8192&t[Mn]);){if(K(t))t[Mn]|=q.HasChildViewsToRefresh;else if(t[Mn]|=8192,!ah(t))break;t=t[si]}}function wa(e,t){if(256==(256&e[Mn]))throw new mt(911,!1);null===e[d]&&(e[d]=[]),e[d].push(t)}const Un={lFrame:Al(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function Ad(){return Un.bindingsEnabled}function lt(){return Un.lFrame.lView}function xr(){return Un.lFrame.tView}function qr(e){return Un.lFrame.contextLView=e,e[ti]}function Wr(e){return Un.lFrame.contextLView=null,e}function ni(){let e=Y_();for(;null!==e&&64===e.type;)e=e.parent;return e}function Y_(){return Un.lFrame.currentTNode}function Sl(e,t){const n=Un.lFrame;n.currentTNode=e,n.isParent=t}function K_(){return Un.lFrame.isParent}function Ti(){Un.lFrame.isParent=!1}function li(){const e=Un.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function uo(){return Un.lFrame.bindingIndex++}function Xa(e){const t=Un.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function dh(e,t){const n=Un.lFrame;n.bindingIndex=n.bindingRootIndex=e,kd(t)}function kd(e){Un.lFrame.currentDirectiveIndex=e}function ey(){return Un.lFrame.currentQueryIndex}function ty(e){Un.lFrame.currentQueryIndex=e}function ny(e){const t=e[Ve];return 2===t.type?t.declTNode:1===t.type?e[Ai]:null}function ry(e,t,n){if(n&er.SkipSelf){let o=t,c=e;for(;!(o=o.parent,null!==o||n&er.Host||(o=ny(c),null===o||(c=c[ou],10&o.type))););if(null===o)return!1;t=o,e=c}const r=Un.lFrame=ph();return r.currentTNode=t,r.lView=e,!0}function fh(e){const t=ph(),n=e[Ve];Un.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function ph(){const e=Un.lFrame,t=null===e?null:e.child;return null===t?Al(e):t}function Al(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function zm(){const e=Un.lFrame;return Un.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const iy=zm;function mh(){const e=zm();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ci(){return Un.lFrame.selectedIndex}function Ya(e){Un.lFrame.selectedIndex=e}function sr(){const e=Un.lFrame;return Ns(e.tView,e.selectedIndex)}function pi(){Un.lFrame.currentNamespace=Io}function Er(){!function jv(){Un.lFrame.currentNamespace=null}()}let ba=!0;function Bm(){return ba}function cu(e){ba=e}function Qf(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[x]<0&&(e[Il]+=65536),(y>14>16&&(3&e[Mn])===t&&(e[Mn]+=16384,ay(y,c)):ay(y,c)}const Ld=-1;class Fd{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function Um(e){return e!==Ld}function Bs(e){return 32767&e}function Ka(e,t){let n=function bb(e){return e>>16}(e),r=t;for(;n>0;)r=r[ou],n--;return r}let _h=!0;function xs(e){const t=_h;return _h=e,t}const qv=255,tp=5;let Wv=0;const kl={};function Qs(e,t){const n=dy(e,t);if(-1!==n)return n;const r=t[Ve];r.firstCreatePass&&(e.injectorIndex=t.length,hc(r.data,e),hc(t,null),hc(r.blueprint,null));const o=np(e,t),c=e.injectorIndex;if(Um(o)){const p=Bs(o),y=Ka(o,t),x=y[Ve].data;for(let E=0;E<8;E++)t[c+E]=y[p+E]|x[p+E]}return t[c+8]=o,c}function hc(e,t){e.push(0,0,0,0,0,0,0,0,t)}function dy(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function np(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;null!==o;){if(r=dc(o),null===r)return Ld;if(n++,o=o[ou],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return Ld}function fy(e,t,n){!function hy(e,t,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(gl)&&(r=n[gl]),null==r&&(r=n[gl]=Wv++);const o=r&qv;t.data[e+(o>>tp)]|=1<=0?t&qv:Cb:t}(n);if("function"==typeof c){if(!ry(t,e,r))return r&er.Host?$m(o,0,r):yh(t,n,r,o);try{let p;if(p=c(r),null!=p||r&er.Optional)return p;Of()}finally{iy()}}else if("number"==typeof c){let p=null,y=dy(e,t),x=Ld,E=r&er.Host?t[fi][Ai]:null;for((-1===y||r&er.SkipSelf)&&(x=-1===y?np(e,t):t[y+8],x!==Ld&&xh(r,!1)?(p=t[Ve],y=Bs(x),t=Ka(x,t)):y=-1);-1!==y;){const P=t[Ve];if(my(c,y,P.data)){const F=Hm(y,t,n,p,r,E);if(F!==kl)return F}x=t[y+8],x!==Ld&&xh(r,t[Ve].data[y+8]===E)&&my(c,y,t)?(p=P,y=Bs(x),t=Ka(x,t)):y=-1}}return o}function Hm(e,t,n,r,o,c){const p=t[Ve],y=p.data[e+8],P=rp(y,p,n,null==r?Q(y)&&_h:r!=p&&0!=(3&y.type),o&er.Host&&c===y);return null!==P?Qa(t,p,P,y):kl}function rp(e,t,n,r,o){const c=e.providerIndexes,p=t.data,y=1048575&c,x=e.directiveStart,P=c>>20,V=o?y+P:e.directiveEnd;for(let $=r?y:y+P;$=x&&ce.type===n)return $}if(o){const $=p[x];if($&&Y($)&&$.type===n)return x}return null}function Qa(e,t,n,r){let o=e[n];const c=t.data;if(function Hv(e){return e instanceof Fd}(o)){const p=o;p.resolving&&function Mm(e,t){const n=t?`. Dependency path: ${t.join(" > ")} > ${e}`:"";throw new mt(-200,`Circular dependency in DI detected for ${e}${n}`)}(function dr(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():qt(e)}(c[n]));const y=xs(p.canSeeViewProviders);p.resolving=!0;const E=p.injectImpl?ns(p.injectImpl):null;ry(e,r,er.Default);try{o=e[n]=p.factory(void 0,c,e,r),t.firstCreatePass&&n>=r.directiveStart&&function $v(e,t,n){const{ngOnChanges:r,ngOnInit:o,ngDoCheck:c}=t.type.prototype;if(r){const p=Ar(t);(n.preOrderHooks??=[]).push(e,p),(n.preOrderCheckHooks??=[]).push(e,p)}o&&(n.preOrderHooks??=[]).push(0-e,o),c&&((n.preOrderHooks??=[]).push(e,c),(n.preOrderCheckHooks??=[]).push(e,c))}(n,c[n],t)}finally{null!==E&&ns(E),xs(y),p.resolving=!1,iy()}}return o}function my(e,t,n){return!!(n[t+(e>>tp)]&1<{const t=e.prototype.constructor,n=t[Fs]||bh(t),r=Object.prototype;let o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){const c=o[Fs]||bh(o);if(c&&c!==n)return c;o=Object.getPrototypeOf(o)}return c=>new c})}function bh(e){return Va(e)?()=>{const t=bh(Pn(e));return t&&t()}:rr(e)}function dc(e){const t=e[Ve],n=t.type;return 2===n?t.declTNode:1===n?e[Ai]:null}const ws="__parameters__";function Ui(e,t,n){return va(()=>{const r=function Cs(e){return function(...n){if(e){const r=e(...n);for(const o in r)this[o]=r[o]}}}(t);function o(...c){if(this instanceof o)return r.apply(this,c),this;const p=new o(...c);return y.annotation=p,y;function y(x,E,P){const F=x.hasOwnProperty(ws)?x[ws]:Object.defineProperty(x,ws,{value:[]})[ws];for(;F.length<=P;)F.push(null);return(F[P]=F[P]||[]).push(p),x}}return n&&(o.prototype=Object.create(n.prototype)),o.prototype.ngMetadataName=e,o.annotationCls=o,o})}function Mh(e,t){e.forEach(n=>Array.isArray(n)?Mh(n,t):t(n))}function Jv(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function op(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Vs(e,t,n){let r=Eh(e,t);return r>=0?e[1|r]=n:(r=~r,function qm(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(1===o)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;)e[o]=e[o-2],o--;e[t]=n,e[t+1]=r}}(e,r,t,n)),r}function fc(e,t){const n=Eh(e,t);if(n>=0)return e[1|n]}function Eh(e,t){return function Th(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){const c=r+(o-r>>1),p=e[c<t?o=c:r=c+1}return~(o<{n.push(p)};return Mh(t,p=>{const y=p;yi(y,c,[],r)&&(o||=[],o.push(y))}),void 0!==o&&s1(o,c),n}function s1(e,t){for(let n=0;n{t(c,r)})}}function yi(e,t,n,r){if(!(e=Pn(e)))return!1;let o=null,c=vd(e);const p=!c&&nr(e);if(c||p){if(p&&!p.standalone)return!1;o=e}else{const x=e.ngModule;if(c=vd(x),!c)return!1;o=x}const y=r.has(o);if(p){if(y)return!1;if(r.add(o),p.dependencies){const x="function"==typeof p.dependencies?p.dependencies():p.dependencies;for(const E of x)yi(E,t,n,r)}}else{if(!c)return!1;{if(null!=c.imports&&!y){let E;r.add(o);try{Mh(c.imports,P=>{yi(P,t,n,r)&&(E||=[],E.push(P))})}finally{}void 0!==E&&s1(E,t)}if(!y){const E=rr(o)||(()=>new o);t({provide:o,useFactory:E,deps:ur},o),t({provide:wy,useValue:o,multi:!0},o),t({provide:Bd,useValue:()=>rn(o),multi:!0},o)}const x=c.providers;if(null!=x&&!y){const E=e;Jm(x,P=>{t(P,E)})}}}return o!==e&&void 0!==e.providers}function Jm(e,t){for(let n of e)Xc(n)&&(n=n.\u0275providers),Array.isArray(n)?Jm(n,t):t(n)}const Qm=gr({provide:String,useValue:gr});function Vd(e){return null!==e&&"object"==typeof e&&Qm in e}function pu(e){return"function"==typeof e}const fp=new Zt("Set Injector scope."),jd={},My={};let Ey;function pp(){return void 0===Ey&&(Ey=new Km),Ey}class $o{}class $d extends $o{get destroyed(){return this._destroyed}constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Dy(t,p=>this.processProvider(p)),this.records.set(o1,pc(void 0,this)),o.has("environment")&&this.records.set($o,pc(void 0,this));const c=this.records.get(fp);null!=c&&"string"==typeof c.value&&this.scopes.add(c.value),this.injectorDefTypes=new Set(this.get(wy,ur,er.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const n=Ha(this),r=ns(void 0);try{return t()}finally{Ha(n),ns(r)}}get(t,n=yl,r=er.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(_d))return t[_d](this);r=xl(r);const c=Ha(this),p=ns(void 0);try{if(!(r&er.SkipSelf)){let x=this.records.get(t);if(void 0===x){const E=function Vb(e){return"function"==typeof e||"object"==typeof e&&e instanceof Zt}(t)&&rc(t);x=E&&this.injectableDefInScope(E)?pc(mp(t),jd):null,this.records.set(t,x)}if(null!=x)return this.hydrate(t,x)}return(r&er.Self?pp():this.parent).get(t,n=r&er.Optional&&n===yl?null:n)}catch(y){if("NullInjectorError"===y.name){if((y[vl]=y[vl]||[]).unshift(Gi(t)),c)throw y;return function Gt(e,t,n,r){const o=e[vl];throw t[jf]&&o.unshift(t[jf]),e.message=function Ys(e,t,n,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let o=Gi(t);if(Array.isArray(t))o=t.map(Gi).join(" -> ");else if("object"==typeof t){let c=[];for(let p in t)if(t.hasOwnProperty(p)){let y=t[p];c.push(p+":"+("string"==typeof y?JSON.stringify(y):Gi(y)))}o=`{${c.join(", ")}}`}return`${n}${r?"("+r+")":""}[${o}]: ${e.replace(Ed,"\n ")}`}("\n"+e.message,o,n,r),e.ngTokenPath=o,e[vl]=null,e}(y,t,"R3InjectorError",this.source)}throw y}finally{ns(p),Ha(c)}}resolveInjectorInitializers(){const t=Ha(this),n=ns(void 0);try{const o=this.get(Bd,ur,er.Self);for(const c of o)c()}finally{Ha(t),ns(n)}}toString(){const t=[],n=this.records;for(const r of n.keys())t.push(Gi(r));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new mt(205,!1)}processProvider(t){let n=pu(t=Pn(t))?t:Pn(t&&t.provide);const r=function Ty(e){return Vd(e)?pc(void 0,e.useValue):pc(eg(e),jd)}(t);if(pu(t)||!0!==t.multi)this.records.get(n);else{let o=this.records.get(n);o||(o=pc(void 0,jd,!0),o.factory=()=>sc(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n){return n.value===jd&&(n.value=My,n.value=n.factory()),"object"==typeof n.value&&n.value&&function Bb(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(t){if(!t.providedIn)return!1;const n=Pn(t.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){const n=this._onDestroyHooks.indexOf(t);-1!==n&&this._onDestroyHooks.splice(n,1)}}function mp(e){const t=rc(e),n=null!==t?t.factory:rr(e);if(null!==n)return n;if(e instanceof Zt)throw new mt(204,!1);if(e instanceof Function)return function Nb(e){const t=e.length;if(t>0)throw function sp(e,t){const n=[];for(let r=0;rn.factory(e):()=>new e}(e);throw new mt(204,!1)}function eg(e,t,n){let r;if(pu(e)){const o=Pn(e);return rr(o)||mp(o)}if(Vd(e))r=()=>Pn(e.useValue);else if(function Cy(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...sc(e.deps||[]));else if(function Ud(e){return!(!e||!e.useExisting)}(e))r=()=>rn(Pn(e.useExisting));else{const o=Pn(e&&(e.useClass||e.provide));if(!function zb(e){return!!e.deps}(e))return rr(o)||mp(o);r=()=>new o(...sc(e.deps))}return r}function pc(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Dy(e,t){for(const n of e)Array.isArray(n)?Dy(n,t):n&&Xc(n)?Dy(n.\u0275providers,t):t(n)}function mu(e,t){e instanceof $d&&e.assertNotDestroyed();const r=Ha(e),o=ns(void 0);try{return t()}finally{Ha(r),ns(o)}}function Iy(e){if(!ic()&&!function $a(){return ja}())throw new mt(-203,!1)}function u1(e,t=null,n=null,r){const o=h1(e,t,n,r);return o.resolveInjectorInitializers(),o}function h1(e,t=null,n=null,r,o=new Set){const c=[n||ur,Fb(e)];return r=r||("object"==typeof e?void 0:Gi(e)),new $d(c,t||pp(),r||null,o)}let tg,Ms=(()=>{class e{static#e=this.THROW_IF_NOT_FOUND=yl;static#t=this.NULL=new Km;static create(n,r){if(Array.isArray(n))return u1({name:""},r,n,"");{const o=n.name??"";return u1({name:o},n.parent,n.providers,o)}}static#n=this.\u0275prov=tn({token:e,providedIn:"any",factory:()=>rn(o1)});static#r=this.__NG_ELEMENT_ID__=-1}return e})();function mc(){if(void 0!==tg)return tg;if(typeof document<"u")return document;throw new mt(210,!1)}const ng=new Zt("AppId",{providedIn:"root",factory:()=>f1}),f1="ng",Sy=new Zt("Platform Initializer"),gu=new Zt("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),Py=new Zt("CSP nonce",{providedIn:"root",factory:()=>mc().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function Ho(e){return e instanceof Function?e():e}function Mp(e){return 128==(128&e.flags)}var Ll=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Ll||{});const w1=/^>|^->||--!>|)/g,yc="\u200b$1\u200b";const og=new Map;let Qb=0;const Gd="__ngContext__";function eo(e,t){X(t)?(e[Gd]=t[m],function tC(e){og.set(e[m],e)}(t)):e[Gd]=t}let Ts;function ag(e,t){return Ts(e,t)}function Fl(e){const t=e[si];return K(t)?t[si]:t}function D1(e){return qy(e[iu])}function Gy(e){return qy(e[Eo])}function qy(e){for(;null!==e&&!K(e);)e=e[Eo];return e}function Wd(e,t,n,r,o){if(null!=r){let c,p=!1;K(r)?c=r:X(r)&&(p=!0,r=r[di]);const y=ir(r);0===e&&null!==n?null==o?dg(t,n,y):Go(t,n,y,o||null,!0):1===e&&null!==n?Go(t,n,y,o||null,!0):2===e?function Xd(e,t,n){const r=Lh(e,t);r&&function Zd(e,t,n,r){e.removeChild(t,n,r)}(e,r,t,n)}(t,y,p):3===e&&t.destroyNode(y),null!=c&&function Fp(e,t,n,r,o){const c=n[A];c!==ir(n)&&Wd(t,e,r,c,o);for(let y=B;yt.replace(b1,yc))}(t))}function Sp(e,t,n){return e.createElement(t,n)}function Zy(e,t){const n=e[R],r=n.indexOf(t);n.splice(r,1)}function Pp(e,t){if(e.length<=B)return;const n=B+t,r=e[n];if(r){const o=r[cc];null!==o&&o!==e&&Zy(o,r),t>0&&(e[n-1][Eo]=r[Eo]);const c=op(e,B+t);!function sC(e,t){Lp(e,t,t[jn],2,null,null),t[di]=null,t[Ai]=null}(r[Ve],r);const p=c[Uo];null!==p&&p.detachView(c[Ve]),r[si]=null,r[Eo]=null,r[Mn]&=-129}return r}function cg(e,t){if(!(256&t[Mn])){const n=t[jn];n.destroyNode&&Lp(e,t,n,3,null,null),function S1(e){let t=e[iu];if(!t)return ug(e[Ve],e);for(;t;){let n=null;if(X(t))n=t[iu];else{const r=t[B];r&&(n=r)}if(!n){for(;t&&!t[Eo]&&t!==e;)X(t)&&ug(t[Ve],t),t=t[si];null===t&&(t=e),X(t)&&ug(t[Ve],t),n=t&&t[Eo]}t=n}}(t)}}function ug(e,t){if(!(256&t[Mn])){t[Mn]&=-129,t[Mn]|=256,t[w]&&Ce(t[w]),function Ap(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let r=0;r=0?r[p]():r[-p].unsubscribe(),c+=2}else n[c].call(r[n[c+1]]);null!==r&&(t[Tl]=null);const o=t[d];if(null!==o){t[d]=null;for(let c=0;c-1){const{encapsulation:c}=e.data[r.directiveStart+o];if(c===Vo.None||c===Vo.Emulated)return null}return Ji(r,n)}}(e,t.parent,n)}function Go(e,t,n,r,o){e.insertBefore(t,n,r,o)}function dg(e,t,n){e.appendChild(t,n)}function Rh(e,t,n,r,o){null!==r?Go(e,t,n,r,o):dg(e,t,n)}function Lh(e,t){return e.parentNode(t)}let Yy,Yd,vu,R1=function kp(e,t,n){return 40&e.type?Ji(e,n):null};function fg(e,t,n,r){const o=hg(e,r,t),c=t[jn],y=function Op(e,t,n){return R1(e,t,n)}(r.parent||t[Ai],r,t);if(null!=o)if(Array.isArray(n))for(let x=0;xe,createScript:e=>e,createScriptURL:e=>e})}catch{}return Yd}()?.createHTML(e)||e}function Vh(){if(void 0===vu&&(vu=null,Jr.trustedTypes))try{vu=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return vu}function Kd(e){return Vh()?.createHTML(e)||e}function zp(e){return Vh()?.createScriptURL(e)||e}class Uh{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${_a})`}}class uC extends Uh{getTypeName(){return"HTML"}}class Qd extends Uh{getTypeName(){return"Style"}}class mg extends Uh{getTypeName(){return"Script"}}class hC extends Uh{getTypeName(){return"URL"}}class B1 extends Uh{getTypeName(){return"ResourceURL"}}function Us(e){return e instanceof Uh?e.changingThisBreaksApplicationSecurity:e}function Nl(e,t){const n=function V1(e){return e instanceof Uh&&e.getTypeName()||null}(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${_a})`)}return n===t}class gg{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const n=(new window.DOMParser).parseFromString(Nh(t),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(t):(n.removeChild(n.firstChild),n)}catch{return null}}}class _g{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){const n=this.inertDocument.createElement("template");return n.innerHTML=Nh(t),n}}const mC=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ef(e){return(e=String(e)).match(mC)?e:"unsafe:"+e}function nl(e){const t={};for(const n of e.split(","))t[n]=!0;return t}function Ma(...e){const t={};for(const n of e)for(const r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}const H1=nl("area,br,col,hr,img,wbr"),vg=nl("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),e0=nl("rp,rt"),n0=Ma(H1,Ma(vg,nl("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ma(e0,nl("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ma(e0,vg)),r0=nl("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),tf=Ma(r0,nl("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),nl("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),gC=nl("script,style,template");class _C{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let n=t.firstChild,r=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let o=this.checkClobberedElement(n,n.nextSibling);if(o){n=o;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(t){const n=t.nodeName.toLowerCase();if(!n0.hasOwnProperty(n))return this.sanitizedSomething=!0,!gC.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const r=t.attributes;for(let o=0;o"),!0}endElement(t){const n=t.nodeName.toLowerCase();n0.hasOwnProperty(n)&&!H1.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(o0(t))}checkClobberedElement(t,n){if(n&&(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return n}}const q1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yC=/([^\#-~ |!])/g;function o0(e){return e.replace(/&/g,"&").replace(q1,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(yC,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Ds;function rl(e,t){let n=null;try{Ds=Ds||function $1(e){const t=new _g(e);return function yg(){try{return!!(new window.DOMParser).parseFromString(Nh(""),"text/html")}catch{return!1}}()?new gg(t):t}(e);let r=t?String(t):"";n=Ds.getInertBodyElement(r);let o=5,c=r;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,r=c,c=n.innerHTML,n=Ds.getInertBodyElement(r)}while(r!==c);return Nh((new _C).sanitizeChildren(zl(n)||n))}finally{if(n){const r=zl(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function zl(e){return"content"in e&&function Bl(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var go=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(go||{});function ta(e){const t=nf();return t?Kd(t.sanitize(go.HTML,e)||""):Nl(e,"HTML")?Kd(Us(e)):rl(mc(),qt(e))}function js(e){const t=nf();return t?t.sanitize(go.URL,e)||"":Nl(e,"URL")?Us(e):ef(qt(e))}function xg(e){const t=nf();if(t)return zp(t.sanitize(go.RESOURCE_URL,e)||"");if(Nl(e,"ResourceURL"))return zp(Us(e));throw new mt(904,!1)}function nf(){const e=lt();return e&&e[Dl].sanitizer}let c0=(e,t,n)=>null;function Cg(e,t,n=!1){return c0(e,t,n)}class d0{}class f0{}class u{resolveComponentFactory(t){throw function s(e){const t=Error(`No component factory found for ${Gi(e)}.`);return t.ngComponent=e,t}(t)}}let f=(()=>{class e{static#e=this.NULL=new u}return e})();function g(){return v(ni(),lt())}function v(e,t){return new b(Ji(e,t))}let b=(()=>{class e{constructor(n){this.nativeElement=n}static#e=this.__NG_ELEMENT_ID__=g}return e})();function M(e){return e instanceof b?e.nativeElement:e}class T{}let S=(()=>{class e{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function O(){const e=lt(),n=So(ni().index,e);return(X(n)?n:e)[jn]}()}return e})(),k=(()=>{class e{static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:()=>null})}return e})();class N{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const z=new N("17.0.6"),j={};function ee(e,t){const n=function Zn(e){const t=Object.create(hr);t.value=e;const n=()=>(Vt(t),t.value);return n[W]=t,n}(e),r=n[W];return t?.equal&&(r.equal=t.equal),n.set=o=>io(r,o),n.update=o=>function Xi(e,t){ft()||sn(),io(e,t(e.value))}(r,o),n.asReadonly=ne.bind(n),n}function ne(){const e=this[W];if(void 0===e.readonlyFn){const t=()=>this();t[W]=e,e.readonlyFn=t}return e.readonlyFn}function ae(e){const t=ye(null);try{return e()}finally{ye(t)}}function ue(e){return!!function Ke(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}class _t{constructor(){}supports(t){return ue(t)}create(t){return new rt(t)}}const He=(e,t)=>t;class rt{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||He}forEachItem(t){let n;for(n=this._itHead;null!==n;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,r=this._removalsHead,o=0,c=null;for(;n||r;){const p=!r||n&&n.currentIndex{p=this._trackByFn(o,y),null!==n&&Object.is(n.trackById,p)?(r&&(n=this._verifyReinsertion(n,y,p,o)),Object.is(n.item,y)||this._addIdentityChange(n,y)):(n=this._mismatch(n,y,p,o),r=!0),n=n._next,o++}),this.length=o;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,r,o){let c;return null===t?c=this._itTail:(c=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,c,o)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(r,o))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,c,o)):t=this._addAfter(new it(n,r),c,o),t}_verifyReinsertion(t,n,r,o){let c=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==c?t=this._reinsertAfter(c,t._prev,o):t.currentIndex!=o&&(t.currentIndex=o,this._addToMoves(t,o)),t}_truncate(t){for(;null!==t;){const n=t._next;this._addToRemovals(this._unlink(t)),t=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const o=t._prevRemoved,c=t._nextRemoved;return null===o?this._removalsHead=c:o._nextRemoved=c,null===c?this._removalsTail=o:c._prevRemoved=o,this._insertAfter(t,n,r),this._addToMoves(t,r),t}_moveAfter(t,n,r){return this._unlink(t),this._insertAfter(t,n,r),this._addToMoves(t,r),t}_addAfter(t,n,r){return this._insertAfter(t,n,r),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,n,r){const o=null===n?this._itHead:n._next;return t._next=o,t._prev=n,null===o?this._itTail=t:o._prev=t,null===n?this._itHead=t:n._next=t,null===this._linkedRecords&&(this._linkedRecords=new Tt),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const n=t._prev,r=t._next;return null===n?this._itHead=r:n._next=r,null===r?this._itTail=n:r._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Tt),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class it{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dt{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===n||n<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){const n=t._prevDup,r=t._nextDup;return null===n?this._head=r:n._nextDup=r,null===r?this._tail=n:r._prevDup=n,null===this._head}}class Tt{constructor(){this.map=new Map}put(t){const n=t.trackById;let r=this.map.get(n);r||(r=new dt,this.map.set(n,r)),r.add(t)}get(t,n){const o=this.map.get(t);return o?o.get(t,n):null}remove(t){const n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Xe(e,t,n){const r=e.previousIndex;if(null===r)return r;let o=0;return n&&r{class e{static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:On});constructor(n){this.factories=n}static create(n,r){if(null!=r){const o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||On()),deps:[[e,new cp,new Zm]]}}find(n){const r=this.factories.find(o=>o.supports(n));if(null!=r)return r;throw new mt(901,!1)}}return e})();function fn(e,t,n,r,o=!1){for(;null!==n;){const c=t[n.index];null!==c&&r.push(ir(c)),K(c)&&zr(c,r);const p=n.type;if(8&p)fn(e,t,n.child,r);else if(32&p){const y=ag(n,t);let x;for(;x=y();)r.push(x)}else if(16&p){const y=Fh(t,n);if(Array.isArray(y))r.push(...y);else{const x=Fl(t[fi]);fn(x[Ve],x,y,r,!0)}}n=o?n.projectionNext:n.next}return r}function zr(e,t){for(let n=B;n{lh(e.lView)},consumerOnSignalRead(){this.lView[w]=this}};function gi(e){return e.ngOriginalError}class Ur{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&gi(t);for(;n&&gi(n);)n=gi(n);return n||null}}const Oi=new Zt("",{providedIn:"root",factory:()=>!1}),Hn={};function Ie(e){p0(xr(),lt(),ci()+e,!1)}function p0(e,t,n,r){if(!r)if(3==(3&t[Mn])){const c=e.preOrderCheckHooks;null!==c&&Ol(t,c,n)}else{const c=e.preOrderHooks;null!==c&&ep(t,c,0,n)}Ya(n)}function nt(e,t=er.Default){const n=lt();return null===n?rn(e,t):vh(ni(),n,Pn(e),t)}function af(e,t,n,r,o,c,p,y,x,E,P){const F=t.blueprint.slice();return F[di]=o,F[Mn]=140|r,(null!==E||e&&2048&e[Mn])&&(F[Mn]|=2048),Uv(F),F[si]=F[ou]=e,F[ti]=n,F[Dl]=p||e&&e[Dl],F[jn]=y||e&&e[jn],F[To]=x||e&&e[To]||null,F[Ai]=c,F[m]=function eC(){return Qb++}(),F[At]=P,F[l]=E,F[fi]=2==t.type?e[fi]:F,F}function Cu(e,t,n,r,o){let c=e.data[t];if(null===c)c=function Ta(e,t,n,r,o){const c=Y_(),p=K_(),x=e.data[t]=function F3(e,t,n,r,o,c){let p=t?t.injectorIndex:-1,y=0;return function Wa(){return null!==Un.skipHydrationRootTNode}()&&(y|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:p,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:y,providerIndexes:0,value:o,attrs:c,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,p?c:c&&c.parent,n,t,r,o);return null===e.firstChild&&(e.firstChild=x),null!==c&&(p?null==c.child&&null!==x.parent&&(c.child=x):null===c.next&&(c.next=x,x.prev=c)),x}(e,t,n,r,o),function hh(){return Un.lFrame.inI18n}()&&(c.flags|=32);else if(64&c.type){c.type=n,c.value=r,c.attrs=o;const p=function ys(){const e=Un.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}();c.injectorIndex=null===p?-1:p.injectorIndex}return Sl(c,!0),c}function lf(e,t,n,r){if(0===n)return-1;const o=t.length;for(let c=0;cC&&p0(e,t,C,!1),Rr(p?2:0,o),n(r,o)}finally{Ya(c),Rr(p?3:1,o)}}function Hp(e,t,n){if(J(t)){const r=ye(null);try{const c=t.directiveEnd;for(let p=t.directiveStart;pnull;function R2(e,t,n,r){for(let o in e)if(e.hasOwnProperty(o)){n=null===n?{}:n;const c=e[o];null===r?L2(n,t,o,c):r.hasOwnProperty(o)&&L2(n,t,r[o],c)}return n}function L2(e,t,n,r){e.hasOwnProperty(n)?e[n].push(t,r):e[n]=[t,r]}function DC(e,t,n,r){if(Ad()){const o=null===r?null:{"":-1},c=function G3(e,t){const n=e.directiveRegistry;let r=null,o=null;if(n)for(let c=0;c0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(p)!=y&&p.push(y),p.push(n,r,c)}}(e,t,r,lf(e,n,o.hostVars,Hn),o)}function Eu(e,t,n,r,o,c){const p=Ji(e,t);!function SC(e,t,n,r,o,c,p){if(null==c)e.removeAttribute(t,o,n);else{const y=null==p?qt(c):p(c,r||"",o);e.setAttribute(t,o,y,n)}}(t[jn],p,c,e.value,n,r,o)}function K3(e,t,n,r,o,c){const p=c[t];if(null!==p)for(let y=0;y-1&&(Pp(t,r),op(n,r))}this._attachedToViewContainer=!1}cg(this._lView[Ve],this._lView)}onDestroy(t){wa(this._lView,t)}markForCheck(){_0(this._cdRefInjectingView||this._lView)}detach(){this._lView[Mn]&=-129}reattach(){Fm(this._lView),this._lView[Mn]|=128}detectChanges(){!function OC(e,t=!0){const n=e[Dl],r=n.rendererFactory,o=n.afterRenderEventManager;r.begin?.(),o?.begin();try{const p=e[Ve];H2(p,e,p.template,e[ti]),function eF(e){let t=0;for(;W_(e);){if(100===t)throw new mt(103,!1);t++,W2(e,1)}}(e)}catch(p){throw t&&rx(e,p),p}finally{r.end?.(),n.inlineEffectRunner?.flush(),o?.end()}}(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new mt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function vc(e,t){Lp(e,t,t[jn],2,null,null)}(this._lView[Ve],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new mt(902,!1);this._appRef=t}}let v0=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=iF}return e})();function iF(e){return function oF(e,t,n){if(Q(e)&&!n){const r=So(e.index,t);return new y0(r,r)}return 47&e.type?new y0(t[fi],t):null}(ni(),lt(),16==(16&e))}let ix=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=cF;static#t=this.__NG_ENV_ID__=n=>n}return e})();class lF extends ix{constructor(t){super(),this._lView=t}onDestroy(t){return wa(this._lView,t),()=>function Pd(e,t){if(null===e[d])return;const n=e[d].indexOf(t);-1!==n&&e[d].splice(n,1)}(this._lView,t)}}function cF(){return new lF(lt())}const uF=new Zt("",{providedIn:"root",factory:()=>Nt(hF)});let hF=(()=>{class e{static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:()=>new fF})}return e})(),dF=(()=>{class e{constructor(){this.queuedEffectCount=0,this.queues=new Map}scheduleEffect(n){const r=n.creationZone;this.queues.has(r)||this.queues.set(r,new Set);const o=this.queues.get(r);o.has(n)||(this.queuedEffectCount++,o.add(n))}flush(){for(;this.queuedEffectCount>0;)for(const[n,r]of this.queues)null===n?this.flushQueue(r):n.run(()=>this.flushQueue(r))}flushQueue(n){for(const r of n)n.delete(r),this.queuedEffectCount--,r.run()}static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:()=>new e})}return e})();class fF{constructor(){this.hasQueuedFlush=!1,this.delegate=new dF,this.flushTask=()=>{this.delegate.flush(),this.hasQueuedFlush=!1}}scheduleEffect(t){this.delegate.scheduleEffect(t),this.hasQueuedFlush||(queueMicrotask(this.flushTask),this.hasQueuedFlush=!0)}}class pF{constructor(t,n,r,o,c,p){this.scheduler=t,this.effectFn=n,this.creationZone=r,this.errorHandler=c,this.watcher=function Cn(e,t,n){const r=Object.create(oo);n&&(r.consumerAllowSignalWrites=!0),r.fn=e,r.schedule=t;const o=x=>{r.cleanupFn=x};return r.ref={notify:()=>oe(r),run:()=>{if(null===r.fn)return;if(function xe(){return we}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(r.dirty=!1,r.hasRun&&!Se(r))return;r.hasRun=!0;const x=Ge(r);try{r.cleanupFn(),r.cleanupFn=po,r.fn(o)}finally{ot(r,x)}},cleanup:()=>r.cleanupFn(),destroy:()=>function p(x){(function c(x){return null===x.fn&&null===x.schedule})(x)||(Ce(x),x.cleanupFn(),x.fn=null,x.schedule=null,x.cleanupFn=po)}(r),[W]:r},r.ref}(y=>this.runEffect(y),()=>this.schedule(),p),this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}runEffect(t){try{this.effectFn(t)}catch(n){this.errorHandler?.handleError(n)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}function Sg(e,t){!t?.injector&&Iy();const n=t?.injector??Nt(Ms),r=n.get(Ur,null,{optional:!0}),o=!0!==t?.manualCleanup?n.get(ix):null,c=new pF(n.get(uF),e,typeof Zone>"u"?null:Zone.current,o,r,t?.allowSignalWrites??!1),p=n.get(v0,null,{optional:!0});return p&&8&p._lView[Mn]?(p._lView[_]??=[]).push(c.watcher.notify):c.watcher.notify(),c}const X2=new Set;function Wp(e){X2.has(e)||(X2.add(e),performance?.mark?.("mark_use_counter",{detail:{feature:e}}))}function kC(e){return t=>{setTimeout(e,void 0,t)}}const wi=class mF extends Qt{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,n,r){let o=t,c=n||(()=>null),p=r;if(t&&"object"==typeof t){const x=t;o=x.next?.bind(x),c=x.error?.bind(x),p=x.complete?.bind(x)}this.__isAsync&&(c=kC(c),o&&(o=kC(o)),p&&(p=kC(p)));const y=super.subscribe({next:o,error:c,complete:p});return t instanceof Hr&&t.add(y),y}};function Y2(...e){}class ui{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new wi(!1),this.onMicrotaskEmpty=new wi(!1),this.onStable=new wi(!1),this.onError=new wi(!1),typeof Zone>"u")throw new mt(908,!1);Zone.assertZonePatched();const o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!r&&n,o.shouldCoalesceRunChangeDetection=r,o.lastRequestAnimationFrameId=-1,o.nativeRequestAnimationFrame=function gF(){const e="function"==typeof Jr.requestAnimationFrame;let t=Jr[e?"requestAnimationFrame":"setTimeout"],n=Jr[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&n){const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);const o=n[Zone.__symbol__("OriginalDelegate")];o&&(n=o)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function vF(e){const t=()=>{!function yF(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Jr,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,LC(e),e.isCheckStableRunning=!0,RC(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),LC(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,o,c,p,y)=>{if(function wF(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(y))return n.invokeTask(o,c,p,y);try{return K2(e),n.invokeTask(o,c,p,y)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===c.type||e.shouldCoalesceRunChangeDetection)&&t(),J2(e)}},onInvoke:(n,r,o,c,p,y,x)=>{try{return K2(e),n.invoke(o,c,p,y,x)}finally{e.shouldCoalesceRunChangeDetection&&t(),J2(e)}},onHasTask:(n,r,o,c)=>{n.hasTask(o,c),r===o&&("microTask"==c.change?(e._hasPendingMicrotasks=c.microTask,LC(e),RC(e)):"macroTask"==c.change&&(e.hasPendingMacrotasks=c.macroTask))},onHandleError:(n,r,o,c)=>(n.handleError(o,c),e.runOutsideAngular(()=>e.onError.emit(c)),!1)})}(o)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ui.isInAngularZone())throw new mt(909,!1)}static assertNotInAngularZone(){if(ui.isInAngularZone())throw new mt(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){const c=this._inner,p=c.scheduleEventTask("NgZoneEvent: "+o,t,_F,Y2,Y2);try{return c.runTask(p,n,r)}finally{c.cancelTask(p)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}}const _F={};function RC(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function LC(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function K2(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function J2(e){e._nesting--,RC(e)}class xF{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new wi,this.onMicrotaskEmpty=new wi,this.onStable=new wi,this.onError=new wi}run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}}const Q2=new Zt("",{providedIn:"root",factory:eD});function eD(){const e=Nt(ui);let t=!0;return qc(new fe(o=>{t=e.isStable&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks,e.runOutsideAngular(()=>{o.next(t),o.complete()})}),new fe(o=>{let c;e.runOutsideAngular(()=>{c=e.onStable.subscribe(()=>{ui.assertNotInAngularZone(),queueMicrotask(()=>{!t&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks&&(t=!0,o.next(!0))})})});const p=e.onUnstable.subscribe(()=>{ui.assertInAngularZone(),t&&(t=!1,e.runOutsideAngular(()=>{o.next(!1)}))});return()=>{c.unsubscribe(),p.unsubscribe()}}).pipe(Wc()))}var Zp=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Zp||{});const tD={destroy(){}};function rD(e,t){!t&&Iy();const n=t?.injector??Nt(Ms);if(!function ea(e){return"browser"===(e??Nt(Ms)).get(gu)}(n))return tD;Wp("NgAfterNextRender");const r=n.get(ox),o=r.handler??=new oD,c=t?.phase??Zp.MixedReadWrite,p=()=>{o.unregister(x),y()},y=n.get(ix).onDestroy(p),x=new iD(n,c,()=>{p(),e()});return o.register(x),{destroy:p}}class iD{constructor(t,n,r){this.phase=n,this.callbackFn=r,this.zone=t.get(ui),this.errorHandler=t.get(Ur,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(t){this.errorHandler?.handleError(t)}}}class oD{constructor(){this.executingCallbacks=!1,this.buckets={[Zp.EarlyRead]:new Set,[Zp.Write]:new Set,[Zp.MixedReadWrite]:new Set,[Zp.Read]:new Set},this.deferredCallbacks=new Set}validateBegin(){if(this.executingCallbacks)throw new mt(102,!1)}register(t){(this.executingCallbacks?this.deferredCallbacks:this.buckets[t.phase]).add(t)}unregister(t){this.buckets[t.phase].delete(t),this.deferredCallbacks.delete(t)}execute(){this.executingCallbacks=!0;for(const t of Object.values(this.buckets))for(const n of t)n.invoke();this.executingCallbacks=!1;for(const t of this.deferredCallbacks)this.buckets[t.phase].add(t);this.deferredCallbacks.clear()}destroy(){for(const t of Object.values(this.buckets))t.clear();this.deferredCallbacks.clear()}}let ox=(()=>{class e{constructor(){this.renderDepth=0,this.handler=null,this.internalCallbacks=[]}begin(){this.handler?.validateBegin(),this.renderDepth++}end(){if(this.renderDepth--,0===this.renderDepth){for(const n of this.internalCallbacks)n();this.internalCallbacks.length=0,this.handler?.execute()}}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:()=>new e})}return e})();function CF(e,t){const n=So(t,e),r=n[Ve];!function MF(e,t){for(let n=t.length;n0&&Jy(e,n,c.join(" "))}}(F,Ot,$,r),void 0!==n&&function RF(e,t,n){const r=e.projection=[];for(let o=0;o=0;r--){const o=e[r];o.hostVars=t+=o.hostVars,o.hostAttrs=Cl(o.hostAttrs,n=Cl(n,o.hostAttrs))}}(r)}function ax(e){return e===Qr?{}:e===ur?[]:e}function NF(e,t){const n=e.viewQuery;e.viewQuery=n?(r,o)=>{t(r,o),n(r,o)}:t}function zF(e,t){const n=e.contentQueries;e.contentQueries=n?(r,o,c)=>{t(r,o,c),n(r,o,c)}:t}function BF(e,t){const n=e.hostBindings;e.hostBindings=n?(r,o)=>{t(r,o),n(r,o)}:t}function dD(e){const t=e.inputConfig,n={};for(const r in t)if(t.hasOwnProperty(r)){const o=t[r];Array.isArray(o)&&o[2]&&(n[r]=o[2])}e.inputTransforms=n}function ko(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function bi(e,t,n,r){const o=lt();return ko(o,uo(),t)&&(xr(),Eu(sr(),o,e,t,n,r)),bi}function Og(e,t,n,r,o,c){const y=function Xp(e,t,n,r){const o=ko(e,t,n);return ko(e,t+1,r)||o}(e,function Pl(){return Un.lFrame.bindingIndex}(),n,o);return Xa(2),y?t+qt(n)+r+qt(o)+c:Hn}function cx(e,t){return e<<17|t<<2}function cf(e){return e>>17&32767}function NC(e){return 2|e}function Yp(e){return(131068&e)>>2}function zC(e,t){return-131069&e|t<<2}function BC(e){return 1|e}function bD(e,t,n,r,o){const c=e[n+1],p=null===t;let y=r?cf(c):Yp(c),x=!1;for(;0!==y&&(!1===x||p);){const P=e[y+1];YF(e[y],t)&&(x=!0,e[y+1]=r?BC(P):NC(P)),y=r?cf(P):Yp(P)}x&&(e[n+1]=r?NC(c):BC(c))}function YF(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Eh(e,t)>=0}function Rt(e,t,n){const r=lt();return ko(r,uo(),t)&&function il(e,t,n,r,o,c,p,y){const x=Ji(t,n);let P,E=t.inputs;!y&&null!=E&&(P=E[r])?(AC(e,n,P,r,o),Q(t)&&function B3(e,t){const n=So(t,e);16&n[Mn]||(n[Mn]|=64)}(n,t.index)):3&t.type&&(r=function z3(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),o=null!=p?p(o,t.value||"",r):o,c.setProperty(x,r,o))}(xr(),sr(),r,e,t,r[jn],n,!1),Rt}function VC(e,t,n,r,o){const p=o?"class":"style";AC(e,n,t.inputs[p],p,r)}function pn(e,t,n){return wc(e,t,n,!1),pn}function vo(e,t){return wc(e,t,null,!0),vo}function wc(e,t,n,r){const o=lt(),c=xr(),p=Xa(2);c.firstUpdatePass&&function PD(e,t,n,r){const o=e.data;if(null===o[n+1]){const c=o[ci()],p=function SD(e,t){return t>=e.expandoStartIndex}(e,n);(function RD(e,t){return 0!=(e.flags&(t?8:16))})(c,r)&&null===t&&!p&&(t=!1),t=function oN(e,t,n,r){const o=function Nm(e){const t=Un.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let c=r?t.residualClasses:t.residualStyles;if(null===o)0===(r?t.classBindings:t.styleBindings)&&(n=b0(n=UC(null,e,t,n,r),t.attrs,r),c=null);else{const p=t.directiveStylingLast;if(-1===p||e[p]!==o)if(n=UC(o,e,t,n,r),null===c){let x=function sN(e,t,n){const r=n?t.classBindings:t.styleBindings;if(0!==Yp(r))return e[cf(r)]}(e,t,r);void 0!==x&&Array.isArray(x)&&(x=UC(null,e,t,x[1],r),x=b0(x,t.attrs,r),function aN(e,t,n,r){e[cf(n?t.classBindings:t.styleBindings)]=r}(e,t,r,x))}else c=function lN(e,t,n){let r;const o=t.directiveEnd;for(let c=1+t.directiveStylingLast;c0)&&(E=!0)):P=n,o)if(0!==x){const V=cf(e[y+1]);e[r+1]=cx(V,y),0!==V&&(e[V+1]=zC(e[V+1],r)),e[y+1]=function qF(e,t){return 131071&e|t<<17}(e[y+1],r)}else e[r+1]=cx(y,0),0!==y&&(e[y+1]=zC(e[y+1],r)),y=r;else e[r+1]=cx(x,0),0===y?y=r:e[x+1]=zC(e[x+1],r),x=r;E&&(e[r+1]=NC(e[r+1])),bD(e,P,r,!0),bD(e,P,r,!1),function XF(e,t,n,r,o){const c=o?e.residualClasses:e.residualStyles;null!=c&&"string"==typeof t&&Eh(c,t)>=0&&(n[r+1]=BC(n[r+1]))}(t,P,e,r,c),p=cx(y,x),c?t.classBindings=p:t.styleBindings=p}(o,c,t,n,p,r)}}(c,e,p,r),t!==Hn&&ko(o,p,t)&&function OD(e,t,n,r,o,c,p,y){if(!(3&t.type))return;const x=e.data,E=x[y+1],P=function WF(e){return 1==(1&e)}(E)?kD(x,t,n,o,Yp(E),p):void 0;ux(P)||(ux(c)||function GF(e){return 2==(2&e)}(E)&&(c=kD(x,null,n,o,y,p)),function yu(e,t,n,r,o){if(t)o?e.addClass(n,r):e.removeClass(n,r);else{let c=-1===r.indexOf("-")?void 0:Ll.DashCase;null==o?e.removeStyle(n,r,c):("string"==typeof o&&o.endsWith("!important")&&(o=o.slice(0,-10),c|=Ll.Important),e.setStyle(n,r,o,c))}}(r,p,Js(ci(),n),o,c))}(c,c.data[ci()],o,o[jn],e,o[p+1]=function dN(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=Gi(Us(e)))),e}(t,n),r,p)}function UC(e,t,n,r,o){let c=null;const p=n.directiveEnd;let y=n.directiveStylingLast;for(-1===y?y=n.directiveStart:y++;y0;){const x=e[o],E=Array.isArray(x),P=E?x[1]:x,F=null===P;let V=n[o+1];V===Hn&&(V=F?ur:void 0);let $=F?fc(V,r):P===r?V:void 0;if(E&&!ux($)&&($=fc(x,r)),ux($)&&(y=$,p))return y;const ce=e[o+1];o=p?cf(ce):Yp(ce)}if(null!==t){let x=c?t.residualClasses:t.residualStyles;null!=x&&(y=fc(x,r))}return y}function ux(e){return void 0!==e}let VD=(e,t)=>null;function Vg(e,t){return VD(e,t)}class HN{destroy(t){}updateValue(t,n){}swap(t,n){const r=Math.min(t,n),o=Math.max(t,n),c=this.detach(o);if(o-r>1){const p=this.detach(r);this.attach(r,c),this.attach(o,p)}else this.attach(r,c)}move(t,n){this.attach(n,this.detach(t))}}function WC(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function ZC(e,t,n,r){return!(void 0===t||!t.has(r)||(e.attach(n,t.get(r)),t.delete(r),0))}function UD(e,t,n,r,o){if(ZC(e,t,r,n(r,o)))e.updateValue(r,o);else{const c=e.create(r,o);e.attach(r,c)}}function jD(e,t,n,r){const o=new Set;for(let c=t;c<=n;c++)o.add(r(c,e.at(c)));return o}class $D{constructor(){this.map=new Map}has(t){const n=this.map.get(t);return void 0!==n&&n.length>0}delete(t){const n=this.map.get(t);return void 0!==n&&(n.shift(),!0)}get(t){const n=this.map.get(t);return void 0!==n&&n.length>0?n[0]:void 0}set(t,n){this.map.has(t)?this.map.get(t)?.push(n):this.map.set(t,[n])}forEach(t){for(const[n,r]of this.map)for(const o of r)t(o,n)}}function D0(e,t,n,r){const o=t.tView,y=af(e,o,n,4096&e[Mn]?4096:16,null,t,null,null,null,r?.injector??null,r?.dehydratedView??null);y[cc]=e[t.index];const E=e[Uo];return null!==E&&(y[Uo]=E.createEmbeddedView(o)),FC(o,y,n),y}function HD(e,t){const n=B+t;if(n0&&(n[o-1][Eo]=t),r{class e{static#e=this.__NG_ELEMENT_ID__=qN}return e})();function qN(){return WD(ni(),lt())}const WN=Cc,GD=class extends WN{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return v(this._hostTNode,this._hostLView)}get injector(){return new ho(this._hostTNode,this._hostLView)}get parentInjector(){const t=np(this._hostTNode,this._hostLView);if(Um(t)){const n=Ka(t,this._hostLView),r=Bs(t);return new ho(n[Ve].data[r+8],n)}return new ho(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=qD(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-B}createEmbeddedView(t,n,r){let o,c;"number"==typeof r?o=r:null!=r&&(o=r.index,c=r.injector);const p=Vg(this._lContainer,t.ssrId),y=t.createEmbeddedViewImpl(n||{},c,p);return this.insertImpl(y,o,Ug(this._hostTNode,p)),y}createComponent(t,n,r,o,c){const p=t&&!function fu(e){return"function"==typeof e}(t);let y;if(p)y=n;else{const ce=n||{};y=ce.index,r=ce.injector,o=ce.projectableNodes,c=ce.environmentInjector||ce.ngModuleRef}const x=p?t:new x0(nr(t)),E=r||this.parentInjector;if(!c&&null==x.ngModule){const _e=(p?E:this.parentInjector).get($o,null);_e&&(c=_e)}const P=nr(x.componentType??{}),F=Vg(this._lContainer,P?.id??null),$=x.create(E,o,F?.firstChild??null,c);return this.insertImpl($.hostView,y,Ug(this._hostTNode,F)),$}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){const o=t._lView;if(function Vv(e){return K(e[si])}(o)){const y=this.indexOf(t);if(-1!==y)this.detach(y);else{const x=o[si],E=new GD(x,x[Ai],x[si]);E.detach(E.indexOf(t))}}const c=this._adjustIndex(n),p=this._lContainer;return I0(p,o,c,r),t.attachToViewContainerRef(),Jv(YC(p),c,t),t}move(t,n){return this.insert(t,n)}indexOf(t){const n=qD(this._lContainer);return null!==n?n.indexOf(t):-1}remove(t){const n=this._adjustIndex(t,-1),r=Pp(this._lContainer,n);r&&(op(YC(this._lContainer),n),cg(r[Ve],r))}detach(t){const n=this._adjustIndex(t,-1),r=Pp(this._lContainer,n);return r&&null!=op(YC(this._lContainer),n)?new y0(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function qD(e){return e[8]}function YC(e){return e[8]||(e[8]=[])}function WD(e,t){let n;const r=t[e.index];return K(r)?n=r:(n=B2(r,t,null,e),t[e.index]=n,nx(t,n)),ZD(n,t,e,r),new GD(n,e,t)}let ZD=function YD(e,t,n,r){if(e[A])return;let o;o=8&n.type?ir(r):function ZN(e,t){const n=e[jn],r=n.createComment(""),o=Ji(t,e);return Go(n,Lh(n,o),r,function k1(e,t){return e.nextSibling(t)}(n,o),!1),r}(t,n),e[A]=o},KC=(e,t,n)=>!1;function _r(e,t,n,r,o,c,p,y){const x=lt(),E=xr(),P=e+C,F=E.firstCreatePass?function JN(e,t,n,r,o,c,p,y,x){const E=t.consts,P=Cu(t,e,4,p||null,qa(E,y));DC(t,n,P,qa(E,x)),Qf(t,P);const F=P.tView=g0(2,P,r,o,c,t.directiveRegistry,t.pipeRegistry,null,t.schemas,E,null);return null!==t.queries&&(t.queries.template(t,P),F.queries=t.queries.embeddedTView(P)),P}(P,E,x,t,n,r,o,c,p):E.data[P];Sl(F,!1);const V=KD(E,x,F,e);Bm()&&fg(E,x,V,F),eo(V,x);const $=B2(V,x,V,F);return x[P]=$,nx(x,$),function XD(e,t,n){return KC(e,t,n)}($,F,x),U(F)&&Gp(E,x,F),null!=p&&Ul(x,F,y),_r}let KD=function JD(e,t,n,r){return cu(!0),t[jn].createComment("")};function Kp(e,t,n){Wp("NgControlFlow");const r=lt(),o=uo(),c=JC(r,C+e);if(ko(r,o,t)){const y=ye(null);try{if(XC(c,0),-1!==t){const x=QC(r[Ve],C+t),E=Vg(c,x.tView.ssrId);I0(c,D0(r,x,n,{dehydratedView:E}),0,Ug(x,E))}}finally{ye(y)}}else{const y=HD(c,0);void 0!==y&&(y[ti]=n)}}class t4{constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-B}}function QD(e){return e}function eI(e,t){return t}class n4{constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}}function jg(e,t,n,r,o,c,p,y,x,E,P){Wp("NgControlFlow");const F=void 0!==x,V=lt(),$=y?p.bind(V[fi][ti]):p,ce=new n4(F,$);V[C+e]=ce,_r(e+1,t,n,r,o,c),F&&_r(e+2,x,E,P)}class r4 extends HN{constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-B}at(t){return this.getLView(t)[ti].$implicit}attach(t,n){const r=n[At];this.needsIndexUpdate||=t!==this.length,I0(this.lContainer,n,t,Ug(this.templateTNode,r))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,function i4(e,t){return Pp(e,t)}(this.lContainer,t)}create(t,n){const r=Vg(this.lContainer,this.templateTNode.tView.ssrId);return D0(this.hostLView,this.templateTNode,new t4(this.lContainer,n,t),{dehydratedView:r})}destroy(t){cg(t[Ve],t)}updateValue(t,n){this.getLView(t)[ti].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t{e.destroy(y)})}(p,e,c.trackByFn),p.updateIndexes(),c.hasEmptyBlock){const y=uo(),x=0===p.length;if(ko(r,y,x)){const E=n+2,P=JC(r,E);if(x){const F=QC(o,E),V=Vg(P,F.tView.ssrId);I0(P,D0(r,F,void 0,{dehydratedView:V}),0,Ug(F,V))}else XC(P,0)}}}finally{ye(t)}}function JC(e,t){return e[t]}function QC(e,t){return Ns(e,t)}function We(e,t,n,r){const o=lt(),c=xr(),p=C+e,y=o[jn],x=c.firstCreatePass?function F4(e,t,n,r,o,c){const p=t.consts,x=Cu(t,e,2,r,qa(p,o));return DC(t,n,x,qa(p,c)),null!==x.attrs&&sx(x,x.attrs,!1),null!==x.mergedAttrs&&sx(x,x.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,x),x}(p,c,o,t,n,r):c.data[p],E=CI(c,o,x,y,t,e);o[p]=E;const P=U(x);return Sl(x,!0),Np(y,E,x),32!=(32&x.flags)&&Bm()&&fg(c,o,E,x),0===function vb(){return Un.lFrame.elementDepthCount}()&&eo(E,o),function xb(){Un.lFrame.elementDepthCount++}(),P&&(Gp(c,o,x),Hp(c,x,o)),null!==r&&Ul(o,x),We}function et(){let e=ni();K_()?Ti():(e=e.parent,Sl(e,!1));const t=e;(function uc(e){return Un.skipHydrationRootTNode===e})(t)&&function ch(){Un.skipHydrationRootTNode=null}(),function X_(){Un.lFrame.elementDepthCount--}();const n=xr();return n.firstCreatePass&&(Qf(n,e),J(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function cy(e){return 0!=(8&e.flags)}(t)&&VC(n,t,lt(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function uy(e){return 0!=(16&e.flags)}(t)&&VC(n,t,lt(),t.stylesWithoutHost,!1),et}function Kt(e,t,n,r){return We(e,t,n,r),et(),Kt}let CI=(e,t,n,r,o,c)=>(cu(!0),Sp(r,o,function Rd(){return Un.lFrame.currentNamespace}()));function hf(e,t,n){const r=lt(),o=xr(),c=e+C,p=o.firstCreatePass?function B4(e,t,n,r,o){const c=t.consts,p=qa(c,r),y=Cu(t,e,8,"ng-container",p);return null!==p&&sx(y,p,!0),DC(t,n,y,qa(c,o)),null!==t.queries&&t.queries.elementStart(t,y),y}(c,o,r,t,n):o.data[c];Sl(p,!0);const y=EI(o,r,p,e);return r[c]=y,Bm()&&fg(o,r,y,p),eo(y,r),U(p)&&(Gp(o,r,p),Hp(o,p,r)),null!=n&&Ul(r,p),hf}function df(){let e=ni();const t=xr();return K_()?Ti():(e=e.parent,Sl(e,!1)),t.firstCreatePass&&(Qf(t,e),J(e)&&t.queries.elementEnd(e)),df}let EI=(e,t,n,r)=>(cu(!0),Ip(t[jn],""));function no(){return lt()}const Kg="en-US";let PI=Kg;function N0(e){return!!e&&"function"==typeof e.then}function tS(e){return!!e&&"function"==typeof e.subscribe}function wn(e,t,n,r){const o=lt(),c=xr(),p=ni();return function rS(e,t,n,r,o,c,p){const y=U(r),E=e.firstCreatePass&&j2(e),P=t[ti],F=U2(t);let V=!0;if(3&r.type||p){const _e=Ji(r,t),Pe=p?p(_e):_e,De=F.length,Ne=p?Wt=>p(ir(Wt[r.index])):r.index;let wt=null;if(!p&&y&&(wt=function zz(e,t,n,r){const o=e.cleanup;if(null!=o)for(let c=0;cx?y[x]:null}"string"==typeof p&&(c+=2)}return null}(e,t,o,r.index)),null!==wt)(wt.__ngLastListenerFn__||wt).__ngNextListenerFn__=c,wt.__ngLastListenerFn__=c,V=!1;else{c=oS(r,t,P,c,!1);const Wt=n.listen(Pe,o,c);F.push(c,Wt),E&&E.push(o,Ne,De,De+1)}}else c=oS(r,t,P,c,!1);const $=r.outputs;let ce;if(V&&null!==$&&(ce=$[o])){const _e=ce.length;if(_e)for(let Pe=0;Pe<_e;Pe+=2){const nn=t[ce[Pe]][ce[Pe+1]].subscribe(c),Ot=F.length;F.push(c,nn),E&&E.push(o,r.index,Ot,-(Ot+1))}}}(c,o,o[jn],p,e,t,r),wn}function iS(e,t,n,r){try{return Rr(6,t,n),!1!==n(r)}catch(o){return rx(e,o),!1}finally{Rr(7,t,n)}}function oS(e,t,n,r,o){return function c(p){if(p===Function)return r;_0(e.componentOffset>-1?So(e.index,t):t);let x=iS(t,n,r,p),E=c.__ngNextListenerFn__;for(;E;)x=iS(t,n,E,p)&&x,E=E.__ngNextListenerFn__;return o&&!1===x&&p.preventDefault(),x}}function en(e=1){return function Jf(e){return(Un.lFrame.contextLView=function Yf(e,t){for(;e>0;)t=t[ou],e--;return t}(e,Un.lFrame.contextLView))[ti]}(e)}function _n(e,t=""){const n=lt(),r=xr(),o=e+C,c=r.firstCreatePass?Cu(r,o,1,t,null):r.data[o],p=ES(r,n,c,t,e);n[o]=p,Bm()&&fg(r,n,p,c),Sl(c,!1)}let ES=(e,t,n,r,o)=>(cu(!0),function Dp(e,t){return e.createText(t)}(t[jn],r));function Ri(e){return Su("",e,""),Ri}function Su(e,t,n){const r=lt(),o=function Ag(e,t,n,r){return ko(e,uo(),n)?t+qt(n)+r:Hn}(r,e,t,n);return o!==Hn&&Gh(r,ci(),o),Su}function hM(e,t,n,r,o){const c=lt(),p=Og(c,e,t,n,r,o);return p!==Hn&&Gh(c,ci(),p),hM}function dM(e,t,n,r,o){if(e=Pn(e),Array.isArray(e))for(let c=0;c>20;if(pu(e)||!e.multi){const $=new Fd(E,o,nt),ce=pM(x,t,o?P:P+V,F);-1===ce?(fy(Qs(y,p),c,x),fM(c,e,t.length),t.push(x),y.directiveStart++,y.directiveEnd++,o&&(y.providerIndexes+=1048576),n.push($),p.push($)):(n[ce]=$,p[ce]=$)}else{const $=pM(x,t,P+V,F),ce=pM(x,t,P,P+V),Pe=ce>=0&&n[ce];if(o&&!Pe||!o&&!($>=0&&n[$])){fy(Qs(y,p),c,x);const De=function r5(e,t,n,r,o){const c=new Fd(e,n,nt);return c.multi=[],c.index=t,c.componentProviders=0,kS(c,o,r&&!n),c}(o?n5:t5,n.length,o,r,E);!o&&Pe&&(n[ce].providerFactory=De),fM(c,e,t.length,0),t.push(x),y.directiveStart++,y.directiveEnd++,o&&(y.providerIndexes+=1048576),n.push(De),p.push(De)}else fM(c,e,$>-1?$:ce,kS(n[o?ce:$],E,!o&&r));!o&&r&&Pe&&n[ce].componentProviders++}}}function fM(e,t,n,r){const o=pu(t),c=function dp(e){return!!e.useClass}(t);if(o||c){const x=(c?Pn(t.useClass):t).prototype.ngOnDestroy;if(x){const E=e.destroyHooks||(e.destroyHooks=[]);if(!o&&t.multi){const P=E.indexOf(n);-1===P?E.push(n,[r,x]):E[P+1].push(r,x)}else E.push(n,x)}}}function kS(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function pM(e,t,n,r){for(let o=n;o{n.providersResolver=(r,o)=>function e5(e,t,n){const r=xr();if(r.firstCreatePass){const o=Y(e);dM(n,r.data,r.blueprint,o,!0),dM(t,r.data,r.blueprint,o,!1)}}(r,o?o(e):e,t)}}class em{}class RS{}class gM extends em{constructor(t,n,r){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new sD(this);const o=ei(t);this._bootstrapComponents=Ho(o.bootstrap),this._r3Injector=h1(t,n,[{provide:em,useValue:this},{provide:f,useValue:this.componentFactoryResolver},...r],Gi(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class _M extends RS{constructor(t){super(),this.moduleType=t}create(t){return new gM(this.moduleType,t,[])}}class LS extends em{constructor(t){super(),this.componentFactoryResolver=new sD(this),this.instance=null;const n=new $d([...t.providers,{provide:em,useValue:this},{provide:f,useValue:this.componentFactoryResolver}],t.parent||pp(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}function yM(e,t,n=null){return new LS({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}let s5=(()=>{class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){const r=Ih(0,n.type),o=r.length>0?yM([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(const n of this.cachedInjectors.values())null!==n&&n.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=tn({token:e,providedIn:"environment",factory:()=>new e(rn($o))})}return e})();function vM(e){Wp("NgStandalone"),e.getStandaloneInjector=t=>t.get(s5).getOrCreateStandaloneInjector(e)}function HS(e,t,n,r,o,c){const p=t+n;return ko(e,p,o)?function Tu(e,t,n){return e[t]=n}(e,p+1,c?r.call(c,o):r(o)):function z0(e,t){const n=e[t];return n===Hn?void 0:n}(e,p+1)}function Tx(e,t){const n=xr();let r;const o=e+C;n.firstCreatePass?(r=function T5(e,t){if(t)for(let n=t.length-1;n>=0;n--){const r=t[n];if(e===r.name)return r}}(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];const c=r.factory||(r.factory=rr(r.type)),y=ns(nt);try{const x=xs(!1),E=c();return xs(x),function jz(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(n,lt(),o,E),E}finally{ns(y)}}function Dx(e,t,n){const r=e+C,o=lt(),c=zs(o,r);return function B0(e,t){return e[Ve].data[t].pure}(o,r)?HS(o,li(),t,c.transform,n,c):c.transform(n)}function A5(){return this._results[Symbol.iterator]()}class wM{static#e=Symbol.iterator;get changes(){return this._changes||(this._changes=new wi)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=wM.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=A5)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;const r=function os(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function Gm(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r{class e{static#e=this.__NG_ELEMENT_ID__=R5}return e})();const O5=qh,k5=class extends O5{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){const o=D0(this._declarationLView,this._declarationTContainer,t,{injector:n,dehydratedView:r});return new y0(o)}};function R5(){return Ix(ni(),lt())}function Ix(e,t){return 4&e.type?new k5(t,e,v(e,t)):null}class bM{constructor(t){this.queryList=t,this.matches=null}clone(){return new bM(this.queryList)}setDirty(){this.queryList.setDirty()}}class CM{constructor(t=[]){this.queries=t}createEmbeddedView(t){const n=t.queries;if(null!==n){const r=null!==t.contentQueries?t.contentQueries[0]:n.length,o=[];for(let c=0;c0)r.push(p[y/2]);else{const E=c[y+1],P=t[-x];for(let F=B;F{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=Nt(AM,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const n=[];for(const o of this.appInits){const c=o();if(N0(c))n.push(c);else if(tS(c)){const p=new Promise((y,x)=>{c.subscribe({complete:y,error:x})});n.push(p)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),0===n.length&&r(),this.initialized=!0}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),gP=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const Wh=new Zt("LocaleId",{providedIn:"root",factory:()=>Nt(Wh,er.Optional|er.SkipSelf)||function cB(){return typeof $localize<"u"&&$localize.locale||Kg}()});let Px=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new oi(!1)}add(){this.hasPendingTasks.next(!0);const n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),0===this.pendingTasks.size&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class mB{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}}let yP=(()=>{class e{compileModuleSync(n){return new _M(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){const r=this.compileModuleSync(n),c=Ho(ei(n).declarations).reduce((p,y)=>{const x=nr(y);return x&&p.push(new x0(x)),p},[]);return new mB(r,c)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const CP=new Zt(""),Ox=new Zt("");let FM,RM=(()=>{class e{constructor(n,r,o){this._ngZone=n,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,FM||(function VB(e){FM=e}(o),o.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ui.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb(this._didWork)}this._didWork=!1});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,o){let c=-1;r&&r>0&&(c=setTimeout(()=>{this._callbacks=this._callbacks.filter(p=>p.timeoutId!==c),n(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:n,timeoutId:c,updateCb:o})}whenStable(n,r,o){if(o&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,o),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,o){return[]}static#e=this.\u0275fac=function(r){return new(r||e)(rn(ui),rn(LM),rn(Ox))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})(),LM=(()=>{class e{constructor(){this._applications=new Map}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return FM?.findTestabilityInTree(this,n,r)??null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),ff=null;const MP=new Zt("AllowMultipleToken"),NM=new Zt("PlatformDestroyListeners"),zM=new Zt("appBootstrapListener");function DP(e,t,n=[]){const r=`Platform: ${t}`,o=new Zt(r);return(c=[])=>{let p=BM();if(!p||p.injector.get(MP,!1)){const y=[...n,...c,{provide:o,useValue:!0}];e?e(y):function $B(e){if(ff&&!ff.get(MP,!1))throw new mt(400,!1);(function EP(){!function Vn(e){Dn=e}(()=>{throw new mt(600,!1)})})(),ff=e;const t=e.get(SP);(function TP(e){e.get(Sy,null)?.forEach(n=>n())})(e)}(function IP(e=[],t){return Ms.create({name:t,providers:[{provide:fp,useValue:"platform"},{provide:NM,useValue:new Set([()=>ff=null])},...e]})}(y,r))}return function GB(e){const t=BM();if(!t)throw new mt(401,!1);return t}()}}function BM(){return ff?.get(SP)??null}let SP=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const o=function qB(e="zone.js",t){return"noop"===e?new xF:"zone.js"===e?new ui(t):e}(r?.ngZone,function PP(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing}));return o.run(()=>{const c=function o5(e,t,n){return new gM(e,t,n)}(n.moduleType,this.injector,function LP(e){return[{provide:ui,useFactory:e},{provide:Bd,multi:!0,useFactory:()=>{const t=Nt(ZB,{optional:!0});return()=>t.initialize()}},{provide:RP,useFactory:WB},{provide:Q2,useFactory:eD}]}(()=>o)),p=c.injector.get(Ur,null);return o.runOutsideAngular(()=>{const y=o.onError.subscribe({next:x=>{p.handleError(x)}});c.onDestroy(()=>{kx(this._modules,c),y.unsubscribe()})}),function AP(e,t,n){try{const r=n();return N0(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e.handleError(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}(p,o,()=>{const y=c.injector.get(OM);return y.runInitializers(),y.donePromise.then(()=>(function AI(e){Mo(e,"Expected localeId to be defined"),"string"==typeof e&&(PI=e.toLowerCase().replace(/_/g,"-"))}(c.injector.get(Wh,Kg)||Kg),this._moduleDoBootstrap(c),c))})})}bootstrapModule(n,r=[]){const o=OP({},r);return function UB(e,t,n){const r=new _M(n);return Promise.resolve(r)}(0,0,n).then(c=>this.bootstrapModuleFactory(c,o))}_moduleDoBootstrap(n){const r=n.injector.get(e_);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(o=>r.bootstrap(o));else{if(!n.instance.ngDoBootstrap)throw new mt(-403,!1);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new mt(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const n=this._injector.get(NM,null);n&&(n.forEach(r=>r()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ms))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function OP(e,t){return Array.isArray(t)?t.reduce(OP,e):{...e,...t}}let e_=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Nt(RP),this.zoneIsStable=Nt(Q2),this.componentTypes=[],this.components=[],this.isStable=Nt(Px).hasPendingTasks.pipe(Vi(n=>n?Sn(!1):this.zoneIsStable),Zc(),Wc()),this._injector=Nt($o)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){const o=n instanceof f0;if(!this._injector.get(OM).done)throw!o&&function El(e){const t=nr(e)||qi(e)||mo(e);return null!==t&&t.standalone}(n),new mt(405,!1);let p;p=o?n:this._injector.get(f).resolveComponentFactory(n),this.componentTypes.push(p.componentType);const y=function jB(e){return e.isBoundToModule}(p)?void 0:this._injector.get(em),E=p.create(Ms.NULL,[],r||p.selector,y),P=E.location.nativeElement,F=E.injector.get(CP,null);return F?.registerApplication(P),E.onDestroy(()=>{this.detachView(E.hostView),kx(this.components,E),F?.unregisterApplication(P)}),this._loadComponent(E),E}tick(){if(this._runningTick)throw new mt(101,!1);try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;kx(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const r=this._injector.get(zM,[]);[...this._bootstrapListeners,...r].forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>kx(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new mt(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function kx(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const RP=new Zt("",{providedIn:"root",factory:()=>Nt(Ur).handleError.bind(void 0)});function WB(){const e=Nt(ui),t=Nt(Ur);return n=>e.runOutsideAngular(()=>t.handleError(n))}let ZB=(()=>{class e{constructor(){this.zone=Nt(ui),this.applicationRef=Nt(e_)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const t6=DP(null,"core",[]);let n6=(()=>{class e{constructor(n){}static#e=this.\u0275fac=function(r){return new(r||e)(rn(e_))};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({})}return e})();function n_(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}let ZM=null;function pf(){return ZM}class D6{}const Ss=new Zt("DocumentToken");let XM=(()=>{class e{historyGo(n){throw new Error("Not implemented")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(S6),providedIn:"platform"})}return e})();const I6=new Zt("Location Initialized");let S6=(()=>{class e extends XM{constructor(){super(),this._doc=Nt(Ss),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return pf().getBaseHref(this._doc)}onPopState(n){const r=pf().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){const r=pf().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function YM(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function rA(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function Zh(e){return e&&"?"!==e[0]?"?"+e:e}let nm=(()=>{class e{historyGo(n){throw new Error("Not implemented")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(oA),providedIn:"root"})}return e})();const iA=new Zt("appBaseHref");let oA=(()=>{class e extends nm{constructor(n,r){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??Nt(Ss).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return YM(this._baseHref,n)}path(n=!1){const r=this._platformLocation.pathname+Zh(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,c){const p=this.prepareExternalUrl(o+Zh(c));this._platformLocation.pushState(n,r,p)}replaceState(n,r,o,c){const p=this.prepareExternalUrl(o+Zh(c));this._platformLocation.replaceState(n,r,p)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(XM),rn(iA,8))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),P6=(()=>{class e extends nm{constructor(n,r){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(n){const r=YM(this._baseHref,n);return r.length>0?"#"+r:r}pushState(n,r,o,c){let p=this.prepareExternalUrl(o+Zh(c));0==p.length&&(p=this._platformLocation.pathname),this._platformLocation.pushState(n,r,p)}replaceState(n,r,o,c){let p=this.prepareExternalUrl(o+Zh(c));0==p.length&&(p=this._platformLocation.pathname),this._platformLocation.replaceState(n,r,p)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(XM),rn(iA,8))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})(),H0=(()=>{class e{constructor(n){this._subject=new wi,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;const r=this._locationStrategy.getBaseHref();this._basePath=function k6(e){if(new RegExp("^(https?:)?//").test(e)){const[,n]=e.split(/\/\/[^\/]+/);return n}return e}(rA(sA(r))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Zh(r))}normalize(n){return e.stripTrailingSlash(function O6(e,t){if(!e||!t.startsWith(e))return t;const n=t.substring(e.length);return""===n||["/",";","?","#"].includes(n[0])?n:t}(this._basePath,sA(n)))}prepareExternalUrl(n){return n&&"/"!==n[0]&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Zh(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Zh(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{const r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r,complete:o})}static#e=this.normalizeQueryParams=Zh;static#t=this.joinWithSlash=YM;static#n=this.stripTrailingSlash=rA;static#r=this.\u0275fac=function(r){return new(r||e)(rn(nm))};static#i=this.\u0275prov=tn({token:e,factory:()=>function A6(){return new H0(rn(nm))}(),providedIn:"root"})}return e})();function sA(e){return e.replace(/\/index.html$/,"")}function mA(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const r=n.indexOf("="),[o,c]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()===t)return decodeURIComponent(c)}return null}class v9{constructor(t,n,r,o){this.$implicit=t,this.ngForOf=n,this.index=r,this.count=o}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let yA=(()=>{class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,r,o){this._viewContainer=n,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;!this._differ&&n&&(this._differ=this._differs.find(n).create(this.ngForTrackBy))}if(this._differ){const n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){const r=this._viewContainer;n.forEachOperation((o,c,p)=>{if(null==o.previousIndex)r.createEmbeddedView(this._template,new v9(o.item,this._ngForOf,-1,-1),null===p?void 0:p);else if(null==p)r.remove(null===c?void 0:c);else if(null!==c){const y=r.get(c);r.move(y,p),vA(y,o)}});for(let o=0,c=r.length;o{vA(r.get(o.currentIndex),o)})}static ngTemplateContextGuard(n,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(nt(Cc),nt(qh),nt(Ct))};static#t=this.\u0275dir=Ln({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function vA(e,t){e.context.$implicit=t.item}let Pu=(()=>{class e{constructor(n,r){this._viewContainer=n,this._context=new x9,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){xA("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){xA("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}static#e=this.\u0275fac=function(r){return new(r||e)(nt(Cc),nt(qh))};static#t=this.\u0275dir=Ln({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class x9{constructor(){this.$implicit=null,this.ngIf=null}}function xA(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Gi(t)}'.`)}class M9{createSubscription(t,n){return ae(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){ae(()=>t.unsubscribe())}}class E9{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}}const T9=new E9,D9=new M9;let bA=(()=>{class e{constructor(n){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){return this._obj?n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue:(n&&this._subscribe(n),this._latestValue)}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,r=>this._updateLatestValue(n,r))}_selectStrategy(n){if(N0(n))return T9;if(tS(n))return D9;throw function Ec(e,t){return new mt(2100,!1)}()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,r){n===this._obj&&(this._latestValue=r,this._ref.markForCheck())}static#e=this.\u0275fac=function(r){return new(r||e)(nt(v0,16))};static#t=this.\u0275pipe=Nr({name:"async",type:e,pure:!1,standalone:!0})}return e})(),G9=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({})}return e})();function EA(e){return"server"===e}let X9=(()=>{class e{static#e=this.\u0275prov=tn({token:e,providedIn:"root",factory:()=>new Y9(rn(Ss),window)})}return e})();class Y9{constructor(t,n){this.document=t,this.window=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(!this.supportsScrolling())return;const n=function K9(e,t){const n=e.getElementById(t)||e.getElementsByName(t)[0];if(n)return n;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let o=r.currentNode;for(;o;){const c=o.shadowRoot;if(c){const p=c.getElementById(t)||c.querySelector(`[name="${t}"]`);if(p)return p}o=r.nextNode()}}return null}(this.document,t);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(t){this.supportsScrolling()&&(this.window.history.scrollRestoration=t)}scrollToElement(t){const n=t.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,c=this.offset();this.window.scrollTo(r-c[0],o-c[1])}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}class TA{}class xV extends D6{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class fE extends xV{static makeCurrent(){!function T6(e){ZM||(ZM=e)}(new fE)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=function wV(){return Z0=Z0||document.querySelector("base"),Z0?Z0.getAttribute("href"):null}();return null==n?null:function bV(e){return new URL(e,"http://a").pathname}(n)}resetBaseElement(){Z0=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return mA(document.cookie,t)}}let Z0=null,MV=(()=>{class e{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const pE=new Zt("EventManagerPlugins");let PA=(()=>{class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(c=>c.supports(n)),!r)throw new mt(5101,!1);return this._eventNameToPlugin.set(n,r),r}static#e=this.\u0275fac=function(r){return new(r||e)(rn(pE),rn(ui))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();class AA{constructor(t){this._doc=t}}const mE="ng-app-id";let OA=(()=>{class e{constructor(n,r,o,c={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=c,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=EA(c),this.resetHostNodes()}addStyles(n){for(const r of n)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(n){for(const r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(const r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){const r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){const n=this.doc.head?.querySelectorAll(`style[${mE}="${this.appId}"]`);if(n?.length){const r=new Map;return n.forEach(o=>{null!=o.textContent&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){const o=this.styleRef;if(o.has(n)){const c=o.get(n);return c.usage+=r,c.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){const o=this.styleNodesInDOM,c=o?.get(r);if(c?.parentNode===n)return o.delete(r),c.removeAttribute(mE),c;{const p=this.doc.createElement("style");return this.nonce&&p.setAttribute("nonce",this.nonce),p.textContent=r,this.platformIsServer&&p.setAttribute(mE,this.appId),n.appendChild(p),p}}addStyleToHost(n,r){const o=this.getStyleElement(n,r),c=this.styleRef,p=c.get(r)?.elements;p?p.push(o):c.set(r,{elements:[o],usage:1})}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss),rn(ng),rn(Py,8),rn(gu))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const gE={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},_E=/%COMP%/g,IV=new Zt("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>!0});function RA(e,t){return t.map(n=>n.replace(_E,e))}let LA=(()=>{class e{constructor(n,r,o,c,p,y,x,E=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=c,this.doc=p,this.platformId=y,this.ngZone=x,this.nonce=E,this.rendererByCompId=new Map,this.platformIsServer=EA(y),this.defaultRenderer=new yE(n,p,x,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Vo.ShadowDom&&(r={...r,encapsulation:Vo.Emulated});const o=this.getOrCreateRenderer(n,r);return o instanceof NA?o.applyToHost(n):o instanceof vE&&o.applyStyles(),o}getOrCreateRenderer(n,r){const o=this.rendererByCompId;let c=o.get(r.id);if(!c){const p=this.doc,y=this.ngZone,x=this.eventManager,E=this.sharedStylesHost,P=this.removeStylesOnCompDestroy,F=this.platformIsServer;switch(r.encapsulation){case Vo.Emulated:c=new NA(x,E,r,this.appId,P,p,y,F);break;case Vo.ShadowDom:return new OV(x,E,n,r,p,y,this.nonce,F);default:c=new vE(x,E,r,P,p,y,F)}o.set(r.id,c)}return c}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(r){return new(r||e)(rn(PA),rn(OA),rn(ng),rn(IV),rn(Ss),rn(gu),rn(ui),rn(Py))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();class yE{constructor(t,n,r,o){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(gE[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(FA(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(FA(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r="string"==typeof t?this.doc.querySelector(t):t;if(!r)throw new mt(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;const c=gE[o];c?t.setAttributeNS(c,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){const o=gE[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){o&(Ll.DashCase|Ll.Important)?t.style.setProperty(n,r,o&Ll.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&Ll.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){null!=t&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r){if("string"==typeof t&&!(t=pf().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if("__ngUnwrap__"===n)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))&&n.preventDefault()}}}function FA(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class OV extends yE{constructor(t,n,r,o,c,p,y,x){super(t,c,p,x),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const E=RA(o.id,o.styles);for(const P of E){const F=document.createElement("style");y&&F.setAttribute("nonce",y),F.textContent=P,this.shadowRoot.appendChild(F)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(this.nodeOrShadowRoot(t),n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class vE extends yE{constructor(t,n,r,o,c,p,y,x){super(t,c,p,y),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o,this.styles=x?RA(x,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class NA extends vE{constructor(t,n,r,o,c,p,y,x){const E=o+"-"+r.id;super(t,n,r,c,p,y,x,E),this.contentAttr=function SV(e){return"_ngcontent-%COMP%".replace(_E,e)}(E),this.hostAttr=function PV(e){return"_nghost-%COMP%".replace(_E,e)}(E)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){const r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}}let kV=(()=>{class e extends AA{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const zA=["alt","control","meta","shift"],RV={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},LV={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let FV=(()=>{class e extends AA{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,r,o){const c=e.parseEventName(r),p=e.eventCallback(c.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>pf().onAndCancel(n,c.domEventName,p))}static parseEventName(n){const r=n.toLowerCase().split("."),o=r.shift();if(0===r.length||"keydown"!==o&&"keyup"!==o)return null;const c=e._normalizeKey(r.pop());let p="",y=r.indexOf("code");if(y>-1&&(r.splice(y,1),p="code."),zA.forEach(E=>{const P=r.indexOf(E);P>-1&&(r.splice(P,1),p+=E+".")}),p+=c,0!=r.length||0===c.length)return null;const x={};return x.domEventName=o,x.fullKey=p,x}static matchEventFullKeyCode(n,r){let o=RV[n.key]||n.key,c="";return r.indexOf("code.")>-1&&(o=n.code,c="code."),!(null==o||!o)&&(o=o.toLowerCase()," "===o?o="space":"."===o&&(o="dot"),zA.forEach(p=>{p!==o&&(0,LV[p])(n)&&(c+=p+".")}),c+=o,c===r)}static eventCallback(n,r,o){return c=>{e.matchEventFullKeyCode(c,n)&&o.runGuarded(()=>r(c))}}static _normalizeKey(n){return"esc"===n?"escape":n}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const VV=DP(t6,"browser",[{provide:gu,useValue:"browser"},{provide:Sy,useValue:function NV(){fE.makeCurrent()},multi:!0},{provide:Ss,useFactory:function BV(){return function wp(e){tg=e}(document),document},deps:[]}]),UV=new Zt(""),UA=[{provide:Ox,useClass:class CV{addToWindow(t){Jr.getAngularTestability=(r,o=!0)=>{const c=t.findTestabilityInTree(r,o);if(null==c)throw new mt(5103,!1);return c},Jr.getAllAngularTestabilities=()=>t.getAllTestabilities(),Jr.getAllAngularRootElements=()=>t.getAllRootElements(),Jr.frameworkStabilizers||(Jr.frameworkStabilizers=[]),Jr.frameworkStabilizers.push(r=>{const o=Jr.getAllAngularTestabilities();let c=o.length,p=!1;const y=function(x){p=p||x,c--,0==c&&r(p)};o.forEach(x=>{x.whenStable(y)})})}findTestabilityInTree(t,n,r){return null==n?null:t.getTestability(n)??(r?pf().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}},deps:[]},{provide:CP,useClass:RM,deps:[ui,LM,Ox]},{provide:RM,useClass:RM,deps:[ui,LM,Ox]}],jA=[{provide:fp,useValue:"root"},{provide:Ur,useFactory:function zV(){return new Ur},deps:[]},{provide:pE,useClass:kV,multi:!0,deps:[Ss,ui,gu]},{provide:pE,useClass:FV,multi:!0,deps:[Ss]},LA,OA,PA,{provide:T,useExisting:LA},{provide:TA,useClass:MV,deps:[]},[]];let jV=(()=>{class e{constructor(n){}static withServerTransition(n){return{ngModule:e,providers:[{provide:ng,useValue:n.appId}]}}static#e=this.\u0275fac=function(r){return new(r||e)(rn(UV,12))};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({providers:[...jA,...UA],imports:[G9,n6]})}return e})(),xE=(()=>{class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss))};static#t=this.\u0275prov=tn({token:e,factory:function(r){let o=null;return o=r?new r:function HV(){return new xE(rn(Ss))}(),o},providedIn:"root"})}return e})();typeof window<"u"&&window;let i_=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:function(r){let o=null;return o=r?new(r||e):rn(GA),o},providedIn:"root"})}return e})(),GA=(()=>{class e extends i_{constructor(n){super(),this._doc=n}sanitize(n,r){if(null==r)return null;switch(n){case go.NONE:return r;case go.HTML:return Nl(r,"HTML")?Us(r):rl(this._doc,String(r)).toString();case go.STYLE:return Nl(r,"Style")?Us(r):r;case go.SCRIPT:if(Nl(r,"Script"))return Us(r);throw new mt(5200,!1);case go.URL:return Nl(r,"URL")?Us(r):ef(String(r));case go.RESOURCE_URL:if(Nl(r,"ResourceURL"))return Us(r);throw new mt(5201,!1);default:throw new mt(5202,!1)}}bypassSecurityTrustHtml(n){return function dC(e){return new uC(e)}(n)}bypassSecurityTrustStyle(n){return function U1(e){return new Qd(e)}(n)}bypassSecurityTrustScript(n){return function fC(e){return new mg(e)}(n)}bypassSecurityTrustUrl(n){return function j1(e){return new hC(e)}(n)}bypassSecurityTrustResourceUrl(n){return function pC(e){return new B1(e)}(n)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss))};static#t=this.\u0275prov=tn({token:e,factory:function(r){let o=null;return o=r?new r:function ZV(e){return new GA(e.get(Ss))}(rn(Ms)),o},providedIn:"root"})}return e})();const{isArray:YV}=Array,{getPrototypeOf:KV,prototype:JV,keys:QV}=Object;function WA(e){if(1===e.length){const t=e[0];if(YV(t))return{args:t,keys:null};if(function e8(e){return e&&"object"==typeof e&&KV(e)===JV}(t)){const n=QV(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}const{isArray:t8}=Array;function bE(e){return yn(t=>function n8(e,t){return t8(t)?e(...t):e(t)}(e,t))}function ZA(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function CE(...e){const t=ml(e),n=lo(e),{args:r,keys:o}=WA(e);if(0===r.length)return Pr([],t);const c=new fe(function r8(e,t,n=ve){return r=>{XA(t,()=>{const{length:o}=e,c=new Array(o);let p=o,y=o;for(let x=0;x{const E=Pr(e[x],t);let P=!1;E.subscribe(hn(r,F=>{c[x]=F,P||(P=!0,y--),y||r.next(n(c.slice()))},()=>{--p||r.complete()}))},r)},r)}}(r,t,o?p=>ZA(o,p):ve));return n?c.pipe(bE(n)):c}function XA(e,t,n){e?Ws(n,e,t):t()}const ew=Yo(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function tw(...e){return function i8(){return pl(1)}()(Pr(e,ml(e)))}function YA(e){return new fe(t=>{Jo(e()).subscribe(t)})}function nw(e,t){const n=bn(e)?e:()=>e,r=o=>o.error(n());return new fe(t?o=>t.schedule(r,0,o):r)}function ME(){return an((e,t)=>{let n=null;e._refCount++;const r=hn(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(n=null);const o=e._connection,c=n;n=null,o&&(!c||o===c)&&o.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}class KA extends fe{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,Rn(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Hr;const n=this.getSubject();t.add(this.source.subscribe(hn(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Hr.EMPTY)}return t}refCount(){return ME()(this)}}function la(e,t){return an((n,r)=>{let o=0;n.subscribe(hn(r,c=>e.call(t,c,o++)&&r.next(c)))})}function rw(e){return an((t,n)=>{let r=!1;t.subscribe(hn(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function JA(e=s8){return an((t,n)=>{let r=!1;t.subscribe(hn(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function s8(){return new ew}function as(e,t){const n=arguments.length>=2;return r=>r.pipe(e?la((o,c)=>e(o,c,r)):ve,es(1),n?rw(t):JA(()=>new ew))}function o_(e,t){return bn(t)?Sr(e,t,1):Sr(e,1)}function $r(e,t,n){const r=bn(e)||t||n?{next:e,error:t,complete:n}:e;return r?an((o,c)=>{var p;null===(p=r.subscribe)||void 0===p||p.call(r);let y=!0;o.subscribe(hn(c,x=>{var E;null===(E=r.next)||void 0===E||E.call(r,x),c.next(x)},()=>{var x;y=!1,null===(x=r.complete)||void 0===x||x.call(r),c.complete()},x=>{var E;y=!1,null===(E=r.error)||void 0===E||E.call(r,x),c.error(x)},()=>{var x,E;y&&(null===(x=r.unsubscribe)||void 0===x||x.call(r)),null===(E=r.finalize)||void 0===E||E.call(r)}))}):ve}function s_(e){return an((t,n)=>{let c,r=null,o=!1;r=t.subscribe(hn(n,void 0,void 0,p=>{c=Jo(e(p,s_(e)(t))),r?(r.unsubscribe(),r=null,c.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,c.subscribe(n))})}function iw(e){return e<=0?()=>Bo:an((t,n)=>{let r=[];t.subscribe(hn(n,o=>{r.push(o),e{for(const o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function QA(e){return yn(()=>e)}function X0(e){return an((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function EE(e){return an((t,n)=>{Jo(e).subscribe(hn(n,()=>n.complete(),Kl)),!n.closed&&t.subscribe(n)})}const cr="primary",Y0=Symbol("RouteTitle");class u8{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){const n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}}function a_(e){return new u8(e)}function h8(e,t,n){const r=n.path.split("/");if(r.length>e.length||"full"===n.pathMatch&&(t.hasChildren()||r.lengthr[c]===o)}return e===t}function tO(e){return e.length>0?e[e.length-1]:null}function gf(e){return function XV(e){return!!e&&(e instanceof fe||bn(e.lift)&&bn(e.subscribe))}(e)?e:N0(e)?Pr(Promise.resolve(e)):Sn(e)}const f8={exact:function iO(e,t,n){if(!rm(e.segments,t.segments)||!ow(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(const r in t.children)if(!e.children[r]||!iO(e.children[r],t.children[r],n))return!1;return!0},subset:oO},nO={exact:function p8(e,t){return Au(e,t)},subset:function m8(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>eO(e[n],t[n]))},ignored:()=>!0};function rO(e,t,n){return f8[n.paths](e.root,t.root,n.matrixParams)&&nO[n.queryParams](e.queryParams,t.queryParams)&&!("exact"===n.fragment&&e.fragment!==t.fragment)}function oO(e,t,n){return sO(e,t,t.segments,n)}function sO(e,t,n,r){if(e.segments.length>n.length){const o=e.segments.slice(0,n.length);return!(!rm(o,n)||t.hasChildren()||!ow(o,n,r))}if(e.segments.length===n.length){if(!rm(e.segments,n)||!ow(e.segments,n,r))return!1;for(const o in t.children)if(!e.children[o]||!oO(e.children[o],t.children[o],r))return!1;return!0}{const o=n.slice(0,e.segments.length),c=n.slice(e.segments.length);return!!(rm(e.segments,o)&&ow(e.segments,o,r)&&e.children[cr])&&sO(e.children[cr],t,c,r)}}function ow(e,t,n){return t.every((r,o)=>nO[n](e[o].parameters,r.parameters))}class l_{constructor(t=new Ci([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=a_(this.queryParams)),this._queryParamMap}toString(){return y8.serialize(this)}}class Ci{constructor(t,n){this.segments=t,this.children=n,this.parent=null,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return sw(this)}}class K0{constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=a_(this.parameters)),this._parameterMap}toString(){return cO(this)}}function rm(e,t){return e.length===t.length&&e.every((n,r)=>n.path===t[r].path)}let c_=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>new DE,providedIn:"root"})}return e})();class DE{parse(t){const n=new S8(t);return new l_(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){const n=`/${J0(t.root,!0)}`,r=function w8(e){const t=Object.keys(e).map(n=>{const r=e[n];return Array.isArray(r)?r.map(o=>`${aw(n)}=${aw(o)}`).join("&"):`${aw(n)}=${aw(r)}`}).filter(n=>!!n);return t.length?`?${t.join("&")}`:""}(t.queryParams);return`${n}${r}${"string"==typeof t.fragment?`#${function v8(e){return encodeURI(e)}(t.fragment)}`:""}`}}const y8=new DE;function sw(e){return e.segments.map(t=>cO(t)).join("/")}function J0(e,t){if(!e.hasChildren())return sw(e);if(t){const n=e.children[cr]?J0(e.children[cr],!1):"",r=[];return Object.entries(e.children).forEach(([o,c])=>{o!==cr&&r.push(`${o}:${J0(c,!1)}`)}),r.length>0?`${n}(${r.join("//")})`:n}{const n=function _8(e,t){let n=[];return Object.entries(e.children).forEach(([r,o])=>{r===cr&&(n=n.concat(t(o,r)))}),Object.entries(e.children).forEach(([r,o])=>{r!==cr&&(n=n.concat(t(o,r)))}),n}(e,(r,o)=>o===cr?[J0(e.children[cr],!1)]:[`${o}:${J0(r,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[cr]?`${sw(e)}/${n[0]}`:`${sw(e)}/(${n.join("//")})`}}function aO(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function aw(e){return aO(e).replace(/%3B/gi,";")}function IE(e){return aO(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lw(e){return decodeURIComponent(e)}function lO(e){return lw(e.replace(/\+/g,"%20"))}function cO(e){return`${IE(e.path)}${function x8(e){return Object.keys(e).map(t=>`;${IE(t)}=${IE(e[t])}`).join("")}(e.parameters)}`}const b8=/^[^\/()?;#]+/;function SE(e){const t=e.match(b8);return t?t[0]:""}const C8=/^[^\/()?;=#]+/,E8=/^[^=?&#]+/,D8=/^[^&#]+/;class S8{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ci([],{}):new Ci([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[cr]=new Ci(t,n)),r}parseSegment(){const t=SE(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new mt(4009,!1);return this.capture(t),new K0(lw(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const n=function M8(e){const t=e.match(C8);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){const o=SE(this.remaining);o&&(r=o,this.capture(r))}t[lw(n)]=lw(r)}parseQueryParam(t){const n=function T8(e){const t=e.match(E8);return t?t[0]:""}(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){const p=function I8(e){const t=e.match(D8);return t?t[0]:""}(this.remaining);p&&(r=p,this.capture(r))}const o=lO(n),c=lO(r);if(t.hasOwnProperty(o)){let p=t[o];Array.isArray(p)||(p=[p],t[o]=p),p.push(c)}else t[o]=c}parseParens(t){const n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const r=SE(this.remaining),o=this.remaining[r.length];if("/"!==o&&")"!==o&&";"!==o)throw new mt(4010,!1);let c;r.indexOf(":")>-1?(c=r.slice(0,r.indexOf(":")),this.capture(c),this.capture(":")):t&&(c=cr);const p=this.parseChildren();n[c]=1===Object.keys(p).length?p[cr]:new Ci([],p),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new mt(4011,!1)}}function uO(e){return e.segments.length>0?new Ci([],{[cr]:e}):e}function hO(e){const t={};for(const r of Object.keys(e.children)){const c=hO(e.children[r]);if(r===cr&&0===c.segments.length&&c.hasChildren())for(const[p,y]of Object.entries(c.children))t[p]=y;else(c.segments.length>0||c.hasChildren())&&(t[r]=c)}return function P8(e){if(1===e.numberOfChildren&&e.children[cr]){const t=e.children[cr];return new Ci(e.segments.concat(t.segments),t.children)}return e}(new Ci(e.segments,t))}function im(e){return e instanceof l_}function dO(e){let t;const o=uO(function n(c){const p={};for(const x of c.children){const E=n(x);p[x.outlet]=E}const y=new Ci(c.url,p);return c===e&&(t=y),y}(e.root));return t??o}function fO(e,t,n,r){let o=e;for(;o.parent;)o=o.parent;if(0===t.length)return PE(o,o,o,n,r);const c=function O8(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new mO(!0,0,e);let t=0,n=!1;const r=e.reduce((o,c,p)=>{if("object"==typeof c&&null!=c){if(c.outlets){const y={};return Object.entries(c.outlets).forEach(([x,E])=>{y[x]="string"==typeof E?E.split("/"):E}),[...o,{outlets:y}]}if(c.segmentPath)return[...o,c.segmentPath]}return"string"!=typeof c?[...o,c]:0===p?(c.split("/").forEach((y,x)=>{0==x&&"."===y||(0==x&&""===y?n=!0:".."===y?t++:""!=y&&o.push(y))}),o):[...o,c]},[]);return new mO(n,t,r)}(t);if(c.toRoot())return PE(o,o,new Ci([],{}),n,r);const p=function k8(e,t,n){if(e.isAbsolute)return new uw(t,!0,0);if(!n)return new uw(t,!1,NaN);if(null===n.parent)return new uw(n,!0,0);const r=cw(e.commands[0])?0:1;return function R8(e,t,n){let r=e,o=t,c=n;for(;c>o;){if(c-=o,r=r.parent,!r)throw new mt(4005,!1);o=r.segments.length}return new uw(r,!1,o-c)}(n,n.segments.length-1+r,e.numberOfDoubleDots)}(c,o,e),y=p.processChildren?ev(p.segmentGroup,p.index,c.commands):gO(p.segmentGroup,p.index,c.commands);return PE(o,p.segmentGroup,y,n,r)}function cw(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function Q0(e){return"object"==typeof e&&null!=e&&e.outlets}function PE(e,t,n,r,o){let p,c={};r&&Object.entries(r).forEach(([x,E])=>{c[x]=Array.isArray(E)?E.map(P=>`${P}`):`${E}`}),p=e===t?n:pO(e,t,n);const y=uO(hO(p));return new l_(y,c,o)}function pO(e,t,n){const r={};return Object.entries(e.children).forEach(([o,c])=>{r[o]=c===t?n:pO(c,t,n)}),new Ci(e.segments,r)}class mO{constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&cw(r[0]))throw new mt(4003,!1);const o=r.find(Q0);if(o&&o!==tO(r))throw new mt(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class uw{constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}}function gO(e,t,n){if(e||(e=new Ci([],{})),0===e.segments.length&&e.hasChildren())return ev(e,t,n);const r=function F8(e,t,n){let r=0,o=t;const c={match:!1,pathIndex:0,commandIndex:0};for(;o=n.length)return c;const p=e.segments[o],y=n[r];if(Q0(y))break;const x=`${y}`,E=r0&&void 0===x)break;if(x&&E&&"object"==typeof E&&void 0===E.outlets){if(!yO(x,E,p))return c;r+=2}else{if(!yO(x,{},p))return c;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}(e,t,n),o=n.slice(r.commandIndex);if(r.match&&r.pathIndexc!==cr)&&e.children[cr]&&1===e.numberOfChildren&&0===e.children[cr].segments.length){const c=ev(e.children[cr],t,n);return new Ci(e.segments,c.children)}return Object.entries(r).forEach(([c,p])=>{"string"==typeof p&&(p=[p]),null!==p&&(o[c]=gO(e.children[c],t,p))}),Object.entries(e.children).forEach(([c,p])=>{void 0===r[c]&&(o[c]=p)}),new Ci(e.segments,o)}}function AE(e,t,n){const r=e.segments.slice(0,t);let o=0;for(;o{"string"==typeof r&&(r=[r]),null!==r&&(t[n]=AE(new Ci([],{}),0,r))}),t}function _O(e){const t={};return Object.entries(e).forEach(([n,r])=>t[n]=`${r}`),t}function yO(e,t,n){return e==n.path&&Au(t,n.parameters)}const tv="imperative";class Ou{constructor(t,n){this.id=t,this.url=n}}class hw extends Ou{constructor(t,n,r="imperative",o=null){super(t,n),this.type=0,this.navigationTrigger=r,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class ku extends Ou{constructor(t,n,r){super(t,n),this.urlAfterRedirects=r,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class u_ extends Ou{constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class h_ extends Ou{constructor(t,n,r,o){super(t,n),this.reason=r,this.code=o,this.type=16}}class dw extends Ou{constructor(t,n,r,o){super(t,n),this.error=r,this.target=o,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class vO extends Ou{constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class z8 extends Ou{constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class B8 extends Ou{constructor(t,n,r,o,c){super(t,n),this.urlAfterRedirects=r,this.state=o,this.shouldActivate=c,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class V8 extends Ou{constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class U8 extends Ou{constructor(t,n,r,o){super(t,n),this.urlAfterRedirects=r,this.state=o,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j8{constructor(t){this.route=t,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class $8{constructor(t){this.route=t,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class H8{constructor(t){this.snapshot=t,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class G8{constructor(t){this.snapshot=t,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q8{constructor(t){this.snapshot=t,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class W8{constructor(t){this.snapshot=t,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class xO{constructor(t,n,r){this.routerEvent=t,this.position=n,this.anchor=r,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class OE{}class kE{constructor(t){this.url=t}}class Z8{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new nv,this.attachRef=null}}let nv=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(n,r){const o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){const r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){const n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new Z8,this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class wO{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){const n=RE(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){const n=RE(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){const n=LE(t,this._root);return n.length<2?[]:n[n.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return LE(t,this._root).map(n=>n.value)}}function RE(e,t){if(e===t.value)return t;for(const n of t.children){const r=RE(e,n);if(r)return r}return null}function LE(e,t){if(e===t.value)return[t];for(const n of t.children){const r=LE(e,n);if(r.length)return r.unshift(t),r}return[]}class Tc{constructor(t,n){this.value=t,this.children=n}toString(){return`TreeNode(${this.value})`}}function d_(e){const t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}class bO extends wO{constructor(t,n){super(t),this.snapshot=n,zE(this,t)}toString(){return this.snapshot.toString()}}function CO(e,t){const n=function X8(e,t){const p=new NE([],{},{},"",{},cr,t,null,{});return new MO("",new Tc(p,[]))}(0,t),r=new oi([new K0("",{})]),o=new oi({}),c=new oi({}),p=new oi({}),y=new oi(""),x=new Ru(r,o,p,y,c,cr,t,n.root);return x.snapshot=n.root,new bO(new Tc(x,[]),n)}class Ru{constructor(t,n,r,o,c,p,y,x){this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=o,this.dataSubject=c,this.outlet=p,this.component=y,this._futureSnapshot=x,this.title=this.dataSubject?.pipe(yn(E=>E[Y0]))??Sn(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=c}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(yn(t=>a_(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(yn(t=>a_(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function FE(e,t,n="emptyOnly"){let r;const{routeConfig:o}=e;return r=null===t||"always"!==n&&""!==o?.path&&(t.component||t.routeConfig?.loadComponent)?{params:e.params,data:e.data,resolve:{...e.data,...e._resolvedData??{}}}:{params:{...t.params,...e.params},data:{...t.data,...e.data},resolve:{...e.data,...t.data,...o?.data,...e._resolvedData}},o&&TO(o)&&(r.resolve[Y0]=o.title),r}class NE{get title(){return this.data?.[Y0]}constructor(t,n,r,o,c,p,y,x,E){this.url=t,this.params=n,this.queryParams=r,this.fragment=o,this.data=c,this.outlet=p,this.component=y,this.routeConfig=x,this._resolve=E}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=a_(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=a_(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(r=>r.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class MO extends wO{constructor(t,n){super(n),this.url=t,zE(this,n)}toString(){return EO(this._root)}}function zE(e,t){t.value._routerState=e,t.children.forEach(n=>zE(e,n))}function EO(e){const t=e.children.length>0?` { ${e.children.map(EO).join(", ")} } `:"";return`${e.value}${t}`}function BE(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Au(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Au(t.params,n.params)||e.paramsSubject.next(n.params),function d8(e,t){if(e.length!==t.length)return!1;for(let n=0;nAu(n.parameters,t[r].parameters))}(e.url,t.url);return n&&!(!e.parent!=!t.parent)&&(!e.parent||VE(e.parent,t.parent))}function TO(e){return"string"==typeof e.title||null===e.title}let UE=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=cr,this.activateEvents=new wi,this.deactivateEvents=new wi,this.attachEvents=new wi,this.detachEvents=new wi,this.parentContexts=Nt(nv),this.location=Nt(Cc),this.changeDetector=Nt(v0),this.environmentInjector=Nt($o),this.inputBinder=Nt(fw,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){const{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new mt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new mt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new mt(4012,!1);this.location.detach();const n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){const n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new mt(4013,!1);this._activatedRoute=n;const o=this.location,p=n.snapshot.component,y=this.parentContexts.getOrCreateContext(this.name).children,x=new Y8(n,y,o.injector);this.activated=o.createComponent(p,{index:o.length,injector:x,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275dir=Ln({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[$n]})}return e})();class Y8{constructor(t,n,r){this.route=t,this.childContexts=n,this.parent=r}get(t,n){return t===Ru?this.route:t===nv?this.childContexts:this.parent.get(t,n)}}const fw=new Zt("");let DO=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){const{activatedRoute:r}=n,o=CE([r.queryParams,r.params,r.data]).pipe(Vi(([c,p,y],x)=>(y={...c,...p,...y},0===x?Sn(y):Promise.resolve(y)))).subscribe(c=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==r||null===r.component)return void this.unsubscribeFromRouteData(n);const p=function E6(e){const t=nr(e);if(!t)return null;const n=new x0(t);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return t.standalone},get isSignal(){return t.signals}}}(r.component);if(p)for(const{templateName:y}of p.inputs)n.activatedComponentRef.setInput(y,c[y]);else this.unsubscribeFromRouteData(n)});this.outletDataSubscriptions.set(n,o)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();function rv(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){const r=n.value;r._futureSnapshot=t.value;const o=function J8(e,t,n){return t.children.map(r=>{for(const o of n.children)if(e.shouldReuseRoute(r.value,o.value.snapshot))return rv(e,r,o);return rv(e,r)})}(e,t,n);return new Tc(r,o)}{if(e.shouldAttach(t.value)){const c=e.retrieve(t.value);if(null!==c){const p=c.route;return p.value._futureSnapshot=t.value,p.children=t.children.map(y=>rv(e,y)),p}}const r=function Q8(e){return new Ru(new oi(e.url),new oi(e.params),new oi(e.queryParams),new oi(e.fragment),new oi(e.data),e.outlet,e.component,e)}(t.value),o=t.children.map(c=>rv(e,c));return new Tc(r,o)}}const jE="ngNavigationCancelingError";function IO(e,t){const{redirectTo:n,navigationBehaviorOptions:r}=im(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=SO(!1,0,t);return o.url=n,o.navigationBehaviorOptions=r,o}function SO(e,t,n){const r=new Error("NavigationCancelingError: "+(e||""));return r[jE]=!0,r.cancellationCode=t,n&&(r.url=n),r}function PO(e){return e&&e[jE]}let AO=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["ng-component"]],standalone:!0,features:[vM],decls:1,vars:0,template:function(r,o){1&r&&Kt(0,"router-outlet")},dependencies:[UE],encapsulation:2})}return e})();function $E(e){const t=e.children&&e.children.map($E),n=t?{...e,children:t}:{...e};return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==cr&&(n.component=AO),n}function Lu(e){return e.outlet||cr}function iv(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){const n=t.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}class aU{constructor(t,n,r,o,c){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=o,this.inputBindingEnabled=c}activate(t){const n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),BE(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){const o=d_(n);t.children.forEach(c=>{const p=c.value.outlet;this.deactivateRoutes(c,o[p],r),delete o[p]}),Object.values(o).forEach(c=>{this.deactivateRouteAndItsChildren(c,r)})}deactivateRoutes(t,n,r){const o=t.value,c=n?n.value:null;if(o===c)if(o.component){const p=r.getContext(o.outlet);p&&this.deactivateChildRoutes(t,n,p.children)}else this.deactivateChildRoutes(t,n,r);else c&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){const r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,c=d_(t);for(const p of Object.keys(c))this.deactivateRouteAndItsChildren(c[p],o);if(r&&r.outlet){const p=r.outlet.detach(),y=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:p,route:t,contexts:y})}}deactivateRouteAndOutlet(t,n){const r=n.getContext(t.value.outlet),o=r&&t.value.component?r.children:n,c=d_(t);for(const p of Object.keys(c))this.deactivateRouteAndItsChildren(c[p],o);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){const o=d_(n);t.children.forEach(c=>{this.activateRoutes(c,o[c.value.outlet],r),this.forwardEvent(new W8(c.value.snapshot))}),t.children.length&&this.forwardEvent(new G8(t.value.snapshot))}activateRoutes(t,n,r){const o=t.value,c=n?n.value:null;if(BE(o),o===c)if(o.component){const p=r.getOrCreateContext(o.outlet);this.activateChildRoutes(t,n,p.children)}else this.activateChildRoutes(t,n,r);else if(o.component){const p=r.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){const y=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),p.children.onOutletReAttached(y.contexts),p.attachRef=y.componentRef,p.route=y.route.value,p.outlet&&p.outlet.attach(y.componentRef,y.route.value),BE(y.route.value),this.activateChildRoutes(t,null,p.children)}else{const y=iv(o.snapshot);p.attachRef=null,p.route=o,p.injector=y,p.outlet&&p.outlet.activateWith(o,p.injector),this.activateChildRoutes(t,null,p.children)}}else this.activateChildRoutes(t,null,r)}}class OO{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class pw{constructor(t,n){this.component=t,this.route=n}}function lU(e,t,n){const r=e._root;return ov(r,t?t._root:null,n,[r.value])}function f_(e,t){const n=Symbol(),r=t.get(e,n);return r===n?"function"!=typeof e||function Ju(e){return null!==rc(e)}(e)?t.get(e):e:r}function ov(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){const c=d_(t);return e.children.forEach(p=>{(function uU(e,t,n,r,o={canDeactivateChecks:[],canActivateChecks:[]}){const c=e.value,p=t?t.value:null,y=n?n.getContext(e.value.outlet):null;if(p&&c.routeConfig===p.routeConfig){const x=function hU(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!rm(e.url,t.url);case"pathParamsOrQueryParamsChange":return!rm(e.url,t.url)||!Au(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!VE(e,t)||!Au(e.queryParams,t.queryParams);default:return!VE(e,t)}}(p,c,c.routeConfig.runGuardsAndResolvers);x?o.canActivateChecks.push(new OO(r)):(c.data=p.data,c._resolvedData=p._resolvedData),ov(e,t,c.component?y?y.children:null:n,r,o),x&&y&&y.outlet&&y.outlet.isActivated&&o.canDeactivateChecks.push(new pw(y.outlet.component,p))}else p&&sv(t,y,o),o.canActivateChecks.push(new OO(r)),ov(e,null,c.component?y?y.children:null:n,r,o)})(p,c[p.value.outlet],n,r.concat([p.value]),o),delete c[p.value.outlet]}),Object.entries(c).forEach(([p,y])=>sv(y,n.getContext(p),o)),o}function sv(e,t,n){const r=d_(e),o=e.value;Object.entries(r).forEach(([c,p])=>{sv(p,o.component?t?t.children.getContext(c):null:t,n)}),n.canDeactivateChecks.push(new pw(o.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,o))}function av(e){return"function"==typeof e}function kO(e){return e instanceof ew||"EmptyError"===e?.name}const mw=Symbol("INITIAL_VALUE");function p_(){return Vi(e=>CE(e.map(t=>t.pipe(es(1),function o8(...e){const t=ml(e);return an((n,r)=>{(t?tw(e,n,t):tw(e,n)).subscribe(r)})}(mw)))).pipe(yn(t=>{for(const n of t)if(!0!==n){if(n===mw)return mw;if(!1===n||n instanceof l_)return n}return!0}),la(t=>t!==mw),es(1)))}function RO(e){return function Re(...e){return Oe(e)}($r(t=>{if(im(t))throw IO(0,t)}),yn(t=>!0===t))}class HE{constructor(t){this.segmentGroup=t||null}}class GE extends Error{constructor(t){super(),this.urlTree=t}}function m_(e){return nw(new HE(e))}class AU{constructor(t,n){this.urlSerializer=t,this.urlTree=n}noMatchError(t){return new mt(4002,!1)}lineralizeSegments(t,n){let r=[],o=n.root;for(;;){if(r=r.concat(o.segments),0===o.numberOfChildren)return Sn(r);if(o.numberOfChildren>1||!o.children[cr])return nw(new mt(4e3,!1));o=o.children[cr]}}applyRedirectCommands(t,n,r){const o=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n.startsWith("/"))throw new GE(o);return o}applyRedirectCreateUrlTree(t,n,r,o){const c=this.createSegmentGroup(t,n.root,r,o);return new l_(c,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){const r={};return Object.entries(t).forEach(([o,c])=>{if("string"==typeof c&&c.startsWith(":")){const y=c.substring(1);r[o]=n[y]}else r[o]=c}),r}createSegmentGroup(t,n,r,o){const c=this.createSegments(t,n.segments,r,o);let p={};return Object.entries(n.children).forEach(([y,x])=>{p[y]=this.createSegmentGroup(t,x,r,o)}),new Ci(c,p)}createSegments(t,n,r,o){return n.map(c=>c.path.startsWith(":")?this.findPosParam(t,c,o):this.findOrReturn(c,r))}findPosParam(t,n,r){const o=r[n.path.substring(1)];if(!o)throw new mt(4001,!1);return o}findOrReturn(t,n){let r=0;for(const o of n){if(o.path===t.path)return n.splice(r),o;r++}return t}}const qE={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function OU(e,t,n,r,o){const c=WE(e,t,n);return c.matched?(r=function tU(e,t){return e.providers&&!e._injector&&(e._injector=yM(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,r),function IU(e,t,n,r){const o=t.canMatch;return o&&0!==o.length?Sn(o.map(p=>{const y=f_(p,e);return gf(function _U(e){return e&&av(e.canMatch)}(y)?y.canMatch(t,n):mu(e,()=>y(t,n)))})).pipe(p_(),RO()):Sn(!0)}(r,t,n).pipe(yn(p=>!0===p?c:{...qE}))):Sn(c)}function WE(e,t,n){if("**"===t.path)return function kU(e){return{matched:!0,parameters:e.length>0?tO(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(n);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{...qE}:{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};const o=(t.matcher||h8)(n,e,t);if(!o)return{...qE};const c={};Object.entries(o.posParams??{}).forEach(([y,x])=>{c[y]=x.path});const p=o.consumed.length>0?{...c,...o.consumed[o.consumed.length-1].parameters}:c;return{matched:!0,consumedSegments:o.consumed,remainingSegments:n.slice(o.consumed.length),parameters:p,positionalParamSegments:o.posParams??{}}}function LO(e,t,n,r){return n.length>0&&function FU(e,t,n){return n.some(r=>gw(e,t,r)&&Lu(r)!==cr)}(e,n,r)?{segmentGroup:new Ci(t,LU(r,new Ci(n,e.children))),slicedSegments:[]}:0===n.length&&function NU(e,t,n){return n.some(r=>gw(e,t,r))}(e,n,r)?{segmentGroup:new Ci(e.segments,RU(e,0,n,r,e.children)),slicedSegments:n}:{segmentGroup:new Ci(e.segments,e.children),slicedSegments:n}}function RU(e,t,n,r,o){const c={};for(const p of r)if(gw(e,n,p)&&!o[Lu(p)]){const y=new Ci([],{});c[Lu(p)]=y}return{...o,...c}}function LU(e,t){const n={};n[cr]=t;for(const r of e)if(""===r.path&&Lu(r)!==cr){const o=new Ci([],{});n[Lu(r)]=o}return n}function gw(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path}class VU{}class $U{constructor(t,n,r,o,c,p,y){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=o,this.urlTree=c,this.paramsInheritanceStrategy=p,this.urlSerializer=y,this.applyRedirects=new AU(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new mt(4002,!1)}recognize(){const t=LO(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(yn(n=>{const r=new NE([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},cr,this.rootComponentType,null,{}),o=new Tc(r,n),c=new MO("",o),p=function A8(e,t,n=null,r=null){return fO(dO(e),t,n,r)}(r,[],this.urlTree.queryParams,this.urlTree.fragment);return p.queryParams=this.urlTree.queryParams,c.url=this.urlSerializer.serialize(p),this.inheritParamsAndData(c._root,null),{state:c,tree:p}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,cr).pipe(s_(r=>{if(r instanceof GE)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof HE?this.noMatchError(r):r}))}inheritParamsAndData(t,n){const r=t.value,o=FE(r,n,this.paramsInheritanceStrategy);r.params=Object.freeze(o.params),r.data=Object.freeze(o.data),t.children.forEach(c=>this.inheritParamsAndData(c,r))}processSegmentGroup(t,n,r,o){return 0===r.segments.length&&r.hasChildren()?this.processChildren(t,n,r):this.processSegment(t,n,r,r.segments,o,!0).pipe(yn(c=>c instanceof Tc?[c]:[]))}processChildren(t,n,r){const o=[];for(const c of Object.keys(r.children))"primary"===c?o.unshift(c):o.push(c);return Pr(o).pipe(o_(c=>{const p=r.children[c],y=function oU(e,t){const n=e.filter(r=>Lu(r)===t);return n.push(...e.filter(r=>Lu(r)!==t)),n}(n,c);return this.processSegmentGroup(t,y,p,c)}),function l8(e,t){return an(function a8(e,t,n,r,o){return(c,p)=>{let y=n,x=t,E=0;c.subscribe(hn(p,P=>{const F=E++;x=y?e(x,P,F):(y=!0,P),r&&p.next(x)},o&&(()=>{y&&p.next(x),p.complete()})))}}(e,t,arguments.length>=2,!0))}((c,p)=>(c.push(...p),c)),rw(null),function c8(e,t){const n=arguments.length>=2;return r=>r.pipe(e?la((o,c)=>e(o,c,r)):ve,iw(1),n?rw(t):JA(()=>new ew))}(),Sr(c=>{if(null===c)return m_(r);const p=FO(c);return function HU(e){e.sort((t,n)=>t.value.outlet===cr?-1:n.value.outlet===cr?1:t.value.outlet.localeCompare(n.value.outlet))}(p),Sn(p)}))}processSegment(t,n,r,o,c,p){return Pr(n).pipe(o_(y=>this.processSegmentAgainstRoute(y._injector??t,n,y,r,o,c,p).pipe(s_(x=>{if(x instanceof HE)return Sn(null);throw x}))),as(y=>!!y),s_(y=>{if(kO(y))return function BU(e,t,n){return 0===t.length&&!e.children[n]}(r,o,c)?Sn(new VU):m_(r);throw y}))}processSegmentAgainstRoute(t,n,r,o,c,p,y){return function zU(e,t,n,r){return!!(Lu(e)===r||r!==cr&&gw(t,n,e))&&WE(t,e,n).matched}(r,o,c,p)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,o,r,c,p):this.allowRedirects&&y?this.expandSegmentAgainstRouteUsingRedirect(t,o,n,r,c,p):m_(o):m_(o)}expandSegmentAgainstRouteUsingRedirect(t,n,r,o,c,p){const{matched:y,consumedSegments:x,positionalParamSegments:E,remainingSegments:P}=WE(n,o,c);if(!y)return m_(n);o.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const F=this.applyRedirects.applyRedirectCommands(x,o.redirectTo,E);return this.applyRedirects.lineralizeSegments(o,F).pipe(Sr(V=>this.processSegment(t,r,n,V.concat(P),p,!1)))}matchSegmentAgainstRoute(t,n,r,o,c){const p=OU(n,r,o,t);return"**"===r.path&&(n.children={}),p.pipe(Vi(y=>y.matched?this.getChildConfig(t=r._injector??t,r,o).pipe(Vi(({routes:x})=>{const E=r._loadedInjector??t,{consumedSegments:P,remainingSegments:F,parameters:V}=y,$=new NE(P,V,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function qU(e){return e.data||{}}(r),Lu(r),r.component??r._loadedComponent??null,r,function WU(e){return e.resolve||{}}(r)),{segmentGroup:ce,slicedSegments:_e}=LO(n,P,F,x);if(0===_e.length&&ce.hasChildren())return this.processChildren(E,x,ce).pipe(yn(De=>null===De?null:new Tc($,De)));if(0===x.length&&0===_e.length)return Sn(new Tc($,[]));const Pe=Lu(r)===c;return this.processSegment(E,x,ce,_e,Pe?cr:c,!0).pipe(yn(De=>new Tc($,De instanceof Tc?[De]:[])))})):m_(n)))}getChildConfig(t,n,r){return n.children?Sn({routes:n.children,injector:t}):n.loadChildren?void 0!==n._loadedRoutes?Sn({routes:n._loadedRoutes,injector:n._loadedInjector}):function DU(e,t,n,r){const o=t.canLoad;return void 0===o||0===o.length?Sn(!0):Sn(o.map(p=>{const y=f_(p,e);return gf(function fU(e){return e&&av(e.canLoad)}(y)?y.canLoad(t,n):mu(e,()=>y(t,n)))})).pipe(p_(),RO())}(t,n,r).pipe(Sr(o=>o?this.configLoader.loadChildren(t,n).pipe($r(c=>{n._loadedRoutes=c.routes,n._loadedInjector=c.injector})):function PU(e){return nw(SO(!1,3))}())):Sn({routes:[],injector:t})}}function GU(e){const t=e.value.routeConfig;return t&&""===t.path}function FO(e){const t=[],n=new Set;for(const r of e){if(!GU(r)){t.push(r);continue}const o=t.find(c=>r.value.routeConfig===c.value.routeConfig);void 0!==o?(o.children.push(...r.children),n.add(o)):t.push(r)}for(const r of n){const o=FO(r.children);t.push(new Tc(r.value,o))}return t.filter(r=>!n.has(r))}function NO(e){const t=e.children.map(n=>NO(n)).flat();return[e,...t]}function ZE(e){return Vi(t=>{const n=e(t);return n?Pr(n).pipe(yn(()=>t)):Sn(t)})}let zO=(()=>{class e{buildTitle(n){let r,o=n.root;for(;void 0!==o;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(c=>c.outlet===cr);return r}getResolvedTitleForRoute(n){return n.data[Y0]}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(QU),providedIn:"root"})}return e})(),QU=(()=>{class e extends zO{constructor(n){super(),this.title=n}updateTitle(n){const r=this.buildTitle(n);void 0!==r&&this.title.setTitle(r)}static#e=this.\u0275fac=function(r){return new(r||e)(rn(xE))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const g_=new Zt("",{providedIn:"root",factory:()=>({})}),__=new Zt("ROUTES");let XE=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Nt(yP)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Sn(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);const r=gf(n.loadComponent()).pipe(yn(BO),$r(c=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=c}),X0(()=>{this.componentLoaders.delete(n)})),o=new KA(r,()=>new Qt).pipe(ME());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Sn({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);const c=function ej(e,t,n,r){return gf(e.loadChildren()).pipe(yn(BO),Sr(o=>o instanceof RS||Array.isArray(o)?Sn(o):Pr(t.compileModuleAsync(o))),yn(o=>{r&&r(e);let c,p,y=!1;return Array.isArray(o)?(p=o,!0):(c=o.create(n).injector,p=c.get(__,[],{optional:!0,self:!0}).flat()),{routes:p.map($E),injector:c}}))}(r,this.compiler,n,this.onLoadEndListener).pipe(X0(()=>{this.childrenLoaders.delete(r)})),p=new KA(c,()=>new Qt).pipe(ME());return this.childrenLoaders.set(r,p),p}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function BO(e){return function tj(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let YE=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(nj),providedIn:"root"})}return e})(),nj=(()=>{class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const VO=new Zt(""),UO=new Zt("");function rj(e,t,n){const r=e.get(UO),o=e.get(Ss);return e.get(ui).runOutsideAngular(()=>{if(!o.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,Promise.resolve();let c;const p=new Promise(E=>{c=E}),y=o.startViewTransition(()=>(c(),function ij(e){return new Promise(t=>{rD(t,{injector:e})})}(e))),{onViewTransitionCreated:x}=r;return x&&mu(e,()=>x({transition:y,from:t,to:n})),p})}let _w=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Qt,this.transitionAbortSubject=new Qt,this.configLoader=Nt(XE),this.environmentInjector=Nt($o),this.urlSerializer=Nt(c_),this.rootContexts=Nt(nv),this.location=Nt(H0),this.inputBindingEnabled=null!==Nt(fw,{optional:!0}),this.titleStrategy=Nt(zO),this.options=Nt(g_,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=Nt(YE),this.createViewTransition=Nt(VO,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Sn(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=o=>this.events.next(new $8(o)),this.configLoader.onLoadStartListener=o=>this.events.next(new j8(o))}complete(){this.transitions?.complete()}handleNavigationRequest(n){const r=++this.navigationId;this.transitions?.next({...this.transitions.value,...n,id:r})}setupNavigations(n,r,o){return this.transitions=new oi({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:tv,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(la(c=>0!==c.id),yn(c=>({...c,extractedUrl:this.urlHandlingStrategy.extract(c.rawUrl)})),Vi(c=>{this.currentTransition=c;let p=!1,y=!1;return Sn(c).pipe($r(x=>{this.currentNavigation={id:x.id,initialUrl:x.rawUrl,extractedUrl:x.extractedUrl,trigger:x.source,extras:x.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),Vi(x=>{const E=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!E&&"reload"!==(x.extras.onSameUrlNavigation??n.onSameUrlNavigation)){const F="";return this.events.next(new h_(x.id,this.urlSerializer.serialize(x.rawUrl),F,0)),x.resolve(null),Bo}if(this.urlHandlingStrategy.shouldProcessUrl(x.rawUrl))return Sn(x).pipe(Vi(F=>{const V=this.transitions?.getValue();return this.events.next(new hw(F.id,this.urlSerializer.serialize(F.extractedUrl),F.source,F.restoredState)),V!==this.transitions?.getValue()?Bo:Promise.resolve(F)}),function ZU(e,t,n,r,o,c){return Sr(p=>function UU(e,t,n,r,o,c,p="emptyOnly"){return new $U(e,t,n,r,o,p,c).recognize()}(e,t,n,r,p.extractedUrl,o,c).pipe(yn(({state:y,tree:x})=>({...p,targetSnapshot:y,urlAfterRedirects:x}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),$r(F=>{c.targetSnapshot=F.targetSnapshot,c.urlAfterRedirects=F.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:F.urlAfterRedirects};const V=new vO(F.id,this.urlSerializer.serialize(F.extractedUrl),this.urlSerializer.serialize(F.urlAfterRedirects),F.targetSnapshot);this.events.next(V)}));if(E&&this.urlHandlingStrategy.shouldProcessUrl(x.currentRawUrl)){const{id:F,extractedUrl:V,source:$,restoredState:ce,extras:_e}=x,Pe=new hw(F,this.urlSerializer.serialize(V),$,ce);this.events.next(Pe);const De=CO(0,this.rootComponentType).snapshot;return this.currentTransition=c={...x,targetSnapshot:De,urlAfterRedirects:V,extras:{..._e,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=V,Sn(c)}{const F="";return this.events.next(new h_(x.id,this.urlSerializer.serialize(x.extractedUrl),F,1)),x.resolve(null),Bo}}),$r(x=>{const E=new z8(x.id,this.urlSerializer.serialize(x.extractedUrl),this.urlSerializer.serialize(x.urlAfterRedirects),x.targetSnapshot);this.events.next(E)}),yn(x=>(this.currentTransition=c={...x,guards:lU(x.targetSnapshot,x.currentSnapshot,this.rootContexts)},c)),function vU(e,t){return Sr(n=>{const{targetSnapshot:r,currentSnapshot:o,guards:{canActivateChecks:c,canDeactivateChecks:p}}=n;return 0===p.length&&0===c.length?Sn({...n,guardsResult:!0}):function xU(e,t,n,r){return Pr(e).pipe(Sr(o=>function TU(e,t,n,r,o){const c=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return c&&0!==c.length?Sn(c.map(y=>{const x=iv(t)??o,E=f_(y,x);return gf(function gU(e){return e&&av(e.canDeactivate)}(E)?E.canDeactivate(e,t,n,r):mu(x,()=>E(e,t,n,r))).pipe(as())})).pipe(p_()):Sn(!0)}(o.component,o.route,n,t,r)),as(o=>!0!==o,!0))}(p,r,o,e).pipe(Sr(y=>y&&function dU(e){return"boolean"==typeof e}(y)?function wU(e,t,n,r){return Pr(t).pipe(o_(o=>tw(function CU(e,t){return null!==e&&t&&t(new H8(e)),Sn(!0)}(o.route.parent,r),function bU(e,t){return null!==e&&t&&t(new q8(e)),Sn(!0)}(o.route,r),function EU(e,t,n){const r=t[t.length-1],c=t.slice(0,t.length-1).reverse().map(p=>function cU(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(p)).filter(p=>null!==p).map(p=>YA(()=>Sn(p.guards.map(x=>{const E=iv(p.node)??n,P=f_(x,E);return gf(function mU(e){return e&&av(e.canActivateChild)}(P)?P.canActivateChild(r,e):mu(E,()=>P(r,e))).pipe(as())})).pipe(p_())));return Sn(c).pipe(p_())}(e,o.path,n),function MU(e,t,n){const r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||0===r.length)return Sn(!0);const o=r.map(c=>YA(()=>{const p=iv(t)??n,y=f_(c,p);return gf(function pU(e){return e&&av(e.canActivate)}(y)?y.canActivate(t,e):mu(p,()=>y(t,e))).pipe(as())}));return Sn(o).pipe(p_())}(e,o.route,n))),as(o=>!0!==o,!0))}(r,c,e,t):Sn(y)),yn(y=>({...n,guardsResult:y})))})}(this.environmentInjector,x=>this.events.next(x)),$r(x=>{if(c.guardsResult=x.guardsResult,im(x.guardsResult))throw IO(0,x.guardsResult);const E=new B8(x.id,this.urlSerializer.serialize(x.extractedUrl),this.urlSerializer.serialize(x.urlAfterRedirects),x.targetSnapshot,!!x.guardsResult);this.events.next(E)}),la(x=>!!x.guardsResult||(this.cancelNavigationTransition(x,"",3),!1)),ZE(x=>{if(x.guards.canActivateChecks.length)return Sn(x).pipe($r(E=>{const P=new V8(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(P)}),Vi(E=>{let P=!1;return Sn(E).pipe(function XU(e,t){return Sr(n=>{const{targetSnapshot:r,guards:{canActivateChecks:o}}=n;if(!o.length)return Sn(n);const c=new Set(o.map(x=>x.route)),p=new Set;for(const x of c)if(!p.has(x))for(const E of NO(x))p.add(E);let y=0;return Pr(p).pipe(o_(x=>c.has(x)?function YU(e,t,n,r){const o=e.routeConfig,c=e._resolve;return void 0!==o?.title&&!TO(o)&&(c[Y0]=o.title),function KU(e,t,n,r){const o=TE(e);if(0===o.length)return Sn({});const c={};return Pr(o).pipe(Sr(p=>function JU(e,t,n,r){const o=iv(t)??r,c=f_(e,o);return gf(c.resolve?c.resolve(t,n):mu(o,()=>c(t,n)))}(e[p],t,n,r).pipe(as(),$r(y=>{c[p]=y}))),iw(1),QA(c),s_(p=>kO(p)?Bo:nw(p)))}(c,e,t,r).pipe(yn(p=>(e._resolvedData=p,e.data=FE(e,e.parent,n).resolve,null)))}(x,r,e,t):(x.data=FE(x,x.parent,e).resolve,Sn(void 0))),$r(()=>y++),iw(1),Sr(x=>y===p.size?Sn(n):Bo))})}(this.paramsInheritanceStrategy,this.environmentInjector),$r({next:()=>P=!0,complete:()=>{P||this.cancelNavigationTransition(E,"",2)}}))}),$r(E=>{const P=new U8(E.id,this.urlSerializer.serialize(E.extractedUrl),this.urlSerializer.serialize(E.urlAfterRedirects),E.targetSnapshot);this.events.next(P)}))}),ZE(x=>{const E=P=>{const F=[];P.routeConfig?.loadComponent&&!P.routeConfig._loadedComponent&&F.push(this.configLoader.loadComponent(P.routeConfig).pipe($r(V=>{P.component=V}),yn(()=>{})));for(const V of P.children)F.push(...E(V));return F};return CE(E(x.targetSnapshot.root)).pipe(rw(),es(1))}),ZE(()=>this.afterPreactivation()),Vi(()=>{const{currentSnapshot:x,targetSnapshot:E}=c,P=this.createViewTransition?.(this.environmentInjector,x.root,E.root);return P?Pr(P).pipe(yn(()=>c)):Sn(c)}),yn(x=>{const E=function K8(e,t,n){const r=rv(e,t._root,n?n._root:void 0);return new bO(r,t)}(n.routeReuseStrategy,x.targetSnapshot,x.currentRouterState);return this.currentTransition=c={...x,targetRouterState:E},this.currentNavigation.targetRouterState=E,c}),$r(()=>{this.events.next(new OE)}),((e,t,n,r)=>yn(o=>(new aU(t,o.targetRouterState,o.currentRouterState,n,r).activate(e),o)))(this.rootContexts,n.routeReuseStrategy,x=>this.events.next(x),this.inputBindingEnabled),es(1),$r({next:x=>{p=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new ku(x.id,this.urlSerializer.serialize(x.extractedUrl),this.urlSerializer.serialize(x.urlAfterRedirects))),this.titleStrategy?.updateTitle(x.targetRouterState.snapshot),x.resolve(!0)},complete:()=>{p=!0}}),EE(this.transitionAbortSubject.pipe($r(x=>{throw x}))),X0(()=>{p||y||this.cancelNavigationTransition(c,"",1),this.currentNavigation?.id===c.id&&(this.currentNavigation=null)}),s_(x=>{if(y=!0,PO(x))this.events.next(new u_(c.id,this.urlSerializer.serialize(c.extractedUrl),x.message,x.cancellationCode)),function eU(e){return PO(e)&&im(e.url)}(x)?this.events.next(new kE(x.url)):c.resolve(!1);else{this.events.next(new dw(c.id,this.urlSerializer.serialize(c.extractedUrl),x,c.targetSnapshot??void 0));try{c.resolve(n.errorHandler(x))}catch(E){c.reject(E)}}return Bo}))}))}cancelNavigationTransition(n,r,o){const c=new u_(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(c),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function oj(e){return e!==tv}let sj=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(lj),providedIn:"root"})}return e})();class aj{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}}let lj=(()=>{class e extends aj{static#e=this.\u0275fac=(()=>{let n;return function(o){return(n||(n=Po(e)))(o||e)}})();static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jO=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:()=>Nt(cj),providedIn:"root"})}return e})(),cj=(()=>{class e extends jO{constructor(){super(...arguments),this.location=Nt(H0),this.urlSerializer=Nt(c_),this.options=Nt(g_,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=Nt(YE),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new l_,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=CO(0,null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{"popstate"===r.type&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof hw)this.stateMemento=this.createStateMemento();else if(n instanceof h_)this.rawUrlTree=r.initialUrl;else if(n instanceof vO){if("eager"===this.urlUpdateStrategy&&!r.extras.skipLocationChange){const o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(o,r)}}else n instanceof OE?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,"deferred"===this.urlUpdateStrategy&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):n instanceof u_&&(3===n.code||2===n.code)?this.restoreHistory(r):n instanceof dw?this.restoreHistory(r,!0):n instanceof ku&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){const o=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){const p={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId)};this.location.replaceState(o,"",p)}else{const c={...r.extras.state,...this.generateNgRouterState(r.id,this.browserPageId+1)};this.location.go(o,"",c)}}restoreHistory(n,r=!1){if("computed"===this.canceledNavigationResolution){const c=this.currentPageId-this.browserPageId;0!==c?this.location.historyGo(c):this.currentUrlTree===n.finalUrl&&0===c&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return"computed"===this.canceledNavigationResolution?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}static#e=this.\u0275fac=(()=>{let n;return function(o){return(n||(n=Po(e)))(o||e)}})();static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var lv=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(lv||{});function $O(e,t){e.events.pipe(la(n=>n instanceof ku||n instanceof u_||n instanceof dw||n instanceof h_),yn(n=>n instanceof ku||n instanceof h_?lv.COMPLETE:n instanceof u_&&(0===n.code||1===n.code)?lv.REDIRECTING:lv.FAILED),la(n=>n!==lv.REDIRECTING),es(1)).subscribe(()=>{t()})}function uj(e){throw e}const hj={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},dj={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ia=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=Nt(gP),this.stateManager=Nt(jO),this.options=Nt(g_,{optional:!0})||{},this.pendingTasks=Nt(Px),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=Nt(_w),this.urlSerializer=Nt(c_),this.location=Nt(H0),this.urlHandlingStrategy=Nt(YE),this._events=new Qt,this.errorHandler=this.options.errorHandler||uj,this.navigated=!1,this.routeReuseStrategy=Nt(sj),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=Nt(__,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!Nt(fw,{optional:!0}),this.eventsSubscription=new Hr,this.isNgZoneEnabled=Nt(ui)instanceof ui&&ui.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const n=this.navigationTransitions.events.subscribe(r=>{try{const o=this.navigationTransitions.currentTransition,c=this.navigationTransitions.currentNavigation;if(null!==o&&null!==c)if(this.stateManager.handleRouterEvent(r,c),r instanceof u_&&0!==r.code&&1!==r.code)this.navigated=!0;else if(r instanceof ku)this.navigated=!0;else if(r instanceof kE){const p=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),y={skipLocationChange:o.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||oj(o.source)};this.scheduleNavigation(p,tv,null,y,{resolve:o.resolve,reject:o.reject,promise:o.promise})}(function pj(e){return!(e instanceof OE||e instanceof kE)})(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),tv,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription||(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)}))}navigateToSyncWithBrowser(n,r,o){const c={replaceUrl:!0},p=o?.navigationId?o:null;if(o){const x={...o};delete x.navigationId,delete x.\u0275routerPageId,0!==Object.keys(x).length&&(c.state=x)}const y=this.parseUrl(n);this.scheduleNavigation(y,r,p,c)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map($E),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){const{relativeTo:o,queryParams:c,fragment:p,queryParamsHandling:y,preserveFragment:x}=r,E=x?this.currentUrlTree.fragment:p;let F,P=null;switch(y){case"merge":P={...this.currentUrlTree.queryParams,...c};break;case"preserve":P=this.currentUrlTree.queryParams;break;default:P=c||null}null!==P&&(P=this.removeEmptyProps(P));try{F=dO(o?o.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof n[0]||!n[0].startsWith("/"))&&(n=[]),F=this.currentUrlTree.root}return fO(F,n,P,E??null)}navigateByUrl(n,r={skipLocationChange:!1}){const o=im(n)?n:this.parseUrl(n),c=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(c,tv,null,r)}navigate(n,r={skipLocationChange:!1}){return function fj(e){for(let t=0;t{const c=n[o];return null!=c&&(r[o]=c),r},{})}scheduleNavigation(n,r,o,c,p){if(this.disposed)return Promise.resolve(!1);let y,x,E;p?(y=p.resolve,x=p.reject,E=p.promise):E=new Promise((F,V)=>{y=F,x=V});const P=this.pendingTasks.add();return $O(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(P))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:c,resolve:y,reject:x,promise:E,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),E.catch(F=>Promise.reject(F))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yw=(()=>{class e{constructor(n,r,o,c,p,y){this.router=n,this.route=r,this.tabIndexAttribute=o,this.renderer=c,this.el=p,this.locationStrategy=y,this.href=null,this.commands=null,this.onChanges=new Qt,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;const x=p.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===x||"area"===x,this.isAnchorElement?this.subscription=n.events.subscribe(E=>{E instanceof ku&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){null!=n?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,r,o,c,p){return!!(null===this.urlTree||this.isAnchorElement&&(0!==n||r||o||c||p||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const n=null===this.href?null:function a0(e,t,n){return function X1(e,t){return"src"===t&&("embed"===e||"frame"===e||"iframe"===e||"media"===e||"script"===e)||"href"===t&&("base"===e||"link"===e)?xg:js}(t,n)(e)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(n,r){const o=this.renderer,c=this.el.nativeElement;null!==r?o.setAttribute(c,n,r):o.removeAttribute(c,n)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static#e=this.\u0275fac=function(r){return new(r||e)(nt(Ia),nt(Ru),function wr(e){return function jm(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;const n=e.attrs;if(n){const r=n.length;let o=0;for(;o{class e{constructor(n,r,o,c,p){this.router=n,this.injector=o,this.preloadingStrategy=c,this.loader=p}setUpPreloading(){this.subscription=this.router.events.pipe(la(n=>n instanceof ku),o_(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,r){const o=[];for(const c of r){c.providers&&!c._injector&&(c._injector=yM(c.providers,n,`Route: ${c.path}`));const p=c._injector??n,y=c._loadedInjector??p;(c.loadChildren&&!c._loadedRoutes&&void 0===c.canLoad||c.loadComponent&&!c._loadedComponent)&&o.push(this.preloadConfig(p,c)),(c.children||c._loadedRoutes)&&o.push(this.processRoutes(y,c.children??c._loadedRoutes))}return Pr(o).pipe(pl())}preloadConfig(n,r){return this.preloadingStrategy.preload(r,()=>{let o;o=r.loadChildren&&void 0===r.canLoad?this.loader.loadChildren(n,r):Sn(null);const c=o.pipe(Sr(p=>null===p?Sn(void 0):(r._loadedRoutes=p.routes,r._loadedInjector=p.injector,this.processRoutes(p.injector??n,p.routes))));return r.loadComponent&&!r._loadedComponent?Pr([c,this.loader.loadComponent(r)]).pipe(pl()):c})}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ia),rn(yP),rn($o),rn(HO),rn(XE))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const KE=new Zt("");let GO=(()=>{class e{constructor(n,r,o,c,p={}){this.urlSerializer=n,this.transitions=r,this.viewportScroller=o,this.zone=c,this.options=p,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},p.scrollPositionRestoration=p.scrollPositionRestoration||"disabled",p.anchorScrolling=p.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof hw?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof ku?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof h_&&0===n.code&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof xO&&(n.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(n.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new xO(n,"popstate"===this.lastSource?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#e=this.\u0275fac=function(r){!function m0(){throw new Error("invalid")}()};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();function Fu(e,t){return{\u0275kind:e,\u0275providers:t}}function WO(){const e=Nt(Ms);return t=>{const n=e.get(e_);if(t!==n.components[0])return;const r=e.get(Ia),o=e.get(ZO);1===e.get(JE)&&r.initialNavigation(),e.get(XO,null,er.Optional)?.setUpPreloading(),e.get(KE,null,er.Optional)?.init(),r.resetRootComponentType(n.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}const ZO=new Zt("",{factory:()=>new Qt}),JE=new Zt("",{providedIn:"root",factory:()=>1}),XO=new Zt("");function wj(e){return Fu(0,[{provide:XO,useExisting:_j},{provide:HO,useExisting:e}])}function Cj(e){return Fu(9,[{provide:VO,useValue:rj},{provide:UO,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const YO=new Zt("ROUTER_FORROOT_GUARD"),Mj=[H0,{provide:c_,useClass:DE},Ia,nv,{provide:Ru,useFactory:function qO(e){return e.routerState.root},deps:[Ia]},XE,[]];let KO=(()=>{class e{constructor(n){}static forRoot(n,r){return{ngModule:e,providers:[Mj,[],{provide:__,multi:!0,useValue:n},{provide:YO,useFactory:Ij,deps:[[Ia,new Zm,new cp]]},{provide:g_,useValue:r||{}},r?.useHash?{provide:nm,useClass:P6}:{provide:nm,useClass:oA},{provide:KE,useFactory:()=>{const e=Nt(X9),t=Nt(ui),n=Nt(g_),r=Nt(_w),o=Nt(c_);return n.scrollOffset&&e.setOffset(n.scrollOffset),new GO(o,r,e,t,n)}},r?.preloadingStrategy?wj(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?Sj(r):[],r?.bindToComponentInputs?Fu(8,[DO,{provide:fw,useExisting:DO}]).\u0275providers:[],r?.enableViewTransitions?Cj().\u0275providers:[],[{provide:JO,useFactory:WO},{provide:zM,multi:!0,useExisting:JO}]]}}static forChild(n){return{ngModule:e,providers:[{provide:__,multi:!0,useValue:n}]}}static#e=this.\u0275fac=function(r){return new(r||e)(rn(YO,8))};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({})}return e})();function Ij(e){return"guarded"}function Sj(e){return["disabled"===e.initialNavigation?Fu(3,[{provide:AM,multi:!0,useFactory:()=>{const t=Nt(Ia);return()=>{t.setUpLocationChangeListener()}}},{provide:JE,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?Fu(2,[{provide:JE,useValue:0},{provide:AM,multi:!0,deps:[Ms],useFactory:t=>{const n=t.get(I6,Promise.resolve());return()=>n.then(()=>new Promise(r=>{const o=t.get(Ia),c=t.get(ZO);$O(o,()=>{r(!0)}),t.get(_w).afterPreactivation=()=>(r(!0),c.closed?Sn(void 0):c),o.initialNavigation()}))}}]).\u0275providers:[]]}const JO=new Zt("");let y_={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Oj=/[&<>"']/,kj=/[&<>"']/g,Rj=/[<>"']|&(?!#?\w+;)/,Lj=/[<>"']|&(?!#?\w+;)/g,Fj={"&":"&","<":"<",">":">",'"':""","'":"'"},ek=e=>Fj[e];function ls(e,t){if(t){if(Oj.test(e))return e.replace(kj,ek)}else if(Rj.test(e))return e.replace(Lj,ek);return e}const Nj=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function tk(e){return e.replace(Nj,(t,n)=>"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):"")}const zj=/(^|[^\[])\^/g;function Ii(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(r,o)=>(o=(o=o.source||o).replace(zj,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}const Bj=/[^\w:]/g,Vj=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function nk(e,t,n){if(e){let r;try{r=decodeURIComponent(tk(n)).replace(Bj,"").toLowerCase()}catch{return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!Vj.test(n)&&(n=function Hj(e,t){vw[" "+e]||(vw[" "+e]=Uj.test(e)?e+"/":ww(e,"/",!0));const n=-1===(e=vw[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(jj,"$1")+t:"/"===t.charAt(0)?n?t:e.replace($j,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const vw={},Uj=/^[^:]+:\/*[^/]*$/,jj=/^([^:]+:)[\s\S]*$/,$j=/^([^:]+:\/*[^/]*)[\s\S]*$/,xw={exec:function(){}};function Dc(e){let n,r,t=1;for(;t{let x=!1,E=p;for(;--E>=0&&"\\"===y[E];)x=!x;return x?"|":" |"}).split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function sk(e,t,n,r){const o=t.href,c=t.title?ls(t.title):null,p=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const y={type:"link",raw:n,href:o,title:c,text:p,tokens:r.inlineTokens(p,[])};return r.state.inLink=!1,y}return{type:"image",raw:n,href:o,title:c,text:ls(p)}}class QE{constructor(t){this.options=t||y_}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ww(r,"\n")}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=function qj(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(o=>{const c=o.match(/^\s+/);if(null===c)return o;const[p]=c;return p.length>=r.length?o.slice(r.length):o}).join("\n")}(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const c=ww(r,"#");(this.options.pedantic||!c||/ $/.test(c))&&(r=c.trim())}const o={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(o.text,o.tokens),o}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,o,c,p,y,x,E,P,F,V,$,ce,_e=n[1].trim();const Pe=_e.length>1,De={type:"list",raw:"",ordered:Pe,start:Pe?+_e.slice(0,-1):"",loose:!1,items:[]};_e=Pe?`\\d{1,9}\\${_e.slice(-1)}`:`\\${_e}`,this.options.pedantic&&(_e=Pe?_e:"[*+-]");const Ne=new RegExp(`^( {0,3}${_e})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;t&&(ce=!1,(n=Ne.exec(t))&&!this.rules.block.hr.test(t));){if(r=n[0],t=t.substring(r.length),P=n[2].split("\n",1)[0],F=t.split("\n",1)[0],this.options.pedantic?(p=2,$=P.trimLeft()):(p=n[2].search(/[^ ]/),p=p>4?1:p,$=P.slice(p),p+=n[1].length),x=!1,!P&&/^ *$/.test(F)&&(r+=F+"\n",t=t.substring(F.length+1),ce=!0),!ce){const Wt=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),nn=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Ot=new RegExp(`^( {0,${Math.min(3,p-1)}})(\`\`\`|~~~)`);for(;t&&(V=t.split("\n",1)[0],P=V,this.options.pedantic&&(P=P.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Ot.test(P)||this.rules.block.heading.test(P)||Wt.test(P)||nn.test(t)));){if(P.search(/[^ ]/)>=p||!P.trim())$+="\n"+P.slice(p);else{if(x)break;$+="\n"+P}!x&&!P.trim()&&(x=!0),r+=V+"\n",t=t.substring(V.length+1)}}De.loose||(E?De.loose=!0:/\n *\n *$/.test(r)&&(E=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec($),o&&(c="[ ] "!==o[0],$=$.replace(/^\[[ xX]\] +/,""))),De.items.push({type:"list_item",raw:r,task:!!o,checked:c,loose:!1,text:$}),De.raw+=r}De.items[De.items.length-1].raw=r.trimRight(),De.items[De.items.length-1].text=$.trimRight(),De.raw=De.raw.trimRight();const wt=De.items.length;for(y=0;y"space"===Ot.type),nn=Wt.every(Ot=>{const Gn=Ot.raw.split("");let Fi=0;for(const ha of Gn)if("\n"===ha&&(Fi+=1),Fi>1)return!0;return!1});!De.loose&&Wt.length&&nn&&(De.loose=!0,De.items[y].loose=!0)}return De}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&("pre"===n[1]||"script"===n[1]||"style"===n[1]),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):ls(n[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){const n=this.rules.block.def.exec(t);if(n)return n[3]&&(n[3]=n[3].substring(1,n[3].length-1)),{type:"def",tag:n[1].toLowerCase().replace(/\s+/g," "),raw:n[0],href:n[2],title:n[3]}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:rk(n[1]).map(o=>({text:o})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=n[0];let c,p,y,x,o=r.align.length;for(c=0;c({text:E}));for(o=r.header.length,p=0;p/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):ls(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const p=ww(r.slice(0,-1),"\\");if((r.length-p.length)%2==0)return}else{const p=function Gj(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,o=0;for(;o-1){const x=(0===n[0].indexOf("!")?5:4)+n[1].length+p;n[2]=n[2].substring(0,p),n[0]=n[0].substring(0,x).trim(),n[3]=""}}let o=n[2],c="";if(this.options.pedantic){const p=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);p&&(o=p[1],c=p[3])}else c=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^$/.test(r)?o.slice(1):o.slice(1,-1)),sk(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:c&&c.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o||!o.href){const c=r[0].charAt(0);return{type:"text",raw:c,text:c}}return sk(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;const c=o[1]||o[2]||"";if(!c||c&&(""===r||this.rules.inline.punctuation.exec(r))){const p=o[0].length-1;let y,x,E=p,P=0;const F="*"===o[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(F.lastIndex=0,n=n.slice(-1*t.length+p);null!=(o=F.exec(n));){if(y=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!y)continue;if(x=y.length,o[3]||o[4]){E+=x;continue}if((o[5]||o[6])&&p%3&&!((p+x)%3)){P+=x;continue}if(E-=x,E>0)continue;if(x=Math.min(x,x+E+P),Math.min(p,x)%2){const $=t.slice(1,p+o.index+x);return{type:"em",raw:t.slice(0,p+o.index+x+1),text:$,tokens:this.lexer.inlineTokens($,[])}}const V=t.slice(2,p+o.index+x-1);return{type:"strong",raw:t.slice(0,p+o.index+x+1),text:V,tokens:this.lexer.inlineTokens(V,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),c=/^ /.test(r)&&/ $/.test(r);return o&&c&&(r=r.substring(1,r.length-1)),r=ls(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let o,c;return"@"===r[2]?(o=ls(this.options.mangle?n(r[1]):r[1]),c="mailto:"+o):(o=ls(r[1]),c=o),{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let o,c;if("@"===r[2])o=ls(this.options.mangle?n(r[0]):r[0]),c="mailto:"+o;else{let p;do{p=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(p!==r[0]);o=ls(r[0]),c="www."===r[1]?"http://"+o:o}return{type:"link",raw:r[0],text:o,href:c,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let o;return o=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):ls(r[0]):r[0]:ls(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}}}}const Bn={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:xw,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Bn.def=Ii(Bn.def).replace("label",Bn._label).replace("title",Bn._title).getRegex(),Bn.bullet=/(?:[*+-]|\d{1,9}[.)])/,Bn.listItemStart=Ii(/^( *)(bull) */).replace("bull",Bn.bullet).getRegex(),Bn.list=Ii(Bn.list).replace(/bull/g,Bn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Bn.def.source+")").getRegex(),Bn._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Bn._comment=/|$)/,Bn.html=Ii(Bn.html,"i").replace("comment",Bn._comment).replace("tag",Bn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bn.paragraph=Ii(Bn._paragraph).replace("hr",Bn.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Bn._tag).getRegex(),Bn.blockquote=Ii(Bn.blockquote).replace("paragraph",Bn.paragraph).getRegex(),Bn.normal=Dc({},Bn),Bn.gfm=Dc({},Bn.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Bn.gfm.table=Ii(Bn.gfm.table).replace("hr",Bn.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Bn._tag).getRegex(),Bn.gfm.paragraph=Ii(Bn._paragraph).replace("hr",Bn.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Bn.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Bn._tag).getRegex(),Bn.pedantic=Dc({},Bn.normal,{html:Ii("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Bn._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xw,paragraph:Ii(Bn.normal._paragraph).replace("hr",Bn.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Bn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const mn={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xw,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xw,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}mn._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",mn.punctuation=Ii(mn.punctuation).replace(/punctuation/g,mn._punctuation).getRegex(),mn.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,mn.escapedEmSt=/\\\*|\\_/g,mn._comment=Ii(Bn._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),mn.emStrong.lDelim=Ii(mn.emStrong.lDelim).replace(/punct/g,mn._punctuation).getRegex(),mn.emStrong.rDelimAst=Ii(mn.emStrong.rDelimAst,"g").replace(/punct/g,mn._punctuation).getRegex(),mn.emStrong.rDelimUnd=Ii(mn.emStrong.rDelimUnd,"g").replace(/punct/g,mn._punctuation).getRegex(),mn._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,mn._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,mn._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,mn.autolink=Ii(mn.autolink).replace("scheme",mn._scheme).replace("email",mn._email).getRegex(),mn._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,mn.tag=Ii(mn.tag).replace("comment",mn._comment).replace("attribute",mn._attribute).getRegex(),mn._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,mn._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,mn._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,mn.link=Ii(mn.link).replace("label",mn._label).replace("href",mn._href).replace("title",mn._title).getRegex(),mn.reflink=Ii(mn.reflink).replace("label",mn._label).replace("ref",Bn._label).getRegex(),mn.nolink=Ii(mn.nolink).replace("ref",Bn._label).getRegex(),mn.reflinkSearch=Ii(mn.reflinkSearch,"g").replace("reflink",mn.reflink).replace("nolink",mn.nolink).getRegex(),mn.normal=Dc({},mn),mn.pedantic=Dc({},mn.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ii(/^!?\[(label)\]\((.*?)\)/).replace("label",mn._label).getRegex(),reflink:Ii(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mn._label).getRegex()}),mn.gfm=Dc({},mn.normal,{escape:Ii(mn.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\x+" ".repeat(E.length));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(y=>!!(r=y.call({lexer:this},t,n))&&(t=t.substring(r.raw.length),n.push(r),!0)))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),1===r.raw.length&&n.length>0?n[n.length-1].raw+="\n":n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?n.push(r):(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(o.raw+="\n"+r.raw,o.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(c=t,this.options.extensions&&this.options.extensions.startBlock){let y=1/0;const x=t.slice(1);let E;this.options.extensions.startBlock.forEach(function(P){E=P.call({lexer:this},x),"number"==typeof E&&E>=0&&(y=Math.min(y,E))}),y<1/0&&y>=0&&(c=t.substring(0,y+1))}if(this.state.top&&(r=this.tokenizer.paragraph(c))){o=n[n.length-1],p&&"paragraph"===o.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),p=c.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&"text"===o.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}throw new Error(y)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,o,c,y,x,E,p=t;if(this.tokens.links){const P=Object.keys(this.tokens.links);if(P.length>0)for(;null!=(y=this.tokenizer.rules.inline.reflinkSearch.exec(p));)P.includes(y[0].slice(y[0].lastIndexOf("[")+1,-1))&&(p=p.slice(0,y.index)+"["+ok("a",y[0].length-2)+"]"+p.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(y=this.tokenizer.rules.inline.blockSkip.exec(p));)p=p.slice(0,y.index)+"["+ok("a",y[0].length-2)+"]"+p.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(y=this.tokenizer.rules.inline.escapedEmSt.exec(p));)p=p.slice(0,y.index)+"++"+p.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(x||(E=""),x=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(P=>!!(r=P.call({lexer:this},t,n))&&(t=t.substring(r.raw.length),n.push(r),!0)))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&"text"===r.type&&"text"===o.type?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&"text"===r.type&&"text"===o.type?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,p,E)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,ak)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,ak))){t=t.substring(r.raw.length),n.push(r);continue}if(c=t,this.options.extensions&&this.options.extensions.startInline){let P=1/0;const F=t.slice(1);let V;this.options.extensions.startInline.forEach(function($){V=$.call({lexer:this},F),"number"==typeof V&&V>=0&&(P=Math.min(P,V))}),P<1/0&&P>=0&&(c=t.substring(0,P+1))}if(r=this.tokenizer.inlineText(c,Wj)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(E=r.raw.slice(-1)),x=!0,o=n[n.length-1],o&&"text"===o.type?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const P="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(P);break}throw new Error(P)}}return n}}class eT{constructor(t){this.options=t||y_}code(t,n,r){const o=(n||"").match(/\S*/)[0];if(this.options.highlight){const c=this.options.highlight(t,o);null!=c&&c!==t&&(r=!0,t=c)}return t=t.replace(/\n$/,"")+"\n",o?'
'+(r?t:ls(t,!0))+"
\n":"
"+(r?t:ls(t,!0))+"
\n"}blockquote(t){return`
\n${t}
\n`}html(t){return t}heading(t,n,r,o){return this.options.headerIds?`${t}\n`:`${t}\n`}hr(){return this.options.xhtml?"
\n":"
\n"}list(t,n,r){const o=n?"ol":"ul";return"<"+o+(n&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"}listitem(t){return`
  • ${t}
  • \n`}checkbox(t){return" "}paragraph(t){return`

    ${t}

    \n`}table(t,n){return n&&(n=`${n}`),"\n\n"+t+"\n"+n+"
    \n"}tablerow(t){return`\n${t}\n`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`\n`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
    ":"
    "}del(t){return`${t}`}link(t,n,r){if(null===(t=nk(this.options.sanitize,this.options.baseUrl,t)))return r;let o='",o}image(t,n,r){if(null===(t=nk(this.options.sanitize,this.options.baseUrl,t)))return r;let o=`${r}":">",o}text(t){return t}}class lk{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class ck{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,o=0;if(this.seen.hasOwnProperty(r)){o=this.seen[t];do{o++,r=t+"-"+o}while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=o,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class Jh{constructor(t){this.options=t||y_,this.options.renderer=this.options.renderer||new eT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new lk,this.slugger=new ck}static parse(t,n){return new Jh(n).parse(t)}static parseInline(t,n){return new Jh(n).parseInline(t)}parse(t,n=!0){let o,c,p,y,x,E,P,F,V,$,ce,_e,Pe,De,Ne,wt,Wt,nn,Ot,r="";const Gn=t.length;for(o=0;o0&&"paragraph"===Ne.tokens[0].type?(Ne.tokens[0].text=nn+" "+Ne.tokens[0].text,Ne.tokens[0].tokens&&Ne.tokens[0].tokens.length>0&&"text"===Ne.tokens[0].tokens[0].type&&(Ne.tokens[0].tokens[0].text=nn+" "+Ne.tokens[0].tokens[0].text)):Ne.tokens.unshift({type:"text",text:nn}):De+=nn),De+=this.parse(Ne.tokens,Pe),V+=this.renderer.listitem(De,Wt,wt);r+=this.renderer.list(V,ce,_e);continue;case"html":r+=this.renderer.html($.text);continue;case"paragraph":r+=this.renderer.paragraph(this.parseInline($.tokens));continue;case"text":for(V=$.tokens?this.parseInline($.tokens):$.text;o+1"u"||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),ik(t=Dc({},En.defaults,t||{})),n){const r=t.highlight;let o;try{o=Kh.lex(e,t)}catch(y){return n(y)}const c=function(y){let x;if(!y)try{t.walkTokens&&En.walkTokens(o,t.walkTokens),x=Jh.parse(o,t)}catch(E){y=E}return t.highlight=r,y?n(y):n(null,x)};if(!r||r.length<3||(delete t.highlight,!o.length))return c();let p=0;return En.walkTokens(o,function(y){"code"===y.type&&(p++,setTimeout(()=>{r(y.text,y.lang,function(x,E){if(x)return c(x);null!=E&&E!==y.text&&(y.text=E,y.escaped=!0),p--,0===p&&c()})},0))}),void(0===p&&c())}try{const r=Kh.lex(e,t);return t.walkTokens&&En.walkTokens(r,t.walkTokens),Jh.parse(r,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+ls(r.message+"",!0)+"
    ";throw r}}En.options=En.setOptions=function(e){return Dc(En.defaults,e),function Aj(e){y_=e}(En.defaults),En},En.getDefaults=function QO(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},En.defaults=y_,En.use=function(...e){const t=Dc({},...e),n=En.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(o=>{if(o.extensions&&(r=!0,o.extensions.forEach(c=>{if(!c.name)throw new Error("extension name required");if(c.renderer){const p=n.renderers?n.renderers[c.name]:null;n.renderers[c.name]=p?function(...y){let x=c.renderer.apply(this,y);return!1===x&&(x=p.apply(this,y)),x}:c.renderer}if(c.tokenizer){if(!c.level||"block"!==c.level&&"inline"!==c.level)throw new Error("extension level must be 'block' or 'inline'");n[c.level]?n[c.level].unshift(c.tokenizer):n[c.level]=[c.tokenizer],c.start&&("block"===c.level?n.startBlock?n.startBlock.push(c.start):n.startBlock=[c.start]:"inline"===c.level&&(n.startInline?n.startInline.push(c.start):n.startInline=[c.start]))}c.childTokens&&(n.childTokens[c.name]=c.childTokens)})),o.renderer){const c=En.defaults.renderer||new eT;for(const p in o.renderer){const y=c[p];c[p]=(...x)=>{let E=o.renderer[p].apply(c,x);return!1===E&&(E=y.apply(c,x)),E}}t.renderer=c}if(o.tokenizer){const c=En.defaults.tokenizer||new QE;for(const p in o.tokenizer){const y=c[p];c[p]=(...x)=>{let E=o.tokenizer[p].apply(c,x);return!1===E&&(E=y.apply(c,x)),E}}t.tokenizer=c}if(o.walkTokens){const c=En.defaults.walkTokens;t.walkTokens=function(p){o.walkTokens.call(this,p),c&&c.call(this,p)}}r&&(t.extensions=n),En.setOptions(t)})},En.walkTokens=function(e,t){for(const n of e)switch(t.call(En,n),n.type){case"table":for(const r of n.header)En.walkTokens(r.tokens,t);for(const r of n.rows)for(const o of r)En.walkTokens(o.tokens,t);break;case"list":En.walkTokens(n.items,t);break;default:En.defaults.extensions&&En.defaults.extensions.childTokens&&En.defaults.extensions.childTokens[n.type]?En.defaults.extensions.childTokens[n.type].forEach(function(r){En.walkTokens(n[r],t)}):n.tokens&&En.walkTokens(n.tokens,t)}},En.parseInline=function(e,t){if(typeof e>"u"||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");ik(t=Dc({},En.defaults,t||{}));try{const n=Kh.lexInline(e,t);return t.walkTokens&&En.walkTokens(n,t.walkTokens),Jh.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+ls(n.message+"",!0)+"
    ";throw n}},En.Parser=Jh,En.parser=Jh.parse,En.Renderer=eT,En.TextRenderer=lk,En.Lexer=Kh,En.lexer=Kh.lex,En.Tokenizer=QE,En.Slugger=ck,En.parse=En;const Zj=Kc,Yj=Symbol("__destroy"),uk=Symbol("__decoratorApplied");function hk(e){return"string"==typeof e?Symbol(`__destroy__${e}`):Yj}function dk(e,t){e[t]||(e[t]=new Qt)}function fk(e,t){e[t]&&(e[t].next(),e[t].complete(),e[t]=null)}function pk(e){e instanceof Hr&&e.unsubscribe()}function mk(e,t){return function(){if(e&&e.call(this),fk(this,hk()),t.arrayName&&function Jj(e){Array.isArray(e)&&e.forEach(pk)}(this[t.arrayName]),t.checkProperties)for(const n in this)t.blackList?.includes(n)||pk(this[n])}}function bw(e={}){return t=>{!function Xj(e){return!!e[Zj]}(t)?function Qj(e,t){e.prototype.ngOnDestroy=mk(e.prototype.ngOnDestroy,t)}(t,e):function e$(e,t){const n=e.\u0275pipe;n.onDestroy=mk(n.onDestroy,t)}(t,e),function Kj(e){e.prototype[uk]=!0}(t)}}Symbol("CheckerHasBeenSet");function v_(e,t){return n=>{const r=hk(t);"string"==typeof t?function i$(e,t,n){const r=e[t];dk(e,n),e[t]=function(){r.apply(this,arguments),fk(this,n),e[t]=r}}(e,t,r):dk(e,r);const o=e[r];return n.pipe(EE(o))}}const s$=["addListener","removeListener"],a$=["addEventListener","removeEventListener"],l$=["on","off"];function ca(e,t,n,r){if(bn(n)&&(r=n,n=void 0),r)return ca(e,t,n).pipe(bE(r));const[o,c]=function h$(e){return bn(e.addEventListener)&&bn(e.removeEventListener)}(e)?a$.map(p=>y=>e[p](t,y,n)):function c$(e){return bn(e.addListener)&&bn(e.removeListener)}(e)?s$.map(vk(e,t)):function u$(e){return bn(e.on)&&bn(e.off)}(e)?l$.map(vk(e,t)):[];if(!o&&No(e))return Sr(p=>ca(p,t,n))(Jo(e));if(!o)throw new TypeError("Invalid event target");return new fe(p=>{const y=(...x)=>p.next(1c(y)})}function vk(e,t){return n=>r=>e[n](t,r)}class d$ extends Hr{constructor(t,n){super()}schedule(t,n=0){return this}}const Cw={setInterval(e,t,...n){const{delegate:r}=Cw;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){const{delegate:t}=Cw;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};class xk extends d${constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){if(this.closed)return this;this.state=t;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(o,this.id,n),this}requestAsyncId(t,n,r=0){return Cw.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return n;Cw.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let o,r=!1;try{this.work(t)}catch(c){r=!0,o=c||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){const{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,As(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}}const nT={now:()=>(nT.delegate||Date).now(),delegate:void 0};class cv{constructor(t,n=cv.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}}cv.now=nT.now;class wk extends cv{constructor(t,n=cv.now){super(t,n),this.actions=[],this._active=!1,this._scheduled=void 0}flush(t){const{actions:n}=this;if(this._active)return void n.push(t);let r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const uv=new wk(xk),f$=uv;function om(e,t=uv){return an((n,r)=>{let o=null,c=null,p=null;const y=()=>{if(o){o.unsubscribe(),o=null;const E=c;c=null,r.next(E)}};function x(){const E=p+e,P=t.now();if(P{c=E,p=t.now(),o||(o=t.schedule(x,e),r.add(o))},()=>{y(),r.complete()},void 0,()=>{c=o=null}))})}const hv={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame;const{delegate:r}=hv;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);const o=t(c=>{n=void 0,e(c)});return new Hr(()=>n?.(o))},requestAnimationFrame(...e){const{delegate:t}=hv;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:t}=hv;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},x_=new class m$ extends wk{flush(t){this._active=!0;const n=this._scheduled;this._scheduled=void 0;const{actions:r}=this;let o;t=t||r.shift();do{if(o=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}}(class p$ extends xk{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return null!==r&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=hv.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,n,r=0){if(null!=r&&r>0||null==r&&this.delay>0)return super.recycleAsyncId(t,n,r);t.actions.some(o=>o.id===n)||(hv.cancelAnimationFrame(n),t._scheduled=void 0)}}),bk={leading:!0,trailing:!1};function Ps(e=0,t,n=f$){let r=-1;return null!=t&&(dd(t)?n=t:r=t),new fe(o=>{let c=function _$(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;c<0&&(c=0);let p=0;return n.schedule(function(){o.closed||(o.next(p++),0<=r?this.schedule(void 0,r):o.complete())},c)})}const Ck="https://baserow.datacity.org.il";class x${constructor(t,n,r,o){this.endpoint=t,this.token=n,this.id=r,this.name=o,this.rows=[]}fetchRows(t){return t.get(`${this.endpoint}/api/database/rows/table/${this.id}/?user_field_names=true`,{headers:{Authorization:`Token ${this.token}`}}).pipe(yn(n=>n.results),$r(n=>{this.rows=n}))}}class w_ extends Qt{constructor(t=1/0,n=1/0,r=nT){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){const{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:c,_windowTime:p}=this;n||(r.push(t),!o&&r.push(c.now()+p)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();const n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,c=o.slice();for(let p=0;p{const{length:p}=n;if(!p)return void c.complete();const y=new Array(p);let x=p,E=p;for(let P=0;P{F||(F=!0,E--),y[P]=V},()=>x--,void 0,()=>{(!x||!F)&&(E||c.next(r?ZA(r,y):y),c.complete())}))}});return t?o.pipe(bE(t)):o}class Mk{constructor(t,n,r){this.endpoint=t,this.token=n,this.database=r,this.tables=new w_(1)}fetchTables(t){return t.get(`${this.endpoint}/api/database/tables/database/${this.database}/`,{headers:{Authorization:`Token ${this.token}`}}).pipe(yn(n=>n.map(r=>new x$(this.endpoint,this.token,r.id,r.name))),Vi(n=>Mw(n.map(r=>r.fetchRows(t))).pipe(yn(()=>n))),$r(n=>{this.tables.next(n)}))}getTable(t){return this.tables.pipe(as(),yn(n=>n.find(r=>r.name===t)))}}var Ic=ze(304);class Ew{}class Tw{}class ql{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?"string"==typeof t?this.lazyInit=()=>{this.headers=new Map,t.split("\n").forEach(n=>{const r=n.indexOf(":");if(r>0){const o=n.slice(0,r),c=o.toLowerCase(),p=n.slice(r+1).trim();this.maybeSetNormalizedName(o,c),this.headers.has(c)?this.headers.get(c).push(p):this.headers.set(c,[p])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.setHeaderEntries(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof ql?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){const n=new ql;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof ql?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){const n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(t.name,n);const o=("a"===t.op?this.headers.get(n):void 0)||[];o.push(...r),this.headers.set(n,o);break;case"d":const c=t.value;if(c){let p=this.headers.get(n);if(!p)return;p=p.filter(y=>-1===c.indexOf(y)),0===p.length?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,p)}else this.headers.delete(n),this.normalizedNames.delete(n)}}setHeaderEntries(t,n){const r=(Array.isArray(n)?n:[n]).map(c=>c.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}}class w${encodeKey(t){return Dk(t)}encodeValue(t){return Dk(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const C$=/%(\d[a-f0-9])/gi,M$={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Dk(e){return encodeURIComponent(e).replace(C$,(t,n)=>M$[n]??t)}function Dw(e){return`${e}`}class _f{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new w$,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function b$(e,t){const n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{const c=o.indexOf("="),[p,y]=-1==c?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,c)),t.decodeValue(o.slice(c+1))],x=n.get(p)||[];x.push(y),n.set(p,x)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{const r=t.fromObject[n],o=Array.isArray(r)?r.map(Dw):[Dw(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){const n=[];return Object.keys(t).forEach(r=>{const o=t[r];Array.isArray(o)?o.forEach(c=>{n.push({param:r,value:c,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const n=new _f({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const n=("a"===t.op?this.map.get(t.param):void 0)||[];n.push(Dw(t.value)),this.map.set(t.param,n);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let r=this.map.get(t.param)||[];const o=r.indexOf(Dw(t.value));-1!==o&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class E${constructor(){this.map=new Map}set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function Ik(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Sk(e){return typeof Blob<"u"&&e instanceof Blob}function Pk(e){return typeof FormData<"u"&&e instanceof FormData}class dv{constructor(t,n,r,o){let c;if(this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function T$(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||o?(this.body=void 0!==r?r:null,c=o):c=r,c&&(this.reportProgress=!!c.reportProgress,this.withCredentials=!!c.withCredentials,c.responseType&&(this.responseType=c.responseType),c.headers&&(this.headers=c.headers),c.context&&(this.context=c.context),c.params&&(this.params=c.params),this.transferCache=c.transferCache),this.headers||(this.headers=new ql),this.context||(this.context=new E$),this.params){const p=this.params.toString();if(0===p.length)this.urlWithParams=n;else{const y=n.indexOf("?");this.urlWithParams=n+(-1===y?"?":yF.set(V,t.setHeaders[V]),x)),t.setParams&&(E=Object.keys(t.setParams).reduce((F,V)=>F.set(V,t.setParams[V]),E)),new dv(n,r,c,{params:E,headers:x,context:P,reportProgress:y,responseType:o,withCredentials:p})}}var yf=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(yf||{});class rT{constructor(t,n=200,r="OK"){this.headers=t.headers||new ql,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Iw extends rT{constructor(t={}){super(t),this.type=yf.ResponseHeader}clone(t={}){return new Iw({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class sm extends rT{constructor(t={}){super(t),this.type=yf.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new sm({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class b_ extends rT{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function iT(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let Sw=(()=>{class e{constructor(n){this.handler=n}request(n,r,o={}){let c;if(n instanceof dv)c=n;else{let x,E;x=o.headers instanceof ql?o.headers:new ql(o.headers),o.params&&(E=o.params instanceof _f?o.params:new _f({fromObject:o.params})),c=new dv(n,r,void 0!==o.body?o.body:null,{headers:x,context:o.context,params:E,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}const p=Sn(c).pipe(o_(x=>this.handler.handle(x)));if(n instanceof dv||"events"===o.observe)return p;const y=p.pipe(la(x=>x instanceof sm));switch(o.observe||"body"){case"body":switch(c.responseType){case"arraybuffer":return y.pipe(yn(x=>{if(null!==x.body&&!(x.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return x.body}));case"blob":return y.pipe(yn(x=>{if(null!==x.body&&!(x.body instanceof Blob))throw new Error("Response is not a Blob.");return x.body}));case"text":return y.pipe(yn(x=>{if(null!==x.body&&"string"!=typeof x.body)throw new Error("Response is not a string.");return x.body}));default:return y.pipe(yn(x=>x.body))}case"response":return y;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:(new _f).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,iT(o,r))}post(n,r,o={}){return this.request("POST",n,iT(o,r))}put(n,r,o={}){return this.request("PUT",n,iT(o,r))}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ew))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();function Ok(e,t){return t(e)}function O$(e,t){return(n,r)=>t.intercept(n,{handle:o=>e(o,r)})}const R$=new Zt(""),fv=new Zt(""),kk=new Zt(""),Rk=new Zt("");function L$(){let e=null;return(t,n)=>{null===e&&(e=(Nt(R$,{optional:!0})??[]).reduceRight(O$,Ok));const r=Nt(Px),o=r.add();return e(t,n).pipe(X0(()=>r.remove(o)))}}let Lk=(()=>{class e extends Ew{constructor(n,r){super(),this.backend=n,this.injector=r,this.chain=null,this.pendingTasks=Nt(Px);const o=Nt(Rk,{optional:!0});this.backend=o??n}handle(n){if(null===this.chain){const o=Array.from(new Set([...this.injector.get(fv),...this.injector.get(kk,[])]));this.chain=o.reduceRight((c,p)=>function k$(e,t,n){return(r,o)=>mu(n,()=>t(r,c=>e(c,o)))}(c,p,this.injector),Ok)}const r=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(X0(()=>this.pendingTasks.remove(r)))}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Tw),rn($o))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const V$=/^\)\]\}',?\n/;let Nk=(()=>{class e{constructor(n){this.xhrFactory=n}handle(n){if("JSONP"===n.method)throw new mt(-2800,!1);const r=this.xhrFactory;return(r.\u0275loadImpl?Pr(r.\u0275loadImpl()):Sn(null)).pipe(Vi(()=>new fe(c=>{const p=r.build();if(p.open(n.method,n.urlWithParams),n.withCredentials&&(p.withCredentials=!0),n.headers.forEach((_e,Pe)=>p.setRequestHeader(_e,Pe.join(","))),n.headers.has("Accept")||p.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){const _e=n.detectContentTypeHeader();null!==_e&&p.setRequestHeader("Content-Type",_e)}if(n.responseType){const _e=n.responseType.toLowerCase();p.responseType="json"!==_e?_e:"text"}const y=n.serializeBody();let x=null;const E=()=>{if(null!==x)return x;const _e=p.statusText||"OK",Pe=new ql(p.getAllResponseHeaders()),De=function U$(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(p)||n.url;return x=new Iw({headers:Pe,status:p.status,statusText:_e,url:De}),x},P=()=>{let{headers:_e,status:Pe,statusText:De,url:Ne}=E(),wt=null;204!==Pe&&(wt=typeof p.response>"u"?p.responseText:p.response),0===Pe&&(Pe=wt?200:0);let Wt=Pe>=200&&Pe<300;if("json"===n.responseType&&"string"==typeof wt){const nn=wt;wt=wt.replace(V$,"");try{wt=""!==wt?JSON.parse(wt):null}catch(Ot){wt=nn,Wt&&(Wt=!1,wt={error:Ot,text:wt})}}Wt?(c.next(new sm({body:wt,headers:_e,status:Pe,statusText:De,url:Ne||void 0})),c.complete()):c.error(new b_({error:wt,headers:_e,status:Pe,statusText:De,url:Ne||void 0}))},F=_e=>{const{url:Pe}=E(),De=new b_({error:_e,status:p.status||0,statusText:p.statusText||"Unknown Error",url:Pe||void 0});c.error(De)};let V=!1;const $=_e=>{V||(c.next(E()),V=!0);let Pe={type:yf.DownloadProgress,loaded:_e.loaded};_e.lengthComputable&&(Pe.total=_e.total),"text"===n.responseType&&p.responseText&&(Pe.partialText=p.responseText),c.next(Pe)},ce=_e=>{let Pe={type:yf.UploadProgress,loaded:_e.loaded};_e.lengthComputable&&(Pe.total=_e.total),c.next(Pe)};return p.addEventListener("load",P),p.addEventListener("error",F),p.addEventListener("timeout",F),p.addEventListener("abort",F),n.reportProgress&&(p.addEventListener("progress",$),null!==y&&p.upload&&p.upload.addEventListener("progress",ce)),p.send(y),c.next({type:yf.Sent}),()=>{p.removeEventListener("error",F),p.removeEventListener("abort",F),p.removeEventListener("load",P),p.removeEventListener("timeout",F),n.reportProgress&&(p.removeEventListener("progress",$),null!==y&&p.upload&&p.upload.removeEventListener("progress",ce)),p.readyState!==p.DONE&&p.abort()}})))}static#e=this.\u0275fac=function(r){return new(r||e)(rn(TA))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();const aT=new Zt("XSRF_ENABLED"),zk=new Zt("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),Bk=new Zt("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class Vk{}let H$=(()=>{class e{constructor(n,r,o){this.doc=n,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=mA(n,this.cookieName),this.lastCookieString=n),this.lastToken}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss),rn(gu),rn(zk))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac})}return e})();function G$(e,t){const n=e.url.toLowerCase();if(!Nt(aT)||"GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t(e);const r=Nt(Vk).getToken(),o=Nt(Bk);return null!=r&&!e.headers.has(o)&&(e=e.clone({headers:e.headers.set(o,r)})),t(e)}var vf=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(vf||{});function q$(...e){const t=[Sw,Nk,Lk,{provide:Ew,useExisting:Lk},{provide:Tw,useExisting:Nk},{provide:fv,useValue:G$,multi:!0},{provide:aT,useValue:!0},{provide:Vk,useClass:H$}];for(const n of e)t.push(...n.\u0275providers);return function hp(e){return{\u0275providers:e}}(t)}const Uk=new Zt("LEGACY_INTERCEPTOR_FN");function W$(){return function am(e,t){return{\u0275kind:e,\u0275providers:t}}(vf.LegacyInterceptors,[{provide:Uk,useFactory:L$},{provide:fv,useExisting:Uk,multi:!0}])}let Z$=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({providers:[q$(W$())]})}return e})();const Aw={day:e=>Ic(e).format("MMMM D, YYYY"),month:e=>Ic(e).format("MMMM YYYY"),year:e=>Ic(e).format("YYYY"),hour:e=>Ic(e).format("MMMM D, YYYY h:mm a")};class e7{}class t7 extends e7{constructor(){super(...arguments),this.relatedItems=[],this.cx=0,this.cy=0,this.k=0,this.indexes=[]}}class n7 extends Mk{constructor(t,n,r){super(Ck,n.Database_Token,n.Database_ID),this.http=r,this.slug=ee(""),this.editor_name=ee(""),this.editor_email=ee(""),this.pitch=ee(""),this.title=ee(""),this.subtitle=ee(""),this.infobarTitle=ee(""),this.infobarSubtitle=ee(""),this.infobarContent=ee(""),this.contributeMessage=ee(""),this.mapView=ee(""),this.logo=ee(""),this.thumbnail=ee(""),this.parentLink=ee(".."),this.mapStyle=ee(""),this.backgroundMapSytle=ee(""),this.mapboxKey=ee(""),this.showTooltips=ee(!0),this.altTimestampLabel=ee(""),this.postDateFormat=ee(""),this.altDateFormat=ee(""),this.primaryColor=ee(""),this.secondaryColor=ee(""),this.newEntryForm=ee(""),this.timelineItems=ee([]),this.lastModified=ee(new Date),this.minDate=ee(new Date),this.maxDate=ee(new Date),this.allLayers=[],this.nonces=[],this.authors=ee({}),this.ready=new w_(1),this.id=n.id,this.directoryId=t,this.title.set(n.Title),this.slug.set(n.URL_Slug),this.editor_name.set(n.Editor_Name),this.editor_email.set(n.Editor_Email),this.pitch.set(n.Pitch)}fetch(){return this.fetchTables(this.http).pipe($r(()=>{this.getTable("Settings").subscribe(t=>{const n={};t?.rows.forEach(r=>{n[r.Key]={value:r.Value,images:r.Image}}),this.title.set(n.Title?.value||""),this.subtitle.set(n.Subtitle?.value||""),this.infobarTitle.set(n.Infobar_Title?.value||this.title()),this.infobarSubtitle.set(n.Infobar_Subtitle?.value||this.subtitle()),this.infobarContent.set(n.Infobar_Content?.value||""),this.contributeMessage.set(n.Contribute_Message?.value||""),this.mapView.set(n.Default_Map_View?.value||""),this.logo.set(n.Logo?.images?.[0]?.url||""),this.thumbnail.set(n.Thumbnail?.images?.[0]?.url||""),this.parentLink.set(n.Parent_Link?.value||".."),this.mapStyle.set(n.Map_Style?.value||""),this.backgroundMapSytle.set(n.Background_Map_Style?.value||""),this.mapboxKey.set(n.Mapbox_Key?.value||""),this.showTooltips.set("true"===n.Show_Tooltips?.value),this.altTimestampLabel.set(n.Alt_Timestamp_Label?.value||""),this.postDateFormat.set(n.Post_Date_Format?.value||""),this.altDateFormat.set(n.Alt_Date_Format?.value||""),this.primaryColor.set(n.Primary_Color?.value||""),this.secondaryColor.set(n.Secondary_Color?.value||""),this.newEntryForm.set(n.New_Entry_Form?.value||"")})}),Vi(()=>Mw([this.getTable("MapLayers"),this.getTable("Authors"),this.getTable("Content")]).pipe(yn(([t,n,r])=>{this.allLayers=[];const o={};t?.rows.forEach(y=>{const x=y.On_Layers.map(E=>E.value)||[];x.forEach(E=>{this.allLayers.includes(E)||this.allLayers.push(E)}),o[y.Name]=x});const c={};n?.rows.forEach(y=>{c[y.Name]={name:y.Name,email:y.Email,status:y.Status?.value}}),this.authors.set(c),this.nonces=[];const p=[];return r?.rows.forEach(y=>{const x={id:y.id,title:y.Title,notes:y.Notes,post_timestamp:Ic(y.Post_Timestamp).toDate(),status:y.Status?.value,type:y.Type?.value,youtube_video_id:y.Youtube_Video_Id,content:y.Content,image:y.Image?.[0]?.url,audio:y.Audio?.[0]?.url,name:y.Name,username:y.Username,profile_image:y.Profile_Image?.[0]?.url,like_count:y.Like_Count,comment_count:y.Comment_Count,link_title:y.Link_Title,link_domain:y.Link_Domain,geo:y.Geo,map_layers:[],off_map_layers:[],nonce:y.Nonce,authors:y.Authors?.map(P=>c[P.value])||[],tags:y.Tags?.map(P=>P.value)||[],related:y.Related,lastModified:Ic(y.Last_Modified).toDate()};x.alt_post_timestamp=y.Alt_Post_Timestamp?Ic(y.Alt_Post_Timestamp).toDate():x.post_timestamp,y.Map_Layer.forEach(P=>{const F=P.value;o[F]&&o[F].forEach(V=>{x.map_layers.includes(V)||x.map_layers.push(V)})}),this.allLayers.forEach(P=>{x.map_layers.includes(P)||x.off_map_layers.push(P)}),x.nonce&&this.nonces.push(x.nonce);const E=x;"Published"===E.status&&E.authors.find(P=>"Editor"===P.status||"Contributor"===P.status)&&(!E.post_timestamp&&!E.alt_post_timestamp||p.push(E))}),p.forEach(y=>{y.related=y.related.map(x=>p.find(E=>E.id===x.id)||{}).filter(x=>!!x.id)}),p.sort((y,x)=>y.post_timestamp.getTime()-x.post_timestamp.getTime())}),$r(t=>{this.allContentItems=t;const n=t.map((p,y)=>{const x=new t7;Object.assign(x,p),x.timestamp=x.post_timestamp||x.alt_post_timestamp,x.formattedPostTimestamp=(Aw[this.postDateFormat()]||Aw.year)(p.post_timestamp),x.formattedAltPostTimestamp=(Aw[this.altTimestampLabel()]||Aw.year)(p.alt_post_timestamp);const E=x.authors.map(P=>P.name);if(E.length>1){const P=E.pop();E[E.length-1]+=` and ${P}`}return x.formattedAuthors=E.join(", "),x});let r=null,o=null;n.forEach((p,y)=>{p.index=y,p.next=n[y+1]||null,p.prev=n[y-1]||null,p.post_timestamp&&((!r||p.post_timestampo)&&(o=p.post_timestamp)),p.relatedItems=p.related.map(x=>n.find(E=>E.id===x.id)||{}).filter(x=>!!x)}),r=r||new Date,o=o||new Date;const c=(o.getTime()-r.getTime())/10;this.minDate.set(new Date(r.getTime()-c)),this.maxDate.set(new Date(o.getTime()+c)),this.lastModified.set(n.map(p=>p.lastModified).reduce((p,y)=>p>y?p:y,new Date(1970,1,1))),this.timelineItems.set(n),this.ready.next(!0),this.ready.complete()}))))}}class r7 extends Mk{constructor(t,n){super(Ck,"hgGDtvhhPavOCwtGmbv7ANaXc4UQdq6l",t),this.http=n,this.chronomaps=ee([]),this.title=ee(""),this.subtitle=ee(""),this.titleImageUrl=ee(""),this.description=ee(""),this.fullDescription=ee(""),this.logos=ee([]),this.logoLinks=ee([]),this.primaryColor=ee("#000000"),this.secondaryColor=ee("#ffffff"),this.zoomFrom=ee(1900),this.zoomUntil=ee(2100),this.url=ee("")}fetchMaps(){this.fetchTables(this.http).subscribe(),this.getTable("Settings").subscribe(t=>{const n={};t?.rows.forEach(r=>{n[r.Key]={value:r.Value,images:r.Image}}),this.title.set(n.Title?.value||""),this.subtitle.set(n.Subtitle?.value||""),this.titleImageUrl.set(n.Title_Image?.images?.[0]?.url||""),this.description.set(n.Description.value),this.fullDescription.set(n.Full_Description.value),this.logos.set((n.Logos?.images||[]).map(r=>r.url)),this.logoLinks.set(n.Logos?.value?.split(",")||[]),this.primaryColor.set(n.Primary_Color.value),this.secondaryColor.set(n.Secondary_Color.value),this.zoomFrom.set(n.Zoom_From.value),this.zoomUntil.set(n.Zoom_Until.value),this.url.set(n.URL.value)}),this.getTable("Chronomaps").subscribe(t=>{this.chronomaps.set(t?.rows.filter(n=>"Published"===n.Status?.value).map(n=>new n7(this.database,n,this.http))||[]),Mw([...this.chronomaps().map(n=>n.fetch())]).subscribe(n=>{console.log("all maps loaded");const r=this.chronomaps().sort((o,c)=>c.lastModified().getTime()-o.lastModified().getTime());this.chronomaps.set(r)})})}}let Ow=(()=>{class e{constructor(n){this.http=n,this.currentDbId=0}fetchData(n){this.currentDbId!==n&&(console.log("fetching data for",n),this.currentDbId=n,this.directory=new r7(n,this.http),this.directory.fetchMaps())}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Sw))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),kw=(()=>{class e{constructor(n){this.document=n,this.mobile=ee(!1),this.desktop=ee(!1),this.window&&ca(this.window,"resize").subscribe(()=>{this._check()}),this._check()}get window(){return this.document.defaultView}_check(){this.window?.innerWidth?(this.mobile.set(this.window.innerWidth<1e3),this.desktop.set(!this.mobile())):(this.mobile.set(!1),this.desktop.set(!0))}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ss))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var i7={value:()=>{}};function Zk(){for(var r,e=0,t=arguments.length,n={};e=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}(e+"",n),c=-1,p=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++c0)for(var o,c,n=new Array(o),r=0;rt?1:e>=t?0:NaN}Lw.prototype={constructor:Lw,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var cT="http://www.w3.org/1999/xhtml";const tR={svg:"http://www.w3.org/2000/svg",xhtml:cT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fw(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),tR.hasOwnProperty(t)?{space:tR[t],local:e}:e}function U7(e){return function(){this.removeAttribute(e)}}function j7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $7(e,t){return function(){this.setAttribute(e,t)}}function H7(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function G7(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function q7(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function nR(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Z7(e){return function(){this.style.removeProperty(e)}}function X7(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Y7(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function C_(e,t){return e.style.getPropertyValue(t)||nR(e).getComputedStyle(e,null).getPropertyValue(t)}function J7(e){return function(){delete this[e]}}function Q7(e,t){return function(){this[e]=t}}function eH(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function rR(e){return e.trim().split(/^|\s+/)}function uT(e){return e.classList||new iR(e)}function iR(e){this._node=e,this._names=rR(e.getAttribute("class")||"")}function oR(e,t){for(var n=uT(e),r=-1,o=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var cR=[null];function sl(e,t){this._groups=e,this._parents=t}function uR(){return new sl([[document.documentElement]],cR)}sl.prototype=uR.prototype={constructor:sl,select:function l7(e){"function"!=typeof e&&(e=lT(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=wt&&(wt=Ne+1);!(nn=Pe[wt])&&++wt=0;)(p=r[o])&&(c&&4^p.compareDocumentPosition(c)&&c.parentNode.insertBefore(p,c),c=p);return this},sort:function k7(e){function t(F,V){return F&&V?e(F.__data__,V.__data__):!F-!V}e||(e=R7);for(var n=this._groups,r=n.length,o=new Array(r),c=0;c1?this.each((null==t?Z7:"function"==typeof t?Y7:X7)(e,t,n??"")):C_(this.node(),e)},property:function tH(e,t){return arguments.length>1?this.each((null==t?J7:"function"==typeof t?eH:Q7)(e,t)):this.node()[e]},classed:function oH(e,t){var n=rR(e+"");if(arguments.length<2){for(var r=uT(this.node()),o=-1,c=n.length;++o=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}(e+""),c=r.length;if(!(arguments.length<2)){for(y=t?OH:AH,o=0;o=0&&e._call.call(void 0,t),e=e._next;--M_}()}finally{M_=0,function XH(){for(var e,n,t=Nw,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Nw=n);_v=e,pT(r)}(),cm=0}}function ZH(){var e=yv.now(),t=e-zw;t>dR&&(Bw-=t,zw=e)}function pT(e){M_||(mv&&(mv=clearTimeout(mv)),e-cm>24?(e<1/0&&(mv=setTimeout(mR,e-yv.now()-Bw)),gv&&(gv=clearInterval(gv))):(gv||(zw=yv.now(),gv=setInterval(ZH,dR)),M_=1,fR(mR)))}function gR(e,t,n){var r=new Vw;return r.restart(o=>{r.stop(),e(o+t)},t=null==t?0:+t,n),r}Vw.prototype=pR.prototype={constructor:Vw,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?fT():+n)+(null==t?0:+t),!this._next&&_v!==this&&(_v?_v._next=this:Nw=this,_v=this),this._call=e,this._time=n,pT()},stop:function(){this._call&&(this._call=null,this._time=1/0,pT())}};var YH=Yk("start","end","cancel","interrupt"),KH=[],_R=0,mT=2,Uw=3,gT=5,jw=6;function $w(e,t,n,r,o,c){var p=e.__transition;if(p){if(n in p)return}else e.__transition={};!function JH(e,t,n){var o,r=e.__transition;function p(E){var P,F,V,$;if(1!==n.state)return x();for(P in r)if(($=r[P]).name===n.name){if($.state===Uw)return gR(p);4===$.state?($.state=jw,$.timer.stop(),$.on.call("interrupt",e,e.__data__,$.index,$.group),delete r[P]):+P_R)throw new Error("too late; already scheduled");return n}function Nu(e,t){var n=Sc(e,t);if(n.state>Uw)throw new Error("too late; already running");return n}function Sc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Hw(e,t){var r,o,p,n=e.__transition,c=!0;if(n){for(p in t=null==t?null:t+"",n)(r=n[p]).name===t?(o=r.state>mT&&r.state180?P+=360:P-E>180&&(E+=360),V.push({i:F.push(o(F)+"rotate(",null,r)-2,x:Pc(E,P)})):P&&F.push(o(F)+"rotate("+P+r)}(E.rotate,P.rotate,F,V),function y(E,P,F,V){E!==P?V.push({i:F.push(o(F)+"skewX(",null,r)-2,x:Pc(E,P)}):P&&F.push(o(F)+"skewX("+P+r)}(E.skewX,P.skewX,F,V),function x(E,P,F,V,$,ce){if(E!==F||P!==V){var _e=$.push(o($)+"scale(",null,",",null,")");ce.push({i:_e-4,x:Pc(E,F)},{i:_e-2,x:Pc(P,V)})}else(1!==F||1!==V)&&$.push(o($)+"scale("+F+","+V+")")}(E.scaleX,E.scaleY,P.scaleX,P.scaleY,F,V),E=P=null,function($){for(var Pe,ce=-1,_e=V.length;++ce<_e;)F[(Pe=V[ce]).i]=Pe.x($);return F.join("")}}}var nG=bR(function eG(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yT:wR(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),rG=bR(function tG(e){return null!=e&&(Gw||(Gw=document.createElementNS("http://www.w3.org/2000/svg","g")),Gw.setAttribute("transform",e),e=Gw.transform.baseVal.consolidate())?wR((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):yT},", ",")",")");function iG(e,t){var n,r;return function(){var o=Nu(this,e),c=o.tween;if(c!==n)for(var p=0,y=(r=n=c).length;p>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ww(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ww(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=lG.exec(e))?new Sa(t[1],t[2],t[3],1):(t=cG.exec(e))?new Sa(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uG.exec(e))?Ww(t[1],t[2],t[3],t[4]):(t=hG.exec(e))?Ww(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=dG.exec(e))?PR(t[1],t[2]/100,t[3]/100,1):(t=fG.exec(e))?PR(t[1],t[2]/100,t[3]/100,t[4]):MR.hasOwnProperty(e)?DR(MR[e]):"transparent"===e?new Sa(NaN,NaN,NaN,0):null}function DR(e){return new Sa(e>>16&255,e>>8&255,255&e,1)}function Ww(e,t,n,r){return r<=0&&(e=t=n=NaN),new Sa(e,t,n,r)}function Zw(e,t,n,r){return 1===arguments.length?function gG(e){return e instanceof vv||(e=um(e)),e?new Sa((e=e.rgb()).r,e.g,e.b,e.opacity):new Sa}(e):new Sa(e,t,n,r??1)}function Sa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function IR(){return`#${dm(this.r)}${dm(this.g)}${dm(this.b)}`}function SR(){const e=Xw(this.opacity);return`${1===e?"rgb(":"rgba("}${hm(this.r)}, ${hm(this.g)}, ${hm(this.b)}${1===e?")":`, ${e})`}`}function Xw(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dm(e){return((e=hm(e))<16?"0":"")+e.toString(16)}function PR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ac(e,t,n,r)}function AR(e){if(e instanceof Ac)return new Ac(e.h,e.s,e.l,e.opacity);if(e instanceof vv||(e=um(e)),!e)return new Ac;if(e instanceof Ac)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),c=Math.max(t,n,r),p=NaN,y=c-o,x=(c+o)/2;return y?(p=t===c?(n-r)/y+6*(n0&&x<1?0:p,new Ac(p,y,x,e.opacity)}function Ac(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function OR(e){return(e=(e||0)%360)<0?e+360:e}function Yw(e){return Math.max(0,Math.min(1,e||0))}function wT(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function kR(e,t,n,r,o){var c=e*e,p=c*e;return((1-3*e+3*c-p)*t+(4-6*c+3*p)*n+(1+3*e+3*c-3*p)*r+p*o)/6}xT(vv,um,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ER,formatHex:ER,formatHex8:function pG(){return this.rgb().formatHex8()},formatHsl:function mG(){return AR(this).formatHsl()},formatRgb:TR,toString:TR}),xT(Sa,Zw,CR(vv,{brighter(e){return e=null==e?qw:Math.pow(qw,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sa(hm(this.r),hm(this.g),hm(this.b),Xw(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:IR,formatHex:IR,formatHex8:function _G(){return`#${dm(this.r)}${dm(this.g)}${dm(this.b)}${dm(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:SR,toString:SR})),xT(Ac,function yG(e,t,n,r){return 1===arguments.length?AR(e):new Ac(e,t,n,r??1)},CR(vv,{brighter(e){return e=null==e?qw:Math.pow(qw,e),new Ac(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ac(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Sa(wT(e>=240?e-240:e+120,o,r),wT(e,o,r),wT(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ac(OR(this.h),Yw(this.s),Yw(this.l),Xw(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xw(this.opacity);return`${1===e?"hsl(":"hsla("}${OR(this.h)}, ${100*Yw(this.s)}%, ${100*Yw(this.l)}%${1===e?")":`, ${e})`}`}}));const bT=e=>()=>e;function LR(e,t){var n=t-e;return n?function RR(e,t){return function(n){return e+n*t}}(e,n):bT(isNaN(e)?t:e)}const Kw=function e(t){var n=function bG(e){return 1==(e=+e)?LR:function(t,n){return n-t?function wG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):bT(isNaN(t)?n:t)}}(t);function r(o,c){var p=n((o=Zw(o)).r,(c=Zw(c)).r),y=n(o.g,c.g),x=n(o.b,c.b),E=LR(o.opacity,c.opacity);return function(P){return o.r=p(P),o.g=y(P),o.b=x(P),o.opacity=E(P),o+""}}return r.gamma=e,r}(1);function FR(e){return function(t){var p,y,n=t.length,r=new Array(n),o=new Array(n),c=new Array(n);for(p=0;p=1?(n=1,t-1):Math.floor(n*t),o=e[r],c=e[r+1];return kR((n-r/t)*t,r>0?e[r-1]:2*o-c,o,c,rn&&(c=t.slice(n,c),y[p]?y[p]+=c:y[++p]=c),(r=r[0])===(o=o[0])?y[p]?y[p]+=o:y[++p]=o:(y[++p]=null,x.push({i:p,x:Pc(r,o)})),n=MT.lastIndex;return n=0&&(t=t.slice(0,n)),!t||"start"===t})}(t)?_T:Nu;return function(){var p=c(this,e),y=p.on;y!==r&&(o=(r=y).copy()).on(t,n),p.on=o}}(n,e,t))},attr:function AG(e,t){var n=Fw(e),r="transform"===n?rG:zR;return this.attrTween(e,"function"==typeof t?(n.local?PG:SG)(n,r,vT(this,"attr."+e,t)):null==t?(n.local?TG:EG)(n):(n.local?IG:DG)(n,r,t))},attrTween:function FG(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Fw(e);return this.tween(n,(r.local?RG:LG)(r,t))},style:function lq(e,t,n){var r="transform"==(e+="")?nG:zR;return null==t?this.styleTween(e,function iq(e,t){var n,r,o;return function(){var c=C_(this,e),p=(this.style.removeProperty(e),C_(this,e));return c===p?null:c===n&&p===r?o:o=t(n=c,r=p)}}(e,r)).on("end.style."+e,BR(e)):"function"==typeof t?this.styleTween(e,function sq(e,t,n){var r,o,c;return function(){var p=C_(this,e),y=n(this),x=y+"";return null==y&&(this.style.removeProperty(e),x=y=C_(this,e)),p===x?null:p===r&&x===o?c:(o=x,c=t(r=p,y))}}(e,r,vT(this,"style."+e,t))).each(function aq(e,t){var n,r,o,y,c="style."+t,p="end."+c;return function(){var x=Nu(this,e),E=x.on,P=null==x.value[c]?y||(y=BR(t)):void 0;(E!==n||o!==P)&&(r=(n=E).copy()).on(p,o=P),x.on=r}}(this._id,e)):this.styleTween(e,function oq(e,t,n){var r,c,o=n+"";return function(){var p=C_(this,e);return p===o?null:p===r?c:c=t(r=p,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function hq(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function uq(e,t,n){var r,o;function c(){var p=t.apply(this,arguments);return p!==o&&(r=(o=p)&&function cq(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,p,n)),r}return c._value=t,c}(e,t,n??""))},text:function pq(e){return this.tween("text","function"==typeof e?function fq(e){return function(){var t=e(this);this.textContent=t??""}}(vT(this,"text",e)):function dq(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function _q(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function gq(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&function mq(e){return function(t){this.textContent=e.call(this,t)}}(o)),t}return r._value=e,r}(e))},remove:function QG(){return this.on("end.remove",function JG(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function sG(e,t){var n=this._id;if(e+="",arguments.length<2){for(var p,r=Sc(this.node(),n).tween,o=0,c=r.length;o()=>e;function Tq(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function nd(e,t,n){this.k=e,this.x=t,this.y=n}nd.prototype={constructor:nd,scale:function(e){return 1===e?this:new nd(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new nd(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var bv=new nd(1,0,0);function ET(e){e.stopImmediatePropagation()}function Cv(e){e.preventDefault(),e.stopImmediatePropagation()}function Iq(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Sq(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function UR(){return this.__zoom||bv}function Pq(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Aq(){return navigator.maxTouchPoints||"ontouchstart"in this}function Oq(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],c=e.invertY(t[0][1])-n[0][1],p=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),p>c?(c+p)/2:Math.min(0,c)||Math.max(0,p))}function Qw(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function Rq(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function TT(e){let t,n,r;function o(y,x,E=0,P=y.length){if(E>>1;n(y[F],x)<0?E=F+1:P=F}while(EQw(e(y),x),r=(y,x)=>e(y)-x):(t=e===Qw||e===Rq?e:Lq,n=e,r=e),{left:o,center:function p(y,x,E=0,P=y.length){const F=o(y,x,E,P-1);return F>E&&r(y[F-1],x)>-r(y[F],x)?F-1:F},right:function c(y,x,E=0,P=y.length){if(E>>1;n(y[F],x)<=0?E=F+1:P=F}while(E=DT?o*=10:c>=IT?o*=5:c>=ST&&(o*=2),t0))return x;do{x.push(E=new Date(+c)),t(c,y),e(c)}while(E=p)for(;e(p),!c(p);)p.setTime(p-1)},function(p,y){if(p>=p)if(y<0)for(;++y<=0;)for(;t(p,-1),!c(p););else for(;--y>=0;)for(;t(p,1),!c(p););})},n&&(o.count=function(c,p){return OT.setTime(+c),kT.setTime(+p),e(OT),e(kT),Math.floor(n(OT,kT))},o.every=function(c){return c=Math.floor(c),isFinite(c)&&c>0?c>1?o.filter(r?function(p){return r(p)%c==0}:function(p){return o.count(0,p)%c==0}):o:null}),o}var eb=cs(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});eb.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?cs(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):eb:null};const Nq=eb;const Mv=cs(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*rd)},function(e,t){return(t-e)/rd},function(e){return e.getUTCSeconds()});const qR=cs(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd)},function(e,t){e.setTime(+e+t*Wl)},function(e,t){return(t-e)/Wl},function(e){return e.getMinutes()});const ZR=cs(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd-e.getMinutes()*Wl)},function(e,t){e.setTime(+e+t*id)},function(e,t){return(t-e)/id},function(e){return e.getHours()});const tb=cs(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wl)/fm,e=>e.getDate()-1);function pm(e){return cs(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Wl)/PT})}var nb=pm(0),rb=pm(1),T_=(pm(2),pm(3),pm(4));const KR=(pm(5),pm(6),cs(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}));var RT=cs(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});RT.every=function(e){return isFinite(e=Math.floor(e))&&e>0?cs(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};const mm=RT;const jq=cs(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Wl)},function(e,t){return(t-e)/Wl},function(e){return e.getUTCMinutes()});const $q=cs(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*id)},function(e,t){return(t-e)/id},function(e){return e.getUTCHours()});const LT=cs(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/fm},function(e){return e.getUTCDate()-1});function gm(e){return cs(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/PT})}var FT=gm(0),ib=gm(1),D_=(gm(2),gm(3),gm(4));const Zq=(gm(5),gm(6),cs(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}));var NT=cs(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});NT.every=function(e){return isFinite(e=Math.floor(e))&&e>0?cs(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};const I_=NT;function nL(e,t,n,r,o,c){const p=[[Mv,1,rd],[Mv,5,5e3],[Mv,15,15e3],[Mv,30,3e4],[c,1,Wl],[c,5,5*Wl],[c,15,15*Wl],[c,30,30*Wl],[o,1,id],[o,3,3*id],[o,6,6*id],[o,12,12*id],[r,1,fm],[r,2,2*fm],[n,1,PT],[t,1,$R],[t,3,3*$R],[e,1,AT]];function x(E,P,F){const V=Math.abs(P-E)/F,$=TT(([,,Pe])=>Pe).right(p,V);if($===p.length)return e.every(jR(E/AT,P/AT,F));if(0===$)return Nq.every(Math.max(jR(E,P,F),1));const[ce,_e]=p[V/p[$-1][2][t.toLowerCase(),n]))}function tW(e,t,n){var r=us.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function nW(e,t,n){var r=us.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function rW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function iW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function oW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function iL(e,t,n){var r=us.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function oL(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sW(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function aW(e,t,n){var r=us.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function lW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sL(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function cW(e,t,n){var r=us.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function aL(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function uW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function hW(e,t,n){var r=us.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function dW(e,t,n){var r=us.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fW(e,t,n){var r=us.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pW(e,t,n){var r=Jq.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function mW(e,t,n){var r=us.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gW(e,t,n){var r=us.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lL(e,t){return Zr(e.getDate(),t,2)}function _W(e,t){return Zr(e.getHours(),t,2)}function yW(e,t){return Zr(e.getHours()%12||12,t,2)}function vW(e,t){return Zr(1+tb.count(mm(e),e),t,3)}function cL(e,t){return Zr(e.getMilliseconds(),t,3)}function xW(e,t){return cL(e,t)+"000"}function wW(e,t){return Zr(e.getMonth()+1,t,2)}function bW(e,t){return Zr(e.getMinutes(),t,2)}function CW(e,t){return Zr(e.getSeconds(),t,2)}function MW(e){var t=e.getDay();return 0===t?7:t}function EW(e,t){return Zr(nb.count(mm(e)-1,e),t,2)}function uL(e){var t=e.getDay();return t>=4||0===t?T_(e):T_.ceil(e)}function TW(e,t){return e=uL(e),Zr(T_.count(mm(e),e)+(4===mm(e).getDay()),t,2)}function DW(e){return e.getDay()}function IW(e,t){return Zr(rb.count(mm(e)-1,e),t,2)}function SW(e,t){return Zr(e.getFullYear()%100,t,2)}function PW(e,t){return Zr((e=uL(e)).getFullYear()%100,t,2)}function AW(e,t){return Zr(e.getFullYear()%1e4,t,4)}function OW(e,t){var n=e.getDay();return Zr((e=n>=4||0===n?T_(e):T_.ceil(e)).getFullYear()%1e4,t,4)}function kW(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Zr(t/60|0,"0",2)+Zr(t%60,"0",2)}function hL(e,t){return Zr(e.getUTCDate(),t,2)}function RW(e,t){return Zr(e.getUTCHours(),t,2)}function LW(e,t){return Zr(e.getUTCHours()%12||12,t,2)}function FW(e,t){return Zr(1+LT.count(I_(e),e),t,3)}function dL(e,t){return Zr(e.getUTCMilliseconds(),t,3)}function NW(e,t){return dL(e,t)+"000"}function zW(e,t){return Zr(e.getUTCMonth()+1,t,2)}function BW(e,t){return Zr(e.getUTCMinutes(),t,2)}function VW(e,t){return Zr(e.getUTCSeconds(),t,2)}function UW(e){var t=e.getUTCDay();return 0===t?7:t}function jW(e,t){return Zr(FT.count(I_(e)-1,e),t,2)}function fL(e){var t=e.getUTCDay();return t>=4||0===t?D_(e):D_.ceil(e)}function $W(e,t){return e=fL(e),Zr(D_.count(I_(e),e)+(4===I_(e).getUTCDay()),t,2)}function HW(e){return e.getUTCDay()}function GW(e,t){return Zr(ib.count(I_(e)-1,e),t,2)}function qW(e,t){return Zr(e.getUTCFullYear()%100,t,2)}function WW(e,t){return Zr((e=fL(e)).getUTCFullYear()%100,t,2)}function ZW(e,t){return Zr(e.getUTCFullYear()%1e4,t,4)}function XW(e,t){var n=e.getUTCDay();return Zr((e=n>=4||0===n?D_(e):D_.ceil(e)).getUTCFullYear()%1e4,t,4)}function YW(){return"+0000"}function pL(){return"%"}function mL(e){return+e}function gL(e){return Math.floor(+e/1e3)}!function eZ(e){S_=function Kq(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,c=e.days,p=e.shortDays,y=e.months,x=e.shortMonths,E=Tv(o),P=Dv(o),F=Tv(c),V=Dv(c),$=Tv(p),ce=Dv(p),_e=Tv(y),Pe=Dv(y),De=Tv(x),Ne=Dv(x),wt={a:function An(gn){return p[gn.getDay()]},A:function ar(gn){return c[gn.getDay()]},b:function yr(gn){return x[gn.getMonth()]},B:function Cr(gn){return y[gn.getMonth()]},c:null,d:lL,e:lL,f:xW,g:PW,G:OW,H:_W,I:yW,j:vW,L:cL,m:wW,M:bW,p:function Mi(gn){return o[+(gn.getHours()>=12)]},q:function ro(gn){return 1+~~(gn.getMonth()/3)},Q:mL,s:gL,S:CW,u:MW,U:EW,V:TW,w:DW,W:IW,x:null,X:null,y:SW,Y:AW,Z:kW,"%":pL},Wt={a:function Xl(gn){return p[gn.getUTCDay()]},A:function Xo(gn){return c[gn.getUTCDay()]},b:function al(gn){return x[gn.getUTCMonth()]},B:function kc(gn){return y[gn.getUTCMonth()]},c:null,d:hL,e:hL,f:NW,g:WW,G:XW,H:RW,I:LW,j:FW,L:dL,m:zW,M:BW,p:function ll(gn){return o[+(gn.getUTCHours()>=12)]},q:function Rc(gn){return 1+~~(gn.getUTCMonth()/3)},Q:mL,s:gL,S:VW,u:UW,U:jW,V:$W,w:HW,W:GW,x:null,X:null,y:qW,Y:ZW,Z:YW,"%":pL},nn={a:function Pa(gn,Dr,Xr){var $t=$.exec(Dr.slice(Xr));return $t?(gn.w=ce.get($t[0].toLowerCase()),Xr+$t[0].length):-1},A:function od(gn,Dr,Xr){var $t=F.exec(Dr.slice(Xr));return $t?(gn.w=V.get($t[0].toLowerCase()),Xr+$t[0].length):-1},b:function Zl(gn,Dr,Xr){var $t=De.exec(Dr.slice(Xr));return $t?(gn.m=Ne.get($t[0].toLowerCase()),Xr+$t[0].length):-1},B:function Cf(gn,Dr,Xr){var $t=_e.exec(Dr.slice(Xr));return $t?(gn.m=Pe.get($t[0].toLowerCase()),Xr+$t[0].length):-1},c:function at(gn,Dr,Xr){return Fi(gn,t,Dr,Xr)},d:sL,e:sL,f:fW,g:oL,G:iL,H:aL,I:aL,j:cW,L:dW,m:lW,M:uW,p:function ha(gn,Dr,Xr){var $t=E.exec(Dr.slice(Xr));return $t?(gn.p=P.get($t[0].toLowerCase()),Xr+$t[0].length):-1},q:aW,Q:mW,s:gW,S:hW,u:nW,U:rW,V:iW,w:tW,W:oW,x:function Tn(gn,Dr,Xr){return Fi(gn,n,Dr,Xr)},X:function jt(gn,Dr,Xr){return Fi(gn,r,Dr,Xr)},y:oL,Y:iL,Z:sW,"%":pW};function Ot(gn,Dr){return function(Xr){var ul,vm,k3,$t=[],Aa=-1,Ni=0,cl=gn.length;for(Xr instanceof Date||(Xr=new Date(+Xr));++Aa53)return null;"w"in $t||($t.w=1),"Z"in $t?(cl=(Ni=BT(Ev($t.y,0,1))).getUTCDay(),Ni=cl>4||0===cl?ib.ceil(Ni):ib(Ni),Ni=LT.offset(Ni,7*($t.V-1)),$t.y=Ni.getUTCFullYear(),$t.m=Ni.getUTCMonth(),$t.d=Ni.getUTCDate()+($t.w+6)%7):(cl=(Ni=zT(Ev($t.y,0,1))).getDay(),Ni=cl>4||0===cl?rb.ceil(Ni):rb(Ni),Ni=tb.offset(Ni,7*($t.V-1)),$t.y=Ni.getFullYear(),$t.m=Ni.getMonth(),$t.d=Ni.getDate()+($t.w+6)%7)}else("W"in $t||"U"in $t)&&("w"in $t||($t.w="u"in $t?$t.u%7:"W"in $t?1:0),cl="Z"in $t?BT(Ev($t.y,0,1)).getUTCDay():zT(Ev($t.y,0,1)).getDay(),$t.m=0,$t.d="W"in $t?($t.w+6)%7+7*$t.W-(cl+5)%7:$t.w+7*$t.U-(cl+6)%7);return"Z"in $t?($t.H+=$t.Z/100|0,$t.M+=$t.Z%100,BT($t)):zT($t)}}function Fi(gn,Dr,Xr,$t){for(var ul,vm,Aa=0,Ni=Dr.length,cl=Xr.length;Aa=cl)return-1;if(37===(ul=Dr.charCodeAt(Aa++))){if(ul=Dr.charAt(Aa++),!(vm=nn[ul in rL?Dr.charAt(Aa++):ul])||($t=vm(gn,Xr,$t))<0)return-1}else if(ul!=Xr.charCodeAt($t++))return-1}return $t}return wt.x=Ot(n,wt),wt.X=Ot(r,wt),wt.c=Ot(t,wt),Wt.x=Ot(n,Wt),Wt.X=Ot(r,Wt),Wt.c=Ot(t,Wt),{format:function(gn){var Dr=Ot(gn+="",wt);return Dr.toString=function(){return gn},Dr},parse:function(gn){var Dr=Gn(gn+="",!1);return Dr.toString=function(){return gn},Dr},utcFormat:function(gn){var Dr=Ot(gn+="",Wt);return Dr.toString=function(){return gn},Dr},utcParse:function(gn){var Dr=Gn(gn+="",!0);return Dr.toString=function(){return gn},Dr}}}(e),VT=S_.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const nZ=TT(Qw).right,rZ=(TT(function tZ(e){return null===e?NaN:+e}),nZ);function yL(e,t){var p,n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),c=new Array(n);for(p=0;pt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}(e[0],e[V-1])),y=V>2?fZ:dZ,x=E=null,F}function F(V){return null==V||isNaN(V=+V)?c:(x||(x=y(e.map(r),t,n)))(r(p(V)))}return F.invert=function(V){return p(o((E||(E=y(t,e.map(r),Pc)))(V)))},F.domain=function(V){return arguments.length?(e=Array.from(V,uZ),P()):e.slice()},F.range=function(V){return arguments.length?(t=Array.from(V),P()):t.slice()},F.rangeRound=function(V){return t=Array.from(V),n=lZ,P()},F.clamp=function(V){return arguments.length?(p=!!V||P_,P()):p!==P_},F.interpolate=function(V){return arguments.length?(n=V,P()):n},F.unknown=function(V){return arguments.length?(c=V,F):c},function(V,$){return r=V,o=$,P()}}()(P_,P_)}(),F=P.invert,V=P.domain,$=E(".%L"),ce=E(":%S"),_e=E("%I:%M"),Pe=E("%I %p"),De=E("%a %d"),Ne=E("%b %d"),wt=E("%B"),Wt=E("%Y");function nn(Ot){return(x(Ot)+e(t)}function TZ(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function DZ(){return!this.__axis}function ab(e,t){var n=[],r=null,o=null,c=6,p=6,y=3,x=typeof window<"u"&&window.devicePixelRatio>1?0:.5,E=1===e||4===e?-1:1,P=4===e||2===e?"x":"y",F=1===e||3===e?CZ:MZ;function V($){var ce=r??(t.ticks?t.ticks.apply(t,n):t.domain()),_e=o??(t.tickFormat?t.tickFormat.apply(t,n):bZ),Pe=Math.max(c,0)+y,De=t.range(),Ne=+De[0]+x,wt=+De[De.length-1]+x,Wt=(t.bandwidth?TZ:EZ)(t.copy(),x),nn=$.selection?$.selection():$,Ot=nn.selectAll(".domain").data([null]),Gn=nn.selectAll(".tick").data(ce,t).order(),Fi=Gn.exit(),ha=Gn.enter().append("g").attr("class","tick"),Pa=Gn.select("line"),od=Gn.select("text");Ot=Ot.merge(Ot.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Gn=Gn.merge(ha),Pa=Pa.merge(ha.append("line").attr("stroke","currentColor").attr(P+"2",E*c)),od=od.merge(ha.append("text").attr("fill","currentColor").attr(P,E*Pe).attr("dy",1===e?"0em":3===e?"0.71em":"0.32em")),$!==nn&&(Ot=Ot.transition($),Gn=Gn.transition($),Pa=Pa.transition($),od=od.transition($),Fi=Fi.transition($).attr("opacity",1e-6).attr("transform",function(Zl){return isFinite(Zl=Wt(Zl))?F(Zl+x):this.getAttribute("transform")}),ha.attr("opacity",1e-6).attr("transform",function(Zl){var Cf=this.parentNode.__axis;return F((Cf&&isFinite(Cf=Cf(Zl))?Cf:Wt(Zl))+x)})),Fi.remove(),Ot.attr("d",4===e||2===e?p?"M"+E*p+","+Ne+"H"+x+"V"+wt+"H"+E*p:"M"+x+","+Ne+"V"+wt:p?"M"+Ne+","+E*p+"V"+x+"H"+wt+"V"+E*p:"M"+Ne+","+x+"H"+wt),Gn.attr("opacity",1).attr("transform",function(Zl){return F(Wt(Zl)+x)}),Pa.attr(P+"2",E*c),od.attr(P,E*Pe).text(_e),nn.filter(DZ).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===e?"start":4===e?"end":"middle"),nn.each(function(){this.__axis=Wt})}return V.scale=function($){return arguments.length?(t=$,V):t},V.ticks=function(){return n=Array.from(arguments),V},V.tickArguments=function($){return arguments.length?(n=null==$?[]:Array.from($),V):n.slice()},V.tickValues=function($){return arguments.length?(r=null==$?null:Array.from($),V):r&&r.slice()},V.tickFormat=function($){return arguments.length?(o=$,V):o},V.tickSize=function($){return arguments.length?(c=p=+$,V):c},V.tickSizeInner=function($){return arguments.length?(c=+$,V):c},V.tickSizeOuter=function($){return arguments.length?(p=+$,V):p},V.tickPadding=function($){return arguments.length?(y=+$,V):y},V.offset=function($){return arguments.length?(x=+$,V):x},V}function bL(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}const{isArray:SZ}=Array;let HT=(()=>{class e{constructor(n){this.sanitizer=n,this.marker="Media",this.breathing=!1,this.outline=!0}ngOnInit(){}ngOnChanges(){"Media"!==this.marker&&(this.type=this.marker),this.update()}static getCodeForType(n,r,o=!1,c=!0){let p={wikipedia:'d="M12.081 12.932C11.301 14.543 10.232 16.724 9.702 17.708C9.189 18.604 8.762 18.484 8.424 17.732C7.252 14.962 4.844 10.107 3.712 7.38499C3.503 6.88299 3.345 6.56199 3.196 6.43499C3.045 6.30999 2.734 6.23499 2.26 6.20799C2.086 6.18899 2 6.14699 2 6.07699V5.69799L2.043 5.65999C2.814 5.65599 6.546 5.65999 6.546 5.65999L6.588 5.69799V6.05999C6.588 6.15999 6.525 6.20699 6.4 6.20699L5.93 6.23099C5.527 6.25699 5.325 6.36799 5.325 6.59599C5.325 6.70799 5.369 6.87099 5.464 7.09699C6.366 9.30299 9.481 15.869 9.481 15.869L9.595 15.908L11.605 11.896L11.203 11.006L9.82 8.28499C9.82 8.28499 9.555 7.73999 9.463 7.55799C8.856 6.35499 8.87 6.29299 8.257 6.21099C8.084 6.19099 7.996 6.16899 7.996 6.08599V5.69599L8.046 5.65899H11.624L11.719 5.68899V6.06499C11.719 6.15299 11.656 6.18999 11.53 6.18999L11.273 6.22899C10.613 6.27999 10.722 6.54699 11.16 7.41499L12.479 10.127L13.944 7.20499C14.188 6.67199 14.138 6.53699 14.037 6.41599C13.979 6.34599 13.782 6.23099 13.36 6.21599L13.192 6.19799C13.1479 6.19805 13.1052 6.18286 13.071 6.15499C13.0534 6.14334 13.039 6.12741 13.0292 6.1087C13.0194 6.08999 13.0145 6.0691 13.015 6.04799V5.69099L13.066 5.65399C14.106 5.64699 16.437 5.65399 16.437 5.65399L16.487 5.69099V6.05499C16.487 6.15599 16.437 6.20299 16.326 6.20299C15.787 6.22699 15.674 6.28199 15.472 6.56899C15.372 6.72299 15.159 7.05899 14.934 7.43399L13.015 10.997L12.961 11.109L15.289 15.872L15.431 15.913L19.096 7.20899C19.225 6.85699 19.203 6.60699 19.043 6.46299C18.878 6.31899 18.754 6.23499 18.327 6.21699L17.977 6.20299C17.9318 6.20459 17.8873 6.19162 17.85 6.16599C17.8328 6.15527 17.8184 6.14061 17.8079 6.12322C17.7975 6.10583 17.7914 6.08622 17.79 6.06599V5.70499L17.839 5.66699H21.976L22.01 5.70499V6.06899C22.01 6.16899 21.948 6.21899 21.836 6.21899C21.295 6.24299 20.896 6.36899 20.633 6.56999C20.37 6.78299 20.168 7.08399 20.019 7.45999C20.019 7.45999 16.648 15.18 15.495 17.749C15.057 18.589 14.617 18.514 14.242 17.723C13.765 16.746 12.764 14.567 12.036 12.962L12.081 12.932Z"',audio:'fill-rule="evenodd" clip-rule="evenodd" d="M20 10.2928V11.9998C21.103 11.9998 22 12.8968 22 13.9998V17.9998C22 19.1028 21.103 19.9998 20 19.9998H18V10.2928C18 6.92082 15.392 4.09882 12.184 4.00282C11.3804 3.97674 10.5798 4.11306 9.83014 4.40362C9.08047 4.69417 8.39712 5.133 7.821 5.69382C7.24245 6.25141 6.78282 6.92041 6.46985 7.66047C6.15688 8.40053 5.99705 9.19631 6 9.99982V19.9998H4C2.897 19.9998 2 19.1028 2 17.9998V13.9998C2 12.8968 2.897 11.9998 4 11.9998V9.99982C3.99623 8.92846 4.2095 7.86743 4.62697 6.88074C5.04444 5.89405 5.65744 5.00214 6.429 4.25882C7.994 2.73882 10.041 1.95182 12.245 2.00282C16.521 2.13182 20 5.85082 20 10.2928ZM9 12H7V20H9V12ZM17 12H15V20H17V12Z"',image:'d="M5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V5C21 4.46957 20.7893 3.96086 20.4142 3.58579C20.0391 3.21071 19.5304 3 19 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21ZM8 14L10.363 16.363L14 11L19 18H5L8 14Z"',instagram:'fill-rule="evenodd" clip-rule="evenodd" d="M20.5271 6.08896C20.7942 6.79773 20.936 7.54758 20.9461 8.30496C21.0018 9.25754 21.0021 9.56909 21.0041 11.9803L21.0041 12.014C21.0041 14.457 20.9911 14.762 20.9481 15.724C20.9331 16.473 20.7921 17.211 20.5291 17.911C20.2972 18.5086 19.9433 19.0515 19.4899 19.5048C19.0366 19.9581 18.4938 20.312 17.8961 20.544C17.1965 20.8066 16.4572 20.9482 15.7101 20.963C14.7551 21.019 14.4421 21.019 12.0001 21.019C9.55809 21.019 9.25309 21.006 8.29009 20.963C7.54147 20.9383 6.80253 20.7862 6.10509 20.513C5.50716 20.2815 4.96407 19.9279 4.51053 19.4747C4.05699 19.0215 3.70297 18.4787 3.47109 17.881C3.20809 17.18 3.06709 16.442 3.05209 15.694C2.99609 14.738 2.99609 14.426 2.99609 11.984C2.99609 9.54196 3.00909 9.23696 3.05209 8.27396C3.06622 7.52707 3.20792 6.78809 3.47109 6.08896C3.70258 5.49102 4.05634 4.94798 4.50973 4.49459C4.96311 4.0412 5.50615 3.68745 6.10409 3.45596C6.80344 3.19343 7.54225 3.05141 8.28909 3.03596C9.24409 2.98096 9.55709 2.98096 11.9991 2.98096C14.4411 2.98096 14.7461 2.99296 15.7081 3.03596C16.4553 3.0513 17.1944 3.19331 17.8941 3.45596C18.4919 3.68761 19.0349 4.04142 19.4883 4.49479C19.9416 4.94816 20.2954 5.49111 20.5271 6.08896ZM7.37009 11.979C7.37009 14.533 9.43909 16.602 11.9931 16.602C13.2192 16.602 14.3951 16.1149 15.262 15.2479C16.129 14.3809 16.6161 13.2051 16.6161 11.979C16.6161 10.7529 16.129 9.57698 15.262 8.71C14.3951 7.84302 13.2192 7.35596 11.9931 7.35596C9.43909 7.35596 7.37009 9.42496 7.37009 11.979ZM15.7221 7.18496C15.7221 7.78096 16.2031 8.26296 16.8001 8.26296C17.3951 8.26296 17.8771 7.78096 17.8771 7.18496C17.8771 7.04346 17.8492 6.90334 17.7951 6.77262C17.7409 6.64189 17.6616 6.5231 17.5615 6.42305C17.4614 6.32299 17.3427 6.24363 17.2119 6.18948C17.0812 6.13533 16.9411 6.10746 16.7996 6.10746C16.6581 6.10746 16.518 6.13533 16.3873 6.18948C16.2565 6.24363 16.1377 6.32299 16.0377 6.42305C15.9376 6.5231 15.8583 6.64189 15.8041 6.77262C15.75 6.90334 15.7221 7.04346 15.7221 7.18496ZM14.9962 11.9791C14.9962 13.6376 13.6517 14.9821 11.9932 14.9821C10.3347 14.9821 8.99023 13.6376 8.99023 11.9791C8.99023 10.3206 10.3347 8.97607 11.9932 8.97607C13.6517 8.97607 14.9962 10.3206 14.9962 11.9791Z"',twitter:'d="M19.633 7.99704C19.646 8.17204 19.646 8.34604 19.646 8.52004C19.646 13.845 15.593 19.981 8.186 19.981C5.904 19.981 3.784 19.32 2 18.172C2.324 18.209 2.636 18.222 2.973 18.222C4.78599 18.2264 6.54765 17.6202 7.974 16.501C7.13342 16.4858 6.31858 16.2085 5.64324 15.7078C4.9679 15.2071 4.46578 14.5079 4.207 13.708C4.456 13.745 4.706 13.77 4.968 13.77C5.329 13.77 5.692 13.72 6.029 13.633C5.11676 13.4489 4.29647 12.9544 3.70762 12.2337C3.11876 11.5131 2.79769 10.6107 2.799 9.68004V9.63004C3.336 9.92904 3.959 10.116 4.619 10.141C4.06609 9.77363 3.61272 9.27507 3.29934 8.68983C2.98596 8.1046 2.82231 7.4509 2.823 6.78704C2.823 6.03904 3.022 5.35304 3.371 4.75504C4.38314 6.00006 5.6455 7.0186 7.07634 7.7447C8.50717 8.4708 10.0746 8.88826 11.677 8.97004C11.615 8.67004 11.577 8.35904 11.577 8.04704C11.5767 7.518 11.6807 6.9941 11.8831 6.50528C12.0854 6.01647 12.3821 5.57232 12.7562 5.19823C13.1303 4.82414 13.5744 4.52745 14.0632 4.32512C14.5521 4.12279 15.076 4.01878 15.605 4.01904C16.765 4.01904 17.812 4.50504 18.548 5.29104C19.4498 5.11666 20.3145 4.78747 21.104 4.31804C20.8034 5.24886 20.1738 6.03815 19.333 6.53804C20.1328 6.44682 20.9144 6.2365 21.652 5.91404C21.1011 6.71714 20.4185 7.42139 19.633 7.99704Z"',video:'d="M21.5914 7.20301C21.4775 6.78041 21.2549 6.39501 20.9457 6.08518C20.6366 5.77534 20.2517 5.55187 19.8294 5.43701C18.2634 5.00701 11.9984 5.00001 11.9984 5.00001C11.9984 5.00001 5.73438 4.99301 4.16738 5.40401C3.7453 5.52415 3.3612 5.75078 3.05194 6.06214C2.74269 6.3735 2.51866 6.75913 2.40138 7.18201C1.98838 8.74801 1.98438 11.996 1.98438 11.996C1.98438 11.996 1.98038 15.26 2.39038 16.81C2.62038 17.667 3.29538 18.344 4.15338 18.575C5.73538 19.005 11.9834 19.012 11.9834 19.012C11.9834 19.012 18.2484 19.019 19.8144 18.609C20.2369 18.4943 20.6221 18.2714 20.932 17.9622C21.2419 17.653 21.4658 17.2682 21.5814 16.846C21.9954 15.281 21.9984 12.034 21.9984 12.034C21.9984 12.034 22.0184 8.76901 21.5914 7.20301ZM9.99438 15.005L9.99938 9.00501L15.2064 12.01L9.99438 15.005Z"',news:'d="M21.691 16.9995C21.691 17.2647 21.5791 17.5191 21.3801 17.7066C21.181 17.8942 20.9111 17.9995 20.6296 17.9995C20.3481 17.9995 20.0781 17.8942 19.8791 17.7066C19.68 17.5191 19.5682 17.2647 19.5682 16.9995V4.99951C19.5682 4.7343 19.4564 4.47994 19.2573 4.29241C19.0583 4.10487 18.7883 3.99951 18.5068 3.99951H3.64733C3.36583 3.99951 3.09586 4.10487 2.89681 4.29241C2.69776 4.47994 2.58594 4.7343 2.58594 4.99951V17.9995C2.58594 18.5299 2.80959 19.0387 3.20769 19.4137C3.60578 19.7888 4.14572 19.9995 4.70872 19.9995H20.6296C22.3851 19.9995 23.8138 18.6535 23.8138 16.9995V6.99951H21.691V16.9995ZM13.1998 6.99951H16.384V8.99951H13.1998V6.99951ZM13.1998 10.9995H16.384V12.9995H13.1998V10.9995ZM5.77011 6.99951H11.0771V12.9995H5.77011V6.99951ZM5.77011 16.9995V14.9995H16.384V16.9995H5.77011Z"',Marker:'fill-rule="evenodd" clip-rule="evenodd" d="M18 12.7052C18 16.0373 15.3137 18.7385 12 18.7385C8.68629 18.7385 6 16.0373 6 12.7052C6 9.37309 8.68629 6.67188 12 6.67188C15.3137 6.67188 18 9.37309 18 12.7052ZM17 12.7052C17 15.482 14.7614 17.733 12 17.733C9.23858 17.733 7 15.482 7 12.7052C7 9.92844 9.23858 7.67743 12 7.67743C14.7614 7.67743 17 9.92844 17 12.7052ZM12 15.7219C13.6569 15.7219 15 14.3713 15 12.7052C15 11.0391 13.6569 9.68854 12 9.68854C10.3431 9.68854 9 11.0391 9 12.7052C9 14.3713 10.3431 15.7219 12 15.7219Z"',Map:'d="M20.4102 5.89L16.4102 4.09H15.5902L12.0002 5.7L8.41024 4.09H8.36024L8.24024 4H7.64024L3.64024 5.8C3.44073 5.87645 3.27095 6.01479 3.15578 6.19474C3.0406 6.3747 2.9861 6.58681 3.00024 6.8V19C3.00052 19.1673 3.04278 19.3319 3.12314 19.4786C3.20351 19.6254 3.31941 19.7496 3.46024 19.84C3.6212 19.944 3.80863 19.9995 4.00024 20C4.14174 19.9993 4.28148 19.9687 4.41024 19.91L8.00024 18.3L11.5902 19.91H11.6402C11.7529 19.9627 11.8758 19.99 12.0002 19.99C12.1247 19.99 12.2475 19.9627 12.3602 19.91H12.4102L16.0002 18.3L19.5902 19.91C19.719 19.9687 19.8587 19.9993 20.0002 20C20.1919 19.9995 20.3793 19.944 20.5402 19.84C20.6811 19.7496 20.797 19.6254 20.8773 19.4786C20.9577 19.3319 21 19.1673 21.0002 19V6.8C20.9998 6.60764 20.944 6.41948 20.8393 6.25807C20.7347 6.09667 20.5857 5.96887 20.4102 5.89ZM9.00024 6.55L11.0002 7.44V17.44L9.00024 16.55V6.55ZM19.0002 17.45L17.0002 16.56V6.56L19.0002 7.45V17.45Z"',None:""}[n];return o?`\n \n \n \n \n \n \n \n \n \n \n `:c?`\n \n \n `:`\n \n \n `}update(){this.svg=this.sanitizer.bypassSecurityTrustHtml(e.getCodeForType(this.type,this.color,this.breathing,this.outline))}static#e=this.\u0275fac=function(r){return new(r||e)(nt(i_))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-media-icon"]],inputs:{marker:"marker",type:"type",color:"color",breathing:"breathing",outline:"outline"},features:[$n],decls:2,vars:1,consts:[["width","48","height","48","viewBox","-12 -12 48 48","fill","none","xmlns","http://www.w3.org/2000/svg",3,"innerHtml"]],template:function(r,o){1&r&&(pi(),We(0,"svg",0),_n(1,"\n>\n"),et()),2&r&&Rt("innerHtml",o.svg,ta)},styles:["[_nghost-%COMP%]{display:inline-block;width:24px;height:24px;overflow:visible}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{margin-top:-12px;margin-left:-12px}"]})}return e})(),Sv=(()=>{class e{constructor(n){this.el=n}ngAfterViewInit(){this.el.nativeElement.style.direction=e.getDirection(this.rtlDetect)}static getDirection(n){return n&&n.match(/^[\s#_*]*[\u0590-\u05FF]/)?"rtl":"ltr"}static#e=this.\u0275fac=function(r){return new(r||e)(nt(b))};static#t=this.\u0275dir=Ln({type:e,selectors:[["","rtlDetect",""]],inputs:{rtlDetect:"rtlDetect"}})}return e})();const kZ=["timeLine"];let CL=(()=>{class e{constructor(n,r){this.el=n,this.layout=r,this.id="",this.minDate=new Date(1820,0,1),this.maxDate=new Date(2120,0,1),this.showHovers=!0,this.hoverable=!0,this.selected=new wi,this.WIDTH=1e3,this.TEXT_HEIGHT=16,this.TICK_HEIGHT=56,this.TICK_HEIGHT_INNER=16,this.CIRCLE_RADIUS_CLUSTERED=12,this.CIRCLE_RADIUS=16,this.ICON_PADDING=4,this.HOVER_HEIGHT=34,this.HEIGHT=this.TEXT_HEIGHT+this.TICK_HEIGHT/2+this.CIRCLE_RADIUS+this.HOVER_HEIGHT,this.RANDOM_CENTERS={},this.tickIndicator=0,this.firstInit=!1,this.zoomK=1,this.zooming=!1,this.controlled=!1,this._changed=new w_(1),this._changeCandidates=new Qt,this._externalChanges=new Qt,this.currentHover=null,this.resizeObserver=new ResizeObserver(()=>{this._changed.next()}),Ba(this._changeCandidates,x_).pipe($r(o=>{this.state.set(o),this.zooming||(this.zooming=!0)}),om(500)).subscribe(()=>{this.zooming=!1}),Ba(this._externalChanges,x_).pipe($r(o=>{this.controlled||(this.controlled=!0),this.parseState(o),this.applyState()}),om(500)).subscribe(()=>{this.controlled=!1}),Sg(()=>{const o=this.state();this.zooming||this._externalChanges.next(o||""),this.chronomap.timelineItems()&&this.updateAxis()})}parseState(n){const r=n.split("/");r.length>=2&&(this.zoomX=new Date(parseFloat(r[0])),this.zoomK=parseFloat(r[1])),4===r.length&&(this.firstTickValue=parseFloat(r[2]),this.tickIndicator=parseInt(r[3],10))}ngOnInit(){this.parseState(this.state()||"")}ngAfterViewInit(){this.resizeObserver.observe(this.el.nativeElement),this._changed.pipe(function OZ(...e){return function AZ(...e){const t=ml(e),n=fd(e,1/0);return e=function PZ(e){return 1===e.length&&SZ(e[0])?e[0]:e}(e),an((r,o)=>{pl(n)(Pr([r,...e],t)).subscribe(o)})}(...e)}(Ps(0))).subscribe(()=>{this.WIDTH=this.el.nativeElement.offsetWidth,this.init()})}ngOnChanges(){this._changed.next()}init(){this.timeline.nativeElement.innerHTML="",this.zoomBehaviour=function kq(){var P,F,V,e=Iq,t=Sq,n=Oq,r=Pq,o=Aq,c=[0,1/0],p=[[-1/0,-1/0],[1/0,1/0]],y=250,x=HH,E=Yk("start","zoom","end"),$=500,ce=150,_e=0,Pe=10;function De(at){at.property("__zoom",UR).on("wheel.zoom",Fi,{passive:!1}).on("mousedown.zoom",ha).on("dblclick.zoom",Pa).filter(o).on("touchstart.zoom",od).on("touchmove.zoom",Zl).on("touchend.zoom touchcancel.zoom",Cf).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function Ne(at,Tn){return(Tn=Math.max(c[0],Math.min(c[1],Tn)))===at.k?at:new nd(Tn,at.x,at.y)}function wt(at,Tn,jt){var An=Tn[0]-jt[0]*at.k,ar=Tn[1]-jt[1]*at.k;return An===at.x&&ar===at.y?at:new nd(at.k,An,ar)}function Wt(at){return[(+at[0][0]+ +at[1][0])/2,(+at[0][1]+ +at[1][1])/2]}function nn(at,Tn,jt,An){at.on("start.zoom",function(){Ot(this,arguments).event(An).start()}).on("interrupt.zoom end.zoom",function(){Ot(this,arguments).event(An).end()}).tween("zoom",function(){var ar=this,yr=arguments,Cr=Ot(ar,yr).event(An),Mi=t.apply(ar,yr),ro=null==jt?Wt(Mi):"function"==typeof jt?jt.apply(ar,yr):jt,Xl=Math.max(Mi[1][0]-Mi[0][0],Mi[1][1]-Mi[0][1]),Xo=ar.__zoom,al="function"==typeof Tn?Tn.apply(ar,yr):Tn,kc=x(Xo.invert(ro).concat(Xl/Xo.k),al.invert(ro).concat(Xl/al.k));return function(ll){if(1===ll)ll=al;else{var Rc=kc(ll),gn=Xl/Rc[2];ll=new nd(gn,ro[0]-Rc[0]*gn,ro[1]-Rc[1]*gn)}Cr.zoom(null,ll)}})}function Ot(at,Tn,jt){return!jt&&at.__zooming||new Gn(at,Tn)}function Gn(at,Tn){this.that=at,this.args=Tn,this.active=0,this.sourceEvent=null,this.extent=t.apply(at,Tn),this.taps=0}function Fi(at,...Tn){if(e.apply(this,arguments)){var jt=Ot(this,Tn).event(at),An=this.__zoom,ar=Math.max(c[0],Math.min(c[1],An.k*Math.pow(2,r.apply(this,arguments)))),yr=lm(at);if(jt.wheel)(jt.mouse[0][0]!==yr[0]||jt.mouse[0][1]!==yr[1])&&(jt.mouse[1]=An.invert(jt.mouse[0]=yr)),clearTimeout(jt.wheel);else{if(An.k===ar)return;jt.mouse=[yr,An.invert(yr)],Hw(this),jt.start()}Cv(at),jt.wheel=setTimeout(function Cr(){jt.wheel=null,jt.end()},ce),jt.zoom("mouse",n(wt(Ne(An,ar),jt.mouse[0],jt.mouse[1]),jt.extent,p))}}function ha(at,...Tn){if(!V&&e.apply(this,arguments)){var jt=at.currentTarget,An=Ot(this,Tn,!0).event(at),ar=Qh(at.view).on("mousemove.zoom",function ro(Xo){if(Cv(Xo),!An.moved){var al=Xo.clientX-Cr,kc=Xo.clientY-Mi;An.moved=al*al+kc*kc>_e}An.event(Xo).zoom("mouse",n(wt(An.that.__zoom,An.mouse[0]=lm(Xo,jt),An.mouse[1]),An.extent,p))},!0).on("mouseup.zoom",function Xl(Xo){ar.on("mousemove.zoom mouseup.zoom",null),function VH(e,t){var n=e.document.documentElement,r=Qh(e).on("dragstart.drag",null);t&&(r.on("click.drag",dT,hT),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(Xo.view,An.moved),Cv(Xo),An.event(Xo).end()},!0),yr=lm(at,jt),Cr=at.clientX,Mi=at.clientY;(function BH(e){var t=e.document.documentElement,n=Qh(e).on("dragstart.drag",dT,hT);"onselectstart"in t?n.on("selectstart.drag",dT,hT):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")})(at.view),ET(at),An.mouse=[yr,this.__zoom.invert(yr)],Hw(this),An.start()}}function Pa(at,...Tn){if(e.apply(this,arguments)){var jt=this.__zoom,An=lm(at.changedTouches?at.changedTouches[0]:at,this),ar=jt.invert(An),Cr=n(wt(Ne(jt,jt.k*(at.shiftKey?.5:2)),An,ar),t.apply(this,Tn),p);Cv(at),y>0?Qh(this).transition().duration(y).call(nn,Cr,An,at):Qh(this).call(De.transform,Cr,An,at)}}function od(at,...Tn){if(e.apply(this,arguments)){var yr,Cr,Mi,ro,jt=at.touches,An=jt.length,ar=Ot(this,Tn,at.changedTouches.length===An).event(at);for(ET(at),Cr=0;Crthis.onZoom(n)),this.svg=Qh(this.timeline.nativeElement).append("svg").attr("width","100%").attr("height","100%").call(this.zoomBehaviour),this.svg.append("rect").attr("transform",`translate(0, ${this.HEIGHT-this.TEXT_HEIGHT})`).attr("width",this.WIDTH).attr("height",this.TEXT_HEIGHT).attr("fill","#fff"),this.hovers=Qh(this.timeline.nativeElement).append("div").attr("class","hovers"),this.g=this.svg.append("g").attr("transform",`translate(0, ${this.HEIGHT-this.TEXT_HEIGHT})`).attr("class","axis axis--x"),this.points=this.svg.append("g").attr("class","points"+(this.hoverable?" hoverable":"")),this.svg.attr("viewBox",`0 0 ${this.WIDTH} ${this.HEIGHT}`),this.x=function wZ(){return _Z.apply(xL(Xq,Yq,mm,KR,nb,tb,ZR,qR,Mv,VT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([this.minDate,this.maxDate]).range([0,this.WIDTH]),this.xt=this.x,this.xAxis=function IZ(e){return ab(1,e)}(this.x).ticks(this.layout.mobile()?12:40).tickSizeInner(this.TICK_HEIGHT).tickFormat((n,r)=>this.tickFormat(n,r)),this.updateAxis(),this.applyState()}applyState(){if(this.zoomX&&this.svg&&this.zoomK){const n=this.x(this.zoomX)*this.zoomK;this.svg.call(this.zoomBehaviour.transform,bv.translate(this.WIDTH/2-n,0).scale(this.zoomK))}}zoomBy(n){this.svg.transition().duration(300).ease(bL).call(this.zoomBehaviour.scaleBy,n)}scrollTo(n,r){const o=this.x(n)*this.zoomK;this.svg.transition().duration(1e3).ease(bL).call(this.zoomBehaviour.transform,bv.translate(this.WIDTH/2-o,56).scale(this.zoomK)),r.niceTimestamp=this.tickFormat(n,-1)}clusterPoints(n){const r=(y,x)=>{if(y.length){const E=y.reduce((_e,Pe)=>Pe.x+_e,0)/y.length,P=y[0].timestamp,F=y[y.length-1].timestamp,V=this.x(F)-this.x(P),$=new Date((P.valueOf()+F.valueOf())/2);let ce=1e4;V>0&&(ce=this.WIDTH/2/V,ce<1&&(ce=1)),y.forEach((_e,Pe)=>{_e.x=E,_e.centerTimestamp=$,_e.k=ce,_e.clustered=y.length,_e.indexes=y.map(De=>De.index),Pe!==y.length-1&&(this.RANDOM_CENTERS[Pe]||(this.RANDOM_CENTERS[Pe]={cx:3*Math.random(),cy:3*Math.random()}),Object.assign(_e,this.RANDOM_CENTERS[Pe]))}),x.push(...y)}return[]};n.forEach(y=>{y.x=this.xt(y.timestamp),y.cx=0,y.cy=0});const o=[];let c=[],p=null;for(const y of n){const x=y.x;null===p||x-p<2*this.CIRCLE_RADIUS||(c=r(c,o)),c.push(y),p=x}return r(c,o),o}onPointClick(n){n.clustered>1?(this.zoomK=n.k,this.scrollTo(n.centerTimestamp,n)):(this.scrollTo(n.timestamp,n),this.selected.next(n))}iconDataUrl(n){let r=HT.getCodeForType(n.type,this.chronomap.primaryColor());return r=`${r}`,r="data:image/svg+xml;base64,"+btoa(r),r}updateHovers(n=-1){-1!==n&&(this.currentHover=n),this.showHovers&&this.hovers.selectAll(".hover").style("display",r=>r.index===this.currentHover?"flex":"none").style("transform",r=>`translate(${r.x}px, 0)`),this.updatePoints()}updatePoints(){const n=this.points.selectAll(".point");n.attr("transform",r=>`translate(${r.x}, ${this.CIRCLE_RADIUS+this.HOVER_HEIGHT})`),n.select("circle.point-bg").attr("cx",r=>r.cx).attr("cy",r=>r.cy).attr("r",r=>r.indexes.indexOf(this.currentHover)<0&&r.clustered>1?this.CIRCLE_RADIUS_CLUSTERED-1:this.CIRCLE_RADIUS-1).style("stroke",r=>r.indexes.indexOf(this.currentHover)>=0||r.clustered>1?this.chronomap.primaryColor()+"40":"none").style("fill",r=>r.indexes.indexOf(this.currentHover)>=0||r.clustered>1?"white":"none"),n.select("image").style("display",r=>r.clustered>1?"none":null),n.select(".cluster-size").text(r=>r.clustered).style("display",r=>1===r.clustered?"none":null)}updateAxis(){const n=this.chronomap.timelineItems();this.g.call(this.xAxis.scale(this.xt)).call(y=>y.select(".domain").remove()).call(y=>y.selectAll(".tick line").attr("y2",(x,E)=>(x=x.getTime(),this.updateIndicator(x,E),E%2===this.tickIndicator?-this.TICK_HEIGHT:-this.TICK_HEIGHT_INNER))),this.g.selectAll("text").style("text-anchor","middle").attr("dy",3+this.TEXT_HEIGHT+this.TICK_HEIGHT);const r=this.clusterPoints(n);let o=this.points.selectAll(".point").data(r,y=>y.id);const c=o.enter().append("g").attr("class",y=>"point"+(1===y.clustered?" single":"")).call(y=>{y.on("click",(x,E)=>{(this.hoverable||E.clustered>1)&&(this.onPointClick(E),x.stopPropagation())}).on("mouseenter",(x,E)=>{(this.hoverable||E.clustered>1)&&(null!==this.currentHover&&this.updateHovers(null),this.updateHovers(E.index))}).on("mouseleave",(x,E)=>{(this.hoverable||E.clustered>1)&&this.currentHover&&E.indexes.indexOf(this.currentHover)>=0&&this.updateHovers(null)})});c.append("circle").attr("class","point-inactive").attr("r",y=>y.clustered>1?0:3).style("fill",this.chronomap.primaryColor()),c.append("circle").attr("class",y=>"point-bg"+(1===y.clustered?" single":"")).attr("r",y=>y.clustered>1?this.CIRCLE_RADIUS_CLUSTERED-1:this.CIRCLE_RADIUS-1).style("stroke",this.chronomap.primaryColor()+"40").style("fill","#fff");let p=this.hovers.selectAll(".hover").data(r,y=>y.id);p.enter().append("div").attr("class","hover").style("display","none").append("span").style("border-color",this.chronomap.primaryColor()).style("color",this.chronomap.primaryColor()).style("background",`linear-gradient(90deg, ${this.chronomap.primaryColor()}40, ${this.chronomap.primaryColor()}40), #fff`).style("direction",y=>Sv.getDirection(y.title)).text(y=>y.title),p.exit().remove(),c.append("image").attr("x",-(this.CIRCLE_RADIUS-this.ICON_PADDING)).attr("y",-(this.CIRCLE_RADIUS-this.ICON_PADDING)).attr("width",2*(this.CIRCLE_RADIUS-this.ICON_PADDING)).attr("height",2*(this.CIRCLE_RADIUS-this.ICON_PADDING)).attr("xlink:href",y=>this.iconDataUrl(y)),c.append("text").attr("class","cluster-size").style("fill",this.chronomap.primaryColor()).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("dy",1),o.exit().remove(),this.updatePoints(),this.updateHovers()}onZoom(n){this.xt=n.transform.rescaleX(this.x),this.zoomX=this.xt.invert(this.WIDTH/2),this.zoomK=n.transform.k,this.updateAxis(),this.controlled||this._changeCandidates.next(`${this.zoomX.valueOf()}/${this.zoomK}/${this.firstTickValue}/${this.tickIndicator}`)}updateIndicator(n,r){0===r&&n!==this.firstTickValue&&(this.firstTickValue=n,this.tickIndicator=1-this.tickIndicator)}tickFormat(n,r){if(-1!==r&&(this.updateIndicator(n.getTime(),r),r%2!==this.tickIndicator))return"";let o=this.xt.invert(this.WIDTH).getTime()-this.xt.invert(0).getTime(),c="";const y=0===n.getMinutes()&&0===n.getSeconds()&&0===n.getMilliseconds()&&0===n.getHours(),x=y&&1===n.getDate()&&0===n.getMonth();return o=o/1e3/60/60,c=o<5?y?"%Y %b %-d %H:%M:%S":"%H:%M:%S":o<168?y?"%Y %b %-d":"%-I%p":o<3600?x?"%Y %b %-d":"%b %-d":o<43830?x?"%b %Y":"%b":"%Y",`${VT(c)(n)}`}static#e=this.\u0275fac=function(r){return new(r||e)(nt(b),nt(kw))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-time-line"]],viewQuery:function(r,o){if(1&r&&Lo(kZ,5),2&r){let c;wo(c=bo())&&(o.timeline=c.first)}},hostVars:2,hostBindings:function(r,o){2&r&&vo("visible",!o.hovered||o.hovered())},inputs:{id:"id",minDate:"minDate",maxDate:"maxDate",chronomap:"chronomap",state:"state",showHovers:"showHovers",hoverable:"hoverable",hovered:"hovered"},outputs:{selected:"selected"},features:[$n],decls:10,vars:3,consts:[[1,"timeline"],["timeLine",""],[1,"zoom-controls"],[3,"click"],["width","25","height","24","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","6.31055","y","11","width","12.4138","height","2","rx","1"],["x","11.4824","y","18","width","12","height","2.06897","rx","1","transform","rotate(-90 11.4824 18)"],["d","M6.31055 12C6.31055 11.4477 6.75826 11 7.31055 11H17.7243C18.2766 11 18.7243 11.4477 18.7243 12C18.7243 12.5523 18.2766 13 17.7243 13H7.31055C6.75826 13 6.31055 12.5523 6.31055 12Z"]],template:function(r,o){1&r&&(Kt(0,"div",0,1),We(2,"div",2)(3,"div",3),wn("click",function(p){return o.zoomBy(2),p.stopPropagation()}),pi(),We(4,"svg",4),Kt(5,"rect",5)(6,"rect",6),et()(),Er(),We(7,"div",3),wn("click",function(p){return o.zoomBy(.5),p.stopPropagation()}),pi(),We(8,"svg",4),Kt(9,"path",7),et()()()),2&r&&(Ie(5),bi("fill",o.chronomap.primaryColor()),Ie(1),bi("fill",o.chronomap.primaryColor()),Ie(3),bi("fill",o.chronomap.primaryColor()))},styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#FFF 86%);display:flex;flex-flow:row;align-items:center;position:relative;padding-bottom:4px}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column;justify-content:flex-end;position:relative}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .tick line{stroke:#e0e0e0}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .tick text{fill:#828282;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:700;font-size:10;stroke:transparent}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .point text{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:800;font-size:12px}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .point:not(.single){cursor:pointer}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .points.hoverable>.point{cursor:pointer}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .hovers .hover{position:absolute;top:0;left:0;display:flex;flex-flow:column;align-items:center;overflow:visible;width:0}[_nghost-%COMP%] .timeline[_ngcontent-%COMP%] .hovers .hover span{white-space:nowrap;border:1px solid;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;font-size:16px;line-height:22px;text-transform:uppercase;padding:4px 8px;border-radius:4px}[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%]{position:absolute;bottom:24px;right:8px;display:flex;flex-flow:column;align-items:center}[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:30px;height:30px;border:1px solid #E0E0E0;background:white;cursor:pointer;display:flex;flex-flow:column;align-items:center;justify-content:center}[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-radius:4px 4px 0 0}[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{border-radius:0 0 4px 4px;margin-top:-1px}@media screen and (max-width: 600px){[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%], [_nghost-%COMP%] svg .tick text, [_nghost-%COMP%] svg .point .point-bg.single, [_nghost-%COMP%] svg .point image, [_nghost-%COMP%] svg .point .cluster-size{opacity:0;transition:opacity .3s ease-in;transition-property:opacity,transform}[_nghost-%COMP%] svg .point .point-inactive{transition:opacity .3s ease-in}.visible[_nghost-%COMP%] .zoom-controls[_ngcontent-%COMP%], .visible[_nghost-%COMP%] svg .tick text, .visible[_nghost-%COMP%] svg .point .point-bg.single, .visible[_nghost-%COMP%] svg .point image, .visible[_nghost-%COMP%] svg .point .cluster-size{opacity:1}.visible[_nghost-%COMP%] svg .point .point-inactive{opacity:0}']})}return e})();const RZ=["arrowContainer"];let LZ=(()=>{class e{constructor(n,r){this.data=n,this.router=r,this.alignment=new wi,this.marked=En,this.hovered=ee(!1),this.authorsMsg=function te(e,t){const n=function qn(e){const t=Object.create(un);t.computation=e;const n=()=>{if(It(t),Vt(t),t.value===Ft)throw t.error;return t.value};return n[W]=t,n}(e);return t?.equal&&(n[W].equal=t.equal),n}(()=>{const o=this.chronomap.timelineItems(),c={},p=[];let y=0;if(o.forEach(E=>{E.authors?.forEach(P=>{c[P.name]=P})}),Object.values(c).forEach(E=>{"Editor"===E.status?p.push(E.name):"Contributor"===E.status&&y++}),p.length>1){const E=p.pop();p[p.length-1]+=` and ${E}`}let x=p.join(", ");return y>0&&(x+=x.length>0?` +${y} more`:`${y} contributor${y>1?"s":""}`),x=`${o.length} perspectives by ${x}`,x}),Sg(()=>{const o=this.chronomap.timelineItems();console.log("items",this.chronomap.title(),o),console.log("timelineState",this.timelineState())})}ngAfterViewInit(){this.alignment.next(this.arrowContainer.nativeElement.getBoundingClientRect().width-26)}get lastModified(){return Ic(this.chronomap.lastModified()).fromNow()}navigate(){this.router.navigate(["/",this.chronomap.directoryId,this.chronomap.slug()])}static#e=this.\u0275fac=function(r){return new(r||e)(nt(Ow),nt(Ia))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-directory-item"]],viewQuery:function(r,o){if(1&r&&Lo(RZ,5),2&r){let c;wo(c=bo())&&(o.arrowContainer=c.first)}},hostBindings:function(r,o){1&r&&wn("mouseenter",function(){return o.hovered.set(!0)})("mouseleave",function(){return o.hovered.set(!1)})("click",function(){return o.navigate()})},inputs:{chronomap:"chronomap",timelineState:"timelineState",minDate:"minDate",maxDate:"maxDate",arrowRight:"arrowRight"},outputs:{alignment:"alignment"},decls:21,vars:23,consts:[[1,"meta"],[3,"src"],[1,"time","layout-mobile"],[1,"titles"],[1,"title"],[1,"arrow-container"],["arrowContainer",""],[1,"arrow"],["xmlns","http://www.w3.org/2000/svg","width","1999","height","9","viewBox","0 0 1999 9","fill","none"],["d","M1998.38 4.94371C1998.58 4.74845 1998.58 4.43187 1998.38 4.2366L1995.2 1.05462C1995 0.859362 1994.69 0.859362 1994.49 1.05462C1994.3 1.24989 1994.3 1.56647 1994.49 1.76173L1997.32 4.59016L1994.49 7.41858C1994.3 7.61385 1994.3 7.93043 1994.49 8.12569C1994.69 8.32095 1995 8.32095 1995.2 8.12569L1998.38 4.94371ZM0.0273438 5.09033L1998.03 5.09016L1998.03 4.09016L0.0273437 4.09033L0.0273438 5.09033Z"],[1,"time","layout-desktop"],[1,"subtitle",3,"innerHTML"],[1,"timerange"],[1,"counts"],[3,"id","state","minDate","maxDate","chronomap","showHovers","hoverable","hovered"]],template:function(r,o){1&r&&(We(0,"div",0),Kt(1,"img",1),We(2,"div",2),_n(3),et(),We(4,"div",3)(5,"div",4)(6,"span"),_n(7),et(),We(8,"div",5,6)(10,"div",7),pi(),We(11,"svg",8),Kt(12,"path",9),et()(),Er(),We(13,"div",10),_n(14),et()()(),Kt(15,"div",11),We(16,"div",12),_n(17),et(),We(18,"div",13),_n(19),et()()(),Kt(20,"app-time-line",14)),2&r&&(Ie(1),Rt("src",o.chronomap.thumbnail(),js),Ie(2),Su("Updated ",o.lastModified,""),Ie(2),pn("color",o.data.directory.secondaryColor()),Ie(2),Ri(o.chronomap.title()),Ie(3),pn("right",o.arrowRight+"px"),Ie(2),bi("fill",o.data.directory.primaryColor()),Ie(2),Su("Updated ",o.lastModified,""),Ie(1),pn("color",o.data.directory.primaryColor()),Rt("innerHTML",o.marked(o.chronomap.subtitle()),ta),Ie(2),hM("(",null==o.chronomap.timelineItems()[0]||null==o.chronomap.timelineItems()[0].post_timestamp?null:o.chronomap.timelineItems()[0].post_timestamp.getFullYear()," - ",null==o.chronomap.timelineItems()[o.chronomap.timelineItems().length-1]||null==o.chronomap.timelineItems()[o.chronomap.timelineItems().length-1].post_timestamp?null:o.chronomap.timelineItems()[o.chronomap.timelineItems().length-1].post_timestamp.getFullYear(),")"),Ie(2),Ri(o.authorsMsg()),Ie(1),Rt("id",o.chronomap.title())("state",o.timelineState)("minDate",o.minDate())("maxDate",o.maxDate())("chronomap",o.chronomap)("showHovers",!1)("hoverable",!1)("hovered",o.hovered))},dependencies:[CL],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;position:relative;cursor:pointer;pointer-events:all}@media only screen and (min-width: 1000px){[_nghost-%COMP%]{height:124px}}[_nghost-%COMP%] .meta[_ngcontent-%COMP%]{display:flex;overflow:hidden;width:100%;position:relative;z-index:1;pointer-events:none}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%]{flex-flow:row nowrap;gap:16px;height:100%;padding-left:40px;padding-right:16px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%]{flex-flow:column nowrap;gap:8px;min-height:233px}}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:12px;font-weight:400;line-height:normal;letter-spacing:.24px}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover;flex:0 0 auto}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:192px;padding-bottom:20px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100px;width:100%}}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;gap:0;width:100%}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{padding-bottom:15px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%]{padding:0 16px 19px;flex:1 1 auto}}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;pointer-events:all}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:-8px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:-1px;margin-bottom:1px}}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal;font-size:18px;font-weight:700;line-height:28px;text-transform:uppercase;white-space:nowrap}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .arrow-container[_ngcontent-%COMP%]{flex:1 1 100%;height:20px;position:relative;overflow:hidden;display:flex;flex-flow:row;align-items:center}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .arrow-container[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;right:800px;transition:right .3s ease-in;top:-1px}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .arrow-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{flex:0 0 auto;position:absolute;right:4px;color:#828282;transition:opacity .3s ease-in;opacity:1}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:15px;letter-spacing:.15px;margin-top:-2px;margin-bottom:1px}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%] *{display:inline;margin:0}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .timerange[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;opacity:0;transition:opacity .3s ease-in;color:#4f4f4f;font-size:13px;font-weight:300;line-height:23px;letter-spacing:.13px}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] .titles[_ngcontent-%COMP%] .counts[_ngcontent-%COMP%]{margin-top:auto;color:#4f4f4f;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:13px;font-weight:300;line-height:20px;letter-spacing:.13px}@media only screen and (min-width: 1000px){[_nghost-%COMP%]:hover .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%] > .arrow-container[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{right:0!important}[_nghost-%COMP%]:hover .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%] > .arrow-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%]:hover .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .timerange[_ngcontent-%COMP%]{opacity:1}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%] > .arrow-container[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{right:0!important}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%] > .arrow-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{opacity:1;color:#fff;position:relative;top:-32px}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] > .titles[_ngcontent-%COMP%] > .timerange[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%] .meta[_ngcontent-%COMP%] > .time[_ngcontent-%COMP%]{position:absolute;top:82px;right:4px;color:#fff;text-shadow:0px 0px 4px rgba(0,0,0,.75)}}[_nghost-%COMP%] app-time-line[_ngcontent-%COMP%]{position:absolute;left:0;width:100%}@media only screen and (min-width: 1000px){[_nghost-%COMP%] app-time-line[_ngcontent-%COMP%]{bottom:0}}@media only screen and (max-width: 999px){[_nghost-%COMP%] app-time-line[_ngcontent-%COMP%]{bottom:4px}}']})}return e})();const FZ=["title"],NZ=(e,t)=>t.id;function zZ(e,t){if(1&e){const n=no();We(0,"a",12),wn("click",function(){return qr(n),Wr(en().fullDescription.set(!0))}),_n(1,"more"),et()}2&e&&pn("color",en().data.directory.primaryColor())}function BZ(e,t){if(1&e){const n=no();We(0,"div",13),Kt(1,"span",14),We(2,"a",12),wn("click",function(){return qr(n),Wr(en().fullDescription.set(!1))}),_n(3,"less"),et()()}if(2&e){const n=en();pn("color",n.data.directory.primaryColor()),Ie(1),Rt("innerHTML",n.marked(n.data.directory.fullDescription()),ta)}}function VZ(e,t){if(1&e&&(We(0,"a",16),Kt(1,"img",17),et()),2&e){const n=t.$implicit,r=t.$index;Rt("href",en(2).data.directory.logoLinks()[r],js),Ie(1),pn("height","60px"),Rt("src",n,js)}}function UZ(e,t){if(1&e&&(We(0,"div",15),jg(1,VZ,2,4,"a",16,QD),et()),2&e){const n=en();Ie(1),$g(n.data.directory.logos())}}function jZ(e,t){if(1&e){const n=no();We(0,"app-directory-item",18),wn("alignment",function(o){const p=qr(n).$implicit;return Wr(en().align(p.title(),o))}),et()}if(2&e){const n=t.$implicit,r=en();Rt("chronomap",n)("timelineState",r.timelineState)("minDate",r.minDate)("maxDate",r.maxDate)("arrowRight",r.arrowRight())}}let GT=class y2{constructor(t,n,r){this.data=t,this.layout=n,this.route=r,this.timelineState=ee(""),this.minDate=ee(new Date),this.maxDate=ee(new Date),this.arrowRight=ee(0),this.alignment={},this.fullDescription=ee(!1),this.titleOpen=ee(!1),this.marked=En,r.params.subscribe(o=>{const c=parseInt(o.dbid);this.data.fetchData(c)}),Sg(()=>{let o=null,c=null;this.data.directory.chronomaps().forEach(F=>{F.timelineItems().forEach(V=>{V.post_timestamp&&((!o||V.post_timestampc)&&(c=V.post_timestamp))})}),o=o||new Date,c=c||new Date;const p=(c.getTime()-o.getTime())/10;o=new Date(o.getTime()-p),c=new Date(c.getTime()+p);const y=new Date(this.data.directory.zoomFrom(),0,1),x=new Date(this.data.directory.zoomUntil(),11,31),E=new Date((y.getTime()+x.getTime())/2).getTime(),P=Math.max(0,(c.getTime()-o.getTime())/(x.getTime()-y.getTime()));this.timelineState.set(`${E}/${P}`),this.minDate.set(o),this.maxDate.set(c),this.titleOpen()||this.title.nativeElement.scrollTo({top:0,behavior:"smooth"})},{allowSignalWrites:!0})}ngAfterViewInit(){ca(this.title.nativeElement,"scroll").pipe(v_(this),om(0,x_)).subscribe(()=>{this.titleOpen.set(this.title.nativeElement.scrollTop>0),this.title.nativeElement.scrollTop<0&&(this.title.nativeElement.scrollTop=0)}),ca(this.title.nativeElement,"touchstart").pipe(v_(this)).subscribe(t=>{this.titleOpen()||(this.titleOpen.set(!0),t.stopPropagation(),this.startY=t.touches[0].clientY,qc(ca(this.title.nativeElement,"touchend"),ca(this.title.nativeElement,"touchmove").pipe(function y$(e,t=uv,n=bk){const r=Ps(e,t);return function g$(e,t=bk){return an((n,r)=>{const{leading:o,trailing:c}=t;let p=!1,y=null,x=null,E=!1;const P=()=>{x?.unsubscribe(),x=null,c&&($(),E&&r.complete())},F=()=>{x=null,E&&r.complete()},V=ce=>x=Jo(e(ce)).subscribe(hn(r,P,F)),$=()=>{if(p){p=!1;const ce=y;y=null,r.next(ce),!E&&V(ce)}};n.subscribe(hn(r,ce=>{p=!0,y=ce,(!x||x.closed)&&(o?$():V(ce))},()=>{E=!0,(!(c&&p&&x)||x.closed)&&r.complete()}))})}(()=>r,n)}(16,x_))).pipe($r(n=>{if("touchmove"===n.type){const r=this.startY-n.touches[0].clientY;this.title.nativeElement.scrollTop=r<0?0:r}}),la(n=>"touchend"===n.type),as()).subscribe(()=>{this.titleOpen.set(this.title.nativeElement.scrollTop>0)}))})}align(t,n){this.alignment[t]=n;const r=Math.min(...Object.values(this.alignment));this.arrowRight.set(r)}get titleBoxShadow(){return`0px 0px 20px 1px ${this.data.directory.primaryColor()}40`}openTitle(){this.layout.mobile()&&this.title.nativeElement.scrollTo({top:1e4,behavior:"smooth"})}static#e=this.\u0275fac=function(n){return new(n||y2)(nt(Ow),nt(kw),nt(Ru))};static#t=this.\u0275cmp=Ei({type:y2,selectors:[["app-directory-page"]],viewQuery:function(n,r){if(1&n&&Lo(FZ,5),2&n){let o;wo(o=bo())&&(r.title=o.first)}},decls:15,vars:15,consts:[[1,"title-container"],["title",""],[1,"filler",3,"click"],[1,"title"],[1,"handle"],[3,"src","click"],[1,"description"],[1,"short"],["class","toggle",3,"color","click",4,"ngIf"],["class","long",3,"color",4,"ngIf"],["class","logos",4,"ngIf"],[1,"chronomaps"],[1,"toggle",3,"click"],[1,"long"],[3,"innerHTML"],[1,"logos"],["target","_blank",3,"href"],[3,"src"],[3,"chronomap","timelineState","minDate","maxDate","arrowRight","alignment"],[3,"chronomap","timelineState","minDate","maxDate","arrowRight"]],template:function(n,r){1&n&&(We(0,"div",0,1)(2,"div",2),wn("click",function(){return r.titleOpen.set(!1)}),et(),We(3,"div",3),Kt(4,"div",4),We(5,"img",5),wn("click",function(){return r.openTitle()}),et(),We(6,"div",6)(7,"div",7),_n(8),_r(9,zZ,2,2,"a",8),et(),_r(10,BZ,4,3,"div",9)(11,UZ,3,0,"div",10),et()()(),We(12,"div",11),jg(13,jZ,1,5,"app-directory-item",19,NZ),et()),2&n&&(vo("open",r.titleOpen()),Ie(2),pn("background-color",r.titleOpen()?r.data.directory.secondaryColor():null),Ie(1),pn("box-shadow",r.titleBoxShadow),Ie(1),pn("border-color",r.data.directory.primaryColor()),Ie(1),Rt("src",r.data.directory.titleImageUrl(),js),Ie(2),pn("color",r.data.directory.secondaryColor()),Ie(1),Su(" ",r.data.directory.description()," "),Ie(1),Rt("ngIf",!r.fullDescription()),Ie(1),Rt("ngIf",r.fullDescription()||r.layout.mobile()),Ie(1),Rt("ngIf",r.fullDescription()||r.layout.mobile()),Ie(2),$g(r.data.directory.chronomaps()))},dependencies:[Pu,LZ],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%] .chronomaps[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;align-items:stretch;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .chronomaps[_ngcontent-%COMP%]{padding:40px 0 200px;gap:20px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .chronomaps[_ngcontent-%COMP%]{padding:16px 0 200px;gap:16px}}[_nghost-%COMP%] .chronomaps[_ngcontent-%COMP%] app-directory-item[_ngcontent-%COMP%]{flex:0 0 auto}[_nghost-%COMP%] .chronomaps[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;width:100%;z-index:2;pointer-events:none}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%]{bottom:0;left:0}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{transition:background-color .3s ease-in-out;opacity:.3}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{display:none}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{height:calc(100% - 24px - ((100vw - 32px)*.1875))}}[_nghost-%COMP%] .title-container.open[_ngcontent-%COMP%]{pointer-events:all}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{pointer-events:all;background:#FFFFFF}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:24px 40px;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:40px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:16px;display:flex;flex-flow:column;gap:8px;position:relative}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{position:absolute;top:6px;left:50%;width:20px;height:4px;border-top:1px solid black;border-bottom:1px solid black;transform:translate(-50%)}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{align-self:flex-start}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:auto}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;gap:8px;align-items:stretch}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{align-self:flex-end}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .short[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:20px;font-weight:400;line-height:28px;letter-spacing:.2px}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .long[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:18px;font-weight:300;line-height:24px;letter-spacing:.18px;display:flex;flex-flow:column nowrap}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .long[_ngcontent-%COMP%] a{font-weight:500;text-decoration-line:underline;cursor:pointer;color:inherit}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .long[_ngcontent-%COMP%] p{margin:0 0 .33em}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{align-self:flex-end;font-weight:500;text-decoration-line:underline;cursor:pointer}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .logos[_ngcontent-%COMP%]{margin-top:40px;display:flex;flex-flow:row wrap;align-items:center;gap:32px}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .logos[_ngcontent-%COMP%]{justify-content:center}}[_nghost-%COMP%] .title-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto}']})};GT=Yi([bw()],GT);let A_=(()=>{class e{constructor(n){this.http=n}static setLayerSource(n,r,o){const c=n.getStyle().layers,p=c.findIndex(E=>E.id===r),y=c[p],x=c[p+1]&&c[p+1].id;y.source=o,y["source-layer"]&&delete y["source-layer"],n.removeLayer(r),n.addLayer(y,x)}static parseMapView(n){if(!n)return{};const r=n.split("#")[1];if(!r)return{};const o=r.split("/");if(null!==o){const c={zoom:parseFloat(o[0]),center:{lat:parseFloat(o[1]),lon:parseFloat(o[2])}};return o.length>3&&(c.pitch=parseFloat(o[3])),o.length>4&&(c.bearing=parseFloat(o[4])),c}return{}}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Sw))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ML(e,t){return t?n=>tw(t.pipe(es(1),function $Z(){return an((e,t)=>{e.subscribe(hn(t,Kl))})}()),n.pipe(ML(e))):Sr((n,r)=>e(n,r).pipe(es(1),QA(n)))}function O_(e,t=uv){const n=Ps(e,t);return ML(()=>n)}class qT{constructor(t,n,r=null){this.timelineState=t,this.selectedItemId=n,this.replaceUrl=r}}let EL=(()=>{class e{constructor(n){this.router=n,this.internalStates=new Qt,this.state=new w_(1),this.internalStates.pipe(O_(0,x_),Zc((r,o)=>r.timelineState===o.timelineState&&r.selectedItemId===o.selectedItemId),$r(r=>{this.state.next(r)}),la(r=>null!==r.replaceUrl),yn(r=>{let o="";return r.timelineState&&(o+=r.timelineState),r.selectedItemId&&(o+=`//${r.selectedItemId}`),!1===r.replaceUrl&&this.router.navigate([],{fragment:o,replaceUrl:!1}),!0===r.replaceUrl?o:null}),om(250,x_),$r(r=>{r&&this.router.navigate([],{fragment:r,replaceUrl:!0})})).subscribe()}initFromUrl(n,r){const o=n.split("//");let c="",p=null;if(o.length>0&&(c=o[0],o.length>1))try{p=parseInt(o[1],10)||null}catch{p=null}this.timelineState_=c,this.selectedItemId_=p,this.internalStates.next(new qT(c,p))}set timelineState(n){this.timelineState_=n,this.internalStates.next(new qT(n,this.selectedItemId_,!0))}set selectedItemId(n){this.selectedItemId_=n,this.internalStates.next(new qT(this.timelineState_,n,!1))}static#e=this.\u0275fac=function(r){return new(r||e)(rn(Ia))};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),HZ=(()=>{class e{constructor(n){this.sanitizer=n,this.close=new wi,this.marked=En,this.aboutContent_=null}get aboutContent(){if(!this.aboutContent_){if(!this.chronomap.infobarContent())return this.sanitizer.bypassSecurityTrustHtml("Loading...");this.aboutContent_=this.sanitizer.bypassSecurityTrustHtml(En(this.chronomap.infobarContent()))}return this.aboutContent_}static#e=this.\u0275fac=function(r){return new(r||e)(nt(i_))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-infobar"]],hostVars:2,hostBindings:function(r,o){2&r&&pn("border-color",o.chronomap.primaryColor()+"40")},inputs:{chronomap:"chronomap"},outputs:{close:"close"},decls:9,vars:5,consts:[[1,"title"],["width","44","height","44","viewBox","0 0 44 44","fill","none","xmlns","http://www.w3.org/2000/svg",1,"close",3,"click"],["d","M11.3936 11.3936L32.6068 32.6068"],["d","M32.6064 11.3936L11.3932 32.6068"],[3,"innerHtml"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"h1"),_n(2),et(),We(3,"h2"),_n(4),et(),pi(),We(5,"svg",1),wn("click",function(){return o.close.emit()}),Kt(6,"path",2)(7,"path",3),et()(),Er(),Kt(8,"p",4)),2&r&&(Ie(2),Ri(o.chronomap.infobarTitle()),Ie(2),Ri(o.chronomap.infobarSubtitle()),Ie(2),bi("stroke",o.chronomap.primaryColor()),Ie(1),bi("stroke",o.chronomap.primaryColor()),Ie(1),Rt("innerHtml",o.aboutContent,ta))},styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:100%;flex-flow:column;justify-content:flex-start;align-items:center;background:white;position:relative;z-index:2}@media only screen and (min-width: 1000px){[_nghost-%COMP%]{max-width:360px;padding:16px;border-right:1px solid black}}@media only screen and (max-width: 999px){[_nghost-%COMP%]{max-height:100%;overflow-y:scroll;padding:16px;box-shadow:0 -1px 8px #00000026;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}[_nghost-%COMP%]::-webkit-scrollbar{display:none}}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{position:relative;border-bottom:.5px solid #333333;margin-bottom:20px}[_nghost-%COMP%] .title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] .title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal;max-width:calc(100% - 46px);color:#333}[_nghost-%COMP%] .title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#333}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:20px;line-height:21px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:17px;line-height:21px}}[_nghost-%COMP%] .title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-weight:400;font-size:15px;letter-spacing:-.01em}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:15px;line-height:21px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:15px;line-height:21px}}[_nghost-%COMP%] .title[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:-5px;right:0;width:30px;height:30px}[_nghost-%COMP%] a, [_nghost-%COMP%] a:visited, [_nghost-%COMP%] a:hover{font-weight:500}@media only screen and (min-width: 1000px){[_nghost-%COMP%] app-player[_ngcontent-%COMP%]:first-child{margin:0 16px -4px}[_nghost-%COMP%] app-player[_ngcontent-%COMP%]:last-child{margin:-4px 16px 0}}@media only screen and (max-width: 999px){[_nghost-%COMP%] app-player[_ngcontent-%COMP%]:first-child{margin:0 0 -4px}[_nghost-%COMP%] app-player[_ngcontent-%COMP%]:last-child{margin:-4px 0 0}}[_nghost-%COMP%] p[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;font-size:15px;letter-spacing:.01em;color:#333;margin:0 8px}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%]{width:100%;background-color:#fff;padding-top:0}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .bottom[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;padding:24px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .bottom[_ngcontent-%COMP%]{padding:24px 0 0}}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{border-top:.5px solid #333333}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], [_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;font-size:15px;width:100%;letter-spacing:.01em;color:#333;border-bottom:.5px solid #BDBDBD;padding:8px 0}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;font-size:13px;width:100%;letter-spacing:.02em;color:#333;padding:8px 0;display:flex;align-items:center;flex-flow:row}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .expander[_ngcontent-%COMP%]{margin-left:auto;cursor:pointer}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .expander.expanded[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:13px;font-weight:400;letter-spacing:.01em;color:#000;margin:0}[_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] a[_ngcontent-%COMP%], [_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .bottom[_ngcontent-%COMP%] .author[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;display:block;font-size:13px;font-weight:400;letter-spacing:.01em;color:#2d9cdb;margin:6px 0 0}[_nghost-%COMP%]{overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}[_nghost-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:0}']})}return e})(),WT=(()=>{class e{constructor(){this.showMapSelector=!1,this.results=new Qt}submitResult(n){this.showMapSelector=!1,console.log("SUBMITTING RESULT",n),this.results.next(n)}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),TL=(()=>{class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static#e=this.\u0275fac=function(r){return new(r||e)(nt(S),nt(b))};static#t=this.\u0275dir=Ln({type:e})}return e})(),_m=(()=>{class e extends TL{static#e=this.\u0275fac=(()=>{let n;return function(o){return(n||(n=Po(e)))(o||e)}})();static#t=this.\u0275dir=Ln({type:e,features:[_i]})}return e})();const Bu=new Zt("NgValueAccessor"),WZ={provide:Bu,useExisting:Kr(()=>lb),multi:!0},XZ=new Zt("CompositionEventMode");let lb=(()=>{class e extends TL{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ZZ(){const e=pf()?pf().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(n){this.setProperty("value",n??"")}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static#e=this.\u0275fac=function(r){return new(r||e)(nt(S),nt(b),nt(XZ,8))};static#t=this.\u0275dir=Ln({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){1&r&&wn("input",function(p){return o._handleInput(p.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(p){return o._compositionEnd(p.target.value)})},features:[Zi([WZ]),_i]})}return e})();const Gs=new Zt("NgValidators"),wf=new Zt("NgAsyncValidators");function NL(e){return null!=e}function zL(e){return N0(e)?Pr(e):e}function BL(e){let t={};return e.forEach(n=>{t=null!=n?{...t,...n}:t}),0===Object.keys(t).length?null:t}function VL(e,t){return t.map(n=>n(e))}function UL(e){return e.map(t=>function KZ(e){return!e.validate}(t)?t:n=>t.validate(n))}function ZT(e){return null!=e?function jL(e){if(!e)return null;const t=e.filter(NL);return 0==t.length?null:function(n){return BL(VL(n,t))}}(UL(e)):null}function XT(e){return null!=e?function $L(e){if(!e)return null;const t=e.filter(NL);return 0==t.length?null:function(n){return Mw(VL(n,t).map(zL)).pipe(yn(BL))}}(UL(e)):null}function HL(e,t){return null===e?[t]:Array.isArray(e)?[...e,t]:[e,t]}function KT(e){return e?Array.isArray(e)?e:[e]:[]}function ub(e,t){return Array.isArray(e)?e.includes(t):e===t}function WL(e,t){const n=KT(t);return KT(e).forEach(o=>{ub(n,o)||n.push(o)}),n}function ZL(e,t){return KT(t).filter(n=>!ub(e,n))}class XL{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ZT(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=XT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return!!this.control&&this.control.hasError(t,n)}getError(t,n){return this.control?this.control.getError(t,n):null}}class ua extends XL{get formDirective(){return null}get path(){return null}}class bf extends XL{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class YL{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let KL=(()=>{class e extends YL{constructor(n){super(n)}static#e=this.\u0275fac=function(r){return new(r||e)(nt(bf,2))};static#t=this.\u0275dir=Ln({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){2&r&&vo("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[_i]})}return e})();const Pv="VALID",db="INVALID",k_="PENDING",Av="DISABLED";function fb(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class t3{constructor(t,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Pv}get invalid(){return this.status===db}get pending(){return this.status==k_}get disabled(){return this.status===Av}get enabled(){return this.status!==Av}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(WL(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(WL(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(ZL(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(ZL(t,this._rawAsyncValidators))}hasValidator(t){return ub(this._rawValidators,t)}hasAsyncValidator(t){return ub(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=k_,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=Av,this.errors=null,this._forEachChild(r=>{r.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){const n=this._parentMarkedDirty(t.onlySelf);this.status=Pv,this._forEachChild(r=>{r.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:n}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Pv||this.status===k_)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Av:Pv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=k_,this._hasOwnPendingAsyncValidator=!0;const n=zL(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(!1!==n.emitEvent)}get(t){let n=t;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((r,o)=>r&&r._find(o),this)}getError(t,n){const r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new wi,this.statusChanges=new wi}_calculateStatus(){return this._allControlsDisabled()?Av:this.errors?db:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(k_)?k_:this._anyControlsHaveStatus(db)?db:Pv}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){fb(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function nX(e){return Array.isArray(e)?ZT(e):e||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function rX(e){return Array.isArray(e)?XT(e):e||null}(this._rawAsyncValidators)}}const R_=new Zt("CallSetDisabledState",{providedIn:"root",factory:()=>pb}),pb="always";function Ov(e,t,n=pb){(function r2(e,t){const n=function GL(e){return e._rawValidators}(e);null!==t.validator?e.setValidators(HL(n,t.validator)):"function"==typeof n&&e.setValidators([n]);const r=function qL(e){return e._rawAsyncValidators}(e);null!==t.asyncValidator?e.setAsyncValidators(HL(r,t.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const o=()=>e.updateValueAndValidity();_b(t._rawValidators,o),_b(t._rawAsyncValidators,o)})(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||"always"===n)&&t.valueAccessor.setDisabledState?.(e.disabled),function sX(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&n3(e,t)})}(e,t),function lX(e,t){const n=(r,o)=>{t.valueAccessor.writeValue(r),o&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}(e,t),function aX(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&n3(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),function oX(e,t){if(t.valueAccessor.setDisabledState){const n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}(e,t)}function _b(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function n3(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function o3(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function s3(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const a3=class extends t3{constructor(t=null,n,r){super(function e2(e){return(fb(e)?e.validators:e)||null}(n),function t2(e,t){return(fb(t)?t.asyncValidators:e)||null}(r,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),fb(n)&&(n.nonNullable||n.initialValueIsDefault)&&(this.defaultValue=s3(t)?t.value:t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){o3(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){o3(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){s3(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},gX={provide:bf,useExisting:Kr(()=>l2)},u3=(()=>Promise.resolve())();let l2=(()=>{class e extends bf{constructor(n,r,o,c,p,y){super(),this._changeDetectorRef=p,this.callSetDisabledState=y,this.control=new a3,this._registered=!1,this.name="",this.update=new wi,this._parent=n,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=function s2(e,t){if(!t)return null;let n,r,o;return Array.isArray(t),t.forEach(c=>{c.constructor===lb?n=c:function hX(e){return Object.getPrototypeOf(e.constructor)===_m}(c)?r=c:o=c}),o||r||n||null}(0,c)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){const r=n.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),function o2(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Ov(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(n){u3.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){const r=n.isDisabled.currentValue,o=0!==r&&n_(r);u3.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?function mb(e,t){return[...t.path,e]}(n,this._parent):[n]}static#e=this.\u0275fac=function(r){return new(r||e)(nt(ua,9),nt(Gs,10),nt(wf,10),nt(Bu,10),nt(v0,8),nt(R_,8))};static#t=this.\u0275dir=Ln({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Zi([gX]),_i,$n]})}return e})(),d3=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({})}return e})(),UX=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({imports:[d3]})}return e})(),$X=(()=>{class e{static withConfig(n){return{ngModule:e,providers:[{provide:R_,useValue:n.callSetDisabledState??pb}]}}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({imports:[UX]})}return e})();function HX(e,t){if(1&e){const n=no();pi(),We(0,"svg",4),wn("click",function(){qr(n);const o=en();return Wr(o.slide=o.slide-1)}),Kt(1,"path",29),et()}if(2&e){const n=en();Ie(1),bi("stroke",n.chronomap.primaryColor())}}function GX(e,t){1&e&&Kt(0,"h2",30),2&e&&Rt("innerHtml",en().chronomap.contributeMessage(),ta)}function qX(e,t){if(1&e){const n=no();We(0,"button",17),wn("click",function(){qr(n);const o=en();return Wr(o.slide=o.slide+1)}),_n(1," next "),et()}if(2&e){const n=en();pn("color",n.chronomap.primaryColor())("border-color",n.chronomap.secondaryColor()+"40")}}function WX(e,t){if(1&e){const n=no();pi(),Er(),We(0,"div",20)(1,"button",17),wn("click",function(){qr(n);const o=en();return Wr(o.slide=o.slide+1)}),_n(2," next "),et()()}if(2&e){const n=en();Ie(1),pn("color",n.chronomap.primaryColor())("border-color",n.chronomap.secondaryColor()+"40")}}function ZX(e,t){1&e&&Kt(0,"iframe",31),2&e&&Rt("src",en().iframeSrc,xg)}function XX(e,t){if(1&e&&(hf(0),Kt(1,"div",32)(2,"div",32)(3,"div",32)(4,"div",32),df()),2&e){const n=en();Ie(1),pn("background",0==n.slide?n.chronomap.primaryColor():null),Ie(1),pn("background",1==n.slide?n.chronomap.primaryColor():null),Ie(1),pn("background",2==n.slide?n.chronomap.primaryColor():null),Ie(1),pn("background",3==n.slide?n.chronomap.primaryColor():null)}}let YX=(()=>{class e{constructor(n,r,o){this.sanitizer=n,this.mapSelector=r,this.data=o,this.close=new wi,this.marked=En,this.contributeMessage="",this.slide=0,this.contentType="",this.iframeURL=null,this.subscription=null}ngOnInit(){this.chronomap.ready.pipe(as()).subscribe(()=>{this.contributeMessage=this.sanitizer.bypassSecurityTrustHtml(En(this.chronomap.contributeMessage()))}),this.nonce=""+Math.floor(1e9*Math.random())}selectCT(n){this.contentType=n,this.slide+=1}get iframeSrc(){if(!(this.selectedDate&&this.contentType&&this.selectedGeo&&this.chronomap.newEntryForm()))return null;const n=new URL(this.chronomap.newEntryForm());n.searchParams.append("prefill_Media Type",this.contentType),n.searchParams.append("hide_Media Type","true"),n.searchParams.append("prefill_Post_Timestamp",this.selectedDate+"T00:00:00.000"),n.searchParams.append("hide_Post_Timestamp","true"),n.searchParams.append("prefill_Geo",this.selectedGeo),n.searchParams.append("hide_Geo","true"),n.searchParams.append("prefill_Nonce",this.nonce),n.searchParams.append("hide_Nonce","true"),n.searchParams.append("prefill_Status","Review"),n.searchParams.append("hide_Status","true"),this.iframeURL||this.initPolling();const r=n.toString();return this.iframeURL!==r&&(this.iframeURL=r,this.iframeSafeURL=this.sanitizer.bypassSecurityTrustResourceUrl(this.iframeURL)),this.iframeSafeURL}openMap(){this.mapSelector.showMapSelector=!0,this.mapSelector.results.pipe(as()).subscribe(n=>{console.log("GOT GEO",n),n&&(this.selectedGeo=n)})}closeMe(){this.subscription?.unsubscribe(),this.subscription=null,this.close.emit()}initPolling(){this.subscription=function GZ(e=0,t=uv){return e<0&&(e=0),Ps(e,e,t)}(5e3).pipe(Vi(()=>this.chronomap.fetch())).subscribe(n=>{this.chronomap.nonces.forEach(r=>{r===this.nonce&&(this.subscription?.unsubscribe(),this.subscription=null,this.slide=4)})})}static#e=this.\u0275fac=function(r){return new(r||e)(nt(i_),nt(WT),nt(Ow))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-add-new-bar"]],hostVars:2,hostBindings:function(r,o){2&r&&pn("border-color",o.chronomap.primaryColor()+"40")},inputs:{chronomap:"chronomap"},outputs:{close:"close"},decls:93,vars:76,consts:[[1,"slides"],[1,"controls"],[1,"control"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M1.39453 1.39355L22.6077 22.6068"],["d","M22.6074 1.39355L1.39422 22.6068"],[1,"slide"],[1,"header"],[3,"innerHtml",4,"ngIf"],[1,"content-types"],[1,"content-type",3,"click"],[1,"icon"],[3,"type","color"],[1,"name"],[1,"indented"],[1,"center"],[3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.37124 4.31479C7.86926 2.83176 9.89206 1.99989 12 2C14.1079 1.99989 16.1307 2.83176 17.6288 4.31479C19.1268 5.79782 19.9789 7.81216 20 9.92C20 15.4 13 21.5 12.65 21.76C12.4689 21.9149 12.2384 22.0001 12 22.0001C11.7616 22.0001 11.5311 21.9149 11.35 21.76L11.3484 21.7586C11.0253 21.4787 4 15.3904 4 9.92C4.02108 7.81216 4.87323 5.79782 6.37124 4.31479ZM6 9.92C6 13.65 10.33 18.06 12 19.65C13.67 18.06 18 13.62 18 9.92C18 8.3287 17.3679 6.80258 16.2426 5.67736C15.1174 4.55214 13.5913 3.92 12 3.92C10.4087 3.92 8.88258 4.55214 7.75736 5.67736C6.63214 6.80258 6 8.3287 6 9.92ZM10.0555 6.58986C10.6311 6.20527 11.3078 6 12 6C12.9283 6 13.8185 6.36875 14.4749 7.02513C15.1313 7.6815 15.5 8.57174 15.5 9.5C15.5 10.1922 15.2947 10.8689 14.9101 11.4445C14.5256 12.0201 13.9789 12.4687 13.3394 12.7336C12.6999 12.9985 11.9961 13.0678 11.3172 12.9327C10.6383 12.7977 10.0146 12.4644 9.52513 11.9749C9.03564 11.4854 8.7023 10.8617 8.56725 10.1828C8.4322 9.50388 8.50152 8.80015 8.76642 8.16061C9.03133 7.52107 9.47993 6.97444 10.0555 6.58986ZM11.1666 10.7472C11.4133 10.912 11.7033 11 12 11C12.3978 11 12.7794 10.842 13.0607 10.5607C13.342 10.2794 13.5 9.89782 13.5 9.5C13.5 9.20333 13.412 8.91332 13.2472 8.66665C13.0824 8.41997 12.8481 8.22771 12.574 8.11418C12.2999 8.00065 11.9983 7.97094 11.7074 8.02882C11.4164 8.0867 11.1491 8.22956 10.9393 8.43934C10.7296 8.64912 10.5867 8.91639 10.5288 9.20736C10.4709 9.49834 10.5007 9.79994 10.6142 10.074C10.7277 10.3481 10.92 10.5824 11.1666 10.7472Z"],[1,"bottom"],[3,"color","border-color","click",4,"ngIf"],[1,"date-selector"],["type","date","placeholder","pick the date",1,"date-selector",3,"ngModel","ngModelChange"],["d","M18 4H17V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V4H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V4H6C5.20435 4 4.44129 4.31607 3.87868 4.87868C3.31607 5.44129 3 6.20435 3 7V19C3 19.7956 3.31607 20.5587 3.87868 21.1213C4.44129 21.6839 5.20435 22 6 22H18C18.7956 22 19.5587 21.6839 20.1213 21.1213C20.6839 20.5587 21 19.7956 21 19V7C21 6.20435 20.6839 5.44129 20.1213 4.87868C19.5587 4.31607 18.7956 4 18 4ZM6 6H7V7C7 7.26522 7.10536 7.51957 7.29289 7.70711C7.48043 7.89464 7.73478 8 8 8C8.26522 8 8.51957 7.89464 8.70711 7.70711C8.89464 7.51957 9 7.26522 9 7V6H15V7C15 7.26522 15.1054 7.51957 15.2929 7.70711C15.4804 7.89464 15.7348 8 16 8C16.2652 8 16.5196 7.89464 16.7071 7.70711C16.8946 7.51957 17 7.26522 17 7V6H18C18.2652 6 18.5196 6.10536 18.7071 6.29289C18.8946 6.48043 19 6.73478 19 7V11H5V7C5 6.73478 5.10536 6.48043 5.29289 6.29289C5.48043 6.10536 5.73478 6 6 6ZM18 20H6C5.73478 20 5.48043 19.8946 5.29289 19.7071C5.10536 19.5196 5 19.2652 5 19V13H19V19C19 19.2652 18.8946 19.5196 18.7071 19.7071C18.5196 19.8946 18.2652 20 18 20Z"],["class","bottom",4,"ngIf"],["frameborder","0","onmousewheel","","width","100%","height","100%",3,"src",4,"ngIf"],[1,"progress"],[4,"ngIf"],["d","M18 1L7 12.1467L18 23"],[3,"innerHtml"],["frameborder","0","onmousewheel","","width","100%","height","100%",3,"src"],[1,"progress-item"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"div",1)(2,"div",2),_r(3,HX,2,1,"svg",3),et(),We(4,"div",2),pi(),We(5,"svg",4),wn("click",function(){return o.closeMe()}),Kt(6,"path",5)(7,"path",6),et()()(),Er(),We(8,"div",7)(9,"div",8)(10,"h1"),_n(11,"Add your perspective"),et(),_r(12,GX,1,1,"h2",9),We(13,"h2"),_n(14,"Let\u2019s indeed start by choosing the format for this perspective:"),et()(),We(15,"div",10)(16,"div",11),wn("click",function(){return o.selectCT("audio")}),We(17,"div",12),Kt(18,"app-media-icon",13),et(),We(19,"div",14),_n(20,"Audio clip"),et()(),We(21,"div",11),wn("click",function(){return o.selectCT("twitter")}),We(22,"div",12),Kt(23,"app-media-icon",13),et(),We(24,"div",14),_n(25,"Twitter post"),et()(),We(26,"div",11),wn("click",function(){return o.selectCT("instagram")}),We(27,"div",12),Kt(28,"app-media-icon",13),et(),We(29,"div",14),_n(30,"Instagram post"),et()(),We(31,"div",11),wn("click",function(){return o.selectCT("video")}),We(32,"div",12),Kt(33,"app-media-icon",13),et(),We(34,"div",14),_n(35,"Youtube video"),et()(),We(36,"div",11),wn("click",function(){return o.selectCT("wikipedia")}),We(37,"div",12),Kt(38,"app-media-icon",13),et(),We(39,"div",14),_n(40,"Wikipedia article"),et()(),We(41,"div",11),wn("click",function(){return o.selectCT("news")}),We(42,"div",12),Kt(43,"app-media-icon",13),et(),We(44,"div",14),_n(45,"News"),et()(),We(46,"div",11),wn("click",function(){return o.selectCT("image")}),We(47,"div",12),Kt(48,"app-media-icon",13),et(),We(49,"div",14),_n(50,"Image"),et()()()(),We(51,"div",7)(52,"div",8)(53,"h1",15),_n(54,"Where?"),et(),We(55,"h2"),_n(56,"Position the camera on your location of choice"),et()(),We(57,"div",16)(58,"button",17),wn("click",function(){return o.openMap()}),pi(),We(59,"svg",18),Kt(60,"path",19),et(),_n(61," Choose from the map"),et()(),Er(),We(62,"div",20),_r(63,qX,2,4,"button",21),et()(),We(64,"div",7)(65,"div",8)(66,"h1",15),_n(67,"When?"),et(),We(68,"h2"),_n(69,"The exact year is less important than the order of events"),et()(),We(70,"div",22)(71,"input",23),wn("ngModelChange",function(p){return o.selectedDate=p}),et(),pi(),We(72,"svg",18),Kt(73,"path",24),et()(),_r(74,WX,3,4,"div",25),et(),Er(),We(75,"div",7)(76,"div",8)(77,"h1",15),_n(78,"Add The Details"),et(),We(79,"h2"),_n(80),et()(),_r(81,ZX,1,1,"iframe",26),et(),We(82,"div",7)(83,"div",8)(84,"h1"),_n(85,"Thank you!"),et(),We(86,"h2"),_n(87,"We will review your contribution and email you if it is added to the timeline"),et()(),We(88,"div",20)(89,"button",17),wn("click",function(){return o.closeMe()}),_n(90," close "),et()()()(),We(91,"div",27),_r(92,XX,5,8,"ng-container",28),et()),2&r&&(Ie(3),Rt("ngIf",o.slide>0&&o.slide<4),Ie(3),bi("stroke",o.chronomap.primaryColor()),Ie(1),bi("stroke",o.chronomap.primaryColor()),Ie(1),vo("pre",o.slide<0)("post",o.slide>0),Ie(4),Rt("ngIf",o.chronomap.contributeMessage()),Ie(3),pn("color",o.chronomap.primaryColor()),Ie(2),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","audio")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","twitter")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","instagram")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","video")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","wikipedia")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","news")("color",o.chronomap.primaryColor()),Ie(4),pn("border-color",o.chronomap.primaryColor()),Ie(1),Rt("type","image")("color",o.chronomap.primaryColor()),Ie(3),vo("pre",o.slide<1)("post",o.slide>1),Ie(7),pn("color",o.chronomap.primaryColor())("border-color",o.chronomap.secondaryColor()+"40"),Ie(2),bi("fill",o.chronomap.primaryColor()),Ie(3),Rt("ngIf",o.selectedGeo),Ie(1),vo("pre",o.slide<2)("post",o.slide>2),Ie(7),pn("color",o.chronomap.primaryColor())("border-color",o.chronomap.secondaryColor()+"40"),Rt("ngModel",o.selectedDate),Ie(2),bi("fill",o.chronomap.primaryColor()),Ie(1),Rt("ngIf",!!o.selectedDate),Ie(1),vo("pre",o.slide<3)("post",o.slide>3),Ie(5),Su("Now that we know time and space, let\u2019s add the details of your ",o.contentType,""),Ie(1),Rt("ngIf",o.iframeSrc),Ie(1),vo("pre",o.slide<4)("post",o.slide>4),Ie(7),pn("color",o.chronomap.primaryColor())("border-color",o.chronomap.secondaryColor()+"40"),Ie(2),pn("border-color",o.chronomap.secondaryColor()),Ie(1),Rt("ngIf",o.slide>=0&&o.slide<4))},dependencies:[Pu,lb,KL,l2,HT],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column;justify-content:flex-start;align-items:stretch;background:white;position:relative;z-index:2;overflow:hidden}@media only screen and (min-width: 1000px){[_nghost-%COMP%]{max-width:360px;padding:16px;border-right:1px solid black}}@media only screen and (max-width: 999px){[_nghost-%COMP%]{max-height:100%;overflow-y:scroll;padding:16px;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}[_nghost-%COMP%]::-webkit-scrollbar{display:none}}[_nghost-%COMP%] a, [_nghost-%COMP%] a:visited, [_nghost-%COMP%] a:hover{font-weight:500}[_nghost-%COMP%] p[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;font-size:15px;letter-spacing:.01em;color:#333;margin:0 8px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-flow:row;justify-content:space-between;align-items:center;position:absolute;top:0;right:0;width:100%;z-index:1}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] .control[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%] .slides[_ngcontent-%COMP%]{height:100%;width:100%;overflow:hidden;flex:1 1 auto;position:relative}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%]{display:flex;flex-flow:column;justify-content:flex-start;align-items:stretch;width:100%;height:100%;transform:translate(0);transition:transform .25s linear;position:absolute;top:0;left:0;overflow:auto}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide.pre[_ngcontent-%COMP%]{transform:translate(100%)}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide.post[_ngcontent-%COMP%]{transform:translate(-100%)}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:stretch;justify-content:flex-start;gap:4px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal;font-weight:700;font-size:18px;line-height:21px;letter-spacing:.02em;text-transform:uppercase;color:#333;margin:0}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1.indented[_ngcontent-%COMP%]{margin-left:40px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal;font-weight:400;font-size:15px;line-height:21px;letter-spacing:-.01em;color:#333;padding-bottom:8px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]:last-child{border-bottom:.5px solid #333333;margin-bottom:32px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-flow:column;align-items:center;width:100%;margin-top:auto}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:12px;padding:8px 24px;height:40px;background:rgba(255,255,255,.5);border:1px solid black;border-radius:24px;font-family:Source Code Pro,monospace;font-style:normal;font-weight:400;font-size:18px;line-height:21px;letter-spacing:.02em;text-transform:uppercase;color:#ce0031;cursor:pointer}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .content-types[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:flex-start;justify-content:flex-start;gap:8px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .content-types[_ngcontent-%COMP%] .content-type[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;justify-content:flex-start;gap:16px;cursor:pointer}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .content-types[_ngcontent-%COMP%] .content-type[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:48px;height:48px;overflow:hidden;border-radius:24px;border:1px solid black;display:flex;flex-flow:column;align-items:center;justify-content:center}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .content-types[_ngcontent-%COMP%] .content-type[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .content-types[_ngcontent-%COMP%] .content-type[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal;font-weight:400;font-size:18px;line-height:23px}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .date-selector[_ngcontent-%COMP%]{height:48px;width:100%;position:relative}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .date-selector[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:1px solid black;border-radius:4px;width:100%;height:100%;padding-left:44px;padding-right:16px;color:#000;font-family:Source Code Pro,monospace;font-style:normal;font-weight:400;font-size:18px;letter-spacing:.02em;text-transform:uppercase;z-index:1;position:relative;background-color:transparent}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] .date-selector[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;left:12px;top:12px;width:24px;height:24px;z-index:0}[_nghost-%COMP%] .slides[_ngcontent-%COMP%] .slide[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{margin:0 -32px;width:360px}[_nghost-%COMP%] .progress[_ngcontent-%COMP%]{flex:0 0 auto;margin-top:16px;padding-top:16px;height:25px;display:flex;flex-flow:row;align-items:stretch;justify-content:stretch;gap:8px;border-top:1px solid black}[_nghost-%COMP%] .progress[_ngcontent-%COMP%] .progress-item[_ngcontent-%COMP%]{flex:1 1 auto;height:100%;border-radius:2px;background:#E0E0E0;transition:background .25s linear}']})}return e})();var Oc=ze(574),KX=ze(904);const JX=["mapEl"];let QX=(()=>{class e{constructor(n,r){this.mapSvc=n,this.mapSelector=r}ngAfterViewInit(){this.chronomap.ready.subscribe(()=>{this.theMap=new Oc.Map({container:this.mapEl.nativeElement,style:this.chronomap.mapStyle(),minZoom:3});var n=new KX({accessToken:Oc.accessToken,marker:!1});this.theMap.addControl(n),this.theMap.addControl(new Oc.NavigationControl({visualizePitch:!0})),this.theMap.on("load",()=>{if(this.chronomap.mapView()){const r=A_.parseMapView(this.chronomap.mapView());this.theMap.jumpTo(r)}})})}submit(){const n=this.theMap.getCenter(),o="#"+[this.theMap.getZoom(),n.lat,n.lng,this.theMap.getPitch(),this.theMap.getBearing()].map(c=>c.toString()).join("/");this.mapSelector.submitResult(o)}cancel(){this.mapSelector.submitResult(null)}static#e=this.\u0275fac=function(r){return new(r||e)(nt(A_),nt(WT))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-map-selector"]],viewQuery:function(r,o){if(1&r&&Lo(JX,7),2&r){let c;wo(c=bo())&&(o.mapEl=c.first)}},inputs:{chronomap:"chronomap"},decls:8,vars:4,consts:[[1,"map"],["mapEl",""],[1,"controls"],[3,"click"]],template:function(r,o){1&r&&(We(0,"div",0),Kt(1,"div",null,1),et(),We(3,"div",2)(4,"button",3),wn("click",function(){return o.cancel()}),_n(5,"cancel"),et(),We(6,"button",3),wn("click",function(){return o.submit()}),_n(7,"select"),et()()),2&r&&(Ie(6),pn("color",o.chronomap.primaryColor())("border-color",o.chronomap.secondaryColor()+"40"))},styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%}[_nghost-%COMP%] .map[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .map[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .controls[_ngcontent-%COMP%]{position:absolute;bottom:24px;right:24px;z-index:10;display:flex;flex-flow:row;align-items:center;gap:32px}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:8px 24px;height:40px;background:rgba(255,255,255,.5);border:1px solid rgba(252,13,28,.25);border-radius:24px;font-family:Source Code Pro,monospace;font-style:normal;font-weight:400;font-size:18px;line-height:21px;letter-spacing:.02em;text-transform:uppercase;color:#ce0031;cursor:pointer}[_nghost-%COMP%] .controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:first-child{color:#333;border-color:#333}']})}return e})();class P3{constructor(){this.visible$=new Qt,this.detected=this.visible$.pipe(Zc()),this.visible$.next(!1)}initVisibilityDetector(t,n,r){this.observer=new IntersectionObserver(p=>{this.visible$.next(p[0].isIntersecting)},{root:n,rootMargin:{active:"0% -50% 0% -50%",visible:"100% 0% 100% 0%"}[r],threshold:0}),this.observer.observe(t)}}class eY{constructor(t,n){this.url=t,this.playerService=n,this.subscriptions=[],this.playing=new oi(!1),this.ready=new oi(!1),this.hiResTimestamp=new oi(0),this.textTimestamp=new oi("-00:00"),this.position=new oi(0),this.ended=new Qt,this.audio=new Audio(t),ca(this.audio,"canplaythrough").pipe(as()).subscribe(()=>{this.ready.next(!0),this.updateTextTimestamp()}),this.subscriptions.push(ca(this.audio,"play").subscribe(()=>{this.playing.next(!0)}),ca(this.audio,"pause").subscribe(()=>{this.playing.next(!1)}),ca(this.audio,"ended").subscribe(()=>{this.ended.next(null),this.playing.next(!1),this.audio&&(this.audio.currentTime=0)}),ca(this.audio,"timeupdate").pipe(yn(()=>{if(null!==this.audio){const r=Math.floor(10*this.audio.currentTime),o=this.hiResTimestamp.getValue();if(r!==o)if(o{this.position.next(r)})),this.playing.next(!1),this.audio.load()}seek(t){this.audio&&(this.audio.currentTime=this.audio.duration*t)}seekTime(t){return this.ready.pipe(la(n=>n),as(),$r(()=>{null!==this.audio&&(this.audio.currentTime=t)})).toPromise()}play(){this.playing.getValue()||this.ready.pipe(la(t=>t),as()).subscribe(()=>{this.audio&&this.audio.play().then(()=>{this.playerService.playing(this)}).catch(()=>{console.log("FAILED TO PLAY...")})})}pause(){this.playing.getValue()&&this.audio&&(this.audio.pause(),this.playerService.stopped(this))}toggle(){this.playing.getValue()?this.pause():this.play()}cleanup(){for(null!==this.audio&&(this.pause(),this.audio.remove(),this.audio=null);this.subscriptions.length>0;)this.subscriptions.shift()?.unsubscribe()}updateTextTimestamp(){if(!this.audio||!Number.isFinite(this.audio.duration))return;const t=Math.floor(this.audio.duration-this.audio.currentTime);let n=""+t%60;n.length<2&&(n="0"+n),n=Math.floor(t/60)+":"+n,n.length<5&&(n="0"+n),n="-"+n,n!==this.textTimestamp.getValue()&&this.textTimestamp.next(n)}}let tY=(()=>{class e{constructor(){this.current=null,this.clock=new w_(1),this.clockSub=null,this.playingSub=null,this.isPlaying=new oi(!1),this.last=null,ca(window,"keyup").subscribe(n=>{"Space"===n.code&&(null!==this.current?this.current.toggle():null!==this.last&&(this.last.toggle(),this.last=null))})}playing(n){this.current!==n&&(null!==this.current&&this.current.pause(),this.current=n,this.clockSub&&this.clockSub.unsubscribe(),this.clockSub=n.textTimestamp.subscribe(r=>{this.clock.next(r)}),this.playingSub&&this.playingSub.unsubscribe(),this.playingSub=n.playing.subscribe(r=>{this.isPlaying.next(r)}))}stopped(n){this.current===n&&(this.last=n,this.current=null,this.isPlaying.next(!1),this.clockSub&&(this.clockSub.unsubscribe(),this.clockSub=null),this.playingSub&&(this.playingSub.unsubscribe(),this.playingSub=null))}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275prov=tn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const nY=["handle"],rY=["component"];function iY(e,t){1&e&&Kt(0,"img",12)}function oY(e,t){1&e&&Kt(0,"img",13)}function sY(e,t){if(1&e){const n=no();pi(),Er(),hf(0),We(1,"div",7,8),wn("mousedown",function(){return qr(n),Wr(en().drag())}),et(),_r(3,iY,1,0,"img",9),Tx(4,"async"),_r(5,oY,1,0,"img",10),Tx(6,"async"),We(7,"span",11),_n(8),Tx(9,"async"),et(),df()}if(2&e){const n=en();Ie(1),pn("left",n.handleX+"px")("top",n.handleY+"px")("background",n.color),Ie(2),Rt("ngIf",Dx(4,9,n.player.playing)),Ie(2),Rt("ngIf",!Dx(6,11,n.player.playing)),Ie(3),Ri(Dx(9,13,n.player.textTimestamp))}}let A3=(()=>{class e{constructor(n,r){this.playerService=n,this.el=r,this.size=280,this.PADDING=2,this.BAR_WIDTH=4,this.player=null,this.progressBarPath=""}ngOnInit(){}ngAfterViewInit(){}drag(){const n=this.component.nativeElement.getBoundingClientRect();ca(window,"mousemove").pipe(EE(ca(window,"mouseup")),$r(r=>{const c=r.clientX-n.left-this.size/2,y=Math.atan((r.clientY-n.top-this.size/2)/c)+Math.PI/2+(c<0?Math.PI:0);this.player?.seek(y/2/Math.PI)}),iw(1)).subscribe(r=>{})}click(n){if(!this.player)return!1;const r=n.offsetX-this.size/2,o=n.offsetY-this.size/2,c=Math.atan(o/r)+Math.PI/2+(r<0?Math.PI:0),p=Math.sqrt(r*r+o*o);return Math.abs(p-this.size/2)<10?this.player.seek(c/2/Math.PI):p{this.calculateProgressBarPath(n/1e3*2*Math.PI)}))}cleanupPlayer(){null!==this.player&&(this.player.cleanup(),this.positionSub.unsubscribe(),this.player=null,this.progressBarPath="")}ngOnChanges(){this.cleanupPlayer(),this.createPlayer()}ngOnDestroy(){this.cleanupPlayer()}calculateProgressBarPath(n){const r=this.size/2,o=(this.size-this.BAR_WIDTH)/2,c=r+o*Math.sin(n),p=r-o*Math.cos(n),y=n>=Math.PI?"1 1":"0 1";this.progressBarPath=`M${r} ${r-o} A ${o} ${o} 0 ${y} ${c} ${p}`,this.handleX=c,this.handleY=p}static#e=this.\u0275fac=function(r){return new(r||e)(nt(tY),nt(b))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-audio-player"]],viewQuery:function(r,o){if(1&r&&(Lo(nY,7),Lo(rY,7)),2&r){let c;wo(c=bo())&&(o.handle=c.first),wo(c=bo())&&(o.component=c.first)}},inputs:{audio:"audio",image:"image",color:"color",size:"size"},features:[$n],decls:7,vars:16,consts:[[1,"wrapper"],[1,"component"],["viewport","0 0 280 280",3,"click"],["component",""],["stroke","#dedede","stroke-width","4","fill","none"],["stroke-width","4","fill","none"],[4,"ngIf"],[1,"handle",3,"mousedown"],["handle",""],["src","assets/img/player-control-pause.svg",4,"ngIf"],["src","assets/img/player-control-play.svg",4,"ngIf"],[1,"timestamp"],["src","assets/img/player-control-pause.svg"],["src","assets/img/player-control-play.svg"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"div",1),pi(),We(2,"svg",2,3),wn("click",function(p){return o.click(p)}),Kt(4,"circle",4)(5,"path",5),et(),_r(6,sY,10,15,"ng-container",6),et()()),2&r&&(pn("width",o.size+4+"px")("height",o.size+4+"px")("padding","2px"),Ie(1),pn("background-image","url("+o.image+")")("border-radius",o.size/2+"px"),Ie(3),bi("cx",o.size/2)("cy",o.size/2)("r",o.size/2-2),Ie(1),bi("d",o.progressBarPath)("stroke",o.color),Ie(1),Rt("ngIf",o.player))},dependencies:[Pu,bA],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{display:flex;flex-flow:column;align-items:center;position:relative}[_nghost-%COMP%] .component[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-flow:column;align-items:center;justify-content:center;background-repeat:no-repeat;background-position:center;background-size:cover;position:relative;cursor:pointer;overflow:visible}[_nghost-%COMP%] .component[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:60px;height:60px}[_nghost-%COMP%] .component[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;width:100%;overflow:visible}[_nghost-%COMP%] .component[_ngcontent-%COMP%] .handle[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:6px;border:2px solid white;background:#0AB239;transform:translate(-50%) translateY(-50%);position:absolute;pointer-events:all;z-index:1}[_nghost-%COMP%] .component[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;color:#fff;display:block;line-height:16px;text-shadow:0px 0px 6px #000000;height:0px}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .component[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{font-weight:700;font-size:16px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .component[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{font-weight:400;font-size:12px}}']})}return e})();function aY(e,t){if(1&e){const n=no();We(0,"a",6),wn("mouseover",function(){return qr(n),Wr(en(2).linkHover=!0)})("mouseleave",function(){return qr(n),Wr(en(2).linkHover=!1)}),_n(1),et()}if(2&e){const n=en(2);pn("color",n.chronomap.primaryColor()),Rt("href",n.item.link_domain,js),Ie(1),Ri(n.item.link_title)}}function lY(e,t){if(1&e){const n=no();We(0,"a",7),wn("mouseover",function(){return qr(n),Wr(en(2).linkHover=!0)})("mouseleave",function(){return qr(n),Wr(en(2).linkHover=!1)}),_n(1),et()}if(2&e){const n=en(2);pn("background-color",n.chronomap.primaryColor()),Rt("href",n.item.link_domain,js),Ie(1),Ri(n.item.link_title)}}function cY(e,t){if(1&e&&(We(0,"div",2)(1,"div",3),_r(2,aY,2,4,"a",4)(3,lY,2,4,"a",5),et()()),2&e){const n=en();Ie(2),Rt("ngIf",!n.linkHover),Ie(1),Rt("ngIf",n.linkHover)}}let uY=(()=>{class e{constructor(){this.linkHover=!1}ngOnInit(){}ngOnChanges(){this.update()}ngAfterViewInit(){this.update()}update(){this.player&&this.player.player&&(this.activeItem===this.item?this.player.player.play():this.player.player.pause())}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-audio"]],viewQuery:function(r,o){if(1&r&&Lo(A3,7),2&r){let c;wo(c=bo())&&(o.player=c.first)}},inputs:{item:"item",activeItem:"activeItem",chronomap:"chronomap"},features:[$n],decls:3,vars:4,consts:[[3,"audio","image","color"],["class","link",4,"ngIf"],[1,"link"],[1,"link-container"],["target","blank","class","link-title",3,"href","color","mouseover","mouseleave",4,"ngIf"],["target","blank","class","link-title hover",3,"href","background-color","mouseover","mouseleave",4,"ngIf"],["target","blank",1,"link-title",3,"href","mouseover","mouseleave"],["target","blank",1,"link-title","hover",3,"href","mouseover","mouseleave"]],template:function(r,o){1&r&&(We(0,"div"),Kt(1,"app-audio-player",0),_r(2,cY,4,2,"div",1),et()),2&r&&(Ie(1),Rt("audio",o.item.audio)("image",o.item.image)("color",o.chronomap.primaryColor()),Ie(1),Rt("ngIf",o.item.link_title))},dependencies:[Pu,A3],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{margin-top:auto;margin-bottom:auto}@media only screen and (min-width: 1000px){app-player[_ngcontent-%COMP%]{align-items:flex-start}}.link-container[_ngcontent-%COMP%]{z-index:1;position:relative;bottom:70px;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;text-transform:uppercase;font-size:14px;font-weight:700;text-align:center}.link-container[_ngcontent-%COMP%] a.link-title[_ngcontent-%COMP%]{padding:4px 16px;border-radius:16px;text-decoration:none;background:white}.link-container[_ngcontent-%COMP%] a.link-title.hover[_ngcontent-%COMP%]{background:#CE0031;color:#fff}']})}return e})();const hY=["frame"];let dY=(()=>{class e{constructor(n,r,o){this.sanitizer=n,this.http=r,this.el=o,this.playerReady=new w_(1),this.initialize=new Qt,this.initialize.pipe(Vi(()=>this.http.get("https://www.youtube.com/oembed",{params:{url:this.item.youtube_video_id,format:"json"}})),$r(()=>{this.frame.nativeElement.innerHTML=""}),O_(0)).subscribe(c=>{const y=Math.min(this.el.nativeElement.offsetWidth,640),x=3*y/4;console.log("INIT YOUTUBE",this.frame.nativeElement,this.item.youtube_video_id,y,this.el.nativeElement.offsetWidth);const E=c.html||"",P=E.indexOf('src="');if(-1!==P){const F=new URL(E.slice(P).split('"')[1]),V=F.pathname.split("/").pop(),$=parseInt(F.searchParams.get("start")||"0",10);this.player=new YT.Player(this.frame.nativeElement.appendChild(document.createElement("div")),{videoId:V,height:x+"px",width:y+"px",events:{onReady:()=>{this.playerReady.next(),this.playerReady.complete()}},playerVars:{enablejsapi:1,start:$}})}})}ngOnInit(){}ngOnChanges(){const n=this.activeItem===this.item;n?this.playerReady.pipe(as()).subscribe(()=>{n&&this.player?.getPlayerState&&this.player.getPlayerState()!==YT.PlayerState.PLAYING&&this.player.playVideo()}):this.playerReady.pipe(as()).subscribe(()=>{!n&&this.player?.getPlayerState&&this.player.getPlayerState()!==YT.PlayerState.PAUSED&&this.player.getPlayerState()!==YT.PlayerState.ENDED&&this.player.pauseVideo()})}ngAfterViewInit(){this.resizeObserver?.disconnect(),this.resizeObserver=new ResizeObserver(n=>{console.log("RESIZE",this.item.youtube_video_id,n),this.initialize.next()}),this.resizeObserver.observe(this.el.nativeElement)}ngOnDestroy(){this.resizeObserver?.disconnect()}static#e=this.\u0275fac=function(r){return new(r||e)(nt(i_),nt(Sw),nt(b))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-video"]],viewQuery:function(r,o){if(1&r&&Lo(hY,7),2&r){let c;wo(c=bo())&&(o.frame=c.first)}},inputs:{item:"item",activeItem:"activeItem",chronomap:"chronomap"},features:[$n],decls:2,vars:0,consts:[["frame",""]],template:function(r,o){1&r&&Kt(0,"div",null,0)},styles:["[_nghost-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-flow:row;justify-content:center}"]})}return e})(),fY=(()=>{class e{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-image"]],inputs:{item:"item",chronomap:"chronomap"},decls:1,vars:1,consts:[[3,"src"]],template:function(r,o){1&r&&Kt(0,"img",0),2&r&&Rt("src",o.item.image,js)},styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:auto;display:flex;flex-flow:column;align-items:center;padding-bottom:8px}[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;max-width:100%;max-height:100vh}@media only screen and (min-width: 1000px){[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-position:left;max-width:min(600px,100%);max-height:75vh}}@media only screen and (max-width: 999px){[_nghost-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-height:100vh}}']})}return e})(),pY=(()=>{class e{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-news"]],inputs:{item:"item",chronomap:"chronomap"},decls:1,vars:1,consts:[[3,"src"]],template:function(r,o){1&r&&Kt(0,"img",0),2&r&&Rt("src",o.item.image,js)},styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:auto;display:flex;flex-flow:column;align-items:center;padding-bottom:8px}[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;max-width:100%;max-height:100vh}@media only screen and (min-width: 1000px){[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-position:left;max-width:min(600px,100%);max-height:75vh}}@media only screen and (max-width: 999px){[_nghost-%COMP%] img[_ngcontent-%COMP%]{width:100%;max-height:100vh}}']})}return e})();function mY(e,t){1&e&&Kt(0,"div",18),2&e&&pn("background-image","url("+en().item.image+")")}function gY(e,t){1&e&&Kt(0,"div",24),2&e&&pn("background-image","url("+en(2).item.image+")")}function _Y(e,t){if(1&e&&(We(0,"div",19),_r(1,gY,1,2,"div",20),We(2,"div",21)(3,"div",22),_n(4),et(),We(5,"div",23),_n(6),et()()()),2&e){const n=en();Ie(1),Rt("ngIf",n.item.image),Ie(3),Ri(n.item.link_title),Ie(2),Ri(n.item.link_domain)}}let yY=(()=>{class e{constructor(){this.marked=En}ngOnInit(){}get timestamp(){return Ic(this.item.post_timestamp).format("h:mm A - MMM D, YYYY")}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-twitter"]],inputs:{item:"item",chronomap:"chronomap"},decls:23,vars:11,consts:[[1,"card"],[1,"header"],[1,"profile-image"],[1,"user"],[1,"name"],[1,"username"],["src","assets/img/spectours-twitter-logo.svg",1,"twitter-logo"],[1,"caption",3,"innerHtml","rtlDetect"],["class","image",3,"background-image",4,"ngIf"],["class","link",4,"ngIf"],[1,"deets"],[1,"timestamp"],["src","assets/img/spectours-twitter-info-icon.svg",1,"info"],[1,"social"],["src","assets/img/spectours-twitter-heart-icon.svg",1,"heart","icon"],[1,"like","count"],["src","assets/img/spectours-twitter-comment-icon.svg",1,"comment","icon"],[1,"comment","count"],[1,"image"],[1,"link"],["class","link-image",3,"background-image",4,"ngIf"],[1,"link-container"],[1,"link-title"],[1,"link-domain"],[1,"link-image"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"div",1),Kt(2,"div",2),We(3,"div",3)(4,"div",4),_n(5),et(),We(6,"div",5),_n(7),et()(),Kt(8,"img",6),et(),Kt(9,"div",7),_r(10,mY,1,2,"div",8)(11,_Y,7,3,"div",9),We(12,"div",10)(13,"div",11),_n(14),et(),Kt(15,"img",12),et(),We(16,"div",13),Kt(17,"img",14),We(18,"div",15),_n(19),et(),Kt(20,"img",16),We(21,"div",17),_n(22),et()()()),2&r&&(Ie(2),pn("background-image","url("+o.item.profile_image+")"),Ie(3),Ri(o.item.name),Ie(2),Su("@",o.item.username,""),Ie(2),Rt("innerHtml",o.marked(o.item.content),ta)("rtlDetect",o.item.content),Ie(1),Rt("ngIf",!o.item.link_title&&o.item.image),Ie(1),Rt("ngIf",o.item.link_title),Ie(3),Ri(o.timestamp),Ie(5),Ri(o.item.like_count),Ie(3),Ri(o.item.comment_count))},dependencies:[Pu,Sv],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}.twitter-font[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif}.card[_ngcontent-%COMP%]{background:white;border:1px solid #C5D0D8;box-sizing:border-box;border-radius:16px;padding:16px;display:flex;flex-flow:column;align-items:stretch;max-width:344px;width:100%}.card[_ngcontent-%COMP%] a, .card[_ngcontent-%COMP%] a:hover, .card[_ngcontent-%COMP%] a:visited{color:#1b97f0}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;margin-bottom:8px}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:24px;background-position:center;background-size:cover;background-repeat:no-repeat}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%]{margin:0 10px}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal;font-weight:700;font-size:15px;line-height:18px;color:#141719}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .username[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal;font-weight:500;font-size:12px;line-height:15px;color:#5a6c7b}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .twitter-logo[_ngcontent-%COMP%]{width:23px;height:19px;align-self:flex-start;margin:6px 0 6px auto}.card[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;font-size:19px;line-height:23px;color:#141719;margin-bottom:8px}.card[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{width:100%;height:250px;background-position:center;background-size:cover;background-repeat:no-repeat;border-radius:16px;margin:0 0 8px}.card[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{height:250px;display:flex;flex-flow:column;border:1px solid #C5D0D8;box-sizing:border-box;border-radius:2px;margin:8px 0}.card[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-image[_ngcontent-%COMP%]{flex:1 1 auto;background-position:center;background-size:cover;background-repeat:no-repeat;width:100%}.card[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-container[_ngcontent-%COMP%]{padding:8px;flex:0 0 auto}.card[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-container[_ngcontent-%COMP%] .link-title[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-weight:500;font-size:16px;color:#5a6c7b}.card[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-container[_ngcontent-%COMP%] .link-domain[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-weight:400;font-size:14px;line-height:17px;color:#828282;margin-top:2px}.card[_ngcontent-%COMP%] .deets[_ngcontent-%COMP%]{border-bottom:1px solid #C5D0D8;padding-bottom:8px;display:flex;flex-flow:row;align-items:center}.card[_ngcontent-%COMP%] .deets[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:500;font-size:15px;line-height:18px;color:#5a6c7b}.card[_ngcontent-%COMP%] .deets[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{margin-left:auto;width:20px;height:20px}.card[_ngcontent-%COMP%] .social[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;padding-top:8px}.card[_ngcontent-%COMP%] .social[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-weight:500;font-size:15px;line-height:18px;color:#5a6c7b}.card[_ngcontent-%COMP%] .social[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-right:6px;width:20px;max-height:20px}.card[_ngcontent-%COMP%] .social[_ngcontent-%COMP%] .icon.comment[_ngcontent-%COMP%]{margin-left:16px}']})}return e})(),vY=(()=>{class e{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-instagram"]],inputs:{item:"item",chronomap:"chronomap"},decls:21,vars:9,consts:[[1,"card"],[1,"header"],[1,"profile-image"],[1,"user"],[1,"name"],[1,"image"],[1,"buttons"],["src","assets/img/spectours-ig-heart-icon.svg",1,"heart","icon"],["src","assets/img/spectours-ig-comment-icon.svg",1,"comment","icon"],["src","assets/img/spectours-ig-share-icon.svg",1,"share","icon"],["src","assets/img/spectours-ig-save-icon.svg",1,"save","icon"],[1,"social"],[1,"comments"],[1,"username"],[1,"comment",3,"rtlDetect"],[1,"footer"],["src","assets/img/spectours-ig-logo.svg",1,"logo"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"div",1),Kt(2,"div",2),We(3,"div",3)(4,"div",4),_n(5),et()()(),Kt(6,"div",5),We(7,"div",6),Kt(8,"img",7)(9,"img",8)(10,"img",9)(11,"img",10),et(),We(12,"div",11),_n(13),et(),We(14,"div",12)(15,"div",13),_n(16),et(),We(17,"div",14),_n(18),et()(),We(19,"div",15),Kt(20,"img",16),et()()),2&r&&(Ie(2),pn("background-image","url("+o.item.profile_image+")"),Ie(3),Ri(o.item.name),Ie(1),pn("background-image","url("+o.item.image+")"),Ie(7),Su(" ",o.item.like_count," likes "),Ie(3),Ri(o.item.username),Ie(1),Rt("rtlDetect",o.item.content),Ie(1),Ri(o.item.content))},dependencies:[Sv],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}.ig-font[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal}.card[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:stretch;background:white;border:1px solid #D6D6D6;border-radius:3px}@media only screen and (min-width: 1000px){.card[_ngcontent-%COMP%]{width:344px}}@media only screen and (max-width: 999px){.card[_ngcontent-%COMP%]{width:100%}}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;padding:12px;width:100%}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:15px;background-size:cover;background-repeat:no-repeat;background-position:center;margin-right:8px}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%]{display:block}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:600;font-size:12px;line-height:14px;color:#000}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .followers[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:500;font-size:12px;line-height:14px;color:#848484}.card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .ig-view-profile[_ngcontent-%COMP%]{margin-left:auto}.card[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{width:100%;height:100%;padding-bottom:100%;background-size:cover;background-repeat:no-repeat;background-position:center}.card[_ngcontent-%COMP%] .view-more[_ngcontent-%COMP%]{margin:0 16px;padding:13px 0;font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:700;font-size:12px;line-height:14px;color:#008af5;border-bottom:1px solid #EFEFEF}.card[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;margin:0 16px;padding:8px 0}.card[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-right:14px}.card[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card[_ngcontent-%COMP%] .social[_ngcontent-%COMP%]{margin:0 16px;padding:0 0 8px;font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-weight:700;font-size:12px;line-height:14px;color:#000}.card[_ngcontent-%COMP%] .comments[_ngcontent-%COMP%]{margin:0 16px 2px;padding:12px 0;border-bottom:1px solid #EFEFEF}.card[_ngcontent-%COMP%] .comments[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-family:Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-style:normal;font-size:12px;line-height:14px;color:#000}.card[_ngcontent-%COMP%] .comments[_ngcontent-%COMP%] .username[_ngcontent-%COMP%]{font-weight:700}.card[_ngcontent-%COMP%] .comments[_ngcontent-%COMP%] .comment[_ngcontent-%COMP%]{margin-top:6px;font-weight:400}.card[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;justify-content:flex-end;margin:8px 16px}']})}return e})();function xY(e,t){1&e&&Kt(0,"div",8),2&e&&pn("background-image","url("+en().item.image+")")}let wY=(()=>{class e{constructor(){this.marked=En}ngOnInit(){}static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-wikipedia"]],inputs:{item:"item",chronomap:"chronomap"},decls:13,vars:5,consts:[[1,"article"],[1,"title"],[1,"content"],[1,"text"],[1,"excerpt",3,"innerHtml","rtlDetect"],["class","image",3,"background-image",4,"ngIf"],[1,"bottom"],["target","_blank",1,"link",3,"href"],[1,"image"]],template:function(r,o){1&r&&(We(0,"div",0)(1,"div",1)(2,"h1"),_n(3),et(),We(4,"h2"),_n(5,"From Wikipedia, the free encyclopedia"),et()(),We(6,"div",2)(7,"div",3),Kt(8,"div",4),et(),_r(9,xY,1,2,"div",5),We(10,"div",6)(11,"a",7),_n(12,"Learn more at the English Wikipedia"),et()()()()),2&r&&(Ie(3),Ri(o.item.title),Ie(5),Rt("innerHtml",o.marked(o.item.content),ta)("rtlDetect",o.item.content),Ie(1),Rt("ngIf",o.item.image&&o.item.image.length),Ie(2),Rt("href",o.item.link_domain,js))},dependencies:[Pu,Sv],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}.font-wikipedia-georgia[_ngcontent-%COMP%]{font-family:Linux Libertine,Georgia,Times,serif;font-style:normal}.font-wikipedia-sans-serif[_ngcontent-%COMP%]{font-family:sans-serif;font-style:normal}.article[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:stretch;max-width:400px;width:100%;background:white;padding:8px 10px}.article[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Linux Libertine,Georgia,Times,serif;font-style:normal;font-weight:400;font-size:32px;line-height:36px;color:#000;border-bottom:1px solid #a2a2a2;margin:0 0 9px}.article[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-family:sans-serif;font-style:normal;font-weight:400;font-size:13px;line-height:15px;color:#000}.article[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:stretch}.article[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;height:0px;padding-bottom:66%;background-position:center;background-size:cover;background-repeat:no-repeat}.article[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-flow:column}.article[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .excerpt[_ngcontent-%COMP%]{font-family:sans-serif;font-style:normal;font-weight:400;font-size:18px;line-height:21px;color:#000;margin-bottom:6px;text-align:justify}.article[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{background-image:url(spectours-wikipedia-logo.b2e05984da61f3ad.png);background-repeat:no-repeat;background-position:bottom 4px right 4px;background-size:66px 64px;padding-top:47px;margin-top:-37px;padding-bottom:8px;margin-right:-10px}.article[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .article[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .article[_ngcontent-%COMP%] a.visited[_ngcontent-%COMP%]{font-family:Linux Libertine,Georgia,Times,serif;font-style:normal;font-weight:400;font-size:15px;line-height:17px;color:#36b;text-decoration:none}.article[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]{margin-bottom:30px}.article[_ngcontent-%COMP%] a.source-link[_ngcontent-%COMP%]{margin-bottom:10px}']})}return e})();function bY(e,t){if(1&e&&Kt(0,"app-content-audio",3),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)("activeItem",n.activeItem)}}function CY(e,t){if(1&e&&Kt(0,"app-content-video",3),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)("activeItem",n.activeItem)}}function MY(e,t){if(1&e&&Kt(0,"app-content-image",4),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)}}function EY(e,t){if(1&e&&Kt(0,"app-content-news",4),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)}}function TY(e,t){if(1&e&&Kt(0,"app-content-twitter",4),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)}}function DY(e,t){if(1&e&&Kt(0,"app-content-instagram",4),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)}}function IY(e,t){if(1&e&&Kt(0,"app-content-wikipedia",4),2&e){const n=en(2);Rt("chronomap",n.chronomap)("item",n.content)}}function SY(e,t){if(1&e&&(hf(0),_r(1,bY,1,3,"app-content-audio",1)(2,CY,1,3,"app-content-video",1)(3,MY,1,2,"app-content-image",2)(4,EY,1,2,"app-content-news",2)(5,TY,1,2,"app-content-twitter",2)(6,DY,1,2,"app-content-instagram",2)(7,IY,1,2,"app-content-wikipedia",2),df()),2&e){const n=en();Ie(1),Rt("ngIf","audio"===n.contentType),Ie(1),Rt("ngIf","video"===n.contentType),Ie(1),Rt("ngIf","image"===n.contentType),Ie(1),Rt("ngIf","news"===n.contentType),Ie(1),Rt("ngIf","twitter"===n.contentType),Ie(1),Rt("ngIf","instagram"===n.contentType),Ie(1),Rt("ngIf","wikipedia"===n.contentType)}}let PY=(()=>{class e{constructor(n){this.el=n,this.mapView=new wi,this.activated=new wi,this.contentVisible=!1,this.visibleDetector=new P3,this.activeDetector=new P3}ngOnInit(){this.activeDetector.detected.subscribe(n=>{n&&this.activated.next(this.content)}),this.visibleDetector.detected.subscribe(n=>{this.contentVisible=this.contentVisible||n})}ngAfterViewInit(){const n=this.el.nativeElement;this.visibleDetector.initVisibilityDetector(n,this.parentElement,"visible"),this.activeDetector.initVisibilityDetector(n,this.parentElement,"active")}static#e=this.\u0275fac=function(r){return new(r||e)(nt(b))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-content-item"]],inputs:{content:"content",contentType:"contentType",activeItem:"activeItem",parentElement:"parentElement",chronomap:"chronomap"},outputs:{mapView:"mapView",activated:"activated"},decls:1,vars:1,consts:[[4,"ngIf"],[3,"chronomap","item","activeItem",4,"ngIf"],[3,"chronomap","item",4,"ngIf"],[3,"chronomap","item","activeItem"],[3,"chronomap","item"]],template:function(r,o){1&r&&_r(0,SY,8,7,"ng-container",0),2&r&&Rt("ngIf",o.contentVisible)},dependencies:[Pu,uY,dY,fY,pY,yY,vY,wY],styles:["[_nghost-%COMP%]{width:100%;padding:0 16px}"]})}return e})();const AY=["baseMapEl"],OY=["detailMapEl"],kY=["timeLine"],RY=["scroller"],LY=["baseMarkers"],FY=["detailMarkers"],NY=["description"],zY=["contentFiller"],BY=["contentItem"],VY=["contentDescription"],UY=["contentRoot"],O3=(e,t)=>t.id;function jY(e,t){if(1&e){const n=no();We(0,"app-time-line",22,23),wn("selected",function(o){return qr(n),Wr(en().itemSelected(o))}),et()}if(2&e){const n=en();Rt("minDate",n.chronomap.minDate())("maxDate",n.chronomap.maxDate())("chronomap",n.chronomap)("state",n.timelineState)}}function $Y(e,t){if(1&e){const n=no();We(0,"app-content-item",26),wn("activated",function(o){return qr(n),Wr(en(2).itemActivated(o))}),et()}if(2&e){const n=en().$implicit,r=en(),o=function mS(e){return zs(function dn(){return Un.lFrame.contextLView}(),C+e)}(17);Rt("content",n)("contentType",n.type)("activeItem",r.currentItem)("parentElement",o)("chronomap",r.chronomap),bi("data-id",n.id)}}function HY(e,t){if(1&e&&(We(0,"div",24),_r(1,$Y,1,6,"app-content-item",25),et()),2&e){const n=t.$implicit,r=en();pn("width",r.detailWidthPx),vo("current",n===r.currentItem),Ie(1),Rt("ngIf",r.contentVisible&&r.currentItem)}}function GY(e,t){if(1&e&&(We(0,"div",48),_n(1),et()),2&e){const n=t.$implicit;pn("background-color",en(2).chronomap.primaryColor()+"40"),Ie(1),Ri(n)}}function qY(e,t){if(1&e&&Kt(0,"div",49),2&e){const n=en(2);Rt("innerHTML",n.marked(n.currentItem.notes),ta)("rtlDetect",n.currentItem.notes)}}function WY(e,t){if(1&e){const n=no();We(0,"div",51),wn("click",function(){const c=qr(n).$implicit;return Wr(en(3).itemSelected(c))}),We(1,"div",52)(2,"div",53),Kt(3,"app-media-icon",54),et(),We(4,"div",55),_n(5),et()(),We(6,"div",56),_n(7),et()()}if(2&e){const n=t.$implicit,r=en(3);Ie(3),Rt("type",n.type)("color",r.chronomap.primaryColor())("outline",!1),Ie(1),pn("color",r.chronomap.primaryColor()),Ie(1),Ri(n.formattedPostTimestamp),Ie(2),Ri(n.title)}}function ZY(e,t){if(1&e&&(We(0,"div",50),_n(1,"RELATED POSTS"),et(),jg(2,WY,8,7,"div",57,O3)),2&e){const n=en(2);Ie(2),$g(n.currentItem.relatedItems)}}function XY(e,t){if(1&e){const n=no();We(0,"div",58),wn("click",function(){qr(n);const o=en(2);return Wr(o.state.selectedItemId=o.currentItem.prev.id)}),et()}}function YY(e,t){if(1&e){const n=no();We(0,"div",59),wn("click",function(){qr(n);const o=en(2);return Wr(o.state.selectedItemId=o.currentItem.next.id)}),et()}}function KY(e,t){if(1&e){const n=no();We(0,"div",60),wn("click",function(){qr(n);const o=en(2);return Wr(o.state.selectedItemId=o.currentItem.prev.id)}),Kt(1,"app-media-icon",61),et()}if(2&e){const n=en(2);Ie(1),Rt("type",n.currentItem.prev.type)("outline",!1)}}function JY(e,t){if(1&e){const n=no();We(0,"div",62),wn("click",function(){qr(n);const o=en(2);return Wr(o.state.selectedItemId=o.currentItem.next.id)}),Kt(1,"app-media-icon",61),et()}if(2&e){const n=en(2);Ie(1),Rt("type",n.currentItem.next.type)("outline",!1)}}function QY(e,t){if(1&e){const n=no();We(0,"div",27,28),Kt(2,"app-media-icon",29),et(),We(3,"div",30)(4,"div",31),wn("click",function(){return qr(n),Wr(en().toggleDescriptionMode())}),et(),We(5,"div",32),_n(6),et(),Kt(7,"div",33),et(),We(8,"div",34,35)(10,"div",36)(11,"div",37)(12,"div",38),_n(13),et(),We(14,"div",39),_n(15,"Created by "),We(16,"strong"),_n(17),et()(),We(18,"div",40),jg(19,GY,2,3,"div",63,eI),et(),_r(21,qY,1,2,"div",41),We(22,"div",42),_n(23),et()(),Kt(24,"div",43),_r(25,ZY,4,0),et()(),_r(26,XY,1,0,"div",44)(27,YY,1,0,"div",45)(28,KY,2,2,"div",46)(29,JY,2,2,"div",47)}if(2&e){const n=en();Ie(2),Rt("type",n.currentItem.type)("color",n.chronomap.primaryColor()),Ie(1),pn("border-color",n.chronomap.primaryColor()),Ie(1),vo("more","More"===n.mapMode),Ie(2),Ri(n.currentItem.formattedPostTimestamp),Ie(4),pn("border-color",n.chronomap.primaryColor()),Ie(2),Rt("rtlDetect",n.currentItem.title),Ie(1),Ri(n.currentItem.title),Ie(1),pn("color",n.chronomap.primaryColor()),Ie(3),Ri(n.currentItem.formattedAuthors),Ie(2),$g(n.currentItem.tags),Ie(2),Kp(21,n.currentItem.notes?21:-1),Ie(2),Su("Last Edited: ",n.currentItem.lastModified.toLocaleDateString(),""),Ie(1),pn("border-color",n.chronomap.primaryColor()),Ie(1),Kp(25,null!=n.currentItem.relatedItems&&n.currentItem.relatedItems.length?25:-1),Ie(1),Rt("ngIf",n.currentItem.prev),Ie(1),Rt("ngIf",n.currentItem.next),Ie(1),Rt("ngIf",n.currentItem.prev),Ie(1),Rt("ngIf",n.currentItem.next)}}function eK(e,t){if(1&e&&(hf(0),We(1,"div",64),Kt(2,"app-media-icon",65),et(),df()),2&e){const n=t.$implicit,r=en();Ie(1),pn("border-color",r.chronomap.primaryColor()),Ie(1),Rt("type",n.type)("color",r.markerColor())("breathing",n===r.currentItem)}}function tK(e,t){if(1&e&&(hf(0),We(1,"div",64),Kt(2,"app-media-icon",65),et(),df()),2&e){const n=t.$implicit,r=en();Ie(1),pn("border-color",r.chronomap.primaryColor()),Ie(1),Rt("type",n.type)("color",r.markerColor())("breathing",n===r.currentItem)}}function nK(e,t){1&e&&Kt(0,"app-map-selector",66),2&e&&Rt("chronomap",en().chronomap)}let m2=class v2{constructor(t,n,r,o,c,p){this.titleSvc=t,this.sanitizer=n,this.mapSelector=r,this.state=o,this.layout=c,this.el=p,this.maps=[],this.moveEnd=new Qt,this.timelineState=ee(""),this.currentItem=null,this.selectedItemId=null,this.itemActivations=new Qt,this.mapMode="Media",this.mapModeSetter=new Qt,this.fragmentChanger=new Qt,this.baseWidthPx="100%",this.detailWidthPx="50%",this.changing=0,this.markers=[],this.markersTimeline=[],this.marked=En,this.resizeObserver=new ResizeObserver(()=>{Ps(0).subscribe(()=>{this.syncWidths(),this.maps.forEach(y=>{y.resize()})})}),this.itemActivations.pipe(v_(this),la(()=>0===this.changing),om(1e3)).subscribe(y=>{console.log("ACTIVATED",y.title),this.itemSelected(y)}),this.moveEnded=this.moveEnd.pipe(om(1e3)),Sg(()=>{const y=this.timelineState();y&&(this.zoomState=y,this.state.timelineState=y),this.titleSvc.setTitle(this.chronomap.title())},{allowSignalWrites:!0}),this.mapModeSetter.pipe(v_(this),om(1e3)).subscribe(y=>{this.mapMode=y})}ngOnInit(){this.updateMarkers(),this.backdropBackground=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(180deg, ${this.chronomap.primaryColor()}00 10.32%, ${this.chronomap.primaryColor()}80 35.85%)`),console.log("CT BG",this.contentBackground)}ngAfterViewInit(){this.chronomap.ready.subscribe(()=>{Oc.accessToken=this.chronomap.mapboxKey(),this.baseMap=new Oc.Map({container:this.baseMapEl.nativeElement,style:this.chronomap.backgroundMapSytle(),minZoom:3,attributionControl:!1,logoPosition:"bottom-right"}),this.baseMap.addControl(new Oc.AttributionControl({compact:!0}),"top-right"),this.baseMap.on("style.load",()=>{this.chronomap.mapView()&&this.baseMap.flyTo(A_.parseMapView(this.chronomap.mapView())),this.updateMarkers(!this.chronomap.mapView())}),this.detailMap=new Oc.Map({container:this.detailMapEl.nativeElement,style:this.chronomap.mapStyle(),minZoom:3,attributionControl:!1,logoPosition:"bottom-right"}),this.layout.desktop()&&(this.baseMap.addControl(new Oc.NavigationControl,"top-left"),this.detailMap.addControl(new Oc.NavigationControl,"top-left")),this.detailMap.on("style.load",()=>{this.syncMaps(),Ps(0).subscribe(()=>{console.log("RESIZE"),window.dispatchEvent(new Event("resize"))})}),this.resizeObserver.observe(this.el.nativeElement),Ps(0).subscribe(()=>{this.syncWidths(),this.initialize()})})}ngOnDestroy(){this.resizeObserver.disconnect()}syncMaps(){this.maps=[this.baseMap,this.detailMap];for(const t of this.maps)t.on("move",()=>{if(!this.syncing){this.syncing=!0,this.lastMapState={center:t.getCenter(),zoom:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing()};const n=Object.assign({padding:t.getPadding()},this.lastMapState);for(const r of this.maps)t!==r&&r.jumpTo(n);this.syncing=!1}}),t.on("moveend",()=>{Ps(1e3).subscribe(()=>{this.moveEnd.next()})})}get baseWidth(){return this.baseMapEl?.nativeElement?.offsetWidth}syncWidths(){this.baseWidthPx=this.baseWidth+"px",this.detailWidth=Math.min(this.baseWidth,Math.max(450,this.baseWidth/2)),this.detailWidthPx=this.detailWidth+"px",Ps(100).subscribe(()=>{this.scrollerComponent.nativeElement.querySelector(".current")?.scrollIntoView({behavior:"smooth",inline:"center"})})}getDetailWidth(){return this.detailOpen?"Map"===this.mapMode?"100%":this.detailWidthPx:"0px"}goto(t){this.timelineState.set(t.timelineState);const n=this.chronomap.timelineItems().find(r=>r.id===t.selectedItemId)||null;this.itemSelected(n)}itemActivated(t){t&&this.itemActivations.next(t)}itemSelected(t){if(t!==this.currentItem){if(console.log("SELECTING ITEM",t),this.state.selectedItemId=t?.id||null,!t)return this.selectedItemId=null,this.actionSub?.unsubscribe(),void(this.actionSub=Ps(0).pipe($r(()=>{this.detailOpen&&this.baseMap.flyTo({center:this.selectItemMapState.center,zoom:this.selectItemMapState.zoom,bearing:this.selectItemMapState.bearing,pitch:this.selectItemMapState.pitch,padding:0,duration:1e3}),this.detailOpen=!1}),O_(1e3)).subscribe(()=>{this.currentItem=null,this.contentVisible=!1,this.updateMarkers(),this.actionSub=null,this.observer?.disconnect()}));this.currentItem=t,this.selectedItemId=t.id,this.changing+=1,this.actionSub?.unsubscribe(),this.actionSub=Ps(0).pipe($r(()=>{this.timeLineComponent?.scrollTo(t.timestamp,t)}),O_(this.detailOpen?0:1e3),$r(()=>{this.detailOpen?this.contentItem.nativeElement?.scrollIntoView({behavior:"smooth"}):(this.mapMode="SmallMap",this.contentFiller.nativeElement?.scrollIntoView({behavior:"auto"}),this.selectItemMapState=this.lastMapState),this.detailOpen=!0,this.contentVisible=!0,this.applyMapView(t,this.detailMap,{speed:2}),this.updateMarkers()}),O_(3e3),$r(()=>{const n=this.scrollerComponent.nativeElement;n.querySelector(".current")?.scrollIntoView({behavior:"smooth",inline:"center"}),console.log("SCROLL",n.querySelector(".current")),Ps(1e3).subscribe(()=>{this.changing-=1})}),Vi(()=>this.moveEnded),as(),O_(500),$r(()=>{console.log("MOVE ENDED"),this.contentItem.nativeElement?.scrollIntoView({behavior:"smooth"})})).subscribe(()=>{this.observer?.disconnect(),this.observer=new IntersectionObserver(n=>{const r=(n=n.filter(c=>c.isIntersecting).sort((c,p)=>p.intersectionRatio-c.intersectionRatio))[0];let o=null;r.isIntersecting&&(r.target===this.contentItem.nativeElement?o="Media":r.target===this.contentDescription.nativeElement?o="More":r.target===this.contentFiller.nativeElement&&(o="Map"),console.log("INTERSECTING",n.length,r.isIntersecting,r.intersectionRatio,o),o&&this.mapModeSetter.next(o))},{threshold:.75,root:this.contentRoot.nativeElement}),console.log("INTERSECTING start"),this.observer.observe(this.contentItem.nativeElement),this.observer.observe(this.contentDescription.nativeElement),this.observer.observe(this.contentFiller.nativeElement),this.actionSub=null})}}markerColor(){return this.chronomap.primaryColor()}updateMarkers(t=!1){this.markers.forEach(n=>{n.remove()}),this.markersTimeline=this.chronomap.timelineItems().slice(),Ps(100).subscribe(()=>{const n=[{el:this.baseMarkersElement.nativeElement,map:this.baseMap},{el:this.detailMarkersElement.nativeElement,map:this.detailMap}];let r=-90,o=90,c=-180,p=180;for(const y of n){const x=y.el.children;for(let E=0;E{console.log("CLICK",F.title),this.itemSelected(F)}),ce.addEventListener("mouseenter",()=>{this.timeLineComponent.updateHovers(F.index)}),ce.addEventListener("mouseleave",()=>{this.timeLineComponent.updateHovers(null)}),this.markers.push(new Oc.Marker(ce).setLngLat($).addTo(y.map))}}if(t){const y=new Oc.LngLatBounds([p,o],[c,r]);this.baseMap.fitBounds(y,{animate:!1,padding:50})}})}toggleMapMode(){"Map"===this.mapMode||"SmallMap"===this.mapMode?this.contentItem.nativeElement?.scrollIntoView({behavior:"smooth"}):this.contentFiller.nativeElement?.scrollIntoView({behavior:"smooth"})}toggleDescriptionMode(){"More"===this.mapMode?this.contentItem.nativeElement?.scrollIntoView({behavior:"smooth"}):this.contentDescription.nativeElement?.scrollIntoView({behavior:"smooth"})}initialize(){this.chronomap.ready.pipe(v_(this),Vi(()=>this.state.state)).subscribe(t=>{this.goto(t)})}applyMapView(t,n,r=null){const o=Object.assign({},A_.parseMapView(t.geo),r||{});for(const c of t.map_layers||[])n.getLayer(c)&&n.setLayoutProperty(c,"visibility","visible");for(const c of t.off_map_layers||[])n.getLayer(c)&&n.setLayoutProperty(c,"visibility","none");n.flyTo(o)}updateLocation(t,n=!1){n?location.replace(location.pathname+"#"+t):location.hash=t}static#e=this.\u0275fac=function(n){return new(n||v2)(nt(xE),nt(i_),nt(WT),nt(EL),nt(kw),nt(b))};static#t=this.\u0275cmp=Ei({type:v2,selectors:[["app-chronomap"]],viewQuery:function(n,r){if(1&n&&(Lo(AY,7),Lo(OY,7),Lo(kY,5),Lo(RY,5),Lo(LY,5),Lo(FY,5),Lo(NY,5),Lo(zY,5),Lo(BY,5),Lo(VY,5),Lo(UY,5)),2&n){let o;wo(o=bo())&&(r.baseMapEl=o.first),wo(o=bo())&&(r.detailMapEl=o.first),wo(o=bo())&&(r.timeLineComponent=o.first),wo(o=bo())&&(r.scrollerComponent=o.first),wo(o=bo())&&(r.baseMarkersElement=o.first),wo(o=bo())&&(r.detailMarkersElement=o.first),wo(o=bo())&&(r.descriptionElement=o.first),wo(o=bo())&&(r.contentFiller=o.first),wo(o=bo())&&(r.contentItem=o.first),wo(o=bo())&&(r.contentDescription=o.first),wo(o=bo())&&(r.contentRoot=o.first)}},inputs:{chronomap:"chronomap"},decls:29,vars:31,consts:[[1,"wrapper"],[1,"base-map"],["baseMapEl",""],[3,"minDate","maxDate","chronomap","state","selected",4,"ngIf"],[1,"detail-bg"],[1,"detail"],[1,"detail-map"],["detailMapEl",""],[1,"content"],["contentRoot",""],[1,"button-close",3,"click"],[1,"filler"],["contentFiller",""],[1,"map-toggle"],[3,"click"],[1,"scroller"],["scroller","","contentItem",""],[2,"display","none"],["baseMarkers",""],[4,"ngFor","ngForOf"],["detailMarkers",""],[3,"chronomap",4,"ngIf"],[3,"minDate","maxDate","chronomap","state","selected"],["timeLine",""],[1,"scroll-card"],[3,"content","contentType","activeItem","parentElement","chronomap","activated",4,"ngIf"],[3,"content","contentType","activeItem","parentElement","chronomap","activated"],[1,"target-icon"],["targetIcon",""],[3,"type","color"],[1,"description-toggle"],[1,"description-toggle-button",3,"click"],[1,"date"],[1,"backdrop"],[1,"description"],["contentDescription",""],[1,"description-content"],[1,"inner"],[1,"title",3,"rtlDetect"],[1,"authors"],[1,"tags"],["class","notes",3,"innerHTML","rtlDetect"],[1,"last-updated"],[1,"separator"],["class","arrow",3,"click",4,"ngIf"],["class","arrow rev",3,"click",4,"ngIf"],["class","arrow-icon",3,"click",4,"ngIf"],["class","arrow-icon rev",3,"click",4,"ngIf"],[1,"tag"],[1,"notes",3,"innerHTML","rtlDetect"],[1,"title","related"],[1,"related",3,"click"],[1,"related-header"],[1,"related-icon"],[3,"type","color","outline"],[1,"related-date"],[1,"related-title"],["class","related"],[1,"arrow",3,"click"],[1,"arrow","rev",3,"click"],[1,"arrow-icon",3,"click"],["color","white",3,"type","outline"],[1,"arrow-icon","rev",3,"click"],["class","tag",3,"background-color"],[1,"mapmarker"],[3,"type","color","breathing"],[3,"chronomap"],["class","scroll-card",3,"width","current"]],template:function(n,r){1&n&&(We(0,"div",0)(1,"div",1),Kt(2,"div",null,2),et(),_r(4,jY,2,4,"app-time-line",3),We(5,"div",4)(6,"div",5),Kt(7,"div",6,7),We(9,"div",8,9)(11,"div",10),wn("click",function(){return r.itemSelected(null)}),et(),Kt(12,"div",11,12),We(14,"div",13)(15,"div",14),wn("click",function(){return r.toggleMapMode()}),et()(),We(16,"div",15,16),jg(19,HY,2,5,"div",67,O3),et(),_r(21,QY,30,23),et()()()(),We(22,"div",17,18),_r(24,eK,3,5,"ng-container",19),et(),We(25,"div",17,20),_r(27,tK,3,5,"ng-container",19),et(),_r(28,nK,1,1,"app-map-selector",21)),2&n&&(Ie(4),Rt("ngIf",null!==r.timelineState()),Ie(2),pn("width",r.getDetailWidth())("border-color",r.chronomap.primaryColor()),vo("open",r.detailOpen)("map-mode","Map"===r.mapMode),Ie(1),pn("width",r.baseWidthPx),Ie(2),pn("background-color","Map"===r.mapMode?"#00000000":r.chronomap.primaryColor()+"66"),vo("map-mode","Map"===r.mapMode)("small-map-mode","SmallMap"===r.mapMode)("media-mode","Media"===r.mapMode)("description-mode","More"===r.mapMode),Ie(5),pn("border-color",r.chronomap.primaryColor()),Ie(1),vo("map","Map"===r.mapMode),Ie(1),pn("width",r.detailWidthPx),Ie(3),$g(r.chronomap.timelineItems()),Ie(2),Kp(21,r.currentItem?21:-1),Ie(3),Rt("ngForOf",r.chronomap.timelineItems()),Ie(3),Rt("ngForOf",r.chronomap.timelineItems()),Ie(1),Rt("ngIf",r.mapSelector.showMapSelector))},dependencies:[yA,Pu,QX,CL,PY,HT,Sv],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;display:block}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .base-map[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .base-map[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%]{position:absolute;z-index:2;top:0;left:0;width:100%;height:100%;pointer-events:none;display:flex;flex-flow:column;align-items:center}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%]{width:0vw;transition:width .35s ease-in-out;height:100%;overflow:hidden;display:flex;flex-flow:column;align-items:center;pointer-events:all;position:relative}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .detail-map[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;height:100%;display:flex;flex-flow:column;align-items:center;pointer-events:none;transition:background-color .35s ease-in-out;overflow:scroll;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;scroll-snap-type:y mandatory;scroll-snap-stop:always}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;scroll-snap-align:start}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{height:calc(100% - 128px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{height:calc(100% - 104px)}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-flow:column;align-items:center;justify-content:center;scroll-snap-align:start;border-bottom:1px solid black;width:100%}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%]{height:88px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%]{height:64px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:all;width:48px;height:48px;background-repeat:no-repeat;background-position:center;background-size:contain;background-image:url(icon-map-fullscreen.156322c5e53dd53a.svg);cursor:pointer}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.map-mode[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background-image:url(icon-map-exit-fullscreen.8072977c6263c547.svg)}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.small-map-mode[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%]{border:none}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.small-map-mode[_ngcontent-%COMP%] .map-toggle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-flow:row;align-items:flex-start;overflow-x:scroll;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;width:50%;overflow-y:hidden;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%]{height:calc(100% - 280px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%]{height:calc(100% - 140px)}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;flex-flow:column;align-items:center;justify-content:center;scroll-snap-align:center;height:100%;overflow-y:scroll;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;opacity:0;transition:opacity .35s ease-in-out}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card.current[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%] app-content-item{display:flex;flex-flow:column;justify-content:flex-start;align-items:center;width:100%;height:100%}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%] app-content-item{padding:0 24px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%] app-content-item{width:100%;padding:16px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%] app-content-item app-content-video{width:100%;height:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .button-close[_ngcontent-%COMP%]{flex:0 0 auto;pointer-events:all;width:24px;height:24px;background-image:url(detail-button-close.da2e963000196751.svg);background-repeat:no-repeat;background-size:contain;background-position:center;cursor:pointer;position:sticky;top:16px;margin-right:16px;align-self:flex-end;margin-bottom:-24px;transition-delay:0s;transition-duration:.35s;transition-timing-function:ease-out;transition-property:right}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%]{flex:0 0 auto;width:100%;display:flex;flex-flow:column;align-items:center;justify-content:center;position:relative;border-top:1px solid black}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%]{height:192px;padding-top:72px;padding-bottom:72px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%]{height:76px;padding-top:20px;padding-bottom:8px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .description-toggle-button[_ngcontent-%COMP%]{pointer-events:all;width:48px;height:48px;background-repeat:no-repeat;background-position:center;background-size:contain;background-image:url(icon-scroll-down.c5242ae5ac022d04.svg);cursor:pointer;z-index:1}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{position:absolute;color:#e0e0e0;text-align:center;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-weight:400;line-height:normal;text-transform:uppercase;z-index:1}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{bottom:40px;font-size:16px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{bottom:56px;font-size:13px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .backdrop[_ngcontent-%COMP%]{display:block;position:absolute;bottom:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:linear-gradient(180deg,#00000000 0%,#00000080 100%)}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.description-mode[_ngcontent-%COMP%] .description-toggle[_ngcontent-%COMP%] .description-toggle-button[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{width:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-start;flex:0 0 auto;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:#00000080;padding:0 16px;scroll-snap-align:end}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{height:calc(100% - 232px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{height:calc(100% - 116px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{padding-bottom:10px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%]{overflow-y:auto;scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar;border-top:1px solid black;width:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-start;padding:16px 0}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;color:#fff;gap:8px}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{width:100%;max-width:360px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;gap:4px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%]{padding:0 12px;height:32px;display:flex;flex-flow:row;align-items:center;justify-content:center;white-space:nowrap;color:#fff;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:23px;letter-spacing:.15px;text-transform:lowercase;border-radius:4px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .authors[_ngcontent-%COMP%]{text-align:center;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:23px;letter-spacing:.15px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .authors[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%]{color:#fff;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-size:15px;font-style:normal;font-weight:400;line-height:23px;letter-spacing:.15px;align-self:flex-start;width:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .notes[_ngcontent-%COMP%] *{margin:0;color:inherit}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .last-updated[_ngcontent-%COMP%]{color:#828282;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:23px;letter-spacing:.15px;align-self:flex-start}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#e0e0e0;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:16px;font-weight:700;line-height:normal;text-transform:uppercase;text-align:center}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{margin:16px 0;height:0;width:100%;border-bottom:1px solid black}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%]{display:flex;flex-flow:column;margin:16px 0;cursor:pointer}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%]{width:100%;max-width:360px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%] .related-header[_ngcontent-%COMP%]{display:flex;flex-flow:row;gap:8px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%] .related-header[_ngcontent-%COMP%] .related-icon[_ngcontent-%COMP%]{width:24px;height:24px;flex:0 0 auto}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%] .related-header[_ngcontent-%COMP%] .related-date[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:23px;letter-spacing:.15px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .description-content[_ngcontent-%COMP%] .related[_ngcontent-%COMP%] .related-title[_ngcontent-%COMP%]{color:#fff;font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal;font-size:15px;font-weight:400;line-height:23px;letter-spacing:.15px;text-align:left;width:100%}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{pointer-events:all;width:33px;height:14px;background-image:url(arrow-next.e5fa61535aa55d94.svg);background-repeat:no-repeat;background-size:contain;background-position:center;cursor:pointer;position:absolute;z-index:1;transition-delay:0s;transition-duration:.35s;transition-timing-function:ease-out}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{top:calc(200% - 231px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{top:calc(200% - 149px)}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:not(.rev){transition-property:left}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:not(.rev){left:-200px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:not(.rev){left:-200px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow.rev[_ngcontent-%COMP%]{transition-property:right;transform:scaleX(-1)}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow.rev[_ngcontent-%COMP%]{right:-200px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow.rev[_ngcontent-%COMP%]{right:-200px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{pointer-events:all;cursor:pointer;position:absolute;height:24px;width:24px;z-index:1;transition-delay:0s;transition-duration:.35s;transition-timing-function:ease-out}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{top:calc(200% - 236px)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{top:calc(200% - 154px)}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]:not(.rev){transition-property:left;left:-200px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon.rev[_ngcontent-%COMP%]{transition-property:right;right:-200px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .target-icon[_ngcontent-%COMP%]{position:absolute;transition:top .35s ease-in-out;z-index:1;opacity:0;transition-property:opacity,top}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.small-map-mode[_ngcontent-%COMP%] .target-icon[_ngcontent-%COMP%]{opacity:1;top:50%}}@media only screen and (min-width: 1000px) and only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.media-mode[_ngcontent-%COMP%] .target-icon[_ngcontent-%COMP%]{top:calc(200% - 296px)}}@media only screen and (min-width: 1000px) and only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%] .content.media-mode[_ngcontent-%COMP%] .target-icon[_ngcontent-%COMP%]{top:calc(200% - 156px)}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{transition-delay:2s}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:not(.rev){left:40px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:not(.rev){left:16px}}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow.rev[_ngcontent-%COMP%]{right:40px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow.rev[_ngcontent-%COMP%]{right:16px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{transition-delay:2s}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]:not(.rev){left:56px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon.rev[_ngcontent-%COMP%]{right:56px}}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]:not(.rev){left:80px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .arrow-icon.rev[_ngcontent-%COMP%]{right:80px}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open.map-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{width:100%;bottom:0;padding-bottom:40px;padding-top:16px}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open.map-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .backdrop[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%]:not(.map-mode){border-left:1px solid;border-right:1px solid}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%]:not(.map-mode) .content[_ngcontent-%COMP%]{pointer-events:all}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%]:not(.map-mode) .content[_ngcontent-%COMP%] .scroller[_ngcontent-%COMP%] .scroll-card[_ngcontent-%COMP%]{opacity:1}@media only screen and (max-width: 999px){[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .detail-bg[_ngcontent-%COMP%] .detail.open[_ngcontent-%COMP%]:not(.map-mode) .content[_ngcontent-%COMP%] .backdrop[_ngcontent-%COMP%]{display:block}}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] app-time-line[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;left:0}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%] .mapmarker[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:16px;border:1px solid;background:white;display:flex;flex-flow:column;align-items:center;justify-content:center;cursor:pointer}[_nghost-%COMP%] app-map-selector[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:21;background-color:#fff}']})};function rK(e,t){if(1&e){const n=no();We(0,"app-add-new-bar",24),wn("close",function(){return qr(n),Wr(en(3).addNew=!1)}),et()}if(2&e){const n=en(3);vo("open",n.addNewOpen),Rt("chronomap",n.chronomap_)}}function iK(e,t){if(1&e){const n=no();We(0,"app-infobar",24),wn("close",function(){return qr(n),Wr(en(2).info=!1)}),et(),_r(1,rK,1,3,"app-add-new-bar",25)}if(2&e){const n=en(2);vo("open",n.info),Rt("chronomap",n.chronomap_),Ie(1),Rt("ngIf",n.addNew)}}function oK(e,t){if(1&e){const n=no();We(0,"app-add-new-bar",24),wn("close",function(){return qr(n),Wr(en(3).addNew=!1)}),et()}if(2&e){const n=en(3);vo("open",n.addNewOpen),Rt("chronomap",n.chronomap_)}}function sK(e,t){if(1&e){const n=no();pi(),Er(),We(0,"app-infobar",24),wn("close",function(){return qr(n),Wr(en(2).info=!1)}),et(),_r(1,oK,1,3,"app-add-new-bar",25)}if(2&e){const n=en(2);vo("open",n.info),Rt("chronomap",n.chronomap_),Ie(1),Rt("ngIf",n.addNew)}}m2=Yi([bw()],m2);const aK=e=>["/",e];function lK(e,t){if(1&e){const n=no();We(0,"div",1)(1,"div",2),Kt(2,"app-chronomap",3),_r(3,iK,2,4),et(),We(4,"div",4)(5,"div",5)(6,"div",6),wn("click",function(){qr(n);const o=en();return o.sortFilter=!0,Wr(o.mobileMenu=!1)}),We(7,"span"),_n(8,"Sort & Filter"),et()(),We(9,"div",6),wn("click",function(){qr(n);const o=en();return o.addNew=!0,Wr(o.mobileMenu=!1)}),We(10,"span"),_n(11,"Add your perspective"),et()(),We(12,"div",6),wn("click",function(){qr(n);const o=en();return o.info=!0,Wr(o.mobileMenu=!1)}),We(13,"span"),_n(14,"About"),et()()(),We(15,"div",7)(16,"a",8),Kt(17,"img",9)(18,"img",10),et(),We(19,"div",11)(20,"div",12)(21,"h1"),_n(22),et(),Kt(23,"h2",13),et()(),We(24,"div",14)(25,"img",15),wn("click",function(){return qr(n),Wr(en().addNew=!0)}),et(),pi(),We(26,"svg",16),wn("click",function(){return qr(n),Wr(en().info=!0)}),Kt(27,"path",17)(28,"path",18)(29,"path",19),et()(),Er(),We(30,"div",20),pi(),We(31,"svg",21),wn("click",function(){qr(n);const o=en();return Wr(o.mobileMenu=!o.mobileMenu)}),We(32,"g",22),Kt(33,"path",23),et()()()()(),_r(34,sK,2,4),et()}if(2&e){const n=en();let r,o,c,p,y,x,E,P,F,V,$,ce,_e,Pe,De,Ne;Ie(2),Rt("chronomap",n.chronomap_),Ie(1),Kp(3,n.layout.desktop()?3:-1),Ie(1),vo("mobile-visible",n.mobileMenu),Ie(1),pn("color",null==(r=n.chronomap())?null:r.secondaryColor()),Ie(1),pn("border-color",(null==(o=n.chronomap())?null:o.secondaryColor())+"40"),Ie(3),pn("border-color",(null==(c=n.chronomap())?null:c.secondaryColor())+"40"),Ie(3),pn("border-color",(null==(p=n.chronomap())?null:p.secondaryColor())+"40"),Ie(3),pn("border-color",null==(y=n.chronomap())?null:y.secondaryColor()),Ie(1),Rt("routerLink",function $S(e,t,n,r){return HS(lt(),li(),e,t,n,r)}(30,aK,null==(x=n.chronomap())?null:x.directoryId)),Ie(1),Rt("src",null==(E=n.chronomap())?null:E.logo(),js),Ie(1),Rt("src",null==(P=n.chronomap())?null:P.logo(),js),Ie(3),pn("color",null==(F=n.chronomap())?null:F.primaryColor()),Ie(1),Ri(null==(V=n.chronomap())?null:V.title()),Ie(1),pn("color",null==($=n.chronomap())?null:$.primaryColor()),Rt("innerHTML",n.marked((null==(ce=n.chronomap())?null:ce.subtitle())||""),ta),Ie(4),bi("stroke",null==(_e=n.chronomap())?null:_e.primaryColor()),Ie(1),bi("fill",null==(Pe=n.chronomap())?null:Pe.primaryColor()),Ie(1),bi("fill",null==(De=n.chronomap())?null:De.primaryColor()),Ie(1),pn("transform",n.mobileMenu?null:"rotate(180deg)"),Ie(3),bi("fill",null==(Ne=n.chronomap())?null:Ne.primaryColor()),Ie(1),Kp(34,n.layout.mobile()?34:-1)}}let g2=class x2{constructor(t,n,r,o,c,p){this.data=t,this.route=n,this.mapSvc=r,this.router=o,this.state=c,this.layout=p,this.LOCAL_STORAGE_KEY="chronomap-info-",this.slug=null,this.chronomap=ee(null),this._info=!1,this._addNew=!1,this._sortFilter=!1,this.addNewOpen=!1,this.sortFilterOpen=!1,this.mobileMenu=!1,this.marked=En,this.route.params.pipe(as()).subscribe(y=>{const x=parseInt(y.dbid);this.data.fetchData(x),this.slug=y.slug,this.loadChronomap(this.data.directory.chronomaps(),this.slug),this._info="opened"!==localStorage.getItem(this.storageKey)}),Sg(()=>{const y=this.data.directory.chronomaps();this.loadChronomap(y,this.slug)},{allowSignalWrites:!0}),this.router.events.pipe(v_(this),la(y=>y instanceof ku),yn(y=>{const E=new URL("http://example.com"+y.url),P=Object.fromEntries(E.searchParams);return{fragment:E.hash.slice(1),params:P}})).subscribe(({fragment:y,params:x})=>{this.state.initFromUrl(y,x)})}loadChronomap(t,n){if(n&&t.length>0){const r=t.find(o=>o.slug()===n);r&&this.chronomap.set(r)}}get info(){return this._info}set info(t){console.log("INFO=",t),this._addNew=!1,this._sortFilter=!1,this._info=t,localStorage.setItem(this.storageKey,"opened")}get addNew(){return this._addNew}set addNew(t){this._info=!1,this._sortFilter=!1,t?(this._addNew=t,Ps(0).subscribe(()=>{this.addNewOpen=t})):(this.addNewOpen=t,Ps(300).subscribe(()=>{this._addNew=t}))}get sortFilter(){return this._sortFilter}set sortFilter(t){this._info=!1,this._addNew=!1,t?(this._sortFilter=t,Ps(0).subscribe(()=>{this._sortFilter=t})):(this._sortFilter=t,Ps(300).subscribe(()=>{this._sortFilter=t}))}get chronomap_(){return this.chronomap()||{}}get storageKey(){return this.LOCAL_STORAGE_KEY+this.slug}static#e=this.\u0275fac=function(n){return new(n||x2)(nt(Ow),nt(Ru),nt(A_),nt(Ia),nt(EL),nt(kw))};static#t=this.\u0275cmp=Ei({type:x2,selectors:[["app-chronomap-page"]],decls:1,vars:1,consts:[["class","layout",4,"ngIf"],[1,"layout"],[1,"content"],[3,"chronomap"],[1,"headers"],[1,"mobile-menu","layout-mobile"],[1,"mobile-menu-item",3,"click"],[1,"header"],[3,"routerLink"],[1,"logo","layout-mobile",3,"src"],[1,"logo","layout-desktop",3,"src"],[1,"text"],[1,"header-title"],[3,"innerHTML"],[1,"controls","layout-desktop"],["src","assets/img/icon-add-new.svg",1,"add-new",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"info",3,"click"],["d","M6.86098 4.30891C8.38213 3.2925 10.1705 2.75 12 2.75C13.2147 2.75 14.4176 2.98926 15.5398 3.45411C16.6621 3.91897 17.6818 4.60032 18.5407 5.45926C19.3997 6.3182 20.081 7.33792 20.5459 8.46018C21.0107 9.58244 21.25 10.7853 21.25 12C21.25 13.8295 20.7075 15.6179 19.6911 17.139C18.6747 18.6602 17.23 19.8458 15.5398 20.5459C13.8496 21.246 11.9897 21.4292 10.1954 21.0723C8.4011 20.7154 6.7529 19.8344 5.45927 18.5407C4.16563 17.2471 3.28465 15.5989 2.92774 13.8046C2.57083 12.0103 2.75401 10.1504 3.45412 8.46018C4.15423 6.76996 5.33982 5.32531 6.86098 4.30891Z","stroke-width","1.5"],["d","M12 9C12.5523 9 13 8.55228 13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8C11 8.55228 11.4477 9 12 9Z"],["d","M12 10C11.7348 10 11.4804 10.1054 11.2929 10.2929C11.1054 10.4804 11 10.7348 11 11V16C11 16.2652 11.1054 16.5196 11.2929 16.7071C11.4804 16.8946 11.7348 17 12 17C12.2652 17 12.5196 16.8946 12.7071 16.7071C12.8946 16.5196 13 16.2652 13 16V11C13 10.7348 12.8946 10.4804 12.7071 10.2929C12.5196 10.1054 12.2652 10 12 10Z"],[1,"controls","layout-mobile"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"mobileMenu",3,"click"],["id","media-type"],["id","Vector","d","M11.9998 8.49981C12.1314 8.49905 12.2619 8.52428 12.3837 8.57404C12.5056 8.62381 12.6164 8.69713 12.7098 8.78981L16.7098 12.7898C16.8031 12.8831 16.877 12.9937 16.9275 13.1156C16.9779 13.2374 17.0039 13.368 17.0039 13.4998C17.0039 13.6317 16.9779 13.7622 16.9275 13.8841C16.877 14.0059 16.8031 14.1166 16.7098 14.2098C16.6166 14.3031 16.5059 14.377 16.3841 14.4275C16.2622 14.4779 16.1317 14.5039 15.9998 14.5039C15.868 14.5039 15.7374 14.4779 15.6156 14.4275C15.4937 14.377 15.3831 14.3031 15.2898 14.2098L11.9998 10.8998L8.69981 14.0798C8.60782 14.1821 8.49572 14.2643 8.3705 14.3213C8.24529 14.3783 8.10967 14.4088 7.97211 14.411C7.83456 14.4132 7.69803 14.387 7.57108 14.334C7.44412 14.281 7.32947 14.2024 7.23428 14.103C7.1391 14.0037 7.06543 13.8858 7.01789 13.7567C6.97034 13.6276 6.94995 13.4901 6.95798 13.3528C6.966 13.2154 7.00228 13.0812 7.06454 12.9586C7.1268 12.8359 7.21371 12.7274 7.31981 12.6398L11.3198 8.77981C11.5027 8.6035 11.7458 8.50339 11.9998 8.49981Z"],[3,"chronomap","close"],[3,"chronomap","open","close",4,"ngIf"]],template:function(n,r){1&n&&_r(0,lK,35,32,"div",0),2&n&&Rt("ngIf",r.chronomap())},dependencies:[Pu,yw,HZ,YX,m2],styles:['.font-sourcecode[_ngcontent-%COMP%]{font-family:Source Code Pro,monospace;font-style:normal}.font-manrope[_ngcontent-%COMP%]{font-family:Manrope,Assistant,sans-serif;font-feature-settings:"tnum" on,"lnum" on;font-style:normal}.font-inter[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-style:normal}.no-scrollbars[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:-ms-autohiding-scrollbar}.no-scrollbars[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.background-image[_ngcontent-%COMP%]{background-repeat:no-repeat;background-position:center;background-size:contain}.unselecteble[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media only screen and (max-width: 999px){ .layout-desktop{display:none!important}}@media only screen and (min-width: 1000px){ .layout-mobile{display:none!important}}[_nghost-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}[_nghost-%COMP%] .layout[_ngcontent-%COMP%]{width:100%;max-width:100%;height:100%;display:flex;align-items:stretch;overflow:hidden;position:relative}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%]{flex-flow:row}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%]{flex-flow:column-reverse}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;height:100%;position:relative;overflow:hidden;-moz-overflow:hidden;clip-path:inset(0)}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-flow:row}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-infobar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar[_ngcontent-%COMP%]{transition-property:transform margin-left;transition-duration:.5s;z-index:20}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-infobar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar[_ngcontent-%COMP%]{top:0;height:100%;transform:translate(100%);width:360px;margin-left:-360px;flex:0 0 auto}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-infobar.open[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar.open[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar.open[_ngcontent-%COMP%]{margin-left:4px;transform:translate(0)}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-infobar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;width:100%;height:auto;transform:translateY(100%)}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-infobar.open[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar.open[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar.open[_ngcontent-%COMP%]{transform:translateY(0)}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-add-new-bar[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] app-layers-bar[_ngcontent-%COMP%]{min-height:80vh}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%]{z-index:2;background-color:#fff}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%]{height:64px;overflow-y:visible}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .mobile-menu[_ngcontent-%COMP%]{transform:translateY(-192px);transition:transform .3s ease-in-out}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers.mobile-visible[_ngcontent-%COMP%] .header[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers.mobile-visible[_ngcontent-%COMP%] .mobile-menu[_ngcontent-%COMP%]{transform:translateY(0)}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .mobile-menu[_ngcontent-%COMP%]{padding:0 8px;display:flex;flex-flow:column;align-items:stretch;background-color:#fff}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .mobile-menu[_ngcontent-%COMP%] .mobile-menu-item[_ngcontent-%COMP%]{width:100%;height:64px;border-bottom:1px solid black;font-family:Source Code Pro,monospace;font-style:normal;font-size:14px;font-weight:400;line-height:21px;text-transform:uppercase;display:flex;align-items:center;justify-content:center;cursor:pointer}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;background-color:#fff}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{width:96px;min-width:96px;height:100%;flex-flow:column;padding:16px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{width:100%;overflow:hidden;height:64px;min-height:64px;flex-flow:row;padding:8px 8px 8px 0;border-bottom:solid 1px black}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header.layout-mobile[_ngcontent-%COMP%]{border-bottom:1px solid var(--primary-025-trans, rgba(252, 13, 28, .25))}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{flex:0 0 auto;margin:0;object-fit:contain;cursor:pointer}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:80px;height:64px;margin-bottom:0}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:60px;height:48px;margin-top:12px;overflow:hidden}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{transform:rotate(90deg);transform-origin:96px/2 96px/2;flex-flow:row;align-items:center;width:96px;height:96px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 1 auto;flex-flow:column;align-items:flex-start;margin-right:12px;overflow:hidden}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{overflow:hidden;width:100%}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h1, [_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h2{font-family:Source Code Pro,monospace;font-style:normal;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h1{font-weight:700;text-transform:uppercase}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h1{font-size:30px}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h1{font-size:14px;line-height:18px}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h2{font-weight:500}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h2{font-size:14px;line-height:18px}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h2 *{margin:0;text-overflow:ellipsis;overflow:hidden}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;gap:8px}@media only screen and (min-width: 1000px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%]{flex-flow:column;margin-top:auto}}@media only screen and (max-width: 999px){[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%]{flex-flow:row;margin-left:auto}}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%] img[_ngcontent-%COMP%], [_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:48px;height:48px;cursor:pointer}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:20px;height:20px}[_nghost-%COMP%] .layout[_ngcontent-%COMP%] .headers[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%] .mobileMenu[_ngcontent-%COMP%]{width:20px;height:20px}']})};function cK(e,t){1&e&&Kt(0,"img",0)}g2=Yi([bw()],g2);const uK=[{path:":dbid/:slug",component:g2},{path:":dbid",component:GT},{path:"",component:(()=>{class e{constructor(n){this.route=n,this.found=!0,n.params.subscribe(r=>{console.log("params",r);try{const o=parseInt(r.dbid);this.found=o>0}catch{this.found=!1}})}static#e=this.\u0275fac=function(r){return new(r||e)(nt(Ru))};static#t=this.\u0275cmp=Ei({type:e,selectors:[["app-homepage"]],standalone:!0,features:[vM],decls:1,vars:1,consts:[["src","assets/img/404.png"]],template:function(r,o){1&r&&_r(0,cK,1,0,"img",0),2&r&&Kp(0,o.found?-1:0)},styles:["[_nghost-%COMP%]{display:flex;flex-flow:row;justify-content:center;align-items:center;width:100%;height:100%}[_nghost-%COMP%] img[_ngcontent-%COMP%]{max-width:80%;height:50%}"]})}return e})()}];let hK=(()=>{class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e});static#n=this.\u0275inj=ts({imports:[KO.forRoot(uK),KO]})}return e})();var dK=ze(238),fK=ze(944);Ic.extend(dK),Ic.extend(fK);let _2=class w2{constructor(t){this.route=t,this.found=!0;const n=new En.Renderer,r=n.link;n.link=(o,c,p)=>{const y=o.startsWith(`${location.protocol}//${location.hostname}`),x=r.call(n,o,c,p);return y?x:x.replace(/^
    {class e{static#e=this.\u0275fac=function(r){return new(r||e)};static#t=this.\u0275mod=gs({type:e,bootstrap:[_2]});static#n=this.\u0275inj=ts({imports:[jV,Z$,$X,hK]})}return e})();VV().bootstrapModule(pK).catch(e=>console.error(e))},391:function(zt,St,ze){var st;zt=ze.nmd(zt),function(ke){"object"==typeof global&&global;var ye=function(bt){this.message=bt};(ye.prototype=new Error).name="InvalidCharacterError";var Me=function(bt){throw new ye(bt)},xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=/[\t\n\f\r ]/g,Qe={encode:function(bt){bt=String(bt),/[^\0-\xFF]/.test(bt)&&Me("The string to be encoded contains characters outside of the Latin1 range.");for(var ot,Se,Ce,Ee,ft=bt.length%3,oe="",Ge=-1,ut=bt.length-ft;++Ge>18&63)+xe.charAt(Ee>>12&63)+xe.charAt(Ee>>6&63)+xe.charAt(63&Ee);return 2==ft?(ot=bt.charCodeAt(Ge)<<8,Se=bt.charCodeAt(++Ge),oe+=xe.charAt((Ee=ot+Se)>>10)+xe.charAt(Ee>>4&63)+xe.charAt(Ee<<2&63)+"="):1==ft&&(Ee=bt.charCodeAt(Ge),oe+=xe.charAt(Ee>>2)+xe.charAt(Ee<<4&63)+"=="),oe},decode:function(bt){var ft=(bt=String(bt).replace(Ae,"")).length;ft%4==0&&(ft=(bt=bt.replace(/==?$/,"")).length),(ft%4==1||/[^+a-zA-Z0-9/]/.test(bt))&&Me("Invalid character: the string to be decoded is not correctly encoded.");for(var Ge,ot,oe=0,Se="",Ce=-1;++Ce>(-2*oe&6)));return Se},version:"0.1.0"};void 0!==(st=function(){return Qe}.call(St,ze,St,zt))&&(zt.exports=st)}()},304:function(zt){zt.exports=function(){"use strict";var ke="millisecond",we="second",h="minute",W="hour",ye="day",Me="week",xe="month",Ae="quarter",ct="year",Vt="date",Qe="Invalid Date",It=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,bt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ft={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Jt){var Ht=["th","st","nd","rd"],Ft=Jt%100;return"["+Jt+(Ht[(Ft-20)%10]||Ht[Ft]||Ht[0])+"]"}},oe=function(Jt,Ht,Ft){var un=String(Jt);return!un||un.length>=Ht?Jt:""+Array(Ht+1-un.length).join(Ft)+Jt},Ge={s:oe,z:function(Jt){var Ht=-Jt.utcOffset(),Ft=Math.abs(Ht),un=Math.floor(Ft/60),pt=Ft%60;return(Ht<=0?"+":"-")+oe(un,2,"0")+":"+oe(pt,2,"0")},m:function Jt(Ht,Ft){if(Ht.date()1)return Jt(sn[0])}else{var Vn=Ht.name;Se[Vn]=Ht,pt=Vn}return!un&&pt&&(ot=pt),pt||!un&&ot},ut=function(Jt,Ht){if(Ye(Jt))return Jt.clone();var Ft="object"==typeof Ht?Ht:{};return Ft.date=Jt,Ft.args=arguments,new Pt(Ft)},vt=Ge;vt.l=Ee,vt.i=Ye,vt.w=function(Jt,Ht){return ut(Jt,{locale:Ht.$L,utc:Ht.$u,x:Ht.$x,$offset:Ht.$offset})};var Pt=function(){function Jt(Ft){this.$L=Ee(Ft.locale,null,!0),this.parse(Ft),this.$x=this.$x||Ft.x||{},this[Ce]=!0}var Ht=Jt.prototype;return Ht.parse=function(Ft){this.$d=function(un){var pt=un.date,Dn=un.utc;if(null===pt)return new Date(NaN);if(vt.u(pt))return new Date;if(pt instanceof Date)return new Date(pt);if("string"==typeof pt&&!/Z$/i.test(pt)){var sn=pt.match(It);if(sn){var Vn=sn[2]-1||0,mr=(sn[7]||"0").substring(0,3);return Dn?new Date(Date.UTC(sn[1],Vn,sn[3]||1,sn[4]||0,sn[5]||0,sn[6]||0,mr)):new Date(sn[1],Vn,sn[3]||1,sn[4]||0,sn[5]||0,sn[6]||0,mr)}}return new Date(pt)}(Ft),this.init()},Ht.init=function(){var Ft=this.$d;this.$y=Ft.getFullYear(),this.$M=Ft.getMonth(),this.$D=Ft.getDate(),this.$W=Ft.getDay(),this.$H=Ft.getHours(),this.$m=Ft.getMinutes(),this.$s=Ft.getSeconds(),this.$ms=Ft.getMilliseconds()},Ht.$utils=function(){return vt},Ht.isValid=function(){return this.$d.toString()!==Qe},Ht.isSame=function(Ft,un){var pt=ut(Ft);return this.startOf(un)<=pt&&pt<=this.endOf(un)},Ht.isAfter=function(Ft,un){return ut(Ft)0,Se<=ot.r||!ot.r){Se<=1&&Ge>0&&(ot=ft[Ge-1]);var Ce=bt[ot.l];ct&&(Se=ct(""+Se)),Qe="string"==typeof Ce?Ce.replace("%d",Se):Ce(Se,Me,ot.l,It);break}}if(Me)return Qe;var Ye=It?bt.future:bt.past;return"function"==typeof Ye?Ye(Qe):Ye.replace("%s",Qe)},ke.to=function(ye,Me){return h(ye,Me,this,!0)},ke.from=function(ye,Me){return h(ye,Me,this)};var W=function(ye){return ye.$u?st.utc():st()};ke.toNow=function(ye){return this.to(W(this),ye)},ke.fromNow=function(ye){return this.from(W(this),ye)}}}()},944:function(zt){zt.exports=function(){"use strict";var ze=/[+-]\d\d(?::?\d\d)?/g,st=/([+-]|\d\d)/g;return function(ke,we,h){var W=we.prototype;h.utc=function(Qe){return new we({date:Qe,utc:!0,args:arguments})},W.utc=function(Qe){var It=h(this.toDate(),{locale:this.$L,utc:!0});return Qe?It.add(this.utcOffset(),"minute"):It},W.local=function(){return h(this.toDate(),{locale:this.$L,utc:!1})};var ye=W.parse;W.parse=function(Qe){Qe.utc&&(this.$u=!0),this.$utils().u(Qe.$offset)||(this.$offset=Qe.$offset),ye.call(this,Qe)};var Me=W.init;W.init=function(){if(this.$u){var Qe=this.$d;this.$y=Qe.getUTCFullYear(),this.$M=Qe.getUTCMonth(),this.$D=Qe.getUTCDate(),this.$W=Qe.getUTCDay(),this.$H=Qe.getUTCHours(),this.$m=Qe.getUTCMinutes(),this.$s=Qe.getUTCSeconds(),this.$ms=Qe.getUTCMilliseconds()}else Me.call(this)};var xe=W.utcOffset;W.utcOffset=function(Qe,It){var bt=this.$utils().u;if(bt(Qe))return this.$u?0:bt(this.$offset)?xe.call(this):this.$offset;if("string"==typeof Qe&&null===(Qe=function(ot){void 0===ot&&(ot="");var Se=ot.match(ze);if(!Se)return null;var Ce=(""+Se[0]).match(st)||["-",0,0],Ee=60*+Ce[1]+ +Ce[2];return 0===Ee?0:"+"===Ce[0]?Ee:-Ee}(Qe)))return this;var ft=Math.abs(Qe)<=16?60*Qe:Qe,oe=this;if(It)return oe.$offset=ft,oe.$u=0===Qe,oe;if(0!==Qe){var Ge=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(oe=this.local().add(ft+Ge,"minute")).$offset=ft,oe.$x.$localOffset=Ge}else oe=this.utc();return oe};var Ae=W.format;W.format=function(Qe){return Ae.call(this,Qe||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},W.valueOf=function(){var Qe=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Qe},W.isUTC=function(){return!!this.$u},W.toISOString=function(){return this.toDate().toISOString()},W.toString=function(){return this.toDate().toUTCString()};var ct=W.toDate;W.toDate=function(Qe){return"s"===Qe&&this.$offset?h(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():ct.call(this)};var Vt=W.diff;W.diff=function(Qe,It,bt){if(Qe&&this.$u===Qe.$u)return Vt.call(this,Qe,It,bt);var ft=this.local(),oe=h(Qe).local();return Vt.call(ft,oe,It,bt)}}}()},16:zt=>{"use strict";var st,St="object"==typeof Reflect?Reflect:null,ze=St&&"function"==typeof St.apply?St.apply:function(Ce,Ye,Ee){return Function.prototype.apply.call(Ce,Ye,Ee)};st=St&&"function"==typeof St.ownKeys?St.ownKeys:Object.getOwnPropertySymbols?function(Ce){return Object.getOwnPropertyNames(Ce).concat(Object.getOwnPropertySymbols(Ce))}:function(Ce){return Object.getOwnPropertyNames(Ce)};var we=Number.isNaN||function(Ce){return Ce!=Ce};function h(){h.init.call(this)}zt.exports=h,zt.exports.once=function oe(Se,Ce){return new Promise(function(Ye,Ee){function ut(Pt){Se.removeListener(Ce,vt),Ee(Pt)}function vt(){"function"==typeof Se.removeListener&&Se.removeListener("error",ut),Ye([].slice.call(arguments))}ot(Se,Ce,vt,{once:!0}),"error"!==Ce&&function Ge(Se,Ce,Ye){"function"==typeof Se.on&&ot(Se,"error",Ce,Ye)}(Se,ut,{once:!0})})},h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var W=10;function ye(Se){if("function"!=typeof Se)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Se)}function Me(Se){return void 0===Se._maxListeners?h.defaultMaxListeners:Se._maxListeners}function xe(Se,Ce,Ye,Ee){var ut,vt,Pt;if(ye(Ye),void 0===(vt=Se._events)?(vt=Se._events=Object.create(null),Se._eventsCount=0):(void 0!==vt.newListener&&(Se.emit("newListener",Ce,Ye.listener?Ye.listener:Ye),vt=Se._events),Pt=vt[Ce]),void 0===Pt)Pt=vt[Ce]=Ye,++Se._eventsCount;else if("function"==typeof Pt?Pt=vt[Ce]=Ee?[Ye,Pt]:[Pt,Ye]:Ee?Pt.unshift(Ye):Pt.push(Ye),(ut=Me(Se))>0&&Pt.length>ut&&!Pt.warned){Pt.warned=!0;var qn=new Error("Possible EventEmitter memory leak detected. "+Pt.length+" "+String(Ce)+" listeners added. Use emitter.setMaxListeners() to increase limit");qn.name="MaxListenersExceededWarning",qn.emitter=Se,qn.type=Ce,qn.count=Pt.length,function ke(Se){console&&console.warn&&console.warn(Se)}(qn)}return Se}function Ae(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ct(Se,Ce,Ye){var Ee={fired:!1,wrapFn:void 0,target:Se,type:Ce,listener:Ye},ut=Ae.bind(Ee);return ut.listener=Ye,Ee.wrapFn=ut,ut}function Vt(Se,Ce,Ye){var Ee=Se._events;if(void 0===Ee)return[];var ut=Ee[Ce];return void 0===ut?[]:"function"==typeof ut?Ye?[ut.listener||ut]:[ut]:Ye?function ft(Se){for(var Ce=new Array(Se.length),Ye=0;Ye0&&(Pt=Ye[0]),Pt instanceof Error)throw Pt;var qn=new Error("Unhandled error."+(Pt?" ("+Pt.message+")":""));throw qn.context=Pt,qn}var Jt=vt[Ce];if(void 0===Jt)return!1;if("function"==typeof Jt)ze(Jt,this,Ye);else{var Ht=Jt.length,Ft=It(Jt,Ht);for(Ee=0;Ee=0;Pt--)if(Ee[Pt]===Ye||Ee[Pt].listener===Ye){qn=Ee[Pt].listener,vt=Pt;break}if(vt<0)return this;0===vt?Ee.shift():function bt(Se,Ce){for(;Ce+1=0;ut--)this.removeListener(Ce,Ye[ut]);return this},h.prototype.listeners=function(Ce){return Vt(this,Ce,!0)},h.prototype.rawListeners=function(Ce){return Vt(this,Ce,!1)},h.listenerCount=function(Se,Ce){return"function"==typeof Se.listenerCount?Se.listenerCount(Ce):Qe.call(Se,Ce)},h.prototype.listenerCount=Qe,h.prototype.eventNames=function(){return this._eventsCount>0?st(this._events):[]}},424:zt=>{var ze;zt.exports=ze={},ze.simpleFilter=function(st,ke){return ke.filter(function(we){return ze.test(st,we)})},ze.test=function(st,ke){return null!==ze.match(st,ke)},ze.match=function(st,ke,we){var Qe,h=0,W=[],ye=ke.length,Me=0,xe=0,Ae=(we=we||{}).pre||"",ct=we.post||"",Vt=we.caseSensitive&&ke||ke.toLowerCase();st=we.caseSensitive&&st||st.toLowerCase();for(var It=0;It{var ke=/^\s+|\s+$/g,we=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,W=/^0o[0-7]+$/i,ye=parseInt,Me="object"==typeof global&&global&&global.Object===Object&&global,xe="object"==typeof self&&self&&self.Object===Object&&self,Ae=Me||xe||Function("return this")(),Vt=Object.prototype.toString,Qe=Math.max,It=Math.min,bt=function(){return Ae.Date.now()};function oe(Ce){var Ye=typeof Ce;return!!Ce&&("object"==Ye||"function"==Ye)}function Se(Ce){if("number"==typeof Ce)return Ce;if(function ot(Ce){return"symbol"==typeof Ce||function Ge(Ce){return!!Ce&&"object"==typeof Ce}(Ce)&&"[object Symbol]"==Vt.call(Ce)}(Ce))return NaN;if(oe(Ce)){var Ye="function"==typeof Ce.valueOf?Ce.valueOf():Ce;Ce=oe(Ye)?Ye+"":Ye}if("string"!=typeof Ce)return 0===Ce?Ce:+Ce;Ce=Ce.replace(ke,"");var Ee=h.test(Ce);return Ee||W.test(Ce)?ye(Ce.slice(2),Ee?2:8):we.test(Ce)?NaN:+Ce}zt.exports=function ft(Ce,Ye,Ee){var ut,vt,Pt,qn,Jt,Ht,Ft=0,un=!1,pt=!1,Dn=!0;if("function"!=typeof Ce)throw new TypeError("Expected a function");function sn(hr){var Ir=ut,Cn=vt;return ut=vt=void 0,Ft=hr,qn=Ce.apply(Cn,Ir)}function Zn(hr){var Ir=hr-Ht;return void 0===Ht||Ir>=Ye||Ir<0||pt&&hr-Ft>=Pt}function Fr(){var hr=bt();if(Zn(hr))return zi(hr);Jt=setTimeout(Fr,function mr(hr){var po=Ye-(hr-Ht);return pt?It(po,Pt-(hr-Ft)):po}(hr))}function zi(hr){return Jt=void 0,Dn&&ut?sn(hr):(ut=vt=void 0,qn)}function hs(){var hr=bt(),Ir=Zn(hr);if(ut=arguments,vt=this,Ht=hr,Ir){if(void 0===Jt)return function Vn(hr){return Ft=hr,Jt=setTimeout(Fr,Ye),un?sn(hr):qn}(Ht);if(pt)return Jt=setTimeout(Fr,Ye),sn(Ht)}return void 0===Jt&&(Jt=setTimeout(Fr,Ye)),qn}return Ye=Se(Ye)||0,oe(Ee)&&(un=!!Ee.leading,Pt=(pt="maxWait"in Ee)?Qe(Se(Ee.maxWait)||0,Ye):Pt,Dn="trailing"in Ee?!!Ee.trailing:Dn),hs.cancel=function io(){void 0!==Jt&&clearTimeout(Jt),Ft=0,ut=Ht=vt=Jt=void 0},hs.flush=function Xi(){return void 0===Jt?qn:zi(bt())},hs}},574:function(zt){zt.exports=function(){"use strict";var St,ze,st;function ke(h,W){if(St)if(ze){var ye="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+St+")(sharedChunk); ("+ze+")(sharedChunk); self.onerror = null;",Me={};St(Me),st=W(Me),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(st.workerUrl=window.URL.createObjectURL(new Blob([ye],{type:"text/javascript"})))}else ze=W;else St=W}return ke(0,function(h){var W=typeof self<"u"?self:{},ye="2.15.0";let Me;const xe={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==Me){const s=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{Me=null!=process.env.API_URL_REGEX?new RegExp(process.env.API_URL_REGEX):s}catch{Me=s}}return Me},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!xe.API_URL)return null;try{const s=new URL(xe.API_URL);return"api.mapbox.cn"===s.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===s.hostname?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Ae={supported:!1,testSupport:function(s){!Qe&&Vt&&(It?bt(s):ct=s)}};let ct,Vt,Qe=!1,It=!1;function bt(s){const i=s.createTexture();s.bindTexture(s.TEXTURE_2D,i);try{if(s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,Vt),s.isContextLost())return;Ae.supported=!0}catch{}s.deleteTexture(i),Qe=!0}W.document&&(Vt=W.document.createElement("img"),Vt.onload=function(){ct&&bt(ct),ct=null,It=!0},Vt.onerror=function(){Qe=!0,ct=null},Vt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const ft="01";function oe(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ge=ot;function ot(s,i,a,u){this.cx=3*s,this.bx=3*(a-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(u-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=i,this.p2x=a,this.p2y=u}ot.prototype={sampleCurveX:function(s){return((this.ax*s+this.bx)*s+this.cx)*s},sampleCurveY:function(s){return((this.ay*s+this.by)*s+this.cy)*s},sampleCurveDerivativeX:function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},solveCurveX:function(s,i){if(void 0===i&&(i=1e-6),s<0)return 0;if(s>1)return 1;for(var a=s,u=0;u<8;u++){var f=this.sampleCurveX(a)-s;if(Math.abs(f)f?v=a:b=a,a=.5*(b-v)+v;return a},solve:function(s,i){return this.sampleCurveY(this.solveCurveX(s,i))}};var Se=oe(Ge),Ce=Ye;function Ye(s,i){this.x=s,this.y=i}Ye.prototype={clone:function(){return new Ye(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},multByPoint:function(s){return this.clone()._multByPoint(s)},divByPoint:function(s){return this.clone()._divByPoint(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},rotateAround:function(s,i){return this.clone()._rotateAround(s,i)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(s){var i=s.x-this.x,a=s.y-this.y;return i*i+a*a},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,i){return Math.atan2(this.x*i-this.y*s,this.x*s+this.y*i)},_matMult:function(s){var i=s[2]*this.x+s[3]*this.y;return this.x=s[0]*this.x+s[1]*this.y,this.y=i,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_multByPoint:function(s){return this.x*=s.x,this.y*=s.y,this},_divByPoint:function(s){return this.x/=s.x,this.y/=s.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(s){var i=Math.cos(s),a=Math.sin(s),u=a*this.x+i*this.y;return this.x=i*this.x-a*this.y,this.y=u,this},_rotateAround:function(s,i){var a=Math.cos(s),u=Math.sin(s),f=i.y+u*(this.x-i.x)+a*(this.y-i.y);return this.x=i.x+a*(this.x-i.x)-u*(this.y-i.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ye.convert=function(s){return s instanceof Ye?s:Array.isArray(s)?new Ye(s[0],s[1]):s};var Ee=oe(Ce);const ut=Math.PI/180,vt=180/Math.PI;function Pt(s){return s*ut}function qn(s){return s*vt}const Jt=[[0,0],[1,0],[1,1],[0,1]];function Ht(s){if(s<=0)return 0;if(s>=1)return 1;const i=s*s,a=i*s;return 4*(s<.5?a:3*(s-i)+a-.75)}function Ft(s,i,a,u){const f=new Se(s,i,a,u);return function(g){return f.solve(g)}}const un=Ft(.25,.1,.25,1);function pt(s,i,a){return Math.min(a,Math.max(i,s))}function Dn(s,i,a){return(a=pt((a-s)/(i-s),0,1))*a*(3-2*a)}function sn(s,i,a){const u=a-i,f=((s-i)%u+u)%u+i;return f===i?a:f}function Vn(s,i,a){if(!s.length)return a(null,[]);let u=s.length;const f=new Array(s.length);let g=null;s.forEach((v,b)=>{i(v,(M,T)=>{M&&(g=M),f[b]=T,0==--u&&a(g,f)})})}function mr(s){const i=[];for(const a in s)i.push(s[a]);return i}function Zn(s,...i){for(const a of i)for(const u in a)s[u]=a[u];return s}let Fr=1;function zi(){return Fr++}function io(){return function s(i){return i?(i^Math.random()*(16>>i/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,s)}()}function Xi(s){return s<=1?1:Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function hs(s){return!!s&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(s)}function hr(s,i){s.forEach(a=>{i[a]&&(i[a]=i[a].bind(i))})}function Ir(s,i){return-1!==s.indexOf(i,s.length-i.length)}function Cn(s,i,a){const u={};for(const f in s)u[f]=i.call(a||this,s[f],f,s);return u}function po(s,i,a){const u={};for(const f in s)i.call(a||this,s[f],f,s)&&(u[f]=s[f]);return u}function oo(s){return Array.isArray(s)?s.map(oo):"object"==typeof s&&s?Cn(s,oo):s}const sd={};function bn(s){sd[s]||(typeof console<"u"&&console.warn(s),sd[s]=!0)}function Yo(s,i,a){return(a.y-s.y)*(i.x-s.x)>(i.y-s.y)*(a.x-s.x)}function Lc(s){let i=0;for(let a,u,f=0,g=s.length,v=g-1;f@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(a,u,f,g)=>{const v=f||g;return i[u]=!v||v.toLowerCase(),""}),i["max-age"]){const a=parseInt(i["max-age"],10);isNaN(a)?delete i["max-age"]:i["max-age"]=a}return i}let Fc=null;function Yl(s){if(null==Fc){const i=s.navigator?s.navigator.userAgent:null;Fc=!!s.safari||!(!i||!(/\b(iPad|iPhone|iPod)\b/.test(i)||i.match("Safari")&&!i.match("Chrome")))}return Fc}function Nc(s){try{const i=W[s];return i.setItem("_mapbox_test_",1),i.removeItem("_mapbox_test_"),!0}catch{return!1}}function Ko(s,i){return[s[4*i],s[4*i+1],s[4*i+2],s[4*i+3]]}const Oa="mapbox-tiles";let Os,hl,Vu=500,Kl=50;function Uu(){try{return W.caches}catch{}}function ka(){Uu()&&!Os&&(Os=W.caches.open(Oa))}function ks(s){const i=s.indexOf("?");if(i<0)return s;const u=function(f){const g=f.indexOf("?");return g>0?f.slice(g+1).split("&"):[]}(s).filter(f=>{const g=f.split("=");return"language"===g[0]||"worldview"===g[0]});return u.length?`${s.slice(0,i)}?${u.join("&")}`:s.slice(0,i)}let dl=1/0;const Jl={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(Jl);class da extends Error{constructor(i,a,u){401===a&&Re(u)&&(i+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(i),this.status=a,this.url=u}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const Ql=As()?()=>self.worker&&self.worker.referrer:()=>("blob:"===W.location.protocol?W.parent:W).location.href,Ra=function(s,i){if(!(/^file:/.test(a=s.url)||/^file:/.test(Ql())&&!/^\w+:/.test(a))){if(W.fetch&&W.Request&&W.AbortController&&W.Request.prototype.hasOwnProperty("signal"))return function(u,f){const g=new W.AbortController,v=new W.Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,referrer:Ql(),referrerPolicy:u.referrerPolicy,signal:g.signal});let b=!1,M=!1;const T=(S=v.url).indexOf("sku=")>0&&Re(S);var S;"json"===u.type&&v.headers.set("Accept","application/json");const O=(N,z,j)=>{if(M)return;if(N&&"SecurityError"!==N.message&&bn(N.toString()),z&&j)return k(z);const Z=Date.now();W.fetch(v).then(te=>{if(te.ok){const ee=T?te.clone():null;return k(te,ee,Z)}return f(new da(te.statusText,te.status,u.url))}).catch(te=>{"AbortError"!==te.name&&f(new Error(`${te.message} ${u.url}`))})},k=(N,z,j)=>{("arrayBuffer"===u.type?N.arrayBuffer():"json"===u.type?N.json():N.text()).then(Z=>{M||(z&&j&&function(te,ee,ne){if(ka(),!Os)return;const ae={status:ee.status,statusText:ee.statusText,headers:new W.Headers};ee.headers.forEach((je,Le)=>ae.headers.set(Le,je));const he=Hr(ee.headers.get("Cache-Control")||"");if(he["no-store"])return;he["max-age"]&&ae.headers.set("Expires",new Date(ne+1e3*he["max-age"]).toUTCString());const ue=ae.headers.get("Expires");ue&&(new Date(ue).getTime()-ne<42e4||function(je,Le){if(void 0===hl)try{new Response(new ReadableStream),hl=!0}catch{hl=!1}hl?Le(je.body):je.blob().then(Le)}(ee,je=>{const Le=new W.Response(je,ae);ka(),Os&&Os.then(Ke=>Ke.put(ks(te.url),Le)).catch(Ke=>bn(Ke.message))}))}(v,z,j),b=!0,f(null,Z,N.headers.get("Cache-Control"),N.headers.get("Expires")))}).catch(Z=>{M||f(new Error(Z.message))})};return T?function(N,z){if(ka(),!Os)return z(null);const j=ks(N.url);Os.then(Z=>{Z.match(j).then(te=>{const ee=function(ne){if(!ne)return!1;const ae=new Date(ne.headers.get("Expires")||0),he=Hr(ne.headers.get("Cache-Control")||"");return ae>Date.now()&&!he["no-cache"]}(te);Z.delete(j),ee&&Z.put(j,te.clone()),z(null,te,ee)}).catch(z)}).catch(z)}(v,O):O(null,null),{cancel:()=>{M=!0,b||g.abort()}}}(s,i);if(As()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",s,i,void 0,!0)}var a;return function(u,f){const g=new W.XMLHttpRequest;g.open(u.method||"GET",u.url,!0),"arrayBuffer"===u.type&&(g.responseType="arraybuffer");for(const v in u.headers)g.setRequestHeader(v,u.headers[v]);return"json"===u.type&&(g.responseType="text",g.setRequestHeader("Accept","application/json")),g.withCredentials="include"===u.credentials,g.onerror=()=>{f(new Error(g.statusText))},g.onload=()=>{if((g.status>=200&&g.status<300||0===g.status)&&null!==g.response){let v=g.response;if("json"===u.type)try{v=JSON.parse(g.response)}catch(b){return f(b)}f(null,v,g.getResponseHeader("Cache-Control"),g.getResponseHeader("Expires"))}else f(new da(g.statusText,g.status,u.url))},g.send(u.body),{cancel:()=>g.abort()}}(s,i)},zc=function(s,i){return Ra(Zn(s,{type:"arrayBuffer"}),i)};function ec(s){const i=W.document.createElement("a");return i.href=s,i.protocol===W.document.location.protocol&&i.host===W.document.location.host}const le="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let H,G;H=[],G=0;const se=function(s,i){if(Ae.supported&&(s.headers||(s.headers={}),s.headers.accept="image/webp,*/*"),G>=xe.MAX_PARALLEL_IMAGE_REQUESTS){const g={requestParameters:s,callback:i,cancelled:!1,cancel(){this.cancelled=!0}};return H.push(g),g}G++;let a=!1;const u=()=>{if(!a)for(a=!0,G--;H.length&&G{u(),g?i(g):v&&(W.createImageBitmap?function(T,S){const O=new W.Blob([new Uint8Array(T)],{type:"image/png"});W.createImageBitmap(O).then(k=>{S(null,k)}).catch(k=>{S(new Error(`Could not load image because of ${k.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(v,(T,S)=>i(T,S,b,M)):function(T,S){const O=new W.Image,k=W.URL;O.onload=()=>{S(null,O),k.revokeObjectURL(O.src),O.onload=null,W.requestAnimationFrame(()=>{O.src=le})},O.onerror=()=>S(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const N=new W.Blob([new Uint8Array(T)],{type:"image/png"});O.src=T.byteLength?k.createObjectURL(N):le}(v,(T,S)=>i(T,S,b,M)))});return{cancel:()=>{f.cancel(),u()}}},de="NO_ACCESS_TOKEN";function ve(s){return 0===s.indexOf("mapbox:")}function Re(s){return xe.API_URL_REGEX.test(s)}function Oe(s){return xe.API_CDN_URL_REGEX.test(s)}function fe(s){return xe.API_STYLE_REGEX.test(s)&&!$e(s)}function $e(s){return xe.API_SPRITE_REGEX.test(s)}const Dt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function kt(s){const i=s.match(Dt);if(!i)throw new Error("Unable to parse URL object");return{protocol:i[1],authority:i[2],path:i[3]||"/",params:i[4]?i[4].split("&"):[]}}function Mt(s){const i=s.params.length?`?${s.params.join("&")}`:"";return`${s.protocol}://${s.authority}${s.path}${i}`}const Qt="mapbox.eventData";function Wn(s){if(!s)return null;const i=s.split(".");if(!i||3!==i.length)return null;try{return JSON.parse(decodeURIComponent(W.atob(i[1]).split("").map(a=>"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class Rn{constructor(i){this.type=i,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(i){const a=Wn(xe.ACCESS_TOKEN);let u="";return u=a&&a.u?W.btoa(encodeURIComponent(a.u).replace(/%([0-9A-F]{2})/g,(f,g)=>String.fromCharCode(+("0x"+g)))):xe.ACCESS_TOKEN||"",i?`${Qt}.${i}:${u}`:`${Qt}:${u}`}fetchEventData(){const i=Nc("localStorage"),a=this.getStorageKey(),u=this.getStorageKey("uuid");if(i)try{const f=W.localStorage.getItem(a);f&&(this.eventData=JSON.parse(f));const g=W.localStorage.getItem(u);g&&(this.anonId=g)}catch{bn("Unable to read from LocalStorage")}}saveEventData(){const i=Nc("localStorage"),a=this.getStorageKey(),u=this.getStorageKey("uuid");if(i)try{W.localStorage.setItem(u,this.anonId),Object.keys(this.eventData).length>=1&&W.localStorage.setItem(a,JSON.stringify(this.eventData))}catch{bn("Unable to write to LocalStorage")}}processRequests(i){}postEvent(i,a,u,f){if(!xe.EVENTS_URL)return;const g=kt(xe.EVENTS_URL);g.params.push(`access_token=${f||xe.ACCESS_TOKEN||""}`);const v={event:this.type,created:new Date(i).toISOString()},b=a?Zn(v,a):v,M={url:Mt(g),headers:{"Content-Type":"text/plain"},body:JSON.stringify([b])};var S;this.pendingRequest=(S=T=>{this.pendingRequest=null,u(T),this.saveEventData(),this.processRequests(f)},Ra(Zn(M,{method:"POST"}),S))}queueRequest(i,a){this.queue.push(i),this.processRequests(a)}}const an=new class extends Rn{constructor(s){super("appUserTurnstile"),this._customAccessToken=s}postTurnstileEvent(s,i){xe.EVENTS_URL&&xe.ACCESS_TOKEN&&Array.isArray(s)&&s.some(a=>ve(a)||Re(a))&&this.queueRequest(Date.now(),i)}processRequests(s){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const i=Wn(xe.ACCESS_TOKEN),a=i?i.u:xe.ACCESS_TOKEN;let u=a!==this.eventData.tokenU;hs(this.anonId)||(this.anonId=io(),u=!0);const f=this.queue.shift();if(this.eventData.lastSuccess){const g=new Date(this.eventData.lastSuccess),v=new Date(f),b=(f-this.eventData.lastSuccess)/864e5;u=u||b>=1||b<-1||g.getDate()!==v.getDate()}else u=!0;u?this.postEvent(f,{sdkIdentifier:"mapbox-gl-js",sdkVersion:ye,skuId:ft,"enabled.telemetry":!1,userId:this.anonId},g=>{g||(this.eventData.lastSuccess=f,this.eventData.tokenU=a)},s):this.processRequests()}},hn=an.postTurnstileEvent.bind(an),hi=new class extends Rn{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(s,i,a,u){this.skuToken=i,this.errorCb=u,xe.EVENTS_URL&&(a||xe.ACCESS_TOKEN?this.queueRequest({id:s,timestamp:Date.now()},a):this.errorCb(new Error(de)))}processRequests(s){if(this.pendingRequest||0===this.queue.length)return;const{id:i,timestamp:a}=this.queue.shift();i&&this.success[i]||(this.anonId||this.fetchEventData(),hs(this.anonId)||(this.anonId=io()),this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:ye,skuId:ft,skuToken:this.skuToken,userId:this.anonId},u=>{u?this.errorCb(u):i&&(this.success[i]=!0)},s))}},yn=hi.postMapLoadEvent.bind(hi),so=new class extends Rn{constructor(){super("gljs.performance")}postPerformanceEvent(s,i){xe.EVENTS_URL&&(s||xe.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:i},s)}processRequests(s){if(this.pendingRequest||0===this.queue.length)return;const{timestamp:i,performanceData:a}=this.queue.shift(),u=function(f){const g=W.performance.getEntriesByType("resource"),v=W.performance.getEntriesByType("mark"),b=function(k){const N={};if(k)for(const z in k)if("other"!==z)for(const j of k[z]){const Z=`${z}ResolveRangeMin`,te=`${z}ResolveRangeMax`,ee=`${z}RequestCount`,ne=`${z}RequestCachedCount`;N[Z]=Math.min(N[Z]||1/0,j.startTime),N[te]=Math.max(N[te]||-1/0,j.responseEnd);const ae=he=>{void 0===N[he]&&(N[he]=0),++N[he]};void 0!==j.transferSize&&0===j.transferSize&&ae(ne),ae(ee)}return N}(function(k,N){const z={};if(k)for(const j of k){const Z=N(j);void 0===z[Z]&&(z[Z]=[]),z[Z].push(j)}return z}(g,L_)),M=W.devicePixelRatio,T=W.navigator.connection||W.navigator.mozConnection||W.navigator.webkitConnection,S={counters:[],metadata:[],attributes:[]},O=(k,N,z)=>{null!=z&&k.push({name:N,value:z.toString()})};for(const k in b)O(S.counters,k,b[k]);if(f.interactionRange[0]!==1/0&&f.interactionRange[1]!==-1/0&&(O(S.counters,"interactionRangeMin",f.interactionRange[0]),O(S.counters,"interactionRangeMax",f.interactionRange[1])),v)for(const k of Object.keys(Bc)){const N=Bc[k],z=v.find(j=>j.name===N);z&&O(S.counters,N,z.startTime)}return O(S.counters,"visibilityHidden",f.visibilityHidden),O(S.attributes,"style",function(k){if(k)for(const N of k){const z=N.name.split("?")[0];if(fe(z)){const j=z.split("/").slice(-2);if(2===j.length)return`mapbox://styles/${j[0]}/${j[1]}`}}}(g)),O(S.attributes,"terrainEnabled",f.terrainEnabled?"true":"false"),O(S.attributes,"fogEnabled",f.fogEnabled?"true":"false"),O(S.attributes,"projection",f.projection),O(S.attributes,"zoom",f.zoom),O(S.metadata,"devicePixelRatio",M),O(S.metadata,"connectionEffectiveType",T?T.effectiveType:void 0),O(S.metadata,"navigatorUserAgent",W.navigator.userAgent),O(S.metadata,"screenWidth",W.screen.width),O(S.metadata,"screenHeight",W.screen.height),O(S.metadata,"windowWidth",W.innerWidth),O(S.metadata,"windowHeight",W.innerHeight),O(S.metadata,"mapWidth",f.width/M),O(S.metadata,"mapHeight",f.height/M),O(S.metadata,"webglRenderer",f.renderer),O(S.metadata,"webglVendor",f.vendor),O(S.metadata,"sdkVersion",ye),O(S.metadata,"sdkIdentifier","mapbox-gl-js"),S}(a);for(const f of u.metadata);for(const f of u.counters);for(const f of u.attributes);this.postEvent(i,u,()=>{},s)}},Hi=so.postPerformanceEvent.bind(so),Rs=new class extends Rn{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(s,i,a,u){if(!xe.API_URL||!xe.SESSION_PATH)return;const f=kt(xe.API_URL+xe.SESSION_PATH);f.params.push(`sku=${i||""}`),f.params.push(`access_token=${u||xe.ACCESS_TOKEN||""}`);const g={url:Mt(f),headers:{"Content-Type":"text/plain"}};var b;this.pendingRequest=(b=v=>{this.pendingRequest=null,a(v),this.saveEventData(),this.processRequests(u)},Ra(Zn(g,{method:"GET"}),b))}getSessionAPI(s,i,a,u){this.skuToken=i,this.errorCb=u,xe.SESSION_PATH&&xe.API_URL&&(a||xe.ACCESS_TOKEN?this.queueRequest({id:s,timestamp:Date.now()},a):this.errorCb(new Error(de)))}processRequests(s){if(this.pendingRequest||0===this.queue.length)return;const{id:i,timestamp:a}=this.queue.shift();i&&this.success[i]||this.getSession(a,this.skuToken,u=>{u?this.errorCb(u):i&&(this.success[i]=!0)},s)}},ao=Rs.getSessionAPI.bind(Rs),Yi=new Set,Bc={create:"create",load:"load",fullLoad:"fullLoad"},Rv={mark(s){W.performance.mark(s)},measure(s,i,a){W.performance.measure(s,i,a)}};function L_(s){const i=s.name.split("?")[0];return Oe(i)&&i.includes("mapbox-gl.js")?"javascript":Oe(i)&&i.includes("mapbox-gl.css")?"css":xe.API_FONTS_REGEX.test(i)?"fontRange":$e(i)?"sprite":fe(i)?"style":xe.API_TILEJSON_REGEX.test(i)?"tilejson":"other"}const vr=W.performance;function xm(s){const i=s?s.url.toString():void 0;return vr.getEntriesByName(i)}let ju,ad,ld,Ls;const La={now:()=>void 0!==ld?ld:W.performance.now(),setNow(s){ld=s},restoreNow(){ld=void 0},frame(s){const i=W.requestAnimationFrame(s);return{cancel:()=>W.cancelAnimationFrame(i)}},getImageData(s,i=0){const{width:a,height:u}=s;Ls||(Ls=W.document.createElement("canvas"));const f=Ls.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return(a>Ls.width||u>Ls.height)&&(Ls.width=a,Ls.height=u),f.clearRect(-i,-i,a+2*i,u+2*i),f.drawImage(s,0,0,a,u),f.getImageData(-i,-i,a+2*i,u+2*i)},resolveURL:s=>(ju||(ju=W.document.createElement("a")),ju.href=s,ju.href),get devicePixelRatio(){return W.devicePixelRatio},get prefersReducedMotion(){return!!W.matchMedia&&(null==ad&&(ad=W.matchMedia("(prefers-reduced-motion: reduce)")),ad.matches)}};function $u(s,i,a){a[s]&&-1!==a[s].indexOf(i)||(a[s]=a[s]||[],a[s].push(i))}function cd(s,i,a){if(a&&a[s]){const u=a[s].indexOf(i);-1!==u&&a[s].splice(u,1)}}class tc{constructor(i,a={}){Zn(this,a),this.type=i}}class Fa extends tc{constructor(i,a={}){super("error",Zn({error:i},a))}}class Hu{on(i,a){return this._listeners=this._listeners||{},$u(i,a,this._listeners),this}off(i,a){return cd(i,a,this._listeners),cd(i,a,this._oneTimeListeners),this}once(i,a){return a?(this._oneTimeListeners=this._oneTimeListeners||{},$u(i,a,this._oneTimeListeners),this):new Promise(u=>this.once(i,u))}fire(i,a){"string"==typeof i&&(i=new tc(i,a||{}));const u=i.type;if(this.listens(u)){i.target=this;const f=this._listeners&&this._listeners[u]?this._listeners[u].slice():[];for(const b of f)b.call(this,i);const g=this._oneTimeListeners&&this._oneTimeListeners[u]?this._oneTimeListeners[u].slice():[];for(const b of g)cd(u,b,this._oneTimeListeners),b.call(this,i);const v=this._eventedParent;v&&(Zn(i,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),v.fire(i))}else i instanceof Fa&&console.error(i.error);return this}listens(i){return!!(this._listeners&&this._listeners[i]&&this._listeners[i].length>0||this._oneTimeListeners&&this._oneTimeListeners[i]&&this._oneTimeListeners[i].length>0||this._eventedParent&&this._eventedParent.listens(i))}setEventedParent(i,a){return this._eventedParent=i,this._eventedParentData=a,this}}var Ze=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"requires":["fill-extrusion-edge-radius"],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function fa(s,...i){for(const a of i)for(const u in a)s[u]=a[u];return s}function Bi(s){return s instanceof Number||s instanceof String||s instanceof Boolean?s.valueOf():s}function Ki(s){if(Array.isArray(s))return s.map(Ki);if(s instanceof Object&&!(s instanceof Number||s instanceof String||s instanceof Boolean)){const i={};for(const a in s)i[a]=Ki(s[a]);return i}return Bi(s)}class wm extends Error{constructor(i,a){super(a),this.message=a,this.key=i}}var pa=wm;class Mf{constructor(i,a=[]){this.parent=i,this.bindings={};for(const[u,f]of a)this.bindings[u]=f}concat(i){return new Mf(this,i)}get(i){if(this.bindings[i])return this.bindings[i];if(this.parent)return this.parent.get(i);throw new Error(`${i} not found in scope.`)}has(i){return!!this.bindings[i]||!!this.parent&&this.parent.has(i)}}var bm=Mf;const Vc={kind:"null"},Ut={kind:"number"},Qn={kind:"string"},Xn={kind:"boolean"},ds={kind:"color"},qs={kind:"object"},Kn={kind:"value"},No={kind:"collator"},Uc={kind:"formatted"},fl={kind:"resolvedImage"};function fs(s,i){return{kind:"array",itemType:s,N:i}}function Yr(s){if("array"===s.kind){const i=Yr(s.itemType);return"number"==typeof s.N?`array<${i}, ${s.N}>`:"value"===s.itemType.kind?"array":`array<${i}>`}return s.kind}const Cm=[Vc,Ut,Qn,Xn,ds,Uc,qs,fs(Kn),fl];function ma(s,i){if("error"===i.kind)return null;if("array"===s.kind){if("array"===i.kind&&(0===i.N&&"value"===i.itemType.kind||!ma(s.itemType,i.itemType))&&("number"!=typeof s.N||s.N===i.N))return null}else{if(s.kind===i.kind)return null;if("value"===s.kind)for(const a of Cm)if(!ma(a,i))return null}return`Expected ${Yr(s)} but found ${Yr(i)} instead.`}function jc(s,i){return i.some(a=>a.kind===s.kind)}function $c(s,i){return i.some(a=>"null"===a?null===s:"array"===a?Array.isArray(s):"object"===a?s&&!Array.isArray(s)&&"object"==typeof s:a===typeof s)}var ud,Jo={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Gu(s){return(s=Math.round(s))<0?0:s>255?255:s}function qu(s){return Gu("%"===s[s.length-1]?parseFloat(s)/100*255:parseInt(s))}function hd(s){return(i="%"===s[s.length-1]?parseFloat(s)/100:parseFloat(s))<0?0:i>1?1:i;var i}function Hc(s,i,a){return a<0?a+=1:a>1&&(a-=1),6*a<1?s+(i-s)*a*6:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s}try{ud={}.parseCSSColor=function(s){var i,a=s.replace(/ /g,"").toLowerCase();if(a in Jo)return Jo[a].slice();if("#"===a[0])return 4===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=4095?[(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1]:null:7===a.length&&(i=parseInt(a.substr(1),16))>=0&&i<=16777215?[(16711680&i)>>16,(65280&i)>>8,255&i,1]:null;var u=a.indexOf("("),f=a.indexOf(")");if(-1!==u&&f+1===a.length){var g=a.substr(0,u),v=a.substr(u+1,f-(u+1)).split(","),b=1;switch(g){case"rgba":if(4!==v.length)return null;b=hd(v.pop());case"rgb":return 3!==v.length?null:[qu(v[0]),qu(v[1]),qu(v[2]),b];case"hsla":if(4!==v.length)return null;b=hd(v.pop());case"hsl":if(3!==v.length)return null;var M=(parseFloat(v[0])%360+360)%360/360,T=hd(v[1]),S=hd(v[2]),O=S<=.5?S*(T+1):S+T-S*T,k=2*S-O;return[Gu(255*Hc(k,O,M+1/3)),Gu(255*Hc(k,O,M)),Gu(255*Hc(k,O,M-1/3)),b];default:return null}}return null}}catch{}class zo{constructor(i,a,u,f=1){this.r=i,this.g=a,this.b=u,this.a=f}static parse(i){if(!i)return;if(i instanceof zo)return i;if("string"!=typeof i)return;const a=ud(i);return a?new zo(a[0]/255*a[3],a[1]/255*a[3],a[2]/255*a[3],a[3]):void 0}toString(){const[i,a,u,f]=this.toArray();return`rgba(${Math.round(i)},${Math.round(a)},${Math.round(u)},${f})`}toArray(){const{r:i,g:a,b:u,a:f}=this;return 0===f?[0,0,0,0]:[255*i/f,255*a/f,255*u/f,f]}toArray01(){const{r:i,g:a,b:u,a:f}=this;return 0===f?[0,0,0,0]:[i/f,a/f,u/f,f]}toArray01PremultipliedAlpha(){const{r:i,g:a,b:u,a:f}=this;return[i,a,u,f]}}zo.black=new zo(0,0,0,1),zo.white=new zo(1,1,1,1),zo.transparent=new zo(0,0,0,0),zo.red=new zo(1,0,0,1),zo.blue=new zo(0,0,1,1);var Si=zo;class Ef{constructor(i,a,u){this.sensitivity=i?a?"variant":"case":a?"accent":"base",this.locale=u,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(i,a){return this.collator.compare(i,a)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ws{constructor(i,a,u,f,g){this.text=i.normalize?i.normalize():i,this.image=a,this.scale=u,this.fontStack=f,this.textColor=g}}class Qo{constructor(i){this.sections=i}static fromString(i){return new Qo([new Ws(i,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(i=>0!==i.text.length||i.image&&0!==i.image.name.length)}static factory(i){return i instanceof Qo?i:Qo.fromString(i)}toString(){return 0===this.sections.length?"":this.sections.map(i=>i.text).join("")}serialize(){const i=["format"];for(const a of this.sections){if(a.image){i.push(["image",a.image.name]);continue}i.push(a.text);const u={};a.fontStack&&(u["text-font"]=["literal",a.fontStack.split(",")]),a.scale&&(u["font-scale"]=a.scale),a.textColor&&(u["text-color"]=["rgba"].concat(a.textColor.toArray())),i.push(u)}return i}}class Sr{constructor(i){this.name=i.name,this.available=i.available}toString(){return this.name}static fromString(i){return i?new Sr({name:i,available:!1}):null}serialize(){return["image",this.name]}}function pl(s,i,a,u){return"number"==typeof s&&s>=0&&s<=255&&"number"==typeof i&&i>=0&&i<=255&&"number"==typeof a&&a>=0&&a<=255?void 0===u||"number"==typeof u&&u>=0&&u<=1?null:`Invalid rgba value [${[s,i,a,u].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof u?[s,i,a,u]:[s,i,a]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Bo(s){if(null===s||"string"==typeof s||"boolean"==typeof s||"number"==typeof s||s instanceof Si||s instanceof Ef||s instanceof Qo||s instanceof Sr)return!0;if(Array.isArray(s)){for(const i of s)if(!Bo(i))return!1;return!0}if("object"==typeof s){for(const i in s)if(!Bo(s[i]))return!1;return!0}return!1}function Pi(s){if(null===s)return Vc;if("string"==typeof s)return Qn;if("boolean"==typeof s)return Xn;if("number"==typeof s)return Ut;if(s instanceof Si)return ds;if(s instanceof Ef)return No;if(s instanceof Qo)return Uc;if(s instanceof Sr)return fl;if(Array.isArray(s)){const i=s.length;let a;for(const u of s){const f=Pi(u);if(a){if(a===f)continue;a=Kn;break}a=f}return fs(a||Kn,i)}return qs}function Wu(s){const i=typeof s;return null===s?"":"string"===i||"number"===i||"boolean"===i?String(s):s instanceof Si||s instanceof Qo||s instanceof Sr?s.toString():JSON.stringify(s)}class dd{constructor(i,a){this.type=i,this.value=a}static parse(i,a){if(2!==i.length)return a.error(`'literal' expression requires exactly one argument, but found ${i.length-1} instead.`);if(!Bo(i[1]))return a.error("invalid value");const u=i[1];let f=Pi(u);const g=a.expectedType;return"array"!==f.kind||0!==f.N||!g||"array"!==g.kind||"number"==typeof g.N&&0!==g.N||(f=g),new dd(f,u)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Si?["rgba"].concat(this.value.toArray()):this.value instanceof Qo?this.value.serialize():this.value}}var Na=dd,lo=class{constructor(s){this.name="ExpressionEvaluationError",this.message=s}toJSON(){return this.message}};const ml={string:Qn,number:Ut,boolean:Xn,object:qs};class fd{constructor(i,a){this.type=i,this.args=a}static parse(i,a){if(i.length<2)return a.error("Expected at least one argument.");let u,f=1;const g=i[0];if("array"===g){let b,M;if(i.length>2){const T=i[1];if("string"!=typeof T||!(T in ml)||"object"===T)return a.error('The item type argument of "array" must be one of string, number, boolean',1);b=ml[T],f++}else b=Kn;if(i.length>3){if(null!==i[2]&&("number"!=typeof i[2]||i[2]<0||i[2]!==Math.floor(i[2])))return a.error('The length argument to "array" must be a positive integer literal',2);M=i[2],f++}u=fs(b,M)}else u=ml[g];const v=[];for(;fi.outputDefined())}serialize(){const i=this.type,a=[i.kind];if("array"===i.kind){const u=i.itemType;if("string"===u.kind||"number"===u.kind||"boolean"===u.kind){a.push(u.kind);const f=i.N;("number"==typeof f||this.args.length>1)&&a.push(f)}}return a.concat(this.args.map(u=>u.serialize()))}}var ga=fd;class za{constructor(i){this.type=Uc,this.sections=i}static parse(i,a){if(i.length<2)return a.error("Expected at least one argument.");const u=i[1];if(!Array.isArray(u)&&"object"==typeof u)return a.error("First argument must be an image or text section.");const f=[];let g=!1;for(let v=1;v<=i.length-1;++v){const b=i[v];if(g&&"object"==typeof b&&!Array.isArray(b)){g=!1;let M=null;if(b["font-scale"]&&(M=a.parse(b["font-scale"],1,Ut),!M))return null;let T=null;if(b["text-font"]&&(T=a.parse(b["text-font"],1,fs(Qn)),!T))return null;let S=null;if(b["text-color"]&&(S=a.parse(b["text-color"],1,ds),!S))return null;const O=f[f.length-1];O.scale=M,O.font=T,O.textColor=S}else{const M=a.parse(i[v],1,Kn);if(!M)return null;const T=M.type.kind;if("string"!==T&&"value"!==T&&"null"!==T&&"resolvedImage"!==T)return a.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");g=!0,f.push({content:M,scale:null,font:null,textColor:null})}}return new za(f)}evaluate(i){return new Qo(this.sections.map(a=>{const u=a.content.evaluate(i);return Pi(u)===fl?new Ws("",u,null,null,null):new Ws(Wu(u),null,a.scale?a.scale.evaluate(i):null,a.font?a.font.evaluate(i).join(","):null,a.textColor?a.textColor.evaluate(i):null)}))}eachChild(i){for(const a of this.sections)i(a.content),a.scale&&i(a.scale),a.font&&i(a.font),a.textColor&&i(a.textColor)}outputDefined(){return!1}serialize(){const i=["format"];for(const a of this.sections){i.push(a.content.serialize());const u={};a.scale&&(u["font-scale"]=a.scale.serialize()),a.font&&(u["text-font"]=a.font.serialize()),a.textColor&&(u["text-color"]=a.textColor.serialize()),i.push(u)}return i}}class pd{constructor(i){this.type=fl,this.input=i}static parse(i,a){if(2!==i.length)return a.error("Expected two arguments.");const u=a.parse(i[1],1,Qn);return u?new pd(u):a.error("No image name provided.")}evaluate(i){const a=this.input.evaluate(i),u=Sr.fromString(a);return u&&i.availableImages&&(u.available=i.availableImages.indexOf(a)>-1),u}eachChild(i){i(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const F_={"to-boolean":Xn,"to-color":ds,"to-number":Ut,"to-string":Qn};class Tf{constructor(i,a){this.type=i,this.args=a}static parse(i,a){if(i.length<2)return a.error("Expected at least one argument.");const u=i[0];if(("to-boolean"===u||"to-string"===u)&&2!==i.length)return a.error("Expected one argument.");const f=F_[u],g=[];for(let v=1;v4?`Invalid rbga value ${JSON.stringify(a)}: expected an array containing either three or four numeric values.`:pl(a[0],a[1],a[2],a[3]),!u))return new Si(a[0]/255,a[1]/255,a[2]/255,a[3])}throw new lo(u||`Could not parse color from value '${"string"==typeof a?a:String(JSON.stringify(a))}'`)}if("number"===this.type.kind){let a=null;for(const u of this.args){if(a=u.evaluate(i),null===a)return 0;const f=Number(a);if(!isNaN(f))return f}throw new lo(`Could not convert ${JSON.stringify(a)} to number.`)}return"formatted"===this.type.kind?Qo.fromString(Wu(this.args[0].evaluate(i))):"resolvedImage"===this.type.kind?Sr.fromString(Wu(this.args[0].evaluate(i))):Wu(this.args[0].evaluate(i))}eachChild(i){this.args.forEach(i)}outputDefined(){return this.args.every(i=>i.outputDefined())}serialize(){if("formatted"===this.type.kind)return new za([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new pd(this.args[0]).serialize();const i=[`to-${this.type.kind}`];return this.eachChild(a=>{i.push(a.serialize())}),i}}var Gc=Tf;const Zs=["Unknown","Point","LineString","Polygon"];var Df=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Zs[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const s=this.featureDistanceData.center,i=this.featureDistanceData.scale,{x:a,y:u}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(a*i-s[0])+this.featureDistanceData.bearing[1]*(u*i-s[1])}return 0}parseColor(s){let i=this._parseColorCache[s];return i||(i=this._parseColorCache[s]=Si.parse(s)),i}};class Ba{constructor(i,a,u,f){this.name=i,this.type=a,this._evaluate=u,this.args=f}evaluate(i){return this._evaluate(i,this.args)}eachChild(i){this.args.forEach(i)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(i=>i.serialize()))}static parse(i,a){const u=i[0],f=Ba.definitions[u];if(!f)return a.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`,0);const g=Array.isArray(f)?f[0]:f.type,v=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,b=v.filter(([T])=>!Array.isArray(T)||T.length===i.length-1);let M=null;for(const[T,S]of b){M=new Kc(a.registry,a.path,null,a.scope);const O=[];let k=!1;for(let N=1;N{return k=O,Array.isArray(k)?`(${k.map(Yr).join(", ")})`:`(${Yr(k.type)}...)`;var k}).join(" | "),S=[];for(let O=1;O=i[2]||s[1]<=i[1]||s[3]>=i[3])}function Wc(s,i){const a=(180+s[0])/360,u=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s[1]*Math.PI/360)))/360,f=Math.pow(2,i.z);return[Math.round(a*f*oi),Math.round(u*f*oi)]}function md(s,i,a){const u=s[0]-i[0],f=s[1]-i[1],g=s[0]-a[0],v=s[1]-a[1];return u*v-g*f==0&&u*g<=0&&f*v<=0}function Vi(s,i){let a=!1;for(let v=0,b=i.length;v(u=s)[1]!=(g=M[T+1])[1]>u[1]&&u[0]<(g[0]-f[0])*(u[1]-f[1])/(g[1]-f[1])+f[0]&&(a=!a)}}var u,f,g;return a}function Zc(s,i){for(let a=0;a0&&b<0||v<0&&b>0}function gr(s,i,a){for(const T of a)for(let S=0;Sa[2]){const f=.5*u;let g=s[0]-a[0]>f?-u:a[0]-s[0]>f?u:0;0===g&&(g=s[0]-a[2]>f?-u:a[2]-s[0]>f?u:0),s[0]+=g}Sn(i,s)}function Kr(s,i,a,u){const f=Math.pow(2,u.z)*oi,g=[u.x*oi,u.y*oi],v=[];if(!s)return v;for(const b of s)for(const M of b){const T=[M.x+g[0],M.y+g[1]];Sf(T,i,a,f),v.push(T)}return v}function Pn(s,i,a,u){const f=Math.pow(2,u.z)*oi,g=[u.x*oi,u.y*oi],v=[];if(!s)return v;for(const M of s){const T=[];for(const S of M){const O=[S.x+g[0],S.y+g[1]];Sn(i,O),T.push(O)}v.push(T)}if(i[2]-i[0]<=f/2){(b=i)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(const M of v)for(const T of M)Sf(T,i,a,f)}var b;return v}class Va{constructor(i,a){this.type=Xn,this.geojson=i,this.geometries=a}static parse(i,a){if(2!==i.length)return a.error(`'within' expression requires exactly one argument, but found ${i.length-1} instead.`);if(Bo(i[1])){const u=i[1];if("FeatureCollection"===u.type)for(let f=0;f{i&&!Xu(a)&&(i=!1)}),i}function _a(s){if(s instanceof Pr&&"feature-state"===s.name)return!1;let i=!0;return s.eachChild(a=>{i&&!_a(a)&&(i=!1)}),i}function mt(s,i){if(s instanceof Pr&&i.indexOf(s.name)>=0)return!1;let a=!0;return s.eachChild(u=>{a&&!mt(u,i)&&(a=!1)}),a}class Ua{constructor(i,a){this.type=a.type,this.name=i,this.boundExpression=a}static parse(i,a){if(2!==i.length||"string"!=typeof i[1])return a.error("'var' expression requires exactly one string literal argument.");const u=i[1];return a.scope.has(u)?new Ua(u,a.scope.get(u)):a.error(`Unknown variable "${u}". Make sure "${u}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(i){return this.boundExpression.evaluate(i)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Yc=Ua;class nc{constructor(i,a=[],u,f=new bm,g=[]){this.registry=i,this.path=a,this.key=a.map(v=>`[${v}]`).join(""),this.scope=f,this.errors=g,this.expectedType=u}parse(i,a,u,f,g={}){return a?this.concat(a,u,f)._parse(i,g):this._parse(i,g)}_parse(i,a){function u(f,g,v){return"assert"===v?new ga(g,[f]):"coerce"===v?new Gc(g,[f]):f}if(null!==i&&"string"!=typeof i&&"boolean"!=typeof i&&"number"!=typeof i||(i=["literal",i]),Array.isArray(i)){if(0===i.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const f=i[0];if("string"!=typeof f)return this.error(`Expression name must be a string, but found ${typeof f} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const g=this.registry[f];if(g){let v=g.parse(i,this);if(!v)return null;if(this.expectedType){const b=this.expectedType,M=v.type;if("string"!==b.kind&&"number"!==b.kind&&"boolean"!==b.kind&&"object"!==b.kind&&"array"!==b.kind||"value"!==M.kind)if("color"!==b.kind&&"formatted"!==b.kind&&"resolvedImage"!==b.kind||"value"!==M.kind&&"string"!==M.kind){if(this.checkSubtype(b,M))return null}else v=u(v,b,a.typeAnnotation||"coerce");else v=u(v,b,a.typeAnnotation||"assert")}if(!(v instanceof Na)&&"resolvedImage"!==v.type.kind&&gd(v)){const b=new Df;try{v=new Na(v.type,v.evaluate(b))}catch(M){return this.error(M.message),null}}return v}return this.error(`Unknown expression "${f}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===i?"'undefined' value invalid. Use null instead.":"object"==typeof i?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof i} instead.`)}concat(i,a,u){const f="number"==typeof i?this.path.concat(i):this.path,g=u?this.scope.concat(u):this.scope;return new nc(this.registry,f,a||null,g,this.errors)}error(i,...a){const u=`${this.key}${a.map(f=>`[${f}]`).join("")}`;this.errors.push(new pa(u,i))}checkSubtype(i,a){const u=ma(i,a);return u&&this.error(u),u}}var Kc=nc;function gd(s){if(s instanceof Yc)return gd(s.boundExpression);if(s instanceof Pr&&"error"===s.name||s instanceof qc||s instanceof Xc)return!1;const i=s instanceof Gc||s instanceof ga;let a=!0;return s.eachChild(u=>{a=i?a&&gd(u):a&&u instanceof Na}),!!a&&Xu(s)&&mt(s,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Fs(s,i){const a=s.length-1;let u,f,g=0,v=a,b=0;for(;g<=v;)if(b=Math.floor((g+v)/2),u=s[b],f=s[b+1],u<=i){if(b===a||ii))throw new lo("Input is not a number.");v=b-1}return 0}class gl{constructor(i,a,u){this.type=i,this.input=a,this.labels=[],this.outputs=[];for(const[f,g]of u)this.labels.push(f),this.outputs.push(g)}static parse(i,a){if(i.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${i.length-1}.`);if((i.length-1)%2!=0)return a.error("Expected an even number of arguments.");const u=a.parse(i[1],1,Ut);if(!u)return null;const f=[];let g=null;a.expectedType&&"value"!==a.expectedType.kind&&(g=a.expectedType);for(let v=1;v=b)return a.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',T);const O=a.parse(M,S,g);if(!O)return null;g=g||O.type,f.push([b,O])}return new gl(g,u,f)}evaluate(i){const a=this.labels,u=this.outputs;if(1===a.length)return u[0].evaluate(i);const f=this.input.evaluate(i);if(f<=a[0])return u[0].evaluate(i);const g=a.length;return f>=a[g-1]?u[g-1].evaluate(i):u[Fs(a,f)].evaluate(i)}eachChild(i){i(this.input);for(const a of this.outputs)i(a)}outputDefined(){return this.outputs.every(i=>i.outputDefined())}serialize(){const i=["step",this.input.serialize()];for(let a=0;a0&&i.push(this.labels[a]),i.push(this.outputs[a].serialize());return i}}var _d=gl;function qt(s,i,a){return s*(1-a)+i*a}var dr=Object.freeze({__proto__:null,array:function(s,i,a){return s.map((u,f)=>qt(u,i[f],a))},color:function(s,i,a){return new Si(qt(s.r,i.r,a),qt(s.g,i.g,a),qt(s.b,i.b,a),qt(s.a,i.a,a))},number:qt});const Mm=4/29,Jc=6/29,Af=3*Jc*Jc,Of=Jc*Jc*Jc,ps=Math.PI/180,Lv=180/Math.PI;function kf(s){return s>Of?Math.pow(s,1/3):s/Af+Mm}function Em(s){return s>Jc?s*s*s:Af*(s-Mm)}function ya(s){return 255*(s<=.0031308?12.92*s:1.055*Math.pow(s,1/2.4)-.055)}function Rf(s){return(s/=255)<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4)}function B_(s){const i=Rf(s.r),a=Rf(s.g),u=Rf(s.b),f=kf((.4124564*i+.3575761*a+.1804375*u)/.95047),g=kf((.2126729*i+.7151522*a+.072175*u)/1);return{l:116*g-16,a:500*(f-g),b:200*(g-kf((.0193339*i+.119192*a+.9503041*u)/1.08883)),alpha:s.a}}function V_(s){let i=(s.l+16)/116,a=isNaN(s.a)?i:i+s.a/500,u=isNaN(s.b)?i:i-s.b/200;return i=1*Em(i),a=.95047*Em(a),u=1.08883*Em(u),new Si(ya(3.2404542*a-1.5371385*i-.4985314*u),ya(-.969266*a+1.8760108*i+.041556*u),ya(.0556434*a-.2040259*i+1.0572252*u),s.alpha)}function Fv(s,i,a){const u=i-s;return s+a*(u>180||u<-180?u-360*Math.round(u/360):u)}const Yu={forward:B_,reverse:V_,interpolate:function(s,i,a){return{l:qt(s.l,i.l,a),a:qt(s.a,i.a,a),b:qt(s.b,i.b,a),alpha:qt(s.alpha,i.alpha,a)}}},Ku={forward:function(s){const{l:i,a,b:u}=B_(s),f=Math.atan2(u,a)*Lv;return{h:f<0?f+360:f,c:Math.sqrt(a*a+u*u),l:i,alpha:s.a}},reverse:function(s){const i=s.h*ps,a=s.c;return V_({l:s.l,a:Math.cos(i)*a,b:Math.sin(i)*a,alpha:s.alpha})},interpolate:function(s,i,a){return{h:Fv(s.h,i.h,a),c:qt(s.c,i.c,a),l:qt(s.l,i.l,a),alpha:qt(s.alpha,i.alpha,a)}}};var Lf=Object.freeze({__proto__:null,hcl:Ku,lab:Yu});class yd{constructor(i,a,u,f,g){this.type=i,this.operator=a,this.interpolation=u,this.input=f,this.labels=[],this.outputs=[];for(const[v,b]of g)this.labels.push(v),this.outputs.push(b)}static interpolationFactor(i,a,u,f){let g=0;if("exponential"===i.name)g=Mo(a,i.base,u,f);else if("linear"===i.name)g=Mo(a,1,u,f);else if("cubic-bezier"===i.name){const v=i.controlPoints;g=new Se(v[0],v[1],v[2],v[3]).solve(Mo(a,1,u,f))}return g}static parse(i,a){let[u,f,g,...v]=i;if(!Array.isArray(f)||0===f.length)return a.error("Expected an interpolation type expression.",1);if("linear"===f[0])f={name:"linear"};else if("exponential"===f[0]){const T=f[1];if("number"!=typeof T)return a.error("Exponential interpolation requires a numeric base.",1,1);f={name:"exponential",base:T}}else{if("cubic-bezier"!==f[0])return a.error(`Unknown interpolation type ${String(f[0])}`,1,0);{const T=f.slice(1);if(4!==T.length||T.some(S=>"number"!=typeof S||S<0||S>1))return a.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:T}}}if(i.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${i.length-1}.`);if((i.length-1)%2!=0)return a.error("Expected an even number of arguments.");if(g=a.parse(g,2,Ut),!g)return null;const b=[];let M=null;"interpolate-hcl"===u||"interpolate-lab"===u?M=ds:a.expectedType&&"value"!==a.expectedType.kind&&(M=a.expectedType);for(let T=0;T=S)return a.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',k);const z=a.parse(O,N,M);if(!z)return null;M=M||z.type,b.push([S,z])}return"number"===M.kind||"color"===M.kind||"array"===M.kind&&"number"===M.itemType.kind&&"number"==typeof M.N?new yd(M,u,f,g,b):a.error(`Type ${Yr(M)} is not interpolatable.`)}evaluate(i){const a=this.labels,u=this.outputs;if(1===a.length)return u[0].evaluate(i);const f=this.input.evaluate(i);if(f<=a[0])return u[0].evaluate(i);const g=a.length;if(f>=a[g-1])return u[g-1].evaluate(i);const v=Fs(a,f),b=yd.interpolationFactor(this.interpolation,f,a[v],a[v+1]),M=u[v].evaluate(i),T=u[v+1].evaluate(i);return"interpolate"===this.operator?dr[this.type.kind.toLowerCase()](M,T,b):"interpolate-hcl"===this.operator?Ku.reverse(Ku.interpolate(Ku.forward(M),Ku.forward(T),b)):Yu.reverse(Yu.interpolate(Yu.forward(M),Yu.forward(T),b))}eachChild(i){i(this.input);for(const a of this.outputs)i(a)}outputDefined(){return this.outputs.every(i=>i.outputDefined())}serialize(){let i;i="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const a=[this.operator,i,this.input.serialize()];for(let u=0;uma(f,b.type));return new Ff(v?Kn:u,g)}evaluate(i){let a,u=null,f=0;for(const g of this.args){if(f++,u=g.evaluate(i),u&&u instanceof Sr&&!u.available&&(a||(a=u),u=null,f===this.args.length))return a;if(null!==u)break}return u}eachChild(i){this.args.forEach(i)}outputDefined(){return this.args.every(i=>i.outputDefined())}serialize(){const i=["coalesce"];return this.eachChild(a=>{i.push(a.serialize())}),i}}var Tm=Ff;class Nf{constructor(i,a){this.type=a.type,this.bindings=[].concat(i),this.result=a}evaluate(i){return this.result.evaluate(i)}eachChild(i){for(const a of this.bindings)i(a[1]);i(this.result)}static parse(i,a){if(i.length<4)return a.error(`Expected at least 3 arguments, but found ${i.length-1} instead.`);const u=[];for(let g=1;g=u.length)throw new lo(`Array index out of bounds: ${a} > ${u.length-1}.`);if(a!==Math.floor(a))throw new lo(`Array index must be an integer, but found ${a} instead.`);return u[a]}eachChild(i){i(this.index),i(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Nv=tn;class ts{constructor(i,a){this.type=Xn,this.needle=i,this.haystack=a}static parse(i,a){if(3!==i.length)return a.error(`Expected 2 arguments, but found ${i.length-1} instead.`);const u=a.parse(i[1],1,Kn),f=a.parse(i[2],2,Kn);return u&&f?jc(u.type,[Xn,Qn,Ut,Vc,Kn])?new ts(u,f):a.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(u.type)} instead`):null}evaluate(i){const a=this.needle.evaluate(i),u=this.haystack.evaluate(i);if(null==u)return!1;if(!$c(a,["boolean","string","number","null"]))throw new lo(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(Pi(a))} instead.`);if(!$c(u,["string","array"]))throw new lo(`Expected second argument to be of type array or string, but found ${Yr(Pi(u))} instead.`);return u.indexOf(a)>=0}eachChild(i){i(this.needle),i(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var rc=ts;class Ju{constructor(i,a,u){this.type=Ut,this.needle=i,this.haystack=a,this.fromIndex=u}static parse(i,a){if(i.length<=2||i.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${i.length-1} instead.`);const u=a.parse(i[1],1,Kn),f=a.parse(i[2],2,Kn);if(!u||!f)return null;if(!jc(u.type,[Xn,Qn,Ut,Vc,Kn]))return a.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(u.type)} instead`);if(4===i.length){const g=a.parse(i[3],3,Ut);return g?new Ju(u,f,g):null}return new Ju(u,f)}evaluate(i){const a=this.needle.evaluate(i),u=this.haystack.evaluate(i);if(!$c(a,["boolean","string","number","null"]))throw new lo(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(Pi(a))} instead.`);if(!$c(u,["string","array"]))throw new lo(`Expected second argument to be of type array or string, but found ${Yr(Pi(u))} instead.`);if(this.fromIndex){const f=this.fromIndex.evaluate(i);return u.indexOf(a,f)}return u.indexOf(a)}eachChild(i){i(this.needle),i(this.haystack),this.fromIndex&&i(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const i=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),i]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var zf=Ju;class Bf{constructor(i,a,u,f,g,v){this.inputType=i,this.type=a,this.input=u,this.cases=f,this.outputs=g,this.otherwise=v}static parse(i,a){if(i.length<5)return a.error(`Expected at least 4 arguments, but found only ${i.length-1}.`);if(i.length%2!=1)return a.error("Expected an even number of arguments.");let u,f;a.expectedType&&"value"!==a.expectedType.kind&&(f=a.expectedType);const g={},v=[];for(let T=2;TNumber.MAX_SAFE_INTEGER)return k.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof z&&Math.floor(z)!==z)return k.error("Numeric branch labels must be integer values.");if(u){if(k.checkSubtype(u,Pi(z)))return null}else u=Pi(z);if(void 0!==g[String(z)])return k.error("Branch labels must be unique.");g[String(z)]=v.length}const N=a.parse(O,T,f);if(!N)return null;f=f||N.type,v.push(N)}const b=a.parse(i[1],1,Kn);if(!b)return null;const M=a.parse(i[i.length-1],i.length-1,f);return M?"value"!==b.type.kind&&a.concat(1).checkSubtype(u,b.type)?null:new Bf(u,f,b,g,v,M):null}evaluate(i){const a=this.input.evaluate(i);return(Pi(a)===this.inputType&&this.outputs[this.cases[a]]||this.otherwise).evaluate(i)}eachChild(i){i(this.input),this.outputs.forEach(i),i(this.otherwise)}outputDefined(){return this.outputs.every(i=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const i=["match",this.input.serialize()],a=Object.keys(this.cases).sort(),u=[],f={};for(const v of a){const b=f[this.cases[v]];void 0===b?(f[this.cases[v]]=u.length,u.push([this.cases[v],[v]])):u[b][1].push(v)}const g=v=>"number"===this.inputType.kind?Number(v):v;for(const[v,b]of u)i.push(1===b.length?g(b[0]):b.map(g)),i.push(this.outputs[v].serialize());return i.push(this.otherwise.serialize()),i}}var vd=Bf;class Qc{constructor(i,a,u){this.type=i,this.branches=a,this.otherwise=u}static parse(i,a){if(i.length<4)return a.error(`Expected at least 3 arguments, but found only ${i.length-1}.`);if(i.length%2!=0)return a.error("Expected an odd number of arguments.");let u;a.expectedType&&"value"!==a.expectedType.kind&&(u=a.expectedType);const f=[];for(let v=1;va.outputDefined())&&this.otherwise.outputDefined()}serialize(){const i=["case"];return this.eachChild(a=>{i.push(a.serialize())}),i}}var xd=Qc;class eu{constructor(i,a,u,f){this.type=i,this.input=a,this.beginIndex=u,this.endIndex=f}static parse(i,a){if(i.length<=2||i.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${i.length-1} instead.`);const u=a.parse(i[1],1,Kn),f=a.parse(i[2],2,Ut);if(!u||!f)return null;if(!jc(u.type,[fs(Kn),Qn,Kn]))return a.error(`Expected first argument to be of type array or string, but found ${Yr(u.type)} instead`);if(4===i.length){const g=a.parse(i[3],3,Ut);return g?new eu(u.type,u,f,g):null}return new eu(u.type,u,f)}evaluate(i){const a=this.input.evaluate(i),u=this.beginIndex.evaluate(i);if(!$c(a,["string","array"]))throw new lo(`Expected first argument to be of type array or string, but found ${Yr(Pi(a))} instead.`);if(this.endIndex){const f=this.endIndex.evaluate(i);return a.slice(u,f)}return a.slice(u)}eachChild(i){i(this.input),i(this.beginIndex),this.endIndex&&i(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const i=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),i]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Dm=eu;function er(s,i){return"=="===s||"!="===s?"boolean"===i.kind||"string"===i.kind||"number"===i.kind||"null"===i.kind||"value"===i.kind:"string"===i.kind||"number"===i.kind||"value"===i.kind}function wd(s,i,a,u){return 0===u.compare(i,a)}function ic(s,i,a){const u="=="!==s&&"!="!==s;return class R3{constructor(g,v,b){this.type=Xn,this.lhs=g,this.rhs=v,this.collator=b,this.hasUntypedArgument="value"===g.type.kind||"value"===v.type.kind}static parse(g,v){if(3!==g.length&&4!==g.length)return v.error("Expected two or three arguments.");const b=g[0];let M=v.parse(g[1],1,Kn);if(!M)return null;if(!er(b,M.type))return v.concat(1).error(`"${b}" comparisons are not supported for type '${Yr(M.type)}'.`);let T=v.parse(g[2],2,Kn);if(!T)return null;if(!er(b,T.type))return v.concat(2).error(`"${b}" comparisons are not supported for type '${Yr(T.type)}'.`);if(M.type.kind!==T.type.kind&&"value"!==M.type.kind&&"value"!==T.type.kind)return v.error(`Cannot compare types '${Yr(M.type)}' and '${Yr(T.type)}'.`);u&&("value"===M.type.kind&&"value"!==T.type.kind?M=new ga(T.type,[M]):"value"!==M.type.kind&&"value"===T.type.kind&&(T=new ga(M.type,[T])));let S=null;if(4===g.length){if("string"!==M.type.kind&&"string"!==T.type.kind&&"value"!==M.type.kind&&"value"!==T.type.kind)return v.error("Cannot use collator to compare non-string types.");if(S=v.parse(g[3],3,No),!S)return null}return new R3(M,T,S)}evaluate(g){const v=this.lhs.evaluate(g),b=this.rhs.evaluate(g);if(u&&this.hasUntypedArgument){const M=Pi(v),T=Pi(b);if(M.kind!==T.kind||"string"!==M.kind&&"number"!==M.kind)throw new lo(`Expected arguments for "${s}" to be (string, string) or (number, number), but found (${M.kind}, ${T.kind}) instead.`)}if(this.collator&&!u&&this.hasUntypedArgument){const M=Pi(v),T=Pi(b);if("string"!==M.kind||"string"!==T.kind)return i(g,v,b)}return this.collator?a(g,v,b,this.collator.evaluate(g)):i(g,v,b)}eachChild(g){g(this.lhs),g(this.rhs),this.collator&&g(this.collator)}outputDefined(){return!0}serialize(){const g=[s];return this.eachChild(v=>{g.push(v.serialize())}),g}}}const ns=ic("==",function(s,i,a){return i===a},wd),Im=ic("!=",function(s,i,a){return i!==a},function(s,i,a,u){return!wd(0,i,a,u)}),zv=ic("<",function(s,i,a){return i",function(s,i,a){return i>a},function(s,i,a,u){return u.compare(i,a)>0}),Bv=ic("<=",function(s,i,a){return i<=a},function(s,i,a,u){return u.compare(i,a)<=0}),j_=ic(">=",function(s,i,a){return i>=a},function(s,i,a,u){return u.compare(i,a)>=0});class Zt{constructor(i,a,u,f,g,v){this.type=Qn,this.number=i,this.locale=a,this.currency=u,this.unit=f,this.minFractionDigits=g,this.maxFractionDigits=v}static parse(i,a){if(3!==i.length)return a.error("Expected two arguments.");const u=a.parse(i[1],1,Ut);if(!u)return null;const f=i[2];if("object"!=typeof f||Array.isArray(f))return a.error("NumberFormat options argument must be an object.");let g=null;if(f.locale&&(g=a.parse(f.locale,1,Qn),!g))return null;let v=null;if(f.currency&&(v=a.parse(f.currency,1,Qn),!v))return null;let b=null;if(f.unit&&(b=a.parse(f.unit,1,Qn),!b))return null;let M=null;if(f["min-fraction-digits"]&&(M=a.parse(f["min-fraction-digits"],1,Ut),!M))return null;let T=null;return f["max-fraction-digits"]&&(T=a.parse(f["max-fraction-digits"],1,Ut),!T)?null:new Zt(u,g,v,b,M,T)}evaluate(i){return new Intl.NumberFormat(this.locale?this.locale.evaluate(i):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(i):void 0,unit:this.unit?this.unit.evaluate(i):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(i):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(i):void 0}).format(this.number.evaluate(i))}eachChild(i){i(this.number),this.locale&&i(this.locale),this.currency&&i(this.currency),this.unit&&i(this.unit),this.minFractionDigits&&i(this.minFractionDigits),this.maxFractionDigits&&i(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const i={};return this.locale&&(i.locale=this.locale.serialize()),this.currency&&(i.currency=this.currency.serialize()),this.unit&&(i.unit=this.unit.serialize()),this.minFractionDigits&&(i["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(i["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),i]}}class _l{constructor(i){this.type=Ut,this.input=i}static parse(i,a){if(2!==i.length)return a.error(`Expected 1 argument, but found ${i.length-1} instead.`);const u=a.parse(i[1],1);return u?"array"!==u.type.kind&&"string"!==u.type.kind&&"value"!==u.type.kind?a.error(`Expected argument of type string or array, but found ${Yr(u.type)} instead.`):new _l(u):null}evaluate(i){const a=this.input.evaluate(i);if("string"==typeof a||Array.isArray(a))return a.length;throw new lo(`Expected value to be of type string or array, but found ${Yr(Pi(a))} instead.`)}eachChild(i){i(this.input)}outputDefined(){return!1}serialize(){const i=["length"];return this.eachChild(a=>{i.push(a.serialize())}),i}}const bd={"==":ns,"!=":Im,">":Jr,"<":zv,">=":j_,"<=":Bv,array:ga,at:Nv,boolean:ga,case:xd,coalesce:Tm,collator:qc,format:za,image:pd,in:rc,"index-of":zf,interpolate:xn,"interpolate-hcl":xn,"interpolate-lab":xn,length:_l,let:U_,literal:Na,match:vd,number:ga,"number-format":Zt,object:ga,slice:Dm,step:_d,string:ga,"to-boolean":Gc,"to-color":Gc,"to-number":Gc,"to-string":Gc,var:Yc,within:Xc};function Vf(s,[i,a,u,f]){i=i.evaluate(s),a=a.evaluate(s),u=u.evaluate(s);const g=f?f.evaluate(s):1,v=pl(i,a,u,g);if(v)throw new lo(v);return new Si(i/255*g,a/255*g,u/255*g,g)}function Xs(s,i){return s in i}function Cd(s,i){const a=i[s];return void 0===a?null:a}function rs(s){return{type:s}}Pr.register(bd,{error:[{kind:"error"},[Qn],(s,[i])=>{throw new lo(i.evaluate(s))}],typeof:[Qn,[Kn],(s,[i])=>Yr(Pi(i.evaluate(s)))],"to-rgba":[fs(Ut,4),[ds],(s,[i])=>i.evaluate(s).toArray()],rgb:[ds,[Ut,Ut,Ut],Vf],rgba:[ds,[Ut,Ut,Ut,Ut],Vf],has:{type:Xn,overloads:[[[Qn],(s,[i])=>Xs(i.evaluate(s),s.properties())],[[Qn,qs],(s,[i,a])=>Xs(i.evaluate(s),a.evaluate(s))]]},get:{type:Kn,overloads:[[[Qn],(s,[i])=>Cd(i.evaluate(s),s.properties())],[[Qn,qs],(s,[i,a])=>Cd(i.evaluate(s),a.evaluate(s))]]},"feature-state":[Kn,[Qn],(s,[i])=>Cd(i.evaluate(s),s.featureState||{})],properties:[qs,[],s=>s.properties()],"geometry-type":[Qn,[],s=>s.geometryType()],id:[Kn,[],s=>s.id()],zoom:[Ut,[],s=>s.globals.zoom],pitch:[Ut,[],s=>s.globals.pitch||0],"distance-from-center":[Ut,[],s=>s.distanceFromCenter()],"heatmap-density":[Ut,[],s=>s.globals.heatmapDensity||0],"line-progress":[Ut,[],s=>s.globals.lineProgress||0],"sky-radial-progress":[Ut,[],s=>s.globals.skyRadialProgress||0],accumulated:[Kn,[],s=>void 0===s.globals.accumulated?null:s.globals.accumulated],"+":[Ut,rs(Ut),(s,i)=>{let a=0;for(const u of i)a+=u.evaluate(s);return a}],"*":[Ut,rs(Ut),(s,i)=>{let a=1;for(const u of i)a*=u.evaluate(s);return a}],"-":{type:Ut,overloads:[[[Ut,Ut],(s,[i,a])=>i.evaluate(s)-a.evaluate(s)],[[Ut],(s,[i])=>-i.evaluate(s)]]},"/":[Ut,[Ut,Ut],(s,[i,a])=>i.evaluate(s)/a.evaluate(s)],"%":[Ut,[Ut,Ut],(s,[i,a])=>i.evaluate(s)%a.evaluate(s)],ln2:[Ut,[],()=>Math.LN2],pi:[Ut,[],()=>Math.PI],e:[Ut,[],()=>Math.E],"^":[Ut,[Ut,Ut],(s,[i,a])=>Math.pow(i.evaluate(s),a.evaluate(s))],sqrt:[Ut,[Ut],(s,[i])=>Math.sqrt(i.evaluate(s))],log10:[Ut,[Ut],(s,[i])=>Math.log(i.evaluate(s))/Math.LN10],ln:[Ut,[Ut],(s,[i])=>Math.log(i.evaluate(s))],log2:[Ut,[Ut],(s,[i])=>Math.log(i.evaluate(s))/Math.LN2],sin:[Ut,[Ut],(s,[i])=>Math.sin(i.evaluate(s))],cos:[Ut,[Ut],(s,[i])=>Math.cos(i.evaluate(s))],tan:[Ut,[Ut],(s,[i])=>Math.tan(i.evaluate(s))],asin:[Ut,[Ut],(s,[i])=>Math.asin(i.evaluate(s))],acos:[Ut,[Ut],(s,[i])=>Math.acos(i.evaluate(s))],atan:[Ut,[Ut],(s,[i])=>Math.atan(i.evaluate(s))],min:[Ut,rs(Ut),(s,i)=>Math.min(...i.map(a=>a.evaluate(s)))],max:[Ut,rs(Ut),(s,i)=>Math.max(...i.map(a=>a.evaluate(s)))],abs:[Ut,[Ut],(s,[i])=>Math.abs(i.evaluate(s))],round:[Ut,[Ut],(s,[i])=>{const a=i.evaluate(s);return a<0?-Math.round(-a):Math.round(a)}],floor:[Ut,[Ut],(s,[i])=>Math.floor(i.evaluate(s))],ceil:[Ut,[Ut],(s,[i])=>Math.ceil(i.evaluate(s))],"filter-==":[Xn,[Qn,Kn],(s,[i,a])=>s.properties()[i.value]===a.value],"filter-id-==":[Xn,[Kn],(s,[i])=>s.id()===i.value],"filter-type-==":[Xn,[Qn],(s,[i])=>s.geometryType()===i.value],"filter-<":[Xn,[Qn,Kn],(s,[i,a])=>{const u=s.properties()[i.value],f=a.value;return typeof u==typeof f&&u{const a=s.id(),u=i.value;return typeof a==typeof u&&a":[Xn,[Qn,Kn],(s,[i,a])=>{const u=s.properties()[i.value],f=a.value;return typeof u==typeof f&&u>f}],"filter-id->":[Xn,[Kn],(s,[i])=>{const a=s.id(),u=i.value;return typeof a==typeof u&&a>u}],"filter-<=":[Xn,[Qn,Kn],(s,[i,a])=>{const u=s.properties()[i.value],f=a.value;return typeof u==typeof f&&u<=f}],"filter-id-<=":[Xn,[Kn],(s,[i])=>{const a=s.id(),u=i.value;return typeof a==typeof u&&a<=u}],"filter->=":[Xn,[Qn,Kn],(s,[i,a])=>{const u=s.properties()[i.value],f=a.value;return typeof u==typeof f&&u>=f}],"filter-id->=":[Xn,[Kn],(s,[i])=>{const a=s.id(),u=i.value;return typeof a==typeof u&&a>=u}],"filter-has":[Xn,[Kn],(s,[i])=>i.value in s.properties()],"filter-has-id":[Xn,[],s=>null!==s.id()&&void 0!==s.id()],"filter-type-in":[Xn,[fs(Qn)],(s,[i])=>i.value.indexOf(s.geometryType())>=0],"filter-id-in":[Xn,[fs(Kn)],(s,[i])=>i.value.indexOf(s.id())>=0],"filter-in-small":[Xn,[Qn,fs(Kn)],(s,[i,a])=>a.value.indexOf(s.properties()[i.value])>=0],"filter-in-large":[Xn,[Qn,fs(Kn)],(s,[i,a])=>function(u,f,g,v){for(;g<=v;){const b=g+v>>1;if(f[b]===u)return!0;f[b]>u?v=b-1:g=b+1}return!1}(s.properties()[i.value],a.value,0,a.value.length-1)],all:{type:Xn,overloads:[[[Xn,Xn],(s,[i,a])=>i.evaluate(s)&&a.evaluate(s)],[rs(Xn),(s,i)=>{for(const a of i)if(!a.evaluate(s))return!1;return!0}]]},any:{type:Xn,overloads:[[[Xn,Xn],(s,[i,a])=>i.evaluate(s)||a.evaluate(s)],[rs(Xn),(s,i)=>{for(const a of i)if(a.evaluate(s))return!0;return!1}]]},"!":[Xn,[Xn],(s,[i])=>!i.evaluate(s)],"is-supported-script":[Xn,[Qn],(s,[i])=>{const a=s.globals&&s.globals.isSupportedScript;return!a||a(i.evaluate(s))}],upcase:[Qn,[Qn],(s,[i])=>i.evaluate(s).toUpperCase()],downcase:[Qn,[Qn],(s,[i])=>i.evaluate(s).toLowerCase()],concat:[Qn,rs(Kn),(s,i)=>i.map(a=>Wu(a.evaluate(s))).join("")],"resolved-locale":[Qn,[No],(s,[i])=>i.evaluate(s).resolvedLocale()]});var Md=bd;function $_(s){return{result:"success",value:s}}function tu(s){return{result:"error",value:s}}function Qu(s){return"data-driven"===s["property-type"]}function Uf(s){return!!s.expression&&s.expression.parameters.indexOf("zoom")>-1}function yl(s){return!!s.expression&&s.expression.interpolated}function or(s){return s instanceof Number?"number":s instanceof String?"string":s instanceof Boolean?"boolean":Array.isArray(s)?"array":null===s?"null":typeof s}function vl(s){return"object"==typeof s&&null!==s&&!Array.isArray(s)}function Sm(s){return s}function Ed(s,i){const a="color"===i.type,u=s.stops&&"object"==typeof s.stops[0][0],f=u||!(u||void 0!==s.property),g=s.type||(yl(i)?"exponential":"interval");if(a&&((s=fa({},s)).stops&&(s.stops=s.stops.map(T=>[T[0],Si.parse(T[1])])),s.default=Si.parse(s.default?s.default:i.default)),s.colorSpace&&"rgb"!==s.colorSpace&&!Lf[s.colorSpace])throw new Error(`Unknown color space: ${s.colorSpace}`);let v,b,M;if("exponential"===g)v=$a;else if("interval"===g)v=ja;else if("categorical"===g){v=jf,b=Object.create(null);for(const T of s.stops)b[T[0]]=T[1];M=typeof s.stops[0][0]}else{if("identity"!==g)throw new Error(`Unknown function type "${g}"`);v=Ha}if(u){const T={},S=[];for(let N=0;NN[0]),evaluate:({zoom:N},z)=>$a({stops:O,base:s.base},i,N).evaluate(N,z)}}if(f){const T="exponential"===g?{name:"exponential",base:void 0!==s.base?s.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:xn.interpolationFactor.bind(void 0,T),zoomStops:s.stops.map(S=>S[0]),evaluate:({zoom:S})=>v(s,i,S,b,M)}}return{kind:"source",evaluate(T,S){const O=S&&S.properties?S.properties[s.property]:void 0;return void 0===O?nu(s.default,i.default):v(s,i,O,b,M)}}}function nu(s,i,a){return void 0!==s?s:void 0!==i?i:void 0!==a?a:void 0}function jf(s,i,a,u,f){return nu(typeof a===f?u[a]:void 0,s.default,i.default)}function ja(s,i,a){if("number"!==or(a))return nu(s.default,i.default);const u=s.stops.length;if(1===u||a<=s.stops[0][0])return s.stops[0][1];if(a>=s.stops[u-1][0])return s.stops[u-1][1];const f=Fs(s.stops.map(g=>g[0]),a);return s.stops[f][1]}function $a(s,i,a){const u=void 0!==s.base?s.base:1;if("number"!==or(a))return nu(s.default,i.default);const f=s.stops.length;if(1===f||a<=s.stops[0][0])return s.stops[0][1];if(a>=s.stops[f-1][0])return s.stops[f-1][1];const g=Fs(s.stops.map(S=>S[0]),a),v=function(S,O,k,N){const z=N-k,j=S-k;return 0===z?0:1===O?j/z:(Math.pow(O,j)-1)/(Math.pow(O,z)-1)}(a,u,s.stops[g][0],s.stops[g+1][0]),b=s.stops[g][1],M=s.stops[g+1][1];let T=dr[i.type]||Sm;if(s.colorSpace&&"rgb"!==s.colorSpace){const S=Lf[s.colorSpace];T=(O,k)=>S.reverse(S.interpolate(S.forward(O),S.forward(k),v))}return"function"==typeof b.evaluate?{evaluate(...S){const O=b.evaluate.apply(void 0,S),k=M.evaluate.apply(void 0,S);if(void 0!==O&&void 0!==k)return T(O,k,v)}}:T(b,M,v)}function Ha(s,i,a){return"color"===i.type?a=Si.parse(a):"formatted"===i.type?a=Qo.fromString(a.toString()):"resolvedImage"===i.type?a=Sr.fromString(a.toString()):or(a)===i.type||"enum"===i.type&&i.values[a]||(a=void 0),nu(a,s.default,i.default)}class Td{constructor(i,a){var u;this.expression=i,this._warningHistory={},this._evaluator=new Df,this._defaultValue=a?"color"===(u=a).type&&(vl(u.default)||Array.isArray(u.default))?new Si(0,0,0,0):"color"===u.type?Si.parse(u.default)||null:void 0===u.default?null:u.default:null,this._enumValues=a&&"enum"===a.type?a.values:null}evaluateWithoutErrorHandling(i,a,u,f,g,v,b,M){return this._evaluator.globals=i,this._evaluator.feature=a,this._evaluator.featureState=u,this._evaluator.canonical=f||null,this._evaluator.availableImages=g||null,this._evaluator.formattedSection=v,this._evaluator.featureTileCoord=b||null,this._evaluator.featureDistanceData=M||null,this.expression.evaluate(this._evaluator)}evaluate(i,a,u,f,g,v,b,M){this._evaluator.globals=i,this._evaluator.feature=a||null,this._evaluator.featureState=u||null,this._evaluator.canonical=f||null,this._evaluator.availableImages=g||null,this._evaluator.formattedSection=v||null,this._evaluator.featureTileCoord=b||null,this._evaluator.featureDistanceData=M||null;try{const T=this.expression.evaluate(this._evaluator);if(null==T||"number"==typeof T&&T!=T)return this._defaultValue;if(this._enumValues&&!(T in this._enumValues))throw new lo(`Expected value to be one of ${Object.keys(this._enumValues).map(S=>JSON.stringify(S)).join(", ")}, but found ${JSON.stringify(T)} instead.`);return T}catch(T){return this._warningHistory[T.message]||(this._warningHistory[T.message]=!0,typeof console<"u"&&console.warn(T.message)),this._defaultValue}}}function rn(s){return Array.isArray(s)&&s.length>0&&"string"==typeof s[0]&&s[0]in Md}function oc(s,i){const a=new Kc(Md,[],i?function(f){const g={color:ds,string:Qn,number:Ut,enum:Qn,boolean:Xn,formatted:Uc,resolvedImage:fl};return"array"===f.type?fs(g[f.value]||Kn,f.length):g[f.type]}(i):void 0),u=a.parse(s,void 0,void 0,void 0,i&&"string"===i.type?{typeAnnotation:"coerce"}:void 0);return u?$_(new Td(u,i)):tu(a.errors)}class Nt{constructor(i,a){this.kind=i,this._styleExpression=a,this.isStateDependent="constant"!==i&&!_a(a.expression)}evaluateWithoutErrorHandling(i,a,u,f,g,v){return this._styleExpression.evaluateWithoutErrorHandling(i,a,u,f,g,v)}evaluate(i,a,u,f,g,v){return this._styleExpression.evaluate(i,a,u,f,g,v)}}class xl{constructor(i,a,u,f){this.kind=i,this.zoomStops=u,this._styleExpression=a,this.isStateDependent="camera"!==i&&!_a(a.expression),this.interpolationType=f}evaluateWithoutErrorHandling(i,a,u,f,g,v){return this._styleExpression.evaluateWithoutErrorHandling(i,a,u,f,g,v)}evaluate(i,a,u,f,g,v){return this._styleExpression.evaluate(i,a,u,f,g,v)}interpolationFactor(i,a,u){return this.interpolationType?xn.interpolationFactor(this.interpolationType,i,a,u):0}}function sc(s,i){if("error"===(s=oc(s,i)).result)return s;const a=s.value.expression,u=Xu(a);if(!u&&!Qu(i))return tu([new pa("","data expressions not supported")]);const f=mt(a,["zoom","pitch","distance-from-center"]);if(!f&&!Uf(i))return tu([new pa("","zoom expressions not supported")]);const g=Dd(a);return g||f?g instanceof pa?tu([g]):g instanceof xn&&!yl(i)?tu([new pa("",'"interpolate" expressions cannot be used with this property')]):$_(g?new xl(u?"camera":"composite",s.value,g.labels,g instanceof xn?g.interpolation:void 0):new Nt(u?"constant":"source",s.value)):tu([new pa("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class wl{constructor(i,a){this._parameters=i,this._specification=a,fa(this,Ed(this._parameters,this._specification))}static deserialize(i){return new wl(i._parameters,i._specification)}static serialize(i){return{_parameters:i._parameters,_specification:i._specification}}}function Dd(s){let i=null;if(s instanceof U_)i=Dd(s.result);else if(s instanceof Tm){for(const a of s.args)if(i=Dd(a),i)break}else(s instanceof _d||s instanceof xn)&&s.input instanceof Pr&&"zoom"===s.input.name&&(i=s);return i instanceof pa||s.eachChild(a=>{const u=Dd(a);u instanceof pa?i=u:!i&&u?i=new pa("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):i&&u&&i!==u&&(i=new pa("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),i}class Gt{constructor(i,a,u,f){this.message=(i?`${i}: `:"")+u,f&&(this.identifier=f),null!=a&&a.__line__&&(this.line=a.__line__)}}function Ys(s){const i=s.key,a=s.value,u=s.valueSpec||{},f=s.objectElementValidators||{},g=s.style,v=s.styleSpec;let b=[];const M=or(a);if("object"!==M)return[new Gt(i,a,`object expected, ${M} found`)];for(const T in a){const S=T.split(".")[0];let O;f[S]?O=f[S]:u[S]?O=Nr:f["*"]?O=f["*"]:u["*"]&&(O=Nr),O?b=b.concat(O({key:(i&&`${i}.`)+T,value:a[T],valueSpec:u[S]||u["*"],style:g,styleSpec:v,object:a,objectKey:T},a)):b.push(new Gt(i,a[T],`unknown property "${T}"`))}for(const T in u)f[T]||u[T].required&&void 0===u[T].default&&void 0===a[T]&&b.push(new Gt(i,a,`missing required property "${T}"`));return b}function va(s){const i=s.value,a=s.valueSpec,u=s.style,f=s.styleSpec,g=s.key,v=s.arrayElementValidator||Nr;if("array"!==or(i))return[new Gt(g,i,`array expected, ${or(i)} found`)];if(a.length&&i.length!==a.length)return[new Gt(g,i,`array length ${a.length} expected, length ${i.length} found`)];if(a["min-length"]&&i.lengthg)return[new Gt(i,a,`${a} is greater than the maximum value ${g}`)]}return[]}function Vo(s){const i=s.valueSpec,a=Bi(s.value.type);let u,f,g,v={};const b="categorical"!==a&&void 0===s.value.property,M=!b,T="array"===or(s.value.stops)&&"array"===or(s.value.stops[0])&&"object"===or(s.value.stops[0][0]),S=Ys({key:s.key,value:s.value,valueSpec:s.styleSpec.function,style:s.style,styleSpec:s.styleSpec,objectElementValidators:{stops:function(N){if("identity"===a)return[new Gt(N.key,N.value,'identity function may not have a "stops" property')];let z=[];const j=N.value;return z=z.concat(va({key:N.key,value:j,valueSpec:N.valueSpec,style:N.style,styleSpec:N.styleSpec,arrayElementValidator:O})),"array"===or(j)&&0===j.length&&z.push(new Gt(N.key,j,"array must have at least one stop")),z},default:function(N){return Nr({key:N.key,value:N.value,valueSpec:i,style:N.style,styleSpec:N.styleSpec})}}});return"identity"===a&&b&&S.push(new Gt(s.key,s.value,'missing required property "property"')),"identity"===a||s.value.stops||S.push(new Gt(s.key,s.value,'missing required property "stops"')),"exponential"===a&&s.valueSpec.expression&&!yl(s.valueSpec)&&S.push(new Gt(s.key,s.value,"exponential functions not supported")),s.styleSpec.$version>=8&&(M&&!Qu(s.valueSpec)?S.push(new Gt(s.key,s.value,"property functions not supported")):b&&!Uf(s.valueSpec)&&S.push(new Gt(s.key,s.value,"zoom functions not supported"))),"categorical"!==a&&!T||void 0!==s.value.property||S.push(new Gt(s.key,s.value,'"property" property is required')),S;function O(N){let z=[];const j=N.value,Z=N.key;if("array"!==or(j))return[new Gt(Z,j,`array expected, ${or(j)} found`)];if(2!==j.length)return[new Gt(Z,j,`array length 2 expected, length ${j.length} found`)];if(T){if("object"!==or(j[0]))return[new Gt(Z,j,`object expected, ${or(j[0])} found`)];if(void 0===j[0].zoom)return[new Gt(Z,j,"object stop key must have zoom")];if(void 0===j[0].value)return[new Gt(Z,j,"object stop key must have value")];const te=Bi(j[0].zoom);if("number"!=typeof te)return[new Gt(Z,j[0].zoom,"stop zoom values must be numbers")];if(g&&g>te)return[new Gt(Z,j[0].zoom,"stop zoom values must appear in ascending order")];te!==g&&(g=te,f=void 0,v={}),z=z.concat(Ys({key:`${Z}[0]`,value:j[0],valueSpec:{zoom:{}},style:N.style,styleSpec:N.styleSpec,objectElementValidators:{zoom:bl,value:k}}))}else z=z.concat(k({key:`${Z}[0]`,value:j[0],valueSpec:{},style:N.style,styleSpec:N.styleSpec},j));return rn(Ki(j[1]))?z.concat([new Gt(`${Z}[1]`,j[1],"expressions are not allowed in function stops.")]):z.concat(Nr({key:`${Z}[1]`,value:j[1],valueSpec:i,style:N.style,styleSpec:N.styleSpec}))}function k(N,z){const j=or(N.value),Z=Bi(N.value),te=null!==N.value?N.value:z;if(u){if(j!==u)return[new Gt(N.key,te,`${j} stop domain type must match previous stop domain type ${u}`)]}else u=j;if("number"!==j&&"string"!==j&&"boolean"!==j&&"number"!=typeof Z&&"string"!=typeof Z&&"boolean"!=typeof Z)return[new Gt(N.key,te,"stop domain value must be a number, string, or boolean")];if("number"!==j&&"categorical"!==a){let ee=`number expected, ${j} found`;return Qu(i)&&void 0===a&&(ee+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Gt(N.key,te,ee)]}return"categorical"!==a||"number"!==j||"number"==typeof Z&&isFinite(Z)&&Math.floor(Z)===Z?"categorical"!==a&&"number"===j&&"number"==typeof Z&&"number"==typeof f&&void 0!==f&&Znew Gt(`${s.key}${u.key}`,s.value,u.message));const a=i.value.expression||i.value._styleExpression.expression;if("property"===s.expressionContext&&"text-font"===s.propertyKey&&!a.outputDefined())return[new Gt(s.key,s.value,`Invalid data expression for "${s.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===s.expressionContext&&"layout"===s.propertyType&&!_a(a))return[new Gt(s.key,s.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===s.expressionContext)return ur(a,s);if(s.expressionContext&&0===s.expressionContext.indexOf("cluster")){if(!mt(a,["zoom","feature-state"]))return[new Gt(s.key,s.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===s.expressionContext&&!Xu(a))return[new Gt(s.key,s.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ur(s,i){const a=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(i.valueSpec&&i.valueSpec.expression)for(const f of i.valueSpec.expression.parameters)a.delete(f);if(0===a.size)return[];const u=[];return s instanceof Pr&&a.has(s.name)?[new Gt(i.key,i.value,`["${s.name}"] expression is not supported in a filter for a ${i.object.type} layer with id: ${i.object.id}`)]:(s.eachChild(f=>{u.push(...ur(f,i))}),u)}function eh(s){const i=s.key,a=s.value,u=s.valueSpec,f=[];return Array.isArray(u.values)?-1===u.values.indexOf(Bi(a))&&f.push(new Gt(i,a,`expected one of [${u.values.join(", ")}], ${JSON.stringify(a)} found`)):-1===Object.keys(u.values).indexOf(Bi(a))&&f.push(new Gt(i,a,`expected one of [${Object.keys(u.values).join(", ")}], ${JSON.stringify(a)} found`)),f}function th(s){if(!0===s||!1===s)return!0;if(!Array.isArray(s)||0===s.length)return!1;switch(s[0]){case"has":return s.length>=2&&"$id"!==s[1]&&"$type"!==s[1];case"in":return s.length>=3&&("string"!=typeof s[1]||Array.isArray(s[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==s.length||Array.isArray(s[1])||Array.isArray(s[2]);case"any":case"all":for(const i of s.slice(1))if(!th(i)&&"boolean"!=typeof i)return!1;return!0;default:return!0}}function nh(s,i="fill"){if(null==s)return{filter:()=>!0,needGeometry:!1,needFeature:!1};th(s)||(s=ru(s));const a=s;let u=!0;try{u=function(T){if(!ac(T))return T;let S=Ki(T);return Cl(S),S=$f(S),S}(a)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(a,null,2)}\n `)}const f=Ze[`filter_${i}`],g=oc(u,f);let v=null;if("error"===g.result)throw new Error(g.value.map(T=>`${T.key}: ${T.message}`).join(", "));v=(T,S,O)=>g.value.evaluate(T,S,{},O);let b=null,M=null;if(u!==a){const T=oc(a,f);if("error"===T.result)throw new Error(T.value.map(S=>`${S.key}: ${S.message}`).join(", "));b=(S,O,k,N,z)=>T.value.evaluate(S,O,{},k,void 0,void 0,N,z),M=!Xu(T.value.expression)}return{filter:v,dynamicFilter:b||void 0,needGeometry:Hf(u),needFeature:!!M}}function $f(s){if(!Array.isArray(s))return s;const i=function(a){if(Id.has(a[0]))for(let u=1;u$f(a))}function Cl(s){let i=!1;const a=[];if("case"===s[0]){for(let u=1;u",">=","<","<=","to-boolean"]);function H_(s,i){return si?1:0}function Hf(s){if(!Array.isArray(s))return!1;if("within"===s[0])return!0;for(let i=1;i"===i||"<="===i||">="===i?Gf(s[1],s[2],i):"any"===i?(a=s.slice(1),["any"].concat(a.map(ru))):"all"===i?["all"].concat(s.slice(1).map(ru)):"none"===i?["all"].concat(s.slice(1).map(ru).map(rh)):"in"===i?ms(s[1],s.slice(2)):"!in"===i?rh(ms(s[1],s.slice(2))):"has"===i?qf(s[1]):"!has"===i?rh(qf(s[1])):"within"!==i||s;var a}function Gf(s,i,a){switch(s){case"$type":return[`filter-type-${a}`,i];case"$id":return[`filter-id-${a}`,i];default:return[`filter-${a}`,s,i]}}function ms(s,i){if(0===i.length)return!1;switch(s){case"$type":return["filter-type-in",["literal",i]];case"$id":return["filter-id-in",["literal",i]];default:return i.length>200&&!i.some(a=>typeof a!=typeof i[0])?["filter-in-large",s,["literal",i.sort(H_)]]:["filter-in-small",s,["literal",i]]}}function qf(s){switch(s){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",s]}}function rh(s){return["!",s]}function ih(s){return th(Ki(s.value))?Qr(fa({},s,{expressionContext:"filter",valueSpec:s.styleSpec[`filter_${s.layerType||"fill"}`]})):oh(s)}function oh(s){const i=s.value,a=s.key;if("array"!==or(i))return[new Gt(a,i,`array expected, ${or(i)} found`)];const u=s.styleSpec;let f,g=[];if(i.length<1)return[new Gt(a,i,"filter array must have at least 1 element")];switch(g=g.concat(eh({key:`${a}[0]`,value:i[0],valueSpec:u.filter_operator,style:s.style,styleSpec:s.styleSpec})),Bi(i[0])){case"<":case"<=":case">":case">=":i.length>=2&&"$type"===Bi(i[1])&&g.push(new Gt(a,i,`"$type" cannot be use with operator "${i[0]}"`));case"==":case"!=":3!==i.length&&g.push(new Gt(a,i,`filter array for operator "${i[0]}" must have 3 elements`));case"in":case"!in":i.length>=2&&(f=or(i[1]),"string"!==f&&g.push(new Gt(`${a}[1]`,i[1],`string expected, ${f} found`)));for(let v=2;v{T in a&&i.push(new Gt(u,a[T],`"${T}" is prohibited for ref layers`))}),f.layers.forEach(T=>{Bi(T.id)===b&&(M=T)}),M?M.ref?i.push(new Gt(u,a.ref,"ref cannot reference another ref layer")):v=Bi(M.type):"string"==typeof b&&i.push(new Gt(u,a.ref,`ref layer "${b}" not found`))}else if("background"!==v&&"sky"!==v)if(a.source){const M=f.sources&&f.sources[a.source],T=M&&Bi(M.type);M?"vector"===T&&"raster"===v?i.push(new Gt(u,a.source,`layer "${a.id}" requires a raster source`)):"raster"===T&&"raster"!==v?i.push(new Gt(u,a.source,`layer "${a.id}" requires a vector source`)):"vector"!==T||a["source-layer"]?"raster-dem"===T&&"hillshade"!==v?i.push(new Gt(u,a.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==v||!a.paint||!a.paint["line-gradient"]&&!a.paint["line-trim-offset"]||"geojson"===T&&M.lineMetrics||i.push(new Gt(u,a,`layer "${a.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):i.push(new Gt(u,a,`layer "${a.id}" must specify a "source-layer"`)):i.push(new Gt(u,a.source,`source "${a.source}" not found`))}else i.push(new Gt(u,a,'missing required property "source"'));return i=i.concat(Ys({key:u,value:a,valueSpec:g.layer,style:s.style,styleSpec:s.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Nr({key:`${u}.type`,value:a.type,valueSpec:g.layer.type,style:s.style,styleSpec:s.styleSpec,object:a,objectKey:"type"}),filter:M=>ih(fa({layerType:v},M)),layout:M=>Ys({layer:a,key:M.key,value:M.value,valueSpec:{},style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":T=>Sd(fa({layerType:v},T))}}),paint:M=>Ys({layer:a,key:M.key,value:M.value,valueSpec:{},style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":T=>Pm(fa({layerType:v},T))}})}})),i}function Ml(s){const i=s.value,a=s.key,u=or(i);return"string"!==u?[new Gt(a,i,`string expected, ${u} found`)]:[]}const Om={promoteId:function({key:s,value:i}){if("string"===or(i))return Ml({key:s,value:i});{const a=[];for(const u in i)a.push(...Ml({key:`${s}.${u}`,value:i[u]}));return a}}};function Ei(s){const i=s.value,a=s.key,u=s.styleSpec,f=s.style;if(!i.type)return[new Gt(a,i,'"type" is required')];const g=Bi(i.type);let v;switch(g){case"vector":case"raster":case"raster-dem":return v=Ys({key:a,value:i,valueSpec:u[`source_${g.replace("-","_")}`],style:s.style,styleSpec:u,objectElementValidators:Om}),v;case"geojson":if(v=Ys({key:a,value:i,valueSpec:u.source_geojson,style:f,styleSpec:u,objectElementValidators:Om}),i.cluster)for(const b in i.clusterProperties){const[M,T]=i.clusterProperties[b],S="string"==typeof M?[M,["accumulated"],["get",b]]:M;v.push(...Qr({key:`${a}.${b}.map`,value:T,expressionContext:"cluster-map"})),v.push(...Qr({key:`${a}.${b}.reduce`,value:S,expressionContext:"cluster-reduce"}))}return v;case"video":return Ys({key:a,value:i,valueSpec:u.source_video,style:f,styleSpec:u});case"image":return Ys({key:a,value:i,valueSpec:u.source_image,style:f,styleSpec:u});case"canvas":return[new Gt(a,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return eh({key:`${a}.type`,value:i.type,valueSpec:{values:G_(u)},style:f,styleSpec:u})}}function G_(s){return s.source.reduce((i,a)=>{const u=s[a];return"enum"===u.type.type&&(i=i.concat(Object.keys(u.type.values))),i},[])}function km(s){const i=s.value,a=s.styleSpec,u=a.light,f=s.style;let g=[];const v=or(i);if(void 0===i)return g;if("object"!==v)return g=g.concat([new Gt("light",i,`object expected, ${v} found`)]),g;for(const b in i){const M=b.match(/^(.*)-transition$/);g=g.concat(M&&u[M[1]]&&u[M[1]].transition?Nr({key:b,value:i[b],valueSpec:a.transition,style:f,styleSpec:a}):u[b]?Nr({key:b,value:i[b],valueSpec:u[b],style:f,styleSpec:a}):[new Gt(b,i[b],`unknown property "${b}"`)])}return g}function gs(s){const i=s.value,a=s.key,u=s.style,f=s.styleSpec,g=f.terrain;let v=[];const b=or(i);if(void 0===i)return v;if("object"!==b)return v=v.concat([new Gt("terrain",i,`object expected, ${b} found`)]),v;for(const M in i){const T=M.match(/^(.*)-transition$/);v=v.concat(T&&g[T[1]]&&g[T[1]].transition?Nr({key:M,value:i[M],valueSpec:f.transition,style:u,styleSpec:f}):g[M]?Nr({key:M,value:i[M],valueSpec:g[M],style:u,styleSpec:f}):[new Gt(M,i[M],`unknown property "${M}"`)])}if(i.source){const M=u.sources&&u.sources[i.source],T=M&&Bi(M.type);M?"raster-dem"!==T&&v.push(new Gt(a,i.source,`terrain cannot be used with a source of type ${String(T)}, it only be used with a "raster-dem" source type`)):v.push(new Gt(a,i.source,`source "${i.source}" not found`))}else v.push(new Gt(a,i,'terrain is missing required property "source"'));return v}function Zf(s){const i=s.value,a=s.style,u=s.styleSpec,f=u.fog;let g=[];const v=or(i);if(void 0===i)return g;if("object"!==v)return g=g.concat([new Gt("fog",i,`object expected, ${v} found`)]),g;for(const b in i){const M=b.match(/^(.*)-transition$/);g=g.concat(M&&f[M[1]]&&f[M[1]].transition?Nr({key:b,value:i[b],valueSpec:u.transition,style:a,styleSpec:u}):f[b]?Nr({key:b,value:i[b],valueSpec:f[b],style:a,styleSpec:u}):[new Gt(b,i[b],`unknown property "${b}"`)])}return g}const Ln={"*":()=>[],array:va,boolean:function(s){const i=s.value,a=s.key,u=or(i);return"boolean"!==u?[new Gt(a,i,`boolean expected, ${u} found`)]:[]},number:bl,color:function(s){const i=s.key,a=s.value,u=or(a);return"string"!==u?[new Gt(i,a,`color expected, ${u} found`)]:null===ud(a)?[new Gt(i,a,`color expected, "${a}" found`)]:[]},enum:eh,filter:ih,function:Vo,layer:Am,object:Ys,source:Ei,light:km,terrain:gs,fog:Zf,string:Ml,formatted:function(s){return 0===Ml(s).length?[]:Qr(s)},resolvedImage:function(s){return 0===Ml(s).length?[]:Qr(s)},projection:function(s){const i=s.value,a=s.styleSpec,u=a.projection,f=s.style;let g=[];const v=or(i);if("object"===v)for(const b in i)g=g.concat(Nr({key:b,value:i[b],valueSpec:u[b],style:f,styleSpec:a}));else"string"!==v&&(g=g.concat([new Gt("projection",i,`object or string expected, ${v} found`)]));return g}};function Nr(s){const i=s.value,a=s.valueSpec,u=s.styleSpec;return a.expression&&vl(Bi(i))?Vo(s):a.expression&&rn(Ki(i))?Qr(s):a.type&&Ln[a.type]?Ln[a.type](s):Ys(fa({},s,{valueSpec:a.type?u[a.type]:a}))}function nr(s){const i=s.value,a=s.key,u=Ml(s);return u.length||(-1===i.indexOf("{fontstack}")&&u.push(new Gt(a,i,'"glyphs" url must include a "{fontstack}" token')),-1===i.indexOf("{range}")&&u.push(new Gt(a,i,'"glyphs" url must include a "{range}" token'))),u}function qi(s,i=Ze){return ei(Nr({key:"",value:s,valueSpec:i.$root,styleSpec:i,style:s,objectElementValidators:{glyphs:nr,"*":()=>[]}}))}const mo=s=>ei(Pm(s)),El=s=>ei(Sd(s));function ei(s){return s.slice().sort((i,a)=>i.line&&a.line?i.line-a.line:0)}function Xf(s,i){let a=!1;if(i&&i.length)for(const u of i)s.fire(new Fa(new Error(u.message))),a=!0;return a}var Rm=xa,is=3;function xa(s,i,a){var u=this.cells=[];if(s instanceof ArrayBuffer){this.arrayBuffer=s;var f=new Int32Array(this.arrayBuffer);s=f[0],this.d=(i=f[1])+2*(a=f[2]);for(var g=0;g=S[N+0]&&u>=S[N+1])?(v[k]=!0,g.push(T[k])):v[k]=!1}}},xa.prototype._forEachCell=function(s,i,a,u,f,g,v,b){for(var M=this._convertToCellCoord(s),T=this._convertToCellCoord(i),S=this._convertToCellCoord(a),O=this._convertToCellCoord(u),k=M;k<=S;k++)for(var N=T;N<=O;N++){var z=this.d*N+k;if((!b||b(this._convertFromCellCoord(k),this._convertFromCellCoord(N),this._convertFromCellCoord(k+1),this._convertFromCellCoord(N+1)))&&f.call(this,s,i,a,u,z,g,v,b))return}},xa.prototype._convertFromCellCoord=function(s){return(s-this.padding)/this.scale},xa.prototype._convertToCellCoord=function(s){return Math.max(0,Math.min(this.d-1,Math.floor(s*this.scale)+this.padding))},xa.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var s=this.cells,i=is+this.cells.length+1+1,a=0,u=0;u=0||(f[g]=Eo(s[g],i)));s instanceof Error&&(f.message=s.message)}if(f.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(f.$name=u),f}throw new Error("can't serialize object of type "+typeof s)}function Ai(s){if(null==s||"boolean"==typeof s||"number"==typeof s||"string"==typeof s||s instanceof Boolean||s instanceof Number||s instanceof String||s instanceof Date||s instanceof RegExp||Mn(s)||si(s)||ArrayBuffer.isView(s)||s instanceof W.ImageData)return s;if(Array.isArray(s))return s.map(Ai);if("object"==typeof s){const i=s.$name||"Object",{klass:a}=di[i];if(!a)throw new Error(`can't deserialize unregistered class ${i}`);if(a.deserialize)return a.deserialize(s);const u=Object.create(a.prototype);for(const f of Object.keys(s))"$name"!==f&&(u[f]=Ai(s[f]));return u}throw new Error("can't deserialize object of type "+typeof s)}const At={"Latin-1 Supplement":s=>s>=128&&s<=255,Arabic:s=>s>=1536&&s<=1791,"Arabic Supplement":s=>s>=1872&&s<=1919,"Arabic Extended-A":s=>s>=2208&&s<=2303,"Hangul Jamo":s=>s>=4352&&s<=4607,"Unified Canadian Aboriginal Syllabics":s=>s>=5120&&s<=5759,Khmer:s=>s>=6016&&s<=6143,"Unified Canadian Aboriginal Syllabics Extended":s=>s>=6320&&s<=6399,"General Punctuation":s=>s>=8192&&s<=8303,"Letterlike Symbols":s=>s>=8448&&s<=8527,"Number Forms":s=>s>=8528&&s<=8591,"Miscellaneous Technical":s=>s>=8960&&s<=9215,"Control Pictures":s=>s>=9216&&s<=9279,"Optical Character Recognition":s=>s>=9280&&s<=9311,"Enclosed Alphanumerics":s=>s>=9312&&s<=9471,"Geometric Shapes":s=>s>=9632&&s<=9727,"Miscellaneous Symbols":s=>s>=9728&&s<=9983,"Miscellaneous Symbols and Arrows":s=>s>=11008&&s<=11263,"CJK Radicals Supplement":s=>s>=11904&&s<=12031,"Kangxi Radicals":s=>s>=12032&&s<=12255,"Ideographic Description Characters":s=>s>=12272&&s<=12287,"CJK Symbols and Punctuation":s=>s>=12288&&s<=12351,Hiragana:s=>s>=12352&&s<=12447,Katakana:s=>s>=12448&&s<=12543,Bopomofo:s=>s>=12544&&s<=12591,"Hangul Compatibility Jamo":s=>s>=12592&&s<=12687,Kanbun:s=>s>=12688&&s<=12703,"Bopomofo Extended":s=>s>=12704&&s<=12735,"CJK Strokes":s=>s>=12736&&s<=12783,"Katakana Phonetic Extensions":s=>s>=12784&&s<=12799,"Enclosed CJK Letters and Months":s=>s>=12800&&s<=13055,"CJK Compatibility":s=>s>=13056&&s<=13311,"CJK Unified Ideographs Extension A":s=>s>=13312&&s<=19903,"Yijing Hexagram Symbols":s=>s>=19904&&s<=19967,"CJK Unified Ideographs":s=>s>=19968&&s<=40959,"Yi Syllables":s=>s>=40960&&s<=42127,"Yi Radicals":s=>s>=42128&&s<=42191,"Hangul Jamo Extended-A":s=>s>=43360&&s<=43391,"Hangul Syllables":s=>s>=44032&&s<=55215,"Hangul Jamo Extended-B":s=>s>=55216&&s<=55295,"Private Use Area":s=>s>=57344&&s<=63743,"CJK Compatibility Ideographs":s=>s>=63744&&s<=64255,"Arabic Presentation Forms-A":s=>s>=64336&&s<=65023,"Vertical Forms":s=>s>=65040&&s<=65055,"CJK Compatibility Forms":s=>s>=65072&&s<=65103,"Small Form Variants":s=>s>=65104&&s<=65135,"Arabic Presentation Forms-B":s=>s>=65136&&s<=65279,"Halfwidth and Fullwidth Forms":s=>s>=65280&&s<=65519};function Tl(s){for(const i of s)if(Dl(i.charCodeAt(0)))return!0;return!1}function ti(s){for(const i of s)if(!To(i.charCodeAt(0)))return!1;return!0}function To(s){return!(At.Arabic(s)||At["Arabic Supplement"](s)||At["Arabic Extended-A"](s)||At["Arabic Presentation Forms-A"](s)||At["Arabic Presentation Forms-B"](s))}function Dl(s){return!(746!==s&&747!==s&&(s<4352||!(At["Bopomofo Extended"](s)||At.Bopomofo(s)||At["CJK Compatibility Forms"](s)&&!(s>=65097&&s<=65103)||At["CJK Compatibility Ideographs"](s)||At["CJK Compatibility"](s)||At["CJK Radicals Supplement"](s)||At["CJK Strokes"](s)||!(!At["CJK Symbols and Punctuation"](s)||s>=12296&&s<=12305||s>=12308&&s<=12319||12336===s)||At["CJK Unified Ideographs Extension A"](s)||At["CJK Unified Ideographs"](s)||At["Enclosed CJK Letters and Months"](s)||At["Hangul Compatibility Jamo"](s)||At["Hangul Jamo Extended-A"](s)||At["Hangul Jamo Extended-B"](s)||At["Hangul Jamo"](s)||At["Hangul Syllables"](s)||At.Hiragana(s)||At["Ideographic Description Characters"](s)||At.Kanbun(s)||At["Kangxi Radicals"](s)||At["Katakana Phonetic Extensions"](s)||At.Katakana(s)&&12540!==s||!(!At["Halfwidth and Fullwidth Forms"](s)||65288===s||65289===s||65293===s||s>=65306&&s<=65310||65339===s||65341===s||65343===s||s>=65371&&s<=65503||65507===s||s>=65512&&s<=65519)||!(!At["Small Form Variants"](s)||s>=65112&&s<=65118||s>=65123&&s<=65126)||At["Unified Canadian Aboriginal Syllabics"](s)||At["Unified Canadian Aboriginal Syllabics Extended"](s)||At["Vertical Forms"](s)||At["Yijing Hexagram Symbols"](s)||At["Yi Syllables"](s)||At["Yi Radicals"](s))))}function jn(s){return!(Dl(s)||(i=s,At["Latin-1 Supplement"](i)&&(167===i||169===i||174===i||177===i||188===i||189===i||190===i||215===i||247===i)||At["General Punctuation"](i)&&(8214===i||8224===i||8225===i||8240===i||8241===i||8251===i||8252===i||8258===i||8263===i||8264===i||8265===i||8273===i)||At["Letterlike Symbols"](i)||At["Number Forms"](i)||At["Miscellaneous Technical"](i)&&(i>=8960&&i<=8967||i>=8972&&i<=8991||i>=8996&&i<=9e3||9003===i||i>=9085&&i<=9114||i>=9150&&i<=9165||9167===i||i>=9169&&i<=9179||i>=9186&&i<=9215)||At["Control Pictures"](i)&&9251!==i||At["Optical Character Recognition"](i)||At["Enclosed Alphanumerics"](i)||At["Geometric Shapes"](i)||At["Miscellaneous Symbols"](i)&&!(i>=9754&&i<=9759)||At["Miscellaneous Symbols and Arrows"](i)&&(i>=11026&&i<=11055||i>=11088&&i<=11097||i>=11192&&i<=11243)||At["CJK Symbols and Punctuation"](i)||At.Katakana(i)||At["Private Use Area"](i)||At["CJK Compatibility Forms"](i)||At["Small Form Variants"](i)||At["Halfwidth and Fullwidth Forms"](i)||8734===i||8756===i||8757===i||i>=9984&&i<=10087||i>=10102&&i<=10131||65532===i||65533===i));var i}function iu(s){return s>=1424&&s<=2303||At["Arabic Presentation Forms-A"](s)||At["Arabic Presentation Forms-B"](s)}function Lm(s,i){return!(!i&&iu(s)||s>=2304&&s<=3583||s>=3840&&s<=4255||At.Khmer(s))}function ou(s){for(const i of s)if(iu(i.charCodeAt(0)))return!0;return!1}const fi="deferred",cc="loading",Il="loaded";let Uo=null,m="unavailable",l=null;const d=function(s){s&&"string"==typeof s&&s.indexOf("NetworkError")>-1&&(m="error"),Uo&&Uo(s)};function _(){w.fire(new tc("pluginStateChange",{pluginStatus:m,pluginURL:l}))}const w=new Hu,C=function(){return m},D=function(){if(m!==fi||!l)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");m=cc,_(),l&&zc({url:l},s=>{s?d(s):(m=Il,_())})},I={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>m===Il||null!=I.applyArabicShaping,isLoading:()=>m===cc,setState(s){m=s.pluginStatus,l=s.pluginURL},isParsed:()=>null!=I.applyArabicShaping&&null!=I.processBidirectionalText&&null!=I.processStyledBidirectionalText,getPluginURL:()=>l};class A{constructor(i,a){this.zoom=i,a?(this.now=a.now,this.fadeDuration=a.fadeDuration,this.transition=a.transition,this.pitch=a.pitch):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0)}isSupportedScript(i){return function(a,u){for(const f of a)if(!Lm(f.charCodeAt(0),u))return!1;return!0}(i,I.isLoaded())}}class L{constructor(i,a){this.property=i,this.value=a,this.expression=function(u,f){if(vl(u))return new wl(u,f);if(rn(u)){const g=sc(u,f);if("error"===g.result)throw new Error(g.value.map(v=>`${v.key}: ${v.message}`).join(", "));return g.value}{let g=u;return"string"==typeof u&&"color"===f.type&&(g=Si.parse(u)),{kind:"constant",evaluate:()=>g}}}(void 0===a?i.specification.default:a,i.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(i,a,u){return this.property.possiblyEvaluate(this,i,a,u)}}class R{constructor(i){this.property=i,this.value=new L(i,void 0)}transitioned(i,a){return new q(this.property,this.value,a,Zn({},i.transition,this.transition),i.now)}untransitioned(){return new q(this.property,this.value,null,{},0)}}class B{constructor(i){this._properties=i,this._values=Object.create(i.defaultTransitionablePropertyValues)}getValue(i){return oo(this._values[i].value.value)}setValue(i,a){this._values.hasOwnProperty(i)||(this._values[i]=new R(this._values[i].property)),this._values[i].value=new L(this._values[i].property,null===a?void 0:oo(a))}getTransition(i){return oo(this._values[i].transition)}setTransition(i,a){this._values.hasOwnProperty(i)||(this._values[i]=new R(this._values[i].property)),this._values[i].transition=oo(a)||void 0}serialize(){const i={};for(const a of Object.keys(this._values)){const u=this.getValue(a);void 0!==u&&(i[a]=u);const f=this.getTransition(a);void 0!==f&&(i[`${a}-transition`]=f)}return i}transitioned(i,a){const u=new X(this._properties);for(const f of Object.keys(this._values))u._values[f]=this._values[f].transitioned(i,a._values[f]);return u}untransitioned(){const i=new X(this._properties);for(const a of Object.keys(this._values))i._values[a]=this._values[a].untransitioned();return i}}class q{constructor(i,a,u,f,g){const v=f.delay||0,b=f.duration||0;g=g||0,this.property=i,this.value=a,this.begin=g+v,this.end=this.begin+b,i.specification.transition&&(f.delay||f.duration)&&(this.prior=u)}possiblyEvaluate(i,a,u){const f=i.now||0,g=this.value.possiblyEvaluate(i,a,u),v=this.prior;if(v){if(f>this.end)return this.prior=null,g;if(this.value.isDataDriven())return this.prior=null,g;if(fthis.capacity){this.capacity=Math.max(i,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const a=this.uint8;this._refreshViews(),a&&this.uint8.set(a)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function be(s,i=1){let a=0,u=0;return{members:s.map(f=>{const g=ge[f.type].BYTES_PER_ELEMENT,v=a=Ue(a,Math.max(i,g)),b=f.components||1;return u=Math.max(u,g),a+=g*b,{name:f.name,type:f.type,components:b,offset:v}}),size:Ue(a,Math.max(u,i)),alignment:i}}function Ue(s,i){return Math.ceil(s/i)*i}class yt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a){const u=this.length;return this.resize(u+1),this.emplace(u,i,a)}emplace(i,a,u){const f=2*i;return this.int16[f+0]=a,this.int16[f+1]=u,i}}yt.prototype.bytesPerElement=4,Ve(yt,"StructArrayLayout2i4");class Fe extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,i,a,u)}emplace(i,a,u,f){const g=3*i;return this.int16[g+0]=a,this.int16[g+1]=u,this.int16[g+2]=f,i}}Fe.prototype.bytesPerElement=6,Ve(Fe,"StructArrayLayout3i6");class tt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,i,a,u,f)}emplace(i,a,u,f,g){const v=4*i;return this.int16[v+0]=a,this.int16[v+1]=u,this.int16[v+2]=f,this.int16[v+3]=g,i}}tt.prototype.bytesPerElement=8,Ve(tt,"StructArrayLayout4i8");class qe extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b){const M=this.length;return this.resize(M+1),this.emplace(M,i,a,u,f,g,v,b)}emplace(i,a,u,f,g,v,b,M){const T=6*i,S=12*i,O=3*i;return this.int16[T+0]=a,this.int16[T+1]=u,this.uint8[S+4]=f,this.uint8[S+5]=g,this.uint8[S+6]=v,this.uint8[S+7]=b,this.float32[O+2]=M,i}}qe.prototype.bytesPerElement=12,Ve(qe,"StructArrayLayout2i4ub1f12");class gt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,i,a,u,f)}emplace(i,a,u,f,g){const v=4*i;return this.float32[v+0]=a,this.float32[v+1]=u,this.float32[v+2]=f,this.float32[v+3]=g,i}}gt.prototype.bytesPerElement=16,Ve(gt,"StructArrayLayout4f16");class Be extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,i,a,u,f,g)}emplace(i,a,u,f,g,v){const b=6*i,M=3*i;return this.uint16[b+0]=a,this.uint16[b+1]=u,this.uint16[b+2]=f,this.uint16[b+3]=g,this.float32[M+2]=v,i}}Be.prototype.bytesPerElement=12,Ve(Be,"StructArrayLayout4ui1f12");class Je extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,i,a,u,f)}emplace(i,a,u,f,g){const v=4*i;return this.uint16[v+0]=a,this.uint16[v+1]=u,this.uint16[v+2]=f,this.uint16[v+3]=g,i}}Je.prototype.bytesPerElement=8,Ve(Je,"StructArrayLayout4ui8");class xt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v){const b=this.length;return this.resize(b+1),this.emplace(b,i,a,u,f,g,v)}emplace(i,a,u,f,g,v,b){const M=6*i;return this.int16[M+0]=a,this.int16[M+1]=u,this.int16[M+2]=f,this.int16[M+3]=g,this.int16[M+4]=v,this.int16[M+5]=b,i}}xt.prototype.bytesPerElement=12,Ve(xt,"StructArrayLayout6i12");class ht extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b,M,T,S,O,k){const N=this.length;return this.resize(N+1),this.emplace(N,i,a,u,f,g,v,b,M,T,S,O,k)}emplace(i,a,u,f,g,v,b,M,T,S,O,k,N){const z=12*i;return this.int16[z+0]=a,this.int16[z+1]=u,this.int16[z+2]=f,this.int16[z+3]=g,this.uint16[z+4]=v,this.uint16[z+5]=b,this.uint16[z+6]=M,this.uint16[z+7]=T,this.int16[z+8]=S,this.int16[z+9]=O,this.int16[z+10]=k,this.int16[z+11]=N,i}}ht.prototype.bytesPerElement=24,Ve(ht,"StructArrayLayout4i4ui4i24");class Et extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v){const b=this.length;return this.resize(b+1),this.emplace(b,i,a,u,f,g,v)}emplace(i,a,u,f,g,v,b){const M=10*i,T=5*i;return this.int16[M+0]=a,this.int16[M+1]=u,this.int16[M+2]=f,this.float32[T+2]=g,this.float32[T+3]=v,this.float32[T+4]=b,i}}Et.prototype.bytesPerElement=20,Ve(Et,"StructArrayLayout3i3f20");class ln extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(i){const a=this.length;return this.resize(a+1),this.emplace(a,i)}emplace(i,a){return this.uint32[1*i+0]=a,i}}ln.prototype.bytesPerElement=4,Ve(ln,"StructArrayLayout1ul4");class In extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b,M,T,S,O,k,N){const z=this.length;return this.resize(z+1),this.emplace(z,i,a,u,f,g,v,b,M,T,S,O,k,N)}emplace(i,a,u,f,g,v,b,M,T,S,O,k,N,z){const j=20*i,Z=10*i;return this.int16[j+0]=a,this.int16[j+1]=u,this.int16[j+2]=f,this.int16[j+3]=g,this.int16[j+4]=v,this.float32[Z+3]=b,this.float32[Z+4]=M,this.float32[Z+5]=T,this.float32[Z+6]=S,this.int16[j+14]=O,this.uint32[Z+8]=k,this.uint16[j+18]=N,this.uint16[j+19]=z,i}}In.prototype.bytesPerElement=40,Ve(In,"StructArrayLayout5i4f1i1ul2ui40");class Xt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b){const M=this.length;return this.resize(M+1),this.emplace(M,i,a,u,f,g,v,b)}emplace(i,a,u,f,g,v,b,M){const T=8*i;return this.int16[T+0]=a,this.int16[T+1]=u,this.int16[T+2]=f,this.int16[T+4]=g,this.int16[T+5]=v,this.int16[T+6]=b,this.int16[T+7]=M,i}}Xt.prototype.bytesPerElement=16,Ve(Xt,"StructArrayLayout3i2i2i16");class vn extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,i,a,u,f,g)}emplace(i,a,u,f,g,v){const b=4*i,M=8*i;return this.float32[b+0]=a,this.float32[b+1]=u,this.float32[b+2]=f,this.int16[M+6]=g,this.int16[M+7]=v,i}}vn.prototype.bytesPerElement=16,Ve(vn,"StructArrayLayout2f1f2i16");class Jn extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,i,a,u,f)}emplace(i,a,u,f,g){const v=12*i,b=3*i;return this.uint8[v+0]=a,this.uint8[v+1]=u,this.float32[b+1]=f,this.float32[b+2]=g,i}}Jn.prototype.bytesPerElement=12,Ve(Jn,"StructArrayLayout2ub2f12");class Yn extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,i,a,u)}emplace(i,a,u,f){const g=3*i;return this.float32[g+0]=a,this.float32[g+1]=u,this.float32[g+2]=f,i}}Yn.prototype.bytesPerElement=12,Ve(Yn,"StructArrayLayout3f12");class on extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a,u){const f=this.length;return this.resize(f+1),this.emplace(f,i,a,u)}emplace(i,a,u,f){const g=3*i;return this.uint16[g+0]=a,this.uint16[g+1]=u,this.uint16[g+2]=f,i}}on.prototype.bytesPerElement=6,Ve(on,"StructArrayLayout3ui6");class rr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he){const ue=this.length;return this.resize(ue+1),this.emplace(ue,i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he)}emplace(i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he,ue){const je=30*i,Le=15*i,Ke=60*i;return this.int16[je+0]=a,this.int16[je+1]=u,this.int16[je+2]=f,this.float32[Le+2]=g,this.float32[Le+3]=v,this.uint16[je+8]=b,this.uint16[je+9]=M,this.uint32[Le+5]=T,this.uint32[Le+6]=S,this.uint32[Le+7]=O,this.uint16[je+16]=k,this.uint16[je+17]=N,this.uint16[je+18]=z,this.float32[Le+10]=j,this.float32[Le+11]=Z,this.uint8[Ke+48]=te,this.uint8[Ke+49]=ee,this.uint8[Ke+50]=ne,this.uint32[Le+13]=ae,this.int16[je+28]=he,this.uint8[Ke+58]=ue,i}}rr.prototype.bytesPerElement=60,Ve(rr,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class kr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he,ue,je,Le,Ke,_t,He,rt,it,dt){const Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he,ue,je,Le,Ke,_t,He,rt,it,dt)}emplace(i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z,te,ee,ne,ae,he,ue,je,Le,Ke,_t,He,rt,it,dt,Tt){const Xe=38*i,Lt=19*i;return this.int16[Xe+0]=a,this.int16[Xe+1]=u,this.int16[Xe+2]=f,this.float32[Lt+2]=g,this.float32[Lt+3]=v,this.int16[Xe+8]=b,this.int16[Xe+9]=M,this.int16[Xe+10]=T,this.int16[Xe+11]=S,this.int16[Xe+12]=O,this.int16[Xe+13]=k,this.uint16[Xe+14]=N,this.uint16[Xe+15]=z,this.uint16[Xe+16]=j,this.uint16[Xe+17]=Z,this.uint16[Xe+18]=te,this.uint16[Xe+19]=ee,this.uint16[Xe+20]=ne,this.uint16[Xe+21]=ae,this.uint16[Xe+22]=he,this.uint16[Xe+23]=ue,this.uint16[Xe+24]=je,this.uint16[Xe+25]=Le,this.uint16[Xe+26]=Ke,this.uint16[Xe+27]=_t,this.uint16[Xe+28]=He,this.uint32[Lt+15]=rt,this.float32[Lt+16]=it,this.float32[Lt+17]=dt,this.float32[Lt+18]=Tt,i}}kr.prototype.bytesPerElement=76,Ve(kr,"StructArrayLayout3i2f6i15ui1ul3f76");class $n extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i){const a=this.length;return this.resize(a+1),this.emplace(a,i)}emplace(i,a){return this.float32[1*i+0]=a,i}}$n.prototype.bytesPerElement=4,Ve($n,"StructArrayLayout1f4");class Ar extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a,u,f,g){const v=this.length;return this.resize(v+1),this.emplace(v,i,a,u,f,g)}emplace(i,a,u,f,g,v){const b=5*i;return this.float32[b+0]=a,this.float32[b+1]=u,this.float32[b+2]=f,this.float32[b+3]=g,this.float32[b+4]=v,i}}Ar.prototype.bytesPerElement=20,Ve(Ar,"StructArrayLayout5f20");class Do extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a,u,f){const g=this.length;return this.resize(g+1),this.emplace(g,i,a,u,f)}emplace(i,a,u,f,g){const v=6*i;return this.uint32[3*i+0]=a,this.uint16[v+2]=u,this.uint16[v+3]=f,this.uint16[v+4]=g,i}}Do.prototype.bytesPerElement=12,Ve(Do,"StructArrayLayout1ul3ui12");class co extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i,a){const u=this.length;return this.resize(u+1),this.emplace(u,i,a)}emplace(i,a,u){const f=2*i;return this.uint16[f+0]=a,this.uint16[f+1]=u,i}}co.prototype.bytesPerElement=4,Ve(co,"StructArrayLayout2ui4");class _s extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(i){const a=this.length;return this.resize(a+1),this.emplace(a,i)}emplace(i,a){return this.uint16[1*i+0]=a,i}}_s.prototype.bytesPerElement=2,Ve(_s,"StructArrayLayout1ui2");class Ks extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(i,a){const u=this.length;return this.resize(u+1),this.emplace(u,i,a)}emplace(i,a,u){const f=2*i;return this.float32[f+0]=a,this.float32[f+1]=u,i}}Ks.prototype.bytesPerElement=8,Ve(Ks,"StructArrayLayout2f8");class ai extends me{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}ai.prototype.size=40;class Mr extends In{get(i){return new ai(this,i)}}Ve(Mr,"CollisionBoxArray");class fr extends me{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(i){this._structArray.uint8[this._pos1+49]=i}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(i){this._structArray.uint8[this._pos1+50]=i}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(i){this._structArray.uint32[this._pos4+13]=i}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(i){this._structArray.uint8[this._pos1+58]=i}}fr.prototype.size=60;class Rr extends rr{get(i){return new fr(this,i)}}Ve(Rr,"PlacedSymbolArray");class Io extends me{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(i){this._structArray.uint32[this._pos4+15]=i}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}Io.prototype.size=76;class Gr extends kr{get(i){return new Io(this,i)}}Ve(Gr,"SymbolInstanceArray");class ir extends $n{getoffsetX(i){return this.float32[1*i+0]}}Ve(ir,"GlyphOffsetArray");class su extends yt{getx(i){return this.int16[2*i+0]}gety(i){return this.int16[2*i+1]}}Ve(su,"SymbolLineVertexArray");class Js extends me{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}Js.prototype.size=12;class Ji extends Do{get(i){return new Js(this,i)}}Ve(Ji,"FeatureIndexArray");class Ga extends co{geta_centroid_pos0(i){return this.uint16[2*i+0]}geta_centroid_pos1(i){return this.uint16[2*i+1]}}Ve(Ga,"FillExtrusionCentroidArray");const Ns=be([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),zs=be([{name:"a_dash",components:4,type:"Uint16"}]);var So={exports:{}},qa=function(s,i){var a,u,f,g,v,b,M,T;for(u=s.length-(a=3&s.length),f=i,v=3432918353,b=461845907,T=0;T>>16)*v&65535)<<16)&4294967295)<<15|M>>>17))*b+(((M>>>16)*b&65535)<<16)&4294967295)<<13|f>>>19))+((5*(f>>>16)&65535)<<16)&4294967295))+((58964+(g>>>16)&65535)<<16);switch(M=0,a){case 3:M^=(255&s.charCodeAt(T+2))<<16;case 2:M^=(255&s.charCodeAt(T+1))<<8;case 1:f^=M=(65535&(M=(M=(65535&(M^=255&s.charCodeAt(T)))*v+(((M>>>16)*v&65535)<<16)&4294967295)<<15|M>>>17))*b+(((M>>>16)*b&65535)<<16)&4294967295}return f^=s.length,f=2246822507*(65535&(f^=f>>>16))+((2246822507*(f>>>16)&65535)<<16)&4294967295,f=3266489909*(65535&(f^=f>>>13))+((3266489909*(f>>>16)&65535)<<16)&4294967295,(f^=f>>>16)>>>0},Uv=function(s,i){for(var a,u=s.length,f=i^u,g=0;u>=4;)a=1540483477*(65535&(a=255&s.charCodeAt(g)|(255&s.charCodeAt(++g))<<8|(255&s.charCodeAt(++g))<<16|(255&s.charCodeAt(++g))<<24))+((1540483477*(a>>>16)&65535)<<16),f=1540483477*(65535&f)+((1540483477*(f>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),u-=4,++g;switch(u){case 3:f^=(255&s.charCodeAt(g+2))<<16;case 2:f^=(255&s.charCodeAt(g+1))<<8;case 1:f=1540483477*(65535&(f^=255&s.charCodeAt(g)))+((1540483477*(f>>>16)&65535)<<16)}return f=1540483477*(65535&(f^=f>>>13))+((1540483477*(f>>>16)&65535)<<16),(f^=f>>>15)>>>0};So.exports=qa,So.exports.murmur3=qa,So.exports.murmur2=Uv;var q_=oe(So.exports);class Yf{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(i,a,u,f){this.ids.push(W_(i)),this.positions.push(a,u,f)}getPositions(i){const a=W_(i);let u=0,f=this.ids.length-1;for(;u>1;this.ids[v]>=a?f=v:u=v+1}const g=[];for(;this.ids[u]===a;)g.push({index:this.positions[3*u],start:this.positions[3*u+1],end:this.positions[3*u+2]}),u++;return g}static serialize(i,a){const u=new Float64Array(i.ids),f=new Uint32Array(i.positions);return Fm(u,f,0,u.length-1),a&&a.push(u.buffer,f.buffer),{ids:u,positions:f}}static deserialize(i){const a=new Yf;return a.ids=i.ids,a.positions=i.positions,a.indexed=!0,a}}function W_(s){const i=+s;return!isNaN(i)&&Number.MIN_SAFE_INTEGER<=i&&i<=Number.MAX_SAFE_INTEGER?i:q_(String(s))}function Fm(s,i,a,u){for(;a>1];let g=a-1,v=u+1;for(;;){do{g++}while(s[g]f);if(g>=v)break;lh(s,g,v),lh(i,3*g,3*v),lh(i,3*g+1,3*v+1),lh(i,3*g+2,3*v+2)}v-a`u_${f}`),this.type=u}setUniform(i,a,u,f,g){a.set(i,g,f.constantOr(this.value))}getBinding(i,a){return"color"===this.type?new Z_(i):new Pd(i)}}class Wa{constructor(i,a){this.uniformNames=a.map(u=>`u_${u}`),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(i){this.pixelRatio=i.pixelRatio||1,this.pattern=i.tl.concat(i.br)}setUniform(i,a,u,f,g){const v="u_pattern"===g||"u_dash"===g?this.pattern:"u_pixel_ratio"===g?this.pixelRatio:null;v&&a.set(i,g,v)}getBinding(i,a){return"u_pattern"===a||"u_dash"===a?new Un(i):new Pd(i)}}class uc{constructor(i,a,u,f){this.expression=i,this.type=u,this.maxValue=0,this.paintVertexAttributes=a.map(g=>({name:`a_${g}`,type:"Float32",components:"color"===u?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(i,a,u,f,g,v){const b=this.paintVertexArray.length,M=this.expression.evaluate(new A(0),a,{},g,f,v);this.paintVertexArray.resize(i),this._setPaintValue(b,i,M)}updatePaintArray(i,a,u,f,g){const v=this.expression.evaluate({zoom:0},u,f,void 0,g);this._setPaintValue(i,a,v)}_setPaintValue(i,a,u){if("color"===this.type){const f=X_(u);for(let g=i;g`u_${b}_t`),this.type=u,this.useIntegerZoom=f,this.zoom=g,this.maxValue=0,this.paintVertexAttributes=a.map(b=>({name:`a_${b}`,type:"Float32",components:"color"===u?4:2,offset:0})),this.paintVertexArray=new v}populatePaintArray(i,a,u,f,g,v){const b=this.expression.evaluate(new A(this.zoom),a,{},g,f,v),M=this.expression.evaluate(new A(this.zoom+1),a,{},g,f,v),T=this.paintVertexArray.length;this.paintVertexArray.resize(i),this._setPaintValue(T,i,b,M)}updatePaintArray(i,a,u,f,g){const v=this.expression.evaluate({zoom:this.zoom},u,f,void 0,g),b=this.expression.evaluate({zoom:this.zoom+1},u,f,void 0,g);this._setPaintValue(i,a,v,b)}_setPaintValue(i,a,u,f){if("color"===this.type){const g=X_(u),v=X_(f);for(let b=i;b!0)){this.binders={},this._buffers=[];const f=[];for(const g in i.paint._values){if(!u(g))continue;const v=i.paint.get(g);if(!(v instanceof J&&Qu(v.property.specification)))continue;const b=xr(g,i.type),M=v.value,T=v.property.specification.type,S=!!v.property.useIntegerZoom,O="line-dasharray"===g||g.endsWith("pattern"),k="line-dasharray"===g&&"constant"!==i.layout.get("line-cap").value.kind;if("constant"!==M.kind||k)if("source"===M.kind||k||O){const N=ni(g,T,"source");this.binders[g]=O?new au(M,b,T,N,i.id):new uc(M,b,T,N),f.push(`/a_${g}`)}else{const N=ni(g,T,"composite");this.binders[g]=new Za(M,b,T,S,a,N),f.push(`/z_${g}`)}else this.binders[g]=O?new Wa(M.value,b):new Ad(M.value,b,T),f.push(`/u_${g}`)}this.cacheKey=f.sort().join("")}getMaxValue(i){const a=this.binders[i];return a instanceof uc||a instanceof Za?a.maxValue:0}populatePaintArrays(i,a,u,f,g,v){for(const b in this.binders){const M=this.binders[b];(M instanceof uc||M instanceof Za||M instanceof au)&&M.populatePaintArray(i,a,u,f,g,v)}}setConstantPatternPositions(i){for(const a in this.binders){const u=this.binders[a];u instanceof Wa&&u.setConstantPatternPositions(i)}}updatePaintArrays(i,a,u,f,g,v){let b=!1;for(const M in i){const T=a.getPositions(M);for(const S of T){const O=u.feature(S.index);for(const k in this.binders){const N=this.binders[k];if((N instanceof uc||N instanceof Za||N instanceof au)&&!0===N.expression.isStateDependent){const z=f.paint.get(k);N.expression=z.value,N.updatePaintArray(S.start,S.end,O,i[M],g,v),b=!0}}}}return b}defines(){const i=[];for(const a in this.binders){const u=this.binders[a];(u instanceof Ad||u instanceof Wa)&&i.push(...u.uniformNames.map(f=>`#define HAS_UNIFORM_${f}`))}return i}getBinderAttributes(){const i=[];for(const a in this.binders){const u=this.binders[a];if(u instanceof uc||u instanceof Za||u instanceof au)for(let f=0;f!0)){this.programConfigurations={};for(const f of i)this.programConfigurations[f.id]=new lu(f,a,u);this.needsUpload=!1,this._featureMap=new Yf,this._bufferOffset=0}populatePaintArrays(i,a,u,f,g,v,b){for(const M in this.programConfigurations)this.programConfigurations[M].populatePaintArrays(i,a,f,g,v,b);void 0!==a.id&&this._featureMap.add(a.id,u,this._bufferOffset,i),this._bufferOffset=i,this.needsUpload=!0}updatePaintArrays(i,a,u,f,g){for(const v of u)this.needsUpload=this.programConfigurations[v.id].updatePaintArrays(i,this._featureMap,a,v,f,g)||this.needsUpload}get(i){return this.programConfigurations[i]}upload(i){if(this.needsUpload){for(const a in this.programConfigurations)this.programConfigurations[a].upload(i);this.needsUpload=!1}}destroy(){for(const i in this.programConfigurations)this.programConfigurations[i].destroy()}}const lt={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function xr(s,i){return lt[s]||[s.replace(`${i}-`,"").replace(/-/g,"_")]}const qr={"line-pattern":{source:Be,composite:Be},"fill-pattern":{source:Be,composite:Be},"fill-extrusion-pattern":{source:Be,composite:Be},"line-dasharray":{source:Je,composite:Je}},Wr={color:{source:Ks,composite:gt},number:{source:$n,composite:Ks}};function ni(s,i,a){const u=qr[s];return u&&u[a]||Wr[i][a]}Ve(Ad,"ConstantBinder"),Ve(Wa,"PatternConstantBinder"),Ve(uc,"SourceExpressionBinder"),Ve(au,"PatternCompositeBinder"),Ve(Za,"CompositeExpressionBinder"),Ve(lu,"ProgramConfiguration",{omit:["_buffers"]}),Ve(ch,"ProgramConfigurationSet");const Y_="-transition";class ys extends Hu{constructor(i,a){if(super(),this.id=i.id,this.type=i.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==i.type&&(this.metadata=i.metadata,this.minzoom=i.minzoom,this.maxzoom=i.maxzoom,"background"!==i.type&&"sky"!==i.type&&(this.source=i.source,this.sourceLayer=i["source-layer"],this.filter=i.filter),a.layout&&(this._unevaluatedLayout=new K(a.layout)),a.paint)){this._transitionablePaint=new B(a.paint);for(const u in i.paint)this.setPaintProperty(u,i.paint[u],{validate:!1});for(const u in i.layout)this.setLayoutProperty(u,i.layout[u],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Q(a.paint)}}getLayoutProperty(i){return"visibility"===i?this.visibility:this._unevaluatedLayout.getValue(i)}setLayoutProperty(i,a,u={}){null!=a&&this._validate(El,`layers.${this.id}.layout.${i}`,i,a,u)||("visibility"!==i?this._unevaluatedLayout.setValue(i,a):this.visibility=a)}getPaintProperty(i){return Ir(i,Y_)?this._transitionablePaint.getTransition(i.slice(0,-11)):this._transitionablePaint.getValue(i)}setPaintProperty(i,a,u={}){if(null!=a&&this._validate(mo,`layers.${this.id}.paint.${i}`,i,a,u))return!1;if(Ir(i,Y_))return this._transitionablePaint.setTransition(i.slice(0,-11),a||void 0),!1;{const f=this._transitionablePaint._values[i],g=f.value.isDataDriven(),v=f.value;this._transitionablePaint.setValue(i,a),this._handleSpecialPaintPropertyUpdate(i);const b=this._transitionablePaint._values[i].value,M=b.isDataDriven(),T=Ir(i,"pattern")||"line-dasharray"===i;return M||g||T||this._handleOverridablePaintPropertyUpdate(i,v,b)}}_handleSpecialPaintPropertyUpdate(i){}getProgramIds(){return null}getProgramConfiguration(i){return null}_handleOverridablePaintPropertyUpdate(i,a,u){return!1}isHidden(i){return!!(this.minzoom&&i=this.maxzoom)||"none"===this.visibility}updateTransitions(i){this._transitioningPaint=this._transitionablePaint.transitioned(i,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(i,a){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(i,void 0,a)),this.paint=this._transitioningPaint.possiblyEvaluate(i,void 0,a)}serialize(){const i={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(i.layout=i.layout||{},i.layout.visibility=this.visibility),po(i,(a,u)=>!(void 0===a||"layout"===u&&!Object.keys(a).length||"paint"===u&&!Object.keys(a).length))}_validate(i,a,u,f,g={}){return(!g||!1!==g.validate)&&Xf(this,i.call(qi,{key:a,layerType:this.type,objectKey:u,value:f,styleSpec:Ze,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const i in this.paint._values){const a=this.paint.get(i);if(a instanceof J&&Qu(a.property.specification)&&("source"===a.value.kind||"composite"===a.value.kind)&&a.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=nh(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const Sl=be([{name:"a_pos",components:2,type:"Int16"}],4),K_=be([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Ti{constructor(i=[]){this.segments=i}prepareSegment(i,a,u,f){let g=this.segments[this.segments.length-1];return i>Ti.MAX_VERTEX_ARRAY_LENGTH&&bn(`Max vertices per segment is ${Ti.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${i}`),(!g||g.vertexLength+i>Ti.MAX_VERTEX_ARRAY_LENGTH||g.sortKey!==f)&&(g={vertexOffset:a.length,primitiveOffset:u.length,vertexLength:0,primitiveLength:0},void 0!==f&&(g.sortKey=f),this.segments.push(g)),g}get(){return this.segments}destroy(){for(const i of this.segments)for(const a in i.vaos)i.vaos[a].destroy()}static simpleSegment(i,a,u,f){return new Ti([{vertexOffset:i,primitiveOffset:a,vertexLength:u,primitiveLength:f,vaos:{},sortKey:0}])}}Ti.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ve(Ti,"SegmentVector");var dn=8192;class uh{constructor(i,a){i&&(a?this.setSouthWest(i).setNorthEast(a):4===i.length?this.setSouthWest([i[0],i[1]]).setNorthEast([i[2],i[3]]):this.setSouthWest(i[0]).setNorthEast(i[1]))}setNorthEast(i){return this._ne=i instanceof wr?new wr(i.lng,i.lat):wr.convert(i),this}setSouthWest(i){return this._sw=i instanceof wr?new wr(i.lng,i.lat):wr.convert(i),this}extend(i){const a=this._sw,u=this._ne;let f,g;if(i instanceof wr)f=i,g=i;else{if(!(i instanceof uh))return Array.isArray(i)?4===i.length||i.every(Array.isArray)?this.extend(uh.convert(i)):this.extend(wr.convert(i)):"object"==typeof i&&null!==i&&i.hasOwnProperty("lat")&&(i.hasOwnProperty("lon")||i.hasOwnProperty("lng"))?this.extend(wr.convert(i)):this;if(f=i._sw,g=i._ne,!f||!g)return this}return a||u?(a.lng=Math.min(f.lng,a.lng),a.lat=Math.min(f.lat,a.lat),u.lng=Math.max(g.lng,u.lng),u.lat=Math.max(g.lat,u.lat)):(this._sw=new wr(f.lng,f.lat),this._ne=new wr(g.lng,g.lat)),this}getCenter(){return new wr((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new wr(this.getWest(),this.getNorth())}getSouthEast(){return new wr(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(i){const{lng:a,lat:u}=wr.convert(i);let f=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(f=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=u&&u<=this._ne.lat&&f}static convert(i){return!i||i instanceof uh?i:new uh(i)}}var Kf=1e-6,li=typeof Float32Array<"u"?Float32Array:Array;function Pl(){var s=new li(9);return li!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[5]=0,s[6]=0,s[7]=0),s[0]=1,s[4]=1,s[8]=1,s}function J_(s,i,a){var u=i[0],f=i[1],g=i[2],v=i[3],b=i[4],M=i[5],T=i[6],S=i[7],O=i[8],k=a[0],N=a[1],z=a[2],j=a[3],Z=a[4],te=a[5],ee=a[6],ne=a[7],ae=a[8];return s[0]=k*u+N*v+z*T,s[1]=k*f+N*b+z*S,s[2]=k*g+N*M+z*O,s[3]=j*u+Z*v+te*T,s[4]=j*f+Z*b+te*S,s[5]=j*g+Z*M+te*O,s[6]=ee*u+ne*v+ae*T,s[7]=ee*f+ne*b+ae*S,s[8]=ee*g+ne*M+ae*O,s}function uo(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function Xa(s,i){var a=i[0],u=i[1],f=i[2],g=i[3],v=i[4],b=i[5],M=i[6],T=i[7],S=i[8],O=i[9],k=i[10],N=i[11],z=i[12],j=i[13],Z=i[14],te=i[15],ee=a*b-u*v,ne=a*M-f*v,ae=a*T-g*v,he=u*M-f*b,ue=u*T-g*b,je=f*T-g*M,Le=S*j-O*z,Ke=S*Z-k*z,_t=S*te-N*z,He=O*Z-k*j,rt=O*te-N*j,it=k*te-N*Z,dt=ee*it-ne*rt+ae*He+he*_t-ue*Ke+je*Le;return dt?(s[0]=(b*it-M*rt+T*He)*(dt=1/dt),s[1]=(f*rt-u*it-g*He)*dt,s[2]=(j*je-Z*ue+te*he)*dt,s[3]=(k*ue-O*je-N*he)*dt,s[4]=(M*_t-v*it-T*Ke)*dt,s[5]=(a*it-f*_t+g*Ke)*dt,s[6]=(Z*ae-z*je-te*ne)*dt,s[7]=(S*je-k*ae+N*ne)*dt,s[8]=(v*rt-b*_t+T*Le)*dt,s[9]=(u*_t-a*rt-g*Le)*dt,s[10]=(z*ue-j*ae+te*ee)*dt,s[11]=(O*ae-S*ue-N*ee)*dt,s[12]=(b*Ke-v*He-M*Le)*dt,s[13]=(a*He-u*Ke+f*Le)*dt,s[14]=(j*ne-z*he-Z*ee)*dt,s[15]=(S*he-O*ne+k*ee)*dt,s):null}function hh(s,i,a){var u=i[0],f=i[1],g=i[2],v=i[3],b=i[4],M=i[5],T=i[6],S=i[7],O=i[8],k=i[9],N=i[10],z=i[11],j=i[12],Z=i[13],te=i[14],ee=i[15],ne=a[0],ae=a[1],he=a[2],ue=a[3];return s[0]=ne*u+ae*b+he*O+ue*j,s[1]=ne*f+ae*M+he*k+ue*Z,s[2]=ne*g+ae*T+he*N+ue*te,s[3]=ne*v+ae*S+he*z+ue*ee,s[4]=(ne=a[4])*u+(ae=a[5])*b+(he=a[6])*O+(ue=a[7])*j,s[5]=ne*f+ae*M+he*k+ue*Z,s[6]=ne*g+ae*T+he*N+ue*te,s[7]=ne*v+ae*S+he*z+ue*ee,s[8]=(ne=a[8])*u+(ae=a[9])*b+(he=a[10])*O+(ue=a[11])*j,s[9]=ne*f+ae*M+he*k+ue*Z,s[10]=ne*g+ae*T+he*N+ue*te,s[11]=ne*v+ae*S+he*z+ue*ee,s[12]=(ne=a[12])*u+(ae=a[13])*b+(he=a[14])*O+(ue=a[15])*j,s[13]=ne*f+ae*M+he*k+ue*Z,s[14]=ne*g+ae*T+he*N+ue*te,s[15]=ne*v+ae*S+he*z+ue*ee,s}function Od(s,i,a){var u,f,g,v,b,M,T,S,O,k,N,z,j=a[0],Z=a[1],te=a[2];return i===s?(s[12]=i[0]*j+i[4]*Z+i[8]*te+i[12],s[13]=i[1]*j+i[5]*Z+i[9]*te+i[13],s[14]=i[2]*j+i[6]*Z+i[10]*te+i[14],s[15]=i[3]*j+i[7]*Z+i[11]*te+i[15]):(f=i[1],g=i[2],v=i[3],b=i[4],M=i[5],T=i[6],S=i[7],O=i[8],k=i[9],N=i[10],z=i[11],s[0]=u=i[0],s[1]=f,s[2]=g,s[3]=v,s[4]=b,s[5]=M,s[6]=T,s[7]=S,s[8]=O,s[9]=k,s[10]=N,s[11]=z,s[12]=u*j+b*Z+O*te+i[12],s[13]=f*j+M*Z+k*te+i[13],s[14]=g*j+T*Z+N*te+i[14],s[15]=v*j+S*Z+z*te+i[15]),s}function dh(s,i,a){var u=a[0],f=a[1],g=a[2];return s[0]=i[0]*u,s[1]=i[1]*u,s[2]=i[2]*u,s[3]=i[3]*u,s[4]=i[4]*f,s[5]=i[5]*f,s[6]=i[6]*f,s[7]=i[7]*f,s[8]=i[8]*g,s[9]=i[9]*g,s[10]=i[10]*g,s[11]=i[11]*g,s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15],s}function Q_(s,i,a){var u=Math.sin(a),f=Math.cos(a),g=i[4],v=i[5],b=i[6],M=i[7],T=i[8],S=i[9],O=i[10],k=i[11];return i!==s&&(s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15]),s[4]=g*f+T*u,s[5]=v*f+S*u,s[6]=b*f+O*u,s[7]=M*f+k*u,s[8]=T*f-g*u,s[9]=S*f-v*u,s[10]=O*f-b*u,s[11]=k*f-M*u,s}function kd(s,i,a){var u=Math.sin(a),f=Math.cos(a),g=i[0],v=i[1],b=i[2],M=i[3],T=i[8],S=i[9],O=i[10],k=i[11];return i!==s&&(s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15]),s[0]=g*f-T*u,s[1]=v*f-S*u,s[2]=b*f-O*u,s[3]=M*f-k*u,s[8]=g*u+T*f,s[9]=v*u+S*f,s[10]=b*u+O*f,s[11]=M*u+k*f,s}function Nm(s,i){return s[0]=i[0],s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=i[1],s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=i[2],s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function ey(s,i,a){var u,f,g,v=a[0],b=a[1],M=a[2],T=Math.hypot(v,b,M);return T0&&(g=1/Math.sqrt(g)),s[0]=i[0]*g,s[1]=i[1]*g,s[2]=i[2]*g,s}function pi(s,i){return s[0]*i[0]+s[1]*i[1]+s[2]*i[2]}function oy(s,i,a){var u=i[0],f=i[1],g=i[2],v=a[0],b=a[1],M=a[2];return s[0]=f*M-g*b,s[1]=g*v-u*M,s[2]=u*b-f*v,s}function Er(s,i,a){var u=i[0],f=i[1],g=i[2],v=a[3]*u+a[7]*f+a[11]*g+a[15];return s[0]=(a[0]*u+a[4]*f+a[8]*g+a[12])/(v=v||1),s[1]=(a[1]*u+a[5]*f+a[9]*g+a[13])/v,s[2]=(a[2]*u+a[6]*f+a[10]*g+a[14])/v,s}function jv(s,i,a){var u=a[0],f=a[1],g=a[2],v=i[0],b=i[1],M=i[2],T=f*M-g*b,S=g*v-u*M,O=u*b-f*v,k=f*O-g*S,N=g*T-u*O,z=u*S-f*T,j=2*a[3];return S*=j,O*=j,N*=2,z*=2,s[0]=v+(T*=j)+(k*=2),s[1]=b+S+N,s[2]=M+O+z,s}var Rd,ba=zm,Bm=iy,cu=fh;function $v(s,i,a){return s[0]=i[0]*a,s[1]=i[1]*a,s[2]=i[2]*a,s[3]=i[3]*a,s}function Qf(s,i){var a=i[0],u=i[1],f=i[2],g=i[3],v=a*a+u*u+f*f+g*g;return v>0&&(v=1/Math.sqrt(v)),s[0]=a*v,s[1]=u*v,s[2]=f*v,s[3]=g*v,s}function Ol(s,i,a){var u=i[0],f=i[1],g=i[2],v=i[3];return s[0]=a[0]*u+a[4]*f+a[8]*g+a[12]*v,s[1]=a[1]*u+a[5]*f+a[9]*g+a[13]*v,s[2]=a[2]*u+a[6]*f+a[10]*g+a[14]*v,s[3]=a[3]*u+a[7]*f+a[11]*g+a[15]*v,s}function ep(){var s=new li(4);return li!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0),s[3]=1,s}function Vm(s){return s[0]=0,s[1]=0,s[2]=0,s[3]=1,s}function sy(s,i,a){a*=.5;var u=i[0],f=i[1],g=i[2],v=i[3],b=Math.sin(a),M=Math.cos(a);return s[0]=u*M+v*b,s[1]=f*M+g*b,s[2]=g*M-f*b,s[3]=v*M-u*b,s}function ay(s,i,a){a*=.5;var u=i[0],f=i[1],g=i[2],v=i[3],b=Math.sin(a),M=Math.cos(a);return s[0]=u*M-g*b,s[1]=f*M+v*b,s[2]=g*M+u*b,s[3]=v*M-f*b,s}ny(),Rd=new li(4),li!=Float32Array&&(Rd[0]=0,Rd[1]=0,Rd[2]=0,Rd[3]=0);var wb=Qf;ny(),ph(1,0,0),ph(0,1,0),ep(),ep(),Pl();const Ld=be([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:Fd}=Ld,Hv=be([{name:"a_pos_3",components:3,type:"Int16"}]);var gh=be([{name:"a_pos",type:"Int16",components:2}]);class ly{constructor(i,a){this.pos=i,this.dir=a}intersectsPlane(i,a,u){const f=pi(a,this.dir);if(Math.abs(f)<1e-6)return!1;const g=((i[0]-this.pos[0])*a[0]+(i[1]-this.pos[1])*a[1]+(i[2]-this.pos[2])*a[2])/f;return u[0]=this.pos[0]+this.dir[0]*g,u[1]=this.pos[1]+this.dir[1]*g,u[2]=this.pos[2]+this.dir[2]*g,!0}closestPointOnSphere(i,a,u){if(j=(N=this.pos)[0],Z=N[1],te=N[2],ee=(z=i)[0],ne=z[1],ae=z[2],Math.abs(j-ee)<=Kf*Math.max(1,Math.abs(j),Math.abs(ee))&&Math.abs(Z-ne)<=Kf*Math.max(1,Math.abs(Z),Math.abs(ne))&&Math.abs(te-ae)<=Kf*Math.max(1,Math.abs(te),Math.abs(ae))||0===a)return u[0]=u[1]=u[2]=0,!1;var N,z,j,Z,te,ee,ne,ae;const[f,g,v]=this.dir,b=this.pos[0]-i[0],M=this.pos[1]-i[1],T=this.pos[2]-i[2],S=f*f+g*g+v*v,O=2*(b*f+M*g+T*v),k=O*O-4*S*(b*b+M*M+T*T-a*a);if(k<0){const N=Math.max(-O/2,0),z=b+f*N,j=M+g*N,Z=T+v*N,te=Math.hypot(z,j,Z);return u[0]=z*a/te,u[1]=j*a/te,u[2]=Z*a/te,!1}{const N=(-O-Math.sqrt(k))/(2*S);if(N<0){const z=Math.hypot(b,M,T);return u[0]=b*a/z,u[1]=M*a/z,u[2]=T*a/z,!1}return u[0]=b+f*N,u[1]=M+g*N,u[2]=T+v*N,!0}}}class cy{constructor(i,a,u,f,g){this.TL=i,this.TR=a,this.BR=u,this.BL=f,this.horizon=g}static fromInvProjectionMatrix(i,a,u){const f=[-1,1,1],g=[1,1,1],v=[1,-1,1],b=[-1,-1,1],M=Er(f,f,i),T=Er(g,g,i),S=Er(v,v,i),O=Er(b,b,i);return new cy(M,T,S,O,a/u)}}class uy{constructor(i,a){this.points=i,this.planes=a}static fromInvProjectionMatrix(i,a,u,f){const g=Math.pow(2,u),v=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(M=>{const T=Ol([],M,i),S=1/T[3]/a*g;return(O=T)[0]=(k=T)[0]*(N=[S,S,f?1/T[3]:S,S])[0],O[1]=k[1]*N[1],O[2]=k[2]*N[2],O[3]=k[3]*N[3],O;var O,k,N}),b=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(M=>{const T=sr([],oy([],ba([],v[M[0]],v[M[1]]),ba([],v[M[2]],v[M[1]]))),S=-pi(T,v[M[1]]);return T.concat(S)});return new uy(v,b)}}class vs{static fromPoints(i){const a=[1/0,1/0,1/0],u=[-1/0,-1/0,-1/0];for(const f of i)mh(a,a,f),Jf(u,u,f);return new vs(a,u)}static applyTransform(i,a){const u=i.getCorners();for(let f=0;f=0;if(0===v)return 0;v!==a.length&&(u=!1)}if(u)return 2;for(let f=0;f<3;f++){let g=Number.MAX_VALUE,v=-Number.MAX_VALUE;for(let b=0;bthis.max[f]-this.min[f])return 0}return 1}}const Gv=5,Um=6,Bs=dn/Math.PI/2,bb=16383,_h=[64,32,16],xs=-Bs,Ja=Bs,qv=[new vs([xs,xs,xs],[Ja,Ja,Ja]),new vs([xs,xs,xs],[0,0,Ja]),new vs([0,xs,xs],[Ja,0,Ja]),new vs([xs,0,xs],[0,Ja,Ja]),new vs([0,0,xs],[Ja,Ja,Ja])];function tp(s){return s*Bs/bh}function Wv(s,i,a,u=!0){const f=ci([],s._camera.position,s.worldSize),g=[i,a,1,1];Ol(g,g,s.pixelMatrixInverse),$v(g,g,1/g[3]);const v=sr([],ba([],g,f)),b=s.globeMatrix,M=[b[12],b[13],b[14]],T=ba([],M,f),S=fh(T),O=sr([],T),k=s.worldSize/(2*Math.PI),N=pi(O,v),z=Math.asin(k/S);if(z1?null:function(u,f,g,v){const b=Math.sin(g);return u*(Math.sin((1-v)*g)/b)+f*(Math.sin(v*g)/b)}(s.a[i],s.b[i],s.angle,pt(a,0,1))+s.center[i]}function Qs(s){if(s.z<=1)return qv[s.z+2*s.y+s.x];const i=$m(jm(s));return vs.fromPoints(i)}function hc(s,i,a){return ci(s,s,1-a),Ya(s,s,i,a)}function dy(s,i){const a=xh(i.zoom);if(0===a)return Qs(s);const u=jm(s),f=$m(u),g=ws(u.getWest())*i.worldSize,v=ws(u.getEast())*i.worldSize,b=bs(u.getNorth())*i.worldSize,M=bs(u.getSouth())*i.worldSize,T=[g,b,0],S=[v,b,0],O=[g,M,0],k=[v,M,0],N=Xa([],i.globeMatrix);return Er(T,T,N),Er(S,S,N),Er(O,O,N),Er(k,k,N),f[0]=hc(f[0],O,a),f[1]=hc(f[1],k,a),f[2]=hc(f[2],S,a),f[3]=hc(f[3],T,a),vs.fromPoints(f)}function np(s,i,a){for(const u of s)Er(u,u,i),ci(u,u,a)}function jm({x:s,y:i,z:a}){const u=1/(1<Math.PI/2*1.01}const ho=Pt(85),Cb=Math.cos(ho),Po=Math.sin(ho),bh=6371008.8,Zv=2*Math.PI*bh;class dc{constructor(i,a){if(isNaN(i)||isNaN(a))throw new Error(`Invalid LngLat object: (${i}, ${a})`);if(this.lng=+i,this.lat=+a,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dc(sn(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(i){const a=Math.PI/180,u=this.lat*a,f=i.lat*a,g=Math.sin(u)*Math.sin(f)+Math.cos(u)*Math.cos(f)*Math.cos((i.lng-this.lng)*a);return bh*Math.acos(Math.min(g,1))}toBounds(i=0){const a=360*i/40075017,u=a/Math.cos(Math.PI/180*this.lat);return new uh(new dc(this.lng-u,this.lat-a),new dc(this.lng+u,this.lat+a))}toEcef(i){const a=tp(i);return vh(this.lat,this.lng,Bs+a)}static convert(i){if(i instanceof dc)return i;if(Array.isArray(i)&&(2===i.length||3===i.length))return new dc(Number(i[0]),Number(i[1]));if(!Array.isArray(i)&&"object"==typeof i&&null!==i)return new dc(Number("lng"in i?i.lng:i.lon),Number(i.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}var wr=dc;function hu(s){return Zv*Math.cos(s*Math.PI/180)}function ws(s){return(180+s)/360}function bs(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function Ca(s,i){return s/hu(i)}function Cs(s){return 360*s-180}function Ui(s){return 360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90}function Mb(s,i){return s*hu(Ui(i))}const Ao=85.051129;function Eb(s){return 1/Math.cos(s*Math.PI/180)}class ip{constructor(i,a,u=0){this.x=+i,this.y=+a,this.z=+u}static fromLngLat(i,a=0){const u=wr.convert(i);return new ip(ws(u.lng),bs(u.lat),Ca(a,u.lat))}toLngLat(){return new wr(Cs(this.x),Ui(this.y))}toAltitude(){return Mb(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Zv*Eb(Ui(this.y))}}function Xv(s,i,a,u,f,g,v,b,M){const T=(i+u)/2,S=(a+f)/2,O=new Ee(T,S);b(O),function(k,N,z,j,Z,te){const ee=z-Z,ne=j-te;return Math.abs((j-N)*ee-(z-k)*ne)/Math.hypot(ee,ne)}(O.x,O.y,g.x,g.y,v.x,v.y)>=M?(Xv(s,i,a,T,S,g,O,b,M),Xv(s,T,S,u,f,O,v,b,M)):s.push(v)}function Tb(s,i,a){let u=s[0],f=u.x,g=u.y;i(u);const v=[u];for(let b=1;bs.x+1||us.y+1)&&bn("Geometry exceeds allowed extent, reduce your vector tile buffer size"),s}function mi(s,i,a){const u=s.loadGeometry(),f=s.extent,g=dn/f;if(i&&a&&a.projection.isReprojectedInTileSpace){const v=1<{const N=Cs((i.x+k.x/f)/v),z=Ui((i.y+k.y/f)/v),j=S.project(N,z);k.x=(j.x*b-M)*f,k.y=(j.y*b-T)*f};for(let k=0;k=f||z.y<0||z.y>=f||(O(z),N.push(z));u[k]=N}}for(const v of u)for(const b of v)Db(b,g);return u}function Ch(s,i){return{type:s.type,id:s.id,properties:s.properties,geometry:i?mi(s):[]}}function fu(s,i,a,u,f){s.emplaceBack(2*i+(u+1)/2,2*a+(f+1)/2)}function Gm(s,i,a){s.emplaceBack(i.x,i.y,i.z,16384*a[0],16384*a[1],16384*a[2])}class os{constructor(i){this.zoom=i.zoom,this.overscaling=i.overscaling,this.layers=i.layers,this.layerIds=this.layers.map(a=>a.id),this.index=i.index,this.hasPattern=!1,this.projection=i.projection,this.layoutVertexArray=new yt,this.indexArray=new on,this.segments=new Ti,this.programConfigurations=new ch(i.layers,i.zoom),this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id)}populate(i,a,u,f){const g=this.layers[0],v=[];let b=null;"circle"===g.type&&(b=g.layout.get("circle-sort-key"));for(const{feature:T,id:S,index:O,sourceLayerIndex:k}of i){const N=this.layers[0]._featureFilter.needGeometry,z=Ch(T,N);if(!this.layers[0]._featureFilter.filter(new A(this.zoom),z,u))continue;const j=b?b.evaluate(z,{},u):void 0,Z={id:S,properties:T.properties,type:T.type,sourceLayerIndex:k,index:O,geometry:N?z.geometry:mi(T,u,f),patterns:{},sortKey:j};v.push(Z)}b&&v.sort((T,S)=>T.sortKey-S.sortKey);let M=null;"globe"===f.projection.name&&(this.globeExtVertexArray=new xt,M=f.projection);for(const T of v){const{geometry:S,index:O,sourceLayerIndex:k}=T,N=i[O].feature;this.addFeature(T,S,O,a.availableImages,u,M),a.featureIndex.insert(N,S,O,k,this.index)}}update(i,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(i,a,this.stateDependentLayers,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(i){this.uploaded||(this.layoutVertexBuffer=i.createVertexBuffer(this.layoutVertexArray,Sl.members),this.indexBuffer=i.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=i.createVertexBuffer(this.globeExtVertexArray,K_.members))),this.programConfigurations.upload(i),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(i,a,u,f,g,v){for(const b of a)for(const M of b){const T=M.x,S=M.y;if(T<0||T>=dn||S<0||S>=dn)continue;if(v){const N=v.projectTilePoint(T,S,g),z=v.upVector(g,T,S),j=this.globeExtVertexArray;Gm(j,N,z),Gm(j,N,z),Gm(j,N,z),Gm(j,N,z)}const O=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,i.sortKey),k=O.vertexLength;fu(this.layoutVertexArray,T,S,-1,-1),fu(this.layoutVertexArray,T,S,1,-1),fu(this.layoutVertexArray,T,S,1,1),fu(this.layoutVertexArray,T,S,-1,1),this.indexArray.emplaceBack(k,k+1,k+2),this.indexArray.emplaceBack(k,k+2,k+3),O.vertexLength+=4,O.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,i,u,{},f,g)}}function Mh(s,i){for(let a=0;a1){if(ap(s,i))return!0;for(let u=0;u1?a:a.sub(i)._mult(f)._add(i))}function Vs(s,i){let a,u,f,g=!1;for(let v=0;vi.y!=f.y>i.y&&i.x<(f.x-u.x)*(i.y-u.y)/(f.y-u.y)+u.x&&(g=!g)}return g}function fc(s,i){let a=!1;for(let u=0,f=s.length-1;ui.y!=v.y>i.y&&i.x<(v.x-g.x)*(i.y-g.y)/(v.y-g.y)+g.x&&(a=!a)}return a}function Eh(s,i,a,u,f){for(const v of s)if(i<=v.x&&a<=v.y&&u>=v.x&&f>=v.y)return!0;const g=[new Ee(i,a),new Ee(i,f),new Ee(u,f),new Ee(u,a)];if(s.length>2)for(const v of g)if(fc(s,v))return!0;for(let v=0;vf.x&&i.x>f.x||s.yf.y&&i.y>f.y)return!1;const g=Yo(s,i,a[0]);return g!==Yo(s,i,a[1])||g!==Yo(s,i,a[2])||g!==Yo(s,i,a[3])}function Th(s,i,a){const u=i.paint.get(s).value;return"constant"===u.kind?u.value:a.programConfigurations.get(i.id).getMaxValue(s)}function Wm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}function Qv(s,i,a,u,f){if(!i[0]&&!i[1])return s;const g=Ee.convert(i)._mult(f);"viewport"===a&&g._rotate(-u);const v=[];for(let b=0;b0){const ne=a.projection.upVector(T,N.x,N.y);j.x+=ne[0]*S*z,j.y+=ne[1]*S*z,j.z+=ne[2]*S*z}const Z=g?N:gy(j.x,j.y,j.z,u),te=g?s.tilespaceRays.map(ne=>Zm(ne,z)):s.queryGeometry.screenGeometry,ee=Ol([],[j.x,j.y,j.z,1],u);if(!v&&g?M*=ee[3]/a.cameraToCenterDistance:v&&!g&&(M*=a.cameraToCenterDistance/ee[3]),g){const ne=Ui((k.y/dn+T.y)/(1<s.width||f.height>s.height||a.x>s.width-f.width||a.y>s.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>i.width||f.height>i.height||u.x>i.width-f.width||u.y>i.height-f.height)throw new RangeError("out of range destination coordinates for image copy");const v=s.data,b=i.data;for(let M=0;M{i[s.evaluationKey]=M;const T=s.expression.evaluate(i);f.data[v+b+0]=Math.floor(255*T.r/T.a),f.data[v+b+1]=Math.floor(255*T.g/T.a),f.data[v+b+2]=Math.floor(255*T.b/T.a),f.data[v+b+3]=Math.floor(255*T.a)};if(s.clips)for(let v=0,b=0;v80*a){u=g=s[0],f=v=s[1];for(var z=a;zg&&(g=b),M>v&&(v=M);T=0!==(T=Math.max(g-u,v-f))?32767/T:0}return Ym(k,N,a,u,f,T,0),N}function xy(s,i,a,u,f){var g,v;if(f===jd(s,i,a,u)>0)for(g=i;g=i;g-=u)v=pu(g,s[g],s[g+1],v);return v&&by(v,v.next)&&(dp(v),v=v.next),v}function Dh(s,i){if(!s)return s;i||(i=s);var a,u=s;do{if(a=!1,u.steiner||!by(u,u.next)&&0!==yi(u.prev,u,u.next))u=u.next;else{if(dp(u),(u=i=u.prev)===u.next)break;a=!0}}while(a||u!==i);return i}function Ym(s,i,a,u,f,g,v){if(s){!v&&g&&function(S,O,k,N){var z=S;do{0===z.z&&(z.z=hp(z.x,z.y,O,k,N)),z.prevZ=z.prev,z.nextZ=z.next,z=z.next}while(z!==S);z.prevZ.nextZ=null,z.prevZ=null,function(j){var Z,te,ee,ne,ae,he,ue,je,Le=1;do{for(te=j,j=null,ae=null,he=0;te;){for(he++,ee=te,ue=0,Z=0;Z0||je>0&ⅇ)0!==ue&&(0===je||!ee||te.z<=ee.z)?(ne=te,te=te.nextZ,ue--):(ne=ee,ee=ee.nextZ,je--),ae?ae.nextZ=ne:j=ne,ne.prevZ=ae,ae=ne;te=ee}ae.nextZ=null,Le*=2}while(he>1)}(z)}(s,u,f,g);for(var b,M,T=s;s.prev!==s.next;)if(b=s.prev,M=s.next,g?Rb(s,u,f,g):kb(s))i.push(b.i/a|0),i.push(s.i/a|0),i.push(M.i/a|0),dp(s),s=M.next,T=M.next;else if((s=M)===T){v?1===v?Ym(s=Lb(Dh(s),i,a),i,a,u,f,g,2):2===v&&Bd(s,i,a,u,f,g):Ym(Dh(s),i,a,u,f,g,1);break}}}function kb(s){var i=s.prev,a=s,u=s.next;if(yi(i,a,u)>=0)return!1;for(var f=i.x,g=a.x,v=u.x,b=i.y,M=a.y,T=u.y,S=fg?f>v?f:v:g>v?g:v,N=b>M?b>T?b:T:M>T?M:T,z=u.next;z!==i;){if(z.x>=S&&z.x<=k&&z.y>=O&&z.y<=N&&Ih(f,b,g,M,v,T,z.x,z.y)&&yi(z.prev,z,z.next)>=0)return!1;z=z.next}return!0}function Rb(s,i,a,u){var f=s.prev,g=s,v=s.next;if(yi(f,g,v)>=0)return!1;for(var b=f.x,M=g.x,T=v.x,S=f.y,O=g.y,k=v.y,N=bM?b>T?b:T:M>T?M:T,Z=S>O?S>k?S:k:O>k?O:k,te=hp(N,z,i,a,u),ee=hp(j,Z,i,a,u),ne=s.prevZ,ae=s.nextZ;ne&&ne.z>=te&&ae&&ae.z<=ee;){if(ne.x>=N&&ne.x<=j&&ne.y>=z&&ne.y<=Z&&ne!==f&&ne!==v&&Ih(b,S,M,O,T,k,ne.x,ne.y)&&yi(ne.prev,ne,ne.next)>=0||(ne=ne.prevZ,ae.x>=N&&ae.x<=j&&ae.y>=z&&ae.y<=Z&&ae!==f&&ae!==v&&Ih(b,S,M,O,T,k,ae.x,ae.y)&&yi(ae.prev,ae,ae.next)>=0))return!1;ae=ae.nextZ}for(;ne&&ne.z>=te;){if(ne.x>=N&&ne.x<=j&&ne.y>=z&&ne.y<=Z&&ne!==f&&ne!==v&&Ih(b,S,M,O,T,k,ne.x,ne.y)&&yi(ne.prev,ne,ne.next)>=0)return!1;ne=ne.prevZ}for(;ae&&ae.z<=ee;){if(ae.x>=N&&ae.x<=j&&ae.y>=z&&ae.y<=Z&&ae!==f&&ae!==v&&Ih(b,S,M,O,T,k,ae.x,ae.y)&&yi(ae.prev,ae,ae.next)>=0)return!1;ae=ae.nextZ}return!0}function Lb(s,i,a){var u=s;do{var f=u.prev,g=u.next.next;!by(f,g)&&Jm(f,u,u.next,g)&&Ud(f,g)&&Ud(g,f)&&(i.push(f.i/a|0),i.push(u.i/a|0),i.push(g.i/a|0),dp(u),dp(u.next),u=s=g),u=u.next}while(u!==s);return Dh(u)}function Bd(s,i,a,u,f,g){var v=s;do{for(var b=v.next.next;b!==v.prev;){if(v.i!==b.i&&s1(v,b)){var M=Cy(v,b);return v=Dh(v,v.next),M=Dh(M,M.next),Ym(v,i,a,u,f,g,0),void Ym(M,i,a,u,f,g,0)}b=b.next}v=v.next}while(v!==s)}function o1(s,i){return s.x-i.x}function wy(s,i){var a=function(f,g){var v,b=g,M=f.x,T=f.y,S=-1/0;do{if(T<=b.y&&T>=b.next.y&&b.next.y!==b.y){var O=b.x+(T-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(O<=M&&O>S&&(S=O,v=b.x=b.x&&b.x>=z&&M!==b.x&&Ih(Tv.x||b.x===v.x&&Km(v,b)))&&(v=b,Z=k)),b=b.next}while(b!==N);return v}(s,i);if(!a)return i;var u=Cy(a,s);return Dh(u,u.next),Dh(a,a.next)}function Km(s,i){return yi(s.prev,s,i.prev)<0&&yi(i.next,s,s.next)<0}function hp(s,i,a,u,f){return(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=(s-a)*f|0)|s<<8))|s<<4))|s<<2))|s<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-u)*f|0)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function Fb(s){var i=s,a=s;do{(i.x=(s-v)*(g-b)&&(s-v)*(u-b)>=(a-v)*(i-b)&&(a-v)*(g-b)>=(f-v)*(u-b)}function s1(s,i){return s.next.i!==i.i&&s.prev.i!==i.i&&!function(a,u){var f=a;do{if(f.i!==a.i&&f.next.i!==a.i&&f.i!==u.i&&f.next.i!==u.i&&Jm(f,f.next,a,u))return!0;f=f.next}while(f!==a);return!1}(s,i)&&(Ud(s,i)&&Ud(i,s)&&function(a,u){var f=a,g=!1,v=(a.x+u.x)/2,b=(a.y+u.y)/2;do{f.y>b!=f.next.y>b&&f.next.y!==f.y&&v<(f.next.x-f.x)*(b-f.y)/(f.next.y-f.y)+f.x&&(g=!g),f=f.next}while(f!==a);return g}(s,i)&&(yi(s.prev,s,i.prev)||yi(s,i.prev,i))||by(s,i)&&yi(s.prev,s,s.next)>0&&yi(i.prev,i,i.next)>0)}function yi(s,i,a){return(i.y-s.y)*(a.x-i.x)-(i.x-s.x)*(a.y-i.y)}function by(s,i){return s.x===i.x&&s.y===i.y}function Jm(s,i,a,u){var f=Vd(yi(s,i,a)),g=Vd(yi(s,i,u)),v=Vd(yi(a,u,s)),b=Vd(yi(a,u,i));return f!==g&&v!==b||!(0!==f||!Qm(s,a,i))||!(0!==g||!Qm(s,u,i))||!(0!==v||!Qm(a,s,u))||!(0!==b||!Qm(a,i,u))}function Qm(s,i,a){return i.x<=Math.max(s.x,a.x)&&i.x>=Math.min(s.x,a.x)&&i.y<=Math.max(s.y,a.y)&&i.y>=Math.min(s.y,a.y)}function Vd(s){return s>0?1:s<0?-1:0}function Ud(s,i){return yi(s.prev,s,s.next)<0?yi(s,i,s.next)>=0&&yi(s,s.prev,i)>=0:yi(s,i,s.prev)<0||yi(s,s.next,i)<0}function Cy(s,i){var a=new fp(s.i,s.x,s.y),u=new fp(i.i,i.x,i.y),f=s.next,g=i.prev;return s.next=i,i.prev=s,a.next=f,f.prev=a,u.next=a,a.prev=u,g.next=u,u.prev=g,u}function pu(s,i,a,u){var f=new fp(s,i,a);return u?(f.next=u.next,f.prev=u,u.next.prev=f,u.next=f):(f.prev=f,f.next=f),f}function dp(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function fp(s,i,a){this.i=s,this.x=i,this.y=a,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function jd(s,i,a,u){for(var f=0,g=i,v=a-u;g0&&a.holes.push(u+=s[f-1].length)}return a};var My=oe(yy.exports);function Ey(s,i,a,u,f){pp(s,i,a||0,u||s.length-1,f||$d)}function pp(s,i,a,u,f){for(;u>a;){if(u-a>600){var g=u-a+1,v=i-a+1,b=Math.log(g),M=.5*Math.exp(2*b/3),T=.5*Math.sqrt(b*M*(g-M)/g)*(v-g/2<0?-1:1);pp(s,i,Math.max(a,Math.floor(i-v*M/g+T)),Math.min(u,Math.floor(i+(g-v)*M/g+T)),f)}var S=s[i],O=a,k=u;for($o(s,a,i),f(s[u],S)>0&&$o(s,a,u);O0;)k--}0===f(s[a],S)?$o(s,a,k):$o(s,++k,u),k<=i&&(a=k+1),i<=k&&(u=k-1)}}function $o(s,i,a){var u=s[i];s[i]=s[a],s[a]=u}function $d(s,i){return si?1:0}function mp(s,i){const a=s.length;if(a<=1)return[s];const u=[];let f,g;for(let v=0;v1)for(let v=0;va.id),this.index=i.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new yt,this.indexArray=new on,this.indexArray2=new co,this.programConfigurations=new ch(i.layers,i.zoom),this.segments=new Ti,this.segments2=new Ti,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id),this.projection=i.projection}populate(i,a,u,f){this.hasPattern=Ty("fill",this.layers,a);const g=this.layers[0].layout.get("fill-sort-key"),v=[];for(const{feature:b,id:M,index:T,sourceLayerIndex:S}of i){const O=this.layers[0]._featureFilter.needGeometry,k=Ch(b,O);if(!this.layers[0]._featureFilter.filter(new A(this.zoom),k,u))continue;const N=g?g.evaluate(k,{},u,a.availableImages):void 0,z={id:M,properties:b.properties,type:b.type,sourceLayerIndex:S,index:T,geometry:O?k.geometry:mi(b,u,f),patterns:{},sortKey:N};v.push(z)}g&&v.sort((b,M)=>b.sortKey-M.sortKey);for(const b of v){const{geometry:M,index:T,sourceLayerIndex:S}=b;if(this.hasPattern){const O=eg("fill",this.layers,b,this.zoom,a);this.patternFeatures.push(O)}else this.addFeature(b,M,T,u,{},a.availableImages);a.featureIndex.insert(i[T].feature,M,T,S,this.index)}}update(i,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(i,a,this.stateDependentLayers,u,f)}addFeatures(i,a,u,f,g){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,a,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(i){this.uploaded||(this.layoutVertexBuffer=i.createVertexBuffer(this.layoutVertexArray,up),this.indexBuffer=i.createIndexBuffer(this.indexArray),this.indexBuffer2=i.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(i),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(i,a,u,f,g,v=[]){for(const b of mp(a,500)){let M=0;for(const z of b)M+=z.length;const T=this.segments.prepareSegment(M,this.layoutVertexArray,this.indexArray),S=T.vertexLength,O=[],k=[];for(const z of b){if(0===z.length)continue;z!==b[0]&&k.push(O.length/2);const j=this.segments2.prepareSegment(z.length,this.layoutVertexArray,this.indexArray2),Z=j.vertexLength;this.layoutVertexArray.emplaceBack(z[0].x,z[0].y),this.indexArray2.emplaceBack(Z+z.length-1,Z),O.push(z[0].x),O.push(z[0].y);for(let te=1;te>3}if(f--,1===u||2===u)g+=s.readSVarint(),v+=s.readSVarint(),1===u&&(i&&b.push(i),i=[]),i.push(new Ub(g,v));else{if(7!==u)throw new Error("unknown command "+u);i&&i.push(i[0].clone())}}return i&&b.push(i),b},Sh.prototype.bbox=function(){var s=this._pbf;s.pos=this._geometry;for(var i=s.readVarint()+s.pos,a=1,u=0,f=0,g=0,v=1/0,b=-1/0,M=1/0,T=-1/0;s.pos>3}if(u--,1===a||2===a)(f+=s.readSVarint())b&&(b=f),(g+=s.readSVarint())T&&(T=g);else if(7!==a)throw new Error("unknown command "+a)}return[v,M,b,T]},Sh.prototype.toGeoJSON=function(s,i,a){var u,f,g=this.extent*Math.pow(2,a),v=this.extent*s,b=this.extent*i,M=this.loadGeometry(),T=Sh.types[this.type];function S(N){for(var z=0;z>3;f=1===v?u.readString():2===v?u.readFloat():3===v?u.readDouble():4===v?u.readVarint64():5===v?u.readVarint():6===v?u.readSVarint():7===v?u.readBoolean():null}return f}(a))}Hb.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var i=this._pbf.readVarint()+this._pbf.pos;return new $b(this._pbf,i,this.extent,this._keys,this._values)};var h1=c1;function Ms(s,i,a){if(3===s){var u=new h1(a,a.readVarint()+a.pos);u.length&&(i[u.name]=u)}}var _p=gp.VectorTile=function(s,i){this.layers=s.readFields(Ms,{},i)},tl=gp.VectorTileFeature=a1;function Ph(s,i,a,u){const f=[],g=0===u?(v,b,M,T,S,O)=>{v.push(new Ee(O,M+(O-b)/(T-b)*(S-M)))}:(v,b,M,T,S,O)=>{v.push(new Ee(b+(O-M)/(S-M)*(T-b),O))};for(const v of s){const b=[];for(const M of v){if(M.length<=2)continue;const T=[];for(let k=0;ki&&g(T,N,z,j,Z,i):te>a?ee=i&&g(T,N,z,j,Z,i),ee>a&&te<=a&&g(T,N,z,j,Z,a)}let S=M[M.length-1];const O=0===u?S.x:S.y;O>=i&&O<=a&&T.push(S),T.length&&(S=T[T.length-1],T[0].x===S.x&&T[0].y===S.y||T.push(T[0]),b.push(T))}b.length&&f.push(b)}return f}gp.VectorTileLayer=c1;const d1=tl.types,yp=Math.pow(2,13);function vp(s,i,a,u,f,g,v,b){s.emplaceBack((i<<1)+v,(a<<1)+g,(Math.floor(u*yp)<<1)+f,Math.round(b))}function xp(s,i,a){s.emplaceBack(i.x,i.y,i.z,16384*a[0],16384*a[1],16384*a[2])}class tg{constructor(){this.acc=new Ee(0,0),this.polyCount=[]}startRing(i){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new Ee(i.x,i.y),this.max=new Ee(i.x,i.y))}append(i,a){this.currentPolyCount.edges++,this.acc._add(i);const u=this.min,f=this.max;i.xf.x&&(f.x=i.x),i.yf.y&&(f.y=i.y),((0===i.x||i.x===dn)&&i.x===a.x)!=((0===i.y||i.y===dn)&&i.y===a.y)&&this.processBorderOverlap(i,a),a.x<0!=i.x<0&&this.addBorderIntersection(0,qt(a.y,i.y,(0-a.x)/(i.x-a.x))),a.x>dn!=i.x>dn&&this.addBorderIntersection(1,qt(a.y,i.y,(dn-a.x)/(i.x-a.x))),a.y<0!=i.y<0&&this.addBorderIntersection(2,qt(a.x,i.x,(0-a.y)/(i.y-a.y))),a.y>dn!=i.y>dn&&this.addBorderIntersection(3,qt(a.x,i.x,(dn-a.y)/(i.y-a.y)))}addBorderIntersection(i,a){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const u=this.borders[i];au[1]&&(u[1]=a)}processBorderOverlap(i,a){if(i.x===a.x){if(i.y===a.y)return;const u=0===i.x?0:1;this.addBorderIntersection(u,a.y),this.addBorderIntersection(u,i.y)}else{const u=0===i.y?2:3;this.addBorderIntersection(u,a.x),this.addBorderIntersection(u,i.x)}}centroid(){const i=this.polyCount.reduce((a,u)=>a+u.edges,0);return 0!==i?this.acc.div(i)._round():new Ee(0,0)}span(){return new Ee(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((i,a)=>i+ +(a[0]!==Number.MAX_VALUE),0)}}class wp{constructor(i){this.zoom=i.zoom,this.canonical=i.canonical,this.overscaling=i.overscaling,this.layers=i.layers,this.layerIds=this.layers.map(a=>a.id),this.index=i.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=i.projection,this.layoutVertexArray=new tt,this.centroidVertexArray=new Ga,this.indexArray=new on,this.programConfigurations=new ch(i.layers,i.zoom),this.segments=new Ti,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id),this.enableTerrain=i.enableTerrain}populate(i,a,u,f){this.features=[],this.hasPattern=Ty("fill-extrusion",this.layers,a),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(g){const v=Math.exp(Math.PI*(1-g.y/(1<=0;te--){const ee=N[te];(0===ee.length||(z=ee[0]).every(ne=>ne.x<=0)||z.every(ne=>ne.x>=dn)||z.every(ne=>ne.y<=0)||z.every(ne=>ne.y>=dn))&&N.splice(te,1)}var z;let j;if(S)j=Py(N,M,f);else{j=[];for(const te of N)j.push({polygon:te,bounds:M})}const Z=k?this.edgeRadius:0;for(const{polygon:te,bounds:ee}of j){let ne=0,ae=0;for(const ue of te)k&&!ue[0].equals(ue[ue.length-1])&&ue.push(ue[0]),ae+=k?ue.length-1:ue.length;const he=this.segments.prepareSegment((k?5:4)*ae,this.layoutVertexArray,this.indexArray);if(k){const ue=[],je=[];ne=he.vertexLength;for(const Ke of te){let _t,He;Ke.length&&Ke!==te[0]&&je.push(ue.length/2),_t=Ke[1].sub(Ke[0])._perp()._unit();for(let rt=1;rt4&&gu(ue[ue.length-2],ue[0],ue[1]),He=Z?ng(ue[ue.length-2],ue[0],ue[1],Z):0;Le=ue[1].sub(ue[0])._perp()._unit();let rt=!0;for(let it=1,dt=0;it0?1:0,Ct=Tt.dist(Xe);if(dt+Ct>32768&&(dt=0),Z){Ke=Lt.sub(Xe)._perp()._unit();let Fn=f1(Tt,Xe,Lt,mc(Le,Ke),Z);isNaN(Fn)&&(Fn=0);const fn=Xe.sub(Tt)._unit();Tt=Tt.add(fn.mult(He))._round(),Xe=Xe.add(fn.mult(-Fn))._round(),He=Fn,Le=Ke}const cn=he.vertexLength,kn=ue.length>4&&gu(Tt,Xe,Lt);let tr=Gb(dt,_t,rt);if(vp(this.layoutVertexArray,Tt.x,Tt.y,Bt,On,0,0,tr),vp(this.layoutVertexArray,Tt.x,Tt.y,Bt,On,0,1,tr),dt+=Ct,tr=Gb(dt,kn,!rt),_t=kn,vp(this.layoutVertexArray,Xe.x,Xe.y,Bt,On,0,0,tr),vp(this.layoutVertexArray,Xe.x,Xe.y,Bt,On,0,1,tr),he.vertexLength+=4,this.indexArray.emplaceBack(cn+0,cn+1,cn+2),this.indexArray.emplaceBack(cn+1,cn+3,cn+2),he.primitiveLength+=2,Z){const Fn=ne+(1===it?ue.length-2:it-2),fn=1===it?ne:Fn+1;if(this.indexArray.emplaceBack(cn+1,Fn,cn+3),this.indexArray.emplaceBack(Fn,fn,cn+3),he.primitiveLength+=2,void 0===je&&(je=cn),!Sy(Lt,ue[it],ee)){const zr=it===ue.length-1?je:he.vertexLength;this.indexArray.emplaceBack(cn+2,cn+3,zr),this.indexArray.emplaceBack(cn+3,zr+1,zr),this.indexArray.emplaceBack(cn+3,fn,zr+1),he.primitiveLength+=3}rt=!rt}if(S){const Fn=this.layoutVertexExtArray,fn=T.projectTilePoint(Tt.x,Tt.y,f),zr=T.projectTilePoint(Xe.x,Xe.y,f),Nn=T.upVector(f,Tt.x,Tt.y),zn=T.upVector(f,Xe.x,Xe.y);xp(Fn,fn,Nn),xp(Fn,fn,Nn),xp(Fn,zr,zn),xp(Fn,zr,zn)}}k&&(ne+=ue.length-1)}}if(O&&O.polyCount.length>0){if(O.borders){O.vertexArrayOffset=this.centroidVertexArray.length;const te=O.borders,ee=this.featuresOnBorder.push(O)-1;for(let ne=0;ne<4;ne++)te[ne][0]!==Number.MAX_VALUE&&this.borders[ne].push(ee)}this.encodeCentroid(O.borders?void 0:O.centroid(),O)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,i,u,g,v,f)}sortBorders(){for(let i=0;i<4;i++)this.borders[i].sort((a,u)=>this.featuresOnBorder[a].borders[i][0]-this.featuresOnBorder[u].borders[i][0])}encodeCentroid(i,a,u=!0){let f,g;if(i)if(0!==i.y){const b=a.span()._mult(this.tileToMeter);f=(Math.max(i.x,1)<<3)+Math.min(7,Math.round(b.x/10)),g=(Math.max(i.y,1)<<3)+Math.min(7,Math.round(b.y/10))}else f=Math.ceil(7*(i.x+450)),g=0;else f=0,g=+u;let v=u?this.centroidVertexArray.length:a.vertexArrayOffset;for(const b of a.polyCount){u&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*b.edges+b.top);for(let M=0;Ma[1].x&&i.x>a[1].x||s.ya[1].y&&i.y>a[1].y}function gu(s,i,a){if(s.x<0||s.x>=dn||i.x<0||i.x>=dn||a.x<0||a.x>=dn)return!1;const u=a.sub(i),f=u.perp(),g=s.sub(i);return(u.x*g.x+u.y*g.y)/Math.sqrt((u.x*u.x+u.y*u.y)*(g.x*g.x+g.y*g.y))>-.866&&f.x*g.x+f.y*g.y<0}function Gb(s,i,a){const u=i?2|s:-3&s;return a?1|u:-2&u}function qb(){const s=Math.PI/32,i=Math.tan(s),a=bh;return a*Math.sqrt(1+2*i*i)-a}function Py(s,i,a){const u=1<{for(const Le of ue)z.push({polygon:Le,bounds:je})},Z=Math.ceil(Math.log2(S)),te=Math.ceil(Math.log2(O)),ee=Z-te,ne=[];for(let ue=0;ue0?0:1);for(let ue=0;ueje+1?he.push({polygons:dt,bounds:Xe,depth:je+1}):j(dt,Xe)}if(Tt.length){const Xe=[new Ee(0===Le?it:Ke.x,1===Le?it:Ke.y),_t];ne.length>je+1?he.push({polygons:Tt,bounds:Xe,depth:je+1}):j(Tt,Xe)}}return z}(s,i,Math.ceil((g-f)/11.25),Math.ceil((v-b)/11.25),1,(M,T,S)=>{if(0===M)return.5*(T+S);{const O=Ui((a.y+T/dn)/u);return(bs(.5*(Ui((a.y+S/dn)/u)+O))*u-a.y)*dn}})}Ve(wp,"FillExtrusionBucket",{omit:["layers","features"]}),Ve(tg,"PartMetadata");const Wb=new ie({"fill-extrusion-edge-radius":new U(Ze["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var Zb={paint:new ie({"fill-extrusion-opacity":new U(Ze["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Y(Ze["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new U(Ze["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new U(Ze["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Y(Ze["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Y(Ze["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Y(Ze["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new U(Ze["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new U(Ze["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new U(Ze["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"]),"fill-extrusion-rounded-roof":new U(Ze["paint_fill-extrusion"]["fill-extrusion-rounded-roof"])}),layout:Wb};function p1(s,i,a){var u=2*Math.PI*6378137/256/Math.pow(2,a);return[s*u-2*Math.PI*6378137/2,i*u-2*Math.PI*6378137/2]}class rg{constructor(i,a,u){this.z=i,this.x=a,this.y=u,this.key=Ho(0,i,i,a,u)}equals(i){return this.z===i.z&&this.x===i.x&&this.y===i.y}url(i,a){const u=(v=this.y,b=this.z,M=p1(256*(g=this.x),256*(v=Math.pow(2,b)-v-1),b),T=p1(256*(g+1),256*(v+1),b),M[0]+","+M[1]+","+T[0]+","+T[1]),f=function(g,v,b){let M,T="";for(let S=g;S>0;S--)M=1<this.canonical.z?new Qi(i,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Qi(i,this.wrap,i,this.canonical.x>>a,this.canonical.y>>a)}calculateScaledKey(i,a=!0){if(this.overscaledZ===i&&a)return this.key;if(i>this.canonical.z)return Ho(this.wrap*+a,i,this.canonical.z,this.canonical.x,this.canonical.y);{const u=this.canonical.z-i;return Ho(this.wrap*+a,i,i,this.canonical.x>>u,this.canonical.y>>u)}}isChildOf(i){if(i.wrap!==this.wrap)return!1;const a=this.canonical.z-i.canonical.z;return 0===i.overscaledZ||i.overscaledZ>a&&i.canonical.y===this.canonical.y>>a}children(i){if(this.overscaledZ>=i)return[new Qi(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const a=this.canonical.z+1,u=2*this.canonical.x,f=2*this.canonical.y;return[new Qi(a,this.wrap,a,u,f),new Qi(a,this.wrap,a,u+1,f),new Qi(a,this.wrap,a,u,f+1),new Qi(a,this.wrap,a,u+1,f+1)]}isLessThan(i){return this.wrapi.wrap)&&(this.overscaledZi.overscaledZ)&&(this.canonical.xi.canonical.x)&&this.canonical.ya.id),this.index=i.index,this.projection=i.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(a=>{this.gradients[a.id]={}}),this.layoutVertexArray=new qe,this.layoutVertexArray2=new gt,this.indexArray=new on,this.programConfigurations=new ch(i.layers,i.zoom),this.segments=new Ti,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(a=>a.isStateDependent()).map(a=>a.id)}populate(i,a,u,f){this.hasPattern=Ty("line",this.layers,a);const g=this.layers[0].layout.get("line-sort-key"),v=[];for(const{feature:S,id:O,index:k,sourceLayerIndex:N}of i){const z=this.layers[0]._featureFilter.needGeometry,j=Ch(S,z);if(!this.layers[0]._featureFilter.filter(new A(this.zoom),j,u))continue;const Z=g?g.evaluate(j,{},u):void 0,te={id:O,properties:S.properties,type:S.type,sourceLayerIndex:N,index:k,geometry:z?j.geometry:mi(S,u,f),patterns:{},sortKey:Z};v.push(te)}g&&v.sort((S,O)=>S.sortKey-O.sortKey);const{lineAtlas:b,featureIndex:M}=a,T=this.addConstantDashes(b);for(const S of v){const{geometry:O,index:k,sourceLayerIndex:N}=S;if(T&&this.addFeatureDashes(S,b),this.hasPattern){const z=eg("line",this.layers,S,this.zoom,a);this.patternFeatures.push(z)}else this.addFeature(S,O,k,u,b.positions,a.availableImages);M.insert(i[k].feature,O,k,N,this.index)}}addConstantDashes(i){let a=!1;for(const u of this.layers){const f=u.paint.get("line-dasharray").value,g=u.layout.get("line-cap").value;if("constant"!==f.kind||"constant"!==g.kind)a=!0;else{const v=g.value,b=f.value;if(!b)continue;i.addDash(b,v)}}return a}addFeatureDashes(i,a){const u=this.zoom;for(const f of this.layers){const g=f.paint.get("line-dasharray").value,v=f.layout.get("line-cap").value;if("constant"===g.kind&&"constant"===v.kind)continue;let b,M;if("constant"===g.kind){if(b=g.value,!b)continue}else b=g.evaluate({zoom:u},i);M="constant"===v.kind?v.value:v.evaluate({zoom:u},i),a.addDash(b,M),i.patterns[f.id]=a.getKey(b,M)}}update(i,a,u,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(i,a,this.stateDependentLayers,u,f)}addFeatures(i,a,u,f,g){for(const v of this.patternFeatures)this.addFeature(v,v.geometry,v.index,a,u,f)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(i){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=i.createVertexBuffer(this.layoutVertexArray2,m1)),this.layoutVertexBuffer=i.createVertexBuffer(this.layoutVertexArray,T2),this.indexBuffer=i.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(i),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(i){if(i.properties&&i.properties.hasOwnProperty("mapbox_clip_start")&&i.properties.hasOwnProperty("mapbox_clip_end"))return{start:+i.properties.mapbox_clip_start,end:+i.properties.mapbox_clip_end}}addFeature(i,a,u,f,g,v){const b=this.layers[0].layout,M=b.get("line-join").evaluate(i,{}),T=b.get("line-cap").evaluate(i,{}),S=b.get("line-miter-limit"),O=b.get("line-round-limit");this.lineClips=this.lineFeatureClips(i);for(const k of a)this.addLine(k,i,M,T,S,O);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,i,u,g,v,f)}addLine(i,a,u,f,g,v){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let te=0;te=2&&i[M-1].equals(i[M-2]);)M--;let T=0;for(;T0;if(je&&te>T){const He=k.dist(N);if(He>2*S){const rt=k.sub(k.sub(N)._mult(S/He)._round());this.updateDistance(N,rt),this.addCurrentVertex(rt,j,0,0,O),N=rt}}const Ke=N&&z;let _t=Ke?u:b?"butt":f;if(Ke&&"round"===_t&&(heg&&(_t="bevel"),"bevel"===_t&&(he>2&&(_t="flipbevel"),he100)ee=Z.mult(-1);else{const He=he*j.add(Z).mag()/j.sub(Z).mag();ee._perp()._mult(He*(Le?-1:1))}this.addCurrentVertex(k,ee,0,0,O),this.addCurrentVertex(k,ee.mult(-1),0,0,O)}else if("bevel"===_t||"fakeround"===_t){const He=-Math.sqrt(he*he-1),rt=Le?He:0,it=Le?0:He;if(N&&this.addCurrentVertex(k,j,rt,it,O),"fakeround"===_t){const dt=Math.round(180*ue/Math.PI/20);for(let Tt=1;Tt2*S){const rt=k.add(z.sub(k)._mult(S/He)._round());this.updateDistance(k,rt),this.addCurrentVertex(rt,Z,0,0,O),k=rt}}}}addCurrentVertex(i,a,u,f,g,v=!1){const b=a.y*f-a.x,M=-a.y-a.x*f;this.addHalfVertex(i,a.x+a.y*u,a.y-a.x*u,v,!1,u,g),this.addHalfVertex(i,b,M,v,!0,-f,g)}addHalfVertex({x:i,y:a},u,f,g,v,b,M){this.layoutVertexArray.emplaceBack((i<<1)+(g?1:0),(a<<1)+(v?1:0),Math.round(63*u)+128,Math.round(63*f)+128,1+(0===b?0:b<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const T=M.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,T),M.primitiveLength++),v?this.e2=T:this.e1=T}updateScaledDistance(){if(this.lineClips){const i=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=i*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(i,a){this.distance+=i.dist(a),this.updateScaledDistance()}}Ve(ky,"LineBucket",{omit:["layers","patternFeatures"]});const _1=new ie({"line-cap":new Y(Ze.layout_line["line-cap"]),"line-join":new Y(Ze.layout_line["line-join"]),"line-miter-limit":new U(Ze.layout_line["line-miter-limit"]),"line-round-limit":new U(Ze.layout_line["line-round-limit"]),"line-sort-key":new Y(Ze.layout_line["line-sort-key"])});var Yb={paint:new ie({"line-opacity":new Y(Ze.paint_line["line-opacity"]),"line-color":new Y(Ze.paint_line["line-color"]),"line-translate":new U(Ze.paint_line["line-translate"]),"line-translate-anchor":new U(Ze.paint_line["line-translate-anchor"]),"line-width":new Y(Ze.paint_line["line-width"]),"line-gap-width":new Y(Ze.paint_line["line-gap-width"]),"line-offset":new Y(Ze.paint_line["line-offset"]),"line-blur":new Y(Ze.paint_line["line-blur"]),"line-dasharray":new Y(Ze.paint_line["line-dasharray"]),"line-pattern":new Y(Ze.paint_line["line-pattern"]),"line-gradient":new re(Ze.paint_line["line-gradient"]),"line-trim-offset":new U(Ze.paint_line["line-trim-offset"])}),layout:_1};const y1=new class extends Y{possiblyEvaluate(s,i){return i=new A(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,transition:i.transition}),super.possiblyEvaluate(s,i)}evaluate(s,i,a,u){return i=Zn({},i,{zoom:Math.floor(i.zoom)}),super.evaluate(s,i,a,u)}}(Yb.paint.properties["line-width"].specification);function v1(s,i){return i>0?i+2*s:s}y1.useIntegerZoom=!0;const Ry=be([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),D2=be([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),I2=be([{name:"a_projected_pos",components:4,type:"Float32"}],4);be([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Ly=be([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),S2=be([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);be([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Kb=be([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),P2=be([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);be([{name:"triangle",components:3,type:"Uint16"}]),be([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),be([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),be([{type:"Float32",name:"offsetX"}]),be([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var Oo=24;const Rl=128;function Fy(s,i){const{expression:a}=i;if("constant"===a.kind)return{kind:"constant",layoutSize:a.evaluate(new A(s+1))};if("source"===a.kind)return{kind:"source"};{const{zoomStops:u,interpolationType:f}=a;let g=0;for(;g{u.text=function(f,g,v){const b=g.layout.get("text-transform").evaluate(v,{});return"uppercase"===b?f=f.toLocaleUpperCase():"lowercase"===b&&(f=f.toLocaleLowerCase()),I.applyArabicShaping&&(f=I.applyArabicShaping(f)),f}(u.text,i,a)}),s}const Hd={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42","\u2190":"\u2191","\u2192":"\u2193"};function Cp(s){return"\ufe36"===s||"\ufe48"===s||"\ufe38"===s||"\ufe44"===s||"\ufe42"===s||"\ufe3e"===s||"\ufe3c"===s||"\ufe3a"===s||"\ufe18"===s||"\ufe40"===s||"\ufe10"===s||"\ufe13"===s||"\ufe14"===s||"\uff40"===s||"\uffe3"===s||"\ufe11"===s||"\ufe12"===s}function Jb(s){return"\ufe35"===s||"\ufe47"===s||"\ufe37"===s||"\ufe43"===s||"\ufe41"===s||"\ufe3d"===s||"\ufe3b"===s||"\ufe39"===s||"\ufe17"===s||"\ufe3f"===s}var zy=Tr,By=function(s,i,a,u,f){var g,v,b=8*f-u-1,M=(1<>1,S=-7,O=a?f-1:0,k=a?-1:1,N=s[i+O];for(O+=k,g=N&(1<<-S)-1,N>>=-S,S+=b;S>0;g=256*g+s[i+O],O+=k,S-=8);for(v=g&(1<<-S)-1,g>>=-S,S+=u;S>0;v=256*v+s[i+O],O+=k,S-=8);if(0===g)g=1-T;else{if(g===M)return v?NaN:1/0*(N?-1:1);v+=Math.pow(2,u),g-=T}return(N?-1:1)*v*Math.pow(2,g-u)},Mp=function(s,i,a,u,f,g){var v,b,M,T=8*g-f-1,S=(1<>1,k=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,N=u?0:g-1,z=u?1:-1,j=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(b=isNaN(i)?1:0,v=S):(v=Math.floor(Math.log(i)/Math.LN2),i*(M=Math.pow(2,-v))<1&&(v--,M*=2),(i+=v+O>=1?k/M:k*Math.pow(2,1-O))*M>=2&&(v++,M/=2),v+O>=S?(b=0,v=S):v+O>=1?(b=(i*M-1)*Math.pow(2,f),v+=O):(b=i*Math.pow(2,O-1)*Math.pow(2,f),v=0));f>=8;s[a+N]=255&b,N+=z,b/=256,f-=8);for(v=v<0;s[a+N]=255&v,N+=z,v/=256,T-=8);s[a+N-z]|=128*j};function Tr(s){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(s)?s:new Uint8Array(s||0),this.pos=0,this.type=0,this.length=this.buf.length}Tr.Varint=0,Tr.Fixed64=1,Tr.Bytes=2,Tr.Fixed32=5;var Ll=4294967296,w1=1/Ll,b1=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function yc(s){return s.type===Tr.Bytes?s.readVarint()+s.pos:s.pos+1}function og(s,i,a){var u=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));a.realloc(u);for(var f=a.pos-1;f>=s;f--)a.buf[f+u]=a.buf[f]}function Qb(s,i){for(var a=0;a>>8,s[a+2]=i>>>16,s[a+3]=i>>>24}function qd(s,i){return(s[i]|s[i+1]<<8|s[i+2]<<16)+(s[i+3]<<24)}Tr.prototype={destroy:function(){this.buf=null},readFields:function(s,i,a){for(a=a||this.length;this.pos>3,g=this.pos;this.type=7&u,s(f,i,this),this.pos===g&&this.skip(u)}return i},readMessage:function(s,i){return this.readFields(s,i,this.readVarint()+this.pos)},readFixed32:function(){var s=Gd(this.buf,this.pos);return this.pos+=4,s},readSFixed32:function(){var s=qd(this.buf,this.pos);return this.pos+=4,s},readFixed64:function(){var s=Gd(this.buf,this.pos)+Gd(this.buf,this.pos+4)*Ll;return this.pos+=8,s},readSFixed64:function(){var s=Gd(this.buf,this.pos)+qd(this.buf,this.pos+4)*Ll;return this.pos+=8,s},readFloat:function(){var s=By(this.buf,this.pos,!0,23,4);return this.pos+=4,s},readDouble:function(){var s=By(this.buf,this.pos,!0,52,8);return this.pos+=8,s},readVarint:function(s){var i,a,u=this.buf;return i=127&(a=u[this.pos++]),a<128?i:(i|=(127&(a=u[this.pos++]))<<7,a<128?i:(i|=(127&(a=u[this.pos++]))<<14,a<128?i:(i|=(127&(a=u[this.pos++]))<<21,a<128?i:function(f,g,v){var b,M,T=v.buf;if(b=(112&(M=T[v.pos++]))>>4,M<128||(b|=(127&(M=T[v.pos++]))<<3,M<128)||(b|=(127&(M=T[v.pos++]))<<10,M<128)||(b|=(127&(M=T[v.pos++]))<<17,M<128)||(b|=(127&(M=T[v.pos++]))<<24,M<128)||(b|=(1&(M=T[v.pos++]))<<31,M<128))return function kh(s,i,a){return a?4294967296*i+(s>>>0):4294967296*(i>>>0)+(s>>>0)}(f,b,g);throw new Error("Expected varint not more than 10 bytes")}(i|=(15&(a=u[this.pos]))<<28,s,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var s=this.readVarint();return s%2==1?(s+1)/-2:s/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var s=this.readVarint()+this.pos,i=this.pos;return this.pos=s,s-i>=12&&b1?b1.decode(this.buf.subarray(i,s)):function(a,u,f){for(var g="",v=u;v239?4:S>223?3:S>191?2:1;if(v+k>f)break;1===k?S<128&&(O=S):2===k?128==(192&(b=a[v+1]))&&(O=(31&S)<<6|63&b)<=127&&(O=null):3===k?(M=a[v+2],128==(192&(b=a[v+1]))&&128==(192&M)&&((O=(15&S)<<12|(63&b)<<6|63&M)<=2047||O>=55296&&O<=57343)&&(O=null)):4===k&&(M=a[v+2],T=a[v+3],128==(192&(b=a[v+1]))&&128==(192&M)&&128==(192&T)&&((O=(15&S)<<18|(63&b)<<12|(63&M)<<6|63&T)<=65535||O>=1114112)&&(O=null)),null===O?(O=65533,k=1):O>65535&&(O-=65536,g+=String.fromCharCode(O>>>10&1023|55296),O=56320|1023&O),g+=String.fromCharCode(O),v+=k}return g}(this.buf,i,s)},readBytes:function(){var s=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,s);return this.pos=s,i},readPackedVarint:function(s,i){if(this.type!==Tr.Bytes)return s.push(this.readVarint(i));var a=yc(this);for(s=s||[];this.pos127;);else if(i===Tr.Bytes)this.pos=this.readVarint()+this.pos;else if(i===Tr.Fixed32)this.pos+=4;else{if(i!==Tr.Fixed64)throw new Error("Unimplemented type: "+i);this.pos+=8}},writeTag:function(s,i){this.writeVarint(s<<3|i)},realloc:function(s){for(var i=this.length||16;i268435455||s<0?function(i,a){var u,f,g,b;if(i>=0?(u=i%4294967296|0,f=i/4294967296|0):(f=~(-i/4294967296),4294967295^(u=~(-i%4294967296))?u=u+1|0:(u=0,f=f+1|0)),i>=0x10000000000000000||i<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");a.realloc(10),g=u,(b=a).buf[b.pos++]=127&g|128,g>>>=7,b.buf[b.pos++]=127&g|128,g>>>=7,b.buf[b.pos++]=127&g|128,g>>>=7,b.buf[b.pos++]=127&g|128,b.buf[b.pos]=127&(g>>>=7),function(g,v){var b=(7&g)<<4;v.buf[v.pos++]|=b|((g>>>=3)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g|((g>>>=7)?128:0),g&&(v.buf[v.pos++]=127&g)))))}(f,a)}(s,this):(this.realloc(4),this.buf[this.pos++]=127&s|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=s>>>7&127))))},writeSVarint:function(s){this.writeVarint(s<0?2*-s-1:2*s)},writeBoolean:function(s){this.writeVarint(!!s)},writeString:function(s){s=String(s),this.realloc(4*s.length),this.pos++;var i=this.pos;this.pos=function(u,f,g){for(var v,b,M=0;M55295&&v<57344){if(!b){v>56319||M+1===f.length?(u[g++]=239,u[g++]=191,u[g++]=189):b=v;continue}if(v<56320){u[g++]=239,u[g++]=191,u[g++]=189,b=v;continue}v=b-55296<<10|v-56320|65536,b=null}else b&&(u[g++]=239,u[g++]=191,u[g++]=189,b=null);v<128?u[g++]=v:(v<2048?u[g++]=v>>6|192:(v<65536?u[g++]=v>>12|224:(u[g++]=v>>18|240,u[g++]=v>>12&63|128),u[g++]=v>>6&63|128),u[g++]=63&v|128)}return g}(this.buf,s,this.pos);var a=this.pos-i;a>=128&&og(i,a,this),this.pos=i-1,this.writeVarint(a),this.pos+=a},writeFloat:function(s){this.realloc(4),Mp(this.buf,s,this.pos,!0,23,4),this.pos+=4},writeDouble:function(s){this.realloc(8),Mp(this.buf,s,this.pos,!0,52,8),this.pos+=8},writeBytes:function(s){var i=s.length;this.writeVarint(i),this.realloc(i);for(var a=0;a=128&&og(a,u,this),this.pos=a-1,this.writeVarint(u),this.pos+=u},writeMessage:function(s,i,a){this.writeTag(s,Tr.Bytes),this.writeRawMessage(i,a)},writePackedVarint:function(s,i){i.length&&this.writeMessage(s,Qb,i)},writePackedSVarint:function(s,i){i.length&&this.writeMessage(s,eC,i)},writePackedBoolean:function(s,i){i.length&&this.writeMessage(s,nC,i)},writePackedFloat:function(s,i){i.length&&this.writeMessage(s,tC,i)},writePackedDouble:function(s,i){i.length&&this.writeMessage(s,C1,i)},writePackedFixed32:function(s,i){i.length&&this.writeMessage(s,rC,i)},writePackedSFixed32:function(s,i){i.length&&this.writeMessage(s,Es,i)},writePackedFixed64:function(s,i){i.length&&this.writeMessage(s,Vy,i)},writePackedSFixed64:function(s,i){i.length&&this.writeMessage(s,M1,i)},writeBytesField:function(s,i){this.writeTag(s,Tr.Bytes),this.writeBytes(i)},writeFixed32Field:function(s,i){this.writeTag(s,Tr.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(s,i){this.writeTag(s,Tr.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(s,i){this.writeTag(s,Tr.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(s,i){this.writeTag(s,Tr.Fixed64),this.writeSFixed64(i)},writeVarintField:function(s,i){this.writeTag(s,Tr.Varint),this.writeVarint(i)},writeSVarintField:function(s,i){this.writeTag(s,Tr.Varint),this.writeSVarint(i)},writeStringField:function(s,i){this.writeTag(s,Tr.Bytes),this.writeString(i)},writeFloatField:function(s,i){this.writeTag(s,Tr.Fixed32),this.writeFloat(i)},writeDoubleField:function(s,i){this.writeTag(s,Tr.Fixed64),this.writeDouble(i)},writeBooleanField:function(s,i){this.writeVarintField(s,!!i)}};var Ep=oe(zy);const sg=3;function iC(s,i,a){i.glyphs=[],1===s&&a.readMessage(E1,i)}function E1(s,i,a){if(3===s){const{id:u,bitmap:f,width:g,height:v,left:b,top:M,advance:T}=a.readMessage(oC,{});i.glyphs.push({id:u,bitmap:new el({width:g+2*sg,height:v+2*sg},f),metrics:{width:g,height:v,left:b,top:M,advance:T}})}else 4===s?i.ascender=a.readSVarint():5===s&&(i.descender=a.readSVarint())}function oC(s,i,a){1===s?i.id=a.readVarint():2===s?i.bitmap=a.readBytes():3===s?i.width=a.readVarint():4===s?i.height=a.readVarint():5===s?i.left=a.readSVarint():6===s?i.top=a.readSVarint():7===s&&(i.advance=a.readVarint())}const Uy=sg;function jy(s){let i=0,a=0;for(const v of s)i+=v.w*v.h,a=Math.max(a,v.w);s.sort((v,b)=>b.h-v.h);const u=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(i/.95)),a),h:1/0}];let f=0,g=0;for(const v of s)for(let b=u.length-1;b>=0;b--){const M=u[b];if(!(v.w>M.w||v.h>M.h)){if(v.x=M.x,v.y=M.y,g=Math.max(g,v.y+v.h),f=Math.max(f,v.x+v.w),v.w===M.w&&v.h===M.h){const T=u.pop();bi.hasImage(u)),i.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const u in i.updatedImages)this.patchUpdatedImage(this.iconPositions[u],i.getImage(u),a),this.patchUpdatedImage(this.patternPositions[u],i.getImage(u),a)}patchUpdatedImage(i,a,u){if(!i||!a||i.version===a.version)return;i.version=a.version;const[f,g]=i.tl;u.update(a.data,void 0,{x:f,y:g})}}Ve($y,"ImagePosition"),Ve(T1,"ImageAtlas");const Ts={horizontal:1,vertical:2,horizontalOnly:3},ag=-17;class Tp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(i,a){const u=new Tp;return u.scale=i||1,u.fontStack=a,u}static forImage(i){const a=new Tp;return a.imageName=i,a}}class Fl{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(i,a){const u=new Fl;for(let f=0;f=0&&u>=i&&lg[this.text.charCodeAt(u)];u--)a--;this.text=this.text.substring(i,a),this.sectionIndex=this.sectionIndex.slice(i,a)}substring(i,a){const u=new Fl;return u.text=this.text.substring(i,a),u.sectionIndex=this.sectionIndex.slice(i,a),u.sections=this.sections,u}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((i,a)=>Math.max(i,this.sections[a].scale),0)}addTextSection(i,a){this.text+=i.text,this.sections.push(Tp.forText(i.scale,i.fontStack||a));const u=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hy(s,i,a,u,f,g,v,b,M,T,S,O,k,N,z){const j=Fl.fromFeature(s,f);O===Ts.vertical&&j.verticalizePunctuation(k);let Z=[];const te=function(ue,je,Le,Ke,_t,He){if(!ue)return[];const rt=[],it=function(Lt,Yt,Bt,On,Ct,cn){let kn=0;for(let tr=0;tr=0;let Tt=0;for(let Lt=0;Lt0&&Ea>Or&&(Or=Ea)}else{const Is=Le[ji.fontStack];if(!Is)continue;Is[xi]&&(jr=Is[xi]);const to=je[ji.fontStack];if(!to)continue;const Ea=to.glyphs[xi];if(!Ea)continue;if($i=Ea.metrics,Wi=8203!==xi?Oo:0,cn){const $p=void 0!==to.ascender?Math.abs(to.ascender):0,Hn=void 0!==to.descender?Math.abs(to.descender):0,Ie=($p+Hn)*pr;vi-a/2;){if(v--,v<0)return!1;b-=s[v].dist(g),g=s[v]}b+=s[v].dist(s[v+1]),v++;const M=[];let T=0;for(;bu;)T-=M.shift().angleDelta;if(T>f)return!1;v++,b+=S.dist(O)}return!0}function P1(s){let i=0;for(let a=0;aT){const z=(T-M)/N,j=qt(O.x,k.x,z),Z=qt(O.y,k.y,z),te=new vc(j,Z,0,k.angleTo(O),S);return!v||S1(s,te,b,v,i)?te:void 0}M+=N}}function cg(s,i,a,u,f,g,v,b,M){const T=A1(u,g,v),S=Zy(u,f),O=S*v,k=0===s[0].x||s[0].x===M||0===s[0].y||s[0].y===M;return i-O=0&&ae=0&&he=0&&k+T<=S){const ue=new vc(ae,he,0,ee,z);ue._round(),u&&!S1(s,ue,g,u,f)||N.push(ue)}}O+=te}return b||N.length||v||(N=ug(s,O/2,a,u,f,g,v,!0,M)),N}function O1(s,i,a,u,f){const g=[];for(let v=0;v=u&&O.x>=u||(S.x>=u?S=new Ee(u,S.y+(u-S.x)/(O.x-S.x)*(O.y-S.y))._round():O.x>=u&&(O=new Ee(u,S.y+(u-S.x)/(O.x-S.x)*(O.y-S.y))._round()),S.y>=f&&O.y>=f||(S.y>=f?S=new Ee(S.x+(f-S.y)/(O.y-S.y)*(O.x-S.x),f)._round():O.y>=f&&(O=new Ee(S.x+(f-S.y)/(O.y-S.y)*(O.x-S.x),f)._round()),M&&S.equals(M[M.length-1])||(M=[S],g.push(M)),M.push(O)))))}}return g}Ve(vc,"Anchor");const Ap=1e20;function hg(s,i,a,u,f,g,v,b,M){for(let T=i;T-1);M++,g[M]=b,v[M]=T,v[M+1]=Ap}for(let b=0,M=0;b{let b=this.entries[f];b||(b=this.entries[f]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let M=b.glyphs[g];if(void 0!==M)return void v(null,{stack:f,id:g,glyph:M});if(M=this._tinySDF(b,f,g),M)return b.glyphs[g]=M,void v(null,{stack:f,id:g,glyph:M});const T=Math.floor(g/256);if(256*T>65535)return void v(new Error("glyphs > 65535 not supported"));if(b.ranges[T])return void v(null,{stack:f,id:g,glyph:M});let S=b.requests[T];S||(S=b.requests[T]=[],Rh.loadGlyphRange(f,T,this.url,this.requestManager,(O,k)=>{if(k){b.ascender=k.ascender,b.descender=k.descender;for(const N in k.glyphs)this._doesCharSupportLocalGlyph(+N)||(b.glyphs[+N]=k.glyphs[+N]);b.ranges[T]=!0}for(const N of S)N(O,k);delete b.requests[T]})),S.push((O,k)=>{O?v(O):k&&v(null,{stack:f,id:g,glyph:k.glyphs[g]||null})})},(f,g)=>{if(f)a(f);else if(g){const v={};for(const{stack:b,id:M,glyph:T}of g)void 0===v[b]&&(v[b]={}),void 0===v[b].glyphs&&(v[b].glyphs={}),v[b].glyphs[M]=T&&{id:T.id,bitmap:T.bitmap.clone(),metrics:T.metrics},v[b].ascender=this.entries[b].ascender,v[b].descender=this.entries[b].descender;a(null,v)}})}_doesCharSupportLocalGlyph(i){return this.localGlyphMode!==dg.none&&(this.localGlyphMode===dg.all?!!this.localFontFamily:!!this.localFontFamily&&(At["CJK Unified Ideographs"](i)||At["Hangul Syllables"](i)||At.Hiragana(i)||At.Katakana(i)||At["CJK Symbols and Punctuation"](i)))}_tinySDF(i,a,u){const f=this.localFontFamily;if(!f||!this._doesCharSupportLocalGlyph(u))return;let g=i.tinySDF;if(!g){let j="400";/bold/i.test(a)?j="900":/medium/i.test(a)?j="500":/light/i.test(a)&&(j="200"),g=i.tinySDF=new Rh.TinySDF({fontFamily:f,fontWeight:j,fontSize:24*Go,buffer:3*Go,radius:8*Go}),g.fontWeight=j}if(this.localGlyphs[g.fontWeight][u])return this.localGlyphs[g.fontWeight][u];const v=String.fromCharCode(u),{data:b,width:M,height:T,glyphWidth:S,glyphHeight:O,glyphLeft:k,glyphTop:N,glyphAdvance:z}=g.draw(v);return this.localGlyphs[g.fontWeight][u]={id:u,bitmap:new el({width:M,height:T},b),metrics:{width:S/Go,height:O/Go,left:k/Go,top:N/Go-27,advance:z/Go,localGlyph:!0}}}}Rh.loadGlyphRange=function(s,i,a,u,f){const g=256*i,v=g+255,b=u.transformRequest(u.normalizeGlyphsURL(a).replace("{fontstack}",s).replace("{range}",`${g}-${v}`),Jl.Glyphs);zc(b,(M,T)=>{if(M)f(M);else if(T){const S={},O=new Ep(T).readFields(iC,{});for(const k of O.glyphs)S[k.id]=k;f(null,{glyphs:S,ascender:O.ascender,descender:O.descender})}})},Rh.TinySDF=class{constructor({fontSize:s=24,buffer:i=3,radius:a=8,cutoff:u=.25,fontFamily:f="sans-serif",fontWeight:g="normal",fontStyle:v="normal"}={}){this.buffer=i,this.cutoff=u,this.radius=a;const b=this.size=s+4*i,M=this._createCanvas(b),T=this.ctx=M.getContext("2d",{willReadFrequently:!0});T.font=`${v} ${g} ${s}px ${f}`,T.textBaseline="alphabetic",T.textAlign="left",T.fillStyle="black",this.gridOuter=new Float64Array(b*b),this.gridInner=new Float64Array(b*b),this.f=new Float64Array(b),this.z=new Float64Array(b+1),this.v=new Uint16Array(b)}_createCanvas(s){const i=document.createElement("canvas");return i.width=i.height=s,i}draw(s){const{width:i,actualBoundingBoxAscent:a,actualBoundingBoxDescent:u,actualBoundingBoxLeft:f,actualBoundingBoxRight:g}=this.ctx.measureText(s),v=Math.ceil(a),b=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(g-f))),M=Math.min(this.size-this.buffer,v+Math.ceil(u)),T=b+2*this.buffer,S=M+2*this.buffer,O=Math.max(T*S,0),k=new Uint8ClampedArray(O),N={data:k,width:T,height:S,glyphWidth:b,glyphHeight:M,glyphTop:v,glyphLeft:0,glyphAdvance:i};if(0===b||0===M)return N;const{ctx:z,buffer:j,gridInner:Z,gridOuter:te}=this;z.clearRect(j,j,b,M),z.fillText(s,j,j+v);const ee=z.getImageData(j,j,b,M);te.fill(Ap,0,O),Z.fill(0,0,O);for(let ne=0;ne0?je*je:0,Z[ue]=je<0?je*je:0}}hg(te,0,0,T,S,T,this.f,this.v,this.z),hg(Z,j,j,b,M,T,this.f,this.v,this.z);for(let ne=0;neHe+rt[1]-rt[0],z=O.reduce(N,0),j=k.reduce(N,0),Z=b-z,te=M-j;let ee=0,ne=z,ae=0,he=j,ue=0,je=Z,Le=0,Ke=te;if(g.content&&u){const He=g.content;ee=Lh(O,0,He[0]),ae=Lh(k,0,He[1]),ne=Lh(O,He[0],He[2]),he=Lh(k,He[1],He[3]),ue=He[0]-ee,Le=He[1]-ae,je=He[2]-He[0]-ne,Ke=He[3]-He[1]-he}const _t=(He,rt,it,dt)=>{const Tt=Op(He.stretch-ee,ne,T,s.left),Xe=kp(He.fixed-ue,je,He.stretch,z),Lt=Op(rt.stretch-ae,he,S,s.top),Yt=kp(rt.fixed-Le,Ke,rt.stretch,j),Bt=Op(it.stretch-ee,ne,T,s.left),On=kp(it.fixed-ue,je,it.stretch,z),Ct=Op(dt.stretch-ae,he,S,s.top),cn=kp(dt.fixed-Le,Ke,dt.stretch,j),kn=new Ee(Tt,Lt),tr=new Ee(Bt,Lt),Fn=new Ee(Bt,Ct),fn=new Ee(Tt,Ct),zr=new Ee(Xe/v,Yt/v),Nn=new Ee(On/v,cn/v),zn=i*Math.PI/180;if(zn){const Vr=Math.sin(zn),Or=Math.cos(zn),vi=[Or,-Vr,Vr,Or];kn._matMult(vi),tr._matMult(vi),fn._matMult(vi),Fn._matMult(vi)}const Lr=He.stretch+He.fixed,Br=rt.stretch+rt.fixed;return{tl:kn,tr,bl:fn,br:Fn,tex:{x:g.paddedRect.x+Zd+Lr,y:g.paddedRect.y+Zd+Br,w:it.stretch+it.fixed-Lr,h:dt.stretch+dt.fixed-Br},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:zr,pixelOffsetBR:Nn,minFontScaleX:je/v/T,minFontScaleY:Ke/v/S,isSDF:a}};if(u&&(g.stretchX||g.stretchY)){const He=k1(O,Z,z),rt=k1(k,te,j);for(let it=0;it0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(i){this.data.push(i),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const i=this.data[0],a=this.data.pop();return this.length--,this.length>0&&(this.data[0]=a,this._down(0)),i}peek(){return this.data[0]}_up(i){const{data:a,compare:u}=this,f=a[i];for(;i>0;){const g=i-1>>1,v=a[g];if(u(f,v)>=0)break;a[i]=v,i=g}a[i]=f}_down(i){const{data:a,compare:u}=this,f=this.length>>1,g=a[i];for(;i=0)break;a[i]=b,i=v}a[i]=g}}function L1(s,i){return si?1:0}function fg(s,i=1,a=!1){let u=1/0,f=1/0,g=-1/0,v=-1/0;const b=s[0];for(let N=0;Ng)&&(g=z.x),(!N||z.y>v)&&(v=z.y)}const M=Math.min(g-u,v-f);let T=M/2;const S=new Yy([],Rp);if(0===M)return new Ee(u,f);for(let N=u;NO.d||!O.d)&&(O=N,a&&console.log("found best %d after %d probes",Math.round(1e4*N.d)/1e4,k)),N.max-O.d<=i||(T=N.h/2,S.push(new Fh(N.p.x-T,N.p.y-T,T,s)),S.push(new Fh(N.p.x+T,N.p.y-T,T,s)),S.push(new Fh(N.p.x-T,N.p.y+T,T,s)),S.push(new Fh(N.p.x+T,N.p.y+T,T,s)),k+=4)}return a&&(console.log(`num probes: ${k}`),console.log(`best distance: ${O.d}`)),O.p}function Rp(s,i){return i.max-s.max}class Fh{constructor(i,a,u,f){this.p=new Ee(i,a),this.h=u,this.d=function(g,v){let b=!1,M=1/0;for(let T=0;Tg.y!=j.y>g.y&&g.x<(j.x-z.x)*(g.y-z.y)/(j.y-z.y)+z.x&&(b=!b),M=Math.min(M,Ib(g,z,j))}}return(b?1:-1)*Math.sqrt(M)}(this.p,f),this.max=this.d+this.h*Math.SQRT2}}const _u=7,Xd=Number.POSITIVE_INFINITY,F1=Math.sqrt(2);function pg(s,[i,a]){let u=0,f=0;if(a===Xd){i<0&&(i=0);const g=i/F1;switch(s){case"top-right":case"top-left":f=g-_u;break;case"bottom-right":case"bottom-left":f=-g+_u;break;case"bottom":f=-i+_u;break;case"top":f=i-_u}switch(s){case"top-right":case"bottom-right":u=-g;break;case"top-left":case"bottom-left":u=g;break;case"left":u=i;break;case"right":u=-i}}else{switch(i=Math.abs(i),a=Math.abs(a),s){case"top-right":case"top-left":case"top":f=a-_u;break;case"bottom-right":case"bottom-left":case"bottom":f=-a+_u}switch(s){case"top-right":case"bottom-right":case"right":u=-i;break;case"top-left":case"bottom-left":case"left":u=i}}return[u,f]}function Lp(s,i,a,u,f,g,v,b,M,T){s.createArrays(),s.tilePixelRatio=dn/(512*s.overscaling),s.compareText={},s.iconsNeedLinear=!1;const S=s.layers[0].layout,O=s.layers[0]._unevaluatedLayout._values,k={};if("composite"===s.textSizeData.kind){const{minZoom:j,maxZoom:Z}=s.textSizeData;k.compositeTextSizes=[O["text-size"].possiblyEvaluate(new A(j),b),O["text-size"].possiblyEvaluate(new A(Z),b)]}if("composite"===s.iconSizeData.kind){const{minZoom:j,maxZoom:Z}=s.iconSizeData;k.compositeIconSizes=[O["icon-size"].possiblyEvaluate(new A(j),b),O["icon-size"].possiblyEvaluate(new A(Z),b)]}k.layoutTextSize=O["text-size"].possiblyEvaluate(new A(M+1),b),k.layoutIconSize=O["icon-size"].possiblyEvaluate(new A(M+1),b),k.textMaxSize=O["text-size"].possiblyEvaluate(new A(18),b);const N="map"===S.get("text-rotation-alignment")&&"point"!==S.get("symbol-placement"),z=S.get("text-size");for(const j of s.features){const Z=S.get("text-font").evaluate(j,{},b).join(","),te=z.evaluate(j,{},b),ee=k.layoutTextSize.evaluate(j,{},b),ne=(k.layoutIconSize.evaluate(j,{},b),{horizontal:{},vertical:void 0}),ae=j.text;let he,ue=[0,0];if(ae){const Ke=ae.toString(),_t=S.get("text-letter-spacing").evaluate(j,{},b)*Oo,He=S.get("text-line-height").evaluate(j,{},b)*Oo,rt=ti(Ke)?_t:0,it=S.get("text-anchor").evaluate(j,{},b),dt=S.get("text-variable-anchor");if(!dt){const Bt=S.get("text-radial-offset").evaluate(j,{},b);ue=Bt?pg(it,[Bt*Oo,Xd]):S.get("text-offset").evaluate(j,{},b).map(On=>On*Oo)}let Tt=N?"center":S.get("text-justify").evaluate(j,{},b);const Xe="point"===S.get("symbol-placement"),Lt=Xe?S.get("text-max-width").evaluate(j,{},b)*Oo:1/0,Yt=Bt=>{s.allowVerticalPlacement&&Tl(Ke)&&(ne.vertical=Hy(ae,i,a,f,Z,Lt,He,it,Bt,rt,ue,Ts.vertical,!0,ee,te))};if(!N&&dt){const Bt="auto"===Tt?dt.map(Ct=>Ky(Ct)):[Tt];let On=!1;for(let Ct=0;Ct=0||!Tl(Ke)){const Bt=Hy(ae,i,a,f,Z,Lt,He,it,Tt,rt,ue,Ts.horizontal,!1,ee,te);Bt&&(ne.horizontal[Tt]=Bt)}Yt(Xe?"left":Tt)}}let je=!1;if(j.icon&&j.icon.name){const Ke=u[j.icon.name];Ke&&(he=sC(f[j.icon.name],S.get("icon-offset").evaluate(j,{},b),S.get("icon-anchor").evaluate(j,{},b)),je=Ke.sdf,void 0===s.sdfIcons?s.sdfIcons=Ke.sdf:s.sdfIcons!==Ke.sdf&&bn("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ke.pixelRatio!==s.pixelRatio||0!==S.get("icon-rotate").constantOr(1))&&(s.iconsNeedLinear=!0))}const Le=Jy(ne.horizontal)||ne.vertical;s.iconsInText||(s.iconsInText=!!Le&&Le.iconsInText),(Le||he)&&N1(s,j,ne,he,u,k,ee,0,ue,je,v,b,T)}g&&s.generateCollisionDebugBuffers(M,s.collisionBoxArray)}function Ky(s){switch(s){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function N1(s,i,a,u,f,g,v,b,M,T,S,O,k){let N=g.textMaxSize.evaluate(i,{},O);void 0===N&&(N=v);const z=s.layers[0].layout,j=z.get("icon-offset").evaluate(i,{},O),Z=Jy(a.horizontal)||a.vertical,te="globe"===k.name,ee=Oo,ne=v/ee,ae=s.tilePixelRatio*N/ee,he=(it=s.overscaling,s.zoom>18&&it>2&&(it>>=1),Math.max(dn/(512*it),1)*z.get("symbol-spacing")),ue=z.get("text-padding")*s.tilePixelRatio,je=z.get("icon-padding")*s.tilePixelRatio,Le=Pt(z.get("text-max-angle")),Ke="map"===z.get("text-rotation-alignment")&&"point"!==z.get("symbol-placement"),_t="map"===z.get("icon-rotation-alignment")&&"point"!==z.get("symbol-placement"),He=z.get("symbol-placement"),rt=he/2;var it;const dt=z.get("icon-text-fit");let Tt;u&&"none"!==dt&&(s.allowVerticalPlacement&&a.vertical&&(Tt=I1(u,a.vertical,dt,z.get("icon-text-fit-padding"),j,ne)),Z&&(u=I1(u,Z,dt,z.get("icon-text-fit-padding"),j,ne)));const Xe=(Lt,Yt,Bt)=>{if(Yt.x<0||Yt.x>=dn||Yt.y<0||Yt.y>=dn)return;let On=null;if(te){const{x:Ct,y:cn,z:kn}=k.projectTilePoint(Yt.x,Yt.y,Bt);On={anchor:new vc(Ct,cn,kn,0,void 0),up:k.upVector(Bt,Yt.x,Yt.y)}}!function(Ct,cn,kn,tr,Fn,fn,zr,Nn,zn,Lr,Br,Vr,Or,vi,gi,Ur,br,ji,Oi,xi,pr,$i,jr,qo,Wi){const _o=Ct.addToLineVertexArray(cn,tr);let yo,Is,to,Ea,$p,Hn,Ie,p0=0,nt=0,m0=0,ex=0,af=-1,Cu=-1;const Ta={};let lf=q_("");const Mu=kn?kn.anchor:cn;let Hp=0,Gp=0;if(void 0===zn._unevaluatedLayout.getValue("text-radial-offset")?[Hp,Gp]=zn.layout.get("text-offset").evaluate(pr,{},Wi).map($s=>$s*Oo):(Hp=zn.layout.get("text-radial-offset").evaluate(pr,{},Wi)*Oo,Gp=Xd),Ct.allowVerticalPlacement&&Fn.vertical){const $s=Fn.vertical;if(gi)Hn=Yd($s),Nn&&(Ie=Yd(Nn));else{const Hs=zn.layout.get("text-rotate").evaluate(pr,{},Wi)+90;to=Np(Lr,Mu,cn,Br,Vr,Or,$s,vi,Hs,Ur),Nn&&(Ea=Np(Lr,Mu,cn,Br,Vr,Or,Nn,ji,Hs))}}if(fn){const $s=zn.layout.get("icon-rotate").evaluate(pr,{},Wi),Hs="none"!==zn.layout.get("icon-text-fit"),qp=aC(fn,$s,jr,Hs),Ig=Nn?aC(Nn,$s,jr,Hs):void 0;Is=Np(Lr,Mu,cn,Br,Vr,Or,fn,ji,$s),p0=4*qp.length;const tx=Ct.iconSizeData;let Hh=null;"source"===tx.kind?(Hh=[Rl*zn.layout.get("icon-size").evaluate(pr,{},Wi)],Hh[0]>yu&&bn(`${Ct.layerIds[0]}: Value for "icon-size" is >= ${Fp}. Reduce your "icon-size".`)):"composite"===tx.kind&&(Hh=[Rl*$i.compositeIconSizes[0].evaluate(pr,{},Wi),Rl*$i.compositeIconSizes[1].evaluate(pr,{},Wi)],(Hh[0]>yu||Hh[1]>yu)&&bn(`${Ct.layerIds[0]}: Value for "icon-size" is >= ${Fp}. Reduce your "icon-size".`)),Ct.addSymbols(Ct.icon,qp,Hh,xi,Oi,pr,!1,kn,cn,_o.lineStartIndex,_o.lineLength,-1,qo,Wi),af=Ct.icon.placedSymbolArray.length-1,Ig&&(nt=4*Ig.length,Ct.addSymbols(Ct.icon,Ig,Hh,xi,Oi,pr,Ts.vertical,kn,cn,_o.lineStartIndex,_o.lineLength,-1,qo,Wi),Cu=Ct.icon.placedSymbolArray.length-1)}for(const $s in Fn.horizontal){const Hs=Fn.horizontal[$s];yo||(lf=q_(Hs.text),gi?$p=Yd(Hs):yo=Np(Lr,Mu,cn,Br,Vr,Or,Hs,vi,zn.layout.get("text-rotate").evaluate(pr,{},Wi),Ur));const qp=1===Hs.positionedLines.length;if(m0+=z1(Ct,kn,cn,Hs,zr,zn,gi,pr,Ur,_o,Fn.vertical?Ts.horizontal:Ts.horizontalOnly,qp?Object.keys(Fn.horizontal):[$s],Ta,af,$i,qo,Wi),qp)break}Fn.vertical&&(ex+=z1(Ct,kn,cn,Fn.vertical,zr,zn,gi,pr,Ur,_o,Ts.vertical,["vertical"],Ta,Cu,$i,qo,Wi));let Ul=-1;const Dg=($s,Hs)=>$s?Math.max($s,Hs):Hs;Ul=Dg($p,Ul),Ul=Dg(Hn,Ul),Ul=Dg(Ie,Ul);const g0=Ul>-1?1:0;Ct.glyphOffsetArray.length>=Ma.MAX_GLYPHS&&bn("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==pr.sortKey&&Ct.addToSortKeyRanges(Ct.symbolInstances.length,pr.sortKey),Ct.symbolInstances.emplaceBack(Mu.x,Mu.y,Mu.z,cn.x,cn.y,Ta.right>=0?Ta.right:-1,Ta.center>=0?Ta.center:-1,Ta.left>=0?Ta.left:-1,Ta.vertical>=0?Ta.vertical:-1,af,Cu,lf,void 0!==yo?yo:Ct.collisionBoxArray.length,void 0!==yo?yo+1:Ct.collisionBoxArray.length,void 0!==to?to:Ct.collisionBoxArray.length,void 0!==to?to+1:Ct.collisionBoxArray.length,void 0!==Is?Is:Ct.collisionBoxArray.length,void 0!==Is?Is+1:Ct.collisionBoxArray.length,Ea||Ct.collisionBoxArray.length,Ea?Ea+1:Ct.collisionBoxArray.length,Br,m0,ex,p0,nt,g0,0,Hp,Gp,Ul)}(s,Yt,On,Lt,a,u,f,Tt,s.layers[0],s.collisionBoxArray,i.index,i.sourceLayerIndex,s.index,ue,Ke,M,0,je,_t,j,i,g,T,S,O)};if("line"===He)for(const Lt of O1(i.geometry,0,0,dn,dn)){const Yt=cg(Lt,he,Le,a.vertical||Z,u,ee,ae,s.overscaling,dn);for(const Bt of Yt)Z&&Qy(s,Z.text,rt,Bt)||Xe(Lt,Bt,O)}else if("line-center"===He){for(const Lt of i.geometry)if(Lt.length>1){const Yt=Pp(Lt,Le,a.vertical||Z,u,ee,ae);Yt&&Xe(Lt,Yt,O)}}else if("Polygon"===i.type)for(const Lt of mp(i.geometry,0)){const Yt=fg(Lt,16);Xe(Lt[0],new vc(Yt.x,Yt.y,0,0,void 0),O)}else if("LineString"===i.type)for(const Lt of i.geometry)Xe(Lt,new vc(Lt[0].x,Lt[0].y,0,0,void 0),O);else if("Point"===i.type)for(const Lt of i.geometry)for(const Yt of Lt)Xe([Yt],new vc(Yt.x,Yt.y,0,0,void 0),O)}const Fp=255,yu=Fp*Rl;function z1(s,i,a,u,f,g,v,b,M,T,S,O,k,N,z,j,Z){const te=function(ae,he,ue,je,Le,Ke,_t,He){const rt=[];if(0===he.positionedLines.length)return rt;const it=je.layout.get("text-rotate").evaluate(Ke,{})*Math.PI/180,dt=function(Bt){const On=Bt[0],Ct=Bt[1],cn=On*Ct;return cn>0?[On,-Ct]:cn<0?[-On,Ct]:0===On?[Ct,On]:[Ct,-On]}(ue);let Tt=Math.abs(he.top-he.bottom);for(const Bt of he.positionedLines)Tt-=Bt.lineOffset;const Xe=he.positionedLines.length,Lt=Tt/Xe;let Yt=he.top-ue[1];for(let Bt=0;Btyu&&bn(`${s.layerIds[0]}: Value for "text-size" is >= ${Fp}. Reduce your "text-size".`)):"composite"===ee.kind&&(ne=[Rl*z.compositeTextSizes[0].evaluate(b,{},Z),Rl*z.compositeTextSizes[1].evaluate(b,{},Z)],(ne[0]>yu||ne[1]>yu)&&bn(`${s.layerIds[0]}: Value for "text-size" is >= ${Fp}. Reduce your "text-size".`)),s.addSymbols(s.text,te,ne,M,v,b,S,i,a,T.lineStartIndex,T.lineLength,N,j,Z);for(const ae of O)k[ae]=s.text.placedSymbolArray.length-1;return 4*te.length}function Jy(s){for(const i in s)return s[i];return null}function Np(s,i,a,u,f,g,v,b,M,T){let S=v.top,O=v.bottom,k=v.left,N=v.right;const z=v.collisionPadding;if(z&&(k-=z[0],S-=z[1],N+=z[2],O+=z[3]),M){const j=new Ee(k,S),Z=new Ee(N,S),te=new Ee(k,O),ee=new Ee(N,O),ne=Pt(M);let ae=new Ee(0,0);T&&(ae=new Ee(T[0],T[1])),j._rotateAround(ne,ae),Z._rotateAround(ne,ae),te._rotateAround(ne,ae),ee._rotateAround(ne,ae),k=Math.min(j.x,Z.x,te.x,ee.x),N=Math.max(j.x,Z.x,te.x,ee.x),S=Math.min(j.y,Z.y,te.y,ee.y),O=Math.max(j.y,Z.y,te.y,ee.y)}return s.emplaceBack(i.x,i.y,i.z,a.x,a.y,k,S,N,O,b,u,f,g),s.length-1}function Yd(s){s.collisionPadding&&(s.top-=s.collisionPadding[1],s.bottom+=s.collisionPadding[3]);const i=s.bottom-s.top;return i>0?Math.max(10,i):null}function Qy(s,i,a,u){const f=s.compareText;if(i in f){const g=f[i];for(let v=g.length-1;v>=0;v--)if(u.dist(g[v])ne&&(ae(ue,dt,Le,Ke,rt,it),ae(dt,je,rt,it,_t,He))}ae(O,k,u,g,f,g),ae(k,N,f,g,f,v),ae(N,z,f,v,u,v),ae(z,O,u,v,u,g),j-=ne,Z-=ne,te+=ne,ee+=ne;const he=1/Math.max(te-j,ee-Z);return{scale:he,x:j*he,y:Z*he,x2:te*he,y2:ee*he,projection:i}}const lC=uo(new Float32Array(16));class Bh{constructor(i){this.spec=i,this.name=i.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(i,a){return{x:0,y:0,z:0}}unproject(i,a){return new wr(0,0)}projectTilePoint(i,a,u){return{x:i,y:a,z:0}}locationPoint(i,a,u=!0){return i._coordinatePoint(i.locationCoordinate(a),u)}pixelsPerMeter(i,a){return Ca(1,i)*a}pixelSpaceConversion(i,a,u){return 1}farthestPixelDistance(i){return Nh(i,i.pixelsPerMeter)}pointCoordinate(i,a,u,f){const g=i.horizonLineFromTop(!1),v=new Ee(a,Math.max(g,u));return i.rayIntersectionCoordinate(i.pointRayIntersection(v,f))}pointCoordinate3D(i,a,u){const f=new Ee(a,u);if(i.elevation)return i.elevation.pointCoordinate(f);{const g=this.pointCoordinate(i,f.x,f.y,0);return[g.x,g.y,g.z]}}isPointAboveHorizon(i,a){if(i.elevation)return!this.pointCoordinate3D(i,a.x,a.y);const u=i.horizonLineFromTop();return a.y0?a<-Qd+u&&(a=-Qd+u):a>Qd-u&&(a=Qd-u);const v=g/Math.pow(mg(a),f);let b=v*Math.sin(f*i),M=g-v*Math.cos(f*i);return b=.5*(b/Math.PI+.5),M=.5*(M/Math.PI+.5),{x:b,y:this.southernCenter?M:1-M,z:0}}unproject(i,a){i=(2*i-.5)*Math.PI,this.southernCenter&&(a=1-a),a=(2*(1-a)-.5)*Math.PI;const{n:u,f}=this,g=f-a,v=Math.sign(g),b=Math.sign(u)*Math.sqrt(i*i+g*g);let M=Math.atan2(i,Math.abs(g))*v;g*u<0&&(M-=Math.PI*Math.sign(i)*v);const T=pt(qn(M/u)+this.center[0],-180,180),S=pt(qn(2*Math.atan(Math.pow(f/b,1/u))-Qd),-Ao,Ao);return new wr(T,this.southernCenter?-S:S)}}class B1 extends Bh{constructor(i){super(i),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(i,a){return{x:ws(i),y:bs(a),z:0}}unproject(i,a){const u=Cs(i),f=Ui(a);return new wr(u,f)}}const Us=Pt(Ao);class Nl extends Bh{project(i,a){const u=(a=Pt(a))*a,f=u*u;return{x:.5*((i=Pt(i))*(.8707-.131979*u+f*(f*(.003971*u-.001529*f)-.013791))/Math.PI+.5),y:1-.5*(a*(1.007226+u*(.015085+f*(.028874*u-.044475-.005916*f)))/Math.PI+1),z:0}}unproject(i,a){i=(2*i-.5)*Math.PI;let u=a=(2*(1-a)-1)*Math.PI,f=25,g=0,v=u*u;do{v=u*u;const T=v*v;g=(u*(1.007226+v*(.015085+T*(.028874*v-.044475-.005916*T)))-a)/(1.007226+v*(.045255+T*(.259866*v-.311325-.005916*11*T))),u=pt(u-g,-Us,Us)}while(Math.abs(g)>1e-6&&--f>0);v=u*u;const b=pt(qn(i/(.8707+v*(v*(v*v*v*(.003971-.001529*v)-.013791)-.131979))),-180,180),M=qn(u);return new wr(b,M)}}const V1=Pt(Ao);class dC extends Bh{project(i,a){a=Pt(a),i=Pt(i);const u=Math.cos(a),f=2/Math.PI,g=Math.acos(u*Math.cos(i/2)),v=Math.sin(g)/g,b=.5*(i*f+2*u*Math.sin(i/2)/v)||0,M=.5*(a+Math.sin(a)/v)||0;return{x:.5*(b/Math.PI+.5),y:1-.5*(M/Math.PI+1),z:0}}unproject(i,a){let u=i=(2*i-.5)*Math.PI,f=a=(2*(1-a)-1)*Math.PI,g=25;const v=1e-6;let b=0,M=0;do{const T=Math.cos(f),S=Math.sin(f),O=2*S*T,k=S*S,N=T*T,z=Math.cos(u/2),j=Math.sin(u/2),Z=2*z*j,te=j*j,ee=1-N*z*z,ne=ee?1/ee:0,ae=ee?Math.acos(T*z)*Math.sqrt(1/ee):0,he=.5*(2*ae*T*j+2*u/Math.PI)-i,ue=.5*(ae*S+f)-a,je=.5*ne*(N*te+ae*T*z*k)+1/Math.PI,Le=ne*(Z*O/4-ae*S*j),Ke=.125*ne*(O*j-ae*S*N*Z),_t=.5*ne*(k*z+ae*te*T)+.5,He=Le*Ke-_t*je;b=(ue*Le-he*_t)/He,M=(he*Ke-ue*je)/He,u=pt(u-b,-Math.PI,Math.PI),f=pt(f-M,-V1,V1)}while((Math.abs(b)>v||Math.abs(M)>v)&&--g>0);return new wr(qn(u),qn(f))}}class U1 extends Bh{constructor(i){super(i),this.center=i.center||[0,0],this.parallels=i.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(Pt(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(i,a){const{scale:u,cosPhi:f}=this;return{x:Pt(i)*f*u+.5,y:-Math.sin(Pt(a))/f*u+.5,z:0}}unproject(i,a){const{scale:u,cosPhi:f}=this,g=-(a-.5)/u,v=pt(qn((i-.5)/u)/f,-180,180),b=Math.asin(pt(g*f,-1,1)),M=pt(qn(b),-Ao,Ao);return new wr(v,M)}}class fC extends B1{constructor(i){super(i),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(i,a,u){const f=Nd(i,a,u);return Er(f,f,Qa(Qs(u))),{x:f[0],y:f[1],z:f[2]}}locationPoint(i,a){const u=vh(a.lat,a.lng),f=sr([],u),g=i.elevation?i.elevation.getAtPointOrZero(i.locationCoordinate(a),i._centerAltitude):i._centerAltitude;Ya(u,u,f,Ca(1,0)*dn*g);const v=uo(new Float64Array(16));return hh(v,i.pixelMatrix,i.globeMatrix),Er(u,u,v),new Ee(u[0],u[1])}pixelsPerMeter(i,a){return Ca(1,0)*a}pixelSpaceConversion(i,a,u){const f=Ca(1,i)*a,g=qt(Ca(1,45)*a,f,u);return this.pixelsPerMeter(i,a)/g}createTileMatrix(i,a,u){const f=py(Qs(u.canonical));return hh(new Float64Array(16),i.globeMatrix,f)}createInversionMatrix(i,a){const{center:u}=i,f=Qa(Qs(a));return kd(f,f,Pt(u.lng)),Q_(f,f,Pt(u.lat)),dh(f,f,[i._pixelsPerMercatorPixel,i._pixelsPerMercatorPixel,1]),Float32Array.from(f)}pointCoordinate(i,a,u,f){return Wv(i,a,u,!0)||new ip(0,0)}pointCoordinate3D(i,a,u){const f=this.pointCoordinate(i,a,u,0);return[f.x,f.y,f.z]}isPointAboveHorizon(i,a){return!Wv(i,a.x,a.y,!1)}farthestPixelDistance(i){const a=function(f,g){const v=f.cameraToCenterDistance,b=f._centerAltitude*g,M=f._camera,T=f._camera.forward(),S=Al([],ci([],T,-v),[0,0,b]),O=f.worldSize/(2*Math.PI),k=[0,0,-O],N=f.width/f.height,z=Math.tan(f.fovAboveCenter),j=ci([],M.up(),z),Z=ci([],M.right(),z*N),te=sr([],Al([],Al([],T,j),Z)),ee=[];let ne;if(new ly(S,te).closestPointOnSphere(k,O,ee)){const ae=Al([],ee,k),he=ba([],ae,S);ne=Math.cos(f.fovAboveCenter)*fh(he)}else{const ae=ba([],S,k),he=ba([],k,S);sr(he,he);const ue=fh(ae)-O;ne=Math.sqrt(ue*(ue+2*O));const je=Math.acos(ne/(O+ue))-Math.acos(pi(T,he));ne*=Math.cos(je)}return 1.01*ne}(i,this.pixelsPerMeter(i.center.lat,i.worldSize)),u=xh(i.zoom);if(u>0){const f=Nh(i,Ca(1,i.center.lat)*i.worldSize),g=i.worldSize/(2*Math.PI),v=Math.max(i.width,i.height)/i.worldSize*Math.PI;return qt(a,f+g*(1-Math.cos(v)),Math.pow(u,10))}return a}upVector(i,a,u){return Nd(a,u,i,1)}upVectorScale(i){return{metersToTile:tp(Hm(Qs(i)))}}}function j1(s){const i=s.parallels,a=!!i&&Math.abs(i[0]+i[1])<.01;switch(s.name){case"mercator":return new B1(s);case"equirectangular":return new uC(s);case"naturalEarth":return new Nl(s);case"equalEarth":return new Uh(s);case"winkelTripel":return new dC(s);case"albers":return a?new U1(s):new cC(s);case"lambertConformalConic":return a?new U1(s):new hC(s);case"globe":return new fC(s)}throw new Error(`Invalid projection name: ${s.name}`)}const pC=tl.types,$1=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function gg(s,i,a,u,f,g,v,b,M,T,S,O,k){const N=b?Math.min(yu,Math.round(b[0])):0,z=b?Math.min(yu,Math.round(b[1])):0;s.emplaceBack(i,a,Math.round(32*u),Math.round(32*f),g,v,(N<<1)+(M?1:0),z,16*T,16*S,256*O,256*k)}function _g(s,i,a,u,f,g,v){s.emplaceBack(i,a,u,f,g,v)}function yg(s,i,a,u,f){s.emplaceBack(i,a,u,f),s.emplaceBack(i,a,u,f),s.emplaceBack(i,a,u,f),s.emplaceBack(i,a,u,f)}function mC(s){for(const i of s.sections)if(ou(i.text))return!0;return!1}class ef{constructor(i){this.layoutVertexArray=new ht,this.indexArray=new on,this.programConfigurations=i,this.segments=new Ti,this.dynamicLayoutVertexArray=new gt,this.opacityVertexArray=new ln,this.placedSymbolArray=new Rr,this.globeExtVertexArray=new Et}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(i,a,u,f){this.isEmpty()||(u&&(this.layoutVertexBuffer=i.createVertexBuffer(this.layoutVertexArray,Ry.members),this.indexBuffer=i.createIndexBuffer(this.indexArray,a),this.dynamicLayoutVertexBuffer=i.createVertexBuffer(this.dynamicLayoutVertexArray,I2.members,!0),this.opacityVertexBuffer=i.createVertexBuffer(this.opacityVertexArray,$1,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=i.createVertexBuffer(this.globeExtVertexArray,D2.members,!0)),this.opacityVertexBuffer.itemSize=1),(u||f)&&this.programConfigurations.upload(i))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Ve(ef,"SymbolBuffers");class nl{constructor(i,a,u){this.layoutVertexArray=new i,this.layoutAttributes=a,this.indexArray=new u,this.segments=new Ti,this.collisionVertexArray=new Jn,this.collisionVertexArrayExt=new Yn}upload(i){this.layoutVertexBuffer=i.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=i.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=i.createVertexBuffer(this.collisionVertexArray,Ly.members,!0),this.collisionVertexBufferExt=i.createVertexBuffer(this.collisionVertexArrayExt,S2.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Ve(nl,"CollisionBuffers");class Ma{constructor(i){this.collisionBoxArray=i.collisionBoxArray,this.zoom=i.zoom,this.overscaling=i.overscaling,this.layers=i.layers,this.layerIds=this.layers.map(v=>v.id),this.index=i.index,this.pixelRatio=i.pixelRatio,this.sourceLayerIndex=i.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=uo([]),this.placementViewportMatrix=uo([]);const a=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Fy(this.zoom,a["text-size"]),this.iconSizeData=Fy(this.zoom,a["icon-size"]);const u=this.layers[0].layout,f=u.get("symbol-sort-key"),g=u.get("symbol-z-order");this.canOverlap=u.get("text-allow-overlap")||u.get("icon-allow-overlap")||u.get("text-ignore-placement")||u.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==g&&void 0!==f.constantOr(1),this.sortFeaturesByY=("viewport-y"===g||"auto"===g&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=u.get("text-writing-mode").map(v=>Ts[v]),this.stateDependentLayerIds=this.layers.filter(v=>v.isStateDependent()).map(v=>v.id),this.sourceID=i.sourceID,this.projection=i.projection}createArrays(){this.text=new ef(new ch(this.layers,this.zoom,i=>/^text/.test(i))),this.icon=new ef(new ch(this.layers,this.zoom,i=>/^icon/.test(i))),this.glyphOffsetArray=new ir,this.lineVertexArray=new su,this.symbolInstances=new Gr}calculateGlyphDependencies(i,a,u,f,g){for(let v=0;v0)&&("constant"!==M.value.kind||M.value.value.length>0),k="constant"!==S.value.kind||!!S.value.value||Object.keys(S.parameters).length>0,N=v.get("symbol-sort-key");if(this.features=[],!O&&!k)return;const z=a.iconDependencies,j=a.glyphDependencies,Z=a.availableImages,te=new A(this.zoom);for(const{feature:ee,id:ne,index:ae,sourceLayerIndex:he}of i){const ue=g._featureFilter.needGeometry,je=Ch(ee,ue);if(!g._featureFilter.filter(te,je,u))continue;if(ue||(je.geometry=mi(ee,u,f)),b&&1!==ee.type&&u.z<=5){const He=je.geometry,rt=.98078528056,it=(dt,Tt)=>pi(Nd(dt.x,dt.y,u,1),Nd(Tt.x,Tt.y,u,1))=0;for(const it of Le.sections)if(it.image)z[it.image.name]=!0;else{const dt=Tl(Le.toString()),Tt=it.fontStack||He,Xe=j[Tt]=j[Tt]||{};this.calculateGlyphDependencies(it.text,Xe,rt,this.allowVerticalPlacement,dt)}}}"line"===v.get("symbol-placement")&&(this.features=function(ee){const ne={},ae={},he=[];let ue=0;function je(He){he.push(ee[He]),ue++}function Le(He,rt,it){const dt=ae[He];return delete ae[He],ae[rt]=dt,he[dt].geometry[0].pop(),he[dt].geometry[0]=he[dt].geometry[0].concat(it[0]),dt}function Ke(He,rt,it){const dt=ne[rt];return delete ne[rt],ne[He]=dt,he[dt].geometry[0].shift(),he[dt].geometry[0]=it[0].concat(he[dt].geometry[0]),dt}function _t(He,rt,it){const dt=it?rt[0][rt[0].length-1]:rt[0][0];return`${He}:${dt.x}:${dt.y}`}for(let He=0;HeHe.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ee,ne)=>ee.sortKey-ne.sortKey)}update(i,a,u,f){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(i,a,this.layers,u,f),this.icon.programConfigurations.updatePaintArrays(i,a,this.layers,u,f))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(i){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(i),this.iconCollisionBox.upload(i)),this.text.upload(i,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(i,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=j1(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(i,a){const u=this.lineVertexArray.length;if(void 0!==i.segment)for(const{x:f,y:g}of a)this.lineVertexArray.emplaceBack(f,g);return{lineStartIndex:u,lineLength:this.lineVertexArray.length-u}}addSymbols(i,a,u,f,g,v,b,M,T,S,O,k,N,z){const j=i.indexArray,Z=i.layoutVertexArray,te=i.globeExtVertexArray,ee=i.segments.prepareSegment(4*a.length,Z,j,this.canOverlap?v.sortKey:void 0),ne=this.glyphOffsetArray.length,ae=ee.vertexLength,he=this.allowVerticalPlacement&&b===Ts.vertical?Math.PI/2:0,ue=v.text&&v.text.sections;for(let Le=0;Le=0?a.rightJustifiedTextSymbolIndex:a.centerJustifiedTextSymbolIndex>=0?a.centerJustifiedTextSymbolIndex:a.leftJustifiedTextSymbolIndex>=0?a.leftJustifiedTextSymbolIndex:a.verticalPlacedTextSymbolIndex>=0?a.verticalPlacedTextSymbolIndex:f),v=Oh(this.textSizeData,i,g)/Oo;return this.tilePixelRatio*v}getSymbolInstanceIconSize(i,a,u){const f=this.icon.placedSymbolArray.get(u),g=Oh(this.iconSizeData,i,f);return this.tilePixelRatio*g}_commitDebugCollisionVertexUpdate(i,a,u){i.emplaceBack(a,-u,-u),i.emplaceBack(a,u,-u),i.emplaceBack(a,u,u),i.emplaceBack(a,-u,u)}_updateTextDebugCollisionBoxes(i,a,u,f,g,v){for(let b=f;b0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(i,a){const u=i.placedSymbolArray.get(a),f=u.vertexStartIndex+4*u.numGlyphs;for(let g=u.vertexStartIndex;gf[b]-f[M]||g[M]-g[b]),v}addToSortKeyRanges(i,a){const u=this.sortKeyRanges[this.sortKeyRanges.length-1];u&&u.sortKey===a?u.symbolInstanceEnd=i+1:this.sortKeyRanges.push({sortKey:a,symbolInstanceStart:i,symbolInstanceEnd:i+1})}sortFeatures(i){if(this.sortFeaturesByY&&this.sortedAngle!==i&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(i),this.sortedAngle=i,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const a of this.symbolInstanceIndexes){const u=this.symbolInstances.get(a);this.featureSortOrder.push(u.featureIndex);const{rightJustifiedTextSymbolIndex:f,centerJustifiedTextSymbolIndex:g,leftJustifiedTextSymbolIndex:v,verticalPlacedTextSymbolIndex:b,placedIconSymbolIndex:M,verticalPlacedIconSymbolIndex:T}=u;f>=0&&this.addIndicesForPlacedSymbol(this.text,f),g>=0&&g!==f&&this.addIndicesForPlacedSymbol(this.text,g),v>=0&&v!==g&&v!==f&&this.addIndicesForPlacedSymbol(this.text,v),b>=0&&this.addIndicesForPlacedSymbol(this.text,b),M>=0&&this.addIndicesForPlacedSymbol(this.icon,M),T>=0&&this.addIndicesForPlacedSymbol(this.icon,T)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Ve(Ma,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),Ma.MAX_GLYPHS=65535,Ma.addDynamicAttributes=yg;const H1=new ie({"symbol-placement":new U(Ze.layout_symbol["symbol-placement"]),"symbol-spacing":new U(Ze.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new U(Ze.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Y(Ze.layout_symbol["symbol-sort-key"]),"symbol-z-order":new U(Ze.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new U(Ze.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new U(Ze.layout_symbol["icon-ignore-placement"]),"icon-optional":new U(Ze.layout_symbol["icon-optional"]),"icon-rotation-alignment":new U(Ze.layout_symbol["icon-rotation-alignment"]),"icon-size":new Y(Ze.layout_symbol["icon-size"]),"icon-text-fit":new U(Ze.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new U(Ze.layout_symbol["icon-text-fit-padding"]),"icon-image":new Y(Ze.layout_symbol["icon-image"]),"icon-rotate":new Y(Ze.layout_symbol["icon-rotate"]),"icon-padding":new U(Ze.layout_symbol["icon-padding"]),"icon-keep-upright":new U(Ze.layout_symbol["icon-keep-upright"]),"icon-offset":new Y(Ze.layout_symbol["icon-offset"]),"icon-anchor":new Y(Ze.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new U(Ze.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new U(Ze.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new U(Ze.layout_symbol["text-rotation-alignment"]),"text-field":new Y(Ze.layout_symbol["text-field"]),"text-font":new Y(Ze.layout_symbol["text-font"]),"text-size":new Y(Ze.layout_symbol["text-size"]),"text-max-width":new Y(Ze.layout_symbol["text-max-width"]),"text-line-height":new Y(Ze.layout_symbol["text-line-height"]),"text-letter-spacing":new Y(Ze.layout_symbol["text-letter-spacing"]),"text-justify":new Y(Ze.layout_symbol["text-justify"]),"text-radial-offset":new Y(Ze.layout_symbol["text-radial-offset"]),"text-variable-anchor":new U(Ze.layout_symbol["text-variable-anchor"]),"text-anchor":new Y(Ze.layout_symbol["text-anchor"]),"text-max-angle":new U(Ze.layout_symbol["text-max-angle"]),"text-writing-mode":new U(Ze.layout_symbol["text-writing-mode"]),"text-rotate":new Y(Ze.layout_symbol["text-rotate"]),"text-padding":new U(Ze.layout_symbol["text-padding"]),"text-keep-upright":new U(Ze.layout_symbol["text-keep-upright"]),"text-transform":new Y(Ze.layout_symbol["text-transform"]),"text-offset":new Y(Ze.layout_symbol["text-offset"]),"text-allow-overlap":new U(Ze.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new U(Ze.layout_symbol["text-ignore-placement"]),"text-optional":new U(Ze.layout_symbol["text-optional"])});var vg={paint:new ie({"icon-opacity":new Y(Ze.paint_symbol["icon-opacity"]),"icon-color":new Y(Ze.paint_symbol["icon-color"]),"icon-halo-color":new Y(Ze.paint_symbol["icon-halo-color"]),"icon-halo-width":new Y(Ze.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Y(Ze.paint_symbol["icon-halo-blur"]),"icon-translate":new U(Ze.paint_symbol["icon-translate"]),"icon-translate-anchor":new U(Ze.paint_symbol["icon-translate-anchor"]),"text-opacity":new Y(Ze.paint_symbol["text-opacity"]),"text-color":new Y(Ze.paint_symbol["text-color"],{runtimeType:ds,getOverride:s=>s.textColor,hasOverride:s=>!!s.textColor}),"text-halo-color":new Y(Ze.paint_symbol["text-halo-color"]),"text-halo-width":new Y(Ze.paint_symbol["text-halo-width"]),"text-halo-blur":new Y(Ze.paint_symbol["text-halo-blur"]),"text-translate":new U(Ze.paint_symbol["text-translate"]),"text-translate-anchor":new U(Ze.paint_symbol["text-translate-anchor"])}),layout:H1};class e0{constructor(i){this.type=i.property.overrides?i.property.overrides.runtimeType:Vc,this.defaultValue=i}evaluate(i){if(i.formattedSection){const a=this.defaultValue.property.overrides;if(a&&a.hasOverride(i.formattedSection))return a.getOverride(i.formattedSection)}return i.feature&&i.featureState?this.defaultValue.evaluate(i.feature,i.featureState):this.defaultValue.property.specification.default}eachChild(i){this.defaultValue.isConstant()||i(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ve(e0,"FormatSectionOverride",{omit:["defaultValue"]});class t0 extends ys{constructor(i){super(i,vg)}recalculate(i,a){super.recalculate(i,a),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const u=this.layout.get("text-writing-mode");if(u){const f=[];for(const g of u)f.indexOf(g)<0&&f.push(g);this.layout._values["text-writing-mode"]=f}else this.layout._values["text-writing-mode"]="point"===this.layout.get("symbol-placement")?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(i,a,u,f){const g=this.layout.get(i).evaluate(a,{},u,f),v=this._unevaluatedLayout._values[i];return v.isDataDriven()||rn(v.value)||!g?g:(b=a.properties,g.replace(/{([^{}]+)}/g,(T,S)=>S in b?String(b[S]):""));var b}createBucket(i){return new Ma(i)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const i of vg.paint.overridableProperties){if(!t0.hasPaintOverride(this.layout,i))continue;const a=this.paint.get(i),u=new e0(a),f=new Td(u,a.property.specification);let g=null;g="constant"===a.value.kind||"source"===a.value.kind?new Nt("source",f):new xl("composite",f,a.value.zoomStops,a.value._interpolationType),this.paint._values[i]=new J(a.property,g,a.parameters)}}_handleOverridablePaintPropertyUpdate(i,a,u){return!(!this.layout||a.isDataDriven()||u.isDataDriven())&&t0.hasPaintOverride(this.layout,i)}static hasPaintOverride(i,a){const u=i.get("text-field"),f=vg.paint.properties[a];let g=!1;const v=b=>{for(const M of b)if(f.overrides&&f.overrides.hasOverride(M))return void(g=!0)};if("constant"===u.value.kind&&u.value.value instanceof Qo)v(u.value.value.sections);else if("source"===u.value.kind){const b=T=>{g||(T instanceof Na&&Pi(T.value)===Uc?v(T.value.sections):T instanceof za?v(T.sections):T.eachChild(b))},M=u.value;M._styleExpression&&b(M._styleExpression.expression)}return g}getProgramConfiguration(i){return new lu(this,i)}}var A2={paint:new ie({"background-color":new U(Ze.paint_background["background-color"]),"background-pattern":new U(Ze.paint_background["background-pattern"]),"background-opacity":new U(Ze.paint_background["background-opacity"])})},O2={paint:new ie({"raster-opacity":new U(Ze.paint_raster["raster-opacity"]),"raster-hue-rotate":new U(Ze.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new U(Ze.paint_raster["raster-brightness-min"]),"raster-brightness-max":new U(Ze.paint_raster["raster-brightness-max"]),"raster-saturation":new U(Ze.paint_raster["raster-saturation"]),"raster-contrast":new U(Ze.paint_raster["raster-contrast"]),"raster-resampling":new U(Ze.paint_raster["raster-resampling"]),"raster-fade-duration":new U(Ze.paint_raster["raster-fade-duration"])})};class n0 extends ys{constructor(i){super(i,{}),this.implementation=i}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}isLayerDraped(){return void 0!==this.implementation.renderToTile}shouldRedrape(){return!!this.implementation.shouldRerenderTiles&&this.implementation.shouldRerenderTiles()}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(i){this.implementation.onAdd&&this.implementation.onAdd(i,i.painter.context.gl)}onRemove(i){this.implementation.onRemove&&this.implementation.onRemove(i,i.painter.context.gl)}}var r0={paint:new ie({"sky-type":new U(Ze.paint_sky["sky-type"]),"sky-atmosphere-sun":new U(Ze.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new U(Ze.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new U(Ze.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new U(Ze.paint_sky["sky-gradient-radius"]),"sky-gradient":new re(Ze.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new U(Ze.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new U(Ze.paint_sky["sky-atmosphere-color"]),"sky-opacity":new U(Ze.paint_sky["sky-opacity"])})};function G1(s,i,a){const u=[0,0,1],f=Vm([]);return ay(f,f,a?-Pt(s)+Math.PI:Pt(s)),sy(f,f,-Pt(i)),jv(u,u,f),sr(u,u)}const k2={circle:class extends ys{constructor(s){super(s,Pb)}createBucket(s){return new os(s)}queryRadius(s){const i=s;return Th("circle-radius",this,i)+Th("circle-stroke-width",this,i)+Wm(this.paint.get("circle-translate"))}queryIntersectsFeature(s,i,a,u,f,g,v,b){const M=e1(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),g.angle,s.pixelToTileUnitsFactor),T=this.paint.get("circle-radius").evaluate(i,a)+this.paint.get("circle-stroke-width").evaluate(i,a);return t1(s,u,g,v,b,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),M,T)}getProgramIds(){return["circle"]}getProgramConfiguration(s){return new lu(this,s)}},heatmap:class extends ys{createBucket(s){return new n1(s)}constructor(s){super(s,i1),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(s){"heatmap-color"===s&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=_y({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(s){return Th("heatmap-radius",this,s)}queryIntersectsFeature(s,i,a,u,f,g,v,b){const M=this.paint.get("heatmap-radius").evaluate(i,a);return t1(s,u,g,v,b,!0,!0,new Ee(0,0),M)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(s){return new lu(this,s)}},hillshade:class extends ys{constructor(s){super(s,Ob)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends ys{constructor(s){super(s,Bb)}getProgramIds(){const s=this.paint.get("fill-pattern"),i=s&&s.constantOr(1),a=[i?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&a.push(i&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),a}getProgramConfiguration(s){return new lu(this,s)}recalculate(s,i){super.recalculate(s,i);const a=this.paint._values["fill-outline-color"];"constant"===a.value.kind&&void 0===a.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(s){return new pc(s)}queryRadius(){return Wm(this.paint.get("fill-translate"))}queryIntersectsFeature(s,i,a,u,f,g){return!s.queryGeometry.isAboveHorizon&&op(Qv(s.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),g.angle,s.pixelToTileUnitsFactor),u)}isTileClipped(){return!0}},"fill-extrusion":class extends ys{constructor(s){super(s,Zb)}createBucket(s){return new wp(s)}queryRadius(){return Wm(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(s){return new lu(this,s)}queryIntersectsFeature(s,i,a,u,f,g,v,b,M){const T=e1(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),g.angle,s.pixelToTileUnitsFactor),S=this.paint.get("fill-extrusion-height").evaluate(i,a),O=this.paint.get("fill-extrusion-base").evaluate(i,a),k=[0,0],N=b&&g.elevation,z=g.elevation?g.elevation.exaggeration():1,j=s.tile.getBucket(this);if(N&&j instanceof wp){const ae=j.centroidVertexArray,he=M+1;heae.polygon).flat());const Z=N?b:null,[te,ee]=(he=u,ue=O,je=S,Le=T,Ke=v,_t=Z,He=k,rt=z,it=g.center.lat,"globe"===(ae=g).projection.name?function(Tt,Xe,Lt,Yt,Bt,On,Ct,cn,kn,tr,Fn){const fn=[],zr=[],Nn=Tt.projection.upVectorScale(Fn,Tt.center.lat,Tt.worldSize).metersToTile,zn=[0,0,0,1],Lr=[0,0,0,1],Br=(Or,vi,gi,Ur)=>{Or[0]=vi,Or[1]=gi,Or[2]=Ur,Or[3]=1},Vr=qb();Lt>0&&(Lt+=Vr),Yt+=Vr;for(const Or of Xe){const vi=[],gi=[];for(const Ur of Or){const br=Ur.x+Bt.x,ji=Ur.y+Bt.y,Oi=Tt.projection.projectTilePoint(br,ji,Fn),xi=Tt.projection.upVector(Fn,Ur.x,Ur.y);let pr=Lt,$i=Yt;if(Ct){const jr=gc(br,ji,Lt,Yt,Ct,cn,kn,tr);pr+=jr.base,$i+=jr.top}0!==Lt?Br(zn,Oi.x+xi[0]*Nn*pr,Oi.y+xi[1]*Nn*pr,Oi.z+xi[2]*Nn*pr):Br(zn,Oi.x,Oi.y,Oi.z),Br(Lr,Oi.x+xi[0]*Nn*$i,Oi.y+xi[1]*Nn*$i,Oi.z+xi[2]*Nn*$i),Er(zn,zn,On),Er(Lr,Lr,On),vi.push(new ea(zn[0],zn[1],zn[2])),gi.push(new ea(Lr[0],Lr[1],Lr[2]))}fn.push(vi),zr.push(gi)}return[fn,zr]}(ae,he,ue,je,Le,Ke,_t,He,rt,it,s.tileID.canonical):_t?function(Tt,Xe,Lt,Yt,Bt,On,Ct,cn,kn){const tr=[],Fn=[],fn=[0,0,0,1];for(const zr of Tt){const Nn=[],zn=[];for(const Lr of zr){const Br=Lr.x+Yt.x,Vr=Lr.y+Yt.y,Or=gc(Br,Vr,Xe,Lt,On,Ct,cn,kn);fn[0]=Br,fn[1]=Vr,fn[2]=Or.base,fn[3]=1,Ol(fn,fn,Bt),fn[3]=Math.max(fn[3],1e-5);const vi=new ea(fn[0]/fn[3],fn[1]/fn[3],fn[2]/fn[3]);fn[0]=Br,fn[1]=Vr,fn[2]=Or.top,fn[3]=1,Ol(fn,fn,Bt),fn[3]=Math.max(fn[3],1e-5);const gi=new ea(fn[0]/fn[3],fn[1]/fn[3],fn[2]/fn[3]);Nn.push(vi),zn.push(gi)}tr.push(Nn),Fn.push(zn)}return[tr,Fn]}(he,ue,je,Le,Ke,_t,He,rt,it):function(Tt,Xe,Lt,Yt,Bt){const On=[],Ct=[],cn=Bt[8]*Xe,kn=Bt[9]*Xe,tr=Bt[10]*Xe,Fn=Bt[11]*Xe,fn=Bt[8]*Lt,zr=Bt[9]*Lt,Nn=Bt[10]*Lt,zn=Bt[11]*Lt;for(const Lr of Tt){const Br=[],Vr=[];for(const Or of Lr){const vi=Or.x+Yt.x,gi=Or.y+Yt.y,Ur=Bt[0]*vi+Bt[4]*gi+Bt[12],br=Bt[1]*vi+Bt[5]*gi+Bt[13],ji=Bt[2]*vi+Bt[6]*gi+Bt[14],Oi=Bt[3]*vi+Bt[7]*gi+Bt[15],xi=Ur+cn,pr=br+kn,$i=ji+tr,jr=Math.max(Oi+Fn,1e-5),qo=Ur+fn,Wi=br+zr,_o=ji+Nn,yo=Math.max(Oi+zn,1e-5);Br.push(new ea(xi/jr,pr/jr,$i/jr)),Vr.push(new ea(qo/yo,Wi/yo,_o/yo))}On.push(Br),Ct.push(Vr)}return[On,Ct]}(he,ue,je,Le,Ke)),ne=s.queryGeometry;var ae,he,ue,je,Le,Ke,_t,He,rt,it;return function(ae,he,ue){let je=1/0;op(ue,he)&&(je=Oy(ue,he[0]));for(let Le=0;Le=3)for(let z=0;z{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=()=>{}}}class _C{constructor(){this.tasks={},this.taskQueue=[],hr(["process"],this),this.invoker=new gC(this.process),this.nextId=0}add(i,a){const u=this.nextId++,f=function({type:g,isSymbolTile:v,zoom:b}){return b=b||0,"message"===g?0:"maybePrepare"!==g||v?"parseTile"!==g||v?"parseTile"===g&&v?300-b:"maybePrepare"===g&&v?400-b:500:200-b:100-b}(a);if(0===f){As();try{i()}finally{}return{cancel:()=>{}}}return this.tasks[u]={fn:i,metadata:a,priority:f,id:u},this.taskQueue.push(u),this.invoker.trigger(),{cancel:()=>{delete this.tasks[u]}}}process(){As();try{if(this.taskQueue=this.taskQueue.filter(u=>!!this.tasks[u]),!this.taskQueue.length)return;const i=this.pick();if(null===i)return;const a=this.tasks[i];if(delete this.tasks[i],this.taskQueue.length&&this.invoker.trigger(),!a)return;a.fn()}finally{}}pick(){let i=null,a=1/0;for(let f=0;f>=1)>1;){const T=a+f>>1,S=u+g>>1;1&i?(f=a,g=u,a=v,u=b):(a=f,u=g,f=v,g=b),v=T,b=S}const M=4*s;zl[M+0]=a,zl[M+1]=u,zl[M+2]=f,zl[M+3]=g}const Bl=new Uint16Array(2178),go=new Uint8Array(1089),ta=new Uint16Array(1089);function W1(s){return 0===s?-.03125:32===s?.03125:0}var js=be([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const xg={type:2,extent:dn,loadGeometry:()=>[[new Ee(0,0),new Ee(dn+1,0),new Ee(dn+1,dn+1),new Ee(0,dn+1),new Ee(0,0)]]};class s0{constructor(i,a,u,f,g){this.tileID=i,this.uid=zi(),this.uses=0,this.tileSize=a,this.tileZoom=u,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=g,this.expiredRequestCount=0,this.state="loading",f&&f.transform&&(this.projection=f.transform.projection)}registerFadeDuration(i){const a=i+this.timeAdded;ag.getLayer(T)).filter(Boolean);if(0!==M.length){b.layers=M,b.stateDependentLayerIds&&(b.stateDependentLayers=b.stateDependentLayerIds.map(T=>M.filter(S=>S.id===T)[0]));for(const T of M)v[T.id]=b}}return v}(i.buckets,a.style),this.hasSymbolBuckets=!1;for(const f in this.buckets){const g=this.buckets[f];if(g instanceof Ma){if(this.hasSymbolBuckets=!0,!u)break;g.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const f in this.buckets){const g=this.buckets[f];if(g instanceof Ma&&g.hasRTLText){this.hasRTLText=!0,I.isLoading()||I.isLoaded()||"deferred"!==C()||D();break}}this.queryPadding=0;for(const f in this.buckets){const g=this.buckets[f];this.queryPadding=Math.max(this.queryPadding,a.style.getLayer(f).queryRadius(g))}i.imageAtlas&&(this.imageAtlas=i.imageAtlas),i.glyphAtlasImage&&(this.glyphAtlasImage=i.glyphAtlasImage),i.lineAtlas&&(this.lineAtlas=i.lineAtlas)}else this.collisionBoxArray=new Mr}unloadVectorData(){if(this.hasData()){for(const i in this.buckets)this.buckets[i].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(i){return this.buckets[i.id]}upload(i){for(const u in this.buckets){const f=this.buckets[u];f.uploadPending()&&f.upload(i)}const a=i.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new tf(i,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new tf(i,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new tf(i,this.lineAtlas.image,a.ALPHA),this.lineAtlas.uploaded=!0)}prepare(i){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(i,this.imageAtlasTexture)}queryRenderedFeatures(i,a,u,f,g,v,b,M){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:f,pixelPosMatrix:b,transform:v,params:g,tileTransform:this.tileTransform},i,a,u):{}}querySourceFeatures(i,a){const u=this.latestFeatureIndex;if(!u||!u.rawTileData)return;const f=u.loadVTLayers(),g=a?a.sourceLayer:"",v=f._geojsonTileLayer||f[g];if(!v)return;const b=nh(a&&a.filter),{z:M,x:T,y:S}=this.tileID.canonical,O={z:M,x:T,y:S};for(let k=0;ku)f=!1;else if(a)if(this.expirationTime=0;Z--){const te=4*Z,ee=zl[te+0],ne=zl[te+1],ae=zl[te+2],he=zl[te+3],ue=ee+ae>>1,je=ne+he>>1,Le=ue+je-ne,Ke=je+ee-ue,_t=33*ne+ee,He=33*he+ae,rt=33*je+ue,it=Math.hypot((Bl[2*_t+0]+Bl[2*He+0])/2-Bl[2*rt+0],(Bl[2*_t+1]+Bl[2*He+1])/2-Bl[2*rt+1])>=16;go[rt]=go[rt]||(it?1:0),Z<1022&&(go[rt]=go[rt]||go[33*(ne+Ke>>1)+(ee+Le>>1)]||go[33*(he+Ke>>1)+(ae+Le>>1)])}const O=new tt,k=new on;let N=0;function z(Z,te){const ee=33*te+Z;return 0===ta[ee]&&(O.emplaceBack(Bl[2*ee+0],Bl[2*ee+1],Z*dn/32,te*dn/32),ta[ee]=++N),ta[ee]-1}function j(Z,te,ee,ne,ae,he){const ue=Z+ee>>1,je=te+ne>>1;if(Math.abs(Z-ae)+Math.abs(te-he)>1&&go[33*je+ue])j(ae,he,Z,te,ue,je),j(ee,ne,ae,he,ue,je);else{const Le=z(Z,te),Ke=z(ee,ne),_t=z(ae,he);k.emplaceBack(Le,Ke,_t)}}return j(0,0,32,32,32,0),j(32,32,0,0,0,32),{vertices:O,indices:k}}(this.tileID.canonical,a);f=v.vertices,g=v.indices}else{f=new tt,g=new on;for(const{x:b,y:M}of u)f.emplaceBack(b,M,0,0);const v=My(f.int16,void 0,4);for(let b=0;b0&&(b=Xa(new Float64Array(16),a.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(i,f,a,g,b,v),this._makeGlobeTileDebugTextBuffer(i,f,a,g,b,v)}_globePoint(i,a,u,f,g,v,b){let M=Nd(i,a,u);if(v){const T=1<.5?N=-1:k<-.5&&(N=1);let z=(i/dn+u.x)/T+N,j=(a/dn+u.y)/T;z=(z-S)*f._pixelsPerMercatorPixel+S,j=(j-O)*f._pixelsPerMercatorPixel+O;const Z=[z*f.worldSize,j*f.worldSize,0];Er(Z,Z,v),M=hc(M,Z,b)}return Er(M,M,g)}_makeGlobeTileDebugBorderBuffer(i,a,u,f,g,v){const b=new yt,M=new _s,T=new Fe,S=(k,N,z,j,Z)=>{const te=(z-k)/(Z-1),ee=(j-N)/(Z-1),ne=b.length;for(let ae=0;aeO*N+z;for(let N=0;Ni[v])return null}else{const b=1/u[v];let M=(s[v]-a[v])*b,T=(i[v]-a[v])*b;if(M>T){const S=M;M=T,T=S}if(M>f&&(f=M),Tg)return null}return f}function a0(s,i,a,u,f,g,v,b,M,T,S){const O=u-s,k=f-i,N=g-a,z=v-s,j=b-i,Z=M-a,te=S[1]*Z-S[2]*j,ee=S[2]*z-S[0]*Z,ne=S[0]*j-S[1]*z,ae=O*te+k*ee+N*ne;if(Math.abs(ae)<1e-15)return null;const he=1/ae,ue=T[0]-s,je=T[1]-i,Le=T[2]-a,Ke=(ue*te+je*ee+Le*ne)*he;if(Ke<0||Ke>1)return null;const _t=je*N-Le*k,He=Le*O-ue*N,rt=ue*k-je*O,it=(S[0]*_t+S[1]*He+S[2]*rt)*he;return it<0||Ke+it>1?null:(z*_t+j*He+Z*rt)*he}function xC(s,i,a){return(s-i)/(a-i)}function wC(s,i,a,u,f,g,v,b,M){const T=1<{const ee=Z?1:0,ne=(N+1)*j-ee,ae=z*j,he=(z+1)*j-ee;te[0]=N*j,te[1]=ae,te[2]=ne,te[3]=he};let O=new Z1(M);const k=[];for(let N=0;N=1;M/=2){const N=b[b.length-1];O=new Z1(M);for(let z=0;z0;){const{idx:z,t:j,nodex:Z,nodey:te,depth:ee}=N.pop();if(this.leaves[z]){wC(Z,te,ee,i,a,u,f,O,k);const ae=1<=Xe[2])return j}continue}let ne=0;for(let ae=0;ae=T[S[Le]]&&(S.splice(Le,0,ae),je=!0);je||(S[ne]=ae),ne++}}for(let ae=0;ae=this.dim+1||a<-1||a>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(a+1)*this.stride+(i+1)}static pack(i,a){const u=[0,0,0,0],f=rf.getUnpackVector(a);let g=Math.floor((i+f[3])/f[2]);return u[2]=g%256,g=Math.floor(g/256),u[1]=g%256,g=Math.floor(g/256),u[0]=g,u}getPixels(){return new jo({width:this.stride,height:this.stride},this.pixels)}backfillBorder(i,a,u){if(this.dim!==i.dim)throw new Error("dem dimension mismatch");let f=a*this.dim,g=a*this.dim+this.dim,v=u*this.dim,b=u*this.dim+this.dim;switch(a){case-1:f=g-1;break;case 1:g=f+1}switch(u){case-1:v=b-1;break;case 1:b=v+1}const M=-a*this.dim,T=-u*this.dim;for(let S=v;S{this.remove(i,g)},u)),this.data[f].push(g),this.order.push(f),this.order.length>this.max){const v=this._getAndRemoveByKey(this.order[0]);v&&this.onRemove(v)}return this}has(i){return i.wrapped().key in this.data}getAndRemove(i){return this.has(i)?this._getAndRemoveByKey(i.wrapped().key):null}_getAndRemoveByKey(i){const a=this.data[i].shift();return a.timeout&&clearTimeout(a.timeout),0===this.data[i].length&&delete this.data[i],this.order.splice(this.order.indexOf(i),1),a.value}getByKey(i){const a=this.data[i];return a?a[0].value:null}get(i){return this.has(i)?this.data[i.wrapped().key][0].value:null}remove(i,a){if(!this.has(i))return this;const u=i.wrapped().key,f=void 0===a?0:this.data[u].indexOf(a),g=this.data[u][f];return this.data[u].splice(f,1),g.timeout&&clearTimeout(g.timeout),0===this.data[u].length&&delete this.data[u],this.onRemove(g.value),this.order.splice(this.order.indexOf(u),1),this}setMaxSize(i){for(this.max=i;this.order.length>this.max;){const a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}filter(i){const a=[];for(const u in this.data)for(const f of this.data[u])i(f.value)||a.push(f);for(const u of a)this.remove(u.value.tileID,u)}}class xu{constructor(i,a,u){this.func=i,this.mask=a,this.range=u}}xu.ReadOnly=!1,xu.ReadWrite=!0,xu.disabled=new xu(519,xu.ReadOnly,[0,1]);class $h{constructor(i,a,u,f,g,v){this.test=i,this.ref=a,this.mask=u,this.fail=f,this.depthFail=g,this.pass=v}}$h.disabled=new $h({func:519,mask:0},0,0,7680,7680,7680);class na{constructor(i,a,u){this.blendFunction=i,this.blendColor=a,this.mask=u}}na.Replace=[1,0],na.disabled=new na(na.Replace,Si.transparent,[!1,!1,!1,!1]),na.unblended=new na(na.Replace,Si.transparent,[!0,!0,!0,!0]),na.alphaBlended=new na([1,771],Si.transparent,[!0,!0,!0,!0]);class ra{constructor(i,a,u){this.enable=i,this.mode=a,this.frontFace=u}}ra.disabled=new ra(!1,1029,2305),ra.backCCW=new ra(!0,1029,2305),ra.backCW=new ra(!0,1029,2304),ra.frontCW=new ra(!0,1028,2304),ra.frontCCW=new ra(!0,1028,2305);class Vl extends Hu{constructor(i,a,u){super(),this.id=i,this._onlySymbols=u,a.on("data",f=>{"source"===f.dataType&&"metadata"===f.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===f.dataType&&"content"===f.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform))}),a.on("error",()=>{this._sourceErrored=!0}),this._source=a,this._tiles={},this._cache=new sf(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=a.minTileCacheSize,this._maxTileCacheSize=a.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new vC,this._isRaster="raster"===this._source.type||"raster-dem"===this._source.type||"custom"===this._source.type&&"raster"===this._source._dataType}onAdd(i){this.map=i,this._minTileCacheSize=void 0===this._minTileCacheSize&&i?i._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=void 0===this._maxTileCacheSize&&i?i._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const i in this._tiles){const a=this._tiles[i];if("loaded"!==a.state&&"errored"!==a.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const i=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,i&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(i,a){return i.isSymbolTile=this._onlySymbols,this._source.loadTile(i,a)}_unloadTile(i){if(this._source.unloadTile)return this._source.unloadTile(i,()=>{})}_abortTile(i){if(this._source.abortTile)return this._source.abortTile(i,()=>{})}serialize(){return this._source.serialize()}prepare(i){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const a in this._tiles){const u=this._tiles[a];u.upload(i),u.prepare(this.map.style.imageManager)}}getIds(){return mr(this._tiles).map(i=>i.tileID).sort(MC).map(i=>i.key)}getRenderableIds(i){const a=[];for(const u in this._tiles)this._isIdRenderable(+u,i)&&a.push(this._tiles[u]);return i?a.sort((u,f)=>{const g=u.tileID,v=f.tileID,b=new Ee(g.canonical.x,g.canonical.y)._rotate(this.transform.angle),M=new Ee(v.canonical.x,v.canonical.y)._rotate(this.transform.angle);return g.overscaledZ-v.overscaledZ||M.y-b.y||M.x-b.x}).map(u=>u.tileID.key):a.map(u=>u.tileID).sort(MC).map(u=>u.key)}hasRenderableParent(i){const a=this.findLoadedParent(i,0);return!!a&&this._isIdRenderable(a.tileID.key)}_isIdRenderable(i,a){return this._tiles[i]&&this._tiles[i].hasData()&&!this._coveredTiles[i]&&(a||!this._tiles[i].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const i in this._tiles)"errored"!==this._tiles[i].state&&this._reloadTile(+i,"reloading")}}_reloadTile(i,a){const u=this._tiles[i];u&&("loading"!==u.state&&(u.state=a),this._loadTile(u,this._tileLoaded.bind(this,u,i,a)))}_tileLoaded(i,a,u,f){if(f)if(i.state="errored",404!==f.status)this._source.fire(new Fa(f,{tile:i}));else if("raster-dem"===this._source.type&&this.usedForTerrain&&this.map.painter.terrain){const g=this.map.painter.terrain;this.update(this.transform,g.getScaledDemTileSize(),!0),g.resetTileLookupCache(this.id)}else this.update(this.transform);else i.timeAdded=La.now(),"expired"===u&&(i.refreshedUponExpiration=!0),this._setTileReloadTimer(a,i),"raster-dem"===this._source.type&&i.dem&&this._backfillDEM(i),this._state.initializeTileState(i,this.map?this.map.painter:null),this._source.fire(new tc("data",{dataType:"source",tile:i,coord:i.tileID,sourceCacheId:this.id}))}_backfillDEM(i){const a=this.getRenderableIds();for(let f=0;f1||(Math.abs(v)>1&&(1===Math.abs(v+M)?v+=M:1===Math.abs(v-M)&&(v-=M)),g.dem&&f.dem&&(f.dem.backfillBorder(g.dem,v,b),f.neighboringTiles&&f.neighboringTiles[T]&&(f.neighboringTiles[T].backfilled=!0)))}}getTile(i){return this.getTileByID(i.key)}getTileByID(i){return this._tiles[i]}_retainLoadedChildren(i,a,u,f){for(const g in this._tiles){let v=this._tiles[g];if(f[g]||!v.hasData()||v.tileID.overscaledZ<=a||v.tileID.overscaledZ>u)continue;let b=v.tileID;for(;v&&v.tileID.overscaledZ>a+1;){const T=v.tileID.scaledTo(v.tileID.overscaledZ-1);v=this._tiles[T.key],v&&v.hasData()&&(b=T)}let M=b;for(;M.overscaledZ>a;)if(M=M.scaledTo(M.overscaledZ-1),i[M.key]){f[b.key]=b;break}}}findLoadedParent(i,a){if(i.key in this._loadedParentTiles){const u=this._loadedParentTiles[i.key];return u&&u.tileID.overscaledZ>=a?u:null}for(let u=i.overscaledZ-1;u>=a;u--){const f=i.scaledTo(u),g=this._getLoadedTile(f);if(g)return g}}_getLoadedTile(i){const a=this._tiles[i.key];return a&&a.hasData()?a:this._cache.getByKey(this._source.reparseOverscaled?i.wrapped().key:i.canonical.key)}updateCacheSize(i,a){a=a||this._source.tileSize;const u=Math.ceil(i.width/a)+1,f=Math.ceil(i.height/a)+1,g=Math.floor(u*f*5),v="number"==typeof this._minTileCacheSize?Math.max(this._minTileCacheSize,g):g,b="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,v):v;this._cache.setMaxSize(b)}handleWrapJump(i){const a=Math.round((i-(void 0===this._prevLng?i:this._prevLng))/360);if(this._prevLng=i,a){const u={};for(const f in this._tiles){const g=this._tiles[f];g.tileID=g.tileID.unwrapTo(g.tileID.wrap+a),u[g.tileID.key]=g}this._tiles=u;for(const f in this._timers)clearTimeout(this._timers[f]),delete this._timers[f];for(const f in this._tiles)this._setTileReloadTimer(+f,this._tiles[f])}}update(i,a,u){if(this.transform=i,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!u)return;let f;this.updateCacheSize(i,a),"globe"!==this.transform.projection.name&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?f=i.getVisibleUnwrappedCoordinates(this._source.tileID).map(b=>new Qi(b.canonical.z,b.wrap,b.canonical.z,b.canonical.x,b.canonical.y)):(f=i.coveringTiles({tileSize:a||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!u,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(f=f.filter(b=>this._source.hasTile(b)))):f=[];const g=this._updateRetainedTiles(f);if(wg(this._source.type)&&0!==f.length){const b={},M={},T=Object.keys(g);for(const O of T){const k=g[O],N=this._tiles[O];if(!N||N.fadeEndTime&&N.fadeEndTime<=La.now())continue;const z=this.findLoadedParent(k,Math.max(k.overscaledZ-Vl.maxOverzooming,this._source.minzoom));z&&(this._addTile(z.tileID),b[z.tileID.key]=z.tileID),M[O]=k}const S=f[f.length-1].overscaledZ;for(const O in this._tiles){const k=this._tiles[O];if(g[O]||!k.hasData())continue;let N=k.tileID;for(;N.overscaledZ>S;){N=N.scaledTo(N.overscaledZ-1);const z=this._tiles[N.key];if(z&&z.hasData()&&M[N.key]){g[O]=k.tileID;break}}}for(const O in b)g[O]||(this._coveredTiles[O]=!0,g[O]=b[O])}for(const b in g)this._tiles[b].clearFadeHold();const v=function(b,M){const T=[];for(const S in b)S in M||T.push(S);return T}(this._tiles,g);for(const b of v){const M=this._tiles[b];M.hasSymbolBuckets&&!M.holdingForFade()?M.setHoldDuration(this.map._fadeDuration):M.hasSymbolBuckets&&!M.symbolFadeFinished()||this._removeTile(+b)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const i in this._tiles)this._tiles[i].holdingForFade()&&this._removeTile(+i)}_updateRetainedTiles(i){const a={};if(0===i.length)return a;const u={},f=i.reduce((T,S)=>Math.min(T,S.overscaledZ),1/0),g=i[0].overscaledZ,v=Math.max(g-Vl.maxOverzooming,this._source.minzoom),b=Math.max(g+Vl.maxUnderzooming,this._source.minzoom),M={};for(const T of i){const S=this._addTile(T);a[T.key]=T,S.hasData()||f=this._source.maxzoom){const k=T.children(this._source.maxzoom)[0],N=this.getTile(k);if(N&&N.hasData()){a[k.key]=k;continue}}else{const k=T.children(this._source.maxzoom);if(a[k[0].key]&&a[k[1].key]&&a[k[2].key]&&a[k[3].key])continue}let O=S.wasRequested();for(let k=T.overscaledZ-1;k>=v;--k){const N=T.scaledTo(k);if(u[N.key]||(u[N.key]=!0,S=this.getTile(N),!S&&O&&(S=this._addTile(N)),S&&(a[N.key]=N,O=S.wasRequested(),S.hasData())))break}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const i in this._tiles){const a=[];let u,f=this._tiles[i].tileID;for(;f.overscaledZ>0;){if(f.key in this._loadedParentTiles){u=this._loadedParentTiles[f.key];break}a.push(f.key);const g=f.scaledTo(f.overscaledZ-1);if(u=this._getLoadedTile(g),u)break;f=g}for(const g of a)this._loadedParentTiles[g]=u}}_addTile(i){let a=this._tiles[i.key];if(a)return a;a=this._cache.getAndRemove(i),a&&(this._setTileReloadTimer(i.key,a),a.tileID=i,this._state.initializeTileState(a,this.map?this.map.painter:null),this._cacheTimers[i.key]&&(clearTimeout(this._cacheTimers[i.key]),delete this._cacheTimers[i.key],this._setTileReloadTimer(i.key,a)));const u=!!a;if(!u){const f=this.map?this.map.painter:null;a=new s0(i,this._source.tileSize*i.overscaleFactor(),this.transform.tileZoom,f,this._isRaster),this._loadTile(a,this._tileLoaded.bind(this,a,i.key,a.state))}return a?(a.uses++,this._tiles[i.key]=a,u||this._source.fire(new tc("dataloading",{tile:a,coord:a.tileID,dataType:"source"})),a):null}_setTileReloadTimer(i,a){i in this._timers&&(clearTimeout(this._timers[i]),delete this._timers[i]);const u=a.getExpiryTimeout();u&&(this._timers[i]=setTimeout(()=>{this._reloadTile(i,"expired"),delete this._timers[i]},u))}_removeTile(i){const a=this._tiles[i];a&&(a.uses--,delete this._tiles[i],this._timers[i]&&(clearTimeout(this._timers[i]),delete this._timers[i]),a.uses>0||(a.hasData()&&"reloading"!==a.state?this._cache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const i in this._tiles)this._removeTile(+i);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(i,a,u){const f=[],g=this.transform;if(!g)return f;const v="globe"===g.projection.name,b=ws(g.center.lng);for(const M in this._tiles){const T=this._tiles[M];if(u&&T.clearQueryDebugViz(),T.holdingForFade())continue;let S;if(v){const O=T.tileID.canonical;if(0===O.z){const k=[Math.abs(pt(b,...xc(O,-1))-b),Math.abs(pt(b,...xc(O,1))-b)];S=[0,2*k.indexOf(Math.min(...k))-1]}else{const k=[Math.abs(pt(b,...xc(O,-1))-b),Math.abs(pt(b,...xc(O,0))-b),Math.abs(pt(b,...xc(O,1))-b)];S=[k.indexOf(Math.min(...k))-1]}}else S=[0];for(const O of S){const k=i.containsTile(T,g,a,O);k&&f.push(k)}}return f}getVisibleCoordinates(i){const a=this.getRenderableIds(i).map(u=>this._tiles[u].tileID);for(const u of a)u.projMatrix=this.transform.calculateProjMatrix(u.toUnwrapped());return a}hasTransition(){if(this._source.hasTransition())return!0;if(wg(this._source.type))for(const i in this._tiles){const a=this._tiles[i];if(void 0!==a.fadeEndTime&&a.fadeEndTime>=La.now())return!0}return!1}setFeatureState(i,a,u){this._state.updateState(i=i||"_geojsonTileLayer",a,u)}removeFeatureState(i,a,u){this._state.removeFeatureState(i=i||"_geojsonTileLayer",a,u)}getFeatureState(i,a){return this._state.getState(i=i||"_geojsonTileLayer",a)}setDependencies(i,a,u){const f=this._tiles[i];f&&f.setDependencies(a,u)}reloadTilesForDependencies(i,a){for(const u in this._tiles)this._tiles[u].hasDependency(i,a)&&this._reloadTile(+u,"reloading");this._cache.filter(u=>!u.hasDependency(i,a))}_preloadTiles(i,a){if(!this._sourceLoaded){const b=()=>{this._sourceLoaded&&(this._source.off("data",b),this._preloadTiles(i,a))};return void this._source.on("data",b)}const u=new Map,f=Array.isArray(i)?i:[i],g=this.map.painter.terrain,v=this.usedForTerrain&&g?g.getScaledDemTileSize():this._source.tileSize;for(const b of f){const M=b.coveringTiles({tileSize:v,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const T of M)u.set(T.key,T);this.usedForTerrain&&b.updateElevation(!1)}Vn(Array.from(u.values()),(b,M)=>{const T=new s0(b,this._source.tileSize*b.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(T,S=>{"raster-dem"===this._source.type&&T.dem&&this._backfillDEM(T),M(S,T)})},a)}}function MC(s,i){const a=Math.abs(2*s.wrap)-+(s.wrap<0),u=Math.abs(2*i.wrap)-+(i.wrap<0);return s.overscaledZ-i.overscaledZ||u-a||i.canonical.y-s.canonical.y||i.canonical.x-s.canonical.x}function wg(s){return"raster"===s||"image"===s||"video"===s||"custom"===s}function xc(s,i){const a=1<=0&&O[3]>=0&&M.insert(b,O[0],O[1],O[2],O[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new _p(new Ep(this.rawTileData)).layers,this.sourceLayerCoder=new q1(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const i in this.vtLayers)this.vtFeatures[i]=[]}return this.vtLayers}query(i,a,u,f){this.loadVTLayers();const g=i.params||{},v=nh(g.filter),b=i.tileResult,M=i.transform,T=b.bufferedTilespaceBounds,S=this.grid.query(T.min.x,T.min.y,T.max.x,T.max.y,(z,j,Z,te)=>Eh(b.bufferedTilespaceGeometry,z,j,Z,te));S.sort(EC);let O=null;M.elevation&&S.length>0&&(O=bg.create(M.elevation,this.tileID));const k={};let N;for(let z=0;z(te||(te=mi(ee,this.tileID.canonical,i.tileTransform)),ne.queryIntersectsFeature(b,ee,ae,te,this.z,i.transform,i.pixelPosMatrix,O,he)))}return k}loadMatchingFeature(i,a,u,f,g,v,b,M,T){const{featureIndex:S,bucketIndex:O,sourceLayerIndex:k,layoutVertexArrayOffset:N}=a,z=this.bucketLayerIDs[O];if(f&&!function(ee,ne){for(let ae=0;ae=0)return!0;return!1}(f,z))return;const j=this.sourceLayerCoder.decode(k),Z=this.vtLayers[j].feature(S);if(u.needGeometry){const ee=Ch(Z,!0);if(!u.filter(new A(this.tileID.overscaledZ),ee,this.tileID.canonical))return}else if(!u.filter(new A(this.tileID.overscaledZ),Z))return;const te=this.getId(Z,j);for(let ee=0;ee{const b=i instanceof Q?i.get(v):null;return b&&b.evaluate?b.evaluate(a,u,f):b})}function EC(s,i){return i-s}Ve(c0,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class Cg{constructor(i,a){this.width=i,this.height=a,this.nextRow=0,this.image=new el({width:i,height:a}),this.positions={},this.uploaded=!1}getDash(i,a){const u=this.getKey(i,a);return this.positions[u]}trim(){const i=this.width,a=this.height=Xi(this.nextRow);this.image.resize({width:i,height:a})}getKey(i,a){return i.join(",")+a}getDashRanges(i,a,u){const f=[];let g=i.length%2==1?-i[i.length-1]*u:0,v=i[0]*u,b=!0;f.push({left:g,right:v,isDash:b,zeroLength:0===i[0]});let M=i[0];for(let T=1;T1&&(M=i[++b]);const S=Math.abs(T-M.left),O=Math.abs(T-M.right),k=Math.min(S,O);let N;const z=g/u*(f+1);if(M.isDash){const j=f-Math.abs(z);N=Math.sqrt(k*k+j*j)}else N=f-Math.sqrt(k*k+z*z);this.image.data[v+T]=Math.max(0,Math.min(255,N+128))}}}addRegularDash(i,a){for(let M=i.length-1;M>=0;--M){const T=i[M],S=i[M+1];T.zeroLength?i.splice(M,1):S&&S.isDash===T.isDash&&(S.left=T.left,i.splice(M,1))}const u=i[0],f=i[i.length-1];u.isDash===f.isDash&&(u.left=f.left-this.width,f.right=u.right+this.width);const g=this.width*this.nextRow;let v=0,b=i[v];for(let M=0;M1&&(b=i[++v]);const T=Math.abs(M-b.left),S=Math.abs(M-b.right),O=Math.min(T,S);this.image.data[g+M]=Math.max(0,Math.min(255,(b.isDash?O:-O)+a+128))}}addDash(i,a){const u=this.getKey(i,a);if(this.positions[u])return this.positions[u];const f="round"===a,g=f?7:0,v=2*g+1;if(this.nextRow+v>this.height)return bn("LineAtlas out of space"),null;0===i.length&&i.push(1);let b=0;for(let S=0;S=rt.maxzoom||"none"!==rt.visibility&&(J1(He,this.zoom,u),(M[rt.id]=rt.createBucket({index:b.bucketLayerIDs.length,layers:He,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ke,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:u})).populate(_t,S,this.tileID.canonical,this.tileTransform),b.bucketLayerIDs.push(He.map(it=>it.id)))}}let k,N,z,j;T.trim();const Z={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},te=()=>{if(k)return g(k);if(N&&z&&j){const he=new K1(N),ue=new T1(z,j);for(const je in M){const Le=M[je];Le instanceof Ma?(J1(Le.layers,this.zoom,u),Lp(Le,N,he.positions,z,ue.iconPositions,this.showCollisionBoxes,u,this.tileID.canonical,this.tileZoom,this.projection)):Le.hasPattern&&(Le instanceof ky||Le instanceof pc||Le instanceof wp)&&(J1(Le.layers,this.zoom,u),Le.addFeatures(S,this.tileID.canonical,ue.patternPositions,u,this.tileTransform))}this.status="done",g(null,{buckets:mr(M).filter(je=>!je.isEmpty()),featureIndex:b,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:he.image,lineAtlas:T,imageAtlas:ue,glyphMap:this.returnDependencies?N:null,iconMap:this.returnDependencies?z:null,glyphPositions:this.returnDependencies?he.positions:null})}},ee=Cn(S.glyphDependencies,he=>Object.keys(he).map(Number));Object.keys(ee).length?f.send("getGlyphs",{uid:this.uid,stacks:ee},(he,ue)=>{k||(k=he,N=ue,te())},void 0,!1,Z):N={};const ne=Object.keys(S.iconDependencies);ne.length?f.send("getImages",{icons:ne,source:this.source,tileID:this.tileID,type:"icons"},(he,ue)=>{k||(k=he,z=ue,te())},void 0,!1,Z):z={};const ae=Object.keys(S.patternDependencies);ae.length?f.send("getImages",{icons:ae,source:this.source,tileID:this.tileID,type:"patterns"},(he,ue)=>{k||(k=he,j=ue,te())},void 0,!1,Z):j={},te()}}function J1(s,i,a){const u=new A(i);for(const f of s)f.recalculate(u,a)}class Q1{constructor(i){this.entries={},this.scheduler=i}request(i,a,u,f){const g=this.entries[i]=this.entries[i]||{callbacks:[]};if(g.result){const[v,b]=g.result;return this.scheduler?this.scheduler.add(()=>{f(v,b)},a):f(v,b),()=>{}}return g.callbacks.push(f),g.cancel||(g.cancel=u((v,b)=>{g.result=[v,b];for(const M of g.callbacks)this.scheduler?this.scheduler.add(()=>{M(v,b)},a):M(v,b);setTimeout(()=>delete this.entries[i],3e3)})),()=>{g.result||(g.callbacks=g.callbacks.filter(v=>v!==f),g.callbacks.length||(g.cancel(),delete this.entries[i]))}}}function jp(s,i,a){const u=JSON.stringify(s.request);return s.data&&(this.deduped.entries[u]={result:[null,s.data]}),this.deduped.request(u,{type:"parseTile",isSymbolTile:s.isSymbolTile,zoom:s.tileZoom},f=>{const g=zc(s.request,(v,b,M,T)=>{v?f(v):b&&f(null,{vectorTile:a?void 0:new _p(new Ep(b)),rawData:b,cacheControl:M,expires:T})});return()=>{g.cancel(),f()}},i)}const Mg=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class h0{static from(i){if(!(i instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[a,u]=new Uint8Array(i,0,2);if(219!==a)throw new Error("Data does not appear to be in a KDBush format.");const f=u>>4;if(1!==f)throw new Error(`Got v${f} data when expected v1.`);const g=Mg[15&u];if(!g)throw new Error("Unrecognized array type.");const[v]=new Uint16Array(i,2,1),[b]=new Uint32Array(i,4,1);return new h0(b,v,g,i)}constructor(i,a=64,u=Float64Array,f){if(isNaN(i)||i<0)throw new Error(`Unpexpected numItems value: ${i}.`);this.numItems=+i,this.nodeSize=Math.min(Math.max(+a,2),65535),this.ArrayType=u,this.IndexArrayType=i<65536?Uint16Array:Uint32Array;const g=Mg.indexOf(this.ArrayType),v=2*i*this.ArrayType.BYTES_PER_ELEMENT,b=i*this.IndexArrayType.BYTES_PER_ELEMENT,M=(8-b%8)%8;if(g<0)throw new Error(`Unexpected typed array class: ${u}.`);f&&f instanceof ArrayBuffer?(this.data=f,this.ids=new this.IndexArrayType(this.data,8,i),this.coords=new this.ArrayType(this.data,8+b+M,2*i),this._pos=2*i,this._finished=!0):(this.data=new ArrayBuffer(8+v+b+M),this.ids=new this.IndexArrayType(this.data,8,i),this.coords=new this.ArrayType(this.data,8+b+M,2*i),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+g]),new Uint16Array(this.data,2,1)[0]=a,new Uint32Array(this.data,4,1)[0]=i)}add(i,a){const u=this._pos>>1;return this.ids[u]=u,this.coords[this._pos++]=i,this.coords[this._pos++]=a,u}finish(){const i=this._pos>>1;if(i!==this.numItems)throw new Error(`Added ${i} items when expected ${this.numItems}.`);return Eg(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(i,a,u,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:g,coords:v,nodeSize:b}=this,M=[0,g.length-1,0],T=[];for(;M.length;){const S=M.pop()||0,O=M.pop()||0,k=M.pop()||0;if(O-k<=b){for(let Z=k;Z<=O;Z++){const te=v[2*Z],ee=v[2*Z+1];te>=i&&te<=u&&ee>=a&&ee<=f&&T.push(g[Z])}continue}const N=k+O>>1,z=v[2*N],j=v[2*N+1];z>=i&&z<=u&&j>=a&&j<=f&&T.push(g[N]),(0===S?i<=z:a<=j)&&(M.push(k),M.push(N-1),M.push(1-S)),(0===S?u>=z:f>=j)&&(M.push(N+1),M.push(O),M.push(1-S))}return T}within(i,a,u){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:f,coords:g,nodeSize:v}=this,b=[0,f.length-1,0],M=[],T=u*u;for(;b.length;){const S=b.pop()||0,O=b.pop()||0,k=b.pop()||0;if(O-k<=v){for(let Z=k;Z<=O;Z++)f0(g[2*Z],g[2*Z+1],i,a)<=T&&M.push(f[Z]);continue}const N=k+O>>1,z=g[2*N],j=g[2*N+1];f0(z,j,i,a)<=T&&M.push(f[N]),(0===S?i-u<=z:a-u<=j)&&(b.push(k),b.push(N-1),b.push(1-S)),(0===S?i+u>=z:a+u>=j)&&(b.push(N+1),b.push(O),b.push(1-S))}return M}}function Eg(s,i,a,u,f,g){if(f-u<=a)return;const v=u+f>>1;Tg(s,i,v,u,f,g),Eg(s,i,a,u,v-1,1-g),Eg(s,i,a,v+1,f,1-g)}function Tg(s,i,a,u,f,g){for(;f>u;){if(f-u>600){const T=f-u+1,S=a-u+1,O=Math.log(T),k=.5*Math.exp(2*O/3),N=.5*Math.sqrt(O*k*(T-k)/T)*(S-T/2<0?-1:1);Tg(s,i,a,Math.max(u,Math.floor(a-S*k/T+N)),Math.min(f,Math.floor(a+(T-S)*k/T+N)),g)}const v=i[2*a+g];let b=u,M=f;for(bu(s,i,u,a),i[2*f+g]>v&&bu(s,i,u,f);bv;)M--}i[2*u+g]===v?bu(s,i,u,M):(M++,bu(s,i,M,f)),M<=a&&(u=M+1),a<=M&&(f=M-1)}}function bu(s,i,a,u){d0(s,a,u),d0(i,2*a,2*u),d0(i,2*a+1,2*u+1)}function d0(s,i,a){const u=s[i];s[i]=s[a],s[a]=u}function f0(s,i,a,u){const f=s-a,g=i-u;return f*f+g*g}h.ARRAY_TYPE=li,h.AUTH_ERR_MSG=de,h.Aabb=vs,h.Actor=class{constructor(s,i,a){this.target=s,this.parent=i,this.mapId=a,this.callbacks={},this.cancelCallbacks={},hr(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=As()?s:W,this.scheduler=new _C}send(s,i,a,u,f=!1,g){const v=Math.round(1e18*Math.random()).toString(36).substring(0,10);a&&(a.metadata=g,this.callbacks[v]=a);const b=Yl(this.globalScope)?void 0:[];return this.target.postMessage({id:v,type:s,hasCallback:!!a,targetMapId:u,mustQueue:f,sourceMapId:this.mapId,data:Eo(i,b)},b),{cancel:()=>{a&&delete this.callbacks[v],this.target.postMessage({id:v,type:"",targetMapId:u,sourceMapId:this.mapId})}}}receive(s){const i=s.data,a=i.id;if(a&&(!i.targetMapId||this.mapId===i.targetMapId))if(""===i.type){const u=this.cancelCallbacks[a];delete this.cancelCallbacks[a],u&&u.cancel()}else if(i.mustQueue||As()){const u=this.callbacks[a];this.cancelCallbacks[a]=this.scheduler.add(()=>this.processTask(a,i),u&&u.metadata||{type:"message"})}else this.processTask(a,i)}processTask(s,i){if(""===i.type){const a=this.callbacks[s];delete this.callbacks[s],a&&(i.error?a(Ai(i.error)):a(null,Ai(i.data)))}else{const a=Yl(this.globalScope)?void 0:[],u=i.hasCallback?(g,v)=>{delete this.cancelCallbacks[s],this.target.postMessage({id:s,type:"",sourceMapId:this.mapId,error:g?Eo(g):null,data:Eo(v,a)},a)}:g=>{},f=Ai(i.data);if(this.parent[i.type])this.parent[i.type](i.sourceMapId,f,u);else if(this.parent.getWorkerSource){const g=i.type.split(".");this.parent.getWorkerSource(i.sourceMapId,g[0],f.source)[g[1]](f,u)}else u(new Error(`Could not find function ${i.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},h.CanonicalTileID=rg,h.Color=Si,h.ColorMode=na,h.CullFaceMode=ra,h.DEMData=rf,h.DataConstantProperty=U,h.DedupedRequest=Q1,h.DepthMode=xu,h.EXTENT=dn,h.Elevation=class{isDataAvailableAtPoint(s){const i=this._source();if(this.isUsingMockSource()||!i||s.y<0||s.y>1)return!1;const a=i.getSource().maxzoom,u=1<1)return i;const f=u.getSource().maxzoom,g=1<{const g=this.getAtTileOffset(s,f.x,f.y),v=u.upVector(s.canonical,f.x,f.y);return ci(v,v,g*u.upVectorScale(s.canonical,i,a).metersToTile),v}}getForTilePoints(s,i,a,u){if(this.isUsingMockSource())return!1;const f=bg.create(this,s,u);return!!f&&(i.forEach(g=>{g[2]=this.exaggeration()*f.getElevationAt(g[0],g[1],a)}),!0)}getMinMaxForTile(s){if(this.isUsingMockSource())return null;const i=this.findDEMTileFor(s);if(!i||!i.dem)return null;const a=i.dem.tree,u=i.tileID,f=1<{let k=T===g-1?T-2:0===T?T:T-1;return k+=O?24575:0,[k,S]};for(let T=0;Tthis._skuTokenExpiresAt}transformRequest(s,i){return this._transformRequestFn&&this._transformRequestFn(s,i)||{url:s}}normalizeStyleURL(s,i){if(!ve(s))return s;const a=kt(s);return a.path=`/styles/v1${a.path}`,this._makeAPIURL(a,this._customAccessToken||i)}normalizeGlyphsURL(s,i){if(!ve(s))return s;const a=kt(s);return a.path=`/fonts/v1${a.path}`,this._makeAPIURL(a,this._customAccessToken||i)}normalizeSourceURL(s,i,a,u){if(!ve(s))return s;const f=kt(s);return f.path=`/v4/${f.authority}.json`,f.params.push("secure"),a&&f.params.push(`language=${a}`),u&&f.params.push(`worldview=${u}`),this._makeAPIURL(f,this._customAccessToken||i)}normalizeSpriteURL(s,i,a,u){const f=kt(s);return ve(s)?(f.path=`/styles/v1${f.path}/sprite${i}${a}`,this._makeAPIURL(f,this._customAccessToken||u)):(f.path+=`${i}${a}`,Mt(f))}normalizeTileURL(s,i,a){if(this._isSkuTokenExpired()&&this._createSkuToken(),s&&!ve(s))return s;const u=kt(s);u.path=u.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${i||a&&"raster"!==u.authority&&512===a?"@2x":""}${Ae.supported?".webp":"$1"}`),"raster"===u.authority?u.path=`/${xe.RASTER_URL_PREFIX}${u.path}`:(u.path=u.path.replace(/^.+\/v4\//,"/"),u.path=`/${xe.TILE_URL_VERSION}${u.path}`);const f=this._customAccessToken||function(g){for(const v of g){const b=v.match(/^access_token=(.*)$/);if(b)return b[1]}return null}(u.params)||xe.ACCESS_TOKEN;return xe.REQUIRE_ACCESS_TOKEN&&f&&this._skuToken&&u.params.push(`sku=${this._skuToken}`),this._makeAPIURL(u,f)}canonicalizeTileURL(s,i){const a=kt(s);if(!a.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!a.path.match(/\.[\w]+$/))return s;let u="mapbox://";a.path.match(/^\/raster\/v1\//)?u+=`raster/${a.path.replace(`/${xe.RASTER_URL_PREFIX}/`,"")}`:u+=`tiles/${a.path.replace(`/${xe.TILE_URL_VERSION}/`,"")}`;let f=a.params;return i&&(f=f.filter(g=>!g.match(/^access_token=/))),f.length&&(u+=`?${f.join("&")}`),u}canonicalizeTileset(s,i){const a=!!i&&ve(i),u=[];for(const f of s.tiles||[])Re(f)?u.push(this.canonicalizeTileURL(f,a)):u.push(f);return u}_makeAPIURL(s,i){const a="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",u=kt(xe.API_URL);if(s.protocol=u.protocol,s.authority=u.authority,"http"===s.protocol){const f=s.params.indexOf("secure");f>=0&&s.params.splice(f,1)}if("/"!==u.path&&(s.path=`${u.path}${s.path}`),!xe.REQUIRE_ACCESS_TOKEN)return Mt(s);if(i=i||xe.ACCESS_TOKEN,!this._silenceAuthErrors){if(!i)throw new Error(`An API access token is required to use Mapbox GL. ${a}`);if("s"===i[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${a}`)}return s.params=s.params.filter(f=>-1===f.indexOf("access_token")),s.params.push(`access_token=${i||""}`),Mt(s)}},h.ResourceType=Jl,h.SegmentVector=Ti,h.SourceCache=Vl,h.StencilMode=$h,h.StructArrayLayout1ui2=_s,h.StructArrayLayout2f1f2i16=vn,h.StructArrayLayout2i4=yt,h.StructArrayLayout2ui4=co,h.StructArrayLayout3f12=Yn,h.StructArrayLayout3ui6=on,h.StructArrayLayout4i8=tt,h.StructArrayLayout5f20=Ar,h.Texture=tf,h.Tile=s0,h.Transitionable=B,h.Uniform1f=Pd,h.Uniform1i=class extends wa{constructor(s){super(s),this.current=0}set(s,i,a){this.fetchUniformLocation(s,i)&&this.current!==a&&(this.current=a,this.gl.uniform1i(this.location,a))}},h.Uniform2f=class extends wa{constructor(s){super(s),this.current=[0,0]}set(s,i,a){this.fetchUniformLocation(s,i)&&(a[0]===this.current[0]&&a[1]===this.current[1]||(this.current=a,this.gl.uniform2f(this.location,a[0],a[1])))}},h.Uniform3f=class extends wa{constructor(s){super(s),this.current=[0,0,0]}set(s,i,a){this.fetchUniformLocation(s,i)&&(a[0]===this.current[0]&&a[1]===this.current[1]&&a[2]===this.current[2]||(this.current=a,this.gl.uniform3f(this.location,a[0],a[1],a[2])))}},h.Uniform4f=Un,h.UniformColor=Z_,h.UniformMatrix2f=class extends wa{constructor(s){super(s),this.current=xb}set(s,i,a){if(this.fetchUniformLocation(s,i))for(let u=0;u<4;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix2fv(this.location,!1,a);break}}},h.UniformMatrix3f=class extends wa{constructor(s){super(s),this.current=vb}set(s,i,a){if(this.fetchUniformLocation(s,i))for(let u=0;u<9;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix3fv(this.location,!1,a);break}}},h.UniformMatrix4f=class extends wa{constructor(s){super(s),this.current=b2}set(s,i,a){if(this.fetchUniformLocation(s,i)){if(a[12]!==this.current[12]||a[0]!==this.current[0])return this.current=a,void this.gl.uniformMatrix4fv(this.location,!1,a);for(let u=1;u<16;u++)if(a[u]!==this.current[u]){this.current=a,this.gl.uniformMatrix4fv(this.location,!1,a);break}}}},h.UnwrappedTileID=Ay,h.ValidationError=Gt,h.VectorTileFeature=tl,h.VectorTileWorkerSource=class extends Hu{constructor(s,i,a,u,f){super(),this.actor=s,this.layerIndex=i,this.availableImages=a,this.loadVectorData=f||jp,this.loading={},this.loaded={},this.deduped=new Q1(s.scheduler),this.isSpriteLoaded=u,this.scheduler=s.scheduler}loadTile(s,i){const a=s.uid,u=s&&s.request,f=u&&u.collectResourceTiming,g=this.loading[a]=new TC(s);g.abort=this.loadVectorData(s,(v,b)=>{const M=!this.loading[a];if(delete this.loading[a],M||v||!b)return g.status="done",M||(this.loaded[a]=g),i(v);const T=b.rawData,S={};b.expires&&(S.expires=b.expires),b.cacheControl&&(S.cacheControl=b.cacheControl),g.vectorTile=b.vectorTile||new _p(new Ep(T));const O=()=>{g.parse(g.vectorTile,this.layerIndex,this.availableImages,this.actor,(k,N)=>{if(k||!N)return i(k);const z={};if(f){const j=xm(u);j.length>0&&(z.resourceTiming=JSON.parse(JSON.stringify(j)))}i(null,Zn({rawTileData:T.slice(0)},N,S,z))})};this.isSpriteLoaded?O():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(O,{type:"parseTile",isSymbolTile:s.isSymbolTile,zoom:s.tileZoom}):O()}),this.loaded=this.loaded||{},this.loaded[a]=g})}reloadTile(s,i){const a=this.loaded,u=s.uid,f=this;if(a&&a[u]){const g=a[u];g.showCollisionBoxes=s.showCollisionBoxes,g.enableTerrain=!!s.enableTerrain,g.projection=s.projection,g.tileTransform=zh(s.tileID.canonical,s.projection);const v=(b,M)=>{const T=g.reloadCallback;T&&(delete g.reloadCallback,g.parse(g.vectorTile,f.layerIndex,this.availableImages,f.actor,T)),i(b,M)};"parsing"===g.status?g.reloadCallback=v:"done"===g.status&&(g.vectorTile?g.parse(g.vectorTile,this.layerIndex,this.availableImages,this.actor,v):v())}}abortTile(s,i){const a=s.uid,u=this.loading[a];u&&(u.abort&&u.abort(),delete this.loading[a]),i()}removeTile(s,i){const a=this.loaded,u=s.uid;a&&a[u]&&delete a[u],i()}},h.WritingMode=Ts,h.ZoomDependentExpression=xl,h.add=Al,h.addDynamicAttributes=yg,h.adjoint=function(s,i){var a=i[0],u=i[1],f=i[2],g=i[3],v=i[4],b=i[5],M=i[6],T=i[7],S=i[8];return s[0]=v*S-b*T,s[1]=f*T-u*S,s[2]=u*b-f*v,s[3]=b*M-g*S,s[4]=a*S-f*M,s[5]=f*g-a*b,s[6]=g*T-v*M,s[7]=u*M-a*T,s[8]=a*v-u*g,s},h.asyncAll=Vn,h.bezier=Ft,h.bindAll=hr,h.boundsAttributes=js,h.bufferConvexPolygon=function(s,i){const a=[];for(let u=0;uKl&&(s.getActor().send("enforceCacheSizeLimit",Vu),dl=0)},h.calculateGlobeLabelMatrix=function(s,i){const{x:a,y:u}=s.point,f=my(a,u,s.worldSize/s._pixelsPerMercatorPixel,0,0);return hh(f,f,py(Qs(i)))},h.calculateGlobeMatrix=function(s){const{x:i,y:a}=s.point,{lng:u,lat:f}=s._center;return my(i,a,s.worldSize,u,f)},h.calculateGlobeMercatorMatrix=function(s){const i=s.pixelsPerMeter,a=i/Ca(1,s.center.lat),u=uo(new Float64Array(16));return Od(u,u,[s.point.x,s.point.y,0]),dh(u,u,[a,a,i]),Float32Array.from(u)},h.circumferenceAtLatitude=hu,h.clamp=pt,h.clearTileCache=function(s){if(!Uu())return;const i=W.caches.delete(Oa);s&&i.catch(s).then(()=>s())},h.clipLine=O1,h.clone=function(s){var i=new li(16);return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i[4]=s[4],i[5]=s[5],i[6]=s[6],i[7]=s[7],i[8]=s[8],i[9]=s[9],i[10]=s[10],i[11]=s[11],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15],i},h.clone$1=oo,h.collisionCircleLayout=P2,h.config=xe,h.conjugate=function(s,i){return s[0]=-i[0],s[1]=-i[1],s[2]=-i[2],s[3]=i[3],s},h.create=function(){var s=new li(16);return li!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0),s[0]=1,s[5]=1,s[10]=1,s[15]=1,s},h.create$1=Pl,h.createExpression=oc,h.createLayout=be,h.createStyleLayer=function(s){return"custom"===s.type?new n0(s):new k2[s.type](s)},h.cross=oy,h.degToRad=Pt,h.distance=function(s,i){return Math.hypot(i[0]-s[0],i[1]-s[1],i[2]-s[2])},h.div=function(s,i,a){return s[0]=i[0]/a[0],s[1]=i[1]/a[1],s[2]=i[2]/a[2],s},h.dot=pi,h.earthRadius=bh,h.ease=un,h.easeCubicInOut=Ht,h.ecefToLatLng=function([s,i,a]){const u=Math.hypot(s,i,a),f=Math.atan2(s,a),g=.5*Math.PI-Math.acos(-i/u);return new wr(qn(f),qn(g))},h.emitValidationErrors=Xf,h.endsWith=Ir,h.enforceCacheSizeLimit=function(s){ka(),Os&&Os.then(i=>{i.keys().then(a=>{for(let u=0;ug&&(u+=(s[f]-g)*(s[f]-g)),i[f]0){const z=180/u;J_(N,N,[z/T+1,0,0,0,z/S+1,0,-.5*z/O,.5*z/k,1])}return N[2]=M,N[5]=s.x,N[8]=s.y,N},h.getImage=se,h.getJSON=function(s,i){return Ra(Zn(s,{type:"json"}),i)},h.getLatitudinalLod=function(s){const i=Ao-5;s=pt(s,-i,i)/i*90;const a=Math.pow(Math.abs(Math.sin(Pt(s))),3);return Math.round(a*(_h.length-1))},h.getMapSessionAPI=ao,h.getPerformanceMeasurement=xm,h.getProjection=j1,h.getRTLTextPluginStatus=C,h.getReferrer=Ql,h.getTilePoint=function(s,{x:i,y:a},u=0){return new Ee(((i-u)*s.scale-s.x)*dn,(a*s.scale-s.y)*dn)},h.getTileVec3=function(s,i,a=0){return ph(((i.x-a)*s.scale-s.x)*dn,(i.y*s.scale-s.y)*dn,Mb(i.z,i.y))},h.getVideo=function(s,i){const a=W.document.createElement("video");a.muted=!0,a.onloadstart=function(){i(null,a)};for(let u=0;u{}}},h.globeCenterToScreenPoint=function(s){const i=[0,0,0],a=uo(new Float64Array(16));return hh(a,s.pixelMatrix,s.globeMatrix),Er(i,i,a),new Ee(i[0],i[1])},h.globeDenormalizeECEF=py,h.globeECEFOrigin=function(s,i){const a=[0,0,0];return Er(a,a,Qa(Qs(i.canonical))),Er(a,a,s),a},h.globeMetersToEcef=tp,h.globeNormalizeECEF=Qa,h.globePixelsToTileUnits=function(s,i){return dn/(512*Math.pow(2,s))*Hm(Qs(i))},h.globePoleMatrixForTile=function(s,i,a){const u=uo(new Float64Array(16)),f=(i/(1<0;return 0===u&&!f&&!v&&g},h.identity=uo,h.identity$1=Vm,h.invert=Xa,h.isFullscreen=function(){return!!W.document.fullscreenElement||!!W.document.webkitFullscreenElement},h.isLngLatBehindGlobe=uu,h.isMapAuthenticated=function(s){return Yi.has(s)},h.isMapboxURL=ve,h.isSafariWithAntialiasingBug=function(s){const i=s.navigator?s.navigator.userAgent:null;return!!Yl(s)&&i&&(i.match("Version/15.4")||i.match("Version/15.5")||i.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},h.latFromMercatorY=Ui,h.latLngToECEF=vh,h.len=cu,h.length=fh,h.length$1=function(s){return Math.hypot(s[0],s[1],s[2],s[3])},h.lngFromMercatorX=Cs,h.loadVectorTile=jp,h.makeRequest=Ra,h.mapValue=function(s,i,a,u,f){return pt((s-i)/(a-i)*(f-u)+u,u,f)},h.mercatorScale=Eb,h.mercatorXfromLng=ws,h.mercatorYfromLat=bs,h.mercatorZfromAltitude=Ca,h.mul=ty,h.mul$1=Bm,h.multiply=hh,h.multiply$1=J_,h.multiply$2=iy,h.nextPowerOfTwo=Xi,h.normalize=sr,h.normalize$1=wb,h.normalize$2=Qf,h.number=qt,h.ortho=function(s,i,a,u,f,g,v){var b=1/(i-a),M=1/(u-f),T=1/(g-v);return s[0]=-2*b,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*M,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*T,s[11]=0,s[12]=(i+a)*b,s[13]=(f+u)*M,s[14]=(v+g)*T,s[15]=1,s},h.pbf=zy,h.perspective=function(s,i,a,u,f){var g,v=1/Math.tan(i/2);return s[0]=v/a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=v,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=-1,s[12]=0,s[13]=0,s[15]=0,null!=f&&f!==1/0?(s[10]=(f+u)*(g=1/(u-f)),s[14]=2*f*u*g):(s[10]=-1,s[14]=-2*u),s},h.pick=function(s,i){const a={};for(let u=0;u0&&a[0]<=s.width&&a[1]>0&&a[1]<=s.height&&!uu(s,new wr(s.center.lat,90)),u[0]>0&&u[0]<=s.width&&u[1]>0&&u[1]<=s.height&&!uu(s,new wr(s.center.lat,-90))]},h.polygonContainsPoint=fc,h.polygonIntersectsBox=Eh,h.polygonIntersectsPolygon=Mh,h.polygonizeBounds=function(s,i,a=0,u=!0){const f=new Ee(a,a),g=s.sub(f),v=i.add(f),b=[g,new Ee(v.x,g.y),v,new Ee(g.x,v.y)];return u&&b.push(g.clone()),b},h.posAttributes=gh,h.postMapLoadEvent=yn,h.postPerformanceEvent=Hi,h.postTurnstileEvent=hn,h.potpack=jy,h.prevPowerOfTwo=function(s){return s<=1?1:Math.pow(2,Math.floor(Math.log(s)/Math.LN2))},h.radToDeg=qn,h.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],h.registerForPluginStateChange=function(s){return s({pluginStatus:m,pluginURL:l}),w.on("pluginStateChange",s),s},h.removeAuthState=function(s){Yi.delete(s)},h.renderColorRamp=_y,h.resample=Tb,h.rotateX=Q_,h.rotateX$1=sy,h.rotateY=kd,h.rotateY$1=ay,h.rotateZ=function(s,i,a){var u=Math.sin(a),f=Math.cos(a),g=i[0],v=i[1],b=i[2],M=i[3],T=i[4],S=i[5],O=i[6],k=i[7];return i!==s&&(s[8]=i[8],s[9]=i[9],s[10]=i[10],s[11]=i[11],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15]),s[0]=g*f+T*u,s[1]=v*f+S*u,s[2]=b*f+O*u,s[3]=M*f+k*u,s[4]=T*f-g*u,s[5]=S*f-v*u,s[6]=O*f-b*u,s[7]=k*f-M*u,s},h.rotateZ$1=function(s,i,a){a*=.5;var u=i[0],f=i[1],g=i[2],v=i[3],b=Math.sin(a),M=Math.cos(a);return s[0]=u*M+f*b,s[1]=f*M-u*b,s[2]=g*M+v*b,s[3]=v*M-g*b,s},h.scale=dh,h.scale$1=$v,h.scale$2=ci,h.scaleAndAdd=Ya,h.set=function(s,i,a,u){return s[0]=i,s[1]=a,s[2]=u,s},h.setCacheLimits=function(s,i){Vu=s,Kl=i},h.setColumn=function(s,i,a){s[4*i+0]=a[0],s[4*i+1]=a[1],s[4*i+2]=a[2],s[4*i+3]=a[3]},h.setRTLTextPlugin=function(s,i,a=!1){if(m===fi||m===cc||m===Il)throw new Error("setRTLTextPlugin cannot be called multiple times.");l=La.resolveURL(s),m=fi,Uo=i,_(),a||D()},h.smoothstep=Dn,h.spec=Ze,h.squaredLength=function(s){var i=s[0],a=s[1],u=s[2];return i*i+a*a+u*u},h.storeAuthState=function(s,i){i?Yi.add(s):Yi.delete(s)},h.sub=ba,h.subtract=zm,h.symbolSize=Ny,h.tileAABB=function(s,i,a,u,f,g,v,b,M){if("globe"===M.name)return function fy(s,i,a){const u=i/s.worldSize,f=s.globeMatrix;if(a.z<=1){const Le=Qs(a).getCorners();return np(Le,f,u),vs.fromPoints(Le)}const g=jm(a),v=$m(g);np(v,f,u);const b=Number.MAX_VALUE,M=[-b,-b,-b],T=[b,b,b];if(g.contains(s.center)){for(const _t of v)mh(T,T,_t),Jf(M,M,_t);M[2]=0;const Le=s.point,Ke=[Le.x*u,Le.y*u,0];return mh(T,T,Ke),Jf(M,M,Ke),new vs(T,M)}const S=[f[12]*u,f[13]*u,f[14]*u],O=g.getCenter(),k=pt(s.center.lat,-Ao,Ao),N=pt(O.lat,-Ao,Ao),z=ws(s.center.lng),j=bs(k);let Z=z-ws(O.lng);const te=j-bs(N);Z>.5?Z-=1:Z<-.5&&(Z+=1);let ee=0;Math.abs(Z)>Math.abs(te)?ee=Z>=0?1:3:(ee=te>=0?0:2,Ya(S,S,[f[4]*u,f[5]*u,f[6]*u],-Math.sin(Pt(te>=0?g.getSouth():g.getNorth()))*Bs));const ne=v[ee],ae=v[(ee+1)%4],he=new kl(ne,ae,S),ue=[hy(he,0)||ne[0],hy(he,1)||ne[1],hy(he,2)||ne[2]],je=xh(s.zoom);if(je>0){const Le=function({x:_t,y:He,z:rt},it,dt,Tt,Xe){const Lt=1/(1<.5?cn=-1:kn<-.5&&(cn=1),Yt=((Yt+cn)*it-(Tt*=it))*dt+Tt,Bt=((Bt+cn)*it-Tt)*dt+Tt,On=(On*it-(Xe*=it))*dt+Xe,Ct=(Ct*it-Xe)*dt+Xe,[[Yt,Ct,0],[Bt,Ct,0],[Bt,On,0],[Yt,On,0]]}(a,i,s._pixelsPerMercatorPixel,z,j);for(let _t=0;_tei(ih(s)),h.validateFog=s=>ei(Zf(s)),h.validateLayer=s=>ei(Am(s)),h.validateLight=s=>ei(km(s)),h.validateSource=s=>ei(Ei(s)),h.validateStyle=qi,h.validateTerrain=s=>ei(gs(s)),h.values=mr,h.vectorTile=gp,h.version=ye,h.warnOnce=bn,h.window=W,h.wrap=sn}),ke(0,function(h){function W(le){if("number"==typeof le||"boolean"==typeof le||"string"==typeof le||null==le)return JSON.stringify(le);if(Array.isArray(le)){let G="[";for(const se of le)G+=`${W(se)},`;return`${G}]`}let H="{";for(const G of Object.keys(le).sort())H+=`${G}:${W(le[G])},`;return`${H}}`}function ye(le){let H="";for(const G of h.refProperties)H+=`/${W(le[G])}`;return H}class Me{constructor(H){this.keyCache={},H&&this.replace(H)}replace(H){this._layerConfigs={},this._layers={},this.update(H,[])}update(H,G){for(const de of H)this._layerConfigs[de.id]=de,(this._layers[de.id]=h.createStyleLayer(de)).compileFilter(),this.keyCache[de.id]&&delete this.keyCache[de.id];for(const de of G)delete this.keyCache[de],delete this._layerConfigs[de],delete this._layers[de];this.familiesBySource={};const se=function(de,ve){const Re={};for(let fe=0;fethis._layers[kt.id]),Re=ve[0];if("none"===Re.visibility)continue;const Oe=Re.source||"";let fe=this.familiesBySource[Oe];fe||(fe=this.familiesBySource[Oe]={});const $e=Re.sourceLayer||"_geojsonTileLayer";let Dt=fe[$e];Dt||(Dt=fe[$e]=[]),Dt.push(ve)}}}class xe{loadTile(H,G){const{uid:se,encoding:de,rawImageData:ve,padding:Re,buildQuadTree:Oe}=H,fe=h.window.ImageBitmap&&ve instanceof h.window.ImageBitmap?this.getImageData(ve,Re):ve;G(null,new h.DEMData(se,fe,de,Re<1,Oe))}getImageData(H,G){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(H.width,H.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=H.width,this.offscreenCanvas.height=H.height,this.offscreenCanvasContext.drawImage(H,0,0,H.width,H.height);const se=this.offscreenCanvasContext.getImageData(-G,-G,H.width+2*G,H.height+2*G);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),se}}function Ae(le,H){if(0!==le.length){ct(le[0],H);for(var G=1;G=Math.abs(Oe)?G-fe+Oe:Oe-fe+G,G=fe}G+se>=0!=!!H&&le.reverse()}var Vt=h.getDefaultExportFromCjs(function le(H,G){var se,de=H&&H.type;if("FeatureCollection"===de)for(se=0;se>31}function Jt(le,H){for(var G=le.loadGeometry(),se=le.type,de=0,ve=0,Re=G.length,Oe=0;Oele},pt=Math.fround||(Dn=new Float32Array(1),le=>(Dn[0]=+le,Dn[0]));var Dn;const sn=3,Vn=5,mr=6;class Zn{constructor(H){this.options=Object.assign(Object.create(un),H),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(H){const{log:G,minZoom:se,maxZoom:de}=this.options;G&&console.time("total time");const ve=`prepare ${H.length} points`;G&&console.time(ve),this.points=H;const Re=[];for(let fe=0;fe=se;fe--){const $e=+Date.now();Oe=this.trees[fe]=this._createTree(this._cluster(Oe,fe)),G&&console.log("z%d: %d clusters in %dms",fe,Oe.numItems,+Date.now()-$e)}return G&&console.timeEnd("total time"),this}getClusters(H,G){let se=((H[0]+180)%360+360)%360-180;const de=Math.max(-90,Math.min(90,H[1]));let ve=180===H[2]?180:((H[2]+180)%360+360)%360-180;const Re=Math.max(-90,Math.min(90,H[3]));if(H[2]-H[0]>=360)se=-180,ve=180;else if(se>ve){const kt=this.getClusters([se,de,180,Re],G),Mt=this.getClusters([-180,de,ve,Re],G);return kt.concat(Mt)}const Oe=this.trees[this._limitZoom(G)],fe=Oe.range(io(se),Xi(Re),io(ve),Xi(de)),$e=Oe.data,Dt=[];for(const kt of fe){const Mt=this.stride*kt;Dt.push($e[Mt+Vn]>1?Fr($e,Mt,this.clusterProps):this.points[$e[Mt+sn]])}return Dt}getChildren(H){const G=this._getOriginId(H),se=this._getOriginZoom(H),de="No cluster with the specified id.",ve=this.trees[se];if(!ve)throw new Error(de);const Re=ve.data;if(G*this.stride>=Re.length)throw new Error(de);const Oe=this.options.radius/(this.options.extent*Math.pow(2,se-1)),fe=ve.within(Re[G*this.stride],Re[G*this.stride+1],Oe),$e=[];for(const Dt of fe){const kt=Dt*this.stride;Re[kt+4]===H&&$e.push(Re[kt+Vn]>1?Fr(Re,kt,this.clusterProps):this.points[Re[kt+sn]])}if(0===$e.length)throw new Error(de);return $e}getLeaves(H,G,se){const de=[];return this._appendLeaves(de,H,G=G||10,se=se||0,0),de}getTile(H,G,se){const de=this.trees[this._limitZoom(H)],ve=Math.pow(2,H),{extent:Re,radius:Oe}=this.options,fe=Oe/Re,$e=(se-fe)/ve,Dt=(se+1+fe)/ve,kt={features:[]};return this._addTileFeatures(de.range((G-fe)/ve,$e,(G+1+fe)/ve,Dt),de.data,G,se,ve,kt),0===G&&this._addTileFeatures(de.range(1-fe/ve,$e,1,Dt),de.data,ve,se,ve,kt),G===ve-1&&this._addTileFeatures(de.range(0,$e,fe/ve,Dt),de.data,-1,se,ve,kt),kt.features.length?kt:null}getClusterExpansionZoom(H){let G=this._getOriginZoom(H)-1;for(;G<=this.options.maxZoom;){const se=this.getChildren(H);if(G++,1!==se.length)break;H=se[0].properties.cluster_id}return G}_appendLeaves(H,G,se,de,ve){const Re=this.getChildren(G);for(const Oe of Re){const fe=Oe.properties;if(fe&&fe.cluster?ve+fe.point_count<=de?ve+=fe.point_count:ve=this._appendLeaves(H,fe.cluster_id,se,de,ve):ve1;let Dt,kt,Mt;if($e)Dt=zi(G,fe,this.clusterProps),kt=G[fe],Mt=G[fe+1];else{const Rn=this.points[G[fe+sn]];Dt=Rn.properties;const[an,hn]=Rn.geometry.coordinates;kt=io(an),Mt=Xi(hn)}const Qt={type:1,geometry:[[Math.round(this.options.extent*(kt*ve-se)),Math.round(this.options.extent*(Mt*ve-de))]],tags:Dt};let Wn;Wn=$e||this.options.generateId?G[fe+sn]:this.points[G[fe+sn]].id,void 0!==Wn&&(Qt.id=Wn),Re.features.push(Qt)}}_limitZoom(H){return Math.max(this.options.minZoom,Math.min(Math.floor(+H),this.options.maxZoom+1))}_cluster(H,G){const{radius:se,extent:de,reduce:ve,minPoints:Re}=this.options,Oe=se/(de*Math.pow(2,G)),fe=H.data,$e=[],Dt=this.stride;for(let kt=0;ktG&&(an+=fe[hi+Vn])}if(an>Rn&&an>=Re){let hn,hi=Mt*Rn,yn=Qt*Rn,so=-1;const Hi=((kt/Dt|0)<<5)+(G+1)+this.points.length;for(const Rs of Wn){const ao=Rs*Dt;if(fe[ao+2]<=G)continue;fe[ao+2]=G;const Yi=fe[ao+Vn];hi+=fe[ao]*Yi,yn+=fe[ao+1]*Yi,fe[ao+4]=Hi,ve&&(hn||(hn=this._map(fe,kt,!0),so=this.clusterProps.length,this.clusterProps.push(hn)),ve(hn,this._map(fe,ao)))}fe[kt+4]=Hi,$e.push(hi/an,yn/an,1/0,Hi,-1,an),ve&&$e.push(so)}else{for(let hn=0;hn1)for(const hn of Wn){const hi=hn*Dt;if(!(fe[hi+2]<=G)){fe[hi+2]=G;for(let yn=0;yn>5}_getOriginZoom(H){return(H-this.points.length)%32}_map(H,G,se){if(H[G+Vn]>1){const Re=this.clusterProps[H[G+mr]];return se?Object.assign({},Re):Re}const de=this.points[H[G+sn]].properties,ve=this.options.map(de);return se&&ve===de?Object.assign({},ve):ve}}function Fr(le,H,G){return{type:"Feature",id:le[H+sn],properties:zi(le,H,G),geometry:{type:"Point",coordinates:[(se=le[H],360*(se-.5)),hs(le[H+1])]}};var se}function zi(le,H,G){const se=le[H+Vn],de=se>=1e4?`${Math.round(se/1e3)}k`:se>=1e3?Math.round(se/100)/10+"k":se,ve=le[H+mr],Re=-1===ve?{}:Object.assign({},G[ve]);return Object.assign(Re,{cluster:!0,cluster_id:le[H+sn],point_count:se,point_count_abbreviated:de})}function io(le){return le/360+.5}function Xi(le){const H=Math.sin(le*Math.PI/180),G=.5-.25*Math.log((1+H)/(1-H))/Math.PI;return G<0?0:G>1?1:G}function hs(le){const H=(180-360*le)*Math.PI/180;return 360*Math.atan(Math.exp(H))/Math.PI-90}function hr(le,H,G,se){for(var de,ve=se,Re=G-H>>1,Oe=G-H,fe=le[H],$e=le[H+1],Dt=le[G],kt=le[G+1],Mt=H+3;Mtve)de=Mt,ve=Qt;else if(Qt===ve){var Wn=Math.abs(Mt-Re);Wnse&&(de-H>3&&hr(le,H,de,se),le[de+2]=ve,G-de>3&&hr(le,de,G,se))}function Ir(le,H,G,se,de,ve){var Re=de-G,Oe=ve-se;if(0!==Re||0!==Oe){var fe=((le-G)*Re+(H-se)*Oe)/(Re*Re+Oe*Oe);fe>1?(G=de,se=ve):fe>0&&(G+=Re*fe,se+=Oe*fe)}return(Re=le-G)*Re+(Oe=H-se)*Oe}function Cn(le,H,G,se){var de={id:void 0===le?null:le,type:H,geometry:G,tags:se,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(ve){var Re=ve.geometry,Oe=ve.type;if("Point"===Oe||"MultiPoint"===Oe||"LineString"===Oe)po(ve,Re);else if("Polygon"===Oe||"MultiLineString"===Oe)for(var fe=0;fe0&&(Re+=se?(de*$e-fe*ve)/2:Math.sqrt(Math.pow(fe-de,2)+Math.pow($e-ve,2))),de=fe,ve=$e}var Dt=H.length-3;H[2]=1,hr(H,0,Dt,G),H[Dt+2]=1,H.size=Math.abs(Re),H.start=0,H.end=H.size}function Yo(le,H,G,se){for(var de=0;de1?1:G}function Hr(le,H,G,se,de,ve,Re,Oe){if(se/=H,ve>=(G/=H)&&Re=se)return null;for(var fe=[],$e=0;$e=G&&Wn=se)){var Rn=[];if("Point"===Mt||"MultiPoint"===Mt)Fc(kt,Rn,G,se,de);else if("LineString"===Mt)Yl(kt,Rn,G,se,de,!1,Oe.lineMetrics);else if("MultiLineString"===Mt)Ko(kt,Rn,G,se,de,!1);else if("Polygon"===Mt)Ko(kt,Rn,G,se,de,!0);else if("MultiPolygon"===Mt)for(var an=0;an=G&&Re<=se&&(H.push(le[ve]),H.push(le[ve+1]),H.push(le[ve+2]))}}function Yl(le,H,G,se,de,ve,Re){for(var Oe,fe,$e=Nc(le),Dt=0===de?Vu:Kl,kt=le.start,Mt=0;MtG&&(fe=Dt($e,Qt,Wn,an,hn,G),Re&&($e.start=kt+Oe*fe)):hi>se?yn=G&&(fe=Dt($e,Qt,Wn,an,hn,G),so=!0),yn>se&&hi<=se&&(fe=Dt($e,Qt,Wn,an,hn,se),so=!0),!ve&&so&&(Re&&($e.end=kt+Oe*fe),H.push($e),$e=Nc(le)),Re&&(kt+=Oe)}var Hi=le.length-3;Qt=le[Hi],Wn=le[Hi+1],Rn=le[Hi+2],(hi=0===de?Qt:Wn)>=G&&hi<=se&&Oa($e,Qt,Wn,Rn),Hi=$e.length-3,ve&&Hi>=3&&($e[Hi]!==$e[0]||$e[Hi+1]!==$e[1])&&Oa($e,$e[0],$e[1],$e[2]),$e.length&&H.push($e)}function Nc(le){var H=[];return H.size=le.size,H.start=le.start,H.end=le.end,H}function Ko(le,H,G,se,de,ve){for(var Re=0;ReRe.maxX&&(Re.maxX=Dt),kt>Re.maxY&&(Re.maxY=kt)}return Re}function dl(le,H,G,se){var de=H.geometry,ve=H.type,Re=[];if("Point"===ve||"MultiPoint"===ve)for(var Oe=0;Oe0&&H.size<(de?Re:se))G.numPoints+=H.length/3;else{for(var Oe=[],fe=0;feRe)&&(G.numSimplified++,Oe.push(H[fe]),Oe.push(H[fe+1])),G.numPoints++;de&&function($e,Dt){for(var kt=0,Mt=0,Qt=$e.length,Wn=Qt-2;Mt0===Dt)for(Mt=0,Qt=$e.length;Mt24)throw new Error("maxZoom should be in the 0-24 range");if(H.promoteId&&H.generateId)throw new Error("promoteId and generateId cannot be used together.");var de,ve,Re,Oe,fe,$e,se=function(de,ve){var Re=[];if("FeatureCollection"===de.type)for(var Oe=0;Oe1&&console.time("creation"),Mt=this.tiles[kt]=ks(le,H,G,se,fe),this.tileCoords.push({z:H,x:G,y:se}),$e)){$e>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",H,G,se,Mt.numFeatures,Mt.numPoints,Mt.numSimplified),console.timeEnd("creation"));var Qt="z"+H;this.stats[Qt]=(this.stats[Qt]||0)+1,this.total++}if(Mt.source=le,de){if(H===fe.maxZoom||H===de)continue;var Wn=1<1&&console.time("clipping");var Rn,an,hn,hi,yn,so,Hi=.5*fe.buffer/fe.extent,Rs=.5-Hi,ao=.5+Hi,Yi=1+Hi;Rn=an=hn=hi=null,yn=Hr(le,Dt,G-Hi,G+ao,0,Mt.minX,Mt.maxX,fe),so=Hr(le,Dt,G+Rs,G+Yi,0,Mt.minX,Mt.maxX,fe),le=null,yn&&(Rn=Hr(yn,Dt,se-Hi,se+ao,1,Mt.minY,Mt.maxY,fe),an=Hr(yn,Dt,se+Rs,se+Yi,1,Mt.minY,Mt.maxY,fe),yn=null),so&&(hn=Hr(so,Dt,se-Hi,se+ao,1,Mt.minY,Mt.maxY,fe),hi=Hr(so,Dt,se+Rs,se+Yi,1,Mt.minY,Mt.maxY,fe),so=null),$e>1&&console.timeEnd("clipping"),Oe.push(Rn||[],H+1,2*G,2*se),Oe.push(an||[],H+1,2*G,2*se+1),Oe.push(hn||[],H+1,2*G+1,2*se),Oe.push(hi||[],H+1,2*G+1,2*se+1)}}},da.prototype.getTile=function(le,H,G){var se=this.options,de=se.extent,ve=se.debug;if(le<0||le>24)return null;var Re=1<1&&console.log("drilling down to z%d-%d-%d",le,H,G);for(var fe,$e=le,Dt=H,kt=G;!fe&&$e>0;)$e--,Dt=Math.floor(Dt/2),kt=Math.floor(kt/2),fe=this.tiles[Ql($e,Dt,kt)];return fe&&fe.source?(ve>1&&console.log("found parent tile z%d-%d-%d",$e,Dt,kt),ve>1&&console.time("drilling down"),this.splitTile(fe.source,$e,Dt,kt,le,H,G),ve>1&&console.timeEnd("drilling down"),this.tiles[Oe]?Uu(this.tiles[Oe],de):null):null};class zc extends h.VectorTileWorkerSource{constructor(H,G,se,de,ve){super(H,G,se,de,Ra),ve&&(this.loadGeoJSON=ve)}loadData(H,G){const se=H&&H.request,de=se&&se.collectResourceTiming;this.loadGeoJSON(H,(ve,Re)=>{if(ve||!Re)return G(ve);if("object"!=typeof Re)return G(new Error(`Input data given to '${H.source}' is not a valid GeoJSON object.`));{Vt(Re,!0);try{if(H.filter){const fe=h.createExpression(H.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===fe.result)throw new Error(fe.value.map(Dt=>`${Dt.key}: ${Dt.message}`).join(", "));Re={type:"FeatureCollection",features:Re.features.filter(Dt=>fe.value.evaluate({zoom:0},Dt))}}this._geoJSONIndex=H.cluster?new Zn(function({superclusterOptions:fe,clusterProperties:$e}){if(!$e||!fe)return fe;const Dt={},kt={},Mt={accumulated:null,zoom:0},Qt={properties:null},Wn=Object.keys($e);for(const Rn of Wn){const[an,hn]=$e[Rn],hi=h.createExpression(hn),yn=h.createExpression("string"==typeof an?[an,["accumulated"],["get",Rn]]:an);Dt[Rn]=hi.value,kt[Rn]=yn.value}return fe.map=Rn=>{Qt.properties=Rn;const an={};for(const hn of Wn)an[hn]=Dt[hn].evaluate(Mt,Qt);return an},fe.reduce=(Rn,an)=>{Qt.properties=an;for(const hn of Wn)Mt.accumulated=Rn[hn],Rn[hn]=kt[hn].evaluate(Mt,Qt)},fe}(H)).load(Re.features):new da(fe=Re,H.geojsonVtOptions)}catch(fe){return G(fe)}this.loaded={};const Oe={};if(de){const fe=h.getPerformanceMeasurement(se);fe&&(Oe.resourceTiming={},Oe.resourceTiming[H.source]=JSON.parse(JSON.stringify(fe)))}G(null,Oe)}var fe})}reloadTile(H,G){const se=this.loaded;return se&&se[H.uid]?super.reloadTile(H,G):this.loadTile(H,G)}loadGeoJSON(H,G){if(H.request)h.getJSON(H.request,G);else{if("string"!=typeof H.data)return G(new Error(`Input data given to '${H.source}' is not a valid GeoJSON object.`));try{return G(null,JSON.parse(H.data))}catch{return G(new Error(`Input data given to '${H.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(H,G){try{G(null,this._geoJSONIndex.getClusterExpansionZoom(H.clusterId))}catch(se){G(se)}}getClusterChildren(H,G){try{G(null,this._geoJSONIndex.getChildren(H.clusterId))}catch(se){G(se)}}getClusterLeaves(H,G){try{G(null,this._geoJSONIndex.getLeaves(H.clusterId,H.limit,H.offset))}catch(se){G(se)}}}class ec{constructor(H){this.self=H,this.actor=new h.Actor(H,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=h.getProjection({name:"mercator"}),this.workerSourceTypes={vector:h.VectorTileWorkerSource,geojson:zc},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(G,se)=>{if(this.workerSourceTypes[G])throw new Error(`Worker source with name "${G}" already registered.`);this.workerSourceTypes[G]=se},this.self.registerRTLTextPlugin=G=>{if(h.plugin.isParsed())throw new Error("RTL text plugin already registered.");h.plugin.applyArabicShaping=G.applyArabicShaping,h.plugin.processBidirectionalText=G.processBidirectionalText,h.plugin.processStyledBidirectionalText=G.processStyledBidirectionalText}}clearCaches(H,G,se){delete this.layerIndexes[H],delete this.availableImages[H],delete this.workerSources[H],delete this.demWorkerSources[H],se()}checkIfReady(H,G,se){se()}setReferrer(H,G){this.referrer=G}spriteLoaded(H,G){this.isSpriteLoaded[H]=G;for(const se in this.workerSources[H]){const de=this.workerSources[H][se];for(const ve in de)de[ve]instanceof h.VectorTileWorkerSource&&(de[ve].isSpriteLoaded=G,de[ve].fire(new h.Event("isSpriteLoaded")))}}setImages(H,G,se){this.availableImages[H]=G;for(const de in this.workerSources[H]){const ve=this.workerSources[H][de];for(const Re in ve)ve[Re].availableImages=G}se()}enableTerrain(H,G,se){this.terrain=G,se()}setProjection(H,G){this.projections[H]=h.getProjection(G)}setLayers(H,G,se){this.getLayerIndex(H).replace(G),se()}updateLayers(H,G,se){this.getLayerIndex(H).update(G.layers,G.removedIds),se()}loadTile(H,G,se){const de=this.enableTerrain?h.extend({enableTerrain:this.terrain},G):G;de.projection=this.projections[H]||this.defaultProjection,this.getWorkerSource(H,G.type,G.source).loadTile(de,se)}loadDEMTile(H,G,se){const de=this.enableTerrain?h.extend({buildQuadTree:this.terrain},G):G;this.getDEMWorkerSource(H,G.source).loadTile(de,se)}reloadTile(H,G,se){const de=this.enableTerrain?h.extend({enableTerrain:this.terrain},G):G;de.projection=this.projections[H]||this.defaultProjection,this.getWorkerSource(H,G.type,G.source).reloadTile(de,se)}abortTile(H,G,se){this.getWorkerSource(H,G.type,G.source).abortTile(G,se)}removeTile(H,G,se){this.getWorkerSource(H,G.type,G.source).removeTile(G,se)}removeSource(H,G,se){if(!this.workerSources[H]||!this.workerSources[H][G.type]||!this.workerSources[H][G.type][G.source])return;const de=this.workerSources[H][G.type][G.source];delete this.workerSources[H][G.type][G.source],void 0!==de.removeSource?de.removeSource(G,se):se()}loadWorkerSource(H,G,se){try{this.self.importScripts(G.url),se()}catch(de){se(de.toString())}}syncRTLPluginState(H,G,se){try{h.plugin.setState(G);const de=h.plugin.getPluginURL();if(h.plugin.isLoaded()&&!h.plugin.isParsed()&&null!=de){this.self.importScripts(de);const ve=h.plugin.isParsed();se(ve?void 0:new Error(`RTL Text Plugin failed to import scripts from ${de}`),ve)}}catch(de){se(de.toString())}}getAvailableImages(H){let G=this.availableImages[H];return G||(G=[]),G}getLayerIndex(H){let G=this.layerIndexes[H];return G||(G=this.layerIndexes[H]=new Me),G}getWorkerSource(H,G,se){return this.workerSources[H]||(this.workerSources[H]={}),this.workerSources[H][G]||(this.workerSources[H][G]={}),this.workerSources[H][G][se]||(this.workerSources[H][G][se]=new this.workerSourceTypes[G]({send:(ve,Re,Oe,fe,$e,Dt)=>{this.actor.send(ve,Re,Oe,H,$e,Dt)},scheduler:this.actor.scheduler},this.getLayerIndex(H),this.getAvailableImages(H),this.isSpriteLoaded[H])),this.workerSources[H][G][se]}getDEMWorkerSource(H,G){return this.demWorkerSources[H]||(this.demWorkerSources[H]={}),this.demWorkerSources[H][G]||(this.demWorkerSources[H][G]=new xe),this.demWorkerSources[H][G]}enforceCacheSizeLimit(H,G){h.enforceCacheSizeLimit(G)}getWorkerPerformanceMetrics(H,G,se){se(void 0,void 0)}}return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new ec(self)),ec}),ke(0,function(h){function W(m,l){if(Array.isArray(m)){if(!Array.isArray(l)||m.length!==l.length)return!1;for(let d=0;d"u"||typeof document>"u"||!(Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray)||!Function.prototype||!Function.prototype.bind||!(Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions)||!("JSON"in window&&"parse"in JSON&&"stringify"in JSON)||!function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var _,w,C=new Blob([""],{type:"text/javascript"}),D=URL.createObjectURL(C);try{w=new Worker(D),_=!0}catch{_=!1}return w&&w.terminate(),URL.revokeObjectURL(D),_}()||!("Uint8ClampedArray"in window)||!ArrayBuffer.isView||!function(){var _=document.createElement("canvas");_.width=_.height=1;var w=_.getContext("2d");if(!w)return!1;var C=w.getImageData(0,0,1,1);return C&&C.width===_.width}()||(void 0===xe[d=l&&l.failIfMajorPerformanceCaveat]&&(xe[d]=function(_){var w,D,I,A,C=(D=_,I=document.createElement("canvas"),(A=Object.create(Me.webGLContextAttributes)).failIfMajorPerformanceCaveat=D,I.getContext("webgl",A)||I.getContext("experimental-webgl",A));if(!C)return!1;try{w=C.createShader(C.VERTEX_SHADER)}catch{return!1}return!(!w||C.isContextLost())&&(C.shaderSource(w,"void main() {}"),C.compileShader(w),!0===C.getShaderParameter(w,C.COMPILE_STATUS))}(d)),!xe[d]||document.documentMode));var l,d}var xe={};function Ae(m,l,d){const _=h.window.document.createElement(m);return void 0!==l&&(_.className=l),d&&d.appendChild(_),_}function ct(m,l,d){const _=h.window.document.createElementNS("http://www.w3.org/2000/svg",m);for(const w of Object.keys(l))_.setAttributeNS(null,w,l[w]);return d&&d.appendChild(_),_}Me.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const Vt=h.window.document&&h.window.document.documentElement.style,Qe=Vt&&void 0!==Vt.userSelect?"userSelect":"WebkitUserSelect";let It;function bt(){Vt&&Qe&&(It=Vt[Qe],Vt[Qe]="none")}function ft(){Vt&&Qe&&(Vt[Qe]=It)}function oe(m){m.preventDefault(),m.stopPropagation(),h.window.removeEventListener("click",oe,!0)}function Ge(){h.window.addEventListener("click",oe,!0),h.window.setTimeout(()=>{h.window.removeEventListener("click",oe,!0)},0)}function ot(m,l){const d=m.getBoundingClientRect();return Ye(m,d,l)}function Se(m,l){const d=m.getBoundingClientRect(),_=[];for(let w=0;w=0?0:m.button}function Ye(m,l,d){const _=m.offsetWidth===l.width?1:m.offsetWidth/l.width;return new h.Point((d.clientX-l.left)*_,(d.clientY-l.top)*_)}function Ee(m,l){var d=l[0],_=l[1],w=l[2],C=l[3],D=d*C-w*_;return D?(m[0]=C*(D=1/D),m[1]=-_*D,m[2]=-w*D,m[3]=d*D,m):null}function ut(m){const{userImage:l}=m;return!!(l&&l.render&&l.render())&&(m.data.replace(new Uint8Array(l.data.buffer)),!0)}class vt extends h.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new h.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(l){if(this.loaded!==l&&(this.loaded=l,l)){for(const{ids:d,callback:_}of this.requestors)this._notify(d,_);this.requestors=[]}}hasImage(l){return!!this.getImage(l)}getImage(l){return this.images[l]}addImage(l,d){this._validate(l,d)&&(this.images[l]=d)}_validate(l,d){let _=!0;return this._validateStretch(d.stretchX,d.data&&d.data.width)||(this.fire(new h.ErrorEvent(new Error(`Image "${l}" has invalid "stretchX" value`))),_=!1),this._validateStretch(d.stretchY,d.data&&d.data.height)||(this.fire(new h.ErrorEvent(new Error(`Image "${l}" has invalid "stretchY" value`))),_=!1),this._validateContent(d.content,d)||(this.fire(new h.ErrorEvent(new Error(`Image "${l}" has invalid "content" value`))),_=!1),_}_validateStretch(l,d){if(!l)return!0;let _=0;for(const w of l){if(w[0]<_||w[1]{this.ready=!0})}broadcast(l,d,_){h.asyncAll(this.actors,(w,C)=>{w.send(l,d,C)},_=_||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(l=>{l.remove()}),this.actors=[],this.workerPool.release(this.id)}}function Vn(m,l,d){return l*(h.EXTENT/(m.tileSize*Math.pow(2,d-m.tileID.overscaledZ)))}sn.Actor=h.Actor;class mr{constructor(l,d,_,w){this.screenBounds=l,this.cameraPoint=d,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=_,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,w)}static createFromScreenPoints(l,d){let _,w;if(l instanceof h.Point||"number"==typeof l[0]){const C=h.Point.convert(l);_=[C],w=d.isPointAboveHorizon(C)}else{const C=h.Point.convert(l[0]),D=h.Point.convert(l[1]);_=[C,D],w=h.polygonizeBounds(C,D).every(I=>d.isPointAboveHorizon(I))}return new mr(_,d.getCameraPoint(),w,d)}isPointQuery(){return 1===this.screenBounds.length}bufferedScreenGeometry(l){return h.polygonizeBounds(this.screenBounds[0],1===this.screenBounds.length?this.screenBounds[0]:this.screenBounds[1],l)}bufferedCameraGeometry(l){const d=this.screenBounds[0],_=1===this.screenBounds.length?this.screenBounds[0].add(new h.Point(1,1)):this.screenBounds[1],w=h.polygonizeBounds(d,_,0,!1);return this.cameraPoint.y>_.y&&(this.cameraPoint.x>d.x&&this.cameraPoint.x<_.x?w.splice(3,0,this.cameraPoint):this.cameraPoint.x>=_.x?w[2]=this.cameraPoint:this.cameraPoint.x<=d.x&&(w[3]=this.cameraPoint)),h.bufferConvexPolygon(w,l)}bufferedCameraGeometryGlobe(l){const d=this.screenBounds[0],_=1===this.screenBounds.length?this.screenBounds[0].add(new h.Point(1,1)):this.screenBounds[1],w=h.polygonizeBounds(d,_,l),C=this.cameraPoint.clone();switch(3*((C.y>d.y)+(C.y>_.y))+((C.x>d.x)+(C.x>_.x))){case 0:w[0]=C,w[4]=C.clone();break;case 1:w.splice(1,0,C);break;case 2:w[1]=C;break;case 3:w.splice(4,0,C);break;case 5:w.splice(2,0,C);break;case 6:w[3]=C;break;case 7:w.splice(3,0,C);break;case 8:w[2]=C}return w}containsTile(l,d,_,w=0){const C=l.queryPadding/d._pixelsPerMercatorPixel+1,D=_?this._bufferedCameraMercator(C,d):this._bufferedScreenMercator(C,d);let I=l.tileID.wrap+(D.unwrapped?w:0);const A=D.polygon.map(Q=>h.getTilePoint(l.tileTransform,Q,I));if(!h.polygonIntersectsBox(A,0,0,h.EXTENT,h.EXTENT))return;I=l.tileID.wrap+(this.screenGeometryMercator.unwrapped?w:0);const L=this.screenGeometryMercator.polygon.map(Q=>h.getTileVec3(l.tileTransform,Q,I)),R=L.map(Q=>new h.Point(Q[0],Q[1])),B=d.getFreeCameraOptions().position||new h.MercatorCoordinate(0,0,0),q=h.getTileVec3(l.tileTransform,B,I),X=L.map(Q=>{const U=h.sub(Q,Q,q);return h.normalize(U,U),new h.Ray(q,U)}),K=Vn(l,1,d.zoom)*d._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:R,tilespaceRays:X,bufferedTilespaceGeometry:A,bufferedTilespaceBounds:(J=h.getBounds(A),J.min.x=h.clamp(J.min.x,0,h.EXTENT),J.min.y=h.clamp(J.min.y,0,h.EXTENT),J.max.x=h.clamp(J.max.x,0,h.EXTENT),J.max.y=h.clamp(J.max.y,0,h.EXTENT),J),tile:l,tileID:l.tileID,pixelToTileUnitsFactor:K};var J}_bufferedScreenMercator(l,d){const _=zi(l);if(this._screenRaycastCache[_])return this._screenRaycastCache[_];{let w;return w="globe"===d.projection.name?this._projectAndResample(this.bufferedScreenGeometry(l),d):{polygon:this.bufferedScreenGeometry(l).map(C=>d.pointCoordinate3D(C)),unwrapped:!0},this._screenRaycastCache[_]=w,w}}_bufferedCameraMercator(l,d){const _=zi(l);if(this._cameraRaycastCache[_])return this._cameraRaycastCache[_];{let w;return w="globe"===d.projection.name?this._projectAndResample(this.bufferedCameraGeometryGlobe(l),d):{polygon:this.bufferedCameraGeometry(l).map(C=>d.pointCoordinate3D(C)),unwrapped:!0},this._cameraRaycastCache[_]=w,w}}_projectAndResample(l,d){const _=function(C,D){const I=h.multiply([],D.pixelMatrix,D.globeMatrix),A=[0,-h.GLOBE_RADIUS,0,1],L=[0,h.GLOBE_RADIUS,0,1],R=[0,0,0,1];h.transformMat4$1(A,A,I),h.transformMat4$1(L,L,I),h.transformMat4$1(R,R,I);const B=new h.Point(A[0]/A[3],A[1]/A[3]),q=new h.Point(L[0]/L[3],L[1]/L[3]),X=h.polygonContainsPoint(C,B)&&A[3]1?Zn(C.slice(0,Q),D):[],re=Qnew h.Point(Fr(me.x),me.y)),re=re.map(me=>new h.Point(Fr(me.x),me.y));const ie=[...Y];0===ie.length&&ie.push(re[re.length-1]);const pe=h.number(ie[ie.length-1].y,(0===re.length?Y[0]:re[0]).y,U);let ge;return ge=X?[new h.Point(0,pe),new h.Point(0,0),new h.Point(1,0),new h.Point(1,pe)]:[new h.Point(1,pe),new h.Point(1,1),new h.Point(0,1),new h.Point(0,pe)],ie.push(...ge),0===re.length?ie.push(Y[0]):ie.push(...re),{polygon:ie.map(me=>new h.MercatorCoordinate(me.x,me.y)),unwrapped:!1}}(l,d);if(_)return _;const w=function(C,D){let I=!1,A=-1/0,L=0;for(let B=0;BA&&(A=C[B].x,L=B);for(let B=0;B.5&&(X.x{B.x-=1}),{polygon:C,unwrapped:I}}(Zn(l,d).map(C=>new h.Point(Fr(C.x),C.y)),d);return{polygon:w.polygon.map(C=>new h.MercatorCoordinate(C.x,C.y)),unwrapped:w.unwrapped}}}function Zn(m,l){return h.resample(m,d=>{const _=l.pointCoordinate3D(d);d.x=_.x,d.y=_.y},1/256)}function Fr(m){return m<0?1+m%1:m%1}function zi(m){return 100*m|0}function io(m,l,d,_,w){const C=function(D,I){if(D)return w(D);if(I){m.url&&I.tiles&&m.tiles&&delete m.tiles;const A=h.pick(h.extend(I,m),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);I.vector_layers&&(A.vectorLayers=I.vector_layers,A.vectorLayerIds=A.vectorLayers.map(L=>L.id)),A.tiles=l.canonicalizeTileset(A,m.url),w(null,A)}};return m.url?h.getJSON(l.transformRequest(l.normalizeSourceURL(m.url,null,d,_),h.ResourceType.Source),C):h.exported.frame(()=>C(null,m))}class Xi{constructor(l,d,_){this.bounds=h.LngLatBounds.convert(this.validateBounds(l)),this.minzoom=d||0,this.maxzoom=_||24}validateBounds(l){return Array.isArray(l)&&4===l.length?[Math.max(-180,l[0]),Math.max(-90,l[1]),Math.min(180,l[2]),Math.min(90,l[3])]:[-180,-90,180,90]}contains(l){const d=Math.pow(2,l.z),_=Math.floor(h.mercatorXfromLng(this.bounds.getWest())*d),w=Math.floor(h.mercatorYfromLat(this.bounds.getNorth())*d),C=Math.ceil(h.mercatorXfromLng(this.bounds.getEast())*d),D=Math.ceil(h.mercatorYfromLat(this.bounds.getSouth())*d);return l.x>=_&&l.x=w&&l.y{this._tileJSONRequest=null,this._loaded=!0,w?(d&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${d}`),_&&2!==_.length&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${_}`),this.fire(new h.ErrorEvent(w))):C&&(h.extend(this,C),C.bounds&&(this.tileBounds=new Xi(C.bounds,this.minzoom,this.maxzoom)),h.postTurnstileEvent(C.tiles,this.map._requestManager._customAccessToken),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))),l&&l(w)})}loaded(){return this._loaded}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return h.extend({},this._options)}loadTile(l,d){const _=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme)),w={request:this.map._requestManager.transformRequest(_,h.ResourceType.Tile),data:void 0,uid:l.uid,tileID:l.tileID,tileZoom:l.tileZoom,zoom:l.tileID.overscaledZ,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:h.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:l.isSymbolTile};if(w.request.collectResourceTiming=this._collectResourceTiming,l.actor&&"expired"!==l.state)"loading"===l.state?l.reloadCallback=d:l.request=l.actor.send("reloadTile",w,C.bind(this));else if(l.actor=this._tileWorkers[_]=this._tileWorkers[_]||this.dispatcher.getActor(),this.dispatcher.ready)l.request=l.actor.send("loadTile",w,C.bind(this),void 0,!0);else{const D=h.loadVectorTile.call({deduped:this._deduped},w,(I,A)=>{I||!A?C.call(this,I):(w.data={cacheControl:A.cacheControl,expires:A.expires,rawData:A.rawData.slice(0)},l.actor&&l.actor.send("loadTile",w,C.bind(this),void 0,!0))},!0);l.request={cancel:D}}function C(D,I){return delete l.request,l.aborted?d(null):D&&404!==D.status?d(D):(I&&I.resourceTiming&&(l.resourceTiming=I.resourceTiming),this.map._refreshExpiredTiles&&I&&l.setExpiryData(I),l.loadVectorData(I,this.map.painter),h.cacheEntryPossiblyAdded(this.dispatcher),d(null),void(l.reloadCallback&&(this.loadTile(l,l.reloadCallback),l.reloadCallback=null)))}}abortTile(l){l.request&&(l.request.cancel(),delete l.request),l.actor&&l.actor.send("abortTile",{uid:l.uid,type:this.type,source:this.id})}unloadTile(l){l.unloadVectorData(),l.actor&&l.actor.send("removeTile",{uid:l.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class Mt extends h.Evented{constructor(l,d,_,w){super(),this.id=l,this.dispatcher=_,this.setEventedParent(w),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=h.extend({type:"raster"},d),h.extend(this,h.pick(d,["url","scheme","tileSize"]))}load(l){this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=io(this._options,this.map._requestManager,null,null,(d,_)=>{this._tileJSONRequest=null,this._loaded=!0,d?this.fire(new h.ErrorEvent(d)):_&&(h.extend(this,_),_.bounds&&(this.tileBounds=new Xi(_.bounds,this.minzoom,this.maxzoom)),h.postTurnstileEvent(_.tiles),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))),l&&l(d)})}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return h.extend({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l,d){const _=h.exported.devicePixelRatio>=2,w=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),_,this.tileSize);l.request=h.getImage(this.map._requestManager.transformRequest(w,h.ResourceType.Tile),(C,D,I,A)=>(delete l.request,l.aborted?(l.state="unloaded",d(null)):C?(l.state="errored",d(C)):D?(this.map._refreshExpiredTiles&&l.setExpiryData({cacheControl:I,expires:A}),l.setTexture(D,this.map.painter),l.state="loaded",h.cacheEntryPossiblyAdded(this.dispatcher),void d(null)):d(null)))}static loadTileData(l,d,_){l.setTexture(d,_)}static unloadTileData(l,d){l.texture&&d.saveTileTexture(l.texture)}abortTile(l,d){l.request&&(l.request.cancel(),delete l.request),d()}unloadTile(l,d){l.texture&&this.map.painter.saveTileTexture(l.texture),d()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function Qt(m,l,d,_,w,C,D,I){const A=[m,d,w,l,_,C,1,1,1],L=[D,I,1],R=h.adjoint([],A),[B,q,X]=h.transformMat3(L,L,h.transpose(R,R));return h.multiply$1(A,[B,0,0,0,q,0,0,0,X],A)}class Wn extends h.Evented{constructor(l,d,_,w){super(),this.id=l,this.dispatcher=_,this.coordinates=d.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(w),this.options=d,this._dirty=!1}load(l,d){this._loaded=d||!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=h.getImage(this.map._requestManager.transformRequest(this.url,h.ResourceType.Image),(_,w)=>{if(this._imageRequest=null,this._loaded=!0,_)this.fire(new h.ErrorEvent(_));else if(w){const{HTMLImageElement:C}=h.window;this.image=w instanceof C?h.exported.getImageData(w):w,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,l&&(this.coordinates=l),this._finishLoading()}})}loaded(){return this._loaded}updateImage(l){return this.image&&l.url?(this._imageRequest&&l.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=l.url,this.load(l.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(l){this.map=l,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(l){this.coordinates=l,this._boundsArray=void 0;const d=l.map(h.MercatorCoordinate.fromLngLat);return this.tileID=function(_){let w=1/0,C=1/0,D=-1/0,I=-1/0;for(const B of _)w=Math.min(w,B.x),C=Math.min(C,B.y),D=Math.max(D,B.x),I=Math.max(I,B.y);const A=Math.max(D-w,I-C),L=Math.max(0,Math.floor(-Math.log(A)/Math.LN2)),R=Math.pow(2,L);return new h.CanonicalTileID(L,Math.floor((w+D)/2*R),Math.floor((C+I)/2*R))}(d),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(l){for(const A in this.tiles){const L=this.tiles[A];"loaded"!==L.state&&(L.state="loaded",L.texture=this.texture)}if(this._boundsArray)return;const d=h.tileTransform(this.tileID,this.map.transform.projection),[_,w,C,D]=this.coordinates.map(A=>{const L=d.projection.project(A[0],A[1]);return h.getTilePoint(d,L)._round()});this.perspectiveTransform=function(A,L,R,B,q,X,K,J,Q,U){const Y=Qt(0,0,A,0,0,L,A,L),re=Qt(R,B,q,X,K,J,Q,U);return h.multiply$1(re,h.adjoint(Y,Y),re),[re[6]/re[8]*A/h.EXTENT,re[7]/re[8]*L/h.EXTENT]}(this.width,this.height,_.x,_.y,w.x,w.y,D.x,D.y,C.x,C.y);const I=this._boundsArray=new h.StructArrayLayout4i8;I.emplaceBack(_.x,_.y,0,0),I.emplaceBack(w.x,w.y,h.EXTENT,0),I.emplaceBack(D.x,D.y,0,h.EXTENT),I.emplaceBack(C.x,C.y,h.EXTENT,h.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=l.createVertexBuffer(I,h.boundsAttributes.members),this.boundsSegments=h.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const l=this.map.painter.context,d=l.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new h.Texture(l,this.image,d.RGBA),this.texture.bind(d.LINEAR,d.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(l)}loadTile(l,d){this.tileID&&this.tileID.equals(l.tileID.canonical)?(this.tiles[String(l.tileID.wrap)]=l,l.buckets={},d(null)):(l.state="errored",d(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const Rn={vector:kt,raster:Mt,"raster-dem":class extends Mt{constructor(m,l,d,_){super(m,l,d,_),this.type="raster-dem",this.maxzoom=22,this._options=h.extend({type:"raster-dem"},l),this.encoding=l.encoding||"mapbox"}loadTile(m,l){const d=this.map._requestManager.normalizeTileURL(m.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function _(w,C){w&&(m.state="errored",l(w)),C&&(m.dem=C,m.dem.onDeserialize(),m.needsHillshadePrepare=!0,m.needsDEMTextureUpload=!0,m.state="loaded",l(null))}m.request=h.getImage(this.map._requestManager.transformRequest(d,h.ResourceType.Tile),function(w,C,D,I){if(delete m.request,m.aborted)m.state="unloaded",l(null);else if(w)m.state="errored",l(w);else if(C){this.map._refreshExpiredTiles&&m.setExpiryData({cacheControl:D,expires:I});const A=h.window.ImageBitmap&&C instanceof h.window.ImageBitmap&&(null==ks&&(ks=h.window.OffscreenCanvas&&new h.window.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof h.window.createImageBitmap),ks),L=1-(C.width-h.prevPowerOfTwo(C.width))/2;L<1||m.neighboringTiles||(m.neighboringTiles=this._getNeighboringTiles(m.tileID));const R=A?C:h.exported.getImageData(C,L),B={uid:m.uid,coord:m.tileID,source:this.id,rawImageData:R,encoding:this.encoding,padding:L};m.actor&&"expired"!==m.state||(m.actor=this.dispatcher.getActor(),m.actor.send("loadDEMTile",B,_.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(m){const l=m.canonical,d=Math.pow(2,l.z),_=(l.x-1+d)%d,w=0===l.x?m.wrap-1:m.wrap,C=(l.x+1+d)%d,D=l.x+1===d?m.wrap+1:m.wrap,I={};return I[new h.OverscaledTileID(m.overscaledZ,w,l.z,_,l.y).key]={backfilled:!1},I[new h.OverscaledTileID(m.overscaledZ,D,l.z,C,l.y).key]={backfilled:!1},l.y>0&&(I[new h.OverscaledTileID(m.overscaledZ,w,l.z,_,l.y-1).key]={backfilled:!1},I[new h.OverscaledTileID(m.overscaledZ,m.wrap,l.z,l.x,l.y-1).key]={backfilled:!1},I[new h.OverscaledTileID(m.overscaledZ,D,l.z,C,l.y-1).key]={backfilled:!1}),l.y+1{if(this._loaded=!0,this._pendingLoad=null,d)this.fire(new h.ErrorEvent(d));else{const w={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&_&&_.resourceTiming&&_.resourceTiming[this.id]&&(w.resourceTiming=_.resourceTiming[this.id]),this.fire(new h.Event("data",w)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(m,l){const d=m.actor?"reloadTile":"loadTile";m.actor=this.actor,m.request=this.actor.send(d,{type:this.type,uid:m.uid,tileID:m.tileID,tileZoom:m.tileZoom,zoom:m.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:h.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(_,w)=>(delete m.request,m.unloadVectorData(),m.aborted?l(null):_?l(_):(m.loadVectorData(w,this.map.painter,"reloadTile"===d),l(null))),void 0,"loadTile"===d)}abortTile(m){m.request&&(m.request.cancel(),delete m.request),m.aborted=!0}unloadTile(m){m.unloadVectorData(),this.actor.send("removeTile",{uid:m.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return h.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends Wn{constructor(m,l,d,_){super(m,l,d,_),this.roundZoom=!0,this.type="video",this.options=l}load(){this._loaded=!1;const m=this.options;this.urls=[];for(const l of m.urls)this.urls.push(this.map._requestManager.transformRequest(l,h.ResourceType.Source).url);h.getVideo(this.urls,(l,d)=>{this._loaded=!0,l?this.fire(new h.ErrorEvent(l)):d&&(this.video=d,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(m){if(this.video){const l=this.video.seekable;ml.end(0)?this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${l.start(0)} and ${l.end(0)}-second mark.`))):this.video.currentTime=m}}getVideo(){return this.video}onAdd(m){this.map||(this.map=m,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const m=this.map.painter.context,l=m.gl;this.texture?this.video.paused||(this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),l.texSubImage2D(l.TEXTURE_2D,0,0,0,l.RGBA,l.UNSIGNED_BYTE,this.video)):(this.texture=new h.Texture(m,this.video,l.RGBA),this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(m)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:Wn,canvas:class extends Wn{constructor(m,l,d,_){super(m,l,d,_),l.coordinates?Array.isArray(l.coordinates)&&4===l.coordinates.length&&!l.coordinates.some(w=>!Array.isArray(w)||2!==w.length||w.some(C=>"number"!=typeof C))||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'missing required property "coordinates"'))),l.animate&&"boolean"!=typeof l.animate&&this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'optional "animate" property must be a boolean value'))),l.canvas?"string"==typeof l.canvas||l.canvas instanceof h.window.HTMLCanvasElement||this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new h.ErrorEvent(new h.ValidationError(`sources.${m}`,null,'missing required property "canvas"'))),this.options=l,this.animate=void 0===l.animate||l.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof h.window.HTMLCanvasElement?this.options.canvas:h.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new h.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(m){this.map=m,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let m=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,m=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,m=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;const l=this.map.painter.context;this.texture?(m||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new h.Texture(l,this.canvas,l.gl.RGBA,{premultiply:!0}),this._prepareData(l)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const m of[this.canvas.width,this.canvas.height])if(isNaN(m)||m<=0)return!0;return!1}},custom:class extends h.Evented{constructor(m,l,d,_){super(),this.id=m,this.type="custom",this._dataType="raster",this._dispatcher=d,this._implementation=l,this.setEventedParent(_),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new h.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new h.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new Xi(this._implementation.bounds,this.minzoom,this.maxzoom)),l.update=this._update.bind(this),l.clearTiles=this._clearTiles.bind(this),l.coveringTiles=this._coveringTiles.bind(this),h.extend(this,h.pick(l,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return h.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new h.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(m){this._map=m,this._loaded=!1,this.fire(new h.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(m),this.load()}onRemove(m){this._implementation.onRemove&&this._implementation.onRemove(m)}hasTile(m){if(this._implementation.hasTile){const{x:l,y:d,z:_}=m.canonical;return this._implementation.hasTile({x:l,y:d,z:_})}return!this.tileBounds||this.tileBounds.contains(m.canonical)}loadTile(m,l){const{x:d,y:_,z:w}=m.tileID.canonical,C=new h.window.AbortController;m.request=Promise.resolve(this._implementation.loadTile({x:d,y:_,z:w},{signal:C.signal})).then(function(D){return delete m.request,m.aborted?(m.state="unloaded",l(null)):void 0===D?(m.state="errored",l(null)):null===D?(this.loadTileData(m,{width:this.tileSize,height:this.tileSize,data:null}),m.state="loaded",l(null)):(I=D)instanceof h.window.ImageData||I instanceof h.window.HTMLCanvasElement||I instanceof h.window.ImageBitmap||I instanceof h.window.HTMLImageElement?(this.loadTileData(m,D),m.state="loaded",void l(null)):(m.state="errored",l(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)));var I}.bind(this)).catch(D=>{20!==D.code&&(m.state="errored",l(D))}),m.request.cancel=()=>C.abort()}loadTileData(m,l){Mt.loadTileData(m,l,this._map.painter)}unloadTileData(m){Mt.unloadTileData(m,this._map.painter)}unloadTile(m,l){if(this.unloadTileData(m),this._implementation.unloadTile){const{x:d,y:_,z:w}=m.tileID.canonical;this._implementation.unloadTile({x:d,y:_,z:w})}l()}abortTile(m,l){m.request&&m.request.cancel&&(m.request.cancel(),delete m.request),l()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(m=>({x:m.canonical.x,y:m.canonical.y,z:m.canonical.z}))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new h.Event("data",{dataType:"source",sourceDataType:"content"}))}}},an=function(m,l,d,_){const w=new Rn[l.type](m,l,d,_);if(w.id!==m)throw new Error(`Expected Source id to be ${m} instead of ${w.id}`);return h.bindAll(["load","abort","unload","serialize","prepare"],w),w};function hn(m,l){const d=h.identity([]);return h.scale(d,d,[.5*m.width,.5*-m.height,1]),h.translate(d,d,[1,-1,0]),h.multiply(d,d,m.calculateProjMatrix(l.toUnwrapped())),Float32Array.from(d)}function hi(m,l,d,_,w,C,D,I=!1){const A=m.tilesIn(_,D,I);A.sort(so);const L=[];for(const B of A)L.push({wrappedTileID:B.tile.tileID.wrapped().key,queryResults:B.tile.queryRenderedFeatures(l,d,m._state,B,w,C,hn(m.transform,B.tile.tileID),I)});const R=function(B){const q={},X={};for(const K of B){const J=K.queryResults,Q=K.wrappedTileID,U=X[Q]=X[Q]||{};for(const Y in J){const re=J[Y],ie=U[Y]=U[Y]||{},pe=q[Y]=q[Y]||[];for(const ge of re)ie[ge.featureIndex]||(ie[ge.featureIndex]=!0,pe.push(ge))}}return q}(L);for(const B in R)R[B].forEach(q=>{const X=q.feature,K=X.layer;K&&"background"!==K.type&&"sky"!==K.type&&(X.source=K.source,K["source-layer"]&&(X.sourceLayer=K["source-layer"]),X.state=void 0!==X.id?m.getFeatureState(K["source-layer"],X.id):{})});return R}function yn(m,l){const d=m.getRenderableIds().map(C=>m.getTileByID(C)),_=[],w={};for(let C=0;C{d.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Rs]}numActive(){return Object.keys(this.active).length}}let Yi;function Bc(){return Yi||(Yi=new ao),Yi}function Rv(m,l){const d={};for(const _ in m)"ref"!==_&&(d[_]=m[_]);return h.refProperties.forEach(_=>{_ in l&&(d[_]=l[_])}),d}function L_(m){m=m.slice();const l=Object.create(null);for(let d=0;d0?(w-D)/I:0;return this.points[C].mult(1-A).add(this.points[d].mult(A))}}class tc{constructor(l,d,_){const w=this.boxCells=[],C=this.circleCells=[];this.xCellCount=Math.ceil(l/_),this.yCellCount=Math.ceil(d/_);for(let D=0;Dthis.width||w<0||d>this.height)return!C&&[];const I=[];if(l<=0&&d<=0&&this.width<=_&&this.height<=w){if(C)return!0;for(let A=0;A0:I}_queryCircle(l,d,_,w,C){const D=l-_,I=l+_,A=d-_,L=d+_;if(I<0||D>this.width||L<0||A>this.height)return!w&&[];const R=[];return this._forEachCell(D,A,I,L,this._queryCellCircle,R,{hitTest:w,circle:{x:l,y:d,radius:_},seenUids:{box:{},circle:{}}},C),w?R.length>0:R}query(l,d,_,w,C){return this._query(l,d,_,w,!1,C)}hitTest(l,d,_,w,C){return this._query(l,d,_,w,!0,C)}hitTestCircle(l,d,_,w){return this._queryCircle(l,d,_,!0,w)}_queryCell(l,d,_,w,C,D,I,A){const L=I.seenUids,R=this.boxCells[C];if(null!==R){const q=this.bboxes;for(const X of R)if(!L.box[X]){L.box[X]=!0;const K=4*X;if(l<=q[K+2]&&d<=q[K+3]&&_>=q[K+0]&&w>=q[K+1]&&(!A||A(this.boxKeys[X]))){if(I.hitTest)return D.push(!0),!0;D.push({key:this.boxKeys[X],x1:q[K],y1:q[K+1],x2:q[K+2],y2:q[K+3]})}}}const B=this.circleCells[C];if(null!==B){const q=this.circles;for(const X of B)if(!L.circle[X]){L.circle[X]=!0;const K=3*X;if(this._circleAndRectCollide(q[K],q[K+1],q[K+2],l,d,_,w)&&(!A||A(this.circleKeys[X]))){if(I.hitTest)return D.push(!0),!0;{const J=q[K],Q=q[K+1],U=q[K+2];D.push({key:this.circleKeys[X],x1:J-U,y1:Q-U,x2:J+U,y2:Q+U})}}}}}_queryCellCircle(l,d,_,w,C,D,I,A){const L=I.circle,R=I.seenUids,B=this.boxCells[C];if(null!==B){const X=this.bboxes;for(const K of B)if(!R.box[K]){R.box[K]=!0;const J=4*K;if(this._circleAndRectCollide(L.x,L.y,L.radius,X[J+0],X[J+1],X[J+2],X[J+3])&&(!A||A(this.boxKeys[K])))return D.push(!0),!0}}const q=this.circleCells[C];if(null!==q){const X=this.circles;for(const K of q)if(!R.circle[K]){R.circle[K]=!0;const J=3*K;if(this._circlesCollide(X[J],X[J+1],X[J+2],L.x,L.y,L.radius)&&(!A||A(this.circleKeys[K])))return D.push(!0),!0}}}_forEachCell(l,d,_,w,C,D,I,A){const L=this._convertToXCellCoord(l),R=this._convertToYCellCoord(d),B=this._convertToXCellCoord(_),q=this._convertToYCellCoord(w);for(let X=L;X<=B;X++)for(let K=R;K<=q;K++)if(C.call(this,l,d,_,w,this.xCellCount*K+X,D,I,A))return}_convertToXCellCoord(l){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(l*this.xScale)))}_convertToYCellCoord(l){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(l*this.yScale)))}_circlesCollide(l,d,_,w,C,D){const I=w-l,A=C-d,L=_+D;return L*L>I*I+A*A}_circleAndRectCollide(l,d,_,w,C,D,I){const A=(D-w)/2,L=Math.abs(l-(w+A));if(L>A+_)return!1;const R=(I-C)/2,B=Math.abs(d-(C+R));if(B>R+_)return!1;if(L<=A||B<=R)return!0;const q=L-A,X=B-R;return q*q+X*X<=_*_}}const Fa={unknown:0,flipRequired:1,flipNotRequired:2},Hu=Math.tan(85*Math.PI/180);function Ze(m,l,d,_,w,C,D){const I=h.create();if(d)if("globe"===C.name){const A=h.calculateGlobeLabelMatrix(w,l);h.multiply(I,I,A)}else{const A=Ee([],D);I[0]=A[0],I[1]=A[1],I[4]=A[2],I[5]=A[3],_||h.rotateZ(I,I,w.angle)}else h.multiply(I,w.labelPlaneMatrix,m);return I}function fa(m,l,d,_,w,C,D){const I=Ze(m,l,d,_,w,C,D);return"globe"===C.name&&d||(I[2]=I[6]=I[10]=I[14]=0),I}function Bi(m,l,d,_,w,C,D){if(d){if("globe"===C.name){const I=Ze(m,l,d,_,w,C,D);return h.invert(I,I),h.multiply(I,m,I),I}{const I=h.clone(m),A=h.identity([]);return A[0]=D[0],A[1]=D[1],A[4]=D[2],A[5]=D[3],h.multiply(I,I,A),_||h.rotateZ(I,I,-w.angle),I}}return w.glCoordMatrix}function Ki(m,l,d,_){const w=[m,l,d,1];d?h.transformMat4$1(w,w,_):Kn(w,w,_);const C=w[3];return w[0]/=C,w[1]/=C,w[2]/=C,w}function wm(m,l){return Math.min(.5+m/l*.5,1.5)}function pa(m,l){const d=m[0]/m[3],_=m[1]/m[3];return d>=-l[0]&&d<=l[0]&&_>=-l[1]&&_<=l[1]}function Mf(m,l,d,_,w,C,D,I,A,L){const R=d.transform,B=_?m.textSizeData:m.iconSizeData,q=h.evaluateSizeForZoom(B,d.transform.zoom),X="globe"===R.projection.name,K=[256/d.width*2+1,256/d.height*2+1],J=_?m.text.dynamicLayoutVertexArray:m.icon.dynamicLayoutVertexArray;J.clear();let Q=null;X&&(Q=_?m.text.globeExtVertexArray:m.icon.globeExtVertexArray);const U=m.lineVertexArray,Y=_?m.text.placedSymbolArray:m.icon.placedSymbolArray,re=d.transform.width/d.transform.height;let ie,pe=!1;for(let ge=0;geMath.abs(d)?{useVertical:!0}:m===h.WritingMode.vertical?_>0?{needsFlipping:!0}:null:l!==Fa.unknown&&(0===(w=d)||Math.abs(_/w)>Hu)?l===Fa.flipRequired?{needsFlipping:!0}:null:d<0?{needsFlipping:!0}:null;var w}function Ut(m,l,d,_,w,C,D,I,A,L,R,B,q,X,K,J,Q,U,Y){const re=l/24,ie=m.lineOffsetX*re,pe=m.lineOffsetY*re,{lineStartIndex:ge,glyphStartIndex:me,numGlyphs:Te,segment:be,writingMode:Ue,flipState:yt}=m,Fe=ge+m.lineLength,tt=qe=>{if(R){const[xt,ht,Et]=qe.up,ln=L.length;h.updateGlobeVertexNormal(R,ln+0,xt,ht,Et),h.updateGlobeVertexNormal(R,ln+1,xt,ht,Et),h.updateGlobeVertexNormal(R,ln+2,xt,ht,Et),h.updateGlobeVertexNormal(R,ln+3,xt,ht,Et)}const[gt,Be,Je]=qe.point;h.addDynamicAttributes(L,gt,Be,Je,qe.angle)};if(Te>1){const qe=bm(re,I,ie,pe,d,B,q,m,A,C,X,J,!1,Q,U,Y);if(!qe)return{notEnoughRoom:!0};if(_&&!d){let[gt,Be,Je]=qe.first.point,[xt,ht,Et]=qe.last.point;[gt,Be]=Ki(gt,Be,Je,D),[xt,ht]=Ki(xt,ht,Et,D);const ln=Vc(Ue,yt,(xt-gt)*K,ht-Be);if(m.flipState=ln&&ln.needsFlipping?Fa.flipRequired:Fa.flipNotRequired,ln)return ln}tt(qe.first);for(let gt=me+1;gt0?xt:Xn(q,Je,gt,1,w,void 0,Q,U.canonical),Et=Vc(Ue,yt,(ht[0]-gt[0])*K,ht[1]-gt[1]);if(m.flipState=Et&&Et.needsFlipping?Fa.flipRequired:Fa.flipNotRequired,Et)return Et}const qe=ds(re*I.getoffsetX(me),ie,pe,d,B,q,be,ge,Fe,A,C,X,J,!1,!1,Q,U,Y);if(!qe)return{notEnoughRoom:!0};tt(qe)}return{}}function Qn(m,l,d,_,w){const{x:C,y:D,z:I}=_.projectTilePoint(m.x,m.y,l);if(!w)return Ki(C,D,I,d);const[A,L,R]=w(m);return Ki(C+A,D+L,I+R,d)}function Xn(m,l,d,_,w,C,D,I){const A=Qn(m.sub(l)._unit()._add(m),I,w,D,C);return h.sub(A,d,A),h.normalize(A,A),h.scaleAndAdd(A,d,A,_)}function ds(m,l,d,_,w,C,D,I,A,L,R,B,q,X,K,J,Q,U){const Y=_?m-l:m+l;let re=Y>0?1:-1,ie=0;_&&(re*=-1,ie=Math.PI),re<0&&(ie+=Math.PI);let pe=I+D+(re>0?0:1)|0,ge=w,me=w,Te=0,be=0;const Ue=Math.abs(Y),yt=[],Fe=[];let tt=C,qe=tt;const gt=()=>Xn(qe,tt,me,Ue-Te+1,R,q,J,Q.canonical);for(;Te+be<=Ue;){if(pe+=re,pe=A)return null;if(me=ge,qe=tt,yt.push(me),X&&Fe.push(qe),tt=new h.Point(L.getx(pe),L.gety(pe)),ge=B[pe],!ge){const vn=Qn(tt,Q.canonical,R,J,q);ge=vn[3]>0?B[pe]=vn:gt()}Te+=be,be=h.distance(me,ge)}K&&q&&(B[pe]&&(ge=gt(),be=h.distance(me,ge)),B[pe]=ge);const Be=(Ue-Te)/be,Je=tt.sub(qe)._mult(Be)._add(qe),xt=h.sub([],ge,me),ht=h.scaleAndAdd([],me,xt,Be);let Et=[0,0,1],ln=xt[0],In=xt[1];if(U&&(Et=J.upVector(Q.canonical,Je.x,Je.y),0!==Et[0]||0!==Et[1]||1!==Et[2])){const vn=[Et[2],0,-Et[0]],Jn=h.cross([],Et,vn);h.normalize(vn,vn),h.normalize(Jn,Jn),ln=h.dot(xt,vn),In=h.dot(xt,Jn)}if(d){const vn=h.cross([],Et,xt);h.normalize(vn,vn),h.scaleAndAdd(ht,ht,vn,d*re)}const Xt=ie+Math.atan2(In,ln);return yt.push(ht),X&&Fe.push(Je),{point:ht,angle:Xt,path:yt,tilePath:Fe,up:Et}}function qs(m,l){const d=l.length,_=d+4*m;l.resize(_),l.float32.fill(-1/0,4*d,4*_)}function Kn(m,l,d){const _=l[0],w=l[1];return m[0]=d[0]*_+d[4]*w+d[12],m[1]=d[1]*_+d[5]*w+d[13],m[3]=d[3]*_+d[7]*w+d[15],m}const No=100;class Uc{constructor(l,d,_=new tc(l.width+200,l.height+200,25),w=new tc(l.width+200,l.height+200,25)){this.transform=l,this.grid=_,this.ignoredGrid=w,this.pitchfactor=Math.cos(l._pitch)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+No,this.screenBottomBoundary=l.height+No,this.gridRightBoundary=l.width+200,this.gridBottomBoundary=l.height+200,this.fogState=d}placeCollisionBox(l,d,_,w,C,D,I,A){let L=_.projectedAnchorX,R=_.projectedAnchorY,B=_.projectedAnchorZ;const q=_.elevation,X=_.tileID,K=l.getProjection();if(q&&X){const[ge,me,Te]=K.upVector(X.canonical,_.tileAnchorX,_.tileAnchorY),be=K.upVectorScale(X.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;L+=ge*q*be,R+=me*q*be,B+=Te*q*be}const J=this.projectAndGetPerspectiveRatio(I,L,R,B,_.tileID,"globe"===K.name||!!q||this.transform.pitch>0,K),Q=D*J.perspectiveRatio,U=(_.x1*d+w.x-_.padding)*Q+J.point.x,Y=(_.y1*d+w.y-_.padding)*Q+J.point.y,re=(_.x2*d+w.x+_.padding)*Q+J.point.x,ie=(_.y2*d+w.y+_.padding)*Q+J.point.y,pe=J.perspectiveRatio<=.55||J.occluded;return!this.isInsideGrid(U,Y,re,ie)||!C&&this.grid.hitTest(U,Y,re,ie,A)||pe?{box:[],offscreen:!1,occluded:J.occluded}:{box:[U,Y,re,ie],offscreen:this.isOffscreen(U,Y,re,ie),occluded:!1}}placeCollisionCircles(l,d,_,w,C,D,I,A,L,R,B,q,X,K,J){const Q=[],U=this.transform.elevation,Y=l.getProjection(),re=U?U.getAtTileOffsetFunc(J,this.transform.center.lat,this.transform.worldSize,Y):null,ie=new h.Point(_.tileAnchorX,_.tileAnchorY);let{x:pe,y:ge,z:me}=Y.projectTilePoint(ie.x,ie.y,J.canonical);if(re){const[Je,xt,ht]=re(ie);pe+=Je,ge+=xt,me+=ht}const Te="globe"===Y.name,be=this.projectAndGetPerspectiveRatio(I,pe,ge,me,J,Te||!!U||this.transform.pitch>0,Y),{perspectiveRatio:Ue}=be,yt=(B?D/Ue:D*Ue)/h.ONE_EM,Fe=Ki(pe,ge,me,A),tt=be.signedDistanceFromCamera>0?bm(yt,C,_.lineOffsetX*yt,_.lineOffsetY*yt,!1,Fe,ie,_,w,A,{},U&&!B?re:null,B&&!!U,Y,J,B):null;let qe=!1,gt=!1,Be=!0;if(tt&&!be.occluded){const Je=.5*X*Ue+K,xt=new h.Point(-100,-100),ht=new h.Point(this.screenRightBoundary,this.screenBottomBoundary),Et=new cd,{first:ln,last:In}=tt,Xt=ln.path.length;let vn=[];for(let on=Xt-1;on>=1;on--)vn.push(ln.path[on]);for(let on=1;on(re&&!Te&&(kr=re($non[3]<=0)&&(vn=[]));let Yn=[];if(vn.length>0){let on=1/0,rr=-1/0,kr=1/0,$n=-1/0;for(const Ar of vn)on=Math.min(on,Ar[0]),kr=Math.min(kr,Ar[1]),rr=Math.max(rr,Ar[0]),$n=Math.max($n,Ar[1]);rr>=xt.x&&on<=ht.x&&$n>=xt.y&&kr<=ht.y&&(Yn=[vn.map(Ar=>new h.Point(Ar[0],Ar[1]))],(onht.x||krht.y)&&(Yn=h.clipLine(Yn,xt.x,xt.y,ht.x,ht.y)))}for(const on of Yn){Et.reset(on,.25*Je);let rr=0;rr=Et.length<=.5*Je?1:Math.ceil(Et.paddedLength/Jn)+1;for(let kr=0;kr0?(h.transformMat4$1(A,A,l),this.fogState&&C&&"globe"!==I.name&&(L=function(q,X,K,J,Q,U){const Y=U.calculateFogTileMatrix(Q),re=[X,K,J];return h.transformMat4(re,re,Y),Ft(q,re,U.pitch,U._fov)}(this.fogState,d,_,w,C.toUnwrapped(),this.transform)>.9)):Kn(A,A,l);const R=A[3];return{point:new h.Point((A[0]/R+1)/2*this.transform.width+No,(-A[1]/R+1)/2*this.transform.height+No),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(I)/R*.5,1.5),signedDistanceFromCamera:R,occluded:D&&A[2]>R||L}}isOffscreen(l,d,_,w){return _=this.screenRightBoundary||wthis.screenBottomBoundary}isInsideGrid(l,d,_,w){return _>=0&&l=0&&d_.collisionGroupID===d}}return this.collisionGroups[l]}}function Gu(m,l,d,_,w){const{horizontalAlign:C,verticalAlign:D}=h.getAnchorAlignment(m),I=-(C-.5)*l,A=-(D-.5)*d,L=h.evaluateVariableOffset(m,_);return new h.Point(I+L[0]*w,A+L[1]*w)}function qu(m,l,d,_,w){const C=new h.Point(m,l);return d&&C._rotate(_?w:-w),C}class hd{constructor(l,d,_,w,C){this.transform=l.clone(),this.projection=l.projection.name,this.collisionIndex=new Uc(this.transform,C),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=d,this.retainedQueryData={},this.collisionGroups=new Jo(_),this.collisionCircleArrays={},this.prevPlacement=w,w&&(w.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(l,d,_,w){const C=_.getBucket(d),D=_.latestFeatureIndex;if(!C||!D||d.id!==C.layerIds[0])return;const I=C.layers[0].layout,A=_.collisionBoxArray,L=Math.pow(2,this.transform.zoom-_.tileID.overscaledZ),R=_.tileSize/h.EXTENT,B=_.tileID.toUnwrapped();this.transform.setProjection(C.projection);const q=(X=_.tileID,K=C.getProjection(),J=this.transform,K.name===this.projection?J.calculateProjMatrix(X.toUnwrapped()):fl(J,K,X));var X,K,J;const Q="map"===I.get("text-pitch-alignment"),U="map"===I.get("text-rotation-alignment");d.compileFilter();const Y=d.dynamicFilter(),re=d.dynamicFilterNeedsFeature(),ie=this.transform.calculatePixelsToTileUnitsMatrix(_),pe=fa(q,_.tileID.canonical,Q,U,this.transform,C.getProjection(),ie);let ge=null;if(Q){const be=Bi(q,_.tileID.canonical,Q,U,this.transform,C.getProjection(),ie);ge=h.multiply([],this.transform.labelPlaneMatrix,be)}let me=null;Y&&_.latestFeatureIndex&&(me={unwrappedTileID:B,dynamicFilter:Y,dynamicFilterNeedsFeature:re,featureIndex:_.latestFeatureIndex}),this.retainedQueryData[C.bucketInstanceId]=new ud(C.bucketInstanceId,D,C.sourceLayerIndex,C.index,_.tileID);const Te={bucket:C,layout:I,posMatrix:q,textLabelPlaneMatrix:pe,labelToScreenMatrix:ge,clippingData:me,scale:L,textPixelRatio:R,holdingForFade:_.holdingForFade(),collisionBoxArray:A,partiallyEvaluatedTextSize:h.evaluateSizeForZoom(C.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:h.evaluateSizeForZoom(C.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(C.sourceID)};if(w)for(const be of C.sortKeyRanges){const{sortKey:Ue,symbolInstanceStart:yt,symbolInstanceEnd:Fe}=be;l.push({sortKey:Ue,symbolInstanceStart:yt,symbolInstanceEnd:Fe,parameters:Te})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:C.symbolInstances.length,parameters:Te})}attemptAnchorPlacement(l,d,_,w,C,D,I,A,L,R,B,q,X,K,J,Q,U,Y){const{textOffset0:re,textOffset1:ie,crossTileID:pe}=q,ge=[re,ie],me=Gu(l,_,w,ge,C),Te=this.collisionIndex.placeCollisionBox(K,C,d,qu(me.x,me.y,D,I,this.transform.angle),B,A,L,R.predicate);if(Q){const be=K.getSymbolInstanceIconSize(Y,this.transform.zoom,q.placedIconSymbolIndex);if(0===this.collisionIndex.placeCollisionBox(K,be,Q,qu(me.x,me.y,D,I,this.transform.angle),B,A,L,R.predicate).box.length)return}if(Te.box.length>0){let be;return this.prevPlacement&&this.prevPlacement.variableOffsets[pe]&&this.prevPlacement.placements[pe]&&this.prevPlacement.placements[pe].text&&(be=this.prevPlacement.variableOffsets[pe].anchor),this.variableOffsets[pe]={textOffset:ge,width:_,height:w,anchor:l,textScale:C,prevAnchor:be},this.markUsedJustification(K,l,q,J),K.allowVerticalPlacement&&(this.markUsedOrientation(K,J,q),this.placedOrientations[pe]=J),{shift:me,placedGlyphBoxes:Te}}}placeLayerBucketPart(l,d,_,w){const{bucket:C,layout:D,posMatrix:I,textLabelPlaneMatrix:A,labelToScreenMatrix:L,clippingData:R,textPixelRatio:B,holdingForFade:q,collisionBoxArray:X,partiallyEvaluatedTextSize:K,partiallyEvaluatedIconSize:J,collisionGroup:Q}=l.parameters,U=D.get("text-optional"),Y=D.get("icon-optional"),re=D.get("text-allow-overlap"),ie=D.get("icon-allow-overlap"),pe="map"===D.get("text-rotation-alignment"),ge="map"===D.get("text-pitch-alignment"),me="none"!==D.get("icon-text-fit"),Te="viewport-y"===D.get("symbol-z-order");this.transform.setProjection(C.projection);let be=re&&(ie||!C.hasIconData()||Y),Ue=ie&&(re||!C.hasTextData()||U);!C.collisionArrays&&X&&C.deserializeCollisionBoxes(X),_&&w&&C.updateCollisionDebugBuffers(this.transform.zoom,X);const yt=(Fe,tt,qe)=>{const{crossTileID:gt,numVerticalGlyphVertices:Be}=Fe;if(R){const ai={zoom:this.transform.zoom,pitch:this.transform.pitch};let Mr=null;if(R.dynamicFilterNeedsFeature){const fr=this.retainedQueryData[C.bucketInstanceId];Mr=R.featureIndex.loadFeature({featureIndex:Fe.featureIndex,bucketIndex:fr.bucketIndex,sourceLayerIndex:fr.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,R.dynamicFilter)(ai,Mr,this.retainedQueryData[C.bucketInstanceId].tileID.canonical,new h.Point(Fe.tileAnchorX,Fe.tileAnchorY),this.transform.calculateDistanceTileData(R.unwrappedTileID)))return this.placements[gt]=new jc(!1,!1,!1,!0),void d.add(gt)}if(d.has(gt))return;if(q)return void(this.placements[gt]=new jc(!1,!1,!1));let Je=!1,xt=!1,ht=!0,Et=!1,ln=!1,In=null,Xt={box:null,offscreen:null,occluded:null},vn={box:null,offscreen:null,occluded:null},Jn=null,Yn=null,on=null,rr=0,kr=0,$n=0;qe.textFeatureIndex?rr=qe.textFeatureIndex:Fe.useRuntimeCollisionCircles&&(rr=Fe.featureIndex),qe.verticalTextFeatureIndex&&(kr=qe.verticalTextFeatureIndex);const Ar=ai=>{ai.tileID=this.retainedQueryData[C.bucketInstanceId].tileID;const Mr=this.transform.elevation;(Mr||ai.elevation)&&(ai.elevation=Mr?Mr.getAtTileOffset(ai.tileID,ai.tileAnchorX,ai.tileAnchorY):0)},Do=qe.textBox;if(Do){Ar(Do);const ai=fr=>{let Rr=h.WritingMode.horizontal;if(C.allowVerticalPlacement&&!fr&&this.prevPlacement){const Io=this.prevPlacement.placedOrientations[gt];Io&&(this.placedOrientations[gt]=Io,Rr=Io,this.markUsedOrientation(C,Rr,Fe))}return Rr},Mr=(fr,Rr)=>{if(C.allowVerticalPlacement&&Be>0&&qe.verticalTextBox){for(const Io of C.writingModes)if(Io===h.WritingMode.vertical?(Xt=Rr(),vn=Xt):Xt=fr(),Xt&&Xt.box&&Xt.box.length)break}else Xt=fr()};if(D.get("text-variable-anchor")){let fr=D.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[gt]){const Gr=this.prevPlacement.variableOffsets[gt];fr.indexOf(Gr.anchor)>0&&(fr=fr.filter(ir=>ir!==Gr.anchor),fr.unshift(Gr.anchor))}const Rr=(Gr,ir,su)=>{const Js=C.getSymbolInstanceTextSize(K,Fe,this.transform.zoom,tt),Ji=(Gr.x2-Gr.x1)*Js+2*Gr.padding,Ga=(Gr.y2-Gr.y1)*Js+2*Gr.padding,Ns=me&&!ie?ir:null;Ns&&Ar(Ns);let zs={box:[],offscreen:!1,occluded:!1};const So=re?2*fr.length:fr.length;for(let sh=0;sh=fr.length,Fe,tt,C,su,Ns,K,J);if(ah&&(zs=ah.placedGlyphBoxes,zs&&zs.box&&zs.box.length)){Je=!0,In=ah.shift;break}}return zs};Mr(()=>Rr(Do,qe.iconBox,h.WritingMode.horizontal),()=>{const Gr=qe.verticalTextBox;return Gr&&Ar(Gr),C.allowVerticalPlacement&&!(Xt&&Xt.box&&Xt.box.length)&&Be>0&&Gr?Rr(Gr,qe.verticalIconBox,h.WritingMode.vertical):{box:null,offscreen:null,occluded:null}}),Xt&&(Je=Xt.box,ht=Xt.offscreen,Et=Xt.occluded);const Io=ai(!(!Xt||!Xt.box));if(!Je&&this.prevPlacement){const Gr=this.prevPlacement.variableOffsets[gt];Gr&&(this.variableOffsets[gt]=Gr,this.markUsedJustification(C,Gr.anchor,Fe,Io))}}else{const fr=(Rr,Io)=>{const Gr=C.getSymbolInstanceTextSize(K,Fe,this.transform.zoom,tt),ir=this.collisionIndex.placeCollisionBox(C,Gr,Rr,new h.Point(0,0),re,B,I,Q.predicate);return ir&&ir.box&&ir.box.length&&(this.markUsedOrientation(C,Io,Fe),this.placedOrientations[gt]=Io),ir};Mr(()=>fr(Do,h.WritingMode.horizontal),()=>{const Rr=qe.verticalTextBox;return C.allowVerticalPlacement&&Be>0&&Rr?(Ar(Rr),fr(Rr,h.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}}),ai(!!(Xt&&Xt.box&&Xt.box.length))}}if(Jn=Xt,Je=Jn&&Jn.box&&Jn.box.length>0,ht=Jn&&Jn.offscreen,Et=Jn&&Jn.occluded,Fe.useRuntimeCollisionCircles){const ai=C.text.placedSymbolArray.get(Fe.centerJustifiedTextSymbolIndex>=0?Fe.centerJustifiedTextSymbolIndex:Fe.verticalPlacedTextSymbolIndex),Mr=h.evaluateSizeForFeature(C.textSizeData,K,ai),fr=D.get("text-padding");Yn=this.collisionIndex.placeCollisionCircles(C,re,ai,C.lineVertexArray,C.glyphOffsetArray,Mr,I,A,L,_,ge,Q.predicate,Fe.collisionCircleDiameter*Mr/h.ONE_EM,fr,this.retainedQueryData[C.bucketInstanceId].tileID),Je=re||Yn.circles.length>0&&!Yn.collisionDetected,ht=ht&&Yn.offscreen,Et=Yn.occluded}if(qe.iconFeatureIndex&&($n=qe.iconFeatureIndex),qe.iconBox){const ai=Mr=>{Ar(Mr);const fr=me&&In?qu(In.x,In.y,pe,ge,this.transform.angle):new h.Point(0,0),Rr=C.getSymbolInstanceIconSize(J,this.transform.zoom,Fe.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(C,Rr,Mr,fr,ie,B,I,Q.predicate)};vn&&vn.box&&vn.box.length&&qe.verticalIconBox?(on=ai(qe.verticalIconBox),xt=on.box.length>0):(on=ai(qe.iconBox),xt=on.box.length>0),ht=ht&&on.offscreen,ln=on.occluded}const co=U||0===Fe.numHorizontalGlyphVertices&&0===Be,_s=Y||0===Fe.numIconVertices;if(co||_s?_s?co||(xt=xt&&Je):Je=xt&&Je:xt=Je=xt&&Je,Je&&Jn&&Jn.box&&this.collisionIndex.insertCollisionBox(Jn.box,D.get("text-ignore-placement"),C.bucketInstanceId,vn&&vn.box&&kr?kr:rr,Q.ID),xt&&on&&this.collisionIndex.insertCollisionBox(on.box,D.get("icon-ignore-placement"),C.bucketInstanceId,$n,Q.ID),Yn&&(Je&&this.collisionIndex.insertCollisionCircles(Yn.circles,D.get("text-ignore-placement"),C.bucketInstanceId,rr,Q.ID),_)){const ai=C.bucketInstanceId;let Mr=this.collisionCircleArrays[ai];void 0===Mr&&(Mr=this.collisionCircleArrays[ai]=new $c);for(let fr=0;fr=0;--tt){const qe=Fe[tt];yt(C.symbolInstances.get(qe),qe,C.collisionArrays[qe])}}else for(let Fe=l.symbolInstanceStart;Fe=0&&(l.text.placedSymbolArray.get(C).crossTileID=B>=0&&C!==B?0:L),D>=0&&(l.text.placedSymbolArray.get(D).crossTileID=B>=0&&D!==B?0:L),I>=0&&(l.text.placedSymbolArray.get(I).crossTileID=B>=0&&I!==B?0:L),A>=0&&(l.text.placedSymbolArray.get(A).crossTileID=B>=0&&A!==B?0:L)}markUsedOrientation(l,d,_){const w=d===h.WritingMode.horizontal||d===h.WritingMode.horizontalOnly?d:0,C=d===h.WritingMode.vertical?d:0,{leftJustifiedTextSymbolIndex:D,centerJustifiedTextSymbolIndex:I,rightJustifiedTextSymbolIndex:A,verticalPlacedTextSymbolIndex:L}=_,R=l.text.placedSymbolArray;D>=0&&(R.get(D).placedOrientation=w),I>=0&&(R.get(I).placedOrientation=w),A>=0&&(R.get(A).placedOrientation=w),L>=0&&(R.get(L).placedOrientation=C)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;const d=this.prevPlacement;let _=!1;this.prevZoomAdjustment=d?d.zoomAdjustment(this.transform.zoom):0;const w=d?d.symbolFadeChange(l):1,C=d?d.opacities:{},D=d?d.variableOffsets:{},I=d?d.placedOrientations:{};for(const A in this.placements){const L=this.placements[A],R=C[A];R?(this.opacities[A]=new ma(R,w,L.text,L.icon,null,L.clipped),_=_||L.text!==R.text.placed||L.icon!==R.icon.placed):(this.opacities[A]=new ma(null,w,L.text,L.icon,L.skipFade,L.clipped),_=_||L.text||L.icon)}for(const A in C){const L=C[A];if(!this.opacities[A]){const R=new ma(L,w,!1,!1);R.isHidden()||(this.opacities[A]=R,_=_||L.text.placed||L.icon.placed)}}for(const A in D)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=D[A]);for(const A in I)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=I[A]);_?this.lastPlacementChangeTime=l:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=d?d.lastPlacementChangeTime:l)}updateLayerOpacities(l,d){const _=new Set;for(const w of d){const C=w.getBucket(l);C&&w.latestFeatureIndex&&l.id===C.layerIds[0]&&this.updateBucketOpacities(C,_,w.collisionBoxArray)}}updateBucketOpacities(l,d,_){l.hasTextData()&&l.text.opacityVertexArray.clear(),l.hasIconData()&&l.icon.opacityVertexArray.clear(),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexArray.clear(),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexArray.clear();const w=l.layers[0].layout,C=!!l.layers[0].dynamicFilter(),D=new ma(null,0,!1,!1,!0),I=w.get("text-allow-overlap"),A=w.get("icon-allow-overlap"),L=w.get("text-variable-anchor"),R="map"===w.get("text-rotation-alignment"),B="map"===w.get("text-pitch-alignment"),q="none"!==w.get("icon-text-fit"),X=new ma(null,0,I&&(A||!l.hasIconData()||w.get("icon-optional")),A&&(I||!l.hasTextData()||w.get("text-optional")),!0);!l.collisionArrays&&_&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(_);const K=(Q,U,Y)=>{for(let re=0;re0||re>0,be=pe>0,Ue=this.placedOrientations[ie],yt=Ue===h.WritingMode.vertical,Fe=Ue===h.WritingMode.horizontal||Ue===h.WritingMode.horizontalOnly;if(!Te&&!be||me.isHidden()||J++,Te){const tt=Bo(me.text);K(l.text,Y,yt?Pi:tt),K(l.text,re,Fe?Pi:tt);const qe=me.text.isHidden(),{leftJustifiedTextSymbolIndex:gt,centerJustifiedTextSymbolIndex:Be,rightJustifiedTextSymbolIndex:Je,verticalPlacedTextSymbolIndex:xt}=U,ht=l.text.placedSymbolArray,Et=qe||yt?1:0;gt>=0&&(ht.get(gt).hidden=Et),Be>=0&&(ht.get(Be).hidden=Et),Je>=0&&(ht.get(Je).hidden=Et),xt>=0&&(ht.get(xt).hidden=qe||Fe?1:0);const ln=this.variableOffsets[ie];ln&&this.markUsedJustification(l,ln.anchor,U,Ue);const In=this.placedOrientations[ie];In&&(this.markUsedJustification(l,"left",U,In),this.markUsedOrientation(l,In,U))}if(be){const tt=Bo(me.icon),{placedIconSymbolIndex:qe,verticalPlacedIconSymbolIndex:gt}=U,Be=l.icon.placedSymbolArray,Je=me.icon.isHidden()?1:0;qe>=0&&(K(l.icon,pe,yt?Pi:tt),Be.get(qe).hidden=Je),gt>=0&&(K(l.icon,U.numVerticalIconVertices,Fe?Pi:tt),Be.get(gt).hidden=Je)}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){const tt=l.collisionArrays[Q];if(tt){let qe=new h.Point(0,0),gt=!0;if(tt.textBox||tt.verticalTextBox){if(L){const Je=this.variableOffsets[ie];Je?(qe=Gu(Je.anchor,Je.width,Je.height,Je.textOffset,Je.textScale),R&&qe._rotate(B?this.transform.angle:-this.transform.angle)):gt=!1}C&&(gt=!me.clipped),tt.textBox&&Hc(l.textCollisionBox.collisionVertexArray,me.text.placed,!gt||yt,qe.x,qe.y),tt.verticalTextBox&&Hc(l.textCollisionBox.collisionVertexArray,me.text.placed,!gt||Fe,qe.x,qe.y)}const Be=gt&&!(Fe||!tt.verticalIconBox);tt.iconBox&&Hc(l.iconCollisionBox.collisionVertexArray,me.icon.placed,Be,q?qe.x:0,q?qe.y:0),tt.verticalIconBox&&Hc(l.iconCollisionBox.collisionVertexArray,me.icon.placed,!Be,q?qe.x:0,q?qe.y:0)}}}if(l.fullyClipped=0===J,l.sortFeatures(this.transform.angle),this.retainedQueryData[l.bucketInstanceId]&&(this.retainedQueryData[l.bucketInstanceId].featureSortOrder=l.featureSortOrder),l.hasTextData()&&l.text.opacityVertexBuffer&&l.text.opacityVertexBuffer.updateData(l.text.opacityVertexArray),l.hasIconData()&&l.icon.opacityVertexBuffer&&l.icon.opacityVertexBuffer.updateData(l.icon.opacityVertexArray),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexBuffer&&l.iconCollisionBox.collisionVertexBuffer.updateData(l.iconCollisionBox.collisionVertexArray),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexBuffer&&l.textCollisionBox.collisionVertexBuffer.updateData(l.textCollisionBox.collisionVertexArray),l.bucketInstanceId in this.collisionCircleArrays){const Q=this.collisionCircleArrays[l.bucketInstanceId];l.placementInvProjMatrix=Q.invProjMatrix,l.placementViewportMatrix=Q.viewportMatrix,l.collisionCircleArray=Q.circles,delete this.collisionCircleArrays[l.bucketInstanceId]}}symbolFadeChange(l){return 0===this.fadeDuration?1:(l-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(l){return Math.max(0,(this.transform.zoom-l)/1.5)}hasTransitions(l){return this.stale||l-this.lastPlacementChangeTimel}setStale(){this.stale=!0}}function Hc(m,l,d,_,w){m.emplaceBack(l?1:0,d?1:0,_||0,w||0),m.emplaceBack(l?1:0,d?1:0,_||0,w||0),m.emplaceBack(l?1:0,d?1:0,_||0,w||0),m.emplaceBack(l?1:0,d?1:0,_||0,w||0)}const zo=Math.pow(2,25),Si=Math.pow(2,24),Ef=Math.pow(2,17),Ws=Math.pow(2,16),Qo=Math.pow(2,9),Sr=Math.pow(2,8),pl=Math.pow(2,1);function Bo(m){if(0===m.opacity&&!m.placed)return 0;if(1===m.opacity&&m.placed)return 4294967295;const l=m.placed?1:0,d=Math.floor(127*m.opacity);return d*zo+l*Si+d*Ef+l*Ws+d*Qo+l*Sr+d*pl+l}const Pi=0;class Wu{constructor(l){this._sortAcrossTiles="viewport-y"!==l.layout.get("symbol-z-order")&&void 0!==l.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(l,d,_,w,C){const D=this._bucketParts;for(;this._currentTileIndexI.sortKey-A.sortKey));this._currentPartIndex{const D=h.exported.now()-w;return!this._forceFullPlacement&&D>2};for(;this._currentPlacementIndex>=0;){const D=d[l[this._currentPlacementIndex]],I=this.placement.collisionIndex.transform.zoom;if("symbol"===D.type&&(!D.minzoom||D.minzoom<=I)&&(!D.maxzoom||D.maxzoom>I)){if(this._inProgressLayer||(this._inProgressLayer=new Wu(D)),this._inProgressLayer.continuePlacement(_[D.source],this.placement,this._showCollisionBoxes,D,C))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}const Na=512/h.EXTENT/2;class lo{constructor(l,d,_){this.tileID=l,this.bucketInstanceId=_,this.index=new h.KDBush(d.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];const w=l.canonical.x*h.EXTENT,C=l.canonical.y*h.EXTENT;for(let D=0;Dl.overscaledZ)for(const I in D){const A=D[I];A.tileID.isChildOf(l)&&A.findMatches(d.symbolInstances,l,w)}else{const I=D[l.scaledTo(Number(C)).key];I&&I.findMatches(d.symbolInstances,l,w)}}for(let C=0;C{d[_]=!0});for(const _ in this.layerIndexes)d[_]||delete this.layerIndexes[_]}}const za=(m,l)=>h.emitValidationErrors(m,l&&l.filter(d=>"source.canvas"!==d.identifier)),pd=h.pick(vr,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),F_=h.pick(vr,["setCenter","setZoom","setBearing","setPitch"]),Tf={version:8,layers:[],sources:{}},Gc={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Zs extends h.Evented{constructor(l,d={}){super(),this.map=l,this.dispatcher=new sn(Bc(),this),this.imageManager=new vt,this.imageManager.setEventedParent(this),this.glyphManager=new h.GlyphManager(l._requestManager,d.localFontFamily?h.LocalGlyphMode.all:d.localIdeographFontFamily?h.LocalGlyphMode.ideographs:h.LocalGlyphMode.none,d.localFontFamily||d.localIdeographFontFamily),this.crossTileSymbolIndex=new ga,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",h.getReferrer());const _=this;this._rtlTextPluginCallback=Zs.registerForPluginStateChange(w=>{_.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:w.pluginStatus,pluginURL:w.pluginURL},(C,D)=>{if(h.triggerPluginCompletionEvent(C),D&&D.every(I=>I))for(const I in _._sourceCaches){const A=_._sourceCaches[I],L=A.getSource().type;"vector"!==L&&"geojson"!==L||A.reload()}})}),this.on("data",w=>{if("source"!==w.dataType||"metadata"!==w.sourceDataType)return;const C=this.getSource(w.sourceId);if(C&&C.vectorLayerIds)for(const D in this._layers){const I=this._layers[D];I.source===C.id&&this._validateLayer(I)}})}loadURL(l,d={}){this.fire(new h.Event("dataloading",{dataType:"style"}));const _="boolean"==typeof d.validate?d.validate:!h.isMapboxURL(l);l=this.map._requestManager.normalizeStyleURL(l,d.accessToken);const w=this.map._requestManager.transformRequest(l,h.ResourceType.Style);this._request=h.getJSON(w,(C,D)=>{this._request=null,C?this.fire(new h.ErrorEvent(C)):D&&this._load(D,_)})}loadJSON(l,d={}){this.fire(new h.Event("dataloading",{dataType:"style"})),this._request=h.exported.frame(()=>{this._request=null,this._load(l,!1!==d.validate)})}loadEmpty(){this.fire(new h.Event("dataloading",{dataType:"style"})),this._load(Tf,!1)}_updateLayerCount(l,d){const _=d?1:-1;l.is3D()&&(this._num3DLayers+=_),"circle"===l.type&&(this._numCircleLayers+=_),"symbol"===l.type&&(this._numSymbolLayers+=_)}_load(l,d){if(d&&za(this,h.validateStyle(l)))return;this._loaded=!0,this.stylesheet=h.clone$1(l),this._updateMapProjection();for(const w in l.sources)this.addSource(w,l.sources[w],{validate:!1});this._changed=!1,l.sprite?this._loadSprite(l.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(l.glyphs);const _=L_(this.stylesheet.layers);this._order=_.map(w=>w.id),this._layers={},this._serializedLayers={};for(const w of _){const C=h.createStyleLayer(w);C.setEventedParent(this,{layer:{id:C.id}}),this._layers[C.id]=C,this._serializedLayers[C.id]=C.serialize(),this._updateLayerCount(C,!0)}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new qn(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new h.Event("data",{dataType:"style"})),this.fire(new h.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&0===this.terrain.drapeRenderMode}setProjection(l){l?this.stylesheet.projection=l:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(l){this._spriteRequest=function(d,_,w){let C,D,I;const A=h.exported.devicePixelRatio>1?"@2x":"";let L=h.getJSON(_.transformRequest(_.normalizeSpriteURL(d,A,".json"),h.ResourceType.SpriteJSON),(q,X)=>{L=null,I||(I=q,C=X,B())}),R=h.getImage(_.transformRequest(_.normalizeSpriteURL(d,A,".png"),h.ResourceType.SpriteImage),(q,X)=>{R=null,I||(I=q,D=X,B())});function B(){if(I)w(I);else if(C&&D){const q=h.exported.getImageData(D),X={};for(const K in C){const{width:J,height:Q,x:U,y:Y,sdf:re,pixelRatio:ie,stretchX:pe,stretchY:ge,content:me}=C[K],Te=new h.RGBAImage({width:J,height:Q});h.RGBAImage.copy(q,Te,{x:U,y:Y},{x:0,y:0},{width:J,height:Q}),X[K]={data:Te,pixelRatio:ie,sdf:re,stretchX:pe,stretchY:ge,content:me}}w(null,X)}}return{cancel(){L&&(L.cancel(),L=null),R&&(R.cancel(),R=null)}}}(l,this.map._requestManager,(d,_)=>{if(this._spriteRequest=null,d)this.fire(new h.ErrorEvent(d));else if(_)for(const w in _)this.imageManager.addImage(w,_[w]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new h.Event("data",{dataType:"style"}))})}_validateLayer(l){const d=this.getSource(l.source);if(!d)return;const _=l.sourceLayer;_&&("geojson"===d.type||d.vectorLayerIds&&-1===d.vectorLayerIds.indexOf(_))&&this.fire(new h.ErrorEvent(new Error(`Source layer "${_}" does not exist on source "${d.id}" as specified by style layer "${l.id}"`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const l in this._sourceCaches)if(!this._sourceCaches[l].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(l){const d=[];for(const _ of l){const w=this._layers[_];"custom"!==w.type&&d.push(w.serialize())}return d}hasTransitions(){if(this.light&&this.light.hasTransition()||this.fog&&this.fog.hasTransition())return!0;for(const l in this._sourceCaches)if(this._sourceCaches[l].hasTransition())return!0;for(const l in this._layers)if(this._layers[l].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(l){return!!this.terrain&&("function"==typeof l.isLayerDraped?l.isLayerDraped():Gc[l.type])}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(l){if(!this._loaded)return;const d=this._changed;if(this._changed){const w=Object.keys(this._updatedLayers),C=Object.keys(this._removedLayers);(w.length||C.length)&&this._updateWorkerLayers(w,C);for(const D in this._updatedSources){const I=this._updatedSources[D];"reload"===I?this._reloadSource(D):"clear"===I&&this._clearSource(D)}this._updateTilesForChangedImages();for(const D in this._updatedPaintProps)this._layers[D].updateTransitions(l);this.light.updateTransitions(l),this.fog&&this.fog.updateTransitions(l),this._resetUpdates()}const _={};for(const w in this._sourceCaches){const C=this._sourceCaches[w];_[w]=C.used,C.used=!1}for(const w of this._order){const C=this._layers[w];if(C.recalculate(l,this._availableImages),!C.isHidden(l.zoom)){const I=this._getLayerSourceCache(C);I&&(I.used=!0)}const D=this.map.painter;if(D){const I=C.getProgramIds();if(!I)continue;const A=C.getProgramConfiguration(l.zoom);for(const L of I)D.useProgram(L,A)}}for(const w in _){const C=this._sourceCaches[w];_[w]!==C.used&&C.getSource().fire(new h.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:C.getSource().id}))}this.light.recalculate(l),this.terrain&&this.terrain.recalculate(l),this.fog&&this.fog.recalculate(l),this.z=l.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),d&&this.fire(new h.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const l=Object.keys(this._changedImages);if(l.length){for(const d in this._sourceCaches)this._sourceCaches[d].reloadTilesForDependencies(["icons","patterns"],l);this._changedImages={}}}_updateWorkerLayers(l,d){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(l),removedIds:d})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(l){if(this._checkLoaded(),za(this,h.validateStyle(l)))return!1;(l=h.clone$1(l)).layers=L_(l.layers);const d=function(w,C){if(!w)return[{command:vr.setStyle,args:[C]}];let D=[];try{if(!W(w.version,C.version))return[{command:vr.setStyle,args:[C]}];W(w.center,C.center)||D.push({command:vr.setCenter,args:[C.center]}),W(w.zoom,C.zoom)||D.push({command:vr.setZoom,args:[C.zoom]}),W(w.bearing,C.bearing)||D.push({command:vr.setBearing,args:[C.bearing]}),W(w.pitch,C.pitch)||D.push({command:vr.setPitch,args:[C.pitch]}),W(w.sprite,C.sprite)||D.push({command:vr.setSprite,args:[C.sprite]}),W(w.glyphs,C.glyphs)||D.push({command:vr.setGlyphs,args:[C.glyphs]}),W(w.transition,C.transition)||D.push({command:vr.setTransition,args:[C.transition]}),W(w.light,C.light)||D.push({command:vr.setLight,args:[C.light]}),W(w.fog,C.fog)||D.push({command:vr.setFog,args:[C.fog]}),W(w.projection,C.projection)||D.push({command:vr.setProjection,args:[C.projection]});const I={},A=[];!function(B,q,X,K){let J;for(J in q=q||{},B=B||{})B.hasOwnProperty(J)&&(q.hasOwnProperty(J)||ju(J,X,K));for(J in q){if(!q.hasOwnProperty(J))continue;const Q=q[J];B.hasOwnProperty(J)?W(B[J],Q)||("geojson"===B[J].type&&"geojson"===Q.type&&ld(B,q,J)?X.push({command:vr.setGeoJSONSourceData,args:[J,Q.data]}):ad(J,q,X,K)):xm(J,q,X)}}(w.sources,C.sources,A,I);const L=[];w.layers&&w.layers.forEach(B=>{B.source&&I[B.source]?D.push({command:vr.removeLayer,args:[B.id]}):L.push(B)});let R=w.terrain;R&&I[R.source]&&(D.push({command:vr.setTerrain,args:[void 0]}),R=void 0),D=D.concat(A),W(R,C.terrain)||D.push({command:vr.setTerrain,args:[C.terrain]}),function(B,q,X){q=q||[];const K=(B=B||[]).map(La),J=q.map(La),Q=B.reduce($u,{}),U=q.reduce($u,{}),Y=K.slice(),re=Object.create(null);let ie,pe,ge,me,Te,be,Ue;for(ie=0,pe=0;ie!(w.command in F_));if(0===d.length)return!1;const _=d.filter(w=>!(w.command in pd));if(_.length>0)throw new Error(`Unimplemented: ${_.map(w=>w.command).join(", ")}.`);return d.forEach(w=>{"setTransition"!==w.command&&"setProjection"!==w.command&&this[w.command].apply(this,w.args)}),this.stylesheet=l,this._updateMapProjection(),!0}addImage(l,d){return this.getImage(l)?this.fire(new h.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(l,d),this._afterImageUpdated(l),this)}updateImage(l,d){this.imageManager.updateImage(l,d)}getImage(l){return this.imageManager.getImage(l)}removeImage(l){return this.getImage(l)?(this.imageManager.removeImage(l),this._afterImageUpdated(l),this):this.fire(new h.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(l){this._availableImages=this.imageManager.listImages(),this._changedImages[l]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new h.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(l,d,_={}){if(this._checkLoaded(),void 0!==this.getSource(l))throw new Error("There is already a source with this ID");if(!d.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(d).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(d.type)>=0&&this._validate(h.validateSource,`sources.${l}`,d,null,_))return;this.map&&this.map._collectResourceTiming&&(d.collectResourceTiming=!0);const w=an(l,d,this.dispatcher,this);w.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(l),source:w.serialize(),sourceId:l}));const C=D=>{const I=(D?"symbol:":"other:")+l,A=this._sourceCaches[I]=new h.SourceCache(I,w,D);(D?this._symbolSourceCaches:this._otherSourceCaches)[l]=A,A.style=this,A.onAdd(this.map)};C(!1),"vector"!==d.type&&"geojson"!==d.type||C(!0),w.onAdd&&w.onAdd(this.map),this._changed=!0}removeSource(l){this._checkLoaded();const d=this.getSource(l);if(!d)throw new Error("There is no source with this ID");for(const w in this._layers)if(this._layers[w].source===l)return this.fire(new h.ErrorEvent(new Error(`Source "${l}" cannot be removed while layer "${w}" is using it.`)));if(this.terrain&&this.terrain.get().source===l)return this.fire(new h.ErrorEvent(new Error(`Source "${l}" cannot be removed while terrain is using it.`)));const _=this._getSourceCaches(l);for(const w of _)delete this._sourceCaches[w.id],delete this._updatedSources[w.id],w.fire(new h.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:w.getSource().id})),w.setEventedParent(null),w.clearTiles();return delete this._otherSourceCaches[l],delete this._symbolSourceCaches[l],d.setEventedParent(null),d.onRemove&&d.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(l,d){this._checkLoaded(),this.getSource(l).setData(d),this._changed=!0}getSource(l){const d=this._getSourceCache(l);return d&&d.getSource()}_getSources(){const l=[];for(const d in this._otherSourceCaches){const _=this._getSourceCache(d);_&&l.push(_.getSource())}return l}addLayer(l,d,_={}){this._checkLoaded();const w=l.id;if(this.getLayer(w))return void this.fire(new h.ErrorEvent(new Error(`Layer with id "${w}" already exists on this map`)));let C;if("custom"===l.type){if(za(this,h.validateCustomStyleLayer(l)))return;C=h.createStyleLayer(l)}else{if("object"==typeof l.source&&(this.addSource(w,l.source),l=h.clone$1(l),l=h.extend(l,{source:w})),this._validate(h.validateLayer,`layers.${w}`,l,{arrayIndex:-1},_))return;C=h.createStyleLayer(l),this._validateLayer(C),C.setEventedParent(this,{layer:{id:w}}),this._serializedLayers[C.id]=C.serialize(),this._updateLayerCount(C,!0)}const D=d?this._order.indexOf(d):this._order.length;if(d&&-1===D)return void this.fire(new h.ErrorEvent(new Error(`Layer with id "${d}" does not exist on this map.`)));this._order.splice(D,0,w),this._layerOrderChanged=!0,this._layers[w]=C;const I=this._getLayerSourceCache(C);if(this._removedLayers[w]&&C.source&&I&&"custom"!==C.type){const A=this._removedLayers[w];delete this._removedLayers[w],A.type!==C.type?this._updatedSources[C.source]="clear":(this._updatedSources[C.source]="reload",I.pause())}this._updateLayer(C),C.onAdd&&C.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(l,d){if(this._checkLoaded(),this._changed=!0,!this._layers[l])return void this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be moved.`)));if(l===d)return;const _=this._order.indexOf(l);this._order.splice(_,1);const w=d?this._order.indexOf(d):this._order.length;d&&-1===w?this.fire(new h.ErrorEvent(new Error(`Layer with id "${d}" does not exist on this map.`))):(this._order.splice(w,0,l),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(l){this._checkLoaded();const d=this._layers[l];if(!d)return void this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be removed.`)));d.setEventedParent(null),this._updateLayerCount(d,!1);const _=this._order.indexOf(l);this._order.splice(_,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[l]=d,delete this._layers[l],delete this._serializedLayers[l],delete this._updatedLayers[l],delete this._updatedPaintProps[l],d.onRemove&&d.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(l){return this._layers[l]}hasLayer(l){return l in this._layers}hasLayerType(l){for(const d in this._layers)if(this._layers[d].type===l)return!0;return!1}setLayerZoomRange(l,d,_){this._checkLoaded();const w=this.getLayer(l);w?w.minzoom===d&&w.maxzoom===_||(null!=d&&(w.minzoom=d),null!=_&&(w.maxzoom=_),this._updateLayer(w)):this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(l,d,_={}){this._checkLoaded();const w=this.getLayer(l);if(w){if(!W(w.filter,d))return null==d?(w.filter=void 0,void this._updateLayer(w)):void(this._validate(h.validateFilter,`layers.${w.id}.filter`,d,{layerType:w.type},_)||(w.filter=h.clone$1(d),this._updateLayer(w)))}else this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be filtered.`)))}getFilter(l){const d=this.getLayer(l);return d&&h.clone$1(d.filter)}setLayoutProperty(l,d,_,w={}){this._checkLoaded();const C=this.getLayer(l);C?W(C.getLayoutProperty(d),_)||(C.setLayoutProperty(d,_,w),this._updateLayer(C)):this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(l,d){const _=this.getLayer(l);if(_)return _.getLayoutProperty(d);this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style.`)))}setPaintProperty(l,d,_,w={}){this._checkLoaded();const C=this.getLayer(l);C?W(C.getPaintProperty(d),_)||(C.setPaintProperty(d,_,w)&&this._updateLayer(C),this._changed=!0,this._updatedPaintProps[l]=!0):this.fire(new h.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(l,d){const _=this.getLayer(l);return _&&_.getPaintProperty(d)}setFeatureState(l,d){this._checkLoaded();const _=l.source,w=l.sourceLayer,C=this.getSource(_);if(!C)return void this.fire(new h.ErrorEvent(new Error(`The source '${_}' does not exist in the map's style.`)));const D=C.type;if("geojson"===D&&w)return void this.fire(new h.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===D&&!w)return void this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));void 0===l.id&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided.")));const I=this._getSourceCaches(_);for(const A of I)A.setFeatureState(w,l.id,d)}removeFeatureState(l,d){this._checkLoaded();const _=l.source,w=this.getSource(_);if(!w)return void this.fire(new h.ErrorEvent(new Error(`The source '${_}' does not exist in the map's style.`)));const C=w.type,D="vector"===C?l.sourceLayer:void 0;if("vector"===C&&!D)return void this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(d&&"string"!=typeof l.id&&"number"!=typeof l.id)return void this.fire(new h.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const I=this._getSourceCaches(_);for(const A of I)A.removeFeatureState(D,l.id,d)}getFeatureState(l){this._checkLoaded();const d=l.source,_=l.sourceLayer,w=this.getSource(d);if(w){if("vector"!==w.type||_)return void 0===l.id&&this.fire(new h.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(d)[0].getFeatureState(_,l.id);this.fire(new h.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new h.ErrorEvent(new Error(`The source '${d}' does not exist in the map's style.`)))}getTransition(){return h.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const l={};for(const d in this._sourceCaches){const _=this._sourceCaches[d].getSource();l[_.id]||(l[_.id]=_.serialize())}return h.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:l,layers:this._serializeLayers(this._order)},d=>void 0!==d)}_updateLayer(l){this._updatedLayers[l.id]=!0;const d=this._getLayerSourceCache(l);l.source&&!this._updatedSources[l.source]&&d&&"raster"!==d.getSource().type&&(this._updatedSources[l.source]="reload",d.pause()),this._changed=!0,l.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(l){const d=D=>"fill-extrusion"===this._layers[D].type,_={},w=[];for(let D=this._order.length-1;D>=0;D--){const I=this._order[D];if(d(I)){_[I]=D;for(const A of l){const L=A[I];if(L)for(const R of L)w.push(R)}}}w.sort((D,I)=>I.intersectionZ-D.intersectionZ);const C=[];for(let D=this._order.length-1;D>=0;D--){const I=this._order[D];if(d(I))for(let A=w.length-1;A>=0;A--){const L=w[A].feature;if(_[L.layer.id]{const L=this.getLayer(A);return L&&L.is3D()}):this.has3DLayers(),I=mr.createFromScreenPoints(l,_);for(const A in this._sourceCaches){const L=this._sourceCaches[A].getSource().id;d.layers&&!w[L]||C.push(hi(this._sourceCaches[A],this._layers,this._serializedLayers,I,d,_,D,!!this.map._showQueryGeometry))}return this.placement&&C.push(function(A,L,R,B,q,X,K){const J={},Q=X.queryRenderedSymbols(B),U=[];for(const Y of Object.keys(Q).map(Number))U.push(K[Y]);U.sort(so);for(const Y of U){const re=Y.featureIndex.lookupSymbolFeatures(Q[Y.bucketInstanceId],L,Y.bucketIndex,Y.sourceLayerIndex,q.filter,q.layers,q.availableImages,A);for(const ie in re){const pe=J[ie]=J[ie]||[],ge=re[ie];ge.sort((me,Te)=>{const be=Y.featureSortOrder;if(be){const Ue=be.indexOf(me.featureIndex);return be.indexOf(Te.featureIndex)-Ue}return Te.featureIndex-me.featureIndex});for(const me of ge)pe.push(me)}}for(const Y in J)J[Y].forEach(re=>{const ie=re.feature,pe=R(A[Y]);if(!pe)return;const ge=pe.getFeatureState(ie.layer["source-layer"],ie.id);ie.source=ie.layer.source,ie.layer["source-layer"]&&(ie.sourceLayer=ie.layer["source-layer"]),ie.state=ge});return J}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),I.screenGeometry,d,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(C)}querySourceFeatures(l,d){d&&d.filter&&this._validate(h.validateFilter,"querySourceFeatures.filter",d.filter,null,d);const _=this._getSourceCaches(l);let w=[];for(const C of _)w=w.concat(yn(C,d));return w}addSourceType(l,d,_){return Zs.getSourceType(l)?_(new Error(`A source type called "${l}" already exists.`)):(Zs.setSourceType(l,d),d.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:l,url:d.workerSourceURL},_):_(null,null))}getLight(){return this.light.getLight()}setLight(l,d={}){this._checkLoaded();const _=this.light.getLight();let w=!1;for(const D in l)if(!W(l[D],_[D])){w=!0;break}if(!w)return;const C=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(l,d),this.light.updateTransitions(C)}getTerrain(){return this.terrain&&1===this.terrain.drapeRenderMode?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(l,d=1){if(this._checkLoaded(),!l)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);let _=l;if(1===d){if("object"==typeof _.source){const w="terrain-dem-src";this.addSource(w,_.source),_=h.clone$1(_),_=h.extend(_,{source:w})}if(this._validate(h.validateTerrain,"terrain",_))return}if(!this.terrain||this.terrain&&d!==this.terrain.drapeRenderMode){if(!_)return;this._createTerrain(_,d)}else{const w=this.terrain,C=w.get();for(const D of Object.keys(h.spec.terrain))!_.hasOwnProperty(D)&&h.spec.terrain[D].default&&(_[D]=h.spec.terrain[D].default);for(const D in _)if(!W(_[D],C[D])){w.set(_),this.stylesheet.terrain=_;const I=this._setTransitionParameters({duration:0});w.updateTransitions(I);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(l){const d=this.fog=new Dn(l,this.map.transform);this.stylesheet.fog=l;const _=this._setTransitionParameters({duration:0});d.updateTransitions(_)}_updateMarkersOpacity(){0!==this.map._markers.length&&this.map._requestDomTask(()=>{for(const l of this.map._markers)l._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(l){if(this._checkLoaded(),!l)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const d=this.fog,_=d.get();0===Object.keys(l).length&&d.set(l);for(const w in l)if(!W(l[w],_[w])){d.set(l),this.stylesheet.fog=l;const C=this._setTransitionParameters({duration:0});d.updateTransitions(C);break}}else this._createFog(l);this._markersNeedUpdate=!0}_setTransitionParameters(l){return{now:h.exported.now(),transition:h.extend(l,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const l=this._order.filter(_=>this.isLayerDraped(this._layers[_])),d=this._order.filter(_=>!this.isLayerDraped(this._layers[_]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...l),this._drapedFirstOrder.push(...d)}_createTerrain(l,d){const _=this.terrain=new Ht(l,d);this.stylesheet.terrain=l,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const w=this._setTransitionParameters({duration:0});_.updateTransitions(w)}_force3DLayerUpdate(){for(const l in this._layers){const d=this._layers[l];"fill-extrusion"===d.type&&this._updateLayer(d)}}_forceSymbolLayerUpdate(){for(const l in this._layers){const d=this._layers[l];"symbol"===d.type&&this._updateLayer(d)}}_validate(l,d,_,w,C={}){return(!C||!1!==C.validate)&&za(this,l.call(h.validateStyle,h.extend({key:d,style:this.serialize(),value:_,styleSpec:h.spec},w)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),h.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const l in this._layers)this._layers[l].setEventedParent(null);for(const l in this._sourceCaches)this._sourceCaches[l].clearTiles(),this._sourceCaches[l].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(l){const d=this._getSourceCaches(l);for(const _ of d)_.clearTiles()}_reloadSource(l){const d=this._getSourceCaches(l);for(const _ of d)_.resume(),_.reload()}_reloadSources(){for(const l of this._getSources())l.reload&&l.reload()}_updateSources(l){for(const d in this._sourceCaches)this._sourceCaches[d].update(l)}_generateCollisionBoxes(){for(const l in this._sourceCaches){const d=this._sourceCaches[l];d.resume(),d.reload()}}_updatePlacement(l,d,_,w,C=!1){let D=!1,I=!1;const A={};for(const L of this._order){const R=this._layers[L];if("symbol"!==R.type)continue;if(!A[R.source]){const q=this._getLayerSourceCache(R);if(!q)continue;A[R.source]=q.getRenderableIds(!0).map(X=>q.getTileByID(X)).sort((X,K)=>K.tileID.overscaledZ-X.tileID.overscaledZ||(X.tileID.isLessThan(K.tileID)?-1:1))}const B=this.crossTileSymbolIndex.addLayer(R,A[R.source],l.center.lng,l.projection);D=D||B}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),C=C||this._layerOrderChanged||0===_,this._layerOrderChanged&&this.fire(new h.Event("neworder")),(C||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(h.exported.now(),l.zoom))&&(this.pauseablePlacement=new dd(l,this._order,C,d,_,w,this.placement,this.fog&&l.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(h.exported.now()),I=!0),D&&this.pauseablePlacement.placement.setStale()),I||D)for(const L of this._order){const R=this._layers[L];"symbol"===R.type&&this.placement.updateLayerOpacities(R,A[R.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(h.exported.now())}_releaseSymbolFadeTiles(){for(const l in this._sourceCaches)this._sourceCaches[l].releaseSymbolFadeTiles()}getImages(l,d,_){this.imageManager.getImages(d.icons,_),this._updateTilesForChangedImages();const w=C=>{C&&C.setDependencies(d.tileID.key,d.type,d.icons)};w(this._otherSourceCaches[d.source]),w(this._symbolSourceCaches[d.source])}getGlyphs(l,d,_){this.glyphManager.getGlyphs(d.stacks,_)}getResource(l,d,_){return h.makeRequest(d,_)}_getSourceCache(l){return this._otherSourceCaches[l]}_getLayerSourceCache(l){return"symbol"===l.type?this._symbolSourceCaches[l.source]:this._otherSourceCaches[l.source]}_getSourceCaches(l){const d=[];return this._otherSourceCaches[l]&&d.push(this._otherSourceCaches[l]),this._symbolSourceCaches[l]&&d.push(this._symbolSourceCaches[l]),d}_isSourceCacheLoaded(l){const d=this._getSourceCaches(l);return 0===d.length?(this.fire(new h.ErrorEvent(new Error(`There is no source with ID '${l}'`))),!1):d.every(_=>_.loaded())}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}Zs.getSourceType=function(m){return Rn[m]},Zs.setSourceType=function(m,l){Rn[m]=l},Zs.registerForPluginStateChange=h.registerForPluginStateChange;var Df="\n#define EPSILON 0.0000001\n#define PI 3.141592653589793\n#define EXTENT 8192.0\n#define HALF_PI PI/2.0\n#define QUARTER_PI PI/4.0\n#define RAD_TO_DEG 180.0/PI\n#define DEG_TO_RAD PI/180.0\n#define GLOBE_RADIUS EXTENT/PI/2.0",Ba="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",Pr="\n#define ELEVATION_SCALE 7.0\n#define ELEVATION_OFFSET 450.0\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix(\nmix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;}\n#else\nvec3 elevationVector(vec2 pos) { return vec3(0,0,1); }\n#endif\nconst float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt)\n{float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);}\n#ifdef TERRAIN\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nuniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev;\n#else\nuniform sampler2D u_dem;uniform sampler2D u_dem_prev;\n#endif\nuniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos));\n#ifdef TERRAIN_DEM_NEAREST_FILTER\nreturn u_exaggeration*tl;\n#endif\nfloat tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}float prevElevation(vec2 apos) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nvec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a;\n#else\nfloat dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);\n#endif\n}\n#ifdef TERRAIN_VERTEX_MORPHING\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nfloat nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);}\n#else\nfloat elevation(vec2 apos) {\n#ifdef ZERO_EXAGGERATION\nreturn 0.0;\n#endif\nreturn currentElevation(apos);}\n#endif\nhighp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4(\nunpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy))\n);return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nfloat tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a;\n#else\nvec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack);\n#endif\nreturn vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);}\n#else\nfloat elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; }\n#endif",qc="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);}\n#endif",oi="#ifdef FOG\nuniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);}\n#endif";let Sn={},es={};const Wc=[];gr(Df,Wc),gr(Pr,Wc),gr(qc,Wc),gr(oi,Wc),Sn=lr("",Pr),es=lr(oi,qc);const md=lr("\n#if __VERSION__ >=300\n#define varying in\n#define gl_FragColor glFragColor\n#define texture2D texture\n#define textureCube texture\nout vec4 glFragColor;\n#endif\nhighp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth)\n{const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}","\n#if __VERSION__ >=300\n#define attribute in\n#define varying out\n#define texture2D texture\n#endif\nfloat wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;}\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) {\n#ifndef PROJECTED_POS_ON_VIEWPORT\nfloat tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz;\n#else\nreturn vec3(0.0);\n#endif\n}vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);}\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(\nunpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered."),Vi=Df,Zc="\n#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif";var If={background:lr("uniform vec4 u_color;uniform float u_opacity;\n#ifdef LIGHTING_3D_MODE\nvarying vec4 v_color;\n#endif\nvoid main() {vec4 out_color;\n#ifdef LIGHTING_3D_MODE\nout_color=v_color;\n#else\nout_color=u_color;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#ifdef LIGHTING_3D_MODE\nuniform vec4 u_color;varying vec4 v_color;\n#endif\nvoid main() {gl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(u_color);\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),backgroundPattern:lr("uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),circle:lr("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(\nantialiased_blur,0.0,extrude_length-radius/(radius+stroke_width)\n);vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_apply_premultiplied(out_color,v_fog_pos);\n#endif\ngl_FragColor=out_color*(v_visibility*opacity_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#define NUM_VISIBILITY_RINGS 2\n#define INV_SQRT2 0.70710678\n#define ELEVATION_BIAS 0.0001\n#define NUM_SAMPLES_PER_RING 16\nuniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) {\n#if defined(TERRAIN)\nreturn elevation(pos)+ELEVATION_BIAS;\n#else\nreturn 0.0;\n#endif\n}vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale);\n#ifdef PITCH_WITH_MAP\n#ifdef PROJECTION_GLOBE_VIEW\nreturn u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) );\n#else\nreturn u_matrix*( world_center+vec4(sample_offset,0,0) );\n#endif\n#else\nreturn projected_center+vec4(sample_offset,0,0);\n#endif\n}float get_sample_step() {\n#ifdef PITCH_WITH_MAP\nreturn 2.0*PI/float(NUM_SAMPLES_PER_RING);\n#else\nreturn PI/float(NUM_SAMPLES_PER_RING);\n#endif\n}void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1);\n#else \nsurface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1);\n#endif\nvec4 projected_center=u_matrix*world_center;float view_scale=0.0;\n#ifdef PITCH_WITH_MAP\n#ifdef SCALE_WITH_MAP\nview_scale=1.0;\n#else\nview_scale=projected_center.w/u_camera_to_center_distance;\n#endif\n#else\n#ifdef SCALE_WITH_MAP\nview_scale=u_camera_to_center_distance;\n#else\nview_scale=projected_center.w;\n#endif\n#endif\ngl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0;\n#ifdef TERRAIN\nfloat step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center;\n#ifdef PITCH_WITH_MAP\nfloat cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center;\n#else\nocclusion_world_center=world_center;occlusion_projected_center=projected_center;\n#endif\nfor(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING);\n#else\nvisibility=1.0;\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nvisibility=1.0;\n#endif\nv_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);\n#ifdef FOG\nv_fog_pos=fog_position(world_center.xyz);\n#endif\n}"),clippingMask:lr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:lr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef FOG\nif (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);}\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;\n#endif\nvarying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#else\npos=vec3(tilePos+extrude,elevation(tilePos));\n#endif\ngl_Position=u_matrix*vec4(pos,1);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),heatmapTexture:lr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:lr("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}","attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:lr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos_2f;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:lr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;\n#endif\nvarying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0;\n#ifdef PROJECTION_GLOBE_VIEW\ngl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1);\n#else\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1);\n#endif\n}"),fill:lr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\nvec4 out_color=color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutline:lr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color;\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillOutlinePattern:lr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;varying vec2 v_pos_world;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillPattern:lr("uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),fillExtrusion:lr("varying vec4 v_color;\n#ifdef RENDER_SHADOWS\nvarying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\nvoid main() {\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvec3 normal=v_normal;\n#endif\nfloat z;vec4 color;\n#ifdef ZERO_ROOF_RADIUS\nz=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z);\n#else\ncolor=v_color;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;\n#ifdef ZERO_ROOF_RADIUS\nconcave*=(1.0-z);\n#endif\nfloat x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade;\n#endif\n#ifdef RENDER_SHADOWS\n#ifdef ZERO_ROOF_RADIUS\nnormal=mix(normal,vec3(0.0,0.0,1.0),z);\n#endif\ncolor.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec4 v_color;\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth;\n#endif\n#ifdef ZERO_ROOF_RADIUS\nvarying vec4 v_roof_color;\n#endif\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nvarying highp vec3 v_normal;\n#endif\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));\n#if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS)\nv_normal=normal;\n#endif\nbase=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=0.0;float c_ele;vec3 pos;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h);\n#else\nh=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden);\n#ifdef RENDER_SHADOWS\nv_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w;\n#endif\nfloat NdotL=0.0;float colorvalue=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\ncolorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}v_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_color=apply_lighting(color,NdotL);\n#else\nv_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_color*=u_opacity;\n#ifdef ZERO_ROOF_RADIUS\nv_roof_color=vec4(0.0,0.0,0.0,1.0);\n#ifdef LIGHTING_3D_MODE\nv_roof_color=apply_lighting(color,calculate_NdotL(vec3(0.0,0.0,1.0)));\n#else\nfloat roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\n#endif\nv_roof_color*=u_opacity;\n#endif\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),fillExtrusionPattern:lr("uniform vec2 u_texsize;uniform sampler2D u_image;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;uniform lowp float u_opacity;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color,v_NdotL)*u_opacity;\n#else\nout_color=out_color*v_lighting;\n#endif\n#ifdef FAUX_AO\nfloat intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade;\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\ngl_FragColor=out_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform float u_tile_units_to_pixels;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift;\n#endif\nvarying vec2 v_pos;varying vec4 v_lighting;\n#ifdef FAUX_AO\nuniform lowp vec2 u_ao;varying vec3 v_ao;\n#endif\n#ifdef LIGHTING_3D_MODE\nvarying float v_NdotL;\n#endif\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0);\n#if defined(HAS_CENTROID) || defined(TERRAIN)\ncentroid_pos=a_centroid_pos;\n#endif\nfloat ele=0.0;float h=z;vec3 p;float c_ele;\n#ifdef TERRAIN\nbool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h);\n#else\np=vec3(pos_nx.xy,z);\n#endif\n#ifdef PROJECTION_GLOBE_VIEW\nfloat lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);\n#endif\nfloat hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0\n? pos_nx.xy\n: vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0;\n#ifdef LIGHTING_3D_MODE\nNdotL=calculate_NdotL(normal);\n#else\nNdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL);\n#endif\nif (normal.y !=0.0) {float r=0.84;\n#ifndef LIGHTING_3D_MODE\nr=mix(0.7,0.98,1.0-u_lightintensity);\n#endif\nNdotL*=(\n(1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}\n#ifdef FAUX_AO\nfloat concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height;\n#ifdef TERRAIN\ntop_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height);\n#endif\nv_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]);\n#ifdef PROJECTION_GLOBE_VIEW\ntop_height+=u_height_lift;\n#endif\ngl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w;\n#endif\n#ifdef LIGHTING_3D_MODE\nv_NdotL=NdotL;\n#else\nv_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;\n#endif \n#ifdef FOG\nv_fog_pos=fog_position(p);\n#endif\n}"),hillshadePrepare:lr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord) {\n#ifdef TERRAIN_DEM_FLOAT_FORMAT\nreturn texture2D(u_image,coord).a/4.0;\n#else\nvec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;\n#endif\n}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2(\n(c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c)\n)/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:lr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef LIGHTING_3D_MODE\ngl_FragColor=apply_lighting(gl_FragColor);\n#endif\n#ifdef FOG\ngl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos));\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),line:lr("uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform sampler2D u_dash_image;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform sampler2D u_gradient_image;\n#endif\nuniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;}\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nfloat linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\n#ifdef RENDER_LINE_DASH\nfloat sdfdist=texture2D(u_dash_image,v_tex).a;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);\n#endif\nhighp vec4 out_color;\n#ifdef RENDER_LINE_GRADIENT\nout_color=texture2D(u_gradient_image,v_uv.xy);\n#else\nout_color=color;\n#endif\nfloat trimmed=1.0;\n#ifdef RENDER_LINE_TRIM_OFFSET\nhighp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);trimmed=0.0;}}\n#endif\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos));\n#endif\n#ifdef RENDER_LINE_ALPHA_DISCARD\nif (alpha < u_alpha_discard_threshold) {discard;}\n#endif\n#ifdef RENDER_LINE_BORDER\nfloat edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2);\n#ifdef RENDER_LINE_BORDER_AUTO\nfloat Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);}\n#else\nout_color.rgb=mix(u_border_color.rgb*u_border_color.a*trimmed,out_color.rgb,smoothAlpha);\n#endif\n}\n#endif\ngl_FragColor=out_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define EXTRUDE_SCALE 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nattribute highp vec4 a_packed;\n#endif\n#ifdef RENDER_LINE_DASH\nattribute float a_linesofar;\n#endif\nuniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec4 v_uv;\n#ifdef RENDER_LINE_DASH\nuniform vec2 u_texsize;uniform float u_tile_units_to_pixels;varying vec2 v_tex;\n#endif\n#ifdef RENDER_LINE_GRADIENT\nuniform float u_image_height;\n#endif\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 dash\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize lowp vec4 dash\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\n#if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET)\nfloat a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3];\n#ifdef RENDER_LINE_GRADIENT\nhighp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end);\n#else\nv_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end);\n#endif\n#endif\n#ifdef RENDER_LINE_DASH\nfloat scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y);\n#endif\nv_width2=vec2(outset,inset);\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),linePattern:lr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture2D(u_image,pos);\n#ifdef LIGHTING_3D_MODE\ncolor=apply_lighting(color);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern\n#pragma mapbox: define lowp float pixel_ratio\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern\n#pragma mapbox: initialize lowp float pixel_ratio\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude;\n#ifndef RENDER_TO_TEXTURE\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#else\nv_gamma_scale=1.0;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;\n#ifdef FOG\nv_fog_pos=fog_position(pos);\n#endif\n}"),raster:lr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb);\n#ifdef LIGHTING_3D_MODE\nout_color=apply_lighting(out_color);\n#endif\n#ifdef FOG\nout_color=fog_dither(fog_apply(out_color,v_fog_pos));\n#endif\ngl_FragColor=vec4(out_color*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\n#ifdef FOG\nv_fog_pos=fog_position(a_pos);\n#endif\n}"),symbolIcon:lr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}"),symbolSDF:lr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1);\n#else\noffsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1);\n#endif\nvec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}"),symbolTextAndIcon:lr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity;\n#ifdef PROJECTION_GLOBE_VIEW\nattribute vec3 a_globe_anchor;attribute vec3 a_globe_normal;\n#endif\nuniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon;\n#ifdef PROJECTION_GLOBE_VIEW\nuniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix;\n#endif\nvarying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nmercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0;\n#else\nworld_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0;\n#endif\nvec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(\n0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0);\n#else\nprojected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0);\n#endif\nhighp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale);\n#ifdef TERRAIN\n#ifdef PITCH_WITH_MAP_TERRAIN\nvec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy);\n#endif\n#endif\nfloat occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade;\n#ifdef PROJECTION_GLOBE_VIEW\nvec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#else\ngl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0));\n#endif\nfloat gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0;\n#if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW)\nprojection_transition_fade=1.0-step(EPSILON,u_zoom_transition);\n#endif\nv_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_sdf);}"),terrainRaster:lr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nvarying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nvoid main() {vec4 color=texture2D(u_image0,v_pos0);\n#ifdef RENDER_SHADOWS\ncolor.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth);\n#endif\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#else\ncolor=fog_dither(fog_apply_from_vert(color,v_fog_opacity));\n#endif\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;varying vec2 v_pos0;\n#ifdef FOG\nvarying float v_fog_opacity;\n#endif\n#ifdef RENDER_SHADOWS\nuniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth;\n#endif\nconst float wireframeOffset=0.00015;void main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height;\n#ifdef TERRAIN_WIREFRAME\nelevation+=wireframeOffset;\n#endif\nv_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0);\n#ifdef FOG\n#ifdef ZERO_EXAGGERATION\nv_fog_pos=fog_position(decodedPos);\n#else\nv_fog_opacity=fog(fog_position(vec3(decodedPos,elevation)));\n#endif\n#endif\n#ifdef RENDER_SHADOWS\nvec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w;\n#endif\n}"),terrainDepth:lr("#ifdef GL_ES\nprecision highp float;\n#endif\nvarying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}","uniform mat4 u_matrix;attribute vec2 a_pos;varying float v_depth;void main() {float elevation=elevation(a_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:lr("\nvarying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep(\ncos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb;\n#ifdef FOG\nsky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color);\n#endif\nsky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Ba),skyboxGradient:lr("varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5));\n#ifdef FOG\ncolor.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a;\n#endif\ncolor*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Ba),skyboxCapture:lr("\nvarying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m;\n#ifdef GL_ES\nprecision highp float;\n#endif\n#define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6)\n#define BETA_M vec3(21e-6,21e-6,21e-6)\n#define MIE_G 0.76\n#define DENSITY_HEIGHT_SCALE_R 8000.0\n#define DENSITY_HEIGHT_SCALE_M 1200.0\n#define PLANET_RADIUS 6360e3\n#define ATMOSPHERE_RADIUS 6420e3\n#define SAMPLE_STEPS 10\n#define DENSITY_STEPS 4\nfloat ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}","attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:lr("uniform sampler2D u_image0;varying vec2 v_pos0;\n#ifndef FOG\nuniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport;\n#endif\nvoid main() {vec4 color;\n#ifdef CUSTOM_ANTIALIASING\nvec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias);\n#else\ncolor=texture2D(u_image0,v_pos0);\n#endif\n#ifdef FOG\ncolor=fog_dither(fog_apply_premultiplied(color,v_fog_pos));\n#endif\ngl_FragColor=color;\n#ifdef TERRAIN_WIREFRAME\ngl_FragColor=vec4(1.0,0.0,0.0,0.8);\n#endif\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;uniform float u_skirt_height;\n#ifdef GLOBE_POLES\nattribute vec3 a_globe_pos;attribute vec2 a_uv;\n#else\nattribute vec2 a_pos;\n#endif\nvarying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() {\n#ifdef GLOBE_POLES\nvec3 globe_pos=a_globe_pos;vec2 uv=a_uv;\n#else\nfloat tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY);\n#endif\nv_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale;\n#ifdef GLOBE_POLES\nvec3 up_vector=globe_derived_up_vector;\n#else\nvec3 up_vector=elevationVector(tile_pos);\n#endif\nfloat height=elevation(tile_pos);\n#ifdef TERRAIN_WIREFRAME\nheight+=wireframeOffset;\n#endif\nglobe_pos+=up_vector*height;\n#ifndef GLOBE_POLES\nglobe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z;\n#endif\n#ifdef GLOBE_POLES\nvec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0);\n#else\nvec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height-u_skirt_height*decomposed_pos_and_skirt.z,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0);\n#endif\ngl_Position=u_proj_matrix*interpolated_pos;\n#ifdef FOG\nv_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz);\n#endif\n}"),globeAtmosphere:lr("uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir;\n#ifdef PROJECTION_GLOBE_VIEW\nglobe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;}\n#endif\nhighp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ?\n0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle;\n#ifdef PROJECTION_GLOBE_VIEW\nhighp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ?\nPI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t);\n#else\nhorizon_angle=horizon_angle_mercator;\n#endif\nhorizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x:\n(n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y:\nuv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}","attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix(\nmix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix(\nmix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}")};function gr(m,l){const d=m.replace(/\s*\/\/[^\n]*\n/g,"\n").split("\n");for(let _ of d)if(_=_.trim(),"#"===_[0]&&_.includes("if")&&!_.includes("endif")){_=_.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const w=_.split(" ");for(const C of w)l.includes(C)||l.push(C)}}function lr(m,l){const d=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,_=l.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),w={},C=[...Wc];return gr(m,C),gr(l,C),{fragmentSource:m=m.replace(d,(D,I,A,L,R)=>(w[R]=!0,"define"===I?`\n#ifndef HAS_UNIFORM_u_${R}\nvarying ${A} ${L} ${R};\n#else\nuniform ${A} ${L} u_${R};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${R}\n ${A} ${L} ${R} = u_${R};\n#endif\n`)),vertexSource:l=l.replace(d,(D,I,A,L,R)=>{const B="float"===L?"vec2":"vec4",q=R.match(/color/)?"color":B;return w[R]?"define"===I?`\n#ifndef HAS_UNIFORM_u_${R}\nuniform lowp float u_${R}_t;\nattribute ${A} ${B} a_${R};\nvarying ${A} ${L} ${R};\n#else\nuniform ${A} ${L} u_${R};\n#endif\n`:"vec4"===q?`\n#ifndef HAS_UNIFORM_u_${R}\n ${R} = a_${R};\n#else\n ${A} ${L} ${R} = u_${R};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${R}\n ${R} = unpack_mix_${q}(a_${R}, u_${R}_t);\n#else\n ${A} ${L} ${R} = u_${R};\n#endif\n`:"define"===I?`\n#ifndef HAS_UNIFORM_u_${R}\nuniform lowp float u_${R}_t;\nattribute ${A} ${B} a_${R};\n#else\nuniform ${A} ${L} u_${R};\n#endif\n`:"vec4"===q?`\n#ifndef HAS_UNIFORM_u_${R}\n ${A} ${L} ${R} = a_${R};\n#else\n ${A} ${L} ${R} = u_${R};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${R}\n ${A} ${L} ${R} = unpack_mix_${q}(a_${R}, u_${R}_t);\n#else\n ${A} ${L} ${R} = u_${R};\n#endif\n`}),staticAttributes:_,usedDefines:C}}class Gi{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(l,d,_,w,C,D,I){this.context=l;let A=this.boundPaintVertexBuffers.length!==w.length;for(let R=0;!A&&R{const re=U.paint.get("hillshade-shadow-color"),ie=U.paint.get("hillshade-highlight-color"),pe=U.paint.get("hillshade-accent-color");let ge=U.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===U.paint.get("hillshade-illumination-anchor")&&(ge-=J.transform.angle);const me=!J.options.moving;return{u_matrix:Y||J.transform.calculateProjMatrix(Q.tileID.toUnwrapped(),me),u_image:0,u_latrange:Zu(0,Q.tileID),u_light:[U.paint.get("hillshade-exaggeration"),ge],u_shadow:re,u_highlight:ie,u_accent:pe}})(m,d,_,m.terrain?l.projMatrix:null);m.prepareDrawProgram(I,R,l.toUnwrapped());const{tileBoundsBuffer:q,tileBoundsIndexBuffer:X,tileBoundsSegments:K}=m.getTileBoundsBuffers(d);R.draw(I,A.TRIANGLES,w,C,D,h.CullFaceMode.disabled,B,_.id,q,X,K)}function Sf(m,l,d){if(!l.needsDEMTextureUpload)return;const _=m.context,w=_.gl;_.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||m.getTileTexture(d.stride);const C=d.getPixels();l.demTexture?l.demTexture.update(C,{premultiply:!1}):l.demTexture=new h.Texture(_,C,w.RGBA,{premultiply:!1}),l.needsDEMTextureUpload=!1}function Kr(m,l,d,_,w,C){const D=m.context,I=D.gl;if(!l.dem)return;const A=l.dem;if(D.activeTexture.set(I.TEXTURE1),Sf(m,l,A),!l.demTexture)return;l.demTexture.bind(I.NEAREST,I.CLAMP_TO_EDGE);const L=A.dim;D.activeTexture.set(I.TEXTURE0);let R=l.fbo;if(!R){const K=new h.Texture(D,{width:L,height:L,data:null},I.RGBA);K.bind(I.LINEAR,I.CLAMP_TO_EDGE),R=l.fbo=D.createFramebuffer(L,L,!0),R.colorAttachment.set(K.texture)}D.bindFramebuffer.set(R.framebuffer),D.viewport.set([0,0,L,L]);const{tileBoundsBuffer:B,tileBoundsIndexBuffer:q,tileBoundsSegments:X}=m.getMercatorTileBoundsBuffers();m.useProgram("hillshadePrepare").draw(D,I.TRIANGLES,_,w,C,h.CullFaceMode.disabled,((K,J)=>{const Q=J.stride,U=h.create();return h.ortho(U,0,h.EXTENT,-h.EXTENT,0,0,1),h.translate(U,U,[0,-h.EXTENT,0]),{u_matrix:U,u_image:1,u_dimension:[Q,Q],u_zoom:K.overscaledZ,u_unpack:J.unpackVector}})(l.tileID,A),d.id,B,q,X),l.needsHillshadePrepare=!1}const Pn=m=>({u_matrix:new h.UniformMatrix4f(m),u_image0:new h.Uniform1i(m),u_skirt_height:new h.Uniform1f(m)}),Va=(m,l)=>({u_matrix:m,u_image0:0,u_skirt_height:l}),Xc=(m,l,d,_,w,C,D,I,A,L,R,B,q,X,K)=>({u_proj_matrix:Float32Array.from(m),u_globe_matrix:l,u_normalize_matrix:Float32Array.from(_),u_merc_matrix:d,u_zoom_transition:w,u_merc_center:C,u_image0:0,u_frustum_tl:D,u_frustum_tr:I,u_frustum_br:A,u_frustum_bl:L,u_globe_pos:R,u_globe_radius:B,u_viewport:q,u_grid_matrix:K?Float32Array.from(K):new Float32Array(9),u_skirt_height:X});function Xu(m,l){return null!=m&&null!=l&&!(!m.hasData()||!l.hasData())&&null!=m.demTexture&&null!=l.demTexture&&m.tileID.key!==l.tileID.key}const _a=new class{constructor(){this.operations={}}newMorphing(m,l,d,_,w){if(m in this.operations){const C=this.operations[m];C.to.tileID.key!==d.tileID.key&&(C.queued=d)}else this.operations[m]={startTime:_,phase:0,duration:w,from:l,to:d,queued:null}}getMorphValuesForProxy(m){if(!(m in this.operations))return null;const l=this.operations[m];return{from:l.from,to:l.to,phase:l.phase}}update(m){for(const l in this.operations){const d=this.operations[l];for(d.phase=(m-d.startTime)/d.duration;d.phase>=1||!this._validOp(d);)if(!this._nextOp(d,m)){delete this.operations[l];break}}}_nextOp(m,l){return!!m.queued&&(m.from=m.to,m.to=m.queued,m.queued=null,m.phase=0,m.startTime=l,!0)}_validOp(m){return m.from.hasData()&&m.to.hasData()}},mt={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function Ua(m){return 6*Math.pow(1.5,22-m)}function Yc(m,l){const d=1<({u_matrix:m});function Kc(m,l,d,_,w){if(w>0){const C=h.exported.now(),D=(C-m.timeAdded)/w,I=l?(C-l.timeAdded)/w:-1,A=d.getSource(),L=_.coveringZoomLevel({tileSize:A.tileSize,roundZoom:A.roundZoom}),R=!l||Math.abs(l.tileID.overscaledZ-L)>Math.abs(m.tileID.overscaledZ-L),B=R&&m.refreshedUponExpiration?1:h.clamp(R?D:1-I,0,1);return m.refreshedUponExpiration&&D>=1&&(m.refreshedUponExpiration=!1),l?{opacity:1,mix:1-B}:{opacity:B,mix:0}}return{opacity:1,mix:0}}class gd extends h.SourceCache{constructor(l){const d={type:"raster-dem",maxzoom:l.transform.maxZoom},_=new sn(Bc(),null),w=an("mock-dem",d,_,l.style);super("mock-dem",w,!1),w.setEventedParent(this),this._sourceLoaded=!0}_loadTile(l,d){l.state="loaded",d(null)}}class Fs extends h.SourceCache{constructor(l){const d=an("proxy",{type:"geojson",maxzoom:l.transform.maxZoom},new sn(Bc(),null),l.style);super("proxy",d,!1),d.setEventedParent(this),this.map=this.getSource().map=l,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(l,d,_){if(l.freezeTileCoverage)return;this.transform=l;const w=l.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((C,D)=>{if(C[D.key]="",!this._tiles[D.key]){const I=new h.Tile(D,this._source.tileSize*D.overscaleFactor(),l.tileZoom);I.state="loaded",this._tiles[D.key]=I}return C},{});for(const C in this._tiles)C in w||(this.freeFBO(C),this._tiles[C].unloadVectorData(),delete this._tiles[C])}freeFBO(l){const d=this.proxyCachedFBO[l];if(void 0!==d){const _=Object.values(d);this.renderCachePool.push(..._),delete this.proxyCachedFBO[l]}}deallocRenderCache(){this.renderCache.forEach(l=>l.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class gl extends h.OverscaledTileID{constructor(l,d,_){super(l.overscaledZ,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y),this.proxyTileKey=d,this.projMatrix=_}}class _d extends h.Elevation{constructor(l,d){super(),this.painter=l,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[_,w,C]=function(A){const L=new h.StructArrayLayout2i4,R=new h.StructArrayLayout3ui6,B=131;L.reserve(17161),R.reserve(33800);const q=h.EXTENT/128,X=h.EXTENT+q/2,K=X+q;for(let Q=-q;QX||Q<0||Q>X?24575:0,re=h.clamp(Math.round(U),0,h.EXTENT),ie=h.clamp(Math.round(Q),0,h.EXTENT);L.emplaceBack(re+Y,ie)}const J=(Q,U)=>{const Y=U*B+Q;R.emplaceBack(Y+1,Y,Y+B),R.emplaceBack(Y+B,Y+B+1,Y+1)};for(let Q=1;Q<129;Q++)for(let U=1;U<129;U++)J(U,Q);return[0,129].forEach(Q=>{for(let U=0;U<130;U++)J(U,Q),J(Q,U)}),[L,R,32768]}(),D=l.context;this.gridBuffer=D.createVertexBuffer(_,h.posAttributes.members),this.gridIndexBuffer=D.createIndexBuffer(w),this.gridSegments=h.SegmentVector.simpleSegment(0,0,_.length,w.length),this.gridNoSkirtSegments=h.SegmentVector.simpleSegment(0,0,_.length,C),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new Fs(d.map),this.orthoMatrix=h.create(),h.ortho(this.orthoMatrix,"globe"===this.painter.transform.projection.name?.015:0,h.EXTENT,0,h.EXTENT,0,1);const I=D.gl;this._overlapStencilMode=new h.StencilMode({func:I.GEQUAL,mask:255},0,255,I.KEEP,I.KEEP,I.REPLACE),this._previousZoom=l.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=d,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new gd(d.map)}set style(l){l.on("data",this._onStyleDataEvent.bind(this)),l.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=l,this._checkRenderCacheEfficiency(),this._style.map.on("moveend",()=>{this._clearLineLayersFromRenderCache()})}update(l,d,_){if(l&&l.terrain){this._style!==l&&(this.style=l),this.enabled=!0;const w=l.terrain.properties;this.sourceCache=0===l.terrain.drapeRenderMode?this._mockSourceCache:l._getSourceCache(w.get("source")),this._exaggeration=w.get("exaggeration");const C=()=>{this.sourceCache.used&&h.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source.\nThis leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const D=this.getScaledDemTileSize();this.sourceCache.update(d,D,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,C(),this._initializing=!0),C(),d.updateElevation(!0,_),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(d),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(l){this._findCoveringTileCache[l]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const l=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||100!==l.efficiency&&h.warnOnce(`Terrain render cache efficiency is not optimal (${l.efficiency}%) and performance\n may be affected negatively, consider placing all background, fill and line layers before layer\n with id '${l.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(l){l.coord&&"source"===l.dataType?this._clearRenderCacheForTile(l.sourceCacheId,l.coord):"style"===l.dataType&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const l in this._style._sourceCaches)this._style._sourceCaches[l].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach(l=>l.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const l=2*this.proxySourceCache.getSource().tileSize;return[l,l]}set useVertexMorphing(l){this._useVertexMorphing=l}updateTileBinding(l){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const d=this.proxySourceCache,_=this.painter.transform;this._initializing&&(this._initializing=0===_._centerAltitude&&-1===this.getAtPointOrZero(h.MercatorCoordinate.fromLngLat(_.center),-1),this._emptyDEMTextureDirty=!this._initializing);const w=this.proxyCoords=d.getIds().map(A=>{const L=d.getTileByID(A).tileID;return L.projMatrix=_.calculateProjMatrix(L.toUnwrapped()),L});(function(A,L){const R=L.transform.pointCoordinate(L.transform.getCameraPoint()),B=new h.Point(R.x,R.y);A.sort((q,X)=>{if(X.overscaledZ-q.overscaledZ)return X.overscaledZ-q.overscaledZ;const K=new h.Point(q.canonical.x+(1<{this.proxyToSource[A.key]={}}),this.terrainTileForTile={};const D=this._style._sourceCaches;for(const A in D){const L=D[A];if(!L.used||(L!==this.sourceCache&&this.resetTileLookupCache(L.id),this._setupProxiedCoordsForOrtho(L,l[A],C),L.usedForTerrain))continue;const R=l[A];L.getSource().reparseOverscaled&&this._assignTerrainTiles(R)}this.proxiedCoords[d.id]=w.map(A=>new gl(A,A.key,this.orthoMatrix)),this._assignTerrainTiles(w),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(C),this.renderingToTexture=!1,this._updateTimestamp=h.exported.now();const I={};this._visibleDemTiles=[];for(const A of this.proxyCoords){const L=this.terrainTileForTile[A.key];if(!L)continue;const R=L.tileID.key;R in I||(this._visibleDemTiles.push(L),I[R]=R)}}_assignTerrainTiles(l){this._initializing||l.forEach(d=>{if(this.terrainTileForTile[d.key])return;const _=this._findTileCoveringTileID(d,this.sourceCache);_&&(this.terrainTileForTile[d.key]=_)})}_prepareDEMTextures(){const l=this.painter.context,d=l.gl;for(const _ in this.terrainTileForTile){const w=this.terrainTileForTile[_],C=w.dem;!C||w.demTexture&&!w.needsDEMTextureUpload||(l.activeTexture.set(d.TEXTURE1),Sf(this.painter,w,C))}}_prepareDemTileUniforms(l,d,_,w){if(!d||null==d.demTexture)return!1;const C=l.tileID.canonical,D=Math.pow(2,d.tileID.canonical.z-C.z),I=w||"";return _[`u_dem_tl${I}`]=[C.x*D%1,C.y*D%1],_[`u_dem_scale${I}`]=D,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const l=this.painter.context,d=l.gl;if(!this._emptyDepthBufferTexture){const _=new h.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new h.Texture(l,_,d.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let l=0;const d=this._visibleDemTiles.reduce((_,w)=>{if(!w.dem)return _;const C=w.dem.tree.minimums[0];return C>0&&l++,_+C},0);return l?d/l:0}_updateEmptyDEMTexture(){const l=this.painter.context,d=l.gl;l.activeTexture.set(d.TEXTURE2);const _=this._getLoadedAreaMinimum(),w=new h.RGBAImage({width:1,height:1},new Uint8Array(h.DEMData.pack(_,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let C=this._emptyDEMTexture;return C?C.update(w,{premultiply:!1}):C=this._emptyDEMTexture=new h.Texture(l,w,d.RGBA,{premultiply:!1}),C}setupElevationDraw(l,d,_){const w=this.painter.context,C=w.gl,D=(I=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:h.DEMData.getUnpackVector(I),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var I;D.u_dem_size=this.sourceCache.getSource().tileSize,D.u_exaggeration=this.exaggeration();let A=null,L=null,R=1;if(_&&_.morphing&&this._useVertexMorphing){const B=_.morphing.srcDemTile,q=_.morphing.dstDemTile;R=_.morphing.phase,B&&q&&(this._prepareDemTileUniforms(l,B,D,"_prev")&&(L=B),this._prepareDemTileUniforms(l,q,D)&&(A=q))}if(L&&A?(w.activeTexture.set(C.TEXTURE2),A.demTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE,C.NEAREST),w.activeTexture.set(C.TEXTURE4),L.demTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE,C.NEAREST),D.u_dem_lerp=R):(A=this.terrainTileForTile[l.tileID.key],w.activeTexture.set(C.TEXTURE2),(this._prepareDemTileUniforms(l,A,D)?A.demTexture:this.emptyDEMTexture).bind(C.NEAREST,C.CLAMP_TO_EDGE)),w.activeTexture.set(C.TEXTURE3),_&&_.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),this._depthFBO&&(D.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),D.u_depth_size_inv=[1,1]),_&&_.useMeterToDem&&A){const B=(1<{if(U===gt)return;const Je=[mt[gt],"PROJECTION_GLOBE_VIEW"];ie&&Je.push("CUSTOM_ANTIALIASING"),Be&&Je.push(mt[Y]),Q=L.useProgram("globeRaster",null,Je),U=gt},ge=L.colorModeForRenderPass(),me=new h.DepthMode(J.LEQUAL,h.DepthMode.ReadWrite,L.depthRangeFor3D);_a.update(X);const Te=h.calculateGlobeMercatorMatrix(re),be=[h.mercatorXfromLng(re.center.lng),h.mercatorYfromLat(re.center.lat)],Ue=Y?[!1,!0]:[!1],yt=L.globeSharedBuffers,Fe=[re.width*h.exported.devicePixelRatio,re.height*h.exported.devicePixelRatio],tt=Float32Array.from(re.globeMatrix),qe={useDenormalizedUpVectorScale:!0};if(Ue.forEach(gt=>{const Be=L.transform,Je=Ua(Be.zoom)*R.exaggeration();U=-1;const xt=gt?J.LINES:J.TRIANGLES;for(const ht of q){const Et=B.getTile(ht),ln=h.StencilMode.disabled,In=R.prevTerrainTileForTile[ht.key],Xt=R.terrainTileForTile[ht.key];Xu(In,Xt)&&_a.newMorphing(ht.key,In,Xt,X,250),K.activeTexture.set(J.TEXTURE0),Et.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE);const vn=_a.getMorphValuesForProxy(ht.key),Jn=vn?1:0;vn&&h.extend$1(qe,{morphing:{srcDemTile:vn.from,dstDemTile:vn.to,phase:h.easeCubicInOut(vn.phase)}});const Yn=h.tileCornersToBounds(ht.canonical),on=h.getLatitudinalLod(Yn.getCenter().lat),rr=h.getGridMatrix(ht.canonical,Yn,on,Be.worldSize/Be._pixelsPerMercatorPixel),kr=h.globeNormalizeECEF(h.globeTileBounds(ht.canonical)),$n=Xc(Be.projMatrix,tt,Te,kr,h.globeToMercatorTransition(Be.zoom),be,Be.frustumCorners.TL,Be.frustumCorners.TR,Be.frustumCorners.BR,Be.frustumCorners.BL,Be.globeCenterInViewSpace,Be.globeRadius,Fe,Je,rr);if(pe(Jn,gt),R.setupElevationDraw(Et,Q,qe),L.prepareDrawProgram(K,Q,ht.toUnwrapped()),yt){const[Ar,Do,co]=gt?yt.getWirefameBuffers(L.context,on):yt.getGridBuffers(on,0!==Je);Q.draw(K,xt,me,ln,ge,h.CullFaceMode.backCCW,$n,"globe_raster",Ar,Do,co)}}}),yt){const gt=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];ie&>.push("CUSTOM_ANTIALIASING"),Q=L.useProgram("globeRaster",null,gt);for(const Be of q){const{x:Je,y:xt,z:ht}=Be.canonical,Et=0===xt,ln=xt===(1<$n.draw(K,J.TRIANGLES,me,h.StencilMode.disabled,ge,h.CullFaceMode.disabled,Xc(re.projMatrix,on,on,rr,0,be,re.frustumCorners.TL,re.frustumCorners.TR,re.frustumCorners.BR,re.frustumCorners.BL,re.globeCenterInViewSpace,re.globeRadius,Fe,0),"globe_pole_raster",Ar,vn,Jn);R.setupElevationDraw(Yn,Q,qe),L.prepareDrawProgram(K,Q,Be.toUnwrapped()),Et&&kr(Q,In),ln&&(on=h.scale(h.create(),on,[1,-1,1]),kr(Q,Xt))}}}}(w,C,D,I,A);else{const L=w.context,R=L.gl;let B,q;const X=w.options.showTerrainWireframe?2:0,K=(re,ie)=>{if(q===re)return;const pe=[mt[re]];ie&&pe.push(mt[X]),B=w.useProgram("terrainRaster",null,pe),q=re},J=w.colorModeForRenderPass(),Q=new h.DepthMode(R.LEQUAL,h.DepthMode.ReadWrite,w.depthRangeFor3D);_a.update(A);const U=w.transform,Y=Ua(U.zoom)*C.exaggeration();(X?[!1,!0]:[!1]).forEach(re=>{q=-1;const ie=re?R.LINES:R.TRIANGLES,[pe,ge]=re?C.getWirefameBuffer():[C.gridIndexBuffer,C.gridSegments];for(const me of I){const Te=D.getTile(me),be=h.StencilMode.disabled,Ue=C.prevTerrainTileForTile[me.key],yt=C.terrainTileForTile[me.key];Xu(Ue,yt)&&_a.newMorphing(me.key,Ue,yt,A,250),L.activeTexture.set(R.TEXTURE0),Te.texture.bind(R.LINEAR,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST);const Fe=_a.getMorphValuesForProxy(me.key),tt=Fe?1:0;let qe;Fe&&(qe={morphing:{srcDemTile:Fe.from,dstDemTile:Fe.to,phase:h.easeCubicInOut(Fe.phase)}});const gt=Va(me.projMatrix,Yc(me.canonical,U.renderWorldCopies)?Y/10:Y);K(tt,re),C.setupElevationDraw(Te,B,qe),w.prepareDrawProgram(L,B,me.toUnwrapped()),B.draw(L,ie,Q,be,J,h.CullFaceMode.backCCW,gt,"terrain_raster",C.gridBuffer,pe,ge)}})}}(d,this,this.proxySourceCache,l,this._updateTimestamp),this.renderingToTexture=!0,d.gpuTimingDeferredRenderEnd(),l.splice(0,l.length))}renderBatch(l){if(0===this._drapedRenderBatches.length)return l+1;this.renderingToTexture=!0;const d=this.painter,_=this.painter.context,w=this.proxySourceCache,C=this.proxiedCoords[w.id],D=this._drapedRenderBatches.shift(),I=[],A=d.style.order;let L=0;for(const R of C){const B=w.getTileByID(R.proxyTileKey),q=w.proxyCachedFBO[R.key]?w.proxyCachedFBO[R.key][l]:void 0,X=void 0!==q?w.renderCache[q]:this.pool[L++],K=void 0!==q;if(B.texture=X.tex,K&&!X.dirty){I.push(B.tileID);continue}let J;_.bindFramebuffer.set(X.fb.framebuffer),this.renderedToTile=!1,X.dirty&&(_.clear({color:h.Color.transparent,stencil:0}),X.dirty=!1);for(let Q=D.start;Q<=D.end;++Q){const U=d.style._layers[A[Q]];if(U.isHidden(d.transform.zoom))continue;const Y=d.style._getLayerSourceCache(U),re=Y?this.proxyToSource[R.key][Y.id]:[R];if(!re)continue;const ie=re;_.viewport.set([0,0,X.fb.width,X.fb.height]),J!==(Y?Y.id:null)&&(this._setupStencil(X,re,U,Y),J=Y?Y.id:null),d.renderLayer(d,Y,U,ie)}this.renderedToTile?(X.dirty=!0,I.push(B.tileID)):K||--L,5===L&&(L=0,this.renderToBackBuffer(I))}return this.renderToBackBuffer(I),this.renderingToTexture=!1,_.bindFramebuffer.set(null),_.viewport.set([0,0,d.width,d.height]),D.end+1}postRender(){}renderCacheEfficiency(l){const d=l.order.length;if(0===d)return{efficiency:100};let _,w=0,C=0,D=!1;for(let I=0;Id.dem).forEach(d=>{l=Math.min(l,d.dem.tree.minimums[0])}),0===l?l:(l-30)*this._exaggeration}raycast(l,d,_){if(!this._visibleDemTiles)return null;const w=this._visibleDemTiles.filter(C=>C.dem).map(C=>{const D=C.tileID,I=1<(null!==C.t?C.t:Number.MAX_VALUE)-(null!==D.t?D.t:Number.MAX_VALUE));for(const C of w){if(null==C.t)return null;const D=C.tile.dem.tree.raycast(C.minx,C.miny,C.maxx,C.maxy,l,d,_);if(null!=D)return D}return null}_createFBO(){const l=this.painter.context,d=l.gl,_=this.drapeBufferSize;l.activeTexture.set(d.TEXTURE0);const w=new h.Texture(l,{width:_[0],height:_[1],data:null},d.RGBA);w.bind(d.LINEAR,d.CLAMP_TO_EDGE);const C=l.createFramebuffer(_[0],_[1],!1);return C.colorAttachment.set(w.texture),C.depthAttachment=new fe(l,C.framebuffer),void 0===this._sharedDepthStencil?(this._sharedDepthStencil=l.createRenderbuffer(l.gl.DEPTH_STENCIL,_[0],_[1]),this._stencilRef=0,C.depthAttachment.set(this._sharedDepthStencil),l.clear({stencil:0})):C.depthAttachment.set(this._sharedDepthStencil),l.extTextureFilterAnisotropic&&!l.extTextureFilterAnisotropicForceOff&&d.texParameterf(d.TEXTURE_2D,l.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,l.extTextureFilterAnisotropicMax),{fb:C,tex:w,dirty:!1}}_initFBOPool(){for(;this.pool.length{const d=this._style._layers[l],_=d.isHidden(this.painter.transform.zoom);return"custom"===d.type?!_&&d.shouldRedrape():!_&&d.hasTransition()})}_clearLineLayersFromRenderCache(){let l=!1;for(const _ of this._style._getSources())if(_ instanceof kt){l=!0;break}if(!l)return;const d={};for(let _=0;_d.renderCachePool.length){const D=Object.values(d.proxyCachedFBO);d.proxyCachedFBO={};for(let I=0;I=0;D--){const I=_[D];if(d.getTileByID(I.key),void 0!==d.proxyCachedFBO[I.key]){const A=l[I.key],L=this.proxyToSource[I.key];let R=0;for(const B in L){const q=L[B],X=A[B];if(!X||X.length!==q.length||q.some((K,J)=>K!==X[J]||w[B]&&w[B].hasOwnProperty(K.key))){R=-1;break}++R}for(const B in d.proxyCachedFBO[I.key])d.renderCache[d.proxyCachedFBO[I.key][B]].dirty=R<0||R!==Object.values(A).length}}const C=[...this._drapedRenderBatches];C.sort((D,I)=>I.end-I.start-(D.end-D.start));for(const D of C)for(const I of _){if(d.proxyCachedFBO[I.key])continue;let A=d.renderCachePool.pop();void 0===A&&d.renderCache.length<50&&(A=d.renderCache.length,d.renderCache.push(this._createFBO())),void 0!==A&&(d.proxyCachedFBO[I.key]={},d.proxyCachedFBO[I.key][D.start]=A,d.renderCache[A].dirty=!0)}this._tilesDirty={}}_setupStencil(l,d,_,w){if(!w||!this._sourceTilesOverlap[w.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const C=this.painter.context,D=C.gl;if(d.length<=1)return void(this._overlapStencilType=!1);let I;if(_.isTileClipped())I=d.length,this._overlapStencilMode.test={func:D.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(d[0].overscaledZ>d[d.length-1].overscaledZ))return void(this._overlapStencilType=!1);I=1,this._overlapStencilMode.test={func:D.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+I>255&&(C.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=I,this._overlapStencilMode.ref=this._stencilRef,_.isTileClipped()&&this._renderTileClippingMasks(d,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return"Clip"===this._overlapStencilType||"Mask"===this._overlapStencilType}stencilModeForRTTOverlap(l){return this.renderingToTexture&&this._overlapStencilType?("Clip"===this._overlapStencilType&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[l.key]),this._overlapStencilMode):h.StencilMode.disabled}_renderTileClippingMasks(l,d){const _=this.painter,w=this.painter.context,C=w.gl;_._tileClippingMaskIDs={},w.setColorMode(h.ColorMode.disabled),w.setDepthMode(h.DepthMode.disabled);const D=_.useProgram("clippingMask");for(const I of l){const A=_._tileClippingMaskIDs[I.key]=--d;D.draw(w,C.TRIANGLES,h.DepthMode.disabled,new h.StencilMode({func:C.ALWAYS,mask:0},A,255,C.KEEP,C.KEEP,C.REPLACE),h.ColorMode.disabled,h.CullFaceMode.disabled,nc(I.projMatrix),"$clipping",_.tileExtentBuffer,_.quadTriangleIndexBuffer,_.tileExtentSegments)}}pointCoordinate(l){const d=this.painter.transform;if(l.x<0||l.x>d.width||l.y<0||l.y>d.height)return null;const _=[l.x,l.y,1,1];h.transformMat4$1(_,_,d.pixelMatrixInverse),h.scale$1(_,_,1/_[3]),_[0]/=d.worldSize,_[1]/=d.worldSize;const w=d._camera.position,C=h.mercatorZfromAltitude(1,d.center.lat),D=[w[0],w[1],w[2]/C,0],I=h.subtract([],_.slice(0,3),D);h.normalize(I,I);const A=this.raycast(D,I,this._exaggeration);return null!==A&&A?(h.scaleAndAdd(D,D,I,A),D[3]=D[2],D[2]*=C,D):null}drawDepth(){const l=this.painter,d=l.context,_=this.proxySourceCache,w=Math.ceil(l.width),C=Math.ceil(l.height);if(!this._depthFBO||this._depthFBO.width===w&&this._depthFBO.height===C||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const D=d.gl,I=d.createFramebuffer(w,C,!0);d.activeTexture.set(D.TEXTURE0);const A=new h.Texture(d,{width:w,height:C,data:null},D.RGBA);A.bind(D.NEAREST,D.CLAMP_TO_EDGE),I.colorAttachment.set(A.texture);const L=d.createRenderbuffer(d.gl.DEPTH_COMPONENT16,w,C);I.depthAttachment.set(L),this._depthFBO=I,this._depthTexture=A}d.bindFramebuffer.set(this._depthFBO.framebuffer),d.viewport.set([0,0,w,C]),function(D,I,A,L){if("globe"===D.transform.projection.name)return;const R=D.context,B=R.gl;R.clear({depth:1});const q=D.useProgram("terrainDepth"),X=new h.DepthMode(B.LESS,h.DepthMode.ReadWrite,D.depthRangeFor3D);for(const K of L){const J=A.getTile(K),Q=Va(K.projMatrix,0);I.setupElevationDraw(J,q),q.draw(R,B.TRIANGLES,X,h.StencilMode.disabled,h.ColorMode.unblended,h.CullFaceMode.backCCW,Q,"terrain_depth",I.gridBuffer,I.gridIndexBuffer,I.gridNoSkirtSegments)}}(l,this,_,this.proxyCoords)}_setupProxiedCoordsForOrtho(l,d,_){if(l.getSource()instanceof Wn)return this._setupProxiedCoordsForImageSource(l,d,_);this._findCoveringTileCache[l.id]=this._findCoveringTileCache[l.id]||{};const w=this.proxiedCoords[l.id]=[],C=this.proxyCoords;for(let I=0;I(R.min.x=Math.min(R.min.x,B.x-I.x),R.min.y=Math.min(R.min.y,B.y-I.y),R.max.x=Math.max(R.max.x,B.x-I.x),R.max.y=Math.max(R.max.y,B.y-I.y),R),{min:new h.Point(Number.MAX_VALUE,Number.MAX_VALUE),max:new h.Point(-Number.MAX_VALUE,-Number.MAX_VALUE)}),L=(R,B)=>{const q=R.wrap+R.canonical.x/(1<J+A.max.x||X+KQ+A.max.y};for(let R=0;RD.key===d.tileID.key);if(C)return C}if(d.tileID.key!==l.key){const C=l.canonical.z-d.tileID.canonical.z;let D,I,A;w=h.create();const L=d.tileID.wrap-l.wrap<0?(D=h.EXTENT>>C,I=D*((d.tileID.canonical.x<=B){const q=l.canonical.z-B;d.getSource().reparseOverscaled?(I=Math.max(l.canonical.z+2,d.transform.tileZoom),D=new h.OverscaledTileID(I,l.wrap,B,l.canonical.x>>q,l.canonical.y>>q)):0!==q&&(I=B,D=new h.OverscaledTileID(I,l.wrap,B,l.canonical.x>>q,l.canonical.y>>q))}D.key!==l.key&&(L.push(D.key),_=d.getTile(D))}const R=B=>{L.forEach(q=>{w[q]=B}),L.length=0};for(I-=1;I>=A&&(!_||!_.hasData());I--){_&&R(_.tileID.key);const B=D.calculateScaledKey(I);if(_=d.getTileByID(B),_&&_.hasData())break;const q=w[B];if(null===q)break;void 0===q?L.push(B):_=d.getTileByID(q)}return R(_?_.tileID.key:null),_&&_.hasData()?_:null}findDEMTileFor(l){return this.enabled?this._findTileCoveringTileID(l,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(l,d){let _=this._tilesDirty[l];_||(_=this._tilesDirty[l]={}),_[d.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const l=function(d){let _=0;const w=new h.StructArrayLayout2ui4,C=131;for(let D=1;D<129;D++){for(let I=1;I<129;I++)_=D*C+I,w.emplaceBack(_,_+1),w.emplaceBack(_,_+C),w.emplaceBack(_+1,_+C),128===D&&w.emplaceBack(_+C,_+C+1);w.emplaceBack(_+1,_+1+C)}return w}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(l),this.wireframeSegments=h.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,l.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class qt{static cacheKey(l,d,_,w){let C=`${d}${w?w.cacheKey:""}`;for(const D of _)l.usedDefines.includes(D)&&(C+=`/${D}`);return C}constructor(l,d,_,w,C,D){const I=l.gl;this.program=I.createProgram();const A=function(U){const Y=[];for(let re=0;re`#define ${U}`));const q=l.isWebGL2?"#version 300 es\n":"",X=q+B.concat(l.extStandardDerivatives&&0===q.length?"#extension GL_OES_standard_derivatives : enable\n".concat(Zc):Zc,Zc,Vi,md.fragmentSource,es.fragmentSource,_.fragmentSource).join("\n"),K=q+B.concat("\n#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif",Vi,md.vertexSource,es.vertexSource,Sn.vertexSource,_.vertexSource).join("\n"),J=I.createShader(I.FRAGMENT_SHADER);if(I.isContextLost())return void(this.failedToCreate=!0);I.shaderSource(J,X),I.compileShader(J),I.attachShader(this.program,J);const Q=I.createShader(I.VERTEX_SHADER);if(I.isContextLost())this.failedToCreate=!0;else{I.shaderSource(Q,K),I.compileShader(Q),I.attachShader(this.program,Q),this.attributes={},this.numAttributes=R.length;for(let U=0;U({u_tile_tl_up:new h.Uniform3f(U),u_tile_tr_up:new h.Uniform3f(U),u_tile_br_up:new h.Uniform3f(U),u_tile_bl_up:new h.Uniform3f(U),u_tile_up_scale:new h.Uniform1f(U)}))(l)),D.includes("FOG")&&(this.fogUniforms=(U=>({u_fog_matrix:new h.UniformMatrix4f(U),u_fog_range:new h.Uniform2f(U),u_fog_color:new h.Uniform4f(U),u_fog_horizon_blend:new h.Uniform1f(U),u_fog_temporal_offset:new h.Uniform1f(U),u_frustum_tl:new h.Uniform3f(U),u_frustum_tr:new h.Uniform3f(U),u_frustum_br:new h.Uniform3f(U),u_frustum_bl:new h.Uniform3f(U),u_globe_pos:new h.Uniform3f(U),u_globe_radius:new h.Uniform1f(U),u_globe_transition:new h.Uniform1f(U),u_is_globe:new h.Uniform1i(U),u_viewport:new h.Uniform2f(U)}))(l))}var U}setTerrainUniformValues(l,d){if(!this.terrainUniforms)return;const _=this.terrainUniforms;if(!this.failedToCreate){l.program.set(this.program);for(const w in d)_[w]&&_[w].set(this.program,w,d[w])}}setGlobeUniformValues(l,d){if(!this.globeUniforms)return;const _=this.globeUniforms;if(!this.failedToCreate){l.program.set(this.program);for(const w in d)_[w]&&_[w].set(this.program,w,d[w])}}setFogUniformValues(l,d){if(!this.fogUniforms)return;const _=this.fogUniforms;if(!this.failedToCreate){l.program.set(this.program);for(const w in d)_[w].set(this.program,w,d[w])}}draw(l,d,_,w,C,D,I,A,L,R,B,q,X,K,J){const Q=l.gl;if(this.failedToCreate)return;l.program.set(this.program),l.setDepthMode(_),l.setStencilMode(w),l.setColorMode(C),l.setCullFace(D);for(const Y of Object.keys(this.fixedUniforms))this.fixedUniforms[Y].set(this.program,Y,I[Y]);K&&K.setUniforms(this.program,l,this.binderUniforms,q,{zoom:X});const U={[Q.LINES]:2,[Q.TRIANGLES]:3,[Q.LINE_STRIP]:1}[d];for(const Y of B.get()){const re=Y.vaos||(Y.vaos={});(re[A]||(re[A]=new Gi)).bind(l,this,L,K?K.getPaintVertexBuffers():[],R,Y.vertexOffset,J||[]),Q.drawElements(d,Y.primitiveLength*U,Q.UNSIGNED_SHORT,Y.primitiveOffset*U*2)}}}function dr(m,l){const d=Math.pow(2,l.tileID.overscaledZ),_=l.tileSize*Math.pow(2,m.transform.tileZoom)/d,w=_*(l.tileID.canonical.x+l.tileID.wrap*d),C=_*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture.size,u_tile_units_to_pixels:1/Vn(l,1,m.transform.tileZoom),u_pixel_coord_upper:[w>>16,C>>16],u_pixel_coord_lower:[65535&w,65535&C]}}const z_=h.create(),Pf=(m,l,d,_,w,C,D,I,A,L,R)=>{const B=l.style.light,q=B.properties.get("position"),X=[q.x,q.y,q.z],K=h.create$1();"viewport"===B.properties.get("anchor")&&(h.fromRotation(K,-l.transform.angle),h.transformMat3(X,X,K));const J=B.properties.get("color"),Q=l.transform,U={u_matrix:m,u_lightpos:X,u_lightintensity:B.properties.get("intensity"),u_lightcolor:[J.r,J.g,J.b],u_vertical_gradient:+d,u_opacity:_,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:z_,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:w,u_edge_radius:C};return"globe"===Q.projection.name&&(U.u_tile_id=[D.canonical.x,D.canonical.y,1<{const q=Pf(m,l,d,_,w,C,D,A,L,R,B),X={u_height_factor:-Math.pow(2,D.overscaledZ)/I.tileSize/8};return h.extend(q,dr(l,I),X)},Jc=m=>({u_matrix:m}),Af=(m,l,d)=>h.extend(Jc(m),dr(l,d)),Of=(m,l)=>({u_matrix:m,u_world:l}),ps=(m,l,d,_)=>h.extend(Af(m,l,d),{u_world:_}),Lv=h.create(),kf=(m,l,d,_,w,C)=>{const D=m.transform,I="globe"===D.projection.name;let A;if("map"===C.paint.get("circle-pitch-alignment"))if(I){const R=h.globePixelsToTileUnits(D.zoom,l.canonical)*D._pixelsPerMercatorPixel;A=Float32Array.from([R,0,0,R])}else A=D.calculatePixelsToTileUnitsMatrix(d);else A=new Float32Array([D.pixelsToGLUnits[0],0,0,D.pixelsToGLUnits[1]]);const L={u_camera_to_center_distance:D.cameraToCenterDistance,u_matrix:m.translatePosMatrix(l.projMatrix,d,C.paint.get("circle-translate"),C.paint.get("circle-translate-anchor")),u_device_pixel_ratio:h.exported.devicePixelRatio,u_extrude_scale:A,u_inv_rot_matrix:Lv,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(I){L.u_inv_rot_matrix=_,L.u_merc_center=w,L.u_tile_id=[l.canonical.x,l.canonical.y,1<{const l=[];return"map"===m.paint.get("circle-pitch-alignment")&&l.push("PITCH_WITH_MAP"),"map"===m.paint.get("circle-pitch-scale")&&l.push("SCALE_WITH_MAP"),l},ya=(m,l,d,_)=>{const w=h.EXTENT/d.tileSize;return{u_matrix:m,u_camera_to_center_distance:l.getCameraToCenterDistance(_),u_extrude_scale:[l.pixelsToGLUnits[0]/w,l.pixelsToGLUnits[1]/w]}},Rf=(m,l,d=1)=>({u_matrix:m,u_color:l,u_overlay:0,u_overlay_scale:d}),B_=h.create(),V_=(m,l,d,_,w,C,D)=>{const I=m.transform,A="globe"===I.projection.name,L=A?h.globePixelsToTileUnits(I.zoom,l.canonical)*I._pixelsPerMercatorPixel:Vn(d,1,C),R={u_matrix:l.projMatrix,u_extrude_scale:L,u_intensity:D,u_inv_rot_matrix:B_,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(A){R.u_inv_rot_matrix=_,R.u_merc_center=w,R.u_tile_id=[l.canonical.x,l.canonical.y,1<{const I=m.transform,A=I.calculatePixelsToTileUnitsMatrix(l);return{u_matrix:Lf(m,l,d,_),u_pixels_to_tile_units:A,u_device_pixel_ratio:C,u_units_to_pixels:[1/I.pixelsToGLUnits[0],1/I.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:w,u_texsize:yd(d)?l.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:Ku(l,m.transform),u_alpha_discard_threshold:0,u_trim_offset:D}},Yu=(m,l,d,_,w)=>{const C=m.transform;return{u_matrix:Lf(m,l,d,_),u_texsize:l.imageAtlasTexture.size,u_pixels_to_tile_units:C.calculatePixelsToTileUnitsMatrix(l),u_device_pixel_ratio:w,u_image:0,u_tile_units_to_pixels:Ku(l,C),u_units_to_pixels:[1/C.pixelsToGLUnits[0],1/C.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function Ku(m,l){return 1/Vn(m,1,l.tileZoom)}function Lf(m,l,d,_){return m.translatePosMatrix(_||l.tileID.projMatrix,l,d.paint.get("line-translate"),d.paint.get("line-translate-anchor"))}function yd(m){const l=m.paint.get("line-dasharray").value;return l.value||"constant"!==l.kind}const Mo=(m,l,d,_,w,C)=>{return{u_matrix:m,u_tl_parent:l,u_scale_parent:d,u_fade_t:_.mix,u_opacity:_.opacity*w.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:w.paint.get("raster-brightness-min"),u_brightness_high:w.paint.get("raster-brightness-max"),u_saturation_factor:(I=w.paint.get("raster-saturation"),I>0?1-1/(1.001-I):-I),u_contrast_factor:(D=w.paint.get("raster-contrast"),D>0?1/(1-D):1+D),u_spin_weights:xn(w.paint.get("raster-hue-rotate")),u_perspective_transform:C};var D,I};function xn(m){m*=Math.PI/180;const l=Math.sin(m),d=Math.cos(m);return[(2*d+1)/3,(-Math.sqrt(3)*l-d+1)/3,(Math.sqrt(3)*l-d+1)/3]}const Ff=h.create(),Tm=(m,l,d,_,w,C,D,I,A,L,R,B,q,X,K,J)=>{const Q=w.transform,U={u_is_size_zoom_constant:+("constant"===m||"source"===m),u_is_size_feature_constant:+("constant"===m||"camera"===m),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:Q.cameraToCenterDistance,u_rotate_symbol:+d,u_aspect_ratio:Q.width/Q.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:C,u_label_plane_matrix:D,u_coord_matrix:I,u_is_text:+A,u_pitch_with_map:+_,u_texsize:L,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Ff,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:Ff,u_up_vector:[0,-1,0]};return"globe"===J.name&&(U.u_tile_id=[R.canonical.x,R.canonical.y,1<h.extend(Tm(m,l,d,_,w,C,D,I,A,L,B,q,X,K,J,Q),{u_gamma_scale:_?w.transform.cameraToCenterDistance*Math.cos(w.terrain?0:w.transform._pitch):1,u_device_pixel_ratio:h.exported.devicePixelRatio,u_is_halo:+R}),U_=(m,l,d,_,w,C,D,I,A,L,R,B,q,X,K,J)=>h.extend(Nf(m,l,d,_,w,C,D,I,!0,A,!0,R,B,q,X,K,J),{u_texsize_icon:L,u_texture_icon:1}),tn=(m,l,d)=>({u_matrix:m,u_opacity:l,u_color:d}),Nv=(m,l,d,_,w)=>h.extend(function(C,D,I){const A=D.imageManager.getPattern(C.toString()),{width:L,height:R}=D.imageManager.getPixelSize(),B=Math.pow(2,I.tileID.overscaledZ),q=I.tileSize*Math.pow(2,D.transform.tileZoom)/B,X=q*(I.tileID.canonical.x+I.tileID.wrap*B),K=q*I.tileID.canonical.y;return{u_image:0,u_pattern_tl:A.tl,u_pattern_br:A.br,u_texsize:[L,R],u_pattern_size:A.displaySize,u_tile_units_to_pixels:1/Vn(I,1,D.transform.tileZoom),u_pixel_coord_upper:[X>>16,K>>16],u_pixel_coord_lower:[65535&X,65535&K]}}(_,d,w),{u_matrix:m,u_opacity:l}),ts={fillExtrusion:m=>({u_matrix:new h.UniformMatrix4f(m),u_lightpos:new h.Uniform3f(m),u_lightintensity:new h.Uniform1f(m),u_lightcolor:new h.Uniform3f(m),u_vertical_gradient:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_edge_radius:new h.Uniform1f(m),u_ao:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_up_dir:new h.Uniform3f(m),u_height_lift:new h.Uniform1f(m)}),fillExtrusionPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_lightpos:new h.Uniform3f(m),u_lightintensity:new h.Uniform1f(m),u_lightcolor:new h.Uniform3f(m),u_vertical_gradient:new h.Uniform1f(m),u_height_factor:new h.Uniform1f(m),u_edge_radius:new h.Uniform1f(m),u_ao:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_up_dir:new h.Uniform3f(m),u_height_lift:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m)}),fill:m=>({u_matrix:new h.UniformMatrix4f(m)}),fillPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),fillOutline:m=>({u_matrix:new h.UniformMatrix4f(m),u_world:new h.Uniform2f(m)}),fillOutlinePattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_world:new h.Uniform2f(m),u_image:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),circle:m=>({u_camera_to_center_distance:new h.Uniform1f(m),u_extrude_scale:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_up_dir:new h.Uniform3f(m)}),collisionBox:m=>({u_matrix:new h.UniformMatrix4f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_extrude_scale:new h.Uniform2f(m)}),collisionCircle:m=>({u_matrix:new h.UniformMatrix4f(m),u_inv_matrix:new h.UniformMatrix4f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_viewport_size:new h.Uniform2f(m)}),debug:m=>({u_color:new h.UniformColor(m),u_matrix:new h.UniformMatrix4f(m),u_overlay:new h.Uniform1i(m),u_overlay_scale:new h.Uniform1f(m)}),clippingMask:m=>({u_matrix:new h.UniformMatrix4f(m)}),heatmap:m=>({u_extrude_scale:new h.Uniform1f(m),u_intensity:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_up_dir:new h.Uniform3f(m)}),heatmapTexture:m=>({u_image:new h.Uniform1i(m),u_color_ramp:new h.Uniform1i(m),u_opacity:new h.Uniform1f(m)}),hillshade:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_latrange:new h.Uniform2f(m),u_light:new h.Uniform2f(m),u_shadow:new h.UniformColor(m),u_highlight:new h.UniformColor(m),u_accent:new h.UniformColor(m)}),hillshadePrepare:m=>({u_matrix:new h.UniformMatrix4f(m),u_image:new h.Uniform1i(m),u_dimension:new h.Uniform2f(m),u_zoom:new h.Uniform1f(m),u_unpack:new h.Uniform4f(m)}),line:m=>({u_matrix:new h.UniformMatrix4f(m),u_pixels_to_tile_units:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_units_to_pixels:new h.Uniform2f(m),u_dash_image:new h.Uniform1i(m),u_gradient_image:new h.Uniform1i(m),u_image_height:new h.Uniform1f(m),u_texsize:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_alpha_discard_threshold:new h.Uniform1f(m),u_trim_offset:new h.Uniform2f(m)}),linePattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_texsize:new h.Uniform2f(m),u_pixels_to_tile_units:new h.UniformMatrix2f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_units_to_pixels:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m),u_alpha_discard_threshold:new h.Uniform1f(m)}),raster:m=>({u_matrix:new h.UniformMatrix4f(m),u_tl_parent:new h.Uniform2f(m),u_scale_parent:new h.Uniform1f(m),u_fade_t:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_image0:new h.Uniform1i(m),u_image1:new h.Uniform1i(m),u_brightness_low:new h.Uniform1f(m),u_brightness_high:new h.Uniform1f(m),u_saturation_factor:new h.Uniform1f(m),u_contrast_factor:new h.Uniform1f(m),u_spin_weights:new h.Uniform3f(m),u_perspective_transform:new h.Uniform2f(m)}),symbolIcon:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_camera_forward:new h.Uniform3f(m),u_tile_matrix:new h.UniformMatrix4f(m),u_up_vector:new h.Uniform3f(m),u_ecef_origin:new h.Uniform3f(m),u_texture:new h.Uniform1i(m)}),symbolSDF:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_texture:new h.Uniform1i(m),u_gamma_scale:new h.Uniform1f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_tile_id:new h.Uniform3f(m),u_zoom_transition:new h.Uniform1f(m),u_inv_rot_matrix:new h.UniformMatrix4f(m),u_merc_center:new h.Uniform2f(m),u_camera_forward:new h.Uniform3f(m),u_tile_matrix:new h.UniformMatrix4f(m),u_up_vector:new h.Uniform3f(m),u_ecef_origin:new h.Uniform3f(m),u_is_halo:new h.Uniform1i(m)}),symbolTextAndIcon:m=>({u_is_size_zoom_constant:new h.Uniform1i(m),u_is_size_feature_constant:new h.Uniform1i(m),u_size_t:new h.Uniform1f(m),u_size:new h.Uniform1f(m),u_camera_to_center_distance:new h.Uniform1f(m),u_rotate_symbol:new h.Uniform1i(m),u_aspect_ratio:new h.Uniform1f(m),u_fade_change:new h.Uniform1f(m),u_matrix:new h.UniformMatrix4f(m),u_label_plane_matrix:new h.UniformMatrix4f(m),u_coord_matrix:new h.UniformMatrix4f(m),u_is_text:new h.Uniform1i(m),u_pitch_with_map:new h.Uniform1i(m),u_texsize:new h.Uniform2f(m),u_texsize_icon:new h.Uniform2f(m),u_texture:new h.Uniform1i(m),u_texture_icon:new h.Uniform1i(m),u_gamma_scale:new h.Uniform1f(m),u_device_pixel_ratio:new h.Uniform1f(m),u_is_halo:new h.Uniform1i(m)}),background:m=>({u_matrix:new h.UniformMatrix4f(m),u_opacity:new h.Uniform1f(m),u_color:new h.UniformColor(m)}),backgroundPattern:m=>({u_matrix:new h.UniformMatrix4f(m),u_opacity:new h.Uniform1f(m),u_image:new h.Uniform1i(m),u_pattern_tl:new h.Uniform2f(m),u_pattern_br:new h.Uniform2f(m),u_texsize:new h.Uniform2f(m),u_pattern_size:new h.Uniform2f(m),u_pixel_coord_upper:new h.Uniform2f(m),u_pixel_coord_lower:new h.Uniform2f(m),u_tile_units_to_pixels:new h.Uniform1f(m)}),terrainRaster:Pn,terrainDepth:Pn,skybox:m=>({u_matrix:new h.UniformMatrix4f(m),u_sun_direction:new h.Uniform3f(m),u_cubemap:new h.Uniform1i(m),u_opacity:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m)}),skyboxGradient:m=>({u_matrix:new h.UniformMatrix4f(m),u_color_ramp:new h.Uniform1i(m),u_center_direction:new h.Uniform3f(m),u_radius:new h.Uniform1f(m),u_opacity:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m)}),skyboxCapture:m=>({u_matrix_3f:new h.UniformMatrix3f(m),u_sun_direction:new h.Uniform3f(m),u_sun_intensity:new h.Uniform1f(m),u_color_tint_r:new h.Uniform4f(m),u_color_tint_m:new h.Uniform4f(m),u_luminance:new h.Uniform1f(m)}),globeRaster:m=>({u_proj_matrix:new h.UniformMatrix4f(m),u_globe_matrix:new h.UniformMatrix4f(m),u_normalize_matrix:new h.UniformMatrix4f(m),u_merc_matrix:new h.UniformMatrix4f(m),u_zoom_transition:new h.Uniform1f(m),u_merc_center:new h.Uniform2f(m),u_image0:new h.Uniform1i(m),u_grid_matrix:new h.UniformMatrix3f(m),u_skirt_height:new h.Uniform1f(m),u_frustum_tl:new h.Uniform3f(m),u_frustum_tr:new h.Uniform3f(m),u_frustum_br:new h.Uniform3f(m),u_frustum_bl:new h.Uniform3f(m),u_globe_pos:new h.Uniform3f(m),u_globe_radius:new h.Uniform1f(m),u_viewport:new h.Uniform2f(m)}),globeAtmosphere:m=>({u_frustum_tl:new h.Uniform3f(m),u_frustum_tr:new h.Uniform3f(m),u_frustum_br:new h.Uniform3f(m),u_frustum_bl:new h.Uniform3f(m),u_horizon:new h.Uniform1f(m),u_transition:new h.Uniform1f(m),u_fadeout_range:new h.Uniform1f(m),u_color:new h.Uniform4f(m),u_high_color:new h.Uniform4f(m),u_space_color:new h.Uniform4f(m),u_star_intensity:new h.Uniform1f(m),u_star_density:new h.Uniform1f(m),u_star_size:new h.Uniform1f(m),u_temporal_offset:new h.Uniform1f(m),u_horizon_angle:new h.Uniform1f(m),u_rotation_matrix:new h.UniformMatrix4f(m)})};let rc;function Ju(m,l,d,_,w,C,D){const I=m.context,A=I.gl,L=m.transform,R=m.useProgram("collisionBox"),B=[];let q=0,X=0;for(let ie=0;ie<_.length;ie++){const pe=_[ie],ge=l.getTile(pe),me=ge.getBucket(d);if(!me)continue;const Te=fs(pe,me,L);let be=Te;0===w[0]&&0===w[1]||(be=m.translatePosMatrix(Te,ge,w,C));const Ue=D?me.textCollisionBox:me.iconCollisionBox,yt=me.collisionCircleArray;if(yt.length>0){const Fe=h.create(),tt=be;h.mul(Fe,me.placementInvProjMatrix,L.glCoordMatrix),h.mul(Fe,Fe,me.placementViewportMatrix),B.push({circleArray:yt,circleOffset:X,transform:tt,invTransform:Fe,projection:me.getProjection()}),q+=yt.length/4,X=q}Ue&&(m.terrain&&m.terrain.setupElevationDraw(ge,R),R.draw(I,A.LINES,h.DepthMode.disabled,h.StencilMode.disabled,m.colorModeForRenderPass(),h.CullFaceMode.disabled,ya(be,L,ge,me.getProjection()),d.id,Ue.layoutVertexBuffer,Ue.indexBuffer,Ue.segments,null,L.zoom,null,[Ue.collisionVertexBuffer,Ue.collisionVertexBufferExt]))}if(!D||!B.length)return;const K=m.useProgram("collisionCircle"),J=new h.StructArrayLayout2f1f2i16;J.resize(4*q),J._trim();let Q=0;for(const ie of B)for(let pe=0;pe=0&&(K[ie.associatedIconIndex]={x:Fe,y:tt,z:qe,angle:ht})}else qs(me,q)}if(R){X.clear();const re=m.icon.placedSymbolArray;for(let ie=0;ieFe.sortKey-tt.sortKey);for(const Fe of be){const tt=Fe.state;if(m.terrain&&m.terrain.setupElevationDraw(tt.tile,tt.program,{useDepthForOcclusion:!Te,labelPlaneMatrixInv:tt.labelPlaneMatrixInv}),q.activeTexture.set(X.TEXTURE0),tt.atlasTexture.bind(tt.atlasInterpolation,X.CLAMP_TO_EDGE),tt.atlasTextureIcon&&(q.activeTexture.set(X.TEXTURE1),tt.atlasTextureIcon&&tt.atlasTextureIcon.bind(tt.atlasInterpolationIcon,X.CLAMP_TO_EDGE)),tt.isSDF){const qe=tt.uniformValues;tt.hasHalo&&(qe.u_is_halo=1,eu(tt.buffers,Fe.segments,d,m,tt.program,pe,R,B,qe)),qe.u_is_halo=0}eu(tt.buffers,Fe.segments,d,m,tt.program,pe,R,B,tt.uniformValues)}}function eu(m,l,d,_,w,C,D,I,A){const L=_.context,R=[m.dynamicLayoutVertexBuffer,m.opacityVertexBuffer,m.globeExtVertexBuffer];w.draw(L,L.gl.TRIANGLES,C,D,I,h.CullFaceMode.disabled,A,d.id,m.layoutVertexBuffer,m.indexBuffer,l,d.paint,_.transform.zoom,m.programConfigurations.get(d.id),R)}function Dm(m,l,d,_,w,C,D){const I=m.context.gl,A=d.paint.get("fill-pattern"),L=A&&A.constantOr(1);let R,B,q,X,K;D?(B=L&&!d.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",R=I.LINES):(B=L?"fillPattern":"fill",R=I.TRIANGLES);for(const J of _){const Q=l.getTile(J);if(L&&!Q.patternsLoaded())continue;const U=Q.getBucket(d);if(!U)continue;m.prepareDrawTile();const Y=U.programConfigurations.get(d.id),re=m.useProgram(B,Y);L&&(m.context.activeTexture.set(I.TEXTURE0),Q.imageAtlasTexture.bind(I.LINEAR,I.CLAMP_TO_EDGE),Y.updatePaintBuffers());const ie=A.constantOr(null);if(ie&&Q.imageAtlas){const ge=Q.imageAtlas.patternPositions[ie.toString()];ge&&Y.setConstantPatternPositions(ge)}const pe=m.translatePosMatrix(J.projMatrix,Q,d.paint.get("fill-translate"),d.paint.get("fill-translate-anchor"));if(D){X=U.indexBuffer2,K=U.segments2;const ge=m.terrain&&m.terrain.renderingToTexture?m.terrain.drapeBufferSize:[I.drawingBufferWidth,I.drawingBufferHeight];q="fillOutlinePattern"===B&&L?ps(pe,m,Q,ge):Of(pe,ge)}else X=U.indexBuffer,K=U.segments,q=L?Af(pe,m,Q):Jc(pe);m.prepareDrawProgram(m.context,re,J.toUnwrapped()),re.draw(m.context,R,w,m.stencilModeForClipping(J),C,h.CullFaceMode.disabled,q,d.id,U.layoutVertexBuffer,X,K,d.paint,m.transform.zoom,Y)}}function er(m,l,d,_,w,C,D){const I=m.context,A=I.gl,L=m.transform,R=d.paint.get("fill-extrusion-pattern"),B=R.constantOr(1),q=d.paint.get("fill-extrusion-opacity"),X=[d.paint.get("fill-extrusion-ambient-occlusion-intensity"),d.paint.get("fill-extrusion-ambient-occlusion-radius")],K=d.layout.get("fill-extrusion-edge-radius"),J=K>0&&!d.paint.get("fill-extrusion-rounded-roof"),Q=J?0:K,U="globe"===L.projection.name?h.fillExtrusionHeightLift():0,Y="globe"===L.projection.name,re=Y?h.globeToMercatorTransition(L.zoom):0,ie=[h.mercatorXfromLng(L.center.lng),h.mercatorYfromLat(L.center.lat)],pe=[];Y&&pe.push("PROJECTION_GLOBE_VIEW"),X[0]>0&&pe.push("FAUX_AO"),J&&pe.push("ZERO_ROOF_RADIUS");for(const ge of _){const me=l.getTile(ge),Te=me.getBucket(d);if(!Te||Te.projection.name!==L.projection.name)continue;const be=Te.programConfigurations.get(d.id),Ue=m.useProgram(B?"fillExtrusionPattern":"fillExtrusion",be,pe);if(m.terrain){const Je=m.terrain;if(m.style.terrainSetForDrapingOnly())Je.setupElevationDraw(me,Ue,{useMeterToDem:!0});else{if(!Te.enableTerrain)continue;if(Je.setupElevationDraw(me,Ue,{useMeterToDem:!0}),wd(I,l,ge,Te,d,Je),!Te.centroidVertexBuffer){const xt=Ue.attributes.a_centroid_pos;void 0!==xt&&A.vertexAttrib2f(xt,0,0)}}}B&&(m.context.activeTexture.set(A.TEXTURE0),me.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),be.updatePaintBuffers());const yt=R.constantOr(null);if(yt&&me.imageAtlas){const Je=me.imageAtlas.patternPositions[yt.toString()];Je&&be.setConstantPatternPositions(Je)}const Fe=m.translatePosMatrix(ge.projMatrix,me,d.paint.get("fill-extrusion-translate"),d.paint.get("fill-extrusion-translate-anchor")),tt=L.projection.createInversionMatrix(L,ge.canonical),qe=d.paint.get("fill-extrusion-vertical-gradient"),gt=B?Mm(Fe,m,qe,q,X,Q,ge,me,U,re,ie,tt):Pf(Fe,m,qe,q,X,Q,ge,U,re,ie,tt);m.prepareDrawProgram(I,Ue,ge.toUnwrapped());const Be=[];m.terrain&&Be.push(Te.centroidVertexBuffer),Y&&Be.push(Te.layoutVertexExtBuffer),Ue.draw(I,I.gl.TRIANGLES,w,C,D,h.CullFaceMode.backCCW,gt,d.id,Te.layoutVertexBuffer,Te.indexBuffer,Te.segments,d.paint,m.transform.zoom,be,Be)}}function wd(m,l,d,_,w,C){const D=[U=>{let Y=U.canonical.x-1,re=U.wrap;return Y<0&&(Y=(1<{let Y=U.canonical.x+1,re=U.wrap;return Y===1<new h.OverscaledTileID(U.overscaledZ,U.wrap,U.canonical.z,U.canonical.x,(0===U.canonical.y?1<new h.OverscaledTileID(U.overscaledZ,U.wrap,U.canonical.z,U.canonical.x,U.canonical.y===(1<{const Y=l.getSource().minzoom,re=pe=>{const ge=l.getTileByID(pe);if(ge&&ge.hasData())return ge.getBucket(w)},ie=[0,-1,1];for(const pe of ie){if(U.overscaledZ+pe(A[0]=Math.min(U.min.y,Y.min.y),A[1]=Math.max(U.max.y,Y.max.y),A[2]=h.EXTENT-Y.min.x>U.max.x?Y.min.x-h.EXTENT:U.max.x,A),R=(U,Y)=>(A[0]=Math.min(U.min.x,Y.min.x),A[1]=Math.max(U.max.x,Y.max.x),A[2]=h.EXTENT-Y.min.y>U.max.y?Y.min.y-h.EXTENT:U.max.y,A),B=[(U,Y)=>L(U,Y),(U,Y)=>L(Y,U),(U,Y)=>R(U,Y),(U,Y)=>R(Y,U)],q=new h.Point(0,0);let X,K,J;const Q=(U,Y,re,ie,pe)=>{const ge=[[ie?re:U,ie?U:re,0],[ie?re:Y,ie?Y:re,0]],me=pe<0?h.EXTENT+pe:pe,Te=[ie?me:(U+Y)/2,ie?(U+Y)/2:me,0];return 0===re&&pe<0||0!==re&&pe>0?C.getForTilePoints(J,[Te],!0,K):ge.push(Te),C.getForTilePoints(d,ge,!0,X),Math.max(ge[0][2],ge[1][2],Te[2])/C.exaggeration()};for(let U=0;U<4;U++){const Y=(U<2?1:5)-U,re=_.borders[U];if(0===re.length)continue;const ie=J=D[U](d),pe=I(ie);if(!(pe&&pe instanceof h.FillExtrusionBucket&&pe.enableTerrain)||_.borderDoneWithNeighborZ[U]===pe.canonical.z&&pe.borderDoneWithNeighborZ[Y]===_.canonical.z||(K=C.findDEMTileFor(ie),!K||!K.dem))continue;if(!X){const be=C.findDEMTileFor(d);if(!be||!be.dem)return;X=be}const ge=pe.borders[Y];let me=0;const Te=pe.borderDoneWithNeighborZ[Y]!==_.canonical.z;if(_.canonical.z===pe.canonical.z){for(let be=0;beyt[0]+3));)Te&&pe.encodeCentroid(void 0,Fe,!1),me++;if(Fe&&meyt[1]-3)&&(qe++,++me!==ge.length);)Fe=pe.featuresOnBorder[ge[me]];if(Fe=pe.featuresOnBorder[ge[tt]],Ue.intersectsCount()>1||Fe.intersectsCount()>1||1!==qe){1!==qe&&(me=tt),_.encodeCentroid(void 0,Ue,!1),Te&&pe.encodeCentroid(void 0,Fe,!1);continue}const gt=B[U](Ue,Fe),Be=U%2?h.EXTENT-1:0;q.x=Q(gt[0],Math.min(h.EXTENT-1,gt[1]),Be,U<2,gt[2]),q.y=0,_.encodeCentroid(q,Ue,!1),Te&&pe.encodeCentroid(q,Fe,!1)}else _.encodeCentroid(void 0,Ue,!1)}_.borderDoneWithNeighborZ[U]=pe.canonical.z,_.needsCentroidUpdate=!0,Te&&(pe.borderDoneWithNeighborZ[Y]=_.canonical.z,pe.needsCentroidUpdate=!0)}else{for(const be of re)_.encodeCentroid(void 0,_.featuresOnBorder[be],!1);if(Te){for(const be of ge)pe.encodeCentroid(void 0,pe.featuresOnBorder[be],!1);pe.borderDoneWithNeighborZ[Y]=_.canonical.z,pe.needsCentroidUpdate=!0}_.borderDoneWithNeighborZ[U]=pe.canonical.z,_.needsCentroidUpdate=!0}}(_.needsCentroidUpdate||!_.centroidVertexBuffer&&0!==_.centroidVertexArray.length)&&_.uploadCentroid(m)}const ic=new h.Color(1,0,0,1),ns=new h.Color(0,1,0,1),Im=new h.Color(0,0,1,1),zv=new h.Color(1,0,1,1),Jr=new h.Color(0,1,1,1);function Bv(m,l,d){const _=m.context,w=m.transform,C=_.gl,D="globe"===w.projection.name,I=D?["PROJECTION_GLOBE_VIEW"]:null;let A=d.projMatrix;if(D&&h.globeToMercatorTransition(w.zoom)>0){const Ue=h.transitionTileAABBinECEF(d.canonical,w),yt=h.globeDenormalizeECEF(Ue);A=h.multiply(new Float32Array(16),w.globeMatrix,yt),h.multiply(A,w.projMatrix,A)}const L=m.useProgram("debug",null,I),R=l.getTileByID(d.key);m.terrain&&m.terrain.setupElevationDraw(R,L);const B=h.DepthMode.disabled,q=h.StencilMode.disabled,X=m.colorModeForRenderPass(),K="$debug";_.activeTexture.set(C.TEXTURE0),m.emptyTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),D?R._makeGlobeTileDebugBuffers(m.context,w):R._makeDebugTileBoundsBuffers(m.context,w.projection);const J=R._tileDebugBuffer||m.debugBuffer,Q=R._tileDebugIndexBuffer||m.debugIndexBuffer,U=R._tileDebugSegments||m.debugSegments;L.draw(_,C.LINE_STRIP,B,q,X,h.CullFaceMode.disabled,Rf(A,h.Color.red),K,J,Q,U,null,null,null,[R._globeTileDebugBorderBuffer]);const Y=R.latestRawTileData,re=Math.floor((Y&&Y.byteLength||0)/1024),ie=l.getTile(d).tileSize,pe=512/Math.min(ie,512)*(d.overscaledZ/w.zoom)*.5;let ge=d.canonical.toString();d.overscaledZ!==d.canonical.z&&(ge+=` => ${d.overscaledZ}`),ge+=` ${re}kb`,function(Ue,yt){Ue.initDebugOverlayCanvas();const Fe=Ue.debugOverlayCanvas,tt=Ue.context.gl,qe=Ue.debugOverlayCanvas.getContext("2d");qe.clearRect(0,0,Fe.width,Fe.height),qe.shadowColor="white",qe.shadowBlur=2,qe.lineWidth=1.5,qe.strokeStyle="white",qe.textBaseline="top",qe.font="bold 36px Open Sans, sans-serif",qe.fillText(yt,5,5),qe.strokeText(yt,5,5),Ue.debugOverlayTexture.update(Fe),Ue.debugOverlayTexture.bind(tt.LINEAR,tt.CLAMP_TO_EDGE)}(m,ge);const me=R._tileDebugTextBuffer||m.debugBuffer,Te=R._tileDebugTextIndexBuffer||m.quadTriangleIndexBuffer,be=R._tileDebugTextSegments||m.debugSegments;L.draw(_,C.TRIANGLES,B,q,h.ColorMode.alphaBlended,h.CullFaceMode.disabled,Rf(A,h.Color.transparent,pe),K,me,Te,be,null,null,null,[R._globeTileDebugTextBuffer])}function j_(m,l,d,_){_l(m,0,l+d/2,m.transform.width,d,_)}function Zt(m,l,d,_){_l(m,l-d/2,0,d,m.transform.height,_)}function _l(m,l,d,_,w,C){const D=m.context,I=D.gl;I.enable(I.SCISSOR_TEST),I.scissor(l*h.exported.devicePixelRatio,d*h.exported.devicePixelRatio,_*h.exported.devicePixelRatio,w*h.exported.devicePixelRatio),D.clear({color:C}),I.disable(I.SCISSOR_TEST)}const bd=h.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:Vf}=bd;function Xs(m,l,d,_){m.emplaceBack(l,d,_)}class Cd{constructor(l){this.vertexArray=new h.StructArrayLayout3f12,this.indices=new h.StructArrayLayout3ui6,Xs(this.vertexArray,-1,-1,1),Xs(this.vertexArray,1,-1,1),Xs(this.vertexArray,-1,1,1),Xs(this.vertexArray,1,1,1),Xs(this.vertexArray,-1,-1,-1),Xs(this.vertexArray,1,-1,-1),Xs(this.vertexArray,-1,1,-1),Xs(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=l.createVertexBuffer(this.vertexArray,Vf),this.indexBuffer=l.createIndexBuffer(this.indices),this.segment=h.SegmentVector.simpleSegment(0,0,36,12)}}function rs(m,l,d,_,w,C){const D=m.gl,I=l.paint.get("sky-atmosphere-color"),A=l.paint.get("sky-atmosphere-halo-color"),L=l.paint.get("sky-atmosphere-sun-intensity"),R={u_matrix_3f:h.fromMat4(h.create$1(),_),u_sun_direction:w,u_sun_intensity:L,u_color_tint_r:[(K=I).r,K.g,K.b,K.a],u_color_tint_m:[(J=A).r,J.g,J.b,J.a],u_luminance:5e-5};var K,J;D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_CUBE_MAP_POSITIVE_X+C,l.skyboxTexture,0),d.draw(m,D.TRIANGLES,h.DepthMode.disabled,h.StencilMode.disabled,h.ColorMode.unblended,h.CullFaceMode.frontCW,R,"skyboxCapture",l.skyboxGeometry.vertexBuffer,l.skyboxGeometry.indexBuffer,l.skyboxGeometry.segment)}const Md=h.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class $_{constructor(l){const d=new h.StructArrayLayout5f20;d.emplaceBack(-1,1,1,0,0),d.emplaceBack(1,1,1,1,0),d.emplaceBack(1,-1,1,1,1),d.emplaceBack(-1,-1,1,0,1);const _=new h.StructArrayLayout3ui6;_.emplaceBack(0,1,2),_.emplaceBack(2,3,0),this.vertexBuffer=l.createVertexBuffer(d,Md.members),this.indexBuffer=l.createIndexBuffer(_),this.segments=h.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const tu={symbol:function(m,l,d,_,w){if("translucent"!==m.renderPass)return;const C=h.StencilMode.disabled,D=m.colorModeForRenderPass();d.layout.get("text-variable-anchor")&&function(I,A,L,R,B,q,X){const K=A.transform,J="map"===B,Q="map"===q;for(const U of I){const Y=R.getTile(U),re=Y.getBucket(L);if(!re||!re.text||!re.text.segments.get().length)continue;const ie=h.evaluateSizeForZoom(re.textSizeData,K.zoom),pe=Yr(U,re.getProjection(),K),ge=K.calculatePixelsToTileUnitsMatrix(Y),me=Ze(pe,Y.tileID.canonical,Q,J,K,re.getProjection(),ge),Te="none"!==L.layout.get("icon-text-fit")&&re.hasIconData();if(ie){const be=Math.pow(2,K.zoom-Y.tileID.overscaledZ);vd(re,J,Q,X,h.symbolSize,K,me,U,be,ie,Te)}}}(_,m,d,l,d.layout.get("text-rotation-alignment"),d.layout.get("text-pitch-alignment"),w),0!==d.paint.get("icon-opacity").constantOr(1)&&xd(m,l,d,_,!1,d.paint.get("icon-translate"),d.paint.get("icon-translate-anchor"),d.layout.get("icon-rotation-alignment"),d.layout.get("icon-pitch-alignment"),d.layout.get("icon-keep-upright"),C,D),0!==d.paint.get("text-opacity").constantOr(1)&&xd(m,l,d,_,!0,d.paint.get("text-translate"),d.paint.get("text-translate-anchor"),d.layout.get("text-rotation-alignment"),d.layout.get("text-pitch-alignment"),d.layout.get("text-keep-upright"),C,D),l.map.showCollisionBoxes&&(Ju(m,l,d,_,d.paint.get("text-translate"),d.paint.get("text-translate-anchor"),!0),Ju(m,l,d,_,d.paint.get("icon-translate"),d.paint.get("icon-translate-anchor"),!1))},circle:function(m,l,d,_){if("translucent"!==m.renderPass)return;const w=d.paint.get("circle-opacity"),C=d.paint.get("circle-stroke-width"),D=d.paint.get("circle-stroke-opacity"),I=void 0!==d.layout.get("circle-sort-key").constantOr(1);if(0===w.constantOr(1)&&(0===C.constantOr(1)||0===D.constantOr(1)))return;const A=m.context,L=A.gl,R=m.transform,B=m.depthModeForSublayer(0,h.DepthMode.ReadOnly),q=h.StencilMode.disabled,X=m.colorModeForRenderPass(),K="globe"===R.projection.name,J=[h.mercatorXfromLng(R.center.lng),h.mercatorYfromLat(R.center.lat)],Q=[];for(let Y=0;Y<_.length;Y++){const re=_[Y],ie=l.getTile(re),pe=ie.getBucket(d);if(!pe||pe.projection.name!==R.projection.name)continue;const ge=pe.programConfigurations.get(d.id),me=Em(d);K&&me.push("PROJECTION_GLOBE_VIEW");const Te=m.useProgram("circle",ge,me),be=pe.layoutVertexBuffer,Ue=pe.globeExtVertexBuffer,yt=pe.indexBuffer,Fe=R.projection.createInversionMatrix(R,re.canonical),tt={programConfiguration:ge,program:Te,layoutVertexBuffer:be,globeExtVertexBuffer:Ue,indexBuffer:yt,uniformValues:kf(m,re,ie,Fe,J,d),tile:ie};if(I){const qe=pe.segments.get();for(const gt of qe)Q.push({segments:new h.SegmentVector([gt]),sortKey:gt.sortKey,state:tt})}else Q.push({segments:pe.segments,sortKey:0,state:tt})}I&&Q.sort((Y,re)=>Y.sortKey-re.sortKey);const U={useDepthForOcclusion:!K};for(const Y of Q){const{programConfiguration:re,program:ie,layoutVertexBuffer:pe,globeExtVertexBuffer:ge,indexBuffer:me,uniformValues:Te,tile:be}=Y.state,Ue=Y.segments;m.terrain&&m.terrain.setupElevationDraw(be,ie,U),m.prepareDrawProgram(A,ie,be.tileID.toUnwrapped()),ie.draw(A,L.TRIANGLES,B,q,X,h.CullFaceMode.disabled,Te,d.id,pe,me,Ue,d.paint,R.zoom,re,[ge])}},heatmap:function(m,l,d,_){if(0!==d.paint.get("heatmap-opacity"))if("offscreen"===m.renderPass){const w=m.context,C=w.gl,D=h.StencilMode.disabled,I=new h.ColorMode([C.ONE,C.ONE],h.Color.transparent,[!0,!0,!0,!0]);(function(X,K,J,Q){const U=X.gl,Y=K.width*Q,re=K.height*Q;X.activeTexture.set(U.TEXTURE1),X.viewport.set([0,0,Y,re]);let ie=J.heatmapFbo;if(!ie||ie&&(ie.width!==Y||ie.height!==re)){ie&&ie.destroy();const pe=U.createTexture();U.bindTexture(U.TEXTURE_2D,pe),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_S,U.CLAMP_TO_EDGE),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_T,U.CLAMP_TO_EDGE),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_MIN_FILTER,U.LINEAR),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_MAG_FILTER,U.LINEAR),ie=J.heatmapFbo=X.createFramebuffer(Y,re,!1),function(ge,me,Te,be,Ue,yt){const Fe=ge.gl;Fe.texImage2D(Fe.TEXTURE_2D,0,ge.isWebGL2&&ge.extRenderToTextureHalfFloat?Fe.RGBA16F:Fe.RGBA,Ue,yt,0,Fe.RGBA,ge.extRenderToTextureHalfFloat?ge.isWebGL2?Fe.HALF_FLOAT:ge.extTextureHalfFloat.HALF_FLOAT_OES:Fe.UNSIGNED_BYTE,null),be.colorAttachment.set(Te)}(X,0,pe,ie,Y,re)}else U.bindTexture(U.TEXTURE_2D,ie.colorAttachment.get()),X.bindFramebuffer.set(ie.framebuffer)})(w,m,d,"globe"===m.transform.projection.name?.5:.25),w.clear({color:h.Color.transparent});const A=m.transform,L="globe"===A.projection.name,R=L?["PROJECTION_GLOBE_VIEW"]:null,B=L?h.CullFaceMode.frontCCW:h.CullFaceMode.disabled,q=[h.mercatorXfromLng(A.center.lng),h.mercatorYfromLat(A.center.lat)];for(let X=0;X<_.length;X++){const K=_[X];if(l.hasRenderableParent(K))continue;const J=l.getTile(K),Q=J.getBucket(d);if(!Q||Q.projection.name!==A.projection.name)continue;const U=Q.programConfigurations.get(d.id),Y=m.useProgram("heatmap",U,R),{zoom:re}=m.transform;m.terrain&&m.terrain.setupElevationDraw(J,Y),m.prepareDrawProgram(w,Y,K.toUnwrapped());const ie=A.projection.createInversionMatrix(A,K.canonical);Y.draw(w,C.TRIANGLES,h.DepthMode.disabled,D,I,B,V_(m,K,J,ie,q,re,d.paint.get("heatmap-intensity")),d.id,Q.layoutVertexBuffer,Q.indexBuffer,Q.segments,d.paint,m.transform.zoom,U,L?[Q.globeExtVertexBuffer]:null)}w.viewport.set([0,0,m.width,m.height])}else"translucent"===m.renderPass&&(m.context.setColorMode(m.colorModeForRenderPass()),function(w,C){const D=w.context,I=D.gl,A=C.heatmapFbo;if(!A)return;D.activeTexture.set(I.TEXTURE0),I.bindTexture(I.TEXTURE_2D,A.colorAttachment.get()),D.activeTexture.set(I.TEXTURE1);let L=C.colorRampTexture;L||(L=C.colorRampTexture=new h.Texture(D,C.colorRamp,I.RGBA)),L.bind(I.LINEAR,I.CLAMP_TO_EDGE),w.useProgram("heatmapTexture").draw(D,I.TRIANGLES,h.DepthMode.disabled,h.StencilMode.disabled,w.colorModeForRenderPass(),h.CullFaceMode.disabled,{u_image:0,u_color_ramp:1,u_opacity:C.paint.get("heatmap-opacity")},C.id,w.viewportBuffer,w.quadTriangleIndexBuffer,w.viewportSegments,C.paint,w.transform.zoom)}(m,d))},line:function(m,l,d,_){if("translucent"!==m.renderPass)return;const w=d.paint.get("line-opacity"),C=d.paint.get("line-width");if(0===w.constantOr(1)||0===C.constantOr(1))return;const D=m.depthModeForSublayer(0,h.DepthMode.ReadOnly),I=m.colorModeForRenderPass(),A=m.terrain&&m.terrain.renderingToTexture?1:h.exported.devicePixelRatio,L=d.paint.get("line-dasharray"),R=L.constantOr(1),B=d.layout.get("line-cap"),q=d.paint.get("line-pattern"),X=q.constantOr(1),K=d.paint.get("line-gradient"),J=X?"linePattern":"line",Q=m.context,U=Q.gl,Y=(ie=>{const pe=[];yd(ie)&&pe.push("RENDER_LINE_DASH"),ie.paint.get("line-gradient")&&pe.push("RENDER_LINE_GRADIENT");const ge=ie.paint.get("line-trim-offset");0===ge[0]&&0===ge[1]||pe.push("RENDER_LINE_TRIM_OFFSET");const me=ie.paint.get("line-pattern").constantOr(1),Te=1!==ie.paint.get("line-opacity").constantOr(1);return!me&&Te&&pe.push("RENDER_LINE_ALPHA_DISCARD"),pe})(d);let re=Y.includes("RENDER_LINE_ALPHA_DISCARD");m.terrain&&m.terrain.clipOrMaskOverlapStencilType()&&(re=!1);for(const ie of _){const pe=l.getTile(ie);if(X&&!pe.patternsLoaded())continue;const ge=pe.getBucket(d);if(!ge)continue;m.prepareDrawTile();const me=ge.programConfigurations.get(d.id),Te=m.useProgram(J,me,Y),be=q.constantOr(null);if(be&&pe.imageAtlas){const Je=pe.imageAtlas.patternPositions[be.toString()];Je&&me.setConstantPatternPositions(Je)}const Ue=L.constantOr(null),yt=B.constantOr(null);if(!X&&Ue&&yt&&pe.lineAtlas){const Je=pe.lineAtlas.getDash(Ue,yt);Je&&me.setConstantPatternPositions(Je)}let[Fe,tt]=d.paint.get("line-trim-offset");("round"===yt||"square"===yt)&&Fe!==tt&&(0===Fe&&(Fe-=1),1===tt&&(tt+=1));const qe=m.terrain?ie.projMatrix:null,gt=X?Yu(m,pe,d,qe,A):Fv(m,pe,d,qe,ge.lineClipsArray.length,A,[Fe,tt]);if(K){const Je=ge.gradients[d.id];let xt=Je.texture;if(d.gradientVersion!==Je.version){let ht=256;if(d.stepInterpolant){const Et=l.getSource().maxzoom,ln=ie.canonical.z===Et?Math.ceil(1<{Te.draw(Q,U.TRIANGLES,D,Je,I,h.CullFaceMode.disabled,gt,d.id,ge.layoutVertexBuffer,ge.indexBuffer,ge.segments,d.paint,m.transform.zoom,me,[ge.layoutVertexBuffer2])};if(re){const Je=m.stencilModeForClipping(ie).ref;0===Je&&m.terrain&&Q.clear({stencil:0});const xt={func:U.EQUAL,mask:255};gt.u_alpha_discard_threshold=.8,Be(new h.StencilMode(xt,Je,255,U.KEEP,U.KEEP,U.INVERT)),gt.u_alpha_discard_threshold=0,Be(new h.StencilMode(xt,Je,255,U.KEEP,U.KEEP,U.KEEP))}else Be(m.stencilModeForClipping(ie))}re&&(m.resetStencilClippingMasks(),m.terrain&&Q.clear({stencil:0}))},fill:function(m,l,d,_){const w=d.paint.get("fill-color"),C=d.paint.get("fill-opacity");if(0===C.constantOr(1))return;const D=m.colorModeForRenderPass(),I=d.paint.get("fill-pattern"),A=m.opaquePassEnabledForLayer()&&!I.constantOr(1)&&1===w.constantOr(h.Color.transparent).a&&1===C.constantOr(0)?"opaque":"translucent";if(m.renderPass===A){const L=m.depthModeForSublayer(1,"opaque"===m.renderPass?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly);Dm(m,l,d,_,L,D,!1)}if("translucent"===m.renderPass&&d.paint.get("fill-antialias")){const L=m.depthModeForSublayer(d.getPaintProperty("fill-outline-color")?2:0,h.DepthMode.ReadOnly);Dm(m,l,d,_,L,D,!0)}},"fill-extrusion":function(m,l,d,_){const w=d.paint.get("fill-extrusion-opacity");if(0!==w&&"translucent"===m.renderPass){const C=new h.DepthMode(m.context.gl.LEQUAL,h.DepthMode.ReadWrite,m.depthRangeFor3D);if(1!==w||d.paint.get("fill-extrusion-pattern").constantOr(1))er(m,l,d,_,C,h.StencilMode.disabled,h.ColorMode.disabled),er(m,l,d,_,C,m.stencilModeFor3D(),m.colorModeForRenderPass()),m.resetStencilClippingMasks();else{const D=m.colorModeForRenderPass();er(m,l,d,_,C,h.StencilMode.disabled,D)}}},hillshade:function(m,l,d,_){if("offscreen"!==m.renderPass&&"translucent"!==m.renderPass)return;const w=m.context,C=m.depthModeForSublayer(0,h.DepthMode.ReadOnly),D=m.colorModeForRenderPass(),I=m.terrain&&m.terrain.renderingToTexture,[A,L]="translucent"!==m.renderPass||I?[{},_]:m.stencilConfigForOverlap(_);for(const R of L){const B=l.getTile(R);if(B.needsHillshadePrepare&&"offscreen"===m.renderPass)Kr(m,B,d,C,h.StencilMode.disabled,D);else if("translucent"===m.renderPass){const q=I&&m.terrain?m.terrain.stencilModeForRTTOverlap(R):A[R.overscaledZ];N_(m,R,B,d,C,q,D)}}w.viewport.set([0,0,m.width,m.height]),m.resetStencilClippingMasks()},raster:function(m,l,d,_,w,C){if("translucent"!==m.renderPass||0===d.paint.get("raster-opacity")||!_.length)return;const D=m.context,I=D.gl,A=l.getSource(),L=m.useProgram("raster"),R=m.colorModeForRenderPass(),B=m.terrain&&m.terrain.renderingToTexture,[q,X]=A instanceof Wn||B?[{},_]:m.stencilConfigForOverlap(_),K=X[X.length-1].overscaledZ,J=!m.options.moving;for(const Q of X){const U=B?h.DepthMode.disabled:m.depthModeForSublayer(Q.overscaledZ-K,1===d.paint.get("raster-opacity")?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly,I.LESS),Y=Q.toUnwrapped(),re=l.getTile(Q);if(B&&(!re||!re.hasData()))continue;const ie=B?Q.projMatrix:m.transform.calculateProjMatrix(Y,J),pe=m.terrain&&B?m.terrain.stencilModeForRTTOverlap(Q):q[Q.overscaledZ],ge=C?0:d.paint.get("raster-fade-duration");re.registerFadeDuration(ge);const me=l.findLoadedParent(Q,0),Te=Kc(re,me,l,m.transform,ge);let be,Ue;m.terrain&&m.terrain.prepareDrawTile();const yt="nearest"===d.paint.get("raster-resampling")?I.NEAREST:I.LINEAR;D.activeTexture.set(I.TEXTURE0),re.texture.bind(yt,I.CLAMP_TO_EDGE),D.activeTexture.set(I.TEXTURE1),me?(me.texture.bind(yt,I.CLAMP_TO_EDGE),be=Math.pow(2,me.tileID.overscaledZ-re.tileID.overscaledZ),Ue=[re.tileID.canonical.x*be%1,re.tileID.canonical.y*be%1]):re.texture.bind(yt,I.CLAMP_TO_EDGE),re.texture.useMipmap&&D.extTextureFilterAnisotropic&&m.transform.pitch>20&&I.texParameterf(I.TEXTURE_2D,D.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,D.extTextureFilterAnisotropicMax);const Fe=Mo(ie,Ue||[0,0],be||1,Te,d,A instanceof Wn?A.perspectiveTransform:[0,0]);if(m.prepareDrawProgram(D,L,Y),A instanceof Wn)A.boundsBuffer&&A.boundsSegments&&L.draw(D,I.TRIANGLES,U,h.StencilMode.disabled,R,h.CullFaceMode.disabled,Fe,d.id,A.boundsBuffer,m.quadTriangleIndexBuffer,A.boundsSegments);else{const{tileBoundsBuffer:tt,tileBoundsIndexBuffer:qe,tileBoundsSegments:gt}=m.getTileBoundsBuffers(re);L.draw(D,I.TRIANGLES,U,pe,R,h.CullFaceMode.disabled,Fe,d.id,tt,qe,gt)}}m.resetStencilClippingMasks()},background:function(m,l,d,_){const w=d.paint.get("background-color"),C=d.paint.get("background-opacity");if(0===C)return;const D=m.context,I=D.gl,A=m.transform,L=A.tileSize,R=d.paint.get("background-pattern");if(m.isPatternMissing(R))return;const B=!R&&1===w.a&&1===C&&m.opaquePassEnabledForLayer()?"opaque":"translucent";if(m.renderPass!==B)return;const q=h.StencilMode.disabled,X=m.depthModeForSublayer(0,"opaque"===B?h.DepthMode.ReadWrite:h.DepthMode.ReadOnly),K=m.colorModeForRenderPass(),J=m.useProgram(R?"backgroundPattern":"background");let Q,U=_;U||(Q=m.getBackgroundTiles(),U=Object.values(Q).map(Y=>Y.tileID)),R&&(D.activeTexture.set(I.TEXTURE0),m.imageManager.bind(m.context));for(const Y of U){const re=Y.toUnwrapped(),ie=_?Y.projMatrix:m.transform.calculateProjMatrix(re);m.prepareDrawTile();const pe=l?l.getTile(Y):Q?Q[Y.key]:new h.Tile(Y,L,A.zoom,m),ge=R?Nv(ie,C,m,R,{tileID:Y,tileSize:L}):tn(ie,C,w);m.prepareDrawProgram(D,J,re);const{tileBoundsBuffer:me,tileBoundsIndexBuffer:Te,tileBoundsSegments:be}=m.getTileBoundsBuffers(pe);J.draw(D,I.TRIANGLES,X,q,K,h.CullFaceMode.disabled,ge,d.id,me,Te,be)}},sky:function(m,l,d){const _=m.transform,w="mercator"===_.projection.name||"globe"===_.projection.name?1:h.smoothstep(7,8,_.zoom),C=d.paint.get("sky-opacity")*w;if(0===C)return;const D=m.context,I=d.paint.get("sky-type"),A=new h.DepthMode(D.gl.LEQUAL,h.DepthMode.ReadOnly,[0,1]),L=m.frameCounter/1e3%1;"atmosphere"===I?"offscreen"===m.renderPass?d.needsSkyboxCapture(m)&&(function(R,B,q,X){const K=R.context,J=K.gl;let Q=B.skyboxFbo;if(!Q){Q=B.skyboxFbo=K.createFramebuffer(32,32,!1),B.skyboxGeometry=new Cd(K),B.skyboxTexture=K.gl.createTexture(),J.bindTexture(J.TEXTURE_CUBE_MAP,B.skyboxTexture),J.texParameteri(J.TEXTURE_CUBE_MAP,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_CUBE_MAP,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_CUBE_MAP,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_CUBE_MAP,J.TEXTURE_MAG_FILTER,J.LINEAR);for(let ie=0;ie<6;++ie)J.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,J.RGBA,32,32,0,J.RGBA,J.UNSIGNED_BYTE,null)}K.bindFramebuffer.set(Q.framebuffer),K.viewport.set([0,0,32,32]);const U=B.getCenter(R,!0),Y=R.useProgram("skyboxCapture"),re=new Float64Array(16);h.identity(re),h.rotateY(re,re,.5*-Math.PI),rs(K,B,Y,re,U,0),h.identity(re),h.rotateY(re,re,.5*Math.PI),rs(K,B,Y,re,U,1),h.identity(re),h.rotateX(re,re,.5*-Math.PI),rs(K,B,Y,re,U,2),h.identity(re),h.rotateX(re,re,.5*Math.PI),rs(K,B,Y,re,U,3),h.identity(re),rs(K,B,Y,re,U,4),h.identity(re),h.rotateY(re,re,Math.PI),rs(K,B,Y,re,U,5),K.viewport.set([0,0,R.width,R.height])}(m,d),d.markSkyboxValid(m)):"sky"===m.renderPass&&function(R,B,q,X,K){const J=R.context,Q=J.gl,U=R.transform,Y=R.useProgram("skybox");J.activeTexture.set(Q.TEXTURE0),Q.bindTexture(Q.TEXTURE_CUBE_MAP,B.skyboxTexture);const re={u_matrix:U.skyboxMatrix,u_sun_direction:B.getCenter(R,!1),u_cubemap:0,u_opacity:X,u_temporal_offset:K};R.prepareDrawProgram(J,Y),Y.draw(J,Q.TRIANGLES,q,h.StencilMode.disabled,R.colorModeForRenderPass(),h.CullFaceMode.backCW,re,"skybox",B.skyboxGeometry.vertexBuffer,B.skyboxGeometry.indexBuffer,B.skyboxGeometry.segment)}(m,d,A,C,L):"gradient"===I&&"sky"===m.renderPass&&function(R,B,q,X,K){const J=R.context,Q=J.gl,U=R.transform,Y=R.useProgram("skyboxGradient");B.skyboxGeometry||(B.skyboxGeometry=new Cd(J)),J.activeTexture.set(Q.TEXTURE0);let re=B.colorRampTexture;re||(re=B.colorRampTexture=new h.Texture(J,B.colorRamp,Q.RGBA)),re.bind(Q.LINEAR,Q.CLAMP_TO_EDGE);const ie=(pe=U.skyboxMatrix,ge=B.getCenter(R,!1),me=B.paint.get("sky-gradient-radius"),Te=X,be=K,{u_matrix:pe,u_color_ramp:0,u_center_direction:ge,u_radius:h.degToRad(me),u_opacity:Te,u_temporal_offset:be});var pe,ge,me,Te,be;R.prepareDrawProgram(J,Y),Y.draw(J,Q.TRIANGLES,q,h.StencilMode.disabled,R.colorModeForRenderPass(),h.CullFaceMode.backCW,ie,"skyboxGradient",B.skyboxGeometry.vertexBuffer,B.skyboxGeometry.indexBuffer,B.skyboxGeometry.segment)}(m,d,A,C,L)},debug:function(m,l,d){for(let _=0;_w)return void(this.transform.fogCullDistSq=null);const C=_+.78*(w-_);this.transform.fogCullDistSq=C*C}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(l,d){if(this.width=l*h.exported.devicePixelRatio,this.height=d*h.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const _ of this.style.order)this.style._layers[_].resize()}setup(){const l=this.context,d=new h.StructArrayLayout2i4;d.emplaceBack(0,0),d.emplaceBack(h.EXTENT,0),d.emplaceBack(0,h.EXTENT),d.emplaceBack(h.EXTENT,h.EXTENT),this.tileExtentBuffer=l.createVertexBuffer(d,h.posAttributes.members),this.tileExtentSegments=h.SegmentVector.simpleSegment(0,0,4,2);const _=new h.StructArrayLayout2i4;_.emplaceBack(0,0),_.emplaceBack(h.EXTENT,0),_.emplaceBack(0,h.EXTENT),_.emplaceBack(h.EXTENT,h.EXTENT),this.debugBuffer=l.createVertexBuffer(_,h.posAttributes.members),this.debugSegments=h.SegmentVector.simpleSegment(0,0,4,5);const w=new h.StructArrayLayout2i4;w.emplaceBack(-1,-1),w.emplaceBack(1,-1),w.emplaceBack(-1,1),w.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(w,h.posAttributes.members),this.viewportSegments=h.SegmentVector.simpleSegment(0,0,4,2);const C=new h.StructArrayLayout4i8;C.emplaceBack(0,0,0,0),C.emplaceBack(h.EXTENT,0,h.EXTENT,0),C.emplaceBack(0,h.EXTENT,0,h.EXTENT),C.emplaceBack(h.EXTENT,h.EXTENT,h.EXTENT,h.EXTENT),this.mercatorBoundsBuffer=l.createVertexBuffer(C,h.boundsAttributes.members),this.mercatorBoundsSegments=h.SegmentVector.simpleSegment(0,0,4,2);const D=new h.StructArrayLayout3ui6;D.emplaceBack(0,1,2),D.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(D);const I=new h.StructArrayLayout1ui2;for(const L of[0,1,3,2,0])I.emplaceBack(L);this.debugIndexBuffer=l.createIndexBuffer(I),this.emptyTexture=new h.Texture(l,new h.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),l.gl.RGBA),this.identityMat=h.create();const A=this.context.gl;this.stencilClearMode=new h.StencilMode({func:A.ALWAYS,mask:0},0,255,A.ZERO,A.ZERO,A.ZERO),this.loadTimeStamps.push(h.window.performance.now()),this.atmosphereBuffer=new $_(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(l){return l._makeTileBoundsBuffers(this.context,this.transform.projection),l._tileBoundsBuffer?{tileBoundsBuffer:l._tileBoundsBuffer,tileBoundsIndexBuffer:l._tileBoundsIndexBuffer,tileBoundsSegments:l._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const l=this.context,d=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(l,d.TRIANGLES,h.DepthMode.disabled,this.stencilClearMode,h.ColorMode.disabled,h.CullFaceMode.disabled,nc(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(l,d,_){if(!d||this.currentStencilSource===d.id||!l.isTileClipped()||!_||0===_.length)return;if(this._tileClippingMaskIDs&&!this.terrain){let I=!1;for(const A of _)if(void 0===this._tileClippingMaskIDs[A.key]){I=!0;break}if(!I)return}this.currentStencilSource=d.id;const w=this.context,C=w.gl;this.nextStencilID+_.length>256&&this.clearStencil(),w.setColorMode(h.ColorMode.disabled),w.setDepthMode(h.DepthMode.disabled);const D=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const I of _){const A=d.getTile(I),L=this._tileClippingMaskIDs[I.key]=this.nextStencilID++,{tileBoundsBuffer:R,tileBoundsIndexBuffer:B,tileBoundsSegments:q}=this.getTileBoundsBuffers(A);D.draw(w,C.TRIANGLES,h.DepthMode.disabled,new h.StencilMode({func:C.ALWAYS,mask:0},L,255,C.KEEP,C.KEEP,C.REPLACE),h.ColorMode.disabled,h.CullFaceMode.disabled,nc(I.projMatrix),"$clipping",R,B,q)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,d=this.context.gl;return new h.StencilMode({func:d.NOTEQUAL,mask:255},l,255,d.KEEP,d.KEEP,d.REPLACE)}stencilModeForClipping(l){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(l);const d=this.context.gl;return new h.StencilMode({func:d.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,d.KEEP,d.KEEP,d.REPLACE)}stencilConfigForOverlap(l){const d=this.context.gl,_=l.sort((D,I)=>I.overscaledZ-D.overscaledZ),w=_[_.length-1].overscaledZ,C=_[0].overscaledZ-w+1;if(C>1){this.currentStencilSource=void 0,this.nextStencilID+C>256&&this.clearStencil();const D={};for(let I=0;I=0;this.currentLayer--){const L=this.style._layers[_[this.currentLayer]],R=l._getLayerSourceCache(L);if(L.isSky())continue;const B=R?D[R.id]:void 0;this._renderTileClippingMasks(L,R,B),this.renderLayer(this,R,L,B)}if(this.style.fog&&this.transform.projection.supportsFog&&function(L,R){const B=L.context,q=B.gl,X=L.transform,K=new h.DepthMode(q.LEQUAL,h.DepthMode.ReadOnly,[0,1]),J=L.useProgram("globeAtmosphere",null,"globe"===X.projection.name?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),Q=h.globeToMercatorTransition(X.zoom),U=R.properties.get("color").toArray01(),Y=R.properties.get("high-color").toArray01(),re=R.properties.get("space-color").toArray01PremultipliedAlpha(),ie=h.identity$1([]);h.rotateY$1(ie,ie,-h.degToRad(X._center.lng)),h.rotateX$1(ie,ie,h.degToRad(X._center.lat)),h.rotateZ$1(ie,ie,X.angle),h.rotateX$1(ie,ie,-X._pitch);const pe=h.fromQuat(new Float32Array(16),ie),ge=h.mapValue(R.properties.get("star-intensity"),0,1,0,.25),Te=h.mapValue(R.properties.get("horizon-blend"),0,1,5e-4,.25),be=h.globeUseCustomAntiAliasing(L,B,X)&&5e-4===Te?X.worldSize/(2*Math.PI*1.025)-1:X.globeRadius,Ue=L.frameCounter/1e3%1,yt=h.length(X.globeCenterInViewSpace),Fe=Math.sqrt(Math.pow(yt,2)-Math.pow(be,2)),tt=Math.acos(Fe/yt),qe={u_frustum_tl:X.frustumCorners.TL,u_frustum_tr:X.frustumCorners.TR,u_frustum_br:X.frustumCorners.BR,u_frustum_bl:X.frustumCorners.BL,u_horizon:X.frustumCorners.horizon,u_transition:Q,u_fadeout_range:Te,u_color:U,u_high_color:Y,u_space_color:re,u_star_intensity:ge,u_star_size:5*h.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:Ue,u_horizon_angle:tt,u_rotation_matrix:pe};L.prepareDrawProgram(B,J);const gt=L.atmosphereBuffer;gt&&J.draw(B,q.TRIANGLES,K,h.StencilMode.disabled,h.ColorMode.alphaBlended,h.CullFaceMode.backCW,qe,"skybox",gt.vertexBuffer,gt.indexBuffer,gt.segments)}(this,this.style.fog),this.renderPass="sky",(h.globeToMercatorTransition(this.transform.zoom)>0||"globe"!==this.transform.projection.name)&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer<_.length;this.currentLayer++){const L=this.style._layers[_[this.currentLayer]],R=l._getLayerSourceCache(L);L.isSky()&&this.renderLayer(this,R,L,R?D[R.id]:void 0)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<_.length;){const L=this.style._layers[_[this.currentLayer]],R=l._getLayerSourceCache(L);if(L.isSky()){++this.currentLayer;continue}if(this.terrain&&this.style.isLayerDraped(L)){if(L.isHidden(this.transform.zoom)){++this.currentLayer;continue}this.currentLayer=this.terrain.renderBatch(this.currentLayer);continue}const B=R?("symbol"===L.type?I:D)[R.id]:void 0;this._renderTileClippingMasks(L,R,R?C[R.id]:void 0),this.renderLayer(this,R,L,B),++this.currentLayer}if(this.terrain&&this.terrain.postRender(),this.options.showTileBoundaries||this.options.showQueryGeometry||this.options.showTileAABBs){let L=null;h.values(this.style._layers).forEach(R=>{const B=l._getLayerSourceCache(R);B&&!R.isHidden(this.transform.zoom)&&(!L||L.getSource().maxzoom0?d.pop():null}isPatternMissing(l){return null===l||void 0!==l&&!this.imageManager.getPattern(l.toString())}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const l=this.terrain&&this.terrain.renderingToTexture,d=this.terrain&&0===this.terrain.exaggeration(),_=this.style&&this.style.fog,w=[];return this.terrainRenderModeElevated()&&w.push("TERRAIN"),"globe"===this.transform.projection.name&&w.push("GLOBE"),d&&w.push("ZERO_EXAGGERATION"),_&&!l&&0!==_.getOpacity(this.transform.pitch)&&w.push("FOG"),l&&w.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&w.push("OVERDRAW_INSPECTOR"),w}useProgram(l,d,_){this.cache=this.cache||{};const w=_||[],C=this.currentGlobalDefines().concat(w),D=qt.cacheKey(If[l],l,C,d);return this.cache[D]||(this.cache[D]=new qt(this.context,l,If[l],d,ts[l],C)),this.cache[D]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=h.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new h.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(l,d,_){if(this.terrain&&this.terrain.renderingToTexture)return;const w=this.style.fog;if(w){const C=w.getOpacity(this.transform.pitch),D=((I,A,L,R,B,q,X,K,J,Q,U)=>{const Y=I.transform,re=A.properties.get("color").toArray01();re[3]=R;const ie=I.frameCounter/1e3%1;return{u_fog_matrix:L?Y.calculateFogTileMatrix(L):I.identityMat,u_fog_range:A.getFovAdjustedRange(Y._fov),u_fog_color:re,u_fog_horizon_blend:A.properties.get("horizon-blend"),u_fog_temporal_offset:ie,u_frustum_tl:B,u_frustum_tr:q,u_frustum_br:X,u_frustum_bl:K,u_globe_pos:J,u_globe_radius:Q,u_viewport:U,u_globe_transition:h.globeToMercatorTransition(Y.zoom),u_is_globe:+("globe"===Y.projection.name)}})(this,w,_,C,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*h.exported.devicePixelRatio,this.transform.height*h.exported.devicePixelRatio]);d.setFogUniformValues(l,D)}}setTileLoadedFlag(l){this.tileLoaded=l}saveCanvasCopy(){const l=this.canvasCopy();l&&(this.frameCopies.push(l),this.tileLoaded=!1)}canvasCopy(){const l=this.context.gl,d=l.createTexture();return l.bindTexture(l.TEXTURE_2D,d),l.copyTexImage2D(l.TEXTURE_2D,0,l.RGBA,0,0,l.drawingBufferWidth,l.drawingBufferHeight,0),d}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const l=this.style&&this.style.fog;return!!l&&0!==l.getOpacity(this.transform.pitch)}getBackgroundTiles(){const l=this._backgroundTiles,d=this._backgroundTiles={},_=this.transform.coveringTiles({tileSize:512});for(const w of _)d[w.key]=l[w.key]||new h.Tile(w,512,this.transform.tileZoom,this);return d}clearBackgroundTiles(){this._backgroundTiles={}}}class Uf{constructor(l=0,d=0,_=0,w=0){if(isNaN(l)||l<0||isNaN(d)||d<0||isNaN(_)||_<0||isNaN(w)||w<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=d,this.left=_,this.right=w}interpolate(l,d,_){return null!=d.top&&null!=l.top&&(this.top=h.number(l.top,d.top,_)),null!=d.bottom&&null!=l.bottom&&(this.bottom=h.number(l.bottom,d.bottom,_)),null!=d.left&&null!=l.left&&(this.left=h.number(l.left,d.left,_)),null!=d.right&&null!=l.right&&(this.right=h.number(l.right,d.right,_)),this}getCenter(l,d){const _=h.clamp((this.left+l-this.right)/2,0,l),w=h.clamp((this.top+d-this.bottom)/2,0,d);return new h.Point(_,w)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new Uf(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function yl(m,l){const d=h.getColumn(m,3);h.fromQuat(m,l),h.setColumn(m,3,d)}function or(m,l){const d=h.identity$1([]);return h.rotateZ$1(d,d,-l),h.rotateX$1(d,d,-m),d}function vl(m,l){const d=[m[0],m[1],0],_=[l[0],l[1],0];if(h.length(d)>=1e-15){const D=h.normalize([],d);h.scale$2(_,D,h.dot(_,D)),l[0]=_[0],l[1]=_[1]}const w=h.cross([],l,m);if(h.len(w)<1e-15)return null;const C=Math.atan2(-w[1],w[0]);return or(Math.atan2(Math.sqrt(m[0]*m[0]+m[1]*m[1]),-m[2]),C)}class Sm{constructor(l,d){this.position=l,this.orientation=d}get position(){return this._position}set position(l){if(l){const d=l instanceof h.MercatorCoordinate?l:new h.MercatorCoordinate(l[0],l[1],l[2]);this._renderWorldCopies&&(d.x=h.wrap(d.x,0,1)),this._position=d}else this._position=null}lookAtPoint(l,d){if(this.orientation=null,!this.position)return;const _=this.position,w=this._elevation?this._elevation.getAtPointOrZero(h.MercatorCoordinate.fromLngLat(l)):0,C=h.MercatorCoordinate.fromLngLat(l,w),D=[C.x-_.x,C.y-_.y,C.z-_.z];d||(d=[0,0,1]),d[2]=Math.abs(d[2]),this.orientation=vl(D,d)}setPitchBearing(l,d){this.orientation=or(h.degToRad(l),h.degToRad(-d))}}class Ed{constructor(l,d){this._transform=h.identity([]),this.orientation=d,this.position=l}get mercatorPosition(){const l=this.position;return new h.MercatorCoordinate(l[0],l[1],l[2])}get position(){const l=h.getColumn(this._transform,3);return[l[0],l[1],l[2]]}set position(l){var d;l&&h.setColumn(this._transform,3,[(d=l)[0],d[1],d[2],1])}get orientation(){return this._orientation}set orientation(l){this._orientation=l||h.identity$1([]),l&&yl(this._transform,this._orientation)}getPitchBearing(){const l=this.forward(),d=this.right();return{bearing:Math.atan2(-d[1],d[0]),pitch:Math.atan2(Math.sqrt(l[0]*l[0]+l[1]*l[1]),-l[2])}}setPitchBearing(l,d){this._orientation=or(l,d),yl(this._transform,this._orientation)}forward(){const l=h.getColumn(this._transform,2);return[-l[0],-l[1],-l[2]]}up(){const l=h.getColumn(this._transform,1);return[-l[0],-l[1],-l[2]]}right(){const l=h.getColumn(this._transform,0);return[l[0],l[1],l[2]]}getCameraToWorld(l,d){const _=new Float64Array(16);return h.invert(_,this.getWorldToCamera(l,d)),_}getWorldToCameraPosition(l,d,_){const w=this.position;h.scale$2(w,w,-l);const C=new Float64Array(16);return h.fromScaling(C,[_,_,_]),h.translate(C,C,w),C[10]*=d,C}getWorldToCamera(l,d){const _=new Float64Array(16),w=new Float64Array(4),C=this.position;return h.conjugate(w,this._orientation),h.scale$2(C,C,-l),h.fromQuat(_,w),h.translate(_,_,C),_[1]*=-1,_[5]*=-1,_[9]*=-1,_[13]*=-1,_[8]*=d,_[9]*=d,_[10]*=d,_[11]*=d,_}getCameraToClipPerspective(l,d,_,w){const C=new Float64Array(16);return h.perspective(C,l,d,_,w),C}getDistanceToElevation(l,d=!1){const _=0===l?0:h.mercatorZfromAltitude(l,d?h.latFromMercatorY(this.position[1]):this.position[1]),w=this.forward();return(_-this.position[2])/w[2]}clone(){return new Ed([...this.position],[...this.orientation])}}function nu(m,l){const d=ja(m.projection,m.zoom,m.width,m.height),_=function(C,D,I,A,L){const R=new h.LngLat(I.lng-180*$a,I.lat),B=new h.LngLat(I.lng+180*$a,I.lat),q=C.project(R.lng,R.lat),X=C.project(B.lng,B.lat),K=-Math.atan2(X.y-q.y,X.x-q.x),J=h.MercatorCoordinate.fromLngLat(I);J.y=h.clamp(J.y,-1+$a,1-$a);const Q=J.toLngLat(),U=C.project(Q.lng,Q.lat),Y=h.MercatorCoordinate.fromLngLat(Q);Y.x+=$a;const re=Y.toLngLat(),ie=C.project(re.lng,re.lat),pe=Td(ie.x-U.x,ie.y-U.y,K),ge=h.MercatorCoordinate.fromLngLat(Q);ge.y+=$a;const me=ge.toLngLat(),Te=C.project(me.lng,me.lat),be=Td(Te.x-U.x,Te.y-U.y,K),Ue=Math.abs(pe.x)/Math.abs(be.y),yt=h.identity([]);h.rotateZ(yt,yt,-K*(1-(L?0:A)));const Fe=h.identity([]);return h.scale(Fe,Fe,[1,1-(1-Ue)*A,1]),Fe[4]=-be.x/be.y*A,h.rotateZ(Fe,Fe,K),h.multiply(Fe,yt,Fe),Fe}(m.projection,0,m.center,d,l),w=jf(m);return h.scale(_,_,[w,w,1]),_}function jf(m){const l=m.projection,d=ja(m.projection,m.zoom,m.width,m.height),_=Ha(l,m.center),w=Ha(l,h.LngLat.convert(l.center));return Math.pow(2,_*d+(1-d)*w)}function ja(m,l,d,_,w=1/0){const C=m.range;if(!C)return 0;const D=Math.min(w,Math.max(d,_)),I=Math.log(D/1024)/Math.LN2;return h.smoothstep(C[0]+I,C[1]+I,l)}const $a=1/4e4;function Ha(m,l){const d=h.clamp(l.lat,-h.MAX_MERCATOR_LATITUDE,h.MAX_MERCATOR_LATITUDE),_=new h.LngLat(l.lng-180*$a,d),w=new h.LngLat(l.lng+180*$a,d),C=m.project(_.lng,d),D=m.project(w.lng,d),I=h.MercatorCoordinate.fromLngLat(_),A=h.MercatorCoordinate.fromLngLat(w),L=D.x-C.x,R=D.y-C.y,B=A.x-I.x,q=A.y-I.y,X=Math.sqrt((B*B+q*q)/(L*L+R*R));return Math.log(X)/Math.LN2}function Td(m,l,d){const _=Math.cos(d),w=Math.sin(d);return{x:m*_-l*w,y:m*w+l*_}}class rn{constructor(l,d,_,w,C,D,I){this.tileSize=512,this._renderWorldCopies=void 0===C||C,this._minZoom=l||0,this._maxZoom=d||22,this._minPitch=_??0,this._maxPitch=w??60,this.setProjection(D),this.setMaxBounds(I),this.width=0,this.height=0,this._center=new h.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new Uf,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Ed,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const l=new rn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return l._elevation=this._elevation,l._centerAltitude=this._centerAltitude,l._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,l.tileSize=this.tileSize,l.mercatorFromTransition=this.mercatorFromTransition,l.width=this.width,l.height=this.height,l.cameraElevationReference=this.cameraElevationReference,l._center=this._center,l._setZoom(this.zoom),l._seaLevelZoom=this._seaLevelZoom,l.angle=this.angle,l._fov=this._fov,l._pitch=this._pitch,l._nearZ=this._nearZ,l._farZ=this._farZ,l._averageElevation=this._averageElevation,l._unmodified=this._unmodified,l._edgeInsets=this._edgeInsets.clone(),l._camera=this._camera.clone(),l._calcMatrices(),l.freezeTileCoverage=this.freezeTileCoverage,l.frustumCorners=this.frustumCorners,l}get elevation(){return this._elevation}set elevation(l){this._elevation!==l&&(this._elevation=l,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(l,d=!1){const _=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(null==this._seaLevelZoom||_)&&this._updateCameraOnTerrain(),(l||_)&&this._constrainCamera(d),this._calcMatrices()}getProjection(){return h.pick(this.projection,["name","center","parallels"])}setProjection(l){this.projectionOptions=l||{name:"mercator"};const d=this.projection?this.getProjection():void 0;this.projection=h.getProjection(this.projectionOptions);const _=!W(d,this.getProjection());return _&&this._calcMatrices(),this.mercatorFromTransition=!1,_}setMercatorFromTransition(){const l=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=h.getProjection({name:"mercator"});const d=l!==this.projection.name;return d&&this._calcMatrices(),d}get minZoom(){return this._minZoom}set minZoom(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))}get maxZoom(){return this._maxZoom}set maxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))}get minPitch(){return this._minPitch}set minPitch(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))}get maxPitch(){return this._maxPitch}set maxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))}get renderWorldCopies(){return this._renderWorldCopies&&!0===this.projection.supportsWorldCopies}set renderWorldCopies(l){void 0===l?l=!0:null===l&&(l=!1),this._renderWorldCopies=l}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const l=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(l))}get cameraWorldSize(){const l=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(l))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return h.mercatorZfromAltitude(this.center.lat,this.cameraWorldSizeForFog)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new h.Point(this.width,this.height)}get bearing(){return h.wrap(this.rotation,-180,180)}set bearing(l){this.rotation=l}get rotation(){return-this.angle/Math.PI*180}set rotation(l){const d=-l*Math.PI/180;var _,w,C,D,I,A,L,R,B,q;this.angle!==d&&(this._unmodified=!1,this.angle=d,this._calcMatrices(),this.rotationMatrix=(_=new h.ARRAY_TYPE(4),h.ARRAY_TYPE!=Float32Array&&(_[1]=0,_[2]=0),_[0]=1,_[3]=1,_),w=this.rotationMatrix,D=this.angle,I=(C=this.rotationMatrix)[0],A=C[1],L=C[2],R=C[3],B=Math.sin(D),q=Math.cos(D),w[0]=I*q+L*B,w[1]=A*q+R*B,w[2]=I*-B+L*q,w[3]=A*-B+R*q)}get pitch(){return this._pitch/Math.PI*180}set pitch(l){const d=h.clamp(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==d&&(this._unmodified=!1,this._pitch=d,this._calcMatrices())}get aspect(){return this.width/this.height}get fov(){return this._fov/Math.PI*180}get fovX(){return this._fov}get fovY(){const l=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/l)}set fov(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=h.degToRad(l),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(l){this._averageElevation=l,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(l){const d=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==d&&(this._unmodified=!1,this._setZoom(d),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(l){this._zoom=l,this.scale=this.zoomScale(l),this.tileZoom=Math.floor(l),this.zoomFraction=l-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const l=this._elevation;this._centerAltitude=l.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=l.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){void 0!==this._centerAltitudeValidForExaggeration&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const l=this._elevation,d=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],_=this.horizonLineFromTop();let w=0,C=0;for(let D=0;Dl.maxzoom&&(d=l.maxzoom);const D=this.locationCoordinate(this.center),I=this.center.lat,A=1<{const xt=new h.MercatorCoordinate(Be.x+25e-6,Be.y,Be.z),ht=new h.MercatorCoordinate(Be.x,Be.y+25e-6,Be.z),Et=Be.toLngLat(),ln=xt.toLngLat(),In=ht.toLngLat(),Xt=this.locationCoordinate(Et),vn=this.locationCoordinate(ln),Jn=this.locationCoordinate(In),Yn=Math.hypot(vn.x-Xt.x,vn.y-Xt.y),on=Math.hypot(Jn.x-Xt.x,Jn.y-Xt.y);return Math.sqrt(Yn*on)*pe/25e-6},me=Be=>{const Je=re,xt=ie;return{aabb:h.tileAABB(this,A,0,0,0,Be,xt,Je,this.projection),zoom:0,x:0,y:0,minZ:xt,maxZ:Je,wrap:Be,fullyVisible:!1}},Te=[];let be=[];const Ue=d,yt=l.reparseOverscaled?_:d,Fe=Be=>Be*Be,tt=Fe((J-this._centerAltitude)*K),qe=Be=>{if(!this._elevation||!Be.tileID||!C)return;const Je=this._elevation.getMinMaxForTile(Be.tileID),xt=Be.aabb;Je?(xt.min[2]=Je.min,xt.max[2]=Je.max,xt.center[2]=(xt.min[2]+xt.max[2])/2):(Be.shouldSplit=gt(Be),Be.shouldSplit||(xt.min[2]=xt.max[2]=xt.center[2]=this._centerAltitude))},gt=Be=>{if(Be.zoom=.9)return!0}else if(w&&(ht=Fe(Be.aabb.distanceZ(Q)*K)),this.projection.isReprojectedInTileSpace&&_<=5){const Xt=Math.pow(2,Be.zoom),vn=ge(new h.MercatorCoordinate((Be.x+.5)/Xt,(Be.y+.5)/Xt));Et=vn>.85?1:vn}const ln=Je*Je+xt*xt+ht;return ln{if(vn*Fe(.707)0;){const Be=Te.pop(),Je=Be.x,xt=Be.y;let ht=Be.fullyVisible;if(!ht){const Et=Be.aabb.intersects(q);if(0===Et)continue;ht=2===Et}if(Be.zoom!==Ue&>(Be))for(let Et=0;Et<4;Et++){const ln=(Je<<1)+Et%2,In=(xt<<1)+(Et>>1),Xt={aabb:C?Be.aabb.quadrant(Et):h.tileAABB(this,A,Be.zoom+1,ln,In,Be.wrap,Be.minZ,Be.maxZ,this.projection),zoom:Be.zoom+1,x:ln,y:In,wrap:Be.wrap,fullyVisible:ht,tileID:void 0,shouldSplit:void 0,minZ:Be.minZ,maxZ:Be.maxZ};w&&!R&&(Xt.tileID=new h.OverscaledTileID(Be.zoom+1===Ue?yt:Be.zoom+1,Be.wrap,Be.zoom+1,ln,In),qe(Xt)),Te.push(Xt)}else{const Et=Be.zoom===Ue?yt:Be.zoom;if(l.minzoom&&l.minzoom>Et)continue;const ln=L[0]-(.5+Je+(Be.wrap<{const ht=[0,0,0,1],Et=[h.EXTENT,h.EXTENT,0,1],ln=this.calculateFogTileMatrix(xt.tileID.toUnwrapped());h.transformMat4$1(ht,ht,ln),h.transformMat4$1(Et,Et,ln);const In=h.getAABBPointSquareDist(ht,Et);if(0===In)return!0;let Xt=!1;const vn=this._elevation;if(vn&&In>Be&&0!==Je){const Jn=this.calculateProjMatrix(xt.tileID.toUnwrapped());let Yn;l.isTerrainDEM||(Yn=vn.getMinMaxForTile(xt.tileID)),Yn||(Yn={min:ie,max:re});const on=h.furthestTileCorner(this.rotation),rr=[on[0]*h.EXTENT,on[1]*h.EXTENT,Yn.max];h.transformMat4(rr,rr,Jn),Xt=(1-rr[1])*this.height*.5Be.distanceSq-Je.distanceSq).map(Be=>Be.tileID)}resize(l,d){this.width=l,this.height=d,this.pixelsToGLUnits=[2/l,-2/d],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(l){return Math.pow(2,l)}scaleZoom(l){return Math.log(l)/Math.LN2}project(l){const d=h.clamp(l.lat,-h.MAX_MERCATOR_LATITUDE,h.MAX_MERCATOR_LATITUDE),_=this.projection.project(l.lng,d);return new h.Point(_.x*this.worldSize,_.y*this.worldSize)}unproject(l){return this.projection.unproject(l.x/this.worldSize,l.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/h.mercatorZfromAltitude(1,this.center.lat)/this.worldSize}setLocationAtPoint(l,d){let _,w;const C=this.centerPoint;if("globe"===this.projection.name){const I=this.worldSize;_=(d.x-C.x)/I,w=(d.y-C.y)/I}else{const I=this.pointCoordinate(d),A=this.pointCoordinate(C);_=I.x-A.x,w=I.y-A.y}const D=this.locationCoordinate(l);this.setLocation(new h.MercatorCoordinate(D.x-_,D.y-w))}setLocation(l){this.center=this.coordinateLocation(l),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(l){return this.projection.locationPoint(this,l)}locationPoint3D(l){return this.projection.locationPoint(this,l,!0)}pointLocation(l){return this.coordinateLocation(this.pointCoordinate(l))}pointLocation3D(l){return this.coordinateLocation(this.pointCoordinate3D(l))}locationCoordinate(l,d){const _=d?h.mercatorZfromAltitude(d,l.lat):void 0,w=this.projection.project(l.lng,l.lat);return new h.MercatorCoordinate(w.x,w.y,_)}coordinateLocation(l){return this.projection.unproject(l.x,l.y)}pointRayIntersection(l,d){const _=d??this._centerAltitude,w=[l.x,l.y,0,1],C=[l.x,l.y,1,1];h.transformMat4$1(w,w,this.pixelMatrixInverse),h.transformMat4$1(C,C,this.pixelMatrixInverse);const D=C[3];h.scale$1(w,w,1/w[3]),h.scale$1(C,C,1/D);const I=w[2],A=C[2];return{p0:w,p1:C,t:I===A?0:(_-I)/(A-I)}}screenPointToMercatorRay(l){const d=[l.x,l.y,0,1],_=[l.x,l.y,1,1];return h.transformMat4$1(d,d,this.pixelMatrixInverse),h.transformMat4$1(_,_,this.pixelMatrixInverse),h.scale$1(d,d,1/d[3]),h.scale$1(_,_,1/_[3]),d[2]=h.mercatorZfromAltitude(d[2],this._center.lat)*this.worldSize,_[2]=h.mercatorZfromAltitude(_[2],this._center.lat)*this.worldSize,h.scale$1(d,d,1/this.worldSize),h.scale$1(_,_,1/this.worldSize),new h.Ray([d[0],d[1],d[2]],h.normalize([],h.sub([],_,d)))}rayIntersectionCoordinate(l){const{p0:d,p1:_,t:w}=l,C=h.mercatorZfromAltitude(d[2],this._center.lat),D=h.mercatorZfromAltitude(_[2],this._center.lat);return new h.MercatorCoordinate(h.number(d[0],_[0],w)/this.worldSize,h.number(d[1],_[1],w)/this.worldSize,h.number(C,D,w))}pointCoordinate(l,d=this._centerAltitude){return this.projection.pointCoordinate(this,l.x,l.y,d)}pointCoordinate3D(l){if(!this.elevation)return this.pointCoordinate(l);let d=this.projection.pointCoordinate3D(this,l.x,l.y);if(d)return new h.MercatorCoordinate(d[0],d[1],d[2]);let _=0,w=this.horizonLineFromTop();if(l.y>w)return this.pointCoordinate(l);const C=.02*w,D=l.clone();for(let I=0;I<10&&w-_>C;I++){D.y=h.number(_,w,.66);const A=this.projection.pointCoordinate3D(this,D.x,D.y);A?(w=D.y,d=A):_=D.y}return d?new h.MercatorCoordinate(d[0],d[1],d[2]):this.pointCoordinate(l)}isPointAboveHorizon(l){return this.projection.isPointAboveHorizon(this,l)}isPointOnSurface(l){if(l.y<0||l.y>this.height||l.x<0||l.x>this.width)return!1;if(this.elevation||this.zoom>=h.GLOBE_ZOOM_THRESHOLD_MAX)return!this.isPointAboveHorizon(l);const d=this.pointCoordinate(l);return d.y>=0&&d.y<=1}_coordinatePoint(l,d){const _=d&&this.elevation?this.elevation.getAtPointOrZero(l,this._centerAltitude):this._centerAltitude,w=[l.x*this.worldSize,l.y*this.worldSize,_+l.toAltitude(),1];return h.transformMat4$1(w,w,this.pixelMatrix),w[3]>0?new h.Point(w[0]/w[3],w[1]/w[3]):new h.Point(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){const{top:l,left:d}=this._edgeInsets,_=this.height-this._edgeInsets.bottom,w=this.width-this._edgeInsets.right,C=this.pointLocation3D(new h.Point(d,l)),D=this.pointLocation3D(new h.Point(w,l)),I=this.pointLocation3D(new h.Point(w,_)),A=this.pointLocation3D(new h.Point(d,_));let L=Math.min(C.lng,D.lng,I.lng,A.lng),R=Math.max(C.lng,D.lng,I.lng,A.lng),B=Math.min(C.lat,D.lat,I.lat,A.lat),q=Math.max(C.lat,D.lat,I.lat,A.lat);const X=Math.pow(2,-this.zoom)/16*270,K="globe"===this.projection.name?1:4,J=(Q,U,Y,re,ie)=>{const pe=(Q+Y)/2,ge=(U+re)/2,me=new h.Point(pe,ge),{lng:Te,lat:be}=this.pointLocation3D(me),Ue=Math.max(0,L-Te,B-be,Te-R,be-q);L=Math.min(L,Te),R=Math.max(R,Te),B=Math.min(B,be),q=Math.max(q,be),(ieX)&&(J(Q,U,pe,ge,ie+1),J(pe,ge,Y,re,ie+1))};if(J(d,l,w,l,1),J(w,l,w,_,1),J(w,_,d,_,1),J(d,_,d,l,1),"globe"===this.projection.name){const[Q,U]=h.polesInViewport(this);Q?(q=90,R=180,L=-180):U&&(B=-90,R=180,L=-180)}return new h.LngLatBounds(new h.LngLat(L,B),new h.LngLat(R,q))}_getBoundsRectangular(l,d){const{top:_,left:w}=this._edgeInsets,C=this.height-this._edgeInsets.bottom,D=this.width-this._edgeInsets.right,I=new h.Point(w,_),A=new h.Point(D,_),L=new h.Point(D,C),R=new h.Point(w,C);let B=this.pointCoordinate(I,l),q=this.pointCoordinate(A,l);const X=this.pointCoordinate(L,d),K=this.pointCoordinate(R,d),J=(Q,U)=>(U.y-Q.y)/(U.x-Q.x);return B.y>1&&q.y>=0?B=new h.MercatorCoordinate((1-K.y)/J(K,B)+K.x,1):B.y<0&&q.y<=1&&(B=new h.MercatorCoordinate(-K.y/J(K,B)+K.x,0)),q.y>1&&B.y>=0?q=new h.MercatorCoordinate((1-X.y)/J(X,q)+X.x,1):q.y<0&&B.y<=1&&(q=new h.MercatorCoordinate(-X.y/J(X,q)+X.x,0)),(new h.LngLatBounds).extend(this.coordinateLocation(B)).extend(this.coordinateLocation(q)).extend(this.coordinateLocation(K)).extend(this.coordinateLocation(X))}_getBoundsRectangularTerrain(){const l=this.elevation;if(!l.visibleDemTiles.length||l.isUsingMockSource())return this._getBoundsRectangular(0,0);const d=l.visibleDemTiles.reduce((_,w)=>{if(w.dem){const C=w.dem.tree;_.min=Math.min(_.min,C.minimums[0]),_.max=Math.max(_.max,C.maximums[0])}return _},{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(d.min*l.exaggeration(),d.max*l.exaggeration())}getBounds(){return"mercator"===this.projection.name||"equirectangular"===this.projection.name?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(l=!0){const d=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,_=this.height/2-d*(1-this._horizonShift);return l?Math.max(0,_):_}getMaxBounds(){return this.maxBounds}setMaxBounds(l){this.maxBounds=l,this.minLat=-h.MAX_MERCATOR_LATITUDE,this.maxLat=h.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,l&&(this.minLat=l.getSouth(),this.maxLat=l.getNorth(),this.minLng=l.getWest(),this.maxLng=l.getEast(),this.maxLngB&&(I=B-L),B-RX&&(D=X-A),X-q.5?re-1:re,ie>.5?ie-1:ie,0]),this.alignedProjMatrix=pe,I=h.create(),h.scale(I,I,[this.width/2,-this.height/2,1]),h.translate(I,I,[1,-1,0]),this.labelPlaneMatrix=I,I=h.create(),h.scale(I,I,[1,-1,1]),h.translate(I,I,[-1,-1,0]),h.scale(I,I,[2/this.width,2/this.height,1]),this.glCoordMatrix=I,this.pixelMatrix=h.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},I=h.invert(new Float64Array(16),this.pixelMatrix),!I)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=I,"globe"===this.projection.name||this.mercatorFromTransition){this.globeMatrix=h.calculateGlobeMatrix(this);const ge=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=h.transformMat4(ge,ge,C),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=I;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const l=this.cameraWorldSizeForFog,d=this.cameraPixelsPerMeter,_=this._camera.position,w=1/this.height/this._pixelsPerMercatorPixel,C=[l,l,d];h.scale$2(C,C,w),h.scale$2(_,_,-1),h.multiply$2(_,_,C);const D=h.create();h.translate(D,D,_),h.scale(D,D,C),this.mercatorFogMatrix=D,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(l,d,w)}_computeCameraPosition(l){const d=(l=l||this.pixelsPerMeter)/this.pixelsPerMeter,_=this._camera.forward(),w=this.point,C=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*d-l/this.worldSize*this._centerAltitude;return[w.x/this.worldSize-_[0]*C,w.y/this.worldSize-_[1]*C,l/this.worldSize*this._centerAltitude-_[2]*C]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(l){const d=this._maxCameraBoundsDistance()*Math.cos(this._pitch),_=this._camera.position[2],w=l[2];let C=1;this.projection.wrap&&(this.center=this.center.wrap()),w>0&&(C=Math.min((d-_)/w,1)),this._camera.position=h.scaleAndAdd([],this._camera.position,l,C),this._updateStateFromCamera()}_updateStateFromCamera(){const l=this._camera.position,d=this._camera.forward(),{pitch:_,bearing:w}=this._camera.getPitchBearing(),C=h.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,D=this._mercatorZfromZoom(this._maxZoom)*Math.cos(h.degToRad(this._maxPitch)),I=Math.max((l[2]-C)/Math.cos(_),D),A=this._zoomFromMercatorZ(I);h.scaleAndAdd(l,l,d,I),this._pitch=h.clamp(_,h.degToRad(this.minPitch),h.degToRad(this.maxPitch)),this.angle=h.wrap(w,-Math.PI,Math.PI),this._setZoom(h.clamp(A,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new h.MercatorCoordinate(l[0],l[1],l[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(l){return Math.pow(2,l)*this.tileSize}_mercatorZfromZoom(l){return this.cameraToCenterDistance/this._worldSizeFromZoom(l)}_minimumHeightOverTerrain(){const l=Math.min((null!=this._seaLevelZoom?this._seaLevelZoom:this._zoom)+4,this._maxZoom);return this._mercatorZfromZoom(l)}_zoomFromMercatorZ(l){return this.scaleZoom(this.cameraToCenterDistance/(l*this.tileSize))}zoomFromMercatorZAdjusted(l){let d=0,_=h.GLOBE_ZOOM_THRESHOLD_MAX,w=0,C=1/0;for(;_-d>1e-6&&_>d;){const D=d+.5*(_-d),I=this.tileSize*Math.pow(2,D),A=this.getCameraToCenterDistance(this.projection,D,I),L=this.scaleZoom(A/(l*this.tileSize)),R=Math.abs(D-L);RL||q.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+h.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new h.Point(0,0),new h.Point(this.width,this.height))}zoomDeltaToMovement(l,d){const _=h.length(h.sub([],this._camera.position,l)),w=this._zoomFromMercatorZ(_)+d;return _-this._mercatorZfromZoom(w)}getCameraPoint(){if("globe"===this.projection.name){const l=function([d,_,w],C){const D=[d,_,w,1];h.transformMat4$1(D,D,C);const I=D[3]=Math.max(D[3],1e-6);return D[0]/=I,D[1]/=I,D[2]/=I,D}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new h.Point(l[0],l[1])}{const l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new h.Point(0,l))}}getCameraToCenterDistance(l,d=this.zoom,_=this.worldSize){const w=ja(l,d,this.width,this.height,1024),C=l.pixelSpaceConversion(this.center.lat,_,w);return.5/Math.tan(.5*this._fov)*this.height*C}getWorldToCameraMatrix(){const l=this._camera.getWorldToCamera(this.worldSize,"meters"===this.projection.zAxisUnit?this.pixelsPerMeter:1);return"globe"===this.projection.name&&h.multiply(l,l,this.globeMatrix),l}}function oc(m,l){let d=!1,_=null;const w=()=>{_=null,d&&(m(),_=setTimeout(w,l),d=!1)};return()=>(d=!0,_||w(),_)}class Nt{constructor(l){this._hashName=l&&encodeURIComponent(l),h.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=oc(this._updateHashUnthrottled.bind(this),300)}addTo(l){return this._map=l,h.window.addEventListener("hashchange",this._onHashChange,!1),l.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),h.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const l=this._map;if(!l)return"";const d=xl(l);if(this._hashName){const _=this._hashName;let w=!1;const C=h.window.location.hash.slice(1).split("&").map(D=>{const I=D.split("=")[0];return I===_?(w=!0,`${I}=${d}`):D}).filter(D=>D);return w||C.push(`${_}=${d}`),`#${C.join("&")}`}return`#${d}`}_getCurrentHash(){const l=h.window.location.hash.replace("#","");if(this._hashName){let d;return l.split("&").map(_=>_.split("=")).forEach(_=>{_[0]===this._hashName&&(d=_)}),(d&&d[1]||"").split("/")}return l.split("/")}_onHashChange(){const l=this._map;if(!l)return!1;const d=this._getCurrentHash();if(d.length>=3&&!d.some(_=>isNaN(_))){const _=l.dragRotate.isEnabled()&&l.touchZoomRotate.isEnabled()?+(d[3]||0):l.getBearing();return l.jumpTo({center:[+d[2],+d[1]],zoom:+d[0],bearing:_,pitch:+(d[4]||0)}),!0}return!1}_updateHashUnthrottled(){const l=h.window.location.href.replace(/(#.+)?$/,this.getHashString());h.window.history.replaceState(h.window.history.state,null,l)}}function xl(m,l){const d=m.getCenter(),_=Math.round(100*m.getZoom())/100,w=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),C=Math.pow(10,w),D=Math.round(d.lng*C)/C,I=Math.round(d.lat*C)/C,A=m.getBearing(),L=m.getPitch();let R=l?`/${D}/${I}/${_}`:`${_}/${I}/${D}`;return(A||L)&&(R+="/"+Math.round(10*A)/10),L&&(R+=`/${Math.round(L)}`),R}const sc={linearity:.3,easing:h.bezier(0,0,.3,1)},wl=h.extend({deceleration:2500,maxSpeed:1400},sc),Dd=h.extend({deceleration:20,maxSpeed:1400},sc),Gt=h.extend({deceleration:1e3,maxSpeed:360},sc),Ys=h.extend({deceleration:1e3,maxSpeed:90},sc);class va{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.exported.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,d=h.exported.now();for(;l.length>0&&d-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._map._prefersReducedMotion()||(this._drainInertiaBuffer(),this._inertiaBuffer.length<2))return;const d={zoom:0,bearing:0,pitch:0,pan:new h.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:C}of this._inertiaBuffer)d.zoom+=C.zoomDelta||0,d.bearing+=C.bearingDelta||0,d.pitch+=C.pitchDelta||0,C.panDelta&&d.pan._add(C.panDelta),C.around&&(d.around=C.around),C.pinchAround&&(d.pinchAround=C.pinchAround);const _=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,w={};if(d.pan.mag()){const C=Vo(d.pan.mag(),_,h.extend({},wl,l||{}));w.offset=d.pan.mult(C.amount/d.pan.mag()),w.center=this._map.transform.center,bl(w,C)}if(d.zoom){const C=Vo(d.zoom,_,Dd);w.zoom=this._map.transform.zoom+C.amount,bl(w,C)}if(d.bearing){const C=Vo(d.bearing,_,Gt);w.bearing=this._map.transform.bearing+h.clamp(C.amount,-179,179),bl(w,C)}if(d.pitch){const C=Vo(d.pitch,_,Ys);w.pitch=this._map.transform.pitch+C.amount,bl(w,C)}if(w.zoom||w.bearing){const C=void 0===d.pinchAround?d.around:d.pinchAround;w.around=C?this._map.unproject(C):this._map.getCenter()}return this.clear(),w.noMoveStart=!0,w}}function bl(m,l){(!m.duration||m.durationd.unproject(A)),I=C.reduce((A,L,R,B)=>A.add(L.div(B.length)),new h.Point(0,0));super(l,{points:C,point:I,lngLats:D,lngLat:d.unproject(I),originalEvent:_}),this._defaultPrevented=!1}}class eh extends h.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,d,_){super(l,{originalEvent:_}),this._defaultPrevented=!1}}class th{constructor(l,d){this._map=l,this._clickTolerance=d.clickTolerance}reset(){this._mousedownPos=void 0}wheel(l){return this._firePreventable(new eh(l.type,this._map,l))}mousedown(l,d){return this._mousedownPos=d,this._firePreventable(new Qr(l.type,this._map,l))}mouseup(l){this._map.fire(new Qr(l.type,this._map,l))}preclick(l){const d=h.extend({},l);d.type="preclick",this._map.fire(new Qr(d.type,this._map,d))}click(l,d){this._mousedownPos&&this._mousedownPos.dist(d)>=this._clickTolerance||(this.preclick(l),this._map.fire(new Qr(l.type,this._map,l)))}dblclick(l){return this._firePreventable(new Qr(l.type,this._map,l))}mouseover(l){this._map.fire(new Qr(l.type,this._map,l))}mouseout(l){this._map.fire(new Qr(l.type,this._map,l))}touchstart(l){return this._firePreventable(new ur(l.type,this._map,l))}touchmove(l){this._map.fire(new ur(l.type,this._map,l))}touchend(l){this._map.fire(new ur(l.type,this._map,l))}touchcancel(l){this._map.fire(new ur(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class nh{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(l){this._map.fire(new Qr(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new Qr(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class $f{constructor(l,d){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=d.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,d){this.isEnabled()&&l.shiftKey&&0===l.button&&(bt(),this._startPos=this._lastPos=d,this._active=!0)}mousemoveWindow(l,d){if(!this._active)return;const _=d,w=this._startPos,C=this._lastPos;if(!w||!C||C.equals(_)||!this._box&&_.dist(w){this._box&&(this._box.style.transform=`translate(${D}px,${A}px)`,this._box.style.width=I-D+"px",this._box.style.height=L-A+"px")})}mouseupWindow(l,d){if(!this._active)return;const _=this._startPos,w=d;if(_&&0===l.button){if(this.reset(),Ge(),_.x!==w.x||_.y!==w.y)return this._map.fire(new h.Event("boxzoomend",{originalEvent:l})),{cameraAnimation:C=>C.fitScreenCoordinates(_,w,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",l)}}keydown(l){this._active&&27===l.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",l))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),ft(),delete this._startPos,delete this._lastPos}_fireEvent(l,d){return this._map.fire(new h.Event(l,{originalEvent:d}))}}function Cl(m,l){const d={};for(let _=0;_this.numTouches)&&(this.aborted=!0),this.aborted||(0===this.startTime&&(this.startTime=l.timeStamp),_.length===this.numTouches&&(this.centroid=function(w){const C=new h.Point(0,0);for(const D of w)C._add(D);return C.div(w.length)}(d),this.touches=Cl(_,d)))}touchmove(l,d,_){if(this.aborted||!this.centroid)return;const w=Cl(_,d);for(const C in this.touches){const D=w[C];(!D||D.dist(this.touches[C])>30)&&(this.aborted=!0)}}touchend(l,d,_){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),0===_.length){const w=!this.aborted&&this.centroid;if(this.reset(),w)return w}}}class Id{constructor(l){this.singleTap=new ac(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(l,d,_){this.singleTap.touchstart(l,d,_)}touchmove(l,d,_){this.singleTap.touchmove(l,d,_)}touchend(l,d,_){const w=this.singleTap.touchend(l,d,_);if(w){const C=l.timeStamp-this.lastTime<500,D=!this.lastTap||this.lastTap.dist(w)<30;if(C&&D||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=w,this.count===this.numTaps)return this.reset(),w}}}class H_{constructor(){this._zoomIn=new Id({numTouches:1,numTaps:2}),this._zoomOut=new Id({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,d,_){this._zoomIn.touchstart(l,d,_),this._zoomOut.touchstart(l,d,_)}touchmove(l,d,_){this._zoomIn.touchmove(l,d,_),this._zoomOut.touchmove(l,d,_)}touchend(l,d,_){const w=this._zoomIn.touchend(l,d,_),C=this._zoomOut.touchend(l,d,_);return w?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:D=>D.easeTo({duration:300,zoom:D.getZoom()+1,around:D.unproject(w)},{originalEvent:l})}):C?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:D=>D.easeTo({duration:300,zoom:D.getZoom()-1,around:D.unproject(C)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const Hf={0:1,2:2};class ru{constructor(l){this.reset(),this._clickTolerance=l.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(l,d){return!1}_move(l,d){return{}}mousedown(l,d){if(this._lastPoint)return;const _=Ce(l);this._correctButton(l,_)&&(this._lastPoint=d,this._eventButton=_)}mousemoveWindow(l,d){const _=this._lastPoint;if(_)if(l.preventDefault(),null!=this._eventButton&&function(w,C){const D=Hf[C];return void 0===w.buttons||(w.buttons&D)!==D}(l,this._eventButton))this.reset();else if(this._moved||!(d.dist(_)0&&(this._active=!0);const w=Cl(_,d),C=new h.Point(0,0),D=new h.Point(0,0);let I=0;for(const L in w){const R=w[L],B=this._touches[L];B&&(C._add(R),D._add(R.sub(B)),I++,w[L]=R)}if(this._touches=w,I{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")},500)}}class ih{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(l){}_move(l,d,_){return{}}touchstart(l,d,_){this._firstTwoTouches||_.length<2||(this._firstTwoTouches=[_[0].identifier,_[1].identifier],this._start([d[0],d[1]]))}touchmove(l,d,_){const w=this._firstTwoTouches;if(!w)return;l.preventDefault();const[C,D]=w,I=oh(_,d,C),A=oh(_,d,D);if(!I||!A)return;const L=this._aroundCenter?null:I.add(A).div(2);return this._move([I,A],L,l)}touchend(l,d,_){if(!this._firstTwoTouches)return;const[w,C]=this._firstTwoTouches,D=oh(_,d,w),I=oh(_,d,C);D&&I||(this._active&&Ge(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&"center"===l.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function oh(m,l,d){for(let _=0;_Math.abs(m.x)}class Om extends ih{constructor(l){super(),this._map=l}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(l){this._lastPoints=l,Ml(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,d,_){const w=this._lastPoints;if(!w)return;const C=l[0].sub(w[0]),D=l[1].sub(w[1]);return this._map._cooperativeGestures&&!h.isFullscreen()&&_.touches.length<3||(this._valid=this.gestureBeginsVertically(C,D,_.timeStamp),!this._valid)?void 0:(this._lastPoints=l,this._active=!0,{pitchDelta:(C.y+D.y)/2*-.5})}gestureBeginsVertically(l,d,_){if(void 0!==this._valid)return this._valid;const w=l.mag()>=2,C=d.mag()>=2;if(!w&&!C)return;if(!w||!C)return null==this._firstMove&&(this._firstMove=_),_-this._firstMove<100&&void 0;const D=l.y>0==d.y>0;return Ml(l)&&Ml(d)&&D}}const Ei={panStep:100,bearingStep:15,pitchStep:10};class G_{constructor(){const l=Ei;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let d=0,_=0,w=0,C=0,D=0;switch(l.keyCode){case 61:case 107:case 171:case 187:d=1;break;case 189:case 109:case 173:d=-1;break;case 37:l.shiftKey?_=-1:(l.preventDefault(),C=-1);break;case 39:l.shiftKey?_=1:(l.preventDefault(),C=1);break;case 38:l.shiftKey?w=1:(l.preventDefault(),D=-1);break;case 40:l.shiftKey?w=-1:(l.preventDefault(),D=1);break;default:return}return this._rotationDisabled&&(_=0,w=0),{cameraAnimation:I=>{const A=I.getZoom();I.easeTo({duration:300,easeId:"keyboardHandler",easing:km,zoom:d?Math.round(A)+d*(l.shiftKey?2:1):A,bearing:I.getBearing()+_*this._bearingStep,pitch:I.getPitch()+w*this._pitchStep,offset:[-C*this._panStep,-D*this._panStep],center:I.getCenter()},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function km(m){return m*(2-m)}const gs=4.000244140625;class Zf{constructor(l,d){this._map=l,this._el=l.getCanvasContainer(),this._handler=d,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,h.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&"center"===l.around,this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(l){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(l.ctrlKey||l.metaKey||this.isZooming()||h.isFullscreen()))return void this._showBlockerAlert();"hidden"!==this._alertContainer.style.visibility&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let d=l.deltaMode===h.window.WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const _=h.exported.now(),w=_-(this._lastWheelEventTime||0);this._lastWheelEventTime=_,0!==d&&d%gs==0?this._type="wheel":0!==d&&Math.abs(d)<4?this._type="trackpad":w>400?(this._type=null,this._lastValue=d,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(w*d)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,d+=this._lastValue)),l.shiftKey&&d&&(d/=4),this._type&&(this._lastWheelEvent=l,this._delta-=d,this._active||this._start(l)),l.preventDefault()}_onTimeout(l){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)}_start(l){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const d=ot(this._el,l);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:d,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const l=this._map.transform;"wheel"===this._type&&l.projection.wrap&&(l._center.lng>=180||l._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const d=()=>l._terrainEnabled()&&this._aroundCoord?l.computeZoomRelativeTo(this._aroundCoord):l.zoom;if(0!==this._delta){const A="wheel"===this._type&&Math.abs(this._delta)>gs?this._wheelZoomRate:this._defaultZoomRate;let L=2/(1+Math.exp(-Math.abs(this._delta*A)));this._delta<0&&0!==L&&(L=1/L);const R=d(),B=Math.pow(2,R),q="number"==typeof this._targetZoom?l.zoomScale(this._targetZoom):B;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(q*L))),"wheel"===this._type&&(this._startZoom=R,this._easing=this._smoothOutEasing(200)),this._delta=0}const _="number"==typeof this._targetZoom?this._targetZoom:d(),w=this._startZoom,C=this._easing;let D,I=!1;if("wheel"===this._type&&w&&C){const A=Math.min((h.exported.now()-this._lastWheelEventTime)/200,1),L=C(A);D=h.number(w,_,L),A<1?this._frameId||(this._frameId=!0):I=!0}else D=_,I=!0;return this._active=!0,I&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!I,zoomDelta:D-d(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let d=h.ease;if(this._prevEase){const _=this._prevEase,w=(h.exported.now()-_.start)/_.duration,C=_.easing(w+.01)-_.easing(w),D=.27/Math.sqrt(C*C+1e-4)*.01,I=Math.sqrt(.0729-D*D);d=h.bezier(D,I,.25,1)}return this._prevEase={start:h.exported.now(),duration:l,easing:d},d}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=Ae("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(h.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")},200)}}class Ln{constructor(l,d){this._clickZoom=l,this._tapZoom=d}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Nr{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(l,d){return l.preventDefault(),{cameraAnimation:_=>{_.easeTo({duration:300,zoom:_.getZoom()+(l.shiftKey?-1:1),around:_.unproject(d)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nr{constructor(){this._tap=new Id({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(l,d,_){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?_.length>0&&(this._swipePoint=d[0],this._swipeTouch=_[0].identifier):this._tap.touchstart(l,d,_))}touchmove(l,d,_){if(this._tapTime){if(this._swipePoint){if(_[0].identifier!==this._swipeTouch)return;const w=d[0],C=w.y-this._swipePoint.y;return this._swipePoint=w,l.preventDefault(),this._active=!0,{zoomDelta:C/128}}}else this._tap.touchmove(l,d,_)}touchend(l,d,_){this._tapTime?this._swipePoint&&0===_.length&&this.reset():this._tap.touchend(l,d,_)&&(this._tapTime=l.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qi{constructor(l,d,_){this._el=l,this._mousePan=d,this._touchPan=_}enable(l){this._inertiaOptions=l||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class mo{constructor(l,d,_){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=d,this._mousePitch=_}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class El{constructor(l,d,_,w){this._el=l,this._touchZoom=d,this._touchRotate=_,this._tapDragZoom=w,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const ei=m=>m.zoom||m.drag||m.pitch||m.rotate;class Xf extends h.Event{}class Rm{constructor(){this.constants=[1,1,.01],this.radius=0}setup(l,d){const _=h.sub([],d,l);this.radius=h.length(_[2]<0?h.div([],_,this.constants):[_[0],_[1],0])}projectRay(l){h.div(l,l,this.constants),h.normalize(l,l),h.mul$1(l,l,this.constants);const d=h.scale$2([],l,this.radius);if(d[2]>0){const _=h.scale$2([],[0,0,1],h.dot(d,[0,0,1])),w=h.scale$2([],h.normalize([],[d[0],d[1],0]),this.radius),C=h.add([],d,h.scale$2([],h.sub([],h.add([],w,_),d),2));d[0]=C[0],d[1]=C[1]}return d}}function is(m){return m.panDelta&&m.panDelta.mag()||m.zoomDelta||m.bearingDelta||m.pitchDelta}class xa{constructor(l,d){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new va(l),this._bearingSnap=d.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new Rm,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(d),h.bindAll(["handleEvent","handleWindowEvent"],this);const _=this._el;this._listeners=[[_,"touchstart",{passive:!0}],[_,"touchmove",{passive:!1}],[_,"touchend",void 0],[_,"touchcancel",void 0],[_,"mousedown",void 0],[_,"mousemove",void 0],[_,"mouseup",void 0],[h.window.document,"mousemove",{capture:!0}],[h.window.document,"mouseup",void 0],[_,"mouseover",void 0],[_,"mouseout",void 0],[_,"dblclick",void 0],[_,"click",void 0],[_,"keydown",{capture:!1}],[_,"keyup",void 0],[_,"wheel",{passive:!1}],[_,"contextmenu",void 0],[h.window,"blur",void 0]];for(const[w,C,D]of this._listeners)w.addEventListener(C,w===h.window.document?this.handleWindowEvent:this.handleEvent,D)}destroy(){for(const[l,d,_]of this._listeners)l.removeEventListener(d,l===h.window.document?this.handleWindowEvent:this.handleEvent,_)}_addDefaultHandlers(l){const d=this._map,_=d.getCanvasContainer();this._add("mapEvent",new th(d,l));const w=d.boxZoom=new $f(d,l);this._add("boxZoom",w);const C=new H_,D=new Nr;d.doubleClickZoom=new Ln(D,C),this._add("tapZoom",C),this._add("clickZoom",D);const I=new nr;this._add("tapDragZoom",I);const A=d.touchPitch=new Om(d);this._add("touchPitch",A);const L=new ms(l),R=new qf(l);d.dragRotate=new mo(l,L,R),this._add("mouseRotate",L,["mousePitch"]),this._add("mousePitch",R,["mouseRotate"]);const B=new Gf(l),q=new rh(d,l);d.dragPan=new qi(_,B,q),this._add("mousePan",B),this._add("touchPan",q,["touchZoom","touchRotate"]);const X=new Am,K=new Pm;d.touchZoomRotate=new El(_,K,X,I),this._add("touchRotate",X,["touchPan","touchZoom"]),this._add("touchZoom",K,["touchPan","touchRotate"]),this._add("blockableMapEvent",new nh(d));const J=d.scrollZoom=new Zf(d,this);this._add("scrollZoom",J,["mousePan"]);const Q=d.keyboard=new G_;this._add("keyboard",Q);for(const U of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])l.interactive&&l[U]&&d[U].enable(l[U])}_add(l,d,_){this._handlers.push({handlerName:l,handler:d,allowed:_}),this._handlersById[l]=d}stop(l){if(!this._updatingCamera){for(const{handler:d}of this._handlers)d.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ei(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(l,d,_){for(const w in l)if(w!==_&&(!d||d.indexOf(w)<0))return!0;return!1}handleWindowEvent(l){this.handleEvent(l,`${l.type}Window`)}_getMapTouches(l){const d=[];for(const _ of l)this._el.contains(_.target)&&d.push(_);return d}handleEvent(l,d){this._updatingCamera=!0;const _="renderFrame"===l.type,w=_?void 0:l,C={needsRenderFrame:!1},D={},I={},A=l.touches?this._getMapTouches(l.touches):void 0,L=A?Se(this._el,A):_?void 0:ot(this._el,l);for(const{handlerName:q,handler:X,allowed:K}of this._handlers){if(!X.isEnabled())continue;let J;this._blockedByActive(I,K,q)?X.reset():X[d||l.type]&&(J=X[d||l.type](l,L,A),this.mergeHandlerResult(C,D,J,q,w),J&&J.needsRenderFrame&&this._triggerRenderFrame()),(J||X.isActive())&&(I[q]=X)}const R={};for(const q in this._previousActiveHandlers)I[q]||(R[q]=w);this._previousActiveHandlers=I,(Object.keys(R).length||is(C))&&(this._changes.push([C,D,R]),this._triggerRenderFrame()),(Object.keys(I).length||is(C))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:B}=C;B&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],B(this._map))}mergeHandlerResult(l,d,_,w,C){if(!_)return;h.extend(l,_);const D={handlerName:w,originalEvent:_.originalEvent||C};void 0!==_.zoomDelta&&(d.zoom=D),void 0!==_.panDelta&&(d.drag=D),void 0!==_.pitchDelta&&(d.pitch=D),void 0!==_.bearingDelta&&(d.rotate=D)}_applyChanges(){const l={},d={},_={};for(const[w,C,D]of this._changes)w.panDelta&&(l.panDelta=(l.panDelta||new h.Point(0,0))._add(w.panDelta)),w.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+w.zoomDelta),w.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+w.bearingDelta),w.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+w.pitchDelta),void 0!==w.around&&(l.around=w.around),void 0!==w.aroundCoord&&(l.aroundCoord=w.aroundCoord),void 0!==w.pinchAround&&(l.pinchAround=w.pinchAround),w.noInertia&&(l.noInertia=w.noInertia),h.extend(d,C),h.extend(_,D);this._updateMapTransform(l,d,_),this._changes=[]}_updateMapTransform(l,d,_){const w=this._map,C=w.transform,D=Y=>[Y.x,Y.y,Y.z];if((Y=>{const re=this._eventsInProgress.drag;return re&&!this._handlersById[re.handlerName].isActive()})()&&!is(l)){const Y=C.zoom;C.cameraElevationReference="sea",C.recenterOnTerrain(),C.cameraElevationReference="ground",Y!==C.zoom&&this._map._update(!0)}if(C._isCameraConstrained&&w._stop(!0),!is(l))return void this._fireEvents(d,_,!0);let{panDelta:I,zoomDelta:A,bearingDelta:L,pitchDelta:R,around:B,aroundCoord:q,pinchAround:X}=l;C._isCameraConstrained&&(A>0&&(A=0),C._isCameraConstrained=!1),void 0!==X&&(B=X),(A||(Y=>d[Y]&&!this._eventsInProgress[Y])("drag"))&&B&&(this._dragOrigin=D(C.pointCoordinate3D(B)),this._trackingEllipsoid.setup(C._camera.position,this._dragOrigin)),C.cameraElevationReference="sea",w._stop(!0),B=B||w.transform.centerPoint,L&&(C.bearing+=L),R&&(C.pitch+=R),C._updateCameraState();const K=[0,0,0];if(I)if("mercator"===C.projection.name){const Y=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(B).dir),re=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(B.sub(I)).dir);K[0]=re[0]-Y[0],K[1]=re[1]-Y[1]}else{const Y=C.pointCoordinate(B);if("globe"===C.projection.name){I=I.rotate(-C.angle);const re=C._pixelsPerMercatorPixel/C.worldSize;K[0]=-I.x*h.mercatorScale(h.latFromMercatorY(Y.y))*re,K[1]=-I.y*h.mercatorScale(C.center.lat)*re}else{const re=C.pointCoordinate(B.sub(I));Y&&re&&(K[0]=re.x-Y.x,K[1]=re.y-Y.y)}}const J=C.zoom,Q=[0,0,0];if(A){const Y=D(q||C.pointCoordinate3D(B)),re={dir:h.normalize([],h.sub([],Y,C._camera.position))};if(re.dir[2]<0){const ie=C.zoomDeltaToMovement(Y,A);h.scale$2(Q,re.dir,ie)}}const U=h.add(K,K,Q);C._translateCameraConstrained(U),A&&Math.abs(C.zoom-J)>1e-4&&C.recenterOnTerrain(),C.cameraElevationReference="ground",this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(d,_,!0)}_fireEvents(l,d,_){const w=ei(this._eventsInProgress),C=ei(l),D={};for(const R in l){const{originalEvent:B}=l[R];this._eventsInProgress[R]||(D[`${R}start`]=B),this._eventsInProgress[R]=l[R]}!w&&C&&this._fireEvent("movestart",C.originalEvent);for(const R in D)this._fireEvent(R,D[R]);C&&this._fireEvent("move",C.originalEvent);for(const R in l){const{originalEvent:B}=l[R];this._fireEvent(R,B)}const I={};let A;for(const R in this._eventsInProgress){const{handlerName:B,originalEvent:q}=this._eventsInProgress[R];this._handlersById[B].isActive()||(delete this._eventsInProgress[R],A=d[B]||q,I[`${R}end`]=A)}for(const R in I)this._fireEvent(R,I[R]);const L=ei(this._eventsInProgress);if(_&&(w||C)&&!L){this._updatingCamera=!0;const R=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),B=q=>0!==q&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new Xf("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}const lc="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class di extends h.Evented{constructor(l,d){super(),this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=d.bearingSnap,this._respectPrefersReducedMotion=!1!==d.respectPrefersReducedMotion,h.bindAll(["_renderFrameCallback"],this)}getCenter(){return new h.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(l,d){return this.jumpTo({center:l},d)}panBy(l,d,_){return l=h.Point.convert(l).mult(-1),this.panTo(this.transform.center,h.extend({offset:l},d),_)}panTo(l,d,_){return this.easeTo(h.extend({center:l},d),_)}getZoom(){return this.transform.zoom}setZoom(l,d){return this.jumpTo({zoom:l},d),this}zoomTo(l,d,_){return this.easeTo(h.extend({zoom:l},d),_)}zoomIn(l,d){return this.zoomTo(this.getZoom()+1,l,d),this}zoomOut(l,d){return this.zoomTo(this.getZoom()-1,l,d),this}getBearing(){return this.transform.bearing}setBearing(l,d){return this.jumpTo({bearing:l},d),this}getPadding(){return this.transform.padding}setPadding(l,d){return this.jumpTo({padding:l},d),this}rotateTo(l,d,_){return this.easeTo(h.extend({bearing:l},d),_)}resetNorth(l,d){return this.rotateTo(0,h.extend({duration:1e3},l),d),this}resetNorthPitch(l,d){return this.easeTo(h.extend({bearing:0,pitch:0,duration:1e3},l),d),this}snapToNorth(l,d){return Math.abs(this.getBearing())l.aspect?_/(2*Math.tan(.5*l.fovX)*l.aspect):w/(2*Math.tan(.5*l.fovY)*l.aspect)}_cameraForBoundsOnGlobe(l,d,_,w,C,D){const I=l.clone(),A=this._extendCameraOptions(D);I.bearing=w,I.pitch=C;const L=h.LngLat.convert(d),R=h.LngLat.convert(_),B=.5*(L.lat+R.lat),q=.5*(L.lng+R.lng),X=h.latLngToECEF(B,q),K=h.normalize([],X),J=h.normalize([],h.cross([],K,[0,1,0])),Q=h.cross([],J,K),U=[J[0],J[1],J[2],0,Q[0],Q[1],Q[2],0,K[0],K[1],K[2],0,0,0,0,1],Y=[X,h.latLngToECEF(L.lat,L.lng),h.latLngToECEF(R.lat,L.lng),h.latLngToECEF(R.lat,R.lng),h.latLngToECEF(L.lat,R.lng),h.latLngToECEF(B,L.lng),h.latLngToECEF(B,R.lng),h.latLngToECEF(L.lat,q),h.latLngToECEF(R.lat,q)];let re=h.Aabb.fromPoints(Y.map(ht=>[h.dot(J,ht),h.dot(Q,ht),h.dot(K,ht)]));const ie=h.transformMat4([],re.center,U);0===h.squaredLength(ie)&&h.set(ie,0,0,1),h.normalize(ie,ie),h.scale$2(ie,ie,h.GLOBE_RADIUS),I.center=h.ecefToLatLng(ie);const pe=I.getWorldToCameraMatrix(),ge=h.invert(new Float64Array(16),pe);re=h.Aabb.applyTransform(re,h.multiply([],pe,U)),h.transformMat4(ie,ie,pe);const me=.5*(re.max[2]-re.min[2]),Te=this._minimumAABBFrustumDistance(I,re),be=h.scale$2([],[0,0,1],me),Ue=h.add(be,ie,be),yt=Te+(0===I.pitch?0:h.distance(ie,Ue)),Fe=I.globeCenterInViewSpace,tt=h.sub([],ie,[Fe[0],Fe[1],Fe[2]]);h.normalize(tt,tt),h.scale$2(tt,tt,yt);const qe=h.add([],ie,tt);h.transformMat4(qe,qe,ge);const gt=h.earthRadius/h.GLOBE_RADIUS,Be=h.length(qe),Je=h.mercatorZfromAltitude(Math.max(Be*gt-h.earthRadius,Number.EPSILON),0),xt=Math.min(I.zoomFromMercatorZAdjusted(Je),A.maxZoom);return xt>.5*(h.GLOBE_ZOOM_THRESHOLD_MIN+h.GLOBE_ZOOM_THRESHOLD_MAX)?(I.setProjection({name:"mercator"}),I.zoom=xt,this._cameraForBounds(I,d,_,w,C,D)):{center:I.center,zoom:xt,bearing:w,pitch:C}}queryTerrainElevation(l,d){const _=this.transform.elevation;return _?(d=h.extend({},{exaggerated:!0},d),_.getAtPoint(h.MercatorCoordinate.fromLngLat(l),null,d.exaggerated)):null}_cameraForBounds(l,d,_,w,C,D){if("globe"===l.projection.name)return this._cameraForBoundsOnGlobe(l,d,_,w,C,D);const I=l.clone(),A=this._extendCameraOptions(D),L=I.padding;I.bearing=w,I.pitch=C;const R=h.LngLat.convert(d),B=h.LngLat.convert(_),q=new h.LngLat(R.lng,B.lat),X=new h.LngLat(B.lng,R.lat),K=I.project(R),J=I.project(B),Q=this.queryTerrainElevation(R),U=this.queryTerrainElevation(B),Y=this.queryTerrainElevation(q),re=this.queryTerrainElevation(X),ie=[[K.x,K.y,Math.min(Q||0,U||0,Y||0,re||0)],[J.x,J.y,Math.max(Q||0,U||0,Y||0,re||0)]];let pe=h.Aabb.fromPoints(ie);const ge=I.getWorldToCameraMatrix(),me=h.invert(new Float64Array(16),ge);pe=h.Aabb.applyTransform(pe,ge);const Te=h.sub([],pe.max,pe.min),be=L.left||0,Ue=L.right||0,yt=L.bottom||0,Fe=L.top||0,{left:tt,right:qe,top:gt,bottom:Be}=A.padding,Je=.5*(be+Ue),xt=.5*(Fe+yt),ht=Math.min(I.scaleZoom(I.scale*Math.min((I.width-(be+Ue+tt+qe))/Te[0],(I.height-(yt+Fe+Be+gt))/Te[1])),A.maxZoom),Et=I.scale/I.zoomScale(ht);pe=new h.Aabb([pe.min[0]-(tt+Je)*Et,pe.min[1]-(Be+xt)*Et,pe.min[2]],[pe.max[0]+(qe+Je)*Et,pe.max[1]+(gt+xt)*Et,pe.max[2]]);const ln=.5*Te[2],In=this._minimumAABBFrustumDistance(I,pe),Xt=[0,0,1,0];h.transformMat4$1(Xt,Xt,ge),h.normalize$2(Xt,Xt);const vn=h.scale$2([],Xt,In+ln),Jn=h.add([],pe.center,vn),Yn=("number"==typeof A.offset.x&&"number"==typeof A.offset.y?new h.Point(A.offset.x,A.offset.y):h.Point.convert(A.offset)).rotate(-h.degToRad(w));pe.center[0]-=Yn.x*Et,pe.center[1]+=Yn.y*Et,h.transformMat4(pe.center,pe.center,me),h.transformMat4(Jn,Jn,me);const on=[pe.center[0],pe.center[1],Jn[2]*I.pixelsPerMeter];h.scale$2(on,on,1/I.worldSize);const rr=h.lngFromMercatorX(on[0]),kr=h.latFromMercatorY(on[1]),$n=Math.min(I._zoomFromMercatorZ(on[2]),A.maxZoom),Ar=new h.LngLat(rr,kr);return I.mercatorFromTransition&&$n<.5*(h.GLOBE_ZOOM_THRESHOLD_MIN+h.GLOBE_ZOOM_THRESHOLD_MAX)?(I.setProjection({name:"globe"}),I.zoom=$n,this._cameraForBounds(I,d,_,w,C,D)):{center:Ar,zoom:$n,bearing:w,pitch:C}}fitBounds(l,d,_){const w=this.cameraForBounds(l,d);return this._fitInternal(w,d,_)}fitScreenCoordinates(l,d,_,w,C){const D=h.Point.convert(l),I=h.Point.convert(d),A=new h.Point(Math.min(D.x,I.x),Math.min(D.y,I.y)),L=new h.Point(Math.max(D.x,I.x),Math.max(D.y,I.y));if("mercator"===this.transform.projection.name&&this.transform.anyCornerOffEdge(D,I))return this;const R=this.transform.pointLocation3D(A),B=this.transform.pointLocation3D(L),q=this.transform.pointLocation3D(new h.Point(A.x,L.y)),X=this.transform.pointLocation3D(new h.Point(L.x,A.y)),K=[Math.min(R.lng,B.lng,q.lng,X.lng),Math.min(R.lat,B.lat,q.lat,X.lat)],J=[Math.max(R.lng,B.lng,q.lng,X.lng),Math.max(R.lat,B.lat,q.lat,X.lat)],Q=w&&w.pitch?w.pitch:this.getPitch(),U=this._cameraForBounds(this.transform,K,J,_,Q,w);return this._fitInternal(U,w,C)}_fitInternal(l,d,_){return l?(delete(d=h.extend(l,d)).padding,d.linear?this.easeTo(d,_):this.flyTo(d,_)):this}jumpTo(l,d){this.stop();const _=l.preloadOnly?this.transform.clone():this.transform;let w=!1,C=!1,D=!1;return"zoom"in l&&_.zoom!==+l.zoom&&(w=!0,_.zoom=+l.zoom),void 0!==l.center&&(_.center=h.LngLat.convert(l.center)),"bearing"in l&&_.bearing!==+l.bearing&&(C=!0,_.bearing=+l.bearing),"pitch"in l&&_.pitch!==+l.pitch&&(D=!0,_.pitch=+l.pitch),null==l.padding||_.isPaddingEqual(l.padding)||(_.padding=l.padding),l.preloadOnly?(this._preloadTiles(_),this):(this.fire(new h.Event("movestart",d)).fire(new h.Event("move",d)),w&&this.fire(new h.Event("zoomstart",d)).fire(new h.Event("zoom",d)).fire(new h.Event("zoomend",d)),C&&this.fire(new h.Event("rotatestart",d)).fire(new h.Event("rotate",d)).fire(new h.Event("rotateend",d)),D&&this.fire(new h.Event("pitchstart",d)).fire(new h.Event("pitch",d)).fire(new h.Event("pitchend",d)),this.fire(new h.Event("moveend",d)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||h.warnOnce(lc),this.transform.getFreeCameraOptions()}setFreeCameraOptions(l,d){const _=this.transform;if(!_.projection.supportsFreeCamera)return h.warnOnce(lc),this;this.stop();const w=_.zoom,C=_.pitch,D=_.bearing;_.setFreeCameraOptions(l);const I=w!==_.zoom,A=C!==_.pitch,L=D!==_.bearing;return this.fire(new h.Event("movestart",d)).fire(new h.Event("move",d)),I&&this.fire(new h.Event("zoomstart",d)).fire(new h.Event("zoom",d)).fire(new h.Event("zoomend",d)),L&&this.fire(new h.Event("rotatestart",d)).fire(new h.Event("rotate",d)).fire(new h.Event("rotateend",d)),A&&this.fire(new h.Event("pitchstart",d)).fire(new h.Event("pitch",d)).fire(new h.Event("pitchend",d)),this.fire(new h.Event("moveend",d)),this}easeTo(l,d){this._stop(!1,l.easeId),(!1===(l=h.extend({offset:[0,0],duration:500,easing:h.ease},l)).animate||this._prefersReducedMotion(l))&&(l.duration=0);const _=this.transform,w=this.getZoom(),C=this.getBearing(),D=this.getPitch(),I=this.getPadding(),A="zoom"in l?+l.zoom:w,L="bearing"in l?this._normalizeBearing(l.bearing,C):C,R="pitch"in l?+l.pitch:D,B="padding"in l?l.padding:_.padding,q=h.Point.convert(l.offset);let X,K,J;if("globe"===_.projection.name){const be=h.MercatorCoordinate.fromLngLat(_.center),Ue=q.rotate(-_.angle);be.x+=Ue.x/_.worldSize,be.y+=Ue.y/_.worldSize;const yt=be.toLngLat(),Fe=h.LngLat.convert(l.center||yt);this._normalizeCenter(Fe),X=_.centerPoint.add(Ue),K=new h.Point(be.x,be.y).mult(_.worldSize),J=new h.Point(h.mercatorXfromLng(Fe.lng),h.mercatorYfromLat(Fe.lat)).mult(_.worldSize).sub(K)}else{X=_.centerPoint.add(q);const be=_.pointLocation(X),Ue=h.LngLat.convert(l.center||be);this._normalizeCenter(Ue),K=_.project(be),J=_.project(Ue).sub(K)}const Q=_.zoomScale(A-w);let U,Y;l.around&&(U=h.LngLat.convert(l.around),Y=_.locationPoint(U));const re=this._zooming||A!==w,ie=this._rotating||C!==L,pe=this._pitching||R!==D,ge=!_.isPaddingEqual(B),me=be=>Ue=>{if(re&&(be.zoom=h.number(w,A,Ue)),ie&&(be.bearing=h.number(C,L,Ue)),pe&&(be.pitch=h.number(D,R,Ue)),ge&&(be.interpolatePadding(I,B,Ue),X=be.centerPoint.add(q)),U)be.setLocationAtPoint(U,Y);else{const yt=be.zoomScale(be.zoom-w),Fe=A>w?Math.min(2,Q):Math.max(.5,Q),tt=Math.pow(Fe,1-Ue),qe=be.unproject(K.add(J.mult(Ue*tt)).mult(yt));be.setLocationAtPoint(be.renderWorldCopies?qe.wrap():qe,X)}return l.preloadOnly||this._fireMoveEvents(d),be};if(l.preloadOnly){const be=this._emulate(me,l.duration,_);return this._preloadTiles(be),this}const Te={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=re,this._rotating=ie,this._pitching=pe,this._padding=ge,this._easeId=l.easeId,this._prepareEase(d,l.noMoveStart,Te),this._ease(me(_),be=>{_.recenterOnTerrain(),this._afterEase(d,be)},l),this}_prepareEase(l,d,_={}){this._moving=!0,this.transform.cameraElevationReference="sea",d||_.moving||this.fire(new h.Event("movestart",l)),this._zooming&&!_.zooming&&this.fire(new h.Event("zoomstart",l)),this._rotating&&!_.rotating&&this.fire(new h.Event("rotatestart",l)),this._pitching&&!_.pitching&&this.fire(new h.Event("pitchstart",l))}_fireMoveEvents(l){this.fire(new h.Event("move",l)),this._zooming&&this.fire(new h.Event("zoom",l)),this._rotating&&this.fire(new h.Event("rotate",l)),this._pitching&&this.fire(new h.Event("pitch",l))}_afterEase(l,d){if(this._easeId&&d&&this._easeId===d)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const _=this._zooming,w=this._rotating,C=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_&&this.fire(new h.Event("zoomend",l)),w&&this.fire(new h.Event("rotateend",l)),C&&this.fire(new h.Event("pitchend",l)),this.fire(new h.Event("moveend",l))}flyTo(l,d){if(this._prefersReducedMotion(l)){const ht=h.pick(l,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ht,d)}this.stop(),l=h.extend({offset:[0,0],speed:1.2,curve:1.42,easing:h.ease},l);const _=this.transform,w=this.getZoom(),C=this.getBearing(),D=this.getPitch(),I=this.getPadding(),A="zoom"in l?h.clamp(+l.zoom,_.minZoom,_.maxZoom):w,L="bearing"in l?this._normalizeBearing(l.bearing,C):C,R="pitch"in l?+l.pitch:D,B="padding"in l?l.padding:_.padding,q=_.zoomScale(A-w),X=h.Point.convert(l.offset);let K=_.centerPoint.add(X);const J=_.pointLocation(K),Q=h.LngLat.convert(l.center||J);this._normalizeCenter(Q);const U=_.project(J),Y=_.project(Q).sub(U);let re=l.curve;const ie=Math.max(_.width,_.height),pe=ie/q,ge=Y.mag();if("minZoom"in l){const ht=h.clamp(Math.min(l.minZoom,w,A),_.minZoom,_.maxZoom),Et=ie/_.zoomScale(ht-w);re=Math.sqrt(Et/ge*2)}const me=re*re;function Te(ht){const Et=(pe*pe-ie*ie+(ht?-1:1)*me*me*ge*ge)/(2*(ht?pe:ie)*me*ge);return Math.log(Math.sqrt(Et*Et+1)-Et)}function be(ht){return(Math.exp(ht)-Math.exp(-ht))/2}function Ue(ht){return(Math.exp(ht)+Math.exp(-ht))/2}const yt=Te(0);let Fe=function(ht){return Ue(yt)/Ue(yt+re*ht)},tt=function(ht){return ie*((Ue(yt)*(be(Et=yt+re*ht)/Ue(Et))-be(yt))/me)/ge;var Et},qe=(Te(1)-yt)/re;if(Math.abs(ge)<1e-6||!isFinite(qe)){if(Math.abs(ie-pe)<1e-6)return this.easeTo(l,d);const ht=pel.maxDuration&&(l.duration=0);const gt=C!==L,Be=R!==D,Je=!_.isPaddingEqual(B),xt=ht=>Et=>{const ln=Et*qe,In=1/Fe(ln);ht.zoom=1===Et?A:w+ht.scaleZoom(In),gt&&(ht.bearing=h.number(C,L,Et)),Be&&(ht.pitch=h.number(D,R,Et)),Je&&(ht.interpolatePadding(I,B,Et),K=ht.centerPoint.add(X));const Xt=1===Et?Q:ht.unproject(U.add(Y.mult(tt(ln))).mult(In));return ht.setLocationAtPoint(ht.renderWorldCopies?Xt.wrap():Xt,K),ht._updateCameraOnTerrain(),l.preloadOnly||this._fireMoveEvents(d),ht};if(l.preloadOnly){const ht=this._emulate(xt,l.duration,_);return this._preloadTiles(ht),this}return this._zooming=!0,this._rotating=gt,this._pitching=Be,this._padding=Je,this._prepareEase(d,!1),this._ease(xt(_),()=>this._afterEase(d),l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,d){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const _=this._onEaseEnd;this._onEaseEnd=void 0,_.call(this,d)}if(!l){const _=this.handlers;_&&_.stop(!1)}return this}_ease(l,d,_){!1===_.animate||0===_.duration?(l(1),d()):(this._easeStart=h.exported.now(),this._easeOptions=_,this._onEaseFrame=l,this._onEaseEnd=d,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const l=Math.min((h.exported.now()-this._easeStart)/this._easeOptions.duration,1),d=this._onEaseFrame;d&&d(this._easeOptions.easing(l)),l<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(l,d){l=h.wrap(l,-180,180);const _=Math.abs(l-d);return Math.abs(l-360-d)<_&&(l-=360),Math.abs(l+360-d)<_&&(l+=360),l}_normalizeCenter(l){const d=this.transform;if(!d.renderWorldCopies||d.maxBounds)return;const _=l.lng-d.center.lng;l.lng+=_>180?-360:_<-180?360:0}_prefersReducedMotion(l){return this._respectPrefersReducedMotion&&h.exported.prefersReducedMotion&&!(l&&l.essential)}_emulate(l,d,_){const w=Math.ceil(15*d/1e3),C=[],D=l(_.clone());for(let I=0;I<=w;I++){const A=D(I/w);C.push(A.clone())}return C}}class Ve{constructor(l={}){this.options=l,h.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(l){const d=this.options&&this.options.compact;return this._map=l,this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=Ae("button","mapboxgl-ctrl-attrib-button",this._container),Ae("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Ae("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),d&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===d&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(l,d){const _=this._map._getUIString(`AttributionControl.${d}`);l.setAttribute("aria-label",_),l.removeAttribute("title"),l.firstElementChild&&l.firstElementChild.setAttribute("title",_)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let l=this._editLink;l||(l=this._editLink=this._container.querySelector(".mapbox-improve-map"));const d=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||h.config.ACCESS_TOKEN}];if(l){const _=d.reduce((w,C,D)=>(C.value&&(w+=`${C.key}=${C.value}${Dw.length-C.length),l=l.filter((w,C)=>{for(let D=C+1;D=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=[...this.options.customAttribution,...l]:l.unshift(this.options.customAttribution));const _=l.join(" | ");_!==this._attribHTML&&(this._attribHTML=_,l.length?(this._innerContainer.innerHTML=_,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class Mn{constructor(){h.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(l){this._map=l,this._container=Ae("div","mapboxgl-ctrl");const d=Ae("a","mapboxgl-ctrl-logo");return d.target="_blank",d.rel="noopener nofollow",d.href="https://www.mapbox.com/",d.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),d.setAttribute("rel","noopener nofollow"),this._container.appendChild(d),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(l){l&&"metadata"!==l.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const l=this._map.style._sourceCaches;if(0===Object.entries(l).length)return!0;for(const d in l){const _=l[d].getSource();if(_.hasOwnProperty("mapbox_logo")&&!_.mapbox_logo)return!1}return!0}_updateCompact(){const l=this._container.children;if(l.length){const d=l[0];this._map.getCanvasContainer().offsetWidth<250?d.classList.add("mapboxgl-compact"):d.classList.remove("mapboxgl-compact")}}}class si{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const d=++this._id;return this._queue.push({callback:l,id:d,cancelled:!1}),d}remove(l){const d=this._currentlyRunning,_=d?this._queue.concat(d):this._queue;for(const w of _)if(w.id===l)return void(w.cancelled=!0)}run(l=0){const d=this._currentlyRunning=this._queue;this._queue=[];for(const _ of d)if(!_.cancelled&&(_.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function Eo(m,l,d){if(m=new h.LngLat(m.lng,m.lat),l){const _=new h.LngLat(m.lng-360,m.lat),w=new h.LngLat(m.lng+360,m.lat),C=360*Math.ceil(Math.abs(m.lng-d.center.lng)/360),D=d.locationPoint(m).distSqr(l),I=l.x<0||l.y<0||l.x>d.width||l.y>d.height;d.locationPoint(_).distSqr(l)180;){const _=d.locationPoint(m);if(_.x>=0&&_.y>=0&&_.x<=d.width&&_.y<=d.height)break;m.lng>d.center.lng?m.lng-=360:m.lng+=360}return m}const Ai={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class At extends h.Evented{constructor(l,d){if(super(),(l instanceof h.window.HTMLElement||d)&&(l=h.extend({element:l},d)),h.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=l&&l.occludedOpacity||.2,l&&l.element)this._element=l.element,this._offset=h.Point.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=Ae("div");const w=41,C=27,D=ct("svg",{display:"block",height:w*this._scale+"px",width:C*this._scale+"px",viewBox:`0 0 ${C} ${w}`},this._element),I=ct("radialGradient",{id:"shadowGradient"},ct("defs",{},D));ct("stop",{offset:"10%","stop-opacity":.4},I),ct("stop",{offset:"100%","stop-opacity":.05},I),ct("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},D),ct("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},D),ct("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},D),ct("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},D),this._offset=h.Point.convert(l&&l.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",w=>{w.preventDefault()}),this._element.addEventListener("mousedown",w=>{w.preventDefault()});const _=this._element.classList;for(const w in Ai)_.remove(`mapboxgl-marker-anchor-${w}`);_.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(l){return l===this._map||(this.remove(),this._map=l,l.getCanvasContainer().appendChild(this._element),l.on("move",this._updateMoving),l.on("moveend",this._update),l.on("remove",this._clearFadeTimer),l._addMarker(this),this.setDraggable(this._draggable),this._update(),l.on("click",this._onMapClick)),this}remove(){const l=this._map;return l&&(l.off("click",this._onMapClick),l.off("move",this._updateMoving),l.off("moveend",this._update),l.off("mousedown",this._addDragHandler),l.off("touchstart",this._addDragHandler),l.off("mouseup",this._onUp),l.off("touchend",this._onUp),l.off("mousemove",this._onMove),l.off("touchmove",this._onMove),l.off("remove",this._clearFadeTimer),l._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=h.LngLat.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const w=Math.sqrt(Math.pow(13.5,2)/2);l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[w,-1*(24.6+w)],"bottom-right":[-w,-1*(24.6+w)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=l,l._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(l){const d=l.code,_=l.charCode||l.keyCode;"Space"!==d&&"Enter"!==d&&32!==_&&13!==_||this.togglePopup()}_onMapClick(l){const d=l.originalEvent.target,_=this._element;this._popup&&(d===_||_.contains(d))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const l=this._popup;return l?(l.isOpen()?(l.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(l.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const l=this._map,d=this._pos;if(!l||!d)return!1;const _=l.unproject(d),w=l.getFreeCameraOptions();if(!w.position)return!1;const C=w.position.toLngLat();return C.distanceTo(_)<.9*C.distanceTo(this._lngLat)}_evaluateOpacity(){const l=this._map;if(!l)return;const d=this._pos;if(!d||d.x<0||d.x>l.transform.width||d.y<0||d.y>l.transform.height)return void this._clearFadeTimer();const _=l.unproject(d);let w;l._showingGlobe()&&h.isLngLatBehindGlobe(l.transform,this._lngLat)?w=0:(w=1-l._queryFogOpacity(_),l.transform._terrainEnabled()&&l.getTerrain()&&this._behindTerrain()&&(w*=this._occludedOpacity)),this._element.style.opacity=`${w}`,this._element.style.pointerEvents=w>0?"auto":"none",this._popup&&this._popup._setOpacity(w),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const l=this._pos;if(!l||!this._map)return;const d=this._offset.mult(this._scale);this._element.style.transform=`\n translate(${l.x}px,${l.y}px)\n ${Ai[this._anchor]}\n ${this._calculateXYTransform()} ${this._calculateZTransform()}\n translate(${d.x}px,${d.y}px)\n `}_calculateXYTransform(){const l=this._pos,d=this._map,_=this.getPitchAlignment();if(!d||!l||"map"!==_)return"";if(!d._showingGlobe()){const A=d.getPitch();return A?`rotateX(${A}deg)`:""}const w=h.radToDeg(h.globeTiltAtLngLat(d.transform,this._lngLat)),C=l.sub(h.globeCenterToScreenPoint(d.transform)),D=Math.abs(C.x)+Math.abs(C.y);if(0===D)return"";const I=w/D;return`rotateX(${-C.y*I}deg) rotateY(${C.x*I}deg)`}_calculateZTransform(){const l=this._pos,d=this._map;if(!d||!l)return"";let _=0;const w=this.getRotationAlignment();if("map"===w)if(d._showingGlobe()){const C=d.project(new h.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),D=d.project(new h.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(C);_=h.radToDeg(Math.atan2(D.y,D.x))-90}else _=-d.getBearing();else if("horizon"===w){const C=h.smoothstep(4,6,d.getZoom()),D=h.globeCenterToScreenPoint(d.transform);D.y+=C*d.transform.height;const I=l.sub(D),A=h.radToDeg(Math.atan2(I.y,I.x));_=(A>90?A-270:A+90)*(1-C)}return _+=this._rotation,_?`rotateZ(${_}deg)`:""}_update(l){h.window.cancelAnimationFrame(this._updateFrameId);const d=this._map;d&&(d.transform.renderWorldCopies&&(this._lngLat=Eo(this._lngLat,this._pos,d.transform)),this._pos=d.project(this._lngLat),!0===l?this._updateFrameId=h.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),d._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(d._showingGlobe()||d.getTerrain()||d.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(l){return this._offset=h.Point.convert(l),this._update(),this}_onMove(l){const d=this._map;if(!d)return;const _=this._pointerdownPos,w=this._positionDelta;if(_&&w){if(!this._isDragging){const C=this._clickTolerance||d._clickTolerance;if(l.point.dist(_)=this._endTime)return this._end;const d=h.easeCubicInOut((l-this._startTime)/(this._endTime-this._startTime));return this._start*(1-d)+this._end*d}isEasing(l){return l>=this._startTime&&l<=this._endTime}jumpTo(l){this._startTime=-1/0,this._endTime=-1/0,this._start=l,this._end=l}easeTo(l,d,_){this._start=this.getValue(d),this._end=l,this._startTime=d,this._endTime=d+_}}const jn={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use \u2318 + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},iu={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0},Lm={showCompass:!0,showZoom:!0,visualizePitch:!1};class ou{constructor(l,d,_=!1){this._clickTolerance=10,this.element=d,this.mouseRotate=new ms({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,_&&(this.mousePitch=new qf({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),h.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),d.addEventListener("mousedown",this.mousedown),d.addEventListener("touchstart",this.touchstart,{passive:!1}),d.addEventListener("touchmove",this.touchmove),d.addEventListener("touchend",this.touchend),d.addEventListener("touchcancel",this.reset)}down(l,d){this.mouseRotate.mousedown(l,d),this.mousePitch&&this.mousePitch.mousedown(l,d),bt()}move(l,d){const _=this.map,w=this.mouseRotate.mousemoveWindow(l,d),C=w&&w.bearingDelta;if(C&&_.setBearing(_.getBearing()+C),this.mousePitch){const D=this.mousePitch.mousemoveWindow(l,d),I=D&&D.pitchDelta;I&&_.setPitch(_.getPitch()+I)}}off(){const l=this.element;l.removeEventListener("mousedown",this.mousedown),l.removeEventListener("touchstart",this.touchstart,{passive:!1}),l.removeEventListener("touchmove",this.touchmove),l.removeEventListener("touchend",this.touchend),l.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){ft(),h.window.removeEventListener("mousemove",this.mousemove),h.window.removeEventListener("mouseup",this.mouseup)}mousedown(l){this.down(h.extend({},l,{ctrlKey:!0,preventDefault:()=>l.preventDefault()}),ot(this.element,l)),h.window.addEventListener("mousemove",this.mousemove),h.window.addEventListener("mouseup",this.mouseup)}mousemove(l){this.move(l,ot(this.element,l))}mouseup(l){this.mouseRotate.mouseupWindow(l),this.mousePitch&&this.mousePitch.mouseupWindow(l),this.offTemp()}touchstart(l){1!==l.targetTouches.length?this.reset():(this._startPos=this._lastPos=Se(this.element,l.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>l.preventDefault()},this._startPos))}touchmove(l){1!==l.targetTouches.length?this.reset():(this._lastPos=Se(this.element,l.targetTouches)[0],this.move({preventDefault:()=>l.preventDefault()},this._lastPos))}touchend(l){0===l.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)m.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=m.minPitch&&null!=m.maxPitch&&m.minPitch>m.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=m.minPitch&&m.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=m.maxPitch&&m.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(m.antialias&&h.isSafariWithAntialiasingBug(h.window)&&(m.antialias=!1,h.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new rn(m.minZoom,m.maxZoom,m.minPitch,m.maxPitch,m.renderWorldCopies),m),this._interactive=m.interactive,this._minTileCacheSize=m.minTileCacheSize,this._maxTileCacheSize=m.maxTileCacheSize,this._failIfMajorPerformanceCaveat=m.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=m.preserveDrawingBuffer,this._antialias=m.antialias,this._useWebGL2=m.useWebGL2,this._trackResize=m.trackResize,this._bearingSnap=m.bearingSnap,this._refreshExpiredTiles=m.refreshExpiredTiles,this._fadeDuration=m.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=m.crossSourceCollisions,this._collectResourceTiming=m.collectResourceTiming,this._optimizeForTerrain=m.optimizeForTerrain,this._language=this._parseLanguage(m.language),this._worldview=m.worldview,this._renderTaskQueue=new si,this._domRenderTaskQueue=new si,this._controls=[],this._markers=[],this._popups=[],this._mapId=h.uniqueId(),this._locale=h.extend({},jn,m.locale),this._clickTolerance=m.clickTolerance,this._cooperativeGestures=m.cooperativeGestures,this._performanceMetricsCollection=m.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Dl(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new h.RequestManager(m.transformRequest,m.accessToken,m.testMode),this._silenceAuthErrors=!!m.testMode,"string"==typeof m.container){if(this._container=h.window.document.getElementById(m.container),!this._container)throw new Error(`Container '${m.container}' not found.`)}else{if(!(m.container instanceof h.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=m.container}if(this._container.childNodes.length>0&&h.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),m.maxBounds&&this.setMaxBounds(m.maxBounds),h.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),void 0!==h.window&&(h.window.addEventListener("online",this._onWindowOnline,!1),h.window.addEventListener("resize",this._onWindowResize,!1),h.window.addEventListener("orientationchange",this._onWindowResize,!1),h.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),h.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new xa(this,m),this._localFontFamily=m.localFontFamily,this._localIdeographFontFamily=m.localIdeographFontFamily,m.style&&this.setStyle(m.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),m.projection&&this.setProjection(m.projection),this._hash=m.hash&&new Nt("string"==typeof m.hash&&m.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:m.center,zoom:m.zoom,bearing:m.bearing,pitch:m.pitch}),m.bounds&&(this.resize(),this.fitBounds(m.bounds,h.extend({},m.fitBoundsOptions,{duration:0})))),this.resize(),m.attributionControl&&this.addControl(new Ve({customAttribution:m.customAttribution})),this._logoControl=new Mn,this.addControl(this._logoControl,m.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",l=>{this._update("style"===l.dataType),this.fire(new h.Event(`${l.dataType}data`,l))}),this.on("dataloading",l=>{this.fire(new h.Event(`${l.dataType}dataloading`,l))})}_getMapId(){return this._mapId}addControl(m,l){if(void 0===l&&(l=m.getDefaultPosition?m.getDefaultPosition():"top-right"),!m||!m.onAdd)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const d=m.onAdd(this);this._controls.push(m);const _=this._controlPositions[l];return-1!==l.indexOf("bottom")?_.insertBefore(d,_.firstChild):_.appendChild(d),this}removeControl(m){if(!m||!m.onRemove)return this.fire(new h.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(m);return l>-1&&this._controls.splice(l,1),m.onRemove(this),this}hasControl(m){return this._controls.indexOf(m)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(m){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const l=!this._moving;return l&&this.fire(new h.Event("movestart",m)).fire(new h.Event("move",m)),this.fire(new h.Event("resize",m)),l&&this.fire(new h.Event("moveend",m)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(m){return this.transform.setMaxBounds(h.LngLatBounds.convert(m)),this._update()}setMinZoom(m){if((m=m??-2)>=-2&&m<=this.transform.maxZoom)return this.transform.minZoom=m,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=m,this._update(),this.getZoom()>m?this.setZoom(m):this.fire(new h.Event("zoomstart")).fire(new h.Event("zoom")).fire(new h.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(m){if((m=m??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(m>=0&&m<=this.transform.maxPitch)return this.transform.minPitch=m,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(m>=this.transform.minPitch)return this.transform.maxPitch=m,this._update(),this.getPitch()>m?this.setPitch(m):this.fire(new h.Event("pitchstart")).fire(new h.Event("pitch")).fire(new h.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(m){return this.transform.renderWorldCopies=m,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(m){return"auto"===m?h.window.navigator.language:Array.isArray(m)?0===m.length?void 0:m.map(l=>"auto"===l?h.window.navigator.language:l):m}setLanguage(m){const l=this._parseLanguage(m);if(!this.style||l===this._language)return this;this._language=l,this.style._reloadSources();for(const d of this._controls)d._setLanguage&&d._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(m){return this.style&&m!==this._worldview?(this._worldview=m,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return"globe"===this.transform.projection.name}setProjection(m){return this._lazyInitEmptyStyle(),m?"string"==typeof m&&(m={name:m}):m=null,this._useExplicitProjection=!!m,this._prioritizeAndUpdateProjection(m,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if("globe"!==this.getProjection().name)return;const m=this.transform,l=m.projection.name;let d;"globe"===l&&m.zoom>=h.GLOBE_ZOOM_THRESHOLD_MAX?(m.setMercatorFromTransition(),d=!0):"mercator"===l&&m.zoom=h.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(m),this.style.applyProjectionUpdate(),l){this.painter.clearBackgroundTiles();for(const d in this.style._sourceCaches)this.style._sourceCaches[d].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(m){return this.transform.locationPoint3D(h.LngLat.convert(m))}unproject(m){return this.transform.pointLocation3D(h.Point.convert(m))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(m,l,d){if("mouseenter"===m||"mouseover"===m){let _=!1;const w=D=>{const I=l.filter(L=>this.getLayer(L)),A=I.length?this.queryRenderedFeatures(D.point,{layers:I}):[];A.length?_||(_=!0,d.call(this,new Qr(m,this,D.originalEvent,{features:A}))):_=!1},C=()=>{_=!1};return{layers:new Set(l),listener:d,delegates:{mousemove:w,mouseout:C}}}if("mouseleave"===m||"mouseout"===m){let _=!1;const w=D=>{const I=l.filter(A=>this.getLayer(A));(I.length?this.queryRenderedFeatures(D.point,{layers:I}):[]).length?_=!0:_&&(_=!1,d.call(this,new Qr(m,this,D.originalEvent)))},C=D=>{_&&(_=!1,d.call(this,new Qr(m,this,D.originalEvent)))};return{layers:new Set(l),listener:d,delegates:{mousemove:w,mouseout:C}}}{const _=w=>{const C=l.filter(I=>this.getLayer(I)),D=C.length?this.queryRenderedFeatures(w.point,{layers:C}):[];D.length&&(w.features=D,d.call(this,w),delete w.features)};return{layers:new Set(l),listener:d,delegates:{[m]:_}}}}on(m,l,d){if(void 0===d)return super.on(m,l);Array.isArray(l)||(l=[l]);const _=this._createDelegatedListener(m,l,d);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[m]=this._delegatedListeners[m]||[],this._delegatedListeners[m].push(_);for(const w in _.delegates)this.on(w,_.delegates[w]);return this}once(m,l,d){if(void 0===d)return super.once(m,l);Array.isArray(l)||(l=[l]);const _=this._createDelegatedListener(m,l,d);for(const w in _.delegates)this.once(w,_.delegates[w]);return this}off(m,l,d){if(void 0===d)return super.off(m,l);l=new Set(Array.isArray(l)?l:[l]);const _=(C,D)=>{if(C.size!==D.size)return!1;for(const I of C)if(!D.has(I))return!1;return!0},w=this._delegatedListeners?this._delegatedListeners[m]:void 0;return w&&(C=>{for(let D=0;D{w?this.fire(new h.ErrorEvent(w)):C&&this._updateDiff(C,l)})}else"object"==typeof m&&this._updateDiff(m,l)}_updateDiff(m,l){try{this.style.setState(m)&&this._update(!0)}catch(d){h.warnOnce(`Unable to perform style diff: ${d.message||d.error||d}. Rebuilding the style from scratch.`),this._updateStyle(m,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(h.warnOnce("There is no style added to the map."),!1)}addSource(m,l){return this._lazyInitEmptyStyle(),this.style.addSource(m,l),this._update(!0)}isSourceLoaded(m){return!!this.style&&this.style._isSourceCacheLoaded(m)}areTilesLoaded(){const m=this.style&&this.style._sourceCaches;for(const l in m){const d=m[l]._tiles;for(const _ in d){const w=d[_];if("loaded"!==w.state&&"errored"!==w.state)return!1}}return!0}addSourceType(m,l,d){this._lazyInitEmptyStyle(),this.style.addSourceType(m,l,d)}removeSource(m){return this.style.removeSource(m),this._updateTerrain(),this._update(!0)}getSource(m){return this.style.getSource(m)}addImage(m,l,{pixelRatio:d=1,sdf:_=!1,stretchX:w,stretchY:C,content:D}={}){if(this._lazyInitEmptyStyle(),l instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&l instanceof h.window.ImageBitmap){const{width:I,height:A,data:L}=h.exported.getImageData(l);this.style.addImage(m,{data:new h.RGBAImage({width:I,height:A},L),pixelRatio:d,stretchX:w,stretchY:C,content:D,sdf:_,version:0})}else if(void 0===l.width||void 0===l.height)this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:I,height:A}=l,L=l;this.style.addImage(m,{data:new h.RGBAImage({width:I,height:A},new Uint8Array(L.data)),pixelRatio:d,stretchX:w,stretchY:C,content:D,sdf:_,version:0,userImage:L}),L.onAdd&&L.onAdd(this,m)}}updateImage(m,l){const d=this.style.getImage(m);if(!d)return void this.fire(new h.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _=l instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&l instanceof h.window.ImageBitmap?h.exported.getImageData(l):l,{width:w,height:C}=_;void 0!==w&&void 0!==C?w===d.data.width&&C===d.data.height?(d.data.replace(_.data,!(l instanceof h.window.HTMLImageElement||h.window.ImageBitmap&&l instanceof h.window.ImageBitmap)),this.style.updateImage(m,d)):this.fire(new h.ErrorEvent(new Error(`The width and height of the updated image (${w}, ${C})\n must be that same as the previous version of the image\n (${d.data.width}, ${d.data.height})`))):this.fire(new h.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(m){return m?!!this.style.getImage(m):(this.fire(new h.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(m){this.style.removeImage(m)}loadImage(m,l){h.getImage(this._requestManager.transformRequest(m,h.ResourceType.Image),(d,_)=>{l(d,_ instanceof h.window.HTMLImageElement?h.exported.getImageData(_):_)})}listImages(){return this.style.listImages()}addLayer(m,l){return this._lazyInitEmptyStyle(),this.style.addLayer(m,l),this._update(!0)}moveLayer(m,l){return this.style.moveLayer(m,l),this._update(!0)}removeLayer(m){return this.style.removeLayer(m),this._update(!0)}getLayer(m){return this.style.getLayer(m)}setLayerZoomRange(m,l,d){return this.style.setLayerZoomRange(m,l,d),this._update(!0)}setFilter(m,l,d={}){return this.style.setFilter(m,l,d),this._update(!0)}getFilter(m){return this.style.getFilter(m)}setPaintProperty(m,l,d,_={}){return this.style.setPaintProperty(m,l,d,_),this._update(!0)}getPaintProperty(m,l){return this.style.getPaintProperty(m,l)}setLayoutProperty(m,l,d,_={}){return this.style.setLayoutProperty(m,l,d,_),this._update(!0)}getLayoutProperty(m,l){return this.style.getLayoutProperty(m,l)}setLight(m,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(m,l),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(m){return this._lazyInitEmptyStyle(),!m&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(m),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(m){return this._lazyInitEmptyStyle(),this.style.setFog(m),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(m){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(h.LngLat.convert(m),this.transform):0}setFeatureState(m,l){return this.style.setFeatureState(m,l),this._update()}removeFeatureState(m,l){return this.style.removeFeatureState(m,l),this._update()}getFeatureState(m){return this.style.getFeatureState(m)}_updateContainerDimensions(){if(!this._container)return;const m=this._container.getBoundingClientRect().width||400,l=this._container.getBoundingClientRect().height||300;let d,_,w,C=this._container;for(;C&&(!_||!w);){const D=h.window.getComputedStyle(C).transform;D&&"none"!==D&&(d=D.match(/matrix.*\((.+)\)/)[1].split(", "),d[0]&&"0"!==d[0]&&"1"!==d[0]&&(_=d[0]),d[3]&&"0"!==d[3]&&"1"!==d[3]&&(w=d[3])),C=C.parentElement}this._containerWidth=_?Math.abs(m/_):m,this._containerHeight=w?Math.abs(l/w):l}_detectMissingCSS(){"rgb(250, 128, 114)"!==h.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&h.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const m=this._container;m.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ae("div","mapboxgl-canary",m)).style.visibility="hidden",this._detectMissingCSS();const l=this._canvasContainer=Ae("div","mapboxgl-canvas-container",m);this._interactive&&l.classList.add("mapboxgl-interactive"),this._canvas=Ae("canvas","mapboxgl-canvas",l),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const d=this._controlContainer=Ae("div","mapboxgl-control-container",m),_=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(w=>{_[w]=Ae("div",`mapboxgl-ctrl-${w}`,d)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(m,l){const d=h.exported.devicePixelRatio||1;this._canvas.width=d*Math.ceil(m),this._canvas.height=d*Math.ceil(l),this._canvas.style.width=`${m}px`,this._canvas.style.height=`${l}px`}_addMarker(m){this._markers.push(m)}_removeMarker(m){const l=this._markers.indexOf(m);-1!==l&&this._markers.splice(l,1)}_addPopup(m){this._popups.push(m)}_removePopup(m){const l=this._popups.indexOf(m);-1!==l&&this._popups.splice(l,1)}_setupPainter(){const m=h.extend({},ye.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),l=this._useWebGL2&&this._canvas.getContext("webgl2",m),d=l||this._canvas.getContext("webgl",m)||this._canvas.getContext("experimental-webgl",m);d?(this._useWebGL2&&!l&&h.warnOnce("Failed to create WebGL 2 context. Using WebGL 1."),h.storeAuthState(d,!0),this.painter=new Qu(d,this.transform,!!l),this.on("data",_=>{"source"===_.dataType&&this.painter.setTileLoadedFlag(!0)}),h.exported$1.testSupport(d)):this.fire(new h.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(m){m.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new h.Event("webglcontextlost",{originalEvent:m}))}_contextRestored(m){this._setupPainter(),this.resize(),this._update(),this.fire(new h.Event("webglcontextrestored",{originalEvent:m}))}_onMapScroll(m){if(m.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(m){return this.style?(this._styleDirty=this._styleDirty||m,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(m){return this._update(),this._renderTaskQueue.add(m)}_cancelRenderFrame(m){this._renderTaskQueue.remove(m)}_requestDomTask(m){!this.loaded()||this.loaded()&&!this.isMoving()?m():this._domRenderTaskQueue.add(m)}_render(m){let l;const d=this.painter.context.extTimerQuery,_=h.exported.now();if(this.listens("gpu-timing-frame")&&(l=d.createQueryEXT(),d.beginQueryEXT(d.TIME_ELAPSED_EXT,l)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],h.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],h.window.performance.now())),this._renderTaskQueue.run(m),this._domRenderTaskQueue.run(m),this._removed)return;this._updateProjectionTransition();const w=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const I=this.transform.zoom,A=this.transform.pitch,L=h.exported.now(),R=new h.EvaluationParameters(I,{now:L,fadeDuration:w,pitch:A,transition:this.style.getTransition()});this.style.update(R)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let C=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),C=this._updateAverageElevation(_),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):C=this._updateAverageElevation(_),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new h.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new h.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),l){const I=h.exported.now()-_;d.endQueryEXT(d.TIME_ELAPSED_EXT,l),setTimeout(()=>{const A=d.getQueryObjectEXT(l,d.QUERY_RESULT_EXT)/1e6;d.deleteQueryEXT(l),this.fire(new h.Event("gpu-timing-frame",{cpuTime:I,gpuTime:A})),h.window.performance.mark("frame-gpu",{startTime:_,detail:{gpuTime:A}})},50)}if(this.listens("gpu-timing-layer")){const I=this.painter.collectGpuTimers();setTimeout(()=>{const A=this.painter.queryGpuTimers(I);this.fire(new h.Event("gpu-timing-layer",{layerTimes:A}))},50)}if(this.listens("gpu-timing-deferred-render")){const I=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const A=this.painter.queryGpuTimeDeferredRender(I);this.fire(new h.Event("gpu-timing-deferred-render",{gpuTime:A}))},50)}const D=this._sourcesDirty||this._styleDirty||this._placementDirty||C;if(D||this._repaint)this.triggerRepaint();else{const I=!this.isMoving()&&this.loaded();if(I&&(C=this._updateAverageElevation(_,!0)),C)this.triggerRepaint();else if(this._triggerFrame(!1),I&&(this.fire(new h.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const A=this._calculateSpeedIndex();this.fire(new h.Event("speedindexcompleted",{speedIndex:A})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,h.LivePerformanceUtils.mark(h.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&h.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(m){for(const l of this._markers)m&&!this.getRenderWorldCopies()&&(l._lngLat=l._lngLat.wrap()),l._update();for(const l of this._popups)!m||this.getRenderWorldCopies()||l._trackPointer||(l._lngLat=l._lngLat.wrap()),l._update()}_updateAverageElevation(m,l=!1){const d=_=>(this.transform.averageElevation=_,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return 0!==this.transform.averageElevation&&d(0);if((l||m-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(m)){const _=this.transform.averageElevation;let w=this.transform.sampleAverageElevation(),C=!1;this.transform.elevation&&(C=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(w)?w=0:this._averageElevationLastSampledAt=m;const D=Math.abs(_-w);if(D>1){if(this._isInitialLoad||C)return this._averageElevation.jumpTo(w),d(w);this._averageElevation.easeTo(w,m,300)}else if(D>1e-4)return this._averageElevation.jumpTo(w),d(w)}return!!this._averageElevation.isEasing(m)&&d(this._averageElevation.getValue(m))}_authenticate(){h.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,m=>{if(m&&(m.message===h.AUTH_ERR_MSG||401===m.status)){const l=this.painter.context.gl;h.storeAuthState(l,!1),this._logoControl instanceof Mn&&this._logoControl._updateLogo(),l&&l.clear(l.DEPTH_BUFFER_BIT|l.COLOR_BUFFER_BIT|l.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new h.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),h.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const m=this._isDragging();this.painter.updateTerrain(this.style,m)}_calculateSpeedIndex(){const m=this.painter.canvasCopy(),l=this.painter.getCanvasCopiesAndTimestamps();l.timeStamps.push(performance.now());const d=this.painter.context.gl,_=d.createFramebuffer();function w(C){d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,C,0);const D=new Uint8Array(d.drawingBufferWidth*d.drawingBufferHeight*4);return d.readPixels(0,0,d.drawingBufferWidth,d.drawingBufferHeight,d.RGBA,d.UNSIGNED_BYTE,D),D}return d.bindFramebuffer(d.FRAMEBUFFER,_),this._canvasPixelComparison(w(m),l.canvasCopies.map(w),l.timeStamps)}_canvasPixelComparison(m,l,d){let _=d[1]-d[0];const w=m.length/4;for(let C=0;C{const d=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,d&&this._render(l)}))}_preloadTiles(m){const l=this.style?Object.values(this.style._sourceCaches):[];return h.asyncAll(l,(d,_)=>d._preloadTiles(m,_),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(m){this._trackResize&&this.resize({originalEvent:m})._update()}_onVisibilityChange(){"hidden"===h.window.document.visibilityState&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(m){this._showTileBoundaries!==m&&(this._showTileBoundaries=m,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(m){this._showTerrainWireframe!==m&&(this._showTerrainWireframe=m,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(m){this._speedIndexTiming!==m&&(this._speedIndexTiming=m,this._update())}get showPadding(){return!!this._showPadding}set showPadding(m){this._showPadding!==m&&(this._showPadding=m,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(m){this._showCollisionBoxes!==m&&(this._showCollisionBoxes=m,m?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(m){this._showOverdrawInspector!==m&&(this._showOverdrawInspector=m,this._update())}get repaint(){return!!this._repaint}set repaint(m){this._repaint!==m&&(this._repaint=m,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(m){this._vertices=m,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(m){this._showTileAABBs!==m&&(this._showTileAABBs=m,m&&this._update())}_setCacheLimits(m,l){h.setCacheLimits(m,l)}get version(){return h.version}},NavigationControl:class{constructor(m){this.options=h.extend({},Lm,m),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(h.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",l=>{this._map&&this._map.zoomIn({},{originalEvent:l})}),Ae("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",l=>{this._map&&this._map.zoomOut({},{originalEvent:l})}),Ae("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(h.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",l=>{const d=this._map;d&&(this.options.visualizePitch?d.resetNorthPitch({},{originalEvent:l}):d.resetNorth({},{originalEvent:l}))}),this._compassIcon=Ae("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const m=this._map;if(!m)return;const l=m.getZoom(),d=l===m.getMaxZoom(),_=l===m.getMinZoom();this._zoomInButton.disabled=d,this._zoomOutButton.disabled=_,this._zoomInButton.setAttribute("aria-disabled",d.toString()),this._zoomOutButton.setAttribute("aria-disabled",_.toString())}_rotateCompassArrow(){const m=this._map;if(!m)return;const l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(m.transform.pitch*(Math.PI/180)),.5)}) rotateX(${m.transform.pitch}deg) rotateZ(${m.transform.angle*(180/Math.PI)}deg)`:`rotate(${m.transform.angle*(180/Math.PI)}deg)`;m._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=l)})}onAdd(m){return this._map=m,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),m.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&m.on("pitch",this._rotateCompassArrow),m.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ou(m,this._compass,this.options.visualizePitch)),this._container}onRemove(){const m=this._map;m&&(this._container.remove(),this.options.showZoom&&m.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&m.off("pitch",this._rotateCompassArrow),m.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(m,l){const d=Ae("button",m,this._container);return d.type="button",d.addEventListener("click",l),d}_setButtonTitle(m,l){if(!this._map)return;const d=this._map._getUIString(`NavigationControl.${l}`);m.setAttribute("aria-label",d),m.firstElementChild&&m.firstElementChild.setAttribute("title",d)}},GeolocateControl:class extends h.Evented{constructor(m){super(),this.options=h.extend({geolocation:h.window.navigator.geolocation},fi,m),h.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=oc(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(m){return this._map=m,this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(m){const l=(d=!!this.options.geolocation)=>{this._supportsGeolocation=d,m(d)};void 0!==this._supportsGeolocation?m(this._supportsGeolocation):void 0!==h.window.navigator.permissions?h.window.navigator.permissions.query({name:"geolocation"}).then(d=>l("denied"!==d.state)).catch(()=>l()):l()}_isOutOfMapMaxBounds(m){const l=this._map.getMaxBounds(),d=m.coords;return!!l&&(d.longitudel.getEast()||d.latitudel.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(m){if(this._map){if(this._isOutOfMapMaxBounds(m))return this._setErrorState(),this.fire(new h.Event("outofmaxbounds",m)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=m,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(m),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(m),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new h.Event("geolocate",m)),this._finish()}}_updateCamera(m){const l=new h.LngLat(m.coords.longitude,m.coords.latitude),d=m.coords.accuracy,_=this._map.getBearing(),w=h.extend({bearing:_},this.options.fitBoundsOptions);this._map.fitBounds(l.toBounds(d),w,{geolocateSource:!0})}_updateMarker(m){if(m){const l=new h.LngLat(m.coords.longitude,m.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=m.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const m=this._map.transform,l=h.mercatorZfromAltitude(1,m._center.lat)*m.worldSize,d=Math.ceil(2*this._accuracy*l);this._circleElement.style.width=`${d}px`,this._circleElement.style.height=`${d}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&"number"==typeof this._heading?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(m){if(this._map){if(this.options.trackUserLocation)if(1===m.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===m.code&&this._noTimeout)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new h.Event("error",m)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(m){if(void 0!==this._map){if(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=Ae("button","mapboxgl-ctrl-geolocate",this._container),Ae("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===m){h.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}else{const l=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ae("div","mapboxgl-user-location"),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new At({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ae("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new At({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",l=>{l.geolocateSource||"ACTIVE_LOCK"!==this._watchState||l.originalEvent&&"resize"===l.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new h.Event("trackuserlocationend")))})}}_onDeviceOrientation(m){this._userLocationDotMarker&&(m.webkitCompassHeading?this._heading=m.webkitCompassHeading:!0===m.absolute&&(this._heading=-1*m.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return h.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new h.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new h.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new h.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let m;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(m={maximumAge:6e5,timeout:0},this._noTimeout=!0):(m=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,m),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const m=()=>{h.window.addEventListener("ondeviceorientationabsolute"in h.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};void 0!==h.window.DeviceMotionEvent&&"function"==typeof h.window.DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(l=>{"granted"===l&&m()}).catch(console.error):m()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),h.window.removeEventListener("deviceorientation",this._onDeviceOrientation),h.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Ve,ScaleControl:class{constructor(m){this.options=h.extend({},cc,m),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),h.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const m=this.options.maxWidth||100,l=this._map,d=l._containerHeight/2,_=l._containerWidth/2-m/2,w=l.unproject([_,d]),C=l.unproject([_+m,d]),D=w.distanceTo(C);if("imperial"===this.options.unit){const I=3.2808*D;I>5280?this._setScale(m,I/5280,"mile"):this._setScale(m,I,"foot")}else"nautical"===this.options.unit?this._setScale(m,D/1852,"nautical-mile"):D>=1e3?this._setScale(m,D/1e3,"kilometer"):this._setScale(m,D,"meter")}_setScale(m,l,d){this._map._requestDomTask(()=>{const _=function(C){const D=Math.pow(10,`${Math.floor(C)}`.length-1);let I=C/D;return I=I>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:function(A){const L=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*L)/L}(I),D*I}(l),w=_/l;this._container.innerHTML=this._isNumberFormatSupported&&"nautical-mile"!==d?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:d}).format(_):`${_} ${Il[d]}`,this._container.style.width=m*w+"px"})}onAdd(m){return this._map=m,this._language=m.getLanguage(),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-scale",m.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(m){this._language=m,this._update()}setUnit(m){this.options.unit=m,this._update()}},FullscreenControl:class{constructor(m){this._fullscreen=!1,m&&m.container&&(m.container instanceof h.window.HTMLElement?this._container=m.container:h.warnOnce("Full screen control 'container' must be a DOM element.")),h.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in h.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in h.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(m){return this._map=m,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",h.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,h.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!h.window.document.fullscreenEnabled&&!h.window.document.webkitFullscreenEnabled)}_setupUI(){const m=this._fullscreenButton=Ae("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ae("span","mapboxgl-ctrl-icon",m).setAttribute("aria-hidden","true"),m.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),h.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const m=this._getTitle();this._fullscreenButton.setAttribute("aria-label",m),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",m)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(h.window.document.fullscreenElement||h.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?h.window.document.exitFullscreen?h.window.document.exitFullscreen():h.window.document.webkitCancelFullScreen&&h.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends h.Evented{constructor(m){super(),this.options=h.extend(Object.create(Tl),m),h.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(m&&m.className?m.className.trim().split(/\s+/):[])}addTo(m){return this._map&&this.remove(),this._map=m,this.options.closeOnClick&&m.on("preclick",this._onClose),this.options.closeOnMove&&m.on("move",this._onClose),m.on("remove",this.remove),this._update(),m._addPopup(this),this._focusFirstElement(),this._trackPointer?(m.on("mousemove",this._onMouseEvent),m.on("mouseup",this._onMouseEvent),m._canvasContainer.classList.add("mapboxgl-track-pointer")):m.on("move",this._update),this.fire(new h.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const m=this._map;return m&&(m.off("move",this._update),m.off("move",this._onClose),m.off("preclick",this._onClose),m.off("click",this._onClose),m.off("remove",this.remove),m.off("mousemove",this._onMouseEvent),m.off("mouseup",this._onMouseEvent),m.off("drag",this._onMouseEvent),m._canvasContainer&&m._canvasContainer.classList.remove("mapboxgl-track-pointer"),m._removePopup(this),this._map=void 0),this.fire(new h.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(m){this._lngLat=h.LngLat.convert(m),this._pos=null,this._trackPointer=!1,this._update();const l=this._map;return l&&(l.on("move",this._update),l.off("mousemove",this._onMouseEvent),l._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const m=this._map;return m&&(m.off("move",this._update),m.on("mousemove",this._onMouseEvent),m.on("drag",this._onMouseEvent),m._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(m){return this.setDOMContent(h.window.document.createTextNode(m))}setHTML(m){const l=h.window.document.createDocumentFragment(),d=h.window.document.createElement("body");let _;for(d.innerHTML=m;_=d.firstChild,_;)l.appendChild(_);return this.setDOMContent(l)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(m){return this.options.maxWidth=m,this._update(),this}setDOMContent(m){let l=this._content;if(l)for(;l.hasChildNodes();)l.firstChild&&l.removeChild(l.firstChild);else l=this._content=Ae("div","mapboxgl-popup-content",this._container||void 0);if(l.appendChild(m),this.options.closeButton){const d=this._closeButton=Ae("button","mapboxgl-popup-close-button",l);d.type="button",d.setAttribute("aria-label","Close popup"),d.setAttribute("aria-hidden","true"),d.innerHTML="×",d.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(m){return this._classList.add(m),this._updateClassList(),this}removeClassName(m){return this._classList.delete(m),this._updateClassList(),this}setOffset(m){return this.options.offset=m,this._update(),this}toggleClassName(m){let l;return this._classList.delete(m)?l=!1:(this._classList.add(m),l=!0),this._updateClassList(),l}_onMouseEvent(m){this._update(m.point)}_getAnchor(m){if(this.options.anchor)return this.options.anchor;const l=this._map,d=this._container,_=this._pos;if(!l||!d||!_)return"bottom";const w=d.offsetWidth,C=d.offsetHeight,D=_.xl.transform.width-w/2;if(_.y+ml.transform.height-C){if(D)return"bottom-left";if(I)return"bottom-right"}return D?"left":I?"right":"bottom"}_updateClassList(){const m=this._container;if(!m)return;const l=[...this._classList];l.push("mapboxgl-popup"),this._anchor&&l.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&l.push("mapboxgl-popup-track-pointer"),m.className=l.join(" ")}_update(m){const l=this._map,d=this._content;if(!l||!this._lngLat&&!this._trackPointer||!d)return;let _=this._container;if(_||(_=this._container=Ae("div","mapboxgl-popup",l.getContainer()),this._tip=Ae("div","mapboxgl-popup-tip",_),_.appendChild(d)),this.options.maxWidth&&_.style.maxWidth!==this.options.maxWidth&&(_.style.maxWidth=this.options.maxWidth),l.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Eo(this._lngLat,this._pos,l.transform)),!this._trackPointer||m){const w=this._pos=this._trackPointer&&m?m:l.project(this._lngLat),C=To(this.options.offset),D=this._anchor=this._getAnchor(C.y),I=To(this.options.offset,D),A=w.add(I).round();l._requestDomTask(()=>{this._container&&D&&(this._container.style.transform=`${Ai[D]} translate(${A.x}px,${A.y}px)`)})}if(!this._marker&&l._showingGlobe()){const w=h.isLngLatBehindGlobe(l.transform,this._lngLat)?0:1;this._setOpacity(w)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const m=this._container.querySelector(ti);m&&m.focus()}_onClose(){this.remove()}_setOpacity(m){this._container&&(this._container.style.opacity=`${m}`),this._content&&(this._content.style.pointerEvents=m?"auto":"none")}},Marker:At,Style:Zs,LngLat:h.LngLat,LngLatBounds:h.LngLatBounds,Point:h.Point,MercatorCoordinate:h.MercatorCoordinate,FreeCameraOptions:Sm,Evented:h.Evented,config:h.config,prewarm:function(){Bc().acquire(Rs)},clearPrewarmedResources:function(){const m=Yi;m&&(m.isPreloaded()&&1===m.numActive()?(m.release(Rs),Yi=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return h.config.ACCESS_TOKEN},set accessToken(m){h.config.ACCESS_TOKEN=m},get baseApiUrl(){return h.config.API_URL},set baseApiUrl(m){h.config.API_URL=m},get workerCount(){return ao.workerCount},set workerCount(m){ao.workerCount=m},get maxParallelImageRequests(){return h.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(m){h.config.MAX_PARALLEL_IMAGE_REQUESTS=m},clearStorage(m){h.clearTileCache(m)},workerUrl:"",workerClass:null,setNow:h.exported.setNow,restoreNow:h.exported.restoreNow};return Uo}),st}()},681:function(zt){var st;st=function(){var St="",ze=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function st(ye){return ye.match(ze)||[]}function we(ye){return{language:(ye=st(ye))[1]||St,extlang:ye[2]||St,script:ye[3]||St,region:ye[4]||St}}function h(ye,Me,xe){Object.defineProperty(ye,Me,{value:xe,enumerable:!0})}function W(ye,Me,xe){function Ae(ct){return st(ct)[ye]||St}h(Ae,"pattern",Me),h(we,xe,Ae)}return W(1,/^[a-zA-Z]{2,3}$/,"language"),W(2,/^[a-zA-Z]{3}$/,"extlang"),W(3,/^[a-zA-Z]{4}$/,"script"),W(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),h(we,"split",function ke(ye){return st(ye).filter(function(Me,xe){return Me&&xe})}),we},zt.exports?zt.exports=st():this.subtag=st()},28:(zt,St,ze)=>{"use strict";var st=ze(603);zt.exports=st,typeof window<"u"&&(window.Suggestions=st)},331:zt=>{"use strict";var St=function(ze){return this.component=ze,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,ze.el.parentNode.insertBefore(this.wrapper,ze.el.nextSibling),this};St.prototype.show=function(){this.element.style.display="block"},St.prototype.hide=function(){this.element.style.display="none"},St.prototype.add=function(ze){this.items.push(ze)},St.prototype.clear=function(){this.items=[],this.active=0},St.prototype.isEmpty=function(){return!this.items.length},St.prototype.isVisible=function(){return"block"===this.element.style.display},St.prototype.draw=function(){if(this.element.innerHTML="",0!==this.items.length){for(var ze=0;ze{"use strict";var st=ze(498),ke=ze(424),we=ze(331),h=function(W,ye,Me){return this.options=st({minLength:2,limit:5,filter:!0,hideOnBlur:!0},Me=Me||{}),this.el=W,this.data=ye||[],this.list=new we(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(xe){this.handleKeyUp(xe.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(xe){this.handleKeyDown(xe)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(xe){this.handlePaste(xe)}.bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};h.prototype.handleKeyUp=function(W){40===W||38===W||27===W||13===W||9===W||this.handleInputChange(this.el.value)},h.prototype.handleKeyDown=function(W){switch(W.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&W.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next()}},h.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},h.prototype.handlePaste=function(W){if(W.clipboardData)this.handleInputChange(W.clipboardData.getData("Text"));else{var ye=this;setTimeout(function(){ye.handleInputChange(W.target.value)},100)}},h.prototype.handleInputChange=function(W){this.query=this.normalize(W),this.list.clear(),this.query.length-1},h.prototype.value=function(W){if(this.selected=W,this.el.value=this.getItemValue(W),document.createEvent){var ye=document.createEvent("HTMLEvents");ye.initEvent("change",!0,!1),this.el.dispatchEvent(ye)}else this.el.fireEvent("onchange")},h.prototype.getCandidates=function(W){var ye={pre:"",post:"",extract:function(xe){return this.getItemValue(xe)}.bind(this)};W(this.options.filter?ke.filter(this.query,this.data,ye).map(function(xe){return{original:xe.original,string:this.render(xe.original,xe.string)}}.bind(this)):this.data.map(function(xe){return{original:xe,string:this.render(xe)}}.bind(this)))},h.prototype.getItemValue=function(W){return W},h.prototype.render=function(W,ye){if(ye)return ye;for(var Me=this.getItemValue(W.original?W.original:W),xe=this.normalize(Me),Ae=xe.lastIndexOf(this.query);Ae>-1;){var ct=Ae+this.query.length;Me=Me.slice(0,Ae)+""+Me.slice(Ae,ct)+""+Me.slice(ct),Ae=xe.slice(0,Ae).lastIndexOf(this.query)}return Me},h.prototype.renderError=function(W){this.list.drawError(W)},zt.exports=h},498:zt=>{zt.exports=function ze(){for(var st={},ke=0;ke{"use strict";ze.d(St,{x0:()=>h});let h=(W=21)=>crypto.getRandomValues(new Uint8Array(W)).reduce((ye,Me)=>ye+((Me&=63)<36?Me.toString(36):Me<62?(Me-26).toString(36).toUpperCase():Me>62?"-":"_"),"")}},zt=>{zt(zt.s=392)}]); \ No newline at end of file diff --git a/manrope.c6b629537b59ade1.ttf b/manrope.c6b629537b59ade1.ttf new file mode 100644 index 0000000..f41386f Binary files /dev/null and b/manrope.c6b629537b59ade1.ttf differ diff --git a/polyfills.be7aa5f546dc5be8.js b/polyfills.be7aa5f546dc5be8.js new file mode 100644 index 0000000..555712e --- /dev/null +++ b/polyfills.be7aa5f546dc5be8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkchronomaps=self.webpackChunkchronomaps||[]).push([[429],{633:(ie,Ee,de)=>{de(332)},332:()=>{!function(e){const n=e.performance;function i(L){n&&n.mark&&n.mark(L)}function o(L,T){n&&n.measure&&n.measure(L,T)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function a(L){return c+L}const y=!0===e[a("forceDuplicateZoneCheck")];if(e.Zone){if(y||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let d=(()=>{class L{static#e=this.__symbol__=a;static assertZonePatched(){if(e.Promise!==oe.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=L.current;for(;t.parent;)t=t.parent;return t}static get current(){return U.zone}static get currentTask(){return re}static __load_patch(t,r,k=!1){if(oe.hasOwnProperty(t)){if(!k&&y)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const C="Zone:"+t;i(C),oe[t]=r(e,L,z),o(C,C)}}get parent(){return this._parent}get name(){return this._name}constructor(t,r){this._parent=t,this._name=r?r.name||"unnamed":"",this._properties=r&&r.properties||{},this._zoneDelegate=new v(this,this._parent&&this._parent._zoneDelegate,r)}get(t){const r=this.getZoneWith(t);if(r)return r._properties[t]}getZoneWith(t){let r=this;for(;r;){if(r._properties.hasOwnProperty(t))return r;r=r._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,r){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const k=this._zoneDelegate.intercept(this,t,r),C=this;return function(){return C.runGuarded(k,this,arguments,r)}}run(t,r,k,C){U={parent:U,zone:this};try{return this._zoneDelegate.invoke(this,t,r,k,C)}finally{U=U.parent}}runGuarded(t,r=null,k,C){U={parent:U,zone:this};try{try{return this._zoneDelegate.invoke(this,t,r,k,C)}catch($){if(this._zoneDelegate.handleError(this,$))throw $}}finally{U=U.parent}}runTask(t,r,k){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||K).name+"; Execution: "+this.name+")");if(t.state===x&&(t.type===Q||t.type===P))return;const C=t.state!=E;C&&t._transitionTo(E,A),t.runCount++;const $=re;re=t,U={parent:U,zone:this};try{t.type==P&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,r,k)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==x&&t.state!==h&&(t.type==Q||t.data&&t.data.isPeriodic?C&&t._transitionTo(A,E):(t.runCount=0,this._updateTaskCount(t,-1),C&&t._transitionTo(x,E,x))),U=U.parent,re=$}}scheduleTask(t){if(t.zone&&t.zone!==this){let k=this;for(;k;){if(k===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);k=k.parent}}t._transitionTo(X,x);const r=[];t._zoneDelegates=r,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(k){throw t._transitionTo(h,X,x),this._zoneDelegate.handleError(this,k),k}return t._zoneDelegates===r&&this._updateTaskCount(t,1),t.state==X&&t._transitionTo(A,X),t}scheduleMicroTask(t,r,k,C){return this.scheduleTask(new p(I,t,r,k,C,void 0))}scheduleMacroTask(t,r,k,C,$){return this.scheduleTask(new p(P,t,r,k,C,$))}scheduleEventTask(t,r,k,C,$){return this.scheduleTask(new p(Q,t,r,k,C,$))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||K).name+"; Execution: "+this.name+")");if(t.state===A||t.state===E){t._transitionTo(G,A,E);try{this._zoneDelegate.cancelTask(this,t)}catch(r){throw t._transitionTo(h,G),this._zoneDelegate.handleError(this,r),r}return this._updateTaskCount(t,-1),t._transitionTo(x,G),t.runCount=0,t}}_updateTaskCount(t,r){const k=t._zoneDelegates;-1==r&&(t._zoneDelegates=null);for(let C=0;CL.hasTask(t,r),onScheduleTask:(L,T,t,r)=>L.scheduleTask(t,r),onInvokeTask:(L,T,t,r,k,C)=>L.invokeTask(t,r,k,C),onCancelTask:(L,T,t,r)=>L.cancelTask(t,r)};class v{constructor(T,t,r){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=T,this._parentDelegate=t,this._forkZS=r&&(r&&r.onFork?r:t._forkZS),this._forkDlgt=r&&(r.onFork?t:t._forkDlgt),this._forkCurrZone=r&&(r.onFork?this.zone:t._forkCurrZone),this._interceptZS=r&&(r.onIntercept?r:t._interceptZS),this._interceptDlgt=r&&(r.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=r&&(r.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=r&&(r.onInvoke?r:t._invokeZS),this._invokeDlgt=r&&(r.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=r&&(r.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=r&&(r.onHandleError?r:t._handleErrorZS),this._handleErrorDlgt=r&&(r.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=r&&(r.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=r&&(r.onScheduleTask?r:t._scheduleTaskZS),this._scheduleTaskDlgt=r&&(r.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=r&&(r.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=r&&(r.onInvokeTask?r:t._invokeTaskZS),this._invokeTaskDlgt=r&&(r.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=r&&(r.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=r&&(r.onCancelTask?r:t._cancelTaskZS),this._cancelTaskDlgt=r&&(r.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=r&&(r.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const k=r&&r.onHasTask;(k||t&&t._hasTaskZS)&&(this._hasTaskZS=k?r:b,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=T,r.onScheduleTask||(this._scheduleTaskZS=b,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),r.onInvokeTask||(this._invokeTaskZS=b,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),r.onCancelTask||(this._cancelTaskZS=b,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(T,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,T,t):new d(T,t)}intercept(T,t,r){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,T,t,r):t}invoke(T,t,r,k,C){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,T,t,r,k,C):t.apply(r,k)}handleError(T,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,T,t)}scheduleTask(T,t){let r=t;if(this._scheduleTaskZS)this._hasTaskZS&&r._zoneDelegates.push(this._hasTaskDlgtOwner),r=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,T,t),r||(r=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=I)throw new Error("Task is missing scheduleFn.");R(t)}return r}invokeTask(T,t,r,k){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,T,t,r,k):t.callback.apply(r,k)}cancelTask(T,t){let r;if(this._cancelTaskZS)r=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,T,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");r=t.cancelFn(t)}return r}hasTask(T,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,T,t)}catch(r){this.handleError(T,r)}}_updateTaskCount(T,t){const r=this._taskCounts,k=r[T],C=r[T]=k+t;if(C<0)throw new Error("More tasks executed then were scheduled.");0!=k&&0!=C||this.hasTask(this.zone,{microTask:r.microTask>0,macroTask:r.macroTask>0,eventTask:r.eventTask>0,change:T})}}class p{constructor(T,t,r,k,C,$){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=T,this.source=t,this.data=k,this.scheduleFn=C,this.cancelFn=$,!r)throw new Error("callback is not defined");this.callback=r;const l=this;this.invoke=T===Q&&k&&k.useG?p.invokeTask:function(){return p.invokeTask.call(e,l,this,arguments)}}static invokeTask(T,t,r){T||(T=this),ee++;try{return T.runCount++,T.zone.runTask(T,t,r)}finally{1==ee&&_(),ee--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(x,X)}_transitionTo(T,t,r){if(this._state!==t&&this._state!==r)throw new Error(`${this.type} '${this.source}': can not transition to '${T}', expecting state '${t}'${r?" or '"+r+"'":""}, was '${this._state}'.`);this._state=T,T==x&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const M=a("setTimeout"),Z=a("Promise"),N=a("then");let J,B=[],H=!1;function q(L){if(J||e[Z]&&(J=e[Z].resolve(0)),J){let T=J[N];T||(T=J.then),T.call(J,L)}else e[M](L,0)}function R(L){0===ee&&0===B.length&&q(_),L&&B.push(L)}function _(){if(!H){for(H=!0;B.length;){const L=B;B=[];for(let T=0;TU,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:R,showUncaughtError:()=>!d[a("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:q};let U={parent:null,zone:new d(null,null)},re=null,ee=0;function W(){}o("Zone","Zone"),e.Zone=d}(globalThis);const ie=Object.getOwnPropertyDescriptor,Ee=Object.defineProperty,de=Object.getPrototypeOf,ge=Object.create,Ve=Array.prototype.slice,Se="addEventListener",Oe="removeEventListener",Ze=Zone.__symbol__(Se),Ne=Zone.__symbol__(Oe),ce="true",ae="false",ke=Zone.__symbol__("");function Ie(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,o,c){return Zone.current.scheduleMacroTask(e,n,i,o,c)}const j=Zone.__symbol__,Pe=typeof window<"u",Te=Pe?window:void 0,Y=Pe&&Te||globalThis,ct="removeAttribute";function Le(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Ie(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,we=!("nw"in Y)&&typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process),Ae=!we&&!Be&&!(!Pe||!Te.HTMLElement),Ue=typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process)&&!Be&&!(!Pe||!Te.HTMLElement),Re={},We=function(e){if(!(e=e||Y.event))return;let n=Re[e.type];n||(n=Re[e.type]=j("ON_PROPERTY"+e.type));const i=this||e.target||Y,o=i[n];let c;return Ae&&i===Te&&"error"===e.type?(c=o&&o.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===c&&e.preventDefault()):(c=o&&o.apply(this,arguments),null!=c&&!c&&e.preventDefault()),c};function qe(e,n,i){let o=ie(e,n);if(!o&&i&&ie(i,n)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const c=j("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete o.writable,delete o.value;const a=o.get,y=o.set,d=n.slice(2);let b=Re[d];b||(b=Re[d]=j("ON_PROPERTY"+d)),o.set=function(v){let p=this;!p&&e===Y&&(p=Y),p&&("function"==typeof p[b]&&p.removeEventListener(d,We),y&&y.call(p,null),p[b]=v,"function"==typeof v&&p.addEventListener(d,We,!1))},o.get=function(){let v=this;if(!v&&e===Y&&(v=Y),!v)return null;const p=v[b];if(p)return p;if(a){let M=a.call(this);if(M)return o.set.call(this,M),"function"==typeof v[ct]&&v.removeAttribute(n),M}return null},Ee(e,n,o),e[c]=!0}function Xe(e,n,i){if(n)for(let o=0;ofunction(y,d){const b=i(y,d);return b.cbIdx>=0&&"function"==typeof d[b.cbIdx]?Me(b.name,d[b.cbIdx],b,c):a.apply(y,d)})}function ue(e,n){e[j("OriginalDelegate")]=n}let ze=!1,je=!1;function ft(){if(ze)return je;ze=!0;try{const e=Te.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(je=!0)}catch{}return je}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const o=Object.getOwnPropertyDescriptor,c=Object.defineProperty,y=i.symbol,d=[],b=!1!==e[y("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],v=y("Promise"),p=y("then"),M="__creationTrace__";i.onUnhandledError=l=>{if(i.showUncaughtError()){const u=l&&l.rejection;u?console.error("Unhandled Promise rejection:",u instanceof Error?u.message:u,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",u,u instanceof Error?u.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;d.length;){const l=d.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(u){N(u)}}};const Z=y("unhandledPromiseRejectionHandler");function N(l){i.onUnhandledError(l);try{const u=n[Z];"function"==typeof u&&u.call(this,l)}catch{}}function B(l){return l&&l.then}function H(l){return l}function J(l){return t.reject(l)}const q=y("state"),R=y("value"),_=y("finally"),K=y("parentPromiseValue"),x=y("parentPromiseState"),X="Promise.then",A=null,E=!0,G=!1,h=0;function I(l,u){return s=>{try{z(l,u,s)}catch(f){z(l,!1,f)}}}const P=function(){let l=!1;return function(s){return function(){l||(l=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",oe=y("currentTaskTrace");function z(l,u,s){const f=P();if(l===s)throw new TypeError(Q);if(l[q]===A){let g=null;try{("object"==typeof s||"function"==typeof s)&&(g=s&&s.then)}catch(w){return f(()=>{z(l,!1,w)})(),l}if(u!==G&&s instanceof t&&s.hasOwnProperty(q)&&s.hasOwnProperty(R)&&s[q]!==A)re(s),z(l,s[q],s[R]);else if(u!==G&&"function"==typeof g)try{g.call(s,f(I(l,u)),f(I(l,!1)))}catch(w){f(()=>{z(l,!1,w)})()}else{l[q]=u;const w=l[R];if(l[R]=s,l[_]===_&&u===E&&(l[q]=l[x],l[R]=l[K]),u===G&&s instanceof Error){const m=n.currentTask&&n.currentTask.data&&n.currentTask.data[M];m&&c(s,oe,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{const D=l[R],S=!!s&&_===s[_];S&&(s[K]=D,s[x]=w);const O=u.run(m,void 0,S&&m!==J&&m!==H?[]:[D]);z(s,!0,O)}catch(D){z(s,!1,D)}},s)}const L=function(){},T=e.AggregateError;class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(u){return z(new this(null),E,u)}static reject(u){return z(new this(null),G,u)}static any(u){if(!u||"function"!=typeof u[Symbol.iterator])return Promise.reject(new T([],"All promises were rejected"));const s=[];let f=0;try{for(let m of u)f++,s.push(t.resolve(m))}catch{return Promise.reject(new T([],"All promises were rejected"))}if(0===f)return Promise.reject(new T([],"All promises were rejected"));let g=!1;const w=[];return new t((m,D)=>{for(let S=0;S{g||(g=!0,m(O))},O=>{w.push(O),f--,0===f&&(g=!0,D(new T(w,"All promises were rejected")))})})}static race(u){let s,f,g=new this((D,S)=>{s=D,f=S});function w(D){s(D)}function m(D){f(D)}for(let D of u)B(D)||(D=this.resolve(D)),D.then(w,m);return g}static all(u){return t.allWithCallback(u)}static allSettled(u){return(this&&this.prototype instanceof t?this:t).allWithCallback(u,{thenCallback:f=>({status:"fulfilled",value:f}),errorCallback:f=>({status:"rejected",reason:f})})}static allWithCallback(u,s){let f,g,w=new this((O,V)=>{f=O,g=V}),m=2,D=0;const S=[];for(let O of u){B(O)||(O=this.resolve(O));const V=D;try{O.then(F=>{S[V]=s?s.thenCallback(F):F,m--,0===m&&f(S)},F=>{s?(S[V]=s.errorCallback(F),m--,0===m&&f(S)):g(F)})}catch(F){g(F)}m++,D++}return m-=2,0===m&&f(S),w}constructor(u){const s=this;if(!(s instanceof t))throw new Error("Must be an instanceof Promise.");s[q]=A,s[R]=[];try{const f=P();u&&u(f(I(s,E)),f(I(s,G)))}catch(f){z(s,!1,f)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(u,s){let f=this.constructor?.[Symbol.species];(!f||"function"!=typeof f)&&(f=this.constructor||t);const g=new f(L),w=n.current;return this[q]==A?this[R].push(w,g,u,s):ee(this,w,g,u,s),g}catch(u){return this.then(null,u)}finally(u){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=t);const f=new s(L);f[_]=_;const g=n.current;return this[q]==A?this[R].push(g,f,u,u):ee(this,g,f,u,u),f}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const r=e[v]=e.Promise;e.Promise=t;const k=y("thenPatched");function C(l){const u=l.prototype,s=o(u,"then");if(s&&(!1===s.writable||!s.configurable))return;const f=u.then;u[p]=f,l.prototype.then=function(g,w){return new t((D,S)=>{f.call(this,D,S)}).then(g,w)},l[k]=!0}return i.patchThen=C,r&&(C(r),le(e,"fetch",l=>function $(l){return function(u,s){let f=l.apply(u,s);if(f instanceof t)return f;let g=f.constructor;return g[k]||C(g),f}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=d,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=j("OriginalDelegate"),o=j("Promise"),c=j("Error"),a=function(){if("function"==typeof this){const v=this[i];if(v)return"function"==typeof v?n.call(v):Object.prototype.toString.call(v);if(this===Promise){const p=e[o];if(p)return n.call(p)}if(this===Error){const p=e[c];if(p)return n.call(p)}}return n.call(this)};a[i]=n,Function.prototype.toString=a;const y=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":y.call(this)}});let ye=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){ye=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{ye=!1}const ht={useG:!0},te={},Ye={},$e=new RegExp("^"+ke+"(\\w+)(true|false)$"),Ke=j("propagationStopped");function Je(e,n){const i=(n?n(e):e)+ae,o=(n?n(e):e)+ce,c=ke+i,a=ke+o;te[e]={},te[e][ae]=c,te[e][ce]=a}function dt(e,n,i,o){const c=o&&o.add||Se,a=o&&o.rm||Oe,y=o&&o.listeners||"eventListeners",d=o&&o.rmAll||"removeAllListeners",b=j(c),v="."+c+":",p="prependListener",M="."+p+":",Z=function(R,_,K){if(R.isRemoved)return;const x=R.callback;let X;"object"==typeof x&&x.handleEvent&&(R.callback=E=>x.handleEvent(E),R.originalDelegate=x);try{R.invoke(R,_,[K])}catch(E){X=E}const A=R.options;return A&&"object"==typeof A&&A.once&&_[a].call(_,K.type,R.originalDelegate?R.originalDelegate:R.callback,A),X};function N(R,_,K){if(!(_=_||e.event))return;const x=R||_.target||e,X=x[te[_.type][K?ce:ae]];if(X){const A=[];if(1===X.length){const E=Z(X[0],x,_);E&&A.push(E)}else{const E=X.slice();for(let G=0;G{throw G})}}}const B=function(R){return N(this,R,!1)},H=function(R){return N(this,R,!0)};function J(R,_){if(!R)return!1;let K=!0;_&&void 0!==_.useG&&(K=_.useG);const x=_&&_.vh;let X=!0;_&&void 0!==_.chkDup&&(X=_.chkDup);let A=!1;_&&void 0!==_.rt&&(A=_.rt);let E=R;for(;E&&!E.hasOwnProperty(c);)E=de(E);if(!E&&R[c]&&(E=R),!E||E[b])return!1;const G=_&&_.eventNameToString,h={},I=E[b]=E[c],P=E[j(a)]=E[a],Q=E[j(y)]=E[y],oe=E[j(d)]=E[d];let z;_&&_.prepend&&(z=E[j(_.prepend)]=E[_.prepend]);const t=K?function(s){if(!h.isExisting)return I.call(h.target,h.eventName,h.capture?H:B,h.options)}:function(s){return I.call(h.target,h.eventName,s.invoke,h.options)},r=K?function(s){if(!s.isRemoved){const f=te[s.eventName];let g;f&&(g=f[s.capture?ce:ae]);const w=g&&s.target[g];if(w)for(let m=0;mfunction(c,a){c[Ke]=!0,o&&o.apply(c,a)})}function Et(e,n,i,o,c){const a=Zone.__symbol__(o);if(n[a])return;const y=n[a]=n[o];n[o]=function(d,b,v){return b&&b.prototype&&c.forEach(function(p){const M=`${i}.${o}::`+p,Z=b.prototype;try{if(Z.hasOwnProperty(p)){const N=e.ObjectGetOwnPropertyDescriptor(Z,p);N&&N.value?(N.value=e.wrapWithCurrentZone(N.value,M),e._redefineProperty(b.prototype,p,N)):Z[p]&&(Z[p]=e.wrapWithCurrentZone(Z[p],M))}else Z[p]&&(Z[p]=e.wrapWithCurrentZone(Z[p],M))}catch{}}),y.call(n,d,b,v)},e.attachOriginToPatched(n[o],y)}function et(e,n,i){if(!i||0===i.length)return n;const o=i.filter(a=>a.target===e);if(!o||0===o.length)return n;const c=o[0].ignoreProperties;return n.filter(a=>-1===c.indexOf(a))}function tt(e,n,i,o){e&&Xe(e,et(e,n,i),o)}function He(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}Zone.__load_patch("util",(e,n,i)=>{const o=He(e);i.patchOnProperties=Xe,i.patchMethod=le,i.bindArguments=Le,i.patchMacroTask=lt;const c=n.__symbol__("BLACK_LISTED_EVENTS"),a=n.__symbol__("UNPATCHED_EVENTS");e[a]&&(e[c]=e[a]),e[c]&&(n[c]=n[a]=e[c]),i.patchEventPrototype=_t,i.patchEventTarget=dt,i.isIEOrEdge=ft,i.ObjectDefineProperty=Ee,i.ObjectGetOwnPropertyDescriptor=ie,i.ObjectCreate=ge,i.ArraySlice=Ve,i.patchClass=ve,i.wrapWithCurrentZone=Ie,i.filterProperties=et,i.attachOriginToPatched=ue,i._redefineProperty=Object.defineProperty,i.patchCallbacks=Et,i.getGlobalObjects=()=>({globalSources:Ye,zoneSymbolEventNames:te,eventNames:o,isBrowser:Ae,isMix:Ue,isNode:we,TRUE_STR:ce,FALSE_STR:ae,ZONE_SYMBOL_PREFIX:ke,ADD_EVENT_LISTENER_STR:Se,REMOVE_EVENT_LISTENER_STR:Oe})});const Ce=j("zoneTask");function pe(e,n,i,o){let c=null,a=null;i+=o;const y={};function d(v){const p=v.data;return p.args[0]=function(){return v.invoke.apply(this,arguments)},p.handleId=c.apply(e,p.args),v}function b(v){return a.call(e,v.data.handleId)}c=le(e,n+=o,v=>function(p,M){if("function"==typeof M[0]){const Z={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?M[1]||0:void 0,args:M},N=M[0];M[0]=function(){try{return N.apply(this,arguments)}finally{Z.isPeriodic||("number"==typeof Z.handleId?delete y[Z.handleId]:Z.handleId&&(Z.handleId[Ce]=null))}};const B=Me(n,M[0],Z,d,b);if(!B)return B;const H=B.data.handleId;return"number"==typeof H?y[H]=B:H&&(H[Ce]=B),H&&H.ref&&H.unref&&"function"==typeof H.ref&&"function"==typeof H.unref&&(B.ref=H.ref.bind(H),B.unref=H.unref.bind(H)),"number"==typeof H||H?H:B}return v.apply(e,M)}),a=le(e,i,v=>function(p,M){const Z=M[0];let N;"number"==typeof Z?N=y[Z]:(N=Z&&Z[Ce],N||(N=Z)),N&&"string"==typeof N.type?"notScheduled"!==N.state&&(N.cancelFn&&N.data.isPeriodic||0===N.runCount)&&("number"==typeof Z?delete y[Z]:Z&&(Z[Ce]=null),N.zone.cancelTask(N)):v.apply(e,M)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("timers",e=>{const n="set",i="clear";pe(e,n,i,"Timeout"),pe(e,n,i,"Interval"),pe(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{pe(e,"request","cancel","AnimationFrame"),pe(e,"mozRequest","mozCancel","AnimationFrame"),pe(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let o=0;ofunction(b,v){return n.current.run(a,e,v,d)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function gt(e,n){n.patchEventPrototype(e,n)})(e,i),function mt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:o,TRUE_STR:c,FALSE_STR:a,ZONE_SYMBOL_PREFIX:y}=n.getGlobalObjects();for(let b=0;b{ve("MutationObserver"),ve("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,n,i)=>{ve("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,n,i)=>{ve("FileReader")}),Zone.__load_patch("on_property",(e,n,i)=>{!function Tt(e,n){if(we&&!Ue||Zone[e.symbol("patchEvents")])return;const i=n.__Zone_ignore_on_properties;let o=[];if(Ae){const c=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const a=function ut(){try{const e=Te.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:c,ignoreProperties:["error"]}]:[];tt(c,He(c),i&&i.concat(a),de(c))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{!function pt(e,n){const{isBrowser:i,isMix:o}=n.getGlobalObjects();(i||o)&&e.customElements&&"customElements"in e&&n.patchCallbacks(n,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,i)}),Zone.__load_patch("XHR",(e,n)=>{!function b(v){const p=v.XMLHttpRequest;if(!p)return;const M=p.prototype;let N=M[Ze],B=M[Ne];if(!N){const h=v.XMLHttpRequestEventTarget;if(h){const I=h.prototype;N=I[Ze],B=I[Ne]}}const H="readystatechange",J="scheduled";function q(h){const I=h.data,P=I.target;P[a]=!1,P[d]=!1;const Q=P[c];N||(N=P[Ze],B=P[Ne]),Q&&B.call(P,H,Q);const oe=P[c]=()=>{if(P.readyState===P.DONE)if(!I.aborted&&P[a]&&h.state===J){const U=P[n.__symbol__("loadfalse")];if(0!==P.status&&U&&U.length>0){const re=h.invoke;h.invoke=function(){const ee=P[n.__symbol__("loadfalse")];for(let W=0;Wfunction(h,I){return h[o]=0==I[2],h[y]=I[1],K.apply(h,I)}),X=j("fetchTaskAborting"),A=j("fetchTaskScheduling"),E=le(M,"send",()=>function(h,I){if(!0===n.current[A]||h[o])return E.apply(h,I);{const P={target:h,url:h[y],isPeriodic:!1,args:I,aborted:!1},Q=Me("XMLHttpRequest.send",R,P,q,_);h&&!0===h[d]&&!P.aborted&&Q.state===J&&Q.invoke()}}),G=le(M,"abort",()=>function(h,I){const P=function Z(h){return h[i]}(h);if(P&&"string"==typeof P.type){if(null==P.cancelFn||P.data&&P.data.aborted)return;P.zone.cancelTask(P)}else if(!0===n.current[X])return G.apply(h,I)})}(e);const i=j("xhrTask"),o=j("xhrSync"),c=j("xhrListener"),a=j("xhrScheduled"),y=j("xhrURL"),d=j("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function at(e,n){const i=e.constructor.name;for(let o=0;o{const b=function(){return d.apply(this,Le(arguments,i+"."+c))};return ue(b,d),b})(a)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(o){return function(c){Qe(e,o).forEach(y=>{const d=e.PromiseRejectionEvent;if(d){const b=new d(o,{promise:c.promise,reason:c.rejection});y.invoke(b)}})}}e.PromiseRejectionEvent&&(n[j("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[j("rejectionHandledHandler")]=i("rejectionhandled"))}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{!function yt(e,n){n.patchMethod(e,"queueMicrotask",i=>function(o,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}(e,i)})}},ie=>{ie(ie.s=633)}]); \ No newline at end of file diff --git a/runtime.720eaefa32ae5081.js b/runtime.720eaefa32ae5081.js new file mode 100644 index 0000000..4f22b35 --- /dev/null +++ b/runtime.720eaefa32ae5081.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,h={},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return h[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=h,e=[],a.O=(n,r,c,t)=>{if(!r){var o=1/0;for(f=0;f=t)&&Object.keys(a.O).every(_=>a.O[_](r[l]))?r.splice(l--,1):(u=!1,t0&&e[f-1][2]>t;f--)e[f]=e[f-1];e[f]=[r,c,t]},a.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return a.d(n,{a:n}),n},a.d=(e,n)=>{for(var r in n)a.o(n,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={666:0};a.O.j=c=>0===e[c];var n=(c,t)=>{var l,s,[f,o,u]=t,v=0;if(f.some(d=>0!==e[d])){for(l in o)a.o(o,l)&&(a.m[l]=o[l]);if(u)var p=u(a)}for(c&&c(t);v.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:#0000000d}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:#000000bf;text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:#0000000d}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-ctrl-geocoder,.mapboxgl-ctrl-geocoder *,.mapboxgl-ctrl-geocoder *:after,.mapboxgl-ctrl-geocoder *:before{box-sizing:border-box}.mapboxgl-ctrl-geocoder{font-size:18px;line-height:24px;font-family:Open Sans,-apple-system,BlinkMacSystemFont,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;width:100%;min-width:240px;z-index:1;border-radius:4px;transition:width .25s,min-width .25s}.mapboxgl-ctrl-geocoder--input{font:inherit;width:100%;border:0;background-color:transparent;margin:0;height:50px;color:#404040;color:#000000bf;padding:6px 45px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mapboxgl-ctrl-geocoder--input::-ms-clear{display:none}.mapboxgl-ctrl-geocoder--input:focus{color:#404040;color:#000000bf;outline:0;box-shadow:none;outline:thin dotted}.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--pin-right>*{z-index:2;position:absolute;right:8px;top:7px;display:none}.mapboxgl-ctrl-geocoder,.mapboxgl-ctrl-geocoder .suggestions{box-shadow:0 0 10px 2px #0000001a}.mapboxgl-ctrl-geocoder.mapboxgl-ctrl-geocoder--collapsed{width:50px;min-width:50px;transition:width .25s,min-width .25s}.mapboxgl-ctrl-geocoder .suggestions{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:110%;top:calc(100% + 6px);z-index:1000;overflow:hidden;font-size:15px}.mapboxgl-ctrl-bottom-left .suggestions,.mapboxgl-ctrl-bottom-right .suggestions{top:auto;bottom:100%}.mapboxgl-ctrl-geocoder .suggestions>li>a{cursor:default;display:block;padding:6px 12px;color:#404040}.mapboxgl-ctrl-geocoder .suggestions>.active>a,.mapboxgl-ctrl-geocoder .suggestions>li>a:hover{color:#404040;background-color:#f3f3f3;text-decoration:none;cursor:pointer}.mapboxgl-ctrl-geocoder--suggestion-title{font-weight:700}.mapboxgl-ctrl-geocoder--suggestion-title,.mapboxgl-ctrl-geocoder--suggestion-address{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mapboxgl-ctrl-geocoder--icon{display:inline-block;vertical-align:middle;speak:none;fill:#757575;top:15px}.mapboxgl-ctrl-geocoder--icon-search{position:absolute;top:13px;left:12px;width:23px;height:23px}.mapboxgl-ctrl-geocoder--button{padding:0;margin:0;border:none;cursor:pointer;background:#fff;line-height:1}.mapboxgl-ctrl-geocoder--icon-close{width:20px;height:20px;margin-top:8px;margin-right:3px}.mapboxgl-ctrl-geocoder--button:hover .mapboxgl-ctrl-geocoder--icon-close{fill:#909090}.mapboxgl-ctrl-geocoder--icon-geolocate{width:22px;height:22px;margin-top:6px;margin-right:3px}.mapboxgl-ctrl-geocoder--icon-loading{width:26px;height:26px;margin-top:5px;margin-right:0;animation:rotate .8s infinite cubic-bezier(.45,.05,.55,.95)}.mapboxgl-ctrl-geocoder--powered-by{display:block;float:left;padding:6px 12px 9px;font-size:13px}.mapboxgl-ctrl-geocoder--powered-by a{color:#909090}.mapboxgl-ctrl-geocoder--powered-by a:not(:hover){text-decoration:none}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media screen and (min-width: 640px){.mapboxgl-ctrl-geocoder.mapboxgl-ctrl-geocoder--collapsed{width:36px;min-width:36px}.mapboxgl-ctrl-geocoder{width:33.3333%;font-size:15px;line-height:20px;max-width:360px}.mapboxgl-ctrl-geocoder .suggestions{font-size:13px}.mapboxgl-ctrl-geocoder--icon{top:8px}.mapboxgl-ctrl-geocoder--icon-close{width:16px;height:16px;margin-top:3px;margin-right:0}.mapboxgl-ctrl-geocoder--icon-geolocate{width:18px;height:18px;margin-top:2px;margin-right:0}.mapboxgl-ctrl-geocoder--icon-search{left:7px;width:20px;height:20px}.mapboxgl-ctrl-geocoder--input{height:36px;padding:6px 35px}.mapboxgl-ctrl-geocoder--icon-loading{width:26px;height:26px;margin-top:-2px;margin-right:-5px}.mapbox-gl-geocoder--error{color:#909090;padding:6px 12px;font-size:16px;text-align:center}.mapboxgl-ctrl-geocoder--powered-by{font-size:11px!important}}html,body{direction:ltr;margin:0;padding:0;font-size:18px;height:100%;overflow:hidden}*{box-sizing:border-box}*:focus{outline:none}@font-face{font-family:Manrope;font-style:normal;font-weight:300 800;font-display:swap;src:url(manrope.c6b629537b59ade1.ttf) format("opentype")}.mapboxgl-ctrl-logo{opacity:.65;pointer-events:none}.mapboxgl-ctrl-bottom-right{z-index:0;bottom:16px!important}