@oiz/stzh-components 4.9.0-beta2 → 4.9.0-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-ZDnQuJKJ.js → index-B4CkE4NR.js} +3 -3
- package/dist/cjs/{index-ZDnQuJKJ.js.map → index-B4CkE4NR.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stzh-accordion_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-actions_6.cjs.entry.js +1 -1
- package/dist/cjs/stzh-actionset.cjs.entry.js +1 -1
- package/dist/cjs/stzh-amount.cjs.entry.js +1 -1
- package/dist/cjs/stzh-anchornav.cjs.entry.js +1 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js +1 -1
- package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
- package/dist/cjs/stzh-archivelist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-banner.cjs.entry.js +1 -1
- package/dist/cjs/stzh-bathstatus-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-bathstatus-list.cjs.entry.js +1 -1
- package/dist/cjs/stzh-breadcrumb_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-buttongroup.cjs.entry.js +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-navigation.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-searchresult.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card-superteaser.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cardlist_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-carousel.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chart.cjs.entry.js +1 -1
- package/dist/cjs/stzh-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +2 -2
- package/dist/cjs/stzh-chip.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chipgroup.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chipselect.cjs.entry.js +2 -2
- package/dist/cjs/stzh-clamp.cjs.entry.js +1 -1
- package/dist/cjs/stzh-company-logo.cjs.entry.js +1 -1
- package/dist/cjs/stzh-components.cjs.js +1 -1
- package/dist/cjs/stzh-contact-cv.cjs.entry.js +1 -1
- package/dist/cjs/stzh-contact.cjs.entry.js +1 -1
- package/dist/cjs/stzh-content.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datalist_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +2 -2
- package/dist/cjs/stzh-daterange.cjs.entry.js +1 -1
- package/dist/cjs/stzh-details.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js +1 -1
- package/dist/cjs/stzh-disturber.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/stzh-editor.cjs.entry.js +1 -1
- package/dist/cjs/stzh-eventdata.cjs.entry.js +1 -1
- package/dist/cjs/stzh-eventinfo.cjs.entry.js +1 -1
- package/dist/cjs/stzh-feedreader-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-feedreader.cjs.entry.js +1 -1
- package/dist/cjs/stzh-figure.cjs.entry.js +1 -1
- package/dist/cjs/stzh-flyingfocus.cjs.entry.js +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js +1 -1
- package/dist/cjs/stzh-gallery.cjs.entry.js +1 -1
- package/dist/cjs/stzh-geo-ref-data.cjs.entry.js +1 -1
- package/dist/cjs/stzh-ghettobox_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-header_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
- package/dist/cjs/stzh-homepage-search.cjs.entry.js +1 -1
- package/dist/cjs/stzh-homepage-service-highlights.cjs.entry.js +1 -1
- package/dist/cjs/stzh-hr.cjs.entry.js +1 -1
- package/dist/cjs/stzh-hspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-http-error.cjs.entry.js +1 -1
- package/dist/cjs/stzh-iframe.cjs.entry.js +1 -1
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js +1 -1
- package/dist/cjs/{stzh-input-description-CGaPpBjl.js → stzh-input-description-5cckM0rY.js} +3 -3
- package/dist/cjs/{stzh-input-description-CGaPpBjl.js.map → stzh-input-description-5cckM0rY.js.map} +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +2 -2
- package/dist/cjs/stzh-invert.cjs.entry.js +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +1 -1
- package/dist/cjs/stzh-linklist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-list_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-loader_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-loadingbar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-message.cjs.entry.js +1 -1
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-monthyearpicker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-offline-indicator.cjs.entry.js +1 -1
- package/dist/cjs/stzh-page-skiplinks.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagecontent.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle-home.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagetitle.cjs.entry.js +1 -1
- package/dist/cjs/stzh-panorama.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-content-navigation.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-menu.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-pagetitle.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-quote.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-teaser-layout-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-teaser-layout.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pi-teaser.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pkzh-qr.cjs.entry.js +1 -1
- package/dist/cjs/stzh-poicard.cjs.entry.js +1 -1
- package/dist/cjs/stzh-poilist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-popover.cjs.entry.js +1 -1
- package/dist/cjs/stzh-print_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-quote.cjs.entry.js +1 -1
- package/dist/cjs/stzh-rating.cjs.entry.js +2 -2
- package/dist/cjs/stzh-ratio.cjs.entry.js +1 -1
- package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-saptcha.cjs.entry.js +1 -1
- package/dist/cjs/stzh-scrollup.cjs.entry.js +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sitemap.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-storybook-preview.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skiplink.cjs.entry.js +1 -1
- package/dist/cjs/stzh-socialmediastream-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-socialmediastream.cjs.entry.js +1 -1
- package/dist/cjs/stzh-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-stepper.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sticky-actions.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
- package/dist/cjs/stzh-table.cjs.entry.js +1 -1
- package/dist/cjs/stzh-text.cjs.entry.js +1 -1
- package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
- package/dist/cjs/stzh-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-timeline.cjs.entry.js +1 -1
- package/dist/cjs/stzh-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toast_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toggle.cjs.entry.js +2 -2
- package/dist/cjs/stzh-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/stzh-twocolumns.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +2 -2
- package/dist/cjs/stzh-vbz-carousel.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-connection-finder.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-intro.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-visuallyhidden.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-youtube.cjs.entry.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/{p-Bt0qFgc0.js → p--fLq8aoA.js} +3 -3
- package/dist/components/{p-Bt0qFgc0.js.map → p--fLq8aoA.js.map} +1 -1
- package/dist/components/{p-CZ9COAW6.js → p-02MiVwEL.js} +9 -9
- package/dist/components/{p-CZ9COAW6.js.map → p-02MiVwEL.js.map} +1 -1
- package/dist/components/{p-7uUMNca0.js → p-B06iivO6.js} +8 -8
- package/dist/components/{p-7uUMNca0.js.map → p-B06iivO6.js.map} +1 -1
- package/dist/components/{p-CrOCg7cY.js → p-B1xdvkSy.js} +3 -3
- package/dist/components/{p-CrOCg7cY.js.map → p-B1xdvkSy.js.map} +1 -1
- package/dist/components/{p-IMP7pC7p.js → p-B6zrbO8N.js} +3 -3
- package/dist/components/{p-IMP7pC7p.js.map → p-B6zrbO8N.js.map} +1 -1
- package/dist/components/{p-BU4OH8Cm.js → p-B8VeEjIy.js} +3 -3
- package/dist/components/{p-BU4OH8Cm.js.map → p-B8VeEjIy.js.map} +1 -1
- package/dist/components/{p-CgEDyVYF.js → p-B8oKMYV6.js} +6 -6
- package/dist/components/{p-CgEDyVYF.js.map → p-B8oKMYV6.js.map} +1 -1
- package/dist/components/{p-Bu43XylS.js → p-BAyjpcR6.js} +11 -11
- package/dist/components/{p-Bu43XylS.js.map → p-BAyjpcR6.js.map} +1 -1
- package/dist/components/{p-CSdJ0c_y.js → p-BCH90Ynw.js} +3 -3
- package/dist/components/{p-CSdJ0c_y.js.map → p-BCH90Ynw.js.map} +1 -1
- package/dist/components/{p-DLNSei6L.js → p-BD-4HK9u.js} +6 -6
- package/dist/components/{p-DLNSei6L.js.map → p-BD-4HK9u.js.map} +1 -1
- package/dist/components/{p-BiHSbtfS.js → p-BDRf5Lg2.js} +6 -6
- package/dist/components/{p-BiHSbtfS.js.map → p-BDRf5Lg2.js.map} +1 -1
- package/dist/components/{p-BRUI-vLQ.js → p-BDne2rQr.js} +3 -3
- package/dist/components/{p-BRUI-vLQ.js.map → p-BDne2rQr.js.map} +1 -1
- package/dist/components/{p-BmUD2Rtq.js → p-BEYOjCSk.js} +7 -7
- package/dist/components/{p-BmUD2Rtq.js.map → p-BEYOjCSk.js.map} +1 -1
- package/dist/components/{p-B8Wx8Azy.js → p-BEe9X8y9.js} +9 -9
- package/dist/components/{p-B8Wx8Azy.js.map → p-BEe9X8y9.js.map} +1 -1
- package/dist/components/{p-BQMsQk8o.js → p-BIFNWpLw.js} +4 -4
- package/dist/components/{p-BQMsQk8o.js.map → p-BIFNWpLw.js.map} +1 -1
- package/dist/components/{p-CVGsVbS2.js → p-BK7VtwAc.js} +5 -5
- package/dist/components/{p-CVGsVbS2.js.map → p-BK7VtwAc.js.map} +1 -1
- package/dist/components/{p-UxkgJCcT.js → p-BLKRUf__.js} +4 -4
- package/dist/components/{p-UxkgJCcT.js.map → p-BLKRUf__.js.map} +1 -1
- package/dist/components/{p-C6jXw99A.js → p-BVrrMSYA.js} +5 -5
- package/dist/components/{p-C6jXw99A.js.map → p-BVrrMSYA.js.map} +1 -1
- package/dist/components/{p-ZGKugKIn.js → p-BXtqxo59.js} +7 -7
- package/dist/components/{p-ZGKugKIn.js.map → p-BXtqxo59.js.map} +1 -1
- package/dist/components/{p-BoY1qD-1.js → p-BZ5HPz2O.js} +4 -4
- package/dist/components/{p-BoY1qD-1.js.map → p-BZ5HPz2O.js.map} +1 -1
- package/dist/components/{p-BDEju9Yt.js → p-B_rGPnvJ.js} +6 -6
- package/dist/components/{p-BDEju9Yt.js.map → p-B_rGPnvJ.js.map} +1 -1
- package/dist/components/{p-Cz-ha88J.js → p-BaC_gScF.js} +3 -3
- package/dist/components/{p-Cz-ha88J.js.map → p-BaC_gScF.js.map} +1 -1
- package/dist/components/{p-CBzSNCOV.js → p-BejcVdkT.js} +8 -8
- package/dist/components/{p-CBzSNCOV.js.map → p-BejcVdkT.js.map} +1 -1
- package/dist/components/{p-CPlP1yak.js → p-BhSKuf6B.js} +4 -4
- package/dist/components/{p-CPlP1yak.js.map → p-BhSKuf6B.js.map} +1 -1
- package/dist/components/{p-DCVNNXGS.js → p-BhjRs2Yk.js} +3 -3
- package/dist/components/{p-DCVNNXGS.js.map → p-BhjRs2Yk.js.map} +1 -1
- package/dist/components/{p-wQt2FhiW.js → p-BwACjusV.js} +4 -4
- package/dist/components/{p-wQt2FhiW.js.map → p-BwACjusV.js.map} +1 -1
- package/dist/components/{p-BaT57zfB.js → p-BwM7stPL.js} +3 -3
- package/dist/components/{p-BaT57zfB.js.map → p-BwM7stPL.js.map} +1 -1
- package/dist/components/{p-BN-54ren.js → p-BxhXhWgp.js} +3 -3
- package/dist/components/{p-BN-54ren.js.map → p-BxhXhWgp.js.map} +1 -1
- package/dist/components/{p-DIv8fnep.js → p-C5idaYXk.js} +11 -11
- package/dist/components/{p-DIv8fnep.js.map → p-C5idaYXk.js.map} +1 -1
- package/dist/components/{p-Dh_U3nwg.js → p-CC83WXAh.js} +3 -3
- package/dist/components/{p-Dh_U3nwg.js.map → p-CC83WXAh.js.map} +1 -1
- package/dist/components/{p-DnmPakAT.js → p-CEtAPJ_k.js} +3 -3
- package/dist/components/{p-DnmPakAT.js.map → p-CEtAPJ_k.js.map} +1 -1
- package/dist/components/{p-DM5rcQ-w.js → p-CJwxLPbQ.js} +3 -3
- package/dist/components/{p-DM5rcQ-w.js.map → p-CJwxLPbQ.js.map} +1 -1
- package/dist/components/{p-UQ9WK7Rh.js → p-COAWSn9b.js} +11 -11
- package/dist/components/{p-UQ9WK7Rh.js.map → p-COAWSn9b.js.map} +1 -1
- package/dist/components/{p-Crh1tumf.js → p-C_qr3ErC.js} +3 -3
- package/dist/components/{p-Crh1tumf.js.map → p-C_qr3ErC.js.map} +1 -1
- package/dist/components/{p-CQY455PH.js → p-CnKiFOEe.js} +3 -3
- package/dist/components/{p-CQY455PH.js.map → p-CnKiFOEe.js.map} +1 -1
- package/dist/components/{p-Ut4hhOsi.js → p-CybYAebO.js} +3 -3
- package/dist/components/{p-Ut4hhOsi.js.map → p-CybYAebO.js.map} +1 -1
- package/dist/components/{p-NdWtZ3BI.js → p-CzLvZS-p.js} +3 -3
- package/dist/components/{p-NdWtZ3BI.js.map → p-CzLvZS-p.js.map} +1 -1
- package/dist/components/{p-CpC8d13f.js → p-D1U50W0f.js} +4 -4
- package/dist/components/{p-CpC8d13f.js.map → p-D1U50W0f.js.map} +1 -1
- package/dist/components/{p-CViAWrjM.js → p-D471mdkF.js} +6 -6
- package/dist/components/{p-CViAWrjM.js.map → p-D471mdkF.js.map} +1 -1
- package/dist/components/{p-C720-Qcv.js → p-D71JIHdD.js} +6 -6
- package/dist/components/{p-C720-Qcv.js.map → p-D71JIHdD.js.map} +1 -1
- package/dist/components/{p-D3atNlwG.js → p-DC-bkkG9.js} +6 -6
- package/dist/components/{p-D3atNlwG.js.map → p-DC-bkkG9.js.map} +1 -1
- package/dist/components/{p-tNg83_1b.js → p-DEFPf8mR.js} +7 -7
- package/dist/components/{p-tNg83_1b.js.map → p-DEFPf8mR.js.map} +1 -1
- package/dist/components/{p-BMKAa5cH.js → p-DEZhHL-h.js} +3 -3
- package/dist/components/{p-BMKAa5cH.js.map → p-DEZhHL-h.js.map} +1 -1
- package/dist/components/{p-B9BPpRCW.js → p-DKnZ6VRK.js} +3 -3
- package/dist/components/{p-B9BPpRCW.js.map → p-DKnZ6VRK.js.map} +1 -1
- package/dist/components/{p-7HhYf4z_.js → p-DLcXTxK2.js} +5 -5
- package/dist/components/{p-7HhYf4z_.js.map → p-DLcXTxK2.js.map} +1 -1
- package/dist/components/{p-DAQn1MfT.js → p-DNreIG1a.js} +7 -7
- package/dist/components/{p-DAQn1MfT.js.map → p-DNreIG1a.js.map} +1 -1
- package/dist/components/{p-BRbEuDtS.js → p-DRWnsFU7.js} +5 -5
- package/dist/components/{p-BRbEuDtS.js.map → p-DRWnsFU7.js.map} +1 -1
- package/dist/components/{p-Cz6mFejk.js → p-DU4Z1c1a.js} +7 -7
- package/dist/components/{p-Cz6mFejk.js.map → p-DU4Z1c1a.js.map} +1 -1
- package/dist/components/{p-BTwmO0VT.js → p-DVK5Vk4K.js} +7 -7
- package/dist/components/{p-BTwmO0VT.js.map → p-DVK5Vk4K.js.map} +1 -1
- package/dist/components/{p-zyIpkMEg.js → p-DWBepkU5.js} +12 -12
- package/dist/components/{p-zyIpkMEg.js.map → p-DWBepkU5.js.map} +1 -1
- package/dist/components/{p-DU--O-Ux.js → p-DWz6E51A.js} +3 -3
- package/dist/components/{p-DU--O-Ux.js.map → p-DWz6E51A.js.map} +1 -1
- package/dist/components/{p-Dh7_Sdlv.js → p-DaP2plZo.js} +9 -9
- package/dist/components/{p-Dh7_Sdlv.js.map → p-DaP2plZo.js.map} +1 -1
- package/dist/components/{p-CYfVlAWz.js → p-DapxeV-_.js} +3 -3
- package/dist/components/{p-CYfVlAWz.js.map → p-DapxeV-_.js.map} +1 -1
- package/dist/components/{p-C-L1Esh9.js → p-DiYE0hmx.js} +7 -7
- package/dist/components/{p-C-L1Esh9.js.map → p-DiYE0hmx.js.map} +1 -1
- package/dist/components/{p-CyqeVaHe.js → p-DnM6bnNn.js} +3 -3
- package/dist/components/{p-CyqeVaHe.js.map → p-DnM6bnNn.js.map} +1 -1
- package/dist/components/{p-Dq2SboPL.js → p-DqoLZtQH.js} +3 -3
- package/dist/components/{p-Dq2SboPL.js.map → p-DqoLZtQH.js.map} +1 -1
- package/dist/components/{p-3U-NdhlS.js → p-DsRthiVA.js} +3 -3
- package/dist/components/{p-3U-NdhlS.js.map → p-DsRthiVA.js.map} +1 -1
- package/dist/components/{p-C3DzudRE.js → p-DuR7XqVN.js} +3 -3
- package/dist/components/{p-C3DzudRE.js.map → p-DuR7XqVN.js.map} +1 -1
- package/dist/components/{p-BEpu-eX2.js → p-DxS-Wcb5.js} +3 -3
- package/dist/components/{p-BEpu-eX2.js.map → p-DxS-Wcb5.js.map} +1 -1
- package/dist/components/{p-Cg5cOcyj.js → p-KK5mdmv5.js} +10 -10
- package/dist/components/{p-Cg5cOcyj.js.map → p-KK5mdmv5.js.map} +1 -1
- package/dist/components/{p-CNMtTiHH.js → p-LF71A9MU.js} +11 -11
- package/dist/components/{p-CNMtTiHH.js.map → p-LF71A9MU.js.map} +1 -1
- package/dist/components/{p-DTDpjDcx.js → p-O_cxMCXX.js} +3 -3
- package/dist/components/{p-DTDpjDcx.js.map → p-O_cxMCXX.js.map} +1 -1
- package/dist/components/{p-CP2-kI_R.js → p-RLF8-AhP.js} +7 -7
- package/dist/components/{p-CP2-kI_R.js.map → p-RLF8-AhP.js.map} +1 -1
- package/dist/components/{p-iO0Ga3pa.js → p-StWtWw5n.js} +3 -3
- package/dist/components/{p-iO0Ga3pa.js.map → p-StWtWw5n.js.map} +1 -1
- package/dist/components/{p-DyTuVM4Q.js → p-VVrfLzf4.js} +3 -3
- package/dist/components/{p-DyTuVM4Q.js.map → p-VVrfLzf4.js.map} +1 -1
- package/dist/components/{p-C1ciJM24.js → p-d1xd9jdc.js} +4 -4
- package/dist/components/{p-C1ciJM24.js.map → p-d1xd9jdc.js.map} +1 -1
- package/dist/components/{p-BtU8igAM.js → p-ka1rmhv9.js} +5 -5
- package/dist/components/{p-BtU8igAM.js.map → p-ka1rmhv9.js.map} +1 -1
- package/dist/components/{p-UI7DWEQU.js → p-osf80Swh.js} +6 -6
- package/dist/components/{p-UI7DWEQU.js.map → p-osf80Swh.js.map} +1 -1
- package/dist/components/{p-DAS4ghWk.js → p-ptAFQZzh.js} +3 -3
- package/dist/components/{p-DAS4ghWk.js.map → p-ptAFQZzh.js.map} +1 -1
- package/dist/components/{p-BbKUQwKe.js → p-qOxda2J5.js} +10 -10
- package/dist/components/{p-BbKUQwKe.js.map → p-qOxda2J5.js.map} +1 -1
- package/dist/components/{p-BQziPN_6.js → p-q_1KOJaD.js} +4 -4
- package/dist/components/{p-BQziPN_6.js.map → p-q_1KOJaD.js.map} +1 -1
- package/dist/components/{p-bZ2GVa1M.js → p-tt1oL7GC.js} +10 -10
- package/dist/components/{p-bZ2GVa1M.js.map → p-tt1oL7GC.js.map} +1 -1
- package/dist/components/stzh-accordion-item.js +1 -1
- package/dist/components/stzh-accordion.js +1 -1
- package/dist/components/stzh-actions.js +1 -1
- package/dist/components/stzh-actionset.js +1 -1
- package/dist/components/stzh-amount.js +9 -9
- package/dist/components/stzh-anchornav.js +5 -5
- package/dist/components/stzh-app-nav.js +1 -1
- package/dist/components/stzh-appointments.js +13 -13
- package/dist/components/stzh-archivelist.js +7 -7
- package/dist/components/stzh-audio.js +5 -5
- package/dist/components/stzh-badge.js +1 -1
- package/dist/components/stzh-banner.js +4 -4
- package/dist/components/stzh-bathstatus-item.js +1 -1
- package/dist/components/stzh-bathstatus-list.js +7 -7
- package/dist/components/stzh-breadcrumb.js +1 -1
- package/dist/components/stzh-button.js +1 -1
- package/dist/components/stzh-buttongroup.js +1 -1
- package/dist/components/stzh-calendar.js +1 -1
- package/dist/components/stzh-card-navigation.js +2 -2
- package/dist/components/stzh-card-searchresult.js +14 -14
- package/dist/components/stzh-card-superteaser.js +14 -14
- package/dist/components/stzh-card.js +1 -1
- package/dist/components/stzh-cardlist.js +1 -1
- package/dist/components/stzh-carousel.js +1 -1
- package/dist/components/stzh-cell.js +1 -1
- package/dist/components/stzh-chart.js +1 -1
- package/dist/components/stzh-checkbox.js +1 -1
- package/dist/components/stzh-checkboxgroup.js +5 -5
- package/dist/components/stzh-chip.js +1 -1
- package/dist/components/stzh-chipgroup.js +1 -1
- package/dist/components/stzh-chipselect.js +1 -1
- package/dist/components/stzh-clamp.js +1 -1
- package/dist/components/stzh-company-logo.js +1 -1
- package/dist/components/stzh-contact-cv.js +4 -4
- package/dist/components/stzh-contact.js +10 -10
- package/dist/components/stzh-container.js +1 -1
- package/dist/components/stzh-content.js +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cta.js +3 -3
- package/dist/components/stzh-datalist-item.js +1 -1
- package/dist/components/stzh-datalist.js +1 -1
- package/dist/components/stzh-datamessagelist-item.js +11 -11
- package/dist/components/stzh-datamessagelist.js +1 -1
- package/dist/components/stzh-datatable.js +17 -17
- package/dist/components/stzh-datepicker.js +1 -1
- package/dist/components/stzh-daterange.js +4 -4
- package/dist/components/stzh-details.js +1 -1
- package/dist/components/stzh-dialog.js +1 -1
- package/dist/components/stzh-disturber.js +4 -4
- package/dist/components/stzh-dropdown.js +1 -1
- package/dist/components/stzh-editor.js +4 -4
- package/dist/components/stzh-eventdata.js +1 -1
- package/dist/components/stzh-eventinfo.js +5 -5
- package/dist/components/stzh-feedreader-item.js +2 -2
- package/dist/components/stzh-feedreader.js +8 -8
- package/dist/components/stzh-fieldset.js +1 -1
- package/dist/components/stzh-figure.js +1 -1
- package/dist/components/stzh-flyingfocus.js +1 -1
- package/dist/components/stzh-footer.js +4 -4
- package/dist/components/stzh-gallery.js +8 -8
- package/dist/components/stzh-geo-ref-data.js +23 -23
- package/dist/components/stzh-ghettobox.js +1 -1
- package/dist/components/stzh-header.js +1 -1
- package/dist/components/stzh-heading.js +1 -1
- package/dist/components/stzh-homepage-search.js +2 -2
- package/dist/components/stzh-homepage-service-highlights.js +6 -6
- package/dist/components/stzh-hr.js +1 -1
- package/dist/components/stzh-hspace.js +1 -1
- package/dist/components/stzh-http-error.js +7 -7
- package/dist/components/stzh-icon.js +1 -1
- package/dist/components/stzh-iframe.js +1 -1
- package/dist/components/stzh-imagecomparison.js +2 -2
- package/dist/components/stzh-input.js +1 -1
- package/dist/components/stzh-invert.js +1 -1
- package/dist/components/stzh-link.js +1 -1
- package/dist/components/stzh-linklist.js +10 -10
- package/dist/components/stzh-list-item.js +1 -1
- package/dist/components/stzh-list.js +1 -1
- package/dist/components/stzh-loader.js +1 -1
- package/dist/components/stzh-loadingbar.js +1 -1
- package/dist/components/stzh-menu-item.js +1 -1
- package/dist/components/stzh-menu.js +1 -1
- package/dist/components/stzh-message.js +1 -1
- package/dist/components/stzh-microsite-teaserlist.js +19 -19
- package/dist/components/stzh-monthyearpicker.js +5 -5
- package/dist/components/stzh-offline-indicator.js +6 -6
- package/dist/components/stzh-olmap.js +1 -1
- package/dist/components/stzh-overlay.js +1 -1
- package/dist/components/stzh-page-skiplinks.js +1 -1
- package/dist/components/stzh-pagebottom.js +8 -8
- package/dist/components/stzh-pagecontent.js +1 -1
- package/dist/components/stzh-pagetitle-hero.js +1 -1
- package/dist/components/stzh-pagetitle-home.js +2 -2
- package/dist/components/stzh-pagetitle.js +2 -2
- package/dist/components/stzh-pagination.js +1 -1
- package/dist/components/stzh-panorama.js +11 -11
- package/dist/components/stzh-pi-content-navigation.js +3 -3
- package/dist/components/stzh-pi-menu.js +3 -3
- package/dist/components/stzh-pi-pagetitle.js +2 -2
- package/dist/components/stzh-pi-quote.js +1 -1
- package/dist/components/stzh-pi-teaser-layout-item.js +1 -1
- package/dist/components/stzh-pi-teaser-layout.js +2 -2
- package/dist/components/stzh-pi-teaser.js +2 -2
- package/dist/components/stzh-pkzh-qr.js +20 -20
- package/dist/components/stzh-poicard.js +1 -1
- package/dist/components/stzh-poilist.js +18 -18
- package/dist/components/stzh-popover.js +1 -1
- package/dist/components/stzh-print.js +1 -1
- package/dist/components/stzh-quote.js +1 -1
- package/dist/components/stzh-radio.js +1 -1
- package/dist/components/stzh-radiogroup.js +1 -1
- package/dist/components/stzh-rating.js +5 -5
- package/dist/components/stzh-ratio.js +1 -1
- package/dist/components/stzh-readspeaker.js +4 -4
- package/dist/components/stzh-richtext.js +1 -1
- package/dist/components/stzh-row.js +1 -1
- package/dist/components/stzh-saptcha.js +7 -7
- package/dist/components/stzh-scrollup.js +1 -1
- package/dist/components/stzh-search.js +16 -16
- package/dist/components/stzh-section.js +1 -1
- package/dist/components/stzh-share.js +1 -1
- package/dist/components/stzh-show.js +1 -1
- package/dist/components/stzh-sitemap.js +9 -9
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-storybook-preview.js +1 -1
- package/dist/components/stzh-skiplink.js +1 -1
- package/dist/components/stzh-socialmediastream-item.js +1 -1
- package/dist/components/stzh-socialmediastream.js +6 -6
- package/dist/components/stzh-sortable.js +1 -1
- package/dist/components/stzh-space.js +1 -1
- package/dist/components/stzh-status.js +1 -1
- package/dist/components/stzh-stepper-item.js +1 -1
- package/dist/components/stzh-stepper.js +3 -3
- package/dist/components/stzh-sticky-actions.js +2 -2
- package/dist/components/stzh-sticky.js +1 -1
- package/dist/components/stzh-table.js +1 -1
- package/dist/components/stzh-tag.js +1 -1
- package/dist/components/stzh-text.js +1 -1
- package/dist/components/stzh-textandimage.js +1 -1
- package/dist/components/stzh-timeline-item.js +3 -3
- package/dist/components/stzh-timeline.js +1 -1
- package/dist/components/stzh-timepicker.js +5 -5
- package/dist/components/stzh-toast.js +1 -1
- package/dist/components/stzh-toastbar.js +1 -1
- package/dist/components/stzh-toggle.js +5 -5
- package/dist/components/stzh-tooltip.js +1 -1
- package/dist/components/stzh-twocolumns.js +1 -1
- package/dist/components/stzh-upload.js +13 -13
- package/dist/components/stzh-vbz-carousel.js +2 -2
- package/dist/components/stzh-vbz-connection-finder.js +1 -1
- package/dist/components/stzh-vbz-intro.js +5 -5
- package/dist/components/stzh-vbz-linechip.js +1 -1
- package/dist/components/stzh-vbz-majorticker.js +7 -7
- package/dist/components/stzh-vbz-ticker.js +7 -7
- package/dist/components/stzh-visuallyhidden.js +1 -1
- package/dist/components/stzh-vspace.js +1 -1
- package/dist/components/stzh-youtube.js +6 -6
- package/dist/esm/{index-DesQCrfi.js → index-BThcQvAs.js} +3 -3
- package/dist/esm/{index-DesQCrfi.js.map → index-BThcQvAs.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-accordion_3.entry.js +1 -1
- package/dist/esm/stzh-actions_6.entry.js +1 -1
- package/dist/esm/stzh-actionset.entry.js +1 -1
- package/dist/esm/stzh-amount.entry.js +1 -1
- package/dist/esm/stzh-anchornav.entry.js +1 -1
- package/dist/esm/stzh-app-nav.entry.js +1 -1
- package/dist/esm/stzh-appointments.entry.js +1 -1
- package/dist/esm/stzh-archivelist.entry.js +1 -1
- package/dist/esm/stzh-audio.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-banner.entry.js +1 -1
- package/dist/esm/stzh-bathstatus-item.entry.js +1 -1
- package/dist/esm/stzh-bathstatus-list.entry.js +1 -1
- package/dist/esm/stzh-breadcrumb_2.entry.js +1 -1
- package/dist/esm/stzh-buttongroup.entry.js +1 -1
- package/dist/esm/stzh-calendar.entry.js +1 -1
- package/dist/esm/stzh-card-navigation.entry.js +1 -1
- package/dist/esm/stzh-card-searchresult.entry.js +1 -1
- package/dist/esm/stzh-card-superteaser.entry.js +1 -1
- package/dist/esm/stzh-card.entry.js +1 -1
- package/dist/esm/stzh-cardlist_3.entry.js +1 -1
- package/dist/esm/stzh-carousel.entry.js +1 -1
- package/dist/esm/stzh-chart.entry.js +1 -1
- package/dist/esm/stzh-checkbox.entry.js +2 -2
- package/dist/esm/stzh-checkboxgroup.entry.js +2 -2
- package/dist/esm/stzh-chip.entry.js +1 -1
- package/dist/esm/stzh-chipgroup.entry.js +1 -1
- package/dist/esm/stzh-chipselect.entry.js +2 -2
- package/dist/esm/stzh-clamp.entry.js +1 -1
- package/dist/esm/stzh-company-logo.entry.js +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-contact-cv.entry.js +1 -1
- package/dist/esm/stzh-contact.entry.js +1 -1
- package/dist/esm/stzh-content.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-datalist_3.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +2 -2
- package/dist/esm/stzh-daterange.entry.js +1 -1
- package/dist/esm/stzh-details.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js +1 -1
- package/dist/esm/stzh-disturber.entry.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js +2 -2
- package/dist/esm/stzh-editor.entry.js +1 -1
- package/dist/esm/stzh-eventdata.entry.js +1 -1
- package/dist/esm/stzh-eventinfo.entry.js +1 -1
- package/dist/esm/stzh-feedreader-item.entry.js +1 -1
- package/dist/esm/stzh-feedreader.entry.js +1 -1
- package/dist/esm/stzh-figure.entry.js +1 -1
- package/dist/esm/stzh-flyingfocus.entry.js +1 -1
- package/dist/esm/stzh-footer.entry.js +1 -1
- package/dist/esm/stzh-gallery.entry.js +1 -1
- package/dist/esm/stzh-geo-ref-data.entry.js +1 -1
- package/dist/esm/stzh-ghettobox_3.entry.js +1 -1
- package/dist/esm/stzh-header_2.entry.js +1 -1
- package/dist/esm/stzh-heading.entry.js +1 -1
- package/dist/esm/stzh-homepage-search.entry.js +1 -1
- package/dist/esm/stzh-homepage-service-highlights.entry.js +1 -1
- package/dist/esm/stzh-hr.entry.js +1 -1
- package/dist/esm/stzh-hspace.entry.js +1 -1
- package/dist/esm/stzh-http-error.entry.js +1 -1
- package/dist/esm/stzh-iframe.entry.js +1 -1
- package/dist/esm/stzh-imagecomparison.entry.js +1 -1
- package/dist/esm/{stzh-input-description-B2muC0HR.js → stzh-input-description-Bac-s63i.js} +3 -3
- package/dist/esm/{stzh-input-description-B2muC0HR.js.map → stzh-input-description-Bac-s63i.js.map} +1 -1
- package/dist/esm/stzh-input.entry.js +2 -2
- package/dist/esm/stzh-invert.entry.js +1 -1
- package/dist/esm/stzh-link.entry.js +1 -1
- package/dist/esm/stzh-linklist.entry.js +1 -1
- package/dist/esm/stzh-list_2.entry.js +1 -1
- package/dist/esm/stzh-loader_2.entry.js +1 -1
- package/dist/esm/stzh-loadingbar.entry.js +1 -1
- package/dist/esm/stzh-menu_2.entry.js +1 -1
- package/dist/esm/stzh-message.entry.js +1 -1
- package/dist/esm/stzh-microsite-teaserlist.entry.js +1 -1
- package/dist/esm/stzh-monthyearpicker.entry.js +1 -1
- package/dist/esm/stzh-offline-indicator.entry.js +1 -1
- package/dist/esm/stzh-page-skiplinks.entry.js +1 -1
- package/dist/esm/stzh-pagebottom.entry.js +1 -1
- package/dist/esm/stzh-pagecontent.entry.js +1 -1
- package/dist/esm/stzh-pagetitle-hero.entry.js +1 -1
- package/dist/esm/stzh-pagetitle-home.entry.js +1 -1
- package/dist/esm/stzh-pagetitle.entry.js +1 -1
- package/dist/esm/stzh-panorama.entry.js +1 -1
- package/dist/esm/stzh-pi-content-navigation.entry.js +1 -1
- package/dist/esm/stzh-pi-menu.entry.js +1 -1
- package/dist/esm/stzh-pi-pagetitle.entry.js +1 -1
- package/dist/esm/stzh-pi-quote.entry.js +1 -1
- package/dist/esm/stzh-pi-teaser-layout-item.entry.js +1 -1
- package/dist/esm/stzh-pi-teaser-layout.entry.js +1 -1
- package/dist/esm/stzh-pi-teaser.entry.js +1 -1
- package/dist/esm/stzh-pkzh-qr.entry.js +1 -1
- package/dist/esm/stzh-poicard.entry.js +1 -1
- package/dist/esm/stzh-poilist.entry.js +1 -1
- package/dist/esm/stzh-popover.entry.js +1 -1
- package/dist/esm/stzh-print_2.entry.js +1 -1
- package/dist/esm/stzh-quote.entry.js +1 -1
- package/dist/esm/stzh-rating.entry.js +2 -2
- package/dist/esm/stzh-ratio.entry.js +1 -1
- package/dist/esm/stzh-readspeaker.entry.js +1 -1
- package/dist/esm/stzh-saptcha.entry.js +1 -1
- package/dist/esm/stzh-scrollup.entry.js +1 -1
- package/dist/esm/stzh-search.entry.js +1 -1
- package/dist/esm/stzh-section.entry.js +1 -1
- package/dist/esm/stzh-sitemap.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-storybook-preview.entry.js +1 -1
- package/dist/esm/stzh-skiplink.entry.js +1 -1
- package/dist/esm/stzh-socialmediastream-item.entry.js +1 -1
- package/dist/esm/stzh-socialmediastream.entry.js +1 -1
- package/dist/esm/stzh-stepper-item.entry.js +1 -1
- package/dist/esm/stzh-stepper.entry.js +1 -1
- package/dist/esm/stzh-sticky-actions.entry.js +1 -1
- package/dist/esm/stzh-sticky.entry.js +1 -1
- package/dist/esm/stzh-table.entry.js +1 -1
- package/dist/esm/stzh-text.entry.js +1 -1
- package/dist/esm/stzh-textandimage.entry.js +1 -1
- package/dist/esm/stzh-timeline-item.entry.js +1 -1
- package/dist/esm/stzh-timeline.entry.js +1 -1
- package/dist/esm/stzh-timepicker.entry.js +1 -1
- package/dist/esm/stzh-toast_2.entry.js +1 -1
- package/dist/esm/stzh-toggle.entry.js +2 -2
- package/dist/esm/stzh-tooltip.entry.js +1 -1
- package/dist/esm/stzh-twocolumns.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js +2 -2
- package/dist/esm/stzh-vbz-carousel.entry.js +1 -1
- package/dist/esm/stzh-vbz-connection-finder.entry.js +1 -1
- package/dist/esm/stzh-vbz-intro.entry.js +1 -1
- package/dist/esm/stzh-vbz-linechip.entry.js +1 -1
- package/dist/esm/stzh-vbz-majorticker.entry.js +1 -1
- package/dist/esm/stzh-vbz-ticker.entry.js +1 -1
- package/dist/esm/stzh-visuallyhidden.entry.js +1 -1
- package/dist/esm/stzh-vspace.entry.js +1 -1
- package/dist/esm/stzh-youtube.entry.js +1 -1
- package/dist/stzh-components/{p-8c90bc4b.entry.js → p-015465a6.entry.js} +2 -2
- package/dist/stzh-components/{p-c9f2e23a.entry.js → p-02a9bda7.entry.js} +2 -2
- package/dist/stzh-components/{p-46963b10.entry.js → p-0c09a5ea.entry.js} +2 -2
- package/dist/stzh-components/{p-628b716b.entry.js → p-0cb4d20e.entry.js} +2 -2
- package/dist/stzh-components/{p-aa8fe13a.entry.js → p-0d536223.entry.js} +2 -2
- package/dist/stzh-components/{p-c28f9c40.entry.js → p-0ebada09.entry.js} +2 -2
- package/dist/stzh-components/{p-2585770a.entry.js → p-0f34040c.entry.js} +2 -2
- package/dist/stzh-components/{p-5f92e771.entry.js → p-11ac7dda.entry.js} +2 -2
- package/dist/stzh-components/{p-f2e95ab9.entry.js → p-15cca4eb.entry.js} +2 -2
- package/dist/stzh-components/{p-e233cf06.entry.js → p-18e7b302.entry.js} +2 -2
- package/dist/stzh-components/{p-9606c1b3.entry.js → p-1a19824e.entry.js} +2 -2
- package/dist/stzh-components/{p-0e1a0f73.entry.js → p-1d367570.entry.js} +2 -2
- package/dist/stzh-components/{p-a33ac43e.entry.js → p-1e0b3015.entry.js} +2 -2
- package/dist/stzh-components/{p-44a38608.entry.js → p-1e34154e.entry.js} +3 -3
- package/dist/stzh-components/{p-94942d87.entry.js → p-22dadc90.entry.js} +2 -2
- package/dist/stzh-components/{p-c8c34164.entry.js → p-23a41d47.entry.js} +2 -2
- package/dist/stzh-components/{p-b4da4cc2.entry.js → p-24d6e7f8.entry.js} +2 -2
- package/dist/stzh-components/p-27d43e46.entry.js +2 -0
- package/dist/stzh-components/{p-e905055b.entry.js.map → p-27d43e46.entry.js.map} +1 -1
- package/dist/stzh-components/{p-b5c20b76.entry.js → p-2855def0.entry.js} +2 -2
- package/dist/stzh-components/{p-b989f72d.entry.js → p-2aaa796f.entry.js} +2 -2
- package/dist/stzh-components/{p-4949d3f3.entry.js → p-31ae4fdc.entry.js} +2 -2
- package/dist/stzh-components/{p-114eb1c8.entry.js → p-33fb9af5.entry.js} +2 -2
- package/dist/stzh-components/{p-836ed145.entry.js → p-35349bcc.entry.js} +2 -2
- package/dist/stzh-components/{p-d37c5c73.entry.js → p-36879007.entry.js} +2 -2
- package/dist/stzh-components/{p-8adb8b10.entry.js → p-39c9ce97.entry.js} +2 -2
- package/dist/stzh-components/{p-b2aabeb7.entry.js → p-3a1d0a2a.entry.js} +2 -2
- package/dist/stzh-components/{p-4ef4838b.entry.js → p-3d01205e.entry.js} +2 -2
- package/dist/stzh-components/{p-38a1e3c5.entry.js → p-3eca41f3.entry.js} +2 -2
- package/dist/stzh-components/{p-e12d2d60.entry.js → p-45035652.entry.js} +2 -2
- package/dist/stzh-components/{p-6633c83d.entry.js → p-45585dc6.entry.js} +7 -7
- package/dist/stzh-components/{p-e8a4ddd6.entry.js → p-46b1e62c.entry.js} +2 -2
- package/dist/stzh-components/{p-1412c776.entry.js → p-46ce6f35.entry.js} +2 -2
- package/dist/stzh-components/{p-3d31d8f9.entry.js → p-485af89b.entry.js} +2 -2
- package/dist/stzh-components/{p-63602e47.entry.js → p-4978fb04.entry.js} +2 -2
- package/dist/stzh-components/{p-f07faa5b.entry.js → p-4e39e368.entry.js} +2 -2
- package/dist/stzh-components/{p-a3dc9c36.entry.js → p-4ee4e4df.entry.js} +2 -2
- package/dist/stzh-components/{p-5b1f1510.entry.js → p-53097c52.entry.js} +2 -2
- package/dist/stzh-components/{p-2dc03663.entry.js → p-534dc12a.entry.js} +2 -2
- package/dist/stzh-components/{p-fb8f7cec.entry.js → p-5354f149.entry.js} +2 -2
- package/dist/stzh-components/{p-6b74f2f3.entry.js → p-53bad197.entry.js} +2 -2
- package/dist/stzh-components/{p-48bd3e87.entry.js → p-553d1220.entry.js} +2 -2
- package/dist/stzh-components/{p-a8876eda.entry.js → p-56fa5c59.entry.js} +2 -2
- package/dist/stzh-components/{p-ff8a59e7.entry.js → p-57d11809.entry.js} +2 -2
- package/dist/stzh-components/{p-38a47c95.entry.js → p-5a04714a.entry.js} +2 -2
- package/dist/stzh-components/{p-b31949eb.entry.js → p-5d737462.entry.js} +2 -2
- package/dist/stzh-components/{p-d6b7946f.entry.js → p-644c03c8.entry.js} +2 -2
- package/dist/stzh-components/{p-36ee1a3d.entry.js → p-657850dc.entry.js} +2 -2
- package/dist/stzh-components/{p-4622ab8b.entry.js → p-670f2981.entry.js} +3 -3
- package/dist/stzh-components/{p-11f8205b.entry.js → p-69b462ec.entry.js} +2 -2
- package/dist/stzh-components/{p-2736ea2b.entry.js → p-6c673cae.entry.js} +2 -2
- package/dist/stzh-components/{p-348f6385.entry.js → p-6dad1d33.entry.js} +2 -2
- package/dist/stzh-components/{p-1284b27f.entry.js → p-6e4d223c.entry.js} +2 -2
- package/dist/stzh-components/{p-8f5e606d.entry.js → p-6eaa638a.entry.js} +2 -2
- package/dist/stzh-components/{p-f9966360.entry.js → p-6f17a3dd.entry.js} +2 -2
- package/dist/stzh-components/{p-88b7a476.entry.js → p-73a53336.entry.js} +2 -2
- package/dist/stzh-components/{p-c9993af0.entry.js → p-774408d8.entry.js} +2 -2
- package/dist/stzh-components/{p-2adc1b7e.entry.js → p-7a079a4f.entry.js} +2 -2
- package/dist/stzh-components/{p-30cfc3b7.entry.js → p-7c0d8b58.entry.js} +2 -2
- package/dist/stzh-components/{p-73d5c827.entry.js → p-7d8f07bb.entry.js} +2 -2
- package/dist/stzh-components/{p-5bbc5c2d.entry.js → p-7e2a5f95.entry.js} +2 -2
- package/dist/stzh-components/{p-4de6381b.entry.js → p-7ee21a5f.entry.js} +2 -2
- package/dist/stzh-components/{p-cd12e7bd.entry.js → p-80495d40.entry.js} +2 -2
- package/dist/stzh-components/{p-0e4fdc3c.entry.js → p-81c99ba6.entry.js} +2 -2
- package/dist/stzh-components/{p-1599a3aa.entry.js → p-823a4ae0.entry.js} +2 -2
- package/dist/stzh-components/{p-3ed1d1c9.entry.js → p-84a0ae66.entry.js} +2 -2
- package/dist/stzh-components/{p-b56daf65.entry.js → p-84ac735b.entry.js} +2 -2
- package/dist/stzh-components/{p-34d452cc.entry.js → p-865bcfe6.entry.js} +2 -2
- package/dist/stzh-components/{p-73a1c1f7.entry.js → p-87c5e317.entry.js} +2 -2
- package/dist/stzh-components/{p-c4d0f525.entry.js → p-8c5e28e0.entry.js} +2 -2
- package/dist/stzh-components/{p-6867beb2.entry.js → p-8cb0a739.entry.js} +2 -2
- package/dist/stzh-components/{p-89295005.entry.js → p-8cd1458e.entry.js} +2 -2
- package/dist/stzh-components/{p-d1cca86f.entry.js → p-8dde1e14.entry.js} +2 -2
- package/dist/stzh-components/{p-36d88163.entry.js → p-8e2907cf.entry.js} +2 -2
- package/dist/stzh-components/{p-1a094f09.entry.js → p-8e40a02d.entry.js} +2 -2
- package/dist/stzh-components/{p-c4fbcf5c.entry.js → p-8eb9e6e4.entry.js} +2 -2
- package/dist/stzh-components/{p-e49ed519.entry.js → p-8f433f34.entry.js} +2 -2
- package/dist/stzh-components/{p-abe3645d.entry.js → p-9003dadd.entry.js} +2 -2
- package/dist/stzh-components/{p-fc426694.entry.js → p-9294464b.entry.js} +2 -2
- package/dist/stzh-components/{p-f1a64d71.entry.js → p-96209700.entry.js} +2 -2
- package/dist/stzh-components/{p-7e785f95.entry.js → p-9a63883c.entry.js} +2 -2
- package/dist/stzh-components/{p-30b90219.entry.js → p-9ac7f3f5.entry.js} +2 -2
- package/dist/stzh-components/{p-b4d78249.entry.js → p-9c6caf5a.entry.js} +2 -2
- package/dist/stzh-components/{p-353f35fb.entry.js → p-9e7a1402.entry.js} +2 -2
- package/dist/stzh-components/{p-a6522800.entry.js → p-9f9d40a9.entry.js} +3 -3
- package/dist/stzh-components/{p-DesQCrfi.js → p-BThcQvAs.js} +2 -2
- package/dist/stzh-components/{p-DesQCrfi.js.map → p-BThcQvAs.js.map} +1 -1
- package/dist/stzh-components/{p-DUHakWnr.js → p-DYsAWX7o.js} +2 -2
- package/dist/stzh-components/{p-DUHakWnr.js.map → p-DYsAWX7o.js.map} +1 -1
- package/dist/stzh-components/{p-3c60f148.entry.js → p-a14af5ec.entry.js} +2 -2
- package/dist/stzh-components/{p-b38b3c4c.entry.js → p-a24d6846.entry.js} +2 -2
- package/dist/stzh-components/{p-a70a0080.entry.js → p-a58c382e.entry.js} +2 -2
- package/dist/stzh-components/{p-22eb16c8.entry.js → p-a614ead6.entry.js} +2 -2
- package/dist/stzh-components/{p-c63e07fc.entry.js → p-a6dddbf1.entry.js} +3 -3
- package/dist/stzh-components/{p-6d0e28b0.entry.js → p-ab039060.entry.js} +2 -2
- package/dist/stzh-components/{p-e9a85cba.entry.js → p-b0631dbd.entry.js} +2 -2
- package/dist/stzh-components/{p-3c059c3f.entry.js → p-b344a1ad.entry.js} +2 -2
- package/dist/stzh-components/{p-4eb79797.entry.js → p-b63f46e0.entry.js} +2 -2
- package/dist/stzh-components/{p-392592da.entry.js → p-b81b301b.entry.js} +2 -2
- package/dist/stzh-components/{p-6e1ef0ec.entry.js → p-b89fd80b.entry.js} +2 -2
- package/dist/stzh-components/{p-3b891522.entry.js → p-ba410b7a.entry.js} +2 -2
- package/dist/stzh-components/{p-08efb2fb.entry.js → p-bebb6973.entry.js} +2 -2
- package/dist/stzh-components/{p-d1747317.entry.js → p-bf8e55a9.entry.js} +2 -2
- package/dist/stzh-components/{p-6cc8c31a.entry.js → p-bfc88af7.entry.js} +2 -2
- package/dist/stzh-components/{p-250f9ffa.entry.js → p-c4c71d7f.entry.js} +2 -2
- package/dist/stzh-components/{p-c596173d.entry.js → p-cd1a26ff.entry.js} +2 -2
- package/dist/stzh-components/{p-5022f5ae.entry.js → p-d07d91c1.entry.js} +2 -2
- package/dist/stzh-components/{p-3e55b338.entry.js → p-d0f6c3f5.entry.js} +2 -2
- package/dist/stzh-components/{p-084b9cdd.entry.js → p-d10ff45f.entry.js} +2 -2
- package/dist/stzh-components/{p-abd7cbc6.entry.js → p-d13fb319.entry.js} +2 -2
- package/dist/stzh-components/{p-315d9ed9.entry.js → p-d15817fe.entry.js} +2 -2
- package/dist/stzh-components/{p-90fb2952.entry.js → p-d5e35933.entry.js} +2 -2
- package/dist/stzh-components/{p-609ad786.entry.js → p-d85a47f1.entry.js} +2 -2
- package/dist/stzh-components/{p-e61966c4.entry.js → p-da9475aa.entry.js} +2 -2
- package/dist/stzh-components/{p-f395be95.entry.js → p-dc609bab.entry.js} +2 -2
- package/dist/stzh-components/{p-31ca74fa.entry.js → p-de8ad578.entry.js} +2 -2
- package/dist/stzh-components/{p-f99e3401.entry.js → p-df5034a2.entry.js} +2 -2
- package/dist/stzh-components/{p-ec6a62aa.entry.js → p-e30a72e4.entry.js} +2 -2
- package/dist/stzh-components/{p-d5b7addc.entry.js → p-e4d0b7c6.entry.js} +2 -2
- package/dist/stzh-components/{p-cc6e6867.entry.js → p-e65425be.entry.js} +2 -2
- package/dist/stzh-components/{p-1b5786df.entry.js → p-e6f14f33.entry.js} +2 -2
- package/dist/stzh-components/{p-8b8f4b5c.entry.js → p-e7ea2434.entry.js} +2 -2
- package/dist/stzh-components/{p-a628ad78.entry.js → p-e89f1709.entry.js} +2 -2
- package/dist/stzh-components/{p-99c6d6af.entry.js → p-e902f133.entry.js} +2 -2
- package/dist/stzh-components/{p-221df142.entry.js → p-ea6bbf7f.entry.js} +2 -2
- package/dist/stzh-components/{p-3e764c0f.entry.js → p-ebbc1a65.entry.js} +2 -2
- package/dist/stzh-components/{p-fae36aac.entry.js → p-ebee4436.entry.js} +2 -2
- package/dist/stzh-components/{p-ee8190b4.entry.js → p-ed59015f.entry.js} +2 -2
- package/dist/stzh-components/{p-7046fef8.entry.js → p-eeb4aa80.entry.js} +2 -2
- package/dist/stzh-components/{p-3242ae36.entry.js → p-f08d0b8e.entry.js} +2 -2
- package/dist/stzh-components/{p-abddf10c.entry.js → p-f3c2ef63.entry.js} +2 -2
- package/dist/stzh-components/{p-83855aaf.entry.js → p-f44771d5.entry.js} +2 -2
- package/dist/stzh-components/{p-5191a957.entry.js → p-f5f7ca91.entry.js} +2 -2
- package/dist/stzh-components/{p-ab120fe4.entry.js → p-f741e2c1.entry.js} +2 -2
- package/dist/stzh-components/{p-41e45f16.entry.js → p-f781da2b.entry.js} +2 -2
- package/dist/stzh-components/{p-4dfd34dd.entry.js → p-fa0eb466.entry.js} +2 -2
- package/dist/stzh-components/{p-9425707d.entry.js → p-fb370837.entry.js} +2 -2
- package/dist/stzh-components/{p-f7ae52f5.entry.js → p-ffb05715.entry.js} +2 -2
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/stzh-components/p-e905055b.entry.js +0 -2
- /package/dist/stzh-components/{p-8c90bc4b.entry.js.map → p-015465a6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c9f2e23a.entry.js.map → p-02a9bda7.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-46963b10.entry.js.map → p-0c09a5ea.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-628b716b.entry.js.map → p-0cb4d20e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-aa8fe13a.entry.js.map → p-0d536223.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c28f9c40.entry.js.map → p-0ebada09.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-2585770a.entry.js.map → p-0f34040c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5f92e771.entry.js.map → p-11ac7dda.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f2e95ab9.entry.js.map → p-15cca4eb.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e233cf06.entry.js.map → p-18e7b302.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-9606c1b3.entry.js.map → p-1a19824e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-0e1a0f73.entry.js.map → p-1d367570.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a33ac43e.entry.js.map → p-1e0b3015.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-44a38608.entry.js.map → p-1e34154e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-94942d87.entry.js.map → p-22dadc90.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c8c34164.entry.js.map → p-23a41d47.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b4da4cc2.entry.js.map → p-24d6e7f8.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b5c20b76.entry.js.map → p-2855def0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b989f72d.entry.js.map → p-2aaa796f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4949d3f3.entry.js.map → p-31ae4fdc.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-114eb1c8.entry.js.map → p-33fb9af5.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-836ed145.entry.js.map → p-35349bcc.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d37c5c73.entry.js.map → p-36879007.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8adb8b10.entry.js.map → p-39c9ce97.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b2aabeb7.entry.js.map → p-3a1d0a2a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4ef4838b.entry.js.map → p-3d01205e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-38a1e3c5.entry.js.map → p-3eca41f3.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e12d2d60.entry.js.map → p-45035652.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6633c83d.entry.js.map → p-45585dc6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e8a4ddd6.entry.js.map → p-46b1e62c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-1412c776.entry.js.map → p-46ce6f35.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3d31d8f9.entry.js.map → p-485af89b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-63602e47.entry.js.map → p-4978fb04.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f07faa5b.entry.js.map → p-4e39e368.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a3dc9c36.entry.js.map → p-4ee4e4df.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5b1f1510.entry.js.map → p-53097c52.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-2dc03663.entry.js.map → p-534dc12a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-fb8f7cec.entry.js.map → p-5354f149.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6b74f2f3.entry.js.map → p-53bad197.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-48bd3e87.entry.js.map → p-553d1220.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a8876eda.entry.js.map → p-56fa5c59.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ff8a59e7.entry.js.map → p-57d11809.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-38a47c95.entry.js.map → p-5a04714a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b31949eb.entry.js.map → p-5d737462.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d6b7946f.entry.js.map → p-644c03c8.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-36ee1a3d.entry.js.map → p-657850dc.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4622ab8b.entry.js.map → p-670f2981.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-11f8205b.entry.js.map → p-69b462ec.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-2736ea2b.entry.js.map → p-6c673cae.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-348f6385.entry.js.map → p-6dad1d33.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-1284b27f.entry.js.map → p-6e4d223c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8f5e606d.entry.js.map → p-6eaa638a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f9966360.entry.js.map → p-6f17a3dd.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-88b7a476.entry.js.map → p-73a53336.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c9993af0.entry.js.map → p-774408d8.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-2adc1b7e.entry.js.map → p-7a079a4f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-30cfc3b7.entry.js.map → p-7c0d8b58.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-73d5c827.entry.js.map → p-7d8f07bb.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5bbc5c2d.entry.js.map → p-7e2a5f95.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4de6381b.entry.js.map → p-7ee21a5f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-cd12e7bd.entry.js.map → p-80495d40.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-0e4fdc3c.entry.js.map → p-81c99ba6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-1599a3aa.entry.js.map → p-823a4ae0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3ed1d1c9.entry.js.map → p-84a0ae66.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b56daf65.entry.js.map → p-84ac735b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-34d452cc.entry.js.map → p-865bcfe6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-73a1c1f7.entry.js.map → p-87c5e317.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c4d0f525.entry.js.map → p-8c5e28e0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6867beb2.entry.js.map → p-8cb0a739.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-89295005.entry.js.map → p-8cd1458e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d1cca86f.entry.js.map → p-8dde1e14.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-36d88163.entry.js.map → p-8e2907cf.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-1a094f09.entry.js.map → p-8e40a02d.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c4fbcf5c.entry.js.map → p-8eb9e6e4.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e49ed519.entry.js.map → p-8f433f34.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-abe3645d.entry.js.map → p-9003dadd.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-fc426694.entry.js.map → p-9294464b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f1a64d71.entry.js.map → p-96209700.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7e785f95.entry.js.map → p-9a63883c.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-30b90219.entry.js.map → p-9ac7f3f5.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b4d78249.entry.js.map → p-9c6caf5a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-353f35fb.entry.js.map → p-9e7a1402.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a6522800.entry.js.map → p-9f9d40a9.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3c60f148.entry.js.map → p-a14af5ec.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-b38b3c4c.entry.js.map → p-a24d6846.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a70a0080.entry.js.map → p-a58c382e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-22eb16c8.entry.js.map → p-a614ead6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c63e07fc.entry.js.map → p-a6dddbf1.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6d0e28b0.entry.js.map → p-ab039060.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e9a85cba.entry.js.map → p-b0631dbd.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3c059c3f.entry.js.map → p-b344a1ad.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4eb79797.entry.js.map → p-b63f46e0.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-392592da.entry.js.map → p-b81b301b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6e1ef0ec.entry.js.map → p-b89fd80b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3b891522.entry.js.map → p-ba410b7a.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-08efb2fb.entry.js.map → p-bebb6973.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d1747317.entry.js.map → p-bf8e55a9.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-6cc8c31a.entry.js.map → p-bfc88af7.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-250f9ffa.entry.js.map → p-c4c71d7f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-c596173d.entry.js.map → p-cd1a26ff.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5022f5ae.entry.js.map → p-d07d91c1.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3e55b338.entry.js.map → p-d0f6c3f5.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-084b9cdd.entry.js.map → p-d10ff45f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-abd7cbc6.entry.js.map → p-d13fb319.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-315d9ed9.entry.js.map → p-d15817fe.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-90fb2952.entry.js.map → p-d5e35933.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-609ad786.entry.js.map → p-d85a47f1.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-e61966c4.entry.js.map → p-da9475aa.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f395be95.entry.js.map → p-dc609bab.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-31ca74fa.entry.js.map → p-de8ad578.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f99e3401.entry.js.map → p-df5034a2.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ec6a62aa.entry.js.map → p-e30a72e4.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-d5b7addc.entry.js.map → p-e4d0b7c6.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-cc6e6867.entry.js.map → p-e65425be.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-1b5786df.entry.js.map → p-e6f14f33.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-8b8f4b5c.entry.js.map → p-e7ea2434.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-a628ad78.entry.js.map → p-e89f1709.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-99c6d6af.entry.js.map → p-e902f133.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-221df142.entry.js.map → p-ea6bbf7f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3e764c0f.entry.js.map → p-ebbc1a65.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-fae36aac.entry.js.map → p-ebee4436.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ee8190b4.entry.js.map → p-ed59015f.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-7046fef8.entry.js.map → p-eeb4aa80.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-3242ae36.entry.js.map → p-f08d0b8e.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-abddf10c.entry.js.map → p-f3c2ef63.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-83855aaf.entry.js.map → p-f44771d5.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-5191a957.entry.js.map → p-f5f7ca91.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-ab120fe4.entry.js.map → p-f741e2c1.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-41e45f16.entry.js.map → p-f781da2b.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-4dfd34dd.entry.js.map → p-fa0eb466.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-9425707d.entry.js.map → p-fb370837.entry.js.map} +0 -0
- /package/dist/stzh-components/{p-f7ae52f5.entry.js.map → p-ffb05715.entry.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{r as t,c as i,e as s,i as e,h as r,F as n,a as h,d as a}from"./p-DesQCrfi.js";import{h as o}from"./p--MYN2wgX.js";import{m as f}from"./p-CUGRmgip.js";import{t as u,c as l}from"./p-CBUfcdIy.js";import{c as v}from"./p-BzugsqyR.js";import{g as c}from"./p-E-ZsRS8r.js";import"./p-BubviQku.js";const d=()=>`.sc-stzh-header-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-header-h,[stzh-hidden].sc-stzh-header-h{display:none}.sc-stzh-header-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-header-h *.sc-stzh-header,.sc-stzh-header-h *.sc-stzh-header::before,.sc-stzh-header-h *.sc-stzh-header::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-header-h .has-focus.sc-stzh-header{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header{outline-style:none !important}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header::-moz-focus-inner{border:0 !important}.sc-stzh-header-h{--logo-width:var(--stzh-header-logo-width, auto);--logo-height:100%;--logobar-background-color:var(--stzh-header-logobar-background-color);--metabar-background-color:var(\n --stzh-header-metabar-background-color,\n var(--stzh-color-coolgrey10)\n );--menu-background-color:var(\n --stzh-header-menu-background-color,\n var(--stzh-color-secondary30)\n );--menu-list-item-background-hover:var(\n --stzh-header-menu-list-item-background-hover,\n var(--stzh-color-secondary40)\n );--menu-list-item-background-level2:var(\n --stzh-header-menu-list-item-background-level2,\n var(--stzh-color-secondary20)\n );--menu-list-item-background-level2-hover:var(\n --stzh-header-menu-list-item-background-level2-hover,\n var(--stzh-color-secondary10)\n );--menu-item-color:var(--stzh-header-menu-item-color, var(--stzh-color-primary70));--metanav-item-color:var(--stzh-header-metanav-item-color, var(--stzh-color-grey90))}@media print{.sc-stzh-header-h{display:none}}[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:1.9375rem}@media screen and (min-width: 900px){[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:2.1875rem}}@media screen and (min-width: 1600px){[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:3.3125rem}}[logo-type=vbz].sc-stzh-header-h{--logo-height:1.8125rem}@media screen and (min-width: 900px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.3125rem}}@media screen and (min-width: 1600px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.75rem}}.sc-stzh-header-h[logo-type=vbz].sc-stzh-header-s>[slot=logo],.sc-stzh-header-h[logo-type=vbz] .sc-stzh-header-s>[slot=logo]{align-self:center}.sc-stzh-header-h.sc-stzh-header-s>[slot=logo],.sc-stzh-header-h .sc-stzh-header-s>[slot=logo]{width:var(--logo-width);height:var(--logo-height)}.stzh-header.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--stzh-color-grey90)}.stzh-header__inner.sc-stzh-header,.stzh-header__main.sc-stzh-header{max-width:calc(100vw - var(--stzh-scrollbar-width))}@media screen and (min-width: 600px){.stzh-header__inner.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__main.sc-stzh-header{display:flex;flex-direction:column;background-color:var(--stzh-color-white)}@media screen and (max-width: 599px){.stzh-header__main.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__metabar.sc-stzh-header{background-color:var(--metabar-background-color)}.stzh-header__metabar-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:4rem;margin-right:4rem}}@media screen and (min-width: 1600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:auto;margin-right:auto;max-width:84.25rem}}.stzh-header__metabar-inner.sc-stzh-header{display:flex;align-items:center;height:4rem}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{height:4rem}}.stzh-header__burger.sc-stzh-header,.stzh-header__search.sc-stzh-header,.stzh-header__metanav-item.sc-stzh-header{color:var(--metanav-item-color);transition:color var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__burger.sc-stzh-header:hover,.stzh-header__search.sc-stzh-header:hover,.stzh-header__metanav-item.sc-stzh-header:hover{color:var(--stzh-color-black)}.stzh-header__burger.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:center;appearance:none;background-color:transparent;border:none;padding:0;margin-right:var(--stzh-space-medium);gap:var(--stzh-space-medium);color:var(--menu-item-color)}@media screen and (min-width: 600px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__burger-icon.is-open.sc-stzh-header{display:none}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-close.sc-stzh-header{display:none}@media screen and (max-width: 599px){.stzh-header__burger-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metabar-search.sc-stzh-header{overflow:hidden;margin-right:var(--stzh-space-medium);transition-property:width;transition-duration:var(--stzh-base-transition-animation-speed);width:2.5rem;max-width:21.5625rem}.stzh-header__metabar-search.sc-stzh-header:focus-within{width:100%}@media screen and (min-width: 600px){.stzh-header__metabar-search.sc-stzh-header{width:6rem;margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-search.sc-stzh-header{width:10rem;margin-left:0;margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__search.sc-stzh-header{position:relative;display:block;width:100%}.stzh-header__search-input.sc-stzh-header{width:100%;max-width:100%;background-color:transparent;color:transparent;font-family:inherit;font-size:inherit;border:none;padding:var(--stzh-space-xsmall);padding-left:0;padding-right:0;height:var(--stzh-form-input-small-height);transition-property:padding-left, padding-right, background-color, color;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__search-input.sc-stzh-header{color:var(--stzh-color-secondary60);padding-left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}}.stzh-header__search-input.sc-stzh-header:focus{color:var(--stzh-color-secondary60);background-color:var(--stzh-color-white);padding-left:calc(var(--stzh-space-medium) + var(--stzh-icon-size) + var(--stzh-space-medium));padding-right:var(--stzh-space-xlarge)}.stzh-header__search-input.sc-stzh-header:-webkit-autofill{background-clip:text}.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-decoration,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-cancel-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-decoration{-webkit-appearance:none}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-icon.sc-stzh-header,.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{transform:translate(var(--stzh-space-medium), -50%)}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{color:var(--stzh-color-grey70)}.stzh-header__search-text.sc-stzh-header,.stzh-header__search-icon.sc-stzh-header{position:absolute;top:50%;transform:translate(0, -50%);transition:transform var(--stzh-base-transition-animation-speed)}.stzh-header__search-icon.sc-stzh-header{left:0px}@media screen and (max-width: 599px){.stzh-header__search-icon.sc-stzh-header{transform:translate(0.5rem, -50%)}}.stzh-header__search-text.sc-stzh-header{pointer-events:none;left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}@media screen and (max-width: 599px){.stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metabar-nav.sc-stzh-header{display:flex;align-items:center;margin-left:auto;gap:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xxlarge)}}.stzh-header__metanav-popover.sc-stzh-header{--width:auto;--min-width:15.875rem;--background-color:var(--stzh-color-coolgrey10)}.stzh-header__metanav-popover.is-langnav.sc-stzh-header{--min-width:8.75rem}.stzh-header__metanav-item.sc-stzh-header{display:none;gap:var(--stzh-space-small);align-items:center;justify-content:center;appearance:none;background-color:transparent;padding:0;border:none;text-decoration:none;font-size:100%;font-family:inherit;white-space:nowrap;min-width:2.5rem}@media screen and (min-width: 900px){.stzh-header__metanav-item.sc-stzh-header{display:flex}}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header{color:var(--stzh-color-primary70)}.stzh-header__metanav-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-item.is-stay.sc-stzh-header{display:flex}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-mobile.sc-stzh-header{display:none}}.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:flex}}.stzh-header__metanav-menu-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-menu-item--extra.sc-stzh-header{margin-top:var(--stzh-space-medium)}.stzh-header__metanav-item-text.sc-stzh-header{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-header__metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}@media screen and (max-width: 899px){.stzh-header__metanav-item-text.has-no-short-label.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}@media screen and (max-width: 899px){.stzh-header__metanav-item-text-label-long.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:flex}@media screen and (min-width: 900px){.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:none}}.stzh-header__metanav-icon-wrapper.sc-stzh-header{position:relative;display:flex;align-items:center;justify-content:center}.stzh-header__metanav-icon-badge.sc-stzh-header{position:absolute;top:-0.25rem;right:-0.25rem}.stzh-header__metanav-icon.is-open.sc-stzh-header{display:none}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-close.sc-stzh-header{display:none}.stzh-header__logobar.sc-stzh-header{display:flex}@media screen and (min-width: 1600px){.stzh-header__logobar.sc-stzh-header{margin-left:auto;margin-right:auto;width:84.25rem}}.stzh-header__logobar-logo.sc-stzh-header{box-sizing:content-box;display:flex;overflow:hidden;flex-shrink:0}.stzh-header__logobar-decoration.sc-stzh-header{background-color:var(--logobar-background-color);flex-grow:1}@media screen and (min-width: 1600px){.stzh-header__logobar-decoration.sc-stzh-header{width:calc(100% - 34.5625rem + (100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2);margin-right:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xxlarge)}}.stzh-header__logo-link.sc-stzh-header{padding-top:0.875rem;padding-bottom:0.6875rem;padding-left:1.25rem;display:inline-flex;width:18rem;height:4.125rem;transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{width:18.75rem;padding-left:2rem}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{width:24.9375rem;height:5.5rem;padding-top:1.125rem;padding-bottom:1.125rem;padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{width:38.5625rem;height:8.4375rem;padding-top:1.75rem;padding-bottom:1.5rem;padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__logo-link.sc-stzh-header{width:34.5625rem;padding-left:0}}.stzh-header__flyout.sc-stzh-header,.stzh-header__flyout-search.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);z-index:calc(var(--stzh-z-index-header) - 1);position:fixed;visibility:hidden;top:0;left:0;right:0;bottom:0;width:100dvw;height:100dvh;overflow:auto;transition:visibility var(--stzh-base-transition-animation-speed)}@media (min-height: 580px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}@media screen and (min-width: 900px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}.stzh-header__flyout-backdrop.sc-stzh-header{position:absolute;width:100%;height:100%;background-color:var(--stzh-color-black40op);opacity:0;transition:opacity var(--stzh-base-transition-animation-speed)}.stzh-header__menu.sc-stzh-header{position:absolute;width:100%;height:auto;background-color:var(--menu-background-color);display:grid;grid-template-rows:auto auto;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateX(-100%);opacity:0}@media (min-height: 580px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{width:20.9375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:23.375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:27.4375rem}}@media screen and (min-width: 1600px){.stzh-header__menu.sc-stzh-header{width:calc(27.4375rem - 4rem + (100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2)}}.stzh-header__menu-nav.sc-stzh-header{position:relative;overflow-x:hidden;overflow-y:auto}@media screen and (min-width: 900px){.stzh-header__menu-nav.sc-stzh-header{position:static}}.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-xxsmall)}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-small)}}.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-large)}@media screen and (min-width: 600px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxxlarge)}}.stzh-header__menu-metanav.sc-stzh-header{background-color:var(--stzh-color-secondary20)}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{display:none}}.stzh-header__menu-metanav-nav.sc-stzh-header{max-width:23.4375rem}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.sc-stzh-header{display:block;list-style:none;padding:0;margin:0}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-xxxlarge));padding-bottom:var(--stzh-space-xxxlarge)}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-huge))}}.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{overflow:auto;background-color:var(--menu-list-item-background-level2);visibility:hidden;opacity:0;transform:translateX(100%);position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;transition-property:opacity, visibility, transform;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{z-index:initial;width:19.6875rem;transform:none;left:100%;transition-property:opacity, visibility}}@media screen and (min-width: 1260px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:20.875rem}}@media screen and (min-width: 1600px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:21.5625rem}}.stzh-header__menu-list.is-level-2.sc-stzh-header{height:max-content}@media (min-height: 580px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{background-color:var(--stzh-color-secondary30);transform:none;transition-property:opacity, visibility}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item:hover>.stzh-header__menu-list)>.stzh-header__menu-list-item>.stzh-header__menu-list),.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item.is-open>.stzh-header__menu-list)>.stzh-header__menu-list-item>.stzh-header__menu-list){transition-delay:var(--stzh-base-transition-animation-speed)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-list.sc-stzh-header{z-index:200;transition-delay:0ms;visibility:visible;opacity:1}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.sc-stzh-header{background-color:var(--menu-list-item-background-hover)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.is-level-2.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.is-level-2.sc-stzh-header{background-color:var(--menu-list-item-background-level2-hover)}}@media screen and (max-width: 899px){.stzh-header__menu-nav.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open) .stzh-header__menu-nav.sc-stzh-header,.stzh-header__menu-list.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu-metanav-list.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open){transition-property:visibility;transition-duration:0ms;transition-delay:var(--stzh-base-transition-animation-speed);visibility:hidden}}@media screen and (max-width: 899px){.stzh-header__menu-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-list),.stzh-header__menu-metanav-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-metanav-list){transform:translateX(0);opacity:1;visibility:visible}}.stzh-header__menu-list-item.sc-stzh-header,.stzh-header__menu-metanav-list-item.sc-stzh-header{display:grid}.stzh-header__menu-list-item.is-backlink.sc-stzh-header{display:block}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);text-align:left;display:flex;align-items:center;gap:var(--stzh-space-xsmall);appearance:none;border:none;text-decoration:none;background-color:transparent;color:var(--menu-item-color);padding-left:var(--stzh-space-xxxlarge);padding-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);padding-right:var(--stzh-space-large);transition-property:color, background-color;transition-duration:var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-size:var(--stzh-font-deci-font-size);line-height:var(--stzh-font-deci-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3.5rem}@media screen and (min-width: 900px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-1.sc-stzh-header{padding-left:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2)}}@media screen and (min-width: 900px){.stzh-header__menu-item.has-items.sc-stzh-header{cursor:default}}.stzh-header__menu-item.is-level-2.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3rem}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-xlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{min-height:none;padding-left:1.25rem;padding-right:1.25rem;gap:var(--stzh-space-xxsmall)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-left:2rem;padding-right:2rem}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{display:none}}.stzh-header__menu-item.is-level-2.is-main.sc-stzh-header{font-size:var(--stzh-font-centi-font-size);line-height:var(--stzh-font-centi-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);margin-bottom:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header{min-height:2.75rem;padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item.is-level-2.sc-stzh-header{min-height:3.5rem;gap:var(--stzh-space-medium);padding-right:var(--stzh-space-xxlarge)}.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);justify-content:space-between;padding-top:0;padding-bottom:0;padding-right:var(--stzh-space-medium);margin-bottom:var(--stzh-space-xlarge);cursor:default}.stzh-header__menu-metanav-item.is-language.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);justify-content:space-between}.stzh-header__menu-metanav-item.is-action.sc-stzh-header{display:grid;padding-right:var(--stzh-space-xxxlarge);margin-top:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-action--extra.sc-stzh-header{margin-top:var(--stzh-space-xxsmall)}.stzh-header__menu-metanav-item.is-hidden.sc-stzh-header{display:none}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header .stzh-header__menu-metanav-item-icon.sc-stzh-header{--size:var(--stzh-icon-size-small)}.stzh-header__menu-metanav-item-text.sc-stzh-header{display:flex;gap:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__menu-metanav-item-counter.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-header__app-nav.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__app-nav.sc-stzh-header{display:block}}.stzh-header__app-nav-bottom.sc-stzh-header{position:fixed;bottom:0;left:0;width:calc(100vw - var(--stzh-scrollbar-width));z-index:calc(var(--stzh-z-index-header) - 1)}@media screen and (min-width: 900px){.stzh-header__app-nav-bottom.sc-stzh-header{display:none}}.stzh-header--is-search-filled.sc-stzh-header .stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header--hide-logo.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:0}@media screen and (min-width: 600px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (min-width: 600px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}@media screen and (max-width: 599px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__logobar.sc-stzh-header{transition-property:opacity, visibility;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform, margin-top;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(0)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(0)}}@media screen and (min-width: 600px) and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__metabar.sc-stzh-header{visibility:hidden}}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__metabar.sc-stzh-header{visibility:hidden}.stzh-header--is-sticky.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:hidden;opacity:0}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__main.sc-stzh-header{margin-top:0px}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:visible;opacity:1}.stzh-header__flyout-search-main.sc-stzh-header{position:absolute;width:100%;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateY(-6.25rem);opacity:0;margin-top:var(--stzh-header-main-height);overflow:auto}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:none;z-index:999;position:absolute;top:0;right:0;bottom:0;width:var(--stzh-scrollbar-width);background-color:var(--stzh-color-grey10);border-left:calc(0.5px * var(--stzh-scrollbar-active)) solid var(--stzh-color-grey30)}@media (min-height: 580px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}@media screen and (min-width: 900px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__menu.sc-stzh-header{opacity:1;transform:translateX(0)}.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search-main.sc-stzh-header{opacity:1;transform:translateX(0)}@media screen and (min-width: 600px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__inner.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}@media screen and (max-width: 599px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__main.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__main.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:1;transition:none}.stzh-header__search-button--is-hidden.sc-stzh-header{display:none}`;const m="stzh-header-open";const p=class{constructor(r){t(this,r);this.stzhMetanavItemClick=i(this,"stzhMetanavItemClick");this.stzhMetanavItemChildClick=i(this,"stzhMetanavItemChildClick");this.stzhMetanavItemButtonClick=i(this,"stzhMetanavItemButtonClick");this.stzhMenuItemClick=i(this,"stzhMenuItemClick");this.stzhLanguageChange=i(this,"stzhLanguageChange");this.stzhSearchChange=i(this,"stzhSearchChange");this.stzhSearchChanged=i(this,"stzhSearchChanged");this.href="https://www.stadt-zuerich.ch";this.menuId="anchorNavMain";this.appNavId="anchorNavAppNav";this.searchId="anchorSearch";this.metanavId="anchorNavMeta";this.languageId="anchorNavLang";this.logoType="default";this.menuItems=[];this.metanavItems=[];this.userSpecificMetanavItemsNotLoggedIn=[];this._userSpecificMetanavItemsNotLoggedIn=[];this.appNavItems=[];this.languages=[];this.languagePreventUrlchange=false;this.languageStay=false;this.hideMetabar=false;this.searchFieldName="q";this.searchValue="";this.sticky="default";this.loginErrorMessage="";this.hideLogo=false;this.stickyActive=false;this.flyoutOpen=false;this.flyoutSearchOpen=false;this.fixed=false;this.fixedTransition=false;this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=false;this.userSpecificMetanavItemsLoggedIn=[];this.combinedMetanavItems=[];this.lastOpener=null;this.flyoutOpenedByMetanavItem=null;this.handleMenuListFocusout=t=>{const i=!t.currentTarget.contains(t.relatedTarget);if(this.isMedium&&i){this.closeMenuItem(false)}};this.handleBurgerClick=async()=>{if(this.flyoutOpenedByMetanavItem){this.flyoutOpenedByMetanavItem=false;this.closeMetanavItem()}else{this.flyoutSearchOpen=false;this.flyoutOpen=!this.flyoutOpen}const t=this.element.querySelector(".stzh-header__menu-item");if(t){window.setTimeout((()=>{t.focus()}),100)}this.updatePosition()};this.handleSearchButtonClick=async()=>{this.flyoutOpen=false;this.flyoutSearchOpen=!this.flyoutSearchOpen;const t=this.element.querySelector(".stzh-search input[type='search']");if(t){window.setTimeout((()=>{t.focus()}),100)}this.updatePosition()};this.handleBackdropClick=async()=>{this.flyoutOpen=false;this.updatePosition()};this.handleBackdropSearchClick=async()=>{this.flyoutSearchOpen=false;this.updatePosition()};this.handleMetanavItemClick=(t,i)=>{this.stzhMetanavItemClick.emit({component:"stzh-header",item:i,originalEvent:t})};this.handleMetanavItemChildClick=(t,i)=>{this.stzhMetanavItemChildClick.emit({component:"stzh-header",itemChild:i,originalEvent:t})};this.handleMetanavItemButtonClick=(t,i)=>{this.stzhMetanavItemButtonClick.emit({component:"stzh-header",itemButton:i,originalEvent:t})};this.handleMenuItemClick=(t,i)=>{this.flyoutOpen=false;this.stzhMenuItemClick.emit({component:"stzh-header",item:i,originalEvent:t})};this.handleSearchInput=t=>{this.searchValue=this.searchInput.value;this.stzhSearchChange.emit({component:"stzh-header",originalEvent:t,value:this.searchValue})};this.handleSearchChange=t=>{this.searchValue=this.searchInput.value;this.stzhSearchChanged.emit({component:"stzh-header",originalEvent:t,value:this.searchValue})};this.handleLanguageClick=(t,i)=>{if(this.languagePreventUrlchange){t.preventDefault()}this.languageActive=i.value;this.stzhLanguageChange.emit({component:"stzh-header",value:this.languageActive})};this.handleFlyoutResize=()=>{this.resizeMenunavElement()};this.handleResize=()=>{if(this.sticky==="disabled"){return}if(this.debounceResize){window.cancelAnimationFrame(this.debounceResize)}this.debounceResize=requestAnimationFrame((()=>{s((()=>{var t,i,s;this.isMedium=f("medium").matches;this.isSmallOrMicro=!this.isMedium;this.mainHeight=((t=this.mainElement)===null||t===void 0?void 0:t.offsetHeight)||0;this.metabarHeight=((i=this.metabarElement)===null||i===void 0?void 0:i.offsetHeight)||0;this.logobarHeight=((s=this.logobarElement)===null||s===void 0?void 0:s.offsetHeight)||0;this.headerTop=this.element.offsetTop;this.headerHeight=this.metabarHeight+this.logobarHeight}));e((()=>{document.documentElement.style.setProperty("--stzh-header-height",`${this.headerHeight}px`);document.documentElement.style.setProperty("--stzh-header-main-height",`${this.mainHeight}px`);document.documentElement.style.setProperty("--stzh-header-metabar-height",`${this.metabarHeight}px`);document.documentElement.style.setProperty("--stzh-header-logobar-height",`${this.logobarHeight}px`)}));this.scrollListener()}))}}handleKeydown(t){if(t.key==="Escape"){this.flyoutOpen=false;this.flyoutSearchOpen=false}}flyoutCloseClicked(){this.flyoutSearchOpen=false;this.updatePosition()}async flyoutOpenWatcher(t){if(!t){this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=null;this.flyoutOpenedByMetanavItem=false;document.body.classList.remove(m);this.enableSiblings();if(this.trap){this.trap.deactivate()}}else{document.body.classList.add(m);this.disableSiblings();if(this.trap){this.trap.activate()}}}async fixedWatcher(){this.paddingTop=this.fixed||this.flyoutOpen||this.flyoutSearchOpen?this.headerHeight:0;await this.waitForNextRender();this.fixedTransition=this.fixed||this.flyoutOpen||this.flyoutSearchOpen}stickyWatcher(){this.updatePosition()}async updatePosition(){if(this.flyoutOpen||this.flyoutSearchOpen){return}const t=()=>{this.stickyActive=true;document.documentElement.style.setProperty("--stzh-header-is-stuck","1");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","0")};const i=()=>{document.documentElement.style.setProperty("--stzh-header-is-stuck","0");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","1");this.stickyActive=false};if(this.sticky==="disabled"){i()}else if(this.sticky==="always-full"){t()}else if(this.sticky==="always"){if(this.belowStayStickyPoint){t()}else{i()}}else{if(this.scrollingUp&&this.belowStayStickyPoint){if(!this.stickyActive&&this.belowStartStickyPoint){t()}}else{if(this.stickyActive&&this.belowStayStickyPoint){i()}else{i()}}}}scrollListener(){if(this.sticky==="disabled"){return}s((()=>{this.currentScrollY=window.scrollY;this.scrollingUp=this.lastScrollY&&this.lastScrollY>this.currentScrollY;this.lastScrollY=this.currentScrollY;this.belowStayStickyPoint=this.currentScrollY>this.logobarHeight;this.belowStartStickyPoint=this.currentScrollY>this.headerHeight;this.fixed=this.belowStartStickyPoint||this.scrollingUp&&this.belowStayStickyPoint&&this.stickyActive||this.sticky==="always"&&this.belowStayStickyPoint||this.sticky==="always-full";this.headerOverlap=(this.headerTop-this.currentScrollY)/-1;this.hideLogo=this.sticky!=="always-full"&&this.isMedium&&this.headerOverlap>1}));e((()=>{this.updatePosition()}))}searchValueWatcher(t){this.searchFilled=t!==""}menuItemsWatcher(t){if(typeof t==="string"){this._menuItems=JSON.parse(t)}else{this._menuItems=t}this._menuItems=this._menuItems.map(((t,i)=>Object.assign({id:`submenu-${i}`},t)))}metanavItemsWatcher(t){if(typeof t==="string"){this._metanavItems=JSON.parse(t)}else{this._metanavItems=t}this._metanavItems=this._metanavItems.map(((t,i)=>Object.assign({id:`metanav-submenu-${i}`},t)));this.combineMetanavItems()}appNavItemsWatcher(t){if(typeof t==="string"){this._appNavItems=JSON.parse(t)}else{this._appNavItems=t}}userSpecificMetanavItemsNotLoggedInWatcher(t){this._userSpecificMetanavItemsNotLoggedIn=t;this.combineMetanavItems()}languagesWatcher(t){if(typeof t==="string"){this._languages=JSON.parse(t)}else{this._languages=t}}getSiblings(){if(!this._parentElement){return[]}return Array.from(this._parentElement.children).filter((t=>t!==this.element))}disableSiblings(){this.getSiblings().forEach((t=>{t.setAttribute("aria-hidden","true")}))}enableSiblings(){this.getSiblings().forEach((t=>{t.removeAttribute("aria-hidden")}))}waitForNextRender(){return new Promise((t=>this.renderPromiseResolve=t))}resizeMenunavElement(){if(f("headerMetanavSticky").matches||f("medium").matches||!this.openSubmenuElement){Object.assign(this.menunavElement.style,{height:null})}else{const{height:t}=this.openSubmenuElement.getBoundingClientRect();Object.assign(this.menunavElement.style,{height:`${t}px`})}}async openMenuItem(t,i){this.flyoutOpen=true;this.lastOpener=t.currentTarget;this.openSubmenuElement=this.element.querySelector(`#${i.id}`);this.currentOpenMenuItem=i;await this.waitForNextRender();requestAnimationFrame((()=>{this.menunavElement.scrollTop=0;const t=this.openSubmenuElement&&u(this.openSubmenuElement)[0];t===null||t===void 0?void 0:t.focus();this.resizeMenunavElement()}))}async closeMenuItem(t=true){this.openSubmenuElement=null;this.currentOpenMenuItem=null;await this.waitForNextRender();if(t){requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null;this.resizeMenunavElement()}))}}async openMetanavItem(t,i){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=t.currentTarget;this.currentOpenMetanavItem=i;await this.waitForNextRender();requestAnimationFrame((()=>{const t=this.element.querySelector(`#${i.id}`);const s=t&&u(t)[0];s===null||s===void 0?void 0:s.focus()}))}async closeMetanavItem(){this.currentOpenMetanavItem=null;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async openLanguage(t){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=t.currentTarget;this.currentOpenLanguage=true;await this.waitForNextRender();requestAnimationFrame((()=>{const t=this.element.querySelector("#submenu-languages");const i=t&&u(t)[0];i===null||i===void 0?void 0:i.focus()}))}async closeLanguage(){this.currentOpenLanguage=false;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async requestUserSpecificMetanavItems(){if(!this.userSpecificMetanavItemsEndpoint){return}try{const t=await fetch(this.userSpecificMetanavItemsEndpoint);this.userSpecificMetanavItemsLoggedIn=await t.json();this.combineMetanavItems()}catch(t){this.combineMetanavItems(true);console.error("Error fetching data:",t);if(this.loginErrorMessage){document.querySelector("stzh-toastbar").toast(this.loginErrorMessage,{type:"error"})}}}combineMetanavItems(t=false){if(!this.userSpecificMetanavItemsEndpoint||t){this.combinedMetanavItems=[...this._metanavItems,...this._userSpecificMetanavItemsNotLoggedIn]}else{this.combinedMetanavItems=[...this._metanavItems,...this.userSpecificMetanavItemsLoggedIn]}}async componentWillLoad(){this.menuItemsWatcher(this.menuItems);this.metanavItemsWatcher(this.metanavItems);this.appNavItemsWatcher(this.appNavItems);this.languagesWatcher(this.languages);this.searchValueWatcher(this.searchValue);this.userSpecificMetanavItemsNotLoggedInWatcher(this.userSpecificMetanavItemsNotLoggedIn);this.requestUserSpecificMetanavItems();if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"header")}}componentDidRender(){if(this.renderPromiseResolve){this.renderPromiseResolve()}if(this.flyoutElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutElement)}if(this.flyoutSearchElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutSearchElement)}}componentDidLoad(){this.trap=l(this.element,Object.assign(Object.assign({},v()),{initialFocus:false}));this.flyoutResizeObserver=new ResizeObserver(this.handleFlyoutResize);if(this.flyoutElement){this.flyoutResizeObserver.observe(this.flyoutElement)}}connectedCallback(){this._parentElement=this.element.parentElement;this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(this.element)}disconnectedCallback(){var t,i;this.flyoutOpenWatcher(false);(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.flyoutResizeObserver)===null||i===void 0?void 0:i.disconnect()}render(){var t,i,s,e,a,f,u;const l=o(this.element,"metanav-before");const v=o(this.element,"metanav-after");const c={"stzh-header":true,"stzh-header--is-flyout-open":this.flyoutOpen,"stzh-header--is-flyout-search-open":this.flyoutSearchOpen,"stzh-header--is-search-filled":this.searchFilled,"stzh-header--is-fixed":this.fixed,"stzh-header--is-fixed-transition":this.fixedTransition,"stzh-header--is-sticky":this.stickyActive,"stzh-header--is-sticky-transition":this.stickyActive&&this.fixedTransition,"stzh-header--hide-logo":this.hideLogo,"stzh-header--has-empty-metabar-mobile":!l&&!v&&this._metanavItems.filter((t=>t.stay||t.stayAndShowInMobileMenu)).length===0&&this._menuItems.length===0&&(this._languages.length===0||this._languages.length>0&&!this.languageStay)&&!this.searchAction,"stzh-header--has-empty-metabar":!l&&!v&&this._metanavItems.length===0&&this._menuItems.length===0&&this._languages.length===0&&!this.searchAction,[`stzh-header--sticky-${this.sticky}`]:!!this.sticky};const d=this.languageActive||window.stzhComponents.utils.getLocale(this.element);const m=((t=this._languages)===null||t===void 0?void 0:t.find((({value:t})=>t===d)))||((i=this._languages)===null||i===void 0?void 0:i[0])||null;const p=(t,i,s)=>{var e;const n=((e=t.items)===null||e===void 0?void 0:e.length)>0||t.itemButton||!t.href?"button":"a";return r(n,Object.assign({},s,{id:t.id+"-button",href:n==="a"&&t.href,target:n==="a"&&t.target,style:{order:t.cssOrder},class:Object.assign({"stzh-header__metanav-item":true,"is-heavy":t.important,"is-stay":t.stay||t.stayAndShowInMobileMenu},i||{})}),r("span",{class:{"stzh-header__metanav-item-text":true,"is-vhidden":t.labelHidden,"has-no-short-label":!t.labelShort}},r("span",{class:"stzh-header__metanav-item-text-label-long"},t.label),r("span",{class:"stzh-header__metanav-item-text-label-short","aria-hidden":"true"},t.labelShort)),t.icon&&r("span",{class:"stzh-header__metanav-icon-wrapper"},t.icon&&r("stzh-icon",{class:`stzh-header__metanav-icon ${t.iconOpen?"is-close":""}`,name:t.icon}),t.iconOpen&&r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:t.iconOpen}),(t.badge||t.badgeEmpty)&&r("stzh-badge",{class:"stzh-header__metanav-icon-badge",label:t.badge,type:typeof t.badgeType==="undefined"?"error":t.badgeType})))};return r(h,null,r("header",{class:c},r("div",{class:"stzh-header__header",style:{paddingTop:`${this.paddingTop}px`}},this.isSmallOrMicro&&this._appNavItems.length>0&&r("div",{class:"stzh-header__app-nav-bottom"},r("stzh-app-nav",{items:this._appNavItems,"app-nav-id":this.appNavId})),r("div",{class:"stzh-header__inner"},r("div",{class:"stzh-header__main",ref:t=>this.mainElement=t},r("div",{class:"stzh-header__logobar",ref:t=>this.logobarElement=t},r("div",{class:"stzh-header__logobar-logo"},r("a",{href:this.href,class:"stzh-header__logo-link","s-object-id":this.logoAnalyticsId||"Header Logo"},r("slot",{name:"logo"}))),r("div",{class:"stzh-header__logobar-decoration"})),!this.hideMetabar&&r("div",{class:"stzh-header__metabar",ref:t=>this.metabarElement=t},r("div",{class:"stzh-header__metabar-inner"},r("slot",{name:"menu-before"}),this._menuItems.length>0&&r("button",{id:this.menuId,class:`stzh-header__burger ${this.flyoutOpen&&!this.flyoutOpenedByMetanavItem&&"is-open"}`,onClick:this.handleBurgerClick},r("stzh-icon",{class:"stzh-header__burger-icon is-close",name:"menu"}),r("stzh-icon",{class:"stzh-header__burger-icon is-open",name:"close"}),r("div",{class:"stzh-header__burger-text"},this.localization.menuLabel)),this.searchAction&&!o(this.element,"search")&&r("form",{class:"stzh-header__metabar-search",action:this.searchAction,role:"search"},r("label",{class:"stzh-header__search"},r("input",{id:this.searchId,ref:t=>this.searchInput=t,class:"stzh-header__search-input",type:"search",name:this.searchFieldName,onChange:this.handleSearchChange,onInput:this.handleSearchInput}),r("stzh-icon",{class:"stzh-header__search-icon",name:"search"}),r("div",{class:"stzh-header__search-text"},this.localization.searchLabel))),o(this.element,"search")&&r("stzh-button",{iconPosition:"left",onClick:this.handleSearchButtonClick,variant:"tertiary-plain",size:"small"},r("stzh-icon",{slot:"icon",name:"search",class:this.flyoutSearchOpen?"stzh-header__search-button--is-hidden":""}),r("stzh-icon",{slot:"icon",name:"close",class:this.flyoutSearchOpen?"":"stzh-header__search-button--is-hidden"}),this.localization.searchLabel),r("slot",{name:"menu-after"}),!this.isSmallOrMicro&&this._appNavItems.length>0&&r("div",{class:"stzh-header__app-nav"},r("stzh-app-nav",{items:this._appNavItems,"app-nav-id":this.appNavId})),r("div",{class:"stzh-header__metabar-nav",id:this.metanavId,tabindex:"-1"},r("slot",{name:"metanav-before"}),this.combinedMetanavItems.map((t=>{var i,s;return((i=t.items)===null||i===void 0?void 0:i.length)>0||t.itemButton?r(n,null,p(t,{"is-popover-mobile":true},{"aria-expanded":t===this.currentOpenMetanavItem?"true":"false","aria-controls":t.id,onClick:i=>{if(t===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(i,t)}this.handleMetanavItemClick(i,t)}}),r("stzh-popover",{class:{"stzh-header__metanav-popover":true},placement:"bottom-end",distance:20,variant:t.variant,size:typeof t.size==="undefined"?"large":t.size},p(t,{"is-popover-desktop":true},{onClick:i=>{this.handleMetanavItemClick(i,t)}}),r("div",{slot:"content"},((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("stzh-menu",null,t.items.map((i=>r("stzh-menu-item",{class:{"stzh-header__metanav-menu-item":true,"is-heavy":typeof t.importantSubmenu==="undefined"||t.importantSubmenu},size:typeof t.size==="undefined"?"large":t.size,variant:t.variant,href:i.href,target:i.target,icon:i.icon,counter:i.counter,badge:i.badge,badgeType:i.badgeType,onClick:t=>{this.handleMetanavItemChildClick(t,i)}},i.label))))),t.itemButton&&r("stzh-button",{slot:"action",size:t.itemButton.size,href:t.itemButton.href,target:t.itemButton.target,onClick:i=>{this.handleMetanavItemButtonClick(i,t.itemButton)}},t.itemButton.label),t.itemButtonExtra&&r("stzh-button",{class:{"stzh-header__metanav-menu-item--extra":true},slot:"action",size:t.itemButtonExtra.size,href:t.itemButtonExtra.href,target:t.itemButtonExtra.target,onClick:i=>{this.handleMetanavItemButtonClick(i,t.itemButtonExtra)}},t.itemButtonExtra.label))):p(t,{},{onClick:i=>{this.handleMetanavItemClick(i,t)}})})),((s=this._languages)===null||s===void 0?void 0:s.length)>0&&r(n,null,r("h2",{class:"stzh-header__vhidden"},this.localization.languageLabel),this._menuItems.length>0&&this.languageStay&&r("button",{id:this.isSmallOrMicro?this.languageId:null,class:{"stzh-header__metanav-item":true,"is-popover-mobile":true,"is-stay":this.languageStay},"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",onClick:t=>{if(this.currentOpenLanguage){this.closeLanguage()}else{this.openLanguage(t)}}},r("span",{class:"stzh-header__metanav-item-text"},m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),r("stzh-popover",{class:"stzh-header__metanav-popover is-langnav",placement:"bottom-end",distance:20},r("button",{id:this.isSmallOrMicro?null:this.languageId,class:{"stzh-header__metanav-item":true,"is-popover-desktop":this._menuItems.length>0,"is-stay":this.languageStay}},r("span",{class:"stzh-header__metanav-item-text"},m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),r("div",{slot:"content"},r("stzh-menu",null,this._languages.map((t=>r("stzh-menu-item",{class:"stzh-header__metanav-menu-item",active:(m===null||m===void 0?void 0:m.value)===t.value,href:t.value,onClick:i=>this.handleLanguageClick(i,t)},t.text))))))),r("slot",{name:"metanav-after"}))))))),(this._menuItems.length>0||((e=this.combinedMetanavItems)===null||e===void 0?void 0:e.length)>0)&&r("div",{ref:t=>this.flyoutElement=t,class:"stzh-header__flyout"},r("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropClick}),r("div",{class:"stzh-header__flyout-scrollbar"}),r("div",{class:"stzh-header__menu"},r("nav",{class:"stzh-header__menu-nav",ref:t=>this.menunavElement=t,"aria-label":this.localization.navigationLabel},r("ul",{class:"stzh-header__menu-list is-level-1"},this._menuItems.map((t=>{var i,s;return r("li",{class:{"stzh-header__menu-list-item":true,"is-open":t===this.currentOpenMenuItem}},((i=t.items)===null||i===void 0?void 0:i.length)>0?r("button",{"aria-expanded":t===this.currentOpenMenuItem?"true":"false","aria-controls":t.id,class:"stzh-header__menu-item is-level-1 has-items",onClick:t===this.currentOpenMenuItem?()=>this.closeMenuItem():i=>this.openMenuItem(i,t)},t.label):r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-1"},t.label),((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("ul",{id:t.id,class:"stzh-header__menu-list is-level-2",onFocusout:this.handleMenuListFocusout},r("li",{class:"stzh-header__menu-list-item is-backlink"},r("button",{class:"stzh-header__menu-item is-level-2 is-backlink",onClick:()=>this.closeMenuItem()},r("stzh-icon",{name:"angle-left"}),r("span",null,this.menuBackLabel?this.menuBackLabel:this.localization.menuBackLabel))),r("li",{class:"stzh-header__menu-list-item"},r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-2 is-main"},t.label)),t.items.map((t=>r("li",{class:"stzh-header__menu-list-item"},r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-2"},t.label))))))})))),(((a=this.combinedMetanavItems)===null||a===void 0?void 0:a.length)>0||((f=this._languages)===null||f===void 0?void 0:f.length)>0)&&r("div",{class:"stzh-header__menu-metanav"},r("nav",{class:"stzh-header__menu-metanav-nav"},r("ul",{class:"stzh-header__menu-metanav-list is-level-1"},this.combinedMetanavItems.map((t=>{var i,s,e;return r("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":t===this.currentOpenMetanavItem}},((i=t.items)===null||i===void 0?void 0:i.length)>0?r("button",{"aria-expanded":t===this.currentOpenMetanavItem?"true":"false","aria-controls":t.id,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":t.stay&&!t.stayAndShowInMobileMenu},onClick:i=>{if(t===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(i,t)}this.handleMetanavItemClick(i,t)}},r("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":t.labelHidden}},t.label),t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon})):r("a",{href:t.href,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":t.stay&&!t.stayAndShowInMobileMenu},onClick:i=>{this.handleMetanavItemClick(i,t)}},r("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":t.labelHidden}},t.label),t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon})),((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("ul",{id:t.id,class:"stzh-header__menu-metanav-list is-level-2"},r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},r("span",null,t.label),r("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:(e=this.localization.closeMetanavMenuLabel)===null||e===void 0?void 0:e.replace(/\{itemLabel\}/gi,t.label),onClick:()=>this.closeMetanavItem()}))),t.items.map((t=>r("li",{class:"stzh-header__menu-metanav-list-item"},r("a",{href:t.href,class:"stzh-header__menu-metanav-item is-level-2"},t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon}),r("span",{class:"stzh-header__menu-metanav-item-text"},r("span",null,t.label),t.counter!==undefined&&t.counter>0&&r("span",{class:"stzh-header__menu-metanav-item-counter"},"(",t.counter,")")))))),t.itemButton&&r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-action"},r("stzh-button",{href:t.itemButton.href,target:t.itemButton.target},t.itemButton.label))),t.itemButtonExtra&&r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-action is-action--extra"},r("stzh-button",{href:t.itemButtonExtra.href,target:t.itemButtonExtra.target},t.itemButtonExtra.label)))))})),((u=this._languages)===null||u===void 0?void 0:u.length)>0&&r("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":this.currentOpenLanguage}},r("button",{"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",class:"stzh-header__menu-metanav-item is-level-1",onClick:t=>this.openLanguage(t)},r("span",null,m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"angle-down"})),r("ul",{id:"submenu-languages",class:"stzh-header__menu-metanav-list is-level-2"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},r("span",null,this.localization.dialogLanguageTitle),r("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:"Sprach-Dialog schliessen",onClick:()=>this.closeLanguage()})),this._languages.map((t=>r("li",{class:"stzh-header__menu-metanav-list-item"},r("a",{class:"stzh-header__menu-metanav-item is-level-2 is-language",href:t.value,onClick:i=>this.handleLanguageClick(i,t)},r("span",null,t.text),(m===null||m===void 0?void 0:m.value)===t.value&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"checkmark"})))))))))))),o(this.element,"search")&&r("div",{ref:t=>this.flyoutSearchElement=t,class:"stzh-header__flyout-search"},r("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropSearchClick}),r("div",{class:"stzh-header__flyout-scrollbar"}),r("div",{class:"stzh-header__flyout-search-main"},r("slot",{name:"search"})))))}get element(){return a(this)}static get watchers(){return{flyoutOpen:["flyoutOpenWatcher","fixedWatcher"],flyoutSearchOpen:["flyoutOpenWatcher","fixedWatcher"],fixed:["fixedWatcher"],headerHeight:["fixedWatcher"],sticky:["stickyWatcher"],searchValue:["searchValueWatcher"],menuItems:["menuItemsWatcher"],metanavItems:["metanavItemsWatcher"],appNavItems:["appNavItemsWatcher"],userSpecificMetanavItemsNotLoggedIn:["userSpecificMetanavItemsNotLoggedInWatcher"],languages:["languagesWatcher"]}}};p.style=d();function _(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i){t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m");t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m")}t("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m");t("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"];t["EPSG:3785"]=t["EPSG:3857"];t.GOOGLE=t["EPSG:3857"];t["EPSG:900913"]=t["EPSG:3857"];t["EPSG:102113"]=t["EPSG:3857"]}var g=1;var M=2;var z=3;var w=4;var y=5;var b=6378137;var x=6356752.314;var E=.0066943799901413165;var S=484813681109536e-20;var G=Math.PI/2;var P=.16666666666666666;var k=.04722222222222222;var N=.022156084656084655;var I=1e-10;var C=.017453292519943295;var A=57.29577951308232;var R=Math.PI/4;var T=Math.PI*2;var O=3.14159265359;var L={};L.greenwich=0;L.lisbon=-9.131906111111;L.paris=2.337229166667;L.bogota=-74.080916666667;L.madrid=-3.687938888889;L.rome=12.452333333333;L.bern=7.439583333333;L.jakarta=106.807719444444;L.ferro=-17.666666666667;L.brussels=4.367975;L.stockholm=18.058277777778;L.athens=23.7163375;L.oslo=10.722916666667;var F={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var D=/[\s_\-\/\(\)]/g;function W(t,i){if(t[i]){return t[i]}var s=Object.keys(t);var e=i.toLowerCase().replace(D,"");var r=-1;var n,h;while(++r<s.length){n=s[r];h=n.toLowerCase().replace(D,"");if(h===e){return t[n]}}}function j(t){var i={};var s=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,i){var s=i.split("=");s.push(true);t[s[0].toLowerCase()]=s[1];return t}),{});var e,r,n;var h={proj:"projName",datum:"datumCode",rf:function(t){i.rf=parseFloat(t)},lat_0:function(t){i.lat0=t*C},lat_1:function(t){i.lat1=t*C},lat_2:function(t){i.lat2=t*C},lat_ts:function(t){i.lat_ts=t*C},lon_0:function(t){i.long0=t*C},lon_1:function(t){i.long1=t*C},lon_2:function(t){i.long2=t*C},alpha:function(t){i.alpha=parseFloat(t)*C},gamma:function(t){i.rectified_grid_angle=parseFloat(t)*C},lonc:function(t){i.longc=t*C},x_0:function(t){i.x0=parseFloat(t)},y_0:function(t){i.y0=parseFloat(t)},k_0:function(t){i.k0=parseFloat(t)},k:function(t){i.k0=parseFloat(t)},a:function(t){i.a=parseFloat(t)},b:function(t){i.b=parseFloat(t)},r:function(t){i.a=i.b=parseFloat(t)},r_a:function(){i.R_A=true},zone:function(t){i.zone=parseInt(t,10)},south:function(){i.utmSouth=true},towgs84:function(t){i.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){i.to_meter=parseFloat(t)},units:function(t){i.units=t;var s=W(F,t);if(s){i.to_meter=s.to_meter}},from_greenwich:function(t){i.from_greenwich=t*C},pm:function(t){var s=W(L,t);i.from_greenwich=(s?s:parseFloat(t))*C},nadgrids:function(t){if(t==="@null"){i.datumCode="none"}else{i.nadgrids=t}},axis:function(t){var s="ewnsud";if(t.length===3&&s.indexOf(t.substr(0,1))!==-1&&s.indexOf(t.substr(1,1))!==-1&&s.indexOf(t.substr(2,1))!==-1){i.axis=t}},approx:function(){i.approx=true},over:function(){i.over=true}};for(e in s){r=s[e];if(e in h){n=h[e];if(typeof n==="function"){n(r)}else{i[n]=r}}else{i[e]=r}}if(typeof i.datumCode==="string"&&i.datumCode!=="WGS84"){i.datumCode=i.datumCode.toLowerCase()}i["projStr"]=t;return i}class V{static getId(t){const i=t.find((t=>Array.isArray(t)&&t[0]==="ID"));if(i&&i.length>=3){return{authority:i[1],code:parseInt(i[2],10)}}return null}static convertUnit(t,i="unit"){if(!t||t.length<3){return{type:i,name:"unknown",conversion_factor:null}}const s=t[1];const e=parseFloat(t[2])||null;const r=t.find((t=>Array.isArray(t)&&t[0]==="ID"));const n=r?{authority:r[1],code:parseInt(r[2],10)}:null;return{type:i,name:s,conversion_factor:e,id:n}}static convertAxis(t){const i=t[1]||"Unknown";let s;const e=i.match(/^\((.)\)$/);if(e){const t=e[1].toUpperCase();if(t==="E")s="east";else if(t==="N")s="north";else if(t==="U")s="up";else throw new Error(`Unknown axis abbreviation: ${t}`)}else{s=t[2]?t[2].toLowerCase():"unknown"}const r=t.find((t=>Array.isArray(t)&&t[0]==="ORDER"));const n=r?parseInt(r[1],10):null;const h=t.find((t=>Array.isArray(t)&&(t[0]==="LENGTHUNIT"||t[0]==="ANGLEUNIT"||t[0]==="SCALEUNIT")));const a=this.convertUnit(h);return{name:i,direction:s,unit:a,order:n}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&t[0]==="AXIS")).map((t=>this.convertAxis(t))).sort(((t,i)=>(t.order||0)-(i.order||0)))}static convert(t,i={}){switch(t[0]){case"PROJCRS":i.type="ProjectedCRS";i.name=t[1];i.base_crs=t.find((t=>Array.isArray(t)&&t[0]==="BASEGEOGCRS"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="BASEGEOGCRS"))):null;i.conversion=t.find((t=>Array.isArray(t)&&t[0]==="CONVERSION"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="CONVERSION"))):null;const s=t.find((t=>Array.isArray(t)&&t[0]==="CS"));if(s){i.coordinate_system={type:s[1],axis:this.extractAxes(t)}}const e=t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT"));if(e){const t=this.convertUnit(e);i.coordinate_system.unit=t}i.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":i.type="GeographicCRS";i.name=t[1];const r=t.find((t=>Array.isArray(t)&&(t[0]==="DATUM"||t[0]==="ENSEMBLE")));if(r){const s=this.convert(r);if(r[0]==="ENSEMBLE"){i.datum_ensemble=s}else{i.datum=s}const e=t.find((t=>Array.isArray(t)&&t[0]==="PRIMEM"));if(e&&e[1]!=="Greenwich"){s.prime_meridian={name:e[1],longitude:parseFloat(e[2])}}}i.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)};i.id=this.getId(t);break;case"DATUM":i.type="GeodeticReferenceFrame";i.name=t[1];i.ellipsoid=t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"))):null;break;case"ENSEMBLE":i.type="DatumEnsemble";i.name=t[1];i.members=t.filter((t=>Array.isArray(t)&&t[0]==="MEMBER")).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const n=t.find((t=>Array.isArray(t)&&t[0]==="ENSEMBLEACCURACY"));if(n){i.accuracy=parseFloat(n[1])}const h=t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"));if(h){i.ellipsoid=this.convert(h)}i.id=this.getId(t);break;case"ELLIPSOID":i.type="Ellipsoid";i.name=t[1];i.semi_major_axis=parseFloat(t[2]);i.inverse_flattening=parseFloat(t[3]);t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT")),i):null;break;case"CONVERSION":i.type="Conversion";i.name=t[1];i.method=t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))):null;i.parameters=t.filter((t=>Array.isArray(t)&&t[0]==="PARAMETER")).map((t=>this.convert(t)));break;case"METHOD":i.type="Method";i.name=t[1];i.id=this.getId(t);break;case"PARAMETER":i.type="Parameter";i.name=t[1];i.value=parseFloat(t[2]);i.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&(t[0]==="LENGTHUNIT"||t[0]==="ANGLEUNIT"||t[0]==="SCALEUNIT"))));i.id=this.getId(t);break;case"BOUNDCRS":i.type="BoundCRS";const a=t.find((t=>Array.isArray(t)&&t[0]==="SOURCECRS"));if(a){const t=a.find((t=>Array.isArray(t)));i.source_crs=t?this.convert(t):null}const o=t.find((t=>Array.isArray(t)&&t[0]==="TARGETCRS"));if(o){const t=o.find((t=>Array.isArray(t)));i.target_crs=t?this.convert(t):null}const f=t.find((t=>Array.isArray(t)&&t[0]==="ABRIDGEDTRANSFORMATION"));if(f){i.transformation=this.convert(f)}else{i.transformation=null}break;case"ABRIDGEDTRANSFORMATION":i.type="Transformation";i.name=t[1];i.method=t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))):null;i.parameters=t.filter((t=>Array.isArray(t)&&(t[0]==="PARAMETER"||t[0]==="PARAMETERFILE"))).map((t=>{if(t[0]==="PARAMETER"){return this.convert(t)}else if(t[0]==="PARAMETERFILE"){return{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}}}));if(i.parameters.length===7){const t=i.parameters[6];if(t.name==="Scale difference"){t.value=Math.round((t.value-1)*1e12)/1e6}}i.id=this.getId(t);break;case"AXIS":if(!i.coordinate_system){i.coordinate_system={type:"unspecified",axis:[]}}i.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");if(i.coordinate_system&&i.coordinate_system.axis){i.coordinate_system.axis.forEach((t=>{if(!t.unit){t.unit=u}}))}if(u.conversion_factor&&u.conversion_factor!==1){if(i.semi_major_axis){i.semi_major_axis={value:i.semi_major_axis,unit:u}}}break;default:i.keyword=t[0];break}return i}}class U extends V{static convert(t,i={}){super.convert(t,i);if(i.coordinate_system&&i.coordinate_system.subtype==="Cartesian"){delete i.coordinate_system}if(i.usage){delete i.usage}return i}}class q extends V{static convert(t,i={}){super.convert(t,i);const s=t.find((t=>Array.isArray(t)&&t[0]==="CS"));if(s){i.coordinate_system={subtype:s[1],axis:this.extractAxes(t)}}const e=t.find((t=>Array.isArray(t)&&t[0]==="USAGE"));if(e){const t=e.find((t=>Array.isArray(t)&&t[0]==="SCOPE"));const s=e.find((t=>Array.isArray(t)&&t[0]==="AREA"));const r=e.find((t=>Array.isArray(t)&&t[0]==="BBOX"));i.usage={};if(t){i.usage.scope=t[1]}if(s){i.usage.area=s[1]}if(r){i.usage.bbox=r.slice(1)}}return i}}function B(t){if(t.find((t=>Array.isArray(t)&&t[0]==="USAGE"))){return"2019"}if(t.find((t=>Array.isArray(t)&&t[0]==="CS"))){return"2015"}if(t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS"){return"2015"}return"2015"}function H(t){const i=B(t);const s=i==="2019"?q:U;return s.convert(t)}function X(t){const i=t.toUpperCase();if(i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")){return"WKT2"}if(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT")){return"WKT1"}return"WKT1"}var Y=1;var J=2;var K=3;var Z=4;var $=5;var Q=-1;var tt=/\s/;var it=/[A-Za-z]/;var st=/[A-Za-z84_]/;var et=/[,\]]/;var rt=/[\d\.E\-\+]/;function nt(t){if(typeof t!=="string"){throw new Error("not a string")}this.text=t.trim();this.level=0;this.place=0;this.root=null;this.stack=[];this.currentObject=null;this.state=Y}nt.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==Z){while(tt.test(t)){if(this.place>=this.text.length){return}t=this.text[this.place++]}}switch(this.state){case Y:return this.neutral(t);case J:return this.keyword(t);case Z:return this.quoted(t);case $:return this.afterquote(t);case K:return this.number(t);case Q:return}};nt.prototype.afterquote=function(t){if(t==='"'){this.word+='"';this.state=Z;return}if(et.test(t)){this.word=this.word.trim();this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)};nt.prototype.afterItem=function(t){if(t===","){if(this.word!==null){this.currentObject.push(this.word)}this.word=null;this.state=Y;return}if(t==="]"){this.level--;if(this.word!==null){this.currentObject.push(this.word);this.word=null}this.state=Y;this.currentObject=this.stack.pop();if(!this.currentObject){this.state=Q}return}};nt.prototype.number=function(t){if(rt.test(t)){this.word+=t;return}if(et.test(t)){this.word=parseFloat(this.word);this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)};nt.prototype.quoted=function(t){if(t==='"'){this.state=$;return}this.word+=t;return};nt.prototype.keyword=function(t){if(st.test(t)){this.word+=t;return}if(t==="["){var i=[];i.push(this.word);this.level++;if(this.root===null){this.root=i}else{this.currentObject.push(i)}this.stack.push(this.currentObject);this.currentObject=i;this.state=Y;return}if(et.test(t)){this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place)};nt.prototype.neutral=function(t){if(it.test(t)){this.word=t;this.state=J;return}if(t==='"'){this.word="";this.state=Z;return}if(rt.test(t)){this.word=t;this.state=K;return}if(et.test(t)){this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place)};nt.prototype.output=function(){while(this.place<this.text.length){this.readCharicter()}if(this.state===Q){return this.root}throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ht(t){var i=new nt(t);return i.output()}function at(t,i,s){if(Array.isArray(i)){s.unshift(i);i=null}var e=i?{}:t;var r=s.reduce((function(t,i){ot(i,t);return t}),e);if(i){t[i]=r}}function ot(t,i){if(!Array.isArray(t)){i[t]=true;return}var s=t.shift();if(s==="PARAMETER"){s=t.shift()}if(t.length===1){if(Array.isArray(t[0])){i[s]={};ot(t[0],i[s]);return}i[s]=t[0];return}if(!t.length){i[s]=true;return}if(s==="TOWGS84"){i[s]=t;return}if(s==="AXIS"){if(!(s in i)){i[s]=[]}i[s].push(t);return}if(!Array.isArray(s)){i[s]={}}var e;switch(s){case"UNIT":case"PRIMEM":case"VERT_DATUM":i[s]={name:t[0].toLowerCase(),convert:t[1]};if(t.length===3){ot(t[2],i[s])}return;case"SPHEROID":case"ELLIPSOID":i[s]={name:t[0],a:t[1],rf:t[2]};if(t.length===4){ot(t[3],i[s])}return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]];at(i,s,t);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":t[0]=["name",t[0]];at(i,s,t);i[s].type=s;return;default:e=-1;while(++e<t.length){if(!Array.isArray(t[e])){return ot(t,i[s])}}return at(i,s,t)}}var ft=.017453292519943295;function ut(t){return t*ft}function lt(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");if(!t.long0&&t.longc&&(i==="albers conic equal area"||i==="lambert azimuthal equal area")){t.long0=t.longc}if(!t.lat_ts&&t.lat1&&(i==="stereographic south pole"||i==="polar stereographic (variant b)")){t.lat0=ut(t.lat1>0?90:-90);t.lat_ts=t.lat1;delete t.lat1}else if(!t.lat_ts&&t.lat0&&(i==="polar stereographic"||i==="polar stereographic (variant a)")){t.lat_ts=t.lat0;t.lat0=ut(t.lat0>0?90:-90);delete t.lat1}}function vt(t){let i={units:null,to_meter:undefined};if(typeof t==="string"){i.units=t.toLowerCase();if(i.units==="metre"){i.units="meter"}if(i.units==="meter"){i.to_meter=1}}else if(t&&t.name){i.units=t.name.toLowerCase();if(i.units==="metre"){i.units="meter"}i.to_meter=t.conversion_factor}return i}function ct(t){if(typeof t==="object"){return t.value*t.unit.conversion_factor}return t}function dt(t,i){if(t.ellipsoid.radius){i.a=t.ellipsoid.radius;i.rf=0}else{i.a=ct(t.ellipsoid.semi_major_axis);if(t.ellipsoid.inverse_flattening!==undefined){i.rf=t.ellipsoid.inverse_flattening}else if(t.ellipsoid.semi_major_axis!==undefined&&t.ellipsoid.semi_minor_axis!==undefined){i.rf=i.a/(i.a-ct(t.ellipsoid.semi_minor_axis))}}}function mt(t,i={}){if(!t||typeof t!=="object"){return t}if(t.type==="BoundCRS"){mt(t.source_crs,i);if(t.transformation){if(t.transformation.method&&t.transformation.method.name==="NTv2"){i.nadgrids=t.transformation.parameters[0].value}else{i.datum_params=t.transformation.parameters.map((t=>t.value))}}return i}Object.keys(t).forEach((s=>{const e=t[s];if(e===null){return}switch(s){case"name":if(i.srsCode){break}i.name=e;i.srsCode=e;break;case"type":if(e==="GeographicCRS"){i.projName="longlat"}else if(e==="ProjectedCRS"&&t.conversion&&t.conversion.method){i.projName=t.conversion.method.name}break;case"datum":case"datum_ensemble":if(e.ellipsoid){i.ellps=e.ellipsoid.name;dt(e,i)}if(e.prime_meridian){i.from_greenwich=e.prime_meridian.longitude*Math.PI/180}break;case"ellipsoid":i.ellps=e.name;dt(e,i);break;case"prime_meridian":i.long0=(e.longitude||0)*Math.PI/180;break;case"coordinate_system":if(e.axis){i.axis=e.axis.map((t=>{const i=t.direction;if(i==="east")return"e";if(i==="north")return"n";if(i==="west")return"w";if(i==="south")return"s";throw new Error(`Unknown axis direction: ${i}`)})).join("")+"u";if(e.unit){const{units:t,to_meter:s}=vt(e.unit);i.units=t;i.to_meter=s}else if(e.axis[0]&&e.axis[0].unit){const{units:t,to_meter:s}=vt(e.axis[0].unit);i.units=t;i.to_meter=s}}break;case"id":if(e.authority&&e.code){i.title=e.authority+":"+e.code}break;case"conversion":if(e.method&&e.method.name){i.projName=e.method.name}if(e.parameters){e.parameters.forEach((t=>{const s=t.name.toLowerCase().replace(/\s+/g,"_");const e=t.value;if(t.unit&&t.unit.conversion_factor){i[s]=e*t.unit.conversion_factor}else if(t.unit==="degree"){i[s]=e*Math.PI/180}else{i[s]=e}}))}break;case"unit":if(e.name){i.units=e.name.toLowerCase();if(i.units==="metre"){i.units="meter"}}if(e.conversion_factor){i.to_meter=e.conversion_factor}break;case"base_crs":mt(e,i);i.datumCode=e.id?e.id.authority+"_"+e.id.code:e.name;break}}));if(i.latitude_of_false_origin!==undefined){i.lat0=i.latitude_of_false_origin}if(i.longitude_of_false_origin!==undefined){i.long0=i.longitude_of_false_origin}if(i.latitude_of_standard_parallel!==undefined){i.lat0=i.latitude_of_standard_parallel;i.lat1=i.latitude_of_standard_parallel}if(i.latitude_of_1st_standard_parallel!==undefined){i.lat1=i.latitude_of_1st_standard_parallel}if(i.latitude_of_2nd_standard_parallel!==undefined){i.lat2=i.latitude_of_2nd_standard_parallel}if(i.latitude_of_projection_centre!==undefined){i.lat0=i.latitude_of_projection_centre}if(i.longitude_of_projection_centre!==undefined){i.longc=i.longitude_of_projection_centre}if(i.easting_at_false_origin!==undefined){i.x0=i.easting_at_false_origin}if(i.northing_at_false_origin!==undefined){i.y0=i.northing_at_false_origin}if(i.latitude_of_natural_origin!==undefined){i.lat0=i.latitude_of_natural_origin}if(i.longitude_of_natural_origin!==undefined){i.long0=i.longitude_of_natural_origin}if(i.longitude_of_origin!==undefined){i.long0=i.longitude_of_origin}if(i.false_easting!==undefined){i.x0=i.false_easting}if(i.easting_at_projection_centre){i.x0=i.easting_at_projection_centre}if(i.false_northing!==undefined){i.y0=i.false_northing}if(i.northing_at_projection_centre){i.y0=i.northing_at_projection_centre}if(i.standard_parallel_1!==undefined){i.lat1=i.standard_parallel_1}if(i.standard_parallel_2!==undefined){i.lat2=i.standard_parallel_2}if(i.scale_factor_at_natural_origin!==undefined){i.k0=i.scale_factor_at_natural_origin}if(i.scale_factor_at_projection_centre!==undefined){i.k0=i.scale_factor_at_projection_centre}if(i.scale_factor_on_pseudo_standard_parallel!==undefined){i.k0=i.scale_factor_on_pseudo_standard_parallel}if(i.azimuth!==undefined){i.alpha=i.azimuth}if(i.azimuth_at_projection_centre!==undefined){i.alpha=i.azimuth_at_projection_centre}if(i.angle_from_rectified_to_skew_grid){i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid}lt(i);return i}var pt=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function _t(t,i){var s=i[0];var e=i[1];if(!(s in t)&&e in t){t[s]=t[e];if(i.length===3){t[s]=i[2](t[s])}}}function gt(t){var i=Object.keys(t);for(var s=0,e=i.length;s<e;++s){var r=i[s];if(pt.indexOf(r)!==-1){Mt(t[r])}if(typeof t[r]==="object"){gt(t[r])}}}function Mt(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];if(i&&i in t.AUTHORITY){t.title=i+":"+t.AUTHORITY[i]}}if(t.type==="GEOGCS"){t.projName="longlat"}else if(t.type==="LOCAL_CS"){t.projName="identity";t.local=true}else{if(typeof t.PROJECTION==="object"){t.projName=Object.keys(t.PROJECTION)[0]}else{t.projName=t.PROJECTION}}if(t.AXIS){var s="";for(var e=0,r=t.AXIS.length;e<r;++e){var n=[t.AXIS[e][0].toLowerCase(),t.AXIS[e][1].toLowerCase()];if(n[0].indexOf("north")!==-1||(n[0]==="y"||n[0]==="lat")&&n[1]==="north"){s+="n"}else if(n[0].indexOf("south")!==-1||(n[0]==="y"||n[0]==="lat")&&n[1]==="south"){s+="s"}else if(n[0].indexOf("east")!==-1||(n[0]==="x"||n[0]==="lon")&&n[1]==="east"){s+="e"}else if(n[0].indexOf("west")!==-1||(n[0]==="x"||n[0]==="lon")&&n[1]==="west"){s+="w"}}if(s.length===2){s+="u"}if(s.length===3){t.axis=s}}if(t.UNIT){t.units=t.UNIT.name.toLowerCase();if(t.units==="metre"){t.units="meter"}if(t.UNIT.convert){if(t.type==="GEOGCS"){if(t.DATUM&&t.DATUM.SPHEROID){t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a}}else{t.to_meter=t.UNIT.convert}}}var h=t.GEOGCS;if(t.type==="GEOGCS"){h=t}if(h){if(h.DATUM){t.datumCode=h.DATUM.name.toLowerCase()}else{t.datumCode=h.name.toLowerCase()}if(t.datumCode.slice(0,2)==="d_"){t.datumCode=t.datumCode.slice(2)}if(t.datumCode==="new_zealand_1949"){t.datumCode="nzgd49"}if(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984"){if(t.PROJECTION==="Mercator_Auxiliary_Sphere"){t.sphere=true}t.datumCode="wgs84"}if(t.datumCode==="belge_1972"){t.datumCode="rnb72"}if(h.DATUM&&h.DATUM.SPHEROID){t.ellps=h.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk");if(t.ellps.toLowerCase().slice(0,13)==="international"){t.ellps="intl"}t.a=h.DATUM.SPHEROID.a;t.rf=parseFloat(h.DATUM.SPHEROID.rf,10)}if(h.DATUM&&h.DATUM.TOWGS84){t.datum_params=h.DATUM.TOWGS84}if(~t.datumCode.indexOf("osgb_1936")){t.datumCode="osgb36"}if(~t.datumCode.indexOf("osni_1952")){t.datumCode="osni52"}if(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965")){t.datumCode="ire65"}if(t.datumCode==="ch1903+"){t.datumCode="ch1903"}if(~t.datumCode.indexOf("israel")){t.datumCode="isr93"}}if(t.b&&!isFinite(t.b)){t.b=t.a}if(t.rectified_grid_angle){t.rectified_grid_angle=ut(t.rectified_grid_angle)}function a(i){var s=t.to_meter||1;return i*s}var o=function(i){return _t(t,i)};var f=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ut],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ut],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",ut],["lat0","latitude_of_origin",ut],["lat0","standard_parallel_1",ut],["lat1","standard_parallel_1",ut],["lat2","standard_parallel_2",ut],["azimuth","Azimuth"],["alpha","azimuth",ut],["srsCode","name"]];f.forEach(o);lt(t)}function zt(t){if(typeof t==="object"){return mt(t)}const i=X(t);var s=ht(t);if(i==="WKT2"){const t=H(s);return mt(t)}var e=s[0];var r={};ot(s,r);gt(r);return r[e]}function wt(t){var i=this;if(arguments.length===2){var s=arguments[1];if(typeof s==="string"){if(s.charAt(0)==="+"){wt[t]=j(arguments[1])}else{wt[t]=zt(arguments[1])}}else if(s&&typeof s==="object"&&!("projName"in s)){wt[t]=zt(arguments[1])}else{wt[t]=s;if(!s){delete wt[t]}}}else if(arguments.length===1){if(Array.isArray(t)){return t.map((function(t){if(Array.isArray(t)){return wt.apply(i,t)}else{return wt(t)}}))}else if(typeof t==="string"){if(t in wt){return wt[t]}}else if("EPSG"in t){wt["EPSG:"+t.EPSG]=t}else if("ESRI"in t){wt["ESRI:"+t.ESRI]=t}else if("IAU2000"in t){wt["IAU2000:"+t.IAU2000]=t}else{console.log(t)}return}}_(wt);function yt(t){return typeof t==="string"}function bt(t){return t in wt}function xt(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t==="object"&&!("srsCode"in t)}var Et=["3857","900913","3785","102113"];function St(t){var i=W(t,"authority");if(!i){return}var s=W(i,"epsg");return s&&Et.indexOf(s)>-1}function Gt(t){var i=W(t,"extension");if(!i){return}return W(i,"proj4")}function Pt(t){return t[0]==="+"}function kt(t){if(yt(t)){if(bt(t)){return wt[t]}if(xt(t)){var i=zt(t);if(St(i)){return wt["EPSG:3857"]}var s=Gt(i);if(s){return j(s)}return i}if(Pt(t)){return j(t)}}else if(!("projName"in t)){return zt(t)}else{return t}}function Nt(t,i){t=t||{};var s,e;if(!i){return t}for(e in i){s=i[e];if(s!==undefined){t[e]=s}}return t}function It(t,i,s){var e=t*i;return s/Math.sqrt(1-e*e)}function Ct(t){return t<0?-1:1}function At(t,i){if(i){return t}return Math.abs(t)<=O?t:t-Ct(t)*T}function Rt(t,i,s){var e=t*s;var r=.5*t;e=Math.pow((1-e)/(1+e),r);return Math.tan(.5*(G-i))/e}function Tt(t,i){var s=.5*t;var e,r;var n=G-2*Math.atan(i);for(var h=0;h<=15;h++){e=t*Math.sin(n);r=G-2*Math.atan(i*Math.pow((1-e)/(1+e),s))-n;n+=r;if(Math.abs(r)<=1e-10){return n}}return-9999}function Ot(){var t=this.b/this.a;this.es=1-t*t;if(!("x0"in this)){this.x0=0}if(!("y0"in this)){this.y0=0}this.e=Math.sqrt(this.es);if(this.lat_ts){if(this.sphere){this.k0=Math.cos(this.lat_ts)}else{this.k0=It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}else{if(!this.k0){if(this.k){this.k0=this.k}else{this.k0=1}}}}function Lt(t){var i=t.x;var s=t.y;if(s*A>90&&s*A<-90&&i*A>180&&i*A<-180){return null}var e,r;if(Math.abs(Math.abs(s)-G)<=I){return null}else{if(this.sphere){e=this.x0+this.a*this.k0*At(i-this.long0,this.over);r=this.y0+this.a*this.k0*Math.log(Math.tan(R+.5*s))}else{var n=Math.sin(s);var h=Rt(this.e,s,n);e=this.x0+this.a*this.k0*At(i-this.long0,this.over);r=this.y0-this.a*this.k0*Math.log(h)}t.x=e;t.y=r;return t}}function Ft(t){var i=t.x-this.x0;var s=t.y-this.y0;var e,r;if(this.sphere){r=G-2*Math.atan(Math.exp(-s/(this.a*this.k0)))}else{var n=Math.exp(-s/(this.a*this.k0));r=Tt(this.e,n);if(r===-9999){return null}}e=At(this.long0+i/(this.a*this.k0),this.over);t.x=e;t.y=r;return t}var Dt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];var Wt={init:Ot,forward:Lt,inverse:Ft,names:Dt};function jt(){}function Vt(t){return t}var Ut=["longlat","identity"];var qt={init:jt,forward:Vt,inverse:Vt,names:Ut};var Bt=[Wt,qt];var Ht={};var Xt=[];function Yt(t,i){var s=Xt.length;if(!t.names){console.log(i);return true}Xt[s]=t;t.names.forEach((function(t){Ht[t.toLowerCase()]=s}));return this}function Jt(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function Kt(t){if(!t){return false}var i=t.toLowerCase();if(typeof Ht[i]!=="undefined"&&Xt[Ht[i]]){return Xt[Ht[i]]}i=Jt(i);if(i in Ht&&Xt[Ht[i]]){return Xt[Ht[i]]}}function Zt(){Bt.forEach(Yt)}var $t={start:Zt,add:Yt,get:Kt};var Qt={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const ti=Qt.WGS84;function ii(t,i,s,e){var r=t*t;var n=i*i;var h=(r-n)/r;var a=0;if(e){t*=1-h*(P+h*(k+h*N));r=t*t;h=0}else{a=Math.sqrt(h)}var o=(r-n)/n;return{es:h,e:a,ep2:o}}function si(t,i,s,e,r){if(!t){var n=W(Qt,e);if(!n){n=ti}t=n.a;i=n.b;s=n.rf}if(s&&!i){i=(1-1/s)*t}if(s===0||Math.abs(t-i)<I){r=true;i=t}return{a:t,b:i,rf:s,sphere:r}}var ei={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var ri in ei){var ni=ei[ri];if(!ni.datumName){continue}ei[ni.datumName]=ni}function hi(t,i,s,e,r,n,h){var a={};if(t===undefined||t==="none"){a.datum_type=y}else{a.datum_type=w}if(i){a.datum_params=i.map(parseFloat);if(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0){a.datum_type=g}if(a.datum_params.length>3){if(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0){a.datum_type=M;a.datum_params[3]*=S;a.datum_params[4]*=S;a.datum_params[5]*=S;a.datum_params[6]=a.datum_params[6]/1e6+1}}}if(h){a.datum_type=z;a.grids=h}a.a=s;a.b=e;a.es=r;a.ep2=n;return a}var ai={};function oi(t,i,s){if(i instanceof ArrayBuffer){return fi(t,i,s)}return{ready:ui(t,i)}}function fi(t,i,s){var e=true;if(s!==undefined&&s.includeErrorFields===false){e=false}var r=new DataView(i);var n=mi(r);var h=pi(r,n);var a=gi(r,h,n,e);var o={header:h,subgrids:a};ai[t]=o;return o}async function ui(t,i){var s=[];var e=await i.getImageCount();for(var r=e-1;r>=0;r--){var n=await i.getImage(r);var h=await n.readRasters();var a=h;var o=[n.getWidth(),n.getHeight()];var f=n.getBoundingBox().map(ci);var u=[n.fileDirectory.ModelPixelScale[0],n.fileDirectory.ModelPixelScale[1]].map(ci);var l=f[0]+(o[0]-1)*u[0];var v=f[3]-(o[1]-1)*u[1];var c=a[0];var d=a[1];var m=[];for(let t=o[1]-1;t>=0;t--){for(let i=o[0]-1;i>=0;i--){var p=t*o[0]+i;m.push([-di(d[p]),di(c[p])])}}s.push({del:u,lim:o,ll:[-l,v],cvs:m})}var _={header:{nSubgrids:e},subgrids:s};ai[t]=_;return _}function li(t){if(t===undefined){return null}var i=t.split(",");return i.map(vi)}function vi(t){if(t.length===0){return null}var i=t[0]==="@";if(i){t=t.slice(1)}if(t==="null"){return{name:"null",mandatory:!i,grid:null,isNull:true}}return{name:t,mandatory:!i,grid:ai[t]||null,isNull:false}}function ci(t){return t*Math.PI/180}function di(t){return t/3600*Math.PI/180}function mi(t){var i=t.getInt32(8,false);if(i===11){return false}i=t.getInt32(8,true);if(i!==11){console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian")}return true}function pi(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:_i(t,56,56+8).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}function _i(t,i,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,s)))}function gi(t,i,s,e){var r=176;var n=[];for(var h=0;h<i.nSubgrids;h++){var a=zi(t,r,s);var o=wi(t,r,a,s,e);var f=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval);var u=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);n.push({ll:[di(a.lowerLongitude),di(a.lowerLatitude)],del:[di(a.longitudeInterval),di(a.latitudeInterval)],lim:[f,u],count:a.gridNodeCount,cvs:Mi(o)});var l=16;if(e===false){l=8}r+=176+a.gridNodeCount*l}return n}function Mi(t){return t.map((function(t){return[di(t.longitudeShift),di(t.latitudeShift)]}))}function zi(t,i,s){return{name:_i(t,i+8,i+16).trim(),parent:_i(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,s),upperLatitude:t.getFloat64(i+88,s),lowerLongitude:t.getFloat64(i+104,s),upperLongitude:t.getFloat64(i+120,s),latitudeInterval:t.getFloat64(i+136,s),longitudeInterval:t.getFloat64(i+152,s),gridNodeCount:t.getInt32(i+168,s)}}function wi(t,i,s,e,r){var n=i+176;var h=16;if(r===false){h=8}var a=[];for(var o=0;o<s.gridNodeCount;o++){var f={latitudeShift:t.getFloat32(n+o*h,e),longitudeShift:t.getFloat32(n+o*h+4,e)};if(r!==false){f.latitudeAccuracy=t.getFloat32(n+o*h+8,e);f.longitudeAccuracy=t.getFloat32(n+o*h+12,e)}a.push(f)}return a}function yi(t,i){if(!(this instanceof yi)){return new yi(t)}this.forward=null;this.inverse=null;this.init=null;this.names=null;i=i||function(t){if(t){throw t}};var s=kt(t);if(typeof s!=="object"){i("Could not parse to valid json: "+t);return}var e=yi.projections.get(s.projName);if(!e){i("Could not get projection name from: "+t);return}if(s.datumCode&&s.datumCode!=="none"){var r=W(ei,s.datumCode);if(r){s.datum_params=s.datum_params||(r.towgs84?r.towgs84.split(","):null);s.ellps=r.ellipse;s.datumName=r.datumName?r.datumName:s.datumCode}}s.k0=s.k0||1;s.axis=s.axis||"enu";s.ellps=s.ellps||"wgs84";s.lat1=s.lat1||s.lat0;var n=si(s.a,s.b,s.rf,s.ellps,s.sphere);var h=ii(n.a,n.b,n.rf,s.R_A);var a=li(s.nadgrids);var o=s.datum||hi(s.datumCode,s.datum_params,n.a,n.b,h.es,h.ep2,a);Nt(this,s);Nt(this,e);this.a=n.a;this.b=n.b;this.rf=n.rf;this.sphere=n.sphere;this.es=h.es;this.e=h.e;this.ep2=h.ep2;this.datum=o;if("init"in this&&typeof this.init==="function"){this.init()}i(null,this)}yi.projections=$t;yi.projections.start();function bi(t,i){if(t.datum_type!==i.datum_type){return false}else if(t.a!==i.a||Math.abs(t.es-i.es)>5e-11){return false}else if(t.datum_type===g){return t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]}else if(t.datum_type===M){return t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6]}else{return true}}function xi(t,i,s){var e=t.x;var r=t.y;var n=t.z?t.z:0;var h;var a;var o;var f;if(r<-G&&r>-1.001*G){r=-G}else if(r>G&&r<1.001*G){r=G}else if(r<-G){return{x:-Infinity,y:-Infinity,z:t.z}}else if(r>G){return{x:Infinity,y:Infinity,z:t.z}}if(e>Math.PI){e-=2*Math.PI}a=Math.sin(r);f=Math.cos(r);o=a*a;h=s/Math.sqrt(1-i*o);return{x:(h+n)*f*Math.cos(e),y:(h+n)*f*Math.sin(e),z:(h*(1-i)+n)*a}}function Ei(t,i,s,e){var r=1e-12;var n=r*r;var h=30;var a;var o;var f;var u;var l;var v;var c;var d;var m;var p;var _;var g;var M;var z=t.x;var w=t.y;var y=t.z?t.z:0;var b;var x;var E;a=Math.sqrt(z*z+w*w);o=Math.sqrt(z*z+w*w+y*y);if(a/s<r){b=0;if(o/s<r){x=G;E=-e;return{x:t.x,y:t.y,z:t.z}}}else{b=Math.atan2(w,z)}f=y/o;u=a/o;l=1/Math.sqrt(1-i*(2-i)*u*u);d=u*(1-i)*l;m=f*l;M=0;do{M++;c=s/Math.sqrt(1-i*m*m);E=a*d+y*m-c*(1-i*m*m);v=i*c/(c+E);l=1/Math.sqrt(1-v*(2-v)*u*u);p=u*(1-v)*l;_=f*l;g=_*d-p*m;d=p;m=_}while(g*g>n&&M<h);x=Math.atan(_/Math.abs(p));return{x:b,y:x,z:E}}function Si(t,i,s){if(i===g){return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]}}else if(i===M){var e=s[0];var r=s[1];var n=s[2];var h=s[3];var a=s[4];var o=s[5];var f=s[6];return{x:f*(t.x-o*t.y+a*t.z)+e,y:f*(o*t.x+t.y-h*t.z)+r,z:f*(-a*t.x+h*t.y+t.z)+n}}}function Gi(t,i,s){if(i===g){return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]}}else if(i===M){var e=s[0];var r=s[1];var n=s[2];var h=s[3];var a=s[4];var o=s[5];var f=s[6];var u=(t.x-e)/f;var l=(t.y-r)/f;var v=(t.z-n)/f;return{x:u+o*l-a*v,y:-o*u+l+h*v,z:a*u-h*l+v}}}function Pi(t){return t===g||t===M}function ki(t,i,s){if(bi(t,i)){return s}if(t.datum_type===y||i.datum_type===y){return s}var e=t.a;var r=t.es;if(t.datum_type===z){var n=Ni(t,false,s);if(n!==0){return undefined}e=b;r=E}var h=i.a;var a=i.b;var o=i.es;if(i.datum_type===z){h=b;a=x;o=E}if(r===o&&e===h&&!Pi(t.datum_type)&&!Pi(i.datum_type)){return s}s=xi(s,r,e);if(Pi(t.datum_type)){s=Si(s,t.datum_type,t.datum_params)}if(Pi(i.datum_type)){s=Gi(s,i.datum_type,i.datum_params)}s=Ei(s,o,h,a);if(i.datum_type===z){var f=Ni(i,true,s);if(f!==0){return undefined}}return s}function Ni(t,i,s){if(t.grids===null||t.grids.length===0){console.log("Grid shift grids not found");return-1}var e={x:-s.x,y:s.y};var r={x:Number.NaN,y:Number.NaN};var n=[];t:for(var h=0;h<t.grids.length;h++){var a=t.grids[h];n.push(a.name);if(a.isNull){r=e;break}if(a.grid===null){if(a.mandatory){console.log("Unable to find mandatory grid '"+a.name+"'");return-1}continue}var o=a.grid.subgrids;for(var f=0,u=o.length;f<u;f++){var l=o[f];var v=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4;var c=l.ll[0]-v;var d=l.ll[1]-v;var m=l.ll[0]+(l.lim[0]-1)*l.del[0]+v;var p=l.ll[1]+(l.lim[1]-1)*l.del[1]+v;if(d>e.y||c>e.x||p<e.y||m<e.x){continue}r=Ii(e,i,l);if(!isNaN(r.x)){break t}}}if(isNaN(r.x)){console.log("Failed to find a grid shift table for location '"+-e.x*A+" "+e.y*A+" tried: '"+n+"'");return-1}s.x=-r.x;s.y=r.y;return 0}function Ii(t,i,s){var e={x:Number.NaN,y:Number.NaN};if(isNaN(t.x)){return e}var r={x:t.x,y:t.y};r.x-=s.ll[0];r.y-=s.ll[1];r.x=At(r.x-Math.PI)+Math.PI;var n=Ci(r,s);if(i){if(isNaN(n.x)){return e}n.x=r.x-n.x;n.y=r.y-n.y;var h=9,a=1e-12;var o,f;do{f=Ci(n,s);if(isNaN(f.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}o={x:r.x-(f.x+n.x),y:r.y-(f.y+n.y)};n.x+=o.x;n.y+=o.y}while(h--&&Math.abs(o.x)>a&&Math.abs(o.y)>a);if(h<0){console.log("Inverse grid shift iterator failed to converge.");return e}e.x=At(n.x+s.ll[0]);e.y=n.y+s.ll[1]}else{if(!isNaN(n.x)){e.x=t.x+n.x;e.y=t.y+n.y}}return e}function Ci(t,i){var s={x:t.x/i.del[0],y:t.y/i.del[1]};var e={x:Math.floor(s.x),y:Math.floor(s.y)};var r={x:s.x-1*e.x,y:s.y-1*e.y};var n={x:Number.NaN,y:Number.NaN};var h;if(e.x<0||e.x>=i.lim[0]){return n}if(e.y<0||e.y>=i.lim[1]){return n}h=e.y*i.lim[0]+e.x;var a={x:i.cvs[h][0],y:i.cvs[h][1]};h++;var o={x:i.cvs[h][0],y:i.cvs[h][1]};h+=i.lim[0];var f={x:i.cvs[h][0],y:i.cvs[h][1]};h--;var u={x:i.cvs[h][0],y:i.cvs[h][1]};var l=r.x*r.y,v=r.x*(1-r.y),c=(1-r.x)*(1-r.y),d=(1-r.x)*r.y;n.x=c*a.x+v*o.x+d*u.x+l*f.x;n.y=c*a.y+v*o.y+d*u.y+l*f.y;return n}function Ai(t,i,s){var e=s.x,r=s.y,n=s.z||0;var h,a,o;var f={};for(o=0;o<3;o++){if(i&&o===2&&s.z===undefined){continue}if(o===0){h=e;if("ew".indexOf(t.axis[o])!==-1){a="x"}else{a="y"}}else if(o===1){h=r;if("ns".indexOf(t.axis[o])!==-1){a="y"}else{a="x"}}else{h=n;a="z"}switch(t.axis[o]){case"e":f[a]=h;break;case"w":f[a]=-h;break;case"n":f[a]=h;break;case"s":f[a]=-h;break;case"u":if(s[a]!==undefined){f.z=h}break;case"d":if(s[a]!==undefined){f.z=-h}break;default:return null}}return f}function Ri(t){var i={x:t[0],y:t[1]};if(t.length>2){i.z=t[2]}if(t.length>3){i.m=t[3]}return i}function Ti(t){Oi(t.x);Oi(t.y)}function Oi(t){if(typeof Number.isFinite==="function"){if(Number.isFinite(t)){return}throw new TypeError("coordinates must be finite numbers")}if(typeof t!=="number"||t!==t||!isFinite(t)){throw new TypeError("coordinates must be finite numbers")}}function Li(t,i){return(t.datum.datum_type===g||t.datum.datum_type===M||t.datum.datum_type===z)&&i.datumCode!=="WGS84"||(i.datum.datum_type===g||i.datum.datum_type===M||i.datum.datum_type===z)&&t.datumCode!=="WGS84"}function Fi(t,i,s,e){var r;if(Array.isArray(s)){s=Ri(s)}else{s={x:s.x,y:s.y,z:s.z,m:s.m}}var n=s.z!==undefined;Ti(s);if(t.datum&&i.datum&&Li(t,i)){r=new yi("WGS84");s=Fi(t,r,s,e);t=r}if(e&&t.axis!=="enu"){s=Ai(t,false,s)}if(t.projName==="longlat"){s={x:s.x*C,y:s.y*C,z:s.z||0}}else{if(t.to_meter){s={x:s.x*t.to_meter,y:s.y*t.to_meter,z:s.z||0}}s=t.inverse(s);if(!s){return}}if(t.from_greenwich){s.x+=t.from_greenwich}s=ki(t.datum,i.datum,s);if(!s){return}s=s;if(i.from_greenwich){s={x:s.x-i.from_greenwich,y:s.y,z:s.z||0}}if(i.projName==="longlat"){s={x:s.x*A,y:s.y*A,z:s.z||0}}else{s=i.forward(s);if(i.to_meter){s={x:s.x/i.to_meter,y:s.y/i.to_meter,z:s.z||0}}}if(e&&i.axis!=="enu"){return Ai(i,true,s)}if(s&&!n){delete s.z}return s}var Di=yi("WGS84");function Wi(t,i,s,e){var r,n,h;if(Array.isArray(s)){r=Fi(t,i,s,e)||{x:NaN,y:NaN};if(s.length>2){if(typeof t.name!=="undefined"&&t.name==="geocent"||typeof i.name!=="undefined"&&i.name==="geocent"){if(typeof r.z==="number"){return[r.x,r.y,r.z].concat(s.slice(3))}else{return[r.x,r.y,s[2]].concat(s.slice(3))}}else{return[r.x,r.y].concat(s.slice(2))}}else{return[r.x,r.y]}}else{n=Fi(t,i,s,e);h=Object.keys(s);if(h.length===2){return n}h.forEach((function(e){if(typeof t.name!=="undefined"&&t.name==="geocent"||typeof i.name!=="undefined"&&i.name==="geocent"){if(e==="x"||e==="y"||e==="z"){return}}else{if(e==="x"||e==="y"){return}}n[e]=s[e]}));return n}}function ji(t){if(t instanceof yi){return t}if(typeof t==="object"&&"oProj"in t){return t.oProj}return yi(t)}function Vi(t,i,s){var e;var r;var n=false;var h;if(typeof i==="undefined"){r=ji(t);e=Di;n=true}else if(typeof i.x!=="undefined"||Array.isArray(i)){s=i;r=ji(t);e=Di;n=true}if(!e){e=ji(t)}if(!r){r=ji(i)}if(s){return Wi(e,r,s)}else{h={forward:function(t,i){return Wi(e,r,t,i)},inverse:function(t,i){return Wi(r,e,t,i)}};if(n){h.oProj=r}return h}}var Ui=6;var qi="AJSAJS";var Bi="AFAFAF";var Hi=65;var Xi=73;var Yi=79;var Ji=86;var Ki=90;var Zi={forward:$i,inverse:Qi,toPoint:ts};function $i(t,i){i=i||5;return hs(es({lat:t[1],lon:t[0]}),i)}function Qi(t){var i=rs(us(t.toUpperCase()));if(i.lat&&i.lon){return[i.lon,i.lat,i.lon,i.lat]}return[i.left,i.bottom,i.right,i.top]}function ts(t){var i=rs(us(t.toUpperCase()));if(i.lat&&i.lon){return[i.lon,i.lat]}return[(i.left+i.right)/2,(i.top+i.bottom)/2]}function is(t){return t*(Math.PI/180)}function ss(t){return 180*(t/Math.PI)}function es(t){var i=t.lat;var s=t.lon;var e=6378137;var r=.00669438;var n=.9996;var h;var a;var o,f,u,l,v;var c=is(i);var d=is(s);var m;var p;p=Math.floor((s+180)/6)+1;if(s===180){p=60}if(i>=56&&i<64&&s>=3&&s<12){p=32}if(i>=72&&i<84){if(s>=0&&s<9){p=31}else if(s>=9&&s<21){p=33}else if(s>=21&&s<33){p=35}else if(s>=33&&s<42){p=37}}h=(p-1)*6-180+3;m=is(h);a=r/(1-r);o=e/Math.sqrt(1-r*Math.sin(c)*Math.sin(c));f=Math.tan(c)*Math.tan(c);u=a*Math.cos(c)*Math.cos(c);l=Math.cos(c)*(d-m);v=e*((1-r/4-3*r*r/64-5*r*r*r/256)*c-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*c)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*c)-35*r*r*r/3072*Math.sin(6*c));var _=n*o*(l+(1-f+u)*l*l*l/6+(5-18*f+f*f+72*u-58*a)*l*l*l*l*l/120)+5e5;var g=n*(v+o*Math.tan(c)*(l*l/2+(5-f+9*u+4*u*u)*l*l*l*l/24+(61-58*f+f*f+600*u-330*a)*l*l*l*l*l*l/720));if(i<0){g+=1e7}return{northing:Math.round(g),easting:Math.round(_),zoneNumber:p,zoneLetter:ns(i)}}function rs(t){var i=t.northing;var s=t.easting;var e=t.zoneLetter;var r=t.zoneNumber;if(r<0||r>60){return null}var n=.9996;var h=6378137;var a=.00669438;var o;var f=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a));var u,l,v,c,d,m;var p;var _,g;var M=s-5e5;var z=i;if(e<"N"){z-=1e7}p=(r-1)*6-180+3;o=a/(1-a);m=z/n;_=m/(h*(1-a/4-3*a*a/64-5*a*a*a/256));g=_+(3*f/2-27*f*f*f/32)*Math.sin(2*_)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*_)+151*f*f*f/96*Math.sin(6*_);u=h/Math.sqrt(1-a*Math.sin(g)*Math.sin(g));l=Math.tan(g)*Math.tan(g);v=o*Math.cos(g)*Math.cos(g);c=h*(1-a)/Math.pow(1-a*Math.sin(g)*Math.sin(g),1.5);d=M/(u*n);var w=g-u*Math.tan(g)/c*(d*d/2-(5+3*l+10*v-4*v*v-9*o)*d*d*d*d/24+(61+90*l+298*v+45*l*l-252*o-3*v*v)*d*d*d*d*d*d/720);w=ss(w);var y=(d-(1+2*l+v)*d*d*d/6+(5-2*v+28*l-3*v*v+8*o+24*l*l)*d*d*d*d*d/120)/Math.cos(g);y=p+ss(y);var b;if(t.accuracy){var x=rs({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:x.lat,right:x.lon,bottom:w,left:y}}else{b={lat:w,lon:y}}return b}function ns(t){var i="Z";if(84>=t&&t>=72){i="X"}else if(72>t&&t>=64){i="W"}else if(64>t&&t>=56){i="V"}else if(56>t&&t>=48){i="U"}else if(48>t&&t>=40){i="T"}else if(40>t&&t>=32){i="S"}else if(32>t&&t>=24){i="R"}else if(24>t&&t>=16){i="Q"}else if(16>t&&t>=8){i="P"}else if(8>t&&t>=0){i="N"}else if(0>t&&t>=-8){i="M"}else if(-8>t&&t>=-16){i="L"}else if(-16>t&&t>=-24){i="K"}else if(-24>t&&t>=-32){i="J"}else if(-32>t&&t>=-40){i="H"}else if(-40>t&&t>=-48){i="G"}else if(-48>t&&t>=-56){i="F"}else if(-56>t&&t>=-64){i="E"}else if(-64>t&&t>=-72){i="D"}else if(-72>t&&t>=-80){i="C"}return i}function hs(t,i){var s="00000"+t.easting,e="00000"+t.northing;return t.zoneNumber+t.zoneLetter+as(t.easting,t.northing,t.zoneNumber)+s.substr(s.length-5,i)+e.substr(e.length-5,i)}function as(t,i,s){var e=os(s);var r=Math.floor(t/1e5);var n=Math.floor(i/1e5)%20;return fs(r,n,e)}function os(t){var i=t%Ui;if(i===0){i=Ui}return i}function fs(t,i,s){var e=s-1;var r=qi.charCodeAt(e);var n=Bi.charCodeAt(e);var h=r+t-1;var a=n+i;var o=false;if(h>Ki){h=h-Ki+Hi-1;o=true}if(h===Xi||r<Xi&&h>Xi||(h>Xi||r<Xi)&&o){h++}if(h===Yi||r<Yi&&h>Yi||(h>Yi||r<Yi)&&o){h++;if(h===Xi){h++}}if(h>Ki){h=h-Ki+Hi-1}if(a>Ji){a=a-Ji+Hi-1;o=true}else{o=false}if(a===Xi||n<Xi&&a>Xi||(a>Xi||n<Xi)&&o){a++}if(a===Yi||n<Yi&&a>Yi||(a>Yi||n<Yi)&&o){a++;if(a===Xi){a++}}if(a>Ji){a=a-Ji+Hi-1}var f=String.fromCharCode(h)+String.fromCharCode(a);return f}function us(t){if(t&&t.length===0){throw"MGRSPoint coverting from nothing"}var i=t.length;var s=null;var e="";var r;var n=0;while(!/[A-Z]/.test(r=t.charAt(n))){if(n>=2){throw"MGRSPoint bad conversion from: "+t}e+=r;n++}var h=parseInt(e,10);if(n===0||n+3>i){throw"MGRSPoint bad conversion from: "+t}var a=t.charAt(n++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O"){throw"MGRSPoint zone letter "+a+" not handled: "+t}s=t.substring(n,n+=2);var o=os(h);var f=ls(s.charAt(0),o);var u=vs(s.charAt(1),o);while(u<cs(a)){u+=2e6}var l=i-n;if(l%2!==0){throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t}var v=l/2;var c=0;var d=0;var m,p,_,g,M;if(v>0){m=1e5/Math.pow(10,v);p=t.substring(n,n+v);c=parseFloat(p)*m;_=t.substring(n+v);d=parseFloat(_)*m}g=c+f;M=d+u;return{easting:g,northing:M,zoneLetter:a,zoneNumber:h,accuracy:m}}function ls(t,i){var s=qi.charCodeAt(i-1);var e=1e5;var r=false;while(s!==t.charCodeAt(0)){s++;if(s===Xi){s++}if(s===Yi){s++}if(s>Ki){if(r){throw"Bad character: "+t}s=Hi;r=true}e+=1e5}return e}function vs(t,i){if(t>"V"){throw"MGRSPoint given invalid Northing "+t}var s=Bi.charCodeAt(i-1);var e=0;var r=false;while(s!==t.charCodeAt(0)){s++;if(s===Xi){s++}if(s===Yi){s++}if(s>Ji){if(r){throw"Bad character: "+t}s=Hi;r=true}e+=1e5}return e}function cs(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0){return i}else{throw"Invalid zone letter: "+t}}function ds(t,i,s){if(!(this instanceof ds)){return new ds(t,i,s)}if(Array.isArray(t)){this.x=t[0];this.y=t[1];this.z=t[2]||0}else if(typeof t==="object"){this.x=t.x;this.y=t.y;this.z=t.z||0}else if(typeof t==="string"&&typeof i==="undefined"){var e=t.split(",");this.x=parseFloat(e[0]);this.y=parseFloat(e[1]);this.z=parseFloat(e[2])||0}else{this.x=t;this.y=i;this.z=s||0}console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}ds.fromMGRS=function(t){return new ds(ts(t))};ds.prototype.toMGRS=function(t){return $i([this.x,this.y],t)};var ms=1;var ps=.25;var _s=.046875;var gs=.01953125;var Ms=.01068115234375;var zs=.75;var ws=.46875;var ys=.013020833333333334;var bs=.007120768229166667;var xs=.3645833333333333;var Es=.005696614583333333;var Ss=.3076171875;function Gs(t){var i=[];i[0]=ms-t*(ps+t*(_s+t*(gs+t*Ms)));i[1]=t*(zs-t*(_s+t*(gs+t*Ms)));var s=t*t;i[2]=s*(ws-t*(ys+t*bs));s*=t;i[3]=s*(xs-t*Es);i[4]=s*t*Ss;return i}function Ps(t,i,s,e){s*=i;i*=i;return e[0]*t-s*(e[1]+i*(e[2]+i*(e[3]+i*e[4])))}var ks=20;function Ns(t,i,s){var e=1/(1-i);var r=t;for(var n=ks;n;--n){var h=Math.sin(r);var a=1-i*h*h;a=(Ps(r,h,Math.cos(r),s)-t)*(a*Math.sqrt(a))*e;r-=a;if(Math.abs(a)<I){return r}}return r}function Is(){this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0;this.lat0=this.lat0!==undefined?this.lat0:0;if(this.es){this.en=Gs(this.es);this.ml0=Ps(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en)}}function Cs(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r;var n,h;var a=Math.sin(s);var o=Math.cos(s);if(!this.es){var f=o*Math.sin(e);if(Math.abs(Math.abs(f)-1)<I){return 93}else{n=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0;h=o*Math.cos(e)/Math.sqrt(1-Math.pow(f,2));f=Math.abs(h);if(f>=1){if(f-1>I){return 93}else{h=0}}else{h=Math.acos(h)}if(s<0){h=-h}h=this.a*this.k0*(h-this.lat0)+this.y0}}else{var u=o*e;var l=Math.pow(u,2);var v=this.ep2*Math.pow(o,2);var c=Math.pow(v,2);var d=Math.abs(o)>I?Math.tan(s):0;var m=Math.pow(d,2);var p=Math.pow(m,2);r=1-this.es*Math.pow(a,2);u=u/Math.sqrt(r);var _=Ps(s,a,o,this.en);n=this.a*(this.k0*u*(1+l/6*(1-m+v+l/20*(5-18*m+p+14*v-58*m*v+l/42*(61+179*p-p*m-479*m)))))+this.x0;h=this.a*(this.k0*(_-this.ml0+a*e*u/2*(1+l/12*(5-m+9*v+4*c+l/30*(61+p-58*m+270*v-330*m*v+l/56*(1385+543*p-p*m-3111*m))))))+this.y0}t.x=n;t.y=h;return t}function As(t){var i,s;var e,r;var n=(t.x-this.x0)*(1/this.a);var h=(t.y-this.y0)*(1/this.a);if(!this.es){var a=Math.exp(n/this.k0);var o=.5*(a-1/a);var f=this.lat0+h/this.k0;var u=Math.cos(f);i=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(o,2)));e=Math.asin(i);if(h<0){e=-e}if(o===0&&u===0){r=0}else{r=At(Math.atan2(o,u)+this.long0,this.over)}}else{i=this.ml0+h/this.k0;s=Ns(i,this.es,this.en);if(Math.abs(s)<G){var l=Math.sin(s);var v=Math.cos(s);var c=Math.abs(v)>I?Math.tan(s):0;var d=this.ep2*Math.pow(v,2);var m=Math.pow(d,2);var p=Math.pow(c,2);var _=Math.pow(p,2);i=1-this.es*Math.pow(l,2);var g=n*Math.sqrt(i)/this.k0;var M=Math.pow(g,2);i=i*c;e=s-i*M/(1-this.es)*.5*(1-M/12*(5+3*p-9*d*p+d-4*m-M/30*(61+90*p-252*d*p+45*_+46*d-M/56*(1385+3633*p+4095*_+1574*_*p))));r=At(this.long0+g*(1-M/6*(1+2*p+d-M/20*(5+28*p+24*_+8*d*p+6*d-M/42*(61+662*p+1320*_+720*_*p))))/v,this.over)}else{e=G*Ct(h);r=0}}t.x=r;t.y=e;return t}var Rs=["Fast_Transverse_Mercator","Fast Transverse Mercator"];var Ts={init:Is,forward:Cs,inverse:As,names:Rs};function Os(t){var i=Math.exp(t);i=(i-1/i)/2;return i}function Ls(t,i){t=Math.abs(t);i=Math.abs(i);var s=Math.max(t,i);var e=Math.min(t,i)/(s?s:1);return s*Math.sqrt(1+Math.pow(e,2))}function Fs(t){var i=1+t;var s=i-1;return s===0?t:t*Math.log(i)/s}function Ds(t){var i=Math.abs(t);i=Fs(i*(1+i/(Ls(1,i)+1)));return t<0?-i:i}function Ws(t,i){var s=2*Math.cos(2*i);var e=t.length-1;var r=t[e];var n=0;var h;while(--e>=0){h=-n+s*r+t[e];n=r;r=h}return i+h*Math.sin(2*i)}function js(t,i){var s=2*Math.cos(i);var e=t.length-1;var r=t[e];var n=0;var h;while(--e>=0){h=-n+s*r+t[e];n=r;r=h}return Math.sin(i)*h}function Vs(t){var i=Math.exp(t);i=(i+1/i)/2;return i}function Us(t,i,s){var e=Math.sin(i);var r=Math.cos(i);var n=Os(s);var h=Vs(s);var a=2*r*h;var o=-2*e*n;var f=t.length-1;var u=t[f];var l=0;var v=0;var c=0;var d;var m;while(--f>=0){d=v;m=l;v=u;l=c;u=-d+a*v-o*l+t[f];c=-m+o*v+a*l}a=e*h;o=r*n;return[a*u-o*c,a*c+o*u]}function qs(){if(!this.approx&&(isNaN(this.es)||this.es<=0)){throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.')}if(this.approx){Ts.init.apply(this);this.forward=Ts.forward;this.inverse=Ts.inverse}this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0;this.lat0=this.lat0!==undefined?this.lat0:0;this.cgb=[];this.cbg=[];this.utg=[];this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es));var i=t/(2-t);var s=i;this.cgb[0]=i*(2+i*(-2/3+i*(-2+i*(116/45+i*(26/45+i*(-2854/675))))));this.cbg[0]=i*(-2+i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725))))));s=s*i;this.cgb[1]=s*(7/3+i*(-8/5+i*(-227/45+i*(2704/315+i*(2323/945)))));this.cbg[1]=s*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945)))));s=s*i;this.cgb[2]=s*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835))));this.cbg[2]=s*(-26/15+i*(34/21+i*(8/5+i*(-12686/2835))));s=s*i;this.cgb[3]=s*(4279/630+i*(-332/35+i*(-399572/14175)));this.cbg[3]=s*(1237/630+i*(-12/5+i*(-24832/14175)));s=s*i;this.cgb[4]=s*(4174/315+i*(-144838/6237));this.cbg[4]=s*(-734/315+i*(109598/31185));s=s*i;this.cgb[5]=s*(601676/22275);this.cbg[5]=s*(444337/155925);s=Math.pow(i,2);this.Qn=this.k0/(1+i)*(1+s*(1/4+s*(1/64+s/256)));this.utg[0]=i*(-.5+i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800))))));this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800))))));this.utg[1]=s*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720)))));this.gtu[1]=s*(13/48+i*(-3/5+i*(557/1440+i*(281/630+i*(-1983433/1935360)))));s=s*i;this.utg[2]=s*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720))));this.gtu[2]=s*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440))));s=s*i;this.utg[3]=s*(-4397/161280+i*(11/504+i*(830251/7257600)));this.gtu[3]=s*(49561/161280+i*(-179/168+i*(6601661/7257600)));s=s*i;this.utg[4]=s*(-4583/161280+i*(108847/3991680));this.gtu[4]=s*(34729/80640+i*(-3418889/1995840));s=s*i;this.utg[5]=s*(-20648693/638668800);this.gtu[5]=s*(212378941/319334400);var e=Ws(this.cbg,this.lat0);this.Zb=-this.Qn*(e+js(this.gtu,2*e))}function Bs(t){var i=At(t.x-this.long0,this.over);var s=t.y;s=Ws(this.cbg,s);var e=Math.sin(s);var r=Math.cos(s);var n=Math.sin(i);var h=Math.cos(i);s=Math.atan2(e,h*r);i=Math.atan2(n*r,Ls(e,r*h));i=Ds(Math.tan(i));var a=Us(this.gtu,2*s,2*i);s=s+a[0];i=i+a[1];var o;var f;if(Math.abs(i)<=2.623395162778){o=this.a*(this.Qn*i)+this.x0;f=this.a*(this.Qn*s+this.Zb)+this.y0}else{o=Infinity;f=Infinity}t.x=o;t.y=f;return t}function Hs(t){var i=(t.x-this.x0)*(1/this.a);var s=(t.y-this.y0)*(1/this.a);s=(s-this.Zb)/this.Qn;i=i/this.Qn;var e;var r;if(Math.abs(i)<=2.623395162778){var n=Us(this.utg,2*s,2*i);s=s+n[0];i=i+n[1];i=Math.atan(Os(i));var h=Math.sin(s);var a=Math.cos(s);var o=Math.sin(i);var f=Math.cos(i);s=Math.atan2(h*f,Ls(o,f*a));i=Math.atan2(o,f*a);e=At(i+this.long0,this.over);r=Ws(this.cgb,s)}else{e=Infinity;r=Infinity}t.x=e;t.y=r;return t}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];var Ys={init:qs,forward:Bs,inverse:Hs,names:Xs};function Js(t,i){if(t===undefined){t=Math.floor((At(i)+Math.PI)*30/Math.PI)+1;if(t<0){return 0}else if(t>60){return 60}}return t}var Ks="etmerc";function Zs(){var t=Js(this.zone,this.long0);if(t===undefined){throw new Error("unknown utm zone")}this.lat0=0;this.long0=(6*Math.abs(t)-183)*C;this.x0=5e5;this.y0=this.utmSouth?1e7:0;this.k0=.9996;Ys.init.apply(this);this.forward=Ys.forward;this.inverse=Ys.inverse}var $s=["Universal Transverse Mercator System","utm"];var Qs={init:Zs,names:$s,dependsOn:Ks};function te(t,i){return Math.pow((1-t)/(1+t),i)}var ie=20;function se(){var t=Math.sin(this.lat0);var i=Math.cos(this.lat0);i*=i;this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t);this.C=Math.sqrt(1+this.es*i*i/(1-this.es));this.phic0=Math.asin(t/this.C);this.ratexp=.5*this.C*this.e;this.K=Math.tan(.5*this.phic0+R)/(Math.pow(Math.tan(.5*this.lat0+R),this.C)*te(this.e*t,this.ratexp))}function ee(t){var i=t.x;var s=t.y;t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+R),this.C)*te(this.e*Math.sin(s),this.ratexp))-G;t.x=this.C*i;return t}function re(t){var i=1e-14;var s=t.x/this.C;var e=t.y;var r=Math.pow(Math.tan(.5*e+R)/this.K,1/this.C);for(var n=ie;n>0;--n){e=2*Math.atan(r*te(this.e*Math.sin(t.y),-.5*this.e))-G;if(Math.abs(e-t.y)<i){break}t.y=e}if(!n){return null}t.x=s;t.y=e;return t}var ne={init:se,forward:ee,inverse:re};function he(){ne.init.apply(this);if(!this.rc){return}this.sinc0=Math.sin(this.phic0);this.cosc0=Math.cos(this.phic0);this.R2=2*this.rc;if(!this.title){this.title="Oblique Stereographic Alternative"}}function ae(t){var i,s,e,r;t.x=At(t.x-this.long0,this.over);ne.forward.apply(this,[t]);i=Math.sin(t.y);s=Math.cos(t.y);e=Math.cos(t.x);r=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*s*e);t.x=r*s*Math.sin(t.x);t.y=r*(this.cosc0*i-this.sinc0*s*e);t.x=this.a*t.x+this.x0;t.y=this.a*t.y+this.y0;return t}function oe(t){var i,s,e,r,n;t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;t.x/=this.k0;t.y/=this.k0;if(n=Ls(t.x,t.y)){var h=2*Math.atan2(n,this.R2);i=Math.sin(h);s=Math.cos(h);r=Math.asin(s*this.sinc0+t.y*i*this.cosc0/n);e=Math.atan2(t.x*i,n*this.cosc0*s-t.y*this.sinc0*i)}else{r=this.phic0;e=0}t.x=e;t.y=r;ne.inverse.apply(this,[t]);t.x=At(t.x+this.long0,this.over);return t}var fe=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];var ue={init:he,forward:ae,inverse:oe,names:fe};function le(t,i,s){i*=s;return Math.tan(.5*(G+t))*Math.pow((1-i)/(1+i),.5*s)}function ve(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.coslat0=Math.cos(this.lat0);this.sinlat0=Math.sin(this.lat0);if(this.sphere){if(this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=I){this.k0=.5*(1+Ct(this.lat0)*Math.sin(this.lat_ts))}}else{if(Math.abs(this.coslat0)<=I){if(this.lat0>0){this.con=1}else{this.con=-1}}this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e));if(this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=I&&Math.abs(Math.cos(this.lat_ts))>I){this.k0=.5*this.cons*It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Rt(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))}this.ms1=It(this.e,this.sinlat0,this.coslat0);this.X0=2*Math.atan(le(this.lat0,this.sinlat0,this.e))-G;this.cosX0=Math.cos(this.X0);this.sinX0=Math.sin(this.X0)}}function ce(t){var i=t.x;var s=t.y;var e=Math.sin(s);var r=Math.cos(s);var n,h,a,o,f,u;var l=At(i-this.long0,this.over);if(Math.abs(Math.abs(i-this.long0)-Math.PI)<=I&&Math.abs(s+this.lat0)<=I){t.x=NaN;t.y=NaN;return t}if(this.sphere){n=2*this.k0/(1+this.sinlat0*e+this.coslat0*r*Math.cos(l));t.x=this.a*n*r*Math.sin(l)+this.x0;t.y=this.a*n*(this.coslat0*e-this.sinlat0*r*Math.cos(l))+this.y0;return t}else{h=2*Math.atan(le(s,e,this.e))-G;o=Math.cos(h);a=Math.sin(h);if(Math.abs(this.coslat0)<=I){f=Rt(this.e,s*this.con,this.con*e);u=2*this.a*this.k0*f/this.cons;t.x=this.x0+u*Math.sin(i-this.long0);t.y=this.y0-this.con*u*Math.cos(i-this.long0);return t}else if(Math.abs(this.sinlat0)<I){n=2*this.a*this.k0/(1+o*Math.cos(l));t.y=n*a}else{n=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*o*Math.cos(l)));t.y=n*(this.cosX0*a-this.sinX0*o*Math.cos(l))+this.y0}t.x=n*o*Math.sin(l)+this.x0}return t}function de(t){t.x-=this.x0;t.y-=this.y0;var i,s,e,r,n;var h=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var a=2*Math.atan(h/(2*this.a*this.k0));i=this.long0;s=this.lat0;if(h<=I){t.x=i;t.y=s;return t}s=Math.asin(Math.cos(a)*this.sinlat0+t.y*Math.sin(a)*this.coslat0/h);if(Math.abs(this.coslat0)<I){if(this.lat0>0){i=At(this.long0+Math.atan2(t.x,-1*t.y),this.over)}else{i=At(this.long0+Math.atan2(t.x,t.y),this.over)}}else{i=At(this.long0+Math.atan2(t.x*Math.sin(a),h*this.coslat0*Math.cos(a)-t.y*this.sinlat0*Math.sin(a)),this.over)}t.x=i;t.y=s;return t}else{if(Math.abs(this.coslat0)<=I){if(h<=I){s=this.lat0;i=this.long0;t.x=i;t.y=s;return t}t.x*=this.con;t.y*=this.con;e=h*this.cons/(2*this.a*this.k0);s=this.con*Tt(this.e,e);i=this.con*At(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else{r=2*Math.atan(h*this.cosX0/(2*this.a*this.k0*this.ms1));i=this.long0;if(h<=I){n=this.X0}else{n=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/h);i=At(this.long0+Math.atan2(t.x*Math.sin(r),h*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)),this.over)}s=-1*Tt(this.e,Math.tan(.5*(G+n)))}}t.x=i;t.y=s;return t}var me=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];var pe={init:ve,forward:ce,inverse:de,names:me,ssfn_:le};function _e(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t);var s=this.a;var e=this.rf;var r=1/e;var n=2*r-Math.pow(r,2);var h=this.e=Math.sqrt(n);this.R=this.k0*s*Math.sqrt(1-n)/(1-n*Math.pow(i,2));this.alpha=Math.sqrt(1+n/(1-n)*Math.pow(Math.cos(t),4));this.b0=Math.asin(i/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2));var o=Math.log(Math.tan(Math.PI/4+t/2));var f=Math.log((1+h*i)/(1-h*i));this.K=a-this.alpha*o+this.alpha*h/2*f}function ge(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2));var s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y)));var e=-this.alpha*(i+s)+this.K;var r=2*(Math.atan(Math.exp(e))-Math.PI/4);var n=this.alpha*(t.x-this.lambda0);var h=Math.atan(Math.sin(n)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(n)));var a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(n));t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0;t.x=this.R*h+this.x0;return t}function Me(t){var i=t.x-this.x0;var s=t.y-this.y0;var e=i/this.R;var r=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4);var n=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(e));var h=Math.atan(Math.sin(e)/(Math.cos(this.b0)*Math.cos(e)-Math.sin(this.b0)*Math.tan(r)));var a=this.lambda0+h/this.alpha;var o=0;var f=n;var u=-1e3;var l=0;while(Math.abs(f-u)>1e-7){if(++l>20){return}o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(f))/2));u=f;f=2*Math.atan(Math.exp(o))-Math.PI/2}t.x=a;t.y=f;return t}var ze=["somerc"];var we={init:_e,forward:ge,inverse:Me,names:ze};var ye=1e-7;function be(t){var i=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"];var s=typeof t.projName==="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||i.indexOf(s)!==-1||i.indexOf(Jt(s))!==-1}function xe(){var t,i,s,e,r,n,h,a,o,f,u=0,l,v=0,c=0,d=0,m=0,p=0,_=0;this.no_off=be(this);this.no_rot="no_rot"in this;var g=false;if("alpha"in this){g=true}var M=false;if("rectified_grid_angle"in this){M=true}if(g){_=this.alpha}if(M){u=this.rectified_grid_angle}if(g||M){v=this.longc}else{c=this.long1;m=this.lat1;d=this.long2;p=this.lat2;if(Math.abs(m-p)<=ye||(t=Math.abs(m))<=ye||Math.abs(t-G)<=ye||Math.abs(Math.abs(this.lat0)-G)<=ye||Math.abs(Math.abs(p)-G)<=ye){throw new Error}}var z=1-this.es;i=Math.sqrt(z);if(Math.abs(this.lat0)>I){a=Math.sin(this.lat0);s=Math.cos(this.lat0);t=1-this.es*a*a;this.B=s*s;this.B=Math.sqrt(1+this.es*this.B*this.B/z);this.A=this.B*this.k0*i/t;e=this.B*i/(s*Math.sqrt(t));r=e*e-1;if(r<=0){r=0}else{r=Math.sqrt(r);if(this.lat0<0){r=-r}}this.E=r+=e;this.E*=Math.pow(Rt(this.e,this.lat0,a),this.B)}else{this.B=1/i;this.A=this.k0;this.E=e=r=1}if(g||M){if(g){l=Math.asin(Math.sin(_)/e);if(!M){u=_}}else{l=u;_=Math.asin(e*Math.sin(l))}this.lam0=v-Math.asin(.5*(r-1/r)*Math.tan(l))/this.B}else{n=Math.pow(Rt(this.e,m,Math.sin(m)),this.B);h=Math.pow(Rt(this.e,p,Math.sin(p)),this.B);r=this.E/n;o=(h-n)/(h+n);f=this.E*this.E;f=(f-h*n)/(f+h*n);t=c-d;if(t<-Math.PI){d-=T}else if(t>Math.PI){d+=T}this.lam0=At(.5*(c+d)-Math.atan(f*Math.tan(.5*this.B*(c-d))/o)/this.B,this.over);l=Math.atan(2*Math.sin(this.B*At(c-this.lam0,this.over))/(r-1/r));u=_=Math.asin(e*Math.sin(l))}this.singam=Math.sin(l);this.cosgam=Math.cos(l);this.sinrot=Math.sin(u);this.cosrot=Math.cos(u);this.rB=1/this.B;this.ArB=this.A*this.rB;this.BrA=1/this.ArB;if(this.no_off){this.u_0=0}else{this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(e*e-1)/Math.cos(_)));if(this.lat0<0){this.u_0=-this.u_0}}r=.5*l;this.v_pole_n=this.ArB*Math.log(Math.tan(R-r));this.v_pole_s=this.ArB*Math.log(Math.tan(R+r))}function Ee(t){var i={};var s,e,r,n,h,a,o,f;t.x=t.x-this.lam0;if(Math.abs(Math.abs(t.y)-G)>I){h=this.E/Math.pow(Rt(this.e,t.y,Math.sin(t.y)),this.B);a=1/h;s=.5*(h-a);e=.5*(h+a);n=Math.sin(this.B*t.x);r=(s*this.singam-n*this.cosgam)/e;if(Math.abs(Math.abs(r)-1)<I){throw new Error}f=.5*this.ArB*Math.log((1-r)/(1+r));a=Math.cos(this.B*t.x);if(Math.abs(a)<ye){o=this.A*t.x}else{o=this.ArB*Math.atan2(s*this.cosgam+n*this.singam,a)}}else{f=t.y>0?this.v_pole_n:this.v_pole_s;o=this.ArB*t.y}if(this.no_rot){i.x=o;i.y=f}else{o-=this.u_0;i.x=f*this.cosrot+o*this.sinrot;i.y=o*this.cosrot-f*this.sinrot}i.x=this.a*i.x+this.x0;i.y=this.a*i.y+this.y0;return i}function Se(t){var i,s,e,r,n,h,a;var o={};t.x=(t.x-this.x0)*(1/this.a);t.y=(t.y-this.y0)*(1/this.a);if(this.no_rot){s=t.y;i=t.x}else{s=t.x*this.cosrot-t.y*this.sinrot;i=t.y*this.cosrot+t.x*this.sinrot+this.u_0}e=Math.exp(-this.BrA*s);r=.5*(e-1/e);n=.5*(e+1/e);h=Math.sin(this.BrA*i);a=(h*this.cosgam+r*this.singam)/n;if(Math.abs(Math.abs(a)-1)<I){o.x=0;o.y=a<0?-G:G}else{o.y=this.E/Math.sqrt((1+a)/(1-a));o.y=Tt(this.e,Math.pow(o.y,1/this.B));if(o.y===Infinity){throw new Error}o.x=-this.rB*Math.atan2(r*this.cosgam-h*this.singam,Math.cos(this.BrA*i))}o.x+=this.lam0;return o}var Ge=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];var Pe={init:xe,forward:Ee,inverse:Se,names:Ge};function ke(){if(!this.lat2){this.lat2=this.lat1}if(!this.k0){this.k0=1}this.x0=this.x0||0;this.y0=this.y0||0;if(Math.abs(this.lat1+this.lat2)<I){return}var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1);var s=Math.cos(this.lat1);var e=It(this.e,i,s);var r=Rt(this.e,this.lat1,i);var n=Math.sin(this.lat2);var h=Math.cos(this.lat2);var a=It(this.e,n,h);var o=Rt(this.e,this.lat2,n);var f=Math.abs(Math.abs(this.lat0)-G)<I?0:Rt(this.e,this.lat0,Math.sin(this.lat0));if(Math.abs(this.lat1-this.lat2)>I){this.ns=Math.log(e/a)/Math.log(r/o)}else{this.ns=i}if(isNaN(this.ns)){this.ns=i}this.f0=e/(this.ns*Math.pow(r,this.ns));this.rh=this.a*this.f0*Math.pow(f,this.ns);if(!this.title){this.title="Lambert Conformal Conic"}}function Ne(t){var i=t.x;var s=t.y;if(Math.abs(2*Math.abs(s)-Math.PI)<=I){s=Ct(s)*(G-2*I)}var e=Math.abs(Math.abs(s)-G);var r,n;if(e>I){r=Rt(this.e,s,Math.sin(s));n=this.a*this.f0*Math.pow(r,this.ns)}else{e=s*this.ns;if(e<=0){return null}n=0}var h=this.ns*At(i-this.long0,this.over);t.x=this.k0*(n*Math.sin(h))+this.x0;t.y=this.k0*(this.rh-n*Math.cos(h))+this.y0;return t}function Ie(t){var i,s,e;var r,n;var h=(t.x-this.x0)/this.k0;var a=this.rh-(t.y-this.y0)/this.k0;if(this.ns>0){i=Math.sqrt(h*h+a*a);s=1}else{i=-Math.sqrt(h*h+a*a);s=-1}var o=0;if(i!==0){o=Math.atan2(s*h,s*a)}if(i!==0||this.ns>0){s=1/this.ns;e=Math.pow(i/(this.a*this.f0),s);r=Tt(this.e,e);if(r===-9999){return null}}else{r=-G}n=At(o/this.ns+this.long0,this.over);t.x=n;t.y=r;return t}var Ce=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];var Ae={init:ke,forward:Ne,inverse:Ie,names:Ce};function Re(){this.a=6377397.155;this.es=.006674372230614;this.e=Math.sqrt(this.es);if(!this.lat0){this.lat0=.863937979737193}if(!this.long0){this.long0=.7417649320975901-.308341501185665}if(!this.k0){this.k0=.9999}this.s45=.785398163397448;this.s90=2*this.s45;this.fi0=this.lat0;this.e2=this.es;this.e=Math.sqrt(this.e2);this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2));this.uq=1.04216856380474;this.u0=Math.asin(Math.sin(this.fi0)/this.alfa);this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2);this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g;this.k1=this.k0;this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2));this.s0=1.37008346281555;this.n=Math.sin(this.s0);this.ro0=this.k1*this.n0/Math.tan(this.s0);this.ad=this.s90-this.uq}function Te(t){var i,s,e,r,n,h,a;var o=t.x;var f=t.y;var u=At(o-this.long0,this.over);i=Math.pow((1+this.e*Math.sin(f))/(1-this.e*Math.sin(f)),this.alfa*this.e/2);s=2*(Math.atan(this.k*Math.pow(Math.tan(f/2+this.s45),this.alfa)/i)-this.s45);e=-u*this.alfa;r=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(e));n=Math.asin(Math.cos(s)*Math.sin(e)/Math.cos(r));h=this.n*n;a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n);t.y=a*Math.cos(h)/1;t.x=a*Math.sin(h)/1;if(!this.czech){t.y*=-1;t.x*=-1}return t}function Oe(t){var i,s,e,r,n,h,a;var o;var f=t.x;t.x=t.y;t.y=f;if(!this.czech){t.y*=-1;t.x*=-1}h=Math.sqrt(t.x*t.x+t.y*t.y);n=Math.atan2(t.y,t.x);r=n/Math.sin(this.s0);e=2*(Math.atan(Math.pow(this.ro0/h,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45);i=Math.asin(Math.cos(this.ad)*Math.sin(e)-Math.sin(this.ad)*Math.cos(e)*Math.cos(r));s=Math.asin(Math.cos(e)*Math.sin(r)/Math.cos(i));t.x=this.long0-s/this.alfa;a=i;o=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45);if(Math.abs(a-t.y)<1e-10){o=1}a=t.y;u+=1}while(o===0&&u<15);if(u>=15){return null}return t}var Le=["Krovak","krovak"];var Fe={init:Re,forward:Te,inverse:Oe,names:Le};function De(t,i,s,e,r){return t*r-i*Math.sin(2*r)+s*Math.sin(4*r)-e*Math.sin(6*r)}function We(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function je(t){return.375*t*(1+.25*t*(1+.46875*t))}function Ve(t){return.05859375*t*t*(1+.75*t)}function Ue(t){return t*t*t*(35/3072)}function qe(t,i,s){var e=i*s;return t/Math.sqrt(1-e*e)}function Be(t){return Math.abs(t)<G?t:t-Ct(t)*Math.PI}function He(t,i,s,e,r){var n;var h;n=t/i;for(var a=0;a<15;a++){h=(t-(i*n-s*Math.sin(2*n)+e*Math.sin(4*n)-r*Math.sin(6*n)))/(i-2*s*Math.cos(2*n)+4*e*Math.cos(4*n)-6*r*Math.cos(6*n));n+=h;if(Math.abs(h)<=1e-10){return n}}return NaN}function Xe(){if(!this.sphere){this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.ml0=this.a*De(this.e0,this.e1,this.e2,this.e3,this.lat0)}}function Ye(t){var i,s;var e=t.x;var r=t.y;e=At(e-this.long0,this.over);if(this.sphere){i=this.a*Math.asin(Math.cos(r)*Math.sin(e));s=this.a*(Math.atan2(Math.tan(r),Math.cos(e))-this.lat0)}else{var n=Math.sin(r);var h=Math.cos(r);var a=qe(this.a,this.e,n);var o=Math.tan(r)*Math.tan(r);var f=e*Math.cos(r);var u=f*f;var l=this.es*h*h/(1-this.es);var v=this.a*De(this.e0,this.e1,this.e2,this.e3,r);i=a*f*(1-u*o*(1/6-(8-o+8*l)*u/120));s=v-this.ml0+a*n/h*u*(.5+(5-o+6*l)*u/24)}t.x=i+this.x0;t.y=s+this.y0;return t}function Je(t){t.x-=this.x0;t.y-=this.y0;var i=t.x/this.a;var s=t.y/this.a;var e,r;if(this.sphere){var n=s+this.lat0;e=Math.asin(Math.sin(n)*Math.cos(i));r=Math.atan2(Math.tan(i),Math.cos(n))}else{var h=this.ml0/this.a+s;var a=He(h,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-G)<=I){t.x=this.long0;t.y=G;if(s<0){t.y*=-1}return t}var o=qe(this.a,this.e,Math.sin(a));var f=o*o*o/this.a/this.a*(1-this.es);var u=Math.pow(Math.tan(a),2);var l=i*this.a/o;var v=l*l;e=a-o*Math.tan(a)/f*l*l*(.5-(1+3*u)*l*l/24);r=l*(1-v*(u/3+(1+3*u)*u*v/15))/Math.cos(a)}t.x=At(r+this.long0,this.over);t.y=Be(e);return t}var Ke=["Cassini","Cassini_Soldner","cass"];var Ze={init:Xe,forward:Ye,inverse:Je,names:Ke};function $e(t,i){var s;if(t>1e-7){s=t*i;return(1-t*t)*(i/(1-s*s)-.5/t*Math.log((1-s)/(1+s)))}else{return 2*i}}var Qe=1;var tr=2;var ir=3;var sr=4;function er(){var t=Math.abs(this.lat0);if(Math.abs(t-G)<I){this.mode=this.lat0<0?Qe:tr}else if(Math.abs(t)<I){this.mode=ir}else{this.mode=sr}if(this.es>0){var i;this.qp=$e(this.e,1);this.mmf=.5/(1-this.es);this.apa=vr(this.es);switch(this.mode){case tr:this.dd=1;break;case Qe:this.dd=1;break;case ir:this.rq=Math.sqrt(.5*this.qp);this.dd=1/this.rq;this.xmf=1;this.ymf=.5*this.qp;break;case sr:this.rq=Math.sqrt(.5*this.qp);i=Math.sin(this.lat0);this.sinb1=$e(this.e,i)/this.qp;this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1);this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*i*i)*this.rq*this.cosb1);this.ymf=(this.xmf=this.rq)/this.dd;this.xmf*=this.dd;break}}else{if(this.mode===sr){this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0)}}}function rr(t){var i,s,e,r,n,h,a,o,f,u;var l=t.x;var v=t.y;l=At(l-this.long0,this.over);if(this.sphere){n=Math.sin(v);u=Math.cos(v);e=Math.cos(l);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){s=this.mode===this.EQUIT?1+u*e:1+this.sinph0*n+this.cosph0*u*e;if(s<=I){return null}s=Math.sqrt(2/s);i=s*u*Math.sin(l);s*=this.mode===this.EQUIT?n:this.cosph0*n-this.sinph0*u*e}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE){e=-e}if(Math.abs(v+this.lat0)<I){return null}s=R-v*.5;s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s));i=s*Math.sin(l);s*=e}}else{a=0;o=0;f=0;e=Math.cos(l);r=Math.sin(l);n=Math.sin(v);h=$e(this.e,n);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){a=h/this.qp;o=Math.sqrt(1-a*a)}switch(this.mode){case this.OBLIQ:f=1+this.sinb1*a+this.cosb1*o*e;break;case this.EQUIT:f=1+o*e;break;case this.N_POLE:f=G+v;h=this.qp-h;break;case this.S_POLE:f=v-G;h=this.qp+h;break}if(Math.abs(f)<I){return null}switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f);if(this.mode===this.OBLIQ){s=this.ymf*f*(this.cosb1*a-this.sinb1*o*e)}else{s=(f=Math.sqrt(2/(1+o*e)))*a*this.ymf}i=this.xmf*f*o*r;break;case this.N_POLE:case this.S_POLE:if(h>=0){i=(f=Math.sqrt(h))*r;s=e*(this.mode===this.S_POLE?f:-f)}else{i=s=0}break}}t.x=this.a*i+this.x0;t.y=this.a*s+this.y0;return t}function nr(t){t.x-=this.x0;t.y-=this.y0;var i=t.x/this.a;var s=t.y/this.a;var e,r,n,h,a,o,f;if(this.sphere){var u=0,l,v=0;l=Math.sqrt(i*i+s*s);r=l*.5;if(r>1){return null}r=2*Math.asin(r);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){v=Math.sin(r);u=Math.cos(r)}switch(this.mode){case this.EQUIT:r=Math.abs(l)<=I?0:Math.asin(s*v/l);i*=v;s=u*l;break;case this.OBLIQ:r=Math.abs(l)<=I?this.lat0:Math.asin(u*this.sinph0+s*v*this.cosph0/l);i*=v*this.cosph0;s=(u-Math.sin(r)*this.sinph0)*l;break;case this.N_POLE:s=-s;r=G-r;break;case this.S_POLE:r-=G;break}e=s===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(i,s)}else{f=0;if(this.mode===this.OBLIQ||this.mode===this.EQUIT){i/=this.dd;s*=this.dd;o=Math.sqrt(i*i+s*s);if(o<I){t.x=this.long0;t.y=this.lat0;return t}h=2*Math.asin(.5*o/this.rq);n=Math.cos(h);i*=h=Math.sin(h);if(this.mode===this.OBLIQ){f=n*this.sinb1+s*h*this.cosb1/o;a=this.qp*f;s=o*this.cosb1*n-s*this.sinb1*h}else{f=s*h/o;a=this.qp*f;s=o*n}}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE){s=-s}a=i*i+s*s;if(!a){t.x=this.long0;t.y=this.lat0;return t}f=1-a/this.qp;if(this.mode===this.S_POLE){f=-f}}e=Math.atan2(i,s);r=cr(Math.asin(f),this.apa)}t.x=At(this.long0+e,this.over);t.y=r;return t}var hr=.3333333333333333;var ar=.17222222222222222;var or=.10257936507936508;var fr=.06388888888888888;var ur=.0664021164021164;var lr=.016415012942191543;function vr(t){var i;var s=[];s[0]=t*hr;i=t*t;s[0]+=i*ar;s[1]=i*fr;i*=t;s[0]+=i*or;s[1]+=i*ur;s[2]=i*lr;return s}function cr(t,i){var s=t+t;return t+i[0]*Math.sin(s)+i[1]*Math.sin(s+s)+i[2]*Math.sin(s+s+s)}var dr=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];var mr={init:er,forward:rr,inverse:nr,names:dr,S_POLE:Qe,N_POLE:tr,EQUIT:ir,OBLIQ:sr};function pr(t){if(Math.abs(t)>1){t=t>1?1:-1}return Math.asin(t)}function _r(){if(Math.abs(this.lat1+this.lat2)<I){return}this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e3=Math.sqrt(this.es);this.sin_po=Math.sin(this.lat1);this.cos_po=Math.cos(this.lat1);this.t1=this.sin_po;this.con=this.sin_po;this.ms1=It(this.e3,this.sin_po,this.cos_po);this.qs1=$e(this.e3,this.sin_po);this.sin_po=Math.sin(this.lat2);this.cos_po=Math.cos(this.lat2);this.t2=this.sin_po;this.ms2=It(this.e3,this.sin_po,this.cos_po);this.qs2=$e(this.e3,this.sin_po);this.sin_po=Math.sin(this.lat0);this.cos_po=Math.cos(this.lat0);this.t3=this.sin_po;this.qs0=$e(this.e3,this.sin_po);if(Math.abs(this.lat1-this.lat2)>I){this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1)}else{this.ns0=this.con}this.c=this.ms1*this.ms1+this.ns0*this.qs1;this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0}function gr(t){var i=t.x;var s=t.y;this.sin_phi=Math.sin(s);this.cos_phi=Math.cos(s);var e=$e(this.e3,this.sin_phi);var r=this.a*Math.sqrt(this.c-this.ns0*e)/this.ns0;var n=this.ns0*At(i-this.long0,this.over);var h=r*Math.sin(n)+this.x0;var a=this.rh-r*Math.cos(n)+this.y0;t.x=h;t.y=a;return t}function Mr(t){var i,s,e,r,n,h;t.x-=this.x0;t.y=this.rh-t.y+this.y0;if(this.ns0>=0){i=Math.sqrt(t.x*t.x+t.y*t.y);e=1}else{i=-Math.sqrt(t.x*t.x+t.y*t.y);e=-1}r=0;if(i!==0){r=Math.atan2(e*t.x,e*t.y)}e=i*this.ns0/this.a;if(this.sphere){h=Math.asin((this.c-e*e)/(2*this.ns0))}else{s=(this.c-e*e)/this.ns0;h=this.phi1z(this.e3,s)}n=At(r/this.ns0+this.long0,this.over);t.x=n;t.y=h;return t}function zr(t,i){var s,e,r,n,h;var a=pr(.5*i);if(t<I){return a}var o=t*t;for(var f=1;f<=25;f++){s=Math.sin(a);e=Math.cos(a);r=t*s;n=1-r*r;h=.5*n*n/e*(i/(1-o)-s/n+.5/t*Math.log((1-r)/(1+r)));a=a+h;if(Math.abs(h)<=1e-7){return a}}return null}var wr=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];var yr={init:_r,forward:gr,inverse:Mr,names:wr,phi1z:zr};function br(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);this.infinity_dist=1e3*this.a;this.rc=1}function xr(t){var i,s;var e;var r;var n;var h;var a,o;var f=t.x;var u=t.y;e=At(f-this.long0,this.over);i=Math.sin(u);s=Math.cos(u);r=Math.cos(e);h=this.sin_p14*i+this.cos_p14*s*r;n=1;if(h>0||Math.abs(h)<=I){a=this.x0+this.a*n*s*Math.sin(e)/h;o=this.y0+this.a*n*(this.cos_p14*i-this.sin_p14*s*r)/h}else{a=this.x0+this.infinity_dist*s*Math.sin(e);o=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*s*r)}t.x=a;t.y=o;return t}function Er(t){var i;var s,e;var r;var n,h;t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;t.x/=this.k0;t.y/=this.k0;if(i=Math.sqrt(t.x*t.x+t.y*t.y)){r=Math.atan2(i,this.rc);s=Math.sin(r);e=Math.cos(r);h=pr(e*this.sin_p14+t.y*s*this.cos_p14/i);n=Math.atan2(t.x*s,i*this.cos_p14*e-t.y*this.sin_p14*s);n=At(this.long0+n,this.over)}else{h=this.phic0;n=0}t.x=n;t.y=h;return t}var Sr=["gnom"];var Gr={init:br,forward:xr,inverse:Er,names:Sr};function Pr(t,i){var s=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-s)<1e-6){if(i<0){return-1*G}else{return G}}var e=Math.asin(.5*i);var r;var n;var h;var a;for(var o=0;o<30;o++){n=Math.sin(e);h=Math.cos(e);a=t*n;r=Math.pow(1-a*a,2)/(2*h)*(i/(1-t*t)-n/(1-a*a)+.5/t*Math.log((1-a)/(1+a)));e+=r;if(Math.abs(r)<=1e-10){return e}}return NaN}function kr(){if(!this.sphere){this.k0=It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}function Nr(t){var i=t.x;var s=t.y;var e,r;var n=At(i-this.long0,this.over);if(this.sphere){e=this.x0+this.a*n*Math.cos(this.lat_ts);r=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts)}else{var h=$e(this.e,Math.sin(s));e=this.x0+this.a*this.k0*n;r=this.y0+this.a*h*.5/this.k0}t.x=e;t.y=r;return t}function Ir(t){t.x-=this.x0;t.y-=this.y0;var i,s;if(this.sphere){i=At(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over);s=Math.asin(t.y/this.a*Math.cos(this.lat_ts))}else{s=Pr(this.e,2*t.y*this.k0/this.a);i=At(this.long0+t.x/(this.a*this.k0),this.over)}t.x=i;t.y=s;return t}var Cr=["cea"];var Ar={init:kr,forward:Nr,inverse:Ir,names:Cr};function Rr(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.lat_ts=this.lat_ts||0;this.title=this.title||"Equidistant Cylindrical (Plate Carre)";this.rc=Math.cos(this.lat_ts)}function Tr(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=Be(s-this.lat0);t.x=this.x0+this.a*e*this.rc;t.y=this.y0+this.a*r;return t}function Or(t){var i=t.x;var s=t.y;t.x=At(this.long0+(i-this.x0)/(this.a*this.rc),this.over);t.y=Be(this.lat0+(s-this.y0)/this.a);return t}var Lr=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];var Fr={init:Rr,forward:Tr,inverse:Or,names:Lr};var Dr=20;function Wr(){this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.ml0=this.a*De(this.e0,this.e1,this.e2,this.e3,this.lat0)}function jr(t){var i=t.x;var s=t.y;var e,r,n;var h=At(i-this.long0,this.over);n=h*Math.sin(s);if(this.sphere){if(Math.abs(s)<=I){e=this.a*h;r=-1*this.a*this.lat0}else{e=this.a*Math.sin(n)/Math.tan(s);r=this.a*(Be(s-this.lat0)+(1-Math.cos(n))/Math.tan(s))}}else{if(Math.abs(s)<=I){e=this.a*h;r=-1*this.ml0}else{var a=qe(this.a,this.e,Math.sin(s))/Math.tan(s);e=a*Math.sin(n);r=this.a*De(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+a*(1-Math.cos(n))}}t.x=e+this.x0;t.y=r+this.y0;return t}function Vr(t){var i,s,e,r,n;var h,a;var o,f;e=t.x-this.x0;r=t.y-this.y0;if(this.sphere){if(Math.abs(r+this.a*this.lat0)<=I){i=At(e/this.a+this.long0,this.over);s=0}else{h=this.lat0+r/this.a;a=e*e/this.a/this.a+h*h;o=h;var u;for(n=Dr;n;--n){u=Math.tan(o);f=-1*(h*(o*u+1)-o-.5*(o*o+a)*u)/((o-h)/u-1);o+=f;if(Math.abs(f)<=I){s=o;break}}i=At(this.long0+Math.asin(e*Math.tan(o)/this.a)/Math.sin(s),this.over)}}else{if(Math.abs(r+this.ml0)<=I){s=0;i=At(this.long0+e/this.a,this.over)}else{h=(this.ml0+r)/this.a;a=e*e/this.a/this.a+h*h;o=h;var l,v,c,d;var m;for(n=Dr;n;--n){m=this.e*Math.sin(o);l=Math.sqrt(1-m*m)*Math.tan(o);v=this.a*De(this.e0,this.e1,this.e2,this.e3,o);c=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o);d=v/this.a;f=(h*(l*d+1)-d-.5*l*(d*d+a))/(this.es*Math.sin(2*o)*(d*d+a-2*h*d)/(4*l)+(h-d)*(l*c-2/Math.sin(2*o))-c);o-=f;if(Math.abs(f)<=I){s=o;break}}l=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s);i=At(this.long0+Math.asin(e*l/this.a)/Math.sin(s),this.over)}}t.x=i;t.y=s;return t}var Ur=["Polyconic","American_Polyconic","poly"];var qr={init:Wr,forward:jr,inverse:Vr,names:Ur};function Br(){this.A=[];this.A[1]=.6399175073;this.A[2]=-.1358797613;this.A[3]=.063294409;this.A[4]=-.02526853;this.A[5]=.0117879;this.A[6]=-.0055161;this.A[7]=.0026906;this.A[8]=-.001333;this.A[9]=67e-5;this.A[10]=-34e-5;this.B_re=[];this.B_im=[];this.B_re[1]=.7557853228;this.B_im[1]=0;this.B_re[2]=.249204646;this.B_im[2]=.003371507;this.B_re[3]=-.001541739;this.B_im[3]=.04105856;this.B_re[4]=-.10162907;this.B_im[4]=.01727609;this.B_re[5]=-.26623489;this.B_im[5]=-.36249218;this.B_re[6]=-.6870983;this.B_im[6]=-1.1651967;this.C_re=[];this.C_im=[];this.C_re[1]=1.3231270439;this.C_im[1]=0;this.C_re[2]=-.577245789;this.C_im[2]=-.007809598;this.C_re[3]=.508307513;this.C_im[3]=-.112208952;this.C_re[4]=-.15094762;this.C_im[4]=.18200602;this.C_re[5]=1.01418179;this.C_im[5]=1.64497696;this.C_re[6]=1.9660549;this.C_im[6]=2.5127645;this.D=[];this.D[1]=1.5627014243;this.D[2]=.5185406398;this.D[3]=-.03333098;this.D[4]=-.1052906;this.D[5]=-.0368594;this.D[6]=.007317;this.D[7]=.0122;this.D[8]=.00394;this.D[9]=-.0013}function Hr(t){var i;var s=t.x;var e=t.y;var r=e-this.lat0;var n=s-this.long0;var h=r/S*1e-5;var a=n;var o=1;var f=0;for(i=1;i<=10;i++){o=o*h;f=f+this.A[i]*o}var u=f;var l=a;var v=1;var c=0;var d;var m;var p=0;var _=0;for(i=1;i<=6;i++){d=v*u-c*l;m=c*u+v*l;v=d;c=m;p=p+this.B_re[i]*v-this.B_im[i]*c;_=_+this.B_im[i]*v+this.B_re[i]*c}t.x=_*this.a+this.x0;t.y=p*this.a+this.y0;return t}function Xr(t){var i;var s=t.x;var e=t.y;var r=s-this.x0;var n=e-this.y0;var h=n/this.a;var a=r/this.a;var o=1;var f=0;var u;var l;var v=0;var c=0;for(i=1;i<=6;i++){u=o*h-f*a;l=f*h+o*a;o=u;f=l;v=v+this.C_re[i]*o-this.C_im[i]*f;c=c+this.C_im[i]*o+this.C_re[i]*f}for(var d=0;d<this.iterations;d++){var m=v;var p=c;var _;var g;var M=h;var z=a;for(i=2;i<=6;i++){_=m*v-p*c;g=p*v+m*c;m=_;p=g;M=M+(i-1)*(this.B_re[i]*m-this.B_im[i]*p);z=z+(i-1)*(this.B_im[i]*m+this.B_re[i]*p)}m=1;p=0;var w=this.B_re[1];var y=this.B_im[1];for(i=2;i<=6;i++){_=m*v-p*c;g=p*v+m*c;m=_;p=g;w=w+i*(this.B_re[i]*m-this.B_im[i]*p);y=y+i*(this.B_im[i]*m+this.B_re[i]*p)}var b=w*w+y*y;v=(M*w+z*y)/b;c=(z*w-M*y)/b}var x=v;var E=c;var G=1;var P=0;for(i=1;i<=9;i++){G=G*x;P=P+this.D[i]*G}var k=this.lat0+P*S*1e5;var N=this.long0+E;t.x=N;t.y=k;return t}var Yr=["New_Zealand_Map_Grid","nzmg"];var Jr={init:Br,forward:Hr,inverse:Xr,names:Yr};function Kr(){}function Zr(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=this.x0+this.a*e;var n=this.y0+this.a*Math.log(Math.tan(Math.PI/4+s/2.5))*1.25;t.x=r;t.y=n;return t}function $r(t){t.x-=this.x0;t.y-=this.y0;var i=At(this.long0+t.x/this.a,this.over);var s=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);t.x=i;t.y=s;return t}var Qr=["Miller_Cylindrical","mill"];var tn={init:Kr,forward:Zr,inverse:$r,names:Qr};var sn=20;function en(){if(!this.sphere){this.en=Gs(this.es)}else{this.n=1;this.m=0;this.es=0;this.C_y=Math.sqrt((this.m+1)/this.n);this.C_x=this.C_y/(this.m+1)}}function rn(t){var i,s;var e=t.x;var r=t.y;e=At(e-this.long0,this.over);if(this.sphere){if(!this.m){r=this.n!==1?Math.asin(this.n*Math.sin(r)):r}else{var n=this.n*Math.sin(r);for(var h=sn;h;--h){var a=(this.m*r+Math.sin(r)-n)/(this.m+Math.cos(r));r-=a;if(Math.abs(a)<I){break}}}i=this.a*this.C_x*e*(this.m+Math.cos(r));s=this.a*this.C_y*r}else{var o=Math.sin(r);var f=Math.cos(r);s=this.a*Ps(r,o,f,this.en);i=this.a*e*f/Math.sqrt(1-this.es*o*o)}t.x=i;t.y=s;return t}function nn(t){var i,s,e,r;t.x-=this.x0;e=t.x/this.a;t.y-=this.y0;i=t.y/this.a;if(this.sphere){i/=this.C_y;e=e/(this.C_x*(this.m+Math.cos(i)));if(this.m){i=pr((this.m*i+Math.sin(i))/this.n)}else if(this.n!==1){i=pr(Math.sin(i)/this.n)}e=At(e+this.long0,this.over);i=Be(i)}else{i=Ns(t.y/this.a,this.es,this.en);r=Math.abs(i);if(r<G){r=Math.sin(i);s=this.long0+t.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(i));e=At(s,this.over)}else if(r-I<G){e=this.long0}}t.x=e;t.y=i;return t}var hn=["Sinusoidal","sinu"];var an={init:en,forward:rn,inverse:nn,names:hn};function on(){this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0}function fn(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=s;var n=Math.PI*Math.sin(s);while(true){var h=-(r+Math.sin(r)-n)/(1+Math.cos(r));r+=h;if(Math.abs(h)<I){break}}r/=2;if(Math.PI/2-Math.abs(s)<I){e=0}var a=.900316316158*this.a*e*Math.cos(r)+this.x0;var o=1.4142135623731*this.a*Math.sin(r)+this.y0;t.x=a;t.y=o;return t}function un(t){var i;var s;t.x-=this.x0;t.y-=this.y0;s=t.y/(1.4142135623731*this.a);if(Math.abs(s)>.999999999999){s=.999999999999}i=Math.asin(s);var e=At(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);if(e<-Math.PI){e=-Math.PI}if(e>Math.PI){e=Math.PI}s=(2*i+Math.sin(2*i))/Math.PI;if(Math.abs(s)>1){s=1}var r=Math.asin(s);t.x=e;t.y=r;return t}var ln=["Mollweide","moll"];var vn={init:on,forward:fn,inverse:un,names:ln};function cn(){if(Math.abs(this.lat1+this.lat2)<I){return}this.lat2=this.lat2||this.lat1;this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.sin_phi=Math.sin(this.lat1);this.cos_phi=Math.cos(this.lat1);this.ms1=It(this.e,this.sin_phi,this.cos_phi);this.ml1=De(this.e0,this.e1,this.e2,this.e3,this.lat1);if(Math.abs(this.lat1-this.lat2)<I){this.ns=this.sin_phi}else{this.sin_phi=Math.sin(this.lat2);this.cos_phi=Math.cos(this.lat2);this.ms2=It(this.e,this.sin_phi,this.cos_phi);this.ml2=De(this.e0,this.e1,this.e2,this.e3,this.lat2);this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)}this.g=this.ml1+this.ms1/this.ns;this.ml0=De(this.e0,this.e1,this.e2,this.e3,this.lat0);this.rh=this.a*(this.g-this.ml0)}function dn(t){var i=t.x;var s=t.y;var e;if(this.sphere){e=this.a*(this.g-s)}else{var r=De(this.e0,this.e1,this.e2,this.e3,s);e=this.a*(this.g-r)}var n=this.ns*At(i-this.long0,this.over);var h=this.x0+e*Math.sin(n);var a=this.y0+this.rh-e*Math.cos(n);t.x=h;t.y=a;return t}function mn(t){t.x-=this.x0;t.y=this.rh-t.y+this.y0;var i,s,e,r;if(this.ns>=0){s=Math.sqrt(t.x*t.x+t.y*t.y);i=1}else{s=-Math.sqrt(t.x*t.x+t.y*t.y);i=-1}var n=0;if(s!==0){n=Math.atan2(i*t.x,i*t.y)}if(this.sphere){r=At(this.long0+n/this.ns,this.over);e=Be(this.g-s/this.a);t.x=r;t.y=e;return t}else{var h=this.g-s/this.a;e=He(h,this.e0,this.e1,this.e2,this.e3);r=At(this.long0+n/this.ns,this.over);t.x=r;t.y=e;return t}}var pn=["Equidistant_Conic","eqdc"];var _n={init:cn,forward:dn,inverse:mn,names:pn};function gn(){this.R=this.a}function Mn(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r,n;if(Math.abs(s)<=I){r=this.x0+this.R*e;n=this.y0}var h=pr(2*Math.abs(s/Math.PI));if(Math.abs(e)<=I||Math.abs(Math.abs(s)-G)<=I){r=this.x0;if(s>=0){n=this.y0+Math.PI*this.R*Math.tan(.5*h)}else{n=this.y0+Math.PI*this.R*-Math.tan(.5*h)}}var a=.5*Math.abs(Math.PI/e-e/Math.PI);var o=a*a;var f=Math.sin(h);var u=Math.cos(h);var l=u/(f+u-1);var v=l*l;var c=l*(2/f-1);var d=c*c;var m=Math.PI*this.R*(a*(l-d)+Math.sqrt(o*(l-d)*(l-d)-(d+o)*(v-d)))/(d+o);if(e<0){m=-m}r=this.x0+m;var p=o+l;m=Math.PI*this.R*(c*p-a*Math.sqrt((d+o)*(o+1)-p*p))/(d+o);if(s>=0){n=this.y0+m}else{n=this.y0-m}t.x=r;t.y=n;return t}function zn(t){var i,s;var e,r,n,h,a,o;var f;var u;var l;var v;var c;t.x-=this.x0;t.y-=this.y0;l=Math.PI*this.R;e=t.x/l;r=t.y/l;n=e*e+r*r;h=-Math.abs(r)*(1+n);a=h-2*r*r+e*e;o=-2*h+1+2*r*r+n*n;c=r*r/o+(2*a*a*a/o/o/o-9*h*a/o/o)/27;f=(h-a*a/3/o)/o;u=2*Math.sqrt(-f/3);l=3*c/f/u;if(Math.abs(l)>1){if(l>=0){l=1}else{l=-1}}v=Math.acos(l)/3;if(t.y>=0){s=(-u*Math.cos(v+Math.PI/3)-a/3/o)*Math.PI}else{s=-(-u*Math.cos(v+Math.PI/3)-a/3/o)*Math.PI}if(Math.abs(e)<I){i=this.long0}else{i=At(this.long0+Math.PI*(n-1+Math.sqrt(1+2*(e*e-r*r)+n*n))/2/e,this.over)}t.x=i;t.y=s;return t}var wn=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];var yn={init:gn,forward:Mn,inverse:zn,names:wn};function bn(t,i,s,e,r,n){const h=e-i;const a=Math.atan((1-n)*Math.tan(t));const o=Math.atan((1-n)*Math.tan(s));const f=Math.sin(a),u=Math.cos(a);const l=Math.sin(o),v=Math.cos(o);let c=h,d,m=100;let p,_,g,M,z,w,y,b,x;let E,S,G,P,k;do{p=Math.sin(c);_=Math.cos(c);g=Math.sqrt(v*p*(v*p)+(u*l-f*v*_)*(u*l-f*v*_));if(g===0){return{azi1:0,s12:0}}M=f*l+u*v*_;z=Math.atan2(g,M);w=u*v*p/g;y=1-w*w;b=y!==0?M-2*f*l/y:0;x=n/16*y*(4+n*(4-3*y));d=c;c=h+(1-x)*n*w*(z+x*g*(b+x*M*(-1+2*b*b)))}while(Math.abs(c-d)>1e-12&&--m>0);if(m===0){return{azi1:NaN,s12:NaN}}E=y*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n)));S=1+E/16384*(4096+E*(-768+E*(320-175*E)));G=E/1024*(256+E*(-128+E*(74-47*E)));P=G*g*(b+G/4*(M*(-1+2*b*b)-G/6*b*(-3+4*g*g)*(-3+4*b*b)));k=r*(1-n)*S*(z-P);const N=Math.atan2(v*p,u*l-f*v*_);return{azi1:N,s12:k}}function xn(t,i,s,e,r,n){const h=Math.atan((1-n)*Math.tan(t));const a=Math.sin(h),o=Math.cos(h);const f=Math.sin(s),u=Math.cos(s);const l=Math.atan2(a,o*u);const v=o*f;const c=1-v*v;const d=c*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n)));const m=1+d/16384*(4096+d*(-768+d*(320-175*d)));const p=d/1024*(256+d*(-128+d*(74-47*d)));let _=e/(r*(1-n)*m),g,M=100;let z,w,y,b;do{z=Math.cos(2*l+_);w=Math.sin(_);y=Math.cos(_);b=p*w*(z+p/4*(y*(-1+2*z*z)-p/6*z*(-3+4*w*w)*(-3+4*z*z)));g=_;_=e/(r*(1-n)*m)+b}while(Math.abs(_-g)>1e-12&&--M>0);if(M===0){return{lat2:NaN,lon2:NaN}}const x=a*w-o*y*u;const E=Math.atan2(a*y+o*w*u,(1-n)*Math.sqrt(v*v+x*x));const S=Math.atan2(w*f,o*y-a*w*u);const G=n/16*c*(4+n*(4-3*c));const P=S-(1-G)*n*v*(_+G*w*(z+G*y*(-1+2*z*z)));const k=i+P;return{lat2:E,lon2:k}}function En(){this.sin_p12=Math.sin(this.lat0);this.cos_p12=Math.cos(this.lat0);this.f=this.es/(1+Math.sqrt(1-this.es))}function Sn(t){var i=t.x;var s=t.y;var e=Math.sin(t.y);var r=Math.cos(t.y);var n=At(i-this.long0,this.over);var h,a,o,f,u,l,v,c,d,m,p;if(this.sphere){if(Math.abs(this.sin_p12-1)<=I){t.x=this.x0+this.a*(G-s)*Math.sin(n);t.y=this.y0-this.a*(G-s)*Math.cos(n);return t}else if(Math.abs(this.sin_p12+1)<=I){t.x=this.x0+this.a*(G+s)*Math.sin(n);t.y=this.y0+this.a*(G+s)*Math.cos(n);return t}else{d=this.sin_p12*e+this.cos_p12*r*Math.cos(n);v=Math.acos(d);c=v?v/Math.sin(v):1;t.x=this.x0+this.a*c*r*Math.sin(n);t.y=this.y0+this.a*c*(this.cos_p12*e-this.sin_p12*r*Math.cos(n));return t}}else{h=We(this.es);a=je(this.es);o=Ve(this.es);f=Ue(this.es);if(Math.abs(this.sin_p12-1)<=I){u=this.a*De(h,a,o,f,G);l=this.a*De(h,a,o,f,s);t.x=this.x0+(u-l)*Math.sin(n);t.y=this.y0-(u-l)*Math.cos(n);return t}else if(Math.abs(this.sin_p12+1)<=I){u=this.a*De(h,a,o,f,G);l=this.a*De(h,a,o,f,s);t.x=this.x0+(u+l)*Math.sin(n);t.y=this.y0+(u+l)*Math.cos(n);return t}else{if(Math.abs(i)<I&&Math.abs(s-this.lat0)<I){t.x=t.y=0;return t}m=bn(this.lat0,this.long0,s,i,this.a,this.f);p=m.azi1;t.x=m.s12*Math.sin(p);t.y=m.s12*Math.cos(p);return t}}}function Gn(t){t.x-=this.x0;t.y-=this.y0;var i,s,e,r,n,h,a,o,f,u,l,v,c,d,m,p;if(this.sphere){i=Math.sqrt(t.x*t.x+t.y*t.y);if(i>2*G*this.a){return}s=i/this.a;e=Math.sin(s);r=Math.cos(s);n=this.long0;if(Math.abs(i)<=I){h=this.lat0}else{h=pr(r*this.sin_p12+t.y*e*this.cos_p12/i);a=Math.abs(this.lat0)-G;if(Math.abs(a)<=I){if(this.lat0>=0){n=At(this.long0+Math.atan2(t.x,-t.y),this.over)}else{n=At(this.long0-Math.atan2(-t.x,t.y),this.over)}}else{n=At(this.long0+Math.atan2(t.x*e,i*this.cos_p12*r-t.y*this.sin_p12*e),this.over)}}t.x=n;t.y=h;return t}else{o=We(this.es);f=je(this.es);u=Ve(this.es);l=Ue(this.es);if(Math.abs(this.sin_p12-1)<=I){v=this.a*De(o,f,u,l,G);i=Math.sqrt(t.x*t.x+t.y*t.y);c=v-i;h=He(c/this.a,o,f,u,l);n=At(this.long0+Math.atan2(t.x,-1*t.y),this.over);t.x=n;t.y=h;return t}else if(Math.abs(this.sin_p12+1)<=I){v=this.a*De(o,f,u,l,G);i=Math.sqrt(t.x*t.x+t.y*t.y);c=i-v;h=He(c/this.a,o,f,u,l);n=At(this.long0+Math.atan2(t.x,t.y),this.over);t.x=n;t.y=h;return t}else{d=Math.atan2(t.x,t.y);m=Math.sqrt(t.x*t.x+t.y*t.y);p=xn(this.lat0,this.long0,d,m,this.a,this.f);t.x=p.lon2;t.y=p.lat2;return t}}}var Pn=["Azimuthal_Equidistant","aeqd"];var kn={init:En,forward:Sn,inverse:Gn,names:Pn};function Nn(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0)}function In(t){var i,s;var e;var r;var n;var h,a,o;var f=t.x;var u=t.y;e=At(f-this.long0,this.over);i=Math.sin(u);s=Math.cos(u);r=Math.cos(e);h=this.sin_p14*i+this.cos_p14*s*r;n=1;if(h>0||Math.abs(h)<=I){a=this.a*n*s*Math.sin(e);o=this.y0+this.a*n*(this.cos_p14*i-this.sin_p14*s*r)}t.x=a;t.y=o;return t}function Cn(t){var i;var s;var e,r;var n;var h,a;t.x-=this.x0;t.y-=this.y0;i=Math.sqrt(t.x*t.x+t.y*t.y);s=pr(i/this.a);e=Math.sin(s);r=Math.cos(s);h=this.long0;if(Math.abs(i)<=I){a=this.lat0;t.x=h;t.y=a;return t}a=pr(r*this.sin_p14+t.y*e*this.cos_p14/i);n=Math.abs(this.lat0)-G;if(Math.abs(n)<=I){if(this.lat0>=0){h=At(this.long0+Math.atan2(t.x,-t.y),this.over)}else{h=At(this.long0-Math.atan2(-t.x,t.y),this.over)}t.x=h;t.y=a;return t}h=At(this.long0+Math.atan2(t.x*e,i*this.cos_p14*r-t.y*this.sin_p14*e),this.over);t.x=h;t.y=a;return t}var An=["ortho"];var Rn={init:Nn,forward:In,inverse:Cn,names:An};var Tn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6};var On={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Ln(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.lat_ts=this.lat_ts||0;this.title=this.title||"Quadrilateralized Spherical Cube";if(this.lat0>=G-R/2){this.face=Tn.TOP}else if(this.lat0<=-(G-R/2)){this.face=Tn.BOTTOM}else if(Math.abs(this.long0)<=R){this.face=Tn.FRONT}else if(Math.abs(this.long0)<=G+R){this.face=this.long0>0?Tn.RIGHT:Tn.LEFT}else{this.face=Tn.BACK}if(this.es!==0){this.one_minus_f=1-(this.a-this.b)/this.a;this.one_minus_f_squared=this.one_minus_f*this.one_minus_f}}function Fn(t){var i={x:0,y:0};var s,e;var r,n;var h,a;var o={value:0};t.x-=this.long0;if(this.es!==0){s=Math.atan(this.one_minus_f_squared*Math.tan(t.y))}else{s=t.y}e=t.x;if(this.face===Tn.TOP){n=G-s;if(e>=R&&e<=G+R){o.value=On.AREA_0;r=e-G}else if(e>G+R||e<=-(G+R)){o.value=On.AREA_1;r=e>0?e-O:e+O}else if(e>-(G+R)&&e<=-R){o.value=On.AREA_2;r=e+G}else{o.value=On.AREA_3;r=e}}else if(this.face===Tn.BOTTOM){n=G+s;if(e>=R&&e<=G+R){o.value=On.AREA_0;r=-e+G}else if(e<R&&e>=-R){o.value=On.AREA_1;r=-e}else if(e<-R&&e>=-(G+R)){o.value=On.AREA_2;r=-e-G}else{o.value=On.AREA_3;r=e>0?-e+O:-e-O}}else{var f,u,l;var v,c;var d,m;if(this.face===Tn.RIGHT){e=jn(e,+G)}else if(this.face===Tn.BACK){e=jn(e,3.14159265359)}else if(this.face===Tn.LEFT){e=jn(e,-G)}v=Math.sin(s);c=Math.cos(s);d=Math.sin(e);m=Math.cos(e);f=c*m;u=c*d;l=v;if(this.face===Tn.FRONT){n=Math.acos(f);r=Wn(n,l,u,o)}else if(this.face===Tn.RIGHT){n=Math.acos(u);r=Wn(n,l,-f,o)}else if(this.face===Tn.BACK){n=Math.acos(-f);r=Wn(n,l,-u,o)}else if(this.face===Tn.LEFT){n=Math.acos(-u);r=Wn(n,l,f,o)}else{n=r=0;o.value=On.AREA_0}}a=Math.atan(12/O*(r+Math.acos(Math.sin(r)*Math.cos(R))-G));h=Math.sqrt((1-Math.cos(n))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r)))));if(o.value===On.AREA_1){a+=G}else if(o.value===On.AREA_2){a+=O}else if(o.value===On.AREA_3){a+=1.5*O}i.x=h*Math.cos(a);i.y=h*Math.sin(a);i.x=i.x*this.a+this.x0;i.y=i.y*this.a+this.y0;t.x=i.x;t.y=i.y;return t}function Dn(t){var i={lam:0,phi:0};var s,e,r,n;var h,a,o,f;var u;var l={value:0};t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;e=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y));s=Math.atan2(t.y,t.x);if(t.x>=0&&t.x>=Math.abs(t.y)){l.value=On.AREA_0}else if(t.y>=0&&t.y>=Math.abs(t.x)){l.value=On.AREA_1;s-=G}else if(t.x<0&&-t.x>=Math.abs(t.y)){l.value=On.AREA_2;s=s<0?s+O:s-O}else{l.value=On.AREA_3;s+=G}u=O/12*Math.tan(s);h=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2));a=Math.atan(h);r=Math.cos(s);n=Math.tan(e);o=1-r*r*n*n*(1-Math.cos(Math.atan(1/Math.cos(a))));if(o<-1){o=-1}else if(o>1){o=1}if(this.face===Tn.TOP){f=Math.acos(o);i.phi=G-f;if(l.value===On.AREA_0){i.lam=a+G}else if(l.value===On.AREA_1){i.lam=a<0?a+O:a-O}else if(l.value===On.AREA_2){i.lam=a-G}else{i.lam=a}}else if(this.face===Tn.BOTTOM){f=Math.acos(o);i.phi=f-G;if(l.value===On.AREA_0){i.lam=-a+G}else if(l.value===On.AREA_1){i.lam=-a}else if(l.value===On.AREA_2){i.lam=-a-G}else{i.lam=a<0?-a-O:-a+O}}else{var v,c,d;v=o;u=v*v;if(u>=1){d=0}else{d=Math.sqrt(1-u)*Math.sin(a)}u+=d*d;if(u>=1){c=0}else{c=Math.sqrt(1-u)}if(l.value===On.AREA_1){u=c;c=-d;d=u}else if(l.value===On.AREA_2){c=-c;d=-d}else if(l.value===On.AREA_3){u=c;c=d;d=-u}if(this.face===Tn.RIGHT){u=v;v=-c;c=u}else if(this.face===Tn.BACK){v=-v;c=-c}else if(this.face===Tn.LEFT){u=v;v=c;c=-u}i.phi=Math.acos(-d)-G;i.lam=Math.atan2(c,v);if(this.face===Tn.RIGHT){i.lam=jn(i.lam,-G)}else if(this.face===Tn.BACK){i.lam=jn(i.lam,-3.14159265359)}else if(this.face===Tn.LEFT){i.lam=jn(i.lam,+G)}}if(this.es!==0){var m;var p,_;m=i.phi<0?1:0;p=Math.tan(i.phi);_=this.b/Math.sqrt(p*p+this.one_minus_f_squared);i.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_));if(m){i.phi=-i.phi}}i.lam+=this.long0;t.x=i.lam;t.y=i.phi;return t}function Wn(t,i,s,e){var r;if(t<I){e.value=On.AREA_0;r=0}else{r=Math.atan2(i,s);if(Math.abs(r)<=R){e.value=On.AREA_0}else if(r>R&&r<=G+R){e.value=On.AREA_1;r-=G}else if(r>G+R||r<=-(G+R)){e.value=On.AREA_2;r=r>=0?r-O:r+O}else{e.value=On.AREA_3;r+=G}}return r}function jn(t,i){var s=t+i;if(s<-3.14159265359){s+=T}else if(s>3.14159265359){s-=T}return s}var Vn=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];var Un={init:Ln,forward:Fn,inverse:Dn,names:Vn};var qn=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]];var Bn=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]];var Hn=.8487;var Xn=1.3523;var Yn=A/5;var Jn=1/Yn;var Kn=18;var Zn=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))};var $n=function(t,i){return t[1]+i*(2*t[2]+i*3*t[3])};function Qn(t,i,s,e){var r=i;for(;e;--e){var n=t(r);r-=n;if(Math.abs(n)<s){break}}return r}function th(){this.x0=this.x0||0;this.y0=this.y0||0;this.long0=this.long0||0;this.es=0;this.title=this.title||"Robinson"}function ih(t){var i=At(t.x-this.long0,this.over);var s=Math.abs(t.y);var e=Math.floor(s*Yn);if(e<0){e=0}else if(e>=Kn){e=Kn-1}s=A*(s-Jn*e);var r={x:Zn(qn[e],s)*i,y:Zn(Bn[e],s)};if(t.y<0){r.y=-r.y}r.x=r.x*this.a*Hn+this.x0;r.y=r.y*this.a*Xn+this.y0;return r}function sh(t){var i={x:(t.x-this.x0)/(this.a*Hn),y:Math.abs(t.y-this.y0)/(this.a*Xn)};if(i.y>=1){i.x/=qn[Kn][0];i.y=t.y<0?-G:G}else{var s=Math.floor(i.y*Kn);if(s<0){s=0}else if(s>=Kn){s=Kn-1}for(;;){if(Bn[s][0]>i.y){--s}else if(Bn[s+1][0]<=i.y){++s}else{break}}var e=Bn[s];var r=5*(i.y-e[0])/(Bn[s+1][0]-e[0]);r=Qn((function(t){return(Zn(e,t)-i.y)/$n(e,t)}),r,I,100);i.x/=Zn(qn[s],r);i.y=(5*s+r)*C;if(t.y<0){i.y=-i.y}}i.x=At(i.x+this.long0,this.over);return i}var eh=["Robinson","robin"];var rh={init:th,forward:ih,inverse:sh,names:eh};function nh(){this.name="geocent"}function hh(t){var i=xi(t,this.es,this.a);return i}function ah(t){var i=Ei(t,this.es,this.a,this.b);return i}var oh=["Geocentric","geocentric","geocent","Geocent"];var fh={init:nh,forward:hh,inverse:ah,names:oh};var uh={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3};var lh={h:{def:1e5,num:true},azi:{def:0,num:true,degrees:true},tilt:{def:0,num:true,degrees:true},long0:{def:0,num:true},lat0:{def:0,num:true}};function vh(){Object.keys(lh).forEach(function(t){if(typeof this[t]==="undefined"){this[t]=lh[t].def}else if(lh[t].num&&isNaN(this[t])){throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t])}else if(lh[t].num){this[t]=parseFloat(this[t])}if(lh[t].degrees){this[t]=this[t]*C}}.bind(this));if(Math.abs(Math.abs(this.lat0)-G)<I){this.mode=this.lat0<0?uh.S_POLE:uh.N_POLE}else if(Math.abs(this.lat0)<I){this.mode=uh.EQUIT}else{this.mode=uh.OBLIQ;this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0)}this.pn1=this.h/this.a;if(this.pn1<=0||this.pn1>1e10){throw new Error("Invalid height")}this.p=1+this.pn1;this.rp=1/this.p;this.h1=1/this.pn1;this.pfact=(this.p+1)*this.h1;this.es=0;var t=this.tilt;var i=this.azi;this.cg=Math.cos(i);this.sg=Math.sin(i);this.cw=Math.cos(t);this.sw=Math.sin(t)}function ch(t){t.x-=this.long0;var i=Math.sin(t.y);var s=Math.cos(t.y);var e=Math.cos(t.x);var r,n;switch(this.mode){case uh.OBLIQ:n=this.sinph0*i+this.cosph0*s*e;break;case uh.EQUIT:n=s*e;break;case uh.S_POLE:n=-i;break;case uh.N_POLE:n=i;break}n=this.pn1/(this.p-n);r=n*s*Math.sin(t.x);switch(this.mode){case uh.OBLIQ:n*=this.cosph0*i-this.sinph0*s*e;break;case uh.EQUIT:n*=i;break;case uh.N_POLE:n*=-(s*e);break;case uh.S_POLE:n*=s*e;break}var h,a;h=n*this.cg+r*this.sg;a=1/(h*this.sw*this.h1+this.cw);r=(r*this.cg-n*this.sg)*this.cw*a;n=h*a;t.x=r*this.a;t.y=n*this.a;return t}function dh(t){t.x/=this.a;t.y/=this.a;var i={x:t.x,y:t.y};var s,e,r;r=1/(this.pn1-t.y*this.sw);s=this.pn1*t.x*r;e=this.pn1*t.y*this.cw*r;t.x=s*this.cg+e*this.sg;t.y=e*this.cg-s*this.sg;var n=Ls(t.x,t.y);if(Math.abs(n)<I){i.x=0;i.y=t.y}else{var h,a;a=1-n*n*this.pfact;a=(this.p-Math.sqrt(a))/(this.pn1/n+n/this.pn1);h=Math.sqrt(1-a*a);switch(this.mode){case uh.OBLIQ:i.y=Math.asin(h*this.sinph0+t.y*a*this.cosph0/n);t.y=(h-this.sinph0*Math.sin(i.y))*n;t.x*=a*this.cosph0;break;case uh.EQUIT:i.y=Math.asin(t.y*a/n);t.y=h*n;t.x*=a;break;case uh.N_POLE:i.y=Math.asin(h);t.y=-t.y;break;case uh.S_POLE:i.y=-Math.asin(h);break}i.x=Math.atan2(t.x,t.y)}t.x=i.x+this.long0;t.y=i.y;return t}var mh=["Tilted_Perspective","tpers"];var ph={init:vh,forward:ch,inverse:dh,names:mh};function _h(){this.flip_axis=this.sweep==="x"?1:0;this.h=Number(this.h);this.radius_g_1=this.h/this.a;if(this.radius_g_1<=0||this.radius_g_1>1e10){throw new Error}this.radius_g=1+this.radius_g_1;this.C=this.radius_g*this.radius_g-1;if(this.es!==0){var t=1-this.es;var i=1/t;this.radius_p=Math.sqrt(t);this.radius_p2=t;this.radius_p_inv2=i;this.shape="ellipse"}else{this.radius_p=1;this.radius_p2=1;this.radius_p_inv2=1;this.shape="sphere"}if(!this.title){this.title="Geostationary Satellite View"}}function gh(t){var i=t.x;var s=t.y;var e,r,n,h;i=i-this.long0;if(this.shape==="ellipse"){s=Math.atan(this.radius_p2*Math.tan(s));var a=this.radius_p/Ls(this.radius_p*Math.cos(s),Math.sin(s));r=a*Math.cos(i)*Math.cos(s);n=a*Math.sin(i)*Math.cos(s);h=a*Math.sin(s);if((this.radius_g-r)*r-n*n-h*h*this.radius_p_inv2<0){t.x=Number.NaN;t.y=Number.NaN;return t}e=this.radius_g-r;if(this.flip_axis){t.x=this.radius_g_1*Math.atan(n/Ls(h,e));t.y=this.radius_g_1*Math.atan(h/e)}else{t.x=this.radius_g_1*Math.atan(n/e);t.y=this.radius_g_1*Math.atan(h/Ls(n,e))}}else if(this.shape==="sphere"){e=Math.cos(s);r=Math.cos(i)*e;n=Math.sin(i)*e;h=Math.sin(s);e=this.radius_g-r;if(this.flip_axis){t.x=this.radius_g_1*Math.atan(n/Ls(h,e));t.y=this.radius_g_1*Math.atan(h/e)}else{t.x=this.radius_g_1*Math.atan(n/e);t.y=this.radius_g_1*Math.atan(h/Ls(n,e))}}t.x=t.x*this.a;t.y=t.y*this.a;return t}function Mh(t){var i=-1;var s=0;var e=0;var r,n,h,a;t.x=t.x/this.a;t.y=t.y/this.a;if(this.shape==="ellipse"){if(this.flip_axis){e=Math.tan(t.y/this.radius_g_1);s=Math.tan(t.x/this.radius_g_1)*Ls(1,e)}else{s=Math.tan(t.x/this.radius_g_1);e=Math.tan(t.y/this.radius_g_1)*Ls(1,s)}var o=e/this.radius_p;r=s*s+o*o+i*i;n=2*this.radius_g*i;h=n*n-4*r*this.C;if(h<0){t.x=Number.NaN;t.y=Number.NaN;return t}a=(-n-Math.sqrt(h))/(2*r);i=this.radius_g+a*i;s*=a;e*=a;t.x=Math.atan2(s,i);t.y=Math.atan(e*Math.cos(t.x)/i);t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis){e=Math.tan(t.y/this.radius_g_1);s=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+e*e)}else{s=Math.tan(t.x/this.radius_g_1);e=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+s*s)}r=s*s+e*e+i*i;n=2*this.radius_g*i;h=n*n-4*r*this.C;if(h<0){t.x=Number.NaN;t.y=Number.NaN;return t}a=(-n-Math.sqrt(h))/(2*r);i=this.radius_g+a*i;s*=a;e*=a;t.x=Math.atan2(s,i);t.y=Math.atan(e*Math.cos(t.x)/i)}t.x=t.x+this.long0;return t}var zh=["Geostationary Satellite View","Geostationary_Satellite","geos"];var wh={init:_h,forward:gh,inverse:Mh,names:zh};var yh=1.340264,bh=-.081106,xh=893e-6,Eh=.003796,Sh=Math.sqrt(3)/2;function Gh(){this.es=0;this.long0=this.long0!==undefined?this.long0:0;this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0}function Ph(t){var i=At(t.x-this.long0,this.over);var s=t.y;var e=Math.asin(Sh*Math.sin(s)),r=e*e,n=r*r*r;t.x=i*Math.cos(e)/(Sh*(yh+3*bh*r+n*(7*xh+9*Eh*r)));t.y=e*(yh+bh*r+n*(xh+Eh*r));t.x=this.a*t.x+this.x0;t.y=this.a*t.y+this.y0;return t}function kh(t){t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;var i=1e-9,s=12,e=t.y,r,n,h,a,o,f;for(f=0;f<s;++f){r=e*e;n=r*r*r;h=e*(yh+bh*r+n*(xh+Eh*r))-t.y;a=yh+3*bh*r+n*(7*xh+9*Eh*r);e-=o=h/a;if(Math.abs(o)<i){break}}r=e*e;n=r*r*r;t.x=Sh*t.x*(yh+3*bh*r+n*(7*xh+9*Eh*r))/Math.cos(e);t.y=Math.asin(Math.sin(e)/Sh);t.x=At(t.x+this.long0,this.over);return t}var Nh=["eqearth","Equal Earth","Equal_Earth"];var Ih={init:Gh,forward:Ph,inverse:kh,names:Nh};var Ch=1e-10;function Ah(){var t;this.phi1=this.lat1;if(Math.abs(this.phi1)<Ch){throw new Error}if(this.es){this.en=Gs(this.es);this.m1=Ps(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en);this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1);this.inverse=Th;this.forward=Rh}else{if(Math.abs(this.phi1)+Ch>=G){this.cphi1=0}else{this.cphi1=1/Math.tan(this.phi1)}this.inverse=Lh;this.forward=Oh}}function Rh(t){var i=At(t.x-(this.long0||0),this.over);var s=t.y;var e,r,n;e=this.am1+this.m1-Ps(s,r=Math.sin(s),n=Math.cos(s),this.en);r=n*i/(e*Math.sqrt(1-this.es*r*r));t.x=e*Math.sin(r);t.y=this.am1-e*Math.cos(r);t.x=this.a*t.x+(this.x0||0);t.y=this.a*t.y+(this.y0||0);return t}function Th(t){t.x=(t.x-(this.x0||0))/this.a;t.y=(t.y-(this.y0||0))/this.a;var i,s,e,r;s=Ls(t.x,t.y=this.am1-t.y);r=Ns(this.am1+this.m1-s,this.es,this.en);if((i=Math.abs(r))<G){i=Math.sin(r);e=s*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(r)}else if(Math.abs(i-G)<=Ch){e=0}else{throw new Error}t.x=At(e+(this.long0||0),this.over);t.y=Be(r);return t}function Oh(t){var i=At(t.x-(this.long0||0),this.over);var s=t.y;var e,r;r=this.cphi1+this.phi1-s;if(Math.abs(r)>Ch){t.x=r*Math.sin(e=i*Math.cos(s)/r);t.y=this.cphi1-r*Math.cos(e)}else{t.x=t.y=0}t.x=this.a*t.x+(this.x0||0);t.y=this.a*t.y+(this.y0||0);return t}function Lh(t){t.x=(t.x-(this.x0||0))/this.a;t.y=(t.y-(this.y0||0))/this.a;var i,s;var e=Ls(t.x,t.y=this.cphi1-t.y);s=this.cphi1+this.phi1-e;if(Math.abs(s)>G){throw new Error}if(Math.abs(Math.abs(s)-G)<=Ch){i=0}else{i=e*Math.atan2(t.x,t.y)/Math.cos(s)}t.x=At(i+(this.long0||0),this.over);t.y=Be(s);return t}var Fh=["bonne","Bonne (Werner lat_1=90)"];var Dh={init:Ah,names:Fh};const Wh={OBLIQUE:{forward:Hh,inverse:Yh},TRANSVERSE:{forward:Xh,inverse:Jh}};const jh={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};function Vh(){this.x0=this.x0||0;this.y0=this.y0||0;this.long0=this.long0||0;this.title=this.title||"General Oblique Transformation";this.isIdentity=Ut.includes(this.o_proj);if(!this.o_proj){throw new Error("Missing parameter: o_proj")}if(this.o_proj===`ob_tran`){throw new Error("Invalid value for o_proj: "+this.o_proj)}const t=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim();const i=yi(t);if(!i){throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj)}i.long0=0;this.obliqueProjection=i;let s;const e=Object.keys(jh);const r=t=>{if(typeof this[t]===`undefined`){return undefined}const i=parseFloat(this[t])*C;if(isNaN(i)){throw new Error("Invalid value for "+t+": "+this[t])}return i};for(let t=0;t<e.length;t++){const i=e[t];const n=jh[i];const h=Object.entries(n);const a=h.some((([t])=>typeof this[t]!=="undefined"));if(!a){continue}s=n;for(let t=0;t<h.length;t++){const[i,s]=h[t];const e=r(i);if(typeof e==="undefined"){throw new Error("Missing parameter: "+i+".")}this[s]=e}break}if(!s){throw new Error("No valid parameters provided for ob_tran projection.")}const{lamp:n,phip:h}=Bh(this,s);this.lamp=n;if(Math.abs(h)>I){this.cphip=Math.cos(h);this.sphip=Math.sin(h);this.projectionType=Wh.OBLIQUE}else{this.projectionType=Wh.TRANSVERSE}}function Uh(t){return this.projectionType.forward(this,t)}function qh(t){return this.projectionType.inverse(this,t)}function Bh(t,i){let s,e;if(i===jh.ROTATE){let i=t.oLongC;let r=t.oLatC;let n=t.oAlpha;if(Math.abs(Math.abs(r)-G)<=I){throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°")}e=i+Math.atan2(-1*Math.cos(n),-1*Math.sin(n)*Math.sin(r));s=Math.asin(Math.cos(r)*Math.sin(n))}else if(i===jh.NEW_POLE){e=t.oLongP;s=t.oLatP}else{let i=t.oLong1;let r=t.oLat1;let n=t.oLong2;let h=t.oLat2;let a=Math.abs(r);if(Math.abs(r)>G-I){throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°")}if(Math.abs(h)>G-I){throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°")}if(Math.abs(r-h)<I){throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2")}if(a<I){throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero")}e=Math.atan2(Math.cos(r)*Math.sin(h)*Math.cos(i)-Math.sin(r)*Math.cos(h)*Math.cos(n),Math.sin(r)*Math.cos(h)*Math.sin(n)-Math.cos(r)*Math.sin(h)*Math.sin(i));s=Math.atan(-1*Math.cos(e-i)/Math.tan(r))}return{lamp:e,phip:s}}function Hh(t,i){let{x:s,y:e}=i;s+=t.long0;const r=Math.cos(s);const n=Math.sin(e);const h=Math.cos(e);i.x=At(Math.atan2(h*Math.sin(s),t.sphip*h*r+t.cphip*n)+t.lamp);i.y=Math.asin(t.sphip*n-t.cphip*h*r);const a=t.obliqueProjection.forward(i);if(t.isIdentity){a.x*=A;a.y*=A}return a}function Xh(t,i){let{x:s,y:e}=i;s+=t.long0;const r=Math.cos(e);const n=Math.cos(s);i.x=At(Math.atan2(r*Math.sin(s),Math.sin(e))+t.lamp);i.y=Math.asin(-1*r*n);const h=t.obliqueProjection.forward(i);if(t.isIdentity){h.x*=A;h.y*=A}return h}function Yh(t,i){if(t.isIdentity){i.x*=C;i.y*=C}const s=t.obliqueProjection.inverse(i);let{x:e,y:r}=s;if(e<Number.MAX_VALUE){e-=t.lamp;const s=Math.cos(e);const n=Math.sin(r);const h=Math.cos(r);i.x=Math.atan2(h*Math.sin(e),t.sphip*h*s-t.cphip*n);i.y=Math.asin(t.sphip*n+t.cphip*h*s)}i.x=At(i.x+t.long0);return i}function Jh(t,i){if(t.isIdentity){i.x*=C;i.y*=C}const s=t.obliqueProjection.inverse(i);let{x:e,y:r}=s;if(e<Number.MAX_VALUE){const s=Math.cos(r);e-=t.lamp;i.x=Math.atan2(s*Math.sin(e),-1*Math.sin(r));i.y=Math.asin(s*Math.cos(e))}i.x=At(i.x+t.long0);return i}var Kh=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"];var Zh={init:Vh,forward:Uh,inverse:qh,names:Kh};function $h(t){t.Proj.projections.add(Ts);t.Proj.projections.add(Ys);t.Proj.projections.add(Qs);t.Proj.projections.add(ue);t.Proj.projections.add(pe);t.Proj.projections.add(we);t.Proj.projections.add(Pe);t.Proj.projections.add(Ae);t.Proj.projections.add(Fe);t.Proj.projections.add(Ze);t.Proj.projections.add(mr);t.Proj.projections.add(yr);t.Proj.projections.add(Gr);t.Proj.projections.add(Ar);t.Proj.projections.add(Fr);t.Proj.projections.add(qr);t.Proj.projections.add(Jr);t.Proj.projections.add(tn);t.Proj.projections.add(an);t.Proj.projections.add(vn);t.Proj.projections.add(_n);t.Proj.projections.add(yn);t.Proj.projections.add(kn);t.Proj.projections.add(Rn);t.Proj.projections.add(Un);t.Proj.projections.add(rh);t.Proj.projections.add(fh);t.Proj.projections.add(ph);t.Proj.projections.add(wh);t.Proj.projections.add(Ih);t.Proj.projections.add(Dh);t.Proj.projections.add(Zh)}const Qh=Object.assign(Vi,{defaultDatum:"WGS84",Proj:yi,WGS84:new yi("WGS84"),Point:ds,toPoint:Ri,defs:wt,nadgrid:oi,transform:Fi,mgrs:Zi,version:"__VERSION__"});$h(Qh);var ta={};ta.ASSUME_TOUCH=false;ta.DEFAULT_MAX_ZOOM=42;ta.DEFAULT_MIN_ZOOM=0;ta.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5;ta.DEFAULT_TILE_SIZE=256;ta.DEFAULT_WMS_VERSION="1.3.0";ta.ENABLE_CANVAS=true;ta.ENABLE_PROJ4JS=true;ta.ENABLE_RASTER_REPROJECTION=true;ta.ENABLE_WEBGL=true;ta.DEBUG_WEBGL=true;ta.INITIAL_ATLAS_SIZE=256;ta.MAX_ATLAS_SIZE=-1;ta.MOUSEWHEELZOOM_MAXDELTA=1;ta.OVERVIEWMAP_MAX_RATIO=.75;ta.OVERVIEWMAP_MIN_RATIO=.1;ta.RASTER_REPROJECTION_MAX_SOURCE_TILES=100;ta.RASTER_REPROJECTION_MAX_SUBDIVISION=10;ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25;ta.SIMPLIFY_TOLERANCE=.5;ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024;ta.VERSION="v4.6.5";ta.inherits=function(t,i){t.prototype=Object.create(i.prototype);t.prototype.constructor=t};ta.nullFunction=function(){};ta.getUid=function(t){return t.ol_uid||(t.ol_uid=++ta.uidCounter_)};ta.uidCounter_=0;var ia={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"};var sa={PROPERTYCHANGE:"propertychange"};var ea={};ea.assign=typeof Object.assign==="function"?Object.assign:function(t,i){if(t===undefined||t===null){throw new TypeError("Cannot convert undefined or null to object")}var s=Object(t);for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(n!==undefined&&n!==null){for(var h in n){if(n.hasOwnProperty(h)){s[h]=n[h]}}}}return s};ea.clear=function(t){for(var i in t){delete t[i]}};ea.getValues=function(t){var i=[];for(var s in t){i.push(t[s])}return i};ea.isEmpty=function(t){var i;for(i in t){return false}return!i};var ra={};ra.bindListener_=function(t){var i=function(i){var s=t.listener;var e=t.bindTo||t.target;if(t.callOnce){ra.unlistenByKey(t)}return s.call(e,i)};t.boundListener=i;return i};ra.findListener_=function(t,i,s,e){var r;for(var n=0,h=t.length;n<h;++n){r=t[n];if(r.listener===i&&r.bindTo===s){if(e){r.deleteIndex=n}return r}}return undefined};ra.getListeners=function(t,i){var s=t.ol_lm;return s?s[i]:undefined};ra.getListenerMap_=function(t){var i=t.ol_lm;if(!i){i=t.ol_lm={}}return i};ra.removeListeners_=function(t,i){var s=ra.getListeners(t,i);if(s){for(var e=0,r=s.length;e<r;++e){t.removeEventListener(i,s[e].boundListener);ea.clear(s[e])}s.length=0;var n=t.ol_lm;if(n){delete n[i];if(Object.keys(n).length===0){delete t.ol_lm}}}};ra.listen=function(t,i,s,e,r){var n=ra.getListenerMap_(t);var h=n[i];if(!h){h=n[i]=[]}var a=ra.findListener_(h,s,e,false);if(a){if(!r){a.callOnce=false}}else{a={bindTo:e,callOnce:!!r,listener:s,target:t,type:i};t.addEventListener(i,ra.bindListener_(a));h.push(a)}return a};ra.listenOnce=function(t,i,s,e){return ra.listen(t,i,s,e,true)};ra.unlisten=function(t,i,s,e){var r=ra.getListeners(t,i);if(r){var n=ra.findListener_(r,s,e,true);if(n){ra.unlistenByKey(n)}}};ra.unlistenByKey=function(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var i=ra.getListeners(t.target,t.type);if(i){var s="deleteIndex"in t?t.deleteIndex:i.indexOf(t);if(s!==-1){i.splice(s,1)}if(i.length===0){ra.removeListeners_(t.target,t.type)}}ea.clear(t)}};ra.unlistenAll=function(t){var i=ra.getListenerMap_(t);for(var s in i){ra.removeListeners_(t,s)}};var na=function(){};na.prototype.disposed_=false;na.prototype.dispose=function(){if(!this.disposed_){this.disposed_=true;this.disposeInternal()}};na.prototype.disposeInternal=ta.nullFunction;var ha=function(t){this.type=t;this.target=null};ha.prototype.preventDefault=ha.prototype.stopPropagation=function(){this.propagationStopped=true};ha.stopPropagation=function(t){t.stopPropagation()};ha.preventDefault=function(t){t.preventDefault()};var aa=function(){na.call(this);this.pendingRemovals_={};this.dispatching_={};this.listeners_={}};ta.inherits(aa,na);aa.prototype.addEventListener=function(t,i){var s=this.listeners_[t];if(!s){s=this.listeners_[t]=[]}if(s.indexOf(i)===-1){s.push(i)}};aa.prototype.dispatchEvent=function(t){var i=typeof t==="string"?new ha(t):t;var s=i.type;i.target=this;var e=this.listeners_[s];var r;if(e){if(!(s in this.dispatching_)){this.dispatching_[s]=0;this.pendingRemovals_[s]=0}++this.dispatching_[s];for(var n=0,h=e.length;n<h;++n){if(e[n].call(this,i)===false||i.propagationStopped){r=false;break}}--this.dispatching_[s];if(this.dispatching_[s]===0){var a=this.pendingRemovals_[s];delete this.pendingRemovals_[s];while(a--){this.removeEventListener(s,ta.nullFunction)}delete this.dispatching_[s]}return r}};aa.prototype.disposeInternal=function(){ra.unlistenAll(this)};aa.prototype.getListeners=function(t){return this.listeners_[t]};aa.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0};aa.prototype.removeEventListener=function(t,i){var s=this.listeners_[t];if(s){var e=s.indexOf(i);if(t in this.pendingRemovals_){s[e]=ta.nullFunction;++this.pendingRemovals_[t]}else{s.splice(e,1);if(s.length===0){delete this.listeners_[t]}}}};var oa={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",WHEEL:"wheel"};var fa=function(){aa.call(this);this.revision_=0};ta.inherits(fa,aa);fa.unByKey=function(t){if(Array.isArray(t)){for(var i=0,s=t.length;i<s;++i){ra.unlistenByKey(t[i])}}else{ra.unlistenByKey(t)}};fa.prototype.changed=function(){++this.revision_;this.dispatchEvent(oa.CHANGE)};fa.prototype.getRevision=function(){return this.revision_};fa.prototype.on=function(t,i,s){if(Array.isArray(t)){var e=t.length;var r=new Array(e);for(var n=0;n<e;++n){r[n]=ra.listen(this,t[n],i,s)}return r}else{return ra.listen(this,t,i,s)}};fa.prototype.once=function(t,i,s){if(Array.isArray(t)){var e=t.length;var r=new Array(e);for(var n=0;n<e;++n){r[n]=ra.listenOnce(this,t[n],i,s)}return r}else{return ra.listenOnce(this,t,i,s)}};fa.prototype.un=function(t,i,s){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;++e){ra.unlisten(this,t[e],i,s)}return}else{ra.unlisten(this,t,i,s)}};var ua=function(t){fa.call(this);ta.getUid(this);this.values_={};if(t!==undefined){this.setProperties(t)}};ta.inherits(ua,fa);ua.changeEventTypeCache_={};ua.getChangeEventType=function(t){return ua.changeEventTypeCache_.hasOwnProperty(t)?ua.changeEventTypeCache_[t]:ua.changeEventTypeCache_[t]="change:"+t};ua.prototype.get=function(t){var i;if(this.values_.hasOwnProperty(t)){i=this.values_[t]}return i};ua.prototype.getKeys=function(){return Object.keys(this.values_)};ua.prototype.getProperties=function(){return ea.assign({},this.values_)};ua.prototype.notify=function(t,i){var s;s=ua.getChangeEventType(t);this.dispatchEvent(new ua.Event(s,t,i));s=sa.PROPERTYCHANGE;this.dispatchEvent(new ua.Event(s,t,i))};ua.prototype.set=function(t,i,s){if(s){this.values_[t]=i}else{var e=this.values_[t];this.values_[t]=i;if(e!==i){this.notify(t,e)}}};ua.prototype.setProperties=function(t,i){var s;for(s in t){this.set(s,t[s],i)}};ua.prototype.unset=function(t,i){if(t in this.values_){var s=this.values_[t];delete this.values_[t];if(!i){this.notify(t,s)}}};ua.Event=function(t,i,s){ha.call(this,t);this.key=i;this.oldValue=s};ta.inherits(ua.Event,ha);var la=function(t){var i=ta.VERSION?ta.VERSION.split("-")[0]:"latest";this.message="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";this.code=t;this.name="AssertionError"};ta.inherits(la,Error);var va={};va.assert=function(t,i){if(!t){throw new la(i)}};var ca={};ca.clamp=function(t,i,s){return Math.min(Math.max(t,i),s)};ca.cosh=function(){var t;if("cosh"in Math){t=Math.cosh}else{t=function(t){var i=Math.exp(t);return(i+1/i)/2}}return t}();ca.roundUpToPowerOfTwo=function(t){va.assert(0<t,29);return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))};ca.squaredSegmentDistance=function(t,i,s,e,r,n){var h=r-s;var a=n-e;if(h!==0||a!==0){var o=((t-s)*h+(i-e)*a)/(h*h+a*a);if(o>1){s=r;e=n}else if(o>0){s+=h*o;e+=a*o}}return ca.squaredDistance(t,i,s,e)};ca.squaredDistance=function(t,i,s,e){var r=s-t;var n=e-i;return r*r+n*n};ca.solveLinearSystem=function(t){var i=t.length;for(var s=0;s<i;s++){var e=s;var r=Math.abs(t[s][s]);for(var n=s+1;n<i;n++){var h=Math.abs(t[n][s]);if(h>r){r=h;e=n}}if(r===0){return null}var a=t[e];t[e]=t[s];t[s]=a;for(var o=s+1;o<i;o++){var f=-t[o][s]/t[s][s];for(var u=s;u<i+1;u++){if(s==u){t[o][u]=0}else{t[o][u]+=f*t[s][u]}}}}var l=new Array(i);for(var v=i-1;v>=0;v--){l[v]=t[v][i]/t[v][v];for(var c=v-1;c>=0;c--){t[c][i]-=t[c][v]*l[v]}}return l};ca.toDegrees=function(t){return t*180/Math.PI};ca.toRadians=function(t){return t*Math.PI/180};ca.modulo=function(t,i){var s=t%i;return s*i<0?s+i:s};ca.lerp=function(t,i,s){return t+s*(i-t)};var da={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};
|
|
1
|
+
import{r as t,c as i,e as s,i as e,h as r,F as n,a as h,d as a}from"./p-BThcQvAs.js";import{h as o}from"./p--MYN2wgX.js";import{m as f}from"./p-CUGRmgip.js";import{t as u,c as l}from"./p-CBUfcdIy.js";import{c as v}from"./p-BzugsqyR.js";import{g as c}from"./p-E-ZsRS8r.js";import"./p-BubviQku.js";const d=()=>`.sc-stzh-header-h{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}[hidden].sc-stzh-header-h,[stzh-hidden].sc-stzh-header-h{display:none}.sc-stzh-header-h::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}.sc-stzh-header-h *.sc-stzh-header,.sc-stzh-header-h *.sc-stzh-header::before,.sc-stzh-header-h *.sc-stzh-header::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}.sc-stzh-header-h .has-focus.sc-stzh-header{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header{outline-style:none !important}.sc-stzh-header-h .stzh-fylingfocus-focused.sc-stzh-header::-moz-focus-inner{border:0 !important}.sc-stzh-header-h{--logo-width:var(--stzh-header-logo-width, auto);--logo-height:100%;--logobar-background-color:var(--stzh-header-logobar-background-color);--metabar-background-color:var(\n --stzh-header-metabar-background-color,\n var(--stzh-color-coolgrey10)\n );--menu-background-color:var(\n --stzh-header-menu-background-color,\n var(--stzh-color-secondary30)\n );--menu-list-item-background-hover:var(\n --stzh-header-menu-list-item-background-hover,\n var(--stzh-color-secondary40)\n );--menu-list-item-background-level2:var(\n --stzh-header-menu-list-item-background-level2,\n var(--stzh-color-secondary20)\n );--menu-list-item-background-level2-hover:var(\n --stzh-header-menu-list-item-background-level2-hover,\n var(--stzh-color-secondary10)\n );--menu-item-color:var(--stzh-header-menu-item-color, var(--stzh-color-primary70));--metanav-item-color:var(--stzh-header-metanav-item-color, var(--stzh-color-grey90))}@media print{.sc-stzh-header-h{display:none}}[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:1.9375rem}@media screen and (min-width: 900px){[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:2.1875rem}}@media screen and (min-width: 1600px){[logo-type=pkzh].sc-stzh-header-h,[logo-type=uvz].sc-stzh-header-h,[logo-type=mkz].sc-stzh-header-h{--logo-height:3.3125rem}}[logo-type=vbz].sc-stzh-header-h{--logo-height:1.8125rem}@media screen and (min-width: 900px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.3125rem}}@media screen and (min-width: 1600px){[logo-type=vbz].sc-stzh-header-h{--logo-height:3.75rem}}.sc-stzh-header-h[logo-type=vbz].sc-stzh-header-s>[slot=logo],.sc-stzh-header-h[logo-type=vbz] .sc-stzh-header-s>[slot=logo]{align-self:center}.sc-stzh-header-h.sc-stzh-header-s>[slot=logo],.sc-stzh-header-h .sc-stzh-header-s>[slot=logo]{width:var(--logo-width);height:var(--logo-height)}.stzh-header.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);color:var(--stzh-color-grey90)}.stzh-header__inner.sc-stzh-header,.stzh-header__main.sc-stzh-header{max-width:calc(100vw - var(--stzh-scrollbar-width))}@media screen and (min-width: 600px){.stzh-header__inner.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__main.sc-stzh-header{display:flex;flex-direction:column;background-color:var(--stzh-color-white)}@media screen and (max-width: 599px){.stzh-header__main.sc-stzh-header{position:relative;z-index:var(--stzh-z-index-header)}}.stzh-header__metabar.sc-stzh-header{background-color:var(--metabar-background-color)}.stzh-header__metabar-inner.sc-stzh-header{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:4rem;margin-right:4rem}}@media screen and (min-width: 1600px){.stzh-header__metabar-inner.sc-stzh-header{margin-left:auto;margin-right:auto;max-width:84.25rem}}.stzh-header__metabar-inner.sc-stzh-header{display:flex;align-items:center;height:4rem}@media screen and (min-width: 900px){.stzh-header__metabar-inner.sc-stzh-header{height:4rem}}.stzh-header__burger.sc-stzh-header,.stzh-header__search.sc-stzh-header,.stzh-header__metanav-item.sc-stzh-header{color:var(--metanav-item-color);transition:color var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__burger.sc-stzh-header:hover,.stzh-header__search.sc-stzh-header:hover,.stzh-header__metanav-item.sc-stzh-header:hover{color:var(--stzh-color-black)}.stzh-header__burger.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);display:flex;align-items:center;appearance:none;background-color:transparent;border:none;padding:0;margin-right:var(--stzh-space-medium);gap:var(--stzh-space-medium);color:var(--menu-item-color)}@media screen and (min-width: 600px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__burger.sc-stzh-header{margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__burger-icon.is-open.sc-stzh-header{display:none}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__burger.is-open.sc-stzh-header .stzh-header__burger-icon.is-close.sc-stzh-header{display:none}@media screen and (max-width: 599px){.stzh-header__burger-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metabar-search.sc-stzh-header{overflow:hidden;margin-right:var(--stzh-space-medium);transition-property:width;transition-duration:var(--stzh-base-transition-animation-speed);width:2.5rem;max-width:21.5625rem}.stzh-header__metabar-search.sc-stzh-header:focus-within{width:100%}@media screen and (min-width: 600px){.stzh-header__metabar-search.sc-stzh-header{width:6rem;margin-right:var(--stzh-space-xxlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-search.sc-stzh-header{width:10rem;margin-left:0;margin-right:var(--stzh-space-xxxxlarge)}}.stzh-header__search.sc-stzh-header{position:relative;display:block;width:100%}.stzh-header__search-input.sc-stzh-header{width:100%;max-width:100%;background-color:transparent;color:transparent;font-family:inherit;font-size:inherit;border:none;padding:var(--stzh-space-xsmall);padding-left:0;padding-right:0;height:var(--stzh-form-input-small-height);transition-property:padding-left, padding-right, background-color, color;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__search-input.sc-stzh-header{color:var(--stzh-color-secondary60);padding-left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}}.stzh-header__search-input.sc-stzh-header:focus{color:var(--stzh-color-secondary60);background-color:var(--stzh-color-white);padding-left:calc(var(--stzh-space-medium) + var(--stzh-icon-size) + var(--stzh-space-medium));padding-right:var(--stzh-space-xlarge)}.stzh-header__search-input.sc-stzh-header:-webkit-autofill{background-clip:text}.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-decoration,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-cancel-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-button,.stzh-header__search-input[type=search].sc-stzh-header::-webkit-search-results-decoration{-webkit-appearance:none}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-icon.sc-stzh-header,.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{transform:translate(var(--stzh-space-medium), -50%)}.stzh-header__search-input.sc-stzh-header:focus~.stzh-header__search-text.sc-stzh-header{color:var(--stzh-color-grey70)}.stzh-header__search-text.sc-stzh-header,.stzh-header__search-icon.sc-stzh-header{position:absolute;top:50%;transform:translate(0, -50%);transition:transform var(--stzh-base-transition-animation-speed)}.stzh-header__search-icon.sc-stzh-header{left:0px}@media screen and (max-width: 599px){.stzh-header__search-icon.sc-stzh-header{transform:translate(0.5rem, -50%)}}.stzh-header__search-text.sc-stzh-header{pointer-events:none;left:calc(var(--stzh-icon-size) + var(--stzh-space-medium))}@media screen and (max-width: 599px){.stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metabar-nav.sc-stzh-header{display:flex;align-items:center;margin-left:auto;gap:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px){.stzh-header__metabar-nav.sc-stzh-header{gap:var(--stzh-space-xxlarge)}}.stzh-header__metanav-popover.sc-stzh-header{--width:auto;--min-width:15.875rem;--background-color:var(--stzh-color-coolgrey10)}.stzh-header__metanav-popover.is-langnav.sc-stzh-header{--min-width:8.75rem}.stzh-header__metanav-item.sc-stzh-header{display:none;gap:var(--stzh-space-small);align-items:center;justify-content:center;appearance:none;background-color:transparent;padding:0;border:none;text-decoration:none;font-size:100%;font-family:inherit;white-space:nowrap;min-width:2.5rem}@media screen and (min-width: 900px){.stzh-header__metanav-item.sc-stzh-header{display:flex}}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header{color:var(--stzh-color-primary70)}.stzh-header__metanav-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-item.is-stay.sc-stzh-header{display:flex}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-mobile.sc-stzh-header{display:none}}.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__metanav-item.is-popover-desktop.sc-stzh-header{display:flex}}.stzh-header__metanav-menu-item.is-heavy.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy)}.stzh-header__metanav-menu-item--extra.sc-stzh-header{margin-top:var(--stzh-space-medium)}.stzh-header__metanav-item-text.sc-stzh-header{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.stzh-header__metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}@media screen and (max-width: 899px){.stzh-header__metanav-item-text.has-no-short-label.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}@media screen and (max-width: 899px){.stzh-header__metanav-item-text-label-long.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}}.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:flex}@media screen and (min-width: 900px){.stzh-header__metanav-item-text-label-short.sc-stzh-header{display:none}}.stzh-header__metanav-icon-wrapper.sc-stzh-header{position:relative;display:flex;align-items:center;justify-content:center}.stzh-header__metanav-icon-badge.sc-stzh-header{position:absolute;top:-0.25rem;right:-0.25rem}.stzh-header__metanav-icon.is-open.sc-stzh-header{display:none}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-open.sc-stzh-header{display:inline-flex}.stzh-header__metanav-item[aria-expanded=true].sc-stzh-header .stzh-header__metanav-icon.is-close.sc-stzh-header{display:none}.stzh-header__logobar.sc-stzh-header{display:flex}@media screen and (min-width: 1600px){.stzh-header__logobar.sc-stzh-header{margin-left:auto;margin-right:auto;width:84.25rem}}.stzh-header__logobar-logo.sc-stzh-header{box-sizing:content-box;display:flex;overflow:hidden;flex-shrink:0}.stzh-header__logobar-decoration.sc-stzh-header{background-color:var(--logobar-background-color);flex-grow:1}@media screen and (min-width: 1600px){.stzh-header__logobar-decoration.sc-stzh-header{width:calc(100% - 34.5625rem + (100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2);margin-right:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{padding-right:var(--stzh-space-xxlarge)}}.stzh-header__logo-link.sc-stzh-header{padding-top:0.875rem;padding-bottom:0.6875rem;padding-left:1.25rem;display:inline-flex;width:18rem;height:4.125rem;transition:opacity var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header__logo-link.sc-stzh-header{width:18.75rem;padding-left:2rem}}@media screen and (min-width: 900px){.stzh-header__logo-link.sc-stzh-header{width:24.9375rem;height:5.5rem;padding-top:1.125rem;padding-bottom:1.125rem;padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__logo-link.sc-stzh-header{width:38.5625rem;height:8.4375rem;padding-top:1.75rem;padding-bottom:1.5rem;padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__logo-link.sc-stzh-header{width:34.5625rem;padding-left:0}}.stzh-header__flyout.sc-stzh-header,.stzh-header__flyout-search.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);z-index:calc(var(--stzh-z-index-header) - 1);position:fixed;visibility:hidden;top:0;left:0;right:0;bottom:0;width:100dvw;height:100dvh;overflow:auto;transition:visibility var(--stzh-base-transition-animation-speed)}@media (min-height: 580px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}@media screen and (min-width: 900px){.stzh-header__flyout.sc-stzh-header{overflow:hidden}}.stzh-header__flyout-backdrop.sc-stzh-header{position:absolute;width:100%;height:100%;background-color:var(--stzh-color-black40op);opacity:0;transition:opacity var(--stzh-base-transition-animation-speed)}.stzh-header__menu.sc-stzh-header{position:absolute;width:100%;height:auto;background-color:var(--menu-background-color);display:grid;grid-template-rows:auto auto;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateX(-100%);opacity:0}@media (min-height: 580px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{height:100%;grid-template-rows:minmax(0, 1fr) auto}}@media screen and (min-width: 900px){.stzh-header__menu.sc-stzh-header{width:20.9375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:23.375rem}}@media screen and (min-width: 1260px){.stzh-header__menu.sc-stzh-header{width:27.4375rem}}@media screen and (min-width: 1600px){.stzh-header__menu.sc-stzh-header{width:calc(27.4375rem - 4rem + (100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2)}}.stzh-header__menu-nav.sc-stzh-header{position:relative;overflow-x:hidden;overflow-y:auto}@media screen and (min-width: 900px){.stzh-header__menu-nav.sc-stzh-header{position:static}}.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-xxsmall)}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-xsmall)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-top:var(--stzh-space-small)}}.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-large)}@media screen and (min-width: 600px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-metanav.sc-stzh-header{padding-bottom:var(--stzh-space-xxxlarge)}}.stzh-header__menu-metanav.sc-stzh-header{background-color:var(--stzh-color-secondary20)}@media screen and (min-width: 900px){.stzh-header__menu-metanav.sc-stzh-header{display:none}}.stzh-header__menu-metanav-nav.sc-stzh-header{max-width:23.4375rem}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.sc-stzh-header{display:block;list-style:none;padding:0;margin:0}.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-xxxlarge));padding-bottom:var(--stzh-space-xxxlarge)}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{padding-top:calc(var(--stzh-header-main-height) + var(--stzh-space-huge))}}.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{overflow:auto;background-color:var(--menu-list-item-background-level2);visibility:hidden;opacity:0;transform:translateX(100%);position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;transition-property:opacity, visibility, transform;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{z-index:initial;width:19.6875rem;transform:none;left:100%;transition-property:opacity, visibility}}@media screen and (min-width: 1260px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:20.875rem}}@media screen and (min-width: 1600px){.stzh-header__menu-list.is-level-2.sc-stzh-header,.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{width:21.5625rem}}.stzh-header__menu-list.is-level-2.sc-stzh-header{height:max-content}@media (min-height: 580px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}@media screen and (min-width: 900px){.stzh-header__menu-list.is-level-2.sc-stzh-header{height:100%}}.stzh-header__menu-metanav-list.is-level-2.sc-stzh-header{background-color:var(--stzh-color-secondary30);transform:none;transition-property:opacity, visibility}@media screen and (min-width: 900px){.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item:hover>.stzh-header__menu-list)>.stzh-header__menu-list-item>.stzh-header__menu-list),.stzh-header__menu-list.sc-stzh-header:where(:has(>.stzh-header__menu-list-item.is-open>.stzh-header__menu-list)>.stzh-header__menu-list-item>.stzh-header__menu-list){transition-delay:var(--stzh-base-transition-animation-speed)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-list.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-list.sc-stzh-header{z-index:200;transition-delay:0ms;visibility:visible;opacity:1}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.sc-stzh-header{background-color:var(--menu-list-item-background-hover)}}@media screen and (min-width: 900px){.stzh-header__menu-list-item.sc-stzh-header:hover>.stzh-header__menu-item.is-level-2.sc-stzh-header,.stzh-header__menu-list-item.is-open.sc-stzh-header>.stzh-header__menu-item.is-level-2.sc-stzh-header{background-color:var(--menu-list-item-background-level2-hover)}}@media screen and (max-width: 899px){.stzh-header__menu-nav.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open) .stzh-header__menu-nav.sc-stzh-header,.stzh-header__menu-list.sc-stzh-header:has(.stzh-header__menu-list-item.is-open),.stzh-header__menu-metanav-list.sc-stzh-header:has(.stzh-header__menu-metanav-list-item.is-open){transition-property:visibility;transition-duration:0ms;transition-delay:var(--stzh-base-transition-animation-speed);visibility:hidden}}@media screen and (max-width: 899px){.stzh-header__menu-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-list),.stzh-header__menu-metanav-list-item.is-open.sc-stzh-header>.sc-stzh-header:where(.stzh-header__menu-metanav-list){transform:translateX(0);opacity:1;visibility:visible}}.stzh-header__menu-list-item.sc-stzh-header,.stzh-header__menu-metanav-list-item.sc-stzh-header{display:grid}.stzh-header__menu-list-item.is-backlink.sc-stzh-header{display:block}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);text-align:left;display:flex;align-items:center;gap:var(--stzh-space-xsmall);appearance:none;border:none;text-decoration:none;background-color:transparent;color:var(--menu-item-color);padding-left:var(--stzh-space-xxxlarge);padding-top:var(--stzh-space-small);padding-bottom:var(--stzh-space-small);padding-right:var(--stzh-space-large);transition-property:color, background-color;transition-duration:var(--stzh-base-transition-animation-speed);cursor:pointer}.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-size:var(--stzh-font-deci-font-size);line-height:var(--stzh-font-deci-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3.5rem}@media screen and (min-width: 900px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:2.5rem}}@media screen and (min-width: 1260px){.stzh-header__menu-item.sc-stzh-header,.stzh-header__menu-metanav-item.is-title.sc-stzh-header{padding-left:4rem}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-1.sc-stzh-header{padding-left:calc((100vw - 84.25rem - var(--stzh-scrollbar-width, 0px)) / 2)}}@media screen and (min-width: 900px){.stzh-header__menu-item.has-items.sc-stzh-header{cursor:default}}.stzh-header__menu-item.is-level-2.sc-stzh-header{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);min-height:3rem}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xlarge)}}@media screen and (min-width: 1600px){.stzh-header__menu-item.is-level-2.sc-stzh-header{padding-left:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);margin-bottom:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{margin-bottom:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-medium)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-large)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xlarge)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-top:var(--stzh-space-xxlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-bottom:var(--stzh-space-xlarge)}}.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{min-height:none;padding-left:1.25rem;padding-right:1.25rem;gap:var(--stzh-space-xxsmall)}@media screen and (min-width: 600px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{padding-left:2rem;padding-right:2rem}}@media screen and (min-width: 900px){.stzh-header__menu-item.is-level-2.is-backlink.sc-stzh-header{display:none}}.stzh-header__menu-item.is-level-2.is-main.sc-stzh-header{font-size:var(--stzh-font-centi-font-size);line-height:var(--stzh-font-centi-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);margin-bottom:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header{min-height:2.75rem;padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item.is-level-2.sc-stzh-header{min-height:3.5rem;gap:var(--stzh-space-medium);padding-right:var(--stzh-space-xxlarge)}.stzh-header__menu-metanav-item.is-title.sc-stzh-header{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);justify-content:space-between;padding-top:0;padding-bottom:0;padding-right:var(--stzh-space-medium);margin-bottom:var(--stzh-space-xlarge);cursor:default}.stzh-header__menu-metanav-item.is-language.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);justify-content:space-between}.stzh-header__menu-metanav-item.is-action.sc-stzh-header{display:grid;padding-right:var(--stzh-space-xxxlarge);margin-top:var(--stzh-space-xlarge)}.stzh-header__menu-metanav-item.is-action--extra.sc-stzh-header{margin-top:var(--stzh-space-xxsmall)}.stzh-header__menu-metanav-item.is-hidden.sc-stzh-header{display:none}.stzh-header__menu-metanav-item.is-level-1.sc-stzh-header .stzh-header__menu-metanav-item-icon.sc-stzh-header{--size:var(--stzh-icon-size-small)}.stzh-header__menu-metanav-item-text.sc-stzh-header{display:flex;gap:var(--stzh-space-xsmall)}.stzh-header__menu-metanav-item-text.is-vhidden.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header__menu-metanav-item-counter.sc-stzh-header{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium)}.stzh-header__app-nav.sc-stzh-header{display:none}@media screen and (min-width: 900px){.stzh-header__app-nav.sc-stzh-header{display:block}}.stzh-header__app-nav-bottom.sc-stzh-header{position:fixed;bottom:0;left:0;width:calc(100vw - var(--stzh-scrollbar-width));z-index:calc(var(--stzh-z-index-header) - 1)}@media screen and (min-width: 900px){.stzh-header__app-nav-bottom.sc-stzh-header{display:none}}.stzh-header--is-search-filled.sc-stzh-header .stzh-header__search-text.sc-stzh-header{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-header--hide-logo.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:0}@media screen and (min-width: 600px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-fixed.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(-100%);position:fixed;top:0;left:0;right:0;margin-top:calc(var(--stzh-header-logobar-height) / -1)}}@media screen and (min-width: 600px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}@media screen and (max-width: 599px){.stzh-header--is-fixed-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform;transition-duration:var(--stzh-base-transition-animation-speed)}}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__logobar.sc-stzh-header{transition-property:opacity, visibility;transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-sticky-transition.sc-stzh-header .stzh-header__main.sc-stzh-header{transition-property:transform, margin-top;transition-duration:var(--stzh-base-transition-animation-speed)}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__inner.sc-stzh-header{transform:translateY(0)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header .stzh-header__main.sc-stzh-header{transform:translateY(0)}}@media screen and (min-width: 600px) and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 899px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar-mobile) .stzh-header__metabar.sc-stzh-header{visibility:hidden}}@media screen and (min-width: 600px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__inner.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}@media screen and (max-width: 599px){.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__main.sc-stzh-header{margin-top:calc((var(--stzh-header-logobar-height) + var(--stzh-header-metabar-height)) / -1)}}.stzh-header--is-sticky.sc-stzh-header:where(.stzh-header--has-empty-metabar) .stzh-header__metabar.sc-stzh-header{visibility:hidden}.stzh-header--is-sticky.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:hidden;opacity:0}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__main.sc-stzh-header{margin-top:0px}.stzh-header--sticky-always-full.sc-stzh-header .stzh-header__logobar.sc-stzh-header{visibility:visible;opacity:1}.stzh-header__flyout-search-main.sc-stzh-header{position:absolute;width:100%;transition-property:opacity, transform;transition-duration:var(--stzh-base-transition-animation-speed);transform:translateY(-6.25rem);opacity:0;margin-top:var(--stzh-header-main-height);overflow:auto}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-backdrop.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:none;z-index:999;position:absolute;top:0;right:0;bottom:0;width:var(--stzh-scrollbar-width);background-color:var(--stzh-color-grey10);border-left:calc(0.5px * var(--stzh-scrollbar-active)) solid var(--stzh-color-grey30)}@media (min-height: 580px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}@media screen and (min-width: 900px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-scrollbar.sc-stzh-header{display:block}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__menu.sc-stzh-header{opacity:1;transform:translateX(0)}.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__flyout-search-main.sc-stzh-header{opacity:1;transform:translateX(0)}@media screen and (min-width: 600px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__inner.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__inner.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}@media screen and (max-width: 599px){.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__main.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__main.sc-stzh-header{z-index:var(--stzh-z-index-header);transform:translateY(0);position:fixed;top:0;left:0;right:var(--stzh-scrollbar-width);margin-top:0}}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header{opacity:1}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logobar.sc-stzh-header,.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__metabar.sc-stzh-header{visibility:visible}.stzh-header--is-flyout-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header,.stzh-header--is-flyout-search-open.sc-stzh-header .stzh-header__logo-link.sc-stzh-header{opacity:1;transition:none}.stzh-header__search-button--is-hidden.sc-stzh-header{display:none}`;const m="stzh-header-open";const p=class{constructor(r){t(this,r);this.stzhMetanavItemClick=i(this,"stzhMetanavItemClick");this.stzhMetanavItemChildClick=i(this,"stzhMetanavItemChildClick");this.stzhMetanavItemButtonClick=i(this,"stzhMetanavItemButtonClick");this.stzhMenuItemClick=i(this,"stzhMenuItemClick");this.stzhLanguageChange=i(this,"stzhLanguageChange");this.stzhSearchChange=i(this,"stzhSearchChange");this.stzhSearchChanged=i(this,"stzhSearchChanged");this.href="https://www.stadt-zuerich.ch";this.menuId="anchorNavMain";this.appNavId="anchorNavAppNav";this.searchId="anchorSearch";this.metanavId="anchorNavMeta";this.languageId="anchorNavLang";this.logoType="default";this.menuItems=[];this.metanavItems=[];this.userSpecificMetanavItemsNotLoggedIn=[];this._userSpecificMetanavItemsNotLoggedIn=[];this.appNavItems=[];this.languages=[];this.languagePreventUrlchange=false;this.languageStay=false;this.hideMetabar=false;this.searchFieldName="q";this.searchValue="";this.sticky="default";this.loginErrorMessage="";this.hideLogo=false;this.stickyActive=false;this.flyoutOpen=false;this.flyoutSearchOpen=false;this.fixed=false;this.fixedTransition=false;this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=false;this.userSpecificMetanavItemsLoggedIn=[];this.combinedMetanavItems=[];this.lastOpener=null;this.flyoutOpenedByMetanavItem=null;this.handleMenuListFocusout=t=>{const i=!t.currentTarget.contains(t.relatedTarget);if(this.isMedium&&i){this.closeMenuItem(false)}};this.handleBurgerClick=async()=>{if(this.flyoutOpenedByMetanavItem){this.flyoutOpenedByMetanavItem=false;this.closeMetanavItem()}else{this.flyoutSearchOpen=false;this.flyoutOpen=!this.flyoutOpen}const t=this.element.querySelector(".stzh-header__menu-item");if(t){window.setTimeout((()=>{t.focus()}),100)}this.updatePosition()};this.handleSearchButtonClick=async()=>{this.flyoutOpen=false;this.flyoutSearchOpen=!this.flyoutSearchOpen;const t=this.element.querySelector(".stzh-search input[type='search']");if(t){window.setTimeout((()=>{t.focus()}),100)}this.updatePosition()};this.handleBackdropClick=async()=>{this.flyoutOpen=false;this.updatePosition()};this.handleBackdropSearchClick=async()=>{this.flyoutSearchOpen=false;this.updatePosition()};this.handleMetanavItemClick=(t,i)=>{this.stzhMetanavItemClick.emit({component:"stzh-header",item:i,originalEvent:t})};this.handleMetanavItemChildClick=(t,i)=>{this.stzhMetanavItemChildClick.emit({component:"stzh-header",itemChild:i,originalEvent:t})};this.handleMetanavItemButtonClick=(t,i)=>{this.stzhMetanavItemButtonClick.emit({component:"stzh-header",itemButton:i,originalEvent:t})};this.handleMenuItemClick=(t,i)=>{this.flyoutOpen=false;this.stzhMenuItemClick.emit({component:"stzh-header",item:i,originalEvent:t})};this.handleSearchInput=t=>{this.searchValue=this.searchInput.value;this.stzhSearchChange.emit({component:"stzh-header",originalEvent:t,value:this.searchValue})};this.handleSearchChange=t=>{this.searchValue=this.searchInput.value;this.stzhSearchChanged.emit({component:"stzh-header",originalEvent:t,value:this.searchValue})};this.handleLanguageClick=(t,i)=>{if(this.languagePreventUrlchange){t.preventDefault()}this.languageActive=i.value;this.stzhLanguageChange.emit({component:"stzh-header",value:this.languageActive})};this.handleFlyoutResize=()=>{this.resizeMenunavElement()};this.handleResize=()=>{if(this.sticky==="disabled"){return}if(this.debounceResize){window.cancelAnimationFrame(this.debounceResize)}this.debounceResize=requestAnimationFrame((()=>{s((()=>{var t,i,s;this.isMedium=f("medium").matches;this.isSmallOrMicro=!this.isMedium;this.mainHeight=((t=this.mainElement)===null||t===void 0?void 0:t.offsetHeight)||0;this.metabarHeight=((i=this.metabarElement)===null||i===void 0?void 0:i.offsetHeight)||0;this.logobarHeight=((s=this.logobarElement)===null||s===void 0?void 0:s.offsetHeight)||0;this.headerTop=this.element.offsetTop;this.headerHeight=this.metabarHeight+this.logobarHeight}));e((()=>{document.documentElement.style.setProperty("--stzh-header-height",`${this.headerHeight}px`);document.documentElement.style.setProperty("--stzh-header-main-height",`${this.mainHeight}px`);document.documentElement.style.setProperty("--stzh-header-metabar-height",`${this.metabarHeight}px`);document.documentElement.style.setProperty("--stzh-header-logobar-height",`${this.logobarHeight}px`)}));this.scrollListener()}))}}handleKeydown(t){if(t.key==="Escape"){this.flyoutOpen=false;this.flyoutSearchOpen=false}}flyoutCloseClicked(){this.flyoutSearchOpen=false;this.updatePosition()}async flyoutOpenWatcher(t){if(!t){this.currentOpenMenuItem=null;this.currentOpenMetanavItem=null;this.currentOpenLanguage=null;this.flyoutOpenedByMetanavItem=false;document.body.classList.remove(m);this.enableSiblings();if(this.trap){this.trap.deactivate()}}else{document.body.classList.add(m);this.disableSiblings();if(this.trap){this.trap.activate()}}}async fixedWatcher(){this.paddingTop=this.fixed||this.flyoutOpen||this.flyoutSearchOpen?this.headerHeight:0;await this.waitForNextRender();this.fixedTransition=this.fixed||this.flyoutOpen||this.flyoutSearchOpen}stickyWatcher(){this.updatePosition()}async updatePosition(){if(this.flyoutOpen||this.flyoutSearchOpen){return}const t=()=>{this.stickyActive=true;document.documentElement.style.setProperty("--stzh-header-is-stuck","1");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","0")};const i=()=>{document.documentElement.style.setProperty("--stzh-header-is-stuck","0");document.documentElement.style.setProperty("--stzh-header-is-not-stuck","1");this.stickyActive=false};if(this.sticky==="disabled"){i()}else if(this.sticky==="always-full"){t()}else if(this.sticky==="always"){if(this.belowStayStickyPoint){t()}else{i()}}else{if(this.scrollingUp&&this.belowStayStickyPoint){if(!this.stickyActive&&this.belowStartStickyPoint){t()}}else{if(this.stickyActive&&this.belowStayStickyPoint){i()}else{i()}}}}scrollListener(){if(this.sticky==="disabled"){return}s((()=>{this.currentScrollY=window.scrollY;this.scrollingUp=this.lastScrollY&&this.lastScrollY>this.currentScrollY;this.lastScrollY=this.currentScrollY;this.belowStayStickyPoint=this.currentScrollY>this.logobarHeight;this.belowStartStickyPoint=this.currentScrollY>this.headerHeight;this.fixed=this.belowStartStickyPoint||this.scrollingUp&&this.belowStayStickyPoint&&this.stickyActive||this.sticky==="always"&&this.belowStayStickyPoint||this.sticky==="always-full";this.headerOverlap=(this.headerTop-this.currentScrollY)/-1;this.hideLogo=this.sticky!=="always-full"&&this.isMedium&&this.headerOverlap>1}));e((()=>{this.updatePosition()}))}searchValueWatcher(t){this.searchFilled=t!==""}menuItemsWatcher(t){if(typeof t==="string"){this._menuItems=JSON.parse(t)}else{this._menuItems=t}this._menuItems=this._menuItems.map(((t,i)=>Object.assign({id:`submenu-${i}`},t)))}metanavItemsWatcher(t){if(typeof t==="string"){this._metanavItems=JSON.parse(t)}else{this._metanavItems=t}this._metanavItems=this._metanavItems.map(((t,i)=>Object.assign({id:`metanav-submenu-${i}`},t)));this.combineMetanavItems()}appNavItemsWatcher(t){if(typeof t==="string"){this._appNavItems=JSON.parse(t)}else{this._appNavItems=t}}userSpecificMetanavItemsNotLoggedInWatcher(t){this._userSpecificMetanavItemsNotLoggedIn=t;this.combineMetanavItems()}languagesWatcher(t){if(typeof t==="string"){this._languages=JSON.parse(t)}else{this._languages=t}}getSiblings(){if(!this._parentElement){return[]}return Array.from(this._parentElement.children).filter((t=>t!==this.element))}disableSiblings(){this.getSiblings().forEach((t=>{t.setAttribute("aria-hidden","true")}))}enableSiblings(){this.getSiblings().forEach((t=>{t.removeAttribute("aria-hidden")}))}waitForNextRender(){return new Promise((t=>this.renderPromiseResolve=t))}resizeMenunavElement(){if(f("headerMetanavSticky").matches||f("medium").matches||!this.openSubmenuElement){Object.assign(this.menunavElement.style,{height:null})}else{const{height:t}=this.openSubmenuElement.getBoundingClientRect();Object.assign(this.menunavElement.style,{height:`${t}px`})}}async openMenuItem(t,i){this.flyoutOpen=true;this.lastOpener=t.currentTarget;this.openSubmenuElement=this.element.querySelector(`#${i.id}`);this.currentOpenMenuItem=i;await this.waitForNextRender();requestAnimationFrame((()=>{this.menunavElement.scrollTop=0;const t=this.openSubmenuElement&&u(this.openSubmenuElement)[0];t===null||t===void 0?void 0:t.focus();this.resizeMenunavElement()}))}async closeMenuItem(t=true){this.openSubmenuElement=null;this.currentOpenMenuItem=null;await this.waitForNextRender();if(t){requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null;this.resizeMenunavElement()}))}}async openMetanavItem(t,i){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=t.currentTarget;this.currentOpenMetanavItem=i;await this.waitForNextRender();requestAnimationFrame((()=>{const t=this.element.querySelector(`#${i.id}`);const s=t&&u(t)[0];s===null||s===void 0?void 0:s.focus()}))}async closeMetanavItem(){this.currentOpenMetanavItem=null;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async openLanguage(t){if(!this.flyoutOpen){this.flyoutOpenedByMetanavItem=true;this.flyoutOpen=true}this.lastOpener=t.currentTarget;this.currentOpenLanguage=true;await this.waitForNextRender();requestAnimationFrame((()=>{const t=this.element.querySelector("#submenu-languages");const i=t&&u(t)[0];i===null||i===void 0?void 0:i.focus()}))}async closeLanguage(){this.currentOpenLanguage=false;if(this.flyoutOpenedByMetanavItem){this.flyoutOpen=false}await this.waitForNextRender();requestAnimationFrame((()=>{this.lastOpener.focus();this.lastOpener=null}))}async requestUserSpecificMetanavItems(){if(!this.userSpecificMetanavItemsEndpoint){return}try{const t=await fetch(this.userSpecificMetanavItemsEndpoint);this.userSpecificMetanavItemsLoggedIn=await t.json();this.combineMetanavItems()}catch(t){this.combineMetanavItems(true);console.error("Error fetching data:",t);if(this.loginErrorMessage){document.querySelector("stzh-toastbar").toast(this.loginErrorMessage,{type:"error"})}}}combineMetanavItems(t=false){if(!this.userSpecificMetanavItemsEndpoint||t){this.combinedMetanavItems=[...this._metanavItems,...this._userSpecificMetanavItemsNotLoggedIn]}else{this.combinedMetanavItems=[...this._metanavItems,...this.userSpecificMetanavItemsLoggedIn]}}async componentWillLoad(){this.menuItemsWatcher(this.menuItems);this.metanavItemsWatcher(this.metanavItems);this.appNavItemsWatcher(this.appNavItems);this.languagesWatcher(this.languages);this.searchValueWatcher(this.searchValue);this.userSpecificMetanavItemsNotLoggedInWatcher(this.userSpecificMetanavItemsNotLoggedIn);this.requestUserSpecificMetanavItems();if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"header")}}componentDidRender(){if(this.renderPromiseResolve){this.renderPromiseResolve()}if(this.flyoutElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutElement)}if(this.flyoutSearchElement&&this.flyoutResizeObserver){this.flyoutResizeObserver.observe(this.flyoutSearchElement)}}componentDidLoad(){this.trap=l(this.element,Object.assign(Object.assign({},v()),{initialFocus:false}));this.flyoutResizeObserver=new ResizeObserver(this.handleFlyoutResize);if(this.flyoutElement){this.flyoutResizeObserver.observe(this.flyoutElement)}}connectedCallback(){this._parentElement=this.element.parentElement;this.resizeObserver=new ResizeObserver(this.handleResize);this.resizeObserver.observe(this.element)}disconnectedCallback(){var t,i;this.flyoutOpenWatcher(false);(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.flyoutResizeObserver)===null||i===void 0?void 0:i.disconnect()}render(){var t,i,s,e,a,f,u;const l=o(this.element,"metanav-before");const v=o(this.element,"metanav-after");const c={"stzh-header":true,"stzh-header--is-flyout-open":this.flyoutOpen,"stzh-header--is-flyout-search-open":this.flyoutSearchOpen,"stzh-header--is-search-filled":this.searchFilled,"stzh-header--is-fixed":this.fixed,"stzh-header--is-fixed-transition":this.fixedTransition,"stzh-header--is-sticky":this.stickyActive,"stzh-header--is-sticky-transition":this.stickyActive&&this.fixedTransition,"stzh-header--hide-logo":this.hideLogo,"stzh-header--has-empty-metabar-mobile":!l&&!v&&this._metanavItems.filter((t=>t.stay||t.stayAndShowInMobileMenu)).length===0&&this._menuItems.length===0&&(this._languages.length===0||this._languages.length>0&&!this.languageStay)&&!this.searchAction,"stzh-header--has-empty-metabar":!l&&!v&&this._metanavItems.length===0&&this._menuItems.length===0&&this._languages.length===0&&!this.searchAction,[`stzh-header--sticky-${this.sticky}`]:!!this.sticky};const d=this.languageActive||window.stzhComponents.utils.getLocale(this.element);const m=((t=this._languages)===null||t===void 0?void 0:t.find((({value:t})=>t===d)))||((i=this._languages)===null||i===void 0?void 0:i[0])||null;const p=(t,i,s)=>{var e;const n=((e=t.items)===null||e===void 0?void 0:e.length)>0||t.itemButton||!t.href?"button":"a";return r(n,Object.assign({},s,{id:t.id+"-button",href:n==="a"&&t.href,target:n==="a"&&t.target,style:{order:t.cssOrder},class:Object.assign({"stzh-header__metanav-item":true,"is-heavy":t.important,"is-stay":t.stay||t.stayAndShowInMobileMenu},i||{})}),r("span",{class:{"stzh-header__metanav-item-text":true,"is-vhidden":t.labelHidden,"has-no-short-label":!t.labelShort}},r("span",{class:"stzh-header__metanav-item-text-label-long"},t.label),r("span",{class:"stzh-header__metanav-item-text-label-short","aria-hidden":"true"},t.labelShort)),t.icon&&r("span",{class:"stzh-header__metanav-icon-wrapper"},t.icon&&r("stzh-icon",{class:`stzh-header__metanav-icon ${t.iconOpen?"is-close":""}`,name:t.icon}),t.iconOpen&&r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:t.iconOpen}),(t.badge||t.badgeEmpty)&&r("stzh-badge",{class:"stzh-header__metanav-icon-badge",label:t.badge,type:typeof t.badgeType==="undefined"?"error":t.badgeType})))};return r(h,null,r("header",{class:c},r("div",{class:"stzh-header__header",style:{paddingTop:`${this.paddingTop}px`}},this.isSmallOrMicro&&this._appNavItems.length>0&&r("div",{class:"stzh-header__app-nav-bottom"},r("stzh-app-nav",{items:this._appNavItems,"app-nav-id":this.appNavId})),r("div",{class:"stzh-header__inner"},r("div",{class:"stzh-header__main",ref:t=>this.mainElement=t},r("div",{class:"stzh-header__logobar",ref:t=>this.logobarElement=t},r("div",{class:"stzh-header__logobar-logo"},r("a",{href:this.href,class:"stzh-header__logo-link","s-object-id":this.logoAnalyticsId||"Header Logo"},r("slot",{name:"logo"}))),r("div",{class:"stzh-header__logobar-decoration"})),!this.hideMetabar&&r("div",{class:"stzh-header__metabar",ref:t=>this.metabarElement=t},r("div",{class:"stzh-header__metabar-inner"},r("slot",{name:"menu-before"}),this._menuItems.length>0&&r("button",{id:this.menuId,class:`stzh-header__burger ${this.flyoutOpen&&!this.flyoutOpenedByMetanavItem&&"is-open"}`,onClick:this.handleBurgerClick},r("stzh-icon",{class:"stzh-header__burger-icon is-close",name:"menu"}),r("stzh-icon",{class:"stzh-header__burger-icon is-open",name:"close"}),r("div",{class:"stzh-header__burger-text"},this.localization.menuLabel)),this.searchAction&&!o(this.element,"search")&&r("form",{class:"stzh-header__metabar-search",action:this.searchAction,role:"search"},r("label",{class:"stzh-header__search"},r("input",{id:this.searchId,ref:t=>this.searchInput=t,class:"stzh-header__search-input",type:"search",name:this.searchFieldName,onChange:this.handleSearchChange,onInput:this.handleSearchInput}),r("stzh-icon",{class:"stzh-header__search-icon",name:"search"}),r("div",{class:"stzh-header__search-text"},this.localization.searchLabel))),o(this.element,"search")&&r("stzh-button",{iconPosition:"left",onClick:this.handleSearchButtonClick,variant:"tertiary-plain",size:"small"},r("stzh-icon",{slot:"icon",name:"search",class:this.flyoutSearchOpen?"stzh-header__search-button--is-hidden":""}),r("stzh-icon",{slot:"icon",name:"close",class:this.flyoutSearchOpen?"":"stzh-header__search-button--is-hidden"}),this.localization.searchLabel),r("slot",{name:"menu-after"}),!this.isSmallOrMicro&&this._appNavItems.length>0&&r("div",{class:"stzh-header__app-nav"},r("stzh-app-nav",{items:this._appNavItems,"app-nav-id":this.appNavId})),r("div",{class:"stzh-header__metabar-nav",id:this.metanavId,tabindex:"-1"},r("slot",{name:"metanav-before"}),this.combinedMetanavItems.map((t=>{var i,s;return((i=t.items)===null||i===void 0?void 0:i.length)>0||t.itemButton?r(n,null,p(t,{"is-popover-mobile":true},{"aria-expanded":t===this.currentOpenMetanavItem?"true":"false","aria-controls":t.id,onClick:i=>{if(t===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(i,t)}this.handleMetanavItemClick(i,t)}}),r("stzh-popover",{class:{"stzh-header__metanav-popover":true},placement:"bottom-end",distance:20,variant:t.variant,size:typeof t.size==="undefined"?"large":t.size},p(t,{"is-popover-desktop":true},{onClick:i=>{this.handleMetanavItemClick(i,t)}}),r("div",{slot:"content"},((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("stzh-menu",null,t.items.map((i=>r("stzh-menu-item",{class:{"stzh-header__metanav-menu-item":true,"is-heavy":typeof t.importantSubmenu==="undefined"||t.importantSubmenu},size:typeof t.size==="undefined"?"large":t.size,variant:t.variant,href:i.href,target:i.target,icon:i.icon,counter:i.counter,badge:i.badge,badgeType:i.badgeType,onClick:t=>{this.handleMetanavItemChildClick(t,i)}},i.label))))),t.itemButton&&r("stzh-button",{slot:"action",size:t.itemButton.size,href:t.itemButton.href,target:t.itemButton.target,onClick:i=>{this.handleMetanavItemButtonClick(i,t.itemButton)}},t.itemButton.label),t.itemButtonExtra&&r("stzh-button",{class:{"stzh-header__metanav-menu-item--extra":true},slot:"action",size:t.itemButtonExtra.size,href:t.itemButtonExtra.href,target:t.itemButtonExtra.target,onClick:i=>{this.handleMetanavItemButtonClick(i,t.itemButtonExtra)}},t.itemButtonExtra.label))):p(t,{},{onClick:i=>{this.handleMetanavItemClick(i,t)}})})),((s=this._languages)===null||s===void 0?void 0:s.length)>0&&r(n,null,r("h2",{class:"stzh-header__vhidden"},this.localization.languageLabel),this._menuItems.length>0&&this.languageStay&&r("button",{id:this.isSmallOrMicro?this.languageId:null,class:{"stzh-header__metanav-item":true,"is-popover-mobile":true,"is-stay":this.languageStay},"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",onClick:t=>{if(this.currentOpenLanguage){this.closeLanguage()}else{this.openLanguage(t)}}},r("span",{class:"stzh-header__metanav-item-text"},m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),r("stzh-popover",{class:"stzh-header__metanav-popover is-langnav",placement:"bottom-end",distance:20},r("button",{id:this.isSmallOrMicro?null:this.languageId,class:{"stzh-header__metanav-item":true,"is-popover-desktop":this._menuItems.length>0,"is-stay":this.languageStay}},r("span",{class:"stzh-header__metanav-item-text"},m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__metanav-icon is-close",name:"angle-down"}),r("stzh-icon",{class:"stzh-header__metanav-icon is-open",name:"angle-up"})),r("div",{slot:"content"},r("stzh-menu",null,this._languages.map((t=>r("stzh-menu-item",{class:"stzh-header__metanav-menu-item",active:(m===null||m===void 0?void 0:m.value)===t.value,href:t.value,onClick:i=>this.handleLanguageClick(i,t)},t.text))))))),r("slot",{name:"metanav-after"}))))))),(this._menuItems.length>0||((e=this.combinedMetanavItems)===null||e===void 0?void 0:e.length)>0)&&r("div",{ref:t=>this.flyoutElement=t,class:"stzh-header__flyout"},r("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropClick}),r("div",{class:"stzh-header__flyout-scrollbar"}),r("div",{class:"stzh-header__menu"},r("nav",{class:"stzh-header__menu-nav",ref:t=>this.menunavElement=t,"aria-label":this.localization.navigationLabel},r("ul",{class:"stzh-header__menu-list is-level-1"},this._menuItems.map((t=>{var i,s;return r("li",{class:{"stzh-header__menu-list-item":true,"is-open":t===this.currentOpenMenuItem}},((i=t.items)===null||i===void 0?void 0:i.length)>0?r("button",{"aria-expanded":t===this.currentOpenMenuItem?"true":"false","aria-controls":t.id,class:"stzh-header__menu-item is-level-1 has-items",onClick:t===this.currentOpenMenuItem?()=>this.closeMenuItem():i=>this.openMenuItem(i,t)},t.label):r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-1"},t.label),((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("ul",{id:t.id,class:"stzh-header__menu-list is-level-2",onFocusout:this.handleMenuListFocusout},r("li",{class:"stzh-header__menu-list-item is-backlink"},r("button",{class:"stzh-header__menu-item is-level-2 is-backlink",onClick:()=>this.closeMenuItem()},r("stzh-icon",{name:"angle-left"}),r("span",null,this.menuBackLabel?this.menuBackLabel:this.localization.menuBackLabel))),r("li",{class:"stzh-header__menu-list-item"},r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-2 is-main"},t.label)),t.items.map((t=>r("li",{class:"stzh-header__menu-list-item"},r("a",{href:t.href,onClick:i=>this.handleMenuItemClick(i,t),class:"stzh-header__menu-item is-level-2"},t.label))))))})))),(((a=this.combinedMetanavItems)===null||a===void 0?void 0:a.length)>0||((f=this._languages)===null||f===void 0?void 0:f.length)>0)&&r("div",{class:"stzh-header__menu-metanav"},r("nav",{class:"stzh-header__menu-metanav-nav"},r("ul",{class:"stzh-header__menu-metanav-list is-level-1"},this.combinedMetanavItems.map((t=>{var i,s,e;return r("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":t===this.currentOpenMetanavItem}},((i=t.items)===null||i===void 0?void 0:i.length)>0?r("button",{"aria-expanded":t===this.currentOpenMetanavItem?"true":"false","aria-controls":t.id,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":t.stay&&!t.stayAndShowInMobileMenu},onClick:i=>{if(t===this.currentOpenMetanavItem){this.closeMetanavItem()}else{this.openMetanavItem(i,t)}this.handleMetanavItemClick(i,t)}},r("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":t.labelHidden}},t.label),t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon})):r("a",{href:t.href,class:{"stzh-header__menu-metanav-item is-level-1":true,"is-hidden":t.stay&&!t.stayAndShowInMobileMenu},onClick:i=>{this.handleMetanavItemClick(i,t)}},r("span",{class:{"stzh-header__menu-metanav-item-text":true,"is-vhidden":t.labelHidden}},t.label),t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon})),((s=t.items)===null||s===void 0?void 0:s.length)>0&&r("ul",{id:t.id,class:"stzh-header__menu-metanav-list is-level-2"},r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},r("span",null,t.label),r("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:(e=this.localization.closeMetanavMenuLabel)===null||e===void 0?void 0:e.replace(/\{itemLabel\}/gi,t.label),onClick:()=>this.closeMetanavItem()}))),t.items.map((t=>r("li",{class:"stzh-header__menu-metanav-list-item"},r("a",{href:t.href,class:"stzh-header__menu-metanav-item is-level-2"},t.icon&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:t.icon}),r("span",{class:"stzh-header__menu-metanav-item-text"},r("span",null,t.label),t.counter!==undefined&&t.counter>0&&r("span",{class:"stzh-header__menu-metanav-item-counter"},"(",t.counter,")")))))),t.itemButton&&r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-action"},r("stzh-button",{href:t.itemButton.href,target:t.itemButton.target},t.itemButton.label))),t.itemButtonExtra&&r("li",{class:"stzh-header__menu-metanav-list-item"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-action is-action--extra"},r("stzh-button",{href:t.itemButtonExtra.href,target:t.itemButtonExtra.target},t.itemButtonExtra.label)))))})),((u=this._languages)===null||u===void 0?void 0:u.length)>0&&r("li",{class:{"stzh-header__menu-metanav-list-item":true,"is-open":this.currentOpenLanguage}},r("button",{"aria-expanded":this.currentOpenLanguage?"true":"false","aria-controls":"submenu-languages",class:"stzh-header__menu-metanav-item is-level-1",onClick:t=>this.openLanguage(t)},r("span",null,m===null||m===void 0?void 0:m.text),r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"angle-down"})),r("ul",{id:"submenu-languages",class:"stzh-header__menu-metanav-list is-level-2"},r("div",{class:"stzh-header__menu-metanav-item is-level-2 is-title"},r("span",null,this.localization.dialogLanguageTitle),r("stzh-button",{class:"stzh-header__menu-metanav-item-icon",variant:"tertiary",icon:"close",iconOnly:true,label:"Sprach-Dialog schliessen",onClick:()=>this.closeLanguage()})),this._languages.map((t=>r("li",{class:"stzh-header__menu-metanav-list-item"},r("a",{class:"stzh-header__menu-metanav-item is-level-2 is-language",href:t.value,onClick:i=>this.handleLanguageClick(i,t)},r("span",null,t.text),(m===null||m===void 0?void 0:m.value)===t.value&&r("stzh-icon",{class:"stzh-header__menu-metanav-item-icon",name:"checkmark"})))))))))))),o(this.element,"search")&&r("div",{ref:t=>this.flyoutSearchElement=t,class:"stzh-header__flyout-search"},r("div",{class:"stzh-header__flyout-backdrop",onClick:this.handleBackdropSearchClick}),r("div",{class:"stzh-header__flyout-scrollbar"}),r("div",{class:"stzh-header__flyout-search-main"},r("slot",{name:"search"})))))}get element(){return a(this)}static get watchers(){return{flyoutOpen:["flyoutOpenWatcher","fixedWatcher"],flyoutSearchOpen:["flyoutOpenWatcher","fixedWatcher"],fixed:["fixedWatcher"],headerHeight:["fixedWatcher"],sticky:["stickyWatcher"],searchValue:["searchValueWatcher"],menuItems:["menuItemsWatcher"],metanavItems:["metanavItemsWatcher"],appNavItems:["appNavItemsWatcher"],userSpecificMetanavItemsNotLoggedIn:["userSpecificMetanavItemsNotLoggedInWatcher"],languages:["languagesWatcher"]}}};p.style=d();function _(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i){t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m");t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m")}t("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m");t("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"];t["EPSG:3785"]=t["EPSG:3857"];t.GOOGLE=t["EPSG:3857"];t["EPSG:900913"]=t["EPSG:3857"];t["EPSG:102113"]=t["EPSG:3857"]}var g=1;var M=2;var z=3;var w=4;var y=5;var b=6378137;var x=6356752.314;var E=.0066943799901413165;var S=484813681109536e-20;var G=Math.PI/2;var P=.16666666666666666;var k=.04722222222222222;var N=.022156084656084655;var I=1e-10;var C=.017453292519943295;var A=57.29577951308232;var R=Math.PI/4;var T=Math.PI*2;var O=3.14159265359;var L={};L.greenwich=0;L.lisbon=-9.131906111111;L.paris=2.337229166667;L.bogota=-74.080916666667;L.madrid=-3.687938888889;L.rome=12.452333333333;L.bern=7.439583333333;L.jakarta=106.807719444444;L.ferro=-17.666666666667;L.brussels=4.367975;L.stockholm=18.058277777778;L.athens=23.7163375;L.oslo=10.722916666667;var F={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var D=/[\s_\-\/\(\)]/g;function W(t,i){if(t[i]){return t[i]}var s=Object.keys(t);var e=i.toLowerCase().replace(D,"");var r=-1;var n,h;while(++r<s.length){n=s[r];h=n.toLowerCase().replace(D,"");if(h===e){return t[n]}}}function j(t){var i={};var s=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,i){var s=i.split("=");s.push(true);t[s[0].toLowerCase()]=s[1];return t}),{});var e,r,n;var h={proj:"projName",datum:"datumCode",rf:function(t){i.rf=parseFloat(t)},lat_0:function(t){i.lat0=t*C},lat_1:function(t){i.lat1=t*C},lat_2:function(t){i.lat2=t*C},lat_ts:function(t){i.lat_ts=t*C},lon_0:function(t){i.long0=t*C},lon_1:function(t){i.long1=t*C},lon_2:function(t){i.long2=t*C},alpha:function(t){i.alpha=parseFloat(t)*C},gamma:function(t){i.rectified_grid_angle=parseFloat(t)*C},lonc:function(t){i.longc=t*C},x_0:function(t){i.x0=parseFloat(t)},y_0:function(t){i.y0=parseFloat(t)},k_0:function(t){i.k0=parseFloat(t)},k:function(t){i.k0=parseFloat(t)},a:function(t){i.a=parseFloat(t)},b:function(t){i.b=parseFloat(t)},r:function(t){i.a=i.b=parseFloat(t)},r_a:function(){i.R_A=true},zone:function(t){i.zone=parseInt(t,10)},south:function(){i.utmSouth=true},towgs84:function(t){i.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){i.to_meter=parseFloat(t)},units:function(t){i.units=t;var s=W(F,t);if(s){i.to_meter=s.to_meter}},from_greenwich:function(t){i.from_greenwich=t*C},pm:function(t){var s=W(L,t);i.from_greenwich=(s?s:parseFloat(t))*C},nadgrids:function(t){if(t==="@null"){i.datumCode="none"}else{i.nadgrids=t}},axis:function(t){var s="ewnsud";if(t.length===3&&s.indexOf(t.substr(0,1))!==-1&&s.indexOf(t.substr(1,1))!==-1&&s.indexOf(t.substr(2,1))!==-1){i.axis=t}},approx:function(){i.approx=true},over:function(){i.over=true}};for(e in s){r=s[e];if(e in h){n=h[e];if(typeof n==="function"){n(r)}else{i[n]=r}}else{i[e]=r}}if(typeof i.datumCode==="string"&&i.datumCode!=="WGS84"){i.datumCode=i.datumCode.toLowerCase()}i["projStr"]=t;return i}class V{static getId(t){const i=t.find((t=>Array.isArray(t)&&t[0]==="ID"));if(i&&i.length>=3){return{authority:i[1],code:parseInt(i[2],10)}}return null}static convertUnit(t,i="unit"){if(!t||t.length<3){return{type:i,name:"unknown",conversion_factor:null}}const s=t[1];const e=parseFloat(t[2])||null;const r=t.find((t=>Array.isArray(t)&&t[0]==="ID"));const n=r?{authority:r[1],code:parseInt(r[2],10)}:null;return{type:i,name:s,conversion_factor:e,id:n}}static convertAxis(t){const i=t[1]||"Unknown";let s;const e=i.match(/^\((.)\)$/);if(e){const t=e[1].toUpperCase();if(t==="E")s="east";else if(t==="N")s="north";else if(t==="U")s="up";else throw new Error(`Unknown axis abbreviation: ${t}`)}else{s=t[2]?t[2].toLowerCase():"unknown"}const r=t.find((t=>Array.isArray(t)&&t[0]==="ORDER"));const n=r?parseInt(r[1],10):null;const h=t.find((t=>Array.isArray(t)&&(t[0]==="LENGTHUNIT"||t[0]==="ANGLEUNIT"||t[0]==="SCALEUNIT")));const a=this.convertUnit(h);return{name:i,direction:s,unit:a,order:n}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&t[0]==="AXIS")).map((t=>this.convertAxis(t))).sort(((t,i)=>(t.order||0)-(i.order||0)))}static convert(t,i={}){switch(t[0]){case"PROJCRS":i.type="ProjectedCRS";i.name=t[1];i.base_crs=t.find((t=>Array.isArray(t)&&t[0]==="BASEGEOGCRS"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="BASEGEOGCRS"))):null;i.conversion=t.find((t=>Array.isArray(t)&&t[0]==="CONVERSION"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="CONVERSION"))):null;const s=t.find((t=>Array.isArray(t)&&t[0]==="CS"));if(s){i.coordinate_system={type:s[1],axis:this.extractAxes(t)}}const e=t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT"));if(e){const t=this.convertUnit(e);i.coordinate_system.unit=t}i.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":i.type="GeographicCRS";i.name=t[1];const r=t.find((t=>Array.isArray(t)&&(t[0]==="DATUM"||t[0]==="ENSEMBLE")));if(r){const s=this.convert(r);if(r[0]==="ENSEMBLE"){i.datum_ensemble=s}else{i.datum=s}const e=t.find((t=>Array.isArray(t)&&t[0]==="PRIMEM"));if(e&&e[1]!=="Greenwich"){s.prime_meridian={name:e[1],longitude:parseFloat(e[2])}}}i.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)};i.id=this.getId(t);break;case"DATUM":i.type="GeodeticReferenceFrame";i.name=t[1];i.ellipsoid=t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"))):null;break;case"ENSEMBLE":i.type="DatumEnsemble";i.name=t[1];i.members=t.filter((t=>Array.isArray(t)&&t[0]==="MEMBER")).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const n=t.find((t=>Array.isArray(t)&&t[0]==="ENSEMBLEACCURACY"));if(n){i.accuracy=parseFloat(n[1])}const h=t.find((t=>Array.isArray(t)&&t[0]==="ELLIPSOID"));if(h){i.ellipsoid=this.convert(h)}i.id=this.getId(t);break;case"ELLIPSOID":i.type="Ellipsoid";i.name=t[1];i.semi_major_axis=parseFloat(t[2]);i.inverse_flattening=parseFloat(t[3]);t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="LENGTHUNIT")),i):null;break;case"CONVERSION":i.type="Conversion";i.name=t[1];i.method=t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))):null;i.parameters=t.filter((t=>Array.isArray(t)&&t[0]==="PARAMETER")).map((t=>this.convert(t)));break;case"METHOD":i.type="Method";i.name=t[1];i.id=this.getId(t);break;case"PARAMETER":i.type="Parameter";i.name=t[1];i.value=parseFloat(t[2]);i.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&(t[0]==="LENGTHUNIT"||t[0]==="ANGLEUNIT"||t[0]==="SCALEUNIT"))));i.id=this.getId(t);break;case"BOUNDCRS":i.type="BoundCRS";const a=t.find((t=>Array.isArray(t)&&t[0]==="SOURCECRS"));if(a){const t=a.find((t=>Array.isArray(t)));i.source_crs=t?this.convert(t):null}const o=t.find((t=>Array.isArray(t)&&t[0]==="TARGETCRS"));if(o){const t=o.find((t=>Array.isArray(t)));i.target_crs=t?this.convert(t):null}const f=t.find((t=>Array.isArray(t)&&t[0]==="ABRIDGEDTRANSFORMATION"));if(f){i.transformation=this.convert(f)}else{i.transformation=null}break;case"ABRIDGEDTRANSFORMATION":i.type="Transformation";i.name=t[1];i.method=t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))?this.convert(t.find((t=>Array.isArray(t)&&t[0]==="METHOD"))):null;i.parameters=t.filter((t=>Array.isArray(t)&&(t[0]==="PARAMETER"||t[0]==="PARAMETERFILE"))).map((t=>{if(t[0]==="PARAMETER"){return this.convert(t)}else if(t[0]==="PARAMETERFILE"){return{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}}}));if(i.parameters.length===7){const t=i.parameters[6];if(t.name==="Scale difference"){t.value=Math.round((t.value-1)*1e12)/1e6}}i.id=this.getId(t);break;case"AXIS":if(!i.coordinate_system){i.coordinate_system={type:"unspecified",axis:[]}}i.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");if(i.coordinate_system&&i.coordinate_system.axis){i.coordinate_system.axis.forEach((t=>{if(!t.unit){t.unit=u}}))}if(u.conversion_factor&&u.conversion_factor!==1){if(i.semi_major_axis){i.semi_major_axis={value:i.semi_major_axis,unit:u}}}break;default:i.keyword=t[0];break}return i}}class U extends V{static convert(t,i={}){super.convert(t,i);if(i.coordinate_system&&i.coordinate_system.subtype==="Cartesian"){delete i.coordinate_system}if(i.usage){delete i.usage}return i}}class B extends V{static convert(t,i={}){super.convert(t,i);const s=t.find((t=>Array.isArray(t)&&t[0]==="CS"));if(s){i.coordinate_system={subtype:s[1],axis:this.extractAxes(t)}}const e=t.find((t=>Array.isArray(t)&&t[0]==="USAGE"));if(e){const t=e.find((t=>Array.isArray(t)&&t[0]==="SCOPE"));const s=e.find((t=>Array.isArray(t)&&t[0]==="AREA"));const r=e.find((t=>Array.isArray(t)&&t[0]==="BBOX"));i.usage={};if(t){i.usage.scope=t[1]}if(s){i.usage.area=s[1]}if(r){i.usage.bbox=r.slice(1)}}return i}}function q(t){if(t.find((t=>Array.isArray(t)&&t[0]==="USAGE"))){return"2019"}if(t.find((t=>Array.isArray(t)&&t[0]==="CS"))){return"2015"}if(t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS"){return"2015"}return"2015"}function H(t){const i=q(t);const s=i==="2019"?B:U;return s.convert(t)}function X(t){const i=t.toUpperCase();if(i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")){return"WKT2"}if(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT")){return"WKT1"}return"WKT1"}var Y=1;var J=2;var K=3;var Z=4;var $=5;var Q=-1;var tt=/\s/;var it=/[A-Za-z]/;var st=/[A-Za-z84_]/;var et=/[,\]]/;var rt=/[\d\.E\-\+]/;function nt(t){if(typeof t!=="string"){throw new Error("not a string")}this.text=t.trim();this.level=0;this.place=0;this.root=null;this.stack=[];this.currentObject=null;this.state=Y}nt.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==Z){while(tt.test(t)){if(this.place>=this.text.length){return}t=this.text[this.place++]}}switch(this.state){case Y:return this.neutral(t);case J:return this.keyword(t);case Z:return this.quoted(t);case $:return this.afterquote(t);case K:return this.number(t);case Q:return}};nt.prototype.afterquote=function(t){if(t==='"'){this.word+='"';this.state=Z;return}if(et.test(t)){this.word=this.word.trim();this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)};nt.prototype.afterItem=function(t){if(t===","){if(this.word!==null){this.currentObject.push(this.word)}this.word=null;this.state=Y;return}if(t==="]"){this.level--;if(this.word!==null){this.currentObject.push(this.word);this.word=null}this.state=Y;this.currentObject=this.stack.pop();if(!this.currentObject){this.state=Q}return}};nt.prototype.number=function(t){if(rt.test(t)){this.word+=t;return}if(et.test(t)){this.word=parseFloat(this.word);this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)};nt.prototype.quoted=function(t){if(t==='"'){this.state=$;return}this.word+=t;return};nt.prototype.keyword=function(t){if(st.test(t)){this.word+=t;return}if(t==="["){var i=[];i.push(this.word);this.level++;if(this.root===null){this.root=i}else{this.currentObject.push(i)}this.stack.push(this.currentObject);this.currentObject=i;this.state=Y;return}if(et.test(t)){this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place)};nt.prototype.neutral=function(t){if(it.test(t)){this.word=t;this.state=J;return}if(t==='"'){this.word="";this.state=Z;return}if(rt.test(t)){this.word=t;this.state=K;return}if(et.test(t)){this.afterItem(t);return}throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place)};nt.prototype.output=function(){while(this.place<this.text.length){this.readCharicter()}if(this.state===Q){return this.root}throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ht(t){var i=new nt(t);return i.output()}function at(t,i,s){if(Array.isArray(i)){s.unshift(i);i=null}var e=i?{}:t;var r=s.reduce((function(t,i){ot(i,t);return t}),e);if(i){t[i]=r}}function ot(t,i){if(!Array.isArray(t)){i[t]=true;return}var s=t.shift();if(s==="PARAMETER"){s=t.shift()}if(t.length===1){if(Array.isArray(t[0])){i[s]={};ot(t[0],i[s]);return}i[s]=t[0];return}if(!t.length){i[s]=true;return}if(s==="TOWGS84"){i[s]=t;return}if(s==="AXIS"){if(!(s in i)){i[s]=[]}i[s].push(t);return}if(!Array.isArray(s)){i[s]={}}var e;switch(s){case"UNIT":case"PRIMEM":case"VERT_DATUM":i[s]={name:t[0].toLowerCase(),convert:t[1]};if(t.length===3){ot(t[2],i[s])}return;case"SPHEROID":case"ELLIPSOID":i[s]={name:t[0],a:t[1],rf:t[2]};if(t.length===4){ot(t[3],i[s])}return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]];at(i,s,t);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":t[0]=["name",t[0]];at(i,s,t);i[s].type=s;return;default:e=-1;while(++e<t.length){if(!Array.isArray(t[e])){return ot(t,i[s])}}return at(i,s,t)}}var ft=.017453292519943295;function ut(t){return t*ft}function lt(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");if(!t.long0&&t.longc&&(i==="albers conic equal area"||i==="lambert azimuthal equal area")){t.long0=t.longc}if(!t.lat_ts&&t.lat1&&(i==="stereographic south pole"||i==="polar stereographic (variant b)")){t.lat0=ut(t.lat1>0?90:-90);t.lat_ts=t.lat1;delete t.lat1}else if(!t.lat_ts&&t.lat0&&(i==="polar stereographic"||i==="polar stereographic (variant a)")){t.lat_ts=t.lat0;t.lat0=ut(t.lat0>0?90:-90);delete t.lat1}}function vt(t){let i={units:null,to_meter:undefined};if(typeof t==="string"){i.units=t.toLowerCase();if(i.units==="metre"){i.units="meter"}if(i.units==="meter"){i.to_meter=1}}else if(t&&t.name){i.units=t.name.toLowerCase();if(i.units==="metre"){i.units="meter"}i.to_meter=t.conversion_factor}return i}function ct(t){if(typeof t==="object"){return t.value*t.unit.conversion_factor}return t}function dt(t,i){if(t.ellipsoid.radius){i.a=t.ellipsoid.radius;i.rf=0}else{i.a=ct(t.ellipsoid.semi_major_axis);if(t.ellipsoid.inverse_flattening!==undefined){i.rf=t.ellipsoid.inverse_flattening}else if(t.ellipsoid.semi_major_axis!==undefined&&t.ellipsoid.semi_minor_axis!==undefined){i.rf=i.a/(i.a-ct(t.ellipsoid.semi_minor_axis))}}}function mt(t,i={}){if(!t||typeof t!=="object"){return t}if(t.type==="BoundCRS"){mt(t.source_crs,i);if(t.transformation){if(t.transformation.method&&t.transformation.method.name==="NTv2"){i.nadgrids=t.transformation.parameters[0].value}else{i.datum_params=t.transformation.parameters.map((t=>t.value))}}return i}Object.keys(t).forEach((s=>{const e=t[s];if(e===null){return}switch(s){case"name":if(i.srsCode){break}i.name=e;i.srsCode=e;break;case"type":if(e==="GeographicCRS"){i.projName="longlat"}else if(e==="ProjectedCRS"&&t.conversion&&t.conversion.method){i.projName=t.conversion.method.name}break;case"datum":case"datum_ensemble":if(e.ellipsoid){i.ellps=e.ellipsoid.name;dt(e,i)}if(e.prime_meridian){i.from_greenwich=e.prime_meridian.longitude*Math.PI/180}break;case"ellipsoid":i.ellps=e.name;dt(e,i);break;case"prime_meridian":i.long0=(e.longitude||0)*Math.PI/180;break;case"coordinate_system":if(e.axis){i.axis=e.axis.map((t=>{const i=t.direction;if(i==="east")return"e";if(i==="north")return"n";if(i==="west")return"w";if(i==="south")return"s";throw new Error(`Unknown axis direction: ${i}`)})).join("")+"u";if(e.unit){const{units:t,to_meter:s}=vt(e.unit);i.units=t;i.to_meter=s}else if(e.axis[0]&&e.axis[0].unit){const{units:t,to_meter:s}=vt(e.axis[0].unit);i.units=t;i.to_meter=s}}break;case"id":if(e.authority&&e.code){i.title=e.authority+":"+e.code}break;case"conversion":if(e.method&&e.method.name){i.projName=e.method.name}if(e.parameters){e.parameters.forEach((t=>{const s=t.name.toLowerCase().replace(/\s+/g,"_");const e=t.value;if(t.unit&&t.unit.conversion_factor){i[s]=e*t.unit.conversion_factor}else if(t.unit==="degree"){i[s]=e*Math.PI/180}else{i[s]=e}}))}break;case"unit":if(e.name){i.units=e.name.toLowerCase();if(i.units==="metre"){i.units="meter"}}if(e.conversion_factor){i.to_meter=e.conversion_factor}break;case"base_crs":mt(e,i);i.datumCode=e.id?e.id.authority+"_"+e.id.code:e.name;break}}));if(i.latitude_of_false_origin!==undefined){i.lat0=i.latitude_of_false_origin}if(i.longitude_of_false_origin!==undefined){i.long0=i.longitude_of_false_origin}if(i.latitude_of_standard_parallel!==undefined){i.lat0=i.latitude_of_standard_parallel;i.lat1=i.latitude_of_standard_parallel}if(i.latitude_of_1st_standard_parallel!==undefined){i.lat1=i.latitude_of_1st_standard_parallel}if(i.latitude_of_2nd_standard_parallel!==undefined){i.lat2=i.latitude_of_2nd_standard_parallel}if(i.latitude_of_projection_centre!==undefined){i.lat0=i.latitude_of_projection_centre}if(i.longitude_of_projection_centre!==undefined){i.longc=i.longitude_of_projection_centre}if(i.easting_at_false_origin!==undefined){i.x0=i.easting_at_false_origin}if(i.northing_at_false_origin!==undefined){i.y0=i.northing_at_false_origin}if(i.latitude_of_natural_origin!==undefined){i.lat0=i.latitude_of_natural_origin}if(i.longitude_of_natural_origin!==undefined){i.long0=i.longitude_of_natural_origin}if(i.longitude_of_origin!==undefined){i.long0=i.longitude_of_origin}if(i.false_easting!==undefined){i.x0=i.false_easting}if(i.easting_at_projection_centre){i.x0=i.easting_at_projection_centre}if(i.false_northing!==undefined){i.y0=i.false_northing}if(i.northing_at_projection_centre){i.y0=i.northing_at_projection_centre}if(i.standard_parallel_1!==undefined){i.lat1=i.standard_parallel_1}if(i.standard_parallel_2!==undefined){i.lat2=i.standard_parallel_2}if(i.scale_factor_at_natural_origin!==undefined){i.k0=i.scale_factor_at_natural_origin}if(i.scale_factor_at_projection_centre!==undefined){i.k0=i.scale_factor_at_projection_centre}if(i.scale_factor_on_pseudo_standard_parallel!==undefined){i.k0=i.scale_factor_on_pseudo_standard_parallel}if(i.azimuth!==undefined){i.alpha=i.azimuth}if(i.azimuth_at_projection_centre!==undefined){i.alpha=i.azimuth_at_projection_centre}if(i.angle_from_rectified_to_skew_grid){i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid}lt(i);return i}var pt=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function _t(t,i){var s=i[0];var e=i[1];if(!(s in t)&&e in t){t[s]=t[e];if(i.length===3){t[s]=i[2](t[s])}}}function gt(t){var i=Object.keys(t);for(var s=0,e=i.length;s<e;++s){var r=i[s];if(pt.indexOf(r)!==-1){Mt(t[r])}if(typeof t[r]==="object"){gt(t[r])}}}function Mt(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];if(i&&i in t.AUTHORITY){t.title=i+":"+t.AUTHORITY[i]}}if(t.type==="GEOGCS"){t.projName="longlat"}else if(t.type==="LOCAL_CS"){t.projName="identity";t.local=true}else{if(typeof t.PROJECTION==="object"){t.projName=Object.keys(t.PROJECTION)[0]}else{t.projName=t.PROJECTION}}if(t.AXIS){var s="";for(var e=0,r=t.AXIS.length;e<r;++e){var n=[t.AXIS[e][0].toLowerCase(),t.AXIS[e][1].toLowerCase()];if(n[0].indexOf("north")!==-1||(n[0]==="y"||n[0]==="lat")&&n[1]==="north"){s+="n"}else if(n[0].indexOf("south")!==-1||(n[0]==="y"||n[0]==="lat")&&n[1]==="south"){s+="s"}else if(n[0].indexOf("east")!==-1||(n[0]==="x"||n[0]==="lon")&&n[1]==="east"){s+="e"}else if(n[0].indexOf("west")!==-1||(n[0]==="x"||n[0]==="lon")&&n[1]==="west"){s+="w"}}if(s.length===2){s+="u"}if(s.length===3){t.axis=s}}if(t.UNIT){t.units=t.UNIT.name.toLowerCase();if(t.units==="metre"){t.units="meter"}if(t.UNIT.convert){if(t.type==="GEOGCS"){if(t.DATUM&&t.DATUM.SPHEROID){t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a}}else{t.to_meter=t.UNIT.convert}}}var h=t.GEOGCS;if(t.type==="GEOGCS"){h=t}if(h){if(h.DATUM){t.datumCode=h.DATUM.name.toLowerCase()}else{t.datumCode=h.name.toLowerCase()}if(t.datumCode.slice(0,2)==="d_"){t.datumCode=t.datumCode.slice(2)}if(t.datumCode==="new_zealand_1949"){t.datumCode="nzgd49"}if(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984"){if(t.PROJECTION==="Mercator_Auxiliary_Sphere"){t.sphere=true}t.datumCode="wgs84"}if(t.datumCode==="belge_1972"){t.datumCode="rnb72"}if(h.DATUM&&h.DATUM.SPHEROID){t.ellps=h.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk");if(t.ellps.toLowerCase().slice(0,13)==="international"){t.ellps="intl"}t.a=h.DATUM.SPHEROID.a;t.rf=parseFloat(h.DATUM.SPHEROID.rf,10)}if(h.DATUM&&h.DATUM.TOWGS84){t.datum_params=h.DATUM.TOWGS84}if(~t.datumCode.indexOf("osgb_1936")){t.datumCode="osgb36"}if(~t.datumCode.indexOf("osni_1952")){t.datumCode="osni52"}if(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965")){t.datumCode="ire65"}if(t.datumCode==="ch1903+"){t.datumCode="ch1903"}if(~t.datumCode.indexOf("israel")){t.datumCode="isr93"}}if(t.b&&!isFinite(t.b)){t.b=t.a}if(t.rectified_grid_angle){t.rectified_grid_angle=ut(t.rectified_grid_angle)}function a(i){var s=t.to_meter||1;return i*s}var o=function(i){return _t(t,i)};var f=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ut],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ut],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",ut],["lat0","latitude_of_origin",ut],["lat0","standard_parallel_1",ut],["lat1","standard_parallel_1",ut],["lat2","standard_parallel_2",ut],["azimuth","Azimuth"],["alpha","azimuth",ut],["srsCode","name"]];f.forEach(o);lt(t)}function zt(t){if(typeof t==="object"){return mt(t)}const i=X(t);var s=ht(t);if(i==="WKT2"){const t=H(s);return mt(t)}var e=s[0];var r={};ot(s,r);gt(r);return r[e]}function wt(t){var i=this;if(arguments.length===2){var s=arguments[1];if(typeof s==="string"){if(s.charAt(0)==="+"){wt[t]=j(arguments[1])}else{wt[t]=zt(arguments[1])}}else if(s&&typeof s==="object"&&!("projName"in s)){wt[t]=zt(arguments[1])}else{wt[t]=s;if(!s){delete wt[t]}}}else if(arguments.length===1){if(Array.isArray(t)){return t.map((function(t){if(Array.isArray(t)){return wt.apply(i,t)}else{return wt(t)}}))}else if(typeof t==="string"){if(t in wt){return wt[t]}}else if("EPSG"in t){wt["EPSG:"+t.EPSG]=t}else if("ESRI"in t){wt["ESRI:"+t.ESRI]=t}else if("IAU2000"in t){wt["IAU2000:"+t.IAU2000]=t}else{console.log(t)}return}}_(wt);function yt(t){return typeof t==="string"}function bt(t){return t in wt}function xt(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t==="object"&&!("srsCode"in t)}var Et=["3857","900913","3785","102113"];function St(t){var i=W(t,"authority");if(!i){return}var s=W(i,"epsg");return s&&Et.indexOf(s)>-1}function Gt(t){var i=W(t,"extension");if(!i){return}return W(i,"proj4")}function Pt(t){return t[0]==="+"}function kt(t){if(yt(t)){if(bt(t)){return wt[t]}if(xt(t)){var i=zt(t);if(St(i)){return wt["EPSG:3857"]}var s=Gt(i);if(s){return j(s)}return i}if(Pt(t)){return j(t)}}else if(!("projName"in t)){return zt(t)}else{return t}}function Nt(t,i){t=t||{};var s,e;if(!i){return t}for(e in i){s=i[e];if(s!==undefined){t[e]=s}}return t}function It(t,i,s){var e=t*i;return s/Math.sqrt(1-e*e)}function Ct(t){return t<0?-1:1}function At(t,i){if(i){return t}return Math.abs(t)<=O?t:t-Ct(t)*T}function Rt(t,i,s){var e=t*s;var r=.5*t;e=Math.pow((1-e)/(1+e),r);return Math.tan(.5*(G-i))/e}function Tt(t,i){var s=.5*t;var e,r;var n=G-2*Math.atan(i);for(var h=0;h<=15;h++){e=t*Math.sin(n);r=G-2*Math.atan(i*Math.pow((1-e)/(1+e),s))-n;n+=r;if(Math.abs(r)<=1e-10){return n}}return-9999}function Ot(){var t=this.b/this.a;this.es=1-t*t;if(!("x0"in this)){this.x0=0}if(!("y0"in this)){this.y0=0}this.e=Math.sqrt(this.es);if(this.lat_ts){if(this.sphere){this.k0=Math.cos(this.lat_ts)}else{this.k0=It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}else{if(!this.k0){if(this.k){this.k0=this.k}else{this.k0=1}}}}function Lt(t){var i=t.x;var s=t.y;if(s*A>90&&s*A<-90&&i*A>180&&i*A<-180){return null}var e,r;if(Math.abs(Math.abs(s)-G)<=I){return null}else{if(this.sphere){e=this.x0+this.a*this.k0*At(i-this.long0,this.over);r=this.y0+this.a*this.k0*Math.log(Math.tan(R+.5*s))}else{var n=Math.sin(s);var h=Rt(this.e,s,n);e=this.x0+this.a*this.k0*At(i-this.long0,this.over);r=this.y0-this.a*this.k0*Math.log(h)}t.x=e;t.y=r;return t}}function Ft(t){var i=t.x-this.x0;var s=t.y-this.y0;var e,r;if(this.sphere){r=G-2*Math.atan(Math.exp(-s/(this.a*this.k0)))}else{var n=Math.exp(-s/(this.a*this.k0));r=Tt(this.e,n);if(r===-9999){return null}}e=At(this.long0+i/(this.a*this.k0),this.over);t.x=e;t.y=r;return t}var Dt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];var Wt={init:Ot,forward:Lt,inverse:Ft,names:Dt};function jt(){}function Vt(t){return t}var Ut=["longlat","identity"];var Bt={init:jt,forward:Vt,inverse:Vt,names:Ut};var qt=[Wt,Bt];var Ht={};var Xt=[];function Yt(t,i){var s=Xt.length;if(!t.names){console.log(i);return true}Xt[s]=t;t.names.forEach((function(t){Ht[t.toLowerCase()]=s}));return this}function Jt(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function Kt(t){if(!t){return false}var i=t.toLowerCase();if(typeof Ht[i]!=="undefined"&&Xt[Ht[i]]){return Xt[Ht[i]]}i=Jt(i);if(i in Ht&&Xt[Ht[i]]){return Xt[Ht[i]]}}function Zt(){qt.forEach(Yt)}var $t={start:Zt,add:Yt,get:Kt};var Qt={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const ti=Qt.WGS84;function ii(t,i,s,e){var r=t*t;var n=i*i;var h=(r-n)/r;var a=0;if(e){t*=1-h*(P+h*(k+h*N));r=t*t;h=0}else{a=Math.sqrt(h)}var o=(r-n)/n;return{es:h,e:a,ep2:o}}function si(t,i,s,e,r){if(!t){var n=W(Qt,e);if(!n){n=ti}t=n.a;i=n.b;s=n.rf}if(s&&!i){i=(1-1/s)*t}if(s===0||Math.abs(t-i)<I){r=true;i=t}return{a:t,b:i,rf:s,sphere:r}}var ei={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var ri in ei){var ni=ei[ri];if(!ni.datumName){continue}ei[ni.datumName]=ni}function hi(t,i,s,e,r,n,h){var a={};if(t===undefined||t==="none"){a.datum_type=y}else{a.datum_type=w}if(i){a.datum_params=i.map(parseFloat);if(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0){a.datum_type=g}if(a.datum_params.length>3){if(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0){a.datum_type=M;a.datum_params[3]*=S;a.datum_params[4]*=S;a.datum_params[5]*=S;a.datum_params[6]=a.datum_params[6]/1e6+1}}}if(h){a.datum_type=z;a.grids=h}a.a=s;a.b=e;a.es=r;a.ep2=n;return a}var ai={};function oi(t,i,s){if(i instanceof ArrayBuffer){return fi(t,i,s)}return{ready:ui(t,i)}}function fi(t,i,s){var e=true;if(s!==undefined&&s.includeErrorFields===false){e=false}var r=new DataView(i);var n=mi(r);var h=pi(r,n);var a=gi(r,h,n,e);var o={header:h,subgrids:a};ai[t]=o;return o}async function ui(t,i){var s=[];var e=await i.getImageCount();for(var r=e-1;r>=0;r--){var n=await i.getImage(r);var h=await n.readRasters();var a=h;var o=[n.getWidth(),n.getHeight()];var f=n.getBoundingBox().map(ci);var u=[n.fileDirectory.ModelPixelScale[0],n.fileDirectory.ModelPixelScale[1]].map(ci);var l=f[0]+(o[0]-1)*u[0];var v=f[3]-(o[1]-1)*u[1];var c=a[0];var d=a[1];var m=[];for(let t=o[1]-1;t>=0;t--){for(let i=o[0]-1;i>=0;i--){var p=t*o[0]+i;m.push([-di(d[p]),di(c[p])])}}s.push({del:u,lim:o,ll:[-l,v],cvs:m})}var _={header:{nSubgrids:e},subgrids:s};ai[t]=_;return _}function li(t){if(t===undefined){return null}var i=t.split(",");return i.map(vi)}function vi(t){if(t.length===0){return null}var i=t[0]==="@";if(i){t=t.slice(1)}if(t==="null"){return{name:"null",mandatory:!i,grid:null,isNull:true}}return{name:t,mandatory:!i,grid:ai[t]||null,isNull:false}}function ci(t){return t*Math.PI/180}function di(t){return t/3600*Math.PI/180}function mi(t){var i=t.getInt32(8,false);if(i===11){return false}i=t.getInt32(8,true);if(i!==11){console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian")}return true}function pi(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:_i(t,56,56+8).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}function _i(t,i,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,s)))}function gi(t,i,s,e){var r=176;var n=[];for(var h=0;h<i.nSubgrids;h++){var a=zi(t,r,s);var o=wi(t,r,a,s,e);var f=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval);var u=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);n.push({ll:[di(a.lowerLongitude),di(a.lowerLatitude)],del:[di(a.longitudeInterval),di(a.latitudeInterval)],lim:[f,u],count:a.gridNodeCount,cvs:Mi(o)});var l=16;if(e===false){l=8}r+=176+a.gridNodeCount*l}return n}function Mi(t){return t.map((function(t){return[di(t.longitudeShift),di(t.latitudeShift)]}))}function zi(t,i,s){return{name:_i(t,i+8,i+16).trim(),parent:_i(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,s),upperLatitude:t.getFloat64(i+88,s),lowerLongitude:t.getFloat64(i+104,s),upperLongitude:t.getFloat64(i+120,s),latitudeInterval:t.getFloat64(i+136,s),longitudeInterval:t.getFloat64(i+152,s),gridNodeCount:t.getInt32(i+168,s)}}function wi(t,i,s,e,r){var n=i+176;var h=16;if(r===false){h=8}var a=[];for(var o=0;o<s.gridNodeCount;o++){var f={latitudeShift:t.getFloat32(n+o*h,e),longitudeShift:t.getFloat32(n+o*h+4,e)};if(r!==false){f.latitudeAccuracy=t.getFloat32(n+o*h+8,e);f.longitudeAccuracy=t.getFloat32(n+o*h+12,e)}a.push(f)}return a}function yi(t,i){if(!(this instanceof yi)){return new yi(t)}this.forward=null;this.inverse=null;this.init=null;this.names=null;i=i||function(t){if(t){throw t}};var s=kt(t);if(typeof s!=="object"){i("Could not parse to valid json: "+t);return}var e=yi.projections.get(s.projName);if(!e){i("Could not get projection name from: "+t);return}if(s.datumCode&&s.datumCode!=="none"){var r=W(ei,s.datumCode);if(r){s.datum_params=s.datum_params||(r.towgs84?r.towgs84.split(","):null);s.ellps=r.ellipse;s.datumName=r.datumName?r.datumName:s.datumCode}}s.k0=s.k0||1;s.axis=s.axis||"enu";s.ellps=s.ellps||"wgs84";s.lat1=s.lat1||s.lat0;var n=si(s.a,s.b,s.rf,s.ellps,s.sphere);var h=ii(n.a,n.b,n.rf,s.R_A);var a=li(s.nadgrids);var o=s.datum||hi(s.datumCode,s.datum_params,n.a,n.b,h.es,h.ep2,a);Nt(this,s);Nt(this,e);this.a=n.a;this.b=n.b;this.rf=n.rf;this.sphere=n.sphere;this.es=h.es;this.e=h.e;this.ep2=h.ep2;this.datum=o;if("init"in this&&typeof this.init==="function"){this.init()}i(null,this)}yi.projections=$t;yi.projections.start();function bi(t,i){if(t.datum_type!==i.datum_type){return false}else if(t.a!==i.a||Math.abs(t.es-i.es)>5e-11){return false}else if(t.datum_type===g){return t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]}else if(t.datum_type===M){return t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6]}else{return true}}function xi(t,i,s){var e=t.x;var r=t.y;var n=t.z?t.z:0;var h;var a;var o;var f;if(r<-G&&r>-1.001*G){r=-G}else if(r>G&&r<1.001*G){r=G}else if(r<-G){return{x:-Infinity,y:-Infinity,z:t.z}}else if(r>G){return{x:Infinity,y:Infinity,z:t.z}}if(e>Math.PI){e-=2*Math.PI}a=Math.sin(r);f=Math.cos(r);o=a*a;h=s/Math.sqrt(1-i*o);return{x:(h+n)*f*Math.cos(e),y:(h+n)*f*Math.sin(e),z:(h*(1-i)+n)*a}}function Ei(t,i,s,e){var r=1e-12;var n=r*r;var h=30;var a;var o;var f;var u;var l;var v;var c;var d;var m;var p;var _;var g;var M;var z=t.x;var w=t.y;var y=t.z?t.z:0;var b;var x;var E;a=Math.sqrt(z*z+w*w);o=Math.sqrt(z*z+w*w+y*y);if(a/s<r){b=0;if(o/s<r){x=G;E=-e;return{x:t.x,y:t.y,z:t.z}}}else{b=Math.atan2(w,z)}f=y/o;u=a/o;l=1/Math.sqrt(1-i*(2-i)*u*u);d=u*(1-i)*l;m=f*l;M=0;do{M++;c=s/Math.sqrt(1-i*m*m);E=a*d+y*m-c*(1-i*m*m);v=i*c/(c+E);l=1/Math.sqrt(1-v*(2-v)*u*u);p=u*(1-v)*l;_=f*l;g=_*d-p*m;d=p;m=_}while(g*g>n&&M<h);x=Math.atan(_/Math.abs(p));return{x:b,y:x,z:E}}function Si(t,i,s){if(i===g){return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]}}else if(i===M){var e=s[0];var r=s[1];var n=s[2];var h=s[3];var a=s[4];var o=s[5];var f=s[6];return{x:f*(t.x-o*t.y+a*t.z)+e,y:f*(o*t.x+t.y-h*t.z)+r,z:f*(-a*t.x+h*t.y+t.z)+n}}}function Gi(t,i,s){if(i===g){return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]}}else if(i===M){var e=s[0];var r=s[1];var n=s[2];var h=s[3];var a=s[4];var o=s[5];var f=s[6];var u=(t.x-e)/f;var l=(t.y-r)/f;var v=(t.z-n)/f;return{x:u+o*l-a*v,y:-o*u+l+h*v,z:a*u-h*l+v}}}function Pi(t){return t===g||t===M}function ki(t,i,s){if(bi(t,i)){return s}if(t.datum_type===y||i.datum_type===y){return s}var e=t.a;var r=t.es;if(t.datum_type===z){var n=Ni(t,false,s);if(n!==0){return undefined}e=b;r=E}var h=i.a;var a=i.b;var o=i.es;if(i.datum_type===z){h=b;a=x;o=E}if(r===o&&e===h&&!Pi(t.datum_type)&&!Pi(i.datum_type)){return s}s=xi(s,r,e);if(Pi(t.datum_type)){s=Si(s,t.datum_type,t.datum_params)}if(Pi(i.datum_type)){s=Gi(s,i.datum_type,i.datum_params)}s=Ei(s,o,h,a);if(i.datum_type===z){var f=Ni(i,true,s);if(f!==0){return undefined}}return s}function Ni(t,i,s){if(t.grids===null||t.grids.length===0){console.log("Grid shift grids not found");return-1}var e={x:-s.x,y:s.y};var r={x:Number.NaN,y:Number.NaN};var n=[];t:for(var h=0;h<t.grids.length;h++){var a=t.grids[h];n.push(a.name);if(a.isNull){r=e;break}if(a.grid===null){if(a.mandatory){console.log("Unable to find mandatory grid '"+a.name+"'");return-1}continue}var o=a.grid.subgrids;for(var f=0,u=o.length;f<u;f++){var l=o[f];var v=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4;var c=l.ll[0]-v;var d=l.ll[1]-v;var m=l.ll[0]+(l.lim[0]-1)*l.del[0]+v;var p=l.ll[1]+(l.lim[1]-1)*l.del[1]+v;if(d>e.y||c>e.x||p<e.y||m<e.x){continue}r=Ii(e,i,l);if(!isNaN(r.x)){break t}}}if(isNaN(r.x)){console.log("Failed to find a grid shift table for location '"+-e.x*A+" "+e.y*A+" tried: '"+n+"'");return-1}s.x=-r.x;s.y=r.y;return 0}function Ii(t,i,s){var e={x:Number.NaN,y:Number.NaN};if(isNaN(t.x)){return e}var r={x:t.x,y:t.y};r.x-=s.ll[0];r.y-=s.ll[1];r.x=At(r.x-Math.PI)+Math.PI;var n=Ci(r,s);if(i){if(isNaN(n.x)){return e}n.x=r.x-n.x;n.y=r.y-n.y;var h=9,a=1e-12;var o,f;do{f=Ci(n,s);if(isNaN(f.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}o={x:r.x-(f.x+n.x),y:r.y-(f.y+n.y)};n.x+=o.x;n.y+=o.y}while(h--&&Math.abs(o.x)>a&&Math.abs(o.y)>a);if(h<0){console.log("Inverse grid shift iterator failed to converge.");return e}e.x=At(n.x+s.ll[0]);e.y=n.y+s.ll[1]}else{if(!isNaN(n.x)){e.x=t.x+n.x;e.y=t.y+n.y}}return e}function Ci(t,i){var s={x:t.x/i.del[0],y:t.y/i.del[1]};var e={x:Math.floor(s.x),y:Math.floor(s.y)};var r={x:s.x-1*e.x,y:s.y-1*e.y};var n={x:Number.NaN,y:Number.NaN};var h;if(e.x<0||e.x>=i.lim[0]){return n}if(e.y<0||e.y>=i.lim[1]){return n}h=e.y*i.lim[0]+e.x;var a={x:i.cvs[h][0],y:i.cvs[h][1]};h++;var o={x:i.cvs[h][0],y:i.cvs[h][1]};h+=i.lim[0];var f={x:i.cvs[h][0],y:i.cvs[h][1]};h--;var u={x:i.cvs[h][0],y:i.cvs[h][1]};var l=r.x*r.y,v=r.x*(1-r.y),c=(1-r.x)*(1-r.y),d=(1-r.x)*r.y;n.x=c*a.x+v*o.x+d*u.x+l*f.x;n.y=c*a.y+v*o.y+d*u.y+l*f.y;return n}function Ai(t,i,s){var e=s.x,r=s.y,n=s.z||0;var h,a,o;var f={};for(o=0;o<3;o++){if(i&&o===2&&s.z===undefined){continue}if(o===0){h=e;if("ew".indexOf(t.axis[o])!==-1){a="x"}else{a="y"}}else if(o===1){h=r;if("ns".indexOf(t.axis[o])!==-1){a="y"}else{a="x"}}else{h=n;a="z"}switch(t.axis[o]){case"e":f[a]=h;break;case"w":f[a]=-h;break;case"n":f[a]=h;break;case"s":f[a]=-h;break;case"u":if(s[a]!==undefined){f.z=h}break;case"d":if(s[a]!==undefined){f.z=-h}break;default:return null}}return f}function Ri(t){var i={x:t[0],y:t[1]};if(t.length>2){i.z=t[2]}if(t.length>3){i.m=t[3]}return i}function Ti(t){Oi(t.x);Oi(t.y)}function Oi(t){if(typeof Number.isFinite==="function"){if(Number.isFinite(t)){return}throw new TypeError("coordinates must be finite numbers")}if(typeof t!=="number"||t!==t||!isFinite(t)){throw new TypeError("coordinates must be finite numbers")}}function Li(t,i){return(t.datum.datum_type===g||t.datum.datum_type===M||t.datum.datum_type===z)&&i.datumCode!=="WGS84"||(i.datum.datum_type===g||i.datum.datum_type===M||i.datum.datum_type===z)&&t.datumCode!=="WGS84"}function Fi(t,i,s,e){var r;if(Array.isArray(s)){s=Ri(s)}else{s={x:s.x,y:s.y,z:s.z,m:s.m}}var n=s.z!==undefined;Ti(s);if(t.datum&&i.datum&&Li(t,i)){r=new yi("WGS84");s=Fi(t,r,s,e);t=r}if(e&&t.axis!=="enu"){s=Ai(t,false,s)}if(t.projName==="longlat"){s={x:s.x*C,y:s.y*C,z:s.z||0}}else{if(t.to_meter){s={x:s.x*t.to_meter,y:s.y*t.to_meter,z:s.z||0}}s=t.inverse(s);if(!s){return}}if(t.from_greenwich){s.x+=t.from_greenwich}s=ki(t.datum,i.datum,s);if(!s){return}s=s;if(i.from_greenwich){s={x:s.x-i.from_greenwich,y:s.y,z:s.z||0}}if(i.projName==="longlat"){s={x:s.x*A,y:s.y*A,z:s.z||0}}else{s=i.forward(s);if(i.to_meter){s={x:s.x/i.to_meter,y:s.y/i.to_meter,z:s.z||0}}}if(e&&i.axis!=="enu"){return Ai(i,true,s)}if(s&&!n){delete s.z}return s}var Di=yi("WGS84");function Wi(t,i,s,e){var r,n,h;if(Array.isArray(s)){r=Fi(t,i,s,e)||{x:NaN,y:NaN};if(s.length>2){if(typeof t.name!=="undefined"&&t.name==="geocent"||typeof i.name!=="undefined"&&i.name==="geocent"){if(typeof r.z==="number"){return[r.x,r.y,r.z].concat(s.slice(3))}else{return[r.x,r.y,s[2]].concat(s.slice(3))}}else{return[r.x,r.y].concat(s.slice(2))}}else{return[r.x,r.y]}}else{n=Fi(t,i,s,e);h=Object.keys(s);if(h.length===2){return n}h.forEach((function(e){if(typeof t.name!=="undefined"&&t.name==="geocent"||typeof i.name!=="undefined"&&i.name==="geocent"){if(e==="x"||e==="y"||e==="z"){return}}else{if(e==="x"||e==="y"){return}}n[e]=s[e]}));return n}}function ji(t){if(t instanceof yi){return t}if(typeof t==="object"&&"oProj"in t){return t.oProj}return yi(t)}function Vi(t,i,s){var e;var r;var n=false;var h;if(typeof i==="undefined"){r=ji(t);e=Di;n=true}else if(typeof i.x!=="undefined"||Array.isArray(i)){s=i;r=ji(t);e=Di;n=true}if(!e){e=ji(t)}if(!r){r=ji(i)}if(s){return Wi(e,r,s)}else{h={forward:function(t,i){return Wi(e,r,t,i)},inverse:function(t,i){return Wi(r,e,t,i)}};if(n){h.oProj=r}return h}}var Ui=6;var Bi="AJSAJS";var qi="AFAFAF";var Hi=65;var Xi=73;var Yi=79;var Ji=86;var Ki=90;var Zi={forward:$i,inverse:Qi,toPoint:ts};function $i(t,i){i=i||5;return hs(es({lat:t[1],lon:t[0]}),i)}function Qi(t){var i=rs(us(t.toUpperCase()));if(i.lat&&i.lon){return[i.lon,i.lat,i.lon,i.lat]}return[i.left,i.bottom,i.right,i.top]}function ts(t){var i=rs(us(t.toUpperCase()));if(i.lat&&i.lon){return[i.lon,i.lat]}return[(i.left+i.right)/2,(i.top+i.bottom)/2]}function is(t){return t*(Math.PI/180)}function ss(t){return 180*(t/Math.PI)}function es(t){var i=t.lat;var s=t.lon;var e=6378137;var r=.00669438;var n=.9996;var h;var a;var o,f,u,l,v;var c=is(i);var d=is(s);var m;var p;p=Math.floor((s+180)/6)+1;if(s===180){p=60}if(i>=56&&i<64&&s>=3&&s<12){p=32}if(i>=72&&i<84){if(s>=0&&s<9){p=31}else if(s>=9&&s<21){p=33}else if(s>=21&&s<33){p=35}else if(s>=33&&s<42){p=37}}h=(p-1)*6-180+3;m=is(h);a=r/(1-r);o=e/Math.sqrt(1-r*Math.sin(c)*Math.sin(c));f=Math.tan(c)*Math.tan(c);u=a*Math.cos(c)*Math.cos(c);l=Math.cos(c)*(d-m);v=e*((1-r/4-3*r*r/64-5*r*r*r/256)*c-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*c)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*c)-35*r*r*r/3072*Math.sin(6*c));var _=n*o*(l+(1-f+u)*l*l*l/6+(5-18*f+f*f+72*u-58*a)*l*l*l*l*l/120)+5e5;var g=n*(v+o*Math.tan(c)*(l*l/2+(5-f+9*u+4*u*u)*l*l*l*l/24+(61-58*f+f*f+600*u-330*a)*l*l*l*l*l*l/720));if(i<0){g+=1e7}return{northing:Math.round(g),easting:Math.round(_),zoneNumber:p,zoneLetter:ns(i)}}function rs(t){var i=t.northing;var s=t.easting;var e=t.zoneLetter;var r=t.zoneNumber;if(r<0||r>60){return null}var n=.9996;var h=6378137;var a=.00669438;var o;var f=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a));var u,l,v,c,d,m;var p;var _,g;var M=s-5e5;var z=i;if(e<"N"){z-=1e7}p=(r-1)*6-180+3;o=a/(1-a);m=z/n;_=m/(h*(1-a/4-3*a*a/64-5*a*a*a/256));g=_+(3*f/2-27*f*f*f/32)*Math.sin(2*_)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*_)+151*f*f*f/96*Math.sin(6*_);u=h/Math.sqrt(1-a*Math.sin(g)*Math.sin(g));l=Math.tan(g)*Math.tan(g);v=o*Math.cos(g)*Math.cos(g);c=h*(1-a)/Math.pow(1-a*Math.sin(g)*Math.sin(g),1.5);d=M/(u*n);var w=g-u*Math.tan(g)/c*(d*d/2-(5+3*l+10*v-4*v*v-9*o)*d*d*d*d/24+(61+90*l+298*v+45*l*l-252*o-3*v*v)*d*d*d*d*d*d/720);w=ss(w);var y=(d-(1+2*l+v)*d*d*d/6+(5-2*v+28*l-3*v*v+8*o+24*l*l)*d*d*d*d*d/120)/Math.cos(g);y=p+ss(y);var b;if(t.accuracy){var x=rs({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:x.lat,right:x.lon,bottom:w,left:y}}else{b={lat:w,lon:y}}return b}function ns(t){var i="Z";if(84>=t&&t>=72){i="X"}else if(72>t&&t>=64){i="W"}else if(64>t&&t>=56){i="V"}else if(56>t&&t>=48){i="U"}else if(48>t&&t>=40){i="T"}else if(40>t&&t>=32){i="S"}else if(32>t&&t>=24){i="R"}else if(24>t&&t>=16){i="Q"}else if(16>t&&t>=8){i="P"}else if(8>t&&t>=0){i="N"}else if(0>t&&t>=-8){i="M"}else if(-8>t&&t>=-16){i="L"}else if(-16>t&&t>=-24){i="K"}else if(-24>t&&t>=-32){i="J"}else if(-32>t&&t>=-40){i="H"}else if(-40>t&&t>=-48){i="G"}else if(-48>t&&t>=-56){i="F"}else if(-56>t&&t>=-64){i="E"}else if(-64>t&&t>=-72){i="D"}else if(-72>t&&t>=-80){i="C"}return i}function hs(t,i){var s="00000"+t.easting,e="00000"+t.northing;return t.zoneNumber+t.zoneLetter+as(t.easting,t.northing,t.zoneNumber)+s.substr(s.length-5,i)+e.substr(e.length-5,i)}function as(t,i,s){var e=os(s);var r=Math.floor(t/1e5);var n=Math.floor(i/1e5)%20;return fs(r,n,e)}function os(t){var i=t%Ui;if(i===0){i=Ui}return i}function fs(t,i,s){var e=s-1;var r=Bi.charCodeAt(e);var n=qi.charCodeAt(e);var h=r+t-1;var a=n+i;var o=false;if(h>Ki){h=h-Ki+Hi-1;o=true}if(h===Xi||r<Xi&&h>Xi||(h>Xi||r<Xi)&&o){h++}if(h===Yi||r<Yi&&h>Yi||(h>Yi||r<Yi)&&o){h++;if(h===Xi){h++}}if(h>Ki){h=h-Ki+Hi-1}if(a>Ji){a=a-Ji+Hi-1;o=true}else{o=false}if(a===Xi||n<Xi&&a>Xi||(a>Xi||n<Xi)&&o){a++}if(a===Yi||n<Yi&&a>Yi||(a>Yi||n<Yi)&&o){a++;if(a===Xi){a++}}if(a>Ji){a=a-Ji+Hi-1}var f=String.fromCharCode(h)+String.fromCharCode(a);return f}function us(t){if(t&&t.length===0){throw"MGRSPoint coverting from nothing"}var i=t.length;var s=null;var e="";var r;var n=0;while(!/[A-Z]/.test(r=t.charAt(n))){if(n>=2){throw"MGRSPoint bad conversion from: "+t}e+=r;n++}var h=parseInt(e,10);if(n===0||n+3>i){throw"MGRSPoint bad conversion from: "+t}var a=t.charAt(n++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O"){throw"MGRSPoint zone letter "+a+" not handled: "+t}s=t.substring(n,n+=2);var o=os(h);var f=ls(s.charAt(0),o);var u=vs(s.charAt(1),o);while(u<cs(a)){u+=2e6}var l=i-n;if(l%2!==0){throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t}var v=l/2;var c=0;var d=0;var m,p,_,g,M;if(v>0){m=1e5/Math.pow(10,v);p=t.substring(n,n+v);c=parseFloat(p)*m;_=t.substring(n+v);d=parseFloat(_)*m}g=c+f;M=d+u;return{easting:g,northing:M,zoneLetter:a,zoneNumber:h,accuracy:m}}function ls(t,i){var s=Bi.charCodeAt(i-1);var e=1e5;var r=false;while(s!==t.charCodeAt(0)){s++;if(s===Xi){s++}if(s===Yi){s++}if(s>Ki){if(r){throw"Bad character: "+t}s=Hi;r=true}e+=1e5}return e}function vs(t,i){if(t>"V"){throw"MGRSPoint given invalid Northing "+t}var s=qi.charCodeAt(i-1);var e=0;var r=false;while(s!==t.charCodeAt(0)){s++;if(s===Xi){s++}if(s===Yi){s++}if(s>Ji){if(r){throw"Bad character: "+t}s=Hi;r=true}e+=1e5}return e}function cs(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0){return i}else{throw"Invalid zone letter: "+t}}function ds(t,i,s){if(!(this instanceof ds)){return new ds(t,i,s)}if(Array.isArray(t)){this.x=t[0];this.y=t[1];this.z=t[2]||0}else if(typeof t==="object"){this.x=t.x;this.y=t.y;this.z=t.z||0}else if(typeof t==="string"&&typeof i==="undefined"){var e=t.split(",");this.x=parseFloat(e[0]);this.y=parseFloat(e[1]);this.z=parseFloat(e[2])||0}else{this.x=t;this.y=i;this.z=s||0}console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}ds.fromMGRS=function(t){return new ds(ts(t))};ds.prototype.toMGRS=function(t){return $i([this.x,this.y],t)};var ms=1;var ps=.25;var _s=.046875;var gs=.01953125;var Ms=.01068115234375;var zs=.75;var ws=.46875;var ys=.013020833333333334;var bs=.007120768229166667;var xs=.3645833333333333;var Es=.005696614583333333;var Ss=.3076171875;function Gs(t){var i=[];i[0]=ms-t*(ps+t*(_s+t*(gs+t*Ms)));i[1]=t*(zs-t*(_s+t*(gs+t*Ms)));var s=t*t;i[2]=s*(ws-t*(ys+t*bs));s*=t;i[3]=s*(xs-t*Es);i[4]=s*t*Ss;return i}function Ps(t,i,s,e){s*=i;i*=i;return e[0]*t-s*(e[1]+i*(e[2]+i*(e[3]+i*e[4])))}var ks=20;function Ns(t,i,s){var e=1/(1-i);var r=t;for(var n=ks;n;--n){var h=Math.sin(r);var a=1-i*h*h;a=(Ps(r,h,Math.cos(r),s)-t)*(a*Math.sqrt(a))*e;r-=a;if(Math.abs(a)<I){return r}}return r}function Is(){this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0;this.lat0=this.lat0!==undefined?this.lat0:0;if(this.es){this.en=Gs(this.es);this.ml0=Ps(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en)}}function Cs(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r;var n,h;var a=Math.sin(s);var o=Math.cos(s);if(!this.es){var f=o*Math.sin(e);if(Math.abs(Math.abs(f)-1)<I){return 93}else{n=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0;h=o*Math.cos(e)/Math.sqrt(1-Math.pow(f,2));f=Math.abs(h);if(f>=1){if(f-1>I){return 93}else{h=0}}else{h=Math.acos(h)}if(s<0){h=-h}h=this.a*this.k0*(h-this.lat0)+this.y0}}else{var u=o*e;var l=Math.pow(u,2);var v=this.ep2*Math.pow(o,2);var c=Math.pow(v,2);var d=Math.abs(o)>I?Math.tan(s):0;var m=Math.pow(d,2);var p=Math.pow(m,2);r=1-this.es*Math.pow(a,2);u=u/Math.sqrt(r);var _=Ps(s,a,o,this.en);n=this.a*(this.k0*u*(1+l/6*(1-m+v+l/20*(5-18*m+p+14*v-58*m*v+l/42*(61+179*p-p*m-479*m)))))+this.x0;h=this.a*(this.k0*(_-this.ml0+a*e*u/2*(1+l/12*(5-m+9*v+4*c+l/30*(61+p-58*m+270*v-330*m*v+l/56*(1385+543*p-p*m-3111*m))))))+this.y0}t.x=n;t.y=h;return t}function As(t){var i,s;var e,r;var n=(t.x-this.x0)*(1/this.a);var h=(t.y-this.y0)*(1/this.a);if(!this.es){var a=Math.exp(n/this.k0);var o=.5*(a-1/a);var f=this.lat0+h/this.k0;var u=Math.cos(f);i=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(o,2)));e=Math.asin(i);if(h<0){e=-e}if(o===0&&u===0){r=0}else{r=At(Math.atan2(o,u)+this.long0,this.over)}}else{i=this.ml0+h/this.k0;s=Ns(i,this.es,this.en);if(Math.abs(s)<G){var l=Math.sin(s);var v=Math.cos(s);var c=Math.abs(v)>I?Math.tan(s):0;var d=this.ep2*Math.pow(v,2);var m=Math.pow(d,2);var p=Math.pow(c,2);var _=Math.pow(p,2);i=1-this.es*Math.pow(l,2);var g=n*Math.sqrt(i)/this.k0;var M=Math.pow(g,2);i=i*c;e=s-i*M/(1-this.es)*.5*(1-M/12*(5+3*p-9*d*p+d-4*m-M/30*(61+90*p-252*d*p+45*_+46*d-M/56*(1385+3633*p+4095*_+1574*_*p))));r=At(this.long0+g*(1-M/6*(1+2*p+d-M/20*(5+28*p+24*_+8*d*p+6*d-M/42*(61+662*p+1320*_+720*_*p))))/v,this.over)}else{e=G*Ct(h);r=0}}t.x=r;t.y=e;return t}var Rs=["Fast_Transverse_Mercator","Fast Transverse Mercator"];var Ts={init:Is,forward:Cs,inverse:As,names:Rs};function Os(t){var i=Math.exp(t);i=(i-1/i)/2;return i}function Ls(t,i){t=Math.abs(t);i=Math.abs(i);var s=Math.max(t,i);var e=Math.min(t,i)/(s?s:1);return s*Math.sqrt(1+Math.pow(e,2))}function Fs(t){var i=1+t;var s=i-1;return s===0?t:t*Math.log(i)/s}function Ds(t){var i=Math.abs(t);i=Fs(i*(1+i/(Ls(1,i)+1)));return t<0?-i:i}function Ws(t,i){var s=2*Math.cos(2*i);var e=t.length-1;var r=t[e];var n=0;var h;while(--e>=0){h=-n+s*r+t[e];n=r;r=h}return i+h*Math.sin(2*i)}function js(t,i){var s=2*Math.cos(i);var e=t.length-1;var r=t[e];var n=0;var h;while(--e>=0){h=-n+s*r+t[e];n=r;r=h}return Math.sin(i)*h}function Vs(t){var i=Math.exp(t);i=(i+1/i)/2;return i}function Us(t,i,s){var e=Math.sin(i);var r=Math.cos(i);var n=Os(s);var h=Vs(s);var a=2*r*h;var o=-2*e*n;var f=t.length-1;var u=t[f];var l=0;var v=0;var c=0;var d;var m;while(--f>=0){d=v;m=l;v=u;l=c;u=-d+a*v-o*l+t[f];c=-m+o*v+a*l}a=e*h;o=r*n;return[a*u-o*c,a*c+o*u]}function Bs(){if(!this.approx&&(isNaN(this.es)||this.es<=0)){throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.')}if(this.approx){Ts.init.apply(this);this.forward=Ts.forward;this.inverse=Ts.inverse}this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0;this.lat0=this.lat0!==undefined?this.lat0:0;this.cgb=[];this.cbg=[];this.utg=[];this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es));var i=t/(2-t);var s=i;this.cgb[0]=i*(2+i*(-2/3+i*(-2+i*(116/45+i*(26/45+i*(-2854/675))))));this.cbg[0]=i*(-2+i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725))))));s=s*i;this.cgb[1]=s*(7/3+i*(-8/5+i*(-227/45+i*(2704/315+i*(2323/945)))));this.cbg[1]=s*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945)))));s=s*i;this.cgb[2]=s*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835))));this.cbg[2]=s*(-26/15+i*(34/21+i*(8/5+i*(-12686/2835))));s=s*i;this.cgb[3]=s*(4279/630+i*(-332/35+i*(-399572/14175)));this.cbg[3]=s*(1237/630+i*(-12/5+i*(-24832/14175)));s=s*i;this.cgb[4]=s*(4174/315+i*(-144838/6237));this.cbg[4]=s*(-734/315+i*(109598/31185));s=s*i;this.cgb[5]=s*(601676/22275);this.cbg[5]=s*(444337/155925);s=Math.pow(i,2);this.Qn=this.k0/(1+i)*(1+s*(1/4+s*(1/64+s/256)));this.utg[0]=i*(-.5+i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800))))));this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800))))));this.utg[1]=s*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720)))));this.gtu[1]=s*(13/48+i*(-3/5+i*(557/1440+i*(281/630+i*(-1983433/1935360)))));s=s*i;this.utg[2]=s*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720))));this.gtu[2]=s*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440))));s=s*i;this.utg[3]=s*(-4397/161280+i*(11/504+i*(830251/7257600)));this.gtu[3]=s*(49561/161280+i*(-179/168+i*(6601661/7257600)));s=s*i;this.utg[4]=s*(-4583/161280+i*(108847/3991680));this.gtu[4]=s*(34729/80640+i*(-3418889/1995840));s=s*i;this.utg[5]=s*(-20648693/638668800);this.gtu[5]=s*(212378941/319334400);var e=Ws(this.cbg,this.lat0);this.Zb=-this.Qn*(e+js(this.gtu,2*e))}function qs(t){var i=At(t.x-this.long0,this.over);var s=t.y;s=Ws(this.cbg,s);var e=Math.sin(s);var r=Math.cos(s);var n=Math.sin(i);var h=Math.cos(i);s=Math.atan2(e,h*r);i=Math.atan2(n*r,Ls(e,r*h));i=Ds(Math.tan(i));var a=Us(this.gtu,2*s,2*i);s=s+a[0];i=i+a[1];var o;var f;if(Math.abs(i)<=2.623395162778){o=this.a*(this.Qn*i)+this.x0;f=this.a*(this.Qn*s+this.Zb)+this.y0}else{o=Infinity;f=Infinity}t.x=o;t.y=f;return t}function Hs(t){var i=(t.x-this.x0)*(1/this.a);var s=(t.y-this.y0)*(1/this.a);s=(s-this.Zb)/this.Qn;i=i/this.Qn;var e;var r;if(Math.abs(i)<=2.623395162778){var n=Us(this.utg,2*s,2*i);s=s+n[0];i=i+n[1];i=Math.atan(Os(i));var h=Math.sin(s);var a=Math.cos(s);var o=Math.sin(i);var f=Math.cos(i);s=Math.atan2(h*f,Ls(o,f*a));i=Math.atan2(o,f*a);e=At(i+this.long0,this.over);r=Ws(this.cgb,s)}else{e=Infinity;r=Infinity}t.x=e;t.y=r;return t}var Xs=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];var Ys={init:Bs,forward:qs,inverse:Hs,names:Xs};function Js(t,i){if(t===undefined){t=Math.floor((At(i)+Math.PI)*30/Math.PI)+1;if(t<0){return 0}else if(t>60){return 60}}return t}var Ks="etmerc";function Zs(){var t=Js(this.zone,this.long0);if(t===undefined){throw new Error("unknown utm zone")}this.lat0=0;this.long0=(6*Math.abs(t)-183)*C;this.x0=5e5;this.y0=this.utmSouth?1e7:0;this.k0=.9996;Ys.init.apply(this);this.forward=Ys.forward;this.inverse=Ys.inverse}var $s=["Universal Transverse Mercator System","utm"];var Qs={init:Zs,names:$s,dependsOn:Ks};function te(t,i){return Math.pow((1-t)/(1+t),i)}var ie=20;function se(){var t=Math.sin(this.lat0);var i=Math.cos(this.lat0);i*=i;this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t);this.C=Math.sqrt(1+this.es*i*i/(1-this.es));this.phic0=Math.asin(t/this.C);this.ratexp=.5*this.C*this.e;this.K=Math.tan(.5*this.phic0+R)/(Math.pow(Math.tan(.5*this.lat0+R),this.C)*te(this.e*t,this.ratexp))}function ee(t){var i=t.x;var s=t.y;t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+R),this.C)*te(this.e*Math.sin(s),this.ratexp))-G;t.x=this.C*i;return t}function re(t){var i=1e-14;var s=t.x/this.C;var e=t.y;var r=Math.pow(Math.tan(.5*e+R)/this.K,1/this.C);for(var n=ie;n>0;--n){e=2*Math.atan(r*te(this.e*Math.sin(t.y),-.5*this.e))-G;if(Math.abs(e-t.y)<i){break}t.y=e}if(!n){return null}t.x=s;t.y=e;return t}var ne={init:se,forward:ee,inverse:re};function he(){ne.init.apply(this);if(!this.rc){return}this.sinc0=Math.sin(this.phic0);this.cosc0=Math.cos(this.phic0);this.R2=2*this.rc;if(!this.title){this.title="Oblique Stereographic Alternative"}}function ae(t){var i,s,e,r;t.x=At(t.x-this.long0,this.over);ne.forward.apply(this,[t]);i=Math.sin(t.y);s=Math.cos(t.y);e=Math.cos(t.x);r=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*s*e);t.x=r*s*Math.sin(t.x);t.y=r*(this.cosc0*i-this.sinc0*s*e);t.x=this.a*t.x+this.x0;t.y=this.a*t.y+this.y0;return t}function oe(t){var i,s,e,r,n;t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;t.x/=this.k0;t.y/=this.k0;if(n=Ls(t.x,t.y)){var h=2*Math.atan2(n,this.R2);i=Math.sin(h);s=Math.cos(h);r=Math.asin(s*this.sinc0+t.y*i*this.cosc0/n);e=Math.atan2(t.x*i,n*this.cosc0*s-t.y*this.sinc0*i)}else{r=this.phic0;e=0}t.x=e;t.y=r;ne.inverse.apply(this,[t]);t.x=At(t.x+this.long0,this.over);return t}var fe=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];var ue={init:he,forward:ae,inverse:oe,names:fe};function le(t,i,s){i*=s;return Math.tan(.5*(G+t))*Math.pow((1-i)/(1+i),.5*s)}function ve(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.coslat0=Math.cos(this.lat0);this.sinlat0=Math.sin(this.lat0);if(this.sphere){if(this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=I){this.k0=.5*(1+Ct(this.lat0)*Math.sin(this.lat_ts))}}else{if(Math.abs(this.coslat0)<=I){if(this.lat0>0){this.con=1}else{this.con=-1}}this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e));if(this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=I&&Math.abs(Math.cos(this.lat_ts))>I){this.k0=.5*this.cons*It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Rt(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))}this.ms1=It(this.e,this.sinlat0,this.coslat0);this.X0=2*Math.atan(le(this.lat0,this.sinlat0,this.e))-G;this.cosX0=Math.cos(this.X0);this.sinX0=Math.sin(this.X0)}}function ce(t){var i=t.x;var s=t.y;var e=Math.sin(s);var r=Math.cos(s);var n,h,a,o,f,u;var l=At(i-this.long0,this.over);if(Math.abs(Math.abs(i-this.long0)-Math.PI)<=I&&Math.abs(s+this.lat0)<=I){t.x=NaN;t.y=NaN;return t}if(this.sphere){n=2*this.k0/(1+this.sinlat0*e+this.coslat0*r*Math.cos(l));t.x=this.a*n*r*Math.sin(l)+this.x0;t.y=this.a*n*(this.coslat0*e-this.sinlat0*r*Math.cos(l))+this.y0;return t}else{h=2*Math.atan(le(s,e,this.e))-G;o=Math.cos(h);a=Math.sin(h);if(Math.abs(this.coslat0)<=I){f=Rt(this.e,s*this.con,this.con*e);u=2*this.a*this.k0*f/this.cons;t.x=this.x0+u*Math.sin(i-this.long0);t.y=this.y0-this.con*u*Math.cos(i-this.long0);return t}else if(Math.abs(this.sinlat0)<I){n=2*this.a*this.k0/(1+o*Math.cos(l));t.y=n*a}else{n=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*o*Math.cos(l)));t.y=n*(this.cosX0*a-this.sinX0*o*Math.cos(l))+this.y0}t.x=n*o*Math.sin(l)+this.x0}return t}function de(t){t.x-=this.x0;t.y-=this.y0;var i,s,e,r,n;var h=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var a=2*Math.atan(h/(2*this.a*this.k0));i=this.long0;s=this.lat0;if(h<=I){t.x=i;t.y=s;return t}s=Math.asin(Math.cos(a)*this.sinlat0+t.y*Math.sin(a)*this.coslat0/h);if(Math.abs(this.coslat0)<I){if(this.lat0>0){i=At(this.long0+Math.atan2(t.x,-1*t.y),this.over)}else{i=At(this.long0+Math.atan2(t.x,t.y),this.over)}}else{i=At(this.long0+Math.atan2(t.x*Math.sin(a),h*this.coslat0*Math.cos(a)-t.y*this.sinlat0*Math.sin(a)),this.over)}t.x=i;t.y=s;return t}else{if(Math.abs(this.coslat0)<=I){if(h<=I){s=this.lat0;i=this.long0;t.x=i;t.y=s;return t}t.x*=this.con;t.y*=this.con;e=h*this.cons/(2*this.a*this.k0);s=this.con*Tt(this.e,e);i=this.con*At(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else{r=2*Math.atan(h*this.cosX0/(2*this.a*this.k0*this.ms1));i=this.long0;if(h<=I){n=this.X0}else{n=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/h);i=At(this.long0+Math.atan2(t.x*Math.sin(r),h*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)),this.over)}s=-1*Tt(this.e,Math.tan(.5*(G+n)))}}t.x=i;t.y=s;return t}var me=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];var pe={init:ve,forward:ce,inverse:de,names:me,ssfn_:le};function _e(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t);var s=this.a;var e=this.rf;var r=1/e;var n=2*r-Math.pow(r,2);var h=this.e=Math.sqrt(n);this.R=this.k0*s*Math.sqrt(1-n)/(1-n*Math.pow(i,2));this.alpha=Math.sqrt(1+n/(1-n)*Math.pow(Math.cos(t),4));this.b0=Math.asin(i/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2));var o=Math.log(Math.tan(Math.PI/4+t/2));var f=Math.log((1+h*i)/(1-h*i));this.K=a-this.alpha*o+this.alpha*h/2*f}function ge(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2));var s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y)));var e=-this.alpha*(i+s)+this.K;var r=2*(Math.atan(Math.exp(e))-Math.PI/4);var n=this.alpha*(t.x-this.lambda0);var h=Math.atan(Math.sin(n)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(n)));var a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(n));t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0;t.x=this.R*h+this.x0;return t}function Me(t){var i=t.x-this.x0;var s=t.y-this.y0;var e=i/this.R;var r=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4);var n=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(e));var h=Math.atan(Math.sin(e)/(Math.cos(this.b0)*Math.cos(e)-Math.sin(this.b0)*Math.tan(r)));var a=this.lambda0+h/this.alpha;var o=0;var f=n;var u=-1e3;var l=0;while(Math.abs(f-u)>1e-7){if(++l>20){return}o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(f))/2));u=f;f=2*Math.atan(Math.exp(o))-Math.PI/2}t.x=a;t.y=f;return t}var ze=["somerc"];var we={init:_e,forward:ge,inverse:Me,names:ze};var ye=1e-7;function be(t){var i=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"];var s=typeof t.projName==="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||i.indexOf(s)!==-1||i.indexOf(Jt(s))!==-1}function xe(){var t,i,s,e,r,n,h,a,o,f,u=0,l,v=0,c=0,d=0,m=0,p=0,_=0;this.no_off=be(this);this.no_rot="no_rot"in this;var g=false;if("alpha"in this){g=true}var M=false;if("rectified_grid_angle"in this){M=true}if(g){_=this.alpha}if(M){u=this.rectified_grid_angle}if(g||M){v=this.longc}else{c=this.long1;m=this.lat1;d=this.long2;p=this.lat2;if(Math.abs(m-p)<=ye||(t=Math.abs(m))<=ye||Math.abs(t-G)<=ye||Math.abs(Math.abs(this.lat0)-G)<=ye||Math.abs(Math.abs(p)-G)<=ye){throw new Error}}var z=1-this.es;i=Math.sqrt(z);if(Math.abs(this.lat0)>I){a=Math.sin(this.lat0);s=Math.cos(this.lat0);t=1-this.es*a*a;this.B=s*s;this.B=Math.sqrt(1+this.es*this.B*this.B/z);this.A=this.B*this.k0*i/t;e=this.B*i/(s*Math.sqrt(t));r=e*e-1;if(r<=0){r=0}else{r=Math.sqrt(r);if(this.lat0<0){r=-r}}this.E=r+=e;this.E*=Math.pow(Rt(this.e,this.lat0,a),this.B)}else{this.B=1/i;this.A=this.k0;this.E=e=r=1}if(g||M){if(g){l=Math.asin(Math.sin(_)/e);if(!M){u=_}}else{l=u;_=Math.asin(e*Math.sin(l))}this.lam0=v-Math.asin(.5*(r-1/r)*Math.tan(l))/this.B}else{n=Math.pow(Rt(this.e,m,Math.sin(m)),this.B);h=Math.pow(Rt(this.e,p,Math.sin(p)),this.B);r=this.E/n;o=(h-n)/(h+n);f=this.E*this.E;f=(f-h*n)/(f+h*n);t=c-d;if(t<-Math.PI){d-=T}else if(t>Math.PI){d+=T}this.lam0=At(.5*(c+d)-Math.atan(f*Math.tan(.5*this.B*(c-d))/o)/this.B,this.over);l=Math.atan(2*Math.sin(this.B*At(c-this.lam0,this.over))/(r-1/r));u=_=Math.asin(e*Math.sin(l))}this.singam=Math.sin(l);this.cosgam=Math.cos(l);this.sinrot=Math.sin(u);this.cosrot=Math.cos(u);this.rB=1/this.B;this.ArB=this.A*this.rB;this.BrA=1/this.ArB;if(this.no_off){this.u_0=0}else{this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(e*e-1)/Math.cos(_)));if(this.lat0<0){this.u_0=-this.u_0}}r=.5*l;this.v_pole_n=this.ArB*Math.log(Math.tan(R-r));this.v_pole_s=this.ArB*Math.log(Math.tan(R+r))}function Ee(t){var i={};var s,e,r,n,h,a,o,f;t.x=t.x-this.lam0;if(Math.abs(Math.abs(t.y)-G)>I){h=this.E/Math.pow(Rt(this.e,t.y,Math.sin(t.y)),this.B);a=1/h;s=.5*(h-a);e=.5*(h+a);n=Math.sin(this.B*t.x);r=(s*this.singam-n*this.cosgam)/e;if(Math.abs(Math.abs(r)-1)<I){throw new Error}f=.5*this.ArB*Math.log((1-r)/(1+r));a=Math.cos(this.B*t.x);if(Math.abs(a)<ye){o=this.A*t.x}else{o=this.ArB*Math.atan2(s*this.cosgam+n*this.singam,a)}}else{f=t.y>0?this.v_pole_n:this.v_pole_s;o=this.ArB*t.y}if(this.no_rot){i.x=o;i.y=f}else{o-=this.u_0;i.x=f*this.cosrot+o*this.sinrot;i.y=o*this.cosrot-f*this.sinrot}i.x=this.a*i.x+this.x0;i.y=this.a*i.y+this.y0;return i}function Se(t){var i,s,e,r,n,h,a;var o={};t.x=(t.x-this.x0)*(1/this.a);t.y=(t.y-this.y0)*(1/this.a);if(this.no_rot){s=t.y;i=t.x}else{s=t.x*this.cosrot-t.y*this.sinrot;i=t.y*this.cosrot+t.x*this.sinrot+this.u_0}e=Math.exp(-this.BrA*s);r=.5*(e-1/e);n=.5*(e+1/e);h=Math.sin(this.BrA*i);a=(h*this.cosgam+r*this.singam)/n;if(Math.abs(Math.abs(a)-1)<I){o.x=0;o.y=a<0?-G:G}else{o.y=this.E/Math.sqrt((1+a)/(1-a));o.y=Tt(this.e,Math.pow(o.y,1/this.B));if(o.y===Infinity){throw new Error}o.x=-this.rB*Math.atan2(r*this.cosgam-h*this.singam,Math.cos(this.BrA*i))}o.x+=this.lam0;return o}var Ge=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];var Pe={init:xe,forward:Ee,inverse:Se,names:Ge};function ke(){if(!this.lat2){this.lat2=this.lat1}if(!this.k0){this.k0=1}this.x0=this.x0||0;this.y0=this.y0||0;if(Math.abs(this.lat1+this.lat2)<I){return}var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1);var s=Math.cos(this.lat1);var e=It(this.e,i,s);var r=Rt(this.e,this.lat1,i);var n=Math.sin(this.lat2);var h=Math.cos(this.lat2);var a=It(this.e,n,h);var o=Rt(this.e,this.lat2,n);var f=Math.abs(Math.abs(this.lat0)-G)<I?0:Rt(this.e,this.lat0,Math.sin(this.lat0));if(Math.abs(this.lat1-this.lat2)>I){this.ns=Math.log(e/a)/Math.log(r/o)}else{this.ns=i}if(isNaN(this.ns)){this.ns=i}this.f0=e/(this.ns*Math.pow(r,this.ns));this.rh=this.a*this.f0*Math.pow(f,this.ns);if(!this.title){this.title="Lambert Conformal Conic"}}function Ne(t){var i=t.x;var s=t.y;if(Math.abs(2*Math.abs(s)-Math.PI)<=I){s=Ct(s)*(G-2*I)}var e=Math.abs(Math.abs(s)-G);var r,n;if(e>I){r=Rt(this.e,s,Math.sin(s));n=this.a*this.f0*Math.pow(r,this.ns)}else{e=s*this.ns;if(e<=0){return null}n=0}var h=this.ns*At(i-this.long0,this.over);t.x=this.k0*(n*Math.sin(h))+this.x0;t.y=this.k0*(this.rh-n*Math.cos(h))+this.y0;return t}function Ie(t){var i,s,e;var r,n;var h=(t.x-this.x0)/this.k0;var a=this.rh-(t.y-this.y0)/this.k0;if(this.ns>0){i=Math.sqrt(h*h+a*a);s=1}else{i=-Math.sqrt(h*h+a*a);s=-1}var o=0;if(i!==0){o=Math.atan2(s*h,s*a)}if(i!==0||this.ns>0){s=1/this.ns;e=Math.pow(i/(this.a*this.f0),s);r=Tt(this.e,e);if(r===-9999){return null}}else{r=-G}n=At(o/this.ns+this.long0,this.over);t.x=n;t.y=r;return t}var Ce=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];var Ae={init:ke,forward:Ne,inverse:Ie,names:Ce};function Re(){this.a=6377397.155;this.es=.006674372230614;this.e=Math.sqrt(this.es);if(!this.lat0){this.lat0=.863937979737193}if(!this.long0){this.long0=.7417649320975901-.308341501185665}if(!this.k0){this.k0=.9999}this.s45=.785398163397448;this.s90=2*this.s45;this.fi0=this.lat0;this.e2=this.es;this.e=Math.sqrt(this.e2);this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2));this.uq=1.04216856380474;this.u0=Math.asin(Math.sin(this.fi0)/this.alfa);this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2);this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g;this.k1=this.k0;this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2));this.s0=1.37008346281555;this.n=Math.sin(this.s0);this.ro0=this.k1*this.n0/Math.tan(this.s0);this.ad=this.s90-this.uq}function Te(t){var i,s,e,r,n,h,a;var o=t.x;var f=t.y;var u=At(o-this.long0,this.over);i=Math.pow((1+this.e*Math.sin(f))/(1-this.e*Math.sin(f)),this.alfa*this.e/2);s=2*(Math.atan(this.k*Math.pow(Math.tan(f/2+this.s45),this.alfa)/i)-this.s45);e=-u*this.alfa;r=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(e));n=Math.asin(Math.cos(s)*Math.sin(e)/Math.cos(r));h=this.n*n;a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n);t.y=a*Math.cos(h)/1;t.x=a*Math.sin(h)/1;if(!this.czech){t.y*=-1;t.x*=-1}return t}function Oe(t){var i,s,e,r,n,h,a;var o;var f=t.x;t.x=t.y;t.y=f;if(!this.czech){t.y*=-1;t.x*=-1}h=Math.sqrt(t.x*t.x+t.y*t.y);n=Math.atan2(t.y,t.x);r=n/Math.sin(this.s0);e=2*(Math.atan(Math.pow(this.ro0/h,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45);i=Math.asin(Math.cos(this.ad)*Math.sin(e)-Math.sin(this.ad)*Math.cos(e)*Math.cos(r));s=Math.asin(Math.cos(e)*Math.sin(r)/Math.cos(i));t.x=this.long0-s/this.alfa;a=i;o=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45);if(Math.abs(a-t.y)<1e-10){o=1}a=t.y;u+=1}while(o===0&&u<15);if(u>=15){return null}return t}var Le=["Krovak","krovak"];var Fe={init:Re,forward:Te,inverse:Oe,names:Le};function De(t,i,s,e,r){return t*r-i*Math.sin(2*r)+s*Math.sin(4*r)-e*Math.sin(6*r)}function We(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function je(t){return.375*t*(1+.25*t*(1+.46875*t))}function Ve(t){return.05859375*t*t*(1+.75*t)}function Ue(t){return t*t*t*(35/3072)}function Be(t,i,s){var e=i*s;return t/Math.sqrt(1-e*e)}function qe(t){return Math.abs(t)<G?t:t-Ct(t)*Math.PI}function He(t,i,s,e,r){var n;var h;n=t/i;for(var a=0;a<15;a++){h=(t-(i*n-s*Math.sin(2*n)+e*Math.sin(4*n)-r*Math.sin(6*n)))/(i-2*s*Math.cos(2*n)+4*e*Math.cos(4*n)-6*r*Math.cos(6*n));n+=h;if(Math.abs(h)<=1e-10){return n}}return NaN}function Xe(){if(!this.sphere){this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.ml0=this.a*De(this.e0,this.e1,this.e2,this.e3,this.lat0)}}function Ye(t){var i,s;var e=t.x;var r=t.y;e=At(e-this.long0,this.over);if(this.sphere){i=this.a*Math.asin(Math.cos(r)*Math.sin(e));s=this.a*(Math.atan2(Math.tan(r),Math.cos(e))-this.lat0)}else{var n=Math.sin(r);var h=Math.cos(r);var a=Be(this.a,this.e,n);var o=Math.tan(r)*Math.tan(r);var f=e*Math.cos(r);var u=f*f;var l=this.es*h*h/(1-this.es);var v=this.a*De(this.e0,this.e1,this.e2,this.e3,r);i=a*f*(1-u*o*(1/6-(8-o+8*l)*u/120));s=v-this.ml0+a*n/h*u*(.5+(5-o+6*l)*u/24)}t.x=i+this.x0;t.y=s+this.y0;return t}function Je(t){t.x-=this.x0;t.y-=this.y0;var i=t.x/this.a;var s=t.y/this.a;var e,r;if(this.sphere){var n=s+this.lat0;e=Math.asin(Math.sin(n)*Math.cos(i));r=Math.atan2(Math.tan(i),Math.cos(n))}else{var h=this.ml0/this.a+s;var a=He(h,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-G)<=I){t.x=this.long0;t.y=G;if(s<0){t.y*=-1}return t}var o=Be(this.a,this.e,Math.sin(a));var f=o*o*o/this.a/this.a*(1-this.es);var u=Math.pow(Math.tan(a),2);var l=i*this.a/o;var v=l*l;e=a-o*Math.tan(a)/f*l*l*(.5-(1+3*u)*l*l/24);r=l*(1-v*(u/3+(1+3*u)*u*v/15))/Math.cos(a)}t.x=At(r+this.long0,this.over);t.y=qe(e);return t}var Ke=["Cassini","Cassini_Soldner","cass"];var Ze={init:Xe,forward:Ye,inverse:Je,names:Ke};function $e(t,i){var s;if(t>1e-7){s=t*i;return(1-t*t)*(i/(1-s*s)-.5/t*Math.log((1-s)/(1+s)))}else{return 2*i}}var Qe=1;var tr=2;var ir=3;var sr=4;function er(){var t=Math.abs(this.lat0);if(Math.abs(t-G)<I){this.mode=this.lat0<0?Qe:tr}else if(Math.abs(t)<I){this.mode=ir}else{this.mode=sr}if(this.es>0){var i;this.qp=$e(this.e,1);this.mmf=.5/(1-this.es);this.apa=vr(this.es);switch(this.mode){case tr:this.dd=1;break;case Qe:this.dd=1;break;case ir:this.rq=Math.sqrt(.5*this.qp);this.dd=1/this.rq;this.xmf=1;this.ymf=.5*this.qp;break;case sr:this.rq=Math.sqrt(.5*this.qp);i=Math.sin(this.lat0);this.sinb1=$e(this.e,i)/this.qp;this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1);this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*i*i)*this.rq*this.cosb1);this.ymf=(this.xmf=this.rq)/this.dd;this.xmf*=this.dd;break}}else{if(this.mode===sr){this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0)}}}function rr(t){var i,s,e,r,n,h,a,o,f,u;var l=t.x;var v=t.y;l=At(l-this.long0,this.over);if(this.sphere){n=Math.sin(v);u=Math.cos(v);e=Math.cos(l);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){s=this.mode===this.EQUIT?1+u*e:1+this.sinph0*n+this.cosph0*u*e;if(s<=I){return null}s=Math.sqrt(2/s);i=s*u*Math.sin(l);s*=this.mode===this.EQUIT?n:this.cosph0*n-this.sinph0*u*e}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE){e=-e}if(Math.abs(v+this.lat0)<I){return null}s=R-v*.5;s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s));i=s*Math.sin(l);s*=e}}else{a=0;o=0;f=0;e=Math.cos(l);r=Math.sin(l);n=Math.sin(v);h=$e(this.e,n);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){a=h/this.qp;o=Math.sqrt(1-a*a)}switch(this.mode){case this.OBLIQ:f=1+this.sinb1*a+this.cosb1*o*e;break;case this.EQUIT:f=1+o*e;break;case this.N_POLE:f=G+v;h=this.qp-h;break;case this.S_POLE:f=v-G;h=this.qp+h;break}if(Math.abs(f)<I){return null}switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f);if(this.mode===this.OBLIQ){s=this.ymf*f*(this.cosb1*a-this.sinb1*o*e)}else{s=(f=Math.sqrt(2/(1+o*e)))*a*this.ymf}i=this.xmf*f*o*r;break;case this.N_POLE:case this.S_POLE:if(h>=0){i=(f=Math.sqrt(h))*r;s=e*(this.mode===this.S_POLE?f:-f)}else{i=s=0}break}}t.x=this.a*i+this.x0;t.y=this.a*s+this.y0;return t}function nr(t){t.x-=this.x0;t.y-=this.y0;var i=t.x/this.a;var s=t.y/this.a;var e,r,n,h,a,o,f;if(this.sphere){var u=0,l,v=0;l=Math.sqrt(i*i+s*s);r=l*.5;if(r>1){return null}r=2*Math.asin(r);if(this.mode===this.OBLIQ||this.mode===this.EQUIT){v=Math.sin(r);u=Math.cos(r)}switch(this.mode){case this.EQUIT:r=Math.abs(l)<=I?0:Math.asin(s*v/l);i*=v;s=u*l;break;case this.OBLIQ:r=Math.abs(l)<=I?this.lat0:Math.asin(u*this.sinph0+s*v*this.cosph0/l);i*=v*this.cosph0;s=(u-Math.sin(r)*this.sinph0)*l;break;case this.N_POLE:s=-s;r=G-r;break;case this.S_POLE:r-=G;break}e=s===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(i,s)}else{f=0;if(this.mode===this.OBLIQ||this.mode===this.EQUIT){i/=this.dd;s*=this.dd;o=Math.sqrt(i*i+s*s);if(o<I){t.x=this.long0;t.y=this.lat0;return t}h=2*Math.asin(.5*o/this.rq);n=Math.cos(h);i*=h=Math.sin(h);if(this.mode===this.OBLIQ){f=n*this.sinb1+s*h*this.cosb1/o;a=this.qp*f;s=o*this.cosb1*n-s*this.sinb1*h}else{f=s*h/o;a=this.qp*f;s=o*n}}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE){s=-s}a=i*i+s*s;if(!a){t.x=this.long0;t.y=this.lat0;return t}f=1-a/this.qp;if(this.mode===this.S_POLE){f=-f}}e=Math.atan2(i,s);r=cr(Math.asin(f),this.apa)}t.x=At(this.long0+e,this.over);t.y=r;return t}var hr=.3333333333333333;var ar=.17222222222222222;var or=.10257936507936508;var fr=.06388888888888888;var ur=.0664021164021164;var lr=.016415012942191543;function vr(t){var i;var s=[];s[0]=t*hr;i=t*t;s[0]+=i*ar;s[1]=i*fr;i*=t;s[0]+=i*or;s[1]+=i*ur;s[2]=i*lr;return s}function cr(t,i){var s=t+t;return t+i[0]*Math.sin(s)+i[1]*Math.sin(s+s)+i[2]*Math.sin(s+s+s)}var dr=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];var mr={init:er,forward:rr,inverse:nr,names:dr,S_POLE:Qe,N_POLE:tr,EQUIT:ir,OBLIQ:sr};function pr(t){if(Math.abs(t)>1){t=t>1?1:-1}return Math.asin(t)}function _r(){if(Math.abs(this.lat1+this.lat2)<I){return}this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e3=Math.sqrt(this.es);this.sin_po=Math.sin(this.lat1);this.cos_po=Math.cos(this.lat1);this.t1=this.sin_po;this.con=this.sin_po;this.ms1=It(this.e3,this.sin_po,this.cos_po);this.qs1=$e(this.e3,this.sin_po);this.sin_po=Math.sin(this.lat2);this.cos_po=Math.cos(this.lat2);this.t2=this.sin_po;this.ms2=It(this.e3,this.sin_po,this.cos_po);this.qs2=$e(this.e3,this.sin_po);this.sin_po=Math.sin(this.lat0);this.cos_po=Math.cos(this.lat0);this.t3=this.sin_po;this.qs0=$e(this.e3,this.sin_po);if(Math.abs(this.lat1-this.lat2)>I){this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1)}else{this.ns0=this.con}this.c=this.ms1*this.ms1+this.ns0*this.qs1;this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0}function gr(t){var i=t.x;var s=t.y;this.sin_phi=Math.sin(s);this.cos_phi=Math.cos(s);var e=$e(this.e3,this.sin_phi);var r=this.a*Math.sqrt(this.c-this.ns0*e)/this.ns0;var n=this.ns0*At(i-this.long0,this.over);var h=r*Math.sin(n)+this.x0;var a=this.rh-r*Math.cos(n)+this.y0;t.x=h;t.y=a;return t}function Mr(t){var i,s,e,r,n,h;t.x-=this.x0;t.y=this.rh-t.y+this.y0;if(this.ns0>=0){i=Math.sqrt(t.x*t.x+t.y*t.y);e=1}else{i=-Math.sqrt(t.x*t.x+t.y*t.y);e=-1}r=0;if(i!==0){r=Math.atan2(e*t.x,e*t.y)}e=i*this.ns0/this.a;if(this.sphere){h=Math.asin((this.c-e*e)/(2*this.ns0))}else{s=(this.c-e*e)/this.ns0;h=this.phi1z(this.e3,s)}n=At(r/this.ns0+this.long0,this.over);t.x=n;t.y=h;return t}function zr(t,i){var s,e,r,n,h;var a=pr(.5*i);if(t<I){return a}var o=t*t;for(var f=1;f<=25;f++){s=Math.sin(a);e=Math.cos(a);r=t*s;n=1-r*r;h=.5*n*n/e*(i/(1-o)-s/n+.5/t*Math.log((1-r)/(1+r)));a=a+h;if(Math.abs(h)<=1e-7){return a}}return null}var wr=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];var yr={init:_r,forward:gr,inverse:Mr,names:wr,phi1z:zr};function br(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);this.infinity_dist=1e3*this.a;this.rc=1}function xr(t){var i,s;var e;var r;var n;var h;var a,o;var f=t.x;var u=t.y;e=At(f-this.long0,this.over);i=Math.sin(u);s=Math.cos(u);r=Math.cos(e);h=this.sin_p14*i+this.cos_p14*s*r;n=1;if(h>0||Math.abs(h)<=I){a=this.x0+this.a*n*s*Math.sin(e)/h;o=this.y0+this.a*n*(this.cos_p14*i-this.sin_p14*s*r)/h}else{a=this.x0+this.infinity_dist*s*Math.sin(e);o=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*s*r)}t.x=a;t.y=o;return t}function Er(t){var i;var s,e;var r;var n,h;t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;t.x/=this.k0;t.y/=this.k0;if(i=Math.sqrt(t.x*t.x+t.y*t.y)){r=Math.atan2(i,this.rc);s=Math.sin(r);e=Math.cos(r);h=pr(e*this.sin_p14+t.y*s*this.cos_p14/i);n=Math.atan2(t.x*s,i*this.cos_p14*e-t.y*this.sin_p14*s);n=At(this.long0+n,this.over)}else{h=this.phic0;n=0}t.x=n;t.y=h;return t}var Sr=["gnom"];var Gr={init:br,forward:xr,inverse:Er,names:Sr};function Pr(t,i){var s=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-s)<1e-6){if(i<0){return-1*G}else{return G}}var e=Math.asin(.5*i);var r;var n;var h;var a;for(var o=0;o<30;o++){n=Math.sin(e);h=Math.cos(e);a=t*n;r=Math.pow(1-a*a,2)/(2*h)*(i/(1-t*t)-n/(1-a*a)+.5/t*Math.log((1-a)/(1+a)));e+=r;if(Math.abs(r)<=1e-10){return e}}return NaN}function kr(){if(!this.sphere){this.k0=It(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))}}function Nr(t){var i=t.x;var s=t.y;var e,r;var n=At(i-this.long0,this.over);if(this.sphere){e=this.x0+this.a*n*Math.cos(this.lat_ts);r=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts)}else{var h=$e(this.e,Math.sin(s));e=this.x0+this.a*this.k0*n;r=this.y0+this.a*h*.5/this.k0}t.x=e;t.y=r;return t}function Ir(t){t.x-=this.x0;t.y-=this.y0;var i,s;if(this.sphere){i=At(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over);s=Math.asin(t.y/this.a*Math.cos(this.lat_ts))}else{s=Pr(this.e,2*t.y*this.k0/this.a);i=At(this.long0+t.x/(this.a*this.k0),this.over)}t.x=i;t.y=s;return t}var Cr=["cea"];var Ar={init:kr,forward:Nr,inverse:Ir,names:Cr};function Rr(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.lat_ts=this.lat_ts||0;this.title=this.title||"Equidistant Cylindrical (Plate Carre)";this.rc=Math.cos(this.lat_ts)}function Tr(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=qe(s-this.lat0);t.x=this.x0+this.a*e*this.rc;t.y=this.y0+this.a*r;return t}function Or(t){var i=t.x;var s=t.y;t.x=At(this.long0+(i-this.x0)/(this.a*this.rc),this.over);t.y=qe(this.lat0+(s-this.y0)/this.a);return t}var Lr=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];var Fr={init:Rr,forward:Tr,inverse:Or,names:Lr};var Dr=20;function Wr(){this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.ml0=this.a*De(this.e0,this.e1,this.e2,this.e3,this.lat0)}function jr(t){var i=t.x;var s=t.y;var e,r,n;var h=At(i-this.long0,this.over);n=h*Math.sin(s);if(this.sphere){if(Math.abs(s)<=I){e=this.a*h;r=-1*this.a*this.lat0}else{e=this.a*Math.sin(n)/Math.tan(s);r=this.a*(qe(s-this.lat0)+(1-Math.cos(n))/Math.tan(s))}}else{if(Math.abs(s)<=I){e=this.a*h;r=-1*this.ml0}else{var a=Be(this.a,this.e,Math.sin(s))/Math.tan(s);e=a*Math.sin(n);r=this.a*De(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+a*(1-Math.cos(n))}}t.x=e+this.x0;t.y=r+this.y0;return t}function Vr(t){var i,s,e,r,n;var h,a;var o,f;e=t.x-this.x0;r=t.y-this.y0;if(this.sphere){if(Math.abs(r+this.a*this.lat0)<=I){i=At(e/this.a+this.long0,this.over);s=0}else{h=this.lat0+r/this.a;a=e*e/this.a/this.a+h*h;o=h;var u;for(n=Dr;n;--n){u=Math.tan(o);f=-1*(h*(o*u+1)-o-.5*(o*o+a)*u)/((o-h)/u-1);o+=f;if(Math.abs(f)<=I){s=o;break}}i=At(this.long0+Math.asin(e*Math.tan(o)/this.a)/Math.sin(s),this.over)}}else{if(Math.abs(r+this.ml0)<=I){s=0;i=At(this.long0+e/this.a,this.over)}else{h=(this.ml0+r)/this.a;a=e*e/this.a/this.a+h*h;o=h;var l,v,c,d;var m;for(n=Dr;n;--n){m=this.e*Math.sin(o);l=Math.sqrt(1-m*m)*Math.tan(o);v=this.a*De(this.e0,this.e1,this.e2,this.e3,o);c=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o);d=v/this.a;f=(h*(l*d+1)-d-.5*l*(d*d+a))/(this.es*Math.sin(2*o)*(d*d+a-2*h*d)/(4*l)+(h-d)*(l*c-2/Math.sin(2*o))-c);o-=f;if(Math.abs(f)<=I){s=o;break}}l=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s);i=At(this.long0+Math.asin(e*l/this.a)/Math.sin(s),this.over)}}t.x=i;t.y=s;return t}var Ur=["Polyconic","American_Polyconic","poly"];var Br={init:Wr,forward:jr,inverse:Vr,names:Ur};function qr(){this.A=[];this.A[1]=.6399175073;this.A[2]=-.1358797613;this.A[3]=.063294409;this.A[4]=-.02526853;this.A[5]=.0117879;this.A[6]=-.0055161;this.A[7]=.0026906;this.A[8]=-.001333;this.A[9]=67e-5;this.A[10]=-34e-5;this.B_re=[];this.B_im=[];this.B_re[1]=.7557853228;this.B_im[1]=0;this.B_re[2]=.249204646;this.B_im[2]=.003371507;this.B_re[3]=-.001541739;this.B_im[3]=.04105856;this.B_re[4]=-.10162907;this.B_im[4]=.01727609;this.B_re[5]=-.26623489;this.B_im[5]=-.36249218;this.B_re[6]=-.6870983;this.B_im[6]=-1.1651967;this.C_re=[];this.C_im=[];this.C_re[1]=1.3231270439;this.C_im[1]=0;this.C_re[2]=-.577245789;this.C_im[2]=-.007809598;this.C_re[3]=.508307513;this.C_im[3]=-.112208952;this.C_re[4]=-.15094762;this.C_im[4]=.18200602;this.C_re[5]=1.01418179;this.C_im[5]=1.64497696;this.C_re[6]=1.9660549;this.C_im[6]=2.5127645;this.D=[];this.D[1]=1.5627014243;this.D[2]=.5185406398;this.D[3]=-.03333098;this.D[4]=-.1052906;this.D[5]=-.0368594;this.D[6]=.007317;this.D[7]=.0122;this.D[8]=.00394;this.D[9]=-.0013}function Hr(t){var i;var s=t.x;var e=t.y;var r=e-this.lat0;var n=s-this.long0;var h=r/S*1e-5;var a=n;var o=1;var f=0;for(i=1;i<=10;i++){o=o*h;f=f+this.A[i]*o}var u=f;var l=a;var v=1;var c=0;var d;var m;var p=0;var _=0;for(i=1;i<=6;i++){d=v*u-c*l;m=c*u+v*l;v=d;c=m;p=p+this.B_re[i]*v-this.B_im[i]*c;_=_+this.B_im[i]*v+this.B_re[i]*c}t.x=_*this.a+this.x0;t.y=p*this.a+this.y0;return t}function Xr(t){var i;var s=t.x;var e=t.y;var r=s-this.x0;var n=e-this.y0;var h=n/this.a;var a=r/this.a;var o=1;var f=0;var u;var l;var v=0;var c=0;for(i=1;i<=6;i++){u=o*h-f*a;l=f*h+o*a;o=u;f=l;v=v+this.C_re[i]*o-this.C_im[i]*f;c=c+this.C_im[i]*o+this.C_re[i]*f}for(var d=0;d<this.iterations;d++){var m=v;var p=c;var _;var g;var M=h;var z=a;for(i=2;i<=6;i++){_=m*v-p*c;g=p*v+m*c;m=_;p=g;M=M+(i-1)*(this.B_re[i]*m-this.B_im[i]*p);z=z+(i-1)*(this.B_im[i]*m+this.B_re[i]*p)}m=1;p=0;var w=this.B_re[1];var y=this.B_im[1];for(i=2;i<=6;i++){_=m*v-p*c;g=p*v+m*c;m=_;p=g;w=w+i*(this.B_re[i]*m-this.B_im[i]*p);y=y+i*(this.B_im[i]*m+this.B_re[i]*p)}var b=w*w+y*y;v=(M*w+z*y)/b;c=(z*w-M*y)/b}var x=v;var E=c;var G=1;var P=0;for(i=1;i<=9;i++){G=G*x;P=P+this.D[i]*G}var k=this.lat0+P*S*1e5;var N=this.long0+E;t.x=N;t.y=k;return t}var Yr=["New_Zealand_Map_Grid","nzmg"];var Jr={init:qr,forward:Hr,inverse:Xr,names:Yr};function Kr(){}function Zr(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=this.x0+this.a*e;var n=this.y0+this.a*Math.log(Math.tan(Math.PI/4+s/2.5))*1.25;t.x=r;t.y=n;return t}function $r(t){t.x-=this.x0;t.y-=this.y0;var i=At(this.long0+t.x/this.a,this.over);var s=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);t.x=i;t.y=s;return t}var Qr=["Miller_Cylindrical","mill"];var tn={init:Kr,forward:Zr,inverse:$r,names:Qr};var sn=20;function en(){if(!this.sphere){this.en=Gs(this.es)}else{this.n=1;this.m=0;this.es=0;this.C_y=Math.sqrt((this.m+1)/this.n);this.C_x=this.C_y/(this.m+1)}}function rn(t){var i,s;var e=t.x;var r=t.y;e=At(e-this.long0,this.over);if(this.sphere){if(!this.m){r=this.n!==1?Math.asin(this.n*Math.sin(r)):r}else{var n=this.n*Math.sin(r);for(var h=sn;h;--h){var a=(this.m*r+Math.sin(r)-n)/(this.m+Math.cos(r));r-=a;if(Math.abs(a)<I){break}}}i=this.a*this.C_x*e*(this.m+Math.cos(r));s=this.a*this.C_y*r}else{var o=Math.sin(r);var f=Math.cos(r);s=this.a*Ps(r,o,f,this.en);i=this.a*e*f/Math.sqrt(1-this.es*o*o)}t.x=i;t.y=s;return t}function nn(t){var i,s,e,r;t.x-=this.x0;e=t.x/this.a;t.y-=this.y0;i=t.y/this.a;if(this.sphere){i/=this.C_y;e=e/(this.C_x*(this.m+Math.cos(i)));if(this.m){i=pr((this.m*i+Math.sin(i))/this.n)}else if(this.n!==1){i=pr(Math.sin(i)/this.n)}e=At(e+this.long0,this.over);i=qe(i)}else{i=Ns(t.y/this.a,this.es,this.en);r=Math.abs(i);if(r<G){r=Math.sin(i);s=this.long0+t.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(i));e=At(s,this.over)}else if(r-I<G){e=this.long0}}t.x=e;t.y=i;return t}var hn=["Sinusoidal","sinu"];var an={init:en,forward:rn,inverse:nn,names:hn};function on(){this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0;this.long0=this.long0!==undefined?this.long0:0}function fn(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r=s;var n=Math.PI*Math.sin(s);while(true){var h=-(r+Math.sin(r)-n)/(1+Math.cos(r));r+=h;if(Math.abs(h)<I){break}}r/=2;if(Math.PI/2-Math.abs(s)<I){e=0}var a=.900316316158*this.a*e*Math.cos(r)+this.x0;var o=1.4142135623731*this.a*Math.sin(r)+this.y0;t.x=a;t.y=o;return t}function un(t){var i;var s;t.x-=this.x0;t.y-=this.y0;s=t.y/(1.4142135623731*this.a);if(Math.abs(s)>.999999999999){s=.999999999999}i=Math.asin(s);var e=At(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);if(e<-Math.PI){e=-Math.PI}if(e>Math.PI){e=Math.PI}s=(2*i+Math.sin(2*i))/Math.PI;if(Math.abs(s)>1){s=1}var r=Math.asin(s);t.x=e;t.y=r;return t}var ln=["Mollweide","moll"];var vn={init:on,forward:fn,inverse:un,names:ln};function cn(){if(Math.abs(this.lat1+this.lat2)<I){return}this.lat2=this.lat2||this.lat1;this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=We(this.es);this.e1=je(this.es);this.e2=Ve(this.es);this.e3=Ue(this.es);this.sin_phi=Math.sin(this.lat1);this.cos_phi=Math.cos(this.lat1);this.ms1=It(this.e,this.sin_phi,this.cos_phi);this.ml1=De(this.e0,this.e1,this.e2,this.e3,this.lat1);if(Math.abs(this.lat1-this.lat2)<I){this.ns=this.sin_phi}else{this.sin_phi=Math.sin(this.lat2);this.cos_phi=Math.cos(this.lat2);this.ms2=It(this.e,this.sin_phi,this.cos_phi);this.ml2=De(this.e0,this.e1,this.e2,this.e3,this.lat2);this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)}this.g=this.ml1+this.ms1/this.ns;this.ml0=De(this.e0,this.e1,this.e2,this.e3,this.lat0);this.rh=this.a*(this.g-this.ml0)}function dn(t){var i=t.x;var s=t.y;var e;if(this.sphere){e=this.a*(this.g-s)}else{var r=De(this.e0,this.e1,this.e2,this.e3,s);e=this.a*(this.g-r)}var n=this.ns*At(i-this.long0,this.over);var h=this.x0+e*Math.sin(n);var a=this.y0+this.rh-e*Math.cos(n);t.x=h;t.y=a;return t}function mn(t){t.x-=this.x0;t.y=this.rh-t.y+this.y0;var i,s,e,r;if(this.ns>=0){s=Math.sqrt(t.x*t.x+t.y*t.y);i=1}else{s=-Math.sqrt(t.x*t.x+t.y*t.y);i=-1}var n=0;if(s!==0){n=Math.atan2(i*t.x,i*t.y)}if(this.sphere){r=At(this.long0+n/this.ns,this.over);e=qe(this.g-s/this.a);t.x=r;t.y=e;return t}else{var h=this.g-s/this.a;e=He(h,this.e0,this.e1,this.e2,this.e3);r=At(this.long0+n/this.ns,this.over);t.x=r;t.y=e;return t}}var pn=["Equidistant_Conic","eqdc"];var _n={init:cn,forward:dn,inverse:mn,names:pn};function gn(){this.R=this.a}function Mn(t){var i=t.x;var s=t.y;var e=At(i-this.long0,this.over);var r,n;if(Math.abs(s)<=I){r=this.x0+this.R*e;n=this.y0}var h=pr(2*Math.abs(s/Math.PI));if(Math.abs(e)<=I||Math.abs(Math.abs(s)-G)<=I){r=this.x0;if(s>=0){n=this.y0+Math.PI*this.R*Math.tan(.5*h)}else{n=this.y0+Math.PI*this.R*-Math.tan(.5*h)}}var a=.5*Math.abs(Math.PI/e-e/Math.PI);var o=a*a;var f=Math.sin(h);var u=Math.cos(h);var l=u/(f+u-1);var v=l*l;var c=l*(2/f-1);var d=c*c;var m=Math.PI*this.R*(a*(l-d)+Math.sqrt(o*(l-d)*(l-d)-(d+o)*(v-d)))/(d+o);if(e<0){m=-m}r=this.x0+m;var p=o+l;m=Math.PI*this.R*(c*p-a*Math.sqrt((d+o)*(o+1)-p*p))/(d+o);if(s>=0){n=this.y0+m}else{n=this.y0-m}t.x=r;t.y=n;return t}function zn(t){var i,s;var e,r,n,h,a,o;var f;var u;var l;var v;var c;t.x-=this.x0;t.y-=this.y0;l=Math.PI*this.R;e=t.x/l;r=t.y/l;n=e*e+r*r;h=-Math.abs(r)*(1+n);a=h-2*r*r+e*e;o=-2*h+1+2*r*r+n*n;c=r*r/o+(2*a*a*a/o/o/o-9*h*a/o/o)/27;f=(h-a*a/3/o)/o;u=2*Math.sqrt(-f/3);l=3*c/f/u;if(Math.abs(l)>1){if(l>=0){l=1}else{l=-1}}v=Math.acos(l)/3;if(t.y>=0){s=(-u*Math.cos(v+Math.PI/3)-a/3/o)*Math.PI}else{s=-(-u*Math.cos(v+Math.PI/3)-a/3/o)*Math.PI}if(Math.abs(e)<I){i=this.long0}else{i=At(this.long0+Math.PI*(n-1+Math.sqrt(1+2*(e*e-r*r)+n*n))/2/e,this.over)}t.x=i;t.y=s;return t}var wn=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];var yn={init:gn,forward:Mn,inverse:zn,names:wn};function bn(t,i,s,e,r,n){const h=e-i;const a=Math.atan((1-n)*Math.tan(t));const o=Math.atan((1-n)*Math.tan(s));const f=Math.sin(a),u=Math.cos(a);const l=Math.sin(o),v=Math.cos(o);let c=h,d,m=100;let p,_,g,M,z,w,y,b,x;let E,S,G,P,k;do{p=Math.sin(c);_=Math.cos(c);g=Math.sqrt(v*p*(v*p)+(u*l-f*v*_)*(u*l-f*v*_));if(g===0){return{azi1:0,s12:0}}M=f*l+u*v*_;z=Math.atan2(g,M);w=u*v*p/g;y=1-w*w;b=y!==0?M-2*f*l/y:0;x=n/16*y*(4+n*(4-3*y));d=c;c=h+(1-x)*n*w*(z+x*g*(b+x*M*(-1+2*b*b)))}while(Math.abs(c-d)>1e-12&&--m>0);if(m===0){return{azi1:NaN,s12:NaN}}E=y*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n)));S=1+E/16384*(4096+E*(-768+E*(320-175*E)));G=E/1024*(256+E*(-128+E*(74-47*E)));P=G*g*(b+G/4*(M*(-1+2*b*b)-G/6*b*(-3+4*g*g)*(-3+4*b*b)));k=r*(1-n)*S*(z-P);const N=Math.atan2(v*p,u*l-f*v*_);return{azi1:N,s12:k}}function xn(t,i,s,e,r,n){const h=Math.atan((1-n)*Math.tan(t));const a=Math.sin(h),o=Math.cos(h);const f=Math.sin(s),u=Math.cos(s);const l=Math.atan2(a,o*u);const v=o*f;const c=1-v*v;const d=c*(r*r-r*(1-n)*(r*(1-n)))/(r*(1-n)*(r*(1-n)));const m=1+d/16384*(4096+d*(-768+d*(320-175*d)));const p=d/1024*(256+d*(-128+d*(74-47*d)));let _=e/(r*(1-n)*m),g,M=100;let z,w,y,b;do{z=Math.cos(2*l+_);w=Math.sin(_);y=Math.cos(_);b=p*w*(z+p/4*(y*(-1+2*z*z)-p/6*z*(-3+4*w*w)*(-3+4*z*z)));g=_;_=e/(r*(1-n)*m)+b}while(Math.abs(_-g)>1e-12&&--M>0);if(M===0){return{lat2:NaN,lon2:NaN}}const x=a*w-o*y*u;const E=Math.atan2(a*y+o*w*u,(1-n)*Math.sqrt(v*v+x*x));const S=Math.atan2(w*f,o*y-a*w*u);const G=n/16*c*(4+n*(4-3*c));const P=S-(1-G)*n*v*(_+G*w*(z+G*y*(-1+2*z*z)));const k=i+P;return{lat2:E,lon2:k}}function En(){this.sin_p12=Math.sin(this.lat0);this.cos_p12=Math.cos(this.lat0);this.f=this.es/(1+Math.sqrt(1-this.es))}function Sn(t){var i=t.x;var s=t.y;var e=Math.sin(t.y);var r=Math.cos(t.y);var n=At(i-this.long0,this.over);var h,a,o,f,u,l,v,c,d,m,p;if(this.sphere){if(Math.abs(this.sin_p12-1)<=I){t.x=this.x0+this.a*(G-s)*Math.sin(n);t.y=this.y0-this.a*(G-s)*Math.cos(n);return t}else if(Math.abs(this.sin_p12+1)<=I){t.x=this.x0+this.a*(G+s)*Math.sin(n);t.y=this.y0+this.a*(G+s)*Math.cos(n);return t}else{d=this.sin_p12*e+this.cos_p12*r*Math.cos(n);v=Math.acos(d);c=v?v/Math.sin(v):1;t.x=this.x0+this.a*c*r*Math.sin(n);t.y=this.y0+this.a*c*(this.cos_p12*e-this.sin_p12*r*Math.cos(n));return t}}else{h=We(this.es);a=je(this.es);o=Ve(this.es);f=Ue(this.es);if(Math.abs(this.sin_p12-1)<=I){u=this.a*De(h,a,o,f,G);l=this.a*De(h,a,o,f,s);t.x=this.x0+(u-l)*Math.sin(n);t.y=this.y0-(u-l)*Math.cos(n);return t}else if(Math.abs(this.sin_p12+1)<=I){u=this.a*De(h,a,o,f,G);l=this.a*De(h,a,o,f,s);t.x=this.x0+(u+l)*Math.sin(n);t.y=this.y0+(u+l)*Math.cos(n);return t}else{if(Math.abs(i)<I&&Math.abs(s-this.lat0)<I){t.x=t.y=0;return t}m=bn(this.lat0,this.long0,s,i,this.a,this.f);p=m.azi1;t.x=m.s12*Math.sin(p);t.y=m.s12*Math.cos(p);return t}}}function Gn(t){t.x-=this.x0;t.y-=this.y0;var i,s,e,r,n,h,a,o,f,u,l,v,c,d,m,p;if(this.sphere){i=Math.sqrt(t.x*t.x+t.y*t.y);if(i>2*G*this.a){return}s=i/this.a;e=Math.sin(s);r=Math.cos(s);n=this.long0;if(Math.abs(i)<=I){h=this.lat0}else{h=pr(r*this.sin_p12+t.y*e*this.cos_p12/i);a=Math.abs(this.lat0)-G;if(Math.abs(a)<=I){if(this.lat0>=0){n=At(this.long0+Math.atan2(t.x,-t.y),this.over)}else{n=At(this.long0-Math.atan2(-t.x,t.y),this.over)}}else{n=At(this.long0+Math.atan2(t.x*e,i*this.cos_p12*r-t.y*this.sin_p12*e),this.over)}}t.x=n;t.y=h;return t}else{o=We(this.es);f=je(this.es);u=Ve(this.es);l=Ue(this.es);if(Math.abs(this.sin_p12-1)<=I){v=this.a*De(o,f,u,l,G);i=Math.sqrt(t.x*t.x+t.y*t.y);c=v-i;h=He(c/this.a,o,f,u,l);n=At(this.long0+Math.atan2(t.x,-1*t.y),this.over);t.x=n;t.y=h;return t}else if(Math.abs(this.sin_p12+1)<=I){v=this.a*De(o,f,u,l,G);i=Math.sqrt(t.x*t.x+t.y*t.y);c=i-v;h=He(c/this.a,o,f,u,l);n=At(this.long0+Math.atan2(t.x,t.y),this.over);t.x=n;t.y=h;return t}else{d=Math.atan2(t.x,t.y);m=Math.sqrt(t.x*t.x+t.y*t.y);p=xn(this.lat0,this.long0,d,m,this.a,this.f);t.x=p.lon2;t.y=p.lat2;return t}}}var Pn=["Azimuthal_Equidistant","aeqd"];var kn={init:En,forward:Sn,inverse:Gn,names:Pn};function Nn(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0)}function In(t){var i,s;var e;var r;var n;var h,a,o;var f=t.x;var u=t.y;e=At(f-this.long0,this.over);i=Math.sin(u);s=Math.cos(u);r=Math.cos(e);h=this.sin_p14*i+this.cos_p14*s*r;n=1;if(h>0||Math.abs(h)<=I){a=this.a*n*s*Math.sin(e);o=this.y0+this.a*n*(this.cos_p14*i-this.sin_p14*s*r)}t.x=a;t.y=o;return t}function Cn(t){var i;var s;var e,r;var n;var h,a;t.x-=this.x0;t.y-=this.y0;i=Math.sqrt(t.x*t.x+t.y*t.y);s=pr(i/this.a);e=Math.sin(s);r=Math.cos(s);h=this.long0;if(Math.abs(i)<=I){a=this.lat0;t.x=h;t.y=a;return t}a=pr(r*this.sin_p14+t.y*e*this.cos_p14/i);n=Math.abs(this.lat0)-G;if(Math.abs(n)<=I){if(this.lat0>=0){h=At(this.long0+Math.atan2(t.x,-t.y),this.over)}else{h=At(this.long0-Math.atan2(-t.x,t.y),this.over)}t.x=h;t.y=a;return t}h=At(this.long0+Math.atan2(t.x*e,i*this.cos_p14*r-t.y*this.sin_p14*e),this.over);t.x=h;t.y=a;return t}var An=["ortho"];var Rn={init:Nn,forward:In,inverse:Cn,names:An};var Tn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6};var On={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Ln(){this.x0=this.x0||0;this.y0=this.y0||0;this.lat0=this.lat0||0;this.long0=this.long0||0;this.lat_ts=this.lat_ts||0;this.title=this.title||"Quadrilateralized Spherical Cube";if(this.lat0>=G-R/2){this.face=Tn.TOP}else if(this.lat0<=-(G-R/2)){this.face=Tn.BOTTOM}else if(Math.abs(this.long0)<=R){this.face=Tn.FRONT}else if(Math.abs(this.long0)<=G+R){this.face=this.long0>0?Tn.RIGHT:Tn.LEFT}else{this.face=Tn.BACK}if(this.es!==0){this.one_minus_f=1-(this.a-this.b)/this.a;this.one_minus_f_squared=this.one_minus_f*this.one_minus_f}}function Fn(t){var i={x:0,y:0};var s,e;var r,n;var h,a;var o={value:0};t.x-=this.long0;if(this.es!==0){s=Math.atan(this.one_minus_f_squared*Math.tan(t.y))}else{s=t.y}e=t.x;if(this.face===Tn.TOP){n=G-s;if(e>=R&&e<=G+R){o.value=On.AREA_0;r=e-G}else if(e>G+R||e<=-(G+R)){o.value=On.AREA_1;r=e>0?e-O:e+O}else if(e>-(G+R)&&e<=-R){o.value=On.AREA_2;r=e+G}else{o.value=On.AREA_3;r=e}}else if(this.face===Tn.BOTTOM){n=G+s;if(e>=R&&e<=G+R){o.value=On.AREA_0;r=-e+G}else if(e<R&&e>=-R){o.value=On.AREA_1;r=-e}else if(e<-R&&e>=-(G+R)){o.value=On.AREA_2;r=-e-G}else{o.value=On.AREA_3;r=e>0?-e+O:-e-O}}else{var f,u,l;var v,c;var d,m;if(this.face===Tn.RIGHT){e=jn(e,+G)}else if(this.face===Tn.BACK){e=jn(e,3.14159265359)}else if(this.face===Tn.LEFT){e=jn(e,-G)}v=Math.sin(s);c=Math.cos(s);d=Math.sin(e);m=Math.cos(e);f=c*m;u=c*d;l=v;if(this.face===Tn.FRONT){n=Math.acos(f);r=Wn(n,l,u,o)}else if(this.face===Tn.RIGHT){n=Math.acos(u);r=Wn(n,l,-f,o)}else if(this.face===Tn.BACK){n=Math.acos(-f);r=Wn(n,l,-u,o)}else if(this.face===Tn.LEFT){n=Math.acos(-u);r=Wn(n,l,f,o)}else{n=r=0;o.value=On.AREA_0}}a=Math.atan(12/O*(r+Math.acos(Math.sin(r)*Math.cos(R))-G));h=Math.sqrt((1-Math.cos(n))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r)))));if(o.value===On.AREA_1){a+=G}else if(o.value===On.AREA_2){a+=O}else if(o.value===On.AREA_3){a+=1.5*O}i.x=h*Math.cos(a);i.y=h*Math.sin(a);i.x=i.x*this.a+this.x0;i.y=i.y*this.a+this.y0;t.x=i.x;t.y=i.y;return t}function Dn(t){var i={lam:0,phi:0};var s,e,r,n;var h,a,o,f;var u;var l={value:0};t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;e=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y));s=Math.atan2(t.y,t.x);if(t.x>=0&&t.x>=Math.abs(t.y)){l.value=On.AREA_0}else if(t.y>=0&&t.y>=Math.abs(t.x)){l.value=On.AREA_1;s-=G}else if(t.x<0&&-t.x>=Math.abs(t.y)){l.value=On.AREA_2;s=s<0?s+O:s-O}else{l.value=On.AREA_3;s+=G}u=O/12*Math.tan(s);h=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2));a=Math.atan(h);r=Math.cos(s);n=Math.tan(e);o=1-r*r*n*n*(1-Math.cos(Math.atan(1/Math.cos(a))));if(o<-1){o=-1}else if(o>1){o=1}if(this.face===Tn.TOP){f=Math.acos(o);i.phi=G-f;if(l.value===On.AREA_0){i.lam=a+G}else if(l.value===On.AREA_1){i.lam=a<0?a+O:a-O}else if(l.value===On.AREA_2){i.lam=a-G}else{i.lam=a}}else if(this.face===Tn.BOTTOM){f=Math.acos(o);i.phi=f-G;if(l.value===On.AREA_0){i.lam=-a+G}else if(l.value===On.AREA_1){i.lam=-a}else if(l.value===On.AREA_2){i.lam=-a-G}else{i.lam=a<0?-a-O:-a+O}}else{var v,c,d;v=o;u=v*v;if(u>=1){d=0}else{d=Math.sqrt(1-u)*Math.sin(a)}u+=d*d;if(u>=1){c=0}else{c=Math.sqrt(1-u)}if(l.value===On.AREA_1){u=c;c=-d;d=u}else if(l.value===On.AREA_2){c=-c;d=-d}else if(l.value===On.AREA_3){u=c;c=d;d=-u}if(this.face===Tn.RIGHT){u=v;v=-c;c=u}else if(this.face===Tn.BACK){v=-v;c=-c}else if(this.face===Tn.LEFT){u=v;v=c;c=-u}i.phi=Math.acos(-d)-G;i.lam=Math.atan2(c,v);if(this.face===Tn.RIGHT){i.lam=jn(i.lam,-G)}else if(this.face===Tn.BACK){i.lam=jn(i.lam,-3.14159265359)}else if(this.face===Tn.LEFT){i.lam=jn(i.lam,+G)}}if(this.es!==0){var m;var p,_;m=i.phi<0?1:0;p=Math.tan(i.phi);_=this.b/Math.sqrt(p*p+this.one_minus_f_squared);i.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_));if(m){i.phi=-i.phi}}i.lam+=this.long0;t.x=i.lam;t.y=i.phi;return t}function Wn(t,i,s,e){var r;if(t<I){e.value=On.AREA_0;r=0}else{r=Math.atan2(i,s);if(Math.abs(r)<=R){e.value=On.AREA_0}else if(r>R&&r<=G+R){e.value=On.AREA_1;r-=G}else if(r>G+R||r<=-(G+R)){e.value=On.AREA_2;r=r>=0?r-O:r+O}else{e.value=On.AREA_3;r+=G}}return r}function jn(t,i){var s=t+i;if(s<-3.14159265359){s+=T}else if(s>3.14159265359){s-=T}return s}var Vn=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];var Un={init:Ln,forward:Fn,inverse:Dn,names:Vn};var Bn=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]];var qn=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]];var Hn=.8487;var Xn=1.3523;var Yn=A/5;var Jn=1/Yn;var Kn=18;var Zn=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))};var $n=function(t,i){return t[1]+i*(2*t[2]+i*3*t[3])};function Qn(t,i,s,e){var r=i;for(;e;--e){var n=t(r);r-=n;if(Math.abs(n)<s){break}}return r}function th(){this.x0=this.x0||0;this.y0=this.y0||0;this.long0=this.long0||0;this.es=0;this.title=this.title||"Robinson"}function ih(t){var i=At(t.x-this.long0,this.over);var s=Math.abs(t.y);var e=Math.floor(s*Yn);if(e<0){e=0}else if(e>=Kn){e=Kn-1}s=A*(s-Jn*e);var r={x:Zn(Bn[e],s)*i,y:Zn(qn[e],s)};if(t.y<0){r.y=-r.y}r.x=r.x*this.a*Hn+this.x0;r.y=r.y*this.a*Xn+this.y0;return r}function sh(t){var i={x:(t.x-this.x0)/(this.a*Hn),y:Math.abs(t.y-this.y0)/(this.a*Xn)};if(i.y>=1){i.x/=Bn[Kn][0];i.y=t.y<0?-G:G}else{var s=Math.floor(i.y*Kn);if(s<0){s=0}else if(s>=Kn){s=Kn-1}for(;;){if(qn[s][0]>i.y){--s}else if(qn[s+1][0]<=i.y){++s}else{break}}var e=qn[s];var r=5*(i.y-e[0])/(qn[s+1][0]-e[0]);r=Qn((function(t){return(Zn(e,t)-i.y)/$n(e,t)}),r,I,100);i.x/=Zn(Bn[s],r);i.y=(5*s+r)*C;if(t.y<0){i.y=-i.y}}i.x=At(i.x+this.long0,this.over);return i}var eh=["Robinson","robin"];var rh={init:th,forward:ih,inverse:sh,names:eh};function nh(){this.name="geocent"}function hh(t){var i=xi(t,this.es,this.a);return i}function ah(t){var i=Ei(t,this.es,this.a,this.b);return i}var oh=["Geocentric","geocentric","geocent","Geocent"];var fh={init:nh,forward:hh,inverse:ah,names:oh};var uh={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3};var lh={h:{def:1e5,num:true},azi:{def:0,num:true,degrees:true},tilt:{def:0,num:true,degrees:true},long0:{def:0,num:true},lat0:{def:0,num:true}};function vh(){Object.keys(lh).forEach(function(t){if(typeof this[t]==="undefined"){this[t]=lh[t].def}else if(lh[t].num&&isNaN(this[t])){throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t])}else if(lh[t].num){this[t]=parseFloat(this[t])}if(lh[t].degrees){this[t]=this[t]*C}}.bind(this));if(Math.abs(Math.abs(this.lat0)-G)<I){this.mode=this.lat0<0?uh.S_POLE:uh.N_POLE}else if(Math.abs(this.lat0)<I){this.mode=uh.EQUIT}else{this.mode=uh.OBLIQ;this.sinph0=Math.sin(this.lat0);this.cosph0=Math.cos(this.lat0)}this.pn1=this.h/this.a;if(this.pn1<=0||this.pn1>1e10){throw new Error("Invalid height")}this.p=1+this.pn1;this.rp=1/this.p;this.h1=1/this.pn1;this.pfact=(this.p+1)*this.h1;this.es=0;var t=this.tilt;var i=this.azi;this.cg=Math.cos(i);this.sg=Math.sin(i);this.cw=Math.cos(t);this.sw=Math.sin(t)}function ch(t){t.x-=this.long0;var i=Math.sin(t.y);var s=Math.cos(t.y);var e=Math.cos(t.x);var r,n;switch(this.mode){case uh.OBLIQ:n=this.sinph0*i+this.cosph0*s*e;break;case uh.EQUIT:n=s*e;break;case uh.S_POLE:n=-i;break;case uh.N_POLE:n=i;break}n=this.pn1/(this.p-n);r=n*s*Math.sin(t.x);switch(this.mode){case uh.OBLIQ:n*=this.cosph0*i-this.sinph0*s*e;break;case uh.EQUIT:n*=i;break;case uh.N_POLE:n*=-(s*e);break;case uh.S_POLE:n*=s*e;break}var h,a;h=n*this.cg+r*this.sg;a=1/(h*this.sw*this.h1+this.cw);r=(r*this.cg-n*this.sg)*this.cw*a;n=h*a;t.x=r*this.a;t.y=n*this.a;return t}function dh(t){t.x/=this.a;t.y/=this.a;var i={x:t.x,y:t.y};var s,e,r;r=1/(this.pn1-t.y*this.sw);s=this.pn1*t.x*r;e=this.pn1*t.y*this.cw*r;t.x=s*this.cg+e*this.sg;t.y=e*this.cg-s*this.sg;var n=Ls(t.x,t.y);if(Math.abs(n)<I){i.x=0;i.y=t.y}else{var h,a;a=1-n*n*this.pfact;a=(this.p-Math.sqrt(a))/(this.pn1/n+n/this.pn1);h=Math.sqrt(1-a*a);switch(this.mode){case uh.OBLIQ:i.y=Math.asin(h*this.sinph0+t.y*a*this.cosph0/n);t.y=(h-this.sinph0*Math.sin(i.y))*n;t.x*=a*this.cosph0;break;case uh.EQUIT:i.y=Math.asin(t.y*a/n);t.y=h*n;t.x*=a;break;case uh.N_POLE:i.y=Math.asin(h);t.y=-t.y;break;case uh.S_POLE:i.y=-Math.asin(h);break}i.x=Math.atan2(t.x,t.y)}t.x=i.x+this.long0;t.y=i.y;return t}var mh=["Tilted_Perspective","tpers"];var ph={init:vh,forward:ch,inverse:dh,names:mh};function _h(){this.flip_axis=this.sweep==="x"?1:0;this.h=Number(this.h);this.radius_g_1=this.h/this.a;if(this.radius_g_1<=0||this.radius_g_1>1e10){throw new Error}this.radius_g=1+this.radius_g_1;this.C=this.radius_g*this.radius_g-1;if(this.es!==0){var t=1-this.es;var i=1/t;this.radius_p=Math.sqrt(t);this.radius_p2=t;this.radius_p_inv2=i;this.shape="ellipse"}else{this.radius_p=1;this.radius_p2=1;this.radius_p_inv2=1;this.shape="sphere"}if(!this.title){this.title="Geostationary Satellite View"}}function gh(t){var i=t.x;var s=t.y;var e,r,n,h;i=i-this.long0;if(this.shape==="ellipse"){s=Math.atan(this.radius_p2*Math.tan(s));var a=this.radius_p/Ls(this.radius_p*Math.cos(s),Math.sin(s));r=a*Math.cos(i)*Math.cos(s);n=a*Math.sin(i)*Math.cos(s);h=a*Math.sin(s);if((this.radius_g-r)*r-n*n-h*h*this.radius_p_inv2<0){t.x=Number.NaN;t.y=Number.NaN;return t}e=this.radius_g-r;if(this.flip_axis){t.x=this.radius_g_1*Math.atan(n/Ls(h,e));t.y=this.radius_g_1*Math.atan(h/e)}else{t.x=this.radius_g_1*Math.atan(n/e);t.y=this.radius_g_1*Math.atan(h/Ls(n,e))}}else if(this.shape==="sphere"){e=Math.cos(s);r=Math.cos(i)*e;n=Math.sin(i)*e;h=Math.sin(s);e=this.radius_g-r;if(this.flip_axis){t.x=this.radius_g_1*Math.atan(n/Ls(h,e));t.y=this.radius_g_1*Math.atan(h/e)}else{t.x=this.radius_g_1*Math.atan(n/e);t.y=this.radius_g_1*Math.atan(h/Ls(n,e))}}t.x=t.x*this.a;t.y=t.y*this.a;return t}function Mh(t){var i=-1;var s=0;var e=0;var r,n,h,a;t.x=t.x/this.a;t.y=t.y/this.a;if(this.shape==="ellipse"){if(this.flip_axis){e=Math.tan(t.y/this.radius_g_1);s=Math.tan(t.x/this.radius_g_1)*Ls(1,e)}else{s=Math.tan(t.x/this.radius_g_1);e=Math.tan(t.y/this.radius_g_1)*Ls(1,s)}var o=e/this.radius_p;r=s*s+o*o+i*i;n=2*this.radius_g*i;h=n*n-4*r*this.C;if(h<0){t.x=Number.NaN;t.y=Number.NaN;return t}a=(-n-Math.sqrt(h))/(2*r);i=this.radius_g+a*i;s*=a;e*=a;t.x=Math.atan2(s,i);t.y=Math.atan(e*Math.cos(t.x)/i);t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis){e=Math.tan(t.y/this.radius_g_1);s=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+e*e)}else{s=Math.tan(t.x/this.radius_g_1);e=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+s*s)}r=s*s+e*e+i*i;n=2*this.radius_g*i;h=n*n-4*r*this.C;if(h<0){t.x=Number.NaN;t.y=Number.NaN;return t}a=(-n-Math.sqrt(h))/(2*r);i=this.radius_g+a*i;s*=a;e*=a;t.x=Math.atan2(s,i);t.y=Math.atan(e*Math.cos(t.x)/i)}t.x=t.x+this.long0;return t}var zh=["Geostationary Satellite View","Geostationary_Satellite","geos"];var wh={init:_h,forward:gh,inverse:Mh,names:zh};var yh=1.340264,bh=-.081106,xh=893e-6,Eh=.003796,Sh=Math.sqrt(3)/2;function Gh(){this.es=0;this.long0=this.long0!==undefined?this.long0:0;this.x0=this.x0!==undefined?this.x0:0;this.y0=this.y0!==undefined?this.y0:0}function Ph(t){var i=At(t.x-this.long0,this.over);var s=t.y;var e=Math.asin(Sh*Math.sin(s)),r=e*e,n=r*r*r;t.x=i*Math.cos(e)/(Sh*(yh+3*bh*r+n*(7*xh+9*Eh*r)));t.y=e*(yh+bh*r+n*(xh+Eh*r));t.x=this.a*t.x+this.x0;t.y=this.a*t.y+this.y0;return t}function kh(t){t.x=(t.x-this.x0)/this.a;t.y=(t.y-this.y0)/this.a;var i=1e-9,s=12,e=t.y,r,n,h,a,o,f;for(f=0;f<s;++f){r=e*e;n=r*r*r;h=e*(yh+bh*r+n*(xh+Eh*r))-t.y;a=yh+3*bh*r+n*(7*xh+9*Eh*r);e-=o=h/a;if(Math.abs(o)<i){break}}r=e*e;n=r*r*r;t.x=Sh*t.x*(yh+3*bh*r+n*(7*xh+9*Eh*r))/Math.cos(e);t.y=Math.asin(Math.sin(e)/Sh);t.x=At(t.x+this.long0,this.over);return t}var Nh=["eqearth","Equal Earth","Equal_Earth"];var Ih={init:Gh,forward:Ph,inverse:kh,names:Nh};var Ch=1e-10;function Ah(){var t;this.phi1=this.lat1;if(Math.abs(this.phi1)<Ch){throw new Error}if(this.es){this.en=Gs(this.es);this.m1=Ps(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en);this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1);this.inverse=Th;this.forward=Rh}else{if(Math.abs(this.phi1)+Ch>=G){this.cphi1=0}else{this.cphi1=1/Math.tan(this.phi1)}this.inverse=Lh;this.forward=Oh}}function Rh(t){var i=At(t.x-(this.long0||0),this.over);var s=t.y;var e,r,n;e=this.am1+this.m1-Ps(s,r=Math.sin(s),n=Math.cos(s),this.en);r=n*i/(e*Math.sqrt(1-this.es*r*r));t.x=e*Math.sin(r);t.y=this.am1-e*Math.cos(r);t.x=this.a*t.x+(this.x0||0);t.y=this.a*t.y+(this.y0||0);return t}function Th(t){t.x=(t.x-(this.x0||0))/this.a;t.y=(t.y-(this.y0||0))/this.a;var i,s,e,r;s=Ls(t.x,t.y=this.am1-t.y);r=Ns(this.am1+this.m1-s,this.es,this.en);if((i=Math.abs(r))<G){i=Math.sin(r);e=s*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(r)}else if(Math.abs(i-G)<=Ch){e=0}else{throw new Error}t.x=At(e+(this.long0||0),this.over);t.y=qe(r);return t}function Oh(t){var i=At(t.x-(this.long0||0),this.over);var s=t.y;var e,r;r=this.cphi1+this.phi1-s;if(Math.abs(r)>Ch){t.x=r*Math.sin(e=i*Math.cos(s)/r);t.y=this.cphi1-r*Math.cos(e)}else{t.x=t.y=0}t.x=this.a*t.x+(this.x0||0);t.y=this.a*t.y+(this.y0||0);return t}function Lh(t){t.x=(t.x-(this.x0||0))/this.a;t.y=(t.y-(this.y0||0))/this.a;var i,s;var e=Ls(t.x,t.y=this.cphi1-t.y);s=this.cphi1+this.phi1-e;if(Math.abs(s)>G){throw new Error}if(Math.abs(Math.abs(s)-G)<=Ch){i=0}else{i=e*Math.atan2(t.x,t.y)/Math.cos(s)}t.x=At(i+(this.long0||0),this.over);t.y=qe(s);return t}var Fh=["bonne","Bonne (Werner lat_1=90)"];var Dh={init:Ah,names:Fh};const Wh={OBLIQUE:{forward:Hh,inverse:Yh},TRANSVERSE:{forward:Xh,inverse:Jh}};const jh={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};function Vh(){this.x0=this.x0||0;this.y0=this.y0||0;this.long0=this.long0||0;this.title=this.title||"General Oblique Transformation";this.isIdentity=Ut.includes(this.o_proj);if(!this.o_proj){throw new Error("Missing parameter: o_proj")}if(this.o_proj===`ob_tran`){throw new Error("Invalid value for o_proj: "+this.o_proj)}const t=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim();const i=yi(t);if(!i){throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj)}i.long0=0;this.obliqueProjection=i;let s;const e=Object.keys(jh);const r=t=>{if(typeof this[t]===`undefined`){return undefined}const i=parseFloat(this[t])*C;if(isNaN(i)){throw new Error("Invalid value for "+t+": "+this[t])}return i};for(let t=0;t<e.length;t++){const i=e[t];const n=jh[i];const h=Object.entries(n);const a=h.some((([t])=>typeof this[t]!=="undefined"));if(!a){continue}s=n;for(let t=0;t<h.length;t++){const[i,s]=h[t];const e=r(i);if(typeof e==="undefined"){throw new Error("Missing parameter: "+i+".")}this[s]=e}break}if(!s){throw new Error("No valid parameters provided for ob_tran projection.")}const{lamp:n,phip:h}=qh(this,s);this.lamp=n;if(Math.abs(h)>I){this.cphip=Math.cos(h);this.sphip=Math.sin(h);this.projectionType=Wh.OBLIQUE}else{this.projectionType=Wh.TRANSVERSE}}function Uh(t){return this.projectionType.forward(this,t)}function Bh(t){return this.projectionType.inverse(this,t)}function qh(t,i){let s,e;if(i===jh.ROTATE){let i=t.oLongC;let r=t.oLatC;let n=t.oAlpha;if(Math.abs(Math.abs(r)-G)<=I){throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°")}e=i+Math.atan2(-1*Math.cos(n),-1*Math.sin(n)*Math.sin(r));s=Math.asin(Math.cos(r)*Math.sin(n))}else if(i===jh.NEW_POLE){e=t.oLongP;s=t.oLatP}else{let i=t.oLong1;let r=t.oLat1;let n=t.oLong2;let h=t.oLat2;let a=Math.abs(r);if(Math.abs(r)>G-I){throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°")}if(Math.abs(h)>G-I){throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°")}if(Math.abs(r-h)<I){throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2")}if(a<I){throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero")}e=Math.atan2(Math.cos(r)*Math.sin(h)*Math.cos(i)-Math.sin(r)*Math.cos(h)*Math.cos(n),Math.sin(r)*Math.cos(h)*Math.sin(n)-Math.cos(r)*Math.sin(h)*Math.sin(i));s=Math.atan(-1*Math.cos(e-i)/Math.tan(r))}return{lamp:e,phip:s}}function Hh(t,i){let{x:s,y:e}=i;s+=t.long0;const r=Math.cos(s);const n=Math.sin(e);const h=Math.cos(e);i.x=At(Math.atan2(h*Math.sin(s),t.sphip*h*r+t.cphip*n)+t.lamp);i.y=Math.asin(t.sphip*n-t.cphip*h*r);const a=t.obliqueProjection.forward(i);if(t.isIdentity){a.x*=A;a.y*=A}return a}function Xh(t,i){let{x:s,y:e}=i;s+=t.long0;const r=Math.cos(e);const n=Math.cos(s);i.x=At(Math.atan2(r*Math.sin(s),Math.sin(e))+t.lamp);i.y=Math.asin(-1*r*n);const h=t.obliqueProjection.forward(i);if(t.isIdentity){h.x*=A;h.y*=A}return h}function Yh(t,i){if(t.isIdentity){i.x*=C;i.y*=C}const s=t.obliqueProjection.inverse(i);let{x:e,y:r}=s;if(e<Number.MAX_VALUE){e-=t.lamp;const s=Math.cos(e);const n=Math.sin(r);const h=Math.cos(r);i.x=Math.atan2(h*Math.sin(e),t.sphip*h*s-t.cphip*n);i.y=Math.asin(t.sphip*n+t.cphip*h*s)}i.x=At(i.x+t.long0);return i}function Jh(t,i){if(t.isIdentity){i.x*=C;i.y*=C}const s=t.obliqueProjection.inverse(i);let{x:e,y:r}=s;if(e<Number.MAX_VALUE){const s=Math.cos(r);e-=t.lamp;i.x=Math.atan2(s*Math.sin(e),-1*Math.sin(r));i.y=Math.asin(s*Math.cos(e))}i.x=At(i.x+t.long0);return i}var Kh=["General Oblique Transformation","General_Oblique_Transformation","ob_tran"];var Zh={init:Vh,forward:Uh,inverse:Bh,names:Kh};function $h(t){t.Proj.projections.add(Ts);t.Proj.projections.add(Ys);t.Proj.projections.add(Qs);t.Proj.projections.add(ue);t.Proj.projections.add(pe);t.Proj.projections.add(we);t.Proj.projections.add(Pe);t.Proj.projections.add(Ae);t.Proj.projections.add(Fe);t.Proj.projections.add(Ze);t.Proj.projections.add(mr);t.Proj.projections.add(yr);t.Proj.projections.add(Gr);t.Proj.projections.add(Ar);t.Proj.projections.add(Fr);t.Proj.projections.add(Br);t.Proj.projections.add(Jr);t.Proj.projections.add(tn);t.Proj.projections.add(an);t.Proj.projections.add(vn);t.Proj.projections.add(_n);t.Proj.projections.add(yn);t.Proj.projections.add(kn);t.Proj.projections.add(Rn);t.Proj.projections.add(Un);t.Proj.projections.add(rh);t.Proj.projections.add(fh);t.Proj.projections.add(ph);t.Proj.projections.add(wh);t.Proj.projections.add(Ih);t.Proj.projections.add(Dh);t.Proj.projections.add(Zh)}const Qh=Object.assign(Vi,{defaultDatum:"WGS84",Proj:yi,WGS84:new yi("WGS84"),Point:ds,toPoint:Ri,defs:wt,nadgrid:oi,transform:Fi,mgrs:Zi,version:"__VERSION__"});$h(Qh);var ta={};ta.ASSUME_TOUCH=false;ta.DEFAULT_MAX_ZOOM=42;ta.DEFAULT_MIN_ZOOM=0;ta.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD=.5;ta.DEFAULT_TILE_SIZE=256;ta.DEFAULT_WMS_VERSION="1.3.0";ta.ENABLE_CANVAS=true;ta.ENABLE_PROJ4JS=true;ta.ENABLE_RASTER_REPROJECTION=true;ta.ENABLE_WEBGL=true;ta.DEBUG_WEBGL=true;ta.INITIAL_ATLAS_SIZE=256;ta.MAX_ATLAS_SIZE=-1;ta.MOUSEWHEELZOOM_MAXDELTA=1;ta.OVERVIEWMAP_MAX_RATIO=.75;ta.OVERVIEWMAP_MIN_RATIO=.1;ta.RASTER_REPROJECTION_MAX_SOURCE_TILES=100;ta.RASTER_REPROJECTION_MAX_SUBDIVISION=10;ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH=.25;ta.SIMPLIFY_TOLERANCE=.5;ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK=1024;ta.VERSION="v4.6.5";ta.inherits=function(t,i){t.prototype=Object.create(i.prototype);t.prototype.constructor=t};ta.nullFunction=function(){};ta.getUid=function(t){return t.ol_uid||(t.ol_uid=++ta.uidCounter_)};ta.uidCounter_=0;var ia={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"};var sa={PROPERTYCHANGE:"propertychange"};var ea={};ea.assign=typeof Object.assign==="function"?Object.assign:function(t,i){if(t===undefined||t===null){throw new TypeError("Cannot convert undefined or null to object")}var s=Object(t);for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(n!==undefined&&n!==null){for(var h in n){if(n.hasOwnProperty(h)){s[h]=n[h]}}}}return s};ea.clear=function(t){for(var i in t){delete t[i]}};ea.getValues=function(t){var i=[];for(var s in t){i.push(t[s])}return i};ea.isEmpty=function(t){var i;for(i in t){return false}return!i};var ra={};ra.bindListener_=function(t){var i=function(i){var s=t.listener;var e=t.bindTo||t.target;if(t.callOnce){ra.unlistenByKey(t)}return s.call(e,i)};t.boundListener=i;return i};ra.findListener_=function(t,i,s,e){var r;for(var n=0,h=t.length;n<h;++n){r=t[n];if(r.listener===i&&r.bindTo===s){if(e){r.deleteIndex=n}return r}}return undefined};ra.getListeners=function(t,i){var s=t.ol_lm;return s?s[i]:undefined};ra.getListenerMap_=function(t){var i=t.ol_lm;if(!i){i=t.ol_lm={}}return i};ra.removeListeners_=function(t,i){var s=ra.getListeners(t,i);if(s){for(var e=0,r=s.length;e<r;++e){t.removeEventListener(i,s[e].boundListener);ea.clear(s[e])}s.length=0;var n=t.ol_lm;if(n){delete n[i];if(Object.keys(n).length===0){delete t.ol_lm}}}};ra.listen=function(t,i,s,e,r){var n=ra.getListenerMap_(t);var h=n[i];if(!h){h=n[i]=[]}var a=ra.findListener_(h,s,e,false);if(a){if(!r){a.callOnce=false}}else{a={bindTo:e,callOnce:!!r,listener:s,target:t,type:i};t.addEventListener(i,ra.bindListener_(a));h.push(a)}return a};ra.listenOnce=function(t,i,s,e){return ra.listen(t,i,s,e,true)};ra.unlisten=function(t,i,s,e){var r=ra.getListeners(t,i);if(r){var n=ra.findListener_(r,s,e,true);if(n){ra.unlistenByKey(n)}}};ra.unlistenByKey=function(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var i=ra.getListeners(t.target,t.type);if(i){var s="deleteIndex"in t?t.deleteIndex:i.indexOf(t);if(s!==-1){i.splice(s,1)}if(i.length===0){ra.removeListeners_(t.target,t.type)}}ea.clear(t)}};ra.unlistenAll=function(t){var i=ra.getListenerMap_(t);for(var s in i){ra.removeListeners_(t,s)}};var na=function(){};na.prototype.disposed_=false;na.prototype.dispose=function(){if(!this.disposed_){this.disposed_=true;this.disposeInternal()}};na.prototype.disposeInternal=ta.nullFunction;var ha=function(t){this.type=t;this.target=null};ha.prototype.preventDefault=ha.prototype.stopPropagation=function(){this.propagationStopped=true};ha.stopPropagation=function(t){t.stopPropagation()};ha.preventDefault=function(t){t.preventDefault()};var aa=function(){na.call(this);this.pendingRemovals_={};this.dispatching_={};this.listeners_={}};ta.inherits(aa,na);aa.prototype.addEventListener=function(t,i){var s=this.listeners_[t];if(!s){s=this.listeners_[t]=[]}if(s.indexOf(i)===-1){s.push(i)}};aa.prototype.dispatchEvent=function(t){var i=typeof t==="string"?new ha(t):t;var s=i.type;i.target=this;var e=this.listeners_[s];var r;if(e){if(!(s in this.dispatching_)){this.dispatching_[s]=0;this.pendingRemovals_[s]=0}++this.dispatching_[s];for(var n=0,h=e.length;n<h;++n){if(e[n].call(this,i)===false||i.propagationStopped){r=false;break}}--this.dispatching_[s];if(this.dispatching_[s]===0){var a=this.pendingRemovals_[s];delete this.pendingRemovals_[s];while(a--){this.removeEventListener(s,ta.nullFunction)}delete this.dispatching_[s]}return r}};aa.prototype.disposeInternal=function(){ra.unlistenAll(this)};aa.prototype.getListeners=function(t){return this.listeners_[t]};aa.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0};aa.prototype.removeEventListener=function(t,i){var s=this.listeners_[t];if(s){var e=s.indexOf(i);if(t in this.pendingRemovals_){s[e]=ta.nullFunction;++this.pendingRemovals_[t]}else{s.splice(e,1);if(s.length===0){delete this.listeners_[t]}}}};var oa={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",WHEEL:"wheel"};var fa=function(){aa.call(this);this.revision_=0};ta.inherits(fa,aa);fa.unByKey=function(t){if(Array.isArray(t)){for(var i=0,s=t.length;i<s;++i){ra.unlistenByKey(t[i])}}else{ra.unlistenByKey(t)}};fa.prototype.changed=function(){++this.revision_;this.dispatchEvent(oa.CHANGE)};fa.prototype.getRevision=function(){return this.revision_};fa.prototype.on=function(t,i,s){if(Array.isArray(t)){var e=t.length;var r=new Array(e);for(var n=0;n<e;++n){r[n]=ra.listen(this,t[n],i,s)}return r}else{return ra.listen(this,t,i,s)}};fa.prototype.once=function(t,i,s){if(Array.isArray(t)){var e=t.length;var r=new Array(e);for(var n=0;n<e;++n){r[n]=ra.listenOnce(this,t[n],i,s)}return r}else{return ra.listenOnce(this,t,i,s)}};fa.prototype.un=function(t,i,s){if(Array.isArray(t)){for(var e=0,r=t.length;e<r;++e){ra.unlisten(this,t[e],i,s)}return}else{ra.unlisten(this,t,i,s)}};var ua=function(t){fa.call(this);ta.getUid(this);this.values_={};if(t!==undefined){this.setProperties(t)}};ta.inherits(ua,fa);ua.changeEventTypeCache_={};ua.getChangeEventType=function(t){return ua.changeEventTypeCache_.hasOwnProperty(t)?ua.changeEventTypeCache_[t]:ua.changeEventTypeCache_[t]="change:"+t};ua.prototype.get=function(t){var i;if(this.values_.hasOwnProperty(t)){i=this.values_[t]}return i};ua.prototype.getKeys=function(){return Object.keys(this.values_)};ua.prototype.getProperties=function(){return ea.assign({},this.values_)};ua.prototype.notify=function(t,i){var s;s=ua.getChangeEventType(t);this.dispatchEvent(new ua.Event(s,t,i));s=sa.PROPERTYCHANGE;this.dispatchEvent(new ua.Event(s,t,i))};ua.prototype.set=function(t,i,s){if(s){this.values_[t]=i}else{var e=this.values_[t];this.values_[t]=i;if(e!==i){this.notify(t,e)}}};ua.prototype.setProperties=function(t,i){var s;for(s in t){this.set(s,t[s],i)}};ua.prototype.unset=function(t,i){if(t in this.values_){var s=this.values_[t];delete this.values_[t];if(!i){this.notify(t,s)}}};ua.Event=function(t,i,s){ha.call(this,t);this.key=i;this.oldValue=s};ta.inherits(ua.Event,ha);var la=function(t){var i=ta.VERSION?ta.VERSION.split("-")[0]:"latest";this.message="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";this.code=t;this.name="AssertionError"};ta.inherits(la,Error);var va={};va.assert=function(t,i){if(!t){throw new la(i)}};var ca={};ca.clamp=function(t,i,s){return Math.min(Math.max(t,i),s)};ca.cosh=function(){var t;if("cosh"in Math){t=Math.cosh}else{t=function(t){var i=Math.exp(t);return(i+1/i)/2}}return t}();ca.roundUpToPowerOfTwo=function(t){va.assert(0<t,29);return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))};ca.squaredSegmentDistance=function(t,i,s,e,r,n){var h=r-s;var a=n-e;if(h!==0||a!==0){var o=((t-s)*h+(i-e)*a)/(h*h+a*a);if(o>1){s=r;e=n}else if(o>0){s+=h*o;e+=a*o}}return ca.squaredDistance(t,i,s,e)};ca.squaredDistance=function(t,i,s,e){var r=s-t;var n=e-i;return r*r+n*n};ca.solveLinearSystem=function(t){var i=t.length;for(var s=0;s<i;s++){var e=s;var r=Math.abs(t[s][s]);for(var n=s+1;n<i;n++){var h=Math.abs(t[n][s]);if(h>r){r=h;e=n}}if(r===0){return null}var a=t[e];t[e]=t[s];t[s]=a;for(var o=s+1;o<i;o++){var f=-t[o][s]/t[s][s];for(var u=s;u<i+1;u++){if(s==u){t[o][u]=0}else{t[o][u]+=f*t[s][u]}}}}var l=new Array(i);for(var v=i-1;v>=0;v--){l[v]=t[v][i]/t[v][v];for(var c=v-1;c>=0;c--){t[c][i]-=t[c][v]*l[v]}}return l};ca.toDegrees=function(t){return t*180/Math.PI};ca.toRadians=function(t){return t*Math.PI/180};ca.modulo=function(t,i){var s=t%i;return s*i<0?s+i:s};ca.lerp=function(t,i,s){return t+s*(i-t)};var da={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Latitude/longitude spherical geodesy formulae taken from
|
|
5
5
|
* http://www.movable-type.co.uk/scripts/latlong.html
|
|
6
6
|
* Licensed under CC-BY-3.0.
|
|
7
|
-
*/var ma=function(t){this.radius=t};ma.prototype.geodesicArea=function(t){return ma.getArea_(t,this.radius)};ma.prototype.haversineDistance=function(t,i){return ma.getDistance_(t,i,this.radius)};ma.prototype.offset=function(t,i,s){var e=ca.toRadians(t[1]);var r=ca.toRadians(t[0]);var n=i/this.radius;var h=Math.asin(Math.sin(e)*Math.cos(n)+Math.cos(e)*Math.sin(n)*Math.cos(s));var a=r+Math.atan2(Math.sin(s)*Math.sin(n)*Math.cos(e),Math.cos(n)-Math.sin(e)*Math.sin(h));return[ca.toDegrees(a),ca.toDegrees(h)]};ma.DEFAULT_RADIUS=6371008.8;ma.getLength=function(t,i){var s=i||{};var e=s.radius||ma.DEFAULT_RADIUS;var r=s.projection||"EPSG:3857";t=t.clone().transform(r,"EPSG:4326");var n=t.getType();var h=0;var a,o,f,u,l,v;switch(n){case da.POINT:case da.MULTI_POINT:{break}case da.LINE_STRING:case da.LINEAR_RING:{a=t.getCoordinates();h=ma.getLength_(a,e);break}case da.MULTI_LINE_STRING:case da.POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){h+=ma.getLength_(a[f],e)}break}case da.MULTI_POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){o=a[f];for(l=0,v=o.length;l<v;++l){h+=ma.getLength_(o[l],e)}}break}case da.GEOMETRY_COLLECTION:{var c=t.getGeometries();for(f=0,u=c.length;f<u;++f){h+=ma.getLength(c[f],i)}break}default:{throw new Error("Unsupported geometry type: "+n)}}return h};ma.getLength_=function(t,i){var s=0;for(var e=0,r=t.length;e<r-1;++e){s+=ma.getDistance_(t[e],t[e+1],i)}return s};ma.getDistance_=function(t,i,s){var e=ca.toRadians(t[1]);var r=ca.toRadians(i[1]);var n=(r-e)/2;var h=ca.toRadians(i[0]-t[0])/2;var a=Math.sin(n)*Math.sin(n)+Math.sin(h)*Math.sin(h)*Math.cos(e)*Math.cos(r);return 2*s*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))};ma.getArea=function(t,i){var s=i||{};var e=s.radius||ma.DEFAULT_RADIUS;var r=s.projection||"EPSG:3857";t=t.clone().transform(r,"EPSG:4326");var n=t.getType();var h=0;var a,o,f,u,l,v;switch(n){case da.POINT:case da.MULTI_POINT:case da.LINE_STRING:case da.MULTI_LINE_STRING:case da.LINEAR_RING:{break}case da.POLYGON:{a=t.getCoordinates();h=Math.abs(ma.getArea_(a[0],e));for(f=1,u=a.length;f<u;++f){h-=Math.abs(ma.getArea_(a[f],e))}break}case da.MULTI_POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){o=a[f];h+=Math.abs(ma.getArea_(o[0],e));for(l=1,v=o.length;l<v;++l){h-=Math.abs(ma.getArea_(o[l],e))}}break}case da.GEOMETRY_COLLECTION:{var c=t.getGeometries();for(f=0,u=c.length;f<u;++f){h+=ma.getArea(c[f],i)}break}default:{throw new Error("Unsupported geometry type: "+n)}}return h};ma.getArea_=function(t,i){var s=0,e=t.length;var r=t[e-1][0];var n=t[e-1][1];for(var h=0;h<e;h++){var a=t[h][0],o=t[h][1];s+=ca.toRadians(a-r)*(2+Math.sin(ca.toRadians(n))+Math.sin(ca.toRadians(o)));r=a;n=o}return s*i*i/2};var pa={};pa.binarySearch=function(t,i,s){var e,r;var n=s||pa.numberSafeCompareFunction;var h=0;var a=t.length;var o=false;while(h<a){e=h+(a-h>>1);r=+n(t[e],i);if(r<0){h=e+1}else{a=e;o=!r}}return o?h:~h};pa.numberSafeCompareFunction=function(t,i){return t>i?1:t<i?-1:0};pa.includes=function(t,i){return t.indexOf(i)>=0};pa.linearFindNearest=function(t,i,s){var e=t.length;if(t[0]<=i){return 0}else if(i<=t[e-1]){return e-1}else{var r;if(s>0){for(r=1;r<e;++r){if(t[r]<i){return r-1}}}else if(s<0){for(r=1;r<e;++r){if(t[r]<=i){return r}}}else{for(r=1;r<e;++r){if(t[r]==i){return r}else if(t[r]<i){if(t[r-1]-i<i-t[r]){return r-1}else{return r}}}}return e-1}};pa.reverseSubArray=function(t,i,s){while(i<s){var e=t[i];t[i]=t[s];t[s]=e;++i;--s}};pa.extend=function(t,i){var s;var e=Array.isArray(i)?i:[i];var r=e.length;for(s=0;s<r;s++){t[t.length]=e[s]}};pa.remove=function(t,i){var s=t.indexOf(i);var e=s>-1;if(e){t.splice(s,1)}return e};pa.find=function(t,i){var s=t.length>>>0;var e;for(var r=0;r<s;r++){e=t[r];if(i(e,r,t)){return e}}return null};pa.equals=function(t,i){var s=t.length;if(s!==i.length){return false}for(var e=0;e<s;e++){if(t[e]!==i[e]){return false}}return true};pa.stableSort=function(t,i){var s=t.length;var e=Array(t.length);var r;for(r=0;r<s;r++){e[r]={index:r,value:t[r]}}e.sort((function(t,s){return i(t.value,s.value)||t.index-s.index}));for(r=0;r<t.length;r++){t[r]=e[r].value}};pa.findIndex=function(t,i){var s;var e=!t.every((function(e,r){s=r;return!i(e,r,t)}));return e?s:-1};pa.isSorted=function(t,i,s){var e=i||pa.numberSafeCompareFunction;return t.every((function(i,r){if(r===0){return true}var n=e(t[r-1],i);return!(n>0||s&&n===0)}))};var _a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var ga={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};var Ma={};Ma.boundingExtent=function(t){var i=Ma.createEmpty();for(var s=0,e=t.length;s<e;++s){Ma.extendCoordinate(i,t[s])}return i};Ma.boundingExtentXYs_=function(t,i,s){var e=Math.min.apply(null,t);var r=Math.min.apply(null,i);var n=Math.max.apply(null,t);var h=Math.max.apply(null,i);return Ma.createOrUpdate(e,r,n,h,s)};Ma.buffer=function(t,i,s){if(s){s[0]=t[0]-i;s[1]=t[1]-i;s[2]=t[2]+i;s[3]=t[3]+i;return s}else{return[t[0]-i,t[1]-i,t[2]+i,t[3]+i]}};Ma.clone=function(t,i){if(i){i[0]=t[0];i[1]=t[1];i[2]=t[2];i[3]=t[3];return i}else{return t.slice()}};Ma.closestSquaredDistanceXY=function(t,i,s){var e,r;if(i<t[0]){e=t[0]-i}else if(t[2]<i){e=i-t[2]}else{e=0}if(s<t[1]){r=t[1]-s}else if(t[3]<s){r=s-t[3]}else{r=0}return e*e+r*r};Ma.containsCoordinate=function(t,i){return Ma.containsXY(t,i[0],i[1])};Ma.containsExtent=function(t,i){return t[0]<=i[0]&&i[2]<=t[2]&&t[1]<=i[1]&&i[3]<=t[3]};Ma.containsXY=function(t,i,s){return t[0]<=i&&i<=t[2]&&t[1]<=s&&s<=t[3]};Ma.coordinateRelationship=function(t,i){var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=i[0];var a=i[1];var o=ga.UNKNOWN;if(h<s){o=o|ga.LEFT}else if(h>r){o=o|ga.RIGHT}if(a<e){o=o|ga.BELOW}else if(a>n){o=o|ga.ABOVE}if(o===ga.UNKNOWN){o=ga.INTERSECTING}return o};Ma.createEmpty=function(){return[Infinity,Infinity,-Infinity,-Infinity]};Ma.createOrUpdate=function(t,i,s,e,r){if(r){r[0]=t;r[1]=i;r[2]=s;r[3]=e;return r}else{return[t,i,s,e]}};Ma.createOrUpdateEmpty=function(t){return Ma.createOrUpdate(Infinity,Infinity,-Infinity,-Infinity,t)};Ma.createOrUpdateFromCoordinate=function(t,i){var s=t[0];var e=t[1];return Ma.createOrUpdate(s,e,s,e,i)};Ma.createOrUpdateFromCoordinates=function(t,i){var s=Ma.createOrUpdateEmpty(i);return Ma.extendCoordinates(s,t)};Ma.createOrUpdateFromFlatCoordinates=function(t,i,s,e,r){var n=Ma.createOrUpdateEmpty(r);return Ma.extendFlatCoordinates(n,t,i,s,e)};Ma.createOrUpdateFromRings=function(t,i){var s=Ma.createOrUpdateEmpty(i);return Ma.extendRings(s,t)};Ma.equals=function(t,i){return t[0]==i[0]&&t[2]==i[2]&&t[1]==i[1]&&t[3]==i[3]};Ma.extend=function(t,i){if(i[0]<t[0]){t[0]=i[0]}if(i[2]>t[2]){t[2]=i[2]}if(i[1]<t[1]){t[1]=i[1]}if(i[3]>t[3]){t[3]=i[3]}return t};Ma.extendCoordinate=function(t,i){if(i[0]<t[0]){t[0]=i[0]}if(i[0]>t[2]){t[2]=i[0]}if(i[1]<t[1]){t[1]=i[1]}if(i[1]>t[3]){t[3]=i[1]}};Ma.extendCoordinates=function(t,i){var s,e;for(s=0,e=i.length;s<e;++s){Ma.extendCoordinate(t,i[s])}return t};Ma.extendFlatCoordinates=function(t,i,s,e,r){for(;s<e;s+=r){Ma.extendXY(t,i[s],i[s+1])}return t};Ma.extendRings=function(t,i){var s,e;for(s=0,e=i.length;s<e;++s){Ma.extendCoordinates(t,i[s])}return t};Ma.extendXY=function(t,i,s){t[0]=Math.min(t[0],i);t[1]=Math.min(t[1],s);t[2]=Math.max(t[2],i);t[3]=Math.max(t[3],s)};Ma.forEachCorner=function(t,i,s){var e;e=i.call(s,Ma.getBottomLeft(t));if(e){return e}e=i.call(s,Ma.getBottomRight(t));if(e){return e}e=i.call(s,Ma.getTopRight(t));if(e){return e}e=i.call(s,Ma.getTopLeft(t));if(e){return e}return false};Ma.getArea=function(t){var i=0;if(!Ma.isEmpty(t)){i=Ma.getWidth(t)*Ma.getHeight(t)}return i};Ma.getBottomLeft=function(t){return[t[0],t[1]]};Ma.getBottomRight=function(t){return[t[2],t[1]]};Ma.getCenter=function(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]};Ma.getCorner=function(t,i){var s;if(i===_a.BOTTOM_LEFT){s=Ma.getBottomLeft(t)}else if(i===_a.BOTTOM_RIGHT){s=Ma.getBottomRight(t)}else if(i===_a.TOP_LEFT){s=Ma.getTopLeft(t)}else if(i===_a.TOP_RIGHT){s=Ma.getTopRight(t)}else{va.assert(false,13)}return s};Ma.getEnlargedArea=function(t,i){var s=Math.min(t[0],i[0]);var e=Math.min(t[1],i[1]);var r=Math.max(t[2],i[2]);var n=Math.max(t[3],i[3]);return(r-s)*(n-e)};Ma.getForViewAndSize=function(t,i,s,e,r){var n=i*e[0]/2;var h=i*e[1]/2;var a=Math.cos(s);var o=Math.sin(s);var f=n*a;var u=n*o;var l=h*a;var v=h*o;var c=t[0];var d=t[1];var m=c-f+v;var p=c-f-v;var _=c+f-v;var g=c+f+v;var M=d-u-l;var z=d-u+l;var w=d+u+l;var y=d+u-l;return Ma.createOrUpdate(Math.min(m,p,_,g),Math.min(M,z,w,y),Math.max(m,p,_,g),Math.max(M,z,w,y),r)};Ma.getHeight=function(t){return t[3]-t[1]};Ma.getIntersectionArea=function(t,i){var s=Ma.getIntersection(t,i);return Ma.getArea(s)};Ma.getIntersection=function(t,i,s){var e=s?s:Ma.createEmpty();if(Ma.intersects(t,i)){if(t[0]>i[0]){e[0]=t[0]}else{e[0]=i[0]}if(t[1]>i[1]){e[1]=t[1]}else{e[1]=i[1]}if(t[2]<i[2]){e[2]=t[2]}else{e[2]=i[2]}if(t[3]<i[3]){e[3]=t[3]}else{e[3]=i[3]}}return e};Ma.getMargin=function(t){return Ma.getWidth(t)+Ma.getHeight(t)};Ma.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]};Ma.getTopLeft=function(t){return[t[0],t[3]]};Ma.getTopRight=function(t){return[t[2],t[3]]};Ma.getWidth=function(t){return t[2]-t[0]};Ma.intersects=function(t,i){return t[0]<=i[2]&&t[2]>=i[0]&&t[1]<=i[3]&&t[3]>=i[1]};Ma.isEmpty=function(t){return t[2]<t[0]||t[3]<t[1]};Ma.returnOrUpdate=function(t,i){if(i){i[0]=t[0];i[1]=t[1];i[2]=t[2];i[3]=t[3];return i}else{return t}};Ma.scaleFromCenter=function(t,i){var s=(t[2]-t[0])/2*(i-1);var e=(t[3]-t[1])/2*(i-1);t[0]-=s;t[2]+=s;t[1]-=e;t[3]+=e};Ma.intersectsSegment=function(t,i,s){var e=false;var r=Ma.coordinateRelationship(t,i);var n=Ma.coordinateRelationship(t,s);if(r===ga.INTERSECTING||n===ga.INTERSECTING){e=true}else{var h=t[0];var a=t[1];var o=t[2];var f=t[3];var u=i[0];var l=i[1];var v=s[0];var c=s[1];var d=(c-l)/(v-u);var m,p;if(!!(n&ga.ABOVE)&&!(r&ga.ABOVE)){m=v-(c-f)/d;e=m>=h&&m<=o}if(!e&&!!(n&ga.RIGHT)&&!(r&ga.RIGHT)){p=c-(v-o)*d;e=p>=a&&p<=f}if(!e&&!!(n&ga.BELOW)&&!(r&ga.BELOW)){m=v-(c-a)/d;e=m>=h&&m<=o}if(!e&&!!(n&ga.LEFT)&&!(r&ga.LEFT)){p=c-(v-h)*d;e=p>=a&&p<=f}}return e};Ma.applyTransform=function(t,i,s){var e=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];i(e,e,2);var r=[e[0],e[2],e[4],e[6]];var n=[e[1],e[3],e[5],e[7]];return Ma.boundingExtentXYs_(r,n,s)};var za={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};var wa={};wa.TRUE=function(){return true};wa.FALSE=function(){return false};var ya={};ya.transform2D=function(t,i,s,e,r,n){var h=n?n:[];var a=0;var o;for(o=i;o<s;o+=e){var f=t[o];var u=t[o+1];h[a++]=r[0]*f+r[2]*u+r[4];h[a++]=r[1]*f+r[3]*u+r[5]}if(n&&h.length!=a){h.length=a}return h};ya.rotate=function(t,i,s,e,r,n,h){var a=h?h:[];var o=Math.cos(r);var f=Math.sin(r);var u=n[0];var l=n[1];var v=0;for(var c=i;c<s;c+=e){var d=t[c]-u;var m=t[c+1]-l;a[v++]=u+d*o-m*f;a[v++]=l+d*f+m*o;for(var p=c+2;p<c+e;++p){a[v++]=t[p]}}if(h&&a.length!=v){a.length=v}return a};ya.scale=function(t,i,s,e,r,n,h,a){var o=a?a:[];var f=h[0];var u=h[1];var l=0;for(var v=i;v<s;v+=e){var c=t[v]-f;var d=t[v+1]-u;o[l++]=f+r*c;o[l++]=u+n*d;for(var m=v+2;m<v+e;++m){o[l++]=t[m]}}if(a&&o.length!=l){o.length=l}return o};ya.translate=function(t,i,s,e,r,n,h){var a=h?h:[];var o=0;var f,u;for(f=i;f<s;f+=e){a[o++]=t[f]+r;a[o++]=t[f+1]+n;for(u=f+2;u<f+e;++u){a[o++]=t[u]}}if(h&&a.length!=o){a.length=o}return a};var ba={DEGREES:"degrees",FEET:"ft",METERS:"m",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};ba.METERS_PER_UNIT={};ba.METERS_PER_UNIT[ba.DEGREES]=2*Math.PI*6370997/360;ba.METERS_PER_UNIT[ba.FEET]=.3048;ba.METERS_PER_UNIT[ba.METERS]=1;ba.METERS_PER_UNIT[ba.USFEET]=1200/3937;var xa={};xa.cache_=null;xa.set=function(t){xa.cache_=t};xa.get=function(){return xa.cache_||window["proj4"]};var Ea=function(t){this.code_=t.code;this.units_=t.units;this.extent_=t.extent!==undefined?t.extent:null;this.worldExtent_=t.worldExtent!==undefined?t.worldExtent:null;this.axisOrientation_=t.axisOrientation!==undefined?t.axisOrientation:"enu";this.global_=t.global!==undefined?t.global:false;this.canWrapX_=!!(this.global_&&this.extent_);this.getPointResolutionFunc_=t.getPointResolution;this.defaultTileGrid_=null;this.metersPerUnit_=t.metersPerUnit;var i=t.code;if(ta.ENABLE_PROJ4JS){var s=xa.get();if(typeof s=="function"){var e=s.defs(i);if(e!==undefined){if(e.axis!==undefined&&t.axisOrientation===undefined){this.axisOrientation_=e.axis}if(t.metersPerUnit===undefined){this.metersPerUnit_=e.to_meter}if(t.units===undefined){this.units_=e.units}}}}};Ea.prototype.canWrapX=function(){return this.canWrapX_};Ea.prototype.getCode=function(){return this.code_};Ea.prototype.getExtent=function(){return this.extent_};Ea.prototype.getUnits=function(){return this.units_};Ea.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||ba.METERS_PER_UNIT[this.units_]};Ea.prototype.getWorldExtent=function(){return this.worldExtent_};Ea.prototype.getAxisOrientation=function(){return this.axisOrientation_};Ea.prototype.isGlobal=function(){return this.global_};Ea.prototype.setGlobal=function(t){this.global_=t;this.canWrapX_=!!(t&&this.extent_)};Ea.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_};Ea.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t};Ea.prototype.setExtent=function(t){this.extent_=t;this.canWrapX_=!!(this.global_&&t)};Ea.prototype.setWorldExtent=function(t){this.worldExtent_=t};Ea.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t};Ea.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var Sa={};Sa.Projection_=function(t){Ea.call(this,{code:t,units:ba.METERS,extent:Sa.EXTENT,global:true,worldExtent:Sa.WORLD_EXTENT,getPointResolution:function(t,i){return t/ca.cosh(i[1]/Sa.RADIUS)}})};ta.inherits(Sa.Projection_,Ea);Sa.RADIUS=6378137;Sa.HALF_SIZE=Math.PI*Sa.RADIUS;Sa.EXTENT=[-Sa.HALF_SIZE,-Sa.HALF_SIZE,Sa.HALF_SIZE,Sa.HALF_SIZE];Sa.WORLD_EXTENT=[-180,-85,180,85];Sa.PROJECTIONS=[new Sa.Projection_("EPSG:3857"),new Sa.Projection_("EPSG:102100"),new Sa.Projection_("EPSG:102113"),new Sa.Projection_("EPSG:900913"),new Sa.Projection_("urn:ogc:def:crs:EPSG:6.18:3:3857"),new Sa.Projection_("urn:ogc:def:crs:EPSG::3857"),new Sa.Projection_("http://www.opengis.net/gml/srs/epsg.xml#3857")];Sa.fromEPSG4326=function(t,i,s){var e=t.length,r=s>1?s:2,n=i;if(n===undefined){if(r>2){n=t.slice()}else{n=new Array(e)}}var h=Sa.HALF_SIZE;for(var a=0;a<e;a+=r){n[a]=h*t[a]/180;var o=Sa.RADIUS*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));if(o>h){o=h}else if(o<-h){o=-h}n[a+1]=o}return n};Sa.toEPSG4326=function(t,i,s){var e=t.length,r=s>1?s:2,n=i;if(n===undefined){if(r>2){n=t.slice()}else{n=new Array(e)}}for(var h=0;h<e;h+=r){n[h]=180*t[h]/Sa.HALF_SIZE;n[h+1]=360*Math.atan(Math.exp(t[h+1]/Sa.RADIUS))/Math.PI-90}return n};var Ga={};Ga.Projection_=function(t,i){Ea.call(this,{code:t,units:ba.DEGREES,extent:Ga.EXTENT,axisOrientation:i,global:true,metersPerUnit:Ga.METERS_PER_UNIT,worldExtent:Ga.EXTENT})};ta.inherits(Ga.Projection_,Ea);Ga.RADIUS=6378137;Ga.EXTENT=[-180,-90,180,90];Ga.METERS_PER_UNIT=Math.PI*Ga.RADIUS/180;Ga.PROJECTIONS=[new Ga.Projection_("CRS:84"),new Ga.Projection_("EPSG:4326","neu"),new Ga.Projection_("urn:ogc:def:crs:EPSG::4326","neu"),new Ga.Projection_("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Ga.Projection_("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ga.Projection_("urn:ogc:def:crs:OGC:2:84"),new Ga.Projection_("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ga.Projection_("urn:x-ogc:def:crs:EPSG:4326","neu")];var Pa={};Pa.cache_={};Pa.clear=function(){Pa.cache_={}};Pa.get=function(t){var i=Pa.cache_;return i[t]||null};Pa.add=function(t,i){var s=Pa.cache_;s[t]=i};var ka={};ka.cache_={};ka.clear=function(){ka.cache_={}};ka.add=function(t,i,s){var e=t.getCode();var r=i.getCode();var n=ka.cache_;if(!(e in n)){n[e]={}}n[e][r]=s};ka.remove=function(t,i){var s=t.getCode();var e=i.getCode();var r=ka.cache_;var n=r[s][e];delete r[s][e];if(ea.isEmpty(r[s])){delete r[s]}return n};ka.get=function(t,i){var s;var e=ka.cache_;if(t in e&&i in e[t]){s=e[t][i]}return s};var Na={};Na.METERS_PER_UNIT=ba.METERS_PER_UNIT;Na.SPHERE_=new ma(ma.DEFAULT_RADIUS);if(ta.ENABLE_PROJ4JS){Na.setProj4=function(t){xa.set(t)}}Na.getPointResolution=function(t,i,s,e){t=Na.get(t);var r;var n=t.getPointResolutionFunc();if(n){r=n(i,s)}else{var h=t.getUnits();if(h==ba.DEGREES&&!e||e==ba.DEGREES){r=i}else{var a=Na.getTransformFromProjections(t,Na.get("EPSG:4326"));var o=[s[0]-i/2,s[1],s[0]+i/2,s[1],s[0],s[1]-i/2,s[0],s[1]+i/2];o=a(o,o,2);var f=Na.SPHERE_.haversineDistance(o.slice(0,2),o.slice(2,4));var u=Na.SPHERE_.haversineDistance(o.slice(4,6),o.slice(6,8));r=(f+u)/2;var l=e?ba.METERS_PER_UNIT[e]:t.getMetersPerUnit();if(l!==undefined){r/=l}}}return r};Na.addEquivalentProjections=function(t){Na.addProjections(t);t.forEach((function(i){t.forEach((function(t){if(i!==t){ka.add(i,t,Na.cloneTransform)}}))}))};Na.addEquivalentTransforms=function(t,i,s,e){t.forEach((function(t){i.forEach((function(i){ka.add(t,i,s);ka.add(i,t,e)}))}))};Na.addProjection=function(t){Pa.add(t.getCode(),t);ka.add(t,t,Na.cloneTransform)};Na.addProjections=function(t){t.forEach(Na.addProjection)};Na.clearAllProjections=function(){Pa.clear();ka.clear()};Na.createProjection=function(t,i){if(!t){return Na.get(i)}else if(typeof t==="string"){return Na.get(t)}else{return t}};Na.addCoordinateTransforms=function(t,i,s,e){var r=Na.get(t);var n=Na.get(i);ka.add(r,n,Na.createTransformFromCoordinateTransform(s));ka.add(n,r,Na.createTransformFromCoordinateTransform(e))};Na.createTransformFromCoordinateTransform=function(t){return function(i,s,e){var r=i.length;var n=e!==undefined?e:2;var h=s!==undefined?s:new Array(r);var a,o,f;for(o=0;o<r;o+=n){a=t([i[o],i[o+1]]);h[o]=a[0];h[o+1]=a[1];for(f=n-1;f>=2;--f){h[o+f]=i[o+f]}}return h}};Na.fromLonLat=function(t,i){return Na.transform(t,"EPSG:4326",i!==undefined?i:"EPSG:3857")};Na.toLonLat=function(t,i){var s=Na.transform(t,i!==undefined?i:"EPSG:3857","EPSG:4326");var e=s[0];if(e<-180||e>180){s[0]=ca.modulo(e+180,360)-180}return s};Na.get=function(t){var i=null;if(t instanceof Ea){i=t}else if(typeof t==="string"){var s=t;i=Pa.get(s);if(ta.ENABLE_PROJ4JS&&!i){var e=xa.get();if(typeof e=="function"&&e.defs(s)!==undefined){i=new Ea({code:s});Na.addProjection(i)}}}return i};Na.equivalent=function(t,i){if(t===i){return true}var s=t.getUnits()===i.getUnits();if(t.getCode()===i.getCode()){return s}else{var e=Na.getTransformFromProjections(t,i);return e===Na.cloneTransform&&s}};Na.getTransform=function(t,i){var s=Na.get(t);var e=Na.get(i);return Na.getTransformFromProjections(s,e)};Na.getTransformFromProjections=function(t,i){var s=t.getCode();var e=i.getCode();var r=ka.get(s,e);if(ta.ENABLE_PROJ4JS&&!r){var n=xa.get();if(typeof n=="function"){var h=n.defs(s);var a=n.defs(e);if(h!==undefined&&a!==undefined){if(h===a){Na.addEquivalentProjections([i,t])}else{var o=n(e,s);Na.addCoordinateTransforms(i,t,o.forward,o.inverse)}r=ka.get(s,e)}}}if(!r){r=Na.identityTransform}return r};Na.identityTransform=function(t,i,s){if(i!==undefined&&t!==i){for(var e=0,r=t.length;e<r;++e){i[e]=t[e]}t=i}return t};Na.cloneTransform=function(t,i,s){var e;if(i!==undefined){for(var r=0,n=t.length;r<n;++r){i[r]=t[r]}e=i}else{e=t.slice()}return e};Na.transform=function(t,i,s){var e=Na.getTransform(i,s);return e(t,undefined,t.length)};Na.transformExtent=function(t,i,s){var e=Na.getTransform(i,s);return Ma.applyTransform(t,e)};Na.transformWithProjections=function(t,i,s){var e=Na.getTransformFromProjections(i,s);return e(t)};Na.addCommon=function(){Na.addEquivalentProjections(Sa.PROJECTIONS);Na.addEquivalentProjections(Ga.PROJECTIONS);Na.addEquivalentTransforms(Ga.PROJECTIONS,Sa.PROJECTIONS,Sa.fromEPSG4326,Sa.toEPSG4326)};Na.addCommon();var Ia={};Ia.tmp_=new Array(6);Ia.create=function(){return[1,0,0,1,0,0]};Ia.reset=function(t){return Ia.set(t,1,0,0,1,0,0)};Ia.multiply=function(t,i){var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=t[4];var a=t[5];var o=i[0];var f=i[1];var u=i[2];var l=i[3];var v=i[4];var c=i[5];t[0]=s*o+r*f;t[1]=e*o+n*f;t[2]=s*u+r*l;t[3]=e*u+n*l;t[4]=s*v+r*c+h;t[5]=e*v+n*c+a;return t};Ia.set=function(t,i,s,e,r,n,h){t[0]=i;t[1]=s;t[2]=e;t[3]=r;t[4]=n;t[5]=h;return t};Ia.setFromArray=function(t,i){t[0]=i[0];t[1]=i[1];t[2]=i[2];t[3]=i[3];t[4]=i[4];t[5]=i[5];return t};Ia.apply=function(t,i){var s=i[0],e=i[1];i[0]=t[0]*s+t[2]*e+t[4];i[1]=t[1]*s+t[3]*e+t[5];return i};Ia.rotate=function(t,i){var s=Math.cos(i);var e=Math.sin(i);return Ia.multiply(t,Ia.set(Ia.tmp_,s,e,-e,s,0,0))};Ia.scale=function(t,i,s){return Ia.multiply(t,Ia.set(Ia.tmp_,i,0,0,s,0,0))};Ia.translate=function(t,i,s){return Ia.multiply(t,Ia.set(Ia.tmp_,1,0,0,1,i,s))};Ia.compose=function(t,i,s,e,r,n,h,a){var o=Math.sin(n);var f=Math.cos(n);t[0]=e*f;t[1]=r*o;t[2]=-e*o;t[3]=r*f;t[4]=h*e*f-a*e*o+i;t[5]=h*r*o+a*r*f+s;return t};Ia.invert=function(t){var i=Ia.determinant(t);va.assert(i!==0,32);var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=t[4];var a=t[5];t[0]=n/i;t[1]=-e/i;t[2]=-r/i;t[3]=s/i;t[4]=(r*a-n*h)/i;t[5]=-(s*a-e*h)/i;return t};Ia.determinant=function(t){return t[0]*t[3]-t[1]*t[2]};var Ca=function(){ua.call(this);this.extent_=Ma.createEmpty();this.extentRevision_=-1;this.simplifiedGeometryCache={};this.simplifiedGeometryMaxMinSquaredTolerance=0;this.simplifiedGeometryRevision=0;this.tmpTransform_=Ia.create()};ta.inherits(Ca,ua);Ca.prototype.clone=function(){};Ca.prototype.closestPointXY=function(t,i,s,e){};Ca.prototype.getClosestPoint=function(t,i){var s=i?i:[NaN,NaN];this.closestPointXY(t[0],t[1],s,Infinity);return s};Ca.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])};Ca.prototype.computeExtent=function(t){};Ca.prototype.containsXY=wa.FALSE;Ca.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){this.extent_=this.computeExtent(this.extent_);this.extentRevision_=this.getRevision()}return Ma.returnOrUpdate(this.extent_,t)};Ca.prototype.rotate=function(t,i){};Ca.prototype.scale=function(t,i,s){};Ca.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)};Ca.prototype.getSimplifiedGeometry=function(t){};Ca.prototype.getType=function(){};Ca.prototype.applyTransform=function(t){};Ca.prototype.intersectsExtent=function(t){};Ca.prototype.translate=function(t,i){};Ca.prototype.transform=function(t,i){var s=this.tmpTransform_;t=Na.get(t);var e=t.getUnits()==ba.TILE_PIXELS?function(e,r,n){var h=t.getExtent();var a=t.getWorldExtent();var o=Ma.getHeight(a)/Ma.getHeight(h);Ia.compose(s,a[0],a[3],o,-o,0,0,0);ya.transform2D(e,0,e.length,n,s,r);return Na.getTransform(t,i)(e,r,n)}:Na.getTransform(t,i);this.applyTransform(e);return this};var Aa=function(){Ca.call(this);this.layout=za.XY;this.stride=2;this.flatCoordinates=null};ta.inherits(Aa,Ca);Aa.getLayoutForStride_=function(t){var i;if(t==2){i=za.XY}else if(t==3){i=za.XYZ}else if(t==4){i=za.XYZM}return i};Aa.getStrideForLayout=function(t){var i;if(t==za.XY){i=2}else if(t==za.XYZ||t==za.XYM){i=3}else if(t==za.XYZM){i=4}return i};Aa.prototype.containsXY=wa.FALSE;Aa.prototype.computeExtent=function(t){return Ma.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)};Aa.prototype.getCoordinates=function(){};Aa.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)};Aa.prototype.getFlatCoordinates=function(){return this.flatCoordinates};Aa.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)};Aa.prototype.getLayout=function(){return this.layout};Aa.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()){ea.clear(this.simplifiedGeometryCache);this.simplifiedGeometryMaxMinSquaredTolerance=0;this.simplifiedGeometryRevision=this.getRevision()}if(t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance){return this}var i=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(i)){return this.simplifiedGeometryCache[i]}else{var s=this.getSimplifiedGeometryInternal(t);var e=s.getFlatCoordinates();if(e.length<this.flatCoordinates.length){this.simplifiedGeometryCache[i]=s;return s}else{this.simplifiedGeometryMaxMinSquaredTolerance=t;return this}}};Aa.prototype.getSimplifiedGeometryInternal=function(t){return this};Aa.prototype.getStride=function(){return this.stride};Aa.prototype.setFlatCoordinatesInternal=function(t,i){this.stride=Aa.getStrideForLayout(t);this.layout=t;this.flatCoordinates=i};Aa.prototype.setCoordinates=function(t,i){};Aa.prototype.setLayout=function(t,i,s){var e;if(t){e=Aa.getStrideForLayout(t)}else{var r;for(r=0;r<s;++r){if(i.length===0){this.layout=za.XY;this.stride=2;return}else{i=i[0]}}e=i.length;t=Aa.getLayoutForStride_(e)}this.layout=t;this.stride=e};Aa.prototype.applyTransform=function(t){if(this.flatCoordinates){t(this.flatCoordinates,this.flatCoordinates,this.stride);this.changed()}};Aa.prototype.rotate=function(t,i){var s=this.getFlatCoordinates();if(s){var e=this.getStride();ya.rotate(s,0,s.length,e,t,i,s);this.changed()}};Aa.prototype.scale=function(t,i,s){var e=i;if(e===undefined){e=t}var r=s;if(!r){r=Ma.getCenter(this.getExtent())}var n=this.getFlatCoordinates();if(n){var h=this.getStride();ya.scale(n,0,n.length,h,t,e,r,n);this.changed()}};Aa.prototype.translate=function(t,i){var s=this.getFlatCoordinates();if(s){var e=this.getStride();ya.translate(s,0,s.length,e,t,i,s);this.changed()}};Aa.transform2D=function(t,i,s){var e=t.getFlatCoordinates();if(!e){return null}else{var r=t.getStride();return ya.transform2D(e,0,e.length,r,i,s)}};var Ra={};Ra.linearRing=function(t,i,s,e){var r=0;var n=t[s-e];var h=t[s-e+1];for(;i<s;i+=e){var a=t[i];var o=t[i+1];r+=h*a-n*o;n=a;h=o}return r/2};Ra.linearRings=function(t,i,s,e){var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r+=Ra.linearRing(t,i,a,e);i=a}return r};Ra.linearRingss=function(t,i,s,e){var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r+=Ra.linearRings(t,i,a,e);i=a[a.length-1]}return r};var Ta={};Ta.point=function(t,i,s,e,r,n,h){var a=t[i];var o=t[i+1];var f=t[s]-a;var u=t[s+1]-o;var l,v;if(f===0&&u===0){v=i}else{var c=((r-a)*f+(n-o)*u)/(f*f+u*u);if(c>1){v=s}else if(c>0){for(l=0;l<e;++l){h[l]=ca.lerp(t[i+l],t[s+l],c)}h.length=e;return}else{v=i}}for(l=0;l<e;++l){h[l]=t[v+l]}h.length=e};Ta.getMaxSquaredDelta=function(t,i,s,e,r){var n=t[i];var h=t[i+1];for(i+=e;i<s;i+=e){var a=t[i];var o=t[i+1];var f=ca.squaredDistance(n,h,a,o);if(f>r){r=f}n=a;h=o}return r};Ta.getsMaxSquaredDelta=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r=Ta.getMaxSquaredDelta(t,i,a,e,r);i=a}return r};Ta.getssMaxSquaredDelta=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r=Ta.getsMaxSquaredDelta(t,i,a,e,r);i=a[a.length-1]}return r};Ta.getClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){if(i==s){return f}var l,v;if(r===0){v=ca.squaredDistance(h,a,t[i],t[i+1]);if(v<f){for(l=0;l<e;++l){o[l]=t[i+l]}o.length=e;return v}else{return f}}var c=u?u:[NaN,NaN];var d=i+e;while(d<s){Ta.point(t,d-e,d,e,h,a,c);v=ca.squaredDistance(h,a,c[0],c[1]);if(v<f){f=v;for(l=0;l<e;++l){o[l]=c[l]}o.length=e;d+=e}else{d+=e*Math.max((Math.sqrt(v)-Math.sqrt(f))/r|0,1)}}if(n){Ta.point(t,s-e,i,e,h,a,c);v=ca.squaredDistance(h,a,c[0],c[1]);if(v<f){f=v;for(l=0;l<e;++l){o[l]=c[l]}o.length=e}}return f};Ta.getsClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){var l=u?u:[NaN,NaN];var v,c;for(v=0,c=s.length;v<c;++v){var d=s[v];f=Ta.getClosestPoint(t,i,d,e,r,n,h,a,o,f,l);i=d}return f};Ta.getssClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){var l=u?u:[NaN,NaN];var v,c;for(v=0,c=s.length;v<c;++v){var d=s[v];f=Ta.getsClosestPoint(t,i,d,e,r,n,h,a,o,f,l);i=d[d.length-1]}return f};var Oa={};Oa.coordinate=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){t[i++]=s[r]}return i};Oa.coordinates=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){var h=s[r];var a;for(a=0;a<e;++a){t[i++]=h[a]}}return i};Oa.coordinatess=function(t,i,s,e,r){var n=r?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=Oa.coordinates(t,i,s[a],e);n[h++]=f;i=f}n.length=h;return n};Oa.coordinatesss=function(t,i,s,e,r){var n=r?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=Oa.coordinatess(t,i,s[a],e,n[h]);n[h++]=f;i=f[f.length-1]}n.length=h;return n};var La={};La.coordinates=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a;for(a=i;a<s;a+=e){n[h++]=t.slice(a,a+e)}n.length=h;return n};La.coordinatess=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=s[a];n[h++]=La.coordinates(t,i,f,e,n[h]);i=f}n.length=h;return n};La.coordinatesss=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=s[a];n[h++]=La.coordinatess(t,i,f,e,n[h]);i=f[f.length-1]}n.length=h;return n};var Fa={};Fa.lineString=function(t,i,s,e,r,n,h){var a=h!==undefined?h:[];if(!n){s=Fa.radialDistance(t,i,s,e,r,a,0);t=a;i=0;e=2}a.length=Fa.douglasPeucker(t,i,s,e,r,a,0);return a};Fa.douglasPeucker=function(t,i,s,e,r,n,h){var a=(s-i)/e;if(a<3){for(;i<s;i+=e){n[h++]=t[i];n[h++]=t[i+1]}return h}var o=new Array(a);o[0]=1;o[a-1]=1;var f=[i,s-e];var u=0;var l;while(f.length>0){var v=f.pop();var c=f.pop();var d=0;var m=t[c];var p=t[c+1];var _=t[v];var g=t[v+1];for(l=c+e;l<v;l+=e){var M=t[l];var z=t[l+1];var w=ca.squaredSegmentDistance(M,z,m,p,_,g);if(w>d){u=l;d=w}}if(d>r){o[(u-i)/e]=1;if(c+e<u){f.push(c,u)}if(u+e<v){f.push(u,v)}}}for(l=0;l<a;++l){if(o[l]){n[h++]=t[i+l*e];n[h++]=t[i+l*e+1]}}return h};Fa.douglasPeuckers=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];h=Fa.douglasPeucker(t,i,u,e,r,n,h);a.push(h);i=u}return h};Fa.douglasPeuckerss=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];var l=[];h=Fa.douglasPeuckers(t,i,u,e,r,n,h,l);a.push(l);i=u[u.length-1]}return h};Fa.radialDistance=function(t,i,s,e,r,n,h){if(s<=i+e){for(;i<s;i+=e){n[h++]=t[i];n[h++]=t[i+1]}return h}var a=t[i];var o=t[i+1];n[h++]=a;n[h++]=o;var f=a;var u=o;for(i+=e;i<s;i+=e){f=t[i];u=t[i+1];if(ca.squaredDistance(a,o,f,u)>r){n[h++]=f;n[h++]=u;a=f;o=u}}if(f!=a||u!=o){n[h++]=f;n[h++]=u}return h};Fa.snap=function(t,i){return i*Math.round(t/i)};Fa.quantize=function(t,i,s,e,r,n,h){if(i==s){return h}var a=Fa.snap(t[i],r);var o=Fa.snap(t[i+1],r);i+=e;n[h++]=a;n[h++]=o;var f,u;do{f=Fa.snap(t[i],r);u=Fa.snap(t[i+1],r);i+=e;if(i==s){n[h++]=f;n[h++]=u;return h}}while(f==a&&u==o);while(i<s){var l,v;l=Fa.snap(t[i],r);v=Fa.snap(t[i+1],r);i+=e;if(l==f&&v==u){continue}var c=f-a;var d=u-o;var m=l-a;var p=v-o;if(c*p==d*m&&(c<0&&m<c||c==m||c>0&&m>c)&&(d<0&&p<d||d==p||d>0&&p>d)){f=l;u=v;continue}n[h++]=f;n[h++]=u;a=f;o=u;f=l;u=v}n[h++]=f;n[h++]=u;return h};Fa.quantizes=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];h=Fa.quantize(t,i,u,e,r,n,h);a.push(h);i=u}return h};Fa.quantizess=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];var l=[];h=Fa.quantizes(t,i,u,e,r,n,h,l);a.push(l);i=u[u.length-1]}return h};var Da=function(t,i){Aa.call(this);this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.setCoordinates(t,i)};ta.inherits(Da,Aa);Da.prototype.clone=function(){var t=new Da(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Da.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,true,t,i,s,e)};Da.prototype.getArea=function(){return Ra.linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Da.prototype.getCoordinates=function(){return La.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Da.prototype.getSimplifiedGeometryInternal=function(t){var i=[];i.length=Fa.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0);var s=new Da(null);s.setFlatCoordinates(za.XY,i);return s};Da.prototype.getType=function(){return da.LINEAR_RING};Da.prototype.intersectsExtent=function(t){};Da.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,1);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinates(this.flatCoordinates,0,t,this.stride);this.changed()}};Da.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var Wa=function(t,i){Aa.call(this);this.setCoordinates(t,i)};ta.inherits(Wa,Aa);Wa.prototype.clone=function(){var t=new Wa(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Wa.prototype.closestPointXY=function(t,i,s,e){var r=this.flatCoordinates;var n=ca.squaredDistance(t,i,r[0],r[1]);if(n<e){var h=this.stride;var a;for(a=0;a<h;++a){s[a]=r[a]}s.length=h;return n}else{return e}};Wa.prototype.getCoordinates=function(){return!this.flatCoordinates?[]:this.flatCoordinates.slice()};Wa.prototype.computeExtent=function(t){return Ma.createOrUpdateFromCoordinate(this.flatCoordinates,t)};Wa.prototype.getType=function(){return da.POINT};Wa.prototype.intersectsExtent=function(t){return Ma.containsXY(t,this.flatCoordinates[0],this.flatCoordinates[1])};Wa.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,0);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinate(this.flatCoordinates,0,t,this.stride);this.changed()}};Wa.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var ja={};ja.linearRingContainsExtent=function(t,i,s,e,r){var n=Ma.forEachCorner(r,(function(r){return!ja.linearRingContainsXY(t,i,s,e,r[0],r[1])}));return!n};ja.linearRingContainsXY=function(t,i,s,e,r,n){var h=0;var a=t[s-e];var o=t[s-e+1];for(;i<s;i+=e){var f=t[i];var u=t[i+1];if(o<=n){if(u>n&&(f-a)*(n-o)-(r-a)*(u-o)>0){h++}}else if(u<=n&&(f-a)*(n-o)-(r-a)*(u-o)<0){h--}a=f;o=u}return h!==0};ja.linearRingsContainsXY=function(t,i,s,e,r,n){if(s.length===0){return false}if(!ja.linearRingContainsXY(t,i,s[0],e,r,n)){return false}var h,a;for(h=1,a=s.length;h<a;++h){if(ja.linearRingContainsXY(t,s[h-1],s[h],e,r,n)){return false}}return true};ja.linearRingssContainsXY=function(t,i,s,e,r,n){if(s.length===0){return false}var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];if(ja.linearRingsContainsXY(t,i,o,e,r,n)){return true}i=o[o.length-1]}return false};var Va={};Va.linearRings=function(t,i,s,e,r,n,h){var a,o,f,u,l,v,c;var d=r[n+1];var m=[];for(var p=0,_=s.length;p<_;++p){var g=s[p];u=t[g-e];v=t[g-e+1];for(a=i;a<g;a+=e){l=t[a];c=t[a+1];if(d<=v&&c<=d||v<=d&&d<=c){f=(d-v)/(c-v)*(l-u)+u;m.push(f)}u=l;v=c}}var M=NaN;var z=-Infinity;m.sort(pa.numberSafeCompareFunction);u=m[0];for(a=1,o=m.length;a<o;++a){l=m[a];var w=Math.abs(l-u);if(w>z){f=(u+l)/2;if(ja.linearRingsContainsXY(t,i,s,e,f,d)){M=f;z=w}}u=l}if(isNaN(M)){M=r[n]}if(h){h.push(M,d,z);return h}else{return[M,d,z]}};Va.linearRingss=function(t,i,s,e,r){var n=[];var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];n=Va.linearRings(t,i,o,e,r,2*h,n);i=o[o.length-1]}return n};var Ua={};Ua.forEach=function(t,i,s,e,r,n){var h=[t[i],t[i+1]];var a=[];var o;for(;i+e<s;i+=e){a[0]=t[i+e];a[1]=t[i+e+1];o=r.call(n,h,a);if(o){return o}h[0]=a[0];h[1]=a[1]}return false};var qa={};qa.lineString=function(t,i,s,e,r){var n=Ma.extendFlatCoordinates(Ma.createEmpty(),t,i,s,e);if(!Ma.intersects(r,n)){return false}if(Ma.containsExtent(r,n)){return true}if(n[0]>=r[0]&&n[2]<=r[2]){return true}if(n[1]>=r[1]&&n[3]<=r[3]){return true}return Ua.forEach(t,i,s,e,(function(t,i){return Ma.intersectsSegment(r,t,i)}))};qa.lineStrings=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){if(qa.lineString(t,i,s[n],e,r)){return true}i=s[n]}return false};qa.linearRing=function(t,i,s,e,r){if(qa.lineString(t,i,s,e,r)){return true}if(ja.linearRingContainsXY(t,i,s,e,r[0],r[1])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[0],r[3])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[2],r[1])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[2],r[3])){return true}return false};qa.linearRings=function(t,i,s,e,r){if(!qa.linearRing(t,i,s[0],e,r)){return false}if(s.length===1){return true}var n,h;for(n=1,h=s.length;n<h;++n){if(ja.linearRingContainsExtent(t,s[n-1],s[n],e,r)){return false}}return true};qa.linearRingss=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];if(qa.linearRings(t,i,a,e,r)){return true}i=a[a.length-1]}return false};var Ba={};Ba.coordinates=function(t,i,s,e){while(i<s-e){var r;for(r=0;r<e;++r){var n=t[i+r];t[i+r]=t[s-e+r];t[s-e+r]=n}i+=e;s-=e}};var Ha={};Ha.linearRingIsClockwise=function(t,i,s,e){var r=0;var n=t[s-e];var h=t[s-e+1];for(;i<s;i+=e){var a=t[i];var o=t[i+1];r+=(a-n)*(o+h);n=a;h=o}return r>0};Ha.linearRingsAreOriented=function(t,i,s,e,r){var n=r!==undefined?r:false;var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];var f=Ha.linearRingIsClockwise(t,i,o,e);if(h===0){if(n&&f||!n&&!f){return false}}else{if(n&&!f||!n&&f){return false}}i=o}return true};Ha.linearRingssAreOriented=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){if(!Ha.linearRingsAreOriented(t,i,s[n],e,r)){return false}}return true};Ha.orientLinearRings=function(t,i,s,e,r){var n=r!==undefined?r:false;var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];var f=Ha.linearRingIsClockwise(t,i,o,e);var u=h===0?n&&f||!n&&!f:n&&!f||!n&&f;if(u){Ba.coordinates(t,i,o,e)}i=o}return i};Ha.orientLinearRingss=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){i=Ha.orientLinearRings(t,i,s[n],e,r)}return i};var Xa=function(t,i){Aa.call(this);this.ends_=[];this.flatInteriorPointRevision_=-1;this.flatInteriorPoint_=null;this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.orientedRevision_=-1;this.orientedFlatCoordinates_=null;this.setCoordinates(t,i)};ta.inherits(Xa,Aa);Xa.prototype.appendLinearRing=function(t){if(!this.flatCoordinates){this.flatCoordinates=t.getFlatCoordinates().slice()}else{pa.extend(this.flatCoordinates,t.getFlatCoordinates())}this.ends_.push(this.flatCoordinates.length);this.changed()};Xa.prototype.clone=function(){var t=new Xa(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice());return t};Xa.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,true,t,i,s,e)};Xa.prototype.containsXY=function(t,i){return ja.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,i)};Xa.prototype.getArea=function(){return Ra.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)};Xa.prototype.getCoordinates=function(t){var i;if(t!==undefined){i=this.getOrientedFlatCoordinates().slice();Ha.orientLinearRings(i,0,this.ends_,this.stride,t)}else{i=this.flatCoordinates}return La.coordinatess(i,0,this.ends_,this.stride)};Xa.prototype.getEnds=function(){return this.ends_};Xa.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Ma.getCenter(this.getExtent());this.flatInteriorPoint_=Va.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0);this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_};Xa.prototype.getInteriorPoint=function(){return new Wa(this.getFlatInteriorPoint(),za.XYM)};Xa.prototype.getLinearRingCount=function(){return this.ends_.length};Xa.prototype.getLinearRing=function(t){if(t<0||this.ends_.length<=t){return null}var i=new Da(null);i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]));return i};Xa.prototype.getLinearRings=function(){var t=this.layout;var i=this.flatCoordinates;var s=this.ends_;var e=[];var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];var o=new Da(null);o.setFlatCoordinates(t,i.slice(r,a));e.push(o);r=a}return e};Xa.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;if(Ha.linearRingsAreOriented(t,0,this.ends_,this.stride)){this.orientedFlatCoordinates_=t}else{this.orientedFlatCoordinates_=t.slice();this.orientedFlatCoordinates_.length=Ha.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)}this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_};Xa.prototype.getSimplifiedGeometryInternal=function(t){var i=[];var s=[];i.length=Fa.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,s);var e=new Xa(null);e.setFlatCoordinates(za.XY,i,s);return e};Xa.prototype.getType=function(){return da.POLYGON};Xa.prototype.intersectsExtent=function(t){return qa.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)};Xa.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null,this.ends_)}else{this.setLayout(i,t,2);if(!this.flatCoordinates){this.flatCoordinates=[]}var s=Oa.coordinatess(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=s.length===0?0:s[s.length-1];this.changed()}};Xa.prototype.setFlatCoordinates=function(t,i,s){this.setFlatCoordinatesInternal(t,i);this.ends_=s;this.changed()};Xa.circular=function(t,i,s,e){var r=e?e:32;var n=[];var h;for(h=0;h<r;++h){pa.extend(n,t.offset(i,s,2*Math.PI*h/r))}n.push(n[0],n[1]);var a=new Xa(null);a.setFlatCoordinates(za.XY,n,[n.length]);return a};Xa.fromExtent=function(t){var i=t[0];var s=t[1];var e=t[2];var r=t[3];var n=[i,s,i,r,e,r,e,s,i,s];var h=new Xa(null);h.setFlatCoordinates(za.XY,n,[n.length]);return h};Xa.fromCircle=function(t,i,s){var e=i?i:32;var r=t.getStride();var n=t.getLayout();var h=new Xa(null,n);var a=r*(e+1);var o=new Array(a);for(var f=0;f<a;f++){o[f]=0}var u=[o.length];h.setFlatCoordinates(n,o,u);Xa.makeRegular(h,t.getCenter(),t.getRadius(),s);return h};Xa.makeRegular=function(t,i,s,e){var r=t.getFlatCoordinates();var n=t.getLayout();var h=t.getStride();var a=t.getEnds();var o=r.length/h-1;var f=e?e:0;var u,l;for(var v=0;v<=o;++v){l=v*h;u=f+ca.modulo(v,o)*2*Math.PI/o;r[l]=i[0]+s*Math.cos(u);r[l+1]=i[1]+s*Math.sin(u)}t.setFlatCoordinates(n,r,a)};var Ya={};Ya.ONE=1;Ya.SRC_ALPHA=770;Ya.COLOR_ATTACHMENT0=36064;Ya.COLOR_BUFFER_BIT=16384;Ya.TRIANGLES=4;Ya.TRIANGLE_STRIP=5;Ya.ONE_MINUS_SRC_ALPHA=771;Ya.ARRAY_BUFFER=34962;Ya.ELEMENT_ARRAY_BUFFER=34963;Ya.STREAM_DRAW=35040;Ya.STATIC_DRAW=35044;Ya.DYNAMIC_DRAW=35048;Ya.CULL_FACE=2884;Ya.BLEND=3042;Ya.STENCIL_TEST=2960;Ya.DEPTH_TEST=2929;Ya.SCISSOR_TEST=3089;Ya.UNSIGNED_BYTE=5121;Ya.UNSIGNED_SHORT=5123;Ya.UNSIGNED_INT=5125;Ya.FLOAT=5126;Ya.RGBA=6408;Ya.FRAGMENT_SHADER=35632;Ya.VERTEX_SHADER=35633;Ya.LINK_STATUS=35714;Ya.LINEAR=9729;Ya.TEXTURE_MAG_FILTER=10240;Ya.TEXTURE_MIN_FILTER=10241;Ya.TEXTURE_WRAP_S=10242;Ya.TEXTURE_WRAP_T=10243;Ya.TEXTURE_2D=3553;Ya.TEXTURE0=33984;Ya.CLAMP_TO_EDGE=33071;Ya.COMPILE_STATUS=35713;Ya.FRAMEBUFFER=36160;Ya.CONTEXT_IDS_=["experimental-webgl","webgl","webkit-3d","moz-webgl"];Ya.getContext=function(t,i){var s,e,r=Ya.CONTEXT_IDS_.length;for(e=0;e<r;++e){try{s=t.getContext(Ya.CONTEXT_IDS_[e],i);if(s){return s}}catch(t){}}return null};var Ja={};var Ka=typeof navigator!=="undefined"?navigator.userAgent.toLowerCase():"";Ja.FIREFOX=Ka.indexOf("firefox")!==-1;Ja.SAFARI=Ka.indexOf("safari")!==-1&&Ka.indexOf("chrom")==-1;Ja.WEBKIT=Ka.indexOf("webkit")!==-1&&Ka.indexOf("edge")==-1;Ja.MAC=Ka.indexOf("macintosh")!==-1;Ja.DEVICE_PIXEL_RATIO=window.devicePixelRatio||1;Ja.CANVAS_LINE_DASH=false;Ja.CANVAS=ta.ENABLE_CANVAS&&function(){if(!("HTMLCanvasElement"in window)){return false}try{var t=document.createElement("CANVAS").getContext("2d");if(!t){return false}else{if(t.setLineDash!==undefined){Ja.CANVAS_LINE_DASH=true}return true}}catch(t){return false}}();Ja.DEVICE_ORIENTATION="DeviceOrientationEvent"in window;Ja.GEOLOCATION="geolocation"in navigator;Ja.TOUCH=ta.ASSUME_TOUCH||"ontouchstart"in window;Ja.POINTER="PointerEvent"in window;Ja.MSPOINTER=!!navigator.msPointerEnabled;(function(){if(ta.ENABLE_WEBGL){var t=false;var i;var s=[];if("WebGLRenderingContext"in window){try{var e=document.createElement("CANVAS");var r=Ya.getContext(e,{failIfMajorPerformanceCaveat:true});if(r){t=true;i=r.getParameter(r.MAX_TEXTURE_SIZE);s=r.getSupportedExtensions()}}catch(t){}}Ja.WEBGL=t;ta.WEBGL_EXTENSIONS=s;ta.WEBGL_MAX_TEXTURE_SIZE=i}})();var Za=function(t){ua.call(this);var i=t||{};this.position_=null;this.transform_=Na.identityTransform;this.sphere_=new ma(Ga.RADIUS);this.watchId_=undefined;ra.listen(this,ua.getChangeEventType(ia.PROJECTION),this.handleProjectionChanged_,this);ra.listen(this,ua.getChangeEventType(ia.TRACKING),this.handleTrackingChanged_,this);if(i.projection!==undefined){this.setProjection(i.projection)}if(i.trackingOptions!==undefined){this.setTrackingOptions(i.trackingOptions)}this.setTracking(i.tracking!==undefined?i.tracking:false)};ta.inherits(Za,ua);Za.prototype.disposeInternal=function(){this.setTracking(false);ua.prototype.disposeInternal.call(this)};Za.prototype.handleProjectionChanged_=function(){var t=this.getProjection();if(t){this.transform_=Na.getTransformFromProjections(Na.get("EPSG:4326"),t);if(this.position_){this.set(ia.POSITION,this.transform_(this.position_))}}};Za.prototype.handleTrackingChanged_=function(){if(Ja.GEOLOCATION){var t=this.getTracking();if(t&&this.watchId_===undefined){this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions())}else if(!t&&this.watchId_!==undefined){navigator.geolocation.clearWatch(this.watchId_);this.watchId_=undefined}}};Za.prototype.positionChange_=function(t){var i=t.coords;this.set(ia.ACCURACY,i.accuracy);this.set(ia.ALTITUDE,i.altitude===null?undefined:i.altitude);this.set(ia.ALTITUDE_ACCURACY,i.altitudeAccuracy===null?undefined:i.altitudeAccuracy);this.set(ia.HEADING,i.heading===null?undefined:ca.toRadians(i.heading));if(!this.position_){this.position_=[i.longitude,i.latitude]}else{this.position_[0]=i.longitude;this.position_[1]=i.latitude}var s=this.transform_(this.position_);this.set(ia.POSITION,s);this.set(ia.SPEED,i.speed===null?undefined:i.speed);var e=Xa.circular(this.sphere_,this.position_,i.accuracy);e.applyTransform(this.transform_);this.set(ia.ACCURACY_GEOMETRY,e);this.changed()};Za.prototype.positionError_=function(t){t.type=oa.ERROR;this.setTracking(false);this.dispatchEvent(t)};Za.prototype.getAccuracy=function(){return this.get(ia.ACCURACY)};Za.prototype.getAccuracyGeometry=function(){return this.get(ia.ACCURACY_GEOMETRY)||null};Za.prototype.getAltitude=function(){return this.get(ia.ALTITUDE)};Za.prototype.getAltitudeAccuracy=function(){return this.get(ia.ALTITUDE_ACCURACY)};Za.prototype.getHeading=function(){return this.get(ia.HEADING)};Za.prototype.getPosition=function(){return this.get(ia.POSITION)};Za.prototype.getProjection=function(){return this.get(ia.PROJECTION)};Za.prototype.getSpeed=function(){return this.get(ia.SPEED)};Za.prototype.getTracking=function(){return this.get(ia.TRACKING)};Za.prototype.getTrackingOptions=function(){return this.get(ia.TRACKING_OPTIONS)};Za.prototype.setProjection=function(t){this.set(ia.PROJECTION,Na.get(t))};Za.prototype.setTracking=function(t){this.set(ia.TRACKING,t)};Za.prototype.setTrackingOptions=function(t){this.set(ia.TRACKING_OPTIONS,t)};var $a={ADD:"add",REMOVE:"remove"};var Qa=function(t,i){ua.call(this);var s=i||{};this.unique_=!!s.unique;this.array_=t?t:[];if(this.unique_){for(var e=0,r=this.array_.length;e<r;++e){this.assertUnique_(this.array_[e],e)}}this.updateLength_()};ta.inherits(Qa,ua);Qa.prototype.clear=function(){while(this.getLength()>0){this.pop()}};Qa.prototype.extend=function(t){var i,s;for(i=0,s=t.length;i<s;++i){this.push(t[i])}return this};Qa.prototype.forEach=function(t,i){var s=i?t.bind(i):t;var e=this.array_;for(var r=0,n=e.length;r<n;++r){s(e[r],r,e)}};Qa.prototype.getArray=function(){return this.array_};Qa.prototype.item=function(t){return this.array_[t]};Qa.prototype.getLength=function(){return this.get(Qa.Property_.LENGTH)};Qa.prototype.insertAt=function(t,i){if(this.unique_){this.assertUnique_(i)}this.array_.splice(t,0,i);this.updateLength_();this.dispatchEvent(new Qa.Event($a.ADD,i))};Qa.prototype.pop=function(){return this.removeAt(this.getLength()-1)};Qa.prototype.push=function(t){if(this.unique_){this.assertUnique_(t)}var i=this.getLength();this.insertAt(i,t);return this.getLength()};Qa.prototype.remove=function(t){var i=this.array_;var s,e;for(s=0,e=i.length;s<e;++s){if(i[s]===t){return this.removeAt(s)}}return undefined};Qa.prototype.removeAt=function(t){var i=this.array_[t];this.array_.splice(t,1);this.updateLength_();this.dispatchEvent(new Qa.Event($a.REMOVE,i));return i};Qa.prototype.setAt=function(t,i){var s=this.getLength();if(t<s){if(this.unique_){this.assertUnique_(i,t)}var e=this.array_[t];this.array_[t]=i;this.dispatchEvent(new Qa.Event($a.REMOVE,e));this.dispatchEvent(new Qa.Event($a.ADD,i))}else{var r;for(r=s;r<t;++r){this.insertAt(r,undefined)}this.insertAt(t,i)}};Qa.prototype.updateLength_=function(){this.set(Qa.Property_.LENGTH,this.array_.length)};Qa.prototype.assertUnique_=function(t,i){for(var s=0,e=this.array_.length;s<e;++s){if(this.array_[s]===t&&s!==i){throw new la(58)}}};Qa.Property_={LENGTH:"length"};Qa.Event=function(t,i){ha.call(this,t);this.element=i};ta.inherits(Qa.Event,ha);var to=function(t,i,s){ha.call(this,t);this.map=i;this.frameState=s!==undefined?s:null};ta.inherits(to,ha);var io=function(t,i,s,e,r){to.call(this,t,i,r);this.originalEvent=s;this.pixel=i.getEventPixel(s);this.coordinate=i.getCoordinateFromPixel(this.pixel);this.dragging=e!==undefined?e:false};ta.inherits(io,to);io.prototype.preventDefault=function(){to.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};io.prototype.stopPropagation=function(){to.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var so={SINGLECLICK:"singleclick",CLICK:oa.CLICK,DBLCLICK:oa.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var eo=function(t,i,s,e,r){io.call(this,t,i,s.originalEvent,e,r);this.pointerEvent=s};ta.inherits(eo,io);var ro={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var no=function(t,i){this.dispatcher=t;this.mapping_=i};no.prototype.getEvents=function(){return Object.keys(this.mapping_)};no.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var ho=function(t){var i={mousedown:this.mousedown,mousemove:this.mousemove,mouseup:this.mouseup,mouseover:this.mouseover,mouseout:this.mouseout};no.call(this,t,i);this.pointerMap=t.pointerMap;this.lastTouches=[]};ta.inherits(ho,no);ho.POINTER_ID=1;ho.POINTER_TYPE="mouse";ho.DEDUP_DIST=25;ho.prototype.isEventSimulatedFromTouch_=function(t){var i=this.lastTouches;var s=t.clientX,e=t.clientY;for(var r=0,n=i.length,h;r<n&&(h=i[r]);r++){var a=Math.abs(s-h[0]),o=Math.abs(e-h[1]);if(a<=ho.DEDUP_DIST&&o<=ho.DEDUP_DIST){return true}}return false};ho.prepareEvent=function(t,i){var s=i.cloneEvent(t,t);var e=s.preventDefault;s.preventDefault=function(){t.preventDefault();e()};s.pointerId=ho.POINTER_ID;s.isPrimary=true;s.pointerType=ho.POINTER_TYPE;return s};ho.prototype.mousedown=function(t){if(!this.isEventSimulatedFromTouch_(t)){if(ho.POINTER_ID.toString()in this.pointerMap){this.cancel(t)}var i=ho.prepareEvent(t,this.dispatcher);this.pointerMap[ho.POINTER_ID.toString()]=t;this.dispatcher.down(i,t)}};ho.prototype.mousemove=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.move(i,t)}};ho.prototype.mouseup=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=this.pointerMap[ho.POINTER_ID.toString()];if(i&&i.button===t.button){var s=ho.prepareEvent(t,this.dispatcher);this.dispatcher.up(s,t);this.cleanupMouse()}}};ho.prototype.mouseover=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.enterOver(i,t)}};ho.prototype.mouseout=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.leaveOut(i,t)}};ho.prototype.cancel=function(t){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.cancel(i,t);this.cleanupMouse()};ho.prototype.cleanupMouse=function(){delete this.pointerMap[ho.POINTER_ID.toString()]};var ao=function(t){var i={MSPointerDown:this.msPointerDown,MSPointerMove:this.msPointerMove,MSPointerUp:this.msPointerUp,MSPointerOut:this.msPointerOut,MSPointerOver:this.msPointerOver,MSPointerCancel:this.msPointerCancel,MSGotPointerCapture:this.msGotPointerCapture,MSLostPointerCapture:this.msLostPointerCapture};no.call(this,t,i);this.pointerMap=t.pointerMap;this.POINTER_TYPES=["","unavailable","touch","pen","mouse"]};ta.inherits(ao,no);ao.prototype.prepareEvent_=function(t){var i=t;if(typeof t.pointerType==="number"){i=this.dispatcher.cloneEvent(t,t);i.pointerType=this.POINTER_TYPES[t.pointerType]}return i};ao.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]};ao.prototype.msPointerDown=function(t){this.pointerMap[t.pointerId.toString()]=t;var i=this.prepareEvent_(t);this.dispatcher.down(i,t)};ao.prototype.msPointerMove=function(t){var i=this.prepareEvent_(t);this.dispatcher.move(i,t)};ao.prototype.msPointerUp=function(t){var i=this.prepareEvent_(t);this.dispatcher.up(i,t);this.cleanup(t.pointerId)};ao.prototype.msPointerOut=function(t){var i=this.prepareEvent_(t);this.dispatcher.leaveOut(i,t)};ao.prototype.msPointerOver=function(t){var i=this.prepareEvent_(t);this.dispatcher.enterOver(i,t)};ao.prototype.msPointerCancel=function(t){var i=this.prepareEvent_(t);this.dispatcher.cancel(i,t);this.cleanup(t.pointerId)};ao.prototype.msLostPointerCapture=function(t){var i=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(i)};ao.prototype.msGotPointerCapture=function(t){var i=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(i)};var oo=function(t){var i={pointerdown:this.pointerDown,pointermove:this.pointerMove,pointerup:this.pointerUp,pointerout:this.pointerOut,pointerover:this.pointerOver,pointercancel:this.pointerCancel,gotpointercapture:this.gotPointerCapture,lostpointercapture:this.lostPointerCapture};no.call(this,t,i)};ta.inherits(oo,no);oo.prototype.pointerDown=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerMove=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerUp=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerOut=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerOver=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerCancel=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.lostPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.gotPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)};var fo=function(t,i,s){ha.call(this,t);this.originalEvent=i;var e=s?s:{};this.buttons=this.getButtons_(e);this.pressure=this.getPressure_(e,this.buttons);this.bubbles="bubbles"in e?e["bubbles"]:false;this.cancelable="cancelable"in e?e["cancelable"]:false;this.view="view"in e?e["view"]:null;this.detail="detail"in e?e["detail"]:null;this.screenX="screenX"in e?e["screenX"]:0;this.screenY="screenY"in e?e["screenY"]:0;this.clientX="clientX"in e?e["clientX"]:0;this.clientY="clientY"in e?e["clientY"]:0;this.ctrlKey="ctrlKey"in e?e["ctrlKey"]:false;this.altKey="altKey"in e?e["altKey"]:false;this.shiftKey="shiftKey"in e?e["shiftKey"]:false;this.metaKey="metaKey"in e?e["metaKey"]:false;this.button="button"in e?e["button"]:0;this.relatedTarget="relatedTarget"in e?e["relatedTarget"]:null;this.pointerId="pointerId"in e?e["pointerId"]:0;this.width="width"in e?e["width"]:0;this.height="height"in e?e["height"]:0;this.tiltX="tiltX"in e?e["tiltX"]:0;this.tiltY="tiltY"in e?e["tiltY"]:0;this.pointerType="pointerType"in e?e["pointerType"]:"";this.hwTimestamp="hwTimestamp"in e?e["hwTimestamp"]:0;this.isPrimary="isPrimary"in e?e["isPrimary"]:false;if(i.preventDefault){this.preventDefault=function(){i.preventDefault()}}};ta.inherits(fo,ha);fo.prototype.getButtons_=function(t){var i;if(t.buttons||fo.HAS_BUTTONS){i=t.buttons}else{switch(t.which){case 1:i=1;break;case 2:i=4;break;case 3:i=2;break;default:i=0}}return i};fo.prototype.getPressure_=function(t,i){var s=0;if(t.pressure){s=t.pressure}else{s=i?.5:0}return s};fo.HAS_BUTTONS=false;(function(){try{var t=new MouseEvent("click",{buttons:1});fo.HAS_BUTTONS=t.buttons===1}catch(t){}})();var uo=function(t,i){var s={touchstart:this.touchstart,touchmove:this.touchmove,touchend:this.touchend,touchcancel:this.touchcancel};no.call(this,t,s);this.pointerMap=t.pointerMap;this.mouseSource=i;this.firstTouchId_=undefined;this.clickCount_=0;this.resetId_=undefined};ta.inherits(uo,no);uo.DEDUP_TIMEOUT=2500;uo.CLICK_COUNT_TIMEOUT=200;uo.POINTER_TYPE="touch";uo.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier};uo.prototype.setPrimaryTouch_=function(t){var i=Object.keys(this.pointerMap).length;if(i===0||i===1&&ho.POINTER_ID.toString()in this.pointerMap){this.firstTouchId_=t.identifier;this.cancelResetClickCount_()}};uo.prototype.removePrimaryPointer_=function(t){if(t.isPrimary){this.firstTouchId_=undefined;this.resetClickCount_()}};uo.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),uo.CLICK_COUNT_TIMEOUT)};uo.prototype.resetClickCountHandler_=function(){this.clickCount_=0;this.resetId_=undefined};uo.prototype.cancelResetClickCount_=function(){if(this.resetId_!==undefined){clearTimeout(this.resetId_)}};uo.prototype.touchToPointer_=function(t,i){var s=this.dispatcher.cloneEvent(t,i);s.pointerId=i.identifier+2;s.bubbles=true;s.cancelable=true;s.detail=this.clickCount_;s.button=0;s.buttons=1;s.width=i.webkitRadiusX||i.radiusX||0;s.height=i.webkitRadiusY||i.radiusY||0;s.pressure=i.webkitForce||i.force||.5;s.isPrimary=this.isPrimaryTouch_(i);s.pointerType=uo.POINTER_TYPE;s.clientX=i.clientX;s.clientY=i.clientY;s.screenX=i.screenX;s.screenY=i.screenY;return s};uo.prototype.processTouches_=function(t,i){var s=Array.prototype.slice.call(t.changedTouches);var e=s.length;function r(){t.preventDefault()}var n,h;for(n=0;n<e;++n){h=this.touchToPointer_(t,s[n]);h.preventDefault=r;i.call(this,t,h)}};uo.prototype.findTouch_=function(t,i){var s=t.length;var e;for(var r=0;r<s;r++){e=t[r];if(e.identifier===i){return true}}return false};uo.prototype.vacuumTouches_=function(t){var i=t.touches;var s=Object.keys(this.pointerMap);var e=s.length;if(e>=i.length){var r=[];var n,h,a;for(n=0;n<e;++n){h=s[n];a=this.pointerMap[h];if(h!=ho.POINTER_ID&&!this.findTouch_(i,h-2)){r.push(a.out)}}for(n=0;n<r.length;++n){this.cancelOut_(t,r[n])}}};uo.prototype.touchstart=function(t){this.vacuumTouches_(t);this.setPrimaryTouch_(t.changedTouches[0]);this.dedupSynthMouse_(t);this.clickCount_++;this.processTouches_(t,this.overDown_)};uo.prototype.overDown_=function(t,i){this.pointerMap[i.pointerId]={target:i.target,out:i,outTarget:i.target};this.dispatcher.over(i,t);this.dispatcher.enter(i,t);this.dispatcher.down(i,t)};uo.prototype.touchmove=function(t){t.preventDefault();this.processTouches_(t,this.moveOverOut_)};uo.prototype.moveOverOut_=function(t,i){var s=i;var e=this.pointerMap[s.pointerId];if(!e){return}var r=e.out;var n=e.outTarget;this.dispatcher.move(s,t);if(r&&n!==s.target){r.relatedTarget=s.target;s.relatedTarget=n;r.target=n;if(s.target){this.dispatcher.leaveOut(r,t);this.dispatcher.enterOver(s,t)}else{s.target=n;s.relatedTarget=null;this.cancelOut_(t,s)}}e.out=s;e.outTarget=s.target};uo.prototype.touchend=function(t){this.dedupSynthMouse_(t);this.processTouches_(t,this.upOut_)};uo.prototype.upOut_=function(t,i){this.dispatcher.up(i,t);this.dispatcher.out(i,t);this.dispatcher.leave(i,t);this.cleanUpPointer_(i)};uo.prototype.touchcancel=function(t){this.processTouches_(t,this.cancelOut_)};uo.prototype.cancelOut_=function(t,i){this.dispatcher.cancel(i,t);this.dispatcher.out(i,t);this.dispatcher.leave(i,t);this.cleanUpPointer_(i)};uo.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId];this.removePrimaryPointer_(t)};uo.prototype.dedupSynthMouse_=function(t){var i=this.mouseSource.lastTouches;var s=t.changedTouches[0];if(this.isPrimaryTouch_(s)){var e=[s.clientX,s.clientY];i.push(e);setTimeout((function(){pa.remove(i,e)}),uo.DEDUP_TIMEOUT)}};var lo=function(t){aa.call(this);this.element_=t;this.pointerMap={};this.eventMap_={};this.eventSourceList_=[];this.registerSources()};ta.inherits(lo,aa);lo.prototype.registerSources=function(){if(Ja.POINTER){this.registerSource("native",new oo(this))}else if(Ja.MSPOINTER){this.registerSource("ms",new ao(this))}else{var t=new ho(this);this.registerSource("mouse",t);if(Ja.TOUCH){this.registerSource("touch",new uo(this,t))}}this.register_()};lo.prototype.registerSource=function(t,i){var s=i;var e=s.getEvents();if(e){e.forEach((function(t){var i=s.getHandlerForEvent(t);if(i){this.eventMap_[t]=i.bind(s)}}),this);this.eventSourceList_.push(s)}};lo.prototype.register_=function(){var t=this.eventSourceList_.length;var i;for(var s=0;s<t;s++){i=this.eventSourceList_[s];this.addEvents_(i.getEvents())}};lo.prototype.unregister_=function(){var t=this.eventSourceList_.length;var i;for(var s=0;s<t;s++){i=this.eventSourceList_[s];this.removeEvents_(i.getEvents())}};lo.prototype.eventHandler_=function(t){var i=t.type;var s=this.eventMap_[i];if(s){s(t)}};lo.prototype.addEvents_=function(t){t.forEach((function(t){ra.listen(this.element_,t,this.eventHandler_,this)}),this)};lo.prototype.removeEvents_=function(t){t.forEach((function(t){ra.unlisten(this.element_,t,this.eventHandler_,this)}),this)};lo.prototype.cloneEvent=function(t,i){var s={},e;for(var r=0,n=lo.CLONE_PROPS.length;r<n;r++){e=lo.CLONE_PROPS[r][0];s[e]=t[e]||i[e]||lo.CLONE_PROPS[r][1]}return s};lo.prototype.down=function(t,i){this.fireEvent(ro.POINTERDOWN,t,i)};lo.prototype.move=function(t,i){this.fireEvent(ro.POINTERMOVE,t,i)};lo.prototype.up=function(t,i){this.fireEvent(ro.POINTERUP,t,i)};lo.prototype.enter=function(t,i){t.bubbles=false;this.fireEvent(ro.POINTERENTER,t,i)};lo.prototype.leave=function(t,i){t.bubbles=false;this.fireEvent(ro.POINTERLEAVE,t,i)};lo.prototype.over=function(t,i){t.bubbles=true;this.fireEvent(ro.POINTEROVER,t,i)};lo.prototype.out=function(t,i){t.bubbles=true;this.fireEvent(ro.POINTEROUT,t,i)};lo.prototype.cancel=function(t,i){this.fireEvent(ro.POINTERCANCEL,t,i)};lo.prototype.leaveOut=function(t,i){this.out(t,i);if(!this.contains_(t.target,t.relatedTarget)){this.leave(t,i)}};lo.prototype.enterOver=function(t,i){this.over(t,i);if(!this.contains_(t.target,t.relatedTarget)){this.enter(t,i)}};lo.prototype.contains_=function(t,i){if(!t||!i){return false}return t.contains(i)};lo.prototype.makeEvent=function(t,i,s){return new fo(t,s,i)};lo.prototype.fireEvent=function(t,i,s){var e=this.makeEvent(t,i,s);this.dispatchEvent(e)};lo.prototype.fireNativeEvent=function(t){var i=this.makeEvent(t.type,t,t);this.dispatchEvent(i)};lo.prototype.wrapMouseEvent=function(t,i){var s=this.makeEvent(t,ho.prepareEvent(i,this),i);return s};lo.prototype.disposeInternal=function(){this.unregister_();aa.prototype.disposeInternal.call(this)};lo.CLONE_PROPS=[["bubbles",false],["cancelable",false],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",false],["altKey",false],["shiftKey",false],["metaKey",false],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",false],["type",""],["target",null],["currentTarget",null],["which",0]];var vo=function(t,i){aa.call(this);this.map_=t;this.clickTimeoutId_=0;this.dragging_=false;this.dragListenerKeys_=[];this.moveTolerance_=i?i*Ja.DEVICE_PIXEL_RATIO:Ja.DEVICE_PIXEL_RATIO;this.down_=null;var s=this.map_.getViewport();this.activePointers_=0;this.trackedTouches_={};this.pointerEventHandler_=new lo(s);this.documentPointerEventHandler_=null;this.pointerdownListenerKey_=ra.listen(this.pointerEventHandler_,ro.POINTERDOWN,this.handlePointerDown_,this);this.relayedListenerKey_=ra.listen(this.pointerEventHandler_,ro.POINTERMOVE,this.relayEvent_,this)};ta.inherits(vo,aa);vo.prototype.emulateClick_=function(t){var i=new eo(so.CLICK,this.map_,t);this.dispatchEvent(i);if(this.clickTimeoutId_!==0){clearTimeout(this.clickTimeoutId_);this.clickTimeoutId_=0;i=new eo(so.DBLCLICK,this.map_,t);this.dispatchEvent(i)}else{this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=0;var i=new eo(so.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)}};vo.prototype.updateActivePointers_=function(t){var i=t;if(i.type==so.POINTERUP||i.type==so.POINTERCANCEL){delete this.trackedTouches_[i.pointerId]}else if(i.type==so.POINTERDOWN){this.trackedTouches_[i.pointerId]=true}this.activePointers_=Object.keys(this.trackedTouches_).length};vo.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var i=new eo(so.POINTERUP,this.map_,t);this.dispatchEvent(i);if(!i.propagationStopped&&!this.dragging_&&this.isMouseActionButton_(t)){this.emulateClick_(this.down_)}if(this.activePointers_===0){this.dragListenerKeys_.forEach(ra.unlistenByKey);this.dragListenerKeys_.length=0;this.dragging_=false;this.down_=null;this.documentPointerEventHandler_.dispose();this.documentPointerEventHandler_=null}};vo.prototype.isMouseActionButton_=function(t){return t.button===0};vo.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var i=new eo(so.POINTERDOWN,this.map_,t);this.dispatchEvent(i);this.down_=t;if(this.dragListenerKeys_.length===0){this.documentPointerEventHandler_=new lo(document);this.dragListenerKeys_.push(ra.listen(this.documentPointerEventHandler_,so.POINTERMOVE,this.handlePointerMove_,this),ra.listen(this.documentPointerEventHandler_,so.POINTERUP,this.handlePointerUp_,this),ra.listen(this.pointerEventHandler_,so.POINTERCANCEL,this.handlePointerUp_,this))}};vo.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=true;var i=new eo(so.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(i)}t.preventDefault()};vo.prototype.relayEvent_=function(t){var i=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new eo(t.type,this.map_,t,i))};vo.prototype.isMoving_=function(t){return Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_};vo.prototype.disposeInternal=function(){if(this.relayedListenerKey_){ra.unlistenByKey(this.relayedListenerKey_);this.relayedListenerKey_=null}if(this.pointerdownListenerKey_){ra.unlistenByKey(this.pointerdownListenerKey_);this.pointerdownListenerKey_=null}this.dragListenerKeys_.forEach(ra.unlistenByKey);this.dragListenerKeys_.length=0;if(this.documentPointerEventHandler_){this.documentPointerEventHandler_.dispose();this.documentPointerEventHandler_=null}if(this.pointerEventHandler_){this.pointerEventHandler_.dispose();this.pointerEventHandler_=null}aa.prototype.disposeInternal.call(this)};var co={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"};var mo={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var po={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5};var _o=function(t,i){this.priorityFunction_=t;this.keyFunction_=i;this.elements_=[];this.priorities_=[];this.queuedElements_={}};_o.DROP=Infinity;_o.prototype.clear=function(){this.elements_.length=0;this.priorities_.length=0;ea.clear(this.queuedElements_)};_o.prototype.dequeue=function(){var t=this.elements_;var i=this.priorities_;var s=t[0];if(t.length==1){t.length=0;i.length=0}else{t[0]=t.pop();i[0]=i.pop();this.siftUp_(0)}var e=this.keyFunction_(s);delete this.queuedElements_[e];return s};_o.prototype.enqueue=function(t){va.assert(!(this.keyFunction_(t)in this.queuedElements_),31);var i=this.priorityFunction_(t);if(i!=_o.DROP){this.elements_.push(t);this.priorities_.push(i);this.queuedElements_[this.keyFunction_(t)]=true;this.siftDown_(0,this.elements_.length-1);return true}return false};_o.prototype.getCount=function(){return this.elements_.length};_o.prototype.getLeftChildIndex_=function(t){return t*2+1};_o.prototype.getRightChildIndex_=function(t){return t*2+2};_o.prototype.getParentIndex_=function(t){return t-1>>1};_o.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--){this.siftUp_(t)}};_o.prototype.isEmpty=function(){return this.elements_.length===0};_o.prototype.isKeyQueued=function(t){return t in this.queuedElements_};_o.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))};_o.prototype.siftUp_=function(t){var i=this.elements_;var s=this.priorities_;var e=i.length;var r=i[t];var n=s[t];var h=t;while(t<e>>1){var a=this.getLeftChildIndex_(t);var o=this.getRightChildIndex_(t);var f=o<e&&s[o]<s[a]?o:a;i[t]=i[f];s[t]=s[f];t=f}i[t]=r;s[t]=n;this.siftDown_(h,t)};_o.prototype.siftDown_=function(t,i){var s=this.elements_;var e=this.priorities_;var r=s[i];var n=e[i];while(i>t){var h=this.getParentIndex_(i);if(e[h]>n){s[i]=s[h];e[i]=e[h];i=h}else{break}}s[i]=r;e[i]=n};_o.prototype.reprioritize=function(){var t=this.priorityFunction_;var i=this.elements_;var s=this.priorities_;var e=0;var r=i.length;var n,h,a;for(h=0;h<r;++h){n=i[h];a=t(n);if(a==_o.DROP){delete this.queuedElements_[this.keyFunction_(n)]}else{s[e]=a;i[e++]=n}}i.length=e;s.length=e;this.heapify_()};var go=function(t,i){_o.call(this,(function(i){return t.apply(null,i)}),(function(t){return t[0].getKey()}));this.tileChangeCallback_=i;this.tilesLoading_=0;this.tilesLoadingKeys_={}};ta.inherits(go,_o);go.prototype.enqueue=function(t){var i=_o.prototype.enqueue.call(this,t);if(i){var s=t[0];ra.listen(s,oa.CHANGE,this.handleTileChange,this)}return i};go.prototype.getTilesLoading=function(){return this.tilesLoading_};go.prototype.handleTileChange=function(t){var i=t.target;var s=i.getState();if(s===po.LOADED||s===po.ERROR||s===po.EMPTY||s===po.ABORT){ra.unlisten(i,oa.CHANGE,this.handleTileChange,this);var e=i.getKey();if(e in this.tilesLoadingKeys_){delete this.tilesLoadingKeys_[e];--this.tilesLoading_}this.tileChangeCallback_()}};go.prototype.loadMoreTiles=function(t,i){var s=0;var e=false;var r,n,h;while(this.tilesLoading_<t&&s<i&&this.getCount()>0){n=this.dequeue()[0];h=n.getKey();r=n.getState();if(r===po.ABORT){e=true}else if(r===po.IDLE&&!(h in this.tilesLoadingKeys_)){this.tilesLoadingKeys_[h]=true;++this.tilesLoading_;++s;n.load()}}if(s===0&&e){this.tileChangeCallback_()}};var Mo={};Mo.createExtent=function(t){return function(i){if(i){return[ca.clamp(i[0],t[0],t[2]),ca.clamp(i[1],t[1],t[3])]}else{return undefined}}};Mo.none=function(t){return t};var zo={};zo.createSnapToResolutions=function(t){return function(i,s,e){if(i!==undefined){var r=pa.linearFindNearest(t,i,e);r=ca.clamp(r+s,0,t.length-1);var n=Math.floor(r);if(r!=n&&n<t.length-1){var h=t[n]/t[n+1];return t[n]/Math.pow(h,r-n)}else{return t[n]}}else{return undefined}}};zo.createSnapToPower=function(t,i,s){return function(e,r,n){if(e!==undefined){var h=-n/2+.5;var a=Math.floor(Math.log(i/e)/Math.log(t)+h);var o=Math.max(a+r,0);if(s!==undefined){o=Math.min(o,s)}return i/Math.pow(t,o)}else{return undefined}}};var wo={};wo.disable=function(t,i){if(t!==undefined){return 0}else{return undefined}};wo.none=function(t,i){if(t!==undefined){return t+i}else{return undefined}};wo.createSnapToN=function(t){var i=2*Math.PI/t;return function(t,s){if(t!==undefined){t=Math.floor((t+s)/i+.5)*i;return t}else{return undefined}}};wo.createSnapToZero=function(t){var i=t||ca.toRadians(5);return function(t,s){if(t!==undefined){if(Math.abs(t+s)<=i){return 0}else{return t+s}}else{return undefined}}};var yo={ANIMATING:0,INTERACTING:1};var bo={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var xo={};xo.padNumber=function(t,i,s){var e=s!==undefined?t.toFixed(s):""+t;var r=e.indexOf(".");r=r===-1?e.length:r;return r>i?e:new Array(1+i-r).join("0")+e};xo.compareVersions=function(t,i){var s=(""+t).split(".");var e=(""+i).split(".");for(var r=0;r<Math.max(s.length,e.length);r++){var n=parseInt(s[r]||"0",10);var h=parseInt(e[r]||"0",10);if(n>h){return 1}if(h>n){return-1}}return 0};var Eo={};Eo.add=function(t,i){t[0]+=i[0];t[1]+=i[1];return t};Eo.closestOnCircle=function(t,i){var s=i.getRadius();var e=i.getCenter();var r=e[0];var n=e[1];var h=t[0];var a=t[1];var o=h-r;var f=a-n;if(o===0&&f===0){o=1}var u=Math.sqrt(o*o+f*f);var l,v;l=r+s*o/u;v=n+s*f/u;return[l,v]};Eo.closestOnSegment=function(t,i){var s=t[0];var e=t[1];var r=i[0];var n=i[1];var h=r[0];var a=r[1];var o=n[0];var f=n[1];var u=o-h;var l=f-a;var v=u===0&&l===0?0:(u*(s-h)+l*(e-a))/(u*u+l*l||0);var c,d;if(v<=0){c=h;d=a}else if(v>=1){c=o;d=f}else{c=h+v*u;d=a+v*l}return[c,d]};Eo.createStringXY=function(t){return function(i){return Eo.toStringXY(i,t)}};Eo.degreesToStringHDMS=function(t,i,s){var e=ca.modulo(i+180,360)-180;var r=Math.abs(3600*e);var n=s||0;var h=Math.pow(10,n);var a=Math.floor(r/3600);var o=Math.floor((r-a*3600)/60);var f=r-a*3600-o*60;f=Math.ceil(f*h)/h;if(f>=60){f=0;o+=1}if(o>=60){o=0;a+=1}return a+"° "+xo.padNumber(o,2)+"′ "+xo.padNumber(f,2,n)+"″"+(e==0?"":" "+t.charAt(e<0?1:0))};Eo.format=function(t,i,s){if(t){return i.replace("{x}",t[0].toFixed(s)).replace("{y}",t[1].toFixed(s))}else{return""}};Eo.equals=function(t,i){var s=true;for(var e=t.length-1;e>=0;--e){if(t[e]!=i[e]){s=false;break}}return s};Eo.rotate=function(t,i){var s=Math.cos(i);var e=Math.sin(i);var r=t[0]*s-t[1]*e;var n=t[1]*s+t[0]*e;t[0]=r;t[1]=n;return t};Eo.scale=function(t,i){t[0]*=i;t[1]*=i;return t};Eo.sub=function(t,i){t[0]-=i[0];t[1]-=i[1];return t};Eo.squaredDistance=function(t,i){var s=t[0]-i[0];var e=t[1]-i[1];return s*s+e*e};Eo.distance=function(t,i){return Math.sqrt(Eo.squaredDistance(t,i))};Eo.squaredDistanceToSegment=function(t,i){return Eo.squaredDistance(t,Eo.closestOnSegment(t,i))};Eo.toStringHDMS=function(t,i){if(t){return Eo.degreesToStringHDMS("NS",t[1],i)+" "+Eo.degreesToStringHDMS("EW",t[0],i)}else{return""}};Eo.toStringXY=function(t,i){return Eo.format(t,"{x}, {y}",i)};var So={};So.easeIn=function(t){return Math.pow(t,3)};So.easeOut=function(t){return 1-So.easeIn(1-t)};So.inAndOut=function(t){return 3*t*t-2*t*t*t};So.linear=function(t){return t};So.upAndDown=function(t){if(t<.5){return So.inAndOut(2*t)}else{return 1-So.inAndOut(2*(t-.5))}};var Go=function(t){ua.call(this);var i=ea.assign({},t);this.hints_=[0,0];this.animations_=[];this.updateAnimations_=this.updateAnimations_.bind(this);this.projection_=Na.createProjection(i.projection,"EPSG:3857");this.applyOptions_(i)};ta.inherits(Go,ua);Go.prototype.applyOptions_=function(t){var i={};i[bo.CENTER]=t.center!==undefined?t.center:null;var s=Go.createResolutionConstraint_(t);this.maxResolution_=s.maxResolution;this.minResolution_=s.minResolution;this.zoomFactor_=s.zoomFactor;this.resolutions_=t.resolutions;this.minZoom_=s.minZoom;var e=Go.createCenterConstraint_(t);var r=s.constraint;var n=Go.createRotationConstraint_(t);this.constraints_={center:e,resolution:r,rotation:n};if(t.resolution!==undefined){i[bo.RESOLUTION]=t.resolution}else if(t.zoom!==undefined){i[bo.RESOLUTION]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_);if(this.resolutions_){i[bo.RESOLUTION]=ca.clamp(Number(this.getResolution()||i[bo.RESOLUTION]),this.minResolution_,this.maxResolution_)}}i[bo.ROTATION]=t.rotation!==undefined?t.rotation:0;this.setProperties(i);this.options_=t};Go.prototype.getUpdatedOptions_=function(t){var i=ea.assign({},this.options_);if(i.resolution!==undefined){i.resolution=this.getResolution()}else{i.zoom=this.getZoom()}i.center=this.getCenter();i.rotation=this.getRotation();return ea.assign({},i,t)};Go.prototype.animate=function(t){var i=arguments.length;var s;if(i>1&&typeof arguments[i-1]==="function"){s=arguments[i-1];--i}if(!this.isDef()){var e=arguments[i-1];if(e.center){this.setCenter(e.center)}if(e.zoom!==undefined){this.setZoom(e.zoom)}if(e.rotation!==undefined){this.setRotation(e.rotation)}if(s){s(true)}return}var r=Date.now();var n=this.getCenter().slice();var h=this.getResolution();var a=this.getRotation();var o=[];for(var f=0;f<i;++f){var u=arguments[f];var l={start:r,complete:false,anchor:u.anchor,duration:u.duration!==undefined?u.duration:1e3,easing:u.easing||So.inAndOut};if(u.center){l.sourceCenter=n;l.targetCenter=u.center;n=l.targetCenter}if(u.zoom!==undefined){l.sourceResolution=h;l.targetResolution=this.constrainResolution(this.maxResolution_,u.zoom-this.minZoom_,0);h=l.targetResolution}else if(u.resolution){l.sourceResolution=h;l.targetResolution=u.resolution;h=l.targetResolution}if(u.rotation!==undefined){l.sourceRotation=a;var v=ca.modulo(u.rotation-a+Math.PI,2*Math.PI)-Math.PI;l.targetRotation=a+v;a=l.targetRotation}l.callback=s;if(Go.isNoopAnimation(l)){l.complete=true}else{r+=l.duration}o.push(l)}this.animations_.push(o);this.setHint(yo.ANIMATING,1);this.updateAnimations_()};Go.prototype.getAnimating=function(){return this.hints_[yo.ANIMATING]>0};Go.prototype.getInteracting=function(){return this.hints_[yo.INTERACTING]>0};Go.prototype.cancelAnimations=function(){this.setHint(yo.ANIMATING,-this.hints_[yo.ANIMATING]);for(var t=0,i=this.animations_.length;t<i;++t){var s=this.animations_[t];if(s[0].callback){s[0].callback(false)}}this.animations_.length=0};Go.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==undefined){cancelAnimationFrame(this.updateAnimationKey_);this.updateAnimationKey_=undefined}if(!this.getAnimating()){return}var t=Date.now();var i=false;for(var s=this.animations_.length-1;s>=0;--s){var e=this.animations_[s];var r=true;for(var n=0,h=e.length;n<h;++n){var a=e[n];if(a.complete){continue}var o=t-a.start;var f=a.duration>0?o/a.duration:1;if(f>=1){a.complete=true;f=1}else{r=false}var u=a.easing(f);if(a.sourceCenter){var l=a.sourceCenter[0];var v=a.sourceCenter[1];var c=a.targetCenter[0];var d=a.targetCenter[1];var m=l+u*(c-l);var p=v+u*(d-v);this.set(bo.CENTER,[m,p])}if(a.sourceResolution&&a.targetResolution){var _=u===1?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){this.set(bo.CENTER,this.calculateCenterZoom(_,a.anchor))}this.set(bo.RESOLUTION,_)}if(a.sourceRotation!==undefined&&a.targetRotation!==undefined){var g=u===1?ca.modulo(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){this.set(bo.CENTER,this.calculateCenterRotate(g,a.anchor))}this.set(bo.ROTATION,g)}i=true;if(!a.complete){break}}if(r){this.animations_[s]=null;this.setHint(yo.ANIMATING,-1);var M=e[0].callback;if(M){M(true)}}}this.animations_=this.animations_.filter(Boolean);if(i&&this.updateAnimationKey_===undefined){this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_)}};Go.prototype.calculateCenterRotate=function(t,i){var s;var e=this.getCenter();if(e!==undefined){s=[e[0]-i[0],e[1]-i[1]];Eo.rotate(s,t-this.getRotation());Eo.add(s,i)}return s};Go.prototype.calculateCenterZoom=function(t,i){var s;var e=this.getCenter();var r=this.getResolution();if(e!==undefined&&r!==undefined){var n=i[0]-t*(i[0]-e[0])/r;var h=i[1]-t*(i[1]-e[1])/r;s=[n,h]}return s};Go.prototype.getSizeFromViewport_=function(){var t=[100,100];var i='.ol-viewport[data-view="'+ta.getUid(this)+'"]';var s=document.querySelector(i);if(s){var e=getComputedStyle(s);t[0]=parseInt(e.width,10);t[1]=parseInt(e.height,10)}return t};Go.prototype.constrainCenter=function(t){return this.constraints_.center(t)};Go.prototype.constrainResolution=function(t,i,s){var e=i||0;var r=s||0;return this.constraints_.resolution(t,e,r)};Go.prototype.constrainRotation=function(t,i){var s=i||0;return this.constraints_.rotation(t,s)};Go.prototype.getCenter=function(){return this.get(bo.CENTER)};Go.prototype.getConstraints=function(){return this.constraints_};Go.prototype.getHints=function(t){if(t!==undefined){t[0]=this.hints_[0];t[1]=this.hints_[1];return t}else{return this.hints_.slice()}};Go.prototype.calculateExtent=function(t){var i=t||this.getSizeFromViewport_();var s=this.getCenter();va.assert(s,1);var e=this.getResolution();va.assert(e!==undefined,2);var r=this.getRotation();va.assert(r!==undefined,3);return Ma.getForViewAndSize(s,e,r,i)};Go.prototype.getMaxResolution=function(){return this.maxResolution_};Go.prototype.getMinResolution=function(){return this.minResolution_};Go.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)};Go.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))};Go.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)};Go.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))};Go.prototype.getProjection=function(){return this.projection_};Go.prototype.getResolution=function(){return this.get(bo.RESOLUTION)};Go.prototype.getResolutions=function(){return this.resolutions_};Go.prototype.getResolutionForExtent=function(t,i){var s=i||this.getSizeFromViewport_();var e=Ma.getWidth(t)/s[0];var r=Ma.getHeight(t)/s[1];return Math.max(e,r)};Go.prototype.getResolutionForValueFunction=function(t){var i=t||2;var s=this.maxResolution_;var e=this.minResolution_;var r=Math.log(s/e)/Math.log(i);return function(t){var e=s/Math.pow(i,t*r);return e}};Go.prototype.getRotation=function(){return this.get(bo.ROTATION)};Go.prototype.getValueForResolutionFunction=function(t){var i=t||2;var s=this.maxResolution_;var e=this.minResolution_;var r=Math.log(s/e)/Math.log(i);return function(t){var e=Math.log(s/t)/Math.log(i)/r;return e}};Go.prototype.getState=function(){var t=this.getCenter();var i=this.getProjection();var s=this.getResolution();var e=this.getRotation();return{center:t.slice(),projection:i!==undefined?i:null,resolution:s,rotation:e,zoom:this.getZoom()}};Go.prototype.getZoom=function(){var t;var i=this.getResolution();if(i!==undefined){t=this.getZoomForResolution(i)}return t};Go.prototype.getZoomForResolution=function(t){var i=this.minZoom_||0;var s,e;if(this.resolutions_){var r=pa.linearFindNearest(this.resolutions_,t,1);i=r;s=this.resolutions_[r];if(r==this.resolutions_.length-1){e=2}else{e=s/this.resolutions_[r+1]}}else{s=this.maxResolution_;e=this.zoomFactor_}return i+Math.log(s/t)/Math.log(e)};Go.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)};Go.prototype.fit=function(t,i){var s=i||{};var e=s.size;if(!e){e=this.getSizeFromViewport_()}var r;if(!(t instanceof Aa)){va.assert(Array.isArray(t),24);va.assert(!Ma.isEmpty(t),25);r=Xa.fromExtent(t)}else if(t.getType()===da.CIRCLE){t=t.getExtent();r=Xa.fromExtent(t);r.rotate(this.getRotation(),Ma.getCenter(t))}else{r=t}var n=s.padding!==undefined?s.padding:[0,0,0,0];var h=s.constrainResolution!==undefined?s.constrainResolution:true;var a=s.nearest!==undefined?s.nearest:false;var o;if(s.minResolution!==undefined){o=s.minResolution}else if(s.maxZoom!==undefined){o=this.constrainResolution(this.maxResolution_,s.maxZoom-this.minZoom_,0)}else{o=0}var f=r.getFlatCoordinates();var u=this.getRotation();var l=Math.cos(-u);var v=Math.sin(-u);var c=+Infinity;var d=+Infinity;var m=-Infinity;var p=-Infinity;var _=r.getStride();for(var g=0,M=f.length;g<M;g+=_){var z=f[g]*l-f[g+1]*v;var w=f[g]*v+f[g+1]*l;c=Math.min(c,z);d=Math.min(d,w);m=Math.max(m,z);p=Math.max(p,w)}var y=this.getResolutionForExtent([c,d,m,p],[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]);y=isNaN(y)?o:Math.max(y,o);if(h){var b=this.constrainResolution(y,0,0);if(!a&&b<y){b=this.constrainResolution(b,-1,0)}y=b}v=-v;var x=(c+m)/2;var E=(d+p)/2;x+=(n[1]-n[3])/2*y;E+=(n[0]-n[2])/2*y;var S=x*l-E*v;var G=E*l+x*v;var P=[S,G];var k=s.callback?s.callback:ta.nullFunction;if(s.duration!==undefined){this.animate({resolution:y,center:P,duration:s.duration,easing:s.easing},k)}else{this.setResolution(y);this.setCenter(P);setTimeout(k.bind(undefined,true),0)}};Go.prototype.centerOn=function(t,i,s){var e=this.getRotation();var r=Math.cos(-e);var n=Math.sin(-e);var h=t[0]*r-t[1]*n;var a=t[1]*r+t[0]*n;var o=this.getResolution();h+=(i[0]/2-s[0])*o;a+=(s[1]-i[1]/2)*o;n=-n;var f=h*r-a*n;var u=a*r+h*n;this.setCenter([f,u])};Go.prototype.isDef=function(){return!!this.getCenter()&&this.getResolution()!==undefined};Go.prototype.rotate=function(t,i){if(i!==undefined){var s=this.calculateCenterRotate(t,i);this.setCenter(s)}this.setRotation(t)};Go.prototype.setCenter=function(t){this.set(bo.CENTER,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setHint=function(t,i){this.hints_[t]+=i;this.changed();return this.hints_[t]};Go.prototype.setResolution=function(t){this.set(bo.RESOLUTION,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setRotation=function(t){this.set(bo.ROTATION,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))};Go.createCenterConstraint_=function(t){if(t.extent!==undefined){return Mo.createExtent(t.extent)}else{return Mo.none}};Go.createResolutionConstraint_=function(t){var i;var s;var e;var r=28;var n=2;var h=t.minZoom!==undefined?t.minZoom:ta.DEFAULT_MIN_ZOOM;var a=t.maxZoom!==undefined?t.maxZoom:r;var o=t.zoomFactor!==undefined?t.zoomFactor:n;if(t.resolutions!==undefined){var f=t.resolutions;s=f[h];e=f[a]!==undefined?f[a]:f[f.length-1];i=zo.createSnapToResolutions(f)}else{var u=Na.createProjection(t.projection,"EPSG:3857");var l=u.getExtent();var v=!l?360*Na.METERS_PER_UNIT[ba.DEGREES]/u.getMetersPerUnit():Math.max(Ma.getWidth(l),Ma.getHeight(l));var c=v/ta.DEFAULT_TILE_SIZE/Math.pow(n,ta.DEFAULT_MIN_ZOOM);var d=c/Math.pow(n,r-ta.DEFAULT_MIN_ZOOM);s=t.maxResolution;if(s!==undefined){h=0}else{s=c/Math.pow(o,h)}e=t.minResolution;if(e===undefined){if(t.maxZoom!==undefined){if(t.maxResolution!==undefined){e=s/Math.pow(o,a)}else{e=c/Math.pow(o,a)}}else{e=d}}a=h+Math.floor(Math.log(s/e)/Math.log(o));e=s/Math.pow(o,a-h);i=zo.createSnapToPower(o,s,a-h)}return{constraint:i,maxResolution:s,minResolution:e,minZoom:h,zoomFactor:o}};Go.createRotationConstraint_=function(t){var i=t.enableRotation!==undefined?t.enableRotation:true;if(i){var s=t.constrainRotation;if(s===undefined||s===true){return wo.createSnapToZero()}else if(s===false){return wo.none}else if(typeof s==="number"){return wo.createSnapToN(s)}else{return wo.none}}else{return wo.disable}};Go.isNoopAnimation=function(t){if(t.sourceCenter&&t.targetCenter){if(!Eo.equals(t.sourceCenter,t.targetCenter)){return false}}if(t.sourceResolution!==t.targetResolution){return false}if(t.sourceRotation!==t.targetRotation){return false}return true};var Po={};Po.createCanvasContext2D=function(t,i){var s=document.createElement("CANVAS");if(t){s.width=t}if(i){s.height=i}return s.getContext("2d")};Po.outerWidth=function(t){var i=t.offsetWidth;var s=getComputedStyle(t);i+=parseInt(s.marginLeft,10)+parseInt(s.marginRight,10);return i};Po.outerHeight=function(t){var i=t.offsetHeight;var s=getComputedStyle(t);i+=parseInt(s.marginTop,10)+parseInt(s.marginBottom,10);return i};Po.replaceNode=function(t,i){var s=i.parentNode;if(s){s.replaceChild(t,i)}};Po.removeNode=function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null};Po.removeChildren=function(t){while(t.lastChild){t.removeChild(t.lastChild)}};var ko={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"};var No=function(t){ua.call(this);var i=ea.assign({},t);i[ko.OPACITY]=t.opacity!==undefined?t.opacity:1;i[ko.VISIBLE]=t.visible!==undefined?t.visible:true;i[ko.Z_INDEX]=t.zIndex!==undefined?t.zIndex:0;i[ko.MAX_RESOLUTION]=t.maxResolution!==undefined?t.maxResolution:Infinity;i[ko.MIN_RESOLUTION]=t.minResolution!==undefined?t.minResolution:0;this.setProperties(i);this.state_={layer:this,managed:true}};ta.inherits(No,ua);No.prototype.getType=function(){return this.type};No.prototype.getLayerState=function(){this.state_.opacity=ca.clamp(this.getOpacity(),0,1);this.state_.sourceState=this.getSourceState();this.state_.visible=this.getVisible();this.state_.extent=this.getExtent();this.state_.zIndex=this.getZIndex();this.state_.maxResolution=this.getMaxResolution();this.state_.minResolution=Math.max(this.getMinResolution(),0);return this.state_};No.prototype.getLayersArray=function(t){};No.prototype.getLayerStatesArray=function(t){};No.prototype.getExtent=function(){return this.get(ko.EXTENT)};No.prototype.getMaxResolution=function(){return this.get(ko.MAX_RESOLUTION)};No.prototype.getMinResolution=function(){return this.get(ko.MIN_RESOLUTION)};No.prototype.getOpacity=function(){return this.get(ko.OPACITY)};No.prototype.getSourceState=function(){};No.prototype.getVisible=function(){return this.get(ko.VISIBLE)};No.prototype.getZIndex=function(){return this.get(ko.Z_INDEX)};No.prototype.setExtent=function(t){this.set(ko.EXTENT,t)};No.prototype.setMaxResolution=function(t){this.set(ko.MAX_RESOLUTION,t)};No.prototype.setMinResolution=function(t){this.set(ko.MIN_RESOLUTION,t)};No.prototype.setOpacity=function(t){this.set(ko.OPACITY,t)};No.prototype.setVisible=function(t){this.set(ko.VISIBLE,t)};No.prototype.setZIndex=function(t){this.set(ko.Z_INDEX,t)};var Io={UNDEFINED:"undefined",READY:"ready"};var Co=function(t){var i=t||{};var s=ea.assign({},i);delete s.layers;var e=i.layers;No.call(this,s);this.layersListenerKeys_=[];this.listenerKeys_={};ra.listen(this,ua.getChangeEventType(Co.Property_.LAYERS),this.handleLayersChanged_,this);if(e){if(Array.isArray(e)){e=new Qa(e.slice(),{unique:true})}else{va.assert(e instanceof Qa,43);e=e}}else{e=new Qa(undefined,{unique:true})}this.setLayers(e)};ta.inherits(Co,No);Co.prototype.handleLayerChange_=function(){this.changed()};Co.prototype.handleLayersChanged_=function(t){this.layersListenerKeys_.forEach(ra.unlistenByKey);this.layersListenerKeys_.length=0;var i=this.getLayers();this.layersListenerKeys_.push(ra.listen(i,$a.ADD,this.handleLayersAdd_,this),ra.listen(i,$a.REMOVE,this.handleLayersRemove_,this));for(var s in this.listenerKeys_){this.listenerKeys_[s].forEach(ra.unlistenByKey)}ea.clear(this.listenerKeys_);var e=i.getArray();var r,n,h;for(r=0,n=e.length;r<n;r++){h=e[r];this.listenerKeys_[ta.getUid(h).toString()]=[ra.listen(h,sa.PROPERTYCHANGE,this.handleLayerChange_,this),ra.listen(h,oa.CHANGE,this.handleLayerChange_,this)]}this.changed()};Co.prototype.handleLayersAdd_=function(t){var i=t.element;var s=ta.getUid(i).toString();this.listenerKeys_[s]=[ra.listen(i,sa.PROPERTYCHANGE,this.handleLayerChange_,this),ra.listen(i,oa.CHANGE,this.handleLayerChange_,this)];this.changed()};Co.prototype.handleLayersRemove_=function(t){var i=t.element;var s=ta.getUid(i).toString();this.listenerKeys_[s].forEach(ra.unlistenByKey);delete this.listenerKeys_[s];this.changed()};Co.prototype.getLayers=function(){return this.get(Co.Property_.LAYERS)};Co.prototype.setLayers=function(t){this.set(Co.Property_.LAYERS,t)};Co.prototype.getLayersArray=function(t){var i=t!==undefined?t:[];this.getLayers().forEach((function(t){t.getLayersArray(i)}));return i};Co.prototype.getLayerStatesArray=function(t){var i=t!==undefined?t:[];var s=i.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(i)}));var e=this.getLayerState();var r,n,h;for(r=s,n=i.length;r<n;r++){h=i[r];h.opacity*=e.opacity;h.visible=h.visible&&e.visible;h.maxResolution=Math.min(h.maxResolution,e.maxResolution);h.minResolution=Math.max(h.minResolution,e.minResolution);if(e.extent!==undefined){if(h.extent!==undefined){h.extent=Ma.getIntersection(h.extent,e.extent)}else{h.extent=e.extent}}}return i};Co.prototype.getSourceState=function(){return Io.READY};Co.Property_={LAYERS:"layers"};var Ao={MAP_RENDERER:"MAP_RENDERER",LAYER_RENDERER:"LAYER_RENDERER"};var Ro={};Ro.mapRendererPlugins_=[];Ro.getMapRendererPlugins=function(){return Ro.mapRendererPlugins_};Ro.layerRendererPlugins_=[];Ro.getLayerRendererPlugins=function(){return Ro.layerRendererPlugins_};Ro.register=function(t,i){var s;switch(t){case Ao.MAP_RENDERER:{s=Ro.mapRendererPlugins_;s.push(i);break}case Ao.LAYER_RENDERER:{s=Ro.layerRendererPlugins_;s.push(i);break}default:{throw new Error("Unsupported plugin type: "+t)}}};Ro.registerMultiple=function(t,i){for(var s=0,e=i.length;s<e;++s){Ro.register(t,i[s])}};var To={CANVAS:"canvas",WEBGL:"webgl"};var Oo={};Oo.buffer=function(t,i,s){if(s===undefined){s=[0,0]}s[0]=t[0]+2*i;s[1]=t[1]+2*i;return s};Oo.hasArea=function(t){return t[0]>0&&t[1]>0};Oo.scale=function(t,i,s){if(s===undefined){s=[0,0]}s[0]=t[0]*i+.5|0;s[1]=t[1]*i+.5|0;return s};Oo.toSize=function(t,i){if(Array.isArray(t)){return t}else{if(i===undefined){i=[t,t]}else{i[0]=i[1]=t}return i}};var Lo=function(t){ua.call(this);var i=Lo.createOptionsInternal(t);this.loadTilesWhileAnimating_=t.loadTilesWhileAnimating!==undefined?t.loadTilesWhileAnimating:false;this.loadTilesWhileInteracting_=t.loadTilesWhileInteracting!==undefined?t.loadTilesWhileInteracting:false;this.pixelRatio_=t.pixelRatio!==undefined?t.pixelRatio:Ja.DEVICE_PIXEL_RATIO;this.logos_=i.logos;this.animationDelay_=function(){this.animationDelayKey_=undefined;this.renderFrame_.call(this,Date.now())}.bind(this);this.coordinateToPixelTransform_=Ia.create();this.pixelToCoordinateTransform_=Ia.create();this.frameIndex_=0;this.frameState_=null;this.previousExtent_=null;this.viewPropertyListenerKey_=null;this.viewChangeListenerKey_=null;this.layerGroupPropertyListenerKeys_=null;this.viewport_=document.createElement("DIV");this.viewport_.className="ol-viewport"+(Ja.TOUCH?" ol-touch":"");this.viewport_.style.position="relative";this.viewport_.style.overflow="hidden";this.viewport_.style.width="100%";this.viewport_.style.height="100%";this.viewport_.style.msTouchAction="none";this.viewport_.style.touchAction="none";this.overlayContainer_=document.createElement("DIV");this.overlayContainer_.className="ol-overlaycontainer";this.viewport_.appendChild(this.overlayContainer_);this.overlayContainerStopEvent_=document.createElement("DIV");this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";var s=[oa.CLICK,oa.DBLCLICK,oa.MOUSEDOWN,oa.TOUCHSTART,oa.MSPOINTERDOWN,so.POINTERDOWN,oa.MOUSEWHEEL,oa.WHEEL];for(var e=0,r=s.length;e<r;++e){ra.listen(this.overlayContainerStopEvent_,s[e],ha.stopPropagation)}this.viewport_.appendChild(this.overlayContainerStopEvent_);this.mapBrowserEventHandler_=new vo(this,t.moveTolerance);for(var n in so){ra.listen(this.mapBrowserEventHandler_,so[n],this.handleMapBrowserEvent,this)}this.keyboardEventTarget_=i.keyboardEventTarget;this.keyHandlerKeys_=null;ra.listen(this.viewport_,oa.WHEEL,this.handleBrowserEvent,this);ra.listen(this.viewport_,oa.MOUSEWHEEL,this.handleBrowserEvent,this);this.controls=i.controls||new Qa;this.interactions=i.interactions||new Qa;this.overlays_=i.overlays;this.overlayIdIndex_={};this.renderer_=i.mapRendererPlugin["create"](this.viewport_,this);this.focus_=null;this.postRenderFunctions_=[];this.tileQueue_=new go(this.getTilePriority.bind(this),this.handleTileChange_.bind(this));this.skippedFeatureUids_={};ra.listen(this,ua.getChangeEventType(mo.LAYERGROUP),this.handleLayerGroupChanged_,this);ra.listen(this,ua.getChangeEventType(mo.VIEW),this.handleViewChanged_,this);ra.listen(this,ua.getChangeEventType(mo.SIZE),this.handleSizeChanged_,this);ra.listen(this,ua.getChangeEventType(mo.TARGET),this.handleTargetChanged_,this);this.setProperties(i.values);this.controls.forEach((function(t){t.setMap(this)}),this);ra.listen(this.controls,$a.ADD,(function(t){t.element.setMap(this)}),this);ra.listen(this.controls,$a.REMOVE,(function(t){t.element.setMap(null)}),this);this.interactions.forEach((function(t){t.setMap(this)}),this);ra.listen(this.interactions,$a.ADD,(function(t){t.element.setMap(this)}),this);ra.listen(this.interactions,$a.REMOVE,(function(t){t.element.setMap(null)}),this);this.overlays_.forEach(this.addOverlayInternal_,this);ra.listen(this.overlays_,$a.ADD,(function(t){this.addOverlayInternal_(t.element)}),this);ra.listen(this.overlays_,$a.REMOVE,(function(t){var i=t.element;var s=i.getId();if(s!==undefined){delete this.overlayIdIndex_[s.toString()]}t.element.setMap(null)}),this)};ta.inherits(Lo,ua);Lo.prototype.addControl=function(t){this.getControls().push(t)};Lo.prototype.addInteraction=function(t){this.getInteractions().push(t)};Lo.prototype.addLayer=function(t){var i=this.getLayerGroup().getLayers();i.push(t)};Lo.prototype.addOverlay=function(t){this.getOverlays().push(t)};Lo.prototype.addOverlayInternal_=function(t){var i=t.getId();if(i!==undefined){this.overlayIdIndex_[i.toString()]=t}t.setMap(this)};Lo.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose();ra.unlisten(this.viewport_,oa.WHEEL,this.handleBrowserEvent,this);ra.unlisten(this.viewport_,oa.MOUSEWHEEL,this.handleBrowserEvent,this);if(this.handleResize_!==undefined){window.removeEventListener(oa.RESIZE,this.handleResize_,false);this.handleResize_=undefined}if(this.animationDelayKey_){cancelAnimationFrame(this.animationDelayKey_);this.animationDelayKey_=undefined}this.setTarget(null);ua.prototype.disposeInternal.call(this)};Lo.prototype.forEachFeatureAtPixel=function(t,i,s){if(!this.frameState_){return}var e=this.getCoordinateFromPixel(t);s=s!==undefined?s:{};var r=s.hitTolerance!==undefined?s.hitTolerance*this.frameState_.pixelRatio:0;var n=s.layerFilter!==undefined?s.layerFilter:wa.TRUE;return this.renderer_.forEachFeatureAtCoordinate(e,this.frameState_,r,i,null,n,null)};Lo.prototype.getFeaturesAtPixel=function(t,i){var s=null;this.forEachFeatureAtPixel(t,(function(t){if(!s){s=[]}s.push(t)}),i);return s};Lo.prototype.forEachLayerAtPixel=function(t,i,s,e,r){if(!this.frameState_){return}var n=s!==undefined?s:null;var h=e!==undefined?e:wa.TRUE;var a=r!==undefined?r:null;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,n,h,a)};Lo.prototype.hasFeatureAtPixel=function(t,i){if(!this.frameState_){return false}var s=this.getCoordinateFromPixel(t);i=i!==undefined?i:{};var e=i.layerFilter!==undefined?i.layerFilter:wa.TRUE;var r=i.hitTolerance!==undefined?i.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(s,this.frameState_,r,e,null)};Lo.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))};Lo.prototype.getEventPixel=function(t){var i=this.viewport_.getBoundingClientRect();var s=t.changedTouches?t.changedTouches[0]:t;return[s.clientX-i.left,s.clientY-i.top]};Lo.prototype.getTarget=function(){return this.get(mo.TARGET)};Lo.prototype.getTargetElement=function(){var t=this.getTarget();if(t!==undefined){return typeof t==="string"?document.getElementById(t):t}else{return null}};Lo.prototype.getCoordinateFromPixel=function(t){var i=this.frameState_;if(!i){return null}else{return Ia.apply(i.pixelToCoordinateTransform,t.slice())}};Lo.prototype.getControls=function(){return this.controls};Lo.prototype.getOverlays=function(){return this.overlays_};Lo.prototype.getOverlayById=function(t){var i=this.overlayIdIndex_[t.toString()];return i!==undefined?i:null};Lo.prototype.getInteractions=function(){return this.interactions};Lo.prototype.getLayerGroup=function(){return this.get(mo.LAYERGROUP)};Lo.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t};Lo.prototype.getPixelFromCoordinate=function(t){var i=this.frameState_;if(!i){return null}else{return Ia.apply(i.coordinateToPixelTransform,t.slice(0,2))}};Lo.prototype.getRenderer=function(){return this.renderer_};Lo.prototype.getSize=function(){return this.get(mo.SIZE)};Lo.prototype.getView=function(){return this.get(mo.VIEW)};Lo.prototype.getViewport=function(){return this.viewport_};Lo.prototype.getOverlayContainer=function(){return this.overlayContainer_};Lo.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_};Lo.prototype.getTilePriority=function(t,i,s,e){var r=this.frameState_;if(!r||!(i in r.wantedTiles)){return _o.DROP}if(!r.wantedTiles[i][t.getKey()]){return _o.DROP}var n=s[0]-r.focus[0];var h=s[1]-r.focus[1];return 65536*Math.log(e)+Math.sqrt(n*n+h*h)/e};Lo.prototype.handleBrowserEvent=function(t,i){var s=i||t.type;var e=new io(s,this,t);this.handleMapBrowserEvent(e)};Lo.prototype.handleMapBrowserEvent=function(t){if(!this.frameState_){return}this.focus_=t.coordinate;t.frameState=this.frameState_;var i=this.getInteractions().getArray();var s;if(this.dispatchEvent(t)!==false){for(s=i.length-1;s>=0;s--){var e=i[s];if(!e.getActive()){continue}var r=e.handleEvent(t);if(!r){break}}}};Lo.prototype.handlePostRender=function(){var t=this.frameState_;var i=this.tileQueue_;if(!i.isEmpty()){var s=16;var e=s;if(t){var r=t.viewHints;if(r[yo.ANIMATING]){s=this.loadTilesWhileAnimating_?8:0;e=2}if(r[yo.INTERACTING]){s=this.loadTilesWhileInteracting_?8:0;e=2}}if(i.getTilesLoading()<s){i.reprioritize();i.loadMoreTiles(s,e)}}var n=this.postRenderFunctions_;var h,a;for(h=0,a=n.length;h<a;++h){n[h](this,t)}n.length=0};Lo.prototype.handleSizeChanged_=function(){this.render()};Lo.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()){t=this.getTargetElement()}if(this.keyHandlerKeys_){for(var i=0,s=this.keyHandlerKeys_.length;i<s;++i){ra.unlistenByKey(this.keyHandlerKeys_[i])}this.keyHandlerKeys_=null}if(!t){this.renderer_.removeLayerRenderers();Po.removeNode(this.viewport_);if(this.handleResize_!==undefined){window.removeEventListener(oa.RESIZE,this.handleResize_,false);this.handleResize_=undefined}}else{t.appendChild(this.viewport_);var e=!this.keyboardEventTarget_?t:this.keyboardEventTarget_;this.keyHandlerKeys_=[ra.listen(e,oa.KEYDOWN,this.handleBrowserEvent,this),ra.listen(e,oa.KEYPRESS,this.handleBrowserEvent,this)];if(!this.handleResize_){this.handleResize_=this.updateSize.bind(this);window.addEventListener(oa.RESIZE,this.handleResize_,false)}}this.updateSize()};Lo.prototype.handleTileChange_=function(){this.render()};Lo.prototype.handleViewPropertyChanged_=function(){this.render()};Lo.prototype.handleViewChanged_=function(){if(this.viewPropertyListenerKey_){ra.unlistenByKey(this.viewPropertyListenerKey_);this.viewPropertyListenerKey_=null}if(this.viewChangeListenerKey_){ra.unlistenByKey(this.viewChangeListenerKey_);this.viewChangeListenerKey_=null}var t=this.getView();if(t){this.viewport_.setAttribute("data-view",ta.getUid(t));this.viewPropertyListenerKey_=ra.listen(t,sa.PROPERTYCHANGE,this.handleViewPropertyChanged_,this);this.viewChangeListenerKey_=ra.listen(t,oa.CHANGE,this.handleViewPropertyChanged_,this)}this.render()};Lo.prototype.handleLayerGroupChanged_=function(){if(this.layerGroupPropertyListenerKeys_){this.layerGroupPropertyListenerKeys_.forEach(ra.unlistenByKey);this.layerGroupPropertyListenerKeys_=null}var t=this.getLayerGroup();if(t){this.layerGroupPropertyListenerKeys_=[ra.listen(t,sa.PROPERTYCHANGE,this.render,this),ra.listen(t,oa.CHANGE,this.render,this)]}this.render()};Lo.prototype.isRendered=function(){return!!this.frameState_};Lo.prototype.renderSync=function(){if(this.animationDelayKey_){cancelAnimationFrame(this.animationDelayKey_)}this.animationDelay_()};Lo.prototype.render=function(){if(this.animationDelayKey_===undefined){this.animationDelayKey_=requestAnimationFrame(this.animationDelay_)}};Lo.prototype.removeControl=function(t){return this.getControls().remove(t)};Lo.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)};Lo.prototype.removeLayer=function(t){var i=this.getLayerGroup().getLayers();return i.remove(t)};Lo.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)};Lo.prototype.renderFrame_=function(t){var i,s,e;var r=this.getSize();var n=this.getView();var h=Ma.createEmpty();var a=this.frameState_;var o=null;if(r!==undefined&&Oo.hasArea(r)&&n&&n.isDef()){var f=n.getHints(this.frameState_?this.frameState_.viewHints:undefined);var u=this.getLayerGroup().getLayerStatesArray();var l={};for(i=0,s=u.length;i<s;++i){l[ta.getUid(u[i].layer)]=u[i]}e=n.getState();var v=e.center;var c=e.resolution/this.pixelRatio_;v[0]=Math.round(v[0]/c)*c;v[1]=Math.round(v[1]/c)*c;o={animate:false,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:h,focus:!this.focus_?v:this.focus_,index:this.frameIndex_++,layerStates:l,layerStatesArray:u,logos:ea.assign({},this.logos_),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:r,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:e,viewHints:f,wantedTiles:{}}}if(o){o.extent=Ma.getForViewAndSize(e.center,e.resolution,e.rotation,o.size,h)}this.frameState_=o;this.renderer_.renderFrame(o);if(o){if(o.animate){this.render()}Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions);if(a){var d=!this.previousExtent_||!Ma.isEmpty(this.previousExtent_)&&!Ma.equals(o.extent,this.previousExtent_);if(d){this.dispatchEvent(new to(co.MOVESTART,this,a));this.previousExtent_=Ma.createOrUpdateEmpty(this.previousExtent_)}}var m=this.previousExtent_&&!o.viewHints[yo.ANIMATING]&&!o.viewHints[yo.INTERACTING]&&!Ma.equals(o.extent,this.previousExtent_);if(m){this.dispatchEvent(new to(co.MOVEEND,this,o));Ma.clone(o.extent,this.previousExtent_)}}this.dispatchEvent(new to(co.POSTRENDER,this,o));setTimeout(this.handlePostRender.bind(this),0)};Lo.prototype.setLayerGroup=function(t){this.set(mo.LAYERGROUP,t)};Lo.prototype.setSize=function(t){this.set(mo.SIZE,t)};Lo.prototype.setTarget=function(t){this.set(mo.TARGET,t)};Lo.prototype.setView=function(t){this.set(mo.VIEW,t)};Lo.prototype.skipFeature=function(t){var i=ta.getUid(t).toString();this.skippedFeatureUids_[i]=true;this.render()};Lo.prototype.updateSize=function(){var t=this.getTargetElement();if(!t){this.setSize(undefined)}else{var i=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(i["borderLeftWidth"])-parseFloat(i["paddingLeft"])-parseFloat(i["paddingRight"])-parseFloat(i["borderRightWidth"]),t.offsetHeight-parseFloat(i["borderTopWidth"])-parseFloat(i["paddingTop"])-parseFloat(i["paddingBottom"])-parseFloat(i["borderBottomWidth"])])}};Lo.prototype.unskipFeature=function(t){var i=ta.getUid(t).toString();delete this.skippedFeatureUids_[i];this.render()};Lo.DEFAULT_RENDERER_TYPES=[To.CANVAS,To.WEBGL];Lo.LOGO_URL="data:image/png;base64,"+"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI"+"WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA"+"AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW"+"WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY"+"asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvX"+"H1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1Vk"+"bMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW"+"2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLP"+"VcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqT"+"acrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaar"+"ldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+Hi"+"zeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDn"+"BAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSF"+"hYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJ"+"REFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxC"+"Brb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe"+"0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8"+"a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7a"+"hgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn"+"B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg"+"q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC";Lo.createOptionsInternal=function(t){var i=null;if(t.keyboardEventTarget!==undefined){i=typeof t.keyboardEventTarget==="string"?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget}var s={};var e={};if(t.logo===undefined||typeof t.logo==="boolean"&&t.logo){e[Lo.LOGO_URL]="https://openlayers.org/"}else{var r=t.logo;if(typeof r==="string"){e[r]=""}else if(r instanceof HTMLElement){e[ta.getUid(r).toString()]=r}else if(r){va.assert(typeof r.href=="string",44);va.assert(typeof r.src=="string",45);e[r.src]=r.href}}var n=t.layers instanceof Co?t.layers:new Co({layers:t.layers});s[mo.LAYERGROUP]=n;s[mo.TARGET]=t.target;s[mo.VIEW]=t.view!==undefined?t.view:new Go;var h;if(t.renderer!==undefined){if(Array.isArray(t.renderer)){h=t.renderer}else if(typeof t.renderer==="string"){h=[t.renderer]}else{va.assert(false,46)}if(h.indexOf("dom")>=0){h=h.concat(Lo.DEFAULT_RENDERER_TYPES)}}else{h=Lo.DEFAULT_RENDERER_TYPES}var a;var o=Ro.getMapRendererPlugins();t:for(var f=0,u=h.length;f<u;++f){var l=h[f];for(var v=0,c=o.length;v<c;++v){var d=o[v];if(d["handles"](l)){a=d;break t}}}if(!a){throw new Error("Unable to create a map renderer for types: "+h.join(", "))}var m;if(t.controls!==undefined){if(Array.isArray(t.controls)){m=new Qa(t.controls.slice())}else{va.assert(t.controls instanceof Qa,47);m=t.controls}}var p;if(t.interactions!==undefined){if(Array.isArray(t.interactions)){p=new Qa(t.interactions.slice())}else{va.assert(t.interactions instanceof Qa,48);p=t.interactions}}var _;if(t.overlays!==undefined){if(Array.isArray(t.overlays)){_=new Qa(t.overlays.slice())}else{va.assert(t.overlays instanceof Qa,49);_=t.overlays}}else{_=new Qa}return{controls:m,interactions:p,keyboardEventTarget:i,logos:e,overlays:_,mapRendererPlugin:a,values:s}};var Fo=function(t){ua.call(this);this.element=t.element?t.element:null;this.target_=null;this.map_=null;this.listenerKeys=[];this.render=t.render?t.render:ta.nullFunction;if(t.target){this.setTarget(t.target)}};ta.inherits(Fo,ua);Fo.prototype.disposeInternal=function(){Po.removeNode(this.element);ua.prototype.disposeInternal.call(this)};Fo.prototype.getMap=function(){return this.map_};Fo.prototype.setMap=function(t){if(this.map_){Po.removeNode(this.element)}for(var i=0,s=this.listenerKeys.length;i<s;++i){ra.unlistenByKey(this.listenerKeys[i])}this.listenerKeys.length=0;this.map_=t;if(this.map_){var e=this.target_?this.target_:t.getOverlayContainerStopEvent();e.appendChild(this.element);if(this.render!==ta.nullFunction){this.listenerKeys.push(ra.listen(t,co.POSTRENDER,this.render,this))}t.render()}};Fo.prototype.setTarget=function(t){this.target_=typeof t==="string"?document.getElementById(t):t};var Do={};Do.CLASS_HIDDEN="ol-hidden";Do.CLASS_SELECTABLE="ol-selectable";Do.CLASS_UNSELECTABLE="ol-unselectable";Do.CLASS_UNSUPPORTED="ol-unsupported";Do.CLASS_CONTROL="ol-control";Do.getFontFamilies=function(){var t;var i={};return function(s){if(!t){t=document.createElement("div").style}if(!(s in i)){t.font=s;var e=t.fontFamily;t.font="";if(!e){return null}i[s]=e.split(/,\s?/)}return i[s]}}();var Wo={POSTCOMPOSE:"postcompose",PRECOMPOSE:"precompose",RENDER:"render"};var jo=function(t){var i=ea.assign({},t);delete i.source;No.call(this,i);this.mapPrecomposeKey_=null;this.mapRenderKey_=null;this.sourceChangeKey_=null;if(t.map){this.setMap(t.map)}ra.listen(this,ua.getChangeEventType(ko.SOURCE),this.handleSourcePropertyChange_,this);var s=t.source?t.source:null;this.setSource(s)};ta.inherits(jo,No);jo.visibleAtResolution=function(t,i){return t.visible&&i>=t.minResolution&&i<t.maxResolution};jo.prototype.getLayersArray=function(t){var i=t?t:[];i.push(this);return i};jo.prototype.getLayerStatesArray=function(t){var i=t?t:[];i.push(this.getLayerState());return i};jo.prototype.getSource=function(){var t=this.get(ko.SOURCE);return t||null};jo.prototype.getSourceState=function(){var t=this.getSource();return!t?Io.UNDEFINED:t.getState()};jo.prototype.handleSourceChange_=function(){this.changed()};jo.prototype.handleSourcePropertyChange_=function(){if(this.sourceChangeKey_){ra.unlistenByKey(this.sourceChangeKey_);this.sourceChangeKey_=null}var t=this.getSource();if(t){this.sourceChangeKey_=ra.listen(t,oa.CHANGE,this.handleSourceChange_,this)}this.changed()};jo.prototype.setMap=function(t){if(this.mapPrecomposeKey_){ra.unlistenByKey(this.mapPrecomposeKey_);this.mapPrecomposeKey_=null}if(!t){this.changed()}if(this.mapRenderKey_){ra.unlistenByKey(this.mapRenderKey_);this.mapRenderKey_=null}if(t){this.mapPrecomposeKey_=ra.listen(t,Wo.PRECOMPOSE,(function(t){var i=this.getLayerState();i.managed=false;i.zIndex=Infinity;t.frameState.layerStatesArray.push(i);t.frameState.layerStates[ta.getUid(this)]=i}),this);this.mapRenderKey_=ra.listen(this,oa.CHANGE,t.render,t);this.changed()}};jo.prototype.setSource=function(t){this.set(ko.SOURCE,t)};var Vo=function(t){var i=t?t:{};this.ulElement_=document.createElement("UL");this.logoLi_=document.createElement("LI");this.ulElement_.appendChild(this.logoLi_);this.logoLi_.style.display="none";this.collapsed_=i.collapsed!==undefined?i.collapsed:true;this.collapsible_=i.collapsible!==undefined?i.collapsible:true;if(!this.collapsible_){this.collapsed_=false}var s=i.className!==undefined?i.className:"ol-attribution";var e=i.tipLabel!==undefined?i.tipLabel:"Attributions";var r=i.collapseLabel!==undefined?i.collapseLabel:"»";if(typeof r==="string"){this.collapseLabel_=document.createElement("span");this.collapseLabel_.textContent=r}else{this.collapseLabel_=r}var n=i.label!==undefined?i.label:"i";if(typeof n==="string"){this.label_=document.createElement("span");this.label_.textContent=n}else{this.label_=n}var h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;var a=document.createElement("button");a.setAttribute("type","button");a.title=e;a.appendChild(h);ra.listen(a,oa.CLICK,this.handleClick_,this);var o=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" ol-collapsed":"")+(this.collapsible_?"":" ol-uncollapsible");var f=document.createElement("div");f.className=o;f.appendChild(this.ulElement_);f.appendChild(a);var u=i.render?i.render:Vo.render;Fo.call(this,{element:f,render:u,target:i.target});this.renderedAttributions_=[];this.renderedVisible_=true;this.logoElements_={}};ta.inherits(Vo,Fo);Vo.prototype.getSourceAttributions_=function(t){var i={};var s=[];var e=t.layerStatesArray;var r=t.viewState.resolution;for(var n=0,h=e.length;n<h;++n){var a=e[n];if(!jo.visibleAtResolution(a,r)){continue}var o=a.layer.getSource();if(!o){continue}var f=o.getAttributions2();if(!f){continue}var u=f(t);if(!u){continue}if(Array.isArray(u)){for(var l=0,v=u.length;l<v;++l){if(!(u[l]in i)){s.push(u[l]);i[u[l]]=true}}}else{if(!(u in i)){s.push(u);i[u]=true}}}return s};Vo.render=function(t){this.updateElement_(t.frameState)};Vo.prototype.updateElement_=function(t){if(!t){if(this.renderedVisible_){this.element.style.display="none";this.renderedVisible_=false}return}var i=this.getSourceAttributions_(t);if(pa.equals(i,this.renderedAttributions_)){return}while(this.ulElement_.lastChild!==this.logoLi_){this.ulElement_.removeChild(this.ulElement_.lastChild)}for(var s=0,e=i.length;s<e;++s){var r=document.createElement("LI");r.innerHTML=i[s];this.ulElement_.appendChild(r)}if(i.length===0&&this.renderedAttributions_.length>0){this.element.classList.add("ol-logo-only")}else if(this.renderedAttributions_.length===0&&i.length>0){this.element.classList.remove("ol-logo-only")}var n=i.length>0||!ea.isEmpty(t.logos);if(this.renderedVisible_!=n){this.element.style.display=n?"":"none";this.renderedVisible_=n}this.renderedAttributions_=i;this.insertLogos_(t)};Vo.prototype.insertLogos_=function(t){var i;var s=t.logos;var e=this.logoElements_;for(i in e){if(!(i in s)){Po.removeNode(e[i]);delete e[i]}}var r,n,h;for(h in s){var a=s[h];if(a instanceof HTMLElement){this.logoLi_.appendChild(a);e[h]=a}if(!(h in e)){r=new Image;r.src=h;if(a===""){n=r}else{n=document.createElement("a");n.href=a;n.appendChild(r)}this.logoLi_.appendChild(n);e[h]=n}}this.logoLi_.style.display=!ea.isEmpty(s)?"":"none"};Vo.prototype.handleClick_=function(t){t.preventDefault();this.handleToggle_()};Vo.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed");if(this.collapsed_){Po.replaceNode(this.collapseLabel_,this.label_)}else{Po.replaceNode(this.label_,this.collapseLabel_)}this.collapsed_=!this.collapsed_};Vo.prototype.getCollapsible=function(){return this.collapsible_};Vo.prototype.setCollapsible=function(t){if(this.collapsible_===t){return}this.collapsible_=t;this.element.classList.toggle("ol-uncollapsible");if(!t&&this.collapsed_){this.handleToggle_()}};Vo.prototype.setCollapsed=function(t){if(!this.collapsible_||this.collapsed_===t){return}this.handleToggle_()};Vo.prototype.getCollapsed=function(){return this.collapsed_};var Uo=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-rotate";var e=i.label!==undefined?i.label:"⇧";this.label_=null;if(typeof e==="string"){this.label_=document.createElement("span");this.label_.className="ol-compass";this.label_.textContent=e}else{this.label_=e;this.label_.classList.add("ol-compass")}var r=i.tipLabel?i.tipLabel:"Reset rotation";var n=document.createElement("button");n.className=s+"-reset";n.setAttribute("type","button");n.title=r;n.appendChild(this.label_);ra.listen(n,oa.CLICK,Uo.prototype.handleClick_,this);var h=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL;var a=document.createElement("div");a.className=h;a.appendChild(n);var o=i.render?i.render:Uo.render;this.callResetNorth_=i.resetNorth?i.resetNorth:undefined;Fo.call(this,{element:a,render:o,target:i.target});this.duration_=i.duration!==undefined?i.duration:250;this.autoHide_=i.autoHide!==undefined?i.autoHide:true;this.rotation_=undefined;if(this.autoHide_){this.element.classList.add(Do.CLASS_HIDDEN)}};ta.inherits(Uo,Fo);Uo.prototype.handleClick_=function(t){t.preventDefault();if(this.callResetNorth_!==undefined){this.callResetNorth_()}else{this.resetNorth_()}};Uo.prototype.resetNorth_=function(){var t=this.getMap();var i=t.getView();if(!i){return}if(i.getRotation()!==undefined){if(this.duration_>0){i.animate({rotation:0,duration:this.duration_,easing:So.easeOut})}else{i.setRotation(0)}}};Uo.render=function(t){var i=t.frameState;if(!i){return}var s=i.viewState.rotation;if(s!=this.rotation_){var e="rotate("+s+"rad)";if(this.autoHide_){var r=this.element.classList.contains(Do.CLASS_HIDDEN);if(!r&&s===0){this.element.classList.add(Do.CLASS_HIDDEN)}else if(r&&s!==0){this.element.classList.remove(Do.CLASS_HIDDEN)}}this.label_.style.msTransform=e;this.label_.style.webkitTransform=e;this.label_.style.transform=e}this.rotation_=s};var qo=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-zoom";var e=i.delta!==undefined?i.delta:1;var r=i.zoomInLabel!==undefined?i.zoomInLabel:"+";var n=i.zoomOutLabel!==undefined?i.zoomOutLabel:"−";var h=i.zoomInTipLabel!==undefined?i.zoomInTipLabel:"Zoom in";var a=i.zoomOutTipLabel!==undefined?i.zoomOutTipLabel:"Zoom out";var o=document.createElement("button");o.className=s+"-in";o.setAttribute("type","button");o.title=h;o.appendChild(typeof r==="string"?document.createTextNode(r):r);ra.listen(o,oa.CLICK,qo.prototype.handleClick_.bind(this,e));var f=document.createElement("button");f.className=s+"-out";f.setAttribute("type","button");f.title=a;f.appendChild(typeof n==="string"?document.createTextNode(n):n);ra.listen(f,oa.CLICK,qo.prototype.handleClick_.bind(this,-e));var u=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL;var l=document.createElement("div");l.className=u;l.appendChild(o);l.appendChild(f);Fo.call(this,{element:l,target:i.target});this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(qo,Fo);qo.prototype.handleClick_=function(t,i){i.preventDefault();this.zoomByDelta_(t)};qo.prototype.zoomByDelta_=function(t){var i=this.getMap();var s=i.getView();if(!s){return}var e=s.getResolution();if(e){var r=s.constrainResolution(e,t);if(this.duration_>0){if(s.getAnimating()){s.cancelAnimations()}s.animate({resolution:r,duration:this.duration_,easing:So.easeOut})}else{s.setResolution(r)}}};var Bo={};Bo.defaults=function(t){var i=t?t:{};var s=new Qa;var e=i.zoom!==undefined?i.zoom:true;if(e){s.push(new qo(i.zoomOptions))}var r=i.rotate!==undefined?i.rotate:true;if(r){s.push(new Uo(i.rotateOptions))}var n=i.attribution!==undefined?i.attribution:true;if(n){s.push(new Vo(i.attributionOptions))}return s};var Ho=function(t,i,s){this.decay_=t;this.minVelocity_=i;this.delay_=s;this.points_=[];this.angle_=0;this.initialVelocity_=0};Ho.prototype.begin=function(){this.points_.length=0;this.angle_=0;this.initialVelocity_=0};Ho.prototype.update=function(t,i){this.points_.push(t,i,Date.now())};Ho.prototype.end=function(){if(this.points_.length<6){return false}var t=Date.now()-this.delay_;var i=this.points_.length-3;if(this.points_[i+2]<t){return false}var s=i-3;while(s>0&&this.points_[s+2]>t){s-=3}var e=this.points_[i+2]-this.points_[s+2];if(e<1e3/60){return false}var r=this.points_[i]-this.points_[s];var n=this.points_[i+1]-this.points_[s+1];this.angle_=Math.atan2(n,r);this.initialVelocity_=Math.sqrt(r*r+n*n)/e;return this.initialVelocity_>this.minVelocity_};Ho.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_};Ho.prototype.getAngle=function(){return this.angle_};var Xo={ACTIVE:"active"};var Yo=function(t){ua.call(this);this.map_=null;this.setActive(true);this.handleEvent=t.handleEvent};ta.inherits(Yo,ua);Yo.prototype.getActive=function(){return this.get(Xo.ACTIVE)};Yo.prototype.getMap=function(){return this.map_};Yo.prototype.setActive=function(t){this.set(Xo.ACTIVE,t)};Yo.prototype.setMap=function(t){this.map_=t};Yo.pan=function(t,i,s){var e=t.getCenter();if(e){var r=t.constrainCenter([e[0]+i[0],e[1]+i[1]]);if(s){t.animate({duration:s,easing:So.linear,center:r})}else{t.setCenter(r)}}};Yo.rotate=function(t,i,s,e){i=t.constrainRotation(i,0);Yo.rotateWithoutConstraints(t,i,s,e)};Yo.rotateWithoutConstraints=function(t,i,s,e){if(i!==undefined){var r=t.getRotation();var n=t.getCenter();if(r!==undefined&&n&&e>0){t.animate({rotation:i,anchor:s,duration:e,easing:So.easeOut})}else{t.rotate(i,s)}}};Yo.zoom=function(t,i,s,e,r){i=t.constrainResolution(i,0,r);Yo.zoomWithoutConstraints(t,i,s,e)};Yo.zoomByDelta=function(t,i,s,e){var r=t.getResolution();var n=t.constrainResolution(r,i,0);if(n!==undefined){var h=t.getResolutions();n=ca.clamp(n,t.getMinResolution()||h[h.length-1],t.getMaxResolution()||h[0])}if(s&&n!==undefined&&n!==r){var a=t.getCenter();var o=t.calculateCenterZoom(n,s);o=t.constrainCenter(o);s=[(n*a[0]-r*o[0])/(n-r),(n*a[1]-r*o[1])/(n-r)]}Yo.zoomWithoutConstraints(t,n,s,e)};Yo.zoomWithoutConstraints=function(t,i,s,e){if(i){var r=t.getResolution();var n=t.getCenter();if(r!==undefined&&n&&i!==r&&e){t.animate({resolution:i,anchor:s,duration:e,easing:So.easeOut})}else{if(s){var h=t.calculateCenterZoom(i,s);t.setCenter(h)}t.setResolution(i)}}};var Jo=function(t){var i=t?t:{};this.delta_=i.delta?i.delta:1;Yo.call(this,{handleEvent:Jo.handleEvent});this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(Jo,Yo);Jo.handleEvent=function(t){var i=false;var s=t.originalEvent;if(t.type==so.DBLCLICK){var e=t.map;var r=t.coordinate;var n=s.shiftKey?-this.delta_:this.delta_;var h=e.getView();Yo.zoomByDelta(h,n,r,this.duration_);t.preventDefault();i=true}return!i};var Ko={};Ko.altKeyOnly=function(t){var i=t.originalEvent;return i.altKey&&!(i.metaKey||i.ctrlKey)&&!i.shiftKey};Ko.altShiftKeysOnly=function(t){var i=t.originalEvent;return i.altKey&&!(i.metaKey||i.ctrlKey)&&i.shiftKey};Ko.always=wa.TRUE;Ko.click=function(t){return t.type==so.CLICK};Ko.mouseActionButton=function(t){var i=t.originalEvent;return i.button==0&&!(Ja.WEBKIT&&Ja.MAC&&i.ctrlKey)};Ko.never=wa.FALSE;Ko.pointerMove=function(t){return t.type=="pointermove"};Ko.singleClick=function(t){return t.type==so.SINGLECLICK};Ko.doubleClick=function(t){return t.type==so.DBLCLICK};Ko.noModifierKeys=function(t){var i=t.originalEvent;return!i.altKey&&!(i.metaKey||i.ctrlKey)&&!i.shiftKey};Ko.platformModifierKeyOnly=function(t){var i=t.originalEvent;return!i.altKey&&(Ja.MAC?i.metaKey:i.ctrlKey)&&!i.shiftKey};Ko.shiftKeyOnly=function(t){var i=t.originalEvent;return!i.altKey&&!(i.metaKey||i.ctrlKey)&&i.shiftKey};Ko.targetNotEditable=function(t){var i=t.originalEvent.target;var s=i.tagName;return s!=="INPUT"&&s!=="SELECT"&&s!=="TEXTAREA"};Ko.mouseOnly=function(t){va.assert(t.pointerEvent,56);return t.pointerEvent.pointerType=="mouse"};Ko.primaryAction=function(t){var i=t.pointerEvent;return i.isPrimary&&i.button===0};var Zo=function(t){var i=t?t:{};var s=i.handleEvent?i.handleEvent:Zo.handleEvent;Yo.call(this,{handleEvent:s});this.handleDownEvent_=i.handleDownEvent?i.handleDownEvent:Zo.handleDownEvent;this.handleDragEvent_=i.handleDragEvent?i.handleDragEvent:Zo.handleDragEvent;this.handleMoveEvent_=i.handleMoveEvent?i.handleMoveEvent:Zo.handleMoveEvent;this.handleUpEvent_=i.handleUpEvent?i.handleUpEvent:Zo.handleUpEvent;this.handlingDownUpSequence=false;this.trackedPointers_={};this.targetPointers=[]};ta.inherits(Zo,Yo);Zo.centroid=function(t){var i=t.length;var s=0;var e=0;for(var r=0;r<i;r++){s+=t[r].clientX;e+=t[r].clientY}return[s/i,e/i]};Zo.prototype.isPointerDraggingEvent_=function(t){var i=t.type;return i===so.POINTERDOWN||i===so.POINTERDRAG||i===so.POINTERUP};Zo.prototype.updateTrackedPointers_=function(t){if(this.isPointerDraggingEvent_(t)){var i=t.pointerEvent;var s=i.pointerId.toString();if(t.type==so.POINTERUP){delete this.trackedPointers_[s]}else if(t.type==so.POINTERDOWN){this.trackedPointers_[s]=i}else if(s in this.trackedPointers_){this.trackedPointers_[s]=i}this.targetPointers=ea.getValues(this.trackedPointers_)}};Zo.handleDragEvent=ta.nullFunction;Zo.handleUpEvent=wa.FALSE;Zo.handleDownEvent=wa.FALSE;Zo.handleMoveEvent=ta.nullFunction;Zo.handleEvent=function(t){if(!(t instanceof eo)){return true}var i=false;this.updateTrackedPointers_(t);if(this.handlingDownUpSequence){if(t.type==so.POINTERDRAG){this.handleDragEvent_(t)}else if(t.type==so.POINTERUP){var s=this.handleUpEvent_(t);this.handlingDownUpSequence=s&&this.targetPointers.length>0}}else{if(t.type==so.POINTERDOWN){var e=this.handleDownEvent_(t);this.handlingDownUpSequence=e;i=this.shouldStopEvent(e)}else if(t.type==so.POINTERMOVE){this.handleMoveEvent_(t)}}return!i};Zo.prototype.shouldStopEvent=function(t){return t};var $o=function(t){Zo.call(this,{handleDownEvent:$o.handleDownEvent_,handleDragEvent:$o.handleDragEvent_,handleUpEvent:$o.handleUpEvent_});var i=t?t:{};this.kinetic_=i.kinetic;this.lastCentroid=null;this.condition_=i.condition?i.condition:Ko.noModifierKeys;this.noKinetic_=false};ta.inherits($o,Zo);$o.handleDragEvent_=function(t){var i=this.targetPointers;var s=Zo.centroid(i);if(i.length==this.lastPointersCount_){if(this.kinetic_){this.kinetic_.update(s[0],s[1])}if(this.lastCentroid){var e=this.lastCentroid[0]-s[0];var r=s[1]-this.lastCentroid[1];var n=t.map;var h=n.getView();var a=h.getState();var o=[e,r];Eo.scale(o,a.resolution);Eo.rotate(o,a.rotation);Eo.add(o,a.center);o=h.constrainCenter(o);h.setCenter(o)}}else if(this.kinetic_){this.kinetic_.begin()}this.lastCentroid=s;this.lastPointersCount_=i.length};$o.handleUpEvent_=function(t){var i=t.map;var s=i.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var e=this.kinetic_.getDistance();var r=this.kinetic_.getAngle();var n=s.getCenter();var h=i.getPixelFromCoordinate(n);var a=i.getCoordinateFromPixel([h[0]-e*Math.cos(r),h[1]-e*Math.sin(r)]);s.animate({center:s.constrainCenter(a),duration:500,easing:So.easeOut})}s.setHint(yo.INTERACTING,-1);return false}else{if(this.kinetic_){this.kinetic_.begin()}this.lastCentroid=null;return true}};$o.handleDownEvent_=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var i=t.map;var s=i.getView();this.lastCentroid=null;if(!this.handlingDownUpSequence){s.setHint(yo.INTERACTING,1)}if(s.getAnimating()){s.setCenter(t.frameState.viewState.center)}if(this.kinetic_){this.kinetic_.begin()}this.noKinetic_=this.targetPointers.length>1;return true}else{return false}};$o.prototype.shouldStopEvent=wa.FALSE;var Qo=function(t){var i=t?t:{};Zo.call(this,{handleDownEvent:Qo.handleDownEvent_,handleDragEvent:Qo.handleDragEvent_,handleUpEvent:Qo.handleUpEvent_});this.condition_=i.condition?i.condition:Ko.altShiftKeysOnly;this.lastAngle_=undefined;this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(Qo,Zo);Qo.handleDragEvent_=function(t){if(!Ko.mouseOnly(t)){return}var i=t.map;var s=i.getView();if(s.getConstraints().rotation===wo.disable){return}var e=i.getSize();var r=t.pixel;var n=Math.atan2(e[1]/2-r[1],r[0]-e[0]/2);if(this.lastAngle_!==undefined){var h=n-this.lastAngle_;var a=s.getRotation();Yo.rotateWithoutConstraints(s,a-h)}this.lastAngle_=n};Qo.handleUpEvent_=function(t){if(!Ko.mouseOnly(t)){return true}var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);var e=s.getRotation();Yo.rotate(s,e,undefined,this.duration_);return false};Qo.handleDownEvent_=function(t){if(!Ko.mouseOnly(t)){return false}if(Ko.mouseActionButton(t)&&this.condition_(t)){var i=t.map;i.getView().setHint(yo.INTERACTING,1);this.lastAngle_=undefined;return true}else{return false}};Qo.prototype.shouldStopEvent=wa.FALSE;var tf=function(t){this.geometry_=null;this.element_=document.createElement("div");this.element_.style.position="absolute";this.element_.className="ol-box "+t;this.map_=null;this.startPixel_=null;this.endPixel_=null};ta.inherits(tf,na);tf.prototype.disposeInternal=function(){this.setMap(null)};tf.prototype.render_=function(){var t=this.startPixel_;var i=this.endPixel_;var s="px";var e=this.element_.style;e.left=Math.min(t[0],i[0])+s;e.top=Math.min(t[1],i[1])+s;e.width=Math.abs(i[0]-t[0])+s;e.height=Math.abs(i[1]-t[1])+s};tf.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var i=this.element_.style;i.left=i.top=i.width=i.height="inherit"}this.map_=t;if(this.map_){this.map_.getOverlayContainer().appendChild(this.element_)}};tf.prototype.setPixels=function(t,i){this.startPixel_=t;this.endPixel_=i;this.createOrUpdateGeometry();this.render_()};tf.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_;var i=this.endPixel_;var s=[t,[t[0],i[1]],i,[i[0],t[1]]];var e=s.map(this.map_.getCoordinateFromPixel,this.map_);e[4]=e[0].slice();if(!this.geometry_){this.geometry_=new Xa([e])}else{this.geometry_.setCoordinates([e])}};tf.prototype.getGeometry=function(){return this.geometry_};var sf=function(t){Zo.call(this,{handleDownEvent:sf.handleDownEvent_,handleDragEvent:sf.handleDragEvent_,handleUpEvent:sf.handleUpEvent_});var i=t?t:{};this.box_=new tf(i.className||"ol-dragbox");this.minArea_=i.minArea!==undefined?i.minArea:64;this.startPixel_=null;this.condition_=i.condition?i.condition:Ko.always;this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:sf.defaultBoxEndCondition};ta.inherits(sf,Zo);sf.defaultBoxEndCondition=function(t,i,s){var e=s[0]-i[0];var r=s[1]-i[1];return e*e+r*r>=this.minArea_};sf.handleDragEvent_=function(t){if(!Ko.mouseOnly(t)){return}this.box_.setPixels(this.startPixel_,t.pixel);this.dispatchEvent(new sf.Event(sf.EventType_.BOXDRAG,t.coordinate,t))};sf.prototype.getGeometry=function(){return this.box_.getGeometry()};sf.prototype.onBoxEnd=ta.nullFunction;sf.handleUpEvent_=function(t){if(!Ko.mouseOnly(t)){return true}this.box_.setMap(null);if(this.boxEndCondition_(t,this.startPixel_,t.pixel)){this.onBoxEnd(t);this.dispatchEvent(new sf.Event(sf.EventType_.BOXEND,t.coordinate,t))}return false};sf.handleDownEvent_=function(t){if(!Ko.mouseOnly(t)){return false}if(Ko.mouseActionButton(t)&&this.condition_(t)){this.startPixel_=t.pixel;this.box_.setMap(t.map);this.box_.setPixels(this.startPixel_,this.startPixel_);this.dispatchEvent(new sf.Event(sf.EventType_.BOXSTART,t.coordinate,t));return true}else{return false}};sf.EventType_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend"};sf.Event=function(t,i,s){ha.call(this,t);this.coordinate=i;this.mapBrowserEvent=s};ta.inherits(sf.Event,ha);var ef=function(t){var i=t?t:{};var s=i.condition?i.condition:Ko.shiftKeyOnly;this.duration_=i.duration!==undefined?i.duration:200;this.out_=i.out!==undefined?i.out:false;sf.call(this,{condition:s,className:i.className||"ol-dragzoom"})};ta.inherits(ef,sf);ef.prototype.onBoxEnd=function(){var t=this.getMap();var i=t.getView();var s=t.getSize();var e=this.getGeometry().getExtent();if(this.out_){var r=i.calculateExtent(s);var n=Ma.createOrUpdateFromCoordinates([t.getPixelFromCoordinate(Ma.getBottomLeft(e)),t.getPixelFromCoordinate(Ma.getTopRight(e))]);var h=i.getResolutionForExtent(n,s);Ma.scaleFromCenter(r,1/h);e=r}var a=i.constrainResolution(i.getResolutionForExtent(e,s));var o=Ma.getCenter(e);o=i.constrainCenter(o);i.animate({resolution:a,center:o,duration:this.duration_,easing:So.easeOut})};var rf={LEFT:37,UP:38,RIGHT:39,DOWN:40};var nf=function(t){Yo.call(this,{handleEvent:nf.handleEvent});var i=t||{};this.defaultCondition_=function(t){return Ko.noModifierKeys(t)&&Ko.targetNotEditable(t)};this.condition_=i.condition!==undefined?i.condition:this.defaultCondition_;this.duration_=i.duration!==undefined?i.duration:100;this.pixelDelta_=i.pixelDelta!==undefined?i.pixelDelta:128};ta.inherits(nf,Yo);nf.handleEvent=function(t){var i=false;if(t.type==oa.KEYDOWN){var s=t.originalEvent;var e=s.keyCode;if(this.condition_(t)&&(e==rf.DOWN||e==rf.LEFT||e==rf.RIGHT||e==rf.UP)){var r=t.map;var n=r.getView();var h=n.getResolution()*this.pixelDelta_;var a=0,o=0;if(e==rf.DOWN){o=-h}else if(e==rf.LEFT){a=-h}else if(e==rf.RIGHT){a=h}else{o=h}var f=[a,o];Eo.rotate(f,n.getRotation());Yo.pan(n,f,this.duration_);t.preventDefault();i=true}}return!i};var hf=function(t){Yo.call(this,{handleEvent:hf.handleEvent});var i=t?t:{};this.condition_=i.condition?i.condition:Ko.targetNotEditable;this.delta_=i.delta?i.delta:1;this.duration_=i.duration!==undefined?i.duration:100};ta.inherits(hf,Yo);hf.handleEvent=function(t){var i=false;if(t.type==oa.KEYDOWN||t.type==oa.KEYPRESS){var s=t.originalEvent;var e=s.charCode;if(this.condition_(t)&&(e=="+".charCodeAt(0)||e=="-".charCodeAt(0))){var r=t.map;var n=e=="+".charCodeAt(0)?this.delta_:-this.delta_;var h=r.getView();Yo.zoomByDelta(h,n,undefined,this.duration_);t.preventDefault();i=true}}return!i};var af=function(t){Yo.call(this,{handleEvent:af.handleEvent});var i=t||{};this.delta_=0;this.duration_=i.duration!==undefined?i.duration:250;this.timeout_=i.timeout!==undefined?i.timeout:80;this.useAnchor_=i.useAnchor!==undefined?i.useAnchor:true;this.constrainResolution_=i.constrainResolution||false;this.lastAnchor_=null;this.startTime_=undefined;this.timeoutId_=undefined;this.mode_=undefined;this.trackpadEventGap_=400;this.trackpadTimeoutId_=undefined;this.trackpadDeltaPerZoom_=300;this.trackpadZoomBuffer_=1.5};ta.inherits(af,Yo);af.handleEvent=function(t){var i=t.type;if(i!==oa.WHEEL&&i!==oa.MOUSEWHEEL){return true}t.preventDefault();var s=t.map;var e=t.originalEvent;if(this.useAnchor_){this.lastAnchor_=t.coordinate}var r;if(t.type==oa.WHEEL){r=e.deltaY;if(Ja.FIREFOX&&e.deltaMode===WheelEvent.DOM_DELTA_PIXEL){r/=Ja.DEVICE_PIXEL_RATIO}if(e.deltaMode===WheelEvent.DOM_DELTA_LINE){r*=40}}else if(t.type==oa.MOUSEWHEEL){r=-e.wheelDeltaY;if(Ja.SAFARI){r/=3}}if(r===0){return false}var n=Date.now();if(this.startTime_===undefined){this.startTime_=n}if(!this.mode_||n-this.startTime_>this.trackpadEventGap_){this.mode_=Math.abs(r)<4?af.Mode_.TRACKPAD:af.Mode_.WHEEL}if(this.mode_===af.Mode_.TRACKPAD){var h=s.getView();if(this.trackpadTimeoutId_){clearTimeout(this.trackpadTimeoutId_)}else{h.setHint(yo.INTERACTING,1)}this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var a=h.getResolution()*Math.pow(2,r/this.trackpadDeltaPerZoom_);var o=h.getMinResolution();var f=h.getMaxResolution();var u=0;if(a<o){a=Math.max(a,o/this.trackpadZoomBuffer_);u=1}else if(a>f){a=Math.min(a,f*this.trackpadZoomBuffer_);u=-1}if(this.lastAnchor_){var l=h.calculateCenterZoom(a,this.lastAnchor_);h.setCenter(h.constrainCenter(l))}h.setResolution(a);if(u===0&&this.constrainResolution_){h.animate({resolution:h.constrainResolution(a,r>0?-1:1),easing:So.easeOut,anchor:this.lastAnchor_,duration:this.duration_})}if(u>0){h.animate({resolution:o,easing:So.easeOut,anchor:this.lastAnchor_,duration:500})}else if(u<0){h.animate({resolution:f,easing:So.easeOut,anchor:this.lastAnchor_,duration:500})}this.startTime_=n;return false}this.delta_+=r;var v=Math.max(this.timeout_-(n-this.startTime_),0);clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,s),v);return false};af.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=undefined;var t=this.getMap().getView();t.setHint(yo.INTERACTING,-1)};af.prototype.handleWheelZoom_=function(t){var i=t.getView();if(i.getAnimating()){i.cancelAnimations()}var s=ta.MOUSEWHEELZOOM_MAXDELTA;var e=ca.clamp(this.delta_,-s,s);Yo.zoomByDelta(i,-e,this.lastAnchor_,this.duration_);this.mode_=undefined;this.delta_=0;this.lastAnchor_=null;this.startTime_=undefined;this.timeoutId_=undefined};af.prototype.setMouseAnchor=function(t){this.useAnchor_=t;if(!t){this.lastAnchor_=null}};af.Mode_={TRACKPAD:"trackpad",WHEEL:"wheel"};var of=function(t){Zo.call(this,{handleDownEvent:of.handleDownEvent_,handleDragEvent:of.handleDragEvent_,handleUpEvent:of.handleUpEvent_});var i=t||{};this.anchor_=null;this.lastAngle_=undefined;this.rotating_=false;this.rotationDelta_=0;this.threshold_=i.threshold!==undefined?i.threshold:.3;this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(of,Zo);of.handleDragEvent_=function(t){var i=0;var s=this.targetPointers[0];var e=this.targetPointers[1];var r=Math.atan2(e.clientY-s.clientY,e.clientX-s.clientX);if(this.lastAngle_!==undefined){var n=r-this.lastAngle_;this.rotationDelta_+=n;if(!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_){this.rotating_=true}i=n}this.lastAngle_=r;var h=t.map;var a=h.getView();if(a.getConstraints().rotation===wo.disable){return}var o=h.getViewport().getBoundingClientRect();var f=Zo.centroid(this.targetPointers);f[0]-=o.left;f[1]-=o.top;this.anchor_=h.getCoordinateFromPixel(f);if(this.rotating_){var u=a.getRotation();h.render();Yo.rotateWithoutConstraints(a,u+i,this.anchor_)}};of.handleUpEvent_=function(t){if(this.targetPointers.length<2){var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);if(this.rotating_){var e=s.getRotation();Yo.rotate(s,e,this.anchor_,this.duration_)}return false}else{return true}};of.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var i=t.map;this.anchor_=null;this.lastAngle_=undefined;this.rotating_=false;this.rotationDelta_=0;if(!this.handlingDownUpSequence){i.getView().setHint(yo.INTERACTING,1)}return true}else{return false}};of.prototype.shouldStopEvent=wa.FALSE;var ff=function(t){Zo.call(this,{handleDownEvent:ff.handleDownEvent_,handleDragEvent:ff.handleDragEvent_,handleUpEvent:ff.handleUpEvent_});var i=t?t:{};this.constrainResolution_=i.constrainResolution||false;this.anchor_=null;this.duration_=i.duration!==undefined?i.duration:400;this.lastDistance_=undefined;this.lastScaleDelta_=1};ta.inherits(ff,Zo);ff.handleDragEvent_=function(t){var i=1;var s=this.targetPointers[0];var e=this.targetPointers[1];var r=s.clientX-e.clientX;var n=s.clientY-e.clientY;var h=Math.sqrt(r*r+n*n);if(this.lastDistance_!==undefined){i=this.lastDistance_/h}this.lastDistance_=h;var a=t.map;var o=a.getView();var f=o.getResolution();var u=o.getMaxResolution();var l=o.getMinResolution();var v=f*i;if(v>u){i=u/f;v=u}else if(v<l){i=l/f;v=l}if(i!=1){this.lastScaleDelta_=i}var c=a.getViewport().getBoundingClientRect();var d=Zo.centroid(this.targetPointers);d[0]-=c.left;d[1]-=c.top;this.anchor_=a.getCoordinateFromPixel(d);a.render();Yo.zoomWithoutConstraints(o,v,this.anchor_)};ff.handleUpEvent_=function(t){if(this.targetPointers.length<2){var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);var e=s.getResolution();if(this.constrainResolution_||e<s.getMinResolution()||e>s.getMaxResolution()){var r=this.lastScaleDelta_-1;Yo.zoom(s,e,this.anchor_,this.duration_,r)}return false}else{return true}};ff.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var i=t.map;this.anchor_=null;this.lastDistance_=undefined;this.lastScaleDelta_=1;if(!this.handlingDownUpSequence){i.getView().setHint(yo.INTERACTING,1)}return true}else{return false}};ff.prototype.shouldStopEvent=wa.FALSE;var uf={};uf.defaults=function(t){var i=t?t:{};var s=new Qa;var e=new Ho(-.005,.05,100);var r=i.altShiftDragRotate!==undefined?i.altShiftDragRotate:true;if(r){s.push(new Qo)}var n=i.doubleClickZoom!==undefined?i.doubleClickZoom:true;if(n){s.push(new Jo({delta:i.zoomDelta,duration:i.zoomDuration}))}var h=i.dragPan!==undefined?i.dragPan:true;if(h){s.push(new $o({kinetic:e}))}var a=i.pinchRotate!==undefined?i.pinchRotate:true;if(a){s.push(new of)}var o=i.pinchZoom!==undefined?i.pinchZoom:true;if(o){s.push(new ff({constrainResolution:i.constrainResolution,duration:i.zoomDuration}))}var f=i.keyboard!==undefined?i.keyboard:true;if(f){s.push(new nf);s.push(new hf({delta:i.zoomDelta,duration:i.zoomDuration}))}var u=i.mouseWheelZoom!==undefined?i.mouseWheelZoom:true;if(u){s.push(new af({constrainResolution:i.constrainResolution,duration:i.zoomDuration}))}var l=i.shiftDragZoom!==undefined?i.shiftDragZoom:true;if(l){s.push(new ef({duration:i.zoomDuration}))}return s};var lf=function(t,i,s,e){aa.call(this);this.extent=t;this.pixelRatio_=s;this.resolution=i;this.state=e};ta.inherits(lf,aa);lf.prototype.changed=function(){this.dispatchEvent(oa.CHANGE)};lf.prototype.getExtent=function(){return this.extent};lf.prototype.getImage=function(){};lf.prototype.getPixelRatio=function(){return this.pixelRatio_};lf.prototype.getResolution=function(){return this.resolution};lf.prototype.getState=function(){return this.state};lf.prototype.load=function(){};var vf={IDLE:0,LOADING:1,LOADED:2,ERROR:3};var cf=function(t,i,s,e,r){this.loader_=r!==undefined?r:null;var n=r!==undefined?vf.IDLE:vf.LOADED;lf.call(this,t,i,s,n);this.canvas_=e;this.error_=null};ta.inherits(cf,lf);cf.prototype.getError=function(){return this.error_};cf.prototype.handleLoad_=function(t){if(t){this.error_=t;this.state=vf.ERROR}else{this.state=vf.LOADED}this.changed()};cf.prototype.load=function(){if(this.state==vf.IDLE){this.state=vf.LOADING;this.changed();this.loader_(this.handleLoad_.bind(this))}};cf.prototype.getImage=function(){return this.canvas_};var df={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"};var mf={IMAGE:"image",VECTOR:"vector"};var pf=function(t,i,s,e,r){ha.call(this,t);this.vectorContext=i;this.frameState=s;this.context=e;this.glContext=r};ta.inherits(pf,ha);var _f=function(t){aa.call(this);this.highWaterMark=t!==undefined?t:2048;this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null};ta.inherits(_f,aa);_f.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark};_f.prototype.clear=function(){this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null;this.dispatchEvent(oa.CLEAR)};_f.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)};_f.prototype.forEach=function(t,i){var s=this.oldest_;while(s){t.call(i,s.value_,s.key_,this);s=s.newer}};_f.prototype.get=function(t){var i=this.entries_[t];va.assert(i!==undefined,15);if(i===this.newest_){return i.value_}else if(i===this.oldest_){this.oldest_=this.oldest_.newer;this.oldest_.older=null}else{i.newer.older=i.older;i.older.newer=i.newer}i.newer=null;i.older=this.newest_;this.newest_.newer=i;this.newest_=i;return i.value_};_f.prototype.remove=function(t){var i=this.entries_[t];va.assert(i!==undefined,15);if(i===this.newest_){this.newest_=i.older;if(this.newest_){this.newest_.newer=null}}else if(i===this.oldest_){this.oldest_=i.newer;if(this.oldest_){this.oldest_.older=null}}else{i.newer.older=i.older;i.older.newer=i.newer}delete this.entries_[t];--this.count_;return i.value_};_f.prototype.getCount=function(){return this.count_};_f.prototype.getKeys=function(){var t=new Array(this.count_);var i=0;var s;for(s=this.newest_;s;s=s.older){t[i++]=s.key_}return t};_f.prototype.getValues=function(){var t=new Array(this.count_);var i=0;var s;for(s=this.newest_;s;s=s.older){t[i++]=s.value_}return t};_f.prototype.peekLast=function(){return this.oldest_.value_};_f.prototype.peekLastKey=function(){return this.oldest_.key_};_f.prototype.peekFirstKey=function(){return this.newest_.key_};_f.prototype.pop=function(){var t=this.oldest_;delete this.entries_[t.key_];if(t.newer){t.newer.older=null}this.oldest_=t.newer;if(!this.oldest_){this.newest_=null}--this.count_;return t.value_};_f.prototype.replace=function(t,i){this.get(t);this.entries_[t].value_=i};_f.prototype.set=function(t,i){va.assert(!(t in this.entries_),16);var s={key_:t,newer:null,older:this.newest_,value_:i};if(!this.newest_){this.oldest_=s}else{this.newest_.newer=s}this.newest_=s;this.entries_[t]=s;++this.count_};_f.prototype.prune=function(){while(this.canExpireCache()){this.pop()}};var gf={};gf.defaultFont="10px sans-serif";gf.defaultFillStyle=[0,0,0,1];gf.defaultLineCap="round";gf.defaultLineDash=[];gf.defaultLineDashOffset=0;gf.defaultLineJoin="round";gf.defaultMiterLimit=10;gf.defaultStrokeStyle=[0,0,0,1];gf.defaultTextAlign="center";gf.defaultTextBaseline="middle";gf.defaultPadding=[0,0,0,0];gf.defaultLineWidth=1;gf.labelCache=new _f;gf.checkedFonts_={};gf.measureContext_=null;gf.textHeights_={};gf.checkFont=function(){var t=60;var i=gf.checkedFonts_;var s=gf.labelCache;var e="32px monospace";var r="wmytzilWMYTZIL@#/&?$%10";var n,h;function a(t){var i=gf.getMeasureContext();i.font=e;h=i.measureText(r).width;var s=true;if(t!="monospace"){i.font="32px "+t+",monospace";var n=i.measureText(r).width;s=n!=h}return s}function o(){var e=true;for(var r in i){if(i[r]<t){if(a(r)){i[r]=t;ea.clear(gf.textHeights_);gf.measureContext_=null;s.clear()}else{++i[r];e=false}}}if(e){window.clearInterval(n);n=undefined}}return function(s){var e=Do.getFontFamilies(s);if(!e){return}for(var r=0,h=e.length;r<h;++r){var f=e[r];if(!(f in i)){i[f]=t;if(!a(f)){i[f]=0;if(n===undefined){n=window.setInterval(o,32)}}}}}}();gf.getMeasureContext=function(){var t=gf.measureContext_;if(!t){t=gf.measureContext_=Po.createCanvasContext2D(1,1)}return t};gf.measureTextHeight=function(){var t;var i=gf.textHeights_;return function(s){var e=i[s];if(e==undefined){if(!t){t=document.createElement("span");t.textContent="M";t.style.margin=t.style.padding="0 !important";t.style.position="absolute !important";t.style.left="-99999px !important"}t.style.font=s;document.body.appendChild(t);e=i[s]=t.offsetHeight;document.body.removeChild(t)}return e}}();gf.measureTextWidth=function(t,i){var s=gf.getMeasureContext();if(t!=s.font){s.font=t}return s.measureText(i).width};gf.rotateAtOffset=function(t,i,s,e){if(i!==0){t.translate(s,e);t.rotate(i);t.translate(-s,-e)}};gf.resetTransform_=Ia.create();gf.drawImage=function(t,i,s,e,r,n,h,a,o,f,u){var l;if(s!=1){l=t.globalAlpha;t.globalAlpha=l*s}if(i){t.setTransform.apply(t,i)}t.drawImage(e,r,n,h,a,o,f,h*u,a*u);if(l){t.globalAlpha=l}if(i){t.setTransform.apply(t,gf.resetTransform_)}};var Mf={};Mf.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i;Mf.NAMED_COLOR_RE_=/^([a-z]*)$/i;Mf.asArray=function(t){if(Array.isArray(t)){return t}else{return Mf.fromString(t)}};Mf.asString=function(t){if(typeof t==="string"){return t}else{return Mf.toString(t)}};Mf.fromNamed=function(t){var i=document.createElement("div");i.style.color=t;document.body.appendChild(i);var s=getComputedStyle(i).color;document.body.removeChild(i);return s};Mf.fromString=function(){var t=1024;var i={};var s=0;return function(e){var r;if(i.hasOwnProperty(e)){r=i[e]}else{if(s>=t){var n=0;var h;for(h in i){if((n++&3)===0){delete i[h];--s}}}r=Mf.fromStringInternal_(e);i[e]=r;++s}return r}}();Mf.fromStringInternal_=function(t){var i,s,e,r,n,h;if(Mf.NAMED_COLOR_RE_.exec(t)){t=Mf.fromNamed(t)}if(Mf.HEX_COLOR_RE_.exec(t)){var a=t.length-1;var o;if(a<=4){o=1}else{o=2}var f=a===4||a===8;i=parseInt(t.substr(1+0*o,o),16);s=parseInt(t.substr(1+1*o,o),16);e=parseInt(t.substr(1+2*o,o),16);if(f){r=parseInt(t.substr(1+3*o,o),16)}else{r=255}if(o==1){i=(i<<4)+i;s=(s<<4)+s;e=(e<<4)+e;if(f){r=(r<<4)+r}}n=[i,s,e,r/255]}else if(t.indexOf("rgba(")==0){h=t.slice(5,-1).split(",").map(Number);n=Mf.normalize(h)}else if(t.indexOf("rgb(")==0){h=t.slice(4,-1).split(",").map(Number);h.push(1);n=Mf.normalize(h)}else{va.assert(false,14)}return n};Mf.normalize=function(t,i){var s=i||[];s[0]=ca.clamp(t[0]+.5|0,0,255);s[1]=ca.clamp(t[1]+.5|0,0,255);s[2]=ca.clamp(t[2]+.5|0,0,255);s[3]=ca.clamp(t[3],0,1);return s};Mf.toString=function(t){var i=t[0];if(i!=(i|0)){i=i+.5|0}var s=t[1];if(s!=(s|0)){s=s+.5|0}var e=t[2];if(e!=(e|0)){e=e+.5|0}var r=t[3]===undefined?1:t[3];return"rgba("+i+","+s+","+e+","+r+")"};var zf={};zf.asColorLike=function(t){if(zf.isColorLike(t)){return t}else{return Mf.asString(t)}};zf.isColorLike=function(t){return typeof t==="string"||t instanceof CanvasPattern||t instanceof CanvasGradient};var wf=function(){};wf.prototype.drawCustom=function(t,i,s){};wf.prototype.drawGeometry=function(t){};wf.prototype.setStyle=function(t){};wf.prototype.drawCircle=function(t,i){};wf.prototype.drawFeature=function(t,i){};wf.prototype.drawGeometryCollection=function(t,i){};wf.prototype.drawLineString=function(t,i){};wf.prototype.drawMultiLineString=function(t,i){};wf.prototype.drawMultiPoint=function(t,i){};wf.prototype.drawMultiPolygon=function(t,i){};wf.prototype.drawPoint=function(t,i){};wf.prototype.drawPolygon=function(t,i){};wf.prototype.drawText=function(t,i){};wf.prototype.setFillStrokeStyle=function(t,i){};wf.prototype.setImageStyle=function(t,i){};wf.prototype.setTextStyle=function(t,i){};var yf=function(t,i,s,e,r){wf.call(this);this.context_=t;this.pixelRatio_=i;this.extent_=s;this.transform_=e;this.viewRotation_=r;this.contextFillState_=null;this.contextStrokeState_=null;this.contextTextState_=null;this.fillState_=null;this.strokeState_=null;this.image_=null;this.imageAnchorX_=0;this.imageAnchorY_=0;this.imageHeight_=0;this.imageOpacity_=0;this.imageOriginX_=0;this.imageOriginY_=0;this.imageRotateWithView_=false;this.imageRotation_=0;this.imageScale_=0;this.imageSnapToPixel_=false;this.imageWidth_=0;this.text_="";this.textOffsetX_=0;this.textOffsetY_=0;this.textRotateWithView_=false;this.textRotation_=0;this.textScale_=0;this.textFillState_=null;this.textStrokeState_=null;this.textState_=null;this.pixelCoordinates_=[];this.tmpLocalTransform_=Ia.create()};ta.inherits(yf,wf);yf.prototype.drawImages_=function(t,i,s,e){if(!this.image_){return}var r=ya.transform2D(t,i,s,2,this.transform_,this.pixelCoordinates_);var n=this.context_;var h=this.tmpLocalTransform_;var a=n.globalAlpha;if(this.imageOpacity_!=1){n.globalAlpha=a*this.imageOpacity_}var o=this.imageRotation_;if(this.imageRotateWithView_){o+=this.viewRotation_}var f,u;for(f=0,u=r.length;f<u;f+=2){var l=r[f]-this.imageAnchorX_;var v=r[f+1]-this.imageAnchorY_;if(this.imageSnapToPixel_){l=Math.round(l);v=Math.round(v)}if(o!==0||this.imageScale_!=1){var c=l+this.imageAnchorX_;var d=v+this.imageAnchorY_;Ia.compose(h,c,d,this.imageScale_,this.imageScale_,o,-c,-d);n.setTransform.apply(n,h)}n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,l,v,this.imageWidth_,this.imageHeight_)}if(o!==0||this.imageScale_!=1){n.setTransform(1,0,0,1,0,0)}if(this.imageOpacity_!=1){n.globalAlpha=a}};yf.prototype.drawText_=function(t,i,s,e){if(!this.textState_||this.text_===""){return}if(this.textFillState_){this.setContextFillState_(this.textFillState_)}if(this.textStrokeState_){this.setContextStrokeState_(this.textStrokeState_)}this.setContextTextState_(this.textState_);var r=ya.transform2D(t,i,s,e,this.transform_,this.pixelCoordinates_);var n=this.context_;var h=this.textRotation_;if(this.textRotateWithView_){h+=this.viewRotation_}for(;i<s;i+=e){var a=r[i]+this.textOffsetX_;var o=r[i+1]+this.textOffsetY_;if(h!==0||this.textScale_!=1){var f=Ia.compose(this.tmpLocalTransform_,a,o,this.textScale_,this.textScale_,h,-a,-o);n.setTransform.apply(n,f)}if(this.textStrokeState_){n.strokeText(this.text_,a,o)}if(this.textFillState_){n.fillText(this.text_,a,o)}}if(h!==0||this.textScale_!=1){n.setTransform(1,0,0,1,0,0)}};yf.prototype.moveToLineTo_=function(t,i,s,e,r){var n=this.context_;var h=ya.transform2D(t,i,s,e,this.transform_,this.pixelCoordinates_);n.moveTo(h[0],h[1]);var a=h.length;if(r){a-=2}for(var o=2;o<a;o+=2){n.lineTo(h[o],h[o+1])}if(r){n.closePath()}return s};yf.prototype.drawRings_=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){i=this.moveToLineTo_(t,i,s[r],e,true)}return i};yf.prototype.drawCircle=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.fillState_||this.strokeState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=Aa.transform2D(t,this.transform_,this.pixelCoordinates_);var s=i[2]-i[0];var e=i[3]-i[1];var r=Math.sqrt(s*s+e*e);var n=this.context_;n.beginPath();n.arc(i[0],i[1],r,0,2*Math.PI);if(this.fillState_){n.fill()}if(this.strokeState_){n.stroke()}}if(this.text_!==""){this.drawText_(t.getCenter(),0,2,2)}};yf.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke());this.setImageStyle(t.getImage());this.setTextStyle(t.getText())};yf.prototype.drawGeometry=function(t){var i=t.getType();switch(i){case da.POINT:this.drawPoint(t);break;case da.LINE_STRING:this.drawLineString(t);break;case da.POLYGON:this.drawPolygon(t);break;case da.MULTI_POINT:this.drawMultiPoint(t);break;case da.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case da.MULTI_POLYGON:this.drawMultiPolygon(t);break;case da.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case da.CIRCLE:this.drawCircle(t);break}};yf.prototype.drawFeature=function(t,i){var s=i.getGeometryFunction()(t);if(!s||!Ma.intersects(this.extent_,s.getExtent())){return}this.setStyle(i);this.drawGeometry(s)};yf.prototype.drawGeometryCollection=function(t){var i=t.getGeometriesArray();var s,e;for(s=0,e=i.length;s<e;++s){this.drawGeometry(i[s])}};yf.prototype.drawPoint=function(t){var i=t.getFlatCoordinates();var s=t.getStride();if(this.image_){this.drawImages_(i,0,i.length,s)}if(this.text_!==""){this.drawText_(i,0,i.length,s)}};yf.prototype.drawMultiPoint=function(t){var i=t.getFlatCoordinates();var s=t.getStride();if(this.image_){this.drawImages_(i,0,i.length,s)}if(this.text_!==""){this.drawText_(i,0,i.length,s)}};yf.prototype.drawLineString=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_;var s=t.getFlatCoordinates();i.beginPath();this.moveToLineTo_(s,0,s.length,t.getStride(),false);i.stroke()}if(this.text_!==""){var e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}};yf.prototype.drawMultiLineString=function(t){var i=t.getExtent();if(!Ma.intersects(this.extent_,i)){return}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var s=this.context_;var e=t.getFlatCoordinates();var r=0;var n=t.getEnds();var h=t.getStride();s.beginPath();var a,o;for(a=0,o=n.length;a<o;++a){r=this.moveToLineTo_(e,r,n[a],h,false)}s.stroke()}if(this.text_!==""){var f=t.getFlatMidpoints();this.drawText_(f,0,f.length,2)}};yf.prototype.drawPolygon=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_||this.fillState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=this.context_;i.beginPath();this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride());if(this.fillState_){i.fill()}if(this.strokeState_){i.stroke()}}if(this.text_!==""){var s=t.getFlatInteriorPoint();this.drawText_(s,0,2,2)}};yf.prototype.drawMultiPolygon=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_||this.fillState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=this.context_;var s=t.getOrientedFlatCoordinates();var e=0;var r=t.getEndss();var n=t.getStride();var h,a;i.beginPath();for(h=0,a=r.length;h<a;++h){var o=r[h];e=this.drawRings_(s,e,o,n)}if(this.fillState_){i.fill()}if(this.strokeState_){i.stroke()}}if(this.text_!==""){var f=t.getFlatInteriorPoints();this.drawText_(f,0,f.length,2)}};yf.prototype.setContextFillState_=function(t){var i=this.context_;var s=this.contextFillState_;if(!s){i.fillStyle=t.fillStyle;this.contextFillState_={fillStyle:t.fillStyle}}else{if(s.fillStyle!=t.fillStyle){s.fillStyle=i.fillStyle=t.fillStyle}}};yf.prototype.setContextStrokeState_=function(t){var i=this.context_;var s=this.contextStrokeState_;if(!s){i.lineCap=t.lineCap;if(Ja.CANVAS_LINE_DASH){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.lineJoin=t.lineJoin;i.lineWidth=t.lineWidth;i.miterLimit=t.miterLimit;i.strokeStyle=t.strokeStyle;this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle}}else{if(s.lineCap!=t.lineCap){s.lineCap=i.lineCap=t.lineCap}if(Ja.CANVAS_LINE_DASH){if(!pa.equals(s.lineDash,t.lineDash)){i.setLineDash(s.lineDash=t.lineDash)}if(s.lineDashOffset!=t.lineDashOffset){s.lineDashOffset=i.lineDashOffset=t.lineDashOffset}}if(s.lineJoin!=t.lineJoin){s.lineJoin=i.lineJoin=t.lineJoin}if(s.lineWidth!=t.lineWidth){s.lineWidth=i.lineWidth=t.lineWidth}if(s.miterLimit!=t.miterLimit){s.miterLimit=i.miterLimit=t.miterLimit}if(s.strokeStyle!=t.strokeStyle){s.strokeStyle=i.strokeStyle=t.strokeStyle}}};yf.prototype.setContextTextState_=function(t){var i=this.context_;var s=this.contextTextState_;var e=t.textAlign?t.textAlign:gf.defaultTextAlign;if(!s){i.font=t.font;i.textAlign=e;i.textBaseline=t.textBaseline;this.contextTextState_={font:t.font,textAlign:e,textBaseline:t.textBaseline}}else{if(s.font!=t.font){s.font=i.font=t.font}if(s.textAlign!=e){s.textAlign=e}if(s.textBaseline!=t.textBaseline){s.textBaseline=i.textBaseline=t.textBaseline}}};yf.prototype.setFillStrokeStyle=function(t,i){if(!t){this.fillState_=null}else{var s=t.getColor();this.fillState_={fillStyle:zf.asColorLike(s?s:gf.defaultFillStyle)}}if(!i){this.strokeState_=null}else{var e=i.getColor();var r=i.getLineCap();var n=i.getLineDash();var h=i.getLineDashOffset();var a=i.getLineJoin();var o=i.getWidth();var f=i.getMiterLimit();this.strokeState_={lineCap:r!==undefined?r:gf.defaultLineCap,lineDash:n?n:gf.defaultLineDash,lineDashOffset:h?h:gf.defaultLineDashOffset,lineJoin:a!==undefined?a:gf.defaultLineJoin,lineWidth:this.pixelRatio_*(o!==undefined?o:gf.defaultLineWidth),miterLimit:f!==undefined?f:gf.defaultMiterLimit,strokeStyle:zf.asColorLike(e?e:gf.defaultStrokeStyle)}}};yf.prototype.setImageStyle=function(t){if(!t){this.image_=null}else{var i=t.getAnchor();var s=t.getImage(1);var e=t.getOrigin();var r=t.getSize();this.imageAnchorX_=i[0];this.imageAnchorY_=i[1];this.imageHeight_=r[1];this.image_=s;this.imageOpacity_=t.getOpacity();this.imageOriginX_=e[0];this.imageOriginY_=e[1];this.imageRotateWithView_=t.getRotateWithView();this.imageRotation_=t.getRotation();this.imageScale_=t.getScale()*this.pixelRatio_;this.imageSnapToPixel_=t.getSnapToPixel();this.imageWidth_=r[0]}};yf.prototype.setTextStyle=function(t){if(!t){this.text_=""}else{var i=t.getFill();if(!i){this.textFillState_=null}else{var s=i.getColor();this.textFillState_={fillStyle:zf.asColorLike(s?s:gf.defaultFillStyle)}}var e=t.getStroke();if(!e){this.textStrokeState_=null}else{var r=e.getColor();var n=e.getLineCap();var h=e.getLineDash();var a=e.getLineDashOffset();var o=e.getLineJoin();var f=e.getWidth();var u=e.getMiterLimit();this.textStrokeState_={lineCap:n!==undefined?n:gf.defaultLineCap,lineDash:h?h:gf.defaultLineDash,lineDashOffset:a?a:gf.defaultLineDashOffset,lineJoin:o!==undefined?o:gf.defaultLineJoin,lineWidth:f!==undefined?f:gf.defaultLineWidth,miterLimit:u!==undefined?u:gf.defaultMiterLimit,strokeStyle:zf.asColorLike(r?r:gf.defaultStrokeStyle)}}var l=t.getFont();var v=t.getOffsetX();var c=t.getOffsetY();var d=t.getRotateWithView();var m=t.getRotation();var p=t.getScale();var _=t.getText();var g=t.getTextAlign();var M=t.getTextBaseline();this.textState_={font:l!==undefined?l:gf.defaultFont,textAlign:g!==undefined?g:gf.defaultTextAlign,textBaseline:M!==undefined?M:gf.defaultTextBaseline};this.text_=_!==undefined?_:"";this.textOffsetX_=v!==undefined?this.pixelRatio_*v:0;this.textOffsetY_=c!==undefined?this.pixelRatio_*c:0;this.textRotateWithView_=d!==undefined?d:false;this.textRotation_=m!==undefined?m:0;this.textScale_=this.pixelRatio_*(p!==undefined?p:1)}};var bf=function(t){fa.call(this);this.layer_=t};ta.inherits(bf,fa);bf.prototype.forEachFeatureAtCoordinate=ta.nullFunction;bf.prototype.hasFeatureAtCoordinate=wa.FALSE;bf.prototype.createLoadedTileFinder=function(t,i,s){return function(e,r){function n(t){if(!s[e]){s[e]={}}s[e][t.tileCoord.toString()]=t}return t.forEachLoadedTile(i,e,r,n)}};bf.prototype.getLayer=function(){return this.layer_};bf.prototype.handleImageChange_=function(t){var i=t.target;if(i.getState()===vf.LOADED){this.renderIfReadyAndVisible()}};bf.prototype.loadImage=function(t){var i=t.getState();if(i!=vf.LOADED&&i!=vf.ERROR){ra.listen(t,oa.CHANGE,this.handleImageChange_,this)}if(i==vf.IDLE){t.load();i=t.getState()}return i==vf.LOADED};bf.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();if(t.getVisible()&&t.getSourceState()==Io.READY){this.changed()}};bf.prototype.scheduleExpireCache=function(t,i){if(i.canExpireCache()){var s=function(t,i,s){var e=ta.getUid(t).toString();if(e in s.usedTiles){t.expireCache(s.viewState.projection,s.usedTiles[e])}}.bind(null,i);t.postRenderFunctions.push(s)}};bf.prototype.updateLogos=function(t,i){var s=i.getLogo();if(s!==undefined){if(typeof s==="string"){t.logos[s]=""}else if(s){va.assert(typeof s.href=="string",44);va.assert(typeof s.src=="string",45);t.logos[s.src]=s.href}}};bf.prototype.updateUsedTiles=function(t,i,s,e){var r=ta.getUid(i).toString();var n=s.toString();if(r in t){if(n in t[r]){t[r][n].extend(e)}else{t[r][n]=e}}else{t[r]={};t[r][n]=e}};bf.prototype.manageTilePyramid=function(t,i,s,e,r,n,h,a,o,f){var u=ta.getUid(i).toString();if(!(u in t.wantedTiles)){t.wantedTiles[u]={}}var l=t.wantedTiles[u];var v=t.tileQueue;var c=s.getMinZoom();var d,m,p,_,g,M;for(M=c;M<=h;++M){m=s.getTileRangeForExtentAndZ(n,M,m);p=s.getResolution(M);for(_=m.minX;_<=m.maxX;++_){for(g=m.minY;g<=m.maxY;++g){if(h-M<=a){d=i.getTile(M,_,g,e,r);if(d.getState()==po.IDLE){l[d.getKey()]=true;if(!v.isKeyQueued(d.getKey())){v.enqueue([d,u,s.getTileCoordCenter(d.tileCoord),p])}}if(o!==undefined){o.call(f,d)}}else{i.useTile(M,_,g,r)}}}}};var xf=function(t){bf.call(this,t);this.transform_=Ia.create()};ta.inherits(xf,bf);xf.prototype.clip=function(t,i,s){var e=i.pixelRatio;var r=i.size[0]*e;var n=i.size[1]*e;var h=i.viewState.rotation;var a=Ma.getTopLeft(s);var o=Ma.getTopRight(s);var f=Ma.getBottomRight(s);var u=Ma.getBottomLeft(s);Ia.apply(i.coordinateToPixelTransform,a);Ia.apply(i.coordinateToPixelTransform,o);Ia.apply(i.coordinateToPixelTransform,f);Ia.apply(i.coordinateToPixelTransform,u);t.save();gf.rotateAtOffset(t,-h,r/2,n/2);t.beginPath();t.moveTo(a[0]*e,a[1]*e);t.lineTo(o[0]*e,o[1]*e);t.lineTo(f[0]*e,f[1]*e);t.lineTo(u[0]*e,u[1]*e);t.clip();gf.rotateAtOffset(t,h,r/2,n/2)};xf.prototype.dispatchComposeEvent_=function(t,i,s,e){var r=this.getLayer();if(r.hasListener(t)){var n=s.size[0]*s.pixelRatio;var h=s.size[1]*s.pixelRatio;var a=s.viewState.rotation;gf.rotateAtOffset(i,-a,n/2,h/2);var o=e!==undefined?e:this.getTransform(s,0);var f=new yf(i,s.pixelRatio,s.extent,o,s.viewState.rotation);var u=new pf(t,f,s,i,null);r.dispatchEvent(u);gf.rotateAtOffset(i,a,n/2,h/2)}};xf.prototype.forEachLayerAtCoordinate=function(t,i,s,e){var r=this.forEachFeatureAtCoordinate(t,i,0,wa.TRUE,this);if(r){return s.call(e,this.getLayer(),null)}else{return undefined}};xf.prototype.postCompose=function(t,i,s,e){this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t,i,e)};xf.prototype.preCompose=function(t,i,s){this.dispatchComposeEvent_(Wo.PRECOMPOSE,t,i,s)};xf.prototype.dispatchRenderEvent=function(t,i,s){this.dispatchComposeEvent_(Wo.RENDER,t,i,s)};xf.prototype.getTransform=function(t,i){var s=t.viewState;var e=t.pixelRatio;var r=e*t.size[0]/2;var n=e*t.size[1]/2;var h=e/s.resolution;var a=-h;var o=-s.rotation;var f=-s.center[0]+i;var u=-s.center[1];return Ia.compose(this.transform_,r,n,h,a,o,f,u)};xf.prototype.composeFrame=function(t,i,s){};xf.prototype.prepareFrame=function(t,i){};var Ef=function(t){xf.call(this,t);this.coordinateToCanvasPixelTransform=Ia.create();this.hitCanvasContext_=null};ta.inherits(Ef,xf);Ef.prototype.composeFrame=function(t,i,s){this.preCompose(s,t);var e=this.getImage();if(e){var r=i.extent;var n=r!==undefined&&!Ma.containsExtent(r,t.extent)&&Ma.intersects(r,t.extent);if(n){this.clip(s,t,r)}var h=this.getImageTransform();var a=s.globalAlpha;s.globalAlpha=i.opacity;var o=h[4];var f=h[5];var u=e.width*h[0];var l=e.height*h[3];s.drawImage(e,0,0,+e.width,+e.height,Math.round(o),Math.round(f),Math.round(u),Math.round(l));s.globalAlpha=a;if(n){s.restore()}}this.postCompose(s,t,i)};Ef.prototype.getImage=function(){};Ef.prototype.getImageTransform=function(){};Ef.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=this.getLayer();var h=n.getSource();var a=i.viewState.resolution;var o=i.viewState.rotation;var f=i.skippedFeatureUids;return h.forEachFeatureAtCoordinate(t,a,o,s,f,(function(t){return e.call(r,t,n)}))};Ef.prototype.forEachLayerAtCoordinate=function(t,i,s,e){if(!this.getImage()){return undefined}if(this.getLayer().getSource().forEachFeatureAtCoordinate!==ta.nullFunction){return xf.prototype.forEachLayerAtCoordinate.apply(this,arguments)}else{var r=Ia.apply(this.coordinateToCanvasPixelTransform,t.slice());Eo.scale(r,i.viewState.resolution/this.renderedResolution);if(!this.hitCanvasContext_){this.hitCanvasContext_=Po.createCanvasContext2D(1,1)}this.hitCanvasContext_.clearRect(0,0,1,1);this.hitCanvasContext_.drawImage(this.getImage(),r[0],r[1],1,1,0,0,1,1);var n=this.hitCanvasContext_.getImageData(0,0,1,1).data;if(n[3]>0){return s.call(e,this.getLayer(),n)}else{return undefined}}};var Sf=function(t){Ef.call(this,t);this.image_=null;this.imageTransform_=Ia.create();this.skippedFeatures_=[];this.vectorRenderer_=null};ta.inherits(Sf,Ef);Sf["handles"]=function(t,i){return t===To.CANVAS&&(i.getType()===df.IMAGE||i.getType()===df.VECTOR&&i.getRenderMode()===mf.IMAGE)};Sf["create"]=function(t,i){var s=new Sf(i);if(i.getType()===df.VECTOR){var e=Ro.getLayerRendererPlugins();for(var r=0,n=e.length;r<n;++r){var h=e[r];if(h!==Sf&&h["handles"](To.CANVAS,i)){s.setVectorRenderer(h["create"](t,i))}}}return s};Sf.prototype.getImage=function(){return!this.image_?null:this.image_.getImage()};Sf.prototype.getImageTransform=function(){return this.imageTransform_};Sf.prototype.prepareFrame=function(t,i){var s=t.pixelRatio;var e=t.size;var r=t.viewState;var n=r.center;var h=r.resolution;var a;var o=this.getLayer();var f=o.getSource();var u=t.viewHints;var l=t.extent;if(i.extent!==undefined){l=Ma.getIntersection(l,i.extent)}if(!u[yo.ANIMATING]&&!u[yo.INTERACTING]&&!Ma.isEmpty(l)){var v=r.projection;if(!ta.ENABLE_RASTER_REPROJECTION){var c=f.getProjection();if(c){v=c}}var d=this.vectorRenderer_;if(d){var m=d.context;var p=ea.assign({},t,{size:[Ma.getWidth(l)/h,Ma.getHeight(l)/h],viewState:ea.assign({},t.viewState,{rotation:0})});var _=Object.keys(p.skippedFeatureUids).sort();if(d.prepareFrame(p,i)&&(d.replayGroupChanged||!pa.equals(_,this.skippedFeatures_))){m.canvas.width=p.size[0]*s;m.canvas.height=p.size[1]*s;d.composeFrame(p,i,m);this.image_=new cf(l,h,s,m.canvas);this.skippedFeatures_=_}}else{a=f.getImage(l,h,s,v);if(a){var g=this.loadImage(a);if(g){this.image_=a}}}}if(this.image_){a=this.image_;var M=a.getExtent();var z=a.getResolution();var w=a.getPixelRatio();var y=s*z/(h*w);var b=Ia.compose(this.imageTransform_,s*e[0]/2,s*e[1]/2,y,y,0,w*(M[0]-n[0])/z,w*(n[1]-M[3])/z);Ia.compose(this.coordinateToCanvasPixelTransform,s*e[0]/2-b[4],s*e[1]/2-b[5],s/h,-s/h,0,-n[0],-n[1]);this.updateLogos(t,f);this.renderedResolution=z*s/w}return!!this.image_};Sf.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(this.vectorRenderer_){return this.vectorRenderer_.forEachFeatureAtCoordinate(t,i,s,e,r)}else{return Ef.prototype.forEachFeatureAtCoordinate.call(this,t,i,s,e,r)}};Sf.prototype.setVectorRenderer=function(t){this.vectorRenderer_=t};var Gf=function(){this.cache_={};this.cacheSize_=0;this.maxCacheSize_=32};Gf.getKey=function(t,i,s){var e=s?Mf.asString(s):"null";return i+":"+t+":"+e};Gf.prototype.clear=function(){this.cache_={};this.cacheSize_=0};Gf.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t=0;var i,s;for(i in this.cache_){s=this.cache_[i];if((t++&3)===0&&!s.hasListener()){delete this.cache_[i];--this.cacheSize_}}}};Gf.prototype.get=function(t,i,s){var e=Gf.getKey(t,i,s);return e in this.cache_?this.cache_[e]:null};Gf.prototype.set=function(t,i,s,e){var r=Gf.getKey(t,i,s);this.cache_[r]=e;++this.cacheSize_};Gf.prototype.setSize=function(t){this.maxCacheSize_=t;this.expire()};var Pf={};Pf.iconImageCache=new Gf;var kf=function(t,i){na.call(this);this.map_=i;this.layerRenderers_={};this.layerRendererListeners_={}};ta.inherits(kf,na);kf.prototype.calculateMatrices2D=function(t){var i=t.viewState;var s=t.coordinateToPixelTransform;var e=t.pixelToCoordinateTransform;Ia.compose(s,t.size[0]/2,t.size[1]/2,1/i.resolution,-1/i.resolution,-i.rotation,-i.center[0],-i.center[1]);Ia.invert(Ia.setFromArray(e,s))};kf.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_){this.removeLayerRendererByKey_(t).dispose()}};kf.expireIconCache_=function(t,i){var s=Pf.iconImageCache;s.expire()};kf.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){var a;var o=i.viewState;var f=o.resolution;function u(t,s){var n=ta.getUid(t).toString();var h=i.layerStates[ta.getUid(s)].managed;if(!(n in i.skippedFeatureUids&&!h)){return e.call(r,t,h?s:null)}}var l=o.projection;var v=t;if(l.canWrapX()){var c=l.getExtent();var d=Ma.getWidth(c);var m=t[0];if(m<c[0]||m>c[2]){var p=Math.ceil((c[0]-m)/d);v=[m+d*p,t[1]]}}var _=i.layerStatesArray;var g=_.length;var M;for(M=g-1;M>=0;--M){var z=_[M];var w=z.layer;if(jo.visibleAtResolution(z,f)&&n.call(h,w)){var y=this.getLayerRenderer(w);if(w.getSource()){a=y.forEachFeatureAtCoordinate(w.getSource().getWrapX()?v:t,i,s,u,r)}if(a){return a}}}return undefined};kf.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){};kf.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r){var n=this.forEachFeatureAtCoordinate(t,i,s,wa.TRUE,this,e,r);return n!==undefined};kf.prototype.getLayerRenderer=function(t){var i=ta.getUid(t).toString();if(i in this.layerRenderers_){return this.layerRenderers_[i]}else{var s=Ro.getLayerRendererPlugins();var e;var r=this.getType();for(var n=0,h=s.length;n<h;++n){var a=s[n];if(a["handles"](r,t)){e=a["create"](this,t);break}}if(e){this.layerRenderers_[i]=e;this.layerRendererListeners_[i]=ra.listen(e,oa.CHANGE,this.handleLayerRendererChange_,this)}else{throw new Error("Unable to create renderer for layer: "+t.getType())}return e}};kf.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]};kf.prototype.getLayerRenderers=function(){return this.layerRenderers_};kf.prototype.getMap=function(){return this.map_};kf.prototype.getType=function(){};kf.prototype.handleLayerRendererChange_=function(){this.map_.render()};kf.prototype.removeLayerRendererByKey_=function(t){var i=this.layerRenderers_[t];delete this.layerRenderers_[t];ra.unlistenByKey(this.layerRendererListeners_[t]);delete this.layerRendererListeners_[t];return i};kf.prototype.renderFrame=ta.nullFunction;kf.prototype.removeUnusedLayerRenderers_=function(t,i){var s;for(s in this.layerRenderers_){if(!i||!(s in i.layerStates)){this.removeLayerRendererByKey_(s).dispose()}}};kf.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(kf.expireIconCache_)};kf.prototype.scheduleRemoveUnusedLayerRenderers=function(t){var i;for(i in this.layerRenderers_){if(!(i in t.layerStates)){t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this));return}}};kf.sortByZIndex=function(t,i){return t.zIndex-i.zIndex};var Nf=function(t,i){kf.call(this,t,i);this.context_=Po.createCanvasContext2D();this.canvas_=this.context_.canvas;this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=Do.CLASS_UNSELECTABLE;t.insertBefore(this.canvas_,t.childNodes[0]||null);this.renderedVisible_=true;this.transform_=Ia.create()};ta.inherits(Nf,kf);Nf["handles"]=function(t){return t===To.CANVAS};Nf["create"]=function(t,i){return new Nf(t,i)};Nf.prototype.dispatchComposeEvent_=function(t,i){var s=this.getMap();var e=this.context_;if(s.hasListener(t)){var r=i.extent;var n=i.pixelRatio;var h=i.viewState;var a=h.rotation;var o=this.getTransform(i);var f=new yf(e,n,r,o,a);var u=new pf(t,f,i,e,null);s.dispatchEvent(u)}};Nf.prototype.getTransform=function(t){var i=t.viewState;var s=this.canvas_.width/2;var e=this.canvas_.height/2;var r=t.pixelRatio/i.resolution;var n=-r;var h=-i.rotation;var a=-i.center[0];var o=-i.center[1];return Ia.compose(this.transform_,s,e,r,n,h,a,o)};Nf.prototype.getType=function(){return To.CANVAS};Nf.prototype.renderFrame=function(t){if(!t){if(this.renderedVisible_){this.canvas_.style.display="none";this.renderedVisible_=false}return}var i=this.context_;var s=t.pixelRatio;var e=Math.round(t.size[0]*s);var r=Math.round(t.size[1]*s);if(this.canvas_.width!=e||this.canvas_.height!=r){this.canvas_.width=e;this.canvas_.height=r}else{i.clearRect(0,0,e,r)}var n=t.viewState.rotation;this.calculateMatrices2D(t);this.dispatchComposeEvent_(Wo.PRECOMPOSE,t);var h=t.layerStatesArray;pa.stableSort(h,kf.sortByZIndex);if(n){i.save();gf.rotateAtOffset(i,n,e/2,r/2)}var a=t.viewState.resolution;var o,f,u,l,v;for(o=0,f=h.length;o<f;++o){v=h[o];u=v.layer;l=this.getLayerRenderer(u);if(!jo.visibleAtResolution(v,a)||v.sourceState!=Io.READY){continue}if(l.prepareFrame(t,v)){l.composeFrame(t,v,i)}}if(n){i.restore()}this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t);if(!this.renderedVisible_){this.canvas_.style.display="";this.renderedVisible_=true}this.scheduleRemoveUnusedLayerRenderers(t);this.scheduleExpireIconCache(t)};Nf.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){var h;var a=i.viewState;var o=a.resolution;var f=i.layerStatesArray;var u=f.length;var l=Ia.apply(i.pixelToCoordinateTransform,t.slice());var v;for(v=u-1;v>=0;--v){var c=f[v];var d=c.layer;if(jo.visibleAtResolution(c,o)&&r.call(n,d)){var m=this.getLayerRenderer(d);h=m.forEachLayerAtCoordinate(l,i,s,e);if(h){return h}}}return undefined};var If=function(t,i,s,e){this.minX=t;this.maxX=i;this.minY=s;this.maxY=e};If.createOrUpdate=function(t,i,s,e,r){if(r!==undefined){r.minX=t;r.maxX=i;r.minY=s;r.maxY=e;return r}else{return new If(t,i,s,e)}};If.prototype.contains=function(t){return this.containsXY(t[1],t[2])};If.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY};If.prototype.containsXY=function(t,i){return this.minX<=t&&t<=this.maxX&&this.minY<=i&&i<=this.maxY};If.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY};If.prototype.extend=function(t){if(t.minX<this.minX){this.minX=t.minX}if(t.maxX>this.maxX){this.maxX=t.maxX}if(t.minY<this.minY){this.minY=t.minY}if(t.maxY>this.maxY){this.maxY=t.maxY}};If.prototype.getHeight=function(){return this.maxY-this.minY+1};If.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]};If.prototype.getWidth=function(){return this.maxX-this.minX+1};If.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var Cf=function(t){Ef.call(this,t);this.context=this.context===null?null:Po.createCanvasContext2D();this.renderedExtent_=null;this.renderedTiles=[];this.tmpExtent=Ma.createEmpty();this.tmpTileRange_=new If(0,0,0,0);this.imageTransform_=Ia.create();this.zDirection=0};ta.inherits(Cf,Ef);Cf["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.TILE};Cf["create"]=function(t,i){return new Cf(i)};Cf.prototype.isDrawableTile_=function(t){var i=t.getState();var s=this.getLayer().getUseInterimTilesOnError();return i==po.LOADED||i==po.EMPTY||i==po.ERROR&&!s};Cf.prototype.prepareFrame=function(t,i){var s=t.pixelRatio;var e=t.size;var r=t.viewState;var n=r.projection;var h=r.resolution;var a=r.center;var o=this.getLayer();var f=o.getSource();var u=f.getRevision();var l=f.getTileGridForProjection(n);var v=l.getZForResolution(h,this.zDirection);var c=l.getResolution(v);var d=Math.round(h/c)||1;var m=t.extent;if(i.extent!==undefined){m=Ma.getIntersection(m,i.extent)}if(Ma.isEmpty(m)){return false}var p=l.getTileRangeForExtentAndZ(m,v);var _=l.getTileRangeExtent(v,p);var g=f.getTilePixelRatio(s);var M={};M[v]={};var z=this.createLoadedTileFinder(f,n,M);var w=this.tmpExtent;var y=this.tmpTileRange_;var b=false;var x,E,S;for(E=p.minX;E<=p.maxX;++E){for(S=p.minY;S<=p.maxY;++S){x=f.getTile(v,E,S,s,n);if(x.getState()==po.ERROR){if(!o.getUseInterimTilesOnError()){x.setState(po.LOADED)}else if(o.getPreload()>0){b=true}}if(!this.isDrawableTile_(x)){x=x.getInterimTile()}if(this.isDrawableTile_(x)){var G=ta.getUid(this);if(x.getState()==po.LOADED){M[v][x.tileCoord.toString()]=x;var P=x.inTransition(G);if(!b&&(P||this.renderedTiles.indexOf(x)===-1)){b=true}}if(x.getAlpha(G,t.time)===1){continue}}var k=l.getTileCoordChildTileRange(x.tileCoord,y,w);var N=false;if(k){N=z(v+1,k)}if(!N){l.forEachTileCoordParentTileRange(x.tileCoord,z,null,y,w)}}}var I=c*s/g*d;var C=t.viewHints;var A=C[yo.ANIMATING]||C[yo.INTERACTING];if(!(this.renderedResolution&&Date.now()-t.time>16&&A)&&(b||!(this.renderedExtent_&&Ma.containsExtent(this.renderedExtent_,m))||this.renderedRevision!=u||d!=this.oversampling_||!A&&I!=this.renderedResolution)){var R=this.context;if(R){var T=f.getTilePixelSize(v,s,n);var O=Math.round(p.getWidth()*T[0]/d);var L=Math.round(p.getHeight()*T[1]/d);var F=R.canvas;if(F.width!=O||F.height!=L){this.oversampling_=d;F.width=O;F.height=L}else{if(this.renderedExtent_&&!Ma.equals(_,this.renderedExtent_)){R.clearRect(0,0,O,L)}d=this.oversampling_}}this.renderedTiles.length=0;var D=Object.keys(M).map(Number);D.sort((function(t,i){if(t===v){return 1}else if(i===v){return-1}else{return t>i?1:t<i?-1:0}}));var W,j,V,U,q,B;var H,X,Y,J,K;for(q=0,B=D.length;q<B;++q){U=D[q];V=f.getTilePixelSize(U,s,n);W=l.getResolution(U);j=W/c;X=g*f.getGutter(n);Y=M[U];for(var Z in Y){x=Y[Z];H=l.getTileCoordExtent(x.getTileCoord(),w);E=(H[0]-_[0])/c*g/d;S=(_[3]-H[3])/c*g/d;J=V[0]*j/d;K=V[1]*j/d;this.drawTileImage(x,t,i,E,S,J,K,X,v===U);this.renderedTiles.push(x)}}this.renderedRevision=u;this.renderedResolution=c*s/g*d;this.renderedExtent_=_}var $=this.renderedResolution/h;var Q=Ia.compose(this.imageTransform_,s*e[0]/2,s*e[1]/2,$,$,0,(this.renderedExtent_[0]-a[0])/this.renderedResolution*s,(a[1]-this.renderedExtent_[3])/this.renderedResolution*s);Ia.compose(this.coordinateToCanvasPixelTransform,s*e[0]/2-Q[4],s*e[1]/2-Q[5],s/h,-s/h,0,-a[0],-a[1]);this.updateUsedTiles(t.usedTiles,f,v,p);this.manageTilePyramid(t,f,l,s,n,m,v,o.getPreload());this.scheduleExpireCache(t,f);this.updateLogos(t,f);return this.renderedTiles.length>0};Cf.prototype.drawTileImage=function(t,i,s,e,r,n,h,a,o){var f=t.getImage(this.getLayer());if(!f){return}var u=ta.getUid(this);var l=o?t.getAlpha(u,i.time):1;if(l===1&&!this.getLayer().getSource().getOpaque(i.viewState.projection)){this.context.clearRect(e,r,n,h)}var v=l!==this.context.globalAlpha;if(v){this.context.save();this.context.globalAlpha=l}this.context.drawImage(f,a,a,f.width-2*a,f.height-2*a,e,r,n,h);if(v){this.context.restore()}if(l!==1){i.animate=true}else if(o){t.endTransition(u)}};Cf.prototype.getImage=function(){var t=this.context;return t?t.canvas:null};Cf.prototype.getImageTransform=function(){return this.imageTransform_};var Af={exports:{}};var Rf=Af.exports;var Tf;function Of(){if(Tf)return Af.exports;Tf=1;(function(t,i){(function(i,s){t.exports=s()})(Rf,(function(){function t(t,s,r,n,h){i(t,s,r||0,n||t.length-1,h||e)}function i(t,e,r,n,h){while(n>r){if(n-r>600){var a=n-r+1;var o=e-r+1;var f=Math.log(a);var u=.5*Math.exp(2*f/3);var l=.5*Math.sqrt(f*u*(a-u)/a)*(o-a/2<0?-1:1);var v=Math.max(r,Math.floor(e-o*u/a+l));var c=Math.min(n,Math.floor(e+(a-o)*u/a+l));i(t,e,v,c,h)}var d=t[e];var m=r;var p=n;s(t,r,e);if(h(t[n],d)>0)s(t,r,n);while(m<p){s(t,m,p);m++;p--;while(h(t[m],d)<0)m++;while(h(t[p],d)>0)p--}if(h(t[r],d)===0)s(t,r,p);else{p++;s(t,p,n)}if(p<=e)r=p+1;if(e<=p)n=p-1}}function s(t,i,s){var e=t[i];t[i]=t[s];t[s]=e}function e(t,i){return t<i?-1:t>i?1:0}return t}))})(Af);return Af.exports}var Lf;var Ff;function Df(){if(Ff)return Lf;Ff=1;Lf=i;var t=Of();function i(t,s){if(!(this instanceof i))return new i(t,s);this._maxEntries=Math.max(4,t||9);this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4));if(s){this._initFormat(s)}this.clear()}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var i=this.data,s=[],e=this.toBBox;if(!c(t,i))return s;var r=[],n,h,a,o;while(i){for(n=0,h=i.children.length;n<h;n++){a=i.children[n];o=i.leaf?e(a):a;if(c(t,o)){if(i.leaf)s.push(a);else if(v(t,o))this._all(a,s);else r.push(a)}}i=r.pop()}return s},collides:function(t){var i=this.data,s=this.toBBox;if(!c(t,i))return false;var e=[],r,n,h,a;while(i){for(r=0,n=i.children.length;r<n;r++){h=i.children[r];a=i.leaf?s(h):h;if(c(t,a)){if(i.leaf||v(t,a))return true;e.push(h)}}i=e.pop()}return false},load:function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var i=0,s=t.length;i<s;i++){this.insert(t[i])}return this}var e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length){this.data=e}else if(this.data.height===e.height){this._splitRoot(this.data,e)}else{if(this.data.height<e.height){var r=this.data;this.data=e;e=r}this._insert(e,this.data.height-e.height-1,true)}return this},insert:function(t){if(t)this._insert(t,this.data.height-1);return this},clear:function(){this.data=d([]);return this},remove:function(t,i){if(!t)return this;var e=this.data,r=this.toBBox(t),n=[],h=[],a,o,f,u;while(e||n.length){if(!e){e=n.pop();o=n[n.length-1];a=h.pop();u=true}if(e.leaf){f=s(t,e.children,i);if(f!==-1){e.children.splice(f,1);n.push(e);this._condense(n);return this}}if(!u&&!e.leaf&&v(e,r)){n.push(e);h.push(a);a=0;o=e;e=e.children[0]}else if(o){a++;e=o.children[a];u=false}else e=null}return this},toBBox:function(t){return t},compareMinX:h,compareMinY:a,toJSON:function(){return this.data},fromJSON:function(t){this.data=t;return this},_all:function(t,i){var s=[];while(t){if(t.leaf)i.push.apply(i,t.children);else s.push.apply(s,t.children);t=s.pop()}return i},_build:function(t,i,s,r){var n=s-i+1,h=this._maxEntries,a;if(n<=h){a=d(t.slice(i,s+1));e(a,this.toBBox);return a}if(!r){r=Math.ceil(Math.log(n)/Math.log(h));h=Math.ceil(n/Math.pow(h,r-1))}a=d([]);a.leaf=false;a.height=r;var o=Math.ceil(n/h),f=o*Math.ceil(Math.sqrt(h)),u,l,v,c;m(t,i,s,f,this.compareMinX);for(u=i;u<=s;u+=f){v=Math.min(u+f-1,s);m(t,u,v,o,this.compareMinY);for(l=u;l<=v;l+=o){c=Math.min(l+o-1,v);a.children.push(this._build(t,l,c,r-1))}}e(a,this.toBBox);return a},_chooseSubtree:function(t,i,s,e){var r,n,h,a,f,l,v,c;while(true){e.push(i);if(i.leaf||e.length-1===s)break;v=c=Infinity;for(r=0,n=i.children.length;r<n;r++){h=i.children[r];f=o(h);l=u(t,h)-f;if(l<c){c=l;v=f<v?f:v;a=h}else if(l===c){if(f<v){v=f;a=h}}}i=a||i.children[0]}return i},_insert:function(t,i,s){var e=this.toBBox,r=s?t:e(t),h=[];var a=this._chooseSubtree(r,this.data,i,h);a.children.push(t);n(a,r);while(i>=0){if(h[i].children.length>this._maxEntries){this._split(h,i);i--}else break}this._adjustParentBBoxes(r,h,i)},_split:function(t,i){var s=t[i],r=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,r);var h=this._chooseSplitIndex(s,n,r);var a=d(s.children.splice(h,s.children.length-h));a.height=s.height;a.leaf=s.leaf;e(s,this.toBBox);e(a,this.toBBox);if(i)t[i-1].children.push(a);else this._splitRoot(s,a)},_splitRoot:function(t,i){this.data=d([t,i]);this.data.height=t.height+1;this.data.leaf=false;e(this.data,this.toBBox)},_chooseSplitIndex:function(t,i,s){var e,n,h,a,f,u,v,c;u=v=Infinity;for(e=i;e<=s-i;e++){n=r(t,0,e,this.toBBox);h=r(t,e,s,this.toBBox);a=l(n,h);f=o(n)+o(h);if(a<u){u=a;c=e;v=f<v?f:v}else if(a===u){if(f<v){v=f;c=e}}}return c},_chooseSplitAxis:function(t,i,s){var e=t.leaf?this.compareMinX:h,r=t.leaf?this.compareMinY:a,n=this._allDistMargin(t,i,s,e),o=this._allDistMargin(t,i,s,r);if(n<o)t.children.sort(e)},_allDistMargin:function(t,i,s,e){t.children.sort(e);var h=this.toBBox,a=r(t,0,i,h),o=r(t,s-i,s,h),u=f(a)+f(o),l,v;for(l=i;l<s-i;l++){v=t.children[l];n(a,t.leaf?h(v):v);u+=f(a)}for(l=s-i-1;l>=i;l--){v=t.children[l];n(o,t.leaf?h(v):v);u+=f(o)}return u},_adjustParentBBoxes:function(t,i,s){for(var e=s;e>=0;e--){n(i[e],t)}},_condense:function(t){for(var i=t.length-1,s;i>=0;i--){if(t[i].children.length===0){if(i>0){s=t[i-1].children;s.splice(s.indexOf(t[i]),1)}else this.clear()}else e(t[i],this.toBBox)}},_initFormat:function(t){var i=["return a"," - b",";"];this.compareMinX=new Function("a","b",i.join(t[0]));this.compareMinY=new Function("a","b",i.join(t[1]));this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}};function s(t,i,s){if(!s)return i.indexOf(t);for(var e=0;e<i.length;e++){if(s(t,i[e]))return e}return-1}function e(t,i){r(t,0,t.children.length,i,t)}function r(t,i,s,e,r){if(!r)r=d(null);r.minX=Infinity;r.minY=Infinity;r.maxX=-Infinity;r.maxY=-Infinity;for(var h=i,a;h<s;h++){a=t.children[h];n(r,t.leaf?e(a):a)}return r}function n(t,i){t.minX=Math.min(t.minX,i.minX);t.minY=Math.min(t.minY,i.minY);t.maxX=Math.max(t.maxX,i.maxX);t.maxY=Math.max(t.maxY,i.maxY);return t}function h(t,i){return t.minX-i.minX}function a(t,i){return t.minY-i.minY}function o(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,i){return(Math.max(i.maxX,t.maxX)-Math.min(i.minX,t.minX))*(Math.max(i.maxY,t.maxY)-Math.min(i.minY,t.minY))}function l(t,i){var s=Math.max(t.minX,i.minX),e=Math.max(t.minY,i.minY),r=Math.min(t.maxX,i.maxX),n=Math.min(t.maxY,i.maxY);return Math.max(0,r-s)*Math.max(0,n-e)}function v(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:true,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function m(i,s,e,r,n){var h=[s,e],a;while(h.length){e=h.pop();s=h.pop();if(e-s<=r)continue;a=s+Math.ceil((e-s)/r/2)*r;t(i,a,s,e,n);h.push(s,a,a,e)}}return Lf}var Wf=Df();var jf=c(Wf);var Vf=function(){};Vf.prototype.getReplay=function(t,i){};Vf.prototype.isEmpty=function(){};var Uf={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};var qf={};qf.lineString=function(t,i,s,e){var r=t[i];var n=t[i+1];var h=0;var a;for(a=i+e;a<s;a+=e){var o=t[a];var f=t[a+1];h+=Math.sqrt((o-r)*(o-r)+(f-n)*(f-n));r=o;n=f}return h};qf.linearRing=function(t,i,s,e){var r=qf.lineString(t,i,s,e);var n=t[s-e]-t[i];var h=t[s-e+1]-t[i+1];r+=Math.sqrt(n*n+h*h);return r};var Bf={};Bf.lineString=function(t,i,s,e,r,n,h,a){var o=[];var f=t[i]>t[s-e];var u=r.length;var l=t[i];var v=t[i+1];i+=e;var c=t[i];var d=t[i+1];var m=0;var p=Math.sqrt(Math.pow(c-l,2)+Math.pow(d-v,2));var _="";var g=0;var M,z,w;for(var y=0;y<u;++y){z=f?u-y-1:y;var b=r.charAt(z);_=f?b+_:_+b;var x=n(_)-g;g+=x;var E=h+x/2;while(i<s-e&&m+p<E){l=c;v=d;i+=e;c=t[i];d=t[i+1];m+=p;p=Math.sqrt(Math.pow(c-l,2)+Math.pow(d-v,2))}var S=E-m;var G=Math.atan2(d-v,c-l);if(f){G+=G>0?-Math.PI:Math.PI}if(w!==undefined){var P=G-w;P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0;if(Math.abs(P)>a){return null}}var k=S/p;var N=ca.lerp(l,c,k);var I=ca.lerp(v,d,k);if(w==G){if(f){M[0]=N;M[1]=I;M[2]=x/2}M[4]=_}else{_=b;g=x;M=[N,I,x/2,G,_];if(f){o.unshift(M)}else{o.push(M)}w=G}h+=x}return o};var Hf={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12};var Xf={};Xf.ORDER=[Uf.POLYGON,Uf.CIRCLE,Uf.LINE_STRING,Uf.IMAGE,Uf.TEXT,Uf.DEFAULT];Xf.TEXT_ALIGN={};Xf.TEXT_ALIGN["left"]=0;Xf.TEXT_ALIGN["end"]=0;Xf.TEXT_ALIGN["center"]=.5;Xf.TEXT_ALIGN["right"]=1;Xf.TEXT_ALIGN["start"]=1;Xf.TEXT_ALIGN["top"]=0;Xf.TEXT_ALIGN["middle"]=.5;Xf.TEXT_ALIGN["hanging"]=.2;Xf.TEXT_ALIGN["alphabetic"]=.8;Xf.TEXT_ALIGN["ideographic"]=.8;Xf.TEXT_ALIGN["bottom"]=1;var Yf=function(t,i,s,e,r,n){wf.call(this);this.declutterTree=n;this.tmpExtent_=Ma.createEmpty();this.tolerance=t;this.maxExtent=i;this.overlaps=r;this.pixelRatio=e;this.maxLineWidth=0;this.resolution=s;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_=null;this.bufferedMaxExtent_=null;this.instructions=[];this.coordinates=[];this.coordinateCache_={};this.renderedTransform_=Ia.create();this.hitDetectionInstructions=[];this.pixelCoordinates_=null;this.state={};this.viewRotation_=0;this.tmpLocalTransform_=Ia.create();this.resetTransform_=Ia.create()};ta.inherits(Yf,wf);Yf.prototype.replayTextBackground_=function(t,i,s,e,r,n,h){t.beginPath();t.moveTo.apply(t,i);t.lineTo.apply(t,s);t.lineTo.apply(t,e);t.lineTo.apply(t,r);t.lineTo.apply(t,i);if(n){this.fillOrigin_=n[2];this.fill_(t)}if(h){this.setStrokeStyle_(t,h);t.stroke()}};Yf.prototype.replayImage_=function(t,i,s,e,r,n,h,a,o,f,u,l,v,c,d,m,p,_){var g=p||_;var M=this.tmpLocalTransform_;r*=v;n*=v;i-=r;s-=n;if(c){i=Math.round(i);s=Math.round(s)}var z=d+f>e.width?e.width-f:d;var w=a+u>e.height?e.height-u:a;var y=this.tmpExtent_;var b=m[3]+z*v+m[1];var x=m[0]+w*v+m[2];var E=i-m[3];var S=s-m[0];var G;var P;var k;var N;if(g||l!==0){G=[E,S];P=[E+b,S];k=[E+b,S+x];N=[E,S+x]}var I=null;if(l!==0){var C=i+r;var A=s+n;I=Ia.compose(M,C,A,1,1,l,-C,-A);Ma.createOrUpdateEmpty(y);Ma.extendCoordinate(y,Ia.apply(M,G));Ma.extendCoordinate(y,Ia.apply(M,P));Ma.extendCoordinate(y,Ia.apply(M,k));Ma.extendCoordinate(y,Ia.apply(M,N))}else{Ma.createOrUpdate(E,S,E+b,S+x,y)}var R=t.canvas;var T=y[0]<=R.width&&y[2]>=0&&y[1]<=R.height&&y[3]>=0;if(h){if(!T&&h[4]==1){return}Ma.extend(h,y);var O=T?[t,I?I.slice(0):null,o,e,f,u,z,w,i,s,v]:null;if(O&&g){O.push(p,_,G,P,k,N)}h.push(O)}else if(T){if(g){this.replayTextBackground_(t,G,P,k,N,p,_)}gf.drawImage(t,I,o,e,f,u,z,w,i,s,v)}};Yf.prototype.applyPixelRatio=function(t){var i=this.pixelRatio;return i==1?t:t.map((function(t){return t*i}))};Yf.prototype.appendFlatCoordinates=function(t,i,s,e,r,n){var h=this.coordinates.length;var a=this.getBufferedMaxExtent();if(n){i+=e}var o=[t[i],t[i+1]];var f=[NaN,NaN];var u=true;var l,v,c;for(l=i+e;l<s;l+=e){f[0]=t[l];f[1]=t[l+1];c=Ma.coordinateRelationship(a,f);if(c!==v){if(u){this.coordinates[h++]=o[0];this.coordinates[h++]=o[1]}this.coordinates[h++]=f[0];this.coordinates[h++]=f[1];u=false}else if(c===ga.INTERSECTING){this.coordinates[h++]=f[0];this.coordinates[h++]=f[1];u=false}else{u=true}o[0]=f[0];o[1]=f[1];v=c}if(r&&u||l===i+e){this.coordinates[h++]=o[0];this.coordinates[h++]=o[1]}return h};Yf.prototype.drawCustomCoordinates_=function(t,i,s,e,r){for(var n=0,h=s.length;n<h;++n){var a=s[n];var o=this.appendFlatCoordinates(t,i,a,e,false,false);r.push(o);i=a}return i};Yf.prototype.drawCustom=function(t,i,s){this.beginGeometry(t,i);var e=t.getType();var r=t.getStride();var n=this.coordinates.length;var h,a,o,f;var u;if(e==da.MULTI_POLYGON){t=t;h=t.getOrientedFlatCoordinates();f=[];var l=t.getEndss();u=0;for(var v=0,c=l.length;v<c;++v){var d=[];u=this.drawCustomCoordinates_(h,u,l[v],r,d);f.push(d)}this.instructions.push([Hf.CUSTOM,n,f,t,s,La.coordinatesss])}else if(e==da.POLYGON||e==da.MULTI_LINE_STRING){o=[];h=e==da.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates();u=this.drawCustomCoordinates_(h,0,t.getEnds(),r,o);this.instructions.push([Hf.CUSTOM,n,o,t,s,La.coordinatess])}else if(e==da.LINE_STRING||e==da.MULTI_POINT){h=t.getFlatCoordinates();a=this.appendFlatCoordinates(h,0,h.length,r,false,false);this.instructions.push([Hf.CUSTOM,n,a,t,s,La.coordinates])}else if(e==da.POINT){h=t.getFlatCoordinates();this.coordinates.push(h[0],h[1]);a=this.coordinates.length;this.instructions.push([Hf.CUSTOM,n,a,t,s])}this.endGeometry(t,i)};Yf.prototype.beginGeometry=function(t,i){this.beginGeometryInstruction1_=[Hf.BEGIN_GEOMETRY,i,0];this.instructions.push(this.beginGeometryInstruction1_);this.beginGeometryInstruction2_=[Hf.BEGIN_GEOMETRY,i,0];this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)};Yf.prototype.fill_=function(t){if(this.fillOrigin_){var i=Ia.apply(this.renderedTransform_,this.fillOrigin_.slice());t.translate(i[0],i[1]);t.rotate(this.viewRotation_)}t.fill();if(this.fillOrigin_){t.setTransform.apply(t,gf.resetTransform_)}};Yf.prototype.setStrokeStyle_=function(t,i){t.strokeStyle=i[1];t.lineWidth=i[2];t.lineCap=i[3];t.lineJoin=i[4];t.miterLimit=i[5];if(Ja.CANVAS_LINE_DASH){t.lineDashOffset=i[7];t.setLineDash(i[6])}};Yf.prototype.renderDeclutter_=function(t,i){if(t&&t.length>5){var s=t[4];if(s==1||s==t.length-5){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:i};if(!this.declutterTree.collides(e)){this.declutterTree.insert(e);var r=gf.drawImage;for(var n=5,h=t.length;n<h;++n){var a=t[n];if(a){if(a.length>11){this.replayTextBackground_(a[0],a[13],a[14],a[15],a[16],a[11],a[12])}r.apply(undefined,a)}}}t.length=5;Ma.createOrUpdateEmpty(t)}}};Yf.prototype.replay_=function(t,i,s,e,r,n){var h;if(this.pixelCoordinates_&&pa.equals(i,this.renderedTransform_)){h=this.pixelCoordinates_}else{if(!this.pixelCoordinates_){this.pixelCoordinates_=[]}h=ya.transform2D(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_);Ia.setFromArray(this.renderedTransform_,i)}var a=!ea.isEmpty(s);var o=0;var f=e.length;var u=0;var l;var v,c,d,m,p,_,g,M;var z=0;var w=0;var y=null;var b=null;var x=this.coordinateCache_;var E=this.viewRotation_;var S={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:E};var G=this.instructions!=e||this.overlaps?0:200;while(o<f){var P=e[o];var k=P[0];var N,I,C;switch(k){case Hf.BEGIN_GEOMETRY:N=P[1];if(a&&s[ta.getUid(N).toString()]||!N.getGeometry()){o=P[2]}else if(n!==undefined&&!Ma.intersects(n,N.getGeometry().getExtent())){o=P[2]+1}else{++o}break;case Hf.BEGIN_PATH:if(z>G){this.fill_(t);z=0}if(w>G){t.stroke();w=0}if(!z&&!w){t.beginPath();d=m=NaN}++o;break;case Hf.CIRCLE:u=P[1];var A=h[u];var R=h[u+1];var T=h[u+2];var O=h[u+3];var L=T-A;var F=O-R;var D=Math.sqrt(L*L+F*F);t.moveTo(A+D,R);t.arc(A,R,D,0,2*Math.PI,true);++o;break;case Hf.CLOSE_PATH:t.closePath();++o;break;case Hf.CUSTOM:u=P[1];l=P[2];var W=P[3];var j=P[4];var V=P.length==6?P[5]:undefined;S.geometry=W;S.feature=N;if(!(o in x)){x[o]=[]}var U=x[o];if(V){V(h,u,l,2,U)}else{U[0]=h[u];U[1]=h[u+1];U.length=2}j(U,S);++o;break;case Hf.DRAW_IMAGE:u=P[1];l=P[2];M=P[3];v=P[4];c=P[5];g=r?null:P[6];var q=P[7];var B=P[8];var H=P[9];var X=P[10];var Y=P[11];var J=P[12];var K=P[13];var Z=P[14];var $=P[15];var Q,tt,it;if(P.length>16){Q=P[16];tt=P[17];it=P[18]}else{Q=gf.defaultPadding;tt=it=false}if(Y){J+=E}for(;u<l;u+=2){this.replayImage_(t,h[u],h[u+1],M,v,c,g,q,B,H,X,J,K,Z,$,Q,tt?y:null,it?b:null)}this.renderDeclutter_(g,N);++o;break;case Hf.DRAW_CHARS:var st=P[1];var et=P[2];var rt=P[3];g=r?null:P[4];var nt=P[5];var ht=P[6];var at=P[7];var ot=P[8];var ft=P[9];var ut=P[10];var lt=P[11];var vt=P[12];var ct=P[13];var dt=P[14];var mt=qf.lineString(h,st,et,2);var pt=ot(vt);if(nt||pt<=mt){var _t=this.textStates[ct].textAlign;var gt=(mt-pt)*Xf.TEXT_ALIGN[_t];var Mt=Bf.lineString(h,st,et,2,vt,ot,gt,at);if(Mt){var zt,wt,yt,bt,xt;if(ut){for(zt=0,wt=Mt.length;zt<wt;++zt){xt=Mt[zt];yt=xt[4];bt=this.getImage(yt,ct,"",ut);v=xt[2]+lt;c=rt*bt.height+(.5-rt)*2*lt-ft;this.replayImage_(t,xt[0],xt[1],bt,v,c,g,bt.height,1,0,0,xt[3],dt,false,bt.width,gf.defaultPadding,null,null)}}if(ht){for(zt=0,wt=Mt.length;zt<wt;++zt){xt=Mt[zt];yt=xt[4];bt=this.getImage(yt,ct,ht,"");v=xt[2];c=rt*bt.height-ft;this.replayImage_(t,xt[0],xt[1],bt,v,c,g,bt.height,1,0,0,xt[3],dt,false,bt.width,gf.defaultPadding,null,null)}}}}this.renderDeclutter_(g,N);++o;break;case Hf.END_GEOMETRY:if(r!==undefined){N=P[1];var Et=r(N);if(Et){return Et}}++o;break;case Hf.FILL:if(G){z++}else{this.fill_(t)}++o;break;case Hf.MOVE_TO_LINE_TO:u=P[1];l=P[2];I=h[u];C=h[u+1];p=I+.5|0;_=C+.5|0;if(p!==d||_!==m){t.moveTo(I,C);d=p;m=_}for(u+=2;u<l;u+=2){I=h[u];C=h[u+1];p=I+.5|0;_=C+.5|0;if(u==l-2||p!==d||_!==m){t.lineTo(I,C);d=p;m=_}}++o;break;case Hf.SET_FILL_STYLE:y=P;this.fillOrigin_=P[2];if(z){this.fill_(t);z=0;if(w){t.stroke();w=0}}t.fillStyle=P[1];++o;break;case Hf.SET_STROKE_STYLE:b=P;if(w){t.stroke();w=0}this.setStrokeStyle_(t,P);++o;break;case Hf.STROKE:if(G){w++}else{t.stroke()}++o;break;default:++o;break}}if(z){this.fill_(t)}if(w){t.stroke()}return undefined};Yf.prototype.replay=function(t,i,s,e){this.viewRotation_=s;this.replay_(t,i,e,this.instructions,undefined,undefined)};Yf.prototype.replayHitDetection=function(t,i,s,e,r,n){this.viewRotation_=s;return this.replay_(t,i,e,this.hitDetectionInstructions,r,n)};Yf.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var i;var s=t.length;var e;var r;var n=-1;for(i=0;i<s;++i){e=t[i];r=e[0];if(r==Hf.END_GEOMETRY){n=i}else if(r==Hf.BEGIN_GEOMETRY){e[2]=i;pa.reverseSubArray(this.hitDetectionInstructions,n,i);n=-1}}};Yf.prototype.setFillStrokeStyle=function(t,i){var s=this.state;if(t){var e=t.getColor();s.fillStyle=zf.asColorLike(e?e:gf.defaultFillStyle)}else{s.fillStyle=undefined}if(i){var r=i.getColor();s.strokeStyle=zf.asColorLike(r?r:gf.defaultStrokeStyle);var n=i.getLineCap();s.lineCap=n!==undefined?n:gf.defaultLineCap;var h=i.getLineDash();s.lineDash=h?h.slice():gf.defaultLineDash;var a=i.getLineDashOffset();s.lineDashOffset=a?a:gf.defaultLineDashOffset;var o=i.getLineJoin();s.lineJoin=o!==undefined?o:gf.defaultLineJoin;var f=i.getWidth();s.lineWidth=f!==undefined?f:gf.defaultLineWidth;var u=i.getMiterLimit();s.miterLimit=u!==undefined?u:gf.defaultMiterLimit;if(s.lineWidth>this.maxLineWidth){this.maxLineWidth=s.lineWidth;this.bufferedMaxExtent_=null}}else{s.strokeStyle=undefined;s.lineCap=undefined;s.lineDash=null;s.lineDashOffset=undefined;s.lineJoin=undefined;s.lineWidth=undefined;s.miterLimit=undefined}};Yf.prototype.applyFill=function(t,i){var s=t.fillStyle;var e=[Hf.SET_FILL_STYLE,s];if(typeof s!=="string"){var r=i.getExtent();e.push([r[0],r[3]])}this.instructions.push(e)};Yf.prototype.applyStroke=function(t){this.instructions.push([Hf.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio])};Yf.prototype.updateFillStyle=function(t,i,s){var e=t.fillStyle;if(typeof e!=="string"||t.currentFillStyle!=e){i.call(this,t,s);t.currentFillStyle=e}};Yf.prototype.updateStrokeStyle=function(t,i){var s=t.strokeStyle;var e=t.lineCap;var r=t.lineDash;var n=t.lineDashOffset;var h=t.lineJoin;var a=t.lineWidth;var o=t.miterLimit;if(t.currentStrokeStyle!=s||t.currentLineCap!=e||r!=t.currentLineDash&&!pa.equals(t.currentLineDash,r)||t.currentLineDashOffset!=n||t.currentLineJoin!=h||t.currentLineWidth!=a||t.currentMiterLimit!=o){i.call(this,t);t.currentStrokeStyle=s;t.currentLineCap=e;t.currentLineDash=r;t.currentLineDashOffset=n;t.currentLineJoin=h;t.currentLineWidth=a;t.currentMiterLimit=o}};Yf.prototype.endGeometry=function(t,i){this.beginGeometryInstruction1_[2]=this.instructions.length;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length;this.beginGeometryInstruction2_=null;var s=[Hf.END_GEOMETRY,i];this.instructions.push(s);this.hitDetectionInstructions.push(s)};Yf.prototype.finish=ta.nullFunction;Yf.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_){this.bufferedMaxExtent_=Ma.clone(this.maxExtent);if(this.maxLineWidth>0){var t=this.resolution*(this.maxLineWidth+1)/2;Ma.buffer(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}}return this.bufferedMaxExtent_};var Jf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n);this.declutterGroup_=null;this.hitDetectionImage_=null;this.image_=null;this.anchorX_=undefined;this.anchorY_=undefined;this.height_=undefined;this.opacity_=undefined;this.originX_=undefined;this.originY_=undefined;this.rotateWithView_=undefined;this.rotation_=undefined;this.scale_=undefined;this.snapToPixel_=undefined;this.width_=undefined};ta.inherits(Jf,Yf);Jf.prototype.drawCoordinates_=function(t,i,s,e){return this.appendFlatCoordinates(t,i,s,e,false,false)};Jf.prototype.drawPoint=function(t,i){if(!this.image_){return}this.beginGeometry(t,i);var s=t.getFlatCoordinates();var e=t.getStride();var r=this.coordinates.length;var n=this.drawCoordinates_(s,0,s.length,e);this.instructions.push([Hf.DRAW_IMAGE,r,n,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,r,n,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]);this.endGeometry(t,i)};Jf.prototype.drawMultiPoint=function(t,i){if(!this.image_){return}this.beginGeometry(t,i);var s=t.getFlatCoordinates();var e=t.getStride();var r=this.coordinates.length;var n=this.drawCoordinates_(s,0,s.length,e);this.instructions.push([Hf.DRAW_IMAGE,r,n,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,r,n,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]);this.endGeometry(t,i)};Jf.prototype.finish=function(){this.reverseHitDetectionInstructions();this.anchorX_=undefined;this.anchorY_=undefined;this.hitDetectionImage_=null;this.image_=null;this.height_=undefined;this.scale_=undefined;this.opacity_=undefined;this.originX_=undefined;this.originY_=undefined;this.rotateWithView_=undefined;this.rotation_=undefined;this.snapToPixel_=undefined;this.width_=undefined};Jf.prototype.setImageStyle=function(t,i){var s=t.getAnchor();var e=t.getSize();var r=t.getHitDetectionImage(1);var n=t.getImage(1);var h=t.getOrigin();this.anchorX_=s[0];this.anchorY_=s[1];this.declutterGroup_=i;this.hitDetectionImage_=r;this.image_=n;this.height_=e[1];this.opacity_=t.getOpacity();this.originX_=h[0];this.originY_=h[1];this.rotateWithView_=t.getRotateWithView();this.rotation_=t.getRotation();this.scale_=t.getScale();this.snapToPixel_=t.getSnapToPixel();this.width_=e[0]};var Kf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n)};ta.inherits(Kf,Yf);Kf.prototype.drawFlatCoordinates_=function(t,i,s,e){var r=this.coordinates.length;var n=this.appendFlatCoordinates(t,i,s,e,false,false);var h=[Hf.MOVE_TO_LINE_TO,r,n];this.instructions.push(h);this.hitDetectionInstructions.push(h);return s};Kf.prototype.drawLineString=function(t,i){var s=this.state;var e=s.strokeStyle;var r=s.lineWidth;if(e===undefined||r===undefined){return}this.updateStrokeStyle(s,this.applyStroke);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset],[Hf.BEGIN_PATH]);var n=t.getFlatCoordinates();var h=t.getStride();this.drawFlatCoordinates_(n,0,n.length,h);this.hitDetectionInstructions.push([Hf.STROKE]);this.endGeometry(t,i)};Kf.prototype.drawMultiLineString=function(t,i){var s=this.state;var e=s.strokeStyle;var r=s.lineWidth;if(e===undefined||r===undefined){return}this.updateStrokeStyle(s,this.applyStroke);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset],[Hf.BEGIN_PATH]);var n=t.getEnds();var h=t.getFlatCoordinates();var a=t.getStride();var o=0;var f,u;for(f=0,u=n.length;f<u;++f){o=this.drawFlatCoordinates_(h,o,n[f],a)}this.hitDetectionInstructions.push([Hf.STROKE]);this.endGeometry(t,i)};Kf.prototype.finish=function(){var t=this.state;if(t.lastStroke!=undefined&&t.lastStroke!=this.coordinates.length){this.instructions.push([Hf.STROKE])}this.reverseHitDetectionInstructions();this.state=null};Kf.prototype.applyStroke=function(t){if(t.lastStroke!=undefined&&t.lastStroke!=this.coordinates.length){this.instructions.push([Hf.STROKE]);t.lastStroke=this.coordinates.length}t.lastStroke=0;Yf.prototype.applyStroke.call(this,t);this.instructions.push([Hf.BEGIN_PATH])};var Zf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n)};ta.inherits(Zf,Yf);Zf.prototype.drawFlatCoordinatess_=function(t,i,s,e){var r=this.state;var n=r.fillStyle!==undefined;var h=r.strokeStyle!=undefined;var a=s.length;var o=[Hf.BEGIN_PATH];this.instructions.push(o);this.hitDetectionInstructions.push(o);for(var f=0;f<a;++f){var u=s[f];var l=this.coordinates.length;var v=this.appendFlatCoordinates(t,i,u,e,true,!h);var c=[Hf.MOVE_TO_LINE_TO,l,v];this.instructions.push(c);this.hitDetectionInstructions.push(c);if(h){var d=[Hf.CLOSE_PATH];this.instructions.push(d);this.hitDetectionInstructions.push(d)}i=u}var m=[Hf.FILL];this.hitDetectionInstructions.push(m);if(n){this.instructions.push(m)}if(h){var p=[Hf.STROKE];this.instructions.push(p);this.hitDetectionInstructions.push(p)}return i};Zf.prototype.drawCircle=function(t,i){var s=this.state;var e=s.fillStyle;var r=s.strokeStyle;if(e===undefined&&r===undefined){return}this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var n=t.getFlatCoordinates();var h=t.getStride();var a=this.coordinates.length;this.appendFlatCoordinates(n,0,n.length,h,false,false);var o=[Hf.BEGIN_PATH];var f=[Hf.CIRCLE,a];this.instructions.push(o,f);this.hitDetectionInstructions.push(o,f);var u=[Hf.FILL];this.hitDetectionInstructions.push(u);if(s.fillStyle!==undefined){this.instructions.push(u)}if(s.strokeStyle!==undefined){var l=[Hf.STROKE];this.instructions.push(l);this.hitDetectionInstructions.push(l)}this.endGeometry(t,i)};Zf.prototype.drawPolygon=function(t,i){var s=this.state;this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var e=t.getEnds();var r=t.getOrientedFlatCoordinates();var n=t.getStride();this.drawFlatCoordinatess_(r,0,e,n);this.endGeometry(t,i)};Zf.prototype.drawMultiPolygon=function(t,i){var s=this.state;var e=s.fillStyle;var r=s.strokeStyle;if(e===undefined&&r===undefined){return}this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var n=t.getEndss();var h=t.getOrientedFlatCoordinates();var a=t.getStride();var o=0;var f,u;for(f=0,u=n.length;f<u;++f){o=this.drawFlatCoordinatess_(h,o,n[f],a)}this.endGeometry(t,i)};Zf.prototype.finish=function(){this.reverseHitDetectionInstructions();this.state=null;var t=this.tolerance;if(t!==0){var i=this.coordinates;var s,e;for(s=0,e=i.length;s<e;++s){i[s]=Fa.snap(i[s],t)}}};Zf.prototype.setFillStrokeStyles_=function(t){var i=this.state;var s=i.fillStyle;if(s!==undefined){this.updateFillStyle(i,this.applyFill,t)}if(i.strokeStyle!==undefined){this.updateStrokeStyle(i,this.applyStroke)}};var $f={};$f.lineString=function(t,i,s,e,r){var n=s;var h=s;var a=0;var o=0;var f=s;var u,l,v,c,d,m,p,_,g,M;for(l=s;l<e;l+=r){var z=i[l];var w=i[l+1];if(d!==undefined){g=z-d;M=w-m;c=Math.sqrt(g*g+M*M);if(p!==undefined){o+=v;u=Math.acos((p*g+_*M)/(v*c));if(u>t){if(o>a){a=o;n=f;h=l}o=0;f=l-r}}v=c;p=g;_=M}d=z;m=w}o+=c;return o>a?[f,l]:[n,h]};var Qf={LINE:"line"};var tu=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n);this.labels_=null;this.text_="";this.textOffsetX_=0;this.textOffsetY_=0;this.textRotateWithView_=undefined;this.textRotation_=0;this.textFillState_=null;this.fillStates={};this.textStrokeState_=null;this.strokeStates={};this.textState_={};this.textStates={};this.textKey_="";this.fillKey_="";this.strokeKey_="";this.widths_={};var h=gf.labelCache;h.prune()};ta.inherits(tu,Yf);tu.measureTextWidths=function(t,i,s){var e=i.length;var r=0;var n,h;for(h=0;h<e;++h){n=gf.measureTextWidth(t,i[h]);r=Math.max(r,n);s.push(n)}return r};tu.prototype.drawText=function(t,i){var s=this.textFillState_;var e=this.textStrokeState_;var r=this.textState_;if(this.text_===""||!r||!s&&!e){return}var n=this.coordinates.length;var h=t.getType();var a=null;var o=2;var f=2;var u,l;if(r.placement===Qf.LINE){if(!Ma.intersects(this.getBufferedMaxExtent(),t.getExtent())){return}var v;a=t.getFlatCoordinates();f=t.getStride();if(h==da.LINE_STRING){v=[a.length]}else if(h==da.MULTI_LINE_STRING){v=t.getEnds()}else if(h==da.POLYGON){v=t.getEnds().slice(0,1)}else if(h==da.MULTI_POLYGON){var c=t.getEndss();v=[];for(u=0,l=c.length;u<l;++u){v.push(c[u][0])}}this.beginGeometry(t,i);var d=r.textAlign;var m=0;var p;for(var _=0,g=v.length;_<g;++_){if(d==undefined){var M=$f.lineString(r.maxAngle,a,m,v[_],f);m=M[0];p=M[1]}else{p=v[_]}for(u=m;u<p;u+=f){this.coordinates.push(a[u],a[u+1])}o=this.coordinates.length;m=v[_];this.drawChars_(n,o,this.declutterGroup_);n=o}this.endGeometry(t,i)}else{var z=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_);var w=z.width/this.pixelRatio;switch(h){case da.POINT:case da.MULTI_POINT:a=t.getFlatCoordinates();o=a.length;break;case da.LINE_STRING:a=t.getFlatMidpoint();break;case da.CIRCLE:a=t.getCenter();break;case da.MULTI_LINE_STRING:a=t.getFlatMidpoints();o=a.length;break;case da.POLYGON:a=t.getFlatInteriorPoint();if(!r.overflow&&a[2]/this.resolution<w){return}f=3;break;case da.MULTI_POLYGON:var y=t.getFlatInteriorPoints();a=[];for(u=0,l=y.length;u<l;u+=3){if(r.overflow||y[u+2]/this.resolution>=w){a.push(y[u],y[u+1])}}o=a.length;if(o==0){return}break}o=this.appendFlatCoordinates(a,0,o,f,false,false);this.beginGeometry(t,i);if(r.backgroundFill||r.backgroundStroke){this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke);this.updateFillStyle(this.state,this.applyFill,t);this.updateStrokeStyle(this.state,this.applyStroke)}this.drawTextImage_(z,n,o);this.endGeometry(t,i)}};tu.prototype.getImage=function(t,i,s,e){var r;var n=e+i+t+s+this.pixelRatio;var h=gf.labelCache;if(!h.containsKey(n)){var a=e?this.strokeStates[e]||this.textStrokeState_:null;var o=s?this.fillStates[s]||this.textFillState_:null;var f=this.textStates[i]||this.textState_;var u=this.pixelRatio;var l=f.scale*u;var v=Xf.TEXT_ALIGN[f.textAlign||gf.defaultTextAlign];var c=e&&a.lineWidth?a.lineWidth:0;var d=t.split("\n");var m=d.length;var p=[];var _=tu.measureTextWidths(f.font,d,p);var g=gf.measureTextHeight(f.font);var M=g*m;var z=_+c;var w=Po.createCanvasContext2D(Math.ceil(z*l),Math.ceil((M+c)*l));r=w.canvas;h.set(n,r);if(l!=1){w.scale(l,l)}w.font=f.font;if(e){w.strokeStyle=a.strokeStyle;w.lineWidth=c*(Ja.SAFARI?l:1);w.lineCap=a.lineCap;w.lineJoin=a.lineJoin;w.miterLimit=a.miterLimit;if(Ja.CANVAS_LINE_DASH&&a.lineDash.length){w.setLineDash(a.lineDash);w.lineDashOffset=a.lineDashOffset}}if(s){w.fillStyle=o.fillStyle}w.textBaseline="middle";w.textAlign="center";var y=.5-v;var b=v*r.width/l+y*c;var x;if(e){for(x=0;x<m;++x){w.strokeText(d[x],b+y*p[x],.5*(c+g)+x*g)}}if(s){for(x=0;x<m;++x){w.fillText(d[x],b+y*p[x],.5*(c+g)+x*g)}}}return h.get(n)};tu.prototype.drawTextImage_=function(t,i,s){var e=this.textState_;var r=this.textStrokeState_;var n=this.pixelRatio;var h=Xf.TEXT_ALIGN[e.textAlign||gf.defaultTextAlign];var a=Xf.TEXT_ALIGN[e.textBaseline];var o=r&&r.lineWidth?r.lineWidth:0;var f=h*t.width/n+2*(.5-h)*o;var u=a*t.height/n+2*(.5-a)*o;this.instructions.push([Hf.DRAW_IMAGE,i,s,t,(f-this.textOffsetX_)*n,(u-this.textOffsetY_)*n,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,true,t.width,e.padding==gf.defaultPadding?gf.defaultPadding:e.padding.map((function(t){return t*n})),!!e.backgroundFill,!!e.backgroundStroke]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,i,s,t,(f-this.textOffsetX_)*n,(u-this.textOffsetY_)*n,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/n,true,t.width,e.padding,!!e.backgroundFill,!!e.backgroundStroke])};tu.prototype.drawChars_=function(t,i,s){var e=this.textStrokeState_;var r=this.textState_;var n=this.textFillState_;var h=this.strokeKey_;if(e){if(!(h in this.strokeStates)){this.strokeStates[h]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}}}var a=this.textKey_;if(!(this.textKey_ in this.textStates)){this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||gf.defaultTextAlign,scale:r.scale}}var o=this.fillKey_;if(n){if(!(o in this.fillStates)){this.fillStates[o]={fillStyle:n.fillStyle}}}var f=this.pixelRatio;var u=Xf.TEXT_ALIGN[r.textBaseline];var l=this.textOffsetY_*f;var v=this.text_;var c=r.font;var d=r.scale;var m=e?e.lineWidth*d/2:0;var p=this.widths_[c];if(!p){this.widths_[c]=p={}}this.instructions.push([Hf.DRAW_CHARS,t,i,u,s,r.overflow,o,r.maxAngle,function(t){var i=p[t];if(!i){i=p[t]=gf.measureTextWidth(c,t)}return i*d*f},l,h,m*f,v,a,1]);this.hitDetectionInstructions.push([Hf.DRAW_CHARS,t,i,u,s,r.overflow,o,r.maxAngle,function(t){var i=p[t];if(!i){i=p[t]=gf.measureTextWidth(c,t)}return i*d},l,h,m,v,a,1/f])};tu.prototype.setTextStyle=function(t,i){var s,e,r;if(!t){this.text_=""}else{this.declutterGroup_=i;var n=t.getFill();if(!n){e=this.textFillState_=null}else{e=this.textFillState_;if(!e){e=this.textFillState_={}}e.fillStyle=zf.asColorLike(n.getColor()||gf.defaultFillStyle)}var h=t.getStroke();if(!h){r=this.textStrokeState_=null}else{r=this.textStrokeState_;if(!r){r=this.textStrokeState_={}}var a=h.getLineDash();var o=h.getLineDashOffset();var f=h.getWidth();var u=h.getMiterLimit();r.lineCap=h.getLineCap()||gf.defaultLineCap;r.lineDash=a?a.slice():gf.defaultLineDash;r.lineDashOffset=o===undefined?gf.defaultLineDashOffset:o;r.lineJoin=h.getLineJoin()||gf.defaultLineJoin;r.lineWidth=f===undefined?gf.defaultLineWidth:f;r.miterLimit=u===undefined?gf.defaultMiterLimit:u;r.strokeStyle=zf.asColorLike(h.getColor()||gf.defaultStrokeStyle)}s=this.textState_;var l=t.getFont()||gf.defaultFont;gf.checkFont(l);var v=t.getScale();s.overflow=t.getOverflow();s.font=l;s.maxAngle=t.getMaxAngle();s.placement=t.getPlacement();s.textAlign=t.getTextAlign();s.textBaseline=t.getTextBaseline()||gf.defaultTextBaseline;s.backgroundFill=t.getBackgroundFill();s.backgroundStroke=t.getBackgroundStroke();s.padding=t.getPadding()||gf.defaultPadding;s.scale=v===undefined?1:v;var c=t.getOffsetX();var d=t.getOffsetY();var m=t.getRotateWithView();var p=t.getRotation();this.text_=t.getText()||"";this.textOffsetX_=c===undefined?0:c;this.textOffsetY_=d===undefined?0:d;this.textRotateWithView_=m===undefined?false:m;this.textRotation_=p===undefined?0:p;this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:ta.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"";this.textKey_=s.font+s.scale+(s.textAlign||"?");this.fillKey_=e?typeof e.fillStyle=="string"?e.fillStyle:"|"+ta.getUid(e.fillStyle):""}};var iu=function(t,i,s,e,r,n,h){Vf.call(this);this.declutterTree_=n;this.declutterGroup_=null;this.tolerance_=t;this.maxExtent_=i;this.overlaps_=r;this.pixelRatio_=e;this.resolution_=s;this.renderBuffer_=h;this.replaysByZIndex_={};this.hitDetectionContext_=Po.createCanvasContext2D(1,1);this.hitDetectionTransform_=Ia.create()};ta.inherits(iu,Vf);iu.circleArrayCache_={0:[[true]]};iu.fillCircleArrayRowToMiddle_=function(t,i,s){var e;var r=Math.floor(t.length/2);if(i>=r){for(e=r;e<i;e++){t[e][s]=true}}else if(i<r){for(e=i+1;e<r;e++){t[e][s]=true}}};iu.getCircleArray_=function(t){if(iu.circleArrayCache_[t]!==undefined){return iu.circleArrayCache_[t]}var i=t*2+1;var s=new Array(i);for(var e=0;e<i;e++){s[e]=new Array(i)}var r=t;var n=0;var h=0;while(r>=n){iu.fillCircleArrayRowToMiddle_(s,t+r,t+n);iu.fillCircleArrayRowToMiddle_(s,t+n,t+r);iu.fillCircleArrayRowToMiddle_(s,t-n,t+r);iu.fillCircleArrayRowToMiddle_(s,t-r,t+n);iu.fillCircleArrayRowToMiddle_(s,t-r,t-n);iu.fillCircleArrayRowToMiddle_(s,t-n,t-r);iu.fillCircleArrayRowToMiddle_(s,t+n,t-r);iu.fillCircleArrayRowToMiddle_(s,t+r,t-n);n++;h+=1+2*n;if(2*(h-r)+1>0){r-=1;h+=1-2*r}}iu.circleArrayCache_[t]=s;return s};iu.replayDeclutter=function(t,i,s){var e=Object.keys(t).map(Number).sort(pa.numberSafeCompareFunction);var r={};for(var n=0,h=e.length;n<h;++n){var a=t[e[n].toString()];for(var o=0,f=a.length;o<f;){var u=a[o++];var l=a[o++];u.replay(i,l,s,r)}}};iu.prototype.addDeclutter=function(t){var i=null;if(this.declutterTree_){if(t){i=this.declutterGroup_;i[4]++}else{i=this.declutterGroup_=Ma.createEmpty();i.push(1)}}return i};iu.prototype.clip=function(t,i){var s=this.getClipCoords(i);t.beginPath();t.moveTo(s[0],s[1]);t.lineTo(s[2],s[3]);t.lineTo(s[4],s[5]);t.lineTo(s[6],s[7]);t.clip()};iu.prototype.hasReplays=function(t){for(var i in this.replaysByZIndex_){var s=this.replaysByZIndex_[i];for(var e=0,r=t.length;e<r;++e){if(t[e]in s){return true}}}return false};iu.prototype.finish=function(){var t;for(t in this.replaysByZIndex_){var i=this.replaysByZIndex_[t];var s;for(s in i){i[s].finish()}}};iu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){e=Math.round(e);var a=e*2+1;var o=Ia.compose(this.hitDetectionTransform_,e+.5,e+.5,1/i,-1/i,-s,-t[0],-t[1]);var f=this.hitDetectionContext_;if(f.canvas.width!==a||f.canvas.height!==a){f.canvas.width=a;f.canvas.height=a}else{f.clearRect(0,0,a,a)}var u;if(this.renderBuffer_!==undefined){u=Ma.createEmpty();Ma.extendCoordinate(u,t);Ma.buffer(u,i*(this.renderBuffer_+e),u)}var l=iu.getCircleArray_(e);var v;if(this.declutterTree_){v=this.declutterTree_.all().map((function(t){return t.value}))}var c;function d(t){var i=f.getImageData(0,0,a,a).data;for(var s=0;s<a;s++){for(var e=0;e<a;e++){if(l[s][e]){if(i[(e*a+s)*4+3]>0){var r;if(!(v&&(c==Uf.IMAGE||c==Uf.TEXT))||v.indexOf(t)!==-1){r=n(t)}if(r){return r}else{f.clearRect(0,0,a,a);return undefined}}}}}}var m=Object.keys(this.replaysByZIndex_).map(Number);m.sort(pa.numberSafeCompareFunction);var p,_,g,M,z;for(p=m.length-1;p>=0;--p){var w=m[p].toString();g=this.replaysByZIndex_[w];for(_=Xf.ORDER.length-1;_>=0;--_){c=Xf.ORDER[_];M=g[c];if(M!==undefined){if(h&&(c==Uf.IMAGE||c==Uf.TEXT)){var y=h[w];if(!y){h[w]=[M,o.slice(0)]}else{y.push(M,o.slice(0))}}else{z=M.replayHitDetection(f,o,s,r,d,u);if(z){return z}}}}}return undefined};iu.prototype.getClipCoords=function(t){var i=this.maxExtent_;var s=i[0];var e=i[1];var r=i[2];var n=i[3];var h=[s,e,s,n,r,n,r,e];ya.transform2D(h,0,8,2,t,h);return h};iu.prototype.getReplay=function(t,i){var s=t!==undefined?t.toString():"0";var e=this.replaysByZIndex_[s];if(e===undefined){e={};this.replaysByZIndex_[s]=e}var r=e[i];if(r===undefined){var n=iu.BATCH_CONSTRUCTORS_[i];r=new n(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_);e[i]=r}return r};iu.prototype.getReplays=function(){return this.replaysByZIndex_};iu.prototype.isEmpty=function(){return ea.isEmpty(this.replaysByZIndex_)};iu.prototype.replay=function(t,i,s,e,r,n){var h=Object.keys(this.replaysByZIndex_).map(Number);h.sort(pa.numberSafeCompareFunction);t.save();this.clip(t,i);var a=r?r:Xf.ORDER;var o,f,u,l,v,c;for(o=0,f=h.length;o<f;++o){var d=h[o].toString();v=this.replaysByZIndex_[d];for(u=0,l=a.length;u<l;++u){var m=a[u];c=v[m];if(c!==undefined){if(n&&(m==Uf.IMAGE||m==Uf.TEXT)){var p=n[d];if(!p){n[d]=[c,i.slice(0)]}else{p.push(c,i.slice(0))}}else{c.replay(t,i,s,e)}}}}t.restore()};iu.BATCH_CONSTRUCTORS_={Circle:Zf,Default:Yf,Image:Jf,LineString:Kf,Polygon:Zf,Text:tu};var su={};su.defaultOrder=function(t,i){return ta.getUid(t)-ta.getUid(i)};su.getSquaredTolerance=function(t,i){var s=su.getTolerance(t,i);return s*s};su.getTolerance=function(t,i){return ta.SIMPLIFY_TOLERANCE*t/i};su.renderCircleGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(r||n){var h=t.getReplay(s.getZIndex(),Uf.CIRCLE);h.setFillStrokeStyle(r,n);h.drawCircle(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.renderFeature=function(t,i,s,e,r,n){var h=false;var a,o;a=s.getImage();if(a){o=a.getImageState();if(o==vf.LOADED||o==vf.ERROR){a.unlistenImageChange(r,n)}else{if(o==vf.IDLE){a.load()}o=a.getImageState();a.listenImageChange(r,n);h=true}}su.renderFeature_(t,i,s,e);return h};su.renderFeature_=function(t,i,s,e){var r=s.getGeometryFunction()(i);if(!r){return}var n=r.getSimplifiedGeometry(e);var h=s.getRenderer();if(h){su.renderGeometry_(t,n,s,i)}else{var a=su.GEOMETRY_RENDERERS_[n.getType()];a(t,n,s,i)}};su.renderGeometry_=function(t,i,s,e){if(i.getType()==da.GEOMETRY_COLLECTION){var r=i.getGeometries();for(var n=0,h=r.length;n<h;++n){su.renderGeometry_(t,r[n],s,e)}return}var a=t.getReplay(s.getZIndex(),Uf.DEFAULT);a.drawCustom(i,e,s.getRenderer())};su.renderGeometryCollectionGeometry_=function(t,i,s,e){var r=i.getGeometriesArray();var n,h;for(n=0,h=r.length;n<h;++n){var a=su.GEOMETRY_RENDERERS_[r[n].getType()];a(t,r[n],s,e)}};su.renderLineStringGeometry_=function(t,i,s,e){var r=s.getStroke();if(r){var n=t.getReplay(s.getZIndex(),Uf.LINE_STRING);n.setFillStrokeStyle(null,r);n.drawLineString(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(false));a.drawText(i,e)}};su.renderMultiLineStringGeometry_=function(t,i,s,e){var r=s.getStroke();if(r){var n=t.getReplay(s.getZIndex(),Uf.LINE_STRING);n.setFillStrokeStyle(null,r);n.drawMultiLineString(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(false));a.drawText(i,e)}};su.renderMultiPolygonGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(n||r){var h=t.getReplay(s.getZIndex(),Uf.POLYGON);h.setFillStrokeStyle(r,n);h.drawMultiPolygon(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.renderPointGeometry_=function(t,i,s,e){var r=s.getImage();if(r){if(r.getImageState()!=vf.LOADED){return}var n=t.getReplay(s.getZIndex(),Uf.IMAGE);n.setImageStyle(r,t.addDeclutter(false));n.drawPoint(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(!!r));a.drawText(i,e)}};su.renderMultiPointGeometry_=function(t,i,s,e){var r=s.getImage();if(r){if(r.getImageState()!=vf.LOADED){return}var n=t.getReplay(s.getZIndex(),Uf.IMAGE);n.setImageStyle(r,t.addDeclutter(false));n.drawMultiPoint(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(!!r));a.drawText(i,e)}};su.renderPolygonGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(r||n){var h=t.getReplay(s.getZIndex(),Uf.POLYGON);h.setFillStrokeStyle(r,n);h.drawPolygon(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.GEOMETRY_RENDERERS_={Point:su.renderPointGeometry_,LineString:su.renderLineStringGeometry_,Polygon:su.renderPolygonGeometry_,MultiPoint:su.renderMultiPointGeometry_,MultiLineString:su.renderMultiLineStringGeometry_,MultiPolygon:su.renderMultiPolygonGeometry_,GeometryCollection:su.renderGeometryCollectionGeometry_,Circle:su.renderCircleGeometry_};var eu=function(t){xf.call(this,t);this.declutterTree_=t.getDeclutter()?jf(9):null;this.dirty_=false;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=Ma.createEmpty();this.renderedRenderOrder_=null;this.replayGroup_=null;this.replayGroupChanged=true;this.context=Po.createCanvasContext2D();ra.listen(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this)};ta.inherits(eu,xf);eu["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.VECTOR};eu["create"]=function(t,i){return new eu(i)};eu.prototype.disposeInternal=function(){ra.unlisten(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this);xf.prototype.disposeInternal.call(this)};eu.prototype.composeFrame=function(t,i,s){var e=t.extent;var r=t.pixelRatio;var n=i.managed?t.skippedFeatureUids:{};var h=t.viewState;var a=h.projection;var o=h.rotation;var f=a.getExtent();var u=this.getLayer().getSource();var l=this.getTransform(t,0);this.preCompose(s,t,l);var v=i.extent;var c=v!==undefined;if(c){this.clip(s,t,v)}var d=this.replayGroup_;if(d&&!d.isEmpty()){if(this.declutterTree_){this.declutterTree_.clear()}var m=this.getLayer();var p=0;var _=0;var g;var M=i.opacity!==1;var z=m.hasListener(Wo.RENDER);if(M||z){var w=s.canvas.width;var y=s.canvas.height;if(o){var b=Math.round(Math.sqrt(w*w+y*y));p=(b-w)/2;_=(b-y)/2;w=y=b}this.context.canvas.width=w;this.context.canvas.height=y;g=this.context}else{g=s}var x=g.globalAlpha;if(!M){g.globalAlpha=i.opacity}if(g!=s){g.translate(p,_)}var E=t.size[0]*r;var S=t.size[1]*r;gf.rotateAtOffset(g,-o,E/2,S/2);d.replay(g,l,o,n);if(u.getWrapX()&&a.canWrapX()&&!Ma.containsExtent(f,e)){var G=e[0];var P=Ma.getWidth(f);var k=0;var N;while(G<f[0]){--k;N=P*k;l=this.getTransform(t,N);d.replay(g,l,o,n);G+=P}k=0;G=e[2];while(G>f[2]){++k;N=P*k;l=this.getTransform(t,N);d.replay(g,l,o,n);G-=P}l=this.getTransform(t,0)}gf.rotateAtOffset(g,o,E/2,S/2);if(g!=s){if(z){this.dispatchRenderEvent(g,t,l)}if(M){var I=s.globalAlpha;s.globalAlpha=i.opacity;s.drawImage(g.canvas,-p,-_);s.globalAlpha=I}else{s.drawImage(g.canvas,-p,-_)}g.translate(-p,-_)}if(!M){g.globalAlpha=x}}if(c){s.restore()}this.postCompose(s,t,i,l)};eu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(!this.replayGroup_){return undefined}else{var n=i.viewState.resolution;var h=i.viewState.rotation;var a=this.getLayer();var o={};var f=this.replayGroup_.forEachFeatureAtCoordinate(t,n,h,s,{},(function(t){var i=ta.getUid(t).toString();if(!(i in o)){o[i]=true;return e.call(r,t,a)}}),null);return f}};eu.prototype.handleFontsChanged_=function(t){var i=this.getLayer();if(i.getVisible()&&this.replayGroup_){i.changed()}};eu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};eu.prototype.prepareFrame=function(t,i){var s=this.getLayer();var e=s.getSource();this.updateLogos(t,e);var r=t.viewHints[yo.ANIMATING];var n=t.viewHints[yo.INTERACTING];var h=s.getUpdateWhileAnimating();var a=s.getUpdateWhileInteracting();if(!this.dirty_&&(!h&&r)||!a&&n){return true}var o=t.extent;var f=t.viewState;var u=f.projection;var l=f.resolution;var v=t.pixelRatio;var c=s.getRevision();var d=s.getRenderBuffer();var m=s.getRenderOrder();if(m===undefined){m=su.defaultOrder}var p=Ma.buffer(o,d*l);var _=f.projection.getExtent();if(e.getWrapX()&&f.projection.canWrapX()&&!Ma.containsExtent(_,t.extent)){var g=Ma.getWidth(_);var M=Math.max(Ma.getWidth(p)/2,g);p[0]=_[0]-M;p[2]=_[2]+M}if(!this.dirty_&&this.renderedResolution_==l&&this.renderedRevision_==c&&this.renderedRenderOrder_==m&&Ma.containsExtent(this.renderedExtent_,p)){this.replayGroupChanged=false;return true}this.replayGroup_=null;this.dirty_=false;var z=new iu(su.getTolerance(l,v),p,l,v,e.getOverlaps(),this.declutterTree_,s.getRenderBuffer());e.loadFeatures(p,l,u);var w=function(t){var i;var e=t.getStyleFunction();if(e){i=e.call(t,l)}else{e=s.getStyleFunction();if(e){i=e(t,l)}}if(i){var r=this.renderFeature(t,l,v,i,z);this.dirty_=this.dirty_||r}}.bind(this);if(m){var y=[];e.forEachFeatureInExtent(p,(function(t){y.push(t)}),this);y.sort(m);for(var b=0,x=y.length;b<x;++b){w(y[b])}}else{e.forEachFeatureInExtent(p,w,this)}z.finish();this.renderedResolution_=l;this.renderedRevision_=c;this.renderedRenderOrder_=m;this.renderedExtent_=p;this.replayGroup_=z;this.replayGroupChanged=true;return true};eu.prototype.renderFeature=function(t,i,s,e,r){if(!e){return false}var n=false;if(Array.isArray(e)){for(var h=0,a=e.length;h<a;++h){n=su.renderFeature(r,t,e[h],su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}}else{n=su.renderFeature(r,t,e,su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)}return n};var ru={VECTOR:"vector"};var nu=function(t){this.context=null;Cf.call(this,t);this.declutterTree_=t.getDeclutter()?jf(9):null;this.dirty_=false;this.tmpTransform_=Ia.create();this.zDirection=t.getRenderMode()==ru.VECTOR?1:0;ra.listen(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this)};ta.inherits(nu,Cf);nu["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.VECTOR_TILE};nu["create"]=function(t,i){return new nu(i)};nu.IMAGE_REPLAYS={image:[Uf.POLYGON,Uf.CIRCLE,Uf.LINE_STRING,Uf.IMAGE,Uf.TEXT],hybrid:[Uf.POLYGON,Uf.LINE_STRING]};nu.VECTOR_REPLAYS={image:[Uf.DEFAULT],hybrid:[Uf.IMAGE,Uf.TEXT,Uf.DEFAULT],vector:Xf.ORDER};nu.prototype.disposeInternal=function(){ra.unlisten(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this);Cf.prototype.disposeInternal.call(this)};nu.prototype.prepareFrame=function(t,i){var s=this.getLayer();var e=s.getRevision();if(this.renderedLayerRevision_!=e){this.renderedTiles.length=0;var r=s.getRenderMode();if(!this.context&&r!=ru.VECTOR){this.context=Po.createCanvasContext2D()}if(this.context&&r==ru.VECTOR){this.context=null}}this.renderedLayerRevision_=e;return Cf.prototype.prepareFrame.apply(this,arguments)};nu.prototype.createReplayGroup_=function(t,i){var s=this.getLayer();var e=i.pixelRatio;var r=i.viewState.projection;var n=s.getRevision();var h=s.getRenderOrder()||null;var a=t.getReplayState(s);if(!a.dirty&&a.renderedRevision==n&&a.renderedRenderOrder==h){return}var o=s.getSource();var f=o.getTileGrid();var u=o.getTileGridForProjection(r);var l=u.getResolution(t.tileCoord[0]);var v=u.getTileCoordExtent(t.wrappedTileCoord);for(var c=0,d=t.tileKeys.length;c<d;++c){var m=t.getTile(t.tileKeys[c]);if(m.getState()==po.ERROR){continue}var p=m.tileCoord;var _=f.getTileCoordExtent(p);var g=Ma.getIntersection(v,_);var M=Ma.equals(_,g)?null:Ma.buffer(g,s.getRenderBuffer()*l);var z=m.getProjection();var w=false;if(!Na.equivalent(r,z)){w=true;m.setProjection(r)}a.dirty=false;var y=new iu(0,g,l,e,o.getOverlaps(),this.declutterTree_,s.getRenderBuffer());var b=su.getSquaredTolerance(l,e);var x=function(t){var i;var e=t.getStyleFunction();if(e){i=e.call(t,l)}else{e=s.getStyleFunction();if(e){i=e(t,l)}}if(i){var r=this.renderFeature(t,b,i,y);this.dirty_=this.dirty_||r;a.dirty=a.dirty||r}};var E=m.getFeatures();if(h&&h!==a.renderedRenderOrder){E.sort(h)}var S;for(var G=0,P=E.length;G<P;++G){S=E[G];if(w){if(z.getUnits()==ba.TILE_PIXELS){z.setWorldExtent(_);z.setExtent(m.getExtent())}S.getGeometry().transform(z,r)}if(!M||Ma.intersects(M,S.getGeometry().getExtent())){x.call(this,S)}}y.finish();for(var k in y.getReplays()){}m.setReplayGroup(s,t.tileCoord.toString(),y)}a.renderedRevision=n;a.renderedRenderOrder=h};nu.prototype.drawTileImage=function(t,i,s,e,r,n,h,a,o){var f=t;this.createReplayGroup_(f,i);if(this.context){this.renderTileImage_(f,i,s);Cf.prototype.drawTileImage.apply(this,arguments)}};nu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=i.viewState.resolution;var h=i.viewState.rotation;s=s==undefined?0:s;var a=this.getLayer();var o={};var f=this.renderedTiles;var u=a.getSource();var l=u.getTileGridForProjection(i.viewState.projection);var v,c;var d,m,p;var _,g,M;for(d=0,m=f.length;d<m;++d){_=f[d];g=_.wrappedTileCoord;M=l.getTileCoordExtent(g,this.tmpExtent);v=Ma.buffer(M,s*n,v);if(!Ma.containsCoordinate(v,t)){continue}for(var z=0,w=_.tileKeys.length;z<w;++z){var y=_.getTile(_.tileKeys[z]);if(y.getState()==po.ERROR){continue}p=y.getReplayGroup(a,_.tileCoord.toString());c=c||p.forEachFeatureAtCoordinate(t,n,h,s,{},(function(t){var i=ta.getUid(t).toString();if(!(i in o)){o[i]=true;return e.call(r,t,a)}}),null)}}return c};nu.prototype.getReplayTransform_=function(t,i){var s=this.getLayer();var e=s.getSource();var r=e.getTileGrid();var n=t.tileCoord;var h=r.getResolution(n[0]);var a=i.viewState;var o=i.pixelRatio;var f=a.resolution/o;var u=r.getTileCoordExtent(n,this.tmpExtent);var l=a.center;var v=Ma.getTopLeft(u);var c=i.size;var d=Math.round(o*c[0]/2);var m=Math.round(o*c[1]/2);return Ia.compose(this.tmpTransform_,d,m,h/f,h/f,a.rotation,(v[0]-l[0])/h,(l[1]-v[1])/h)};nu.prototype.handleFontsChanged_=function(t){var i=this.getLayer();if(i.getVisible()&&this.renderedLayerRevision_!==undefined){i.changed()}};nu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};nu.prototype.postCompose=function(t,i,s){var e=this.getLayer();var r=e.getDeclutter()?{}:null;var n=e.getSource();var h=e.getRenderMode();var a=nu.VECTOR_REPLAYS[h];var o=i.pixelRatio;var f=i.viewState.rotation;var u=i.size;var l,v;if(f){l=Math.round(o*u[0]/2);v=Math.round(o*u[1]/2);gf.rotateAtOffset(t,-f,l,v)}if(r){this.declutterTree_.clear()}var c=this.renderedTiles;var d=n.getTileGridForProjection(i.viewState.projection);var m=[];var p=[];for(var _=c.length-1;_>=0;--_){var g=c[_];if(g.getState()==po.ABORT){continue}var M=g.tileCoord;var z=d.getTileCoordExtent(M)[0]-d.getTileCoordExtent(g.wrappedTileCoord)[0];var w=undefined;for(var y=0,b=g.tileKeys.length;y<b;++y){var x=g.getTile(g.tileKeys[y]);if(x.getState()==po.ERROR){continue}var E=x.getReplayGroup(e,M.toString());if(h!=ru.VECTOR&&!E.hasReplays(a)){continue}if(!w){w=this.getTransform(i,z)}var S=x.tileCoord[0];var G=E.getClipCoords(w);t.save();t.globalAlpha=s.opacity;for(var P=0,k=m.length;P<k;++P){var N=m[P];if(S<p[P]){t.beginPath();t.moveTo(G[0],G[1]);t.lineTo(G[2],G[3]);t.lineTo(G[4],G[5]);t.lineTo(G[6],G[7]);t.moveTo(N[6],N[7]);t.lineTo(N[4],N[5]);t.lineTo(N[2],N[3]);t.lineTo(N[0],N[1]);t.clip()}}E.replay(t,w,f,{},a,r);t.restore();m.push(G);p.push(S)}}if(r){iu.replayDeclutter(r,t,f)}if(f){gf.rotateAtOffset(t,f,l,v)}Cf.prototype.postCompose.apply(this,arguments)};nu.prototype.renderFeature=function(t,i,s,e){if(!s){return false}var r=false;if(Array.isArray(s)){for(var n=0,h=s.length;n<h;++n){r=su.renderFeature(e,t,s[n],i,this.handleStyleImageChange_,this)||r}}else{r=su.renderFeature(e,t,s,i,this.handleStyleImageChange_,this)}return r};nu.prototype.renderTileImage_=function(t,i,s){var e=this.getLayer();var r=t.getReplayState(e);var n=e.getRevision();var h=nu.IMAGE_REPLAYS[e.getRenderMode()];if(h&&r.renderedTileRevision!==n){r.renderedTileRevision=n;var a=t.wrappedTileCoord;var o=a[0];var f=i.pixelRatio;var u=e.getSource();var l=u.getTileGridForProjection(i.viewState.projection);var v=l.getResolution(o);var c=t.getContext(e);var d=u.getTilePixelSize(o,f,i.viewState.projection);c.canvas.width=d[0];c.canvas.height=d[1];var m=l.getTileCoordExtent(a);for(var p=0,_=t.tileKeys.length;p<_;++p){var g=t.getTile(t.tileKeys[p]);if(g.getState()==po.ERROR){continue}var M=f/v;var z=Ia.reset(this.tmpTransform_);Ia.scale(z,M,-M);Ia.translate(z,-m[0],-m[3]);var w=g.getReplayGroup(e,t.tileCoord.toString());w.replay(c,z,0,{},h)}}};var hu=function(t){this.source_=t};hu.prototype.getType=function(){};hu.prototype.getSource=function(){return this.source_};hu.prototype.isAnimated=wa.FALSE;var au=function(t){hu.call(this,t)};ta.inherits(au,hu);au.prototype.getType=function(){return Ya.FRAGMENT_SHADER};var ou=function(t){hu.call(this,t)};ta.inherits(ou,hu);ou.prototype.getType=function(){return Ya.VERTEX_SHADER};var fu={};fu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n float radius = length(windowCenter - windowOffset);\n float dist = length(windowCenter - gl_FragCoord.xy);\n if (dist > radius + v_halfWidth) {\n if (u_strokeColor.a == 0.0) {\n gl_FragColor = u_fillColor;\n } else {\n gl_FragColor = u_strokeColor;\n }\n gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n } else if (u_fillColor.a == 0.0) {\n // Hooray, no fill, just stroke. We can use real antialiasing.\n gl_FragColor = u_strokeColor;\n if (dist < radius - v_halfWidth) {\n gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n }\n } else {\n gl_FragColor = u_fillColor;\n float strokeDist = radius - v_halfWidth;\n float antialias = 2.0 * v_pixelRatio;\n if (dist > strokeDist) {\n gl_FragColor = u_strokeColor;\n } else if (dist >= strokeDist - antialias) {\n float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n }\n }\n gl_FragColor.a = gl_FragColor.a * u_opacity;\n if (gl_FragColor.a <= 0.0) {\n discard;\n }\n}\n":"precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}");fu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n v_pixelRatio = u_pixelRatio;\n float lineWidth = u_lineWidth * u_pixelRatio;\n v_halfWidth = lineWidth / 2.0;\n if (lineWidth == 0.0) {\n lineWidth = 2.0 * u_pixelRatio;\n }\n vec2 offset;\n // Radius with anitaliasing (roughly).\n float radius = a_radius + 3.0 * u_pixelRatio;\n // Until we get gl_VertexID in WebGL, we store an instruction.\n if (a_instruction == 0.0) {\n // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n offset = vec2(-1.0, 1.0);\n } else if (a_instruction == 1.0) {\n offset = vec2(-1.0, -1.0);\n } else if (a_instruction == 2.0) {\n offset = vec2(1.0, -1.0);\n } else {\n offset = vec2(1.0, 1.0);\n }\n\n gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n 0.0, 1.0)).xy;\n\n if (distance(v_center, v_offset) > 20000.0) {\n gl_Position = vec4(v_center, 0.0, 1.0);\n }\n}\n\n\n":"varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}");var uu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_lineWidth=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_lineWidth":"k");this.u_pixelRatio=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_pixelRatio":"l");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"m");this.u_fillColor=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_fillColor":"n");this.u_strokeColor=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_strokeColor":"o");this.u_size=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_size":"p");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"e");this.a_instruction=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_instruction":"f");this.a_radius=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_radius":"g")};var lu={};lu.create=function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};lu.fromTransform=function(t,i){t[0]=i[0];t[1]=i[1];t[4]=i[2];t[5]=i[3];t[12]=i[4];t[13]=i[5];return t};var vu=function(t,i){wf.call(this);this.tolerance=t;this.maxExtent=i;this.origin=Ma.getCenter(i);this.projectionMatrix_=Ia.create();this.offsetRotateMatrix_=Ia.create();this.offsetScaleMatrix_=Ia.create();this.tmpMat4_=lu.create();this.indices=[];this.indicesBuffer=null;this.startIndices=[];this.startIndicesFeature=[];this.vertices=[];this.verticesBuffer=null;this.lineStringReplay=undefined};ta.inherits(vu,wf);vu.prototype.getDeleteResourcesFunction=function(t){};vu.prototype.finish=function(t){};vu.prototype.setUpProgram=function(t,i,s,e){};vu.prototype.shutDownProgram=function(t,i){};vu.prototype.drawReplay=function(t,i,s,e){};vu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){};vu.prototype.drawHitDetectionReplay=function(t,i,s,e,r,n){if(!r){return this.drawHitDetectionReplayAll(t,i,s,e)}else{return this.drawHitDetectionReplayOneByOne(t,i,s,e,n)}};vu.prototype.drawHitDetectionReplayAll=function(t,i,s,e){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawReplay(t,i,s,true);var r=e(null);if(r){return r}else{return undefined}};vu.prototype.replay=function(t,i,s,e,r,n,h,a,o,f,u){var l=t.getGL();var v,c,d,m,p,_,g,M;if(this.lineStringReplay){v=l.isEnabled(l.STENCIL_TEST);c=l.getParameter(l.STENCIL_FUNC);d=l.getParameter(l.STENCIL_VALUE_MASK);m=l.getParameter(l.STENCIL_REF);p=l.getParameter(l.STENCIL_WRITEMASK);_=l.getParameter(l.STENCIL_FAIL);g=l.getParameter(l.STENCIL_PASS_DEPTH_PASS);M=l.getParameter(l.STENCIL_PASS_DEPTH_FAIL);l.enable(l.STENCIL_TEST);l.clear(l.STENCIL_BUFFER_BIT);l.stencilMask(255);l.stencilFunc(l.ALWAYS,1,255);l.stencilOp(l.KEEP,l.KEEP,l.REPLACE);this.lineStringReplay.replay(t,i,s,e,r,n,h,a,o,f,u);l.stencilMask(0);l.stencilFunc(l.NOTEQUAL,1,255)}t.bindBuffer(Ya.ARRAY_BUFFER,this.verticesBuffer);t.bindBuffer(Ya.ELEMENT_ARRAY_BUFFER,this.indicesBuffer);var z=this.setUpProgram(l,t,r,n);var w=Ia.reset(this.projectionMatrix_);Ia.scale(w,2/(s*r[0]),2/(s*r[1]));Ia.rotate(w,-e);Ia.translate(w,-(i[0]-this.origin[0]),-(i[1]-this.origin[1]));var y=Ia.reset(this.offsetScaleMatrix_);Ia.scale(y,2/r[0],2/r[1]);var b=Ia.reset(this.offsetRotateMatrix_);if(e!==0){Ia.rotate(b,-e)}l.uniformMatrix4fv(z.u_projectionMatrix,false,lu.fromTransform(this.tmpMat4_,w));l.uniformMatrix4fv(z.u_offsetScaleMatrix,false,lu.fromTransform(this.tmpMat4_,y));l.uniformMatrix4fv(z.u_offsetRotateMatrix,false,lu.fromTransform(this.tmpMat4_,b));l.uniform1f(z.u_opacity,h);var x;if(o===undefined){this.drawReplay(l,t,a,false)}else{x=this.drawHitDetectionReplay(l,t,a,o,f,u)}this.shutDownProgram(l,z);if(this.lineStringReplay){if(!v){l.disable(l.STENCIL_TEST)}l.clear(l.STENCIL_BUFFER_BIT);l.stencilFunc(c,m,d);l.stencilMask(p);l.stencilOp(_,M,g)}return x};vu.prototype.drawElements=function(t,i,s,e){var r=i.hasOESElementIndexUint?Ya.UNSIGNED_INT:Ya.UNSIGNED_SHORT;var n=i.hasOESElementIndexUint?4:2;var h=e-s;var a=s*n;t.drawElements(Ya.TRIANGLES,h,r,a)};var cu={};cu.defaultFont="10px sans-serif";cu.defaultFillStyle=[0,0,0,1];cu.defaultLineCap="round";cu.defaultLineDash=[];cu.defaultLineDashOffset=0;cu.defaultLineJoin="round";cu.defaultMiterLimit=10;cu.defaultStrokeStyle=[0,0,0,1];cu.defaultTextAlign=.5;cu.defaultTextBaseline=.5;cu.defaultLineWidth=1;cu.triangleIsCounterClockwise=function(t,i,s,e,r,n){var h=(s-t)*(n-i)-(r-t)*(e-i);return h<=cu.EPSILON&&h>=-cu.EPSILON?undefined:h>0};cu.EPSILON=Number.EPSILON||2220446049250313e-31;var du=function(t,i){this.arr_=t!==undefined?t:[];this.usage_=i!==undefined?i:du.Usage_.STATIC_DRAW};du.prototype.getArray=function(){return this.arr_};du.prototype.getUsage=function(){return this.usage_};du.Usage_={STATIC_DRAW:Ya.STATIC_DRAW,STREAM_DRAW:Ya.STREAM_DRAW,DYNAMIC_DRAW:Ya.DYNAMIC_DRAW};var mu=function(t,i){vu.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.radius_=0;this.state_={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:undefined,lineWidth:undefined,changed:false}};ta.inherits(mu,vu);mu.prototype.drawCoordinates_=function(t,i,s,e){var r=this.vertices.length;var n=this.indices.length;var h=r/4;var a,o;for(a=i,o=s;a<o;a+=e){this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=0;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=1;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=2;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=3;this.vertices[r++]=this.radius_;this.indices[n++]=h;this.indices[n++]=h+1;this.indices[n++]=h+2;this.indices[n++]=h+2;this.indices[n++]=h+3;this.indices[n++]=h;h+=4}};mu.prototype.drawCircle=function(t,i){var s=t.getRadius();var e=t.getStride();if(s){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.radius_=s;var r=t.getFlatCoordinates();r=ya.translate(r,0,2,e,-this.origin[0],-this.origin[1]);this.drawCoordinates_(r,0,2,e)}else{if(this.state_.changed){this.styles_.pop();if(this.styles_.length){var n=this.styles_[this.styles_.length-1];this.state_.fillColor=n[0];this.state_.strokeColor=n[1];this.state_.lineWidth=n[2];this.state_.changed=false}}}};mu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};mu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;return function(){t.deleteBuffer(i);t.deleteBuffer(s)}};mu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=fu.fragment;n=fu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new uu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,16,0);t.enableVertexAttribArray(a.a_instruction);t.vertexAttribPointer(a.a_instruction,1,Ya.FLOAT,false,16,8);t.enableVertexAttribArray(a.a_radius);t.vertexAttribPointer(a.a_radius,1,Ya.FLOAT,false,16,12);t.uniform2fv(a.u_size,s);t.uniform1f(a.u_pixelRatio,e);return a};mu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_instruction);t.disableVertexAttribArray(i.a_radius)};mu.prototype.drawReplay=function(t,i,s,e){if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var r,n,h,a;h=this.startIndices[this.startIndices.length-1];for(r=this.styleIndices_.length-1;r>=0;--r){n=this.styleIndices_[r];a=this.styles_[r];this.setFillStyle_(t,a[0]);this.setStrokeStyle_(t,a[1],a[2]);this.drawElements(t,i,n,h);h=n}}};mu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setFillStyle_(t,o[0]);this.setStrokeStyle_(t,o[1],o[2]);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};mu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setFillStyle_(t,h[0]);this.setStrokeStyle_(t,h[1],h[2]);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n)}r=n=a}};mu.prototype.setFillStyle_=function(t,i){t.uniform4fv(this.defaultLocations_.u_fillColor,i)};mu.prototype.setStrokeStyle_=function(t,i,s){t.uniform4fv(this.defaultLocations_.u_strokeColor,i);t.uniform1f(this.defaultLocations_.u_lineWidth,s)};mu.prototype.setFillStrokeStyle=function(t,i){var s,e;if(i){var r=i.getLineDash();this.state_.lineDash=r?r:cu.defaultLineDash;var n=i.getLineDashOffset();this.state_.lineDashOffset=n?n:cu.defaultLineDashOffset;s=i.getColor();if(!(s instanceof CanvasGradient)&&!(s instanceof CanvasPattern)){s=Mf.asArray(s).map((function(t,i){return i!=3?t/255:t}))||cu.defaultStrokeStyle}else{s=cu.defaultStrokeStyle}e=i.getWidth();e=e!==undefined?e:cu.defaultLineWidth}else{s=[0,0,0,0];e=0}var h=t?t.getColor():[0,0,0,0];if(!(h instanceof CanvasGradient)&&!(h instanceof CanvasPattern)){h=Mf.asArray(h).map((function(t,i){return i!=3?t/255:t}))||cu.defaultFillStyle}else{h=cu.defaultFillStyle}if(!this.state_.strokeColor||!pa.equals(this.state_.strokeColor,s)||!this.state_.fillColor||!pa.equals(this.state_.fillColor,h)||this.state_.lineWidth!==e){this.state_.changed=true;this.state_.fillColor=h;this.state_.strokeColor=s;this.state_.lineWidth=e;this.styles_.push([h,s,e])}};var pu={};pu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n float alpha = texColor.a * v_opacity * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");pu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n if (a_rotateWithView == 1.0) {\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n }\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n v_texCoord = a_texCoord;\n v_opacity = a_opacity;\n}\n\n\n":"varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}");var _u=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"k");this.u_image=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_image":"l");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"c");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"d");this.a_offsets=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_offsets":"e");this.a_opacity=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_opacity":"f");this.a_rotateWithView=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_rotateWithView":"g")};var gu={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};var Mu=function(t,i){this.canvas_=t;this.gl_=i;this.bufferCache_={};this.shaderCache_={};this.programCache_={};this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null;this.hasOESElementIndexUint=pa.includes(ta.WEBGL_EXTENSIONS,"OES_element_index_uint");if(this.hasOESElementIndexUint){i.getExtension("OES_element_index_uint")}ra.listen(this.canvas_,gu.LOST,this.handleWebGLContextLost,this);ra.listen(this.canvas_,gu.RESTORED,this.handleWebGLContextRestored,this)};ta.inherits(Mu,na);Mu.prototype.bindBuffer=function(t,i){var s=this.getGL();var e=i.getArray();var r=String(ta.getUid(i));if(r in this.bufferCache_){var n=this.bufferCache_[r];s.bindBuffer(t,n.buffer)}else{var h=s.createBuffer();s.bindBuffer(t,h);var a;if(t==Ya.ARRAY_BUFFER){a=new Float32Array(e)}else if(t==Ya.ELEMENT_ARRAY_BUFFER){a=this.hasOESElementIndexUint?new Uint32Array(e):new Uint16Array(e)}s.bufferData(t,a,i.getUsage());this.bufferCache_[r]={buf:i,buffer:h}}};Mu.prototype.deleteBuffer=function(t){var i=this.getGL();var s=String(ta.getUid(t));var e=this.bufferCache_[s];if(!i.isContextLost()){i.deleteBuffer(e.buffer)}delete this.bufferCache_[s]};Mu.prototype.disposeInternal=function(){ra.unlistenAll(this.canvas_);var t=this.getGL();if(!t.isContextLost()){var i;for(i in this.bufferCache_){t.deleteBuffer(this.bufferCache_[i].buffer)}for(i in this.programCache_){t.deleteProgram(this.programCache_[i])}for(i in this.shaderCache_){t.deleteShader(this.shaderCache_[i])}t.deleteFramebuffer(this.hitDetectionFramebuffer_);t.deleteRenderbuffer(this.hitDetectionRenderbuffer_);t.deleteTexture(this.hitDetectionTexture_)}};Mu.prototype.getCanvas=function(){return this.canvas_};Mu.prototype.getGL=function(){return this.gl_};Mu.prototype.getHitDetectionFramebuffer=function(){if(!this.hitDetectionFramebuffer_){this.initHitDetectionFramebuffer_()}return this.hitDetectionFramebuffer_};Mu.prototype.getShader=function(t){var i=String(ta.getUid(t));if(i in this.shaderCache_){return this.shaderCache_[i]}else{var s=this.getGL();var e=s.createShader(t.getType());s.shaderSource(e,t.getSource());s.compileShader(e);this.shaderCache_[i]=e;return e}};Mu.prototype.getProgram=function(t,i){var s=ta.getUid(t)+"/"+ta.getUid(i);if(s in this.programCache_){return this.programCache_[s]}else{var e=this.getGL();var r=e.createProgram();e.attachShader(r,this.getShader(t));e.attachShader(r,this.getShader(i));e.linkProgram(r);this.programCache_[s]=r;return r}};Mu.prototype.handleWebGLContextLost=function(){ea.clear(this.bufferCache_);ea.clear(this.shaderCache_);ea.clear(this.programCache_);this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null};Mu.prototype.handleWebGLContextRestored=function(){};Mu.prototype.initHitDetectionFramebuffer_=function(){var t=this.gl_;var i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i);var s=Mu.createEmptyTexture(t,1,1);var e=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,e);t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,1,1);t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e);t.bindTexture(t.TEXTURE_2D,null);t.bindRenderbuffer(t.RENDERBUFFER,null);t.bindFramebuffer(t.FRAMEBUFFER,null);this.hitDetectionFramebuffer_=i;this.hitDetectionTexture_=s;this.hitDetectionRenderbuffer_=e};Mu.prototype.useProgram=function(t){if(t==this.currentProgram_){return false}else{var i=this.getGL();i.useProgram(t);this.currentProgram_=t;return true}};Mu.createTexture_=function(t,i,s){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR);if(i!==undefined){t.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_S,i)}if(s!==undefined){t.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_T,s)}return e};Mu.createEmptyTexture=function(t,i,s,e,r){var n=Mu.createTexture_(t,e,r);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i,s,0,t.RGBA,t.UNSIGNED_BYTE,null);return n};Mu.createTexture=function(t,i,s,e){var r=Mu.createTexture_(t,s,e);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i);return r};var zu=function(t,i){vu.call(this,t,i);this.anchorX=undefined;this.anchorY=undefined;this.groupIndices=[];this.hitDetectionGroupIndices=[];this.height=undefined;this.imageHeight=undefined;this.imageWidth=undefined;this.defaultLocations=null;this.opacity=undefined;this.originX=undefined;this.originY=undefined;this.rotateWithView=undefined;this.rotation=undefined;this.scale=undefined;this.width=undefined};ta.inherits(zu,vu);zu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;var e=this.getTextures(true);var r=t.getGL();return function(){if(!r.isContextLost()){var n,h;for(n=0,h=e.length;n<h;++n){r.deleteTexture(e[n])}}t.deleteBuffer(i);t.deleteBuffer(s)}};zu.prototype.drawCoordinates=function(t,i,s,e){var r=this.anchorX;var n=this.anchorY;var h=this.height;var a=this.imageHeight;var o=this.imageWidth;var f=this.opacity;var u=this.originX;var l=this.originY;var v=this.rotateWithView?1:0;var c=-this.rotation;var d=this.scale;var m=this.width;var p=Math.cos(c);var _=Math.sin(c);var g=this.indices.length;var M=this.vertices.length;var z,w,y,b,x,E;for(z=i;z<s;z+=e){x=t[z]-this.origin[0];E=t[z+1]-this.origin[1];w=M/8;y=-d*r;b=-d*(h-n);this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=u/o;this.vertices[M++]=(l+h)/a;this.vertices[M++]=f;this.vertices[M++]=v;y=d*(m-r);b=-d*(h-n);this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=(u+m)/o;this.vertices[M++]=(l+h)/a;this.vertices[M++]=f;this.vertices[M++]=v;y=d*(m-r);b=d*n;this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=(u+m)/o;this.vertices[M++]=l/a;this.vertices[M++]=f;this.vertices[M++]=v;y=-d*r;b=d*n;this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=u/o;this.vertices[M++]=l/a;this.vertices[M++]=f;this.vertices[M++]=v;this.indices[g++]=w;this.indices[g++]=w+1;this.indices[g++]=w+2;this.indices[g++]=w;this.indices[g++]=w+2;this.indices[g++]=w+3}return M};zu.prototype.createTextures=function(t,i,s,e){var r,n,h,a;var o=i.length;for(a=0;a<o;++a){n=i[a];h=ta.getUid(n).toString();if(h in s){r=s[h]}else{r=Mu.createTexture(e,n,Ya.CLAMP_TO_EDGE,Ya.CLAMP_TO_EDGE);s[h]=r}t[a]=r}};zu.prototype.setUpProgram=function(t,i,s,e){var r=pu.fragment;var n=pu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations){a=new _u(t,h);this.defaultLocations=a}else{a=this.defaultLocations}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,32,0);t.enableVertexAttribArray(a.a_offsets);t.vertexAttribPointer(a.a_offsets,2,Ya.FLOAT,false,32,8);t.enableVertexAttribArray(a.a_texCoord);t.vertexAttribPointer(a.a_texCoord,2,Ya.FLOAT,false,32,16);t.enableVertexAttribArray(a.a_opacity);t.vertexAttribPointer(a.a_opacity,1,Ya.FLOAT,false,32,24);t.enableVertexAttribArray(a.a_rotateWithView);t.vertexAttribPointer(a.a_rotateWithView,1,Ya.FLOAT,false,32,28);return a};zu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_offsets);t.disableVertexAttribArray(i.a_texCoord);t.disableVertexAttribArray(i.a_opacity);t.disableVertexAttribArray(i.a_rotateWithView)};zu.prototype.drawReplay=function(t,i,s,e){var r=e?this.getHitDetectionTextures():this.getTextures();var n=e?this.hitDetectionGroupIndices:this.groupIndices;if(!ea.isEmpty(s)){this.drawReplaySkipping(t,i,s,r,n)}else{var h,a,o;for(h=0,a=r.length,o=0;h<a;++h){t.bindTexture(Ya.TEXTURE_2D,r[h]);var f=n[h];this.drawElements(t,i,o,f);o=f}}};zu.prototype.drawReplaySkipping=function(t,i,s,e,r){var n=0;var h,a;for(h=0,a=e.length;h<a;++h){t.bindTexture(Ya.TEXTURE_2D,e[h]);var o=h>0?r[h-1]:0;var f=r[h];var u=o;var l=o;while(n<this.startIndices.length&&this.startIndices[n]<=f){var v=this.startIndicesFeature[n];var c=ta.getUid(v).toString();if(s[c]!==undefined){if(u!==l){this.drawElements(t,i,u,l)}u=n===this.startIndices.length-1?f:this.startIndices[n+1];l=u}else{l=n===this.startIndices.length-1?f:this.startIndices[n+1]}n++}if(u!==l){this.drawElements(t,i,u,l)}}};zu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u;var l=this.startIndices.length-1;var v=this.getHitDetectionTextures();for(n=v.length-1;n>=0;--n){t.bindTexture(Ya.TEXTURE_2D,v[n]);h=n>0?this.hitDetectionGroupIndices[n-1]:0;o=this.hitDetectionGroupIndices[n];while(l>=0&&this.startIndices[l]>=h){a=this.startIndices[l];f=this.startIndicesFeature[l];u=ta.getUid(f).toString();if(s[u]===undefined&&f.getGeometry()&&(r===undefined||Ma.intersects(r,f.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,a,o);var c=e(f);if(c){return c}}o=a;l--}}return undefined};zu.prototype.finish=function(t){this.anchorX=undefined;this.anchorY=undefined;this.height=undefined;this.imageHeight=undefined;this.imageWidth=undefined;this.indices=null;this.opacity=undefined;this.originX=undefined;this.originY=undefined;this.rotateWithView=undefined;this.rotation=undefined;this.scale=undefined;this.vertices=null;this.width=undefined};zu.prototype.getTextures=function(t){};zu.prototype.getHitDetectionTextures=function(){};var wu=function(t,i){zu.call(this,t,i);this.images_=[];this.hitDetectionImages_=[];this.textures_=[];this.hitDetectionTextures_=[]};ta.inherits(wu,zu);wu.prototype.drawMultiPoint=function(t,i){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var s=t.getFlatCoordinates();var e=t.getStride();this.drawCoordinates(s,0,s.length,e)};wu.prototype.drawPoint=function(t,i){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var s=t.getFlatCoordinates();var e=t.getStride();this.drawCoordinates(s,0,s.length,e)};wu.prototype.finish=function(t){var i=t.getGL();this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices.push(this.indices.length);this.verticesBuffer=new du(this.vertices);var s=this.indices;this.indicesBuffer=new du(s);var e={};this.createTextures(this.textures_,this.images_,e,i);this.createTextures(this.hitDetectionTextures_,this.hitDetectionImages_,e,i);this.images_=null;this.hitDetectionImages_=null;zu.prototype.finish.call(this,t)};wu.prototype.setImageStyle=function(t){var i=t.getAnchor();var s=t.getImage(1);var e=t.getImageSize();var r=t.getHitDetectionImage(1);var n=t.getOpacity();var h=t.getOrigin();var a=t.getRotateWithView();var o=t.getRotation();var f=t.getSize();var u=t.getScale();var l;if(this.images_.length===0){this.images_.push(s)}else{l=this.images_[this.images_.length-1];if(ta.getUid(l)!=ta.getUid(s)){this.groupIndices.push(this.indices.length);this.images_.push(s)}}if(this.hitDetectionImages_.length===0){this.hitDetectionImages_.push(r)}else{l=this.hitDetectionImages_[this.hitDetectionImages_.length-1];if(ta.getUid(l)!=ta.getUid(r)){this.hitDetectionGroupIndices.push(this.indices.length);this.hitDetectionImages_.push(r)}}this.anchorX=i[0];this.anchorY=i[1];this.height=f[1];this.imageHeight=e[1];this.imageWidth=e[0];this.opacity=n;this.originX=h[0];this.originY=h[1];this.rotation=o;this.rotateWithView=a;this.scale=u;this.width=f[0]};wu.prototype.getTextures=function(t){return t?this.textures_.concat(this.hitDetectionTextures_):this.textures_};wu.prototype.getHitDetectionTextures=function(){return this.hitDetectionTextures_};var yu={};yu.lineStringIsClosed=function(t,i,s,e){var r=s-e;if(t[i]===t[r]&&t[i+1]===t[r+1]&&(s-i)/e>3){return!!Ra.linearRing(t,i,s,e)}return false};var bu={};bu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n if (v_round > 0.0) {\n vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n discard;\n }\n }\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");bu.vertex=new ou(ta.DEBUG_WEBGL?"varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n float epsilon = 0.000000000001;\n return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n vec2 dirVect = nextP - a_position;\n vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n float halfWidth = u_lineWidth / 2.0;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_nextPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n round = 0.0;\n if (isRound) {\n round = 1.0;\n } else if (miterLength > u_miterLimit + u_lineWidth) {\n offset = halfWidth * tmpNormal * direction;\n }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n bool degenerate = false;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_lastPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n vec2 longOffset, shortOffset, longVertex;\n vec4 shortProjVertex;\n float halfWidth = u_lineWidth / 2.0;\n if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n longOffset = tmpNormal * direction * halfWidth;\n shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_nextPos;\n shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n } else {\n shortOffset = tmpNormal * direction * halfWidth;\n longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_lastPos;\n shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n }\n //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n float epsilon = 0.000000000001;\n if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n offset = shortProjVertex.xy;\n degenerate = true;\n } else {\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n }\n return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n in float turnDir, in float direction) {\n round = 0.0;\n vec2 dirVect = a_position - nextP;\n vec2 firstNormal = normalize(dirVect);\n vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n vec2 hypotenuse = normalize(firstNormal - secondNormal);\n vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n offset = normal * length;\n if (isRound) {\n round = 1.0;\n }\n}\n\nvoid main(void) {\n bool degenerate = false;\n float direction = float(sign(a_direction));\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n vec2 offset;\n vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n v_round = 0.0;\n v_halfWidth = u_lineWidth / 2.0;\n v_roundVertex = projPos.xy;\n\n if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n alongNormal(offset, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n alongNormal(offset, a_lastPos, -1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n miterUp(offset, v_round, round, direction);\n } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n }\n if (!degenerate) {\n vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n gl_Position = projPos + offsets;\n } else {\n gl_Position = vec4(offset, 0.0, 1.0);\n }\n}\n\n\n":"varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}");var xu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_lineWidth=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_lineWidth":"k");this.u_miterLimit=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_miterLimit":"l");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"m");this.u_color=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_color":"n");this.u_size=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_size":"o");this.u_pixelRatio=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_pixelRatio":"p");this.a_lastPos=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_lastPos":"d");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"e");this.a_nextPos=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_nextPos":"f");this.a_direction=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_direction":"g")};var Eu=function(t,i){vu.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:undefined,miterLimit:undefined,changed:false}};ta.inherits(Eu,vu);Eu.prototype.drawCoordinates_=function(t,i,s,e){var r,n;var h=this.vertices.length;var a=this.indices.length;var o=this.state_.lineJoin==="bevel"?0:this.state_.lineJoin==="miter"?1:2;var f=this.state_.lineCap==="butt"?0:this.state_.lineCap==="square"?1:2;var u=yu.lineStringIsClosed(t,i,s,e);var l,v,c;var d=a;var m=1;var p,_,g;for(r=i,n=s;r<n;r+=e){c=h/7;p=_;_=g||[t[r],t[r+1]];if(r===i){g=[t[r+e],t[r+e+1]];if(s-i===e*2&&pa.equals(_,g)){break}if(u){p=[t[s-e*2],t[s-e*2+1]];l=g}else{if(f){h=this.addVertices_([0,0],_,g,m*Eu.Instruction_.BEGIN_LINE_CAP*f,h);h=this.addVertices_([0,0],_,g,-m*Eu.Instruction_.BEGIN_LINE_CAP*f,h);this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=c+1;this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c+2}h=this.addVertices_([0,0],_,g,m*Eu.Instruction_.BEGIN_LINE*(f||1),h);h=this.addVertices_([0,0],_,g,-m*Eu.Instruction_.BEGIN_LINE*(f||1),h);d=h/7-1;continue}}else if(r===s-e){if(u){g=l;break}else{p=p||[0,0];h=this.addVertices_(p,_,[0,0],m*Eu.Instruction_.END_LINE*(f||1),h);h=this.addVertices_(p,_,[0,0],-m*Eu.Instruction_.END_LINE*(f||1),h);this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=d;this.indices[a++]=c+1;this.indices[a++]=c;if(f){h=this.addVertices_(p,_,[0,0],m*Eu.Instruction_.END_LINE_CAP*f,h);h=this.addVertices_(p,_,[0,0],-m*Eu.Instruction_.END_LINE_CAP*f,h);this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=c+1;this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c+2}break}}else{g=[t[r+e],t[r+e+1]]}v=cu.triangleIsCounterClockwise(p[0],p[1],_[0],_[1],g[0],g[1])?-1:1;h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_FIRST*(o||1),h);h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_SECOND*(o||1),h);h=this.addVertices_(p,_,g,-v*Eu.Instruction_.MITER_BOTTOM*(o||1),h);if(r>i){this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=m*v>0?d:d-1}this.indices[a++]=c;this.indices[a++]=c+2;this.indices[a++]=c+1;d=c+2;m=v;if(o){h=this.addVertices_(p,_,g,v*Eu.Instruction_.MITER_TOP*o,h);this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c}}if(u){c=c||h/7;v=Ha.linearRingIsClockwise([p[0],p[1],_[0],_[1],g[0],g[1]],0,6,2)?1:-1;h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_FIRST*(o||1),h);h=this.addVertices_(p,_,g,-v*Eu.Instruction_.MITER_BOTTOM*(o||1),h);this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=c+1;this.indices[a++]=c;this.indices[a++]=m*v>0?d:d-1}};Eu.prototype.addVertices_=function(t,i,s,e,r){this.vertices[r++]=t[0];this.vertices[r++]=t[1];this.vertices[r++]=i[0];this.vertices[r++]=i[1];this.vertices[r++]=s[0];this.vertices[r++]=s[1];this.vertices[r++]=e;return r};Eu.prototype.isValid_=function(t,i,s,e){var r=s-i;if(r<e*2){return false}else if(r===e*2){var n=[t[i],t[i+1]];var h=[t[i+e],t[i+e+1]];return!pa.equals(n,h)}return true};Eu.prototype.drawLineString=function(t,i){var s=t.getFlatCoordinates();var e=t.getStride();if(this.isValid_(s,0,s.length,e)){s=ya.translate(s,0,s.length,e,-this.origin[0],-this.origin[1]);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);this.drawCoordinates_(s,0,s.length,e)}};Eu.prototype.drawMultiLineString=function(t,i){var s=this.indices.length;var e=t.getEnds();e.unshift(0);var r=t.getFlatCoordinates();var n=t.getStride();var h,a;if(e.length>1){for(h=1,a=e.length;h<a;++h){if(this.isValid_(r,e[h-1],e[h],n)){var o=ya.translate(r,e[h-1],e[h],n,-this.origin[0],-this.origin[1]);this.drawCoordinates_(o,0,o.length,n)}}}if(this.indices.length>s){this.startIndices.push(s);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(s);this.state_.changed=false}}};Eu.prototype.drawPolygonCoordinates=function(t,i,s){if(!yu.lineStringIsClosed(t,0,t.length,s)){t.push(t[0]);t.push(t[1])}this.drawCoordinates_(t,0,t.length,s);if(i.length){var e,r;for(e=0,r=i.length;e<r;++e){if(!yu.lineStringIsClosed(i[e],0,i[e].length,s)){i[e].push(i[e][0]);i[e].push(i[e][1])}this.drawCoordinates_(i[e],0,i[e].length,s)}}};Eu.prototype.setPolygonStyle=function(t,i){var s=i===undefined?this.indices.length:i;this.startIndices.push(s);this.startIndicesFeature.push(t);if(this.state_.changed){this.styleIndices_.push(s);this.state_.changed=false}};Eu.prototype.getCurrentIndex=function(){return this.indices.length};Eu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};Eu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;return function(){t.deleteBuffer(i);t.deleteBuffer(s)}};Eu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=bu.fragment;n=bu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new xu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_lastPos);t.vertexAttribPointer(a.a_lastPos,2,Ya.FLOAT,false,28,0);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,28,8);t.enableVertexAttribArray(a.a_nextPos);t.vertexAttribPointer(a.a_nextPos,2,Ya.FLOAT,false,28,16);t.enableVertexAttribArray(a.a_direction);t.vertexAttribPointer(a.a_direction,1,Ya.FLOAT,false,28,24);t.uniform2fv(a.u_size,s);t.uniform1f(a.u_pixelRatio,e);return a};Eu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_lastPos);t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_nextPos);t.disableVertexAttribArray(i.a_direction)};Eu.prototype.drawReplay=function(t,i,s,e){var r=t.getParameter(t.DEPTH_FUNC);var n=t.getParameter(t.DEPTH_WRITEMASK);if(!e){t.enable(t.DEPTH_TEST);t.depthMask(true);t.depthFunc(t.NOTEQUAL)}if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var h,a,o,f;o=this.startIndices[this.startIndices.length-1];for(h=this.styleIndices_.length-1;h>=0;--h){a=this.styleIndices_[h];f=this.styles_[h];this.setStrokeStyle_(t,f[0],f[1],f[2]);this.drawElements(t,i,a,o);t.clear(t.DEPTH_BUFFER_BIT);o=a}}if(!e){t.disable(t.DEPTH_TEST);t.clear(t.DEPTH_BUFFER_BIT);t.depthMask(n);t.depthFunc(r)}};Eu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setStrokeStyle_(t,h[0],h[1],h[2]);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}r=n=a}};Eu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setStrokeStyle_(t,o[0],o[1],o[2]);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};Eu.prototype.setStrokeStyle_=function(t,i,s,e){t.uniform4fv(this.defaultLocations_.u_color,i);t.uniform1f(this.defaultLocations_.u_lineWidth,s);t.uniform1f(this.defaultLocations_.u_miterLimit,e)};Eu.prototype.setFillStrokeStyle=function(t,i){var s=i.getLineCap();this.state_.lineCap=s!==undefined?s:cu.defaultLineCap;var e=i.getLineDash();this.state_.lineDash=e?e:cu.defaultLineDash;var r=i.getLineDashOffset();this.state_.lineDashOffset=r?r:cu.defaultLineDashOffset;var n=i.getLineJoin();this.state_.lineJoin=n!==undefined?n:cu.defaultLineJoin;var h=i.getColor();if(!(h instanceof CanvasGradient)&&!(h instanceof CanvasPattern)){h=Mf.asArray(h).map((function(t,i){return i!=3?t/255:t}))||cu.defaultStrokeStyle}else{h=cu.defaultStrokeStyle}var a=i.getWidth();a=a!==undefined?a:cu.defaultLineWidth;var o=i.getMiterLimit();o=o!==undefined?o:cu.defaultMiterLimit;if(!this.state_.strokeColor||!pa.equals(this.state_.strokeColor,h)||this.state_.lineWidth!==a||this.state_.miterLimit!==o){this.state_.changed=true;this.state_.strokeColor=h;this.state_.lineWidth=a;this.state_.miterLimit=o;this.styles_.push([h,a,o])}};Eu.Instruction_={ROUND:2,BEGIN_LINE:3,END_LINE:5,BEGIN_LINE_CAP:7,END_LINE_CAP:11,BEVEL_FIRST:13,BEVEL_SECOND:17,MITER_BOTTOM:19,MITER_TOP:23};var Su={};Su.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");Su.vertex=new ou(ta.DEBUG_WEBGL?"\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n":"attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}");var Gu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"b");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"c");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"d");this.u_color=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_color":"e");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"f");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"a")};var Pu=function(t){var i=t||{};this.color_=i.color!==undefined?i.color:null;this.lineCap_=i.lineCap;this.lineDash_=i.lineDash!==undefined?i.lineDash:null;this.lineDashOffset_=i.lineDashOffset;this.lineJoin_=i.lineJoin;this.miterLimit_=i.miterLimit;this.width_=i.width;this.checksum_=undefined};Pu.prototype.clone=function(){var t=this.getColor();return new Pu({color:t&&t.slice?t.slice():t||undefined,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():undefined,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})};Pu.prototype.getColor=function(){return this.color_};Pu.prototype.getLineCap=function(){return this.lineCap_};Pu.prototype.getLineDash=function(){return this.lineDash_};Pu.prototype.getLineDashOffset=function(){return this.lineDashOffset_};Pu.prototype.getLineJoin=function(){return this.lineJoin_};Pu.prototype.getMiterLimit=function(){return this.miterLimit_};Pu.prototype.getWidth=function(){return this.width_};Pu.prototype.setColor=function(t){this.color_=t;this.checksum_=undefined};Pu.prototype.setLineCap=function(t){this.lineCap_=t;this.checksum_=undefined};Pu.prototype.setLineDash=function(t){this.lineDash_=t;this.checksum_=undefined};Pu.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t;this.checksum_=undefined};Pu.prototype.setLineJoin=function(t){this.lineJoin_=t;this.checksum_=undefined};Pu.prototype.setMiterLimit=function(t){this.miterLimit_=t;this.checksum_=undefined};Pu.prototype.setWidth=function(t){this.width_=t;this.checksum_=undefined};Pu.prototype.getChecksum=function(){if(this.checksum_===undefined){this.checksum_="s";if(this.color_){if(typeof this.color_==="string"){this.checksum_+=this.color_}else{this.checksum_+=ta.getUid(this.color_).toString()}}else{this.checksum_+="-"}this.checksum_+=","+(this.lineCap_!==undefined?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(this.lineDashOffset_!==undefined?this.lineDashOffset_:"-")+","+(this.lineJoin_!==undefined?this.lineJoin_:"-")+","+(this.miterLimit_!==undefined?this.miterLimit_.toString():"-")+","+(this.width_!==undefined?this.width_.toString():"-")}return this.checksum_};var ku=function(t){this.first_=undefined;this.last_=undefined;this.head_=undefined;this.circular_=t===undefined?true:t;this.length_=0};ku.prototype.insertItem=function(t){var i={prev:undefined,next:undefined,data:t};var s=this.head_;if(!s){this.first_=i;this.last_=i;if(this.circular_){i.next=i;i.prev=i}}else{var e=s.next;i.prev=s;i.next=e;s.next=i;if(e){e.prev=i}if(s===this.last_){this.last_=i}}this.head_=i;this.length_++};ku.prototype.removeItem=function(){var t=this.head_;if(t){var i=t.next;var s=t.prev;if(i){i.prev=s}if(s){s.next=i}this.head_=i||s;if(this.first_===this.last_){this.head_=undefined;this.first_=undefined;this.last_=undefined}else if(this.first_===t){this.first_=this.head_}else if(this.last_===t){this.last_=s?this.head_.prev:this.head_}this.length_--}};ku.prototype.firstItem=function(){this.head_=this.first_;if(this.head_){return this.head_.data}return undefined};ku.prototype.lastItem=function(){this.head_=this.last_;if(this.head_){return this.head_.data}return undefined};ku.prototype.nextItem=function(){if(this.head_&&this.head_.next){this.head_=this.head_.next;return this.head_.data}return undefined};ku.prototype.getNextItem=function(){if(this.head_&&this.head_.next){return this.head_.next.data}return undefined};ku.prototype.prevItem=function(){if(this.head_&&this.head_.prev){this.head_=this.head_.prev;return this.head_.data}return undefined};ku.prototype.getPrevItem=function(){if(this.head_&&this.head_.prev){return this.head_.prev.data}return undefined};ku.prototype.getCurrItem=function(){if(this.head_){return this.head_.data}return undefined};ku.prototype.setFirstItem=function(){if(this.circular_&&this.head_){this.first_=this.head_;this.last_=this.head_.prev}};ku.prototype.concat=function(t){if(t.head_){if(this.head_){var i=this.head_.next;this.head_.next=t.first_;t.first_.prev=this.head_;i.prev=t.last_;t.last_.next=i;this.length_+=t.length_}else{this.head_=t.head_;this.first_=t.first_;this.last_=t.last_;this.length_=t.length_}t.head_=undefined;t.first_=undefined;t.last_=undefined;t.length_=0}};ku.prototype.getLength=function(){return this.length_};var Nu=function(t){this.rbush_=jf(t);this.items_={}};Nu.prototype.insert=function(t,i){var s={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:i};this.rbush_.insert(s);this.items_[ta.getUid(i)]=s};Nu.prototype.load=function(t,i){var s=new Array(i.length);for(var e=0,r=i.length;e<r;e++){var n=t[e];var h=i[e];var a={minX:n[0],minY:n[1],maxX:n[2],maxY:n[3],value:h};s[e]=a;this.items_[ta.getUid(h)]=a}this.rbush_.load(s)};Nu.prototype.remove=function(t){var i=ta.getUid(t);var s=this.items_[i];delete this.items_[i];return this.rbush_.remove(s)!==null};Nu.prototype.update=function(t,i){var s=this.items_[ta.getUid(i)];var e=[s.minX,s.minY,s.maxX,s.maxY];if(!Ma.equals(e,t)){this.remove(i);this.insert(t,i)}};Nu.prototype.getAll=function(){var t=this.rbush_.all();return t.map((function(t){return t.value}))};Nu.prototype.getInExtent=function(t){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};var s=this.rbush_.search(i);return s.map((function(t){return t.value}))};Nu.prototype.forEach=function(t,i){return this.forEach_(this.getAll(),t,i)};Nu.prototype.forEachInExtent=function(t,i,s){return this.forEach_(this.getInExtent(t),i,s)};Nu.prototype.forEach_=function(t,i,s){var e;for(var r=0,n=t.length;r<n;r++){e=i.call(s,t[r]);if(e){return e}}return e};Nu.prototype.isEmpty=function(){return ea.isEmpty(this.items_)};Nu.prototype.clear=function(){this.rbush_.clear();this.items_={}};Nu.prototype.getExtent=function(t){var i=this.rbush_.data;return Ma.createOrUpdate(i.minX,i.minY,i.maxX,i.maxY,t)};Nu.prototype.concat=function(t){this.rbush_.load(t.rbush_.all());for(var i in t.items_){this.items_[i|0]=t.items_[i|0]}};var Iu=function(t,i){vu.call(this,t,i);this.lineStringReplay=new Eu(t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={fillColor:null,changed:false}};ta.inherits(Iu,vu);Iu.prototype.drawCoordinates_=function(t,i,s){var e=new ku;var r=new Nu;this.processFlatCoordinates_(t,s,e,r,true);var n=this.getMaxCoords_(e);if(i.length){var h,a;var o=[];for(h=0,a=i.length;h<a;++h){var f={list:new ku,maxCoords:undefined,rtree:new Nu};o.push(f);this.processFlatCoordinates_(i[h],s,f.list,f.rtree,false);this.classifyPoints_(f.list,f.rtree,true);f.maxCoords=this.getMaxCoords_(f.list)}o.sort((function(t,i){return i.maxCoords[0]===t.maxCoords[0]?t.maxCoords[1]-i.maxCoords[1]:i.maxCoords[0]-t.maxCoords[0]}));for(h=0;h<o.length;++h){var u=o[h].list;var l=u.firstItem();var v=l;var c;do{if(this.getIntersections_(v,r).length){c=true;break}v=u.nextItem()}while(l!==v);if(!c){if(this.bridgeHole_(u,o[h].maxCoords[0],e,n[0],r)){r.concat(o[h].rtree);this.classifyPoints_(e,r,false)}}}}else{this.classifyPoints_(e,r,false)}this.triangulate_(e,r)};Iu.prototype.processFlatCoordinates_=function(t,i,s,e,r){var n=Ha.linearRingIsClockwise(t,0,t.length,i);var h,a;var o=this.vertices.length/2;var f;var u;var l;var v=[];var c=[];if(r===n){f=this.createPoint_(t[0],t[1],o++);u=f;for(h=i,a=t.length;h<a;h+=i){l=this.createPoint_(t[h],t[h+1],o++);c.push(this.insertItem_(u,l,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)]);u=l}c.push(this.insertItem_(l,f,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)])}else{var d=t.length-i;f=this.createPoint_(t[d],t[d+1],o++);u=f;for(h=d-i,a=0;h>=a;h-=i){l=this.createPoint_(t[h],t[h+1],o++);c.push(this.insertItem_(u,l,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)]);u=l}c.push(this.insertItem_(l,f,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)])}e.load(v,c)};Iu.prototype.getMaxCoords_=function(t){var i=t.firstItem();var s=i;var e=[s.p0.x,s.p0.y];do{s=t.nextItem();if(s.p0.x>e[0]){e=[s.p0.x,s.p0.y]}}while(s!==i);return e};Iu.prototype.classifyPoints_=function(t,i,s){var e=t.firstItem();var r=e;var n=t.nextItem();var h=false;do{var a=s?cu.triangleIsCounterClockwise(n.p1.x,n.p1.y,r.p1.x,r.p1.y,r.p0.x,r.p0.y):cu.triangleIsCounterClockwise(r.p0.x,r.p0.y,r.p1.x,r.p1.y,n.p1.x,n.p1.y);if(a===undefined){this.removeItem_(r,n,t,i);h=true;if(n===e){e=t.getNextItem()}n=r;t.prevItem()}else if(r.p1.reflex!==a){r.p1.reflex=a;h=true}r=n;n=t.nextItem()}while(r!==e);return h};Iu.prototype.bridgeHole_=function(t,i,s,e,r){var n=t.firstItem();while(n.p1.x!==i){n=t.nextItem()}var h=n.p1;var a={x:e,y:h.y,i:-1};var o=Infinity;var f,u,l;var v;var c=this.getIntersections_({p0:h,p1:a},r,true);for(f=0,u=c.length;f<u;++f){var d=c[f];var m=this.calculateIntersection_(h,a,d.p0,d.p1,true);var p=Math.abs(h.x-m[0]);if(p<o&&cu.triangleIsCounterClockwise(h.x,h.y,d.p0.x,d.p0.y,d.p1.x,d.p1.y)!==undefined){o=p;v={x:m[0],y:m[1],i:-1};n=d}}if(o===Infinity){return false}l=n.p1;if(o>0){var _=this.getPointsInTriangle_(h,v,n.p1,r);if(_.length){var g=Infinity;for(f=0,u=_.length;f<u;++f){var M=_[f];var z=Math.atan2(h.y-M.y,a.x-M.x);if(z<g||z===g&&M.x<l.x){g=z;l=M}}}}n=s.firstItem();while(n.p1.x!==l.x||n.p1.y!==l.y){n=s.nextItem()}var w={x:h.x,y:h.y,i:h.i,reflex:undefined};var y={x:n.p1.x,y:n.p1.y,i:n.p1.i,reflex:undefined};t.getNextItem().p0=w;this.insertItem_(h,n.p1,t,r);this.insertItem_(y,w,t,r);n.p1=y;t.setFirstItem();s.concat(t);return true};Iu.prototype.triangulate_=function(t,i){var s=false;var e=this.isSimple_(t,i);while(t.getLength()>3){if(e){if(!this.clipEars_(t,i,e,s)){if(!this.classifyPoints_(t,i,s)){if(!this.resolveSelfIntersections_(t,i,true)){break}}}}else{if(!this.clipEars_(t,i,e,s)){if(!this.classifyPoints_(t,i,s)){if(!this.resolveSelfIntersections_(t,i)){e=this.isSimple_(t,i);if(!e){this.splitPolygon_(t,i);break}else{s=!this.isClockwise_(t);this.classifyPoints_(t,i,s)}}}}}}if(t.getLength()===3){var r=this.indices.length;this.indices[r++]=t.getPrevItem().p0.i;this.indices[r++]=t.getCurrItem().p0.i;this.indices[r++]=t.getNextItem().p0.i}};Iu.prototype.clipEars_=function(t,i,s,e){var r=this.indices.length;var n=t.firstItem();var h=t.getPrevItem();var a=n;var o=t.nextItem();var f=t.getNextItem();var u,l,v;var c=false;do{u=a.p0;l=a.p1;v=o.p1;if(l.reflex===false){var d;if(s){d=this.getPointsInTriangle_(u,l,v,i,true).length===0}else{d=e?this.diagonalIsInside_(f.p1,v,l,u,h.p0):this.diagonalIsInside_(h.p0,u,l,v,f.p1)}if((s||this.getIntersections_({p0:u,p1:v},i).length===0)&&d){if(s||u.reflex===false||v.reflex===false||Ha.linearRingIsClockwise([h.p0.x,h.p0.y,u.x,u.y,l.x,l.y,v.x,v.y,f.p1.x,f.p1.y],0,10,2)===!e){this.indices[r++]=u.i;this.indices[r++]=l.i;this.indices[r++]=v.i;this.removeItem_(a,o,t,i);if(o===n){n=f}c=true}}}h=t.getPrevItem();a=t.getCurrItem();o=t.nextItem();f=t.getNextItem()}while(a!==n&&t.getLength()>3);return c};Iu.prototype.resolveSelfIntersections_=function(t,i,s){var e=t.firstItem();t.nextItem();var r=e;var n=t.nextItem();var h=false;do{var a=this.calculateIntersection_(r.p0,r.p1,n.p0,n.p1,s);if(a){var o=false;var f=this.vertices.length;var u=this.indices.length;var l=f/2;var v=t.prevItem();t.removeItem();i.remove(v);o=v===e;var c;if(s){if(a[0]===r.p0.x&&a[1]===r.p0.y){t.prevItem();c=r.p0;n.p0=c;i.remove(r);o=o||r===e}else{c=n.p1;r.p1=c;i.remove(n);o=o||n===e}t.removeItem()}else{c=this.createPoint_(a[0],a[1],l);r.p1=c;n.p0=c;i.update([Math.min(r.p0.x,r.p1.x),Math.min(r.p0.y,r.p1.y),Math.max(r.p0.x,r.p1.x),Math.max(r.p0.y,r.p1.y)],r);i.update([Math.min(n.p0.x,n.p1.x),Math.min(n.p0.y,n.p1.y),Math.max(n.p0.x,n.p1.x),Math.max(n.p0.y,n.p1.y)],n)}this.indices[u++]=v.p0.i;this.indices[u++]=v.p1.i;this.indices[u++]=c.i;h=true;if(o){break}}r=t.getPrevItem();n=t.nextItem()}while(r!==e);return h};Iu.prototype.isSimple_=function(t,i){var s=t.firstItem();var e=s;do{if(this.getIntersections_(e,i).length){return false}e=t.nextItem()}while(e!==s);return true};Iu.prototype.isClockwise_=function(t){var i=t.getLength()*2;var s=new Array(i);var e=t.firstItem();var r=e;var n=0;do{s[n++]=r.p0.x;s[n++]=r.p0.y;r=t.nextItem()}while(r!==e);return Ha.linearRingIsClockwise(s,0,i,2)};Iu.prototype.splitPolygon_=function(t,i){var s=t.firstItem();var e=s;do{var r=this.getIntersections_(e,i);if(r.length){var n=r[0];var h=this.vertices.length/2;var a=this.calculateIntersection_(e.p0,e.p1,n.p0,n.p1);var o=this.createPoint_(a[0],a[1],h);var f=new ku;var u=new Nu;this.insertItem_(o,e.p1,f,u);e.p1=o;i.update([Math.min(e.p0.x,o.x),Math.min(e.p0.y,o.y),Math.max(e.p0.x,o.x),Math.max(e.p0.y,o.y)],e);var l=t.nextItem();while(l!==n){this.insertItem_(l.p0,l.p1,f,u);i.remove(l);t.removeItem();l=t.getCurrItem()}this.insertItem_(n.p0,o,f,u);n.p0=o;i.update([Math.min(n.p1.x,o.x),Math.min(n.p1.y,o.y),Math.max(n.p1.x,o.x),Math.max(n.p1.y,o.y)],n);this.classifyPoints_(t,i,false);this.triangulate_(t,i);this.classifyPoints_(f,u,false);this.triangulate_(f,u);break}e=t.nextItem()}while(e!==s)};Iu.prototype.createPoint_=function(t,i,s){var e=this.vertices.length;this.vertices[e++]=t;this.vertices[e++]=i;var r={x:t,y:i,i:s,reflex:undefined};return r};Iu.prototype.insertItem_=function(t,i,s,e){var r={p0:t,p1:i};s.insertItem(r);if(e){e.insert([Math.min(t.x,i.x),Math.min(t.y,i.y),Math.max(t.x,i.x),Math.max(t.y,i.y)],r)}return r};Iu.prototype.removeItem_=function(t,i,s,e){if(s.getCurrItem()===i){s.removeItem();t.p1=i.p1;e.remove(i);e.update([Math.min(t.p0.x,t.p1.x),Math.min(t.p0.y,t.p1.y),Math.max(t.p0.x,t.p1.x),Math.max(t.p0.y,t.p1.y)],t)}};Iu.prototype.getPointsInTriangle_=function(t,i,s,e,r){var n,h,a,o;var f=[];var u=e.getInExtent([Math.min(t.x,i.x,s.x),Math.min(t.y,i.y,s.y),Math.max(t.x,i.x,s.x),Math.max(t.y,i.y,s.y)]);for(n=0,h=u.length;n<h;++n){for(a in u[n]){o=u[n][a];if(typeof o==="object"&&(!r||o.reflex)){if((o.x!==t.x||o.y!==t.y)&&(o.x!==i.x||o.y!==i.y)&&(o.x!==s.x||o.y!==s.y)&&f.indexOf(o)===-1&&ja.linearRingContainsXY([t.x,t.y,i.x,i.y,s.x,s.y],0,6,2,o.x,o.y)){f.push(o)}}}}return f};Iu.prototype.getIntersections_=function(t,i,s){var e=t.p0;var r=t.p1;var n=i.getInExtent([Math.min(e.x,r.x),Math.min(e.y,r.y),Math.max(e.x,r.x),Math.max(e.y,r.y)]);var h=[];var a,o;for(a=0,o=n.length;a<o;++a){var f=n[a];if(t!==f&&(s||f.p0!==r||f.p1!==e)&&this.calculateIntersection_(e,r,f.p0,f.p1,s)){h.push(f)}}return h};Iu.prototype.calculateIntersection_=function(t,i,s,e,r){var n=(e.y-s.y)*(i.x-t.x)-(e.x-s.x)*(i.y-t.y);if(n!==0){var h=((e.x-s.x)*(t.y-s.y)-(e.y-s.y)*(t.x-s.x))/n;var a=((i.x-t.x)*(t.y-s.y)-(i.y-t.y)*(t.x-s.x))/n;if(!r&&h>cu.EPSILON&&h<1-cu.EPSILON&&a>cu.EPSILON&&a<1-cu.EPSILON||r&&h>=0&&h<=1&&a>=0&&a<=1){return[t.x+h*(i.x-t.x),t.y+h*(i.y-t.y)]}}return undefined};Iu.prototype.diagonalIsInside_=function(t,i,s,e,r){if(i.reflex===undefined||e.reflex===undefined){return false}var n=(s.x-e.x)*(i.y-e.y)>(s.y-e.y)*(i.x-e.x);var h=(r.x-e.x)*(i.y-e.y)<(r.y-e.y)*(i.x-e.x);var a=(t.x-i.x)*(e.y-i.y)>(t.y-i.y)*(e.x-i.x);var o=(s.x-i.x)*(e.y-i.y)<(s.y-i.y)*(e.x-i.x);var f=e.reflex?h||n:h&&n;var u=i.reflex?o||a:o&&a;return f&&u};Iu.prototype.drawMultiPolygon=function(t,i){var s=t.getEndss();var e=t.getStride();var r=this.indices.length;var n=this.lineStringReplay.getCurrentIndex();var h=t.getFlatCoordinates();var a,o,f,u;var l=0;for(a=0,o=s.length;a<o;++a){var v=s[a];if(v.length>0){var c=ya.translate(h,l,v[0],e,-this.origin[0],-this.origin[1]);if(c.length){var d=[];var m;for(f=1,u=v.length;f<u;++f){if(v[f]!==v[f-1]){m=ya.translate(h,v[f-1],v[f],e,-this.origin[0],-this.origin[1]);d.push(m)}}this.lineStringReplay.drawPolygonCoordinates(c,d,e);this.drawCoordinates_(c,d,e)}}l=v[v.length-1]}if(this.indices.length>r){this.startIndices.push(r);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(r);this.state_.changed=false}}if(this.lineStringReplay.getCurrentIndex()>n){this.lineStringReplay.setPolygonStyle(i,n)}};Iu.prototype.drawPolygon=function(t,i){var s=t.getEnds();var e=t.getStride();if(s.length>0){var r=t.getFlatCoordinates().map(Number);var n=ya.translate(r,0,s[0],e,-this.origin[0],-this.origin[1]);if(n.length){var h=[];var a,o,f;for(a=1,o=s.length;a<o;++a){if(s[a]!==s[a-1]){f=ya.translate(r,s[a-1],s[a],e,-this.origin[0],-this.origin[1]);h.push(f)}}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.lineStringReplay.setPolygonStyle(i);this.lineStringReplay.drawPolygonCoordinates(n,h,e);this.drawCoordinates_(n,h,e)}}};Iu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);this.lineStringReplay.finish(t);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};Iu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;var e=this.lineStringReplay.getDeleteResourcesFunction(t);return function(){t.deleteBuffer(i);t.deleteBuffer(s);e()}};Iu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=Su.fragment;n=Su.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new Gu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,8,0);return a};Iu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position)};Iu.prototype.drawReplay=function(t,i,s,e){var r=t.getParameter(t.DEPTH_FUNC);var n=t.getParameter(t.DEPTH_WRITEMASK);if(!e){t.enable(t.DEPTH_TEST);t.depthMask(true);t.depthFunc(t.NOTEQUAL)}if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var h,a,o,f;o=this.startIndices[this.startIndices.length-1];for(h=this.styleIndices_.length-1;h>=0;--h){a=this.styleIndices_[h];f=this.styles_[h];this.setFillStyle_(t,f);this.drawElements(t,i,a,o);o=a}}if(!e){t.disable(t.DEPTH_TEST);t.clear(t.DEPTH_BUFFER_BIT);t.depthMask(n);t.depthFunc(r)}};Iu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setFillStyle_(t,o);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};Iu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setFillStyle_(t,h);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}r=n=a}};Iu.prototype.setFillStyle_=function(t,i){t.uniform4fv(this.defaultLocations_.u_color,i)};Iu.prototype.setFillStrokeStyle=function(t,i){var s=t?t.getColor():[0,0,0,0];if(!(s instanceof CanvasGradient)&&!(s instanceof CanvasPattern)){s=Mf.asArray(s).map((function(t,i){return i!=3?t/255:t}))||cu.defaultFillStyle}else{s=cu.defaultFillStyle}if(!this.state_.fillColor||!pa.equals(s,this.state_.fillColor)){this.state_.fillColor=s;this.state_.changed=true;this.styles_.push(s)}if(i){this.lineStringReplay.setFillStrokeStyle(null,i)}else{var e=new Pu({color:[0,0,0,0]});this.lineStringReplay.setFillStrokeStyle(null,e)}};var Cu=function(t,i){this.space_=i;this.emptyBlocks_=[{x:0,y:0,width:t,height:t}];this.entries_={};this.context_=Po.createCanvasContext2D(t,t);this.canvas_=this.context_.canvas};Cu.prototype.get=function(t){return this.entries_[t]||null};Cu.prototype.add=function(t,i,s,e,r){var n,h,a;for(h=0,a=this.emptyBlocks_.length;h<a;++h){n=this.emptyBlocks_[h];if(n.width>=i+this.space_&&n.height>=s+this.space_){var o={offsetX:n.x+this.space_,offsetY:n.y+this.space_,image:this.canvas_};this.entries_[t]=o;e.call(r,this.context_,n.x+this.space_,n.y+this.space_);this.split_(h,n,i+this.space_,s+this.space_);return o}}return null};Cu.prototype.split_=function(t,i,s,e){var r=i.width-s;var n=i.height-e;var h;var a;if(r>n){h={x:i.x+s,y:i.y,width:i.width-s,height:i.height};a={x:i.x,y:i.y+e,width:s,height:i.height-e};this.updateBlocks_(t,h,a)}else{h={x:i.x+s,y:i.y,width:i.width-s,height:e};a={x:i.x,y:i.y+e,width:i.width,height:i.height-e};this.updateBlocks_(t,h,a)}};Cu.prototype.updateBlocks_=function(t,i,s){var e=[t,1];if(i.width>0&&i.height>0){e.push(i)}if(s.width>0&&s.height>0){e.push(s)}this.emptyBlocks_.splice.apply(this.emptyBlocks_,e)};var Au=function(t){var i=t||{};this.currentSize_=i.initialSize!==undefined?i.initialSize:ta.INITIAL_ATLAS_SIZE;this.maxSize_=i.maxSize!==undefined?i.maxSize:ta.MAX_ATLAS_SIZE!=-1?ta.MAX_ATLAS_SIZE:ta.WEBGL_MAX_TEXTURE_SIZE!==undefined?ta.WEBGL_MAX_TEXTURE_SIZE:2048;this.space_=i.space!==undefined?i.space:1;this.atlases_=[new Cu(this.currentSize_,this.space_)];this.currentHitSize_=this.currentSize_;this.hitAtlases_=[new Cu(this.currentHitSize_,this.space_)]};Au.prototype.getInfo=function(t){var i=this.getInfo_(this.atlases_,t);if(!i){return null}var s=this.getInfo_(this.hitAtlases_,t);return this.mergeInfos_(i,s)};Au.prototype.getInfo_=function(t,i){var s,e,r,n;for(r=0,n=t.length;r<n;++r){s=t[r];e=s.get(i);if(e){return e}}return null};Au.prototype.mergeInfos_=function(t,i){return{offsetX:t.offsetX,offsetY:t.offsetY,image:t.image,hitImage:i.image}};Au.prototype.add=function(t,i,s,e,r,n){if(i+this.space_>this.maxSize_||s+this.space_>this.maxSize_){return null}var h=this.add_(false,t,i,s,e,n);if(!h){return null}var a=r!==undefined?r:ta.nullFunction;var o=this.add_(true,t,i,s,a,n);return this.mergeInfos_(h,o)};Au.prototype.add_=function(t,i,s,e,r,n){var h=t?this.hitAtlases_:this.atlases_;var a,o,f,u;for(f=0,u=h.length;f<u;++f){a=h[f];o=a.add(i,s,e,r,n);if(o){return o}else if(!o&&f===u-1){var l;if(t){l=Math.min(this.currentHitSize_*2,this.maxSize_);this.currentHitSize_=l}else{l=Math.min(this.currentSize_*2,this.maxSize_);this.currentSize_=l}a=new Cu(l,this.space_);h.push(a);++u}}return null};var Ru=function(t,i){zu.call(this,t,i);this.images_=[];this.textures_=[];this.measureCanvas_=Po.createCanvasContext2D(0,0).canvas;this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:0,miterLimit:undefined,fillColor:null,font:undefined,scale:undefined};this.text_="";this.textAlign_=undefined;this.textBaseline_=undefined;this.offsetX_=undefined;this.offsetY_=undefined;this.atlases_={};this.currAtlas_=undefined;this.scale=1;this.opacity=1};ta.inherits(Ru,zu);Ru.prototype.drawText=function(t,i){if(this.text_){var s=null;var e=0;var r=2;var n=2;switch(t.getType()){case da.POINT:case da.MULTI_POINT:s=t.getFlatCoordinates();r=s.length;n=t.getStride();break;case da.CIRCLE:s=t.getCenter();break;case da.LINE_STRING:s=t.getFlatMidpoint();break;case da.MULTI_LINE_STRING:s=t.getFlatMidpoints();r=s.length;break;case da.POLYGON:s=t.getFlatInteriorPoint();break;case da.MULTI_POLYGON:s=t.getFlatInteriorPoints();r=s.length;break}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var h=this.currAtlas_;var a=this.text_.split("\n");var o=this.getTextSize_(a);var f,u,l,v,c,d,m,p;var _=Math.round(o[0]*this.textAlign_-this.offsetX_);var g=Math.round(o[1]*this.textBaseline_-this.offsetY_);var M=this.state_.lineWidth/2*this.state_.scale;for(f=0,u=a.length;f<u;++f){c=0;d=h.height*f;m=a[f].split("");for(l=0,v=m.length;l<v;++l){p=h.atlas.getInfo(m[l]);if(p){var z=p.image;this.anchorX=_-c;this.anchorY=g-d;this.originX=l===0?p.offsetX-M:p.offsetX;this.originY=p.offsetY;this.height=h.height;this.width=l===0||l===m.length-1?h.width[m[l]]+M:h.width[m[l]];this.imageHeight=z.height;this.imageWidth=z.width;var w;if(this.images_.length===0){this.images_.push(z)}else{w=this.images_[this.images_.length-1];if(ta.getUid(w)!=ta.getUid(z)){this.groupIndices.push(this.indices.length);this.images_.push(z)}}this.drawText_(s,e,r,n)}c+=this.width}}}};Ru.prototype.getTextSize_=function(t){var i=this;var s=this.currAtlas_;var e=t.length*s.height;var r=t.map((function(t){var e=0;var r,n;for(r=0,n=t.length;r<n;++r){var h=t[r];if(!s.width[h]){i.addCharToAtlas_(h)}e+=s.width[h]?s.width[h]:0}return e})).reduce((function(t,i){return Math.max(t,i)}));return[r,e]};Ru.prototype.drawText_=function(t,i,s,e){var r,n;for(r=i,n=s;r<n;r+=e){this.drawCoordinates(t,i,s,e)}};Ru.prototype.addCharToAtlas_=function(t){if(t.length===1){var i=this.currAtlas_;var s=this.state_;var e=this.measureCanvas_.getContext("2d");e.font=s.font;var r=Math.ceil(e.measureText(t).width*s.scale);var n=i.atlas.add(t,r,i.height,(function(i,e,r){i.font=s.font;i.fillStyle=s.fillColor;i.strokeStyle=s.strokeColor;i.lineWidth=s.lineWidth;i.lineCap=s.lineCap;i.lineJoin=s.lineJoin;i.miterLimit=s.miterLimit;i.textAlign="left";i.textBaseline="top";if(Ja.CANVAS_LINE_DASH&&s.lineDash){i.setLineDash(s.lineDash);i.lineDashOffset=s.lineDashOffset}if(s.scale!==1){i.setTransform(s.scale,0,0,s.scale,0,0)}if(s.strokeColor){i.strokeText(t,e,r)}if(s.fillColor){i.fillText(t,e,r)}}));if(n){i.width[t]=r}}};Ru.prototype.finish=function(t){var i=t.getGL();this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices=this.groupIndices;this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);var s={};this.createTextures(this.textures_,this.images_,s,i);this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:0,miterLimit:undefined,fillColor:null,font:undefined,scale:undefined};this.text_="";this.textAlign_=undefined;this.textBaseline_=undefined;this.offsetX_=undefined;this.offsetY_=undefined;this.images_=null;this.atlases_={};this.currAtlas_=undefined;zu.prototype.finish.call(this,t)};Ru.prototype.setTextStyle=function(t){var i=this.state_;var s=t.getFill();var e=t.getStroke();if(!t||!t.getText()||!s&&!e){this.text_=""}else{if(!s){i.fillColor=null}else{var r=s.getColor();i.fillColor=zf.asColorLike(r?r:cu.defaultFillStyle)}if(!e){i.strokeColor=null;i.lineWidth=0}else{var n=e.getColor();i.strokeColor=zf.asColorLike(n?n:cu.defaultStrokeStyle);i.lineWidth=e.getWidth()||cu.defaultLineWidth;i.lineCap=e.getLineCap()||cu.defaultLineCap;i.lineDashOffset=e.getLineDashOffset()||cu.defaultLineDashOffset;i.lineJoin=e.getLineJoin()||cu.defaultLineJoin;i.miterLimit=e.getMiterLimit()||cu.defaultMiterLimit;var h=e.getLineDash();i.lineDash=h?h.slice():cu.defaultLineDash}i.font=t.getFont()||cu.defaultFont;i.scale=t.getScale()||1;this.text_=t.getText();var a=Xf.TEXT_ALIGN[t.getTextAlign()];var o=Xf.TEXT_ALIGN[t.getTextBaseline()];this.textAlign_=a===undefined?cu.defaultTextAlign:a;this.textBaseline_=o===undefined?cu.defaultTextBaseline:o;this.offsetX_=t.getOffsetX()||0;this.offsetY_=t.getOffsetY()||0;this.rotateWithView=!!t.getRotateWithView();this.rotation=t.getRotation()||0;this.currAtlas_=this.getAtlas_(i)}};Ru.prototype.getAtlas_=function(t){var i=[];var s;for(s in t){if(t[s]||t[s]===0){if(Array.isArray(t[s])){i=i.concat(t[s])}else{i.push(t[s])}}}var e=this.calculateHash_(i);if(!this.atlases_[e]){var r=this.measureCanvas_.getContext("2d");r.font=t.font;var n=Math.ceil((r.measureText("M").width*1.5+t.lineWidth/2)*t.scale);this.atlases_[e]={atlas:new Au({space:t.lineWidth+1}),width:{},height:n}}return this.atlases_[e]};Ru.prototype.calculateHash_=function(t){var i,s;var e="";for(i=0,s=t.length;i<s;++i){e+=t[i]}return e};Ru.prototype.getTextures=function(t){return this.textures_};Ru.prototype.getHitDetectionTextures=function(){return this.textures_};var Tu=function(t,i,s){Vf.call(this);this.maxExtent_=i;this.tolerance_=t;this.renderBuffer_=s;this.replaysByZIndex_={}};ta.inherits(Tu,Vf);Tu.prototype.addDeclutter=function(t,i){};Tu.prototype.getDeleteResourcesFunction=function(t){var i=[];var s;for(s in this.replaysByZIndex_){var e=this.replaysByZIndex_[s];var r;for(r in e){i.push(e[r].getDeleteResourcesFunction(t))}}return function(){var t=i.length;var s;for(var e=0;e<t;e++){s=i[e].apply(this,arguments)}return s}};Tu.prototype.finish=function(t){var i;for(i in this.replaysByZIndex_){var s=this.replaysByZIndex_[i];var e;for(e in s){s[e].finish(t)}}};Tu.prototype.getReplay=function(t,i){var s=t!==undefined?t.toString():"0";var e=this.replaysByZIndex_[s];if(e===undefined){e={};this.replaysByZIndex_[s]=e}var r=e[i];if(r===undefined){var n=Tu.BATCH_CONSTRUCTORS_[i];r=new n(this.tolerance_,this.maxExtent_);e[i]=r}return r};Tu.prototype.isEmpty=function(){return ea.isEmpty(this.replaysByZIndex_)};Tu.prototype.replay=function(t,i,s,e,r,n,h,a){var o=Object.keys(this.replaysByZIndex_).map(Number);o.sort(pa.numberSafeCompareFunction);var f,u,l,v,c,d;for(f=0,u=o.length;f<u;++f){c=this.replaysByZIndex_[o[f].toString()];for(l=0,v=Xf.ORDER.length;l<v;++l){d=c[Xf.ORDER[l]];if(d!==undefined){d.replay(t,i,s,e,r,n,h,a,undefined,false)}}}};Tu.prototype.replayHitDetection_=function(t,i,s,e,r,n,h,a,o,f,u){var l=Object.keys(this.replaysByZIndex_).map(Number);l.sort((function(t,i){return i-t}));var v,c,d,m,p,_;for(v=0,c=l.length;v<c;++v){m=this.replaysByZIndex_[l[v].toString()];for(d=Xf.ORDER.length-1;d>=0;--d){p=m[Xf.ORDER[d]];if(p!==undefined){_=p.replay(t,i,s,e,r,n,h,a,o,f,u);if(_){return _}}}}return undefined};Tu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h,a,o,f){var u=i.getGL();u.bindFramebuffer(u.FRAMEBUFFER,i.getHitDetectionFramebuffer());var l;if(this.renderBuffer_!==undefined){l=Ma.buffer(Ma.createOrUpdateFromCoordinate(t),e*this.renderBuffer_)}return this.replayHitDetection_(i,t,e,r,Tu.HIT_DETECTION_SIZE_,h,a,o,(function(t){var i=new Uint8Array(4);u.readPixels(0,0,1,1,u.RGBA,u.UNSIGNED_BYTE,i);if(i[3]>0){var s=f(t);if(s){return s}}}),true,l)};Tu.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r,n,h,a,o){var f=i.getGL();f.bindFramebuffer(f.FRAMEBUFFER,i.getHitDetectionFramebuffer());var u=this.replayHitDetection_(i,t,e,r,Tu.HIT_DETECTION_SIZE_,h,a,o,(function(t){var i=new Uint8Array(4);f.readPixels(0,0,1,1,f.RGBA,f.UNSIGNED_BYTE,i);return i[3]>0}),false);return u!==undefined};Tu.HIT_DETECTION_SIZE_=[1,1];Tu.BATCH_CONSTRUCTORS_={Circle:mu,Image:wu,LineString:Eu,Polygon:Iu,Text:Ru};var Ou=function(t,i,s,e,r,n,h){wf.call(this);this.context_=t;this.center_=i;this.extent_=n;this.pixelRatio_=h;this.size_=r;this.rotation_=e;this.resolution_=s;this.imageStyle_=null;this.fillStyle_=null;this.strokeStyle_=null;this.textStyle_=null};ta.inherits(Ou,wf);Ou.prototype.drawText_=function(t,i){var s=this.context_;var e=t.getReplay(0,Uf.TEXT);e.setTextStyle(this.textStyle_);e.drawText(i,null);e.finish(s);var r=1;var n={};var h;var a=false;e.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,r,n,h,a);e.getDeleteResourcesFunction(s)()};Ou.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke());this.setImageStyle(t.getImage());this.setTextStyle(t.getText())};Ou.prototype.drawGeometry=function(t){var i=t.getType();switch(i){case da.POINT:this.drawPoint(t,null);break;case da.LINE_STRING:this.drawLineString(t,null);break;case da.POLYGON:this.drawPolygon(t,null);break;case da.MULTI_POINT:this.drawMultiPoint(t,null);break;case da.MULTI_LINE_STRING:this.drawMultiLineString(t,null);break;case da.MULTI_POLYGON:this.drawMultiPolygon(t,null);break;case da.GEOMETRY_COLLECTION:this.drawGeometryCollection(t,null);break;case da.CIRCLE:this.drawCircle(t,null);break}};Ou.prototype.drawFeature=function(t,i){var s=i.getGeometryFunction()(t);if(!s||!Ma.intersects(this.extent_,s.getExtent())){return}this.setStyle(i);this.drawGeometry(s)};Ou.prototype.drawGeometryCollection=function(t,i){var s=t.getGeometriesArray();var e,r;for(e=0,r=s.length;e<r;++e){this.drawGeometry(s[e])}};Ou.prototype.drawPoint=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.IMAGE);r.setImageStyle(this.imageStyle_);r.drawPoint(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiPoint=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.IMAGE);r.setImageStyle(this.imageStyle_);r.drawMultiPoint(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawLineString=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_);r.drawLineString(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiLineString=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_);r.drawMultiLineString(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawPolygon=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawPolygon(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiPolygon=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawMultiPolygon(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawCircle=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.CIRCLE);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawCircle(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.setImageStyle=function(t){this.imageStyle_=t};Ou.prototype.setFillStrokeStyle=function(t,i){this.fillStyle_=t;this.strokeStyle_=i};Ou.prototype.setTextStyle=function(t){this.textStyle_=t};var Lu={};Lu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_texture, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n gl_FragColor.a = texColor.a * u_opacity;\n}\n":"precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}");Lu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}");var Fu=function(t,i){this.u_texCoordMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texCoordMatrix":"d");this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"e");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"f");this.u_texture=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texture":"g");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"b");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"c")};var Du=function(t,i){bf.call(this,i);this.mapRenderer=t;this.arrayBuffer_=new du([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.texture=null;this.framebuffer=null;this.framebufferDimension=undefined;this.texCoordMatrix=Ia.create();this.projectionMatrix=Ia.create();this.tmpMat4_=lu.create();this.defaultLocations_=null};ta.inherits(Du,bf);Du.prototype.bindFramebuffer=function(t,i){var s=this.mapRenderer.getGL();if(this.framebufferDimension===undefined||this.framebufferDimension!=i){var e=function(t,i,s){if(!t.isContextLost()){t.deleteFramebuffer(i);t.deleteTexture(s)}}.bind(null,s,this.framebuffer,this.texture);t.postRenderFunctions.push(e);var r=Mu.createEmptyTexture(s,i,i);var n=s.createFramebuffer();s.bindFramebuffer(Ya.FRAMEBUFFER,n);s.framebufferTexture2D(Ya.FRAMEBUFFER,Ya.COLOR_ATTACHMENT0,Ya.TEXTURE_2D,r,0);this.texture=r;this.framebuffer=n;this.framebufferDimension=i}else{s.bindFramebuffer(Ya.FRAMEBUFFER,this.framebuffer)}};Du.prototype.composeFrame=function(t,i,s){this.dispatchComposeEvent_(Wo.PRECOMPOSE,s,t);s.bindBuffer(Ya.ARRAY_BUFFER,this.arrayBuffer_);var e=s.getGL();var r=Lu.fragment;var n=Lu.vertex;var h=s.getProgram(r,n);var a;if(!this.defaultLocations_){a=new Fu(e,h);this.defaultLocations_=a}else{a=this.defaultLocations_}if(s.useProgram(h)){e.enableVertexAttribArray(a.a_position);e.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,16,0);e.enableVertexAttribArray(a.a_texCoord);e.vertexAttribPointer(a.a_texCoord,2,Ya.FLOAT,false,16,8);e.uniform1i(a.u_texture,0)}e.uniformMatrix4fv(a.u_texCoordMatrix,false,lu.fromTransform(this.tmpMat4_,this.getTexCoordMatrix()));e.uniformMatrix4fv(a.u_projectionMatrix,false,lu.fromTransform(this.tmpMat4_,this.getProjectionMatrix()));e.uniform1f(a.u_opacity,i.opacity);e.bindTexture(Ya.TEXTURE_2D,this.getTexture());e.drawArrays(Ya.TRIANGLE_STRIP,0,4);this.dispatchComposeEvent_(Wo.POSTCOMPOSE,s,t)};Du.prototype.dispatchComposeEvent_=function(t,i,s){var e=this.getLayer();if(e.hasListener(t)){var r=s.viewState;var n=r.resolution;var h=s.pixelRatio;var a=s.extent;var o=r.center;var f=r.rotation;var u=s.size;var l=new Ou(i,o,n,f,u,a,h);var v=new pf(t,l,s,null,i);e.dispatchEvent(v)}};Du.prototype.getTexCoordMatrix=function(){return this.texCoordMatrix};Du.prototype.getTexture=function(){return this.texture};Du.prototype.getProjectionMatrix=function(){return this.projectionMatrix};Du.prototype.handleWebGLContextLost=function(){this.texture=null;this.framebuffer=null;this.framebufferDimension=undefined};Du.prototype.prepareFrame=function(t,i,s){};Du.prototype.forEachLayerAtPixel=function(t,i,s,e){};var Wu=function(t,i){Du.call(this,t,i);this.image_=null;this.hitCanvasContext_=null;this.hitTransformationMatrix_=null};ta.inherits(Wu,Du);Wu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.IMAGE};Wu["create"]=function(t,i){return new Wu(t,i)};Wu.prototype.createTexture_=function(t){var i=t.getImage();var s=this.mapRenderer.getGL();return Mu.createTexture(s,i,Ya.CLAMP_TO_EDGE,Ya.CLAMP_TO_EDGE)};Wu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=this.getLayer();var h=n.getSource();var a=i.viewState.resolution;var o=i.viewState.rotation;var f=i.skippedFeatureUids;return h.forEachFeatureAtCoordinate(t,a,o,s,f,(function(t){return e.call(r,t,n)}))};Wu.prototype.prepareFrame=function(t,i,s){var e=this.mapRenderer.getGL();var r=t.pixelRatio;var n=t.viewState;var h=n.center;var a=n.resolution;var o=n.rotation;var f=this.image_;var u=this.texture;var l=this.getLayer();var v=l.getSource();var c=t.viewHints;var d=t.extent;if(i.extent!==undefined){d=Ma.getIntersection(d,i.extent)}if(!c[yo.ANIMATING]&&!c[yo.INTERACTING]&&!Ma.isEmpty(d)){var m=n.projection;if(!ta.ENABLE_RASTER_REPROJECTION){var p=v.getProjection();if(p){m=p}}var _=v.getImage(d,a,r,m);if(_){var g=this.loadImage(_);if(g){f=_;u=this.createTexture_(_);if(this.texture){var M=function(t,i){if(!t.isContextLost()){t.deleteTexture(i)}}.bind(null,e,this.texture);t.postRenderFunctions.push(M)}}}}if(f){var z=this.mapRenderer.getContext().getCanvas();this.updateProjectionMatrix_(z.width,z.height,r,h,a,o,f.getExtent());this.hitTransformationMatrix_=null;var w=this.texCoordMatrix;Ia.reset(w);Ia.scale(w,1,-1);Ia.translate(w,0,-1);this.image_=f;this.texture=u;this.updateLogos(t,v)}return!!f};Wu.prototype.updateProjectionMatrix_=function(t,i,s,e,r,n,h){var a=t*r;var o=i*r;var f=this.projectionMatrix;Ia.reset(f);Ia.scale(f,s*2/a,s*2/o);Ia.rotate(f,-n);Ia.translate(f,h[0]-e[0],h[1]-e[1]);Ia.scale(f,(h[2]-h[0])/2,(h[3]-h[1])/2);Ia.translate(f,1,1)};Wu.prototype.hasFeatureAtCoordinate=function(t,i){var s=this.forEachFeatureAtCoordinate(t,i,0,wa.TRUE,this);return s!==undefined};Wu.prototype.forEachLayerAtPixel=function(t,i,s,e){if(!this.image_||!this.image_.getImage()){return undefined}if(this.getLayer().getSource().forEachFeatureAtCoordinate!==ta.nullFunction){var r=Ia.apply(i.pixelToCoordinateTransform,t.slice());var n=this.forEachFeatureAtCoordinate(r,i,0,wa.TRUE,this);if(n){return s.call(e,this.getLayer(),null)}else{return undefined}}else{var h=[this.image_.getImage().width,this.image_.getImage().height];if(!this.hitTransformationMatrix_){this.hitTransformationMatrix_=this.getHitTransformationMatrix_(i.size,h)}var a=Ia.apply(this.hitTransformationMatrix_,t.slice());if(a[0]<0||a[0]>h[0]||a[1]<0||a[1]>h[1]){return undefined}if(!this.hitCanvasContext_){this.hitCanvasContext_=Po.createCanvasContext2D(1,1)}this.hitCanvasContext_.clearRect(0,0,1,1);this.hitCanvasContext_.drawImage(this.image_.getImage(),a[0],a[1],1,1,0,0,1,1);var o=this.hitCanvasContext_.getImageData(0,0,1,1).data;if(o[3]>0){return s.call(e,this.getLayer(),o)}else{return undefined}}};Wu.prototype.getHitTransformationMatrix_=function(t,i){var s=Ia.create();Ia.translate(s,-1,-1);Ia.scale(s,2/t[0],2/t[1]);Ia.translate(s,0,t[1]);Ia.scale(s,1,-1);var e=Ia.invert(this.projectionMatrix.slice());var r=Ia.create();Ia.translate(r,0,i[1]);Ia.scale(r,1,-1);Ia.scale(r,i[0]/2,i[1]/2);Ia.translate(r,1,1);Ia.multiply(r,e);Ia.multiply(r,s);return r};var ju=function(t,i){kf.call(this,t,i);this.canvas_=document.createElement("CANVAS");this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=Do.CLASS_UNSELECTABLE;t.insertBefore(this.canvas_,t.childNodes[0]||null);this.clipTileCanvasWidth_=0;this.clipTileCanvasHeight_=0;this.clipTileContext_=Po.createCanvasContext2D();this.renderedVisible_=true;this.gl_=Ya.getContext(this.canvas_,{antialias:true,depth:true,failIfMajorPerformanceCaveat:true,preserveDrawingBuffer:false,stencil:true});this.context_=new Mu(this.canvas_,this.gl_);ra.listen(this.canvas_,gu.LOST,this.handleWebGLContextLost,this);ra.listen(this.canvas_,gu.RESTORED,this.handleWebGLContextRestored,this);this.textureCache_=new _f;this.focus_=null;this.tileTextureQueue_=new _o(function(t){var i=t[1];var s=t[2];var e=i[0]-this.focus_[0];var r=i[1]-this.focus_[1];return 65536*Math.log(s)+Math.sqrt(e*e+r*r)/s}.bind(this),(function(t){return t[0].getKey()}));this.loadNextTileTexture_=function(t,i){if(!this.tileTextureQueue_.isEmpty()){this.tileTextureQueue_.reprioritize();var s=this.tileTextureQueue_.dequeue();var e=s[0];var r=s[3];var n=s[4];this.bindTileTexture(e,r,n,Ya.LINEAR,Ya.LINEAR)}return false}.bind(this);this.textureCacheFrameMarkerCount_=0;this.initializeGL_()};ta.inherits(ju,kf);ju["handles"]=function(t){return Ja.WEBGL&&t===To.WEBGL};ju["create"]=function(t,i){return new ju(t,i)};ju.prototype.bindTileTexture=function(t,i,s,e,r){var n=this.getGL();var h=t.getKey();if(this.textureCache_.containsKey(h)){var a=this.textureCache_.get(h);n.bindTexture(Ya.TEXTURE_2D,a.texture);if(a.magFilter!=e){n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MAG_FILTER,e);a.magFilter=e}if(a.minFilter!=r){n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MIN_FILTER,r);a.minFilter=r}}else{var o=n.createTexture();n.bindTexture(Ya.TEXTURE_2D,o);if(s>0){var f=this.clipTileContext_.canvas;var u=this.clipTileContext_;if(this.clipTileCanvasWidth_!==i[0]||this.clipTileCanvasHeight_!==i[1]){f.width=i[0];f.height=i[1];this.clipTileCanvasWidth_=i[0];this.clipTileCanvasHeight_=i[1]}else{u.clearRect(0,0,i[0],i[1])}u.drawImage(t.getImage(),s,s,i[0],i[1],0,0,i[0],i[1]);n.texImage2D(Ya.TEXTURE_2D,0,Ya.RGBA,Ya.RGBA,Ya.UNSIGNED_BYTE,f)}else{n.texImage2D(Ya.TEXTURE_2D,0,Ya.RGBA,Ya.RGBA,Ya.UNSIGNED_BYTE,t.getImage())}n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MAG_FILTER,e);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MIN_FILTER,r);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_S,Ya.CLAMP_TO_EDGE);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_T,Ya.CLAMP_TO_EDGE);this.textureCache_.set(h,{texture:o,magFilter:e,minFilter:r})}};ju.prototype.dispatchComposeEvent_=function(t,i){var s=this.getMap();if(s.hasListener(t)){var e=this.context_;var r=i.extent;var n=i.size;var h=i.viewState;var a=i.pixelRatio;var o=h.resolution;var f=h.center;var u=h.rotation;var l=new Ou(e,f,o,u,n,r,a);var v=new pf(t,l,i,null,e);s.dispatchEvent(v)}};ju.prototype.disposeInternal=function(){var t=this.getGL();if(!t.isContextLost()){this.textureCache_.forEach((function(i){if(i){t.deleteTexture(i.texture)}}))}this.context_.dispose();kf.prototype.disposeInternal.call(this)};ju.prototype.expireCache_=function(t,i){var s=this.getGL();var e;while(this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK){e=this.textureCache_.peekLast();if(!e){if(+this.textureCache_.peekLastKey()==i.index){break}else{--this.textureCacheFrameMarkerCount_}}else{s.deleteTexture(e.texture)}this.textureCache_.pop()}};ju.prototype.getContext=function(){return this.context_};ju.prototype.getGL=function(){return this.gl_};ju.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_};ju.prototype.getType=function(){return To.WEBGL};ju.prototype.handleWebGLContextLost=function(t){t.preventDefault();this.textureCache_.clear();this.textureCacheFrameMarkerCount_=0;var i=this.getLayerRenderers();for(var s in i){var e=i[s];e.handleWebGLContextLost()}};ju.prototype.handleWebGLContextRestored=function(){this.initializeGL_();this.getMap().render()};ju.prototype.initializeGL_=function(){var t=this.gl_;t.activeTexture(Ya.TEXTURE0);t.blendFuncSeparate(Ya.SRC_ALPHA,Ya.ONE_MINUS_SRC_ALPHA,Ya.ONE,Ya.ONE_MINUS_SRC_ALPHA);t.disable(Ya.CULL_FACE);t.disable(Ya.DEPTH_TEST);t.disable(Ya.SCISSOR_TEST);t.disable(Ya.STENCIL_TEST)};ju.prototype.isTileTextureLoaded=function(t){return this.textureCache_.containsKey(t.getKey())};ju.prototype.renderFrame=function(t){var i=this.getContext();var s=this.getGL();if(s.isContextLost()){return false}if(!t){if(this.renderedVisible_){this.canvas_.style.display="none";this.renderedVisible_=false}return false}this.focus_=t.focus;this.textureCache_.set((-t.index).toString(),null);++this.textureCacheFrameMarkerCount_;this.dispatchComposeEvent_(Wo.PRECOMPOSE,t);var e=[];var r=t.layerStatesArray;pa.stableSort(r,kf.sortByZIndex);var n=t.viewState.resolution;var h,a,o,f;for(h=0,a=r.length;h<a;++h){f=r[h];if(jo.visibleAtResolution(f,n)&&f.sourceState==Io.READY){o=this.getLayerRenderer(f.layer);if(o.prepareFrame(t,f,i)){e.push(f)}}}var u=t.size[0]*t.pixelRatio;var l=t.size[1]*t.pixelRatio;if(this.canvas_.width!=u||this.canvas_.height!=l){this.canvas_.width=u;this.canvas_.height=l}s.bindFramebuffer(Ya.FRAMEBUFFER,null);s.clearColor(0,0,0,0);s.clear(Ya.COLOR_BUFFER_BIT);s.enable(Ya.BLEND);s.viewport(0,0,this.canvas_.width,this.canvas_.height);for(h=0,a=e.length;h<a;++h){f=e[h];o=this.getLayerRenderer(f.layer);o.composeFrame(t,f,i)}if(!this.renderedVisible_){this.canvas_.style.display="";this.renderedVisible_=true}this.calculateMatrices2D(t);if(this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK){t.postRenderFunctions.push(this.expireCache_.bind(this))}if(!this.tileTextureQueue_.isEmpty()){t.postRenderFunctions.push(this.loadNextTileTexture_);t.animate=true}this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t);this.scheduleRemoveUnusedLayerRenderers(t);this.scheduleExpireIconCache(t)};ju.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){var a;if(this.getGL().isContextLost()){return false}var o=i.viewState;var f=i.layerStatesArray;var u=f.length;var l;for(l=u-1;l>=0;--l){var v=f[l];var c=v.layer;if(jo.visibleAtResolution(v,o.resolution)&&n.call(h,c)){var d=this.getLayerRenderer(c);a=d.forEachFeatureAtCoordinate(t,i,s,e,r);if(a){return a}}}return undefined};ju.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r){var n=false;if(this.getGL().isContextLost()){return false}var h=i.viewState;var a=i.layerStatesArray;var o=a.length;var f;for(f=o-1;f>=0;--f){var u=a[f];var l=u.layer;if(jo.visibleAtResolution(u,h.resolution)&&e.call(r,l)){var v=this.getLayerRenderer(l);n=v.hasFeatureAtCoordinate(t,i);if(n){return true}}}return n};ju.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){if(this.getGL().isContextLost()){return false}var h=i.viewState;var a;var o=i.layerStatesArray;var f=o.length;var u;for(u=f-1;u>=0;--u){var l=o[u];var v=l.layer;if(jo.visibleAtResolution(l,h.resolution)&&r.call(e,v)){var c=this.getLayerRenderer(v);a=c.forEachLayerAtPixel(t,i,s,e);if(a){return a}}}return undefined};var Vu={};Vu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n":"precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}");Vu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n v_texCoord = a_texCoord;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}");var Uu=function(t,i){this.u_tileOffset=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_tileOffset":"d");this.u_texture=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texture":"e");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"b");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"c")};var qu=function(t,i){Du.call(this,t,i);this.fragmentShader_=Vu.fragment;this.vertexShader_=Vu.vertex;this.locations_=null;this.renderArrayBuffer_=new du([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.renderedTileRange_=null;this.renderedFramebufferExtent_=null;this.renderedRevision_=-1;this.tmpSize_=[0,0]};ta.inherits(qu,Du);qu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.TILE};qu["create"]=function(t,i){return new qu(t,i)};qu.prototype.disposeInternal=function(){var t=this.mapRenderer.getContext();t.deleteBuffer(this.renderArrayBuffer_);Du.prototype.disposeInternal.call(this)};qu.prototype.createLoadedTileFinder=function(t,i,s){var e=this.mapRenderer;return function(r,n){function h(t){var i=e.isTileTextureLoaded(t);if(i){if(!s[r]){s[r]={}}s[r][t.tileCoord.toString()]=t}return i}return t.forEachLoadedTile(i,r,n,h)}};qu.prototype.handleWebGLContextLost=function(){Du.prototype.handleWebGLContextLost.call(this);this.locations_=null};qu.prototype.prepareFrame=function(t,i,s){var e=this.mapRenderer;var r=s.getGL();var n=t.viewState;var h=n.projection;var a=this.getLayer();var o=a.getSource();var f=o.getTileGridForProjection(h);var u=f.getZForResolution(n.resolution);var l=f.getResolution(u);var v=o.getTilePixelSize(u,t.pixelRatio,h);var c=v[0]/Oo.toSize(f.getTileSize(u),this.tmpSize_)[0];var d=l/c;var m=o.getTilePixelRatio(c)*o.getGutter(h);var p=n.center;var _=t.extent;var g=f.getTileRangeForExtentAndZ(_,u);var M;if(this.renderedTileRange_&&this.renderedTileRange_.equals(g)&&this.renderedRevision_==o.getRevision()){M=this.renderedFramebufferExtent_}else{var z=g.getSize();var w=Math.max(z[0]*v[0],z[1]*v[1]);var y=ca.roundUpToPowerOfTwo(w);var b=d*y;var x=f.getOrigin(u);var E=x[0]+g.minX*v[0]*d;var S=x[1]+g.minY*v[1]*d;M=[E,S,E+b,S+b];this.bindFramebuffer(t,y);r.viewport(0,0,y,y);r.clearColor(0,0,0,0);r.clear(Ya.COLOR_BUFFER_BIT);r.disable(Ya.BLEND);var G=s.getProgram(this.fragmentShader_,this.vertexShader_);s.useProgram(G);if(!this.locations_){this.locations_=new Uu(r,G)}s.bindBuffer(Ya.ARRAY_BUFFER,this.renderArrayBuffer_);r.enableVertexAttribArray(this.locations_.a_position);r.vertexAttribPointer(this.locations_.a_position,2,Ya.FLOAT,false,16,0);r.enableVertexAttribArray(this.locations_.a_texCoord);r.vertexAttribPointer(this.locations_.a_texCoord,2,Ya.FLOAT,false,16,8);r.uniform1i(this.locations_.u_texture,0);var P={};P[u]={};var k=this.createLoadedTileFinder(o,h,P);var N=a.getUseInterimTilesOnError();var I=true;var C=Ma.createEmpty();var A=new If(0,0,0,0);var R,T,O,L,F;var D,W,j;for(D=g.minX;D<=g.maxX;++D){for(W=g.minY;W<=g.maxY;++W){L=o.getTile(u,D,W,c,h);if(i.extent!==undefined){j=f.getTileCoordExtent(L.tileCoord,C);if(!Ma.intersects(j,i.extent)){continue}}F=L.getState();T=F==po.LOADED||F==po.EMPTY||F==po.ERROR&&!N;if(!T){L=L.getInterimTile()}F=L.getState();if(F==po.LOADED){if(e.isTileTextureLoaded(L)){P[u][L.tileCoord.toString()]=L;continue}}else if(F==po.EMPTY||F==po.ERROR&&!N){continue}I=false;O=f.forEachTileCoordParentTileRange(L.tileCoord,k,null,A,C);if(!O){R=f.getTileCoordChildTileRange(L.tileCoord,A,C);if(R){k(u+1,R)}}}}var V=Object.keys(P).map(Number);V.sort(pa.numberSafeCompareFunction);var U=new Float32Array(4);var q,B,H,X;for(q=0,B=V.length;q<B;++q){X=P[V[q]];for(H in X){L=X[H];j=f.getTileCoordExtent(L.tileCoord,C);U[0]=2*(j[2]-j[0])/b;U[1]=2*(j[3]-j[1])/b;U[2]=2*(j[0]-M[0])/b-1;U[3]=2*(j[1]-M[1])/b-1;r.uniform4fv(this.locations_.u_tileOffset,U);e.bindTileTexture(L,v,m*c,Ya.LINEAR,Ya.LINEAR);r.drawArrays(Ya.TRIANGLE_STRIP,0,4)}}if(I){this.renderedTileRange_=g;this.renderedFramebufferExtent_=M;this.renderedRevision_=o.getRevision()}else{this.renderedTileRange_=null;this.renderedFramebufferExtent_=null;this.renderedRevision_=-1;t.animate=true}}this.updateUsedTiles(t.usedTiles,o,u,g);var Y=e.getTileTextureQueue();this.manageTilePyramid(t,o,f,c,h,_,u,a.getPreload(),(function(t){if(t.getState()==po.LOADED&&!e.isTileTextureLoaded(t)&&!Y.isKeyQueued(t.getKey())){Y.enqueue([t,f.getTileCoordCenter(t.tileCoord),f.getResolution(t.tileCoord[0]),v,m*c])}}),this);this.scheduleExpireCache(t,o);this.updateLogos(t,o);var J=this.texCoordMatrix;Ia.reset(J);Ia.translate(J,(Math.round(p[0]/l)*l-M[0])/(M[2]-M[0]),(Math.round(p[1]/l)*l-M[1])/(M[3]-M[1]));if(n.rotation!==0){Ia.rotate(J,n.rotation)}Ia.scale(J,t.size[0]*n.resolution/(M[2]-M[0]),t.size[1]*n.resolution/(M[3]-M[1]));Ia.translate(J,-.5,-.5);return true};qu.prototype.forEachLayerAtPixel=function(t,i,s,e){if(!this.framebuffer){return undefined}var r=[t[0]/i.size[0],(i.size[1]-t[1])/i.size[1]];var n=Ia.apply(this.texCoordMatrix,r.slice());var h=[n[0]*this.framebufferDimension,n[1]*this.framebufferDimension];var a=this.mapRenderer.getContext().getGL();a.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer);var o=new Uint8Array(4);a.readPixels(h[0],h[1],1,1,a.RGBA,a.UNSIGNED_BYTE,o);if(o[3]>0){return s.call(e,this.getLayer(),o)}else{return undefined}};var Bu=function(t,i){Du.call(this,t,i);this.dirty_=false;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=Ma.createEmpty();this.renderedRenderOrder_=null;this.replayGroup_=null;this.layerState_=null};ta.inherits(Bu,Du);Bu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.VECTOR};Bu["create"]=function(t,i){return new Bu(t,i)};Bu.prototype.composeFrame=function(t,i,s){this.layerState_=i;var e=t.viewState;var r=this.replayGroup_;var n=t.size;var h=t.pixelRatio;var a=this.mapRenderer.getGL();if(r&&!r.isEmpty()){a.enable(a.SCISSOR_TEST);a.scissor(0,0,n[0]*h,n[1]*h);r.replay(s,e.center,e.resolution,e.rotation,n,h,i.opacity,i.managed?t.skippedFeatureUids:{});a.disable(a.SCISSOR_TEST)}};Bu.prototype.disposeInternal=function(){var t=this.replayGroup_;if(t){var i=this.mapRenderer.getContext();t.getDeleteResourcesFunction(i)();this.replayGroup_=null}Du.prototype.disposeInternal.call(this)};Bu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(!this.replayGroup_||!this.layerState_){return undefined}else{var n=this.mapRenderer.getContext();var h=i.viewState;var a=this.getLayer();var o=this.layerState_;var f={};return this.replayGroup_.forEachFeatureAtCoordinate(t,n,h.center,h.resolution,h.rotation,i.size,i.pixelRatio,o.opacity,{},(function(t){var i=ta.getUid(t).toString();if(!(i in f)){f[i]=true;return e.call(r,t,a)}}))}};Bu.prototype.hasFeatureAtCoordinate=function(t,i){if(!this.replayGroup_||!this.layerState_){return false}else{var s=this.mapRenderer.getContext();var e=i.viewState;var r=this.layerState_;return this.replayGroup_.hasFeatureAtCoordinate(t,s,e.center,e.resolution,e.rotation,i.size,i.pixelRatio,r.opacity,i.skippedFeatureUids)}};Bu.prototype.forEachLayerAtPixel=function(t,i,s,e){var r=Ia.apply(i.pixelToCoordinateTransform,t.slice());var n=this.hasFeatureAtCoordinate(r,i);if(n){return s.call(e,this.getLayer(),null)}else{return undefined}};Bu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};Bu.prototype.prepareFrame=function(t,i,s){var e=this.getLayer();var r=e.getSource();this.updateLogos(t,r);var n=t.viewHints[yo.ANIMATING];var h=t.viewHints[yo.INTERACTING];var a=e.getUpdateWhileAnimating();var o=e.getUpdateWhileInteracting();if(!this.dirty_&&(!a&&n)||!o&&h){return true}var f=t.extent;var u=t.viewState;var l=u.projection;var v=u.resolution;var c=t.pixelRatio;var d=e.getRevision();var m=e.getRenderBuffer();var p=e.getRenderOrder();if(p===undefined){p=su.defaultOrder}var _=Ma.buffer(f,m*v);if(!this.dirty_&&this.renderedResolution_==v&&this.renderedRevision_==d&&this.renderedRenderOrder_==p&&Ma.containsExtent(this.renderedExtent_,_)){return true}if(this.replayGroup_){t.postRenderFunctions.push(this.replayGroup_.getDeleteResourcesFunction(s))}this.dirty_=false;var g=new Tu(su.getTolerance(v,c),_,e.getRenderBuffer());r.loadFeatures(_,v,l);var M=function(t){var i;var s=t.getStyleFunction();if(s){i=s.call(t,v)}else{s=e.getStyleFunction();if(s){i=s(t,v)}}if(i){var r=this.renderFeature(t,v,c,i,g);this.dirty_=this.dirty_||r}};if(p){var z=[];r.forEachFeatureInExtent(_,(function(t){z.push(t)}),this);z.sort(p);z.forEach(M,this)}else{r.forEachFeatureInExtent(_,M,this)}g.finish(s);this.renderedResolution_=v;this.renderedRevision_=d;this.renderedRenderOrder_=p;this.renderedExtent_=_;this.replayGroup_=g;return true};Bu.prototype.renderFeature=function(t,i,s,e,r){if(!e){return false}var n=false;if(Array.isArray(e)){for(var h=e.length-1,a=0;h>=a;--h){n=su.renderFeature(r,t,e[h],su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}}else{n=su.renderFeature(r,t,e,su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}return n};if(ta.ENABLE_CANVAS){Ro.register(Ao.MAP_RENDERER,Nf);Ro.registerMultiple(Ao.LAYER_RENDERER,[Sf,Cf,eu,nu])}if(ta.ENABLE_WEBGL){Ro.register(Ao.MAP_RENDERER,ju);Ro.registerMultiple(Ao.LAYER_RENDERER,[Wu,qu,Bu])}var Hu=function(t){t=ea.assign({},t);if(!t.controls){t.controls=Bo.defaults()}if(!t.interactions){t.interactions=uf.defaults()}Lo.call(this,t)};ta.inherits(Hu,Lo);var Xu={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"};var Yu=function(t){ua.call(this);this.options=t;this.id=t.id;this.insertFirst=t.insertFirst!==undefined?t.insertFirst:true;this.stopEvent=t.stopEvent!==undefined?t.stopEvent:true;this.element=document.createElement("DIV");this.element.className=t.className!==undefined?t.className:"ol-overlay-container "+Do.CLASS_SELECTABLE;this.element.style.position="absolute";this.autoPan=t.autoPan!==undefined?t.autoPan:false;this.autoPanAnimation=t.autoPanAnimation||{};this.autoPanMargin=t.autoPanMargin!==undefined?t.autoPanMargin:20;this.rendered={bottom_:"",left_:"",right_:"",top_:"",visible:true};this.mapPostrenderListenerKey=null;ra.listen(this,ua.getChangeEventType(Yu.Property.ELEMENT),this.handleElementChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.MAP),this.handleMapChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.OFFSET),this.handleOffsetChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.POSITION),this.handlePositionChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.POSITIONING),this.handlePositioningChanged,this);if(t.element!==undefined){this.setElement(t.element)}this.setOffset(t.offset!==undefined?t.offset:[0,0]);this.setPositioning(t.positioning!==undefined?t.positioning:Xu.TOP_LEFT);if(t.position!==undefined){this.setPosition(t.position)}};ta.inherits(Yu,ua);Yu.prototype.getElement=function(){return this.get(Yu.Property.ELEMENT)};Yu.prototype.getId=function(){return this.id};Yu.prototype.getMap=function(){return this.get(Yu.Property.MAP)};Yu.prototype.getOffset=function(){return this.get(Yu.Property.OFFSET)};Yu.prototype.getPosition=function(){return this.get(Yu.Property.POSITION)};Yu.prototype.getPositioning=function(){return this.get(Yu.Property.POSITIONING)};Yu.prototype.handleElementChanged=function(){Po.removeChildren(this.element);var t=this.getElement();if(t){this.element.appendChild(t)}};Yu.prototype.handleMapChanged=function(){if(this.mapPostrenderListenerKey){Po.removeNode(this.element);ra.unlistenByKey(this.mapPostrenderListenerKey);this.mapPostrenderListenerKey=null}var t=this.getMap();if(t){this.mapPostrenderListenerKey=ra.listen(t,co.POSTRENDER,this.render,this);this.updatePixelPosition();var i=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();if(this.insertFirst){i.insertBefore(this.element,i.childNodes[0]||null)}else{i.appendChild(this.element)}}};Yu.prototype.render=function(){this.updatePixelPosition()};Yu.prototype.handleOffsetChanged=function(){this.updatePixelPosition()};Yu.prototype.handlePositionChanged=function(){this.updatePixelPosition();if(this.get(Yu.Property.POSITION)&&this.autoPan){this.panIntoView()}};Yu.prototype.handlePositioningChanged=function(){this.updatePixelPosition()};Yu.prototype.setElement=function(t){this.set(Yu.Property.ELEMENT,t)};Yu.prototype.setMap=function(t){this.set(Yu.Property.MAP,t)};Yu.prototype.setOffset=function(t){this.set(Yu.Property.OFFSET,t)};Yu.prototype.setPosition=function(t){this.set(Yu.Property.POSITION,t)};Yu.prototype.panIntoView=function(){var t=this.getMap();if(!t||!t.getTargetElement()){return}var i=this.getRect(t.getTargetElement(),t.getSize());var s=this.getElement();var e=this.getRect(s,[Po.outerWidth(s),Po.outerHeight(s)]);var r=this.autoPanMargin;if(!Ma.containsExtent(i,e)){var n=e[0]-i[0];var h=i[2]-e[2];var a=e[1]-i[1];var o=i[3]-e[3];var f=[0,0];if(n<0){f[0]=n-r}else if(h<0){f[0]=Math.abs(h)+r}if(a<0){f[1]=a-r}else if(o<0){f[1]=Math.abs(o)+r}if(f[0]!==0||f[1]!==0){var u=t.getView().getCenter();var l=t.getPixelFromCoordinate(u);var v=[l[0]+f[0],l[1]+f[1]];t.getView().animate({center:t.getCoordinateFromPixel(v),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing})}}};Yu.prototype.getRect=function(t,i){var s=t.getBoundingClientRect();var e=s.left+window.pageXOffset;var r=s.top+window.pageYOffset;return[e,r,e+i[0],r+i[1]]};Yu.prototype.setPositioning=function(t){this.set(Yu.Property.POSITIONING,t)};Yu.prototype.setVisible=function(t){if(this.rendered.visible!==t){this.element.style.display=t?"":"none";this.rendered.visible=t}};Yu.prototype.updatePixelPosition=function(){var t=this.getMap();var i=this.getPosition();if(!t||!t.isRendered()||!i){this.setVisible(false);return}var s=t.getPixelFromCoordinate(i);var e=t.getSize();this.updateRenderedPosition(s,e)};Yu.prototype.updateRenderedPosition=function(t,i){var s=this.element.style;var e=this.getOffset();var r=this.getPositioning();this.setVisible(true);var n=e[0];var h=e[1];if(r==Xu.BOTTOM_RIGHT||r==Xu.CENTER_RIGHT||r==Xu.TOP_RIGHT){if(this.rendered.left_!==""){this.rendered.left_=s.left=""}var a=Math.round(i[0]-t[0]-n)+"px";if(this.rendered.right_!=a){this.rendered.right_=s.right=a}}else{if(this.rendered.right_!==""){this.rendered.right_=s.right=""}if(r==Xu.BOTTOM_CENTER||r==Xu.CENTER_CENTER||r==Xu.TOP_CENTER){n-=this.element.offsetWidth/2}var o=Math.round(t[0]+n)+"px";if(this.rendered.left_!=o){this.rendered.left_=s.left=o}}if(r==Xu.BOTTOM_LEFT||r==Xu.BOTTOM_CENTER||r==Xu.BOTTOM_RIGHT){if(this.rendered.top_!==""){this.rendered.top_=s.top=""}var f=Math.round(i[1]-t[1]-h)+"px";if(this.rendered.bottom_!=f){this.rendered.bottom_=s.bottom=f}}else{if(this.rendered.bottom_!==""){this.rendered.bottom_=s.bottom=""}if(r==Xu.CENTER_LEFT||r==Xu.CENTER_CENTER||r==Xu.CENTER_RIGHT){h-=this.element.offsetHeight/2}var u=Math.round(t[1]+h)+"px";if(this.rendered.top_!=u){this.rendered.top_=s.top=u}}};Yu.prototype.getOptions=function(){return this.options};Yu.Property={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};var Ju=function(t){this.opacity_=t.opacity;this.rotateWithView_=t.rotateWithView;this.rotation_=t.rotation;this.scale_=t.scale;this.snapToPixel_=t.snapToPixel};Ju.prototype.getOpacity=function(){return this.opacity_};Ju.prototype.getRotateWithView=function(){return this.rotateWithView_};Ju.prototype.getRotation=function(){return this.rotation_};Ju.prototype.getScale=function(){return this.scale_};Ju.prototype.getSnapToPixel=function(){return this.snapToPixel_};Ju.prototype.getAnchor=function(){};Ju.prototype.getImage=function(t){};Ju.prototype.getHitDetectionImage=function(t){};Ju.prototype.getImageState=function(){};Ju.prototype.getImageSize=function(){};Ju.prototype.getHitDetectionImageSize=function(){};Ju.prototype.getOrigin=function(){};Ju.prototype.getSize=function(){};Ju.prototype.setOpacity=function(t){this.opacity_=t};Ju.prototype.setRotateWithView=function(t){this.rotateWithView_=t};Ju.prototype.setRotation=function(t){this.rotation_=t};Ju.prototype.setScale=function(t){this.scale_=t};Ju.prototype.setSnapToPixel=function(t){this.snapToPixel_=t};Ju.prototype.listenImageChange=function(t,i){};Ju.prototype.load=function(){};Ju.prototype.unlistenImageChange=function(t,i){};var Ku=function(t){this.checksums_=null;this.canvas_=null;this.hitDetectionCanvas_=null;this.fill_=t.fill!==undefined?t.fill:null;this.origin_=[0,0];this.points_=t.points;this.radius_=t.radius!==undefined?t.radius:t.radius1;this.radius2_=t.radius2;this.angle_=t.angle!==undefined?t.angle:0;this.stroke_=t.stroke!==undefined?t.stroke:null;this.anchor_=null;this.size_=null;this.imageSize_=null;this.hitDetectionImageSize_=null;this.atlasManager_=t.atlasManager;this.render_(this.atlasManager_);var i=t.snapToPixel!==undefined?t.snapToPixel:true;var s=t.rotateWithView!==undefined?t.rotateWithView:false;Ju.call(this,{opacity:1,rotateWithView:s,rotation:t.rotation!==undefined?t.rotation:0,scale:1,snapToPixel:i})};ta.inherits(Ku,Ju);Ku.prototype.clone=function(){var t=new Ku({fill:this.getFill()?this.getFill().clone():undefined,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():undefined,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});t.setOpacity(this.getOpacity());t.setScale(this.getScale());return t};Ku.prototype.getAnchor=function(){return this.anchor_};Ku.prototype.getAngle=function(){return this.angle_};Ku.prototype.getFill=function(){return this.fill_};Ku.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_};Ku.prototype.getImage=function(t){return this.canvas_};Ku.prototype.getImageSize=function(){return this.imageSize_};Ku.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_};Ku.prototype.getImageState=function(){return vf.LOADED};Ku.prototype.getOrigin=function(){return this.origin_};Ku.prototype.getPoints=function(){return this.points_};Ku.prototype.getRadius=function(){return this.radius_};Ku.prototype.getRadius2=function(){return this.radius2_};Ku.prototype.getSize=function(){return this.size_};Ku.prototype.getStroke=function(){return this.stroke_};Ku.prototype.listenImageChange=function(t,i){};Ku.prototype.load=function(){};Ku.prototype.unlistenImageChange=function(t,i){};Ku.prototype.render_=function(t){var i;var s="";var e="";var r=0;var n=null;var h=0;var a;var o=0;if(this.stroke_){a=this.stroke_.getColor();if(a===null){a=gf.defaultStrokeStyle}a=zf.asColorLike(a);o=this.stroke_.getWidth();if(o===undefined){o=gf.defaultLineWidth}n=this.stroke_.getLineDash();h=this.stroke_.getLineDashOffset();if(!Ja.CANVAS_LINE_DASH){n=null;h=0}e=this.stroke_.getLineJoin();if(e===undefined){e=gf.defaultLineJoin}s=this.stroke_.getLineCap();if(s===undefined){s=gf.defaultLineCap}r=this.stroke_.getMiterLimit();if(r===undefined){r=gf.defaultMiterLimit}}var f=2*(this.radius_+o)+1;var u={strokeStyle:a,strokeWidth:o,size:f,lineCap:s,lineDash:n,lineDashOffset:h,lineJoin:e,miterLimit:r};if(t===undefined){var l=Po.createCanvasContext2D(f,f);this.canvas_=l.canvas;f=this.canvas_.width;i=f;this.draw_(u,l,0,0);this.createHitDetectionCanvas_(u)}else{f=Math.round(f);var v=!this.fill_;var c;if(v){c=this.drawHitDetectionCanvas_.bind(this,u)}var d=this.getChecksum();var m=t.add(d,f,f,this.draw_.bind(this,u),c);this.canvas_=m.image;this.origin_=[m.offsetX,m.offsetY];i=m.image.width;if(v){this.hitDetectionCanvas_=m.hitImage;this.hitDetectionImageSize_=[m.hitImage.width,m.hitImage.height]}else{this.hitDetectionCanvas_=this.canvas_;this.hitDetectionImageSize_=[i,i]}}this.anchor_=[f/2,f/2];this.size_=[f,f];this.imageSize_=[i,i]};Ku.prototype.draw_=function(t,i,s,e){var r,n,h;i.setTransform(1,0,0,1,0,0);i.translate(s,e);i.beginPath();var a=this.points_;if(a===Infinity){i.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,true)}else{var o=this.radius2_!==undefined?this.radius2_:this.radius_;if(o!==this.radius_){a=2*a}for(r=0;r<=a;r++){n=r*2*Math.PI/a-Math.PI/2+this.angle_;h=r%2===0?this.radius_:o;i.lineTo(t.size/2+h*Math.cos(n),t.size/2+h*Math.sin(n))}}if(this.fill_){var f=this.fill_.getColor();if(f===null){f=gf.defaultFillStyle}i.fillStyle=zf.asColorLike(f);i.fill()}if(this.stroke_){i.strokeStyle=t.strokeStyle;i.lineWidth=t.strokeWidth;if(t.lineDash){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.lineCap=t.lineCap;i.lineJoin=t.lineJoin;i.miterLimit=t.miterLimit;i.stroke()}i.closePath()};Ku.prototype.createHitDetectionCanvas_=function(t){this.hitDetectionImageSize_=[t.size,t.size];if(this.fill_){this.hitDetectionCanvas_=this.canvas_;return}var i=Po.createCanvasContext2D(t.size,t.size);this.hitDetectionCanvas_=i.canvas;this.drawHitDetectionCanvas_(t,i,0,0)};Ku.prototype.drawHitDetectionCanvas_=function(t,i,s,e){i.setTransform(1,0,0,1,0,0);i.translate(s,e);i.beginPath();var r=this.points_;if(r===Infinity){i.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,true)}else{var n=this.radius2_!==undefined?this.radius2_:this.radius_;if(n!==this.radius_){r=2*r}var h,a,o;for(h=0;h<=r;h++){o=h*2*Math.PI/r-Math.PI/2+this.angle_;a=h%2===0?this.radius_:n;i.lineTo(t.size/2+a*Math.cos(o),t.size/2+a*Math.sin(o))}}i.fillStyle=gf.defaultFillStyle;i.fill();if(this.stroke_){i.strokeStyle=t.strokeStyle;i.lineWidth=t.strokeWidth;if(t.lineDash){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.stroke()}i.closePath()};Ku.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-";var i=this.fill_?this.fill_.getChecksum():"-";var s=!this.checksums_||(t!=this.checksums_[1]||i!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]);if(s){var e="r"+t+i+(this.radius_!==undefined?this.radius_.toString():"-")+(this.radius2_!==undefined?this.radius2_.toString():"-")+(this.angle_!==undefined?this.angle_.toString():"-")+(this.points_!==undefined?this.points_.toString():"-");this.checksums_=[e,t,i,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]};var Zu=function(t){var i=t||{};Ku.call(this,{points:Infinity,fill:i.fill,radius:i.radius,snapToPixel:i.snapToPixel,stroke:i.stroke,atlasManager:i.atlasManager})};ta.inherits(Zu,Ku);Zu.prototype.clone=function(){var t=new Zu({fill:this.getFill()?this.getFill().clone():undefined,stroke:this.getStroke()?this.getStroke().clone():undefined,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});t.setOpacity(this.getOpacity());t.setScale(this.getScale());return t};Zu.prototype.setRadius=function(t){this.radius_=t;this.render_(this.atlasManager_)};var $u=function(t){var i=t||{};this.color_=i.color!==undefined?i.color:null;this.checksum_=undefined};$u.prototype.clone=function(){var t=this.getColor();return new $u({color:t&&t.slice?t.slice():t||undefined})};$u.prototype.getColor=function(){return this.color_};$u.prototype.setColor=function(t){this.color_=t;this.checksum_=undefined};$u.prototype.getChecksum=function(){if(this.checksum_===undefined){if(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient){this.checksum_=ta.getUid(this.color_).toString()}else{this.checksum_="f"+(this.color_?Mf.asString(this.color_):"-")}}return this.checksum_};var Qu=function(t){var i=t||{};this.geometry_=null;this.geometryFunction_=Qu.defaultGeometryFunction;if(i.geometry!==undefined){this.setGeometry(i.geometry)}this.fill_=i.fill!==undefined?i.fill:null;this.image_=i.image!==undefined?i.image:null;this.renderer_=i.renderer!==undefined?i.renderer:null;this.stroke_=i.stroke!==undefined?i.stroke:null;this.text_=i.text!==undefined?i.text:null;this.zIndex_=i.zIndex};Qu.prototype.clone=function(){var t=this.getGeometry();if(t&&t.clone){t=t.clone()}return new Qu({geometry:t,fill:this.getFill()?this.getFill().clone():undefined,image:this.getImage()?this.getImage().clone():undefined,stroke:this.getStroke()?this.getStroke().clone():undefined,text:this.getText()?this.getText().clone():undefined,zIndex:this.getZIndex()})};Qu.prototype.getRenderer=function(){return this.renderer_};Qu.prototype.setRenderer=function(t){this.renderer_=t};Qu.prototype.getGeometry=function(){return this.geometry_};Qu.prototype.getGeometryFunction=function(){return this.geometryFunction_};Qu.prototype.getFill=function(){return this.fill_};Qu.prototype.setFill=function(t){this.fill_=t};Qu.prototype.getImage=function(){return this.image_};Qu.prototype.setImage=function(t){this.image_=t};Qu.prototype.getStroke=function(){return this.stroke_};Qu.prototype.setStroke=function(t){this.stroke_=t};Qu.prototype.getText=function(){return this.text_};Qu.prototype.setText=function(t){this.text_=t};Qu.prototype.getZIndex=function(){return this.zIndex_};Qu.prototype.setGeometry=function(t){if(typeof t==="function"){this.geometryFunction_=t}else if(typeof t==="string"){this.geometryFunction_=function(i){return i.get(t)}}else if(!t){this.geometryFunction_=Qu.defaultGeometryFunction}else if(t!==undefined){this.geometryFunction_=function(){return t}}this.geometry_=t};Qu.prototype.setZIndex=function(t){this.zIndex_=t};Qu.createFunction=function(t){var i;if(typeof t==="function"){i=t}else{var s;if(Array.isArray(t)){s=t}else{va.assert(t instanceof Qu,41);s=[t]}i=function(){return s}}return i};Qu.default_=null;Qu.defaultFunction=function(t,i){if(!Qu.default_){var s=new $u({color:"rgba(255,255,255,0.4)"});var e=new Pu({color:"#3399CC",width:1.25});Qu.default_=[new Qu({image:new Zu({fill:s,stroke:e,radius:5}),fill:s,stroke:e})]}return Qu.default_};Qu.createDefaultEditing=function(){var t={};var i=[255,255,255,1];var s=[0,153,255,1];var e=3;t[da.POLYGON]=[new Qu({fill:new $u({color:[255,255,255,.5]})})];t[da.MULTI_POLYGON]=t[da.POLYGON];t[da.LINE_STRING]=[new Qu({stroke:new Pu({color:i,width:e+2})}),new Qu({stroke:new Pu({color:s,width:e})})];t[da.MULTI_LINE_STRING]=t[da.LINE_STRING];t[da.CIRCLE]=t[da.POLYGON].concat(t[da.LINE_STRING]);t[da.POINT]=[new Qu({image:new Zu({radius:e*2,fill:new $u({color:s}),stroke:new Pu({color:i,width:e/2})}),zIndex:Infinity})];t[da.MULTI_POINT]=t[da.POINT];t[da.GEOMETRY_COLLECTION]=t[da.POLYGON].concat(t[da.LINE_STRING],t[da.POINT]);return t};Qu.defaultGeometryFunction=function(t){return t.getGeometry()};var tl=function(t){ua.call(this);this.id_=undefined;this.geometryName_="geometry";this.style_=null;this.styleFunction_=undefined;this.geometryChangeKey_=null;ra.listen(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);if(t!==undefined){if(t instanceof Ca||!t){var i=t;this.setGeometry(i)}else{var s=t;this.setProperties(s)}}};ta.inherits(tl,ua);tl.prototype.clone=function(){var t=new tl(this.getProperties());t.setGeometryName(this.getGeometryName());var i=this.getGeometry();if(i){t.setGeometry(i.clone())}var s=this.getStyle();if(s){t.setStyle(s)}return t};tl.prototype.getGeometry=function(){return this.get(this.geometryName_)};tl.prototype.getId=function(){return this.id_};tl.prototype.getGeometryName=function(){return this.geometryName_};tl.prototype.getStyle=function(){return this.style_};tl.prototype.getStyleFunction=function(){return this.styleFunction_};tl.prototype.handleGeometryChange_=function(){this.changed()};tl.prototype.handleGeometryChanged_=function(){if(this.geometryChangeKey_){ra.unlistenByKey(this.geometryChangeKey_);this.geometryChangeKey_=null}var t=this.getGeometry();if(t){this.geometryChangeKey_=ra.listen(t,oa.CHANGE,this.handleGeometryChange_,this)}this.changed()};tl.prototype.setGeometry=function(t){this.set(this.geometryName_,t)};tl.prototype.setStyle=function(t){this.style_=t;this.styleFunction_=!t?undefined:tl.createStyleFunction(t);this.changed()};tl.prototype.setId=function(t){this.id_=t;this.changed()};tl.prototype.setGeometryName=function(t){ra.unlisten(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);this.geometryName_=t;ra.listen(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);this.handleGeometryChanged_()};tl.createStyleFunction=function(t){var i;if(typeof t==="function"){if(t.length==2){i=function(i){return t(this,i)}}else{i=t}}else{var s;if(Array.isArray(t)){s=t}else{va.assert(t instanceof Qu,41);s=[t]}i=function(){return s}}return i};var il={};il.createOrUpdate=function(t,i,s,e){if(e!==undefined){e[0]=t;e[1]=i;e[2]=s;return e}else{return[t,i,s]}};il.getKeyZXY=function(t,i,s){return t+"/"+i+"/"+s};il.getKey=function(t){return il.getKeyZXY(t[0],t[1],t[2])};il.fromKey=function(t){return t.split("/").map(Number)};il.hash=function(t){return(t[1]<<t[0])+t[2]};il.quadKey=function(t){var i=t[0];var s=new Array(i);var e=1<<i-1;var r,n;for(r=0;r<i;++r){n=48;if(t[1]&e){n+=1}if(t[2]&e){n+=2}s[r]=String.fromCharCode(n);e>>=1}return s.join("")};il.withinExtentAndZ=function(t,i){var s=t[0];var e=t[1];var r=t[2];if(i.getMinZoom()>s||s>i.getMaxZoom()){return false}var n=i.getExtent();var h;if(!n){h=i.getFullTileRange(s)}else{h=i.getTileRangeForExtentAndZ(n,s)}if(!h){return true}else{return h.containsXY(e,r)}};var sl={};sl.createFromTemplate=function(t,i){var s=/\{z\}/g;var e=/\{x\}/g;var r=/\{y\}/g;var n=/\{-y\}/g;return function(h,a,o){if(!h){return undefined}else{return t.replace(s,h[0].toString()).replace(e,h[1].toString()).replace(r,(function(){var t=-h[2]-1;return t.toString()})).replace(n,(function(){var t=h[0];var s=i.getFullTileRange(t);va.assert(s,55);var e=s.getHeight()+h[2];return e.toString()}))}}};sl.createFromTemplates=function(t,i){var s=t.length;var e=new Array(s);for(var r=0;r<s;++r){e[r]=sl.createFromTemplate(t[r],i)}return sl.createFromTileUrlFunctions(e)};sl.createFromTileUrlFunctions=function(t){if(t.length===1){return t[0]}return function(i,s,e){if(!i){return undefined}else{var r=il.hash(i);var n=ca.modulo(r,t.length);return t[n](i,s,e)}}};sl.nullTileUrlFunction=function(t,i,s){return undefined};sl.expandUrl=function(t){var i=[];var s=/\{([a-z])-([a-z])\}/.exec(t);if(s){var e=s[1].charCodeAt(0);var r=s[2].charCodeAt(0);var n;for(n=e;n<=r;++n){i.push(t.replace(s[0],String.fromCharCode(n)))}return i}s=s=/\{(\d+)-(\d+)\}/.exec(t);if(s){var h=parseInt(s[2],10);for(var a=parseInt(s[1],10);a<=h;a++){i.push(t.replace(s[0],a.toString()))}return i}i.push(t);return i};var el=function(t,i,s){aa.call(this);var e=s?s:{};this.tileCoord=t;this.state=i;this.interimTile=null;this.key="";this.transition_=e.transition===undefined?250:e.transition;this.transitionStarts_={}};ta.inherits(el,aa);el.prototype.changed=function(){this.dispatchEvent(oa.CHANGE)};el.prototype.getKey=function(){return this.key+"/"+this.tileCoord};el.prototype.getInterimTile=function(){if(!this.interimTile){return this}var t=this.interimTile;do{if(t.getState()==po.LOADED){return t}t=t.interimTile}while(t);return this};el.prototype.refreshInterimChain=function(){if(!this.interimTile){return}var t=this.interimTile;var i=this;do{if(t.getState()==po.LOADED){t.interimTile=null;break}else if(t.getState()==po.LOADING){i=t}else if(t.getState()==po.IDLE){i.interimTile=t.interimTile}else{i=t}t=i.interimTile}while(t)};el.prototype.getTileCoord=function(){return this.tileCoord};el.prototype.getState=function(){return this.state};el.prototype.setState=function(t){this.state=t;this.changed()};el.prototype.load=function(){};el.prototype.getAlpha=function(t,i){if(!this.transition_){return 1}var s=this.transitionStarts_[t];if(!s){s=i;this.transitionStarts_[t]=s}else if(s===-1){return 1}var e=i-s+1e3/60;if(e>=this.transition_){return 1}return So.easeIn(e/this.transition_)};el.prototype.inTransition=function(t){if(!this.transition_){return false}return this.transitionStarts_[t]!==-1};el.prototype.endTransition=function(t){if(this.transition_){this.transitionStarts_[t]=-1}};var rl=function(t,i,s,e,r,n){el.call(this,t,i,n);this.crossOrigin_=e;this.src_=s;this.image_=new Image;if(e!==null){this.image_.crossOrigin=e}this.imageListenerKeys_=null;this.tileLoadFunction_=r};ta.inherits(rl,el);rl.prototype.disposeInternal=function(){if(this.state==po.LOADING){this.unlistenImage_();this.image_=rl.getBlankImage()}if(this.interimTile){this.interimTile.dispose()}this.state=po.ABORT;this.changed();el.prototype.disposeInternal.call(this)};rl.prototype.getImage=function(){return this.image_};rl.prototype.getKey=function(){return this.src_};rl.prototype.handleImageError_=function(){this.state=po.ERROR;this.unlistenImage_();this.image_=rl.getBlankImage();this.changed()};rl.prototype.handleImageLoad_=function(){if(this.image_.naturalWidth&&this.image_.naturalHeight){this.state=po.LOADED}else{this.state=po.EMPTY}this.unlistenImage_();this.changed()};rl.prototype.load=function(){if(this.state==po.ERROR){this.state=po.IDLE;this.image_=new Image;if(this.crossOrigin_!==null){this.image_.crossOrigin=this.crossOrigin_}}if(this.state==po.IDLE){this.state=po.LOADING;this.changed();this.imageListenerKeys_=[ra.listenOnce(this.image_,oa.ERROR,this.handleImageError_,this),ra.listenOnce(this.image_,oa.LOAD,this.handleImageLoad_,this)];this.tileLoadFunction_(this,this.src_)}};rl.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(ra.unlistenByKey);this.imageListenerKeys_=null};rl.getBlankImage=function(){var t=Po.createCanvasContext2D(1,1);t.fillStyle="rgba(0,0,0,0)";t.fillRect(0,0,1,1);return t.canvas};var nl=function(t){_f.call(this,t)};ta.inherits(nl,_f);nl.prototype.expireCache=function(t){var i,s;while(this.canExpireCache()){i=this.peekLast();s=i.tileCoord[0].toString();if(s in t&&t[s].contains(i.tileCoord)){break}else{this.pop().dispose()}}};nl.prototype.pruneExceptNewestZ=function(){if(this.getCount()===0){return}var t=this.peekFirstKey();var i=il.fromKey(t);var s=i[0];this.forEach((function(t){if(t.tileCoord[0]!==s){this.remove(il.getKey(t.tileCoord));t.dispose()}}),this)};var hl={};hl.calculateSourceResolution=function(t,i,s,e){var r=Na.transform(s,i,t);var n=Na.getPointResolution(i,e,s);var h=i.getMetersPerUnit();if(h!==undefined){n*=h}var a=t.getMetersPerUnit();if(a!==undefined){n/=a}var o=t.getExtent();if(!o||Ma.containsCoordinate(o,r)){var f=Na.getPointResolution(t,n,r)/n;if(isFinite(f)&&f>0){n/=f}}return n};hl.enlargeClipPoint_=function(t,i,s,e){var r=s-t,n=e-i;var h=Math.sqrt(r*r+n*n);return[Math.round(s+r/h),Math.round(e+n/h)]};hl.render=function(t,i,s,e,r,n,h,a,o,f,u){var l=Po.createCanvasContext2D(Math.round(s*t),Math.round(s*i));if(o.length===0){return l.canvas}l.scale(s,s);var v=Ma.createEmpty();o.forEach((function(t,i,s){Ma.extend(v,t.extent)}));var c=Ma.getWidth(v);var d=Ma.getHeight(v);var m=Po.createCanvasContext2D(Math.round(s*c/e),Math.round(s*d/e));var p=s/e;o.forEach((function(t,i,s){var e=t.extent[0]-v[0];var r=-(t.extent[3]-v[3]);var n=Ma.getWidth(t.extent);var h=Ma.getHeight(t.extent);m.drawImage(t.image,f,f,t.image.width-2*f,t.image.height-2*f,e*p,r*p,n*p,h*p)}));var _=Ma.getTopLeft(h);a.getTriangles().forEach((function(t,i,r){var h=t.source,a=t.target;var o=h[0][0],f=h[0][1],u=h[1][0],c=h[1][1],d=h[2][0],p=h[2][1];var g=(a[0][0]-_[0])/n,M=-(a[0][1]-_[1])/n;var z=(a[1][0]-_[0])/n,w=-(a[1][1]-_[1])/n;var y=(a[2][0]-_[0])/n,b=-(a[2][1]-_[1])/n;var x=o,E=f;o=0;f=0;u-=x;c-=E;d-=x;p-=E;var S=[[u,c,0,0,z-g],[d,p,0,0,y-g],[0,0,u,c,w-M],[0,0,d,p,b-M]];var G=ca.solveLinearSystem(S);if(!G){return}l.save();l.beginPath();var P=(g+z+y)/3,k=(M+w+b)/3;var N=hl.enlargeClipPoint_(P,k,g,M);var I=hl.enlargeClipPoint_(P,k,z,w);var C=hl.enlargeClipPoint_(P,k,y,b);l.moveTo(I[0],I[1]);l.lineTo(N[0],N[1]);l.lineTo(C[0],C[1]);l.clip();l.transform(G[0],G[2],G[1],G[3],g,M);l.translate(v[0]-x,v[3]-E);l.scale(e/s,-e/s);l.drawImage(m.canvas,0,0);l.restore()}));if(u){l.save();l.strokeStyle="black";l.lineWidth=1;a.getTriangles().forEach((function(t,i,s){var e=t.target;var r=(e[0][0]-_[0])/n,h=-(e[0][1]-_[1])/n;var a=(e[1][0]-_[0])/n,o=-(e[1][1]-_[1])/n;var f=(e[2][0]-_[0])/n,u=-(e[2][1]-_[1])/n;l.beginPath();l.moveTo(a,o);l.lineTo(r,h);l.lineTo(f,u);l.closePath();l.stroke()}));l.restore()}return l.canvas};var al=function(t,i,s,e,r){this.sourceProj_=t;this.targetProj_=i;var n={};var h=Na.getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var i=t[0]+"/"+t[1];if(!n[i]){n[i]=h(t)}return n[i]};this.maxSourceExtent_=e;this.errorThresholdSquared_=r*r;this.triangles_=[];this.wrapsXInSource_=false;this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!e&&!!this.sourceProj_.getExtent()&&Ma.getWidth(e)==Ma.getWidth(this.sourceProj_.getExtent());this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ma.getWidth(this.sourceProj_.getExtent()):null;this.targetWorldWidth_=this.targetProj_.getExtent()?Ma.getWidth(this.targetProj_.getExtent()):null;var a=Ma.getTopLeft(s);var o=Ma.getTopRight(s);var f=Ma.getBottomRight(s);var u=Ma.getBottomLeft(s);var l=this.transformInv_(a);var v=this.transformInv_(o);var c=this.transformInv_(f);var d=this.transformInv_(u);this.addQuad_(a,o,f,u,l,v,c,d,ta.RASTER_REPROJECTION_MAX_SUBDIVISION);if(this.wrapsXInSource_){var m=Infinity;this.triangles_.forEach((function(t,i,s){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])}));this.triangles_.forEach((function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var i=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];if(i[0][0]-m>this.sourceWorldWidth_/2){i[0][0]-=this.sourceWorldWidth_}if(i[1][0]-m>this.sourceWorldWidth_/2){i[1][0]-=this.sourceWorldWidth_}if(i[2][0]-m>this.sourceWorldWidth_/2){i[2][0]-=this.sourceWorldWidth_}var s=Math.min(i[0][0],i[1][0],i[2][0]);var e=Math.max(i[0][0],i[1][0],i[2][0]);if(e-s<this.sourceWorldWidth_/2){t.source=i}}}),this)}n={}};al.prototype.addTriangle_=function(t,i,s,e,r,n){this.triangles_.push({source:[e,r,n],target:[t,i,s]})};al.prototype.addQuad_=function(t,i,s,e,r,n,h,a,o){var f=Ma.boundingExtent([r,n,h,a]);var u=this.sourceWorldWidth_?Ma.getWidth(f)/this.sourceWorldWidth_:null;var l=this.sourceWorldWidth_;var v=this.sourceProj_.canWrapX()&&u>.5&&u<1;var c=false;if(o>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var d=Ma.boundingExtent([t,i,s,e]);var m=Ma.getWidth(d)/this.targetWorldWidth_;c|=m>ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH}if(!v&&this.sourceProj_.isGlobal()&&u){c|=u>ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH}}if(!c&&this.maxSourceExtent_){if(!Ma.intersects(f,this.maxSourceExtent_)){return}}if(!c){if(!isFinite(r[0])||!isFinite(r[1])||!isFinite(n[0])||!isFinite(n[1])||!isFinite(h[0])||!isFinite(h[1])||!isFinite(a[0])||!isFinite(a[1])){if(o>0){c=true}else{return}}}if(o>0){if(!c){var p=[(t[0]+s[0])/2,(t[1]+s[1])/2];var _=this.transformInv_(p);var g;if(v){var M=(ca.modulo(r[0],l)+ca.modulo(h[0],l))/2;g=M-ca.modulo(_[0],l)}else{g=(r[0]+h[0])/2-_[0]}var z=(r[1]+h[1])/2-_[1];var w=g*g+z*z;c=w>this.errorThresholdSquared_}if(c){if(Math.abs(t[0]-s[0])<=Math.abs(t[1]-s[1])){var y=[(i[0]+s[0])/2,(i[1]+s[1])/2];var b=this.transformInv_(y);var x=[(e[0]+t[0])/2,(e[1]+t[1])/2];var E=this.transformInv_(x);this.addQuad_(t,i,y,x,r,n,b,E,o-1);this.addQuad_(x,y,s,e,E,b,h,a,o-1)}else{var S=[(t[0]+i[0])/2,(t[1]+i[1])/2];var G=this.transformInv_(S);var P=[(s[0]+e[0])/2,(s[1]+e[1])/2];var k=this.transformInv_(P);this.addQuad_(t,S,P,e,r,G,k,a,o-1);this.addQuad_(S,i,s,P,G,n,h,k,o-1)}return}}if(v){if(!this.canWrapXInSource_){return}this.wrapsXInSource_=true}this.addTriangle_(t,s,e,r,h,a);this.addTriangle_(t,i,s,r,n,h)};al.prototype.calculateSourceExtent=function(){var t=Ma.createEmpty();this.triangles_.forEach((function(i,s,e){var r=i.source;Ma.extendCoordinate(t,r[0]);Ma.extendCoordinate(t,r[1]);Ma.extendCoordinate(t,r[2])}));return t};al.prototype.getTriangles=function(){return this.triangles_};var ol=function(t,i,s,e,r,n,h,a,o,f,u){el.call(this,r,po.IDLE);this.renderEdges_=u!==undefined?u:false;this.pixelRatio_=h;this.gutter_=a;this.canvas_=null;this.sourceTileGrid_=i;this.targetTileGrid_=e;this.wrappedTileCoord_=n?n:r;this.sourceTiles_=[];this.sourcesListenerKeys_=null;this.sourceZ_=0;var l=e.getTileCoordExtent(this.wrappedTileCoord_);var v=this.targetTileGrid_.getExtent();var c=this.sourceTileGrid_.getExtent();var d=v?Ma.getIntersection(l,v):l;if(Ma.getArea(d)===0){this.state=po.EMPTY;return}var m=t.getExtent();if(m){if(!c){c=m}else{c=Ma.getIntersection(c,m)}}var p=e.getResolution(this.wrappedTileCoord_[0]);var _=Ma.getCenter(d);var g=hl.calculateSourceResolution(t,s,_,p);if(!isFinite(g)||g<=0){this.state=po.EMPTY;return}var M=f!==undefined?f:ta.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;this.triangulation_=new al(t,s,d,c,g*M);if(this.triangulation_.getTriangles().length===0){this.state=po.EMPTY;return}this.sourceZ_=i.getZForResolution(g);var z=this.triangulation_.calculateSourceExtent();if(c){if(t.canWrapX()){z[1]=ca.clamp(z[1],c[1],c[3]);z[3]=ca.clamp(z[3],c[1],c[3])}else{z=Ma.getIntersection(z,c)}}if(!Ma.getArea(z)){this.state=po.EMPTY}else{var w=i.getTileRangeForExtentAndZ(z,this.sourceZ_);for(var y=w.minX;y<=w.maxX;y++){for(var b=w.minY;b<=w.maxY;b++){var x=o(this.sourceZ_,y,b,h);if(x){this.sourceTiles_.push(x)}}}if(this.sourceTiles_.length===0){this.state=po.EMPTY}}};ta.inherits(ol,el);ol.prototype.disposeInternal=function(){if(this.state==po.LOADING){this.unlistenSources_()}el.prototype.disposeInternal.call(this)};ol.prototype.getImage=function(){return this.canvas_};ol.prototype.reproject_=function(){var t=[];this.sourceTiles_.forEach((function(i,s,e){if(i&&i.getState()==po.LOADED){t.push({extent:this.sourceTileGrid_.getTileCoordExtent(i.tileCoord),image:i.getImage()})}}),this);this.sourceTiles_.length=0;if(t.length===0){this.state=po.ERROR}else{var i=this.wrappedTileCoord_[0];var s=this.targetTileGrid_.getTileSize(i);var e=typeof s==="number"?s:s[0];var r=typeof s==="number"?s:s[1];var n=this.targetTileGrid_.getResolution(i);var h=this.sourceTileGrid_.getResolution(this.sourceZ_);var a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=hl.render(e,r,this.pixelRatio_,h,this.sourceTileGrid_.getExtent(),n,a,this.triangulation_,t,this.gutter_,this.renderEdges_);this.state=po.LOADED}this.changed()};ol.prototype.load=function(){if(this.state==po.IDLE){this.state=po.LOADING;this.changed();var t=0;this.sourcesListenerKeys_=[];this.sourceTiles_.forEach((function(i,s,e){var r=i.getState();if(r==po.IDLE||r==po.LOADING){t++;var n;n=ra.listen(i,oa.CHANGE,(function(s){var e=i.getState();if(e==po.LOADED||e==po.ERROR||e==po.EMPTY){ra.unlistenByKey(n);t--;if(t===0){this.unlistenSources_();this.reproject_()}}}),this);this.sourcesListenerKeys_.push(n)}}),this);this.sourceTiles_.forEach((function(t,i,s){var e=t.getState();if(e==po.IDLE){t.load()}}));if(t===0){setTimeout(this.reproject_.bind(this),0)}}};ol.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(ra.unlistenByKey);this.sourcesListenerKeys_=null};var fl=function(t){this.minZoom=t.minZoom!==undefined?t.minZoom:0;this.resolutions_=t.resolutions;va.assert(pa.isSorted(this.resolutions_,(function(t,i){return i-t}),true),17);var i;if(!t.origins){for(var s=0,e=this.resolutions_.length-1;s<e;++s){if(!i){i=this.resolutions_[s]/this.resolutions_[s+1]}else{if(this.resolutions_[s]/this.resolutions_[s+1]!==i){i=undefined;break}}}}this.zoomFactor_=i;this.maxZoom=this.resolutions_.length-1;this.origin_=t.origin!==undefined?t.origin:null;this.origins_=null;if(t.origins!==undefined){this.origins_=t.origins;va.assert(this.origins_.length==this.resolutions_.length,20)}var r=t.extent;if(r!==undefined&&!this.origin_&&!this.origins_){this.origin_=Ma.getTopLeft(r)}va.assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18);this.tileSizes_=null;if(t.tileSizes!==undefined){this.tileSizes_=t.tileSizes;va.assert(this.tileSizes_.length==this.resolutions_.length,19)}this.tileSize_=t.tileSize!==undefined?t.tileSize:!this.tileSizes_?ta.DEFAULT_TILE_SIZE:null;va.assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22);this.extent_=r!==undefined?r:null;this.fullTileRanges_=null;this.tmpSize_=[0,0];if(t.sizes!==undefined){this.fullTileRanges_=t.sizes.map((function(t,i){var s=new If(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));return s}),this)}else if(r){this.calculateTileRanges_(r)}};fl.tmpTileCoord_=[0,0,0];fl.prototype.forEachTileCoord=function(t,i,s){var e=this.getTileRangeForExtentAndZ(t,i);for(var r=e.minX,n=e.maxX;r<=n;++r){for(var h=e.minY,a=e.maxY;h<=a;++h){s([i,r,h])}}};fl.prototype.forEachTileCoordParentTileRange=function(t,i,s,e,r){var n,h,a;var o=null;var f=t[0]-1;if(this.zoomFactor_===2){h=t[1];a=t[2]}else{o=this.getTileCoordExtent(t,r)}while(f>=this.minZoom){if(this.zoomFactor_===2){h=Math.floor(h/2);a=Math.floor(a/2);n=If.createOrUpdate(h,h,a,a,e)}else{n=this.getTileRangeForExtentAndZ(o,f,e)}if(i.call(s,f,n)){return true}--f}return false};fl.prototype.getExtent=function(){return this.extent_};fl.prototype.getMaxZoom=function(){return this.maxZoom};fl.prototype.getMinZoom=function(){return this.minZoom};fl.prototype.getOrigin=function(t){if(this.origin_){return this.origin_}else{return this.origins_[t]}};fl.prototype.getResolution=function(t){return this.resolutions_[t]};fl.prototype.getResolutions=function(){return this.resolutions_};fl.prototype.getTileCoordChildTileRange=function(t,i,s){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){var e=t[1]*2;var r=t[2]*2;return If.createOrUpdate(e,e+1,r,r+1,i)}var n=this.getTileCoordExtent(t,s);return this.getTileRangeForExtentAndZ(n,t[0]+1,i)}return null};fl.prototype.getTileRangeExtent=function(t,i,s){var e=this.getOrigin(t);var r=this.getResolution(t);var n=Oo.toSize(this.getTileSize(t),this.tmpSize_);var h=e[0]+i.minX*n[0]*r;var a=e[0]+(i.maxX+1)*n[0]*r;var o=e[1]+i.minY*n[1]*r;var f=e[1]+(i.maxY+1)*n[1]*r;return Ma.createOrUpdate(h,o,a,f,s)};fl.prototype.getTileRangeForExtentAndZ=function(t,i,s){var e=fl.tmpTileCoord_;this.getTileCoordForXYAndZ_(t[0],t[1],i,false,e);var r=e[1];var n=e[2];this.getTileCoordForXYAndZ_(t[2],t[3],i,true,e);return If.createOrUpdate(r,e[1],n,e[2],s)};fl.prototype.getTileCoordCenter=function(t){var i=this.getOrigin(t[0]);var s=this.getResolution(t[0]);var e=Oo.toSize(this.getTileSize(t[0]),this.tmpSize_);return[i[0]+(t[1]+.5)*e[0]*s,i[1]+(t[2]+.5)*e[1]*s]};fl.prototype.getTileCoordExtent=function(t,i){var s=this.getOrigin(t[0]);var e=this.getResolution(t[0]);var r=Oo.toSize(this.getTileSize(t[0]),this.tmpSize_);var n=s[0]+t[1]*r[0]*e;var h=s[1]+t[2]*r[1]*e;var a=n+r[0]*e;var o=h+r[1]*e;return Ma.createOrUpdate(n,h,a,o,i)};fl.prototype.getTileCoordForCoordAndResolution=function(t,i,s){return this.getTileCoordForXYAndResolution_(t[0],t[1],i,false,s)};fl.prototype.getTileCoordForXYAndResolution_=function(t,i,s,e,r){var n=this.getZForResolution(s);var h=s/this.getResolution(n);var a=this.getOrigin(n);var o=Oo.toSize(this.getTileSize(n),this.tmpSize_);var f=e?.5:0;var u=e?0:.5;var l=Math.floor((t-a[0])/s+f);var v=Math.floor((i-a[1])/s+u);var c=h*l/o[0];var d=h*v/o[1];if(e){c=Math.ceil(c)-1;d=Math.ceil(d)-1}else{c=Math.floor(c);d=Math.floor(d)}return il.createOrUpdate(n,c,d,r)};fl.prototype.getTileCoordForXYAndZ_=function(t,i,s,e,r){var n=this.getOrigin(s);var h=this.getResolution(s);var a=Oo.toSize(this.getTileSize(s),this.tmpSize_);var o=e?.5:0;var f=e?0:.5;var u=Math.floor((t-n[0])/h+o);var l=Math.floor((i-n[1])/h+f);var v=u/a[0];var c=l/a[1];if(e){v=Math.ceil(v)-1;c=Math.ceil(c)-1}else{v=Math.floor(v);c=Math.floor(c)}return il.createOrUpdate(s,v,c,r)};fl.prototype.getTileCoordForCoordAndZ=function(t,i,s){return this.getTileCoordForXYAndZ_(t[0],t[1],i,false,s)};fl.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]};fl.prototype.getTileSize=function(t){if(this.tileSize_){return this.tileSize_}else{return this.tileSizes_[t]}};fl.prototype.getFullTileRange=function(t){if(!this.fullTileRanges_){return null}else{return this.fullTileRanges_[t]}};fl.prototype.getZForResolution=function(t,i){var s=pa.linearFindNearest(this.resolutions_,t,i||0);return ca.clamp(s,this.minZoom,this.maxZoom)};fl.prototype.calculateTileRanges_=function(t){var i=this.resolutions_.length;var s=new Array(i);for(var e=this.minZoom;e<i;++e){s[e]=this.getTileRangeForExtentAndZ(t,e)}this.fullTileRanges_=s};var ul={};ul.getForProjection=function(t){var i=t.getDefaultTileGrid();if(!i){i=ul.createForProjection(t);t.setDefaultTileGrid(i)}return i};ul.wrapX=function(t,i,s){var e=i[0];var r=t.getTileCoordCenter(i);var n=ul.extentFromProjection(s);if(!Ma.containsCoordinate(n,r)){var h=Ma.getWidth(n);var a=Math.ceil((n[0]-r[0])/h);r[0]+=h*a;return t.getTileCoordForCoordAndZ(r,e)}else{return i}};ul.createForExtent=function(t,i,s,e){var r=e!==undefined?e:_a.TOP_LEFT;var n=ul.resolutionsFromExtent(t,i,s);return new fl({extent:t,origin:Ma.getCorner(t,r),resolutions:n,tileSize:s})};ul.createXYZ=function(t){var i={};ea.assign(i,t!==undefined?t:{});if(i.extent===undefined){i.extent=Na.get("EPSG:3857").getExtent()}i.resolutions=ul.resolutionsFromExtent(i.extent,i.maxZoom,i.tileSize);delete i.maxZoom;return new fl(i)};ul.resolutionsFromExtent=function(t,i,s){var e=i!==undefined?i:ta.DEFAULT_MAX_ZOOM;var r=Ma.getHeight(t);var n=Ma.getWidth(t);var h=Oo.toSize(s!==undefined?s:ta.DEFAULT_TILE_SIZE);var a=Math.max(n/h[0],r/h[1]);var o=e+1;var f=new Array(o);for(var u=0;u<o;++u){f[u]=a/Math.pow(2,u)}return f};ul.createForProjection=function(t,i,s,e){var r=ul.extentFromProjection(t);return ul.createForExtent(r,i,s,e)};ul.extentFromProjection=function(t){t=Na.get(t);var i=t.getExtent();if(!i){var s=180*Na.METERS_PER_UNIT[ba.DEGREES]/t.getMetersPerUnit();i=Ma.createOrUpdate(-s,-s,s,s)}return i};var ll=function(t){this.html_=t.html;this.tileRanges_=t.tileRanges?t.tileRanges:null};ll.prototype.getHTML=function(){return this.html_};ll.prototype.intersectsAnyTileRange=function(t,i,s){if(!this.tileRanges_){return true}var e,r,n,h;for(h in t){if(!(h in this.tileRanges_)){continue}n=t[h];var a;for(e=0,r=this.tileRanges_[h].length;e<r;++e){a=this.tileRanges_[h][e];if(a.intersects(n)){return true}var o=i.getTileRangeForExtentAndZ(ul.extentFromProjection(s),parseInt(h,10));var f=o.getWidth();if(n.minX<o.minX||n.maxX>o.maxX){if(a.intersects(new If(ca.modulo(n.minX,f),ca.modulo(n.maxX,f),n.minY,n.maxY))){return true}if(n.getWidth()>f&&a.intersects(o)){return true}}}}return false};var vl=function(t){ua.call(this);this.projection_=Na.get(t.projection);this.attributions_=null;this.attributions2_=this.adaptAttributions_(t.attributions);this.logo_=t.logo;this.state_=t.state!==undefined?t.state:Io.READY;this.wrapX_=t.wrapX!==undefined?t.wrapX:false};ta.inherits(vl,ua);vl.prototype.adaptAttributions_=function(t){if(!t){return null}if(t instanceof ll){this.attributions_=[t];return function(i){return[t.getHTML()]}}if(Array.isArray(t)){if(t[0]instanceof ll){this.attributions_=t;var i=t.map((function(t){return t.getHTML()}));return function(t){return i}}this.attributions_=t.map((function(t){return new ll({html:t})}));return function(i){return t}}if(typeof t==="function"){return t}this.attributions_=[new ll({html:t})];return function(i){return[t]}};vl.prototype.forEachFeatureAtCoordinate=ta.nullFunction;vl.prototype.getAttributions=function(){return this.attributions_};vl.prototype.getAttributions2=function(){return this.attributions2_};vl.prototype.getLogo=function(){return this.logo_};vl.prototype.getProjection=function(){return this.projection_};vl.prototype.getResolutions=function(){};vl.prototype.getState=function(){return this.state_};vl.prototype.getWrapX=function(){return this.wrapX_};vl.prototype.refresh=function(){this.changed()};vl.prototype.setAttributions=function(t){this.attributions2_=this.adaptAttributions_(t);this.changed()};vl.prototype.setLogo=function(t){this.logo_=t};vl.prototype.setState=function(t){this.state_=t;this.changed()};var cl=function(t){vl.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX});this.opaque_=t.opaque!==undefined?t.opaque:false;this.tilePixelRatio_=t.tilePixelRatio!==undefined?t.tilePixelRatio:1;this.tileGrid=t.tileGrid!==undefined?t.tileGrid:null;this.tileCache=new nl(t.cacheSize);this.tmpSize=[0,0];this.key_="";this.tileOptions={transition:t.transition}};ta.inherits(cl,vl);cl.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()};cl.prototype.expireCache=function(t,i){var s=this.getTileCacheForProjection(t);if(s){s.expireCache(i)}};cl.prototype.forEachLoadedTile=function(t,i,s,e){var r=this.getTileCacheForProjection(t);if(!r){return false}var n=true;var h,a,o;for(var f=s.minX;f<=s.maxX;++f){for(var u=s.minY;u<=s.maxY;++u){a=il.getKeyZXY(i,f,u);o=false;if(r.containsKey(a)){h=r.get(a);o=h.getState()===po.LOADED;if(o){o=e(h)!==false}}if(!o){n=false}}}return n};cl.prototype.getGutter=function(t){return 0};cl.prototype.getKey=function(){return this.key_};cl.prototype.setKey=function(t){if(this.key_!==t){this.key_=t;this.changed()}};cl.prototype.getOpaque=function(t){return this.opaque_};cl.prototype.getResolutions=function(){return this.tileGrid.getResolutions()};cl.prototype.getTile=function(t,i,s,e,r){};cl.prototype.getTileGrid=function(){return this.tileGrid};cl.prototype.getTileGridForProjection=function(t){if(!this.tileGrid){return ul.getForProjection(t)}else{return this.tileGrid}};cl.prototype.getTileCacheForProjection=function(t){var i=this.getProjection();if(i&&!Na.equivalent(i,t)){return null}else{return this.tileCache}};cl.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_};cl.prototype.getTilePixelSize=function(t,i,s){var e=this.getTileGridForProjection(s);var r=this.getTilePixelRatio(i);var n=Oo.toSize(e.getTileSize(t),this.tmpSize);if(r==1){return n}else{return Oo.scale(n,r,this.tmpSize)}};cl.prototype.getTileCoordForTileUrlFunction=function(t,i){var s=i!==undefined?i:this.getProjection();var e=this.getTileGridForProjection(s);if(this.getWrapX()&&s.isGlobal()){t=ul.wrapX(e,t,s)}return il.withinExtentAndZ(t,e)?t:null};cl.prototype.refresh=function(){this.tileCache.clear();this.changed()};cl.prototype.useTile=ta.nullFunction;cl.Event=function(t,i){ha.call(this,t);this.tile=i};ta.inherits(cl.Event,ha);var dl={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};var ml=function(t){cl.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition});this.tileLoadFunction=t.tileLoadFunction;this.tileUrlFunction=this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.nullTileUrlFunction;this.urls=null;if(t.urls){this.setUrls(t.urls)}else if(t.url){this.setUrl(t.url)}if(t.tileUrlFunction){this.setTileUrlFunction(t.tileUrlFunction)}this.tileLoadingKeys_={}};ta.inherits(ml,cl);ml.prototype.getTileLoadFunction=function(){return this.tileLoadFunction};ml.prototype.getTileUrlFunction=function(){return this.tileUrlFunction};ml.prototype.getUrls=function(){return this.urls};ml.prototype.handleTileChange=function(t){var i=t.target;var s=ta.getUid(i);var e=i.getState();var r;if(e==po.LOADING){this.tileLoadingKeys_[s]=true;r=dl.TILELOADSTART}else if(s in this.tileLoadingKeys_){delete this.tileLoadingKeys_[s];r=e==po.ERROR?dl.TILELOADERROR:e==po.LOADED||e==po.ABORT?dl.TILELOADEND:undefined}if(r!=undefined){this.dispatchEvent(new cl.Event(r,i))}};ml.prototype.setTileLoadFunction=function(t){this.tileCache.clear();this.tileLoadFunction=t;this.changed()};ml.prototype.setTileUrlFunction=function(t,i){this.tileUrlFunction=t;this.tileCache.pruneExceptNewestZ();if(typeof i!=="undefined"){this.setKey(i)}else{this.changed()}};ml.prototype.setUrl=function(t){var i=this.urls=sl.expandUrl(t);this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTemplates(i,this.tileGrid),t)};ml.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTemplates(t,this.tileGrid),i)};ml.prototype.useTile=function(t,i,s){var e=il.getKeyZXY(t,i,s);if(this.tileCache.containsKey(e)){this.tileCache.get(e)}};var pl=function(t){ml.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:pl.defaultTileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition});this.crossOrigin=t.crossOrigin!==undefined?t.crossOrigin:null;this.tileClass=t.tileClass!==undefined?t.tileClass:rl;this.tileCacheForProjection={};this.tileGridForProjection={};this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold;this.renderReprojectionEdges_=false};ta.inherits(pl,ml);pl.prototype.canExpireCache=function(){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.canExpireCache.call(this)}if(this.tileCache.canExpireCache()){return true}else{for(var t in this.tileCacheForProjection){if(this.tileCacheForProjection[t].canExpireCache()){return true}}}return false};pl.prototype.expireCache=function(t,i){if(!ta.ENABLE_RASTER_REPROJECTION){ml.prototype.expireCache.call(this,t,i);return}var s=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==s?i:{});for(var e in this.tileCacheForProjection){var r=this.tileCacheForProjection[e];r.expireCache(r==s?i:{})}};pl.prototype.getGutter=function(t){if(ta.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!Na.equivalent(this.getProjection(),t)){return 0}else{return this.getGutterInternal()}};pl.prototype.getGutterInternal=function(){return 0};pl.prototype.getOpaque=function(t){if(ta.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!Na.equivalent(this.getProjection(),t)){return false}else{return ml.prototype.getOpaque.call(this,t)}};pl.prototype.getTileGridForProjection=function(t){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.getTileGridForProjection.call(this,t)}var i=this.getProjection();if(this.tileGrid&&(!i||Na.equivalent(i,t))){return this.tileGrid}else{var s=ta.getUid(t).toString();if(!(s in this.tileGridForProjection)){this.tileGridForProjection[s]=ul.getForProjection(t)}return this.tileGridForProjection[s]}};pl.prototype.getTileCacheForProjection=function(t){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.getTileCacheForProjection.call(this,t)}var i=this.getProjection();if(!i||Na.equivalent(i,t)){return this.tileCache}else{var s=ta.getUid(t).toString();if(!(s in this.tileCacheForProjection)){this.tileCacheForProjection[s]=new nl(this.tileCache.highWaterMark)}return this.tileCacheForProjection[s]}};pl.prototype.createTile_=function(t,i,s,e,r,n){var h=[t,i,s];var a=this.getTileCoordForTileUrlFunction(h,r);var o=a?this.tileUrlFunction(a,e,r):undefined;var f=new this.tileClass(h,o!==undefined?po.IDLE:po.EMPTY,o!==undefined?o:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);f.key=n;ra.listen(f,oa.CHANGE,this.handleTileChange,this);return f};pl.prototype.getTile=function(t,i,s,e,r){var n=this.getProjection();if(!ta.ENABLE_RASTER_REPROJECTION||!n||!r||Na.equivalent(n,r)){return this.getTileInternal(t,i,s,e,n||r)}else{var h=this.getTileCacheForProjection(r);var a=[t,i,s];var o;var f=il.getKey(a);if(h.containsKey(f)){o=h.get(f)}var u=this.getKey();if(o&&o.key==u){return o}else{var l=this.getTileGridForProjection(n);var v=this.getTileGridForProjection(r);var c=this.getTileCoordForTileUrlFunction(a,r);var d=new ol(n,l,r,v,a,c,this.getTilePixelRatio(e),this.getGutterInternal(),function(t,i,s,e){return this.getTileInternal(t,i,s,e,n)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);d.key=u;if(o){d.interimTile=o;d.refreshInterimChain();h.replace(f,d)}else{h.set(f,d)}return d}}};pl.prototype.getTileInternal=function(t,i,s,e,r){var n=null;var h=il.getKeyZXY(t,i,s);var a=this.getKey();if(!this.tileCache.containsKey(h)){n=this.createTile_(t,i,s,e,r,a);this.tileCache.set(h,n)}else{n=this.tileCache.get(h);if(n.key!=a){var o=n;n=this.createTile_(t,i,s,e,r,a);if(o.getState()==po.IDLE){n.interimTile=o.interimTile}else{n.interimTile=o}n.refreshInterimChain();this.tileCache.replace(h,n)}}return n};pl.prototype.setRenderReprojectionEdges=function(t){if(!ta.ENABLE_RASTER_REPROJECTION||this.renderReprojectionEdges_==t){return}this.renderReprojectionEdges_=t;for(var i in this.tileCacheForProjection){this.tileCacheForProjection[i].clear()}this.changed()};pl.prototype.setTileGridForProjection=function(t,i){if(ta.ENABLE_RASTER_REPROJECTION){var s=Na.get(t);if(s){var e=ta.getUid(s).toString();if(!(e in this.tileGridForProjection)){this.tileGridForProjection[e]=i}}}};pl.defaultTileLoadFunction=function(t,i){t.getImage().src=i};var _l={KVP:"KVP",REST:"REST"};var gl=function(t){this.matrixIds_=t.matrixIds;fl.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})};ta.inherits(gl,fl);gl.prototype.getMatrixId=function(t){return this.matrixIds_[t]};gl.prototype.getMatrixIds=function(){return this.matrixIds_};gl.createFromCapabilitiesMatrixSet=function(t,i,s){var e=[];var r=[];var n=[];var h=[];var a=[];var o=s!==undefined?s:[];var f="SupportedCRS";var u="TileMatrix";var l="Identifier";var v="ScaleDenominator";var c="TopLeftCorner";var d="TileWidth";var m="TileHeight";var p=t[f];var _=Na.get(p.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(p);var g=_.getMetersPerUnit();var M=_.getAxisOrientation().substr(0,2)=="ne";t[u].sort((function(t,i){return i[v]-t[v]}));t[u].forEach((function(t,i,s){var f;if(o.length>0){f=pa.find(o,(function(i,s,e){return t[l]==i[u]}))}else{f=true}if(f){r.push(t[l]);var p=t[v]*28e-5/g;var _=t[d];var z=t[m];if(M){n.push([t[c][1],t[c][0]])}else{n.push(t[c])}e.push(p);h.push(_==z?_:[_,z]);a.push([t["MatrixWidth"],-t["MatrixHeight"]])}}));return new gl({extent:i,origins:n,resolutions:e,matrixIds:r,tileSizes:h,sizes:a})};var Ml={};Ml.appendParams=function(t,i){var s=[];Object.keys(i).forEach((function(t){if(i[t]!==null&&i[t]!==undefined){s.push(t+"="+encodeURIComponent(i[t]))}}));var e=s.join("&");t=t.replace(/[?&]$/,"");t=t.indexOf("?")===-1?t+"?":t+"&";return t+e};var zl=function(t){this.version_=t.version!==undefined?t.version:"1.0.0";this.format_=t.format!==undefined?t.format:"image/jpeg";this.dimensions_=t.dimensions!==undefined?t.dimensions:{};this.layer_=t.layer;this.matrixSet_=t.matrixSet;this.style_=t.style;var i=t.urls;if(i===undefined&&t.url!==undefined){i=sl.expandUrl(t.url)}this.requestEncoding_=t.requestEncoding!==undefined?t.requestEncoding:_l.KVP;var s=this.requestEncoding_;var e=t.tileGrid;var r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};if(s==_l.KVP){ea.assign(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_})}var n=this.dimensions_;this.createFromWMTSTemplate_=function(t){t=s==_l.KVP?Ml.appendParams(t,r):t.replace(/\{(\w+?)\}/g,(function(t,i){return i.toLowerCase()in r?r[i.toLowerCase()]:t}));return function(i,r,h){if(!i){return undefined}else{var a={TileMatrix:e.getMatrixId(i[0]),TileCol:i[1],TileRow:-i[2]-1};ea.assign(a,n);var o=t;if(s==_l.KVP){o=Ml.appendParams(o,a)}else{o=o.replace(/\{(\w+?)\}/g,(function(t,i){return a[i]}))}return o}}};var h=i&&i.length>0?sl.createFromTileUrlFunctions(i.map(this.createFromWMTSTemplate_)):sl.nullTileUrlFunction;pl.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:e,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:h,urls:i,wrapX:t.wrapX!==undefined?t.wrapX:false,transition:t.transition});this.setKey(this.getKeyForDimensions_())};ta.inherits(zl,pl);zl.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTileUrlFunctions(t.map(this.createFromWMTSTemplate_.bind(this))),i)};zl.prototype.getDimensions=function(){return this.dimensions_};zl.prototype.getFormat=function(){return this.format_};zl.prototype.getLayer=function(){return this.layer_};zl.prototype.getMatrixSet=function(){return this.matrixSet_};zl.prototype.getRequestEncoding=function(){return this.requestEncoding_};zl.prototype.getStyle=function(){return this.style_};zl.prototype.getVersion=function(){return this.version_};zl.prototype.getKeyForDimensions_=function(){var t=0;var i=[];for(var s in this.dimensions_){i[t++]=s+"-"+this.dimensions_[s]}return i.join("/")};zl.prototype.updateDimensions=function(t){ea.assign(this.dimensions_,t);this.setKey(this.getKeyForDimensions_())};zl.optionsFromCapabilities=function(t,i){var s=t["Contents"]["Layer"];var e=pa.find(s,(function(t,s,e){return t["Identifier"]==i["layer"]}));if(e===null){return null}var r=t["Contents"]["TileMatrixSet"];var n,h,a;if(e["TileMatrixSetLink"].length>1){if("projection"in i){n=pa.findIndex(e["TileMatrixSetLink"],(function(t,s,e){var n=pa.find(r,(function(i){return i["Identifier"]==t["TileMatrixSet"]}));var h=n["SupportedCRS"];var a=Na.get(h.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(h);var o=Na.get(i["projection"]);if(a&&o){return Na.equivalent(a,o)}else{return h==i["projection"]}}))}else{n=pa.findIndex(e["TileMatrixSetLink"],(function(t,s,e){return t["TileMatrixSet"]==i["matrixSet"]}))}}else{n=0}if(n<0){n=0}h=e["TileMatrixSetLink"][n]["TileMatrixSet"];a=e["TileMatrixSetLink"][n]["TileMatrixSetLimits"];var o=e["Format"][0];if("format"in i){o=i["format"]}n=pa.findIndex(e["Style"],(function(t,s,e){if("style"in i){return t["Title"]==i["style"]}else{return t["isDefault"]}}));if(n<0){n=0}var f=e["Style"][n]["Identifier"];var u={};if("Dimension"in e){e["Dimension"].forEach((function(t,i,s){var e=t["Identifier"];var r=t["Default"];if(r===undefined){r=t["Value"][0]}u[e]=r}))}var l=t["Contents"]["TileMatrixSet"];var v=pa.find(l,(function(t,i,s){return t["Identifier"]==h}));var c;var d=v["SupportedCRS"];if(d){c=Na.get(d.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(d)}if("projection"in i){var m=Na.get(i["projection"]);if(m){if(!c||Na.equivalent(m,c)){c=m}}}var p=e["WGS84BoundingBox"];var _,g;if(p!==undefined){var M=Na.get("EPSG:4326").getExtent();g=p[0]==M[0]&&p[2]==M[2];_=Na.transformExtent(p,"EPSG:4326",c);var z=c.getExtent();if(z){if(!Ma.containsExtent(z,_)){_=undefined}}}var w=gl.createFromCapabilitiesMatrixSet(v,_,a);var y=[];var b=i["requestEncoding"];b=b!==undefined?b:"";if("OperationsMetadata"in t&&"GetTile"in t["OperationsMetadata"]){var x=t["OperationsMetadata"]["GetTile"]["DCP"]["HTTP"]["Get"];for(var E=0,S=x.length;E<S;++E){if(x[E]["Constraint"]){var G=pa.find(x[E]["Constraint"],(function(t){return t["name"]=="GetEncoding"}));var P=G["AllowedValues"]["Value"];if(b===""){b=P[0]}if(b===_l.KVP){if(pa.includes(P,_l.KVP)){y.push(x[E]["href"])}}else{break}}else if(x[E]["href"]){b=_l.KVP;y.push(x[E]["href"])}}}if(y.length===0){b=_l.REST;e["ResourceURL"].forEach((function(t){if(t["resourceType"]==="tile"){o=t["format"];y.push(t["template"])}}))}return{urls:y,layer:i["layer"],matrixSet:h,format:o,projection:c,requestEncoding:b,tileGrid:w,style:f,dimensions:u,wrapX:g,crossOrigin:i["crossOrigin"]}};var wl={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};var yl={};yl.DOCUMENT=document.implementation.createDocument("","",null);yl.createElementNS=function(t,i){return yl.DOCUMENT.createElementNS(t,i)};yl.getAllTextContent=function(t,i){return yl.getAllTextContent_(t,i,[]).join("")};yl.getAllTextContent_=function(t,i,s){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE){if(i){s.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,""))}else{s.push(t.nodeValue)}}else{var e;for(e=t.firstChild;e;e=e.nextSibling){yl.getAllTextContent_(e,i,s)}}return s};yl.isDocument=function(t){return t instanceof Document};yl.isNode=function(t){return t instanceof Node};yl.getAttributeNS=function(t,i,s){return t.getAttributeNS(i,s)||""};yl.setAttributeNS=function(t,i,s,e){t.setAttributeNS(i,s,e)};yl.parse=function(t){return(new DOMParser).parseFromString(t,"application/xml")};yl.makeArrayExtender=function(t,i){return function(s,e){var r=t.call(i,s,e);if(r!==undefined){var n=e[e.length-1];pa.extend(n,r)}}};yl.makeArrayPusher=function(t,i){return function(s,e){var r=t.call(i!==undefined?i:this,s,e);if(r!==undefined){var n=e[e.length-1];n.push(r)}}};yl.makeReplacer=function(t,i){return function(s,e){var r=t.call(i!==undefined?i:this,s,e);if(r!==undefined){e[e.length-1]=r}}};yl.makeObjectPropertyPusher=function(t,i,s){return function(e,r){var n=t.call(s!==undefined?s:this,e,r);if(n!==undefined){var h=r[r.length-1];var a=i!==undefined?i:e.localName;var o;if(a in h){o=h[a]}else{o=h[a]=[]}o.push(n)}}};yl.makeObjectPropertySetter=function(t,i,s){return function(e,r){var n=t.call(s!==undefined?s:this,e,r);if(n!==undefined){var h=r[r.length-1];var a=i!==undefined?i:e.localName;h[a]=n}}};yl.makeChildAppender=function(t,i){return function(s,e,r){t.call(i!==undefined?i:this,s,e,r);var n=r[r.length-1];var h=n.node;h.appendChild(s)}};yl.makeArraySerializer=function(t,i){var s,e;return function(i,r,n){if(s===undefined){s={};var h={};h[i.localName]=t;s[i.namespaceURI]=h;e=yl.makeSimpleNodeFactory(i.localName)}yl.serialize(s,e,r,n)}};yl.makeSimpleNodeFactory=function(t,i){var s=t;return function(t,e,r){var n=e[e.length-1];var h=n.node;var a=s;if(a===undefined){a=r}var o=i;if(i===undefined){o=h.namespaceURI}return yl.createElementNS(o,a)}};yl.OBJECT_PROPERTY_NODE_FACTORY=yl.makeSimpleNodeFactory();yl.makeSequence=function(t,i){var s=i.length;var e=new Array(s);for(var r=0;r<s;++r){e[r]=t[i[r]]}return e};yl.makeStructureNS=function(t,i,s){var e=s!==undefined?s:{};var r,n;for(r=0,n=t.length;r<n;++r){e[t[r]]=i}return e};yl.parseNode=function(t,i,s,e){var r;for(r=i.firstElementChild;r;r=r.nextElementSibling){var n=t[r.namespaceURI];if(n!==undefined){var h=n[r.localName];if(h!==undefined){h.call(e,r,s)}}}};yl.pushParseAndPop=function(t,i,s,e,r){e.push(t);yl.parseNode(i,s,e,r);return e.pop()};yl.serialize=function(t,i,s,e,r,n){var h=(r!==undefined?r:s).length;var a,o;for(var f=0;f<h;++f){a=s[f];if(a!==undefined){o=i.call(n,a,e,r!==undefined?r[f]:undefined);if(o!==undefined){t[o.namespaceURI][o.localName].call(n,o,a,e)}}}};yl.pushSerializeAndPop=function(t,i,s,e,r,n,h){r.push(t);yl.serialize(i,s,e,r,n,h);return r.pop()};var bl={};bl.loadFeaturesXhr=function(t,i,s,e){return function(r,n,h){var a=new XMLHttpRequest;a.open("GET",typeof t==="function"?t(r,n,h):t,true);if(i.getType()==wl.ARRAY_BUFFER){a.responseType="arraybuffer"}a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=i.getType();var n;if(r==wl.JSON||r==wl.TEXT){n=a.responseText}else if(r==wl.XML){n=a.responseXML;if(!n){n=yl.parse(a.responseText)}}else if(r==wl.ARRAY_BUFFER){n=a.response}if(n){s.call(this,i.readFeatures(n,{featureProjection:h}),i.readProjection(n),i.getLastExtent())}else{e.call(this)}}else{e.call(this)}}.bind(this);a.onerror=function(){e.call(this)}.bind(this);a.send()}};bl.xhr=function(t,i){return bl.loadFeaturesXhr(t,i,(function(t,i){this.addFeatures(t)}),ta.nullFunction)};var xl={};xl.all=function(t,i){return[[-Infinity,-Infinity,Infinity,Infinity]]};xl.bbox=function(t,i){return[t]};xl.tile=function(t){return function(i,s){var e=t.getZForResolution(s);var r=t.getTileRangeForExtentAndZ(i,e);var n=[];var h=[e,0,0];for(h[1]=r.minX;h[1]<=r.maxX;++h[1]){for(h[2]=r.minY;h[2]<=r.maxY;++h[2]){n.push(t.getTileCoordExtent(h))}}return n}};var El={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature"};var Sl=function(t){var i=t||{};vl.call(this,{attributions:i.attributions,logo:i.logo,projection:undefined,state:Io.READY,wrapX:i.wrapX!==undefined?i.wrapX:true});this.loader_=ta.nullFunction;this.format_=i.format;this.overlaps_=i.overlaps==undefined?true:i.overlaps;this.url_=i.url;if(i.loader!==undefined){this.loader_=i.loader}else if(this.url_!==undefined){va.assert(this.format_,7);this.loader_=bl.xhr(this.url_,this.format_)}this.strategy_=i.strategy!==undefined?i.strategy:xl.all;var s=i.useSpatialIndex!==undefined?i.useSpatialIndex:true;this.featuresRtree_=s?new Nu:null;this.loadedExtentsRtree_=new Nu;this.nullGeometryFeatures_={};this.idIndex_={};this.undefIdIndex_={};this.featureChangeKeys_={};this.featuresCollection_=null;var e,r;if(i.features instanceof Qa){e=i.features;r=e.getArray()}else if(Array.isArray(i.features)){r=i.features}if(!s&&e===undefined){e=new Qa(r)}if(r!==undefined){this.addFeaturesInternal(r)}if(e!==undefined){this.bindFeaturesCollection_(e)}};ta.inherits(Sl,vl);Sl.prototype.addFeature=function(t){this.addFeatureInternal(t);this.changed()};Sl.prototype.addFeatureInternal=function(t){var i=ta.getUid(t).toString();if(!this.addToIndex_(i,t)){return}this.setupChangeEvents_(i,t);var s=t.getGeometry();if(s){var e=s.getExtent();if(this.featuresRtree_){this.featuresRtree_.insert(e,t)}}else{this.nullGeometryFeatures_[i]=t}this.dispatchEvent(new Sl.Event(El.ADDFEATURE,t))};Sl.prototype.setupChangeEvents_=function(t,i){this.featureChangeKeys_[t]=[ra.listen(i,oa.CHANGE,this.handleFeatureChange_,this),ra.listen(i,sa.PROPERTYCHANGE,this.handleFeatureChange_,this)]};Sl.prototype.addToIndex_=function(t,i){var s=true;var e=i.getId();if(e!==undefined){if(!(e.toString()in this.idIndex_)){this.idIndex_[e.toString()]=i}else{s=false}}else{va.assert(!(t in this.undefIdIndex_),30);this.undefIdIndex_[t]=i}return s};Sl.prototype.addFeatures=function(t){this.addFeaturesInternal(t);this.changed()};Sl.prototype.addFeaturesInternal=function(t){var i,s,e,r;var n=[];var h=[];var a=[];for(s=0,e=t.length;s<e;s++){r=t[s];i=ta.getUid(r).toString();if(this.addToIndex_(i,r)){h.push(r)}}for(s=0,e=h.length;s<e;s++){r=h[s];i=ta.getUid(r).toString();this.setupChangeEvents_(i,r);var o=r.getGeometry();if(o){var f=o.getExtent();n.push(f);a.push(r)}else{this.nullGeometryFeatures_[i]=r}}if(this.featuresRtree_){this.featuresRtree_.load(n,a)}for(s=0,e=h.length;s<e;s++){this.dispatchEvent(new Sl.Event(El.ADDFEATURE,h[s]))}};Sl.prototype.bindFeaturesCollection_=function(t){var i=false;ra.listen(this,El.ADDFEATURE,(function(s){if(!i){i=true;t.push(s.feature);i=false}}));ra.listen(this,El.REMOVEFEATURE,(function(s){if(!i){i=true;t.remove(s.feature);i=false}}));ra.listen(t,$a.ADD,(function(t){if(!i){i=true;this.addFeature(t.element);i=false}}),this);ra.listen(t,$a.REMOVE,(function(t){if(!i){i=true;this.removeFeature(t.element);i=false}}),this);this.featuresCollection_=t};Sl.prototype.clear=function(t){if(t){for(var i in this.featureChangeKeys_){var s=this.featureChangeKeys_[i];s.forEach(ra.unlistenByKey)}if(!this.featuresCollection_){this.featureChangeKeys_={};this.idIndex_={};this.undefIdIndex_={}}}else{if(this.featuresRtree_){this.featuresRtree_.forEach(this.removeFeatureInternal,this);for(var e in this.nullGeometryFeatures_){this.removeFeatureInternal(this.nullGeometryFeatures_[e])}}}if(this.featuresCollection_){this.featuresCollection_.clear()}if(this.featuresRtree_){this.featuresRtree_.clear()}this.loadedExtentsRtree_.clear();this.nullGeometryFeatures_={};var r=new Sl.Event(El.CLEAR);this.dispatchEvent(r);this.changed()};Sl.prototype.forEachFeature=function(t,i){if(this.featuresRtree_){return this.featuresRtree_.forEach(t,i)}else if(this.featuresCollection_){return this.featuresCollection_.forEach(t,i)}};Sl.prototype.forEachFeatureAtCoordinateDirect=function(t,i,s){var e=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(e,(function(e){var r=e.getGeometry();if(r.intersectsCoordinate(t)){return i.call(s,e)}else{return undefined}}))};Sl.prototype.forEachFeatureInExtent=function(t,i,s){if(this.featuresRtree_){return this.featuresRtree_.forEachInExtent(t,i,s)}else if(this.featuresCollection_){return this.featuresCollection_.forEach(i,s)}};Sl.prototype.forEachFeatureIntersectingExtent=function(t,i,s){return this.forEachFeatureInExtent(t,(function(e){var r=e.getGeometry();if(r.intersectsExtent(t)){var n=i.call(s,e);if(n){return n}}}))};Sl.prototype.getFeaturesCollection=function(){return this.featuresCollection_};Sl.prototype.getFeatures=function(){var t;if(this.featuresCollection_){t=this.featuresCollection_.getArray()}else if(this.featuresRtree_){t=this.featuresRtree_.getAll();if(!ea.isEmpty(this.nullGeometryFeatures_)){pa.extend(t,ea.getValues(this.nullGeometryFeatures_))}}return t};Sl.prototype.getFeaturesAtCoordinate=function(t){var i=[];this.forEachFeatureAtCoordinateDirect(t,(function(t){i.push(t)}));return i};Sl.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_.getInExtent(t)};Sl.prototype.getClosestFeatureToCoordinate=function(t,i){var s=t[0];var e=t[1];var r=null;var n=[NaN,NaN];var h=Infinity;var a=[-Infinity,-Infinity,Infinity,Infinity];var o=i?i:wa.TRUE;this.featuresRtree_.forEachInExtent(a,(function(t){if(o(t)){var i=t.getGeometry();var f=h;h=i.closestPointXY(s,e,n,h);if(h<f){r=t;var u=Math.sqrt(h);a[0]=s-u;a[1]=e-u;a[2]=s+u;a[3]=e+u}}}));return r};Sl.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)};Sl.prototype.getFeatureById=function(t){var i=this.idIndex_[t.toString()];return i!==undefined?i:null};Sl.prototype.getFormat=function(){return this.format_};Sl.prototype.getOverlaps=function(){return this.overlaps_};Sl.prototype.getResolutions=function(){};Sl.prototype.getUrl=function(){return this.url_};Sl.prototype.handleFeatureChange_=function(t){var i=t.target;var s=ta.getUid(i).toString();var e=i.getGeometry();if(!e){if(!(s in this.nullGeometryFeatures_)){if(this.featuresRtree_){this.featuresRtree_.remove(i)}this.nullGeometryFeatures_[s]=i}}else{var r=e.getExtent();if(s in this.nullGeometryFeatures_){delete this.nullGeometryFeatures_[s];if(this.featuresRtree_){this.featuresRtree_.insert(r,i)}}else{if(this.featuresRtree_){this.featuresRtree_.update(r,i)}}}var n=i.getId();if(n!==undefined){var h=n.toString();if(s in this.undefIdIndex_){delete this.undefIdIndex_[s];this.idIndex_[h]=i}else{if(this.idIndex_[h]!==i){this.removeFromIdIndex_(i);this.idIndex_[h]=i}}}else{if(!(s in this.undefIdIndex_)){this.removeFromIdIndex_(i);this.undefIdIndex_[s]=i}}this.changed();this.dispatchEvent(new Sl.Event(El.CHANGEFEATURE,i))};Sl.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&ea.isEmpty(this.nullGeometryFeatures_)};Sl.prototype.loadFeatures=function(t,i,s){var e=this.loadedExtentsRtree_;var r=this.strategy_(t,i);var n,h;for(n=0,h=r.length;n<h;++n){var a=r[n];var o=e.forEachInExtent(a,(function(t){return Ma.containsExtent(t.extent,a)}));if(!o){this.loader_.call(this,a,i,s);e.insert(a,{extent:a.slice()})}}};Sl.prototype.removeLoadedExtent=function(t){var i=this.loadedExtentsRtree_;var s;i.forEachInExtent(t,(function(i){if(Ma.equals(i.extent,t)){s=i;return true}}));if(s){i.remove(s)}};Sl.prototype.removeFeature=function(t){var i=ta.getUid(t).toString();if(i in this.nullGeometryFeatures_){delete this.nullGeometryFeatures_[i]}else{if(this.featuresRtree_){this.featuresRtree_.remove(t)}}this.removeFeatureInternal(t);this.changed()};Sl.prototype.removeFeatureInternal=function(t){var i=ta.getUid(t).toString();this.featureChangeKeys_[i].forEach(ra.unlistenByKey);delete this.featureChangeKeys_[i];var s=t.getId();if(s!==undefined){delete this.idIndex_[s.toString()]}else{delete this.undefIdIndex_[i]}this.dispatchEvent(new Sl.Event(El.REMOVEFEATURE,t))};Sl.prototype.removeFromIdIndex_=function(t){var i=false;for(var s in this.idIndex_){if(this.idIndex_[s]===t){delete this.idIndex_[s];i=true;break}}return i};Sl.prototype.setLoader=function(t){this.loader_=t};Sl.Event=function(t,i){ha.call(this,t);this.feature=i};ta.inherits(Sl.Event,ha);var Gl={};Gl.lineString=function(t,i,s,e,r,n){var h=NaN;var a=NaN;var o=(s-i)/e;if(o===1){h=t[i];a=t[i+1]}else if(o==2){h=(1-r)*t[i]+r*t[i+e];a=(1-r)*t[i+1]+r*t[i+e+1]}else if(o!==0){var f=t[i];var u=t[i+1];var l=0;var v=[0];var c;for(c=i+e;c<s;c+=e){var d=t[c];var m=t[c+1];l+=Math.sqrt((d-f)*(d-f)+(m-u)*(m-u));v.push(l);f=d;u=m}var p=r*l;var _=pa.binarySearch(v,p);if(_<0){var g=(p-v[-_-2])/(v[-_-1]-v[-_-2]);var M=i+(-_-2)*e;h=ca.lerp(t[M],t[M+e],g);a=ca.lerp(t[M+1],t[M+e+1],g)}else{h=t[i+_*e];a=t[i+_*e+1]}}if(n){n[0]=h;n[1]=a;return n}else{return[h,a]}};Gl.lineStringCoordinateAtM=function(t,i,s,e,r,n){if(s==i){return null}var h;if(r<t[i+e-1]){if(n){h=t.slice(i,i+e);h[e-1]=r;return h}else{return null}}else if(t[s-1]<r){if(n){h=t.slice(s-e,s);h[e-1]=r;return h}else{return null}}if(r==t[i+e-1]){return t.slice(i,i+e)}var a=i/e;var o=s/e;while(a<o){var f=a+o>>1;if(r<t[(f+1)*e-1]){o=f}else{a=f+1}}var u=t[a*e-1];if(r==u){return t.slice((a-1)*e,(a-1)*e+e)}var l=t[(a+1)*e-1];var v=(r-u)/(l-u);h=[];var c;for(c=0;c<e-1;++c){h.push(ca.lerp(t[(a-1)*e+c],t[a*e+c],v))}h.push(r);return h};Gl.lineStringsCoordinateAtM=function(t,i,s,e,r,n,h){if(h){return Gl.lineStringCoordinateAtM(t,i,s[s.length-1],e,r,n)}var a;if(r<t[e-1]){if(n){a=t.slice(0,e);a[e-1]=r;return a}else{return null}}if(t[t.length-1]<r){if(n){a=t.slice(t.length-e);a[e-1]=r;return a}else{return null}}var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];if(i==u){continue}if(r<t[i+e-1]){return null}else if(r<=t[u-1]){return Gl.lineStringCoordinateAtM(t,i,u,e,r,false)}i=u}return null};var Pl=function(t,i){Aa.call(this);this.flatMidpoint_=null;this.flatMidpointRevision_=-1;this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.setCoordinates(t,i)};ta.inherits(Pl,Aa);Pl.prototype.appendCoordinate=function(t){if(!this.flatCoordinates){this.flatCoordinates=t.slice()}else{pa.extend(this.flatCoordinates,t)}this.changed()};Pl.prototype.clone=function(){var t=new Pl(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Pl.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,false,t,i,s,e)};Pl.prototype.forEachSegment=function(t,i){return Ua.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)};Pl.prototype.getCoordinateAtM=function(t,i){if(this.layout!=za.XYM&&this.layout!=za.XYZM){return null}var s=i!==undefined?i:false;return Gl.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,s)};Pl.prototype.getCoordinates=function(){return La.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Pl.prototype.getCoordinateAt=function(t,i){return Gl.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)};Pl.prototype.getLength=function(){return qf.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Pl.prototype.getFlatMidpoint=function(){if(this.flatMidpointRevision_!=this.getRevision()){this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_);this.flatMidpointRevision_=this.getRevision()}return this.flatMidpoint_};Pl.prototype.getSimplifiedGeometryInternal=function(t){var i=[];i.length=Fa.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0);var s=new Pl(null);s.setFlatCoordinates(za.XY,i);return s};Pl.prototype.getType=function(){return da.LINE_STRING};Pl.prototype.intersectsExtent=function(t){return qa.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)};Pl.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,1);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinates(this.flatCoordinates,0,t,this.stride);this.changed()}};Pl.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var kl={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};var Nl=function(t){var i=t?t:{};var s=ea.assign({},i);delete s.preload;delete s.useInterimTilesOnError;jo.call(this,s);this.setPreload(i.preload!==undefined?i.preload:0);this.setUseInterimTilesOnError(i.useInterimTilesOnError!==undefined?i.useInterimTilesOnError:true);this.type=df.TILE};ta.inherits(Nl,jo);Nl.prototype.getPreload=function(){return this.get(kl.PRELOAD)};Nl.prototype.setPreload=function(t){this.set(kl.PRELOAD,t)};Nl.prototype.getUseInterimTilesOnError=function(){return this.get(kl.USE_INTERIM_TILES_ON_ERROR)};Nl.prototype.setUseInterimTilesOnError=function(t){this.set(kl.USE_INTERIM_TILES_ON_ERROR,t)};var Il=function(t){var i=t?t:{};var s=ea.assign({},i);delete s.style;delete s.renderBuffer;delete s.updateWhileAnimating;delete s.updateWhileInteracting;jo.call(this,s);this.declutter_=i.declutter!==undefined?i.declutter:false;this.renderBuffer_=i.renderBuffer!==undefined?i.renderBuffer:100;this.style_=null;this.styleFunction_=undefined;this.setStyle(i.style);this.updateWhileAnimating_=i.updateWhileAnimating!==undefined?i.updateWhileAnimating:false;this.updateWhileInteracting_=i.updateWhileInteracting!==undefined?i.updateWhileInteracting:false;this.renderMode_=i.renderMode||mf.VECTOR;this.type=df.VECTOR};ta.inherits(Il,jo);Il.prototype.getDeclutter=function(){return this.declutter_};Il.prototype.setDeclutter=function(t){this.declutter_=t};Il.prototype.getRenderBuffer=function(){return this.renderBuffer_};Il.prototype.getRenderOrder=function(){return this.get(Il.Property_.RENDER_ORDER)};Il.prototype.getStyle=function(){return this.style_};Il.prototype.getStyleFunction=function(){return this.styleFunction_};Il.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_};Il.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_};Il.prototype.setRenderOrder=function(t){this.set(Il.Property_.RENDER_ORDER,t)};Il.prototype.setStyle=function(t){this.style_=t!==undefined?t:Qu.defaultFunction;this.styleFunction_=t===null?undefined:Qu.createFunction(this.style_);this.changed()};Il.prototype.getRenderMode=function(){return this.renderMode_};Il.Property_={RENDER_ORDER:"renderOrder"};var Cl={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"};var Al=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-scale-line";this.innerElement_=document.createElement("DIV");this.innerElement_.className=s+"-inner";this.element_=document.createElement("DIV");this.element_.className=s+" "+Do.CLASS_UNSELECTABLE;this.element_.appendChild(this.innerElement_);this.viewState_=null;this.minWidth_=i.minWidth!==undefined?i.minWidth:64;this.renderedVisible_=false;this.renderedWidth_=undefined;this.renderedHTML_="";var e=i.render?i.render:Al.render;Fo.call(this,{element:this.element_,render:e,target:i.target});ra.listen(this,ua.getChangeEventType(Al.Property_.UNITS),this.handleUnitsChanged_,this);this.setUnits(i.units||Cl.METRIC)};ta.inherits(Al,Fo);Al.LEADING_DIGITS=[1,2,5];Al.prototype.getUnits=function(){return this.get(Al.Property_.UNITS)};Al.render=function(t){var i=t.frameState;if(!i){this.viewState_=null}else{this.viewState_=i.viewState}this.updateElement_()};Al.prototype.handleUnitsChanged_=function(){this.updateElement_()};Al.prototype.setUnits=function(t){this.set(Al.Property_.UNITS,t)};Al.prototype.updateElement_=function(){var t=this.viewState_;if(!t){if(this.renderedVisible_){this.element_.style.display="none";this.renderedVisible_=false}return}var i=t.center;var s=t.projection;var e=this.getUnits();var r=e==Cl.DEGREES?ba.DEGREES:ba.METERS;var n=Na.getPointResolution(s,t.resolution,i,r);if(e!=Cl.DEGREES){n*=s.getMetersPerUnit()}var h=this.minWidth_*n;var a="";if(e==Cl.DEGREES){var o=Na.METERS_PER_UNIT[ba.DEGREES];if(s.getUnits()==ba.DEGREES){h*=o}else{n/=o}if(h<o/60){a="″";n*=3600}else if(h<o){a="′";n*=60}else{a="°"}}else if(e==Cl.IMPERIAL){if(h<.9144){a="in";n/=.0254}else if(h<1609.344){a="ft";n/=.3048}else{a="mi";n/=1609.344}}else if(e==Cl.NAUTICAL){n/=1852;a="nm"}else if(e==Cl.METRIC){if(h<.001){a="μm";n*=1e6}else if(h<1){a="mm";n*=1e3}else if(h<1e3){a="m"}else{a="km";n/=1e3}}else if(e==Cl.US){if(h<.9144){a="in";n*=39.37}else if(h<1609.344){a="ft";n/=.30480061}else{a="mi";n/=1609.3472}}else{va.assert(false,33)}var f=3*Math.floor(Math.log(this.minWidth_*n)/Math.log(10));var u,l;while(true){u=Al.LEADING_DIGITS[(f%3+3)%3]*Math.pow(10,Math.floor(f/3));l=Math.round(u/n);if(isNaN(l)){this.element_.style.display="none";this.renderedVisible_=false;return}else if(l>=this.minWidth_){break}++f}var v=u+" "+a;if(this.renderedHTML_!=v){this.innerElement_.innerHTML=v;this.renderedHTML_=v}if(this.renderedWidth_!=l){this.innerElement_.style.width=l+"px";this.renderedWidth_=l}if(!this.renderedVisible_){this.element_.style.display="";this.renderedVisible_=true}};Al.Property_={UNITS:"units"};var Rl={FRACTION:"fraction"};var Tl=function(t,i,s,e,r,n){aa.call(this);this.hitDetectionImage_=null;this.image_=!t?new Image:t;if(e!==null){this.image_.crossOrigin=e}this.canvas_=n?document.createElement("CANVAS"):null;this.color_=n;this.imageListenerKeys_=null;this.imageState_=r;this.size_=s;this.src_=i;this.tainting_=false;if(this.imageState_==vf.LOADED){this.determineTainting_()}};ta.inherits(Tl,aa);Tl.get=function(t,i,s,e,r,n){var h=Pf.iconImageCache;var a=h.get(i,e,n);if(!a){a=new Tl(t,i,s,e,r,n);h.set(i,e,n,a)}return a};Tl.prototype.determineTainting_=function(){var t=Po.createCanvasContext2D(1,1);try{t.drawImage(this.image_,0,0);t.getImageData(0,0,1,1)}catch(t){this.tainting_=true}};Tl.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(oa.CHANGE)};Tl.prototype.handleImageError_=function(){this.imageState_=vf.ERROR;this.unlistenImage_();this.dispatchChangeEvent_()};Tl.prototype.handleImageLoad_=function(){this.imageState_=vf.LOADED;if(this.size_){this.image_.width=this.size_[0];this.image_.height=this.size_[1]}this.size_=[this.image_.width,this.image_.height];this.unlistenImage_();this.determineTainting_();this.replaceColor_();this.dispatchChangeEvent_()};Tl.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_};Tl.prototype.getImageState=function(){return this.imageState_};Tl.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_){if(this.tainting_){var i=this.size_[0];var s=this.size_[1];var e=Po.createCanvasContext2D(i,s);e.fillRect(0,0,i,s);this.hitDetectionImage_=e.canvas}else{this.hitDetectionImage_=this.image_}}return this.hitDetectionImage_};Tl.prototype.getSize=function(){return this.size_};Tl.prototype.getSrc=function(){return this.src_};Tl.prototype.load=function(){if(this.imageState_==vf.IDLE){this.imageState_=vf.LOADING;this.imageListenerKeys_=[ra.listenOnce(this.image_,oa.ERROR,this.handleImageError_,this),ra.listenOnce(this.image_,oa.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}};Tl.prototype.replaceColor_=function(){if(this.tainting_||this.color_===null){return}this.canvas_.width=this.image_.width;this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);var i=t.getImageData(0,0,this.image_.width,this.image_.height);var s=i.data;var e=this.color_[0]/255;var r=this.color_[1]/255;var n=this.color_[2]/255;for(var h=0,a=s.length;h<a;h+=4){s[h]*=e;s[h+1]*=r;s[h+2]*=n}t.putImageData(i,0,0)};Tl.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(ra.unlistenByKey);this.imageListenerKeys_=null};var Ol={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var Ll=function(t){var i=t||{};this.anchor_=i.anchor!==undefined?i.anchor:[.5,.5];this.normalizedAnchor_=null;this.anchorOrigin_=i.anchorOrigin!==undefined?i.anchorOrigin:Ol.TOP_LEFT;this.anchorXUnits_=i.anchorXUnits!==undefined?i.anchorXUnits:Rl.FRACTION;this.anchorYUnits_=i.anchorYUnits!==undefined?i.anchorYUnits:Rl.FRACTION;this.crossOrigin_=i.crossOrigin!==undefined?i.crossOrigin:null;var s=i.img!==undefined?i.img:null;var e=i.imgSize!==undefined?i.imgSize:null;var r=i.src;va.assert(!(r!==undefined&&s),4);va.assert(!s||s&&e,5);if((r===undefined||r.length===0)&&s){r=s.src||ta.getUid(s).toString()}va.assert(r!==undefined&&r.length>0,6);var n=i.src!==undefined?vf.IDLE:vf.LOADED;this.color_=i.color!==undefined?Mf.asArray(i.color):null;this.iconImage_=Tl.get(s,r,e,this.crossOrigin_,n,this.color_);this.offset_=i.offset!==undefined?i.offset:[0,0];this.offsetOrigin_=i.offsetOrigin!==undefined?i.offsetOrigin:Ol.TOP_LEFT;this.origin_=null;this.size_=i.size!==undefined?i.size:null;var h=i.opacity!==undefined?i.opacity:1;var a=i.rotateWithView!==undefined?i.rotateWithView:false;var o=i.rotation!==undefined?i.rotation:0;var f=i.scale!==undefined?i.scale:1;var u=i.snapToPixel!==undefined?i.snapToPixel:true;Ju.call(this,{opacity:h,rotation:o,scale:f,snapToPixel:u,rotateWithView:a})};ta.inherits(Ll,Ju);Ll.prototype.clone=function(){return new Ll({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||undefined,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:this.size_!==null?this.size_.slice():undefined,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})};Ll.prototype.getAnchor=function(){if(this.normalizedAnchor_){return this.normalizedAnchor_}var t=this.anchor_;var i=this.getSize();if(this.anchorXUnits_==Rl.FRACTION||this.anchorYUnits_==Rl.FRACTION){if(!i){return null}t=this.anchor_.slice();if(this.anchorXUnits_==Rl.FRACTION){t[0]*=i[0]}if(this.anchorYUnits_==Rl.FRACTION){t[1]*=i[1]}}if(this.anchorOrigin_!=Ol.TOP_LEFT){if(!i){return null}if(t===this.anchor_){t=this.anchor_.slice()}if(this.anchorOrigin_==Ol.TOP_RIGHT||this.anchorOrigin_==Ol.BOTTOM_RIGHT){t[0]=-t[0]+i[0]}if(this.anchorOrigin_==Ol.BOTTOM_LEFT||this.anchorOrigin_==Ol.BOTTOM_RIGHT){t[1]=-t[1]+i[1]}}this.normalizedAnchor_=t;return this.normalizedAnchor_};Ll.prototype.getColor=function(){return this.color_};Ll.prototype.getImage=function(t){return this.iconImage_.getImage(t)};Ll.prototype.getImageSize=function(){return this.iconImage_.getSize()};Ll.prototype.getHitDetectionImageSize=function(){return this.getImageSize()};Ll.prototype.getImageState=function(){return this.iconImage_.getImageState()};Ll.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)};Ll.prototype.getOrigin=function(){if(this.origin_){return this.origin_}var t=this.offset_;if(this.offsetOrigin_!=Ol.TOP_LEFT){var i=this.getSize();var s=this.iconImage_.getSize();if(!i||!s){return null}t=t.slice();if(this.offsetOrigin_==Ol.TOP_RIGHT||this.offsetOrigin_==Ol.BOTTOM_RIGHT){t[0]=s[0]-i[0]-t[0]}if(this.offsetOrigin_==Ol.BOTTOM_LEFT||this.offsetOrigin_==Ol.BOTTOM_RIGHT){t[1]=s[1]-i[1]-t[1]}}this.origin_=t;return this.origin_};Ll.prototype.getSrc=function(){return this.iconImage_.getSrc()};Ll.prototype.getSize=function(){return!this.size_?this.iconImage_.getSize():this.size_};Ll.prototype.listenImageChange=function(t,i){return ra.listen(this.iconImage_,oa.CHANGE,t,i)};Ll.prototype.load=function(){this.iconImage_.load()};Ll.prototype.unlistenImageChange=function(t,i){ra.unlisten(this.iconImage_,oa.CHANGE,t,i)};var Fl=`<svg width="16" height="24" viewBox="0 0 16 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.0011 22.5728L13.2809 12.0132H2.72134L8.0011 22.5728Z" fill="#DEDEDE" stroke="#BFBFBF" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" fill="#D0021B"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" stroke="#D0021B" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" stroke="black" stroke-opacity="0.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const Dl=()=>`:host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}:host[hidden],:host[stzh-hidden]{display:none}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host{}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-olmap{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}stzh-olmap[hidden],stzh-olmap[stzh-hidden]{display:none}stzh-olmap::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-olmap *,stzh-olmap *::before,stzh-olmap *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-olmap{}stzh-olmap .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-olmap .stzh-fylingfocus-focused{outline-style:none !important}stzh-olmap .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-olmap{position:relative;width:100%;aspect-ratio:1/1}@media print{stzh-olmap{page-break-inside:avoid;break-inside:avoid}}@media screen and (min-width: 600px){stzh-olmap{aspect-ratio:16/9}}@media screen and (min-width: 900px){stzh-olmap{aspect-ratio:21/9}}.stzh-olmap__map{position:absolute;width:100%;height:100%;top:0;left:0}.stzh-olmap__map--print{margin-top:var(--stzh-space-xxlarge);max-width:100%;height:auto}.stzh-olmap__print-image{display:block;max-width:100%}.stzh-olmap .ol-overlaycontainer-stopevent{touch-action:manipulation}.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom-in,.stzh-olmap .ol-zoom-out,.stzh-olmap .ol-rotate-reset{font-family:var(--stzh-font-family-light);font-weight:var(--stzh-font-weight-light);font-style:var(--stzh-font-style-light);font-size:var(--stzh-font-deca-font-size);line-height:var(--stzh-font-deca-text-line-height);letter-spacing:var(--stzh-font-deca-text-letter-spacing);position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border:none;border-radius:0;color:var(--stzh-color-primary);transition:all var(--stzh-base-transition-animation-speed) ease;background-color:var(--stzh-color-white);width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);cursor:pointer}.stzh-olmap .ol-print stzh-icon,.stzh-olmap .ol-location stzh-icon,.stzh-olmap .ol-zoom-in stzh-icon,.stzh-olmap .ol-zoom-out stzh-icon,.stzh-olmap .ol-rotate-reset stzh-icon{--size:var(--stzh-icon-size-small)}.stzh-olmap .ol-print:hover,.stzh-olmap .ol-location:hover,.stzh-olmap .ol-zoom-in:hover,.stzh-olmap .ol-zoom-out:hover,.stzh-olmap .ol-rotate-reset:hover{color:var(--stzh-color-primary70);background:var(--stzh-color-secondary20)}.stzh-olmap .ol-layer,.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom,.stzh-olmap .ol-rotate-reset{position:absolute;right:var(--stzh-space-xsmall);bottom:var(--stzh-space-xsmall);box-shadow:var(--stzh-box-shadow-popover);border-radius:var(--stzh-button-border-radius)}@media print{.stzh-olmap .ol-layer,.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom,.stzh-olmap .ol-rotate-reset{display:none}}.stzh-olmap .ol-layer{left:var(--stzh-space-xsmall);right:auto;padding:var(--stzh-space-xxxsmall);border:none;cursor:pointer}.stzh-olmap .ol-layer__thumbnail{width:4.75rem;height:4.75rem;display:block}.stzh-olmap .ol-layer__text{font-family:var(--stzh-font-family-light);font-weight:var(--stzh-font-weight-light);font-style:var(--stzh-font-style-light);font-size:var(--stzh-font-pico-font-size);line-height:var(--stzh-font-pico-text-line-height);position:absolute;bottom:0;left:0;right:0;text-align:left;background-color:var(--stzh-color-white);color:var(--stzh-color-primary);padding-left:calc(var(--stzh-space-xxxsmall) + 0.0625rem);padding-right:calc(var(--stzh-space-xxxsmall) + 0.0625rem)}.stzh-olmap .ol-layer:hover .ol-layer__text{color:var(--stzh-color-primary-hover)}.stzh-olmap .ol-location{margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2)}.stzh-olmap .ol-location:hover{color:var(--stzh-color-primary-hover);background:var(--stzh-color-white)}.stzh-olmap .ol-location.active{color:var(--stzh-color-white);background:var(--stzh-color-primary)}.stzh-olmap .ol-zoom{margin-bottom:calc(var(--stzh-form-input-small-height) + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall));background-color:transparent;border-radius:var(--stzh-button-border-radius);overflow:hidden}.stzh-olmap .ol-zoom-in{margin-bottom:var(--stzh-space-xxxsmall)}.stzh-olmap .ol-rotate-reset{width:2rem;height:2rem;border-radius:50%;box-shadow:none;margin-right:calc((var(--stzh-form-input-small-height) - 2rem) / 2);margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2 + var(--stzh-space-xxxsmall))}.stzh-olmap .ol-rotate-reset span{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-olmap .ol-rotate-reset svg{width:0.99rem;height:1.32188rem}.stzh-olmap .ol-hidden{display:none}.stzh-olmap .ol-compass{display:flex;align-items:center;justify-content:center}.stzh-olmap .ol-scale-line{position:absolute;left:var(--stzh-space-xsmall);bottom:var(--stzh-space-xsmall);margin-left:calc(4.75rem + var(--stzh-space-xxxsmall) + var(--stzh-space-xsmall))}.stzh-olmap .ol-scale-line-inner{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);position:relative;color:var(--stzh-color-black);text-align:center;filter:drop-shadow(-0.0625rem 0px 0px white) drop-shadow(0.0625rem 0px 0px white) drop-shadow(0px -0.0625rem 0px white) drop-shadow(0px 0.0625rem 0px white)}.stzh-olmap .ol-scale-line-inner::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:0.28125rem;border:0.0625rem solid var(--stzh-color-black);border-top:0}.stzh-olmap .ol-attribution{display:none}.stzh-olmap{}.stzh-olmap--has-no-layer-control .ol-scale-line{margin-left:0}.stzh-olmap{}.stzh-olmap--has-no-print-control .ol-zoom{margin-bottom:0}.stzh-olmap--has-no-print-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 2 + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall))}.stzh-olmap{}.stzh-olmap--has-location-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 4 + var(--stzh-space-xsmall) * 3 + var(--stzh-space-xxxsmall))}.stzh-olmap--has-location-control.stzh-olmap--has-no-print-control .ol-location{margin-bottom:calc(var(--stzh-form-input-small-height) * 2 + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall))}.stzh-olmap--has-location-control.stzh-olmap--has-no-print-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2 + var(--stzh-space-xxxsmall))}.stzh-olmap{}.stzh-olmap__popover{background-color:var(--stzh-color-grey10);width:18.75rem}@media screen and (max-width: 599px){.stzh-olmap__popover{position:fixed;right:0;bottom:0;left:0;width:100%;z-index:5;display:flex}}.stzh-olmap__popover-content{padding:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-olmap__popover-content{padding:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-olmap__popover-content{padding:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-olmap__popover-content{padding:var(--stzh-space-xlarge)}}.stzh-olmap__popover-content stzh-heading{margin-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-olmap__popover-content{aspect-ratio:2/1}}.stzh-olmap__popover-link{position:absolute;top:0;right:0;bottom:0;left:0}.stzh-olmap__popover-image{position:relative}@media screen and (max-width: 599px){.stzh-olmap__popover-image{width:8.75rem;min-width:8.75rem;height:8.75rem;max-height:8.75rem;overflow:hidden}}.stzh-olmap__popover-image img{width:100%}@media screen and (max-width: 599px){.stzh-olmap__popover-image img{position:absolute;top:50%;left:50%;width:100%;height:100%;object-fit:cover;transform:translate(-50%, -50%)}}.stzh-olmap__popover *{text-decoration:none}`;window.proj4=Qh;window.proj4.defs("EPSG:2056","+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs");const Wl={anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",scale:.5,src:`${window.stzhComponents.pathMedia}/olmap/marker.png`};const jl=Object.assign(Object.assign({},Wl),{src:`${window.stzhComponents.pathMedia}/olmap/marker-active.png`});const Vl=Object.assign(Object.assign({},Wl),{anchor:[.5,.5],src:`${window.stzhComponents.pathMedia}/olmap/marker-position.png`});const Ul=class{constructor(s){t(this,s);this.stzhInitialized=i(this,"stzhInitialized");this.stzhPostRender=i(this,"stzhPostRender");this.stzhMoveStart=i(this,"stzhMoveStart");this.stzhMoveEnd=i(this,"stzhMoveEnd");this.stzhMovePanZoom=i(this,"stzhMovePanZoom");this.hostname="www.ogc.stadt-zuerich.ch";this.scaleControl=true;this.layerControl=true;this.printControl=true;this.locationControl=false;this.layer="streets";this.zoom=7;this.zoomLocation=7;this.center=[2683311,1247082];this.centerMarker=true;this.pinchRotateThreshold=.3;this.resolutions=[67.73333333333,33.8666666667,16.9333333333,8.4666666667,4.2333333333,2.1166666667,1.0583333333,.5291666667,.2645833333,.1322916667,.0661458333];this.writeExtentToUrlEnabled=false;this.layers={streets:{thumbnailUrl:`${window.stzhComponents.pathMedia}/olmap/thumb-streets.jpg`,options:{url:"https://{Hostname}/mapproxy/wmts/1.0.0/{Layer}/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",layer:"basiskarte_zuerich_gebaeudeschraegansicht",matrixSet:"ktzh",origin:[2480237,1315832],extent:[2666867,1220962,2719695.5,1285537]}},satellite:{thumbnailUrl:`${window.stzhComponents.pathMedia}/olmap/thumb-satellite.jpg`,options:{url:"https://{Hostname}/mapproxy/wmts/1.0.0/{Layer}/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",layer:"orthofoto",matrixSet:"ktzh",origin:[2480237,1315832],extent:[2666867,1220962,2719695.5,1285537]}}};this._layers={};this.geoPositionChanged=false;this.handlePostRender=()=>{this.stzhPostRender.emit({component:"stzh-olmap"})};this.handleDoubleClick=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleMoveStart=()=>{this.stzhMoveStart.emit({component:"stzh-olmap"})};this.handleMoveEnd=()=>{this.stzhMoveEnd.emit({component:"stzh-olmap"});this.writeExtentToUrl().catch()};this.handlePointerdrag=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleChangeResolution=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleInsideModalOpen=()=>{if(this.map){requestAnimationFrame((()=>{this.map.updateSize()}))}};this.handlePrintButtonClick=()=>{if(!this.printIframe){this.printIframe=document.createElement("iframe");Object.assign(this.printIframe.style,{height:"0px",width:"0px",position:"absolute",border:"none"});this.element.append(this.printIframe)}this.printIframe.innerHTML="";const t=this.printIframe.contentWindow;const i=this.constructor.style.replace('@charset "UTF-8";',"");const s=Array.from(document.querySelectorAll("link")).map((t=>t.outerHTML));let e;this.map.once("postcompose",(function(t){const i=t.context.canvas;e=i.toDataURL("image/png")}));this.map.renderSync();t.document.body.innerHTML=`\n ${s.join("")}\n\n <style type="text/css">\n ${i}\n </style>\n\n <div class="stzh-olmap__map stzh-olmap__map--print">\n <img class="stzh-olmap__print-image" src="${e}">\n ${this.element.querySelector(".ol-scale-line.ol-unselectable").outerHTML}\n </div>\n `;setTimeout((()=>{try{t.document.execCommand("print",false,null)}catch(i){t.print()}}),1e3)}}layersWatcher(t){if(typeof t==="string"){this._layers=JSON.parse(t)}else{this._layers=t}}resolutionsWatcher(t){if(typeof t==="string"){this._resolutions=JSON.parse(t)}else{this._resolutions=t}}zoomWatcher(t){if(this.map){this.map.getView().setZoom(t)}}scaleControlWatcher(t){if(!this.map){return}if(t){this.scaleControlOl=new Al({units:"metric"});this.map.addControl(this.scaleControlOl)}else{if(this.scaleControl){this.map.removeControl(this.scaleControlOl)}this.scaleControlOl=null}}printControlWatcher(t){if(!this.map){return}if(t){this.printControlElement=document.createElement("button");this.printControlElement.className="ol-print";this.printControlElement.type="button";this.printControlElement.ariaLabel=this.localization.printLabel;this.printControlElement.addEventListener("click",this.handlePrintButtonClick);this.printControlElement.innerHTML='<stzh-icon name="print" class="ol-print__icon"></stzh-icon>';this.printControlOl=new Fo({element:this.printControlElement});this.map.addControl(this.printControlOl)}else{if(this.printControlOl){this.map.removeControl(this.printControlOl)}this.printControlOl=null;this.printControlElement=null}}layerControlWatcher(t){if(!this.map||this.layersArray.length===1){return}if(t){this.layerControlElement=document.createElement("button");this.layerControlElement.className="ol-layer";this.layerControlElement.type="button";this.layerControlElement.addEventListener("click",(()=>{this.layer=this.layer==="streets"?"satellite":"streets"}));this.layerControlImageElement=document.createElement("img");this.layerControlImageElement.className="ol-layer__thumbnail";this.layerControlImageElement.setAttribute("role","presentation");this.layerControlImageElement.setAttribute("alt","");this.layerControlTextElement=document.createElement("span");this.layerControlTextElement.className="ol-layer__text";this.layerControlElement.appendChild(this.layerControlImageElement);this.layerControlElement.appendChild(this.layerControlTextElement);this.layerControlOl=new Fo({element:this.layerControlElement});this.map.addControl(this.layerControlOl)}else{if(this.layerControlOl){this.map.removeControl(this.layerControlOl)}this.layerControlOl=null;this.layerControlElement=null;this.layerControlImageElement=null;this.layerControlTextElement=null}}locationControlWatcher(t){if(!this.map){return}if(t){this.locationControlElement=document.createElement("button");this.locationControlElement.type="button";this.locationControlElement.className="ol-location";this.locationControlElement.innerHTML='<stzh-icon name="target-bullet" class="ol-location__icon"></stzh-icon>';this.locationControlElement.addEventListener("click",(()=>{const t=this.geolocation.getTracking();if(t){this.disableLocationTracking().catch()}else{this.enableLocationTracking().catch()}}));this.locationControlOl=new Fo({element:this.locationControlElement});this.geolocation=new Za({projection:this.map.getView().getProjection()});this.positionMarkerOl=new tl;this.positionMarkerOl.setId("position");const t=new Qu({image:new Ll(Vl)});this.positionMarkerOl.setStyle(t);this.positionLayer.getSource().addFeature(this.positionMarkerOl);this.geolocation.on("change:position",(()=>{const t=this.geolocation.getPosition();this.positionMarkerOl.setGeometry(new Wa(t));if(!this.geoPositionChanged&&Ma.containsExtent(this._layers[this.layer].options.extent,this.positionMarkerOl.getGeometry().getExtent())){this.geoPositionChanged=true;this.map.getView().setCenter(t);if(this.zoomLocation){this.map.getView().setZoom(this.zoomLocation)}}}));this.geolocation.on("change:tracking",(()=>{const t=this.geolocation.getTracking();this.positionMarkerOl.setGeometry(null);this.setLocationControlState(t)}));this.geolocation.on("error",(()=>{this.setLocationControlState(false)}));this.map.addControl(this.locationControlOl)}else{this.disableLocationTracking().catch();if(this.locationControlOl){this.map.removeControl(this.locationControlOl)}if(this.positionMarkerOl){this.positionLayer.getSource().removeFeature(this.positionMarkerOl)}this.locationControlOl=null;this.locationControlElement=null;this.geolocation=null;this.positionMarkerOl=null}}layerWatcher(t){if(!this.map){return}Object.entries(this.rasterLayers).forEach((([i,s])=>{if(i===t){s.setVisible(true);this.map.getView().set("projection",this.projections[t]);const e=this.layersArray.find((([t])=>t!==this.layer));if(e){if(this.layerControlImageElement){this.layerControlImageElement.src=e[1].thumbnailUrl}if(this.layerControlTextElement){let t="";if(i==="streets"){t=this.localization.streetsLayerTitle}else if(i==="satellite"){t=this.localization.satelliteLayerTitle}this.layerControlTextElement.textContent=e[1].title||t}}}else{s.setVisible(false)}}))}centerWatcher(t){if(typeof t==="string"){this._center=JSON.parse(t)}else{this._center=t}if(this.map&&!this._initialExtent){this.map.getView().setCenter(this._center);if(this.centerMarkerOl){this.centerMarkerOl.setGeometry(new Wa(this._center))}}}async centerMarkerWatcher(t){if(t){this.centerMarkerOl=await this.addIconMarker(this._center)}else if(this.centerMarkerOl){this.removeIconMarker(this.centerMarkerOl)}}async getMap(){return this.map}async writeExtentToUrl(){if(this.writeExtentToUrlEnabled){const t=this.map.getView();const i=t.calculateExtent(this.map.getSize());const[s,e,r,n]=i;const h=new URLSearchParams(window.location.search);h.set("extent[0]",s.toFixed(10));h.set("extent[1]",e.toFixed(10));h.set("extent[2]",r.toFixed(10));h.set("extent[3]",n.toFixed(10));const a=`${window.location.pathname}?${h.toString()}`;history.replaceState(null,"",a)}}async getVisibleMarkers(){const t=this.iconLayer.getSource();const i=t.getFeatures();if(i.length===0){return[]}const s=this.map.getView().calculateExtent(this.map.getSize());return i.filter((t=>{const i=t.getGeometry().getExtent();return Ma.intersects(s,i)}))}async findMarkerById(t){const i=this.iconLayer.getSource().getFeatures();return i.find((i=>i.get("id")===t))}async addIconMarker(t,i){const s=new tl({geometry:new Wa(t)});const e=new Qu({image:new Ll(Wl)});if(i&&i.id){s.setProperties({id:i.id});s.setId(i.id)}s.setProperties({stzh:i});s.setStyle(e);this.iconLayer.getSource().addFeature(s);return s}async addIconMarkers(t){for(const i of t){await this.addIconMarker(i.coordinates,i.props)}return true}async updateViewToFitMarkers(t=1e3){const i=this.iconLayer.getSource();const s=i.getFeatures();if(s.length===0){return}let e=Ma.createEmpty();s.forEach((t=>{Ma.extend(e,t.getGeometry().getExtent())}));this.map.getView().fit(e,{size:this.map.getSize(),duration:t})}async removeAllIconMarkers(){return this.iconLayer.getSource().clear()}async removeIconMarker(t){return this.iconLayer.getSource().removeFeature(t)}async setIconMarkerActive(t){t.setStyle(new Qu({image:new Ll(jl)}))}async setIconMarkerInactive(t){t.setStyle(new Qu({image:new Ll(Wl)}))}async setAllIconMarkersInactive(){const t=this.iconLayer.getSource();const i=t.getFeatures();i.forEach((t=>{this.setIconMarkerInactive(t).catch((t=>console.error(t)))}))}async enableLocationTracking(t=true){this.setLocationControlState(true);this.geoPositionChanged=!t;if(this.geolocation){this.geolocation.setTracking(true)}}async disableLocationTracking(){this.setLocationControlState(false);if(this.geolocation){this.geolocation.setTracking(false)}}async getDistance(t,i){const s=new Pl([t,i]);const e=ma.getLength(s,{projection:this.map.getView().getProjection()});return e}handleLoad(){if(this.map){requestAnimationFrame((()=>{this.map.updateSize()}))}}showPopover(t,i){if(i.imageUri){this.popoverElement.innerHTML=`<div class="stzh-olmap__popover-image"><img src="${i.imageUri}" alt="${i.title}"></div>`}let s='<div class="stzh-olmap__popover-content">';if(i.title){s+=`<stzh-heading curve="p2">${i.title}</stzh-heading>`}if(i.text){s+=`<stzh-text size="milli" color="info">${i.text}</stzh-text>`}if(i.data&&i.data.length){i.data.map((t=>{s+=`<div class="stzh-poi-teaser-list-item">\n <stzh-icon name="${t.icon}"></stzh-icon>\n <stzh-text size="micro">\n ${t.text}\n </stzh-text>\n </div>`}))}s+="</div>";this.popoverElement.innerHTML+=s;if(i.href){this.popoverElement.innerHTML+=`<a href="${i.href}" class="stzh-olmap__popover-link"></a>`}const e=new Yu({element:this.popoverElement,position:t,positioning:"bottom-center",offset:[0,-50],autoPan:false,autoPanAnimation:{duration:300}});this.map.addOverlay(e);this.map.renderSync()}initializeMarkerHover(){this.map.on("pointermove",(t=>{const i=this.map.getEventPixel(t.originalEvent);const s=this.map.hasFeatureAtPixel(i,{layerFilter:t=>t===this.iconLayer});const e=this.map.getTargetElement();if(s){e.style.cursor="pointer"}else{e.style.cursor=""}}))}setLocationControlState(t){if(this.positionLayer){this.positionLayer.setVisible(t)}if(this.locationControlElement){this.locationControlElement.classList.toggle("active",t)}}createMap(){const t=document.createElement("stzh-icon");t.ariaLabel=this.localization.zoomInLabel;t.name="plus";t.addEventListener("click",(()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})}));const i=document.createElement("stzh-icon");i.ariaLabel=this.localization.zoomOutLabel;i.name="minus";i.addEventListener("click",(()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})}));const s=document.createElement("div");s.innerHTML=Fl;const e=document.createElement("span");e.innerText=this.localization.rotateLabel;s.appendChild(e);const r=new Hu({controls:Bo.defaults({zoomOptions:{zoomInLabel:t,zoomOutLabel:i,zoomInTipLabel:"",zoomOutTipLabel:""},rotateOptions:{label:s,tipLabel:""}}),interactions:new Qa([new Qo,new Jo,new $o,new of({threshold:this.pinchRotateThreshold}),new ff,new nf,new hf,new ef]),loadTilesWhileAnimating:true,loadTilesWhileInteracting:true,target:this.mapElement,logo:false});return r}createRasterLayer(t,i){return new Nl({title:"wmts",type:"base",extent:i.extent,source:this.createLayerSource(t,i)})}createLayerSource(t,i){if(!this.projections){this.projections={}}this.projections[t]=new Ea({code:"EPSG:2056",extent:i.extent});return this.creatRasterSource(t,i)}creatRasterSource(t,i){const{url:s,layer:e,matrixSet:r,origin:n}=i;const h=[];for(let t=0;t<this._resolutions.length;t++){h.push(t)}const a=new gl({origin:n,resolutions:this._resolutions,matrixIds:h,tileSize:[512,512]});return new zl({url:s,tileGrid:a,style:"default",projection:this.projections[t],crossOrigin:"anonymous",layer:e,matrixSet:r,requestEncoding:"REST"})}createIconLayer(){return new Il({source:new Sl({})})}initMap(){this.map=this.createMap();this.map.on("postrender",this.handlePostRender);this.map.on("movestart",this.handleMoveStart);this.map.on("dblclick",this.handleDoubleClick);this.map.on("moveend",this.handleMoveEnd);this.map.on("pointerdrag",this.handlePointerdrag);this.map.on("change:resolution",this.handleChangeResolution);this.layersArray=Object.entries(this._layers);if(this.layersArray.length>2){throw new Error("There are only two different layers allowed.")}this.rasterLayers={};this.layersArray.forEach((([t,i])=>{i.options.url=i.options.url.replace(/\{hostname\}/gi,this.hostname);this.rasterLayers[t]=this.createRasterLayer(t,i.options);this.map.addLayer(this.rasterLayers[t])}));this.positionLayer=this.createIconLayer();this.positionLayer.setVisible(false);this.map.addLayer(this.positionLayer);this.iconLayer=this.createIconLayer();this.map.addLayer(this.iconLayer);const t=new Go({center:this._center,projection:this.projections[this.layer],zoom:this.zoom,resolutions:this._resolutions});if(this._initialExtent){t.fit(this._initialExtent,{size:this.map.getSize()})}this.map.setView(t);this.centerWatcher(this.center);this.scaleControlWatcher(this.scaleControl);this.printControlWatcher(this.printControl);this.locationControlWatcher(this.locationControl);this.layerControlWatcher(this.layerControl);this.layerWatcher(this.layer);this.centerMarkerWatcher(this.centerMarker);this.initializeMarkerHover();this.map.on("singleclick",(t=>{this.setAllIconMarkersInactive().catch();this.popoverElement.innerHTML="";this.map.forEachFeatureAtPixel(t.pixel,(t=>{if(t.getGeometry()instanceof Wa){this.setIconMarkerActive(t).catch();const i=t.getProperties();if(i.stzh){this.showPopover(i.geometry.flatCoordinates,i.stzh)}return true}}))}));requestAnimationFrame((()=>{this.stzhInitialized.emit({component:"stzh-olmap"})}));this.handleMoveEnd()}componentShouldUpdate(t,i,s){return["hostname","localization","layers","resolutions","pinchRotateThreshold"].includes(s)}async componentWillLoad(){this.layersWatcher(this.layers);this.resolutionsWatcher(this.resolutions);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"olmap")}const t=new URLSearchParams(window.location.search);const i=[parseFloat(t.get("extent[0]")),parseFloat(t.get("extent[1]")),parseFloat(t.get("extent[2]")),parseFloat(t.get("extent[3]"))];if(!isNaN(i[0])&&!isNaN(i[1])&&!isNaN(i[2])&&!isNaN(i[3])){this._initialExtent=i}}componentWillUpdate(){if(this.map){this.map.setTarget(null);this.map=null}}componentDidRender(){if(this.map){return}this.initMap()}connectedCallback(){const t=this.element.closest("stzh-dialog");if(t){t.addEventListener("stzhOpen",this.handleInsideModalOpen)}}disconnectedCallback(){if(this.map){this.map.setTarget(null);this.map=null}const t=this.element.closest("stzh-dialog");if(t){t.removeEventListener("stzhOpen",this.handleInsideModalOpen)}}render(){const t={"stzh-olmap":true,"stzh-olmap--has-no-layer-control":!this.layerControl,"stzh-olmap--has-no-print-control":!this.printControl,"stzh-olmap--has-location-control":this.locationControl};return r(h,{key:"c9b7fbab4f2ff6a4d6d5649b577cf81dac859dbd"},r("div",{key:"d0f5c05bbabc558c53b87e82404857e95f8ef917",class:t},r("div",{key:"75c924f63e70f010585953b904e7d1f4a9d43fb1",ref:t=>this.mapElement=t,class:"stzh-olmap__map"}),r("div",{key:"76813ad15b4f4d94a37b1f1e9daa39fb1f1d2bc9",ref:t=>this.popoverElement=t,class:"stzh-olmap__popover"})))}get element(){return a(this)}static get watchers(){return{layers:["layersWatcher"],resolutions:["resolutionsWatcher"],zoom:["zoomWatcher"],scaleControl:["scaleControlWatcher"],printControl:["printControlWatcher"],layerControl:["layerControlWatcher"],locationControl:["locationControlWatcher"],layer:["layerWatcher"],center:["centerWatcher"],centerMarker:["centerMarkerWatcher"]}}};Ul.style=Dl();export{p as stzh_header,Ul as stzh_olmap};
|
|
8
|
-
//# sourceMappingURL=p-
|
|
7
|
+
*/var ma=function(t){this.radius=t};ma.prototype.geodesicArea=function(t){return ma.getArea_(t,this.radius)};ma.prototype.haversineDistance=function(t,i){return ma.getDistance_(t,i,this.radius)};ma.prototype.offset=function(t,i,s){var e=ca.toRadians(t[1]);var r=ca.toRadians(t[0]);var n=i/this.radius;var h=Math.asin(Math.sin(e)*Math.cos(n)+Math.cos(e)*Math.sin(n)*Math.cos(s));var a=r+Math.atan2(Math.sin(s)*Math.sin(n)*Math.cos(e),Math.cos(n)-Math.sin(e)*Math.sin(h));return[ca.toDegrees(a),ca.toDegrees(h)]};ma.DEFAULT_RADIUS=6371008.8;ma.getLength=function(t,i){var s=i||{};var e=s.radius||ma.DEFAULT_RADIUS;var r=s.projection||"EPSG:3857";t=t.clone().transform(r,"EPSG:4326");var n=t.getType();var h=0;var a,o,f,u,l,v;switch(n){case da.POINT:case da.MULTI_POINT:{break}case da.LINE_STRING:case da.LINEAR_RING:{a=t.getCoordinates();h=ma.getLength_(a,e);break}case da.MULTI_LINE_STRING:case da.POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){h+=ma.getLength_(a[f],e)}break}case da.MULTI_POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){o=a[f];for(l=0,v=o.length;l<v;++l){h+=ma.getLength_(o[l],e)}}break}case da.GEOMETRY_COLLECTION:{var c=t.getGeometries();for(f=0,u=c.length;f<u;++f){h+=ma.getLength(c[f],i)}break}default:{throw new Error("Unsupported geometry type: "+n)}}return h};ma.getLength_=function(t,i){var s=0;for(var e=0,r=t.length;e<r-1;++e){s+=ma.getDistance_(t[e],t[e+1],i)}return s};ma.getDistance_=function(t,i,s){var e=ca.toRadians(t[1]);var r=ca.toRadians(i[1]);var n=(r-e)/2;var h=ca.toRadians(i[0]-t[0])/2;var a=Math.sin(n)*Math.sin(n)+Math.sin(h)*Math.sin(h)*Math.cos(e)*Math.cos(r);return 2*s*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))};ma.getArea=function(t,i){var s=i||{};var e=s.radius||ma.DEFAULT_RADIUS;var r=s.projection||"EPSG:3857";t=t.clone().transform(r,"EPSG:4326");var n=t.getType();var h=0;var a,o,f,u,l,v;switch(n){case da.POINT:case da.MULTI_POINT:case da.LINE_STRING:case da.MULTI_LINE_STRING:case da.LINEAR_RING:{break}case da.POLYGON:{a=t.getCoordinates();h=Math.abs(ma.getArea_(a[0],e));for(f=1,u=a.length;f<u;++f){h-=Math.abs(ma.getArea_(a[f],e))}break}case da.MULTI_POLYGON:{a=t.getCoordinates();for(f=0,u=a.length;f<u;++f){o=a[f];h+=Math.abs(ma.getArea_(o[0],e));for(l=1,v=o.length;l<v;++l){h-=Math.abs(ma.getArea_(o[l],e))}}break}case da.GEOMETRY_COLLECTION:{var c=t.getGeometries();for(f=0,u=c.length;f<u;++f){h+=ma.getArea(c[f],i)}break}default:{throw new Error("Unsupported geometry type: "+n)}}return h};ma.getArea_=function(t,i){var s=0,e=t.length;var r=t[e-1][0];var n=t[e-1][1];for(var h=0;h<e;h++){var a=t[h][0],o=t[h][1];s+=ca.toRadians(a-r)*(2+Math.sin(ca.toRadians(n))+Math.sin(ca.toRadians(o)));r=a;n=o}return s*i*i/2};var pa={};pa.binarySearch=function(t,i,s){var e,r;var n=s||pa.numberSafeCompareFunction;var h=0;var a=t.length;var o=false;while(h<a){e=h+(a-h>>1);r=+n(t[e],i);if(r<0){h=e+1}else{a=e;o=!r}}return o?h:~h};pa.numberSafeCompareFunction=function(t,i){return t>i?1:t<i?-1:0};pa.includes=function(t,i){return t.indexOf(i)>=0};pa.linearFindNearest=function(t,i,s){var e=t.length;if(t[0]<=i){return 0}else if(i<=t[e-1]){return e-1}else{var r;if(s>0){for(r=1;r<e;++r){if(t[r]<i){return r-1}}}else if(s<0){for(r=1;r<e;++r){if(t[r]<=i){return r}}}else{for(r=1;r<e;++r){if(t[r]==i){return r}else if(t[r]<i){if(t[r-1]-i<i-t[r]){return r-1}else{return r}}}}return e-1}};pa.reverseSubArray=function(t,i,s){while(i<s){var e=t[i];t[i]=t[s];t[s]=e;++i;--s}};pa.extend=function(t,i){var s;var e=Array.isArray(i)?i:[i];var r=e.length;for(s=0;s<r;s++){t[t.length]=e[s]}};pa.remove=function(t,i){var s=t.indexOf(i);var e=s>-1;if(e){t.splice(s,1)}return e};pa.find=function(t,i){var s=t.length>>>0;var e;for(var r=0;r<s;r++){e=t[r];if(i(e,r,t)){return e}}return null};pa.equals=function(t,i){var s=t.length;if(s!==i.length){return false}for(var e=0;e<s;e++){if(t[e]!==i[e]){return false}}return true};pa.stableSort=function(t,i){var s=t.length;var e=Array(t.length);var r;for(r=0;r<s;r++){e[r]={index:r,value:t[r]}}e.sort((function(t,s){return i(t.value,s.value)||t.index-s.index}));for(r=0;r<t.length;r++){t[r]=e[r].value}};pa.findIndex=function(t,i){var s;var e=!t.every((function(e,r){s=r;return!i(e,r,t)}));return e?s:-1};pa.isSorted=function(t,i,s){var e=i||pa.numberSafeCompareFunction;return t.every((function(i,r){if(r===0){return true}var n=e(t[r-1],i);return!(n>0||s&&n===0)}))};var _a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var ga={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};var Ma={};Ma.boundingExtent=function(t){var i=Ma.createEmpty();for(var s=0,e=t.length;s<e;++s){Ma.extendCoordinate(i,t[s])}return i};Ma.boundingExtentXYs_=function(t,i,s){var e=Math.min.apply(null,t);var r=Math.min.apply(null,i);var n=Math.max.apply(null,t);var h=Math.max.apply(null,i);return Ma.createOrUpdate(e,r,n,h,s)};Ma.buffer=function(t,i,s){if(s){s[0]=t[0]-i;s[1]=t[1]-i;s[2]=t[2]+i;s[3]=t[3]+i;return s}else{return[t[0]-i,t[1]-i,t[2]+i,t[3]+i]}};Ma.clone=function(t,i){if(i){i[0]=t[0];i[1]=t[1];i[2]=t[2];i[3]=t[3];return i}else{return t.slice()}};Ma.closestSquaredDistanceXY=function(t,i,s){var e,r;if(i<t[0]){e=t[0]-i}else if(t[2]<i){e=i-t[2]}else{e=0}if(s<t[1]){r=t[1]-s}else if(t[3]<s){r=s-t[3]}else{r=0}return e*e+r*r};Ma.containsCoordinate=function(t,i){return Ma.containsXY(t,i[0],i[1])};Ma.containsExtent=function(t,i){return t[0]<=i[0]&&i[2]<=t[2]&&t[1]<=i[1]&&i[3]<=t[3]};Ma.containsXY=function(t,i,s){return t[0]<=i&&i<=t[2]&&t[1]<=s&&s<=t[3]};Ma.coordinateRelationship=function(t,i){var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=i[0];var a=i[1];var o=ga.UNKNOWN;if(h<s){o=o|ga.LEFT}else if(h>r){o=o|ga.RIGHT}if(a<e){o=o|ga.BELOW}else if(a>n){o=o|ga.ABOVE}if(o===ga.UNKNOWN){o=ga.INTERSECTING}return o};Ma.createEmpty=function(){return[Infinity,Infinity,-Infinity,-Infinity]};Ma.createOrUpdate=function(t,i,s,e,r){if(r){r[0]=t;r[1]=i;r[2]=s;r[3]=e;return r}else{return[t,i,s,e]}};Ma.createOrUpdateEmpty=function(t){return Ma.createOrUpdate(Infinity,Infinity,-Infinity,-Infinity,t)};Ma.createOrUpdateFromCoordinate=function(t,i){var s=t[0];var e=t[1];return Ma.createOrUpdate(s,e,s,e,i)};Ma.createOrUpdateFromCoordinates=function(t,i){var s=Ma.createOrUpdateEmpty(i);return Ma.extendCoordinates(s,t)};Ma.createOrUpdateFromFlatCoordinates=function(t,i,s,e,r){var n=Ma.createOrUpdateEmpty(r);return Ma.extendFlatCoordinates(n,t,i,s,e)};Ma.createOrUpdateFromRings=function(t,i){var s=Ma.createOrUpdateEmpty(i);return Ma.extendRings(s,t)};Ma.equals=function(t,i){return t[0]==i[0]&&t[2]==i[2]&&t[1]==i[1]&&t[3]==i[3]};Ma.extend=function(t,i){if(i[0]<t[0]){t[0]=i[0]}if(i[2]>t[2]){t[2]=i[2]}if(i[1]<t[1]){t[1]=i[1]}if(i[3]>t[3]){t[3]=i[3]}return t};Ma.extendCoordinate=function(t,i){if(i[0]<t[0]){t[0]=i[0]}if(i[0]>t[2]){t[2]=i[0]}if(i[1]<t[1]){t[1]=i[1]}if(i[1]>t[3]){t[3]=i[1]}};Ma.extendCoordinates=function(t,i){var s,e;for(s=0,e=i.length;s<e;++s){Ma.extendCoordinate(t,i[s])}return t};Ma.extendFlatCoordinates=function(t,i,s,e,r){for(;s<e;s+=r){Ma.extendXY(t,i[s],i[s+1])}return t};Ma.extendRings=function(t,i){var s,e;for(s=0,e=i.length;s<e;++s){Ma.extendCoordinates(t,i[s])}return t};Ma.extendXY=function(t,i,s){t[0]=Math.min(t[0],i);t[1]=Math.min(t[1],s);t[2]=Math.max(t[2],i);t[3]=Math.max(t[3],s)};Ma.forEachCorner=function(t,i,s){var e;e=i.call(s,Ma.getBottomLeft(t));if(e){return e}e=i.call(s,Ma.getBottomRight(t));if(e){return e}e=i.call(s,Ma.getTopRight(t));if(e){return e}e=i.call(s,Ma.getTopLeft(t));if(e){return e}return false};Ma.getArea=function(t){var i=0;if(!Ma.isEmpty(t)){i=Ma.getWidth(t)*Ma.getHeight(t)}return i};Ma.getBottomLeft=function(t){return[t[0],t[1]]};Ma.getBottomRight=function(t){return[t[2],t[1]]};Ma.getCenter=function(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]};Ma.getCorner=function(t,i){var s;if(i===_a.BOTTOM_LEFT){s=Ma.getBottomLeft(t)}else if(i===_a.BOTTOM_RIGHT){s=Ma.getBottomRight(t)}else if(i===_a.TOP_LEFT){s=Ma.getTopLeft(t)}else if(i===_a.TOP_RIGHT){s=Ma.getTopRight(t)}else{va.assert(false,13)}return s};Ma.getEnlargedArea=function(t,i){var s=Math.min(t[0],i[0]);var e=Math.min(t[1],i[1]);var r=Math.max(t[2],i[2]);var n=Math.max(t[3],i[3]);return(r-s)*(n-e)};Ma.getForViewAndSize=function(t,i,s,e,r){var n=i*e[0]/2;var h=i*e[1]/2;var a=Math.cos(s);var o=Math.sin(s);var f=n*a;var u=n*o;var l=h*a;var v=h*o;var c=t[0];var d=t[1];var m=c-f+v;var p=c-f-v;var _=c+f-v;var g=c+f+v;var M=d-u-l;var z=d-u+l;var w=d+u+l;var y=d+u-l;return Ma.createOrUpdate(Math.min(m,p,_,g),Math.min(M,z,w,y),Math.max(m,p,_,g),Math.max(M,z,w,y),r)};Ma.getHeight=function(t){return t[3]-t[1]};Ma.getIntersectionArea=function(t,i){var s=Ma.getIntersection(t,i);return Ma.getArea(s)};Ma.getIntersection=function(t,i,s){var e=s?s:Ma.createEmpty();if(Ma.intersects(t,i)){if(t[0]>i[0]){e[0]=t[0]}else{e[0]=i[0]}if(t[1]>i[1]){e[1]=t[1]}else{e[1]=i[1]}if(t[2]<i[2]){e[2]=t[2]}else{e[2]=i[2]}if(t[3]<i[3]){e[3]=t[3]}else{e[3]=i[3]}}return e};Ma.getMargin=function(t){return Ma.getWidth(t)+Ma.getHeight(t)};Ma.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]};Ma.getTopLeft=function(t){return[t[0],t[3]]};Ma.getTopRight=function(t){return[t[2],t[3]]};Ma.getWidth=function(t){return t[2]-t[0]};Ma.intersects=function(t,i){return t[0]<=i[2]&&t[2]>=i[0]&&t[1]<=i[3]&&t[3]>=i[1]};Ma.isEmpty=function(t){return t[2]<t[0]||t[3]<t[1]};Ma.returnOrUpdate=function(t,i){if(i){i[0]=t[0];i[1]=t[1];i[2]=t[2];i[3]=t[3];return i}else{return t}};Ma.scaleFromCenter=function(t,i){var s=(t[2]-t[0])/2*(i-1);var e=(t[3]-t[1])/2*(i-1);t[0]-=s;t[2]+=s;t[1]-=e;t[3]+=e};Ma.intersectsSegment=function(t,i,s){var e=false;var r=Ma.coordinateRelationship(t,i);var n=Ma.coordinateRelationship(t,s);if(r===ga.INTERSECTING||n===ga.INTERSECTING){e=true}else{var h=t[0];var a=t[1];var o=t[2];var f=t[3];var u=i[0];var l=i[1];var v=s[0];var c=s[1];var d=(c-l)/(v-u);var m,p;if(!!(n&ga.ABOVE)&&!(r&ga.ABOVE)){m=v-(c-f)/d;e=m>=h&&m<=o}if(!e&&!!(n&ga.RIGHT)&&!(r&ga.RIGHT)){p=c-(v-o)*d;e=p>=a&&p<=f}if(!e&&!!(n&ga.BELOW)&&!(r&ga.BELOW)){m=v-(c-a)/d;e=m>=h&&m<=o}if(!e&&!!(n&ga.LEFT)&&!(r&ga.LEFT)){p=c-(v-h)*d;e=p>=a&&p<=f}}return e};Ma.applyTransform=function(t,i,s){var e=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];i(e,e,2);var r=[e[0],e[2],e[4],e[6]];var n=[e[1],e[3],e[5],e[7]];return Ma.boundingExtentXYs_(r,n,s)};var za={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};var wa={};wa.TRUE=function(){return true};wa.FALSE=function(){return false};var ya={};ya.transform2D=function(t,i,s,e,r,n){var h=n?n:[];var a=0;var o;for(o=i;o<s;o+=e){var f=t[o];var u=t[o+1];h[a++]=r[0]*f+r[2]*u+r[4];h[a++]=r[1]*f+r[3]*u+r[5]}if(n&&h.length!=a){h.length=a}return h};ya.rotate=function(t,i,s,e,r,n,h){var a=h?h:[];var o=Math.cos(r);var f=Math.sin(r);var u=n[0];var l=n[1];var v=0;for(var c=i;c<s;c+=e){var d=t[c]-u;var m=t[c+1]-l;a[v++]=u+d*o-m*f;a[v++]=l+d*f+m*o;for(var p=c+2;p<c+e;++p){a[v++]=t[p]}}if(h&&a.length!=v){a.length=v}return a};ya.scale=function(t,i,s,e,r,n,h,a){var o=a?a:[];var f=h[0];var u=h[1];var l=0;for(var v=i;v<s;v+=e){var c=t[v]-f;var d=t[v+1]-u;o[l++]=f+r*c;o[l++]=u+n*d;for(var m=v+2;m<v+e;++m){o[l++]=t[m]}}if(a&&o.length!=l){o.length=l}return o};ya.translate=function(t,i,s,e,r,n,h){var a=h?h:[];var o=0;var f,u;for(f=i;f<s;f+=e){a[o++]=t[f]+r;a[o++]=t[f+1]+n;for(u=f+2;u<f+e;++u){a[o++]=t[u]}}if(h&&a.length!=o){a.length=o}return a};var ba={DEGREES:"degrees",FEET:"ft",METERS:"m",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};ba.METERS_PER_UNIT={};ba.METERS_PER_UNIT[ba.DEGREES]=2*Math.PI*6370997/360;ba.METERS_PER_UNIT[ba.FEET]=.3048;ba.METERS_PER_UNIT[ba.METERS]=1;ba.METERS_PER_UNIT[ba.USFEET]=1200/3937;var xa={};xa.cache_=null;xa.set=function(t){xa.cache_=t};xa.get=function(){return xa.cache_||window["proj4"]};var Ea=function(t){this.code_=t.code;this.units_=t.units;this.extent_=t.extent!==undefined?t.extent:null;this.worldExtent_=t.worldExtent!==undefined?t.worldExtent:null;this.axisOrientation_=t.axisOrientation!==undefined?t.axisOrientation:"enu";this.global_=t.global!==undefined?t.global:false;this.canWrapX_=!!(this.global_&&this.extent_);this.getPointResolutionFunc_=t.getPointResolution;this.defaultTileGrid_=null;this.metersPerUnit_=t.metersPerUnit;var i=t.code;if(ta.ENABLE_PROJ4JS){var s=xa.get();if(typeof s=="function"){var e=s.defs(i);if(e!==undefined){if(e.axis!==undefined&&t.axisOrientation===undefined){this.axisOrientation_=e.axis}if(t.metersPerUnit===undefined){this.metersPerUnit_=e.to_meter}if(t.units===undefined){this.units_=e.units}}}}};Ea.prototype.canWrapX=function(){return this.canWrapX_};Ea.prototype.getCode=function(){return this.code_};Ea.prototype.getExtent=function(){return this.extent_};Ea.prototype.getUnits=function(){return this.units_};Ea.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||ba.METERS_PER_UNIT[this.units_]};Ea.prototype.getWorldExtent=function(){return this.worldExtent_};Ea.prototype.getAxisOrientation=function(){return this.axisOrientation_};Ea.prototype.isGlobal=function(){return this.global_};Ea.prototype.setGlobal=function(t){this.global_=t;this.canWrapX_=!!(t&&this.extent_)};Ea.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_};Ea.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t};Ea.prototype.setExtent=function(t){this.extent_=t;this.canWrapX_=!!(this.global_&&t)};Ea.prototype.setWorldExtent=function(t){this.worldExtent_=t};Ea.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t};Ea.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var Sa={};Sa.Projection_=function(t){Ea.call(this,{code:t,units:ba.METERS,extent:Sa.EXTENT,global:true,worldExtent:Sa.WORLD_EXTENT,getPointResolution:function(t,i){return t/ca.cosh(i[1]/Sa.RADIUS)}})};ta.inherits(Sa.Projection_,Ea);Sa.RADIUS=6378137;Sa.HALF_SIZE=Math.PI*Sa.RADIUS;Sa.EXTENT=[-Sa.HALF_SIZE,-Sa.HALF_SIZE,Sa.HALF_SIZE,Sa.HALF_SIZE];Sa.WORLD_EXTENT=[-180,-85,180,85];Sa.PROJECTIONS=[new Sa.Projection_("EPSG:3857"),new Sa.Projection_("EPSG:102100"),new Sa.Projection_("EPSG:102113"),new Sa.Projection_("EPSG:900913"),new Sa.Projection_("urn:ogc:def:crs:EPSG:6.18:3:3857"),new Sa.Projection_("urn:ogc:def:crs:EPSG::3857"),new Sa.Projection_("http://www.opengis.net/gml/srs/epsg.xml#3857")];Sa.fromEPSG4326=function(t,i,s){var e=t.length,r=s>1?s:2,n=i;if(n===undefined){if(r>2){n=t.slice()}else{n=new Array(e)}}var h=Sa.HALF_SIZE;for(var a=0;a<e;a+=r){n[a]=h*t[a]/180;var o=Sa.RADIUS*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));if(o>h){o=h}else if(o<-h){o=-h}n[a+1]=o}return n};Sa.toEPSG4326=function(t,i,s){var e=t.length,r=s>1?s:2,n=i;if(n===undefined){if(r>2){n=t.slice()}else{n=new Array(e)}}for(var h=0;h<e;h+=r){n[h]=180*t[h]/Sa.HALF_SIZE;n[h+1]=360*Math.atan(Math.exp(t[h+1]/Sa.RADIUS))/Math.PI-90}return n};var Ga={};Ga.Projection_=function(t,i){Ea.call(this,{code:t,units:ba.DEGREES,extent:Ga.EXTENT,axisOrientation:i,global:true,metersPerUnit:Ga.METERS_PER_UNIT,worldExtent:Ga.EXTENT})};ta.inherits(Ga.Projection_,Ea);Ga.RADIUS=6378137;Ga.EXTENT=[-180,-90,180,90];Ga.METERS_PER_UNIT=Math.PI*Ga.RADIUS/180;Ga.PROJECTIONS=[new Ga.Projection_("CRS:84"),new Ga.Projection_("EPSG:4326","neu"),new Ga.Projection_("urn:ogc:def:crs:EPSG::4326","neu"),new Ga.Projection_("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Ga.Projection_("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ga.Projection_("urn:ogc:def:crs:OGC:2:84"),new Ga.Projection_("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ga.Projection_("urn:x-ogc:def:crs:EPSG:4326","neu")];var Pa={};Pa.cache_={};Pa.clear=function(){Pa.cache_={}};Pa.get=function(t){var i=Pa.cache_;return i[t]||null};Pa.add=function(t,i){var s=Pa.cache_;s[t]=i};var ka={};ka.cache_={};ka.clear=function(){ka.cache_={}};ka.add=function(t,i,s){var e=t.getCode();var r=i.getCode();var n=ka.cache_;if(!(e in n)){n[e]={}}n[e][r]=s};ka.remove=function(t,i){var s=t.getCode();var e=i.getCode();var r=ka.cache_;var n=r[s][e];delete r[s][e];if(ea.isEmpty(r[s])){delete r[s]}return n};ka.get=function(t,i){var s;var e=ka.cache_;if(t in e&&i in e[t]){s=e[t][i]}return s};var Na={};Na.METERS_PER_UNIT=ba.METERS_PER_UNIT;Na.SPHERE_=new ma(ma.DEFAULT_RADIUS);if(ta.ENABLE_PROJ4JS){Na.setProj4=function(t){xa.set(t)}}Na.getPointResolution=function(t,i,s,e){t=Na.get(t);var r;var n=t.getPointResolutionFunc();if(n){r=n(i,s)}else{var h=t.getUnits();if(h==ba.DEGREES&&!e||e==ba.DEGREES){r=i}else{var a=Na.getTransformFromProjections(t,Na.get("EPSG:4326"));var o=[s[0]-i/2,s[1],s[0]+i/2,s[1],s[0],s[1]-i/2,s[0],s[1]+i/2];o=a(o,o,2);var f=Na.SPHERE_.haversineDistance(o.slice(0,2),o.slice(2,4));var u=Na.SPHERE_.haversineDistance(o.slice(4,6),o.slice(6,8));r=(f+u)/2;var l=e?ba.METERS_PER_UNIT[e]:t.getMetersPerUnit();if(l!==undefined){r/=l}}}return r};Na.addEquivalentProjections=function(t){Na.addProjections(t);t.forEach((function(i){t.forEach((function(t){if(i!==t){ka.add(i,t,Na.cloneTransform)}}))}))};Na.addEquivalentTransforms=function(t,i,s,e){t.forEach((function(t){i.forEach((function(i){ka.add(t,i,s);ka.add(i,t,e)}))}))};Na.addProjection=function(t){Pa.add(t.getCode(),t);ka.add(t,t,Na.cloneTransform)};Na.addProjections=function(t){t.forEach(Na.addProjection)};Na.clearAllProjections=function(){Pa.clear();ka.clear()};Na.createProjection=function(t,i){if(!t){return Na.get(i)}else if(typeof t==="string"){return Na.get(t)}else{return t}};Na.addCoordinateTransforms=function(t,i,s,e){var r=Na.get(t);var n=Na.get(i);ka.add(r,n,Na.createTransformFromCoordinateTransform(s));ka.add(n,r,Na.createTransformFromCoordinateTransform(e))};Na.createTransformFromCoordinateTransform=function(t){return function(i,s,e){var r=i.length;var n=e!==undefined?e:2;var h=s!==undefined?s:new Array(r);var a,o,f;for(o=0;o<r;o+=n){a=t([i[o],i[o+1]]);h[o]=a[0];h[o+1]=a[1];for(f=n-1;f>=2;--f){h[o+f]=i[o+f]}}return h}};Na.fromLonLat=function(t,i){return Na.transform(t,"EPSG:4326",i!==undefined?i:"EPSG:3857")};Na.toLonLat=function(t,i){var s=Na.transform(t,i!==undefined?i:"EPSG:3857","EPSG:4326");var e=s[0];if(e<-180||e>180){s[0]=ca.modulo(e+180,360)-180}return s};Na.get=function(t){var i=null;if(t instanceof Ea){i=t}else if(typeof t==="string"){var s=t;i=Pa.get(s);if(ta.ENABLE_PROJ4JS&&!i){var e=xa.get();if(typeof e=="function"&&e.defs(s)!==undefined){i=new Ea({code:s});Na.addProjection(i)}}}return i};Na.equivalent=function(t,i){if(t===i){return true}var s=t.getUnits()===i.getUnits();if(t.getCode()===i.getCode()){return s}else{var e=Na.getTransformFromProjections(t,i);return e===Na.cloneTransform&&s}};Na.getTransform=function(t,i){var s=Na.get(t);var e=Na.get(i);return Na.getTransformFromProjections(s,e)};Na.getTransformFromProjections=function(t,i){var s=t.getCode();var e=i.getCode();var r=ka.get(s,e);if(ta.ENABLE_PROJ4JS&&!r){var n=xa.get();if(typeof n=="function"){var h=n.defs(s);var a=n.defs(e);if(h!==undefined&&a!==undefined){if(h===a){Na.addEquivalentProjections([i,t])}else{var o=n(e,s);Na.addCoordinateTransforms(i,t,o.forward,o.inverse)}r=ka.get(s,e)}}}if(!r){r=Na.identityTransform}return r};Na.identityTransform=function(t,i,s){if(i!==undefined&&t!==i){for(var e=0,r=t.length;e<r;++e){i[e]=t[e]}t=i}return t};Na.cloneTransform=function(t,i,s){var e;if(i!==undefined){for(var r=0,n=t.length;r<n;++r){i[r]=t[r]}e=i}else{e=t.slice()}return e};Na.transform=function(t,i,s){var e=Na.getTransform(i,s);return e(t,undefined,t.length)};Na.transformExtent=function(t,i,s){var e=Na.getTransform(i,s);return Ma.applyTransform(t,e)};Na.transformWithProjections=function(t,i,s){var e=Na.getTransformFromProjections(i,s);return e(t)};Na.addCommon=function(){Na.addEquivalentProjections(Sa.PROJECTIONS);Na.addEquivalentProjections(Ga.PROJECTIONS);Na.addEquivalentTransforms(Ga.PROJECTIONS,Sa.PROJECTIONS,Sa.fromEPSG4326,Sa.toEPSG4326)};Na.addCommon();var Ia={};Ia.tmp_=new Array(6);Ia.create=function(){return[1,0,0,1,0,0]};Ia.reset=function(t){return Ia.set(t,1,0,0,1,0,0)};Ia.multiply=function(t,i){var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=t[4];var a=t[5];var o=i[0];var f=i[1];var u=i[2];var l=i[3];var v=i[4];var c=i[5];t[0]=s*o+r*f;t[1]=e*o+n*f;t[2]=s*u+r*l;t[3]=e*u+n*l;t[4]=s*v+r*c+h;t[5]=e*v+n*c+a;return t};Ia.set=function(t,i,s,e,r,n,h){t[0]=i;t[1]=s;t[2]=e;t[3]=r;t[4]=n;t[5]=h;return t};Ia.setFromArray=function(t,i){t[0]=i[0];t[1]=i[1];t[2]=i[2];t[3]=i[3];t[4]=i[4];t[5]=i[5];return t};Ia.apply=function(t,i){var s=i[0],e=i[1];i[0]=t[0]*s+t[2]*e+t[4];i[1]=t[1]*s+t[3]*e+t[5];return i};Ia.rotate=function(t,i){var s=Math.cos(i);var e=Math.sin(i);return Ia.multiply(t,Ia.set(Ia.tmp_,s,e,-e,s,0,0))};Ia.scale=function(t,i,s){return Ia.multiply(t,Ia.set(Ia.tmp_,i,0,0,s,0,0))};Ia.translate=function(t,i,s){return Ia.multiply(t,Ia.set(Ia.tmp_,1,0,0,1,i,s))};Ia.compose=function(t,i,s,e,r,n,h,a){var o=Math.sin(n);var f=Math.cos(n);t[0]=e*f;t[1]=r*o;t[2]=-e*o;t[3]=r*f;t[4]=h*e*f-a*e*o+i;t[5]=h*r*o+a*r*f+s;return t};Ia.invert=function(t){var i=Ia.determinant(t);va.assert(i!==0,32);var s=t[0];var e=t[1];var r=t[2];var n=t[3];var h=t[4];var a=t[5];t[0]=n/i;t[1]=-e/i;t[2]=-r/i;t[3]=s/i;t[4]=(r*a-n*h)/i;t[5]=-(s*a-e*h)/i;return t};Ia.determinant=function(t){return t[0]*t[3]-t[1]*t[2]};var Ca=function(){ua.call(this);this.extent_=Ma.createEmpty();this.extentRevision_=-1;this.simplifiedGeometryCache={};this.simplifiedGeometryMaxMinSquaredTolerance=0;this.simplifiedGeometryRevision=0;this.tmpTransform_=Ia.create()};ta.inherits(Ca,ua);Ca.prototype.clone=function(){};Ca.prototype.closestPointXY=function(t,i,s,e){};Ca.prototype.getClosestPoint=function(t,i){var s=i?i:[NaN,NaN];this.closestPointXY(t[0],t[1],s,Infinity);return s};Ca.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])};Ca.prototype.computeExtent=function(t){};Ca.prototype.containsXY=wa.FALSE;Ca.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){this.extent_=this.computeExtent(this.extent_);this.extentRevision_=this.getRevision()}return Ma.returnOrUpdate(this.extent_,t)};Ca.prototype.rotate=function(t,i){};Ca.prototype.scale=function(t,i,s){};Ca.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)};Ca.prototype.getSimplifiedGeometry=function(t){};Ca.prototype.getType=function(){};Ca.prototype.applyTransform=function(t){};Ca.prototype.intersectsExtent=function(t){};Ca.prototype.translate=function(t,i){};Ca.prototype.transform=function(t,i){var s=this.tmpTransform_;t=Na.get(t);var e=t.getUnits()==ba.TILE_PIXELS?function(e,r,n){var h=t.getExtent();var a=t.getWorldExtent();var o=Ma.getHeight(a)/Ma.getHeight(h);Ia.compose(s,a[0],a[3],o,-o,0,0,0);ya.transform2D(e,0,e.length,n,s,r);return Na.getTransform(t,i)(e,r,n)}:Na.getTransform(t,i);this.applyTransform(e);return this};var Aa=function(){Ca.call(this);this.layout=za.XY;this.stride=2;this.flatCoordinates=null};ta.inherits(Aa,Ca);Aa.getLayoutForStride_=function(t){var i;if(t==2){i=za.XY}else if(t==3){i=za.XYZ}else if(t==4){i=za.XYZM}return i};Aa.getStrideForLayout=function(t){var i;if(t==za.XY){i=2}else if(t==za.XYZ||t==za.XYM){i=3}else if(t==za.XYZM){i=4}return i};Aa.prototype.containsXY=wa.FALSE;Aa.prototype.computeExtent=function(t){return Ma.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)};Aa.prototype.getCoordinates=function(){};Aa.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)};Aa.prototype.getFlatCoordinates=function(){return this.flatCoordinates};Aa.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)};Aa.prototype.getLayout=function(){return this.layout};Aa.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()){ea.clear(this.simplifiedGeometryCache);this.simplifiedGeometryMaxMinSquaredTolerance=0;this.simplifiedGeometryRevision=this.getRevision()}if(t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance){return this}var i=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(i)){return this.simplifiedGeometryCache[i]}else{var s=this.getSimplifiedGeometryInternal(t);var e=s.getFlatCoordinates();if(e.length<this.flatCoordinates.length){this.simplifiedGeometryCache[i]=s;return s}else{this.simplifiedGeometryMaxMinSquaredTolerance=t;return this}}};Aa.prototype.getSimplifiedGeometryInternal=function(t){return this};Aa.prototype.getStride=function(){return this.stride};Aa.prototype.setFlatCoordinatesInternal=function(t,i){this.stride=Aa.getStrideForLayout(t);this.layout=t;this.flatCoordinates=i};Aa.prototype.setCoordinates=function(t,i){};Aa.prototype.setLayout=function(t,i,s){var e;if(t){e=Aa.getStrideForLayout(t)}else{var r;for(r=0;r<s;++r){if(i.length===0){this.layout=za.XY;this.stride=2;return}else{i=i[0]}}e=i.length;t=Aa.getLayoutForStride_(e)}this.layout=t;this.stride=e};Aa.prototype.applyTransform=function(t){if(this.flatCoordinates){t(this.flatCoordinates,this.flatCoordinates,this.stride);this.changed()}};Aa.prototype.rotate=function(t,i){var s=this.getFlatCoordinates();if(s){var e=this.getStride();ya.rotate(s,0,s.length,e,t,i,s);this.changed()}};Aa.prototype.scale=function(t,i,s){var e=i;if(e===undefined){e=t}var r=s;if(!r){r=Ma.getCenter(this.getExtent())}var n=this.getFlatCoordinates();if(n){var h=this.getStride();ya.scale(n,0,n.length,h,t,e,r,n);this.changed()}};Aa.prototype.translate=function(t,i){var s=this.getFlatCoordinates();if(s){var e=this.getStride();ya.translate(s,0,s.length,e,t,i,s);this.changed()}};Aa.transform2D=function(t,i,s){var e=t.getFlatCoordinates();if(!e){return null}else{var r=t.getStride();return ya.transform2D(e,0,e.length,r,i,s)}};var Ra={};Ra.linearRing=function(t,i,s,e){var r=0;var n=t[s-e];var h=t[s-e+1];for(;i<s;i+=e){var a=t[i];var o=t[i+1];r+=h*a-n*o;n=a;h=o}return r/2};Ra.linearRings=function(t,i,s,e){var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r+=Ra.linearRing(t,i,a,e);i=a}return r};Ra.linearRingss=function(t,i,s,e){var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r+=Ra.linearRings(t,i,a,e);i=a[a.length-1]}return r};var Ta={};Ta.point=function(t,i,s,e,r,n,h){var a=t[i];var o=t[i+1];var f=t[s]-a;var u=t[s+1]-o;var l,v;if(f===0&&u===0){v=i}else{var c=((r-a)*f+(n-o)*u)/(f*f+u*u);if(c>1){v=s}else if(c>0){for(l=0;l<e;++l){h[l]=ca.lerp(t[i+l],t[s+l],c)}h.length=e;return}else{v=i}}for(l=0;l<e;++l){h[l]=t[v+l]}h.length=e};Ta.getMaxSquaredDelta=function(t,i,s,e,r){var n=t[i];var h=t[i+1];for(i+=e;i<s;i+=e){var a=t[i];var o=t[i+1];var f=ca.squaredDistance(n,h,a,o);if(f>r){r=f}n=a;h=o}return r};Ta.getsMaxSquaredDelta=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r=Ta.getMaxSquaredDelta(t,i,a,e,r);i=a}return r};Ta.getssMaxSquaredDelta=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];r=Ta.getsMaxSquaredDelta(t,i,a,e,r);i=a[a.length-1]}return r};Ta.getClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){if(i==s){return f}var l,v;if(r===0){v=ca.squaredDistance(h,a,t[i],t[i+1]);if(v<f){for(l=0;l<e;++l){o[l]=t[i+l]}o.length=e;return v}else{return f}}var c=u?u:[NaN,NaN];var d=i+e;while(d<s){Ta.point(t,d-e,d,e,h,a,c);v=ca.squaredDistance(h,a,c[0],c[1]);if(v<f){f=v;for(l=0;l<e;++l){o[l]=c[l]}o.length=e;d+=e}else{d+=e*Math.max((Math.sqrt(v)-Math.sqrt(f))/r|0,1)}}if(n){Ta.point(t,s-e,i,e,h,a,c);v=ca.squaredDistance(h,a,c[0],c[1]);if(v<f){f=v;for(l=0;l<e;++l){o[l]=c[l]}o.length=e}}return f};Ta.getsClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){var l=u?u:[NaN,NaN];var v,c;for(v=0,c=s.length;v<c;++v){var d=s[v];f=Ta.getClosestPoint(t,i,d,e,r,n,h,a,o,f,l);i=d}return f};Ta.getssClosestPoint=function(t,i,s,e,r,n,h,a,o,f,u){var l=u?u:[NaN,NaN];var v,c;for(v=0,c=s.length;v<c;++v){var d=s[v];f=Ta.getsClosestPoint(t,i,d,e,r,n,h,a,o,f,l);i=d[d.length-1]}return f};var Oa={};Oa.coordinate=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){t[i++]=s[r]}return i};Oa.coordinates=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){var h=s[r];var a;for(a=0;a<e;++a){t[i++]=h[a]}}return i};Oa.coordinatess=function(t,i,s,e,r){var n=r?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=Oa.coordinates(t,i,s[a],e);n[h++]=f;i=f}n.length=h;return n};Oa.coordinatesss=function(t,i,s,e,r){var n=r?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=Oa.coordinatess(t,i,s[a],e,n[h]);n[h++]=f;i=f[f.length-1]}n.length=h;return n};var La={};La.coordinates=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a;for(a=i;a<s;a+=e){n[h++]=t.slice(a,a+e)}n.length=h;return n};La.coordinatess=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=s[a];n[h++]=La.coordinates(t,i,f,e,n[h]);i=f}n.length=h;return n};La.coordinatesss=function(t,i,s,e,r){var n=r!==undefined?r:[];var h=0;var a,o;for(a=0,o=s.length;a<o;++a){var f=s[a];n[h++]=La.coordinatess(t,i,f,e,n[h]);i=f[f.length-1]}n.length=h;return n};var Fa={};Fa.lineString=function(t,i,s,e,r,n,h){var a=h!==undefined?h:[];if(!n){s=Fa.radialDistance(t,i,s,e,r,a,0);t=a;i=0;e=2}a.length=Fa.douglasPeucker(t,i,s,e,r,a,0);return a};Fa.douglasPeucker=function(t,i,s,e,r,n,h){var a=(s-i)/e;if(a<3){for(;i<s;i+=e){n[h++]=t[i];n[h++]=t[i+1]}return h}var o=new Array(a);o[0]=1;o[a-1]=1;var f=[i,s-e];var u=0;var l;while(f.length>0){var v=f.pop();var c=f.pop();var d=0;var m=t[c];var p=t[c+1];var _=t[v];var g=t[v+1];for(l=c+e;l<v;l+=e){var M=t[l];var z=t[l+1];var w=ca.squaredSegmentDistance(M,z,m,p,_,g);if(w>d){u=l;d=w}}if(d>r){o[(u-i)/e]=1;if(c+e<u){f.push(c,u)}if(u+e<v){f.push(u,v)}}}for(l=0;l<a;++l){if(o[l]){n[h++]=t[i+l*e];n[h++]=t[i+l*e+1]}}return h};Fa.douglasPeuckers=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];h=Fa.douglasPeucker(t,i,u,e,r,n,h);a.push(h);i=u}return h};Fa.douglasPeuckerss=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];var l=[];h=Fa.douglasPeuckers(t,i,u,e,r,n,h,l);a.push(l);i=u[u.length-1]}return h};Fa.radialDistance=function(t,i,s,e,r,n,h){if(s<=i+e){for(;i<s;i+=e){n[h++]=t[i];n[h++]=t[i+1]}return h}var a=t[i];var o=t[i+1];n[h++]=a;n[h++]=o;var f=a;var u=o;for(i+=e;i<s;i+=e){f=t[i];u=t[i+1];if(ca.squaredDistance(a,o,f,u)>r){n[h++]=f;n[h++]=u;a=f;o=u}}if(f!=a||u!=o){n[h++]=f;n[h++]=u}return h};Fa.snap=function(t,i){return i*Math.round(t/i)};Fa.quantize=function(t,i,s,e,r,n,h){if(i==s){return h}var a=Fa.snap(t[i],r);var o=Fa.snap(t[i+1],r);i+=e;n[h++]=a;n[h++]=o;var f,u;do{f=Fa.snap(t[i],r);u=Fa.snap(t[i+1],r);i+=e;if(i==s){n[h++]=f;n[h++]=u;return h}}while(f==a&&u==o);while(i<s){var l,v;l=Fa.snap(t[i],r);v=Fa.snap(t[i+1],r);i+=e;if(l==f&&v==u){continue}var c=f-a;var d=u-o;var m=l-a;var p=v-o;if(c*p==d*m&&(c<0&&m<c||c==m||c>0&&m>c)&&(d<0&&p<d||d==p||d>0&&p>d)){f=l;u=v;continue}n[h++]=f;n[h++]=u;a=f;o=u;f=l;u=v}n[h++]=f;n[h++]=u;return h};Fa.quantizes=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];h=Fa.quantize(t,i,u,e,r,n,h);a.push(h);i=u}return h};Fa.quantizess=function(t,i,s,e,r,n,h,a){var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];var l=[];h=Fa.quantizes(t,i,u,e,r,n,h,l);a.push(l);i=u[u.length-1]}return h};var Da=function(t,i){Aa.call(this);this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.setCoordinates(t,i)};ta.inherits(Da,Aa);Da.prototype.clone=function(){var t=new Da(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Da.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,true,t,i,s,e)};Da.prototype.getArea=function(){return Ra.linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Da.prototype.getCoordinates=function(){return La.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Da.prototype.getSimplifiedGeometryInternal=function(t){var i=[];i.length=Fa.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0);var s=new Da(null);s.setFlatCoordinates(za.XY,i);return s};Da.prototype.getType=function(){return da.LINEAR_RING};Da.prototype.intersectsExtent=function(t){};Da.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,1);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinates(this.flatCoordinates,0,t,this.stride);this.changed()}};Da.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var Wa=function(t,i){Aa.call(this);this.setCoordinates(t,i)};ta.inherits(Wa,Aa);Wa.prototype.clone=function(){var t=new Wa(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Wa.prototype.closestPointXY=function(t,i,s,e){var r=this.flatCoordinates;var n=ca.squaredDistance(t,i,r[0],r[1]);if(n<e){var h=this.stride;var a;for(a=0;a<h;++a){s[a]=r[a]}s.length=h;return n}else{return e}};Wa.prototype.getCoordinates=function(){return!this.flatCoordinates?[]:this.flatCoordinates.slice()};Wa.prototype.computeExtent=function(t){return Ma.createOrUpdateFromCoordinate(this.flatCoordinates,t)};Wa.prototype.getType=function(){return da.POINT};Wa.prototype.intersectsExtent=function(t){return Ma.containsXY(t,this.flatCoordinates[0],this.flatCoordinates[1])};Wa.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,0);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinate(this.flatCoordinates,0,t,this.stride);this.changed()}};Wa.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var ja={};ja.linearRingContainsExtent=function(t,i,s,e,r){var n=Ma.forEachCorner(r,(function(r){return!ja.linearRingContainsXY(t,i,s,e,r[0],r[1])}));return!n};ja.linearRingContainsXY=function(t,i,s,e,r,n){var h=0;var a=t[s-e];var o=t[s-e+1];for(;i<s;i+=e){var f=t[i];var u=t[i+1];if(o<=n){if(u>n&&(f-a)*(n-o)-(r-a)*(u-o)>0){h++}}else if(u<=n&&(f-a)*(n-o)-(r-a)*(u-o)<0){h--}a=f;o=u}return h!==0};ja.linearRingsContainsXY=function(t,i,s,e,r,n){if(s.length===0){return false}if(!ja.linearRingContainsXY(t,i,s[0],e,r,n)){return false}var h,a;for(h=1,a=s.length;h<a;++h){if(ja.linearRingContainsXY(t,s[h-1],s[h],e,r,n)){return false}}return true};ja.linearRingssContainsXY=function(t,i,s,e,r,n){if(s.length===0){return false}var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];if(ja.linearRingsContainsXY(t,i,o,e,r,n)){return true}i=o[o.length-1]}return false};var Va={};Va.linearRings=function(t,i,s,e,r,n,h){var a,o,f,u,l,v,c;var d=r[n+1];var m=[];for(var p=0,_=s.length;p<_;++p){var g=s[p];u=t[g-e];v=t[g-e+1];for(a=i;a<g;a+=e){l=t[a];c=t[a+1];if(d<=v&&c<=d||v<=d&&d<=c){f=(d-v)/(c-v)*(l-u)+u;m.push(f)}u=l;v=c}}var M=NaN;var z=-Infinity;m.sort(pa.numberSafeCompareFunction);u=m[0];for(a=1,o=m.length;a<o;++a){l=m[a];var w=Math.abs(l-u);if(w>z){f=(u+l)/2;if(ja.linearRingsContainsXY(t,i,s,e,f,d)){M=f;z=w}}u=l}if(isNaN(M)){M=r[n]}if(h){h.push(M,d,z);return h}else{return[M,d,z]}};Va.linearRingss=function(t,i,s,e,r){var n=[];var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];n=Va.linearRings(t,i,o,e,r,2*h,n);i=o[o.length-1]}return n};var Ua={};Ua.forEach=function(t,i,s,e,r,n){var h=[t[i],t[i+1]];var a=[];var o;for(;i+e<s;i+=e){a[0]=t[i+e];a[1]=t[i+e+1];o=r.call(n,h,a);if(o){return o}h[0]=a[0];h[1]=a[1]}return false};var Ba={};Ba.lineString=function(t,i,s,e,r){var n=Ma.extendFlatCoordinates(Ma.createEmpty(),t,i,s,e);if(!Ma.intersects(r,n)){return false}if(Ma.containsExtent(r,n)){return true}if(n[0]>=r[0]&&n[2]<=r[2]){return true}if(n[1]>=r[1]&&n[3]<=r[3]){return true}return Ua.forEach(t,i,s,e,(function(t,i){return Ma.intersectsSegment(r,t,i)}))};Ba.lineStrings=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){if(Ba.lineString(t,i,s[n],e,r)){return true}i=s[n]}return false};Ba.linearRing=function(t,i,s,e,r){if(Ba.lineString(t,i,s,e,r)){return true}if(ja.linearRingContainsXY(t,i,s,e,r[0],r[1])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[0],r[3])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[2],r[1])){return true}if(ja.linearRingContainsXY(t,i,s,e,r[2],r[3])){return true}return false};Ba.linearRings=function(t,i,s,e,r){if(!Ba.linearRing(t,i,s[0],e,r)){return false}if(s.length===1){return true}var n,h;for(n=1,h=s.length;n<h;++n){if(ja.linearRingContainsExtent(t,s[n-1],s[n],e,r)){return false}}return true};Ba.linearRingss=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];if(Ba.linearRings(t,i,a,e,r)){return true}i=a[a.length-1]}return false};var qa={};qa.coordinates=function(t,i,s,e){while(i<s-e){var r;for(r=0;r<e;++r){var n=t[i+r];t[i+r]=t[s-e+r];t[s-e+r]=n}i+=e;s-=e}};var Ha={};Ha.linearRingIsClockwise=function(t,i,s,e){var r=0;var n=t[s-e];var h=t[s-e+1];for(;i<s;i+=e){var a=t[i];var o=t[i+1];r+=(a-n)*(o+h);n=a;h=o}return r>0};Ha.linearRingsAreOriented=function(t,i,s,e,r){var n=r!==undefined?r:false;var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];var f=Ha.linearRingIsClockwise(t,i,o,e);if(h===0){if(n&&f||!n&&!f){return false}}else{if(n&&!f||!n&&f){return false}}i=o}return true};Ha.linearRingssAreOriented=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){if(!Ha.linearRingsAreOriented(t,i,s[n],e,r)){return false}}return true};Ha.orientLinearRings=function(t,i,s,e,r){var n=r!==undefined?r:false;var h,a;for(h=0,a=s.length;h<a;++h){var o=s[h];var f=Ha.linearRingIsClockwise(t,i,o,e);var u=h===0?n&&f||!n&&!f:n&&!f||!n&&f;if(u){qa.coordinates(t,i,o,e)}i=o}return i};Ha.orientLinearRingss=function(t,i,s,e,r){var n,h;for(n=0,h=s.length;n<h;++n){i=Ha.orientLinearRings(t,i,s[n],e,r)}return i};var Xa=function(t,i){Aa.call(this);this.ends_=[];this.flatInteriorPointRevision_=-1;this.flatInteriorPoint_=null;this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.orientedRevision_=-1;this.orientedFlatCoordinates_=null;this.setCoordinates(t,i)};ta.inherits(Xa,Aa);Xa.prototype.appendLinearRing=function(t){if(!this.flatCoordinates){this.flatCoordinates=t.getFlatCoordinates().slice()}else{pa.extend(this.flatCoordinates,t.getFlatCoordinates())}this.ends_.push(this.flatCoordinates.length);this.changed()};Xa.prototype.clone=function(){var t=new Xa(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice());return t};Xa.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,true,t,i,s,e)};Xa.prototype.containsXY=function(t,i){return ja.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,i)};Xa.prototype.getArea=function(){return Ra.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)};Xa.prototype.getCoordinates=function(t){var i;if(t!==undefined){i=this.getOrientedFlatCoordinates().slice();Ha.orientLinearRings(i,0,this.ends_,this.stride,t)}else{i=this.flatCoordinates}return La.coordinatess(i,0,this.ends_,this.stride)};Xa.prototype.getEnds=function(){return this.ends_};Xa.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Ma.getCenter(this.getExtent());this.flatInteriorPoint_=Va.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0);this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_};Xa.prototype.getInteriorPoint=function(){return new Wa(this.getFlatInteriorPoint(),za.XYM)};Xa.prototype.getLinearRingCount=function(){return this.ends_.length};Xa.prototype.getLinearRing=function(t){if(t<0||this.ends_.length<=t){return null}var i=new Da(null);i.setFlatCoordinates(this.layout,this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]));return i};Xa.prototype.getLinearRings=function(){var t=this.layout;var i=this.flatCoordinates;var s=this.ends_;var e=[];var r=0;var n,h;for(n=0,h=s.length;n<h;++n){var a=s[n];var o=new Da(null);o.setFlatCoordinates(t,i.slice(r,a));e.push(o);r=a}return e};Xa.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;if(Ha.linearRingsAreOriented(t,0,this.ends_,this.stride)){this.orientedFlatCoordinates_=t}else{this.orientedFlatCoordinates_=t.slice();this.orientedFlatCoordinates_.length=Ha.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)}this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_};Xa.prototype.getSimplifiedGeometryInternal=function(t){var i=[];var s=[];i.length=Fa.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,s);var e=new Xa(null);e.setFlatCoordinates(za.XY,i,s);return e};Xa.prototype.getType=function(){return da.POLYGON};Xa.prototype.intersectsExtent=function(t){return Ba.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)};Xa.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null,this.ends_)}else{this.setLayout(i,t,2);if(!this.flatCoordinates){this.flatCoordinates=[]}var s=Oa.coordinatess(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=s.length===0?0:s[s.length-1];this.changed()}};Xa.prototype.setFlatCoordinates=function(t,i,s){this.setFlatCoordinatesInternal(t,i);this.ends_=s;this.changed()};Xa.circular=function(t,i,s,e){var r=e?e:32;var n=[];var h;for(h=0;h<r;++h){pa.extend(n,t.offset(i,s,2*Math.PI*h/r))}n.push(n[0],n[1]);var a=new Xa(null);a.setFlatCoordinates(za.XY,n,[n.length]);return a};Xa.fromExtent=function(t){var i=t[0];var s=t[1];var e=t[2];var r=t[3];var n=[i,s,i,r,e,r,e,s,i,s];var h=new Xa(null);h.setFlatCoordinates(za.XY,n,[n.length]);return h};Xa.fromCircle=function(t,i,s){var e=i?i:32;var r=t.getStride();var n=t.getLayout();var h=new Xa(null,n);var a=r*(e+1);var o=new Array(a);for(var f=0;f<a;f++){o[f]=0}var u=[o.length];h.setFlatCoordinates(n,o,u);Xa.makeRegular(h,t.getCenter(),t.getRadius(),s);return h};Xa.makeRegular=function(t,i,s,e){var r=t.getFlatCoordinates();var n=t.getLayout();var h=t.getStride();var a=t.getEnds();var o=r.length/h-1;var f=e?e:0;var u,l;for(var v=0;v<=o;++v){l=v*h;u=f+ca.modulo(v,o)*2*Math.PI/o;r[l]=i[0]+s*Math.cos(u);r[l+1]=i[1]+s*Math.sin(u)}t.setFlatCoordinates(n,r,a)};var Ya={};Ya.ONE=1;Ya.SRC_ALPHA=770;Ya.COLOR_ATTACHMENT0=36064;Ya.COLOR_BUFFER_BIT=16384;Ya.TRIANGLES=4;Ya.TRIANGLE_STRIP=5;Ya.ONE_MINUS_SRC_ALPHA=771;Ya.ARRAY_BUFFER=34962;Ya.ELEMENT_ARRAY_BUFFER=34963;Ya.STREAM_DRAW=35040;Ya.STATIC_DRAW=35044;Ya.DYNAMIC_DRAW=35048;Ya.CULL_FACE=2884;Ya.BLEND=3042;Ya.STENCIL_TEST=2960;Ya.DEPTH_TEST=2929;Ya.SCISSOR_TEST=3089;Ya.UNSIGNED_BYTE=5121;Ya.UNSIGNED_SHORT=5123;Ya.UNSIGNED_INT=5125;Ya.FLOAT=5126;Ya.RGBA=6408;Ya.FRAGMENT_SHADER=35632;Ya.VERTEX_SHADER=35633;Ya.LINK_STATUS=35714;Ya.LINEAR=9729;Ya.TEXTURE_MAG_FILTER=10240;Ya.TEXTURE_MIN_FILTER=10241;Ya.TEXTURE_WRAP_S=10242;Ya.TEXTURE_WRAP_T=10243;Ya.TEXTURE_2D=3553;Ya.TEXTURE0=33984;Ya.CLAMP_TO_EDGE=33071;Ya.COMPILE_STATUS=35713;Ya.FRAMEBUFFER=36160;Ya.CONTEXT_IDS_=["experimental-webgl","webgl","webkit-3d","moz-webgl"];Ya.getContext=function(t,i){var s,e,r=Ya.CONTEXT_IDS_.length;for(e=0;e<r;++e){try{s=t.getContext(Ya.CONTEXT_IDS_[e],i);if(s){return s}}catch(t){}}return null};var Ja={};var Ka=typeof navigator!=="undefined"?navigator.userAgent.toLowerCase():"";Ja.FIREFOX=Ka.indexOf("firefox")!==-1;Ja.SAFARI=Ka.indexOf("safari")!==-1&&Ka.indexOf("chrom")==-1;Ja.WEBKIT=Ka.indexOf("webkit")!==-1&&Ka.indexOf("edge")==-1;Ja.MAC=Ka.indexOf("macintosh")!==-1;Ja.DEVICE_PIXEL_RATIO=window.devicePixelRatio||1;Ja.CANVAS_LINE_DASH=false;Ja.CANVAS=ta.ENABLE_CANVAS&&function(){if(!("HTMLCanvasElement"in window)){return false}try{var t=document.createElement("CANVAS").getContext("2d");if(!t){return false}else{if(t.setLineDash!==undefined){Ja.CANVAS_LINE_DASH=true}return true}}catch(t){return false}}();Ja.DEVICE_ORIENTATION="DeviceOrientationEvent"in window;Ja.GEOLOCATION="geolocation"in navigator;Ja.TOUCH=ta.ASSUME_TOUCH||"ontouchstart"in window;Ja.POINTER="PointerEvent"in window;Ja.MSPOINTER=!!navigator.msPointerEnabled;(function(){if(ta.ENABLE_WEBGL){var t=false;var i;var s=[];if("WebGLRenderingContext"in window){try{var e=document.createElement("CANVAS");var r=Ya.getContext(e,{failIfMajorPerformanceCaveat:true});if(r){t=true;i=r.getParameter(r.MAX_TEXTURE_SIZE);s=r.getSupportedExtensions()}}catch(t){}}Ja.WEBGL=t;ta.WEBGL_EXTENSIONS=s;ta.WEBGL_MAX_TEXTURE_SIZE=i}})();var Za=function(t){ua.call(this);var i=t||{};this.position_=null;this.transform_=Na.identityTransform;this.sphere_=new ma(Ga.RADIUS);this.watchId_=undefined;ra.listen(this,ua.getChangeEventType(ia.PROJECTION),this.handleProjectionChanged_,this);ra.listen(this,ua.getChangeEventType(ia.TRACKING),this.handleTrackingChanged_,this);if(i.projection!==undefined){this.setProjection(i.projection)}if(i.trackingOptions!==undefined){this.setTrackingOptions(i.trackingOptions)}this.setTracking(i.tracking!==undefined?i.tracking:false)};ta.inherits(Za,ua);Za.prototype.disposeInternal=function(){this.setTracking(false);ua.prototype.disposeInternal.call(this)};Za.prototype.handleProjectionChanged_=function(){var t=this.getProjection();if(t){this.transform_=Na.getTransformFromProjections(Na.get("EPSG:4326"),t);if(this.position_){this.set(ia.POSITION,this.transform_(this.position_))}}};Za.prototype.handleTrackingChanged_=function(){if(Ja.GEOLOCATION){var t=this.getTracking();if(t&&this.watchId_===undefined){this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions())}else if(!t&&this.watchId_!==undefined){navigator.geolocation.clearWatch(this.watchId_);this.watchId_=undefined}}};Za.prototype.positionChange_=function(t){var i=t.coords;this.set(ia.ACCURACY,i.accuracy);this.set(ia.ALTITUDE,i.altitude===null?undefined:i.altitude);this.set(ia.ALTITUDE_ACCURACY,i.altitudeAccuracy===null?undefined:i.altitudeAccuracy);this.set(ia.HEADING,i.heading===null?undefined:ca.toRadians(i.heading));if(!this.position_){this.position_=[i.longitude,i.latitude]}else{this.position_[0]=i.longitude;this.position_[1]=i.latitude}var s=this.transform_(this.position_);this.set(ia.POSITION,s);this.set(ia.SPEED,i.speed===null?undefined:i.speed);var e=Xa.circular(this.sphere_,this.position_,i.accuracy);e.applyTransform(this.transform_);this.set(ia.ACCURACY_GEOMETRY,e);this.changed()};Za.prototype.positionError_=function(t){t.type=oa.ERROR;this.setTracking(false);this.dispatchEvent(t)};Za.prototype.getAccuracy=function(){return this.get(ia.ACCURACY)};Za.prototype.getAccuracyGeometry=function(){return this.get(ia.ACCURACY_GEOMETRY)||null};Za.prototype.getAltitude=function(){return this.get(ia.ALTITUDE)};Za.prototype.getAltitudeAccuracy=function(){return this.get(ia.ALTITUDE_ACCURACY)};Za.prototype.getHeading=function(){return this.get(ia.HEADING)};Za.prototype.getPosition=function(){return this.get(ia.POSITION)};Za.prototype.getProjection=function(){return this.get(ia.PROJECTION)};Za.prototype.getSpeed=function(){return this.get(ia.SPEED)};Za.prototype.getTracking=function(){return this.get(ia.TRACKING)};Za.prototype.getTrackingOptions=function(){return this.get(ia.TRACKING_OPTIONS)};Za.prototype.setProjection=function(t){this.set(ia.PROJECTION,Na.get(t))};Za.prototype.setTracking=function(t){this.set(ia.TRACKING,t)};Za.prototype.setTrackingOptions=function(t){this.set(ia.TRACKING_OPTIONS,t)};var $a={ADD:"add",REMOVE:"remove"};var Qa=function(t,i){ua.call(this);var s=i||{};this.unique_=!!s.unique;this.array_=t?t:[];if(this.unique_){for(var e=0,r=this.array_.length;e<r;++e){this.assertUnique_(this.array_[e],e)}}this.updateLength_()};ta.inherits(Qa,ua);Qa.prototype.clear=function(){while(this.getLength()>0){this.pop()}};Qa.prototype.extend=function(t){var i,s;for(i=0,s=t.length;i<s;++i){this.push(t[i])}return this};Qa.prototype.forEach=function(t,i){var s=i?t.bind(i):t;var e=this.array_;for(var r=0,n=e.length;r<n;++r){s(e[r],r,e)}};Qa.prototype.getArray=function(){return this.array_};Qa.prototype.item=function(t){return this.array_[t]};Qa.prototype.getLength=function(){return this.get(Qa.Property_.LENGTH)};Qa.prototype.insertAt=function(t,i){if(this.unique_){this.assertUnique_(i)}this.array_.splice(t,0,i);this.updateLength_();this.dispatchEvent(new Qa.Event($a.ADD,i))};Qa.prototype.pop=function(){return this.removeAt(this.getLength()-1)};Qa.prototype.push=function(t){if(this.unique_){this.assertUnique_(t)}var i=this.getLength();this.insertAt(i,t);return this.getLength()};Qa.prototype.remove=function(t){var i=this.array_;var s,e;for(s=0,e=i.length;s<e;++s){if(i[s]===t){return this.removeAt(s)}}return undefined};Qa.prototype.removeAt=function(t){var i=this.array_[t];this.array_.splice(t,1);this.updateLength_();this.dispatchEvent(new Qa.Event($a.REMOVE,i));return i};Qa.prototype.setAt=function(t,i){var s=this.getLength();if(t<s){if(this.unique_){this.assertUnique_(i,t)}var e=this.array_[t];this.array_[t]=i;this.dispatchEvent(new Qa.Event($a.REMOVE,e));this.dispatchEvent(new Qa.Event($a.ADD,i))}else{var r;for(r=s;r<t;++r){this.insertAt(r,undefined)}this.insertAt(t,i)}};Qa.prototype.updateLength_=function(){this.set(Qa.Property_.LENGTH,this.array_.length)};Qa.prototype.assertUnique_=function(t,i){for(var s=0,e=this.array_.length;s<e;++s){if(this.array_[s]===t&&s!==i){throw new la(58)}}};Qa.Property_={LENGTH:"length"};Qa.Event=function(t,i){ha.call(this,t);this.element=i};ta.inherits(Qa.Event,ha);var to=function(t,i,s){ha.call(this,t);this.map=i;this.frameState=s!==undefined?s:null};ta.inherits(to,ha);var io=function(t,i,s,e,r){to.call(this,t,i,r);this.originalEvent=s;this.pixel=i.getEventPixel(s);this.coordinate=i.getCoordinateFromPixel(this.pixel);this.dragging=e!==undefined?e:false};ta.inherits(io,to);io.prototype.preventDefault=function(){to.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};io.prototype.stopPropagation=function(){to.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var so={SINGLECLICK:"singleclick",CLICK:oa.CLICK,DBLCLICK:oa.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var eo=function(t,i,s,e,r){io.call(this,t,i,s.originalEvent,e,r);this.pointerEvent=s};ta.inherits(eo,io);var ro={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var no=function(t,i){this.dispatcher=t;this.mapping_=i};no.prototype.getEvents=function(){return Object.keys(this.mapping_)};no.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var ho=function(t){var i={mousedown:this.mousedown,mousemove:this.mousemove,mouseup:this.mouseup,mouseover:this.mouseover,mouseout:this.mouseout};no.call(this,t,i);this.pointerMap=t.pointerMap;this.lastTouches=[]};ta.inherits(ho,no);ho.POINTER_ID=1;ho.POINTER_TYPE="mouse";ho.DEDUP_DIST=25;ho.prototype.isEventSimulatedFromTouch_=function(t){var i=this.lastTouches;var s=t.clientX,e=t.clientY;for(var r=0,n=i.length,h;r<n&&(h=i[r]);r++){var a=Math.abs(s-h[0]),o=Math.abs(e-h[1]);if(a<=ho.DEDUP_DIST&&o<=ho.DEDUP_DIST){return true}}return false};ho.prepareEvent=function(t,i){var s=i.cloneEvent(t,t);var e=s.preventDefault;s.preventDefault=function(){t.preventDefault();e()};s.pointerId=ho.POINTER_ID;s.isPrimary=true;s.pointerType=ho.POINTER_TYPE;return s};ho.prototype.mousedown=function(t){if(!this.isEventSimulatedFromTouch_(t)){if(ho.POINTER_ID.toString()in this.pointerMap){this.cancel(t)}var i=ho.prepareEvent(t,this.dispatcher);this.pointerMap[ho.POINTER_ID.toString()]=t;this.dispatcher.down(i,t)}};ho.prototype.mousemove=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.move(i,t)}};ho.prototype.mouseup=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=this.pointerMap[ho.POINTER_ID.toString()];if(i&&i.button===t.button){var s=ho.prepareEvent(t,this.dispatcher);this.dispatcher.up(s,t);this.cleanupMouse()}}};ho.prototype.mouseover=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.enterOver(i,t)}};ho.prototype.mouseout=function(t){if(!this.isEventSimulatedFromTouch_(t)){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.leaveOut(i,t)}};ho.prototype.cancel=function(t){var i=ho.prepareEvent(t,this.dispatcher);this.dispatcher.cancel(i,t);this.cleanupMouse()};ho.prototype.cleanupMouse=function(){delete this.pointerMap[ho.POINTER_ID.toString()]};var ao=function(t){var i={MSPointerDown:this.msPointerDown,MSPointerMove:this.msPointerMove,MSPointerUp:this.msPointerUp,MSPointerOut:this.msPointerOut,MSPointerOver:this.msPointerOver,MSPointerCancel:this.msPointerCancel,MSGotPointerCapture:this.msGotPointerCapture,MSLostPointerCapture:this.msLostPointerCapture};no.call(this,t,i);this.pointerMap=t.pointerMap;this.POINTER_TYPES=["","unavailable","touch","pen","mouse"]};ta.inherits(ao,no);ao.prototype.prepareEvent_=function(t){var i=t;if(typeof t.pointerType==="number"){i=this.dispatcher.cloneEvent(t,t);i.pointerType=this.POINTER_TYPES[t.pointerType]}return i};ao.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]};ao.prototype.msPointerDown=function(t){this.pointerMap[t.pointerId.toString()]=t;var i=this.prepareEvent_(t);this.dispatcher.down(i,t)};ao.prototype.msPointerMove=function(t){var i=this.prepareEvent_(t);this.dispatcher.move(i,t)};ao.prototype.msPointerUp=function(t){var i=this.prepareEvent_(t);this.dispatcher.up(i,t);this.cleanup(t.pointerId)};ao.prototype.msPointerOut=function(t){var i=this.prepareEvent_(t);this.dispatcher.leaveOut(i,t)};ao.prototype.msPointerOver=function(t){var i=this.prepareEvent_(t);this.dispatcher.enterOver(i,t)};ao.prototype.msPointerCancel=function(t){var i=this.prepareEvent_(t);this.dispatcher.cancel(i,t);this.cleanup(t.pointerId)};ao.prototype.msLostPointerCapture=function(t){var i=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(i)};ao.prototype.msGotPointerCapture=function(t){var i=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(i)};var oo=function(t){var i={pointerdown:this.pointerDown,pointermove:this.pointerMove,pointerup:this.pointerUp,pointerout:this.pointerOut,pointerover:this.pointerOver,pointercancel:this.pointerCancel,gotpointercapture:this.gotPointerCapture,lostpointercapture:this.lostPointerCapture};no.call(this,t,i)};ta.inherits(oo,no);oo.prototype.pointerDown=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerMove=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerUp=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerOut=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerOver=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.pointerCancel=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.lostPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)};oo.prototype.gotPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)};var fo=function(t,i,s){ha.call(this,t);this.originalEvent=i;var e=s?s:{};this.buttons=this.getButtons_(e);this.pressure=this.getPressure_(e,this.buttons);this.bubbles="bubbles"in e?e["bubbles"]:false;this.cancelable="cancelable"in e?e["cancelable"]:false;this.view="view"in e?e["view"]:null;this.detail="detail"in e?e["detail"]:null;this.screenX="screenX"in e?e["screenX"]:0;this.screenY="screenY"in e?e["screenY"]:0;this.clientX="clientX"in e?e["clientX"]:0;this.clientY="clientY"in e?e["clientY"]:0;this.ctrlKey="ctrlKey"in e?e["ctrlKey"]:false;this.altKey="altKey"in e?e["altKey"]:false;this.shiftKey="shiftKey"in e?e["shiftKey"]:false;this.metaKey="metaKey"in e?e["metaKey"]:false;this.button="button"in e?e["button"]:0;this.relatedTarget="relatedTarget"in e?e["relatedTarget"]:null;this.pointerId="pointerId"in e?e["pointerId"]:0;this.width="width"in e?e["width"]:0;this.height="height"in e?e["height"]:0;this.tiltX="tiltX"in e?e["tiltX"]:0;this.tiltY="tiltY"in e?e["tiltY"]:0;this.pointerType="pointerType"in e?e["pointerType"]:"";this.hwTimestamp="hwTimestamp"in e?e["hwTimestamp"]:0;this.isPrimary="isPrimary"in e?e["isPrimary"]:false;if(i.preventDefault){this.preventDefault=function(){i.preventDefault()}}};ta.inherits(fo,ha);fo.prototype.getButtons_=function(t){var i;if(t.buttons||fo.HAS_BUTTONS){i=t.buttons}else{switch(t.which){case 1:i=1;break;case 2:i=4;break;case 3:i=2;break;default:i=0}}return i};fo.prototype.getPressure_=function(t,i){var s=0;if(t.pressure){s=t.pressure}else{s=i?.5:0}return s};fo.HAS_BUTTONS=false;(function(){try{var t=new MouseEvent("click",{buttons:1});fo.HAS_BUTTONS=t.buttons===1}catch(t){}})();var uo=function(t,i){var s={touchstart:this.touchstart,touchmove:this.touchmove,touchend:this.touchend,touchcancel:this.touchcancel};no.call(this,t,s);this.pointerMap=t.pointerMap;this.mouseSource=i;this.firstTouchId_=undefined;this.clickCount_=0;this.resetId_=undefined};ta.inherits(uo,no);uo.DEDUP_TIMEOUT=2500;uo.CLICK_COUNT_TIMEOUT=200;uo.POINTER_TYPE="touch";uo.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier};uo.prototype.setPrimaryTouch_=function(t){var i=Object.keys(this.pointerMap).length;if(i===0||i===1&&ho.POINTER_ID.toString()in this.pointerMap){this.firstTouchId_=t.identifier;this.cancelResetClickCount_()}};uo.prototype.removePrimaryPointer_=function(t){if(t.isPrimary){this.firstTouchId_=undefined;this.resetClickCount_()}};uo.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),uo.CLICK_COUNT_TIMEOUT)};uo.prototype.resetClickCountHandler_=function(){this.clickCount_=0;this.resetId_=undefined};uo.prototype.cancelResetClickCount_=function(){if(this.resetId_!==undefined){clearTimeout(this.resetId_)}};uo.prototype.touchToPointer_=function(t,i){var s=this.dispatcher.cloneEvent(t,i);s.pointerId=i.identifier+2;s.bubbles=true;s.cancelable=true;s.detail=this.clickCount_;s.button=0;s.buttons=1;s.width=i.webkitRadiusX||i.radiusX||0;s.height=i.webkitRadiusY||i.radiusY||0;s.pressure=i.webkitForce||i.force||.5;s.isPrimary=this.isPrimaryTouch_(i);s.pointerType=uo.POINTER_TYPE;s.clientX=i.clientX;s.clientY=i.clientY;s.screenX=i.screenX;s.screenY=i.screenY;return s};uo.prototype.processTouches_=function(t,i){var s=Array.prototype.slice.call(t.changedTouches);var e=s.length;function r(){t.preventDefault()}var n,h;for(n=0;n<e;++n){h=this.touchToPointer_(t,s[n]);h.preventDefault=r;i.call(this,t,h)}};uo.prototype.findTouch_=function(t,i){var s=t.length;var e;for(var r=0;r<s;r++){e=t[r];if(e.identifier===i){return true}}return false};uo.prototype.vacuumTouches_=function(t){var i=t.touches;var s=Object.keys(this.pointerMap);var e=s.length;if(e>=i.length){var r=[];var n,h,a;for(n=0;n<e;++n){h=s[n];a=this.pointerMap[h];if(h!=ho.POINTER_ID&&!this.findTouch_(i,h-2)){r.push(a.out)}}for(n=0;n<r.length;++n){this.cancelOut_(t,r[n])}}};uo.prototype.touchstart=function(t){this.vacuumTouches_(t);this.setPrimaryTouch_(t.changedTouches[0]);this.dedupSynthMouse_(t);this.clickCount_++;this.processTouches_(t,this.overDown_)};uo.prototype.overDown_=function(t,i){this.pointerMap[i.pointerId]={target:i.target,out:i,outTarget:i.target};this.dispatcher.over(i,t);this.dispatcher.enter(i,t);this.dispatcher.down(i,t)};uo.prototype.touchmove=function(t){t.preventDefault();this.processTouches_(t,this.moveOverOut_)};uo.prototype.moveOverOut_=function(t,i){var s=i;var e=this.pointerMap[s.pointerId];if(!e){return}var r=e.out;var n=e.outTarget;this.dispatcher.move(s,t);if(r&&n!==s.target){r.relatedTarget=s.target;s.relatedTarget=n;r.target=n;if(s.target){this.dispatcher.leaveOut(r,t);this.dispatcher.enterOver(s,t)}else{s.target=n;s.relatedTarget=null;this.cancelOut_(t,s)}}e.out=s;e.outTarget=s.target};uo.prototype.touchend=function(t){this.dedupSynthMouse_(t);this.processTouches_(t,this.upOut_)};uo.prototype.upOut_=function(t,i){this.dispatcher.up(i,t);this.dispatcher.out(i,t);this.dispatcher.leave(i,t);this.cleanUpPointer_(i)};uo.prototype.touchcancel=function(t){this.processTouches_(t,this.cancelOut_)};uo.prototype.cancelOut_=function(t,i){this.dispatcher.cancel(i,t);this.dispatcher.out(i,t);this.dispatcher.leave(i,t);this.cleanUpPointer_(i)};uo.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId];this.removePrimaryPointer_(t)};uo.prototype.dedupSynthMouse_=function(t){var i=this.mouseSource.lastTouches;var s=t.changedTouches[0];if(this.isPrimaryTouch_(s)){var e=[s.clientX,s.clientY];i.push(e);setTimeout((function(){pa.remove(i,e)}),uo.DEDUP_TIMEOUT)}};var lo=function(t){aa.call(this);this.element_=t;this.pointerMap={};this.eventMap_={};this.eventSourceList_=[];this.registerSources()};ta.inherits(lo,aa);lo.prototype.registerSources=function(){if(Ja.POINTER){this.registerSource("native",new oo(this))}else if(Ja.MSPOINTER){this.registerSource("ms",new ao(this))}else{var t=new ho(this);this.registerSource("mouse",t);if(Ja.TOUCH){this.registerSource("touch",new uo(this,t))}}this.register_()};lo.prototype.registerSource=function(t,i){var s=i;var e=s.getEvents();if(e){e.forEach((function(t){var i=s.getHandlerForEvent(t);if(i){this.eventMap_[t]=i.bind(s)}}),this);this.eventSourceList_.push(s)}};lo.prototype.register_=function(){var t=this.eventSourceList_.length;var i;for(var s=0;s<t;s++){i=this.eventSourceList_[s];this.addEvents_(i.getEvents())}};lo.prototype.unregister_=function(){var t=this.eventSourceList_.length;var i;for(var s=0;s<t;s++){i=this.eventSourceList_[s];this.removeEvents_(i.getEvents())}};lo.prototype.eventHandler_=function(t){var i=t.type;var s=this.eventMap_[i];if(s){s(t)}};lo.prototype.addEvents_=function(t){t.forEach((function(t){ra.listen(this.element_,t,this.eventHandler_,this)}),this)};lo.prototype.removeEvents_=function(t){t.forEach((function(t){ra.unlisten(this.element_,t,this.eventHandler_,this)}),this)};lo.prototype.cloneEvent=function(t,i){var s={},e;for(var r=0,n=lo.CLONE_PROPS.length;r<n;r++){e=lo.CLONE_PROPS[r][0];s[e]=t[e]||i[e]||lo.CLONE_PROPS[r][1]}return s};lo.prototype.down=function(t,i){this.fireEvent(ro.POINTERDOWN,t,i)};lo.prototype.move=function(t,i){this.fireEvent(ro.POINTERMOVE,t,i)};lo.prototype.up=function(t,i){this.fireEvent(ro.POINTERUP,t,i)};lo.prototype.enter=function(t,i){t.bubbles=false;this.fireEvent(ro.POINTERENTER,t,i)};lo.prototype.leave=function(t,i){t.bubbles=false;this.fireEvent(ro.POINTERLEAVE,t,i)};lo.prototype.over=function(t,i){t.bubbles=true;this.fireEvent(ro.POINTEROVER,t,i)};lo.prototype.out=function(t,i){t.bubbles=true;this.fireEvent(ro.POINTEROUT,t,i)};lo.prototype.cancel=function(t,i){this.fireEvent(ro.POINTERCANCEL,t,i)};lo.prototype.leaveOut=function(t,i){this.out(t,i);if(!this.contains_(t.target,t.relatedTarget)){this.leave(t,i)}};lo.prototype.enterOver=function(t,i){this.over(t,i);if(!this.contains_(t.target,t.relatedTarget)){this.enter(t,i)}};lo.prototype.contains_=function(t,i){if(!t||!i){return false}return t.contains(i)};lo.prototype.makeEvent=function(t,i,s){return new fo(t,s,i)};lo.prototype.fireEvent=function(t,i,s){var e=this.makeEvent(t,i,s);this.dispatchEvent(e)};lo.prototype.fireNativeEvent=function(t){var i=this.makeEvent(t.type,t,t);this.dispatchEvent(i)};lo.prototype.wrapMouseEvent=function(t,i){var s=this.makeEvent(t,ho.prepareEvent(i,this),i);return s};lo.prototype.disposeInternal=function(){this.unregister_();aa.prototype.disposeInternal.call(this)};lo.CLONE_PROPS=[["bubbles",false],["cancelable",false],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",false],["altKey",false],["shiftKey",false],["metaKey",false],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",false],["type",""],["target",null],["currentTarget",null],["which",0]];var vo=function(t,i){aa.call(this);this.map_=t;this.clickTimeoutId_=0;this.dragging_=false;this.dragListenerKeys_=[];this.moveTolerance_=i?i*Ja.DEVICE_PIXEL_RATIO:Ja.DEVICE_PIXEL_RATIO;this.down_=null;var s=this.map_.getViewport();this.activePointers_=0;this.trackedTouches_={};this.pointerEventHandler_=new lo(s);this.documentPointerEventHandler_=null;this.pointerdownListenerKey_=ra.listen(this.pointerEventHandler_,ro.POINTERDOWN,this.handlePointerDown_,this);this.relayedListenerKey_=ra.listen(this.pointerEventHandler_,ro.POINTERMOVE,this.relayEvent_,this)};ta.inherits(vo,aa);vo.prototype.emulateClick_=function(t){var i=new eo(so.CLICK,this.map_,t);this.dispatchEvent(i);if(this.clickTimeoutId_!==0){clearTimeout(this.clickTimeoutId_);this.clickTimeoutId_=0;i=new eo(so.DBLCLICK,this.map_,t);this.dispatchEvent(i)}else{this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=0;var i=new eo(so.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)}};vo.prototype.updateActivePointers_=function(t){var i=t;if(i.type==so.POINTERUP||i.type==so.POINTERCANCEL){delete this.trackedTouches_[i.pointerId]}else if(i.type==so.POINTERDOWN){this.trackedTouches_[i.pointerId]=true}this.activePointers_=Object.keys(this.trackedTouches_).length};vo.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var i=new eo(so.POINTERUP,this.map_,t);this.dispatchEvent(i);if(!i.propagationStopped&&!this.dragging_&&this.isMouseActionButton_(t)){this.emulateClick_(this.down_)}if(this.activePointers_===0){this.dragListenerKeys_.forEach(ra.unlistenByKey);this.dragListenerKeys_.length=0;this.dragging_=false;this.down_=null;this.documentPointerEventHandler_.dispose();this.documentPointerEventHandler_=null}};vo.prototype.isMouseActionButton_=function(t){return t.button===0};vo.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var i=new eo(so.POINTERDOWN,this.map_,t);this.dispatchEvent(i);this.down_=t;if(this.dragListenerKeys_.length===0){this.documentPointerEventHandler_=new lo(document);this.dragListenerKeys_.push(ra.listen(this.documentPointerEventHandler_,so.POINTERMOVE,this.handlePointerMove_,this),ra.listen(this.documentPointerEventHandler_,so.POINTERUP,this.handlePointerUp_,this),ra.listen(this.pointerEventHandler_,so.POINTERCANCEL,this.handlePointerUp_,this))}};vo.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=true;var i=new eo(so.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(i)}t.preventDefault()};vo.prototype.relayEvent_=function(t){var i=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new eo(t.type,this.map_,t,i))};vo.prototype.isMoving_=function(t){return Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_};vo.prototype.disposeInternal=function(){if(this.relayedListenerKey_){ra.unlistenByKey(this.relayedListenerKey_);this.relayedListenerKey_=null}if(this.pointerdownListenerKey_){ra.unlistenByKey(this.pointerdownListenerKey_);this.pointerdownListenerKey_=null}this.dragListenerKeys_.forEach(ra.unlistenByKey);this.dragListenerKeys_.length=0;if(this.documentPointerEventHandler_){this.documentPointerEventHandler_.dispose();this.documentPointerEventHandler_=null}if(this.pointerEventHandler_){this.pointerEventHandler_.dispose();this.pointerEventHandler_=null}aa.prototype.disposeInternal.call(this)};var co={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"};var mo={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var po={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5};var _o=function(t,i){this.priorityFunction_=t;this.keyFunction_=i;this.elements_=[];this.priorities_=[];this.queuedElements_={}};_o.DROP=Infinity;_o.prototype.clear=function(){this.elements_.length=0;this.priorities_.length=0;ea.clear(this.queuedElements_)};_o.prototype.dequeue=function(){var t=this.elements_;var i=this.priorities_;var s=t[0];if(t.length==1){t.length=0;i.length=0}else{t[0]=t.pop();i[0]=i.pop();this.siftUp_(0)}var e=this.keyFunction_(s);delete this.queuedElements_[e];return s};_o.prototype.enqueue=function(t){va.assert(!(this.keyFunction_(t)in this.queuedElements_),31);var i=this.priorityFunction_(t);if(i!=_o.DROP){this.elements_.push(t);this.priorities_.push(i);this.queuedElements_[this.keyFunction_(t)]=true;this.siftDown_(0,this.elements_.length-1);return true}return false};_o.prototype.getCount=function(){return this.elements_.length};_o.prototype.getLeftChildIndex_=function(t){return t*2+1};_o.prototype.getRightChildIndex_=function(t){return t*2+2};_o.prototype.getParentIndex_=function(t){return t-1>>1};_o.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--){this.siftUp_(t)}};_o.prototype.isEmpty=function(){return this.elements_.length===0};_o.prototype.isKeyQueued=function(t){return t in this.queuedElements_};_o.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))};_o.prototype.siftUp_=function(t){var i=this.elements_;var s=this.priorities_;var e=i.length;var r=i[t];var n=s[t];var h=t;while(t<e>>1){var a=this.getLeftChildIndex_(t);var o=this.getRightChildIndex_(t);var f=o<e&&s[o]<s[a]?o:a;i[t]=i[f];s[t]=s[f];t=f}i[t]=r;s[t]=n;this.siftDown_(h,t)};_o.prototype.siftDown_=function(t,i){var s=this.elements_;var e=this.priorities_;var r=s[i];var n=e[i];while(i>t){var h=this.getParentIndex_(i);if(e[h]>n){s[i]=s[h];e[i]=e[h];i=h}else{break}}s[i]=r;e[i]=n};_o.prototype.reprioritize=function(){var t=this.priorityFunction_;var i=this.elements_;var s=this.priorities_;var e=0;var r=i.length;var n,h,a;for(h=0;h<r;++h){n=i[h];a=t(n);if(a==_o.DROP){delete this.queuedElements_[this.keyFunction_(n)]}else{s[e]=a;i[e++]=n}}i.length=e;s.length=e;this.heapify_()};var go=function(t,i){_o.call(this,(function(i){return t.apply(null,i)}),(function(t){return t[0].getKey()}));this.tileChangeCallback_=i;this.tilesLoading_=0;this.tilesLoadingKeys_={}};ta.inherits(go,_o);go.prototype.enqueue=function(t){var i=_o.prototype.enqueue.call(this,t);if(i){var s=t[0];ra.listen(s,oa.CHANGE,this.handleTileChange,this)}return i};go.prototype.getTilesLoading=function(){return this.tilesLoading_};go.prototype.handleTileChange=function(t){var i=t.target;var s=i.getState();if(s===po.LOADED||s===po.ERROR||s===po.EMPTY||s===po.ABORT){ra.unlisten(i,oa.CHANGE,this.handleTileChange,this);var e=i.getKey();if(e in this.tilesLoadingKeys_){delete this.tilesLoadingKeys_[e];--this.tilesLoading_}this.tileChangeCallback_()}};go.prototype.loadMoreTiles=function(t,i){var s=0;var e=false;var r,n,h;while(this.tilesLoading_<t&&s<i&&this.getCount()>0){n=this.dequeue()[0];h=n.getKey();r=n.getState();if(r===po.ABORT){e=true}else if(r===po.IDLE&&!(h in this.tilesLoadingKeys_)){this.tilesLoadingKeys_[h]=true;++this.tilesLoading_;++s;n.load()}}if(s===0&&e){this.tileChangeCallback_()}};var Mo={};Mo.createExtent=function(t){return function(i){if(i){return[ca.clamp(i[0],t[0],t[2]),ca.clamp(i[1],t[1],t[3])]}else{return undefined}}};Mo.none=function(t){return t};var zo={};zo.createSnapToResolutions=function(t){return function(i,s,e){if(i!==undefined){var r=pa.linearFindNearest(t,i,e);r=ca.clamp(r+s,0,t.length-1);var n=Math.floor(r);if(r!=n&&n<t.length-1){var h=t[n]/t[n+1];return t[n]/Math.pow(h,r-n)}else{return t[n]}}else{return undefined}}};zo.createSnapToPower=function(t,i,s){return function(e,r,n){if(e!==undefined){var h=-n/2+.5;var a=Math.floor(Math.log(i/e)/Math.log(t)+h);var o=Math.max(a+r,0);if(s!==undefined){o=Math.min(o,s)}return i/Math.pow(t,o)}else{return undefined}}};var wo={};wo.disable=function(t,i){if(t!==undefined){return 0}else{return undefined}};wo.none=function(t,i){if(t!==undefined){return t+i}else{return undefined}};wo.createSnapToN=function(t){var i=2*Math.PI/t;return function(t,s){if(t!==undefined){t=Math.floor((t+s)/i+.5)*i;return t}else{return undefined}}};wo.createSnapToZero=function(t){var i=t||ca.toRadians(5);return function(t,s){if(t!==undefined){if(Math.abs(t+s)<=i){return 0}else{return t+s}}else{return undefined}}};var yo={ANIMATING:0,INTERACTING:1};var bo={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var xo={};xo.padNumber=function(t,i,s){var e=s!==undefined?t.toFixed(s):""+t;var r=e.indexOf(".");r=r===-1?e.length:r;return r>i?e:new Array(1+i-r).join("0")+e};xo.compareVersions=function(t,i){var s=(""+t).split(".");var e=(""+i).split(".");for(var r=0;r<Math.max(s.length,e.length);r++){var n=parseInt(s[r]||"0",10);var h=parseInt(e[r]||"0",10);if(n>h){return 1}if(h>n){return-1}}return 0};var Eo={};Eo.add=function(t,i){t[0]+=i[0];t[1]+=i[1];return t};Eo.closestOnCircle=function(t,i){var s=i.getRadius();var e=i.getCenter();var r=e[0];var n=e[1];var h=t[0];var a=t[1];var o=h-r;var f=a-n;if(o===0&&f===0){o=1}var u=Math.sqrt(o*o+f*f);var l,v;l=r+s*o/u;v=n+s*f/u;return[l,v]};Eo.closestOnSegment=function(t,i){var s=t[0];var e=t[1];var r=i[0];var n=i[1];var h=r[0];var a=r[1];var o=n[0];var f=n[1];var u=o-h;var l=f-a;var v=u===0&&l===0?0:(u*(s-h)+l*(e-a))/(u*u+l*l||0);var c,d;if(v<=0){c=h;d=a}else if(v>=1){c=o;d=f}else{c=h+v*u;d=a+v*l}return[c,d]};Eo.createStringXY=function(t){return function(i){return Eo.toStringXY(i,t)}};Eo.degreesToStringHDMS=function(t,i,s){var e=ca.modulo(i+180,360)-180;var r=Math.abs(3600*e);var n=s||0;var h=Math.pow(10,n);var a=Math.floor(r/3600);var o=Math.floor((r-a*3600)/60);var f=r-a*3600-o*60;f=Math.ceil(f*h)/h;if(f>=60){f=0;o+=1}if(o>=60){o=0;a+=1}return a+"° "+xo.padNumber(o,2)+"′ "+xo.padNumber(f,2,n)+"″"+(e==0?"":" "+t.charAt(e<0?1:0))};Eo.format=function(t,i,s){if(t){return i.replace("{x}",t[0].toFixed(s)).replace("{y}",t[1].toFixed(s))}else{return""}};Eo.equals=function(t,i){var s=true;for(var e=t.length-1;e>=0;--e){if(t[e]!=i[e]){s=false;break}}return s};Eo.rotate=function(t,i){var s=Math.cos(i);var e=Math.sin(i);var r=t[0]*s-t[1]*e;var n=t[1]*s+t[0]*e;t[0]=r;t[1]=n;return t};Eo.scale=function(t,i){t[0]*=i;t[1]*=i;return t};Eo.sub=function(t,i){t[0]-=i[0];t[1]-=i[1];return t};Eo.squaredDistance=function(t,i){var s=t[0]-i[0];var e=t[1]-i[1];return s*s+e*e};Eo.distance=function(t,i){return Math.sqrt(Eo.squaredDistance(t,i))};Eo.squaredDistanceToSegment=function(t,i){return Eo.squaredDistance(t,Eo.closestOnSegment(t,i))};Eo.toStringHDMS=function(t,i){if(t){return Eo.degreesToStringHDMS("NS",t[1],i)+" "+Eo.degreesToStringHDMS("EW",t[0],i)}else{return""}};Eo.toStringXY=function(t,i){return Eo.format(t,"{x}, {y}",i)};var So={};So.easeIn=function(t){return Math.pow(t,3)};So.easeOut=function(t){return 1-So.easeIn(1-t)};So.inAndOut=function(t){return 3*t*t-2*t*t*t};So.linear=function(t){return t};So.upAndDown=function(t){if(t<.5){return So.inAndOut(2*t)}else{return 1-So.inAndOut(2*(t-.5))}};var Go=function(t){ua.call(this);var i=ea.assign({},t);this.hints_=[0,0];this.animations_=[];this.updateAnimations_=this.updateAnimations_.bind(this);this.projection_=Na.createProjection(i.projection,"EPSG:3857");this.applyOptions_(i)};ta.inherits(Go,ua);Go.prototype.applyOptions_=function(t){var i={};i[bo.CENTER]=t.center!==undefined?t.center:null;var s=Go.createResolutionConstraint_(t);this.maxResolution_=s.maxResolution;this.minResolution_=s.minResolution;this.zoomFactor_=s.zoomFactor;this.resolutions_=t.resolutions;this.minZoom_=s.minZoom;var e=Go.createCenterConstraint_(t);var r=s.constraint;var n=Go.createRotationConstraint_(t);this.constraints_={center:e,resolution:r,rotation:n};if(t.resolution!==undefined){i[bo.RESOLUTION]=t.resolution}else if(t.zoom!==undefined){i[bo.RESOLUTION]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_);if(this.resolutions_){i[bo.RESOLUTION]=ca.clamp(Number(this.getResolution()||i[bo.RESOLUTION]),this.minResolution_,this.maxResolution_)}}i[bo.ROTATION]=t.rotation!==undefined?t.rotation:0;this.setProperties(i);this.options_=t};Go.prototype.getUpdatedOptions_=function(t){var i=ea.assign({},this.options_);if(i.resolution!==undefined){i.resolution=this.getResolution()}else{i.zoom=this.getZoom()}i.center=this.getCenter();i.rotation=this.getRotation();return ea.assign({},i,t)};Go.prototype.animate=function(t){var i=arguments.length;var s;if(i>1&&typeof arguments[i-1]==="function"){s=arguments[i-1];--i}if(!this.isDef()){var e=arguments[i-1];if(e.center){this.setCenter(e.center)}if(e.zoom!==undefined){this.setZoom(e.zoom)}if(e.rotation!==undefined){this.setRotation(e.rotation)}if(s){s(true)}return}var r=Date.now();var n=this.getCenter().slice();var h=this.getResolution();var a=this.getRotation();var o=[];for(var f=0;f<i;++f){var u=arguments[f];var l={start:r,complete:false,anchor:u.anchor,duration:u.duration!==undefined?u.duration:1e3,easing:u.easing||So.inAndOut};if(u.center){l.sourceCenter=n;l.targetCenter=u.center;n=l.targetCenter}if(u.zoom!==undefined){l.sourceResolution=h;l.targetResolution=this.constrainResolution(this.maxResolution_,u.zoom-this.minZoom_,0);h=l.targetResolution}else if(u.resolution){l.sourceResolution=h;l.targetResolution=u.resolution;h=l.targetResolution}if(u.rotation!==undefined){l.sourceRotation=a;var v=ca.modulo(u.rotation-a+Math.PI,2*Math.PI)-Math.PI;l.targetRotation=a+v;a=l.targetRotation}l.callback=s;if(Go.isNoopAnimation(l)){l.complete=true}else{r+=l.duration}o.push(l)}this.animations_.push(o);this.setHint(yo.ANIMATING,1);this.updateAnimations_()};Go.prototype.getAnimating=function(){return this.hints_[yo.ANIMATING]>0};Go.prototype.getInteracting=function(){return this.hints_[yo.INTERACTING]>0};Go.prototype.cancelAnimations=function(){this.setHint(yo.ANIMATING,-this.hints_[yo.ANIMATING]);for(var t=0,i=this.animations_.length;t<i;++t){var s=this.animations_[t];if(s[0].callback){s[0].callback(false)}}this.animations_.length=0};Go.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==undefined){cancelAnimationFrame(this.updateAnimationKey_);this.updateAnimationKey_=undefined}if(!this.getAnimating()){return}var t=Date.now();var i=false;for(var s=this.animations_.length-1;s>=0;--s){var e=this.animations_[s];var r=true;for(var n=0,h=e.length;n<h;++n){var a=e[n];if(a.complete){continue}var o=t-a.start;var f=a.duration>0?o/a.duration:1;if(f>=1){a.complete=true;f=1}else{r=false}var u=a.easing(f);if(a.sourceCenter){var l=a.sourceCenter[0];var v=a.sourceCenter[1];var c=a.targetCenter[0];var d=a.targetCenter[1];var m=l+u*(c-l);var p=v+u*(d-v);this.set(bo.CENTER,[m,p])}if(a.sourceResolution&&a.targetResolution){var _=u===1?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){this.set(bo.CENTER,this.calculateCenterZoom(_,a.anchor))}this.set(bo.RESOLUTION,_)}if(a.sourceRotation!==undefined&&a.targetRotation!==undefined){var g=u===1?ca.modulo(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){this.set(bo.CENTER,this.calculateCenterRotate(g,a.anchor))}this.set(bo.ROTATION,g)}i=true;if(!a.complete){break}}if(r){this.animations_[s]=null;this.setHint(yo.ANIMATING,-1);var M=e[0].callback;if(M){M(true)}}}this.animations_=this.animations_.filter(Boolean);if(i&&this.updateAnimationKey_===undefined){this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_)}};Go.prototype.calculateCenterRotate=function(t,i){var s;var e=this.getCenter();if(e!==undefined){s=[e[0]-i[0],e[1]-i[1]];Eo.rotate(s,t-this.getRotation());Eo.add(s,i)}return s};Go.prototype.calculateCenterZoom=function(t,i){var s;var e=this.getCenter();var r=this.getResolution();if(e!==undefined&&r!==undefined){var n=i[0]-t*(i[0]-e[0])/r;var h=i[1]-t*(i[1]-e[1])/r;s=[n,h]}return s};Go.prototype.getSizeFromViewport_=function(){var t=[100,100];var i='.ol-viewport[data-view="'+ta.getUid(this)+'"]';var s=document.querySelector(i);if(s){var e=getComputedStyle(s);t[0]=parseInt(e.width,10);t[1]=parseInt(e.height,10)}return t};Go.prototype.constrainCenter=function(t){return this.constraints_.center(t)};Go.prototype.constrainResolution=function(t,i,s){var e=i||0;var r=s||0;return this.constraints_.resolution(t,e,r)};Go.prototype.constrainRotation=function(t,i){var s=i||0;return this.constraints_.rotation(t,s)};Go.prototype.getCenter=function(){return this.get(bo.CENTER)};Go.prototype.getConstraints=function(){return this.constraints_};Go.prototype.getHints=function(t){if(t!==undefined){t[0]=this.hints_[0];t[1]=this.hints_[1];return t}else{return this.hints_.slice()}};Go.prototype.calculateExtent=function(t){var i=t||this.getSizeFromViewport_();var s=this.getCenter();va.assert(s,1);var e=this.getResolution();va.assert(e!==undefined,2);var r=this.getRotation();va.assert(r!==undefined,3);return Ma.getForViewAndSize(s,e,r,i)};Go.prototype.getMaxResolution=function(){return this.maxResolution_};Go.prototype.getMinResolution=function(){return this.minResolution_};Go.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)};Go.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))};Go.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)};Go.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))};Go.prototype.getProjection=function(){return this.projection_};Go.prototype.getResolution=function(){return this.get(bo.RESOLUTION)};Go.prototype.getResolutions=function(){return this.resolutions_};Go.prototype.getResolutionForExtent=function(t,i){var s=i||this.getSizeFromViewport_();var e=Ma.getWidth(t)/s[0];var r=Ma.getHeight(t)/s[1];return Math.max(e,r)};Go.prototype.getResolutionForValueFunction=function(t){var i=t||2;var s=this.maxResolution_;var e=this.minResolution_;var r=Math.log(s/e)/Math.log(i);return function(t){var e=s/Math.pow(i,t*r);return e}};Go.prototype.getRotation=function(){return this.get(bo.ROTATION)};Go.prototype.getValueForResolutionFunction=function(t){var i=t||2;var s=this.maxResolution_;var e=this.minResolution_;var r=Math.log(s/e)/Math.log(i);return function(t){var e=Math.log(s/t)/Math.log(i)/r;return e}};Go.prototype.getState=function(){var t=this.getCenter();var i=this.getProjection();var s=this.getResolution();var e=this.getRotation();return{center:t.slice(),projection:i!==undefined?i:null,resolution:s,rotation:e,zoom:this.getZoom()}};Go.prototype.getZoom=function(){var t;var i=this.getResolution();if(i!==undefined){t=this.getZoomForResolution(i)}return t};Go.prototype.getZoomForResolution=function(t){var i=this.minZoom_||0;var s,e;if(this.resolutions_){var r=pa.linearFindNearest(this.resolutions_,t,1);i=r;s=this.resolutions_[r];if(r==this.resolutions_.length-1){e=2}else{e=s/this.resolutions_[r+1]}}else{s=this.maxResolution_;e=this.zoomFactor_}return i+Math.log(s/t)/Math.log(e)};Go.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)};Go.prototype.fit=function(t,i){var s=i||{};var e=s.size;if(!e){e=this.getSizeFromViewport_()}var r;if(!(t instanceof Aa)){va.assert(Array.isArray(t),24);va.assert(!Ma.isEmpty(t),25);r=Xa.fromExtent(t)}else if(t.getType()===da.CIRCLE){t=t.getExtent();r=Xa.fromExtent(t);r.rotate(this.getRotation(),Ma.getCenter(t))}else{r=t}var n=s.padding!==undefined?s.padding:[0,0,0,0];var h=s.constrainResolution!==undefined?s.constrainResolution:true;var a=s.nearest!==undefined?s.nearest:false;var o;if(s.minResolution!==undefined){o=s.minResolution}else if(s.maxZoom!==undefined){o=this.constrainResolution(this.maxResolution_,s.maxZoom-this.minZoom_,0)}else{o=0}var f=r.getFlatCoordinates();var u=this.getRotation();var l=Math.cos(-u);var v=Math.sin(-u);var c=+Infinity;var d=+Infinity;var m=-Infinity;var p=-Infinity;var _=r.getStride();for(var g=0,M=f.length;g<M;g+=_){var z=f[g]*l-f[g+1]*v;var w=f[g]*v+f[g+1]*l;c=Math.min(c,z);d=Math.min(d,w);m=Math.max(m,z);p=Math.max(p,w)}var y=this.getResolutionForExtent([c,d,m,p],[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]);y=isNaN(y)?o:Math.max(y,o);if(h){var b=this.constrainResolution(y,0,0);if(!a&&b<y){b=this.constrainResolution(b,-1,0)}y=b}v=-v;var x=(c+m)/2;var E=(d+p)/2;x+=(n[1]-n[3])/2*y;E+=(n[0]-n[2])/2*y;var S=x*l-E*v;var G=E*l+x*v;var P=[S,G];var k=s.callback?s.callback:ta.nullFunction;if(s.duration!==undefined){this.animate({resolution:y,center:P,duration:s.duration,easing:s.easing},k)}else{this.setResolution(y);this.setCenter(P);setTimeout(k.bind(undefined,true),0)}};Go.prototype.centerOn=function(t,i,s){var e=this.getRotation();var r=Math.cos(-e);var n=Math.sin(-e);var h=t[0]*r-t[1]*n;var a=t[1]*r+t[0]*n;var o=this.getResolution();h+=(i[0]/2-s[0])*o;a+=(s[1]-i[1]/2)*o;n=-n;var f=h*r-a*n;var u=a*r+h*n;this.setCenter([f,u])};Go.prototype.isDef=function(){return!!this.getCenter()&&this.getResolution()!==undefined};Go.prototype.rotate=function(t,i){if(i!==undefined){var s=this.calculateCenterRotate(t,i);this.setCenter(s)}this.setRotation(t)};Go.prototype.setCenter=function(t){this.set(bo.CENTER,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setHint=function(t,i){this.hints_[t]+=i;this.changed();return this.hints_[t]};Go.prototype.setResolution=function(t){this.set(bo.RESOLUTION,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setRotation=function(t){this.set(bo.ROTATION,t);if(this.getAnimating()){this.cancelAnimations()}};Go.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))};Go.createCenterConstraint_=function(t){if(t.extent!==undefined){return Mo.createExtent(t.extent)}else{return Mo.none}};Go.createResolutionConstraint_=function(t){var i;var s;var e;var r=28;var n=2;var h=t.minZoom!==undefined?t.minZoom:ta.DEFAULT_MIN_ZOOM;var a=t.maxZoom!==undefined?t.maxZoom:r;var o=t.zoomFactor!==undefined?t.zoomFactor:n;if(t.resolutions!==undefined){var f=t.resolutions;s=f[h];e=f[a]!==undefined?f[a]:f[f.length-1];i=zo.createSnapToResolutions(f)}else{var u=Na.createProjection(t.projection,"EPSG:3857");var l=u.getExtent();var v=!l?360*Na.METERS_PER_UNIT[ba.DEGREES]/u.getMetersPerUnit():Math.max(Ma.getWidth(l),Ma.getHeight(l));var c=v/ta.DEFAULT_TILE_SIZE/Math.pow(n,ta.DEFAULT_MIN_ZOOM);var d=c/Math.pow(n,r-ta.DEFAULT_MIN_ZOOM);s=t.maxResolution;if(s!==undefined){h=0}else{s=c/Math.pow(o,h)}e=t.minResolution;if(e===undefined){if(t.maxZoom!==undefined){if(t.maxResolution!==undefined){e=s/Math.pow(o,a)}else{e=c/Math.pow(o,a)}}else{e=d}}a=h+Math.floor(Math.log(s/e)/Math.log(o));e=s/Math.pow(o,a-h);i=zo.createSnapToPower(o,s,a-h)}return{constraint:i,maxResolution:s,minResolution:e,minZoom:h,zoomFactor:o}};Go.createRotationConstraint_=function(t){var i=t.enableRotation!==undefined?t.enableRotation:true;if(i){var s=t.constrainRotation;if(s===undefined||s===true){return wo.createSnapToZero()}else if(s===false){return wo.none}else if(typeof s==="number"){return wo.createSnapToN(s)}else{return wo.none}}else{return wo.disable}};Go.isNoopAnimation=function(t){if(t.sourceCenter&&t.targetCenter){if(!Eo.equals(t.sourceCenter,t.targetCenter)){return false}}if(t.sourceResolution!==t.targetResolution){return false}if(t.sourceRotation!==t.targetRotation){return false}return true};var Po={};Po.createCanvasContext2D=function(t,i){var s=document.createElement("CANVAS");if(t){s.width=t}if(i){s.height=i}return s.getContext("2d")};Po.outerWidth=function(t){var i=t.offsetWidth;var s=getComputedStyle(t);i+=parseInt(s.marginLeft,10)+parseInt(s.marginRight,10);return i};Po.outerHeight=function(t){var i=t.offsetHeight;var s=getComputedStyle(t);i+=parseInt(s.marginTop,10)+parseInt(s.marginBottom,10);return i};Po.replaceNode=function(t,i){var s=i.parentNode;if(s){s.replaceChild(t,i)}};Po.removeNode=function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null};Po.removeChildren=function(t){while(t.lastChild){t.removeChild(t.lastChild)}};var ko={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"};var No=function(t){ua.call(this);var i=ea.assign({},t);i[ko.OPACITY]=t.opacity!==undefined?t.opacity:1;i[ko.VISIBLE]=t.visible!==undefined?t.visible:true;i[ko.Z_INDEX]=t.zIndex!==undefined?t.zIndex:0;i[ko.MAX_RESOLUTION]=t.maxResolution!==undefined?t.maxResolution:Infinity;i[ko.MIN_RESOLUTION]=t.minResolution!==undefined?t.minResolution:0;this.setProperties(i);this.state_={layer:this,managed:true}};ta.inherits(No,ua);No.prototype.getType=function(){return this.type};No.prototype.getLayerState=function(){this.state_.opacity=ca.clamp(this.getOpacity(),0,1);this.state_.sourceState=this.getSourceState();this.state_.visible=this.getVisible();this.state_.extent=this.getExtent();this.state_.zIndex=this.getZIndex();this.state_.maxResolution=this.getMaxResolution();this.state_.minResolution=Math.max(this.getMinResolution(),0);return this.state_};No.prototype.getLayersArray=function(t){};No.prototype.getLayerStatesArray=function(t){};No.prototype.getExtent=function(){return this.get(ko.EXTENT)};No.prototype.getMaxResolution=function(){return this.get(ko.MAX_RESOLUTION)};No.prototype.getMinResolution=function(){return this.get(ko.MIN_RESOLUTION)};No.prototype.getOpacity=function(){return this.get(ko.OPACITY)};No.prototype.getSourceState=function(){};No.prototype.getVisible=function(){return this.get(ko.VISIBLE)};No.prototype.getZIndex=function(){return this.get(ko.Z_INDEX)};No.prototype.setExtent=function(t){this.set(ko.EXTENT,t)};No.prototype.setMaxResolution=function(t){this.set(ko.MAX_RESOLUTION,t)};No.prototype.setMinResolution=function(t){this.set(ko.MIN_RESOLUTION,t)};No.prototype.setOpacity=function(t){this.set(ko.OPACITY,t)};No.prototype.setVisible=function(t){this.set(ko.VISIBLE,t)};No.prototype.setZIndex=function(t){this.set(ko.Z_INDEX,t)};var Io={UNDEFINED:"undefined",READY:"ready"};var Co=function(t){var i=t||{};var s=ea.assign({},i);delete s.layers;var e=i.layers;No.call(this,s);this.layersListenerKeys_=[];this.listenerKeys_={};ra.listen(this,ua.getChangeEventType(Co.Property_.LAYERS),this.handleLayersChanged_,this);if(e){if(Array.isArray(e)){e=new Qa(e.slice(),{unique:true})}else{va.assert(e instanceof Qa,43);e=e}}else{e=new Qa(undefined,{unique:true})}this.setLayers(e)};ta.inherits(Co,No);Co.prototype.handleLayerChange_=function(){this.changed()};Co.prototype.handleLayersChanged_=function(t){this.layersListenerKeys_.forEach(ra.unlistenByKey);this.layersListenerKeys_.length=0;var i=this.getLayers();this.layersListenerKeys_.push(ra.listen(i,$a.ADD,this.handleLayersAdd_,this),ra.listen(i,$a.REMOVE,this.handleLayersRemove_,this));for(var s in this.listenerKeys_){this.listenerKeys_[s].forEach(ra.unlistenByKey)}ea.clear(this.listenerKeys_);var e=i.getArray();var r,n,h;for(r=0,n=e.length;r<n;r++){h=e[r];this.listenerKeys_[ta.getUid(h).toString()]=[ra.listen(h,sa.PROPERTYCHANGE,this.handleLayerChange_,this),ra.listen(h,oa.CHANGE,this.handleLayerChange_,this)]}this.changed()};Co.prototype.handleLayersAdd_=function(t){var i=t.element;var s=ta.getUid(i).toString();this.listenerKeys_[s]=[ra.listen(i,sa.PROPERTYCHANGE,this.handleLayerChange_,this),ra.listen(i,oa.CHANGE,this.handleLayerChange_,this)];this.changed()};Co.prototype.handleLayersRemove_=function(t){var i=t.element;var s=ta.getUid(i).toString();this.listenerKeys_[s].forEach(ra.unlistenByKey);delete this.listenerKeys_[s];this.changed()};Co.prototype.getLayers=function(){return this.get(Co.Property_.LAYERS)};Co.prototype.setLayers=function(t){this.set(Co.Property_.LAYERS,t)};Co.prototype.getLayersArray=function(t){var i=t!==undefined?t:[];this.getLayers().forEach((function(t){t.getLayersArray(i)}));return i};Co.prototype.getLayerStatesArray=function(t){var i=t!==undefined?t:[];var s=i.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(i)}));var e=this.getLayerState();var r,n,h;for(r=s,n=i.length;r<n;r++){h=i[r];h.opacity*=e.opacity;h.visible=h.visible&&e.visible;h.maxResolution=Math.min(h.maxResolution,e.maxResolution);h.minResolution=Math.max(h.minResolution,e.minResolution);if(e.extent!==undefined){if(h.extent!==undefined){h.extent=Ma.getIntersection(h.extent,e.extent)}else{h.extent=e.extent}}}return i};Co.prototype.getSourceState=function(){return Io.READY};Co.Property_={LAYERS:"layers"};var Ao={MAP_RENDERER:"MAP_RENDERER",LAYER_RENDERER:"LAYER_RENDERER"};var Ro={};Ro.mapRendererPlugins_=[];Ro.getMapRendererPlugins=function(){return Ro.mapRendererPlugins_};Ro.layerRendererPlugins_=[];Ro.getLayerRendererPlugins=function(){return Ro.layerRendererPlugins_};Ro.register=function(t,i){var s;switch(t){case Ao.MAP_RENDERER:{s=Ro.mapRendererPlugins_;s.push(i);break}case Ao.LAYER_RENDERER:{s=Ro.layerRendererPlugins_;s.push(i);break}default:{throw new Error("Unsupported plugin type: "+t)}}};Ro.registerMultiple=function(t,i){for(var s=0,e=i.length;s<e;++s){Ro.register(t,i[s])}};var To={CANVAS:"canvas",WEBGL:"webgl"};var Oo={};Oo.buffer=function(t,i,s){if(s===undefined){s=[0,0]}s[0]=t[0]+2*i;s[1]=t[1]+2*i;return s};Oo.hasArea=function(t){return t[0]>0&&t[1]>0};Oo.scale=function(t,i,s){if(s===undefined){s=[0,0]}s[0]=t[0]*i+.5|0;s[1]=t[1]*i+.5|0;return s};Oo.toSize=function(t,i){if(Array.isArray(t)){return t}else{if(i===undefined){i=[t,t]}else{i[0]=i[1]=t}return i}};var Lo=function(t){ua.call(this);var i=Lo.createOptionsInternal(t);this.loadTilesWhileAnimating_=t.loadTilesWhileAnimating!==undefined?t.loadTilesWhileAnimating:false;this.loadTilesWhileInteracting_=t.loadTilesWhileInteracting!==undefined?t.loadTilesWhileInteracting:false;this.pixelRatio_=t.pixelRatio!==undefined?t.pixelRatio:Ja.DEVICE_PIXEL_RATIO;this.logos_=i.logos;this.animationDelay_=function(){this.animationDelayKey_=undefined;this.renderFrame_.call(this,Date.now())}.bind(this);this.coordinateToPixelTransform_=Ia.create();this.pixelToCoordinateTransform_=Ia.create();this.frameIndex_=0;this.frameState_=null;this.previousExtent_=null;this.viewPropertyListenerKey_=null;this.viewChangeListenerKey_=null;this.layerGroupPropertyListenerKeys_=null;this.viewport_=document.createElement("DIV");this.viewport_.className="ol-viewport"+(Ja.TOUCH?" ol-touch":"");this.viewport_.style.position="relative";this.viewport_.style.overflow="hidden";this.viewport_.style.width="100%";this.viewport_.style.height="100%";this.viewport_.style.msTouchAction="none";this.viewport_.style.touchAction="none";this.overlayContainer_=document.createElement("DIV");this.overlayContainer_.className="ol-overlaycontainer";this.viewport_.appendChild(this.overlayContainer_);this.overlayContainerStopEvent_=document.createElement("DIV");this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";var s=[oa.CLICK,oa.DBLCLICK,oa.MOUSEDOWN,oa.TOUCHSTART,oa.MSPOINTERDOWN,so.POINTERDOWN,oa.MOUSEWHEEL,oa.WHEEL];for(var e=0,r=s.length;e<r;++e){ra.listen(this.overlayContainerStopEvent_,s[e],ha.stopPropagation)}this.viewport_.appendChild(this.overlayContainerStopEvent_);this.mapBrowserEventHandler_=new vo(this,t.moveTolerance);for(var n in so){ra.listen(this.mapBrowserEventHandler_,so[n],this.handleMapBrowserEvent,this)}this.keyboardEventTarget_=i.keyboardEventTarget;this.keyHandlerKeys_=null;ra.listen(this.viewport_,oa.WHEEL,this.handleBrowserEvent,this);ra.listen(this.viewport_,oa.MOUSEWHEEL,this.handleBrowserEvent,this);this.controls=i.controls||new Qa;this.interactions=i.interactions||new Qa;this.overlays_=i.overlays;this.overlayIdIndex_={};this.renderer_=i.mapRendererPlugin["create"](this.viewport_,this);this.focus_=null;this.postRenderFunctions_=[];this.tileQueue_=new go(this.getTilePriority.bind(this),this.handleTileChange_.bind(this));this.skippedFeatureUids_={};ra.listen(this,ua.getChangeEventType(mo.LAYERGROUP),this.handleLayerGroupChanged_,this);ra.listen(this,ua.getChangeEventType(mo.VIEW),this.handleViewChanged_,this);ra.listen(this,ua.getChangeEventType(mo.SIZE),this.handleSizeChanged_,this);ra.listen(this,ua.getChangeEventType(mo.TARGET),this.handleTargetChanged_,this);this.setProperties(i.values);this.controls.forEach((function(t){t.setMap(this)}),this);ra.listen(this.controls,$a.ADD,(function(t){t.element.setMap(this)}),this);ra.listen(this.controls,$a.REMOVE,(function(t){t.element.setMap(null)}),this);this.interactions.forEach((function(t){t.setMap(this)}),this);ra.listen(this.interactions,$a.ADD,(function(t){t.element.setMap(this)}),this);ra.listen(this.interactions,$a.REMOVE,(function(t){t.element.setMap(null)}),this);this.overlays_.forEach(this.addOverlayInternal_,this);ra.listen(this.overlays_,$a.ADD,(function(t){this.addOverlayInternal_(t.element)}),this);ra.listen(this.overlays_,$a.REMOVE,(function(t){var i=t.element;var s=i.getId();if(s!==undefined){delete this.overlayIdIndex_[s.toString()]}t.element.setMap(null)}),this)};ta.inherits(Lo,ua);Lo.prototype.addControl=function(t){this.getControls().push(t)};Lo.prototype.addInteraction=function(t){this.getInteractions().push(t)};Lo.prototype.addLayer=function(t){var i=this.getLayerGroup().getLayers();i.push(t)};Lo.prototype.addOverlay=function(t){this.getOverlays().push(t)};Lo.prototype.addOverlayInternal_=function(t){var i=t.getId();if(i!==undefined){this.overlayIdIndex_[i.toString()]=t}t.setMap(this)};Lo.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose();ra.unlisten(this.viewport_,oa.WHEEL,this.handleBrowserEvent,this);ra.unlisten(this.viewport_,oa.MOUSEWHEEL,this.handleBrowserEvent,this);if(this.handleResize_!==undefined){window.removeEventListener(oa.RESIZE,this.handleResize_,false);this.handleResize_=undefined}if(this.animationDelayKey_){cancelAnimationFrame(this.animationDelayKey_);this.animationDelayKey_=undefined}this.setTarget(null);ua.prototype.disposeInternal.call(this)};Lo.prototype.forEachFeatureAtPixel=function(t,i,s){if(!this.frameState_){return}var e=this.getCoordinateFromPixel(t);s=s!==undefined?s:{};var r=s.hitTolerance!==undefined?s.hitTolerance*this.frameState_.pixelRatio:0;var n=s.layerFilter!==undefined?s.layerFilter:wa.TRUE;return this.renderer_.forEachFeatureAtCoordinate(e,this.frameState_,r,i,null,n,null)};Lo.prototype.getFeaturesAtPixel=function(t,i){var s=null;this.forEachFeatureAtPixel(t,(function(t){if(!s){s=[]}s.push(t)}),i);return s};Lo.prototype.forEachLayerAtPixel=function(t,i,s,e,r){if(!this.frameState_){return}var n=s!==undefined?s:null;var h=e!==undefined?e:wa.TRUE;var a=r!==undefined?r:null;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,i,n,h,a)};Lo.prototype.hasFeatureAtPixel=function(t,i){if(!this.frameState_){return false}var s=this.getCoordinateFromPixel(t);i=i!==undefined?i:{};var e=i.layerFilter!==undefined?i.layerFilter:wa.TRUE;var r=i.hitTolerance!==undefined?i.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(s,this.frameState_,r,e,null)};Lo.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))};Lo.prototype.getEventPixel=function(t){var i=this.viewport_.getBoundingClientRect();var s=t.changedTouches?t.changedTouches[0]:t;return[s.clientX-i.left,s.clientY-i.top]};Lo.prototype.getTarget=function(){return this.get(mo.TARGET)};Lo.prototype.getTargetElement=function(){var t=this.getTarget();if(t!==undefined){return typeof t==="string"?document.getElementById(t):t}else{return null}};Lo.prototype.getCoordinateFromPixel=function(t){var i=this.frameState_;if(!i){return null}else{return Ia.apply(i.pixelToCoordinateTransform,t.slice())}};Lo.prototype.getControls=function(){return this.controls};Lo.prototype.getOverlays=function(){return this.overlays_};Lo.prototype.getOverlayById=function(t){var i=this.overlayIdIndex_[t.toString()];return i!==undefined?i:null};Lo.prototype.getInteractions=function(){return this.interactions};Lo.prototype.getLayerGroup=function(){return this.get(mo.LAYERGROUP)};Lo.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t};Lo.prototype.getPixelFromCoordinate=function(t){var i=this.frameState_;if(!i){return null}else{return Ia.apply(i.coordinateToPixelTransform,t.slice(0,2))}};Lo.prototype.getRenderer=function(){return this.renderer_};Lo.prototype.getSize=function(){return this.get(mo.SIZE)};Lo.prototype.getView=function(){return this.get(mo.VIEW)};Lo.prototype.getViewport=function(){return this.viewport_};Lo.prototype.getOverlayContainer=function(){return this.overlayContainer_};Lo.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_};Lo.prototype.getTilePriority=function(t,i,s,e){var r=this.frameState_;if(!r||!(i in r.wantedTiles)){return _o.DROP}if(!r.wantedTiles[i][t.getKey()]){return _o.DROP}var n=s[0]-r.focus[0];var h=s[1]-r.focus[1];return 65536*Math.log(e)+Math.sqrt(n*n+h*h)/e};Lo.prototype.handleBrowserEvent=function(t,i){var s=i||t.type;var e=new io(s,this,t);this.handleMapBrowserEvent(e)};Lo.prototype.handleMapBrowserEvent=function(t){if(!this.frameState_){return}this.focus_=t.coordinate;t.frameState=this.frameState_;var i=this.getInteractions().getArray();var s;if(this.dispatchEvent(t)!==false){for(s=i.length-1;s>=0;s--){var e=i[s];if(!e.getActive()){continue}var r=e.handleEvent(t);if(!r){break}}}};Lo.prototype.handlePostRender=function(){var t=this.frameState_;var i=this.tileQueue_;if(!i.isEmpty()){var s=16;var e=s;if(t){var r=t.viewHints;if(r[yo.ANIMATING]){s=this.loadTilesWhileAnimating_?8:0;e=2}if(r[yo.INTERACTING]){s=this.loadTilesWhileInteracting_?8:0;e=2}}if(i.getTilesLoading()<s){i.reprioritize();i.loadMoreTiles(s,e)}}var n=this.postRenderFunctions_;var h,a;for(h=0,a=n.length;h<a;++h){n[h](this,t)}n.length=0};Lo.prototype.handleSizeChanged_=function(){this.render()};Lo.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()){t=this.getTargetElement()}if(this.keyHandlerKeys_){for(var i=0,s=this.keyHandlerKeys_.length;i<s;++i){ra.unlistenByKey(this.keyHandlerKeys_[i])}this.keyHandlerKeys_=null}if(!t){this.renderer_.removeLayerRenderers();Po.removeNode(this.viewport_);if(this.handleResize_!==undefined){window.removeEventListener(oa.RESIZE,this.handleResize_,false);this.handleResize_=undefined}}else{t.appendChild(this.viewport_);var e=!this.keyboardEventTarget_?t:this.keyboardEventTarget_;this.keyHandlerKeys_=[ra.listen(e,oa.KEYDOWN,this.handleBrowserEvent,this),ra.listen(e,oa.KEYPRESS,this.handleBrowserEvent,this)];if(!this.handleResize_){this.handleResize_=this.updateSize.bind(this);window.addEventListener(oa.RESIZE,this.handleResize_,false)}}this.updateSize()};Lo.prototype.handleTileChange_=function(){this.render()};Lo.prototype.handleViewPropertyChanged_=function(){this.render()};Lo.prototype.handleViewChanged_=function(){if(this.viewPropertyListenerKey_){ra.unlistenByKey(this.viewPropertyListenerKey_);this.viewPropertyListenerKey_=null}if(this.viewChangeListenerKey_){ra.unlistenByKey(this.viewChangeListenerKey_);this.viewChangeListenerKey_=null}var t=this.getView();if(t){this.viewport_.setAttribute("data-view",ta.getUid(t));this.viewPropertyListenerKey_=ra.listen(t,sa.PROPERTYCHANGE,this.handleViewPropertyChanged_,this);this.viewChangeListenerKey_=ra.listen(t,oa.CHANGE,this.handleViewPropertyChanged_,this)}this.render()};Lo.prototype.handleLayerGroupChanged_=function(){if(this.layerGroupPropertyListenerKeys_){this.layerGroupPropertyListenerKeys_.forEach(ra.unlistenByKey);this.layerGroupPropertyListenerKeys_=null}var t=this.getLayerGroup();if(t){this.layerGroupPropertyListenerKeys_=[ra.listen(t,sa.PROPERTYCHANGE,this.render,this),ra.listen(t,oa.CHANGE,this.render,this)]}this.render()};Lo.prototype.isRendered=function(){return!!this.frameState_};Lo.prototype.renderSync=function(){if(this.animationDelayKey_){cancelAnimationFrame(this.animationDelayKey_)}this.animationDelay_()};Lo.prototype.render=function(){if(this.animationDelayKey_===undefined){this.animationDelayKey_=requestAnimationFrame(this.animationDelay_)}};Lo.prototype.removeControl=function(t){return this.getControls().remove(t)};Lo.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)};Lo.prototype.removeLayer=function(t){var i=this.getLayerGroup().getLayers();return i.remove(t)};Lo.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)};Lo.prototype.renderFrame_=function(t){var i,s,e;var r=this.getSize();var n=this.getView();var h=Ma.createEmpty();var a=this.frameState_;var o=null;if(r!==undefined&&Oo.hasArea(r)&&n&&n.isDef()){var f=n.getHints(this.frameState_?this.frameState_.viewHints:undefined);var u=this.getLayerGroup().getLayerStatesArray();var l={};for(i=0,s=u.length;i<s;++i){l[ta.getUid(u[i].layer)]=u[i]}e=n.getState();var v=e.center;var c=e.resolution/this.pixelRatio_;v[0]=Math.round(v[0]/c)*c;v[1]=Math.round(v[1]/c)*c;o={animate:false,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:h,focus:!this.focus_?v:this.focus_,index:this.frameIndex_++,layerStates:l,layerStatesArray:u,logos:ea.assign({},this.logos_),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:r,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:e,viewHints:f,wantedTiles:{}}}if(o){o.extent=Ma.getForViewAndSize(e.center,e.resolution,e.rotation,o.size,h)}this.frameState_=o;this.renderer_.renderFrame(o);if(o){if(o.animate){this.render()}Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions);if(a){var d=!this.previousExtent_||!Ma.isEmpty(this.previousExtent_)&&!Ma.equals(o.extent,this.previousExtent_);if(d){this.dispatchEvent(new to(co.MOVESTART,this,a));this.previousExtent_=Ma.createOrUpdateEmpty(this.previousExtent_)}}var m=this.previousExtent_&&!o.viewHints[yo.ANIMATING]&&!o.viewHints[yo.INTERACTING]&&!Ma.equals(o.extent,this.previousExtent_);if(m){this.dispatchEvent(new to(co.MOVEEND,this,o));Ma.clone(o.extent,this.previousExtent_)}}this.dispatchEvent(new to(co.POSTRENDER,this,o));setTimeout(this.handlePostRender.bind(this),0)};Lo.prototype.setLayerGroup=function(t){this.set(mo.LAYERGROUP,t)};Lo.prototype.setSize=function(t){this.set(mo.SIZE,t)};Lo.prototype.setTarget=function(t){this.set(mo.TARGET,t)};Lo.prototype.setView=function(t){this.set(mo.VIEW,t)};Lo.prototype.skipFeature=function(t){var i=ta.getUid(t).toString();this.skippedFeatureUids_[i]=true;this.render()};Lo.prototype.updateSize=function(){var t=this.getTargetElement();if(!t){this.setSize(undefined)}else{var i=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(i["borderLeftWidth"])-parseFloat(i["paddingLeft"])-parseFloat(i["paddingRight"])-parseFloat(i["borderRightWidth"]),t.offsetHeight-parseFloat(i["borderTopWidth"])-parseFloat(i["paddingTop"])-parseFloat(i["paddingBottom"])-parseFloat(i["borderBottomWidth"])])}};Lo.prototype.unskipFeature=function(t){var i=ta.getUid(t).toString();delete this.skippedFeatureUids_[i];this.render()};Lo.DEFAULT_RENDERER_TYPES=[To.CANVAS,To.WEBGL];Lo.LOGO_URL="data:image/png;base64,"+"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI"+"WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA"+"AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW"+"WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY"+"asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvX"+"H1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1Vk"+"bMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW"+"2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLP"+"VcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqT"+"acrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaar"+"ldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+Hi"+"zeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDn"+"BAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSF"+"hYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJ"+"REFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxC"+"Brb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe"+"0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8"+"a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7a"+"hgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn"+"B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg"+"q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC";Lo.createOptionsInternal=function(t){var i=null;if(t.keyboardEventTarget!==undefined){i=typeof t.keyboardEventTarget==="string"?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget}var s={};var e={};if(t.logo===undefined||typeof t.logo==="boolean"&&t.logo){e[Lo.LOGO_URL]="https://openlayers.org/"}else{var r=t.logo;if(typeof r==="string"){e[r]=""}else if(r instanceof HTMLElement){e[ta.getUid(r).toString()]=r}else if(r){va.assert(typeof r.href=="string",44);va.assert(typeof r.src=="string",45);e[r.src]=r.href}}var n=t.layers instanceof Co?t.layers:new Co({layers:t.layers});s[mo.LAYERGROUP]=n;s[mo.TARGET]=t.target;s[mo.VIEW]=t.view!==undefined?t.view:new Go;var h;if(t.renderer!==undefined){if(Array.isArray(t.renderer)){h=t.renderer}else if(typeof t.renderer==="string"){h=[t.renderer]}else{va.assert(false,46)}if(h.indexOf("dom")>=0){h=h.concat(Lo.DEFAULT_RENDERER_TYPES)}}else{h=Lo.DEFAULT_RENDERER_TYPES}var a;var o=Ro.getMapRendererPlugins();t:for(var f=0,u=h.length;f<u;++f){var l=h[f];for(var v=0,c=o.length;v<c;++v){var d=o[v];if(d["handles"](l)){a=d;break t}}}if(!a){throw new Error("Unable to create a map renderer for types: "+h.join(", "))}var m;if(t.controls!==undefined){if(Array.isArray(t.controls)){m=new Qa(t.controls.slice())}else{va.assert(t.controls instanceof Qa,47);m=t.controls}}var p;if(t.interactions!==undefined){if(Array.isArray(t.interactions)){p=new Qa(t.interactions.slice())}else{va.assert(t.interactions instanceof Qa,48);p=t.interactions}}var _;if(t.overlays!==undefined){if(Array.isArray(t.overlays)){_=new Qa(t.overlays.slice())}else{va.assert(t.overlays instanceof Qa,49);_=t.overlays}}else{_=new Qa}return{controls:m,interactions:p,keyboardEventTarget:i,logos:e,overlays:_,mapRendererPlugin:a,values:s}};var Fo=function(t){ua.call(this);this.element=t.element?t.element:null;this.target_=null;this.map_=null;this.listenerKeys=[];this.render=t.render?t.render:ta.nullFunction;if(t.target){this.setTarget(t.target)}};ta.inherits(Fo,ua);Fo.prototype.disposeInternal=function(){Po.removeNode(this.element);ua.prototype.disposeInternal.call(this)};Fo.prototype.getMap=function(){return this.map_};Fo.prototype.setMap=function(t){if(this.map_){Po.removeNode(this.element)}for(var i=0,s=this.listenerKeys.length;i<s;++i){ra.unlistenByKey(this.listenerKeys[i])}this.listenerKeys.length=0;this.map_=t;if(this.map_){var e=this.target_?this.target_:t.getOverlayContainerStopEvent();e.appendChild(this.element);if(this.render!==ta.nullFunction){this.listenerKeys.push(ra.listen(t,co.POSTRENDER,this.render,this))}t.render()}};Fo.prototype.setTarget=function(t){this.target_=typeof t==="string"?document.getElementById(t):t};var Do={};Do.CLASS_HIDDEN="ol-hidden";Do.CLASS_SELECTABLE="ol-selectable";Do.CLASS_UNSELECTABLE="ol-unselectable";Do.CLASS_UNSUPPORTED="ol-unsupported";Do.CLASS_CONTROL="ol-control";Do.getFontFamilies=function(){var t;var i={};return function(s){if(!t){t=document.createElement("div").style}if(!(s in i)){t.font=s;var e=t.fontFamily;t.font="";if(!e){return null}i[s]=e.split(/,\s?/)}return i[s]}}();var Wo={POSTCOMPOSE:"postcompose",PRECOMPOSE:"precompose",RENDER:"render"};var jo=function(t){var i=ea.assign({},t);delete i.source;No.call(this,i);this.mapPrecomposeKey_=null;this.mapRenderKey_=null;this.sourceChangeKey_=null;if(t.map){this.setMap(t.map)}ra.listen(this,ua.getChangeEventType(ko.SOURCE),this.handleSourcePropertyChange_,this);var s=t.source?t.source:null;this.setSource(s)};ta.inherits(jo,No);jo.visibleAtResolution=function(t,i){return t.visible&&i>=t.minResolution&&i<t.maxResolution};jo.prototype.getLayersArray=function(t){var i=t?t:[];i.push(this);return i};jo.prototype.getLayerStatesArray=function(t){var i=t?t:[];i.push(this.getLayerState());return i};jo.prototype.getSource=function(){var t=this.get(ko.SOURCE);return t||null};jo.prototype.getSourceState=function(){var t=this.getSource();return!t?Io.UNDEFINED:t.getState()};jo.prototype.handleSourceChange_=function(){this.changed()};jo.prototype.handleSourcePropertyChange_=function(){if(this.sourceChangeKey_){ra.unlistenByKey(this.sourceChangeKey_);this.sourceChangeKey_=null}var t=this.getSource();if(t){this.sourceChangeKey_=ra.listen(t,oa.CHANGE,this.handleSourceChange_,this)}this.changed()};jo.prototype.setMap=function(t){if(this.mapPrecomposeKey_){ra.unlistenByKey(this.mapPrecomposeKey_);this.mapPrecomposeKey_=null}if(!t){this.changed()}if(this.mapRenderKey_){ra.unlistenByKey(this.mapRenderKey_);this.mapRenderKey_=null}if(t){this.mapPrecomposeKey_=ra.listen(t,Wo.PRECOMPOSE,(function(t){var i=this.getLayerState();i.managed=false;i.zIndex=Infinity;t.frameState.layerStatesArray.push(i);t.frameState.layerStates[ta.getUid(this)]=i}),this);this.mapRenderKey_=ra.listen(this,oa.CHANGE,t.render,t);this.changed()}};jo.prototype.setSource=function(t){this.set(ko.SOURCE,t)};var Vo=function(t){var i=t?t:{};this.ulElement_=document.createElement("UL");this.logoLi_=document.createElement("LI");this.ulElement_.appendChild(this.logoLi_);this.logoLi_.style.display="none";this.collapsed_=i.collapsed!==undefined?i.collapsed:true;this.collapsible_=i.collapsible!==undefined?i.collapsible:true;if(!this.collapsible_){this.collapsed_=false}var s=i.className!==undefined?i.className:"ol-attribution";var e=i.tipLabel!==undefined?i.tipLabel:"Attributions";var r=i.collapseLabel!==undefined?i.collapseLabel:"»";if(typeof r==="string"){this.collapseLabel_=document.createElement("span");this.collapseLabel_.textContent=r}else{this.collapseLabel_=r}var n=i.label!==undefined?i.label:"i";if(typeof n==="string"){this.label_=document.createElement("span");this.label_.textContent=n}else{this.label_=n}var h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;var a=document.createElement("button");a.setAttribute("type","button");a.title=e;a.appendChild(h);ra.listen(a,oa.CLICK,this.handleClick_,this);var o=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" ol-collapsed":"")+(this.collapsible_?"":" ol-uncollapsible");var f=document.createElement("div");f.className=o;f.appendChild(this.ulElement_);f.appendChild(a);var u=i.render?i.render:Vo.render;Fo.call(this,{element:f,render:u,target:i.target});this.renderedAttributions_=[];this.renderedVisible_=true;this.logoElements_={}};ta.inherits(Vo,Fo);Vo.prototype.getSourceAttributions_=function(t){var i={};var s=[];var e=t.layerStatesArray;var r=t.viewState.resolution;for(var n=0,h=e.length;n<h;++n){var a=e[n];if(!jo.visibleAtResolution(a,r)){continue}var o=a.layer.getSource();if(!o){continue}var f=o.getAttributions2();if(!f){continue}var u=f(t);if(!u){continue}if(Array.isArray(u)){for(var l=0,v=u.length;l<v;++l){if(!(u[l]in i)){s.push(u[l]);i[u[l]]=true}}}else{if(!(u in i)){s.push(u);i[u]=true}}}return s};Vo.render=function(t){this.updateElement_(t.frameState)};Vo.prototype.updateElement_=function(t){if(!t){if(this.renderedVisible_){this.element.style.display="none";this.renderedVisible_=false}return}var i=this.getSourceAttributions_(t);if(pa.equals(i,this.renderedAttributions_)){return}while(this.ulElement_.lastChild!==this.logoLi_){this.ulElement_.removeChild(this.ulElement_.lastChild)}for(var s=0,e=i.length;s<e;++s){var r=document.createElement("LI");r.innerHTML=i[s];this.ulElement_.appendChild(r)}if(i.length===0&&this.renderedAttributions_.length>0){this.element.classList.add("ol-logo-only")}else if(this.renderedAttributions_.length===0&&i.length>0){this.element.classList.remove("ol-logo-only")}var n=i.length>0||!ea.isEmpty(t.logos);if(this.renderedVisible_!=n){this.element.style.display=n?"":"none";this.renderedVisible_=n}this.renderedAttributions_=i;this.insertLogos_(t)};Vo.prototype.insertLogos_=function(t){var i;var s=t.logos;var e=this.logoElements_;for(i in e){if(!(i in s)){Po.removeNode(e[i]);delete e[i]}}var r,n,h;for(h in s){var a=s[h];if(a instanceof HTMLElement){this.logoLi_.appendChild(a);e[h]=a}if(!(h in e)){r=new Image;r.src=h;if(a===""){n=r}else{n=document.createElement("a");n.href=a;n.appendChild(r)}this.logoLi_.appendChild(n);e[h]=n}}this.logoLi_.style.display=!ea.isEmpty(s)?"":"none"};Vo.prototype.handleClick_=function(t){t.preventDefault();this.handleToggle_()};Vo.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed");if(this.collapsed_){Po.replaceNode(this.collapseLabel_,this.label_)}else{Po.replaceNode(this.label_,this.collapseLabel_)}this.collapsed_=!this.collapsed_};Vo.prototype.getCollapsible=function(){return this.collapsible_};Vo.prototype.setCollapsible=function(t){if(this.collapsible_===t){return}this.collapsible_=t;this.element.classList.toggle("ol-uncollapsible");if(!t&&this.collapsed_){this.handleToggle_()}};Vo.prototype.setCollapsed=function(t){if(!this.collapsible_||this.collapsed_===t){return}this.handleToggle_()};Vo.prototype.getCollapsed=function(){return this.collapsed_};var Uo=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-rotate";var e=i.label!==undefined?i.label:"⇧";this.label_=null;if(typeof e==="string"){this.label_=document.createElement("span");this.label_.className="ol-compass";this.label_.textContent=e}else{this.label_=e;this.label_.classList.add("ol-compass")}var r=i.tipLabel?i.tipLabel:"Reset rotation";var n=document.createElement("button");n.className=s+"-reset";n.setAttribute("type","button");n.title=r;n.appendChild(this.label_);ra.listen(n,oa.CLICK,Uo.prototype.handleClick_,this);var h=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL;var a=document.createElement("div");a.className=h;a.appendChild(n);var o=i.render?i.render:Uo.render;this.callResetNorth_=i.resetNorth?i.resetNorth:undefined;Fo.call(this,{element:a,render:o,target:i.target});this.duration_=i.duration!==undefined?i.duration:250;this.autoHide_=i.autoHide!==undefined?i.autoHide:true;this.rotation_=undefined;if(this.autoHide_){this.element.classList.add(Do.CLASS_HIDDEN)}};ta.inherits(Uo,Fo);Uo.prototype.handleClick_=function(t){t.preventDefault();if(this.callResetNorth_!==undefined){this.callResetNorth_()}else{this.resetNorth_()}};Uo.prototype.resetNorth_=function(){var t=this.getMap();var i=t.getView();if(!i){return}if(i.getRotation()!==undefined){if(this.duration_>0){i.animate({rotation:0,duration:this.duration_,easing:So.easeOut})}else{i.setRotation(0)}}};Uo.render=function(t){var i=t.frameState;if(!i){return}var s=i.viewState.rotation;if(s!=this.rotation_){var e="rotate("+s+"rad)";if(this.autoHide_){var r=this.element.classList.contains(Do.CLASS_HIDDEN);if(!r&&s===0){this.element.classList.add(Do.CLASS_HIDDEN)}else if(r&&s!==0){this.element.classList.remove(Do.CLASS_HIDDEN)}}this.label_.style.msTransform=e;this.label_.style.webkitTransform=e;this.label_.style.transform=e}this.rotation_=s};var Bo=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-zoom";var e=i.delta!==undefined?i.delta:1;var r=i.zoomInLabel!==undefined?i.zoomInLabel:"+";var n=i.zoomOutLabel!==undefined?i.zoomOutLabel:"−";var h=i.zoomInTipLabel!==undefined?i.zoomInTipLabel:"Zoom in";var a=i.zoomOutTipLabel!==undefined?i.zoomOutTipLabel:"Zoom out";var o=document.createElement("button");o.className=s+"-in";o.setAttribute("type","button");o.title=h;o.appendChild(typeof r==="string"?document.createTextNode(r):r);ra.listen(o,oa.CLICK,Bo.prototype.handleClick_.bind(this,e));var f=document.createElement("button");f.className=s+"-out";f.setAttribute("type","button");f.title=a;f.appendChild(typeof n==="string"?document.createTextNode(n):n);ra.listen(f,oa.CLICK,Bo.prototype.handleClick_.bind(this,-e));var u=s+" "+Do.CLASS_UNSELECTABLE+" "+Do.CLASS_CONTROL;var l=document.createElement("div");l.className=u;l.appendChild(o);l.appendChild(f);Fo.call(this,{element:l,target:i.target});this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(Bo,Fo);Bo.prototype.handleClick_=function(t,i){i.preventDefault();this.zoomByDelta_(t)};Bo.prototype.zoomByDelta_=function(t){var i=this.getMap();var s=i.getView();if(!s){return}var e=s.getResolution();if(e){var r=s.constrainResolution(e,t);if(this.duration_>0){if(s.getAnimating()){s.cancelAnimations()}s.animate({resolution:r,duration:this.duration_,easing:So.easeOut})}else{s.setResolution(r)}}};var qo={};qo.defaults=function(t){var i=t?t:{};var s=new Qa;var e=i.zoom!==undefined?i.zoom:true;if(e){s.push(new Bo(i.zoomOptions))}var r=i.rotate!==undefined?i.rotate:true;if(r){s.push(new Uo(i.rotateOptions))}var n=i.attribution!==undefined?i.attribution:true;if(n){s.push(new Vo(i.attributionOptions))}return s};var Ho=function(t,i,s){this.decay_=t;this.minVelocity_=i;this.delay_=s;this.points_=[];this.angle_=0;this.initialVelocity_=0};Ho.prototype.begin=function(){this.points_.length=0;this.angle_=0;this.initialVelocity_=0};Ho.prototype.update=function(t,i){this.points_.push(t,i,Date.now())};Ho.prototype.end=function(){if(this.points_.length<6){return false}var t=Date.now()-this.delay_;var i=this.points_.length-3;if(this.points_[i+2]<t){return false}var s=i-3;while(s>0&&this.points_[s+2]>t){s-=3}var e=this.points_[i+2]-this.points_[s+2];if(e<1e3/60){return false}var r=this.points_[i]-this.points_[s];var n=this.points_[i+1]-this.points_[s+1];this.angle_=Math.atan2(n,r);this.initialVelocity_=Math.sqrt(r*r+n*n)/e;return this.initialVelocity_>this.minVelocity_};Ho.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_};Ho.prototype.getAngle=function(){return this.angle_};var Xo={ACTIVE:"active"};var Yo=function(t){ua.call(this);this.map_=null;this.setActive(true);this.handleEvent=t.handleEvent};ta.inherits(Yo,ua);Yo.prototype.getActive=function(){return this.get(Xo.ACTIVE)};Yo.prototype.getMap=function(){return this.map_};Yo.prototype.setActive=function(t){this.set(Xo.ACTIVE,t)};Yo.prototype.setMap=function(t){this.map_=t};Yo.pan=function(t,i,s){var e=t.getCenter();if(e){var r=t.constrainCenter([e[0]+i[0],e[1]+i[1]]);if(s){t.animate({duration:s,easing:So.linear,center:r})}else{t.setCenter(r)}}};Yo.rotate=function(t,i,s,e){i=t.constrainRotation(i,0);Yo.rotateWithoutConstraints(t,i,s,e)};Yo.rotateWithoutConstraints=function(t,i,s,e){if(i!==undefined){var r=t.getRotation();var n=t.getCenter();if(r!==undefined&&n&&e>0){t.animate({rotation:i,anchor:s,duration:e,easing:So.easeOut})}else{t.rotate(i,s)}}};Yo.zoom=function(t,i,s,e,r){i=t.constrainResolution(i,0,r);Yo.zoomWithoutConstraints(t,i,s,e)};Yo.zoomByDelta=function(t,i,s,e){var r=t.getResolution();var n=t.constrainResolution(r,i,0);if(n!==undefined){var h=t.getResolutions();n=ca.clamp(n,t.getMinResolution()||h[h.length-1],t.getMaxResolution()||h[0])}if(s&&n!==undefined&&n!==r){var a=t.getCenter();var o=t.calculateCenterZoom(n,s);o=t.constrainCenter(o);s=[(n*a[0]-r*o[0])/(n-r),(n*a[1]-r*o[1])/(n-r)]}Yo.zoomWithoutConstraints(t,n,s,e)};Yo.zoomWithoutConstraints=function(t,i,s,e){if(i){var r=t.getResolution();var n=t.getCenter();if(r!==undefined&&n&&i!==r&&e){t.animate({resolution:i,anchor:s,duration:e,easing:So.easeOut})}else{if(s){var h=t.calculateCenterZoom(i,s);t.setCenter(h)}t.setResolution(i)}}};var Jo=function(t){var i=t?t:{};this.delta_=i.delta?i.delta:1;Yo.call(this,{handleEvent:Jo.handleEvent});this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(Jo,Yo);Jo.handleEvent=function(t){var i=false;var s=t.originalEvent;if(t.type==so.DBLCLICK){var e=t.map;var r=t.coordinate;var n=s.shiftKey?-this.delta_:this.delta_;var h=e.getView();Yo.zoomByDelta(h,n,r,this.duration_);t.preventDefault();i=true}return!i};var Ko={};Ko.altKeyOnly=function(t){var i=t.originalEvent;return i.altKey&&!(i.metaKey||i.ctrlKey)&&!i.shiftKey};Ko.altShiftKeysOnly=function(t){var i=t.originalEvent;return i.altKey&&!(i.metaKey||i.ctrlKey)&&i.shiftKey};Ko.always=wa.TRUE;Ko.click=function(t){return t.type==so.CLICK};Ko.mouseActionButton=function(t){var i=t.originalEvent;return i.button==0&&!(Ja.WEBKIT&&Ja.MAC&&i.ctrlKey)};Ko.never=wa.FALSE;Ko.pointerMove=function(t){return t.type=="pointermove"};Ko.singleClick=function(t){return t.type==so.SINGLECLICK};Ko.doubleClick=function(t){return t.type==so.DBLCLICK};Ko.noModifierKeys=function(t){var i=t.originalEvent;return!i.altKey&&!(i.metaKey||i.ctrlKey)&&!i.shiftKey};Ko.platformModifierKeyOnly=function(t){var i=t.originalEvent;return!i.altKey&&(Ja.MAC?i.metaKey:i.ctrlKey)&&!i.shiftKey};Ko.shiftKeyOnly=function(t){var i=t.originalEvent;return!i.altKey&&!(i.metaKey||i.ctrlKey)&&i.shiftKey};Ko.targetNotEditable=function(t){var i=t.originalEvent.target;var s=i.tagName;return s!=="INPUT"&&s!=="SELECT"&&s!=="TEXTAREA"};Ko.mouseOnly=function(t){va.assert(t.pointerEvent,56);return t.pointerEvent.pointerType=="mouse"};Ko.primaryAction=function(t){var i=t.pointerEvent;return i.isPrimary&&i.button===0};var Zo=function(t){var i=t?t:{};var s=i.handleEvent?i.handleEvent:Zo.handleEvent;Yo.call(this,{handleEvent:s});this.handleDownEvent_=i.handleDownEvent?i.handleDownEvent:Zo.handleDownEvent;this.handleDragEvent_=i.handleDragEvent?i.handleDragEvent:Zo.handleDragEvent;this.handleMoveEvent_=i.handleMoveEvent?i.handleMoveEvent:Zo.handleMoveEvent;this.handleUpEvent_=i.handleUpEvent?i.handleUpEvent:Zo.handleUpEvent;this.handlingDownUpSequence=false;this.trackedPointers_={};this.targetPointers=[]};ta.inherits(Zo,Yo);Zo.centroid=function(t){var i=t.length;var s=0;var e=0;for(var r=0;r<i;r++){s+=t[r].clientX;e+=t[r].clientY}return[s/i,e/i]};Zo.prototype.isPointerDraggingEvent_=function(t){var i=t.type;return i===so.POINTERDOWN||i===so.POINTERDRAG||i===so.POINTERUP};Zo.prototype.updateTrackedPointers_=function(t){if(this.isPointerDraggingEvent_(t)){var i=t.pointerEvent;var s=i.pointerId.toString();if(t.type==so.POINTERUP){delete this.trackedPointers_[s]}else if(t.type==so.POINTERDOWN){this.trackedPointers_[s]=i}else if(s in this.trackedPointers_){this.trackedPointers_[s]=i}this.targetPointers=ea.getValues(this.trackedPointers_)}};Zo.handleDragEvent=ta.nullFunction;Zo.handleUpEvent=wa.FALSE;Zo.handleDownEvent=wa.FALSE;Zo.handleMoveEvent=ta.nullFunction;Zo.handleEvent=function(t){if(!(t instanceof eo)){return true}var i=false;this.updateTrackedPointers_(t);if(this.handlingDownUpSequence){if(t.type==so.POINTERDRAG){this.handleDragEvent_(t)}else if(t.type==so.POINTERUP){var s=this.handleUpEvent_(t);this.handlingDownUpSequence=s&&this.targetPointers.length>0}}else{if(t.type==so.POINTERDOWN){var e=this.handleDownEvent_(t);this.handlingDownUpSequence=e;i=this.shouldStopEvent(e)}else if(t.type==so.POINTERMOVE){this.handleMoveEvent_(t)}}return!i};Zo.prototype.shouldStopEvent=function(t){return t};var $o=function(t){Zo.call(this,{handleDownEvent:$o.handleDownEvent_,handleDragEvent:$o.handleDragEvent_,handleUpEvent:$o.handleUpEvent_});var i=t?t:{};this.kinetic_=i.kinetic;this.lastCentroid=null;this.condition_=i.condition?i.condition:Ko.noModifierKeys;this.noKinetic_=false};ta.inherits($o,Zo);$o.handleDragEvent_=function(t){var i=this.targetPointers;var s=Zo.centroid(i);if(i.length==this.lastPointersCount_){if(this.kinetic_){this.kinetic_.update(s[0],s[1])}if(this.lastCentroid){var e=this.lastCentroid[0]-s[0];var r=s[1]-this.lastCentroid[1];var n=t.map;var h=n.getView();var a=h.getState();var o=[e,r];Eo.scale(o,a.resolution);Eo.rotate(o,a.rotation);Eo.add(o,a.center);o=h.constrainCenter(o);h.setCenter(o)}}else if(this.kinetic_){this.kinetic_.begin()}this.lastCentroid=s;this.lastPointersCount_=i.length};$o.handleUpEvent_=function(t){var i=t.map;var s=i.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var e=this.kinetic_.getDistance();var r=this.kinetic_.getAngle();var n=s.getCenter();var h=i.getPixelFromCoordinate(n);var a=i.getCoordinateFromPixel([h[0]-e*Math.cos(r),h[1]-e*Math.sin(r)]);s.animate({center:s.constrainCenter(a),duration:500,easing:So.easeOut})}s.setHint(yo.INTERACTING,-1);return false}else{if(this.kinetic_){this.kinetic_.begin()}this.lastCentroid=null;return true}};$o.handleDownEvent_=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var i=t.map;var s=i.getView();this.lastCentroid=null;if(!this.handlingDownUpSequence){s.setHint(yo.INTERACTING,1)}if(s.getAnimating()){s.setCenter(t.frameState.viewState.center)}if(this.kinetic_){this.kinetic_.begin()}this.noKinetic_=this.targetPointers.length>1;return true}else{return false}};$o.prototype.shouldStopEvent=wa.FALSE;var Qo=function(t){var i=t?t:{};Zo.call(this,{handleDownEvent:Qo.handleDownEvent_,handleDragEvent:Qo.handleDragEvent_,handleUpEvent:Qo.handleUpEvent_});this.condition_=i.condition?i.condition:Ko.altShiftKeysOnly;this.lastAngle_=undefined;this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(Qo,Zo);Qo.handleDragEvent_=function(t){if(!Ko.mouseOnly(t)){return}var i=t.map;var s=i.getView();if(s.getConstraints().rotation===wo.disable){return}var e=i.getSize();var r=t.pixel;var n=Math.atan2(e[1]/2-r[1],r[0]-e[0]/2);if(this.lastAngle_!==undefined){var h=n-this.lastAngle_;var a=s.getRotation();Yo.rotateWithoutConstraints(s,a-h)}this.lastAngle_=n};Qo.handleUpEvent_=function(t){if(!Ko.mouseOnly(t)){return true}var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);var e=s.getRotation();Yo.rotate(s,e,undefined,this.duration_);return false};Qo.handleDownEvent_=function(t){if(!Ko.mouseOnly(t)){return false}if(Ko.mouseActionButton(t)&&this.condition_(t)){var i=t.map;i.getView().setHint(yo.INTERACTING,1);this.lastAngle_=undefined;return true}else{return false}};Qo.prototype.shouldStopEvent=wa.FALSE;var tf=function(t){this.geometry_=null;this.element_=document.createElement("div");this.element_.style.position="absolute";this.element_.className="ol-box "+t;this.map_=null;this.startPixel_=null;this.endPixel_=null};ta.inherits(tf,na);tf.prototype.disposeInternal=function(){this.setMap(null)};tf.prototype.render_=function(){var t=this.startPixel_;var i=this.endPixel_;var s="px";var e=this.element_.style;e.left=Math.min(t[0],i[0])+s;e.top=Math.min(t[1],i[1])+s;e.width=Math.abs(i[0]-t[0])+s;e.height=Math.abs(i[1]-t[1])+s};tf.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var i=this.element_.style;i.left=i.top=i.width=i.height="inherit"}this.map_=t;if(this.map_){this.map_.getOverlayContainer().appendChild(this.element_)}};tf.prototype.setPixels=function(t,i){this.startPixel_=t;this.endPixel_=i;this.createOrUpdateGeometry();this.render_()};tf.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_;var i=this.endPixel_;var s=[t,[t[0],i[1]],i,[i[0],t[1]]];var e=s.map(this.map_.getCoordinateFromPixel,this.map_);e[4]=e[0].slice();if(!this.geometry_){this.geometry_=new Xa([e])}else{this.geometry_.setCoordinates([e])}};tf.prototype.getGeometry=function(){return this.geometry_};var sf=function(t){Zo.call(this,{handleDownEvent:sf.handleDownEvent_,handleDragEvent:sf.handleDragEvent_,handleUpEvent:sf.handleUpEvent_});var i=t?t:{};this.box_=new tf(i.className||"ol-dragbox");this.minArea_=i.minArea!==undefined?i.minArea:64;this.startPixel_=null;this.condition_=i.condition?i.condition:Ko.always;this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:sf.defaultBoxEndCondition};ta.inherits(sf,Zo);sf.defaultBoxEndCondition=function(t,i,s){var e=s[0]-i[0];var r=s[1]-i[1];return e*e+r*r>=this.minArea_};sf.handleDragEvent_=function(t){if(!Ko.mouseOnly(t)){return}this.box_.setPixels(this.startPixel_,t.pixel);this.dispatchEvent(new sf.Event(sf.EventType_.BOXDRAG,t.coordinate,t))};sf.prototype.getGeometry=function(){return this.box_.getGeometry()};sf.prototype.onBoxEnd=ta.nullFunction;sf.handleUpEvent_=function(t){if(!Ko.mouseOnly(t)){return true}this.box_.setMap(null);if(this.boxEndCondition_(t,this.startPixel_,t.pixel)){this.onBoxEnd(t);this.dispatchEvent(new sf.Event(sf.EventType_.BOXEND,t.coordinate,t))}return false};sf.handleDownEvent_=function(t){if(!Ko.mouseOnly(t)){return false}if(Ko.mouseActionButton(t)&&this.condition_(t)){this.startPixel_=t.pixel;this.box_.setMap(t.map);this.box_.setPixels(this.startPixel_,this.startPixel_);this.dispatchEvent(new sf.Event(sf.EventType_.BOXSTART,t.coordinate,t));return true}else{return false}};sf.EventType_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend"};sf.Event=function(t,i,s){ha.call(this,t);this.coordinate=i;this.mapBrowserEvent=s};ta.inherits(sf.Event,ha);var ef=function(t){var i=t?t:{};var s=i.condition?i.condition:Ko.shiftKeyOnly;this.duration_=i.duration!==undefined?i.duration:200;this.out_=i.out!==undefined?i.out:false;sf.call(this,{condition:s,className:i.className||"ol-dragzoom"})};ta.inherits(ef,sf);ef.prototype.onBoxEnd=function(){var t=this.getMap();var i=t.getView();var s=t.getSize();var e=this.getGeometry().getExtent();if(this.out_){var r=i.calculateExtent(s);var n=Ma.createOrUpdateFromCoordinates([t.getPixelFromCoordinate(Ma.getBottomLeft(e)),t.getPixelFromCoordinate(Ma.getTopRight(e))]);var h=i.getResolutionForExtent(n,s);Ma.scaleFromCenter(r,1/h);e=r}var a=i.constrainResolution(i.getResolutionForExtent(e,s));var o=Ma.getCenter(e);o=i.constrainCenter(o);i.animate({resolution:a,center:o,duration:this.duration_,easing:So.easeOut})};var rf={LEFT:37,UP:38,RIGHT:39,DOWN:40};var nf=function(t){Yo.call(this,{handleEvent:nf.handleEvent});var i=t||{};this.defaultCondition_=function(t){return Ko.noModifierKeys(t)&&Ko.targetNotEditable(t)};this.condition_=i.condition!==undefined?i.condition:this.defaultCondition_;this.duration_=i.duration!==undefined?i.duration:100;this.pixelDelta_=i.pixelDelta!==undefined?i.pixelDelta:128};ta.inherits(nf,Yo);nf.handleEvent=function(t){var i=false;if(t.type==oa.KEYDOWN){var s=t.originalEvent;var e=s.keyCode;if(this.condition_(t)&&(e==rf.DOWN||e==rf.LEFT||e==rf.RIGHT||e==rf.UP)){var r=t.map;var n=r.getView();var h=n.getResolution()*this.pixelDelta_;var a=0,o=0;if(e==rf.DOWN){o=-h}else if(e==rf.LEFT){a=-h}else if(e==rf.RIGHT){a=h}else{o=h}var f=[a,o];Eo.rotate(f,n.getRotation());Yo.pan(n,f,this.duration_);t.preventDefault();i=true}}return!i};var hf=function(t){Yo.call(this,{handleEvent:hf.handleEvent});var i=t?t:{};this.condition_=i.condition?i.condition:Ko.targetNotEditable;this.delta_=i.delta?i.delta:1;this.duration_=i.duration!==undefined?i.duration:100};ta.inherits(hf,Yo);hf.handleEvent=function(t){var i=false;if(t.type==oa.KEYDOWN||t.type==oa.KEYPRESS){var s=t.originalEvent;var e=s.charCode;if(this.condition_(t)&&(e=="+".charCodeAt(0)||e=="-".charCodeAt(0))){var r=t.map;var n=e=="+".charCodeAt(0)?this.delta_:-this.delta_;var h=r.getView();Yo.zoomByDelta(h,n,undefined,this.duration_);t.preventDefault();i=true}}return!i};var af=function(t){Yo.call(this,{handleEvent:af.handleEvent});var i=t||{};this.delta_=0;this.duration_=i.duration!==undefined?i.duration:250;this.timeout_=i.timeout!==undefined?i.timeout:80;this.useAnchor_=i.useAnchor!==undefined?i.useAnchor:true;this.constrainResolution_=i.constrainResolution||false;this.lastAnchor_=null;this.startTime_=undefined;this.timeoutId_=undefined;this.mode_=undefined;this.trackpadEventGap_=400;this.trackpadTimeoutId_=undefined;this.trackpadDeltaPerZoom_=300;this.trackpadZoomBuffer_=1.5};ta.inherits(af,Yo);af.handleEvent=function(t){var i=t.type;if(i!==oa.WHEEL&&i!==oa.MOUSEWHEEL){return true}t.preventDefault();var s=t.map;var e=t.originalEvent;if(this.useAnchor_){this.lastAnchor_=t.coordinate}var r;if(t.type==oa.WHEEL){r=e.deltaY;if(Ja.FIREFOX&&e.deltaMode===WheelEvent.DOM_DELTA_PIXEL){r/=Ja.DEVICE_PIXEL_RATIO}if(e.deltaMode===WheelEvent.DOM_DELTA_LINE){r*=40}}else if(t.type==oa.MOUSEWHEEL){r=-e.wheelDeltaY;if(Ja.SAFARI){r/=3}}if(r===0){return false}var n=Date.now();if(this.startTime_===undefined){this.startTime_=n}if(!this.mode_||n-this.startTime_>this.trackpadEventGap_){this.mode_=Math.abs(r)<4?af.Mode_.TRACKPAD:af.Mode_.WHEEL}if(this.mode_===af.Mode_.TRACKPAD){var h=s.getView();if(this.trackpadTimeoutId_){clearTimeout(this.trackpadTimeoutId_)}else{h.setHint(yo.INTERACTING,1)}this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var a=h.getResolution()*Math.pow(2,r/this.trackpadDeltaPerZoom_);var o=h.getMinResolution();var f=h.getMaxResolution();var u=0;if(a<o){a=Math.max(a,o/this.trackpadZoomBuffer_);u=1}else if(a>f){a=Math.min(a,f*this.trackpadZoomBuffer_);u=-1}if(this.lastAnchor_){var l=h.calculateCenterZoom(a,this.lastAnchor_);h.setCenter(h.constrainCenter(l))}h.setResolution(a);if(u===0&&this.constrainResolution_){h.animate({resolution:h.constrainResolution(a,r>0?-1:1),easing:So.easeOut,anchor:this.lastAnchor_,duration:this.duration_})}if(u>0){h.animate({resolution:o,easing:So.easeOut,anchor:this.lastAnchor_,duration:500})}else if(u<0){h.animate({resolution:f,easing:So.easeOut,anchor:this.lastAnchor_,duration:500})}this.startTime_=n;return false}this.delta_+=r;var v=Math.max(this.timeout_-(n-this.startTime_),0);clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,s),v);return false};af.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=undefined;var t=this.getMap().getView();t.setHint(yo.INTERACTING,-1)};af.prototype.handleWheelZoom_=function(t){var i=t.getView();if(i.getAnimating()){i.cancelAnimations()}var s=ta.MOUSEWHEELZOOM_MAXDELTA;var e=ca.clamp(this.delta_,-s,s);Yo.zoomByDelta(i,-e,this.lastAnchor_,this.duration_);this.mode_=undefined;this.delta_=0;this.lastAnchor_=null;this.startTime_=undefined;this.timeoutId_=undefined};af.prototype.setMouseAnchor=function(t){this.useAnchor_=t;if(!t){this.lastAnchor_=null}};af.Mode_={TRACKPAD:"trackpad",WHEEL:"wheel"};var of=function(t){Zo.call(this,{handleDownEvent:of.handleDownEvent_,handleDragEvent:of.handleDragEvent_,handleUpEvent:of.handleUpEvent_});var i=t||{};this.anchor_=null;this.lastAngle_=undefined;this.rotating_=false;this.rotationDelta_=0;this.threshold_=i.threshold!==undefined?i.threshold:.3;this.duration_=i.duration!==undefined?i.duration:250};ta.inherits(of,Zo);of.handleDragEvent_=function(t){var i=0;var s=this.targetPointers[0];var e=this.targetPointers[1];var r=Math.atan2(e.clientY-s.clientY,e.clientX-s.clientX);if(this.lastAngle_!==undefined){var n=r-this.lastAngle_;this.rotationDelta_+=n;if(!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_){this.rotating_=true}i=n}this.lastAngle_=r;var h=t.map;var a=h.getView();if(a.getConstraints().rotation===wo.disable){return}var o=h.getViewport().getBoundingClientRect();var f=Zo.centroid(this.targetPointers);f[0]-=o.left;f[1]-=o.top;this.anchor_=h.getCoordinateFromPixel(f);if(this.rotating_){var u=a.getRotation();h.render();Yo.rotateWithoutConstraints(a,u+i,this.anchor_)}};of.handleUpEvent_=function(t){if(this.targetPointers.length<2){var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);if(this.rotating_){var e=s.getRotation();Yo.rotate(s,e,this.anchor_,this.duration_)}return false}else{return true}};of.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var i=t.map;this.anchor_=null;this.lastAngle_=undefined;this.rotating_=false;this.rotationDelta_=0;if(!this.handlingDownUpSequence){i.getView().setHint(yo.INTERACTING,1)}return true}else{return false}};of.prototype.shouldStopEvent=wa.FALSE;var ff=function(t){Zo.call(this,{handleDownEvent:ff.handleDownEvent_,handleDragEvent:ff.handleDragEvent_,handleUpEvent:ff.handleUpEvent_});var i=t?t:{};this.constrainResolution_=i.constrainResolution||false;this.anchor_=null;this.duration_=i.duration!==undefined?i.duration:400;this.lastDistance_=undefined;this.lastScaleDelta_=1};ta.inherits(ff,Zo);ff.handleDragEvent_=function(t){var i=1;var s=this.targetPointers[0];var e=this.targetPointers[1];var r=s.clientX-e.clientX;var n=s.clientY-e.clientY;var h=Math.sqrt(r*r+n*n);if(this.lastDistance_!==undefined){i=this.lastDistance_/h}this.lastDistance_=h;var a=t.map;var o=a.getView();var f=o.getResolution();var u=o.getMaxResolution();var l=o.getMinResolution();var v=f*i;if(v>u){i=u/f;v=u}else if(v<l){i=l/f;v=l}if(i!=1){this.lastScaleDelta_=i}var c=a.getViewport().getBoundingClientRect();var d=Zo.centroid(this.targetPointers);d[0]-=c.left;d[1]-=c.top;this.anchor_=a.getCoordinateFromPixel(d);a.render();Yo.zoomWithoutConstraints(o,v,this.anchor_)};ff.handleUpEvent_=function(t){if(this.targetPointers.length<2){var i=t.map;var s=i.getView();s.setHint(yo.INTERACTING,-1);var e=s.getResolution();if(this.constrainResolution_||e<s.getMinResolution()||e>s.getMaxResolution()){var r=this.lastScaleDelta_-1;Yo.zoom(s,e,this.anchor_,this.duration_,r)}return false}else{return true}};ff.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var i=t.map;this.anchor_=null;this.lastDistance_=undefined;this.lastScaleDelta_=1;if(!this.handlingDownUpSequence){i.getView().setHint(yo.INTERACTING,1)}return true}else{return false}};ff.prototype.shouldStopEvent=wa.FALSE;var uf={};uf.defaults=function(t){var i=t?t:{};var s=new Qa;var e=new Ho(-.005,.05,100);var r=i.altShiftDragRotate!==undefined?i.altShiftDragRotate:true;if(r){s.push(new Qo)}var n=i.doubleClickZoom!==undefined?i.doubleClickZoom:true;if(n){s.push(new Jo({delta:i.zoomDelta,duration:i.zoomDuration}))}var h=i.dragPan!==undefined?i.dragPan:true;if(h){s.push(new $o({kinetic:e}))}var a=i.pinchRotate!==undefined?i.pinchRotate:true;if(a){s.push(new of)}var o=i.pinchZoom!==undefined?i.pinchZoom:true;if(o){s.push(new ff({constrainResolution:i.constrainResolution,duration:i.zoomDuration}))}var f=i.keyboard!==undefined?i.keyboard:true;if(f){s.push(new nf);s.push(new hf({delta:i.zoomDelta,duration:i.zoomDuration}))}var u=i.mouseWheelZoom!==undefined?i.mouseWheelZoom:true;if(u){s.push(new af({constrainResolution:i.constrainResolution,duration:i.zoomDuration}))}var l=i.shiftDragZoom!==undefined?i.shiftDragZoom:true;if(l){s.push(new ef({duration:i.zoomDuration}))}return s};var lf=function(t,i,s,e){aa.call(this);this.extent=t;this.pixelRatio_=s;this.resolution=i;this.state=e};ta.inherits(lf,aa);lf.prototype.changed=function(){this.dispatchEvent(oa.CHANGE)};lf.prototype.getExtent=function(){return this.extent};lf.prototype.getImage=function(){};lf.prototype.getPixelRatio=function(){return this.pixelRatio_};lf.prototype.getResolution=function(){return this.resolution};lf.prototype.getState=function(){return this.state};lf.prototype.load=function(){};var vf={IDLE:0,LOADING:1,LOADED:2,ERROR:3};var cf=function(t,i,s,e,r){this.loader_=r!==undefined?r:null;var n=r!==undefined?vf.IDLE:vf.LOADED;lf.call(this,t,i,s,n);this.canvas_=e;this.error_=null};ta.inherits(cf,lf);cf.prototype.getError=function(){return this.error_};cf.prototype.handleLoad_=function(t){if(t){this.error_=t;this.state=vf.ERROR}else{this.state=vf.LOADED}this.changed()};cf.prototype.load=function(){if(this.state==vf.IDLE){this.state=vf.LOADING;this.changed();this.loader_(this.handleLoad_.bind(this))}};cf.prototype.getImage=function(){return this.canvas_};var df={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"};var mf={IMAGE:"image",VECTOR:"vector"};var pf=function(t,i,s,e,r){ha.call(this,t);this.vectorContext=i;this.frameState=s;this.context=e;this.glContext=r};ta.inherits(pf,ha);var _f=function(t){aa.call(this);this.highWaterMark=t!==undefined?t:2048;this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null};ta.inherits(_f,aa);_f.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark};_f.prototype.clear=function(){this.count_=0;this.entries_={};this.oldest_=null;this.newest_=null;this.dispatchEvent(oa.CLEAR)};_f.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)};_f.prototype.forEach=function(t,i){var s=this.oldest_;while(s){t.call(i,s.value_,s.key_,this);s=s.newer}};_f.prototype.get=function(t){var i=this.entries_[t];va.assert(i!==undefined,15);if(i===this.newest_){return i.value_}else if(i===this.oldest_){this.oldest_=this.oldest_.newer;this.oldest_.older=null}else{i.newer.older=i.older;i.older.newer=i.newer}i.newer=null;i.older=this.newest_;this.newest_.newer=i;this.newest_=i;return i.value_};_f.prototype.remove=function(t){var i=this.entries_[t];va.assert(i!==undefined,15);if(i===this.newest_){this.newest_=i.older;if(this.newest_){this.newest_.newer=null}}else if(i===this.oldest_){this.oldest_=i.newer;if(this.oldest_){this.oldest_.older=null}}else{i.newer.older=i.older;i.older.newer=i.newer}delete this.entries_[t];--this.count_;return i.value_};_f.prototype.getCount=function(){return this.count_};_f.prototype.getKeys=function(){var t=new Array(this.count_);var i=0;var s;for(s=this.newest_;s;s=s.older){t[i++]=s.key_}return t};_f.prototype.getValues=function(){var t=new Array(this.count_);var i=0;var s;for(s=this.newest_;s;s=s.older){t[i++]=s.value_}return t};_f.prototype.peekLast=function(){return this.oldest_.value_};_f.prototype.peekLastKey=function(){return this.oldest_.key_};_f.prototype.peekFirstKey=function(){return this.newest_.key_};_f.prototype.pop=function(){var t=this.oldest_;delete this.entries_[t.key_];if(t.newer){t.newer.older=null}this.oldest_=t.newer;if(!this.oldest_){this.newest_=null}--this.count_;return t.value_};_f.prototype.replace=function(t,i){this.get(t);this.entries_[t].value_=i};_f.prototype.set=function(t,i){va.assert(!(t in this.entries_),16);var s={key_:t,newer:null,older:this.newest_,value_:i};if(!this.newest_){this.oldest_=s}else{this.newest_.newer=s}this.newest_=s;this.entries_[t]=s;++this.count_};_f.prototype.prune=function(){while(this.canExpireCache()){this.pop()}};var gf={};gf.defaultFont="10px sans-serif";gf.defaultFillStyle=[0,0,0,1];gf.defaultLineCap="round";gf.defaultLineDash=[];gf.defaultLineDashOffset=0;gf.defaultLineJoin="round";gf.defaultMiterLimit=10;gf.defaultStrokeStyle=[0,0,0,1];gf.defaultTextAlign="center";gf.defaultTextBaseline="middle";gf.defaultPadding=[0,0,0,0];gf.defaultLineWidth=1;gf.labelCache=new _f;gf.checkedFonts_={};gf.measureContext_=null;gf.textHeights_={};gf.checkFont=function(){var t=60;var i=gf.checkedFonts_;var s=gf.labelCache;var e="32px monospace";var r="wmytzilWMYTZIL@#/&?$%10";var n,h;function a(t){var i=gf.getMeasureContext();i.font=e;h=i.measureText(r).width;var s=true;if(t!="monospace"){i.font="32px "+t+",monospace";var n=i.measureText(r).width;s=n!=h}return s}function o(){var e=true;for(var r in i){if(i[r]<t){if(a(r)){i[r]=t;ea.clear(gf.textHeights_);gf.measureContext_=null;s.clear()}else{++i[r];e=false}}}if(e){window.clearInterval(n);n=undefined}}return function(s){var e=Do.getFontFamilies(s);if(!e){return}for(var r=0,h=e.length;r<h;++r){var f=e[r];if(!(f in i)){i[f]=t;if(!a(f)){i[f]=0;if(n===undefined){n=window.setInterval(o,32)}}}}}}();gf.getMeasureContext=function(){var t=gf.measureContext_;if(!t){t=gf.measureContext_=Po.createCanvasContext2D(1,1)}return t};gf.measureTextHeight=function(){var t;var i=gf.textHeights_;return function(s){var e=i[s];if(e==undefined){if(!t){t=document.createElement("span");t.textContent="M";t.style.margin=t.style.padding="0 !important";t.style.position="absolute !important";t.style.left="-99999px !important"}t.style.font=s;document.body.appendChild(t);e=i[s]=t.offsetHeight;document.body.removeChild(t)}return e}}();gf.measureTextWidth=function(t,i){var s=gf.getMeasureContext();if(t!=s.font){s.font=t}return s.measureText(i).width};gf.rotateAtOffset=function(t,i,s,e){if(i!==0){t.translate(s,e);t.rotate(i);t.translate(-s,-e)}};gf.resetTransform_=Ia.create();gf.drawImage=function(t,i,s,e,r,n,h,a,o,f,u){var l;if(s!=1){l=t.globalAlpha;t.globalAlpha=l*s}if(i){t.setTransform.apply(t,i)}t.drawImage(e,r,n,h,a,o,f,h*u,a*u);if(l){t.globalAlpha=l}if(i){t.setTransform.apply(t,gf.resetTransform_)}};var Mf={};Mf.HEX_COLOR_RE_=/^#(?:[0-9a-f]{3,4}){1,2}$/i;Mf.NAMED_COLOR_RE_=/^([a-z]*)$/i;Mf.asArray=function(t){if(Array.isArray(t)){return t}else{return Mf.fromString(t)}};Mf.asString=function(t){if(typeof t==="string"){return t}else{return Mf.toString(t)}};Mf.fromNamed=function(t){var i=document.createElement("div");i.style.color=t;document.body.appendChild(i);var s=getComputedStyle(i).color;document.body.removeChild(i);return s};Mf.fromString=function(){var t=1024;var i={};var s=0;return function(e){var r;if(i.hasOwnProperty(e)){r=i[e]}else{if(s>=t){var n=0;var h;for(h in i){if((n++&3)===0){delete i[h];--s}}}r=Mf.fromStringInternal_(e);i[e]=r;++s}return r}}();Mf.fromStringInternal_=function(t){var i,s,e,r,n,h;if(Mf.NAMED_COLOR_RE_.exec(t)){t=Mf.fromNamed(t)}if(Mf.HEX_COLOR_RE_.exec(t)){var a=t.length-1;var o;if(a<=4){o=1}else{o=2}var f=a===4||a===8;i=parseInt(t.substr(1+0*o,o),16);s=parseInt(t.substr(1+1*o,o),16);e=parseInt(t.substr(1+2*o,o),16);if(f){r=parseInt(t.substr(1+3*o,o),16)}else{r=255}if(o==1){i=(i<<4)+i;s=(s<<4)+s;e=(e<<4)+e;if(f){r=(r<<4)+r}}n=[i,s,e,r/255]}else if(t.indexOf("rgba(")==0){h=t.slice(5,-1).split(",").map(Number);n=Mf.normalize(h)}else if(t.indexOf("rgb(")==0){h=t.slice(4,-1).split(",").map(Number);h.push(1);n=Mf.normalize(h)}else{va.assert(false,14)}return n};Mf.normalize=function(t,i){var s=i||[];s[0]=ca.clamp(t[0]+.5|0,0,255);s[1]=ca.clamp(t[1]+.5|0,0,255);s[2]=ca.clamp(t[2]+.5|0,0,255);s[3]=ca.clamp(t[3],0,1);return s};Mf.toString=function(t){var i=t[0];if(i!=(i|0)){i=i+.5|0}var s=t[1];if(s!=(s|0)){s=s+.5|0}var e=t[2];if(e!=(e|0)){e=e+.5|0}var r=t[3]===undefined?1:t[3];return"rgba("+i+","+s+","+e+","+r+")"};var zf={};zf.asColorLike=function(t){if(zf.isColorLike(t)){return t}else{return Mf.asString(t)}};zf.isColorLike=function(t){return typeof t==="string"||t instanceof CanvasPattern||t instanceof CanvasGradient};var wf=function(){};wf.prototype.drawCustom=function(t,i,s){};wf.prototype.drawGeometry=function(t){};wf.prototype.setStyle=function(t){};wf.prototype.drawCircle=function(t,i){};wf.prototype.drawFeature=function(t,i){};wf.prototype.drawGeometryCollection=function(t,i){};wf.prototype.drawLineString=function(t,i){};wf.prototype.drawMultiLineString=function(t,i){};wf.prototype.drawMultiPoint=function(t,i){};wf.prototype.drawMultiPolygon=function(t,i){};wf.prototype.drawPoint=function(t,i){};wf.prototype.drawPolygon=function(t,i){};wf.prototype.drawText=function(t,i){};wf.prototype.setFillStrokeStyle=function(t,i){};wf.prototype.setImageStyle=function(t,i){};wf.prototype.setTextStyle=function(t,i){};var yf=function(t,i,s,e,r){wf.call(this);this.context_=t;this.pixelRatio_=i;this.extent_=s;this.transform_=e;this.viewRotation_=r;this.contextFillState_=null;this.contextStrokeState_=null;this.contextTextState_=null;this.fillState_=null;this.strokeState_=null;this.image_=null;this.imageAnchorX_=0;this.imageAnchorY_=0;this.imageHeight_=0;this.imageOpacity_=0;this.imageOriginX_=0;this.imageOriginY_=0;this.imageRotateWithView_=false;this.imageRotation_=0;this.imageScale_=0;this.imageSnapToPixel_=false;this.imageWidth_=0;this.text_="";this.textOffsetX_=0;this.textOffsetY_=0;this.textRotateWithView_=false;this.textRotation_=0;this.textScale_=0;this.textFillState_=null;this.textStrokeState_=null;this.textState_=null;this.pixelCoordinates_=[];this.tmpLocalTransform_=Ia.create()};ta.inherits(yf,wf);yf.prototype.drawImages_=function(t,i,s,e){if(!this.image_){return}var r=ya.transform2D(t,i,s,2,this.transform_,this.pixelCoordinates_);var n=this.context_;var h=this.tmpLocalTransform_;var a=n.globalAlpha;if(this.imageOpacity_!=1){n.globalAlpha=a*this.imageOpacity_}var o=this.imageRotation_;if(this.imageRotateWithView_){o+=this.viewRotation_}var f,u;for(f=0,u=r.length;f<u;f+=2){var l=r[f]-this.imageAnchorX_;var v=r[f+1]-this.imageAnchorY_;if(this.imageSnapToPixel_){l=Math.round(l);v=Math.round(v)}if(o!==0||this.imageScale_!=1){var c=l+this.imageAnchorX_;var d=v+this.imageAnchorY_;Ia.compose(h,c,d,this.imageScale_,this.imageScale_,o,-c,-d);n.setTransform.apply(n,h)}n.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,l,v,this.imageWidth_,this.imageHeight_)}if(o!==0||this.imageScale_!=1){n.setTransform(1,0,0,1,0,0)}if(this.imageOpacity_!=1){n.globalAlpha=a}};yf.prototype.drawText_=function(t,i,s,e){if(!this.textState_||this.text_===""){return}if(this.textFillState_){this.setContextFillState_(this.textFillState_)}if(this.textStrokeState_){this.setContextStrokeState_(this.textStrokeState_)}this.setContextTextState_(this.textState_);var r=ya.transform2D(t,i,s,e,this.transform_,this.pixelCoordinates_);var n=this.context_;var h=this.textRotation_;if(this.textRotateWithView_){h+=this.viewRotation_}for(;i<s;i+=e){var a=r[i]+this.textOffsetX_;var o=r[i+1]+this.textOffsetY_;if(h!==0||this.textScale_!=1){var f=Ia.compose(this.tmpLocalTransform_,a,o,this.textScale_,this.textScale_,h,-a,-o);n.setTransform.apply(n,f)}if(this.textStrokeState_){n.strokeText(this.text_,a,o)}if(this.textFillState_){n.fillText(this.text_,a,o)}}if(h!==0||this.textScale_!=1){n.setTransform(1,0,0,1,0,0)}};yf.prototype.moveToLineTo_=function(t,i,s,e,r){var n=this.context_;var h=ya.transform2D(t,i,s,e,this.transform_,this.pixelCoordinates_);n.moveTo(h[0],h[1]);var a=h.length;if(r){a-=2}for(var o=2;o<a;o+=2){n.lineTo(h[o],h[o+1])}if(r){n.closePath()}return s};yf.prototype.drawRings_=function(t,i,s,e){var r,n;for(r=0,n=s.length;r<n;++r){i=this.moveToLineTo_(t,i,s[r],e,true)}return i};yf.prototype.drawCircle=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.fillState_||this.strokeState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=Aa.transform2D(t,this.transform_,this.pixelCoordinates_);var s=i[2]-i[0];var e=i[3]-i[1];var r=Math.sqrt(s*s+e*e);var n=this.context_;n.beginPath();n.arc(i[0],i[1],r,0,2*Math.PI);if(this.fillState_){n.fill()}if(this.strokeState_){n.stroke()}}if(this.text_!==""){this.drawText_(t.getCenter(),0,2,2)}};yf.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke());this.setImageStyle(t.getImage());this.setTextStyle(t.getText())};yf.prototype.drawGeometry=function(t){var i=t.getType();switch(i){case da.POINT:this.drawPoint(t);break;case da.LINE_STRING:this.drawLineString(t);break;case da.POLYGON:this.drawPolygon(t);break;case da.MULTI_POINT:this.drawMultiPoint(t);break;case da.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case da.MULTI_POLYGON:this.drawMultiPolygon(t);break;case da.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case da.CIRCLE:this.drawCircle(t);break}};yf.prototype.drawFeature=function(t,i){var s=i.getGeometryFunction()(t);if(!s||!Ma.intersects(this.extent_,s.getExtent())){return}this.setStyle(i);this.drawGeometry(s)};yf.prototype.drawGeometryCollection=function(t){var i=t.getGeometriesArray();var s,e;for(s=0,e=i.length;s<e;++s){this.drawGeometry(i[s])}};yf.prototype.drawPoint=function(t){var i=t.getFlatCoordinates();var s=t.getStride();if(this.image_){this.drawImages_(i,0,i.length,s)}if(this.text_!==""){this.drawText_(i,0,i.length,s)}};yf.prototype.drawMultiPoint=function(t){var i=t.getFlatCoordinates();var s=t.getStride();if(this.image_){this.drawImages_(i,0,i.length,s)}if(this.text_!==""){this.drawText_(i,0,i.length,s)}};yf.prototype.drawLineString=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_;var s=t.getFlatCoordinates();i.beginPath();this.moveToLineTo_(s,0,s.length,t.getStride(),false);i.stroke()}if(this.text_!==""){var e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}};yf.prototype.drawMultiLineString=function(t){var i=t.getExtent();if(!Ma.intersects(this.extent_,i)){return}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var s=this.context_;var e=t.getFlatCoordinates();var r=0;var n=t.getEnds();var h=t.getStride();s.beginPath();var a,o;for(a=0,o=n.length;a<o;++a){r=this.moveToLineTo_(e,r,n[a],h,false)}s.stroke()}if(this.text_!==""){var f=t.getFlatMidpoints();this.drawText_(f,0,f.length,2)}};yf.prototype.drawPolygon=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_||this.fillState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=this.context_;i.beginPath();this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride());if(this.fillState_){i.fill()}if(this.strokeState_){i.stroke()}}if(this.text_!==""){var s=t.getFlatInteriorPoint();this.drawText_(s,0,2,2)}};yf.prototype.drawMultiPolygon=function(t){if(!Ma.intersects(this.extent_,t.getExtent())){return}if(this.strokeState_||this.fillState_){if(this.fillState_){this.setContextFillState_(this.fillState_)}if(this.strokeState_){this.setContextStrokeState_(this.strokeState_)}var i=this.context_;var s=t.getOrientedFlatCoordinates();var e=0;var r=t.getEndss();var n=t.getStride();var h,a;i.beginPath();for(h=0,a=r.length;h<a;++h){var o=r[h];e=this.drawRings_(s,e,o,n)}if(this.fillState_){i.fill()}if(this.strokeState_){i.stroke()}}if(this.text_!==""){var f=t.getFlatInteriorPoints();this.drawText_(f,0,f.length,2)}};yf.prototype.setContextFillState_=function(t){var i=this.context_;var s=this.contextFillState_;if(!s){i.fillStyle=t.fillStyle;this.contextFillState_={fillStyle:t.fillStyle}}else{if(s.fillStyle!=t.fillStyle){s.fillStyle=i.fillStyle=t.fillStyle}}};yf.prototype.setContextStrokeState_=function(t){var i=this.context_;var s=this.contextStrokeState_;if(!s){i.lineCap=t.lineCap;if(Ja.CANVAS_LINE_DASH){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.lineJoin=t.lineJoin;i.lineWidth=t.lineWidth;i.miterLimit=t.miterLimit;i.strokeStyle=t.strokeStyle;this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle}}else{if(s.lineCap!=t.lineCap){s.lineCap=i.lineCap=t.lineCap}if(Ja.CANVAS_LINE_DASH){if(!pa.equals(s.lineDash,t.lineDash)){i.setLineDash(s.lineDash=t.lineDash)}if(s.lineDashOffset!=t.lineDashOffset){s.lineDashOffset=i.lineDashOffset=t.lineDashOffset}}if(s.lineJoin!=t.lineJoin){s.lineJoin=i.lineJoin=t.lineJoin}if(s.lineWidth!=t.lineWidth){s.lineWidth=i.lineWidth=t.lineWidth}if(s.miterLimit!=t.miterLimit){s.miterLimit=i.miterLimit=t.miterLimit}if(s.strokeStyle!=t.strokeStyle){s.strokeStyle=i.strokeStyle=t.strokeStyle}}};yf.prototype.setContextTextState_=function(t){var i=this.context_;var s=this.contextTextState_;var e=t.textAlign?t.textAlign:gf.defaultTextAlign;if(!s){i.font=t.font;i.textAlign=e;i.textBaseline=t.textBaseline;this.contextTextState_={font:t.font,textAlign:e,textBaseline:t.textBaseline}}else{if(s.font!=t.font){s.font=i.font=t.font}if(s.textAlign!=e){s.textAlign=e}if(s.textBaseline!=t.textBaseline){s.textBaseline=i.textBaseline=t.textBaseline}}};yf.prototype.setFillStrokeStyle=function(t,i){if(!t){this.fillState_=null}else{var s=t.getColor();this.fillState_={fillStyle:zf.asColorLike(s?s:gf.defaultFillStyle)}}if(!i){this.strokeState_=null}else{var e=i.getColor();var r=i.getLineCap();var n=i.getLineDash();var h=i.getLineDashOffset();var a=i.getLineJoin();var o=i.getWidth();var f=i.getMiterLimit();this.strokeState_={lineCap:r!==undefined?r:gf.defaultLineCap,lineDash:n?n:gf.defaultLineDash,lineDashOffset:h?h:gf.defaultLineDashOffset,lineJoin:a!==undefined?a:gf.defaultLineJoin,lineWidth:this.pixelRatio_*(o!==undefined?o:gf.defaultLineWidth),miterLimit:f!==undefined?f:gf.defaultMiterLimit,strokeStyle:zf.asColorLike(e?e:gf.defaultStrokeStyle)}}};yf.prototype.setImageStyle=function(t){if(!t){this.image_=null}else{var i=t.getAnchor();var s=t.getImage(1);var e=t.getOrigin();var r=t.getSize();this.imageAnchorX_=i[0];this.imageAnchorY_=i[1];this.imageHeight_=r[1];this.image_=s;this.imageOpacity_=t.getOpacity();this.imageOriginX_=e[0];this.imageOriginY_=e[1];this.imageRotateWithView_=t.getRotateWithView();this.imageRotation_=t.getRotation();this.imageScale_=t.getScale()*this.pixelRatio_;this.imageSnapToPixel_=t.getSnapToPixel();this.imageWidth_=r[0]}};yf.prototype.setTextStyle=function(t){if(!t){this.text_=""}else{var i=t.getFill();if(!i){this.textFillState_=null}else{var s=i.getColor();this.textFillState_={fillStyle:zf.asColorLike(s?s:gf.defaultFillStyle)}}var e=t.getStroke();if(!e){this.textStrokeState_=null}else{var r=e.getColor();var n=e.getLineCap();var h=e.getLineDash();var a=e.getLineDashOffset();var o=e.getLineJoin();var f=e.getWidth();var u=e.getMiterLimit();this.textStrokeState_={lineCap:n!==undefined?n:gf.defaultLineCap,lineDash:h?h:gf.defaultLineDash,lineDashOffset:a?a:gf.defaultLineDashOffset,lineJoin:o!==undefined?o:gf.defaultLineJoin,lineWidth:f!==undefined?f:gf.defaultLineWidth,miterLimit:u!==undefined?u:gf.defaultMiterLimit,strokeStyle:zf.asColorLike(r?r:gf.defaultStrokeStyle)}}var l=t.getFont();var v=t.getOffsetX();var c=t.getOffsetY();var d=t.getRotateWithView();var m=t.getRotation();var p=t.getScale();var _=t.getText();var g=t.getTextAlign();var M=t.getTextBaseline();this.textState_={font:l!==undefined?l:gf.defaultFont,textAlign:g!==undefined?g:gf.defaultTextAlign,textBaseline:M!==undefined?M:gf.defaultTextBaseline};this.text_=_!==undefined?_:"";this.textOffsetX_=v!==undefined?this.pixelRatio_*v:0;this.textOffsetY_=c!==undefined?this.pixelRatio_*c:0;this.textRotateWithView_=d!==undefined?d:false;this.textRotation_=m!==undefined?m:0;this.textScale_=this.pixelRatio_*(p!==undefined?p:1)}};var bf=function(t){fa.call(this);this.layer_=t};ta.inherits(bf,fa);bf.prototype.forEachFeatureAtCoordinate=ta.nullFunction;bf.prototype.hasFeatureAtCoordinate=wa.FALSE;bf.prototype.createLoadedTileFinder=function(t,i,s){return function(e,r){function n(t){if(!s[e]){s[e]={}}s[e][t.tileCoord.toString()]=t}return t.forEachLoadedTile(i,e,r,n)}};bf.prototype.getLayer=function(){return this.layer_};bf.prototype.handleImageChange_=function(t){var i=t.target;if(i.getState()===vf.LOADED){this.renderIfReadyAndVisible()}};bf.prototype.loadImage=function(t){var i=t.getState();if(i!=vf.LOADED&&i!=vf.ERROR){ra.listen(t,oa.CHANGE,this.handleImageChange_,this)}if(i==vf.IDLE){t.load();i=t.getState()}return i==vf.LOADED};bf.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();if(t.getVisible()&&t.getSourceState()==Io.READY){this.changed()}};bf.prototype.scheduleExpireCache=function(t,i){if(i.canExpireCache()){var s=function(t,i,s){var e=ta.getUid(t).toString();if(e in s.usedTiles){t.expireCache(s.viewState.projection,s.usedTiles[e])}}.bind(null,i);t.postRenderFunctions.push(s)}};bf.prototype.updateLogos=function(t,i){var s=i.getLogo();if(s!==undefined){if(typeof s==="string"){t.logos[s]=""}else if(s){va.assert(typeof s.href=="string",44);va.assert(typeof s.src=="string",45);t.logos[s.src]=s.href}}};bf.prototype.updateUsedTiles=function(t,i,s,e){var r=ta.getUid(i).toString();var n=s.toString();if(r in t){if(n in t[r]){t[r][n].extend(e)}else{t[r][n]=e}}else{t[r]={};t[r][n]=e}};bf.prototype.manageTilePyramid=function(t,i,s,e,r,n,h,a,o,f){var u=ta.getUid(i).toString();if(!(u in t.wantedTiles)){t.wantedTiles[u]={}}var l=t.wantedTiles[u];var v=t.tileQueue;var c=s.getMinZoom();var d,m,p,_,g,M;for(M=c;M<=h;++M){m=s.getTileRangeForExtentAndZ(n,M,m);p=s.getResolution(M);for(_=m.minX;_<=m.maxX;++_){for(g=m.minY;g<=m.maxY;++g){if(h-M<=a){d=i.getTile(M,_,g,e,r);if(d.getState()==po.IDLE){l[d.getKey()]=true;if(!v.isKeyQueued(d.getKey())){v.enqueue([d,u,s.getTileCoordCenter(d.tileCoord),p])}}if(o!==undefined){o.call(f,d)}}else{i.useTile(M,_,g,r)}}}}};var xf=function(t){bf.call(this,t);this.transform_=Ia.create()};ta.inherits(xf,bf);xf.prototype.clip=function(t,i,s){var e=i.pixelRatio;var r=i.size[0]*e;var n=i.size[1]*e;var h=i.viewState.rotation;var a=Ma.getTopLeft(s);var o=Ma.getTopRight(s);var f=Ma.getBottomRight(s);var u=Ma.getBottomLeft(s);Ia.apply(i.coordinateToPixelTransform,a);Ia.apply(i.coordinateToPixelTransform,o);Ia.apply(i.coordinateToPixelTransform,f);Ia.apply(i.coordinateToPixelTransform,u);t.save();gf.rotateAtOffset(t,-h,r/2,n/2);t.beginPath();t.moveTo(a[0]*e,a[1]*e);t.lineTo(o[0]*e,o[1]*e);t.lineTo(f[0]*e,f[1]*e);t.lineTo(u[0]*e,u[1]*e);t.clip();gf.rotateAtOffset(t,h,r/2,n/2)};xf.prototype.dispatchComposeEvent_=function(t,i,s,e){var r=this.getLayer();if(r.hasListener(t)){var n=s.size[0]*s.pixelRatio;var h=s.size[1]*s.pixelRatio;var a=s.viewState.rotation;gf.rotateAtOffset(i,-a,n/2,h/2);var o=e!==undefined?e:this.getTransform(s,0);var f=new yf(i,s.pixelRatio,s.extent,o,s.viewState.rotation);var u=new pf(t,f,s,i,null);r.dispatchEvent(u);gf.rotateAtOffset(i,a,n/2,h/2)}};xf.prototype.forEachLayerAtCoordinate=function(t,i,s,e){var r=this.forEachFeatureAtCoordinate(t,i,0,wa.TRUE,this);if(r){return s.call(e,this.getLayer(),null)}else{return undefined}};xf.prototype.postCompose=function(t,i,s,e){this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t,i,e)};xf.prototype.preCompose=function(t,i,s){this.dispatchComposeEvent_(Wo.PRECOMPOSE,t,i,s)};xf.prototype.dispatchRenderEvent=function(t,i,s){this.dispatchComposeEvent_(Wo.RENDER,t,i,s)};xf.prototype.getTransform=function(t,i){var s=t.viewState;var e=t.pixelRatio;var r=e*t.size[0]/2;var n=e*t.size[1]/2;var h=e/s.resolution;var a=-h;var o=-s.rotation;var f=-s.center[0]+i;var u=-s.center[1];return Ia.compose(this.transform_,r,n,h,a,o,f,u)};xf.prototype.composeFrame=function(t,i,s){};xf.prototype.prepareFrame=function(t,i){};var Ef=function(t){xf.call(this,t);this.coordinateToCanvasPixelTransform=Ia.create();this.hitCanvasContext_=null};ta.inherits(Ef,xf);Ef.prototype.composeFrame=function(t,i,s){this.preCompose(s,t);var e=this.getImage();if(e){var r=i.extent;var n=r!==undefined&&!Ma.containsExtent(r,t.extent)&&Ma.intersects(r,t.extent);if(n){this.clip(s,t,r)}var h=this.getImageTransform();var a=s.globalAlpha;s.globalAlpha=i.opacity;var o=h[4];var f=h[5];var u=e.width*h[0];var l=e.height*h[3];s.drawImage(e,0,0,+e.width,+e.height,Math.round(o),Math.round(f),Math.round(u),Math.round(l));s.globalAlpha=a;if(n){s.restore()}}this.postCompose(s,t,i)};Ef.prototype.getImage=function(){};Ef.prototype.getImageTransform=function(){};Ef.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=this.getLayer();var h=n.getSource();var a=i.viewState.resolution;var o=i.viewState.rotation;var f=i.skippedFeatureUids;return h.forEachFeatureAtCoordinate(t,a,o,s,f,(function(t){return e.call(r,t,n)}))};Ef.prototype.forEachLayerAtCoordinate=function(t,i,s,e){if(!this.getImage()){return undefined}if(this.getLayer().getSource().forEachFeatureAtCoordinate!==ta.nullFunction){return xf.prototype.forEachLayerAtCoordinate.apply(this,arguments)}else{var r=Ia.apply(this.coordinateToCanvasPixelTransform,t.slice());Eo.scale(r,i.viewState.resolution/this.renderedResolution);if(!this.hitCanvasContext_){this.hitCanvasContext_=Po.createCanvasContext2D(1,1)}this.hitCanvasContext_.clearRect(0,0,1,1);this.hitCanvasContext_.drawImage(this.getImage(),r[0],r[1],1,1,0,0,1,1);var n=this.hitCanvasContext_.getImageData(0,0,1,1).data;if(n[3]>0){return s.call(e,this.getLayer(),n)}else{return undefined}}};var Sf=function(t){Ef.call(this,t);this.image_=null;this.imageTransform_=Ia.create();this.skippedFeatures_=[];this.vectorRenderer_=null};ta.inherits(Sf,Ef);Sf["handles"]=function(t,i){return t===To.CANVAS&&(i.getType()===df.IMAGE||i.getType()===df.VECTOR&&i.getRenderMode()===mf.IMAGE)};Sf["create"]=function(t,i){var s=new Sf(i);if(i.getType()===df.VECTOR){var e=Ro.getLayerRendererPlugins();for(var r=0,n=e.length;r<n;++r){var h=e[r];if(h!==Sf&&h["handles"](To.CANVAS,i)){s.setVectorRenderer(h["create"](t,i))}}}return s};Sf.prototype.getImage=function(){return!this.image_?null:this.image_.getImage()};Sf.prototype.getImageTransform=function(){return this.imageTransform_};Sf.prototype.prepareFrame=function(t,i){var s=t.pixelRatio;var e=t.size;var r=t.viewState;var n=r.center;var h=r.resolution;var a;var o=this.getLayer();var f=o.getSource();var u=t.viewHints;var l=t.extent;if(i.extent!==undefined){l=Ma.getIntersection(l,i.extent)}if(!u[yo.ANIMATING]&&!u[yo.INTERACTING]&&!Ma.isEmpty(l)){var v=r.projection;if(!ta.ENABLE_RASTER_REPROJECTION){var c=f.getProjection();if(c){v=c}}var d=this.vectorRenderer_;if(d){var m=d.context;var p=ea.assign({},t,{size:[Ma.getWidth(l)/h,Ma.getHeight(l)/h],viewState:ea.assign({},t.viewState,{rotation:0})});var _=Object.keys(p.skippedFeatureUids).sort();if(d.prepareFrame(p,i)&&(d.replayGroupChanged||!pa.equals(_,this.skippedFeatures_))){m.canvas.width=p.size[0]*s;m.canvas.height=p.size[1]*s;d.composeFrame(p,i,m);this.image_=new cf(l,h,s,m.canvas);this.skippedFeatures_=_}}else{a=f.getImage(l,h,s,v);if(a){var g=this.loadImage(a);if(g){this.image_=a}}}}if(this.image_){a=this.image_;var M=a.getExtent();var z=a.getResolution();var w=a.getPixelRatio();var y=s*z/(h*w);var b=Ia.compose(this.imageTransform_,s*e[0]/2,s*e[1]/2,y,y,0,w*(M[0]-n[0])/z,w*(n[1]-M[3])/z);Ia.compose(this.coordinateToCanvasPixelTransform,s*e[0]/2-b[4],s*e[1]/2-b[5],s/h,-s/h,0,-n[0],-n[1]);this.updateLogos(t,f);this.renderedResolution=z*s/w}return!!this.image_};Sf.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(this.vectorRenderer_){return this.vectorRenderer_.forEachFeatureAtCoordinate(t,i,s,e,r)}else{return Ef.prototype.forEachFeatureAtCoordinate.call(this,t,i,s,e,r)}};Sf.prototype.setVectorRenderer=function(t){this.vectorRenderer_=t};var Gf=function(){this.cache_={};this.cacheSize_=0;this.maxCacheSize_=32};Gf.getKey=function(t,i,s){var e=s?Mf.asString(s):"null";return i+":"+t+":"+e};Gf.prototype.clear=function(){this.cache_={};this.cacheSize_=0};Gf.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t=0;var i,s;for(i in this.cache_){s=this.cache_[i];if((t++&3)===0&&!s.hasListener()){delete this.cache_[i];--this.cacheSize_}}}};Gf.prototype.get=function(t,i,s){var e=Gf.getKey(t,i,s);return e in this.cache_?this.cache_[e]:null};Gf.prototype.set=function(t,i,s,e){var r=Gf.getKey(t,i,s);this.cache_[r]=e;++this.cacheSize_};Gf.prototype.setSize=function(t){this.maxCacheSize_=t;this.expire()};var Pf={};Pf.iconImageCache=new Gf;var kf=function(t,i){na.call(this);this.map_=i;this.layerRenderers_={};this.layerRendererListeners_={}};ta.inherits(kf,na);kf.prototype.calculateMatrices2D=function(t){var i=t.viewState;var s=t.coordinateToPixelTransform;var e=t.pixelToCoordinateTransform;Ia.compose(s,t.size[0]/2,t.size[1]/2,1/i.resolution,-1/i.resolution,-i.rotation,-i.center[0],-i.center[1]);Ia.invert(Ia.setFromArray(e,s))};kf.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_){this.removeLayerRendererByKey_(t).dispose()}};kf.expireIconCache_=function(t,i){var s=Pf.iconImageCache;s.expire()};kf.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){var a;var o=i.viewState;var f=o.resolution;function u(t,s){var n=ta.getUid(t).toString();var h=i.layerStates[ta.getUid(s)].managed;if(!(n in i.skippedFeatureUids&&!h)){return e.call(r,t,h?s:null)}}var l=o.projection;var v=t;if(l.canWrapX()){var c=l.getExtent();var d=Ma.getWidth(c);var m=t[0];if(m<c[0]||m>c[2]){var p=Math.ceil((c[0]-m)/d);v=[m+d*p,t[1]]}}var _=i.layerStatesArray;var g=_.length;var M;for(M=g-1;M>=0;--M){var z=_[M];var w=z.layer;if(jo.visibleAtResolution(z,f)&&n.call(h,w)){var y=this.getLayerRenderer(w);if(w.getSource()){a=y.forEachFeatureAtCoordinate(w.getSource().getWrapX()?v:t,i,s,u,r)}if(a){return a}}}return undefined};kf.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){};kf.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r){var n=this.forEachFeatureAtCoordinate(t,i,s,wa.TRUE,this,e,r);return n!==undefined};kf.prototype.getLayerRenderer=function(t){var i=ta.getUid(t).toString();if(i in this.layerRenderers_){return this.layerRenderers_[i]}else{var s=Ro.getLayerRendererPlugins();var e;var r=this.getType();for(var n=0,h=s.length;n<h;++n){var a=s[n];if(a["handles"](r,t)){e=a["create"](this,t);break}}if(e){this.layerRenderers_[i]=e;this.layerRendererListeners_[i]=ra.listen(e,oa.CHANGE,this.handleLayerRendererChange_,this)}else{throw new Error("Unable to create renderer for layer: "+t.getType())}return e}};kf.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]};kf.prototype.getLayerRenderers=function(){return this.layerRenderers_};kf.prototype.getMap=function(){return this.map_};kf.prototype.getType=function(){};kf.prototype.handleLayerRendererChange_=function(){this.map_.render()};kf.prototype.removeLayerRendererByKey_=function(t){var i=this.layerRenderers_[t];delete this.layerRenderers_[t];ra.unlistenByKey(this.layerRendererListeners_[t]);delete this.layerRendererListeners_[t];return i};kf.prototype.renderFrame=ta.nullFunction;kf.prototype.removeUnusedLayerRenderers_=function(t,i){var s;for(s in this.layerRenderers_){if(!i||!(s in i.layerStates)){this.removeLayerRendererByKey_(s).dispose()}}};kf.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(kf.expireIconCache_)};kf.prototype.scheduleRemoveUnusedLayerRenderers=function(t){var i;for(i in this.layerRenderers_){if(!(i in t.layerStates)){t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this));return}}};kf.sortByZIndex=function(t,i){return t.zIndex-i.zIndex};var Nf=function(t,i){kf.call(this,t,i);this.context_=Po.createCanvasContext2D();this.canvas_=this.context_.canvas;this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=Do.CLASS_UNSELECTABLE;t.insertBefore(this.canvas_,t.childNodes[0]||null);this.renderedVisible_=true;this.transform_=Ia.create()};ta.inherits(Nf,kf);Nf["handles"]=function(t){return t===To.CANVAS};Nf["create"]=function(t,i){return new Nf(t,i)};Nf.prototype.dispatchComposeEvent_=function(t,i){var s=this.getMap();var e=this.context_;if(s.hasListener(t)){var r=i.extent;var n=i.pixelRatio;var h=i.viewState;var a=h.rotation;var o=this.getTransform(i);var f=new yf(e,n,r,o,a);var u=new pf(t,f,i,e,null);s.dispatchEvent(u)}};Nf.prototype.getTransform=function(t){var i=t.viewState;var s=this.canvas_.width/2;var e=this.canvas_.height/2;var r=t.pixelRatio/i.resolution;var n=-r;var h=-i.rotation;var a=-i.center[0];var o=-i.center[1];return Ia.compose(this.transform_,s,e,r,n,h,a,o)};Nf.prototype.getType=function(){return To.CANVAS};Nf.prototype.renderFrame=function(t){if(!t){if(this.renderedVisible_){this.canvas_.style.display="none";this.renderedVisible_=false}return}var i=this.context_;var s=t.pixelRatio;var e=Math.round(t.size[0]*s);var r=Math.round(t.size[1]*s);if(this.canvas_.width!=e||this.canvas_.height!=r){this.canvas_.width=e;this.canvas_.height=r}else{i.clearRect(0,0,e,r)}var n=t.viewState.rotation;this.calculateMatrices2D(t);this.dispatchComposeEvent_(Wo.PRECOMPOSE,t);var h=t.layerStatesArray;pa.stableSort(h,kf.sortByZIndex);if(n){i.save();gf.rotateAtOffset(i,n,e/2,r/2)}var a=t.viewState.resolution;var o,f,u,l,v;for(o=0,f=h.length;o<f;++o){v=h[o];u=v.layer;l=this.getLayerRenderer(u);if(!jo.visibleAtResolution(v,a)||v.sourceState!=Io.READY){continue}if(l.prepareFrame(t,v)){l.composeFrame(t,v,i)}}if(n){i.restore()}this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t);if(!this.renderedVisible_){this.canvas_.style.display="";this.renderedVisible_=true}this.scheduleRemoveUnusedLayerRenderers(t);this.scheduleExpireIconCache(t)};Nf.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){var h;var a=i.viewState;var o=a.resolution;var f=i.layerStatesArray;var u=f.length;var l=Ia.apply(i.pixelToCoordinateTransform,t.slice());var v;for(v=u-1;v>=0;--v){var c=f[v];var d=c.layer;if(jo.visibleAtResolution(c,o)&&r.call(n,d)){var m=this.getLayerRenderer(d);h=m.forEachLayerAtCoordinate(l,i,s,e);if(h){return h}}}return undefined};var If=function(t,i,s,e){this.minX=t;this.maxX=i;this.minY=s;this.maxY=e};If.createOrUpdate=function(t,i,s,e,r){if(r!==undefined){r.minX=t;r.maxX=i;r.minY=s;r.maxY=e;return r}else{return new If(t,i,s,e)}};If.prototype.contains=function(t){return this.containsXY(t[1],t[2])};If.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY};If.prototype.containsXY=function(t,i){return this.minX<=t&&t<=this.maxX&&this.minY<=i&&i<=this.maxY};If.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY};If.prototype.extend=function(t){if(t.minX<this.minX){this.minX=t.minX}if(t.maxX>this.maxX){this.maxX=t.maxX}if(t.minY<this.minY){this.minY=t.minY}if(t.maxY>this.maxY){this.maxY=t.maxY}};If.prototype.getHeight=function(){return this.maxY-this.minY+1};If.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]};If.prototype.getWidth=function(){return this.maxX-this.minX+1};If.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var Cf=function(t){Ef.call(this,t);this.context=this.context===null?null:Po.createCanvasContext2D();this.renderedExtent_=null;this.renderedTiles=[];this.tmpExtent=Ma.createEmpty();this.tmpTileRange_=new If(0,0,0,0);this.imageTransform_=Ia.create();this.zDirection=0};ta.inherits(Cf,Ef);Cf["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.TILE};Cf["create"]=function(t,i){return new Cf(i)};Cf.prototype.isDrawableTile_=function(t){var i=t.getState();var s=this.getLayer().getUseInterimTilesOnError();return i==po.LOADED||i==po.EMPTY||i==po.ERROR&&!s};Cf.prototype.prepareFrame=function(t,i){var s=t.pixelRatio;var e=t.size;var r=t.viewState;var n=r.projection;var h=r.resolution;var a=r.center;var o=this.getLayer();var f=o.getSource();var u=f.getRevision();var l=f.getTileGridForProjection(n);var v=l.getZForResolution(h,this.zDirection);var c=l.getResolution(v);var d=Math.round(h/c)||1;var m=t.extent;if(i.extent!==undefined){m=Ma.getIntersection(m,i.extent)}if(Ma.isEmpty(m)){return false}var p=l.getTileRangeForExtentAndZ(m,v);var _=l.getTileRangeExtent(v,p);var g=f.getTilePixelRatio(s);var M={};M[v]={};var z=this.createLoadedTileFinder(f,n,M);var w=this.tmpExtent;var y=this.tmpTileRange_;var b=false;var x,E,S;for(E=p.minX;E<=p.maxX;++E){for(S=p.minY;S<=p.maxY;++S){x=f.getTile(v,E,S,s,n);if(x.getState()==po.ERROR){if(!o.getUseInterimTilesOnError()){x.setState(po.LOADED)}else if(o.getPreload()>0){b=true}}if(!this.isDrawableTile_(x)){x=x.getInterimTile()}if(this.isDrawableTile_(x)){var G=ta.getUid(this);if(x.getState()==po.LOADED){M[v][x.tileCoord.toString()]=x;var P=x.inTransition(G);if(!b&&(P||this.renderedTiles.indexOf(x)===-1)){b=true}}if(x.getAlpha(G,t.time)===1){continue}}var k=l.getTileCoordChildTileRange(x.tileCoord,y,w);var N=false;if(k){N=z(v+1,k)}if(!N){l.forEachTileCoordParentTileRange(x.tileCoord,z,null,y,w)}}}var I=c*s/g*d;var C=t.viewHints;var A=C[yo.ANIMATING]||C[yo.INTERACTING];if(!(this.renderedResolution&&Date.now()-t.time>16&&A)&&(b||!(this.renderedExtent_&&Ma.containsExtent(this.renderedExtent_,m))||this.renderedRevision!=u||d!=this.oversampling_||!A&&I!=this.renderedResolution)){var R=this.context;if(R){var T=f.getTilePixelSize(v,s,n);var O=Math.round(p.getWidth()*T[0]/d);var L=Math.round(p.getHeight()*T[1]/d);var F=R.canvas;if(F.width!=O||F.height!=L){this.oversampling_=d;F.width=O;F.height=L}else{if(this.renderedExtent_&&!Ma.equals(_,this.renderedExtent_)){R.clearRect(0,0,O,L)}d=this.oversampling_}}this.renderedTiles.length=0;var D=Object.keys(M).map(Number);D.sort((function(t,i){if(t===v){return 1}else if(i===v){return-1}else{return t>i?1:t<i?-1:0}}));var W,j,V,U,B,q;var H,X,Y,J,K;for(B=0,q=D.length;B<q;++B){U=D[B];V=f.getTilePixelSize(U,s,n);W=l.getResolution(U);j=W/c;X=g*f.getGutter(n);Y=M[U];for(var Z in Y){x=Y[Z];H=l.getTileCoordExtent(x.getTileCoord(),w);E=(H[0]-_[0])/c*g/d;S=(_[3]-H[3])/c*g/d;J=V[0]*j/d;K=V[1]*j/d;this.drawTileImage(x,t,i,E,S,J,K,X,v===U);this.renderedTiles.push(x)}}this.renderedRevision=u;this.renderedResolution=c*s/g*d;this.renderedExtent_=_}var $=this.renderedResolution/h;var Q=Ia.compose(this.imageTransform_,s*e[0]/2,s*e[1]/2,$,$,0,(this.renderedExtent_[0]-a[0])/this.renderedResolution*s,(a[1]-this.renderedExtent_[3])/this.renderedResolution*s);Ia.compose(this.coordinateToCanvasPixelTransform,s*e[0]/2-Q[4],s*e[1]/2-Q[5],s/h,-s/h,0,-a[0],-a[1]);this.updateUsedTiles(t.usedTiles,f,v,p);this.manageTilePyramid(t,f,l,s,n,m,v,o.getPreload());this.scheduleExpireCache(t,f);this.updateLogos(t,f);return this.renderedTiles.length>0};Cf.prototype.drawTileImage=function(t,i,s,e,r,n,h,a,o){var f=t.getImage(this.getLayer());if(!f){return}var u=ta.getUid(this);var l=o?t.getAlpha(u,i.time):1;if(l===1&&!this.getLayer().getSource().getOpaque(i.viewState.projection)){this.context.clearRect(e,r,n,h)}var v=l!==this.context.globalAlpha;if(v){this.context.save();this.context.globalAlpha=l}this.context.drawImage(f,a,a,f.width-2*a,f.height-2*a,e,r,n,h);if(v){this.context.restore()}if(l!==1){i.animate=true}else if(o){t.endTransition(u)}};Cf.prototype.getImage=function(){var t=this.context;return t?t.canvas:null};Cf.prototype.getImageTransform=function(){return this.imageTransform_};var Af={exports:{}};var Rf=Af.exports;var Tf;function Of(){if(Tf)return Af.exports;Tf=1;(function(t,i){(function(i,s){t.exports=s()})(Rf,(function(){function t(t,s,r,n,h){i(t,s,r||0,n||t.length-1,h||e)}function i(t,e,r,n,h){while(n>r){if(n-r>600){var a=n-r+1;var o=e-r+1;var f=Math.log(a);var u=.5*Math.exp(2*f/3);var l=.5*Math.sqrt(f*u*(a-u)/a)*(o-a/2<0?-1:1);var v=Math.max(r,Math.floor(e-o*u/a+l));var c=Math.min(n,Math.floor(e+(a-o)*u/a+l));i(t,e,v,c,h)}var d=t[e];var m=r;var p=n;s(t,r,e);if(h(t[n],d)>0)s(t,r,n);while(m<p){s(t,m,p);m++;p--;while(h(t[m],d)<0)m++;while(h(t[p],d)>0)p--}if(h(t[r],d)===0)s(t,r,p);else{p++;s(t,p,n)}if(p<=e)r=p+1;if(e<=p)n=p-1}}function s(t,i,s){var e=t[i];t[i]=t[s];t[s]=e}function e(t,i){return t<i?-1:t>i?1:0}return t}))})(Af);return Af.exports}var Lf;var Ff;function Df(){if(Ff)return Lf;Ff=1;Lf=i;var t=Of();function i(t,s){if(!(this instanceof i))return new i(t,s);this._maxEntries=Math.max(4,t||9);this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4));if(s){this._initFormat(s)}this.clear()}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var i=this.data,s=[],e=this.toBBox;if(!c(t,i))return s;var r=[],n,h,a,o;while(i){for(n=0,h=i.children.length;n<h;n++){a=i.children[n];o=i.leaf?e(a):a;if(c(t,o)){if(i.leaf)s.push(a);else if(v(t,o))this._all(a,s);else r.push(a)}}i=r.pop()}return s},collides:function(t){var i=this.data,s=this.toBBox;if(!c(t,i))return false;var e=[],r,n,h,a;while(i){for(r=0,n=i.children.length;r<n;r++){h=i.children[r];a=i.leaf?s(h):h;if(c(t,a)){if(i.leaf||v(t,a))return true;e.push(h)}}i=e.pop()}return false},load:function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var i=0,s=t.length;i<s;i++){this.insert(t[i])}return this}var e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length){this.data=e}else if(this.data.height===e.height){this._splitRoot(this.data,e)}else{if(this.data.height<e.height){var r=this.data;this.data=e;e=r}this._insert(e,this.data.height-e.height-1,true)}return this},insert:function(t){if(t)this._insert(t,this.data.height-1);return this},clear:function(){this.data=d([]);return this},remove:function(t,i){if(!t)return this;var e=this.data,r=this.toBBox(t),n=[],h=[],a,o,f,u;while(e||n.length){if(!e){e=n.pop();o=n[n.length-1];a=h.pop();u=true}if(e.leaf){f=s(t,e.children,i);if(f!==-1){e.children.splice(f,1);n.push(e);this._condense(n);return this}}if(!u&&!e.leaf&&v(e,r)){n.push(e);h.push(a);a=0;o=e;e=e.children[0]}else if(o){a++;e=o.children[a];u=false}else e=null}return this},toBBox:function(t){return t},compareMinX:h,compareMinY:a,toJSON:function(){return this.data},fromJSON:function(t){this.data=t;return this},_all:function(t,i){var s=[];while(t){if(t.leaf)i.push.apply(i,t.children);else s.push.apply(s,t.children);t=s.pop()}return i},_build:function(t,i,s,r){var n=s-i+1,h=this._maxEntries,a;if(n<=h){a=d(t.slice(i,s+1));e(a,this.toBBox);return a}if(!r){r=Math.ceil(Math.log(n)/Math.log(h));h=Math.ceil(n/Math.pow(h,r-1))}a=d([]);a.leaf=false;a.height=r;var o=Math.ceil(n/h),f=o*Math.ceil(Math.sqrt(h)),u,l,v,c;m(t,i,s,f,this.compareMinX);for(u=i;u<=s;u+=f){v=Math.min(u+f-1,s);m(t,u,v,o,this.compareMinY);for(l=u;l<=v;l+=o){c=Math.min(l+o-1,v);a.children.push(this._build(t,l,c,r-1))}}e(a,this.toBBox);return a},_chooseSubtree:function(t,i,s,e){var r,n,h,a,f,l,v,c;while(true){e.push(i);if(i.leaf||e.length-1===s)break;v=c=Infinity;for(r=0,n=i.children.length;r<n;r++){h=i.children[r];f=o(h);l=u(t,h)-f;if(l<c){c=l;v=f<v?f:v;a=h}else if(l===c){if(f<v){v=f;a=h}}}i=a||i.children[0]}return i},_insert:function(t,i,s){var e=this.toBBox,r=s?t:e(t),h=[];var a=this._chooseSubtree(r,this.data,i,h);a.children.push(t);n(a,r);while(i>=0){if(h[i].children.length>this._maxEntries){this._split(h,i);i--}else break}this._adjustParentBBoxes(r,h,i)},_split:function(t,i){var s=t[i],r=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,r);var h=this._chooseSplitIndex(s,n,r);var a=d(s.children.splice(h,s.children.length-h));a.height=s.height;a.leaf=s.leaf;e(s,this.toBBox);e(a,this.toBBox);if(i)t[i-1].children.push(a);else this._splitRoot(s,a)},_splitRoot:function(t,i){this.data=d([t,i]);this.data.height=t.height+1;this.data.leaf=false;e(this.data,this.toBBox)},_chooseSplitIndex:function(t,i,s){var e,n,h,a,f,u,v,c;u=v=Infinity;for(e=i;e<=s-i;e++){n=r(t,0,e,this.toBBox);h=r(t,e,s,this.toBBox);a=l(n,h);f=o(n)+o(h);if(a<u){u=a;c=e;v=f<v?f:v}else if(a===u){if(f<v){v=f;c=e}}}return c},_chooseSplitAxis:function(t,i,s){var e=t.leaf?this.compareMinX:h,r=t.leaf?this.compareMinY:a,n=this._allDistMargin(t,i,s,e),o=this._allDistMargin(t,i,s,r);if(n<o)t.children.sort(e)},_allDistMargin:function(t,i,s,e){t.children.sort(e);var h=this.toBBox,a=r(t,0,i,h),o=r(t,s-i,s,h),u=f(a)+f(o),l,v;for(l=i;l<s-i;l++){v=t.children[l];n(a,t.leaf?h(v):v);u+=f(a)}for(l=s-i-1;l>=i;l--){v=t.children[l];n(o,t.leaf?h(v):v);u+=f(o)}return u},_adjustParentBBoxes:function(t,i,s){for(var e=s;e>=0;e--){n(i[e],t)}},_condense:function(t){for(var i=t.length-1,s;i>=0;i--){if(t[i].children.length===0){if(i>0){s=t[i-1].children;s.splice(s.indexOf(t[i]),1)}else this.clear()}else e(t[i],this.toBBox)}},_initFormat:function(t){var i=["return a"," - b",";"];this.compareMinX=new Function("a","b",i.join(t[0]));this.compareMinY=new Function("a","b",i.join(t[1]));this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}};function s(t,i,s){if(!s)return i.indexOf(t);for(var e=0;e<i.length;e++){if(s(t,i[e]))return e}return-1}function e(t,i){r(t,0,t.children.length,i,t)}function r(t,i,s,e,r){if(!r)r=d(null);r.minX=Infinity;r.minY=Infinity;r.maxX=-Infinity;r.maxY=-Infinity;for(var h=i,a;h<s;h++){a=t.children[h];n(r,t.leaf?e(a):a)}return r}function n(t,i){t.minX=Math.min(t.minX,i.minX);t.minY=Math.min(t.minY,i.minY);t.maxX=Math.max(t.maxX,i.maxX);t.maxY=Math.max(t.maxY,i.maxY);return t}function h(t,i){return t.minX-i.minX}function a(t,i){return t.minY-i.minY}function o(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,i){return(Math.max(i.maxX,t.maxX)-Math.min(i.minX,t.minX))*(Math.max(i.maxY,t.maxY)-Math.min(i.minY,t.minY))}function l(t,i){var s=Math.max(t.minX,i.minX),e=Math.max(t.minY,i.minY),r=Math.min(t.maxX,i.maxX),n=Math.min(t.maxY,i.maxY);return Math.max(0,r-s)*Math.max(0,n-e)}function v(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:true,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function m(i,s,e,r,n){var h=[s,e],a;while(h.length){e=h.pop();s=h.pop();if(e-s<=r)continue;a=s+Math.ceil((e-s)/r/2)*r;t(i,a,s,e,n);h.push(s,a,a,e)}}return Lf}var Wf=Df();var jf=c(Wf);var Vf=function(){};Vf.prototype.getReplay=function(t,i){};Vf.prototype.isEmpty=function(){};var Uf={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};var Bf={};Bf.lineString=function(t,i,s,e){var r=t[i];var n=t[i+1];var h=0;var a;for(a=i+e;a<s;a+=e){var o=t[a];var f=t[a+1];h+=Math.sqrt((o-r)*(o-r)+(f-n)*(f-n));r=o;n=f}return h};Bf.linearRing=function(t,i,s,e){var r=Bf.lineString(t,i,s,e);var n=t[s-e]-t[i];var h=t[s-e+1]-t[i+1];r+=Math.sqrt(n*n+h*h);return r};var qf={};qf.lineString=function(t,i,s,e,r,n,h,a){var o=[];var f=t[i]>t[s-e];var u=r.length;var l=t[i];var v=t[i+1];i+=e;var c=t[i];var d=t[i+1];var m=0;var p=Math.sqrt(Math.pow(c-l,2)+Math.pow(d-v,2));var _="";var g=0;var M,z,w;for(var y=0;y<u;++y){z=f?u-y-1:y;var b=r.charAt(z);_=f?b+_:_+b;var x=n(_)-g;g+=x;var E=h+x/2;while(i<s-e&&m+p<E){l=c;v=d;i+=e;c=t[i];d=t[i+1];m+=p;p=Math.sqrt(Math.pow(c-l,2)+Math.pow(d-v,2))}var S=E-m;var G=Math.atan2(d-v,c-l);if(f){G+=G>0?-Math.PI:Math.PI}if(w!==undefined){var P=G-w;P+=P>Math.PI?-2*Math.PI:P<-Math.PI?2*Math.PI:0;if(Math.abs(P)>a){return null}}var k=S/p;var N=ca.lerp(l,c,k);var I=ca.lerp(v,d,k);if(w==G){if(f){M[0]=N;M[1]=I;M[2]=x/2}M[4]=_}else{_=b;g=x;M=[N,I,x/2,G,_];if(f){o.unshift(M)}else{o.push(M)}w=G}h+=x}return o};var Hf={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12};var Xf={};Xf.ORDER=[Uf.POLYGON,Uf.CIRCLE,Uf.LINE_STRING,Uf.IMAGE,Uf.TEXT,Uf.DEFAULT];Xf.TEXT_ALIGN={};Xf.TEXT_ALIGN["left"]=0;Xf.TEXT_ALIGN["end"]=0;Xf.TEXT_ALIGN["center"]=.5;Xf.TEXT_ALIGN["right"]=1;Xf.TEXT_ALIGN["start"]=1;Xf.TEXT_ALIGN["top"]=0;Xf.TEXT_ALIGN["middle"]=.5;Xf.TEXT_ALIGN["hanging"]=.2;Xf.TEXT_ALIGN["alphabetic"]=.8;Xf.TEXT_ALIGN["ideographic"]=.8;Xf.TEXT_ALIGN["bottom"]=1;var Yf=function(t,i,s,e,r,n){wf.call(this);this.declutterTree=n;this.tmpExtent_=Ma.createEmpty();this.tolerance=t;this.maxExtent=i;this.overlaps=r;this.pixelRatio=e;this.maxLineWidth=0;this.resolution=s;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_=null;this.bufferedMaxExtent_=null;this.instructions=[];this.coordinates=[];this.coordinateCache_={};this.renderedTransform_=Ia.create();this.hitDetectionInstructions=[];this.pixelCoordinates_=null;this.state={};this.viewRotation_=0;this.tmpLocalTransform_=Ia.create();this.resetTransform_=Ia.create()};ta.inherits(Yf,wf);Yf.prototype.replayTextBackground_=function(t,i,s,e,r,n,h){t.beginPath();t.moveTo.apply(t,i);t.lineTo.apply(t,s);t.lineTo.apply(t,e);t.lineTo.apply(t,r);t.lineTo.apply(t,i);if(n){this.fillOrigin_=n[2];this.fill_(t)}if(h){this.setStrokeStyle_(t,h);t.stroke()}};Yf.prototype.replayImage_=function(t,i,s,e,r,n,h,a,o,f,u,l,v,c,d,m,p,_){var g=p||_;var M=this.tmpLocalTransform_;r*=v;n*=v;i-=r;s-=n;if(c){i=Math.round(i);s=Math.round(s)}var z=d+f>e.width?e.width-f:d;var w=a+u>e.height?e.height-u:a;var y=this.tmpExtent_;var b=m[3]+z*v+m[1];var x=m[0]+w*v+m[2];var E=i-m[3];var S=s-m[0];var G;var P;var k;var N;if(g||l!==0){G=[E,S];P=[E+b,S];k=[E+b,S+x];N=[E,S+x]}var I=null;if(l!==0){var C=i+r;var A=s+n;I=Ia.compose(M,C,A,1,1,l,-C,-A);Ma.createOrUpdateEmpty(y);Ma.extendCoordinate(y,Ia.apply(M,G));Ma.extendCoordinate(y,Ia.apply(M,P));Ma.extendCoordinate(y,Ia.apply(M,k));Ma.extendCoordinate(y,Ia.apply(M,N))}else{Ma.createOrUpdate(E,S,E+b,S+x,y)}var R=t.canvas;var T=y[0]<=R.width&&y[2]>=0&&y[1]<=R.height&&y[3]>=0;if(h){if(!T&&h[4]==1){return}Ma.extend(h,y);var O=T?[t,I?I.slice(0):null,o,e,f,u,z,w,i,s,v]:null;if(O&&g){O.push(p,_,G,P,k,N)}h.push(O)}else if(T){if(g){this.replayTextBackground_(t,G,P,k,N,p,_)}gf.drawImage(t,I,o,e,f,u,z,w,i,s,v)}};Yf.prototype.applyPixelRatio=function(t){var i=this.pixelRatio;return i==1?t:t.map((function(t){return t*i}))};Yf.prototype.appendFlatCoordinates=function(t,i,s,e,r,n){var h=this.coordinates.length;var a=this.getBufferedMaxExtent();if(n){i+=e}var o=[t[i],t[i+1]];var f=[NaN,NaN];var u=true;var l,v,c;for(l=i+e;l<s;l+=e){f[0]=t[l];f[1]=t[l+1];c=Ma.coordinateRelationship(a,f);if(c!==v){if(u){this.coordinates[h++]=o[0];this.coordinates[h++]=o[1]}this.coordinates[h++]=f[0];this.coordinates[h++]=f[1];u=false}else if(c===ga.INTERSECTING){this.coordinates[h++]=f[0];this.coordinates[h++]=f[1];u=false}else{u=true}o[0]=f[0];o[1]=f[1];v=c}if(r&&u||l===i+e){this.coordinates[h++]=o[0];this.coordinates[h++]=o[1]}return h};Yf.prototype.drawCustomCoordinates_=function(t,i,s,e,r){for(var n=0,h=s.length;n<h;++n){var a=s[n];var o=this.appendFlatCoordinates(t,i,a,e,false,false);r.push(o);i=a}return i};Yf.prototype.drawCustom=function(t,i,s){this.beginGeometry(t,i);var e=t.getType();var r=t.getStride();var n=this.coordinates.length;var h,a,o,f;var u;if(e==da.MULTI_POLYGON){t=t;h=t.getOrientedFlatCoordinates();f=[];var l=t.getEndss();u=0;for(var v=0,c=l.length;v<c;++v){var d=[];u=this.drawCustomCoordinates_(h,u,l[v],r,d);f.push(d)}this.instructions.push([Hf.CUSTOM,n,f,t,s,La.coordinatesss])}else if(e==da.POLYGON||e==da.MULTI_LINE_STRING){o=[];h=e==da.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates();u=this.drawCustomCoordinates_(h,0,t.getEnds(),r,o);this.instructions.push([Hf.CUSTOM,n,o,t,s,La.coordinatess])}else if(e==da.LINE_STRING||e==da.MULTI_POINT){h=t.getFlatCoordinates();a=this.appendFlatCoordinates(h,0,h.length,r,false,false);this.instructions.push([Hf.CUSTOM,n,a,t,s,La.coordinates])}else if(e==da.POINT){h=t.getFlatCoordinates();this.coordinates.push(h[0],h[1]);a=this.coordinates.length;this.instructions.push([Hf.CUSTOM,n,a,t,s])}this.endGeometry(t,i)};Yf.prototype.beginGeometry=function(t,i){this.beginGeometryInstruction1_=[Hf.BEGIN_GEOMETRY,i,0];this.instructions.push(this.beginGeometryInstruction1_);this.beginGeometryInstruction2_=[Hf.BEGIN_GEOMETRY,i,0];this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)};Yf.prototype.fill_=function(t){if(this.fillOrigin_){var i=Ia.apply(this.renderedTransform_,this.fillOrigin_.slice());t.translate(i[0],i[1]);t.rotate(this.viewRotation_)}t.fill();if(this.fillOrigin_){t.setTransform.apply(t,gf.resetTransform_)}};Yf.prototype.setStrokeStyle_=function(t,i){t.strokeStyle=i[1];t.lineWidth=i[2];t.lineCap=i[3];t.lineJoin=i[4];t.miterLimit=i[5];if(Ja.CANVAS_LINE_DASH){t.lineDashOffset=i[7];t.setLineDash(i[6])}};Yf.prototype.renderDeclutter_=function(t,i){if(t&&t.length>5){var s=t[4];if(s==1||s==t.length-5){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:i};if(!this.declutterTree.collides(e)){this.declutterTree.insert(e);var r=gf.drawImage;for(var n=5,h=t.length;n<h;++n){var a=t[n];if(a){if(a.length>11){this.replayTextBackground_(a[0],a[13],a[14],a[15],a[16],a[11],a[12])}r.apply(undefined,a)}}}t.length=5;Ma.createOrUpdateEmpty(t)}}};Yf.prototype.replay_=function(t,i,s,e,r,n){var h;if(this.pixelCoordinates_&&pa.equals(i,this.renderedTransform_)){h=this.pixelCoordinates_}else{if(!this.pixelCoordinates_){this.pixelCoordinates_=[]}h=ya.transform2D(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_);Ia.setFromArray(this.renderedTransform_,i)}var a=!ea.isEmpty(s);var o=0;var f=e.length;var u=0;var l;var v,c,d,m,p,_,g,M;var z=0;var w=0;var y=null;var b=null;var x=this.coordinateCache_;var E=this.viewRotation_;var S={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:E};var G=this.instructions!=e||this.overlaps?0:200;while(o<f){var P=e[o];var k=P[0];var N,I,C;switch(k){case Hf.BEGIN_GEOMETRY:N=P[1];if(a&&s[ta.getUid(N).toString()]||!N.getGeometry()){o=P[2]}else if(n!==undefined&&!Ma.intersects(n,N.getGeometry().getExtent())){o=P[2]+1}else{++o}break;case Hf.BEGIN_PATH:if(z>G){this.fill_(t);z=0}if(w>G){t.stroke();w=0}if(!z&&!w){t.beginPath();d=m=NaN}++o;break;case Hf.CIRCLE:u=P[1];var A=h[u];var R=h[u+1];var T=h[u+2];var O=h[u+3];var L=T-A;var F=O-R;var D=Math.sqrt(L*L+F*F);t.moveTo(A+D,R);t.arc(A,R,D,0,2*Math.PI,true);++o;break;case Hf.CLOSE_PATH:t.closePath();++o;break;case Hf.CUSTOM:u=P[1];l=P[2];var W=P[3];var j=P[4];var V=P.length==6?P[5]:undefined;S.geometry=W;S.feature=N;if(!(o in x)){x[o]=[]}var U=x[o];if(V){V(h,u,l,2,U)}else{U[0]=h[u];U[1]=h[u+1];U.length=2}j(U,S);++o;break;case Hf.DRAW_IMAGE:u=P[1];l=P[2];M=P[3];v=P[4];c=P[5];g=r?null:P[6];var B=P[7];var q=P[8];var H=P[9];var X=P[10];var Y=P[11];var J=P[12];var K=P[13];var Z=P[14];var $=P[15];var Q,tt,it;if(P.length>16){Q=P[16];tt=P[17];it=P[18]}else{Q=gf.defaultPadding;tt=it=false}if(Y){J+=E}for(;u<l;u+=2){this.replayImage_(t,h[u],h[u+1],M,v,c,g,B,q,H,X,J,K,Z,$,Q,tt?y:null,it?b:null)}this.renderDeclutter_(g,N);++o;break;case Hf.DRAW_CHARS:var st=P[1];var et=P[2];var rt=P[3];g=r?null:P[4];var nt=P[5];var ht=P[6];var at=P[7];var ot=P[8];var ft=P[9];var ut=P[10];var lt=P[11];var vt=P[12];var ct=P[13];var dt=P[14];var mt=Bf.lineString(h,st,et,2);var pt=ot(vt);if(nt||pt<=mt){var _t=this.textStates[ct].textAlign;var gt=(mt-pt)*Xf.TEXT_ALIGN[_t];var Mt=qf.lineString(h,st,et,2,vt,ot,gt,at);if(Mt){var zt,wt,yt,bt,xt;if(ut){for(zt=0,wt=Mt.length;zt<wt;++zt){xt=Mt[zt];yt=xt[4];bt=this.getImage(yt,ct,"",ut);v=xt[2]+lt;c=rt*bt.height+(.5-rt)*2*lt-ft;this.replayImage_(t,xt[0],xt[1],bt,v,c,g,bt.height,1,0,0,xt[3],dt,false,bt.width,gf.defaultPadding,null,null)}}if(ht){for(zt=0,wt=Mt.length;zt<wt;++zt){xt=Mt[zt];yt=xt[4];bt=this.getImage(yt,ct,ht,"");v=xt[2];c=rt*bt.height-ft;this.replayImage_(t,xt[0],xt[1],bt,v,c,g,bt.height,1,0,0,xt[3],dt,false,bt.width,gf.defaultPadding,null,null)}}}}this.renderDeclutter_(g,N);++o;break;case Hf.END_GEOMETRY:if(r!==undefined){N=P[1];var Et=r(N);if(Et){return Et}}++o;break;case Hf.FILL:if(G){z++}else{this.fill_(t)}++o;break;case Hf.MOVE_TO_LINE_TO:u=P[1];l=P[2];I=h[u];C=h[u+1];p=I+.5|0;_=C+.5|0;if(p!==d||_!==m){t.moveTo(I,C);d=p;m=_}for(u+=2;u<l;u+=2){I=h[u];C=h[u+1];p=I+.5|0;_=C+.5|0;if(u==l-2||p!==d||_!==m){t.lineTo(I,C);d=p;m=_}}++o;break;case Hf.SET_FILL_STYLE:y=P;this.fillOrigin_=P[2];if(z){this.fill_(t);z=0;if(w){t.stroke();w=0}}t.fillStyle=P[1];++o;break;case Hf.SET_STROKE_STYLE:b=P;if(w){t.stroke();w=0}this.setStrokeStyle_(t,P);++o;break;case Hf.STROKE:if(G){w++}else{t.stroke()}++o;break;default:++o;break}}if(z){this.fill_(t)}if(w){t.stroke()}return undefined};Yf.prototype.replay=function(t,i,s,e){this.viewRotation_=s;this.replay_(t,i,e,this.instructions,undefined,undefined)};Yf.prototype.replayHitDetection=function(t,i,s,e,r,n){this.viewRotation_=s;return this.replay_(t,i,e,this.hitDetectionInstructions,r,n)};Yf.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var i;var s=t.length;var e;var r;var n=-1;for(i=0;i<s;++i){e=t[i];r=e[0];if(r==Hf.END_GEOMETRY){n=i}else if(r==Hf.BEGIN_GEOMETRY){e[2]=i;pa.reverseSubArray(this.hitDetectionInstructions,n,i);n=-1}}};Yf.prototype.setFillStrokeStyle=function(t,i){var s=this.state;if(t){var e=t.getColor();s.fillStyle=zf.asColorLike(e?e:gf.defaultFillStyle)}else{s.fillStyle=undefined}if(i){var r=i.getColor();s.strokeStyle=zf.asColorLike(r?r:gf.defaultStrokeStyle);var n=i.getLineCap();s.lineCap=n!==undefined?n:gf.defaultLineCap;var h=i.getLineDash();s.lineDash=h?h.slice():gf.defaultLineDash;var a=i.getLineDashOffset();s.lineDashOffset=a?a:gf.defaultLineDashOffset;var o=i.getLineJoin();s.lineJoin=o!==undefined?o:gf.defaultLineJoin;var f=i.getWidth();s.lineWidth=f!==undefined?f:gf.defaultLineWidth;var u=i.getMiterLimit();s.miterLimit=u!==undefined?u:gf.defaultMiterLimit;if(s.lineWidth>this.maxLineWidth){this.maxLineWidth=s.lineWidth;this.bufferedMaxExtent_=null}}else{s.strokeStyle=undefined;s.lineCap=undefined;s.lineDash=null;s.lineDashOffset=undefined;s.lineJoin=undefined;s.lineWidth=undefined;s.miterLimit=undefined}};Yf.prototype.applyFill=function(t,i){var s=t.fillStyle;var e=[Hf.SET_FILL_STYLE,s];if(typeof s!=="string"){var r=i.getExtent();e.push([r[0],r[3]])}this.instructions.push(e)};Yf.prototype.applyStroke=function(t){this.instructions.push([Hf.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio])};Yf.prototype.updateFillStyle=function(t,i,s){var e=t.fillStyle;if(typeof e!=="string"||t.currentFillStyle!=e){i.call(this,t,s);t.currentFillStyle=e}};Yf.prototype.updateStrokeStyle=function(t,i){var s=t.strokeStyle;var e=t.lineCap;var r=t.lineDash;var n=t.lineDashOffset;var h=t.lineJoin;var a=t.lineWidth;var o=t.miterLimit;if(t.currentStrokeStyle!=s||t.currentLineCap!=e||r!=t.currentLineDash&&!pa.equals(t.currentLineDash,r)||t.currentLineDashOffset!=n||t.currentLineJoin!=h||t.currentLineWidth!=a||t.currentMiterLimit!=o){i.call(this,t);t.currentStrokeStyle=s;t.currentLineCap=e;t.currentLineDash=r;t.currentLineDashOffset=n;t.currentLineJoin=h;t.currentLineWidth=a;t.currentMiterLimit=o}};Yf.prototype.endGeometry=function(t,i){this.beginGeometryInstruction1_[2]=this.instructions.length;this.beginGeometryInstruction1_=null;this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length;this.beginGeometryInstruction2_=null;var s=[Hf.END_GEOMETRY,i];this.instructions.push(s);this.hitDetectionInstructions.push(s)};Yf.prototype.finish=ta.nullFunction;Yf.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_){this.bufferedMaxExtent_=Ma.clone(this.maxExtent);if(this.maxLineWidth>0){var t=this.resolution*(this.maxLineWidth+1)/2;Ma.buffer(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}}return this.bufferedMaxExtent_};var Jf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n);this.declutterGroup_=null;this.hitDetectionImage_=null;this.image_=null;this.anchorX_=undefined;this.anchorY_=undefined;this.height_=undefined;this.opacity_=undefined;this.originX_=undefined;this.originY_=undefined;this.rotateWithView_=undefined;this.rotation_=undefined;this.scale_=undefined;this.snapToPixel_=undefined;this.width_=undefined};ta.inherits(Jf,Yf);Jf.prototype.drawCoordinates_=function(t,i,s,e){return this.appendFlatCoordinates(t,i,s,e,false,false)};Jf.prototype.drawPoint=function(t,i){if(!this.image_){return}this.beginGeometry(t,i);var s=t.getFlatCoordinates();var e=t.getStride();var r=this.coordinates.length;var n=this.drawCoordinates_(s,0,s.length,e);this.instructions.push([Hf.DRAW_IMAGE,r,n,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,r,n,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]);this.endGeometry(t,i)};Jf.prototype.drawMultiPoint=function(t,i){if(!this.image_){return}this.beginGeometry(t,i);var s=t.getFlatCoordinates();var e=t.getStride();var r=this.coordinates.length;var n=this.drawCoordinates_(s,0,s.length,e);this.instructions.push([Hf.DRAW_IMAGE,r,n,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,r,n,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]);this.endGeometry(t,i)};Jf.prototype.finish=function(){this.reverseHitDetectionInstructions();this.anchorX_=undefined;this.anchorY_=undefined;this.hitDetectionImage_=null;this.image_=null;this.height_=undefined;this.scale_=undefined;this.opacity_=undefined;this.originX_=undefined;this.originY_=undefined;this.rotateWithView_=undefined;this.rotation_=undefined;this.snapToPixel_=undefined;this.width_=undefined};Jf.prototype.setImageStyle=function(t,i){var s=t.getAnchor();var e=t.getSize();var r=t.getHitDetectionImage(1);var n=t.getImage(1);var h=t.getOrigin();this.anchorX_=s[0];this.anchorY_=s[1];this.declutterGroup_=i;this.hitDetectionImage_=r;this.image_=n;this.height_=e[1];this.opacity_=t.getOpacity();this.originX_=h[0];this.originY_=h[1];this.rotateWithView_=t.getRotateWithView();this.rotation_=t.getRotation();this.scale_=t.getScale();this.snapToPixel_=t.getSnapToPixel();this.width_=e[0]};var Kf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n)};ta.inherits(Kf,Yf);Kf.prototype.drawFlatCoordinates_=function(t,i,s,e){var r=this.coordinates.length;var n=this.appendFlatCoordinates(t,i,s,e,false,false);var h=[Hf.MOVE_TO_LINE_TO,r,n];this.instructions.push(h);this.hitDetectionInstructions.push(h);return s};Kf.prototype.drawLineString=function(t,i){var s=this.state;var e=s.strokeStyle;var r=s.lineWidth;if(e===undefined||r===undefined){return}this.updateStrokeStyle(s,this.applyStroke);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset],[Hf.BEGIN_PATH]);var n=t.getFlatCoordinates();var h=t.getStride();this.drawFlatCoordinates_(n,0,n.length,h);this.hitDetectionInstructions.push([Hf.STROKE]);this.endGeometry(t,i)};Kf.prototype.drawMultiLineString=function(t,i){var s=this.state;var e=s.strokeStyle;var r=s.lineWidth;if(e===undefined||r===undefined){return}this.updateStrokeStyle(s,this.applyStroke);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset],[Hf.BEGIN_PATH]);var n=t.getEnds();var h=t.getFlatCoordinates();var a=t.getStride();var o=0;var f,u;for(f=0,u=n.length;f<u;++f){o=this.drawFlatCoordinates_(h,o,n[f],a)}this.hitDetectionInstructions.push([Hf.STROKE]);this.endGeometry(t,i)};Kf.prototype.finish=function(){var t=this.state;if(t.lastStroke!=undefined&&t.lastStroke!=this.coordinates.length){this.instructions.push([Hf.STROKE])}this.reverseHitDetectionInstructions();this.state=null};Kf.prototype.applyStroke=function(t){if(t.lastStroke!=undefined&&t.lastStroke!=this.coordinates.length){this.instructions.push([Hf.STROKE]);t.lastStroke=this.coordinates.length}t.lastStroke=0;Yf.prototype.applyStroke.call(this,t);this.instructions.push([Hf.BEGIN_PATH])};var Zf=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n)};ta.inherits(Zf,Yf);Zf.prototype.drawFlatCoordinatess_=function(t,i,s,e){var r=this.state;var n=r.fillStyle!==undefined;var h=r.strokeStyle!=undefined;var a=s.length;var o=[Hf.BEGIN_PATH];this.instructions.push(o);this.hitDetectionInstructions.push(o);for(var f=0;f<a;++f){var u=s[f];var l=this.coordinates.length;var v=this.appendFlatCoordinates(t,i,u,e,true,!h);var c=[Hf.MOVE_TO_LINE_TO,l,v];this.instructions.push(c);this.hitDetectionInstructions.push(c);if(h){var d=[Hf.CLOSE_PATH];this.instructions.push(d);this.hitDetectionInstructions.push(d)}i=u}var m=[Hf.FILL];this.hitDetectionInstructions.push(m);if(n){this.instructions.push(m)}if(h){var p=[Hf.STROKE];this.instructions.push(p);this.hitDetectionInstructions.push(p)}return i};Zf.prototype.drawCircle=function(t,i){var s=this.state;var e=s.fillStyle;var r=s.strokeStyle;if(e===undefined&&r===undefined){return}this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var n=t.getFlatCoordinates();var h=t.getStride();var a=this.coordinates.length;this.appendFlatCoordinates(n,0,n.length,h,false,false);var o=[Hf.BEGIN_PATH];var f=[Hf.CIRCLE,a];this.instructions.push(o,f);this.hitDetectionInstructions.push(o,f);var u=[Hf.FILL];this.hitDetectionInstructions.push(u);if(s.fillStyle!==undefined){this.instructions.push(u)}if(s.strokeStyle!==undefined){var l=[Hf.STROKE];this.instructions.push(l);this.hitDetectionInstructions.push(l)}this.endGeometry(t,i)};Zf.prototype.drawPolygon=function(t,i){var s=this.state;this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var e=t.getEnds();var r=t.getOrientedFlatCoordinates();var n=t.getStride();this.drawFlatCoordinatess_(r,0,e,n);this.endGeometry(t,i)};Zf.prototype.drawMultiPolygon=function(t,i){var s=this.state;var e=s.fillStyle;var r=s.strokeStyle;if(e===undefined&&r===undefined){return}this.setFillStrokeStyles_(t);this.beginGeometry(t,i);this.hitDetectionInstructions.push([Hf.SET_FILL_STYLE,Mf.asString(gf.defaultFillStyle)]);if(s.strokeStyle!==undefined){this.hitDetectionInstructions.push([Hf.SET_STROKE_STYLE,s.strokeStyle,s.lineWidth,s.lineCap,s.lineJoin,s.miterLimit,s.lineDash,s.lineDashOffset])}var n=t.getEndss();var h=t.getOrientedFlatCoordinates();var a=t.getStride();var o=0;var f,u;for(f=0,u=n.length;f<u;++f){o=this.drawFlatCoordinatess_(h,o,n[f],a)}this.endGeometry(t,i)};Zf.prototype.finish=function(){this.reverseHitDetectionInstructions();this.state=null;var t=this.tolerance;if(t!==0){var i=this.coordinates;var s,e;for(s=0,e=i.length;s<e;++s){i[s]=Fa.snap(i[s],t)}}};Zf.prototype.setFillStrokeStyles_=function(t){var i=this.state;var s=i.fillStyle;if(s!==undefined){this.updateFillStyle(i,this.applyFill,t)}if(i.strokeStyle!==undefined){this.updateStrokeStyle(i,this.applyStroke)}};var $f={};$f.lineString=function(t,i,s,e,r){var n=s;var h=s;var a=0;var o=0;var f=s;var u,l,v,c,d,m,p,_,g,M;for(l=s;l<e;l+=r){var z=i[l];var w=i[l+1];if(d!==undefined){g=z-d;M=w-m;c=Math.sqrt(g*g+M*M);if(p!==undefined){o+=v;u=Math.acos((p*g+_*M)/(v*c));if(u>t){if(o>a){a=o;n=f;h=l}o=0;f=l-r}}v=c;p=g;_=M}d=z;m=w}o+=c;return o>a?[f,l]:[n,h]};var Qf={LINE:"line"};var tu=function(t,i,s,e,r,n){Yf.call(this,t,i,s,e,r,n);this.labels_=null;this.text_="";this.textOffsetX_=0;this.textOffsetY_=0;this.textRotateWithView_=undefined;this.textRotation_=0;this.textFillState_=null;this.fillStates={};this.textStrokeState_=null;this.strokeStates={};this.textState_={};this.textStates={};this.textKey_="";this.fillKey_="";this.strokeKey_="";this.widths_={};var h=gf.labelCache;h.prune()};ta.inherits(tu,Yf);tu.measureTextWidths=function(t,i,s){var e=i.length;var r=0;var n,h;for(h=0;h<e;++h){n=gf.measureTextWidth(t,i[h]);r=Math.max(r,n);s.push(n)}return r};tu.prototype.drawText=function(t,i){var s=this.textFillState_;var e=this.textStrokeState_;var r=this.textState_;if(this.text_===""||!r||!s&&!e){return}var n=this.coordinates.length;var h=t.getType();var a=null;var o=2;var f=2;var u,l;if(r.placement===Qf.LINE){if(!Ma.intersects(this.getBufferedMaxExtent(),t.getExtent())){return}var v;a=t.getFlatCoordinates();f=t.getStride();if(h==da.LINE_STRING){v=[a.length]}else if(h==da.MULTI_LINE_STRING){v=t.getEnds()}else if(h==da.POLYGON){v=t.getEnds().slice(0,1)}else if(h==da.MULTI_POLYGON){var c=t.getEndss();v=[];for(u=0,l=c.length;u<l;++u){v.push(c[u][0])}}this.beginGeometry(t,i);var d=r.textAlign;var m=0;var p;for(var _=0,g=v.length;_<g;++_){if(d==undefined){var M=$f.lineString(r.maxAngle,a,m,v[_],f);m=M[0];p=M[1]}else{p=v[_]}for(u=m;u<p;u+=f){this.coordinates.push(a[u],a[u+1])}o=this.coordinates.length;m=v[_];this.drawChars_(n,o,this.declutterGroup_);n=o}this.endGeometry(t,i)}else{var z=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_);var w=z.width/this.pixelRatio;switch(h){case da.POINT:case da.MULTI_POINT:a=t.getFlatCoordinates();o=a.length;break;case da.LINE_STRING:a=t.getFlatMidpoint();break;case da.CIRCLE:a=t.getCenter();break;case da.MULTI_LINE_STRING:a=t.getFlatMidpoints();o=a.length;break;case da.POLYGON:a=t.getFlatInteriorPoint();if(!r.overflow&&a[2]/this.resolution<w){return}f=3;break;case da.MULTI_POLYGON:var y=t.getFlatInteriorPoints();a=[];for(u=0,l=y.length;u<l;u+=3){if(r.overflow||y[u+2]/this.resolution>=w){a.push(y[u],y[u+1])}}o=a.length;if(o==0){return}break}o=this.appendFlatCoordinates(a,0,o,f,false,false);this.beginGeometry(t,i);if(r.backgroundFill||r.backgroundStroke){this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke);this.updateFillStyle(this.state,this.applyFill,t);this.updateStrokeStyle(this.state,this.applyStroke)}this.drawTextImage_(z,n,o);this.endGeometry(t,i)}};tu.prototype.getImage=function(t,i,s,e){var r;var n=e+i+t+s+this.pixelRatio;var h=gf.labelCache;if(!h.containsKey(n)){var a=e?this.strokeStates[e]||this.textStrokeState_:null;var o=s?this.fillStates[s]||this.textFillState_:null;var f=this.textStates[i]||this.textState_;var u=this.pixelRatio;var l=f.scale*u;var v=Xf.TEXT_ALIGN[f.textAlign||gf.defaultTextAlign];var c=e&&a.lineWidth?a.lineWidth:0;var d=t.split("\n");var m=d.length;var p=[];var _=tu.measureTextWidths(f.font,d,p);var g=gf.measureTextHeight(f.font);var M=g*m;var z=_+c;var w=Po.createCanvasContext2D(Math.ceil(z*l),Math.ceil((M+c)*l));r=w.canvas;h.set(n,r);if(l!=1){w.scale(l,l)}w.font=f.font;if(e){w.strokeStyle=a.strokeStyle;w.lineWidth=c*(Ja.SAFARI?l:1);w.lineCap=a.lineCap;w.lineJoin=a.lineJoin;w.miterLimit=a.miterLimit;if(Ja.CANVAS_LINE_DASH&&a.lineDash.length){w.setLineDash(a.lineDash);w.lineDashOffset=a.lineDashOffset}}if(s){w.fillStyle=o.fillStyle}w.textBaseline="middle";w.textAlign="center";var y=.5-v;var b=v*r.width/l+y*c;var x;if(e){for(x=0;x<m;++x){w.strokeText(d[x],b+y*p[x],.5*(c+g)+x*g)}}if(s){for(x=0;x<m;++x){w.fillText(d[x],b+y*p[x],.5*(c+g)+x*g)}}}return h.get(n)};tu.prototype.drawTextImage_=function(t,i,s){var e=this.textState_;var r=this.textStrokeState_;var n=this.pixelRatio;var h=Xf.TEXT_ALIGN[e.textAlign||gf.defaultTextAlign];var a=Xf.TEXT_ALIGN[e.textBaseline];var o=r&&r.lineWidth?r.lineWidth:0;var f=h*t.width/n+2*(.5-h)*o;var u=a*t.height/n+2*(.5-a)*o;this.instructions.push([Hf.DRAW_IMAGE,i,s,t,(f-this.textOffsetX_)*n,(u-this.textOffsetY_)*n,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,true,t.width,e.padding==gf.defaultPadding?gf.defaultPadding:e.padding.map((function(t){return t*n})),!!e.backgroundFill,!!e.backgroundStroke]);this.hitDetectionInstructions.push([Hf.DRAW_IMAGE,i,s,t,(f-this.textOffsetX_)*n,(u-this.textOffsetY_)*n,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/n,true,t.width,e.padding,!!e.backgroundFill,!!e.backgroundStroke])};tu.prototype.drawChars_=function(t,i,s){var e=this.textStrokeState_;var r=this.textState_;var n=this.textFillState_;var h=this.strokeKey_;if(e){if(!(h in this.strokeStates)){this.strokeStates[h]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}}}var a=this.textKey_;if(!(this.textKey_ in this.textStates)){this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||gf.defaultTextAlign,scale:r.scale}}var o=this.fillKey_;if(n){if(!(o in this.fillStates)){this.fillStates[o]={fillStyle:n.fillStyle}}}var f=this.pixelRatio;var u=Xf.TEXT_ALIGN[r.textBaseline];var l=this.textOffsetY_*f;var v=this.text_;var c=r.font;var d=r.scale;var m=e?e.lineWidth*d/2:0;var p=this.widths_[c];if(!p){this.widths_[c]=p={}}this.instructions.push([Hf.DRAW_CHARS,t,i,u,s,r.overflow,o,r.maxAngle,function(t){var i=p[t];if(!i){i=p[t]=gf.measureTextWidth(c,t)}return i*d*f},l,h,m*f,v,a,1]);this.hitDetectionInstructions.push([Hf.DRAW_CHARS,t,i,u,s,r.overflow,o,r.maxAngle,function(t){var i=p[t];if(!i){i=p[t]=gf.measureTextWidth(c,t)}return i*d},l,h,m,v,a,1/f])};tu.prototype.setTextStyle=function(t,i){var s,e,r;if(!t){this.text_=""}else{this.declutterGroup_=i;var n=t.getFill();if(!n){e=this.textFillState_=null}else{e=this.textFillState_;if(!e){e=this.textFillState_={}}e.fillStyle=zf.asColorLike(n.getColor()||gf.defaultFillStyle)}var h=t.getStroke();if(!h){r=this.textStrokeState_=null}else{r=this.textStrokeState_;if(!r){r=this.textStrokeState_={}}var a=h.getLineDash();var o=h.getLineDashOffset();var f=h.getWidth();var u=h.getMiterLimit();r.lineCap=h.getLineCap()||gf.defaultLineCap;r.lineDash=a?a.slice():gf.defaultLineDash;r.lineDashOffset=o===undefined?gf.defaultLineDashOffset:o;r.lineJoin=h.getLineJoin()||gf.defaultLineJoin;r.lineWidth=f===undefined?gf.defaultLineWidth:f;r.miterLimit=u===undefined?gf.defaultMiterLimit:u;r.strokeStyle=zf.asColorLike(h.getColor()||gf.defaultStrokeStyle)}s=this.textState_;var l=t.getFont()||gf.defaultFont;gf.checkFont(l);var v=t.getScale();s.overflow=t.getOverflow();s.font=l;s.maxAngle=t.getMaxAngle();s.placement=t.getPlacement();s.textAlign=t.getTextAlign();s.textBaseline=t.getTextBaseline()||gf.defaultTextBaseline;s.backgroundFill=t.getBackgroundFill();s.backgroundStroke=t.getBackgroundStroke();s.padding=t.getPadding()||gf.defaultPadding;s.scale=v===undefined?1:v;var c=t.getOffsetX();var d=t.getOffsetY();var m=t.getRotateWithView();var p=t.getRotation();this.text_=t.getText()||"";this.textOffsetX_=c===undefined?0:c;this.textOffsetY_=d===undefined?0:d;this.textRotateWithView_=m===undefined?false:m;this.textRotation_=p===undefined?0:p;this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:ta.getUid(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"";this.textKey_=s.font+s.scale+(s.textAlign||"?");this.fillKey_=e?typeof e.fillStyle=="string"?e.fillStyle:"|"+ta.getUid(e.fillStyle):""}};var iu=function(t,i,s,e,r,n,h){Vf.call(this);this.declutterTree_=n;this.declutterGroup_=null;this.tolerance_=t;this.maxExtent_=i;this.overlaps_=r;this.pixelRatio_=e;this.resolution_=s;this.renderBuffer_=h;this.replaysByZIndex_={};this.hitDetectionContext_=Po.createCanvasContext2D(1,1);this.hitDetectionTransform_=Ia.create()};ta.inherits(iu,Vf);iu.circleArrayCache_={0:[[true]]};iu.fillCircleArrayRowToMiddle_=function(t,i,s){var e;var r=Math.floor(t.length/2);if(i>=r){for(e=r;e<i;e++){t[e][s]=true}}else if(i<r){for(e=i+1;e<r;e++){t[e][s]=true}}};iu.getCircleArray_=function(t){if(iu.circleArrayCache_[t]!==undefined){return iu.circleArrayCache_[t]}var i=t*2+1;var s=new Array(i);for(var e=0;e<i;e++){s[e]=new Array(i)}var r=t;var n=0;var h=0;while(r>=n){iu.fillCircleArrayRowToMiddle_(s,t+r,t+n);iu.fillCircleArrayRowToMiddle_(s,t+n,t+r);iu.fillCircleArrayRowToMiddle_(s,t-n,t+r);iu.fillCircleArrayRowToMiddle_(s,t-r,t+n);iu.fillCircleArrayRowToMiddle_(s,t-r,t-n);iu.fillCircleArrayRowToMiddle_(s,t-n,t-r);iu.fillCircleArrayRowToMiddle_(s,t+n,t-r);iu.fillCircleArrayRowToMiddle_(s,t+r,t-n);n++;h+=1+2*n;if(2*(h-r)+1>0){r-=1;h+=1-2*r}}iu.circleArrayCache_[t]=s;return s};iu.replayDeclutter=function(t,i,s){var e=Object.keys(t).map(Number).sort(pa.numberSafeCompareFunction);var r={};for(var n=0,h=e.length;n<h;++n){var a=t[e[n].toString()];for(var o=0,f=a.length;o<f;){var u=a[o++];var l=a[o++];u.replay(i,l,s,r)}}};iu.prototype.addDeclutter=function(t){var i=null;if(this.declutterTree_){if(t){i=this.declutterGroup_;i[4]++}else{i=this.declutterGroup_=Ma.createEmpty();i.push(1)}}return i};iu.prototype.clip=function(t,i){var s=this.getClipCoords(i);t.beginPath();t.moveTo(s[0],s[1]);t.lineTo(s[2],s[3]);t.lineTo(s[4],s[5]);t.lineTo(s[6],s[7]);t.clip()};iu.prototype.hasReplays=function(t){for(var i in this.replaysByZIndex_){var s=this.replaysByZIndex_[i];for(var e=0,r=t.length;e<r;++e){if(t[e]in s){return true}}}return false};iu.prototype.finish=function(){var t;for(t in this.replaysByZIndex_){var i=this.replaysByZIndex_[t];var s;for(s in i){i[s].finish()}}};iu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){e=Math.round(e);var a=e*2+1;var o=Ia.compose(this.hitDetectionTransform_,e+.5,e+.5,1/i,-1/i,-s,-t[0],-t[1]);var f=this.hitDetectionContext_;if(f.canvas.width!==a||f.canvas.height!==a){f.canvas.width=a;f.canvas.height=a}else{f.clearRect(0,0,a,a)}var u;if(this.renderBuffer_!==undefined){u=Ma.createEmpty();Ma.extendCoordinate(u,t);Ma.buffer(u,i*(this.renderBuffer_+e),u)}var l=iu.getCircleArray_(e);var v;if(this.declutterTree_){v=this.declutterTree_.all().map((function(t){return t.value}))}var c;function d(t){var i=f.getImageData(0,0,a,a).data;for(var s=0;s<a;s++){for(var e=0;e<a;e++){if(l[s][e]){if(i[(e*a+s)*4+3]>0){var r;if(!(v&&(c==Uf.IMAGE||c==Uf.TEXT))||v.indexOf(t)!==-1){r=n(t)}if(r){return r}else{f.clearRect(0,0,a,a);return undefined}}}}}}var m=Object.keys(this.replaysByZIndex_).map(Number);m.sort(pa.numberSafeCompareFunction);var p,_,g,M,z;for(p=m.length-1;p>=0;--p){var w=m[p].toString();g=this.replaysByZIndex_[w];for(_=Xf.ORDER.length-1;_>=0;--_){c=Xf.ORDER[_];M=g[c];if(M!==undefined){if(h&&(c==Uf.IMAGE||c==Uf.TEXT)){var y=h[w];if(!y){h[w]=[M,o.slice(0)]}else{y.push(M,o.slice(0))}}else{z=M.replayHitDetection(f,o,s,r,d,u);if(z){return z}}}}}return undefined};iu.prototype.getClipCoords=function(t){var i=this.maxExtent_;var s=i[0];var e=i[1];var r=i[2];var n=i[3];var h=[s,e,s,n,r,n,r,e];ya.transform2D(h,0,8,2,t,h);return h};iu.prototype.getReplay=function(t,i){var s=t!==undefined?t.toString():"0";var e=this.replaysByZIndex_[s];if(e===undefined){e={};this.replaysByZIndex_[s]=e}var r=e[i];if(r===undefined){var n=iu.BATCH_CONSTRUCTORS_[i];r=new n(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_);e[i]=r}return r};iu.prototype.getReplays=function(){return this.replaysByZIndex_};iu.prototype.isEmpty=function(){return ea.isEmpty(this.replaysByZIndex_)};iu.prototype.replay=function(t,i,s,e,r,n){var h=Object.keys(this.replaysByZIndex_).map(Number);h.sort(pa.numberSafeCompareFunction);t.save();this.clip(t,i);var a=r?r:Xf.ORDER;var o,f,u,l,v,c;for(o=0,f=h.length;o<f;++o){var d=h[o].toString();v=this.replaysByZIndex_[d];for(u=0,l=a.length;u<l;++u){var m=a[u];c=v[m];if(c!==undefined){if(n&&(m==Uf.IMAGE||m==Uf.TEXT)){var p=n[d];if(!p){n[d]=[c,i.slice(0)]}else{p.push(c,i.slice(0))}}else{c.replay(t,i,s,e)}}}}t.restore()};iu.BATCH_CONSTRUCTORS_={Circle:Zf,Default:Yf,Image:Jf,LineString:Kf,Polygon:Zf,Text:tu};var su={};su.defaultOrder=function(t,i){return ta.getUid(t)-ta.getUid(i)};su.getSquaredTolerance=function(t,i){var s=su.getTolerance(t,i);return s*s};su.getTolerance=function(t,i){return ta.SIMPLIFY_TOLERANCE*t/i};su.renderCircleGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(r||n){var h=t.getReplay(s.getZIndex(),Uf.CIRCLE);h.setFillStrokeStyle(r,n);h.drawCircle(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.renderFeature=function(t,i,s,e,r,n){var h=false;var a,o;a=s.getImage();if(a){o=a.getImageState();if(o==vf.LOADED||o==vf.ERROR){a.unlistenImageChange(r,n)}else{if(o==vf.IDLE){a.load()}o=a.getImageState();a.listenImageChange(r,n);h=true}}su.renderFeature_(t,i,s,e);return h};su.renderFeature_=function(t,i,s,e){var r=s.getGeometryFunction()(i);if(!r){return}var n=r.getSimplifiedGeometry(e);var h=s.getRenderer();if(h){su.renderGeometry_(t,n,s,i)}else{var a=su.GEOMETRY_RENDERERS_[n.getType()];a(t,n,s,i)}};su.renderGeometry_=function(t,i,s,e){if(i.getType()==da.GEOMETRY_COLLECTION){var r=i.getGeometries();for(var n=0,h=r.length;n<h;++n){su.renderGeometry_(t,r[n],s,e)}return}var a=t.getReplay(s.getZIndex(),Uf.DEFAULT);a.drawCustom(i,e,s.getRenderer())};su.renderGeometryCollectionGeometry_=function(t,i,s,e){var r=i.getGeometriesArray();var n,h;for(n=0,h=r.length;n<h;++n){var a=su.GEOMETRY_RENDERERS_[r[n].getType()];a(t,r[n],s,e)}};su.renderLineStringGeometry_=function(t,i,s,e){var r=s.getStroke();if(r){var n=t.getReplay(s.getZIndex(),Uf.LINE_STRING);n.setFillStrokeStyle(null,r);n.drawLineString(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(false));a.drawText(i,e)}};su.renderMultiLineStringGeometry_=function(t,i,s,e){var r=s.getStroke();if(r){var n=t.getReplay(s.getZIndex(),Uf.LINE_STRING);n.setFillStrokeStyle(null,r);n.drawMultiLineString(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(false));a.drawText(i,e)}};su.renderMultiPolygonGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(n||r){var h=t.getReplay(s.getZIndex(),Uf.POLYGON);h.setFillStrokeStyle(r,n);h.drawMultiPolygon(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.renderPointGeometry_=function(t,i,s,e){var r=s.getImage();if(r){if(r.getImageState()!=vf.LOADED){return}var n=t.getReplay(s.getZIndex(),Uf.IMAGE);n.setImageStyle(r,t.addDeclutter(false));n.drawPoint(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(!!r));a.drawText(i,e)}};su.renderMultiPointGeometry_=function(t,i,s,e){var r=s.getImage();if(r){if(r.getImageState()!=vf.LOADED){return}var n=t.getReplay(s.getZIndex(),Uf.IMAGE);n.setImageStyle(r,t.addDeclutter(false));n.drawMultiPoint(i,e)}var h=s.getText();if(h){var a=t.getReplay(s.getZIndex(),Uf.TEXT);a.setTextStyle(h,t.addDeclutter(!!r));a.drawText(i,e)}};su.renderPolygonGeometry_=function(t,i,s,e){var r=s.getFill();var n=s.getStroke();if(r||n){var h=t.getReplay(s.getZIndex(),Uf.POLYGON);h.setFillStrokeStyle(r,n);h.drawPolygon(i,e)}var a=s.getText();if(a){var o=t.getReplay(s.getZIndex(),Uf.TEXT);o.setTextStyle(a,t.addDeclutter(false));o.drawText(i,e)}};su.GEOMETRY_RENDERERS_={Point:su.renderPointGeometry_,LineString:su.renderLineStringGeometry_,Polygon:su.renderPolygonGeometry_,MultiPoint:su.renderMultiPointGeometry_,MultiLineString:su.renderMultiLineStringGeometry_,MultiPolygon:su.renderMultiPolygonGeometry_,GeometryCollection:su.renderGeometryCollectionGeometry_,Circle:su.renderCircleGeometry_};var eu=function(t){xf.call(this,t);this.declutterTree_=t.getDeclutter()?jf(9):null;this.dirty_=false;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=Ma.createEmpty();this.renderedRenderOrder_=null;this.replayGroup_=null;this.replayGroupChanged=true;this.context=Po.createCanvasContext2D();ra.listen(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this)};ta.inherits(eu,xf);eu["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.VECTOR};eu["create"]=function(t,i){return new eu(i)};eu.prototype.disposeInternal=function(){ra.unlisten(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this);xf.prototype.disposeInternal.call(this)};eu.prototype.composeFrame=function(t,i,s){var e=t.extent;var r=t.pixelRatio;var n=i.managed?t.skippedFeatureUids:{};var h=t.viewState;var a=h.projection;var o=h.rotation;var f=a.getExtent();var u=this.getLayer().getSource();var l=this.getTransform(t,0);this.preCompose(s,t,l);var v=i.extent;var c=v!==undefined;if(c){this.clip(s,t,v)}var d=this.replayGroup_;if(d&&!d.isEmpty()){if(this.declutterTree_){this.declutterTree_.clear()}var m=this.getLayer();var p=0;var _=0;var g;var M=i.opacity!==1;var z=m.hasListener(Wo.RENDER);if(M||z){var w=s.canvas.width;var y=s.canvas.height;if(o){var b=Math.round(Math.sqrt(w*w+y*y));p=(b-w)/2;_=(b-y)/2;w=y=b}this.context.canvas.width=w;this.context.canvas.height=y;g=this.context}else{g=s}var x=g.globalAlpha;if(!M){g.globalAlpha=i.opacity}if(g!=s){g.translate(p,_)}var E=t.size[0]*r;var S=t.size[1]*r;gf.rotateAtOffset(g,-o,E/2,S/2);d.replay(g,l,o,n);if(u.getWrapX()&&a.canWrapX()&&!Ma.containsExtent(f,e)){var G=e[0];var P=Ma.getWidth(f);var k=0;var N;while(G<f[0]){--k;N=P*k;l=this.getTransform(t,N);d.replay(g,l,o,n);G+=P}k=0;G=e[2];while(G>f[2]){++k;N=P*k;l=this.getTransform(t,N);d.replay(g,l,o,n);G-=P}l=this.getTransform(t,0)}gf.rotateAtOffset(g,o,E/2,S/2);if(g!=s){if(z){this.dispatchRenderEvent(g,t,l)}if(M){var I=s.globalAlpha;s.globalAlpha=i.opacity;s.drawImage(g.canvas,-p,-_);s.globalAlpha=I}else{s.drawImage(g.canvas,-p,-_)}g.translate(-p,-_)}if(!M){g.globalAlpha=x}}if(c){s.restore()}this.postCompose(s,t,i,l)};eu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(!this.replayGroup_){return undefined}else{var n=i.viewState.resolution;var h=i.viewState.rotation;var a=this.getLayer();var o={};var f=this.replayGroup_.forEachFeatureAtCoordinate(t,n,h,s,{},(function(t){var i=ta.getUid(t).toString();if(!(i in o)){o[i]=true;return e.call(r,t,a)}}),null);return f}};eu.prototype.handleFontsChanged_=function(t){var i=this.getLayer();if(i.getVisible()&&this.replayGroup_){i.changed()}};eu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};eu.prototype.prepareFrame=function(t,i){var s=this.getLayer();var e=s.getSource();this.updateLogos(t,e);var r=t.viewHints[yo.ANIMATING];var n=t.viewHints[yo.INTERACTING];var h=s.getUpdateWhileAnimating();var a=s.getUpdateWhileInteracting();if(!this.dirty_&&(!h&&r)||!a&&n){return true}var o=t.extent;var f=t.viewState;var u=f.projection;var l=f.resolution;var v=t.pixelRatio;var c=s.getRevision();var d=s.getRenderBuffer();var m=s.getRenderOrder();if(m===undefined){m=su.defaultOrder}var p=Ma.buffer(o,d*l);var _=f.projection.getExtent();if(e.getWrapX()&&f.projection.canWrapX()&&!Ma.containsExtent(_,t.extent)){var g=Ma.getWidth(_);var M=Math.max(Ma.getWidth(p)/2,g);p[0]=_[0]-M;p[2]=_[2]+M}if(!this.dirty_&&this.renderedResolution_==l&&this.renderedRevision_==c&&this.renderedRenderOrder_==m&&Ma.containsExtent(this.renderedExtent_,p)){this.replayGroupChanged=false;return true}this.replayGroup_=null;this.dirty_=false;var z=new iu(su.getTolerance(l,v),p,l,v,e.getOverlaps(),this.declutterTree_,s.getRenderBuffer());e.loadFeatures(p,l,u);var w=function(t){var i;var e=t.getStyleFunction();if(e){i=e.call(t,l)}else{e=s.getStyleFunction();if(e){i=e(t,l)}}if(i){var r=this.renderFeature(t,l,v,i,z);this.dirty_=this.dirty_||r}}.bind(this);if(m){var y=[];e.forEachFeatureInExtent(p,(function(t){y.push(t)}),this);y.sort(m);for(var b=0,x=y.length;b<x;++b){w(y[b])}}else{e.forEachFeatureInExtent(p,w,this)}z.finish();this.renderedResolution_=l;this.renderedRevision_=c;this.renderedRenderOrder_=m;this.renderedExtent_=p;this.replayGroup_=z;this.replayGroupChanged=true;return true};eu.prototype.renderFeature=function(t,i,s,e,r){if(!e){return false}var n=false;if(Array.isArray(e)){for(var h=0,a=e.length;h<a;++h){n=su.renderFeature(r,t,e[h],su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}}else{n=su.renderFeature(r,t,e,su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)}return n};var ru={VECTOR:"vector"};var nu=function(t){this.context=null;Cf.call(this,t);this.declutterTree_=t.getDeclutter()?jf(9):null;this.dirty_=false;this.tmpTransform_=Ia.create();this.zDirection=t.getRenderMode()==ru.VECTOR?1:0;ra.listen(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this)};ta.inherits(nu,Cf);nu["handles"]=function(t,i){return t===To.CANVAS&&i.getType()===df.VECTOR_TILE};nu["create"]=function(t,i){return new nu(i)};nu.IMAGE_REPLAYS={image:[Uf.POLYGON,Uf.CIRCLE,Uf.LINE_STRING,Uf.IMAGE,Uf.TEXT],hybrid:[Uf.POLYGON,Uf.LINE_STRING]};nu.VECTOR_REPLAYS={image:[Uf.DEFAULT],hybrid:[Uf.IMAGE,Uf.TEXT,Uf.DEFAULT],vector:Xf.ORDER};nu.prototype.disposeInternal=function(){ra.unlisten(gf.labelCache,oa.CLEAR,this.handleFontsChanged_,this);Cf.prototype.disposeInternal.call(this)};nu.prototype.prepareFrame=function(t,i){var s=this.getLayer();var e=s.getRevision();if(this.renderedLayerRevision_!=e){this.renderedTiles.length=0;var r=s.getRenderMode();if(!this.context&&r!=ru.VECTOR){this.context=Po.createCanvasContext2D()}if(this.context&&r==ru.VECTOR){this.context=null}}this.renderedLayerRevision_=e;return Cf.prototype.prepareFrame.apply(this,arguments)};nu.prototype.createReplayGroup_=function(t,i){var s=this.getLayer();var e=i.pixelRatio;var r=i.viewState.projection;var n=s.getRevision();var h=s.getRenderOrder()||null;var a=t.getReplayState(s);if(!a.dirty&&a.renderedRevision==n&&a.renderedRenderOrder==h){return}var o=s.getSource();var f=o.getTileGrid();var u=o.getTileGridForProjection(r);var l=u.getResolution(t.tileCoord[0]);var v=u.getTileCoordExtent(t.wrappedTileCoord);for(var c=0,d=t.tileKeys.length;c<d;++c){var m=t.getTile(t.tileKeys[c]);if(m.getState()==po.ERROR){continue}var p=m.tileCoord;var _=f.getTileCoordExtent(p);var g=Ma.getIntersection(v,_);var M=Ma.equals(_,g)?null:Ma.buffer(g,s.getRenderBuffer()*l);var z=m.getProjection();var w=false;if(!Na.equivalent(r,z)){w=true;m.setProjection(r)}a.dirty=false;var y=new iu(0,g,l,e,o.getOverlaps(),this.declutterTree_,s.getRenderBuffer());var b=su.getSquaredTolerance(l,e);var x=function(t){var i;var e=t.getStyleFunction();if(e){i=e.call(t,l)}else{e=s.getStyleFunction();if(e){i=e(t,l)}}if(i){var r=this.renderFeature(t,b,i,y);this.dirty_=this.dirty_||r;a.dirty=a.dirty||r}};var E=m.getFeatures();if(h&&h!==a.renderedRenderOrder){E.sort(h)}var S;for(var G=0,P=E.length;G<P;++G){S=E[G];if(w){if(z.getUnits()==ba.TILE_PIXELS){z.setWorldExtent(_);z.setExtent(m.getExtent())}S.getGeometry().transform(z,r)}if(!M||Ma.intersects(M,S.getGeometry().getExtent())){x.call(this,S)}}y.finish();for(var k in y.getReplays()){}m.setReplayGroup(s,t.tileCoord.toString(),y)}a.renderedRevision=n;a.renderedRenderOrder=h};nu.prototype.drawTileImage=function(t,i,s,e,r,n,h,a,o){var f=t;this.createReplayGroup_(f,i);if(this.context){this.renderTileImage_(f,i,s);Cf.prototype.drawTileImage.apply(this,arguments)}};nu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=i.viewState.resolution;var h=i.viewState.rotation;s=s==undefined?0:s;var a=this.getLayer();var o={};var f=this.renderedTiles;var u=a.getSource();var l=u.getTileGridForProjection(i.viewState.projection);var v,c;var d,m,p;var _,g,M;for(d=0,m=f.length;d<m;++d){_=f[d];g=_.wrappedTileCoord;M=l.getTileCoordExtent(g,this.tmpExtent);v=Ma.buffer(M,s*n,v);if(!Ma.containsCoordinate(v,t)){continue}for(var z=0,w=_.tileKeys.length;z<w;++z){var y=_.getTile(_.tileKeys[z]);if(y.getState()==po.ERROR){continue}p=y.getReplayGroup(a,_.tileCoord.toString());c=c||p.forEachFeatureAtCoordinate(t,n,h,s,{},(function(t){var i=ta.getUid(t).toString();if(!(i in o)){o[i]=true;return e.call(r,t,a)}}),null)}}return c};nu.prototype.getReplayTransform_=function(t,i){var s=this.getLayer();var e=s.getSource();var r=e.getTileGrid();var n=t.tileCoord;var h=r.getResolution(n[0]);var a=i.viewState;var o=i.pixelRatio;var f=a.resolution/o;var u=r.getTileCoordExtent(n,this.tmpExtent);var l=a.center;var v=Ma.getTopLeft(u);var c=i.size;var d=Math.round(o*c[0]/2);var m=Math.round(o*c[1]/2);return Ia.compose(this.tmpTransform_,d,m,h/f,h/f,a.rotation,(v[0]-l[0])/h,(l[1]-v[1])/h)};nu.prototype.handleFontsChanged_=function(t){var i=this.getLayer();if(i.getVisible()&&this.renderedLayerRevision_!==undefined){i.changed()}};nu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};nu.prototype.postCompose=function(t,i,s){var e=this.getLayer();var r=e.getDeclutter()?{}:null;var n=e.getSource();var h=e.getRenderMode();var a=nu.VECTOR_REPLAYS[h];var o=i.pixelRatio;var f=i.viewState.rotation;var u=i.size;var l,v;if(f){l=Math.round(o*u[0]/2);v=Math.round(o*u[1]/2);gf.rotateAtOffset(t,-f,l,v)}if(r){this.declutterTree_.clear()}var c=this.renderedTiles;var d=n.getTileGridForProjection(i.viewState.projection);var m=[];var p=[];for(var _=c.length-1;_>=0;--_){var g=c[_];if(g.getState()==po.ABORT){continue}var M=g.tileCoord;var z=d.getTileCoordExtent(M)[0]-d.getTileCoordExtent(g.wrappedTileCoord)[0];var w=undefined;for(var y=0,b=g.tileKeys.length;y<b;++y){var x=g.getTile(g.tileKeys[y]);if(x.getState()==po.ERROR){continue}var E=x.getReplayGroup(e,M.toString());if(h!=ru.VECTOR&&!E.hasReplays(a)){continue}if(!w){w=this.getTransform(i,z)}var S=x.tileCoord[0];var G=E.getClipCoords(w);t.save();t.globalAlpha=s.opacity;for(var P=0,k=m.length;P<k;++P){var N=m[P];if(S<p[P]){t.beginPath();t.moveTo(G[0],G[1]);t.lineTo(G[2],G[3]);t.lineTo(G[4],G[5]);t.lineTo(G[6],G[7]);t.moveTo(N[6],N[7]);t.lineTo(N[4],N[5]);t.lineTo(N[2],N[3]);t.lineTo(N[0],N[1]);t.clip()}}E.replay(t,w,f,{},a,r);t.restore();m.push(G);p.push(S)}}if(r){iu.replayDeclutter(r,t,f)}if(f){gf.rotateAtOffset(t,f,l,v)}Cf.prototype.postCompose.apply(this,arguments)};nu.prototype.renderFeature=function(t,i,s,e){if(!s){return false}var r=false;if(Array.isArray(s)){for(var n=0,h=s.length;n<h;++n){r=su.renderFeature(e,t,s[n],i,this.handleStyleImageChange_,this)||r}}else{r=su.renderFeature(e,t,s,i,this.handleStyleImageChange_,this)}return r};nu.prototype.renderTileImage_=function(t,i,s){var e=this.getLayer();var r=t.getReplayState(e);var n=e.getRevision();var h=nu.IMAGE_REPLAYS[e.getRenderMode()];if(h&&r.renderedTileRevision!==n){r.renderedTileRevision=n;var a=t.wrappedTileCoord;var o=a[0];var f=i.pixelRatio;var u=e.getSource();var l=u.getTileGridForProjection(i.viewState.projection);var v=l.getResolution(o);var c=t.getContext(e);var d=u.getTilePixelSize(o,f,i.viewState.projection);c.canvas.width=d[0];c.canvas.height=d[1];var m=l.getTileCoordExtent(a);for(var p=0,_=t.tileKeys.length;p<_;++p){var g=t.getTile(t.tileKeys[p]);if(g.getState()==po.ERROR){continue}var M=f/v;var z=Ia.reset(this.tmpTransform_);Ia.scale(z,M,-M);Ia.translate(z,-m[0],-m[3]);var w=g.getReplayGroup(e,t.tileCoord.toString());w.replay(c,z,0,{},h)}}};var hu=function(t){this.source_=t};hu.prototype.getType=function(){};hu.prototype.getSource=function(){return this.source_};hu.prototype.isAnimated=wa.FALSE;var au=function(t){hu.call(this,t)};ta.inherits(au,hu);au.prototype.getType=function(){return Ya.FRAGMENT_SHADER};var ou=function(t){hu.call(this,t)};ta.inherits(ou,hu);ou.prototype.getType=function(){return Ya.VERTEX_SHADER};var fu={};fu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n float radius = length(windowCenter - windowOffset);\n float dist = length(windowCenter - gl_FragCoord.xy);\n if (dist > radius + v_halfWidth) {\n if (u_strokeColor.a == 0.0) {\n gl_FragColor = u_fillColor;\n } else {\n gl_FragColor = u_strokeColor;\n }\n gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n } else if (u_fillColor.a == 0.0) {\n // Hooray, no fill, just stroke. We can use real antialiasing.\n gl_FragColor = u_strokeColor;\n if (dist < radius - v_halfWidth) {\n gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n }\n } else {\n gl_FragColor = u_fillColor;\n float strokeDist = radius - v_halfWidth;\n float antialias = 2.0 * v_pixelRatio;\n if (dist > strokeDist) {\n gl_FragColor = u_strokeColor;\n } else if (dist >= strokeDist - antialias) {\n float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n }\n }\n gl_FragColor.a = gl_FragColor.a * u_opacity;\n if (gl_FragColor.a <= 0.0) {\n discard;\n }\n}\n":"precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}");fu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n v_pixelRatio = u_pixelRatio;\n float lineWidth = u_lineWidth * u_pixelRatio;\n v_halfWidth = lineWidth / 2.0;\n if (lineWidth == 0.0) {\n lineWidth = 2.0 * u_pixelRatio;\n }\n vec2 offset;\n // Radius with anitaliasing (roughly).\n float radius = a_radius + 3.0 * u_pixelRatio;\n // Until we get gl_VertexID in WebGL, we store an instruction.\n if (a_instruction == 0.0) {\n // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n offset = vec2(-1.0, 1.0);\n } else if (a_instruction == 1.0) {\n offset = vec2(-1.0, -1.0);\n } else if (a_instruction == 2.0) {\n offset = vec2(1.0, -1.0);\n } else {\n offset = vec2(1.0, 1.0);\n }\n\n gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n 0.0, 1.0)).xy;\n\n if (distance(v_center, v_offset) > 20000.0) {\n gl_Position = vec4(v_center, 0.0, 1.0);\n }\n}\n\n\n":"varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}");var uu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_lineWidth=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_lineWidth":"k");this.u_pixelRatio=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_pixelRatio":"l");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"m");this.u_fillColor=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_fillColor":"n");this.u_strokeColor=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_strokeColor":"o");this.u_size=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_size":"p");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"e");this.a_instruction=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_instruction":"f");this.a_radius=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_radius":"g")};var lu={};lu.create=function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};lu.fromTransform=function(t,i){t[0]=i[0];t[1]=i[1];t[4]=i[2];t[5]=i[3];t[12]=i[4];t[13]=i[5];return t};var vu=function(t,i){wf.call(this);this.tolerance=t;this.maxExtent=i;this.origin=Ma.getCenter(i);this.projectionMatrix_=Ia.create();this.offsetRotateMatrix_=Ia.create();this.offsetScaleMatrix_=Ia.create();this.tmpMat4_=lu.create();this.indices=[];this.indicesBuffer=null;this.startIndices=[];this.startIndicesFeature=[];this.vertices=[];this.verticesBuffer=null;this.lineStringReplay=undefined};ta.inherits(vu,wf);vu.prototype.getDeleteResourcesFunction=function(t){};vu.prototype.finish=function(t){};vu.prototype.setUpProgram=function(t,i,s,e){};vu.prototype.shutDownProgram=function(t,i){};vu.prototype.drawReplay=function(t,i,s,e){};vu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){};vu.prototype.drawHitDetectionReplay=function(t,i,s,e,r,n){if(!r){return this.drawHitDetectionReplayAll(t,i,s,e)}else{return this.drawHitDetectionReplayOneByOne(t,i,s,e,n)}};vu.prototype.drawHitDetectionReplayAll=function(t,i,s,e){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawReplay(t,i,s,true);var r=e(null);if(r){return r}else{return undefined}};vu.prototype.replay=function(t,i,s,e,r,n,h,a,o,f,u){var l=t.getGL();var v,c,d,m,p,_,g,M;if(this.lineStringReplay){v=l.isEnabled(l.STENCIL_TEST);c=l.getParameter(l.STENCIL_FUNC);d=l.getParameter(l.STENCIL_VALUE_MASK);m=l.getParameter(l.STENCIL_REF);p=l.getParameter(l.STENCIL_WRITEMASK);_=l.getParameter(l.STENCIL_FAIL);g=l.getParameter(l.STENCIL_PASS_DEPTH_PASS);M=l.getParameter(l.STENCIL_PASS_DEPTH_FAIL);l.enable(l.STENCIL_TEST);l.clear(l.STENCIL_BUFFER_BIT);l.stencilMask(255);l.stencilFunc(l.ALWAYS,1,255);l.stencilOp(l.KEEP,l.KEEP,l.REPLACE);this.lineStringReplay.replay(t,i,s,e,r,n,h,a,o,f,u);l.stencilMask(0);l.stencilFunc(l.NOTEQUAL,1,255)}t.bindBuffer(Ya.ARRAY_BUFFER,this.verticesBuffer);t.bindBuffer(Ya.ELEMENT_ARRAY_BUFFER,this.indicesBuffer);var z=this.setUpProgram(l,t,r,n);var w=Ia.reset(this.projectionMatrix_);Ia.scale(w,2/(s*r[0]),2/(s*r[1]));Ia.rotate(w,-e);Ia.translate(w,-(i[0]-this.origin[0]),-(i[1]-this.origin[1]));var y=Ia.reset(this.offsetScaleMatrix_);Ia.scale(y,2/r[0],2/r[1]);var b=Ia.reset(this.offsetRotateMatrix_);if(e!==0){Ia.rotate(b,-e)}l.uniformMatrix4fv(z.u_projectionMatrix,false,lu.fromTransform(this.tmpMat4_,w));l.uniformMatrix4fv(z.u_offsetScaleMatrix,false,lu.fromTransform(this.tmpMat4_,y));l.uniformMatrix4fv(z.u_offsetRotateMatrix,false,lu.fromTransform(this.tmpMat4_,b));l.uniform1f(z.u_opacity,h);var x;if(o===undefined){this.drawReplay(l,t,a,false)}else{x=this.drawHitDetectionReplay(l,t,a,o,f,u)}this.shutDownProgram(l,z);if(this.lineStringReplay){if(!v){l.disable(l.STENCIL_TEST)}l.clear(l.STENCIL_BUFFER_BIT);l.stencilFunc(c,m,d);l.stencilMask(p);l.stencilOp(_,M,g)}return x};vu.prototype.drawElements=function(t,i,s,e){var r=i.hasOESElementIndexUint?Ya.UNSIGNED_INT:Ya.UNSIGNED_SHORT;var n=i.hasOESElementIndexUint?4:2;var h=e-s;var a=s*n;t.drawElements(Ya.TRIANGLES,h,r,a)};var cu={};cu.defaultFont="10px sans-serif";cu.defaultFillStyle=[0,0,0,1];cu.defaultLineCap="round";cu.defaultLineDash=[];cu.defaultLineDashOffset=0;cu.defaultLineJoin="round";cu.defaultMiterLimit=10;cu.defaultStrokeStyle=[0,0,0,1];cu.defaultTextAlign=.5;cu.defaultTextBaseline=.5;cu.defaultLineWidth=1;cu.triangleIsCounterClockwise=function(t,i,s,e,r,n){var h=(s-t)*(n-i)-(r-t)*(e-i);return h<=cu.EPSILON&&h>=-cu.EPSILON?undefined:h>0};cu.EPSILON=Number.EPSILON||2220446049250313e-31;var du=function(t,i){this.arr_=t!==undefined?t:[];this.usage_=i!==undefined?i:du.Usage_.STATIC_DRAW};du.prototype.getArray=function(){return this.arr_};du.prototype.getUsage=function(){return this.usage_};du.Usage_={STATIC_DRAW:Ya.STATIC_DRAW,STREAM_DRAW:Ya.STREAM_DRAW,DYNAMIC_DRAW:Ya.DYNAMIC_DRAW};var mu=function(t,i){vu.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.radius_=0;this.state_={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:undefined,lineWidth:undefined,changed:false}};ta.inherits(mu,vu);mu.prototype.drawCoordinates_=function(t,i,s,e){var r=this.vertices.length;var n=this.indices.length;var h=r/4;var a,o;for(a=i,o=s;a<o;a+=e){this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=0;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=1;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=2;this.vertices[r++]=this.radius_;this.vertices[r++]=t[a];this.vertices[r++]=t[a+1];this.vertices[r++]=3;this.vertices[r++]=this.radius_;this.indices[n++]=h;this.indices[n++]=h+1;this.indices[n++]=h+2;this.indices[n++]=h+2;this.indices[n++]=h+3;this.indices[n++]=h;h+=4}};mu.prototype.drawCircle=function(t,i){var s=t.getRadius();var e=t.getStride();if(s){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.radius_=s;var r=t.getFlatCoordinates();r=ya.translate(r,0,2,e,-this.origin[0],-this.origin[1]);this.drawCoordinates_(r,0,2,e)}else{if(this.state_.changed){this.styles_.pop();if(this.styles_.length){var n=this.styles_[this.styles_.length-1];this.state_.fillColor=n[0];this.state_.strokeColor=n[1];this.state_.lineWidth=n[2];this.state_.changed=false}}}};mu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};mu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;return function(){t.deleteBuffer(i);t.deleteBuffer(s)}};mu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=fu.fragment;n=fu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new uu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,16,0);t.enableVertexAttribArray(a.a_instruction);t.vertexAttribPointer(a.a_instruction,1,Ya.FLOAT,false,16,8);t.enableVertexAttribArray(a.a_radius);t.vertexAttribPointer(a.a_radius,1,Ya.FLOAT,false,16,12);t.uniform2fv(a.u_size,s);t.uniform1f(a.u_pixelRatio,e);return a};mu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_instruction);t.disableVertexAttribArray(i.a_radius)};mu.prototype.drawReplay=function(t,i,s,e){if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var r,n,h,a;h=this.startIndices[this.startIndices.length-1];for(r=this.styleIndices_.length-1;r>=0;--r){n=this.styleIndices_[r];a=this.styles_[r];this.setFillStyle_(t,a[0]);this.setStrokeStyle_(t,a[1],a[2]);this.drawElements(t,i,n,h);h=n}}};mu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setFillStyle_(t,o[0]);this.setStrokeStyle_(t,o[1],o[2]);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};mu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setFillStyle_(t,h[0]);this.setStrokeStyle_(t,h[1],h[2]);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n)}r=n=a}};mu.prototype.setFillStyle_=function(t,i){t.uniform4fv(this.defaultLocations_.u_fillColor,i)};mu.prototype.setStrokeStyle_=function(t,i,s){t.uniform4fv(this.defaultLocations_.u_strokeColor,i);t.uniform1f(this.defaultLocations_.u_lineWidth,s)};mu.prototype.setFillStrokeStyle=function(t,i){var s,e;if(i){var r=i.getLineDash();this.state_.lineDash=r?r:cu.defaultLineDash;var n=i.getLineDashOffset();this.state_.lineDashOffset=n?n:cu.defaultLineDashOffset;s=i.getColor();if(!(s instanceof CanvasGradient)&&!(s instanceof CanvasPattern)){s=Mf.asArray(s).map((function(t,i){return i!=3?t/255:t}))||cu.defaultStrokeStyle}else{s=cu.defaultStrokeStyle}e=i.getWidth();e=e!==undefined?e:cu.defaultLineWidth}else{s=[0,0,0,0];e=0}var h=t?t.getColor():[0,0,0,0];if(!(h instanceof CanvasGradient)&&!(h instanceof CanvasPattern)){h=Mf.asArray(h).map((function(t,i){return i!=3?t/255:t}))||cu.defaultFillStyle}else{h=cu.defaultFillStyle}if(!this.state_.strokeColor||!pa.equals(this.state_.strokeColor,s)||!this.state_.fillColor||!pa.equals(this.state_.fillColor,h)||this.state_.lineWidth!==e){this.state_.changed=true;this.state_.fillColor=h;this.state_.strokeColor=s;this.state_.lineWidth=e;this.styles_.push([h,s,e])}};var pu={};pu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n float alpha = texColor.a * v_opacity * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");pu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n if (a_rotateWithView == 1.0) {\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n }\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n v_texCoord = a_texCoord;\n v_opacity = a_opacity;\n}\n\n\n":"varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}");var _u=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"k");this.u_image=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_image":"l");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"c");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"d");this.a_offsets=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_offsets":"e");this.a_opacity=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_opacity":"f");this.a_rotateWithView=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_rotateWithView":"g")};var gu={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};var Mu=function(t,i){this.canvas_=t;this.gl_=i;this.bufferCache_={};this.shaderCache_={};this.programCache_={};this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null;this.hasOESElementIndexUint=pa.includes(ta.WEBGL_EXTENSIONS,"OES_element_index_uint");if(this.hasOESElementIndexUint){i.getExtension("OES_element_index_uint")}ra.listen(this.canvas_,gu.LOST,this.handleWebGLContextLost,this);ra.listen(this.canvas_,gu.RESTORED,this.handleWebGLContextRestored,this)};ta.inherits(Mu,na);Mu.prototype.bindBuffer=function(t,i){var s=this.getGL();var e=i.getArray();var r=String(ta.getUid(i));if(r in this.bufferCache_){var n=this.bufferCache_[r];s.bindBuffer(t,n.buffer)}else{var h=s.createBuffer();s.bindBuffer(t,h);var a;if(t==Ya.ARRAY_BUFFER){a=new Float32Array(e)}else if(t==Ya.ELEMENT_ARRAY_BUFFER){a=this.hasOESElementIndexUint?new Uint32Array(e):new Uint16Array(e)}s.bufferData(t,a,i.getUsage());this.bufferCache_[r]={buf:i,buffer:h}}};Mu.prototype.deleteBuffer=function(t){var i=this.getGL();var s=String(ta.getUid(t));var e=this.bufferCache_[s];if(!i.isContextLost()){i.deleteBuffer(e.buffer)}delete this.bufferCache_[s]};Mu.prototype.disposeInternal=function(){ra.unlistenAll(this.canvas_);var t=this.getGL();if(!t.isContextLost()){var i;for(i in this.bufferCache_){t.deleteBuffer(this.bufferCache_[i].buffer)}for(i in this.programCache_){t.deleteProgram(this.programCache_[i])}for(i in this.shaderCache_){t.deleteShader(this.shaderCache_[i])}t.deleteFramebuffer(this.hitDetectionFramebuffer_);t.deleteRenderbuffer(this.hitDetectionRenderbuffer_);t.deleteTexture(this.hitDetectionTexture_)}};Mu.prototype.getCanvas=function(){return this.canvas_};Mu.prototype.getGL=function(){return this.gl_};Mu.prototype.getHitDetectionFramebuffer=function(){if(!this.hitDetectionFramebuffer_){this.initHitDetectionFramebuffer_()}return this.hitDetectionFramebuffer_};Mu.prototype.getShader=function(t){var i=String(ta.getUid(t));if(i in this.shaderCache_){return this.shaderCache_[i]}else{var s=this.getGL();var e=s.createShader(t.getType());s.shaderSource(e,t.getSource());s.compileShader(e);this.shaderCache_[i]=e;return e}};Mu.prototype.getProgram=function(t,i){var s=ta.getUid(t)+"/"+ta.getUid(i);if(s in this.programCache_){return this.programCache_[s]}else{var e=this.getGL();var r=e.createProgram();e.attachShader(r,this.getShader(t));e.attachShader(r,this.getShader(i));e.linkProgram(r);this.programCache_[s]=r;return r}};Mu.prototype.handleWebGLContextLost=function(){ea.clear(this.bufferCache_);ea.clear(this.shaderCache_);ea.clear(this.programCache_);this.currentProgram_=null;this.hitDetectionFramebuffer_=null;this.hitDetectionTexture_=null;this.hitDetectionRenderbuffer_=null};Mu.prototype.handleWebGLContextRestored=function(){};Mu.prototype.initHitDetectionFramebuffer_=function(){var t=this.gl_;var i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i);var s=Mu.createEmptyTexture(t,1,1);var e=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,e);t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,1,1);t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e);t.bindTexture(t.TEXTURE_2D,null);t.bindRenderbuffer(t.RENDERBUFFER,null);t.bindFramebuffer(t.FRAMEBUFFER,null);this.hitDetectionFramebuffer_=i;this.hitDetectionTexture_=s;this.hitDetectionRenderbuffer_=e};Mu.prototype.useProgram=function(t){if(t==this.currentProgram_){return false}else{var i=this.getGL();i.useProgram(t);this.currentProgram_=t;return true}};Mu.createTexture_=function(t,i,s){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR);if(i!==undefined){t.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_S,i)}if(s!==undefined){t.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_T,s)}return e};Mu.createEmptyTexture=function(t,i,s,e,r){var n=Mu.createTexture_(t,e,r);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i,s,0,t.RGBA,t.UNSIGNED_BYTE,null);return n};Mu.createTexture=function(t,i,s,e){var r=Mu.createTexture_(t,s,e);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i);return r};var zu=function(t,i){vu.call(this,t,i);this.anchorX=undefined;this.anchorY=undefined;this.groupIndices=[];this.hitDetectionGroupIndices=[];this.height=undefined;this.imageHeight=undefined;this.imageWidth=undefined;this.defaultLocations=null;this.opacity=undefined;this.originX=undefined;this.originY=undefined;this.rotateWithView=undefined;this.rotation=undefined;this.scale=undefined;this.width=undefined};ta.inherits(zu,vu);zu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;var e=this.getTextures(true);var r=t.getGL();return function(){if(!r.isContextLost()){var n,h;for(n=0,h=e.length;n<h;++n){r.deleteTexture(e[n])}}t.deleteBuffer(i);t.deleteBuffer(s)}};zu.prototype.drawCoordinates=function(t,i,s,e){var r=this.anchorX;var n=this.anchorY;var h=this.height;var a=this.imageHeight;var o=this.imageWidth;var f=this.opacity;var u=this.originX;var l=this.originY;var v=this.rotateWithView?1:0;var c=-this.rotation;var d=this.scale;var m=this.width;var p=Math.cos(c);var _=Math.sin(c);var g=this.indices.length;var M=this.vertices.length;var z,w,y,b,x,E;for(z=i;z<s;z+=e){x=t[z]-this.origin[0];E=t[z+1]-this.origin[1];w=M/8;y=-d*r;b=-d*(h-n);this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=u/o;this.vertices[M++]=(l+h)/a;this.vertices[M++]=f;this.vertices[M++]=v;y=d*(m-r);b=-d*(h-n);this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=(u+m)/o;this.vertices[M++]=(l+h)/a;this.vertices[M++]=f;this.vertices[M++]=v;y=d*(m-r);b=d*n;this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=(u+m)/o;this.vertices[M++]=l/a;this.vertices[M++]=f;this.vertices[M++]=v;y=-d*r;b=d*n;this.vertices[M++]=x;this.vertices[M++]=E;this.vertices[M++]=y*p-b*_;this.vertices[M++]=y*_+b*p;this.vertices[M++]=u/o;this.vertices[M++]=l/a;this.vertices[M++]=f;this.vertices[M++]=v;this.indices[g++]=w;this.indices[g++]=w+1;this.indices[g++]=w+2;this.indices[g++]=w;this.indices[g++]=w+2;this.indices[g++]=w+3}return M};zu.prototype.createTextures=function(t,i,s,e){var r,n,h,a;var o=i.length;for(a=0;a<o;++a){n=i[a];h=ta.getUid(n).toString();if(h in s){r=s[h]}else{r=Mu.createTexture(e,n,Ya.CLAMP_TO_EDGE,Ya.CLAMP_TO_EDGE);s[h]=r}t[a]=r}};zu.prototype.setUpProgram=function(t,i,s,e){var r=pu.fragment;var n=pu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations){a=new _u(t,h);this.defaultLocations=a}else{a=this.defaultLocations}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,32,0);t.enableVertexAttribArray(a.a_offsets);t.vertexAttribPointer(a.a_offsets,2,Ya.FLOAT,false,32,8);t.enableVertexAttribArray(a.a_texCoord);t.vertexAttribPointer(a.a_texCoord,2,Ya.FLOAT,false,32,16);t.enableVertexAttribArray(a.a_opacity);t.vertexAttribPointer(a.a_opacity,1,Ya.FLOAT,false,32,24);t.enableVertexAttribArray(a.a_rotateWithView);t.vertexAttribPointer(a.a_rotateWithView,1,Ya.FLOAT,false,32,28);return a};zu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_offsets);t.disableVertexAttribArray(i.a_texCoord);t.disableVertexAttribArray(i.a_opacity);t.disableVertexAttribArray(i.a_rotateWithView)};zu.prototype.drawReplay=function(t,i,s,e){var r=e?this.getHitDetectionTextures():this.getTextures();var n=e?this.hitDetectionGroupIndices:this.groupIndices;if(!ea.isEmpty(s)){this.drawReplaySkipping(t,i,s,r,n)}else{var h,a,o;for(h=0,a=r.length,o=0;h<a;++h){t.bindTexture(Ya.TEXTURE_2D,r[h]);var f=n[h];this.drawElements(t,i,o,f);o=f}}};zu.prototype.drawReplaySkipping=function(t,i,s,e,r){var n=0;var h,a;for(h=0,a=e.length;h<a;++h){t.bindTexture(Ya.TEXTURE_2D,e[h]);var o=h>0?r[h-1]:0;var f=r[h];var u=o;var l=o;while(n<this.startIndices.length&&this.startIndices[n]<=f){var v=this.startIndicesFeature[n];var c=ta.getUid(v).toString();if(s[c]!==undefined){if(u!==l){this.drawElements(t,i,u,l)}u=n===this.startIndices.length-1?f:this.startIndices[n+1];l=u}else{l=n===this.startIndices.length-1?f:this.startIndices[n+1]}n++}if(u!==l){this.drawElements(t,i,u,l)}}};zu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u;var l=this.startIndices.length-1;var v=this.getHitDetectionTextures();for(n=v.length-1;n>=0;--n){t.bindTexture(Ya.TEXTURE_2D,v[n]);h=n>0?this.hitDetectionGroupIndices[n-1]:0;o=this.hitDetectionGroupIndices[n];while(l>=0&&this.startIndices[l]>=h){a=this.startIndices[l];f=this.startIndicesFeature[l];u=ta.getUid(f).toString();if(s[u]===undefined&&f.getGeometry()&&(r===undefined||Ma.intersects(r,f.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,a,o);var c=e(f);if(c){return c}}o=a;l--}}return undefined};zu.prototype.finish=function(t){this.anchorX=undefined;this.anchorY=undefined;this.height=undefined;this.imageHeight=undefined;this.imageWidth=undefined;this.indices=null;this.opacity=undefined;this.originX=undefined;this.originY=undefined;this.rotateWithView=undefined;this.rotation=undefined;this.scale=undefined;this.vertices=null;this.width=undefined};zu.prototype.getTextures=function(t){};zu.prototype.getHitDetectionTextures=function(){};var wu=function(t,i){zu.call(this,t,i);this.images_=[];this.hitDetectionImages_=[];this.textures_=[];this.hitDetectionTextures_=[]};ta.inherits(wu,zu);wu.prototype.drawMultiPoint=function(t,i){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var s=t.getFlatCoordinates();var e=t.getStride();this.drawCoordinates(s,0,s.length,e)};wu.prototype.drawPoint=function(t,i){this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var s=t.getFlatCoordinates();var e=t.getStride();this.drawCoordinates(s,0,s.length,e)};wu.prototype.finish=function(t){var i=t.getGL();this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices.push(this.indices.length);this.verticesBuffer=new du(this.vertices);var s=this.indices;this.indicesBuffer=new du(s);var e={};this.createTextures(this.textures_,this.images_,e,i);this.createTextures(this.hitDetectionTextures_,this.hitDetectionImages_,e,i);this.images_=null;this.hitDetectionImages_=null;zu.prototype.finish.call(this,t)};wu.prototype.setImageStyle=function(t){var i=t.getAnchor();var s=t.getImage(1);var e=t.getImageSize();var r=t.getHitDetectionImage(1);var n=t.getOpacity();var h=t.getOrigin();var a=t.getRotateWithView();var o=t.getRotation();var f=t.getSize();var u=t.getScale();var l;if(this.images_.length===0){this.images_.push(s)}else{l=this.images_[this.images_.length-1];if(ta.getUid(l)!=ta.getUid(s)){this.groupIndices.push(this.indices.length);this.images_.push(s)}}if(this.hitDetectionImages_.length===0){this.hitDetectionImages_.push(r)}else{l=this.hitDetectionImages_[this.hitDetectionImages_.length-1];if(ta.getUid(l)!=ta.getUid(r)){this.hitDetectionGroupIndices.push(this.indices.length);this.hitDetectionImages_.push(r)}}this.anchorX=i[0];this.anchorY=i[1];this.height=f[1];this.imageHeight=e[1];this.imageWidth=e[0];this.opacity=n;this.originX=h[0];this.originY=h[1];this.rotation=o;this.rotateWithView=a;this.scale=u;this.width=f[0]};wu.prototype.getTextures=function(t){return t?this.textures_.concat(this.hitDetectionTextures_):this.textures_};wu.prototype.getHitDetectionTextures=function(){return this.hitDetectionTextures_};var yu={};yu.lineStringIsClosed=function(t,i,s,e){var r=s-e;if(t[i]===t[r]&&t[i+1]===t[r+1]&&(s-i)/e>3){return!!Ra.linearRing(t,i,s,e)}return false};var bu={};bu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n if (v_round > 0.0) {\n vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n discard;\n }\n }\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");bu.vertex=new ou(ta.DEBUG_WEBGL?"varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n float epsilon = 0.000000000001;\n return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n vec2 dirVect = nextP - a_position;\n vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n float halfWidth = u_lineWidth / 2.0;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_nextPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n round = 0.0;\n if (isRound) {\n round = 1.0;\n } else if (miterLength > u_miterLimit + u_lineWidth) {\n offset = halfWidth * tmpNormal * direction;\n }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n bool degenerate = false;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_lastPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n vec2 longOffset, shortOffset, longVertex;\n vec4 shortProjVertex;\n float halfWidth = u_lineWidth / 2.0;\n if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n longOffset = tmpNormal * direction * halfWidth;\n shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_nextPos;\n shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n } else {\n shortOffset = tmpNormal * direction * halfWidth;\n longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_lastPos;\n shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n }\n //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n float epsilon = 0.000000000001;\n if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n offset = shortProjVertex.xy;\n degenerate = true;\n } else {\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n }\n return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n in float turnDir, in float direction) {\n round = 0.0;\n vec2 dirVect = a_position - nextP;\n vec2 firstNormal = normalize(dirVect);\n vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n vec2 hypotenuse = normalize(firstNormal - secondNormal);\n vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n offset = normal * length;\n if (isRound) {\n round = 1.0;\n }\n}\n\nvoid main(void) {\n bool degenerate = false;\n float direction = float(sign(a_direction));\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n vec2 offset;\n vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n v_round = 0.0;\n v_halfWidth = u_lineWidth / 2.0;\n v_roundVertex = projPos.xy;\n\n if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n alongNormal(offset, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n alongNormal(offset, a_lastPos, -1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n miterUp(offset, v_round, round, direction);\n } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n }\n if (!degenerate) {\n vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n gl_Position = projPos + offsets;\n } else {\n gl_Position = vec4(offset, 0.0, 1.0);\n }\n}\n\n\n":"varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}");var xu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"h");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"i");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"j");this.u_lineWidth=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_lineWidth":"k");this.u_miterLimit=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_miterLimit":"l");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"m");this.u_color=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_color":"n");this.u_size=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_size":"o");this.u_pixelRatio=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_pixelRatio":"p");this.a_lastPos=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_lastPos":"d");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"e");this.a_nextPos=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_nextPos":"f");this.a_direction=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_direction":"g")};var Eu=function(t,i){vu.call(this,t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:undefined,miterLimit:undefined,changed:false}};ta.inherits(Eu,vu);Eu.prototype.drawCoordinates_=function(t,i,s,e){var r,n;var h=this.vertices.length;var a=this.indices.length;var o=this.state_.lineJoin==="bevel"?0:this.state_.lineJoin==="miter"?1:2;var f=this.state_.lineCap==="butt"?0:this.state_.lineCap==="square"?1:2;var u=yu.lineStringIsClosed(t,i,s,e);var l,v,c;var d=a;var m=1;var p,_,g;for(r=i,n=s;r<n;r+=e){c=h/7;p=_;_=g||[t[r],t[r+1]];if(r===i){g=[t[r+e],t[r+e+1]];if(s-i===e*2&&pa.equals(_,g)){break}if(u){p=[t[s-e*2],t[s-e*2+1]];l=g}else{if(f){h=this.addVertices_([0,0],_,g,m*Eu.Instruction_.BEGIN_LINE_CAP*f,h);h=this.addVertices_([0,0],_,g,-m*Eu.Instruction_.BEGIN_LINE_CAP*f,h);this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=c+1;this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c+2}h=this.addVertices_([0,0],_,g,m*Eu.Instruction_.BEGIN_LINE*(f||1),h);h=this.addVertices_([0,0],_,g,-m*Eu.Instruction_.BEGIN_LINE*(f||1),h);d=h/7-1;continue}}else if(r===s-e){if(u){g=l;break}else{p=p||[0,0];h=this.addVertices_(p,_,[0,0],m*Eu.Instruction_.END_LINE*(f||1),h);h=this.addVertices_(p,_,[0,0],-m*Eu.Instruction_.END_LINE*(f||1),h);this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=d;this.indices[a++]=c+1;this.indices[a++]=c;if(f){h=this.addVertices_(p,_,[0,0],m*Eu.Instruction_.END_LINE_CAP*f,h);h=this.addVertices_(p,_,[0,0],-m*Eu.Instruction_.END_LINE_CAP*f,h);this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=c+1;this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c+2}break}}else{g=[t[r+e],t[r+e+1]]}v=cu.triangleIsCounterClockwise(p[0],p[1],_[0],_[1],g[0],g[1])?-1:1;h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_FIRST*(o||1),h);h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_SECOND*(o||1),h);h=this.addVertices_(p,_,g,-v*Eu.Instruction_.MITER_BOTTOM*(o||1),h);if(r>i){this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=c+2;this.indices[a++]=c;this.indices[a++]=m*v>0?d:d-1}this.indices[a++]=c;this.indices[a++]=c+2;this.indices[a++]=c+1;d=c+2;m=v;if(o){h=this.addVertices_(p,_,g,v*Eu.Instruction_.MITER_TOP*o,h);this.indices[a++]=c+1;this.indices[a++]=c+3;this.indices[a++]=c}}if(u){c=c||h/7;v=Ha.linearRingIsClockwise([p[0],p[1],_[0],_[1],g[0],g[1]],0,6,2)?1:-1;h=this.addVertices_(p,_,g,v*Eu.Instruction_.BEVEL_FIRST*(o||1),h);h=this.addVertices_(p,_,g,-v*Eu.Instruction_.MITER_BOTTOM*(o||1),h);this.indices[a++]=c;this.indices[a++]=d-1;this.indices[a++]=d;this.indices[a++]=c+1;this.indices[a++]=c;this.indices[a++]=m*v>0?d:d-1}};Eu.prototype.addVertices_=function(t,i,s,e,r){this.vertices[r++]=t[0];this.vertices[r++]=t[1];this.vertices[r++]=i[0];this.vertices[r++]=i[1];this.vertices[r++]=s[0];this.vertices[r++]=s[1];this.vertices[r++]=e;return r};Eu.prototype.isValid_=function(t,i,s,e){var r=s-i;if(r<e*2){return false}else if(r===e*2){var n=[t[i],t[i+1]];var h=[t[i+e],t[i+e+1]];return!pa.equals(n,h)}return true};Eu.prototype.drawLineString=function(t,i){var s=t.getFlatCoordinates();var e=t.getStride();if(this.isValid_(s,0,s.length,e)){s=ya.translate(s,0,s.length,e,-this.origin[0],-this.origin[1]);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);this.drawCoordinates_(s,0,s.length,e)}};Eu.prototype.drawMultiLineString=function(t,i){var s=this.indices.length;var e=t.getEnds();e.unshift(0);var r=t.getFlatCoordinates();var n=t.getStride();var h,a;if(e.length>1){for(h=1,a=e.length;h<a;++h){if(this.isValid_(r,e[h-1],e[h],n)){var o=ya.translate(r,e[h-1],e[h],n,-this.origin[0],-this.origin[1]);this.drawCoordinates_(o,0,o.length,n)}}}if(this.indices.length>s){this.startIndices.push(s);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(s);this.state_.changed=false}}};Eu.prototype.drawPolygonCoordinates=function(t,i,s){if(!yu.lineStringIsClosed(t,0,t.length,s)){t.push(t[0]);t.push(t[1])}this.drawCoordinates_(t,0,t.length,s);if(i.length){var e,r;for(e=0,r=i.length;e<r;++e){if(!yu.lineStringIsClosed(i[e],0,i[e].length,s)){i[e].push(i[e][0]);i[e].push(i[e][1])}this.drawCoordinates_(i[e],0,i[e].length,s)}}};Eu.prototype.setPolygonStyle=function(t,i){var s=i===undefined?this.indices.length:i;this.startIndices.push(s);this.startIndicesFeature.push(t);if(this.state_.changed){this.styleIndices_.push(s);this.state_.changed=false}};Eu.prototype.getCurrentIndex=function(){return this.indices.length};Eu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};Eu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;return function(){t.deleteBuffer(i);t.deleteBuffer(s)}};Eu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=bu.fragment;n=bu.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new xu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_lastPos);t.vertexAttribPointer(a.a_lastPos,2,Ya.FLOAT,false,28,0);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,28,8);t.enableVertexAttribArray(a.a_nextPos);t.vertexAttribPointer(a.a_nextPos,2,Ya.FLOAT,false,28,16);t.enableVertexAttribArray(a.a_direction);t.vertexAttribPointer(a.a_direction,1,Ya.FLOAT,false,28,24);t.uniform2fv(a.u_size,s);t.uniform1f(a.u_pixelRatio,e);return a};Eu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_lastPos);t.disableVertexAttribArray(i.a_position);t.disableVertexAttribArray(i.a_nextPos);t.disableVertexAttribArray(i.a_direction)};Eu.prototype.drawReplay=function(t,i,s,e){var r=t.getParameter(t.DEPTH_FUNC);var n=t.getParameter(t.DEPTH_WRITEMASK);if(!e){t.enable(t.DEPTH_TEST);t.depthMask(true);t.depthFunc(t.NOTEQUAL)}if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var h,a,o,f;o=this.startIndices[this.startIndices.length-1];for(h=this.styleIndices_.length-1;h>=0;--h){a=this.styleIndices_[h];f=this.styles_[h];this.setStrokeStyle_(t,f[0],f[1],f[2]);this.drawElements(t,i,a,o);t.clear(t.DEPTH_BUFFER_BIT);o=a}}if(!e){t.disable(t.DEPTH_TEST);t.clear(t.DEPTH_BUFFER_BIT);t.depthMask(n);t.depthFunc(r)}};Eu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setStrokeStyle_(t,h[0],h[1],h[2]);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}r=n=a}};Eu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setStrokeStyle_(t,o[0],o[1],o[2]);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};Eu.prototype.setStrokeStyle_=function(t,i,s,e){t.uniform4fv(this.defaultLocations_.u_color,i);t.uniform1f(this.defaultLocations_.u_lineWidth,s);t.uniform1f(this.defaultLocations_.u_miterLimit,e)};Eu.prototype.setFillStrokeStyle=function(t,i){var s=i.getLineCap();this.state_.lineCap=s!==undefined?s:cu.defaultLineCap;var e=i.getLineDash();this.state_.lineDash=e?e:cu.defaultLineDash;var r=i.getLineDashOffset();this.state_.lineDashOffset=r?r:cu.defaultLineDashOffset;var n=i.getLineJoin();this.state_.lineJoin=n!==undefined?n:cu.defaultLineJoin;var h=i.getColor();if(!(h instanceof CanvasGradient)&&!(h instanceof CanvasPattern)){h=Mf.asArray(h).map((function(t,i){return i!=3?t/255:t}))||cu.defaultStrokeStyle}else{h=cu.defaultStrokeStyle}var a=i.getWidth();a=a!==undefined?a:cu.defaultLineWidth;var o=i.getMiterLimit();o=o!==undefined?o:cu.defaultMiterLimit;if(!this.state_.strokeColor||!pa.equals(this.state_.strokeColor,h)||this.state_.lineWidth!==a||this.state_.miterLimit!==o){this.state_.changed=true;this.state_.strokeColor=h;this.state_.lineWidth=a;this.state_.miterLimit=o;this.styles_.push([h,a,o])}};Eu.Instruction_={ROUND:2,BEGIN_LINE:3,END_LINE:5,BEGIN_LINE_CAP:7,END_LINE_CAP:11,BEVEL_FIRST:13,BEVEL_SECOND:17,MITER_BOTTOM:19,MITER_TOP:23};var Su={};Su.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}");Su.vertex=new ou(ta.DEBUG_WEBGL?"\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n":"attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}");var Gu=function(t,i){this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"b");this.u_offsetScaleMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetScaleMatrix":"c");this.u_offsetRotateMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_offsetRotateMatrix":"d");this.u_color=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_color":"e");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"f");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"a")};var Pu=function(t){var i=t||{};this.color_=i.color!==undefined?i.color:null;this.lineCap_=i.lineCap;this.lineDash_=i.lineDash!==undefined?i.lineDash:null;this.lineDashOffset_=i.lineDashOffset;this.lineJoin_=i.lineJoin;this.miterLimit_=i.miterLimit;this.width_=i.width;this.checksum_=undefined};Pu.prototype.clone=function(){var t=this.getColor();return new Pu({color:t&&t.slice?t.slice():t||undefined,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():undefined,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})};Pu.prototype.getColor=function(){return this.color_};Pu.prototype.getLineCap=function(){return this.lineCap_};Pu.prototype.getLineDash=function(){return this.lineDash_};Pu.prototype.getLineDashOffset=function(){return this.lineDashOffset_};Pu.prototype.getLineJoin=function(){return this.lineJoin_};Pu.prototype.getMiterLimit=function(){return this.miterLimit_};Pu.prototype.getWidth=function(){return this.width_};Pu.prototype.setColor=function(t){this.color_=t;this.checksum_=undefined};Pu.prototype.setLineCap=function(t){this.lineCap_=t;this.checksum_=undefined};Pu.prototype.setLineDash=function(t){this.lineDash_=t;this.checksum_=undefined};Pu.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t;this.checksum_=undefined};Pu.prototype.setLineJoin=function(t){this.lineJoin_=t;this.checksum_=undefined};Pu.prototype.setMiterLimit=function(t){this.miterLimit_=t;this.checksum_=undefined};Pu.prototype.setWidth=function(t){this.width_=t;this.checksum_=undefined};Pu.prototype.getChecksum=function(){if(this.checksum_===undefined){this.checksum_="s";if(this.color_){if(typeof this.color_==="string"){this.checksum_+=this.color_}else{this.checksum_+=ta.getUid(this.color_).toString()}}else{this.checksum_+="-"}this.checksum_+=","+(this.lineCap_!==undefined?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(this.lineDashOffset_!==undefined?this.lineDashOffset_:"-")+","+(this.lineJoin_!==undefined?this.lineJoin_:"-")+","+(this.miterLimit_!==undefined?this.miterLimit_.toString():"-")+","+(this.width_!==undefined?this.width_.toString():"-")}return this.checksum_};var ku=function(t){this.first_=undefined;this.last_=undefined;this.head_=undefined;this.circular_=t===undefined?true:t;this.length_=0};ku.prototype.insertItem=function(t){var i={prev:undefined,next:undefined,data:t};var s=this.head_;if(!s){this.first_=i;this.last_=i;if(this.circular_){i.next=i;i.prev=i}}else{var e=s.next;i.prev=s;i.next=e;s.next=i;if(e){e.prev=i}if(s===this.last_){this.last_=i}}this.head_=i;this.length_++};ku.prototype.removeItem=function(){var t=this.head_;if(t){var i=t.next;var s=t.prev;if(i){i.prev=s}if(s){s.next=i}this.head_=i||s;if(this.first_===this.last_){this.head_=undefined;this.first_=undefined;this.last_=undefined}else if(this.first_===t){this.first_=this.head_}else if(this.last_===t){this.last_=s?this.head_.prev:this.head_}this.length_--}};ku.prototype.firstItem=function(){this.head_=this.first_;if(this.head_){return this.head_.data}return undefined};ku.prototype.lastItem=function(){this.head_=this.last_;if(this.head_){return this.head_.data}return undefined};ku.prototype.nextItem=function(){if(this.head_&&this.head_.next){this.head_=this.head_.next;return this.head_.data}return undefined};ku.prototype.getNextItem=function(){if(this.head_&&this.head_.next){return this.head_.next.data}return undefined};ku.prototype.prevItem=function(){if(this.head_&&this.head_.prev){this.head_=this.head_.prev;return this.head_.data}return undefined};ku.prototype.getPrevItem=function(){if(this.head_&&this.head_.prev){return this.head_.prev.data}return undefined};ku.prototype.getCurrItem=function(){if(this.head_){return this.head_.data}return undefined};ku.prototype.setFirstItem=function(){if(this.circular_&&this.head_){this.first_=this.head_;this.last_=this.head_.prev}};ku.prototype.concat=function(t){if(t.head_){if(this.head_){var i=this.head_.next;this.head_.next=t.first_;t.first_.prev=this.head_;i.prev=t.last_;t.last_.next=i;this.length_+=t.length_}else{this.head_=t.head_;this.first_=t.first_;this.last_=t.last_;this.length_=t.length_}t.head_=undefined;t.first_=undefined;t.last_=undefined;t.length_=0}};ku.prototype.getLength=function(){return this.length_};var Nu=function(t){this.rbush_=jf(t);this.items_={}};Nu.prototype.insert=function(t,i){var s={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:i};this.rbush_.insert(s);this.items_[ta.getUid(i)]=s};Nu.prototype.load=function(t,i){var s=new Array(i.length);for(var e=0,r=i.length;e<r;e++){var n=t[e];var h=i[e];var a={minX:n[0],minY:n[1],maxX:n[2],maxY:n[3],value:h};s[e]=a;this.items_[ta.getUid(h)]=a}this.rbush_.load(s)};Nu.prototype.remove=function(t){var i=ta.getUid(t);var s=this.items_[i];delete this.items_[i];return this.rbush_.remove(s)!==null};Nu.prototype.update=function(t,i){var s=this.items_[ta.getUid(i)];var e=[s.minX,s.minY,s.maxX,s.maxY];if(!Ma.equals(e,t)){this.remove(i);this.insert(t,i)}};Nu.prototype.getAll=function(){var t=this.rbush_.all();return t.map((function(t){return t.value}))};Nu.prototype.getInExtent=function(t){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};var s=this.rbush_.search(i);return s.map((function(t){return t.value}))};Nu.prototype.forEach=function(t,i){return this.forEach_(this.getAll(),t,i)};Nu.prototype.forEachInExtent=function(t,i,s){return this.forEach_(this.getInExtent(t),i,s)};Nu.prototype.forEach_=function(t,i,s){var e;for(var r=0,n=t.length;r<n;r++){e=i.call(s,t[r]);if(e){return e}}return e};Nu.prototype.isEmpty=function(){return ea.isEmpty(this.items_)};Nu.prototype.clear=function(){this.rbush_.clear();this.items_={}};Nu.prototype.getExtent=function(t){var i=this.rbush_.data;return Ma.createOrUpdate(i.minX,i.minY,i.maxX,i.maxY,t)};Nu.prototype.concat=function(t){this.rbush_.load(t.rbush_.all());for(var i in t.items_){this.items_[i|0]=t.items_[i|0]}};var Iu=function(t,i){vu.call(this,t,i);this.lineStringReplay=new Eu(t,i);this.defaultLocations_=null;this.styles_=[];this.styleIndices_=[];this.state_={fillColor:null,changed:false}};ta.inherits(Iu,vu);Iu.prototype.drawCoordinates_=function(t,i,s){var e=new ku;var r=new Nu;this.processFlatCoordinates_(t,s,e,r,true);var n=this.getMaxCoords_(e);if(i.length){var h,a;var o=[];for(h=0,a=i.length;h<a;++h){var f={list:new ku,maxCoords:undefined,rtree:new Nu};o.push(f);this.processFlatCoordinates_(i[h],s,f.list,f.rtree,false);this.classifyPoints_(f.list,f.rtree,true);f.maxCoords=this.getMaxCoords_(f.list)}o.sort((function(t,i){return i.maxCoords[0]===t.maxCoords[0]?t.maxCoords[1]-i.maxCoords[1]:i.maxCoords[0]-t.maxCoords[0]}));for(h=0;h<o.length;++h){var u=o[h].list;var l=u.firstItem();var v=l;var c;do{if(this.getIntersections_(v,r).length){c=true;break}v=u.nextItem()}while(l!==v);if(!c){if(this.bridgeHole_(u,o[h].maxCoords[0],e,n[0],r)){r.concat(o[h].rtree);this.classifyPoints_(e,r,false)}}}}else{this.classifyPoints_(e,r,false)}this.triangulate_(e,r)};Iu.prototype.processFlatCoordinates_=function(t,i,s,e,r){var n=Ha.linearRingIsClockwise(t,0,t.length,i);var h,a;var o=this.vertices.length/2;var f;var u;var l;var v=[];var c=[];if(r===n){f=this.createPoint_(t[0],t[1],o++);u=f;for(h=i,a=t.length;h<a;h+=i){l=this.createPoint_(t[h],t[h+1],o++);c.push(this.insertItem_(u,l,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)]);u=l}c.push(this.insertItem_(l,f,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)])}else{var d=t.length-i;f=this.createPoint_(t[d],t[d+1],o++);u=f;for(h=d-i,a=0;h>=a;h-=i){l=this.createPoint_(t[h],t[h+1],o++);c.push(this.insertItem_(u,l,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)]);u=l}c.push(this.insertItem_(l,f,s));v.push([Math.min(u.x,l.x),Math.min(u.y,l.y),Math.max(u.x,l.x),Math.max(u.y,l.y)])}e.load(v,c)};Iu.prototype.getMaxCoords_=function(t){var i=t.firstItem();var s=i;var e=[s.p0.x,s.p0.y];do{s=t.nextItem();if(s.p0.x>e[0]){e=[s.p0.x,s.p0.y]}}while(s!==i);return e};Iu.prototype.classifyPoints_=function(t,i,s){var e=t.firstItem();var r=e;var n=t.nextItem();var h=false;do{var a=s?cu.triangleIsCounterClockwise(n.p1.x,n.p1.y,r.p1.x,r.p1.y,r.p0.x,r.p0.y):cu.triangleIsCounterClockwise(r.p0.x,r.p0.y,r.p1.x,r.p1.y,n.p1.x,n.p1.y);if(a===undefined){this.removeItem_(r,n,t,i);h=true;if(n===e){e=t.getNextItem()}n=r;t.prevItem()}else if(r.p1.reflex!==a){r.p1.reflex=a;h=true}r=n;n=t.nextItem()}while(r!==e);return h};Iu.prototype.bridgeHole_=function(t,i,s,e,r){var n=t.firstItem();while(n.p1.x!==i){n=t.nextItem()}var h=n.p1;var a={x:e,y:h.y,i:-1};var o=Infinity;var f,u,l;var v;var c=this.getIntersections_({p0:h,p1:a},r,true);for(f=0,u=c.length;f<u;++f){var d=c[f];var m=this.calculateIntersection_(h,a,d.p0,d.p1,true);var p=Math.abs(h.x-m[0]);if(p<o&&cu.triangleIsCounterClockwise(h.x,h.y,d.p0.x,d.p0.y,d.p1.x,d.p1.y)!==undefined){o=p;v={x:m[0],y:m[1],i:-1};n=d}}if(o===Infinity){return false}l=n.p1;if(o>0){var _=this.getPointsInTriangle_(h,v,n.p1,r);if(_.length){var g=Infinity;for(f=0,u=_.length;f<u;++f){var M=_[f];var z=Math.atan2(h.y-M.y,a.x-M.x);if(z<g||z===g&&M.x<l.x){g=z;l=M}}}}n=s.firstItem();while(n.p1.x!==l.x||n.p1.y!==l.y){n=s.nextItem()}var w={x:h.x,y:h.y,i:h.i,reflex:undefined};var y={x:n.p1.x,y:n.p1.y,i:n.p1.i,reflex:undefined};t.getNextItem().p0=w;this.insertItem_(h,n.p1,t,r);this.insertItem_(y,w,t,r);n.p1=y;t.setFirstItem();s.concat(t);return true};Iu.prototype.triangulate_=function(t,i){var s=false;var e=this.isSimple_(t,i);while(t.getLength()>3){if(e){if(!this.clipEars_(t,i,e,s)){if(!this.classifyPoints_(t,i,s)){if(!this.resolveSelfIntersections_(t,i,true)){break}}}}else{if(!this.clipEars_(t,i,e,s)){if(!this.classifyPoints_(t,i,s)){if(!this.resolveSelfIntersections_(t,i)){e=this.isSimple_(t,i);if(!e){this.splitPolygon_(t,i);break}else{s=!this.isClockwise_(t);this.classifyPoints_(t,i,s)}}}}}}if(t.getLength()===3){var r=this.indices.length;this.indices[r++]=t.getPrevItem().p0.i;this.indices[r++]=t.getCurrItem().p0.i;this.indices[r++]=t.getNextItem().p0.i}};Iu.prototype.clipEars_=function(t,i,s,e){var r=this.indices.length;var n=t.firstItem();var h=t.getPrevItem();var a=n;var o=t.nextItem();var f=t.getNextItem();var u,l,v;var c=false;do{u=a.p0;l=a.p1;v=o.p1;if(l.reflex===false){var d;if(s){d=this.getPointsInTriangle_(u,l,v,i,true).length===0}else{d=e?this.diagonalIsInside_(f.p1,v,l,u,h.p0):this.diagonalIsInside_(h.p0,u,l,v,f.p1)}if((s||this.getIntersections_({p0:u,p1:v},i).length===0)&&d){if(s||u.reflex===false||v.reflex===false||Ha.linearRingIsClockwise([h.p0.x,h.p0.y,u.x,u.y,l.x,l.y,v.x,v.y,f.p1.x,f.p1.y],0,10,2)===!e){this.indices[r++]=u.i;this.indices[r++]=l.i;this.indices[r++]=v.i;this.removeItem_(a,o,t,i);if(o===n){n=f}c=true}}}h=t.getPrevItem();a=t.getCurrItem();o=t.nextItem();f=t.getNextItem()}while(a!==n&&t.getLength()>3);return c};Iu.prototype.resolveSelfIntersections_=function(t,i,s){var e=t.firstItem();t.nextItem();var r=e;var n=t.nextItem();var h=false;do{var a=this.calculateIntersection_(r.p0,r.p1,n.p0,n.p1,s);if(a){var o=false;var f=this.vertices.length;var u=this.indices.length;var l=f/2;var v=t.prevItem();t.removeItem();i.remove(v);o=v===e;var c;if(s){if(a[0]===r.p0.x&&a[1]===r.p0.y){t.prevItem();c=r.p0;n.p0=c;i.remove(r);o=o||r===e}else{c=n.p1;r.p1=c;i.remove(n);o=o||n===e}t.removeItem()}else{c=this.createPoint_(a[0],a[1],l);r.p1=c;n.p0=c;i.update([Math.min(r.p0.x,r.p1.x),Math.min(r.p0.y,r.p1.y),Math.max(r.p0.x,r.p1.x),Math.max(r.p0.y,r.p1.y)],r);i.update([Math.min(n.p0.x,n.p1.x),Math.min(n.p0.y,n.p1.y),Math.max(n.p0.x,n.p1.x),Math.max(n.p0.y,n.p1.y)],n)}this.indices[u++]=v.p0.i;this.indices[u++]=v.p1.i;this.indices[u++]=c.i;h=true;if(o){break}}r=t.getPrevItem();n=t.nextItem()}while(r!==e);return h};Iu.prototype.isSimple_=function(t,i){var s=t.firstItem();var e=s;do{if(this.getIntersections_(e,i).length){return false}e=t.nextItem()}while(e!==s);return true};Iu.prototype.isClockwise_=function(t){var i=t.getLength()*2;var s=new Array(i);var e=t.firstItem();var r=e;var n=0;do{s[n++]=r.p0.x;s[n++]=r.p0.y;r=t.nextItem()}while(r!==e);return Ha.linearRingIsClockwise(s,0,i,2)};Iu.prototype.splitPolygon_=function(t,i){var s=t.firstItem();var e=s;do{var r=this.getIntersections_(e,i);if(r.length){var n=r[0];var h=this.vertices.length/2;var a=this.calculateIntersection_(e.p0,e.p1,n.p0,n.p1);var o=this.createPoint_(a[0],a[1],h);var f=new ku;var u=new Nu;this.insertItem_(o,e.p1,f,u);e.p1=o;i.update([Math.min(e.p0.x,o.x),Math.min(e.p0.y,o.y),Math.max(e.p0.x,o.x),Math.max(e.p0.y,o.y)],e);var l=t.nextItem();while(l!==n){this.insertItem_(l.p0,l.p1,f,u);i.remove(l);t.removeItem();l=t.getCurrItem()}this.insertItem_(n.p0,o,f,u);n.p0=o;i.update([Math.min(n.p1.x,o.x),Math.min(n.p1.y,o.y),Math.max(n.p1.x,o.x),Math.max(n.p1.y,o.y)],n);this.classifyPoints_(t,i,false);this.triangulate_(t,i);this.classifyPoints_(f,u,false);this.triangulate_(f,u);break}e=t.nextItem()}while(e!==s)};Iu.prototype.createPoint_=function(t,i,s){var e=this.vertices.length;this.vertices[e++]=t;this.vertices[e++]=i;var r={x:t,y:i,i:s,reflex:undefined};return r};Iu.prototype.insertItem_=function(t,i,s,e){var r={p0:t,p1:i};s.insertItem(r);if(e){e.insert([Math.min(t.x,i.x),Math.min(t.y,i.y),Math.max(t.x,i.x),Math.max(t.y,i.y)],r)}return r};Iu.prototype.removeItem_=function(t,i,s,e){if(s.getCurrItem()===i){s.removeItem();t.p1=i.p1;e.remove(i);e.update([Math.min(t.p0.x,t.p1.x),Math.min(t.p0.y,t.p1.y),Math.max(t.p0.x,t.p1.x),Math.max(t.p0.y,t.p1.y)],t)}};Iu.prototype.getPointsInTriangle_=function(t,i,s,e,r){var n,h,a,o;var f=[];var u=e.getInExtent([Math.min(t.x,i.x,s.x),Math.min(t.y,i.y,s.y),Math.max(t.x,i.x,s.x),Math.max(t.y,i.y,s.y)]);for(n=0,h=u.length;n<h;++n){for(a in u[n]){o=u[n][a];if(typeof o==="object"&&(!r||o.reflex)){if((o.x!==t.x||o.y!==t.y)&&(o.x!==i.x||o.y!==i.y)&&(o.x!==s.x||o.y!==s.y)&&f.indexOf(o)===-1&&ja.linearRingContainsXY([t.x,t.y,i.x,i.y,s.x,s.y],0,6,2,o.x,o.y)){f.push(o)}}}}return f};Iu.prototype.getIntersections_=function(t,i,s){var e=t.p0;var r=t.p1;var n=i.getInExtent([Math.min(e.x,r.x),Math.min(e.y,r.y),Math.max(e.x,r.x),Math.max(e.y,r.y)]);var h=[];var a,o;for(a=0,o=n.length;a<o;++a){var f=n[a];if(t!==f&&(s||f.p0!==r||f.p1!==e)&&this.calculateIntersection_(e,r,f.p0,f.p1,s)){h.push(f)}}return h};Iu.prototype.calculateIntersection_=function(t,i,s,e,r){var n=(e.y-s.y)*(i.x-t.x)-(e.x-s.x)*(i.y-t.y);if(n!==0){var h=((e.x-s.x)*(t.y-s.y)-(e.y-s.y)*(t.x-s.x))/n;var a=((i.x-t.x)*(t.y-s.y)-(i.y-t.y)*(t.x-s.x))/n;if(!r&&h>cu.EPSILON&&h<1-cu.EPSILON&&a>cu.EPSILON&&a<1-cu.EPSILON||r&&h>=0&&h<=1&&a>=0&&a<=1){return[t.x+h*(i.x-t.x),t.y+h*(i.y-t.y)]}}return undefined};Iu.prototype.diagonalIsInside_=function(t,i,s,e,r){if(i.reflex===undefined||e.reflex===undefined){return false}var n=(s.x-e.x)*(i.y-e.y)>(s.y-e.y)*(i.x-e.x);var h=(r.x-e.x)*(i.y-e.y)<(r.y-e.y)*(i.x-e.x);var a=(t.x-i.x)*(e.y-i.y)>(t.y-i.y)*(e.x-i.x);var o=(s.x-i.x)*(e.y-i.y)<(s.y-i.y)*(e.x-i.x);var f=e.reflex?h||n:h&&n;var u=i.reflex?o||a:o&&a;return f&&u};Iu.prototype.drawMultiPolygon=function(t,i){var s=t.getEndss();var e=t.getStride();var r=this.indices.length;var n=this.lineStringReplay.getCurrentIndex();var h=t.getFlatCoordinates();var a,o,f,u;var l=0;for(a=0,o=s.length;a<o;++a){var v=s[a];if(v.length>0){var c=ya.translate(h,l,v[0],e,-this.origin[0],-this.origin[1]);if(c.length){var d=[];var m;for(f=1,u=v.length;f<u;++f){if(v[f]!==v[f-1]){m=ya.translate(h,v[f-1],v[f],e,-this.origin[0],-this.origin[1]);d.push(m)}}this.lineStringReplay.drawPolygonCoordinates(c,d,e);this.drawCoordinates_(c,d,e)}}l=v[v.length-1]}if(this.indices.length>r){this.startIndices.push(r);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(r);this.state_.changed=false}}if(this.lineStringReplay.getCurrentIndex()>n){this.lineStringReplay.setPolygonStyle(i,n)}};Iu.prototype.drawPolygon=function(t,i){var s=t.getEnds();var e=t.getStride();if(s.length>0){var r=t.getFlatCoordinates().map(Number);var n=ya.translate(r,0,s[0],e,-this.origin[0],-this.origin[1]);if(n.length){var h=[];var a,o,f;for(a=1,o=s.length;a<o;++a){if(s[a]!==s[a-1]){f=ya.translate(r,s[a-1],s[a],e,-this.origin[0],-this.origin[1]);h.push(f)}}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);if(this.state_.changed){this.styleIndices_.push(this.indices.length);this.state_.changed=false}this.lineStringReplay.setPolygonStyle(i);this.lineStringReplay.drawPolygonCoordinates(n,h,e);this.drawCoordinates_(n,h,e)}}};Iu.prototype.finish=function(t){this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);this.startIndices.push(this.indices.length);this.lineStringReplay.finish(t);if(this.styleIndices_.length===0&&this.styles_.length>0){this.styles_=[]}this.vertices=null;this.indices=null};Iu.prototype.getDeleteResourcesFunction=function(t){var i=this.verticesBuffer;var s=this.indicesBuffer;var e=this.lineStringReplay.getDeleteResourcesFunction(t);return function(){t.deleteBuffer(i);t.deleteBuffer(s);e()}};Iu.prototype.setUpProgram=function(t,i,s,e){var r,n;r=Su.fragment;n=Su.vertex;var h=i.getProgram(r,n);var a;if(!this.defaultLocations_){a=new Gu(t,h);this.defaultLocations_=a}else{a=this.defaultLocations_}i.useProgram(h);t.enableVertexAttribArray(a.a_position);t.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,8,0);return a};Iu.prototype.shutDownProgram=function(t,i){t.disableVertexAttribArray(i.a_position)};Iu.prototype.drawReplay=function(t,i,s,e){var r=t.getParameter(t.DEPTH_FUNC);var n=t.getParameter(t.DEPTH_WRITEMASK);if(!e){t.enable(t.DEPTH_TEST);t.depthMask(true);t.depthFunc(t.NOTEQUAL)}if(!ea.isEmpty(s)){this.drawReplaySkipping_(t,i,s)}else{var h,a,o,f;o=this.startIndices[this.startIndices.length-1];for(h=this.styleIndices_.length-1;h>=0;--h){a=this.styleIndices_[h];f=this.styles_[h];this.setFillStyle_(t,f);this.drawElements(t,i,a,o);o=a}}if(!e){t.disable(t.DEPTH_TEST);t.clear(t.DEPTH_BUFFER_BIT);t.depthMask(n);t.depthFunc(r)}};Iu.prototype.drawHitDetectionReplayOneByOne=function(t,i,s,e,r){var n,h,a,o,f,u,l,v;v=this.startIndices.length-2;a=this.startIndices[v+1];for(n=this.styleIndices_.length-1;n>=0;--n){o=this.styles_[n];this.setFillStyle_(t,o);f=this.styleIndices_[n];while(v>=0&&this.startIndices[v]>=f){h=this.startIndices[v];u=this.startIndicesFeature[v];l=ta.getUid(u).toString();if(s[l]===undefined&&u.getGeometry()&&(r===undefined||Ma.intersects(r,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT);this.drawElements(t,i,h,a);var c=e(u);if(c){return c}}v--;a=h}}return undefined};Iu.prototype.drawReplaySkipping_=function(t,i,s){var e,r,n,h,a,o,f,u,l;u=this.startIndices.length-2;n=r=this.startIndices[u+1];for(e=this.styleIndices_.length-1;e>=0;--e){h=this.styles_[e];this.setFillStyle_(t,h);a=this.styleIndices_[e];while(u>=0&&this.startIndices[u]>=a){l=this.startIndices[u];o=this.startIndicesFeature[u];f=ta.getUid(o).toString();if(s[f]){if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}n=l}u--;r=l}if(r!==n){this.drawElements(t,i,r,n);t.clear(t.DEPTH_BUFFER_BIT)}r=n=a}};Iu.prototype.setFillStyle_=function(t,i){t.uniform4fv(this.defaultLocations_.u_color,i)};Iu.prototype.setFillStrokeStyle=function(t,i){var s=t?t.getColor():[0,0,0,0];if(!(s instanceof CanvasGradient)&&!(s instanceof CanvasPattern)){s=Mf.asArray(s).map((function(t,i){return i!=3?t/255:t}))||cu.defaultFillStyle}else{s=cu.defaultFillStyle}if(!this.state_.fillColor||!pa.equals(s,this.state_.fillColor)){this.state_.fillColor=s;this.state_.changed=true;this.styles_.push(s)}if(i){this.lineStringReplay.setFillStrokeStyle(null,i)}else{var e=new Pu({color:[0,0,0,0]});this.lineStringReplay.setFillStrokeStyle(null,e)}};var Cu=function(t,i){this.space_=i;this.emptyBlocks_=[{x:0,y:0,width:t,height:t}];this.entries_={};this.context_=Po.createCanvasContext2D(t,t);this.canvas_=this.context_.canvas};Cu.prototype.get=function(t){return this.entries_[t]||null};Cu.prototype.add=function(t,i,s,e,r){var n,h,a;for(h=0,a=this.emptyBlocks_.length;h<a;++h){n=this.emptyBlocks_[h];if(n.width>=i+this.space_&&n.height>=s+this.space_){var o={offsetX:n.x+this.space_,offsetY:n.y+this.space_,image:this.canvas_};this.entries_[t]=o;e.call(r,this.context_,n.x+this.space_,n.y+this.space_);this.split_(h,n,i+this.space_,s+this.space_);return o}}return null};Cu.prototype.split_=function(t,i,s,e){var r=i.width-s;var n=i.height-e;var h;var a;if(r>n){h={x:i.x+s,y:i.y,width:i.width-s,height:i.height};a={x:i.x,y:i.y+e,width:s,height:i.height-e};this.updateBlocks_(t,h,a)}else{h={x:i.x+s,y:i.y,width:i.width-s,height:e};a={x:i.x,y:i.y+e,width:i.width,height:i.height-e};this.updateBlocks_(t,h,a)}};Cu.prototype.updateBlocks_=function(t,i,s){var e=[t,1];if(i.width>0&&i.height>0){e.push(i)}if(s.width>0&&s.height>0){e.push(s)}this.emptyBlocks_.splice.apply(this.emptyBlocks_,e)};var Au=function(t){var i=t||{};this.currentSize_=i.initialSize!==undefined?i.initialSize:ta.INITIAL_ATLAS_SIZE;this.maxSize_=i.maxSize!==undefined?i.maxSize:ta.MAX_ATLAS_SIZE!=-1?ta.MAX_ATLAS_SIZE:ta.WEBGL_MAX_TEXTURE_SIZE!==undefined?ta.WEBGL_MAX_TEXTURE_SIZE:2048;this.space_=i.space!==undefined?i.space:1;this.atlases_=[new Cu(this.currentSize_,this.space_)];this.currentHitSize_=this.currentSize_;this.hitAtlases_=[new Cu(this.currentHitSize_,this.space_)]};Au.prototype.getInfo=function(t){var i=this.getInfo_(this.atlases_,t);if(!i){return null}var s=this.getInfo_(this.hitAtlases_,t);return this.mergeInfos_(i,s)};Au.prototype.getInfo_=function(t,i){var s,e,r,n;for(r=0,n=t.length;r<n;++r){s=t[r];e=s.get(i);if(e){return e}}return null};Au.prototype.mergeInfos_=function(t,i){return{offsetX:t.offsetX,offsetY:t.offsetY,image:t.image,hitImage:i.image}};Au.prototype.add=function(t,i,s,e,r,n){if(i+this.space_>this.maxSize_||s+this.space_>this.maxSize_){return null}var h=this.add_(false,t,i,s,e,n);if(!h){return null}var a=r!==undefined?r:ta.nullFunction;var o=this.add_(true,t,i,s,a,n);return this.mergeInfos_(h,o)};Au.prototype.add_=function(t,i,s,e,r,n){var h=t?this.hitAtlases_:this.atlases_;var a,o,f,u;for(f=0,u=h.length;f<u;++f){a=h[f];o=a.add(i,s,e,r,n);if(o){return o}else if(!o&&f===u-1){var l;if(t){l=Math.min(this.currentHitSize_*2,this.maxSize_);this.currentHitSize_=l}else{l=Math.min(this.currentSize_*2,this.maxSize_);this.currentSize_=l}a=new Cu(l,this.space_);h.push(a);++u}}return null};var Ru=function(t,i){zu.call(this,t,i);this.images_=[];this.textures_=[];this.measureCanvas_=Po.createCanvasContext2D(0,0).canvas;this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:0,miterLimit:undefined,fillColor:null,font:undefined,scale:undefined};this.text_="";this.textAlign_=undefined;this.textBaseline_=undefined;this.offsetX_=undefined;this.offsetY_=undefined;this.atlases_={};this.currAtlas_=undefined;this.scale=1;this.opacity=1};ta.inherits(Ru,zu);Ru.prototype.drawText=function(t,i){if(this.text_){var s=null;var e=0;var r=2;var n=2;switch(t.getType()){case da.POINT:case da.MULTI_POINT:s=t.getFlatCoordinates();r=s.length;n=t.getStride();break;case da.CIRCLE:s=t.getCenter();break;case da.LINE_STRING:s=t.getFlatMidpoint();break;case da.MULTI_LINE_STRING:s=t.getFlatMidpoints();r=s.length;break;case da.POLYGON:s=t.getFlatInteriorPoint();break;case da.MULTI_POLYGON:s=t.getFlatInteriorPoints();r=s.length;break}this.startIndices.push(this.indices.length);this.startIndicesFeature.push(i);var h=this.currAtlas_;var a=this.text_.split("\n");var o=this.getTextSize_(a);var f,u,l,v,c,d,m,p;var _=Math.round(o[0]*this.textAlign_-this.offsetX_);var g=Math.round(o[1]*this.textBaseline_-this.offsetY_);var M=this.state_.lineWidth/2*this.state_.scale;for(f=0,u=a.length;f<u;++f){c=0;d=h.height*f;m=a[f].split("");for(l=0,v=m.length;l<v;++l){p=h.atlas.getInfo(m[l]);if(p){var z=p.image;this.anchorX=_-c;this.anchorY=g-d;this.originX=l===0?p.offsetX-M:p.offsetX;this.originY=p.offsetY;this.height=h.height;this.width=l===0||l===m.length-1?h.width[m[l]]+M:h.width[m[l]];this.imageHeight=z.height;this.imageWidth=z.width;var w;if(this.images_.length===0){this.images_.push(z)}else{w=this.images_[this.images_.length-1];if(ta.getUid(w)!=ta.getUid(z)){this.groupIndices.push(this.indices.length);this.images_.push(z)}}this.drawText_(s,e,r,n)}c+=this.width}}}};Ru.prototype.getTextSize_=function(t){var i=this;var s=this.currAtlas_;var e=t.length*s.height;var r=t.map((function(t){var e=0;var r,n;for(r=0,n=t.length;r<n;++r){var h=t[r];if(!s.width[h]){i.addCharToAtlas_(h)}e+=s.width[h]?s.width[h]:0}return e})).reduce((function(t,i){return Math.max(t,i)}));return[r,e]};Ru.prototype.drawText_=function(t,i,s,e){var r,n;for(r=i,n=s;r<n;r+=e){this.drawCoordinates(t,i,s,e)}};Ru.prototype.addCharToAtlas_=function(t){if(t.length===1){var i=this.currAtlas_;var s=this.state_;var e=this.measureCanvas_.getContext("2d");e.font=s.font;var r=Math.ceil(e.measureText(t).width*s.scale);var n=i.atlas.add(t,r,i.height,(function(i,e,r){i.font=s.font;i.fillStyle=s.fillColor;i.strokeStyle=s.strokeColor;i.lineWidth=s.lineWidth;i.lineCap=s.lineCap;i.lineJoin=s.lineJoin;i.miterLimit=s.miterLimit;i.textAlign="left";i.textBaseline="top";if(Ja.CANVAS_LINE_DASH&&s.lineDash){i.setLineDash(s.lineDash);i.lineDashOffset=s.lineDashOffset}if(s.scale!==1){i.setTransform(s.scale,0,0,s.scale,0,0)}if(s.strokeColor){i.strokeText(t,e,r)}if(s.fillColor){i.fillText(t,e,r)}}));if(n){i.width[t]=r}}};Ru.prototype.finish=function(t){var i=t.getGL();this.groupIndices.push(this.indices.length);this.hitDetectionGroupIndices=this.groupIndices;this.verticesBuffer=new du(this.vertices);this.indicesBuffer=new du(this.indices);var s={};this.createTextures(this.textures_,this.images_,s,i);this.state_={strokeColor:null,lineCap:undefined,lineDash:null,lineDashOffset:undefined,lineJoin:undefined,lineWidth:0,miterLimit:undefined,fillColor:null,font:undefined,scale:undefined};this.text_="";this.textAlign_=undefined;this.textBaseline_=undefined;this.offsetX_=undefined;this.offsetY_=undefined;this.images_=null;this.atlases_={};this.currAtlas_=undefined;zu.prototype.finish.call(this,t)};Ru.prototype.setTextStyle=function(t){var i=this.state_;var s=t.getFill();var e=t.getStroke();if(!t||!t.getText()||!s&&!e){this.text_=""}else{if(!s){i.fillColor=null}else{var r=s.getColor();i.fillColor=zf.asColorLike(r?r:cu.defaultFillStyle)}if(!e){i.strokeColor=null;i.lineWidth=0}else{var n=e.getColor();i.strokeColor=zf.asColorLike(n?n:cu.defaultStrokeStyle);i.lineWidth=e.getWidth()||cu.defaultLineWidth;i.lineCap=e.getLineCap()||cu.defaultLineCap;i.lineDashOffset=e.getLineDashOffset()||cu.defaultLineDashOffset;i.lineJoin=e.getLineJoin()||cu.defaultLineJoin;i.miterLimit=e.getMiterLimit()||cu.defaultMiterLimit;var h=e.getLineDash();i.lineDash=h?h.slice():cu.defaultLineDash}i.font=t.getFont()||cu.defaultFont;i.scale=t.getScale()||1;this.text_=t.getText();var a=Xf.TEXT_ALIGN[t.getTextAlign()];var o=Xf.TEXT_ALIGN[t.getTextBaseline()];this.textAlign_=a===undefined?cu.defaultTextAlign:a;this.textBaseline_=o===undefined?cu.defaultTextBaseline:o;this.offsetX_=t.getOffsetX()||0;this.offsetY_=t.getOffsetY()||0;this.rotateWithView=!!t.getRotateWithView();this.rotation=t.getRotation()||0;this.currAtlas_=this.getAtlas_(i)}};Ru.prototype.getAtlas_=function(t){var i=[];var s;for(s in t){if(t[s]||t[s]===0){if(Array.isArray(t[s])){i=i.concat(t[s])}else{i.push(t[s])}}}var e=this.calculateHash_(i);if(!this.atlases_[e]){var r=this.measureCanvas_.getContext("2d");r.font=t.font;var n=Math.ceil((r.measureText("M").width*1.5+t.lineWidth/2)*t.scale);this.atlases_[e]={atlas:new Au({space:t.lineWidth+1}),width:{},height:n}}return this.atlases_[e]};Ru.prototype.calculateHash_=function(t){var i,s;var e="";for(i=0,s=t.length;i<s;++i){e+=t[i]}return e};Ru.prototype.getTextures=function(t){return this.textures_};Ru.prototype.getHitDetectionTextures=function(){return this.textures_};var Tu=function(t,i,s){Vf.call(this);this.maxExtent_=i;this.tolerance_=t;this.renderBuffer_=s;this.replaysByZIndex_={}};ta.inherits(Tu,Vf);Tu.prototype.addDeclutter=function(t,i){};Tu.prototype.getDeleteResourcesFunction=function(t){var i=[];var s;for(s in this.replaysByZIndex_){var e=this.replaysByZIndex_[s];var r;for(r in e){i.push(e[r].getDeleteResourcesFunction(t))}}return function(){var t=i.length;var s;for(var e=0;e<t;e++){s=i[e].apply(this,arguments)}return s}};Tu.prototype.finish=function(t){var i;for(i in this.replaysByZIndex_){var s=this.replaysByZIndex_[i];var e;for(e in s){s[e].finish(t)}}};Tu.prototype.getReplay=function(t,i){var s=t!==undefined?t.toString():"0";var e=this.replaysByZIndex_[s];if(e===undefined){e={};this.replaysByZIndex_[s]=e}var r=e[i];if(r===undefined){var n=Tu.BATCH_CONSTRUCTORS_[i];r=new n(this.tolerance_,this.maxExtent_);e[i]=r}return r};Tu.prototype.isEmpty=function(){return ea.isEmpty(this.replaysByZIndex_)};Tu.prototype.replay=function(t,i,s,e,r,n,h,a){var o=Object.keys(this.replaysByZIndex_).map(Number);o.sort(pa.numberSafeCompareFunction);var f,u,l,v,c,d;for(f=0,u=o.length;f<u;++f){c=this.replaysByZIndex_[o[f].toString()];for(l=0,v=Xf.ORDER.length;l<v;++l){d=c[Xf.ORDER[l]];if(d!==undefined){d.replay(t,i,s,e,r,n,h,a,undefined,false)}}}};Tu.prototype.replayHitDetection_=function(t,i,s,e,r,n,h,a,o,f,u){var l=Object.keys(this.replaysByZIndex_).map(Number);l.sort((function(t,i){return i-t}));var v,c,d,m,p,_;for(v=0,c=l.length;v<c;++v){m=this.replaysByZIndex_[l[v].toString()];for(d=Xf.ORDER.length-1;d>=0;--d){p=m[Xf.ORDER[d]];if(p!==undefined){_=p.replay(t,i,s,e,r,n,h,a,o,f,u);if(_){return _}}}}return undefined};Tu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h,a,o,f){var u=i.getGL();u.bindFramebuffer(u.FRAMEBUFFER,i.getHitDetectionFramebuffer());var l;if(this.renderBuffer_!==undefined){l=Ma.buffer(Ma.createOrUpdateFromCoordinate(t),e*this.renderBuffer_)}return this.replayHitDetection_(i,t,e,r,Tu.HIT_DETECTION_SIZE_,h,a,o,(function(t){var i=new Uint8Array(4);u.readPixels(0,0,1,1,u.RGBA,u.UNSIGNED_BYTE,i);if(i[3]>0){var s=f(t);if(s){return s}}}),true,l)};Tu.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r,n,h,a,o){var f=i.getGL();f.bindFramebuffer(f.FRAMEBUFFER,i.getHitDetectionFramebuffer());var u=this.replayHitDetection_(i,t,e,r,Tu.HIT_DETECTION_SIZE_,h,a,o,(function(t){var i=new Uint8Array(4);f.readPixels(0,0,1,1,f.RGBA,f.UNSIGNED_BYTE,i);return i[3]>0}),false);return u!==undefined};Tu.HIT_DETECTION_SIZE_=[1,1];Tu.BATCH_CONSTRUCTORS_={Circle:mu,Image:wu,LineString:Eu,Polygon:Iu,Text:Ru};var Ou=function(t,i,s,e,r,n,h){wf.call(this);this.context_=t;this.center_=i;this.extent_=n;this.pixelRatio_=h;this.size_=r;this.rotation_=e;this.resolution_=s;this.imageStyle_=null;this.fillStyle_=null;this.strokeStyle_=null;this.textStyle_=null};ta.inherits(Ou,wf);Ou.prototype.drawText_=function(t,i){var s=this.context_;var e=t.getReplay(0,Uf.TEXT);e.setTextStyle(this.textStyle_);e.drawText(i,null);e.finish(s);var r=1;var n={};var h;var a=false;e.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,r,n,h,a);e.getDeleteResourcesFunction(s)()};Ou.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke());this.setImageStyle(t.getImage());this.setTextStyle(t.getText())};Ou.prototype.drawGeometry=function(t){var i=t.getType();switch(i){case da.POINT:this.drawPoint(t,null);break;case da.LINE_STRING:this.drawLineString(t,null);break;case da.POLYGON:this.drawPolygon(t,null);break;case da.MULTI_POINT:this.drawMultiPoint(t,null);break;case da.MULTI_LINE_STRING:this.drawMultiLineString(t,null);break;case da.MULTI_POLYGON:this.drawMultiPolygon(t,null);break;case da.GEOMETRY_COLLECTION:this.drawGeometryCollection(t,null);break;case da.CIRCLE:this.drawCircle(t,null);break}};Ou.prototype.drawFeature=function(t,i){var s=i.getGeometryFunction()(t);if(!s||!Ma.intersects(this.extent_,s.getExtent())){return}this.setStyle(i);this.drawGeometry(s)};Ou.prototype.drawGeometryCollection=function(t,i){var s=t.getGeometriesArray();var e,r;for(e=0,r=s.length;e<r;++e){this.drawGeometry(s[e])}};Ou.prototype.drawPoint=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.IMAGE);r.setImageStyle(this.imageStyle_);r.drawPoint(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiPoint=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.IMAGE);r.setImageStyle(this.imageStyle_);r.drawMultiPoint(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawLineString=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_);r.drawLineString(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiLineString=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_);r.drawMultiLineString(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawPolygon=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawPolygon(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawMultiPolygon=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawMultiPolygon(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.drawCircle=function(t,i){var s=this.context_;var e=new Tu(1,this.extent_);var r=e.getReplay(0,Uf.CIRCLE);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_);r.drawCircle(t,i);r.finish(s);var n=1;var h={};var a;var o=false;r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,n,h,a,o);r.getDeleteResourcesFunction(s)();if(this.textStyle_){this.drawText_(e,t)}};Ou.prototype.setImageStyle=function(t){this.imageStyle_=t};Ou.prototype.setFillStrokeStyle=function(t,i){this.fillStyle_=t;this.strokeStyle_=i};Ou.prototype.setTextStyle=function(t){this.textStyle_=t};var Lu={};Lu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_texture, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n gl_FragColor.a = texColor.a * u_opacity;\n}\n":"precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}");Lu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}");var Fu=function(t,i){this.u_texCoordMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texCoordMatrix":"d");this.u_projectionMatrix=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_projectionMatrix":"e");this.u_opacity=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_opacity":"f");this.u_texture=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texture":"g");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"b");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"c")};var Du=function(t,i){bf.call(this,i);this.mapRenderer=t;this.arrayBuffer_=new du([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.texture=null;this.framebuffer=null;this.framebufferDimension=undefined;this.texCoordMatrix=Ia.create();this.projectionMatrix=Ia.create();this.tmpMat4_=lu.create();this.defaultLocations_=null};ta.inherits(Du,bf);Du.prototype.bindFramebuffer=function(t,i){var s=this.mapRenderer.getGL();if(this.framebufferDimension===undefined||this.framebufferDimension!=i){var e=function(t,i,s){if(!t.isContextLost()){t.deleteFramebuffer(i);t.deleteTexture(s)}}.bind(null,s,this.framebuffer,this.texture);t.postRenderFunctions.push(e);var r=Mu.createEmptyTexture(s,i,i);var n=s.createFramebuffer();s.bindFramebuffer(Ya.FRAMEBUFFER,n);s.framebufferTexture2D(Ya.FRAMEBUFFER,Ya.COLOR_ATTACHMENT0,Ya.TEXTURE_2D,r,0);this.texture=r;this.framebuffer=n;this.framebufferDimension=i}else{s.bindFramebuffer(Ya.FRAMEBUFFER,this.framebuffer)}};Du.prototype.composeFrame=function(t,i,s){this.dispatchComposeEvent_(Wo.PRECOMPOSE,s,t);s.bindBuffer(Ya.ARRAY_BUFFER,this.arrayBuffer_);var e=s.getGL();var r=Lu.fragment;var n=Lu.vertex;var h=s.getProgram(r,n);var a;if(!this.defaultLocations_){a=new Fu(e,h);this.defaultLocations_=a}else{a=this.defaultLocations_}if(s.useProgram(h)){e.enableVertexAttribArray(a.a_position);e.vertexAttribPointer(a.a_position,2,Ya.FLOAT,false,16,0);e.enableVertexAttribArray(a.a_texCoord);e.vertexAttribPointer(a.a_texCoord,2,Ya.FLOAT,false,16,8);e.uniform1i(a.u_texture,0)}e.uniformMatrix4fv(a.u_texCoordMatrix,false,lu.fromTransform(this.tmpMat4_,this.getTexCoordMatrix()));e.uniformMatrix4fv(a.u_projectionMatrix,false,lu.fromTransform(this.tmpMat4_,this.getProjectionMatrix()));e.uniform1f(a.u_opacity,i.opacity);e.bindTexture(Ya.TEXTURE_2D,this.getTexture());e.drawArrays(Ya.TRIANGLE_STRIP,0,4);this.dispatchComposeEvent_(Wo.POSTCOMPOSE,s,t)};Du.prototype.dispatchComposeEvent_=function(t,i,s){var e=this.getLayer();if(e.hasListener(t)){var r=s.viewState;var n=r.resolution;var h=s.pixelRatio;var a=s.extent;var o=r.center;var f=r.rotation;var u=s.size;var l=new Ou(i,o,n,f,u,a,h);var v=new pf(t,l,s,null,i);e.dispatchEvent(v)}};Du.prototype.getTexCoordMatrix=function(){return this.texCoordMatrix};Du.prototype.getTexture=function(){return this.texture};Du.prototype.getProjectionMatrix=function(){return this.projectionMatrix};Du.prototype.handleWebGLContextLost=function(){this.texture=null;this.framebuffer=null;this.framebufferDimension=undefined};Du.prototype.prepareFrame=function(t,i,s){};Du.prototype.forEachLayerAtPixel=function(t,i,s,e){};var Wu=function(t,i){Du.call(this,t,i);this.image_=null;this.hitCanvasContext_=null;this.hitTransformationMatrix_=null};ta.inherits(Wu,Du);Wu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.IMAGE};Wu["create"]=function(t,i){return new Wu(t,i)};Wu.prototype.createTexture_=function(t){var i=t.getImage();var s=this.mapRenderer.getGL();return Mu.createTexture(s,i,Ya.CLAMP_TO_EDGE,Ya.CLAMP_TO_EDGE)};Wu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){var n=this.getLayer();var h=n.getSource();var a=i.viewState.resolution;var o=i.viewState.rotation;var f=i.skippedFeatureUids;return h.forEachFeatureAtCoordinate(t,a,o,s,f,(function(t){return e.call(r,t,n)}))};Wu.prototype.prepareFrame=function(t,i,s){var e=this.mapRenderer.getGL();var r=t.pixelRatio;var n=t.viewState;var h=n.center;var a=n.resolution;var o=n.rotation;var f=this.image_;var u=this.texture;var l=this.getLayer();var v=l.getSource();var c=t.viewHints;var d=t.extent;if(i.extent!==undefined){d=Ma.getIntersection(d,i.extent)}if(!c[yo.ANIMATING]&&!c[yo.INTERACTING]&&!Ma.isEmpty(d)){var m=n.projection;if(!ta.ENABLE_RASTER_REPROJECTION){var p=v.getProjection();if(p){m=p}}var _=v.getImage(d,a,r,m);if(_){var g=this.loadImage(_);if(g){f=_;u=this.createTexture_(_);if(this.texture){var M=function(t,i){if(!t.isContextLost()){t.deleteTexture(i)}}.bind(null,e,this.texture);t.postRenderFunctions.push(M)}}}}if(f){var z=this.mapRenderer.getContext().getCanvas();this.updateProjectionMatrix_(z.width,z.height,r,h,a,o,f.getExtent());this.hitTransformationMatrix_=null;var w=this.texCoordMatrix;Ia.reset(w);Ia.scale(w,1,-1);Ia.translate(w,0,-1);this.image_=f;this.texture=u;this.updateLogos(t,v)}return!!f};Wu.prototype.updateProjectionMatrix_=function(t,i,s,e,r,n,h){var a=t*r;var o=i*r;var f=this.projectionMatrix;Ia.reset(f);Ia.scale(f,s*2/a,s*2/o);Ia.rotate(f,-n);Ia.translate(f,h[0]-e[0],h[1]-e[1]);Ia.scale(f,(h[2]-h[0])/2,(h[3]-h[1])/2);Ia.translate(f,1,1)};Wu.prototype.hasFeatureAtCoordinate=function(t,i){var s=this.forEachFeatureAtCoordinate(t,i,0,wa.TRUE,this);return s!==undefined};Wu.prototype.forEachLayerAtPixel=function(t,i,s,e){if(!this.image_||!this.image_.getImage()){return undefined}if(this.getLayer().getSource().forEachFeatureAtCoordinate!==ta.nullFunction){var r=Ia.apply(i.pixelToCoordinateTransform,t.slice());var n=this.forEachFeatureAtCoordinate(r,i,0,wa.TRUE,this);if(n){return s.call(e,this.getLayer(),null)}else{return undefined}}else{var h=[this.image_.getImage().width,this.image_.getImage().height];if(!this.hitTransformationMatrix_){this.hitTransformationMatrix_=this.getHitTransformationMatrix_(i.size,h)}var a=Ia.apply(this.hitTransformationMatrix_,t.slice());if(a[0]<0||a[0]>h[0]||a[1]<0||a[1]>h[1]){return undefined}if(!this.hitCanvasContext_){this.hitCanvasContext_=Po.createCanvasContext2D(1,1)}this.hitCanvasContext_.clearRect(0,0,1,1);this.hitCanvasContext_.drawImage(this.image_.getImage(),a[0],a[1],1,1,0,0,1,1);var o=this.hitCanvasContext_.getImageData(0,0,1,1).data;if(o[3]>0){return s.call(e,this.getLayer(),o)}else{return undefined}}};Wu.prototype.getHitTransformationMatrix_=function(t,i){var s=Ia.create();Ia.translate(s,-1,-1);Ia.scale(s,2/t[0],2/t[1]);Ia.translate(s,0,t[1]);Ia.scale(s,1,-1);var e=Ia.invert(this.projectionMatrix.slice());var r=Ia.create();Ia.translate(r,0,i[1]);Ia.scale(r,1,-1);Ia.scale(r,i[0]/2,i[1]/2);Ia.translate(r,1,1);Ia.multiply(r,e);Ia.multiply(r,s);return r};var ju=function(t,i){kf.call(this,t,i);this.canvas_=document.createElement("CANVAS");this.canvas_.style.width="100%";this.canvas_.style.height="100%";this.canvas_.style.display="block";this.canvas_.className=Do.CLASS_UNSELECTABLE;t.insertBefore(this.canvas_,t.childNodes[0]||null);this.clipTileCanvasWidth_=0;this.clipTileCanvasHeight_=0;this.clipTileContext_=Po.createCanvasContext2D();this.renderedVisible_=true;this.gl_=Ya.getContext(this.canvas_,{antialias:true,depth:true,failIfMajorPerformanceCaveat:true,preserveDrawingBuffer:false,stencil:true});this.context_=new Mu(this.canvas_,this.gl_);ra.listen(this.canvas_,gu.LOST,this.handleWebGLContextLost,this);ra.listen(this.canvas_,gu.RESTORED,this.handleWebGLContextRestored,this);this.textureCache_=new _f;this.focus_=null;this.tileTextureQueue_=new _o(function(t){var i=t[1];var s=t[2];var e=i[0]-this.focus_[0];var r=i[1]-this.focus_[1];return 65536*Math.log(s)+Math.sqrt(e*e+r*r)/s}.bind(this),(function(t){return t[0].getKey()}));this.loadNextTileTexture_=function(t,i){if(!this.tileTextureQueue_.isEmpty()){this.tileTextureQueue_.reprioritize();var s=this.tileTextureQueue_.dequeue();var e=s[0];var r=s[3];var n=s[4];this.bindTileTexture(e,r,n,Ya.LINEAR,Ya.LINEAR)}return false}.bind(this);this.textureCacheFrameMarkerCount_=0;this.initializeGL_()};ta.inherits(ju,kf);ju["handles"]=function(t){return Ja.WEBGL&&t===To.WEBGL};ju["create"]=function(t,i){return new ju(t,i)};ju.prototype.bindTileTexture=function(t,i,s,e,r){var n=this.getGL();var h=t.getKey();if(this.textureCache_.containsKey(h)){var a=this.textureCache_.get(h);n.bindTexture(Ya.TEXTURE_2D,a.texture);if(a.magFilter!=e){n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MAG_FILTER,e);a.magFilter=e}if(a.minFilter!=r){n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MIN_FILTER,r);a.minFilter=r}}else{var o=n.createTexture();n.bindTexture(Ya.TEXTURE_2D,o);if(s>0){var f=this.clipTileContext_.canvas;var u=this.clipTileContext_;if(this.clipTileCanvasWidth_!==i[0]||this.clipTileCanvasHeight_!==i[1]){f.width=i[0];f.height=i[1];this.clipTileCanvasWidth_=i[0];this.clipTileCanvasHeight_=i[1]}else{u.clearRect(0,0,i[0],i[1])}u.drawImage(t.getImage(),s,s,i[0],i[1],0,0,i[0],i[1]);n.texImage2D(Ya.TEXTURE_2D,0,Ya.RGBA,Ya.RGBA,Ya.UNSIGNED_BYTE,f)}else{n.texImage2D(Ya.TEXTURE_2D,0,Ya.RGBA,Ya.RGBA,Ya.UNSIGNED_BYTE,t.getImage())}n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MAG_FILTER,e);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_MIN_FILTER,r);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_S,Ya.CLAMP_TO_EDGE);n.texParameteri(Ya.TEXTURE_2D,Ya.TEXTURE_WRAP_T,Ya.CLAMP_TO_EDGE);this.textureCache_.set(h,{texture:o,magFilter:e,minFilter:r})}};ju.prototype.dispatchComposeEvent_=function(t,i){var s=this.getMap();if(s.hasListener(t)){var e=this.context_;var r=i.extent;var n=i.size;var h=i.viewState;var a=i.pixelRatio;var o=h.resolution;var f=h.center;var u=h.rotation;var l=new Ou(e,f,o,u,n,r,a);var v=new pf(t,l,i,null,e);s.dispatchEvent(v)}};ju.prototype.disposeInternal=function(){var t=this.getGL();if(!t.isContextLost()){this.textureCache_.forEach((function(i){if(i){t.deleteTexture(i.texture)}}))}this.context_.dispose();kf.prototype.disposeInternal.call(this)};ju.prototype.expireCache_=function(t,i){var s=this.getGL();var e;while(this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK){e=this.textureCache_.peekLast();if(!e){if(+this.textureCache_.peekLastKey()==i.index){break}else{--this.textureCacheFrameMarkerCount_}}else{s.deleteTexture(e.texture)}this.textureCache_.pop()}};ju.prototype.getContext=function(){return this.context_};ju.prototype.getGL=function(){return this.gl_};ju.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_};ju.prototype.getType=function(){return To.WEBGL};ju.prototype.handleWebGLContextLost=function(t){t.preventDefault();this.textureCache_.clear();this.textureCacheFrameMarkerCount_=0;var i=this.getLayerRenderers();for(var s in i){var e=i[s];e.handleWebGLContextLost()}};ju.prototype.handleWebGLContextRestored=function(){this.initializeGL_();this.getMap().render()};ju.prototype.initializeGL_=function(){var t=this.gl_;t.activeTexture(Ya.TEXTURE0);t.blendFuncSeparate(Ya.SRC_ALPHA,Ya.ONE_MINUS_SRC_ALPHA,Ya.ONE,Ya.ONE_MINUS_SRC_ALPHA);t.disable(Ya.CULL_FACE);t.disable(Ya.DEPTH_TEST);t.disable(Ya.SCISSOR_TEST);t.disable(Ya.STENCIL_TEST)};ju.prototype.isTileTextureLoaded=function(t){return this.textureCache_.containsKey(t.getKey())};ju.prototype.renderFrame=function(t){var i=this.getContext();var s=this.getGL();if(s.isContextLost()){return false}if(!t){if(this.renderedVisible_){this.canvas_.style.display="none";this.renderedVisible_=false}return false}this.focus_=t.focus;this.textureCache_.set((-t.index).toString(),null);++this.textureCacheFrameMarkerCount_;this.dispatchComposeEvent_(Wo.PRECOMPOSE,t);var e=[];var r=t.layerStatesArray;pa.stableSort(r,kf.sortByZIndex);var n=t.viewState.resolution;var h,a,o,f;for(h=0,a=r.length;h<a;++h){f=r[h];if(jo.visibleAtResolution(f,n)&&f.sourceState==Io.READY){o=this.getLayerRenderer(f.layer);if(o.prepareFrame(t,f,i)){e.push(f)}}}var u=t.size[0]*t.pixelRatio;var l=t.size[1]*t.pixelRatio;if(this.canvas_.width!=u||this.canvas_.height!=l){this.canvas_.width=u;this.canvas_.height=l}s.bindFramebuffer(Ya.FRAMEBUFFER,null);s.clearColor(0,0,0,0);s.clear(Ya.COLOR_BUFFER_BIT);s.enable(Ya.BLEND);s.viewport(0,0,this.canvas_.width,this.canvas_.height);for(h=0,a=e.length;h<a;++h){f=e[h];o=this.getLayerRenderer(f.layer);o.composeFrame(t,f,i)}if(!this.renderedVisible_){this.canvas_.style.display="";this.renderedVisible_=true}this.calculateMatrices2D(t);if(this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>ta.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK){t.postRenderFunctions.push(this.expireCache_.bind(this))}if(!this.tileTextureQueue_.isEmpty()){t.postRenderFunctions.push(this.loadNextTileTexture_);t.animate=true}this.dispatchComposeEvent_(Wo.POSTCOMPOSE,t);this.scheduleRemoveUnusedLayerRenderers(t);this.scheduleExpireIconCache(t)};ju.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r,n,h){var a;if(this.getGL().isContextLost()){return false}var o=i.viewState;var f=i.layerStatesArray;var u=f.length;var l;for(l=u-1;l>=0;--l){var v=f[l];var c=v.layer;if(jo.visibleAtResolution(v,o.resolution)&&n.call(h,c)){var d=this.getLayerRenderer(c);a=d.forEachFeatureAtCoordinate(t,i,s,e,r);if(a){return a}}}return undefined};ju.prototype.hasFeatureAtCoordinate=function(t,i,s,e,r){var n=false;if(this.getGL().isContextLost()){return false}var h=i.viewState;var a=i.layerStatesArray;var o=a.length;var f;for(f=o-1;f>=0;--f){var u=a[f];var l=u.layer;if(jo.visibleAtResolution(u,h.resolution)&&e.call(r,l)){var v=this.getLayerRenderer(l);n=v.hasFeatureAtCoordinate(t,i);if(n){return true}}}return n};ju.prototype.forEachLayerAtPixel=function(t,i,s,e,r,n){if(this.getGL().isContextLost()){return false}var h=i.viewState;var a;var o=i.layerStatesArray;var f=o.length;var u;for(u=f-1;u>=0;--u){var l=o[u];var v=l.layer;if(jo.visibleAtResolution(l,h.resolution)&&r.call(e,v)){var c=this.getLayerRenderer(v);a=c.forEachLayerAtPixel(t,i,s,e);if(a){return a}}}return undefined};var Vu={};Vu.fragment=new au(ta.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n":"precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}");Vu.vertex=new ou(ta.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n v_texCoord = a_texCoord;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}");var Uu=function(t,i){this.u_tileOffset=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_tileOffset":"d");this.u_texture=t.getUniformLocation(i,ta.DEBUG_WEBGL?"u_texture":"e");this.a_position=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_position":"b");this.a_texCoord=t.getAttribLocation(i,ta.DEBUG_WEBGL?"a_texCoord":"c")};var Bu=function(t,i){Du.call(this,t,i);this.fragmentShader_=Vu.fragment;this.vertexShader_=Vu.vertex;this.locations_=null;this.renderArrayBuffer_=new du([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.renderedTileRange_=null;this.renderedFramebufferExtent_=null;this.renderedRevision_=-1;this.tmpSize_=[0,0]};ta.inherits(Bu,Du);Bu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.TILE};Bu["create"]=function(t,i){return new Bu(t,i)};Bu.prototype.disposeInternal=function(){var t=this.mapRenderer.getContext();t.deleteBuffer(this.renderArrayBuffer_);Du.prototype.disposeInternal.call(this)};Bu.prototype.createLoadedTileFinder=function(t,i,s){var e=this.mapRenderer;return function(r,n){function h(t){var i=e.isTileTextureLoaded(t);if(i){if(!s[r]){s[r]={}}s[r][t.tileCoord.toString()]=t}return i}return t.forEachLoadedTile(i,r,n,h)}};Bu.prototype.handleWebGLContextLost=function(){Du.prototype.handleWebGLContextLost.call(this);this.locations_=null};Bu.prototype.prepareFrame=function(t,i,s){var e=this.mapRenderer;var r=s.getGL();var n=t.viewState;var h=n.projection;var a=this.getLayer();var o=a.getSource();var f=o.getTileGridForProjection(h);var u=f.getZForResolution(n.resolution);var l=f.getResolution(u);var v=o.getTilePixelSize(u,t.pixelRatio,h);var c=v[0]/Oo.toSize(f.getTileSize(u),this.tmpSize_)[0];var d=l/c;var m=o.getTilePixelRatio(c)*o.getGutter(h);var p=n.center;var _=t.extent;var g=f.getTileRangeForExtentAndZ(_,u);var M;if(this.renderedTileRange_&&this.renderedTileRange_.equals(g)&&this.renderedRevision_==o.getRevision()){M=this.renderedFramebufferExtent_}else{var z=g.getSize();var w=Math.max(z[0]*v[0],z[1]*v[1]);var y=ca.roundUpToPowerOfTwo(w);var b=d*y;var x=f.getOrigin(u);var E=x[0]+g.minX*v[0]*d;var S=x[1]+g.minY*v[1]*d;M=[E,S,E+b,S+b];this.bindFramebuffer(t,y);r.viewport(0,0,y,y);r.clearColor(0,0,0,0);r.clear(Ya.COLOR_BUFFER_BIT);r.disable(Ya.BLEND);var G=s.getProgram(this.fragmentShader_,this.vertexShader_);s.useProgram(G);if(!this.locations_){this.locations_=new Uu(r,G)}s.bindBuffer(Ya.ARRAY_BUFFER,this.renderArrayBuffer_);r.enableVertexAttribArray(this.locations_.a_position);r.vertexAttribPointer(this.locations_.a_position,2,Ya.FLOAT,false,16,0);r.enableVertexAttribArray(this.locations_.a_texCoord);r.vertexAttribPointer(this.locations_.a_texCoord,2,Ya.FLOAT,false,16,8);r.uniform1i(this.locations_.u_texture,0);var P={};P[u]={};var k=this.createLoadedTileFinder(o,h,P);var N=a.getUseInterimTilesOnError();var I=true;var C=Ma.createEmpty();var A=new If(0,0,0,0);var R,T,O,L,F;var D,W,j;for(D=g.minX;D<=g.maxX;++D){for(W=g.minY;W<=g.maxY;++W){L=o.getTile(u,D,W,c,h);if(i.extent!==undefined){j=f.getTileCoordExtent(L.tileCoord,C);if(!Ma.intersects(j,i.extent)){continue}}F=L.getState();T=F==po.LOADED||F==po.EMPTY||F==po.ERROR&&!N;if(!T){L=L.getInterimTile()}F=L.getState();if(F==po.LOADED){if(e.isTileTextureLoaded(L)){P[u][L.tileCoord.toString()]=L;continue}}else if(F==po.EMPTY||F==po.ERROR&&!N){continue}I=false;O=f.forEachTileCoordParentTileRange(L.tileCoord,k,null,A,C);if(!O){R=f.getTileCoordChildTileRange(L.tileCoord,A,C);if(R){k(u+1,R)}}}}var V=Object.keys(P).map(Number);V.sort(pa.numberSafeCompareFunction);var U=new Float32Array(4);var B,q,H,X;for(B=0,q=V.length;B<q;++B){X=P[V[B]];for(H in X){L=X[H];j=f.getTileCoordExtent(L.tileCoord,C);U[0]=2*(j[2]-j[0])/b;U[1]=2*(j[3]-j[1])/b;U[2]=2*(j[0]-M[0])/b-1;U[3]=2*(j[1]-M[1])/b-1;r.uniform4fv(this.locations_.u_tileOffset,U);e.bindTileTexture(L,v,m*c,Ya.LINEAR,Ya.LINEAR);r.drawArrays(Ya.TRIANGLE_STRIP,0,4)}}if(I){this.renderedTileRange_=g;this.renderedFramebufferExtent_=M;this.renderedRevision_=o.getRevision()}else{this.renderedTileRange_=null;this.renderedFramebufferExtent_=null;this.renderedRevision_=-1;t.animate=true}}this.updateUsedTiles(t.usedTiles,o,u,g);var Y=e.getTileTextureQueue();this.manageTilePyramid(t,o,f,c,h,_,u,a.getPreload(),(function(t){if(t.getState()==po.LOADED&&!e.isTileTextureLoaded(t)&&!Y.isKeyQueued(t.getKey())){Y.enqueue([t,f.getTileCoordCenter(t.tileCoord),f.getResolution(t.tileCoord[0]),v,m*c])}}),this);this.scheduleExpireCache(t,o);this.updateLogos(t,o);var J=this.texCoordMatrix;Ia.reset(J);Ia.translate(J,(Math.round(p[0]/l)*l-M[0])/(M[2]-M[0]),(Math.round(p[1]/l)*l-M[1])/(M[3]-M[1]));if(n.rotation!==0){Ia.rotate(J,n.rotation)}Ia.scale(J,t.size[0]*n.resolution/(M[2]-M[0]),t.size[1]*n.resolution/(M[3]-M[1]));Ia.translate(J,-.5,-.5);return true};Bu.prototype.forEachLayerAtPixel=function(t,i,s,e){if(!this.framebuffer){return undefined}var r=[t[0]/i.size[0],(i.size[1]-t[1])/i.size[1]];var n=Ia.apply(this.texCoordMatrix,r.slice());var h=[n[0]*this.framebufferDimension,n[1]*this.framebufferDimension];var a=this.mapRenderer.getContext().getGL();a.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer);var o=new Uint8Array(4);a.readPixels(h[0],h[1],1,1,a.RGBA,a.UNSIGNED_BYTE,o);if(o[3]>0){return s.call(e,this.getLayer(),o)}else{return undefined}};var qu=function(t,i){Du.call(this,t,i);this.dirty_=false;this.renderedRevision_=-1;this.renderedResolution_=NaN;this.renderedExtent_=Ma.createEmpty();this.renderedRenderOrder_=null;this.replayGroup_=null;this.layerState_=null};ta.inherits(qu,Du);qu["handles"]=function(t,i){return t===To.WEBGL&&i.getType()===df.VECTOR};qu["create"]=function(t,i){return new qu(t,i)};qu.prototype.composeFrame=function(t,i,s){this.layerState_=i;var e=t.viewState;var r=this.replayGroup_;var n=t.size;var h=t.pixelRatio;var a=this.mapRenderer.getGL();if(r&&!r.isEmpty()){a.enable(a.SCISSOR_TEST);a.scissor(0,0,n[0]*h,n[1]*h);r.replay(s,e.center,e.resolution,e.rotation,n,h,i.opacity,i.managed?t.skippedFeatureUids:{});a.disable(a.SCISSOR_TEST)}};qu.prototype.disposeInternal=function(){var t=this.replayGroup_;if(t){var i=this.mapRenderer.getContext();t.getDeleteResourcesFunction(i)();this.replayGroup_=null}Du.prototype.disposeInternal.call(this)};qu.prototype.forEachFeatureAtCoordinate=function(t,i,s,e,r){if(!this.replayGroup_||!this.layerState_){return undefined}else{var n=this.mapRenderer.getContext();var h=i.viewState;var a=this.getLayer();var o=this.layerState_;var f={};return this.replayGroup_.forEachFeatureAtCoordinate(t,n,h.center,h.resolution,h.rotation,i.size,i.pixelRatio,o.opacity,{},(function(t){var i=ta.getUid(t).toString();if(!(i in f)){f[i]=true;return e.call(r,t,a)}}))}};qu.prototype.hasFeatureAtCoordinate=function(t,i){if(!this.replayGroup_||!this.layerState_){return false}else{var s=this.mapRenderer.getContext();var e=i.viewState;var r=this.layerState_;return this.replayGroup_.hasFeatureAtCoordinate(t,s,e.center,e.resolution,e.rotation,i.size,i.pixelRatio,r.opacity,i.skippedFeatureUids)}};qu.prototype.forEachLayerAtPixel=function(t,i,s,e){var r=Ia.apply(i.pixelToCoordinateTransform,t.slice());var n=this.hasFeatureAtCoordinate(r,i);if(n){return s.call(e,this.getLayer(),null)}else{return undefined}};qu.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()};qu.prototype.prepareFrame=function(t,i,s){var e=this.getLayer();var r=e.getSource();this.updateLogos(t,r);var n=t.viewHints[yo.ANIMATING];var h=t.viewHints[yo.INTERACTING];var a=e.getUpdateWhileAnimating();var o=e.getUpdateWhileInteracting();if(!this.dirty_&&(!a&&n)||!o&&h){return true}var f=t.extent;var u=t.viewState;var l=u.projection;var v=u.resolution;var c=t.pixelRatio;var d=e.getRevision();var m=e.getRenderBuffer();var p=e.getRenderOrder();if(p===undefined){p=su.defaultOrder}var _=Ma.buffer(f,m*v);if(!this.dirty_&&this.renderedResolution_==v&&this.renderedRevision_==d&&this.renderedRenderOrder_==p&&Ma.containsExtent(this.renderedExtent_,_)){return true}if(this.replayGroup_){t.postRenderFunctions.push(this.replayGroup_.getDeleteResourcesFunction(s))}this.dirty_=false;var g=new Tu(su.getTolerance(v,c),_,e.getRenderBuffer());r.loadFeatures(_,v,l);var M=function(t){var i;var s=t.getStyleFunction();if(s){i=s.call(t,v)}else{s=e.getStyleFunction();if(s){i=s(t,v)}}if(i){var r=this.renderFeature(t,v,c,i,g);this.dirty_=this.dirty_||r}};if(p){var z=[];r.forEachFeatureInExtent(_,(function(t){z.push(t)}),this);z.sort(p);z.forEach(M,this)}else{r.forEachFeatureInExtent(_,M,this)}g.finish(s);this.renderedResolution_=v;this.renderedRevision_=d;this.renderedRenderOrder_=p;this.renderedExtent_=_;this.replayGroup_=g;return true};qu.prototype.renderFeature=function(t,i,s,e,r){if(!e){return false}var n=false;if(Array.isArray(e)){for(var h=e.length-1,a=0;h>=a;--h){n=su.renderFeature(r,t,e[h],su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}}else{n=su.renderFeature(r,t,e,su.getSquaredTolerance(i,s),this.handleStyleImageChange_,this)||n}return n};if(ta.ENABLE_CANVAS){Ro.register(Ao.MAP_RENDERER,Nf);Ro.registerMultiple(Ao.LAYER_RENDERER,[Sf,Cf,eu,nu])}if(ta.ENABLE_WEBGL){Ro.register(Ao.MAP_RENDERER,ju);Ro.registerMultiple(Ao.LAYER_RENDERER,[Wu,Bu,qu])}var Hu=function(t){t=ea.assign({},t);if(!t.controls){t.controls=qo.defaults()}if(!t.interactions){t.interactions=uf.defaults()}Lo.call(this,t)};ta.inherits(Hu,Lo);var Xu={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"};var Yu=function(t){ua.call(this);this.options=t;this.id=t.id;this.insertFirst=t.insertFirst!==undefined?t.insertFirst:true;this.stopEvent=t.stopEvent!==undefined?t.stopEvent:true;this.element=document.createElement("DIV");this.element.className=t.className!==undefined?t.className:"ol-overlay-container "+Do.CLASS_SELECTABLE;this.element.style.position="absolute";this.autoPan=t.autoPan!==undefined?t.autoPan:false;this.autoPanAnimation=t.autoPanAnimation||{};this.autoPanMargin=t.autoPanMargin!==undefined?t.autoPanMargin:20;this.rendered={bottom_:"",left_:"",right_:"",top_:"",visible:true};this.mapPostrenderListenerKey=null;ra.listen(this,ua.getChangeEventType(Yu.Property.ELEMENT),this.handleElementChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.MAP),this.handleMapChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.OFFSET),this.handleOffsetChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.POSITION),this.handlePositionChanged,this);ra.listen(this,ua.getChangeEventType(Yu.Property.POSITIONING),this.handlePositioningChanged,this);if(t.element!==undefined){this.setElement(t.element)}this.setOffset(t.offset!==undefined?t.offset:[0,0]);this.setPositioning(t.positioning!==undefined?t.positioning:Xu.TOP_LEFT);if(t.position!==undefined){this.setPosition(t.position)}};ta.inherits(Yu,ua);Yu.prototype.getElement=function(){return this.get(Yu.Property.ELEMENT)};Yu.prototype.getId=function(){return this.id};Yu.prototype.getMap=function(){return this.get(Yu.Property.MAP)};Yu.prototype.getOffset=function(){return this.get(Yu.Property.OFFSET)};Yu.prototype.getPosition=function(){return this.get(Yu.Property.POSITION)};Yu.prototype.getPositioning=function(){return this.get(Yu.Property.POSITIONING)};Yu.prototype.handleElementChanged=function(){Po.removeChildren(this.element);var t=this.getElement();if(t){this.element.appendChild(t)}};Yu.prototype.handleMapChanged=function(){if(this.mapPostrenderListenerKey){Po.removeNode(this.element);ra.unlistenByKey(this.mapPostrenderListenerKey);this.mapPostrenderListenerKey=null}var t=this.getMap();if(t){this.mapPostrenderListenerKey=ra.listen(t,co.POSTRENDER,this.render,this);this.updatePixelPosition();var i=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();if(this.insertFirst){i.insertBefore(this.element,i.childNodes[0]||null)}else{i.appendChild(this.element)}}};Yu.prototype.render=function(){this.updatePixelPosition()};Yu.prototype.handleOffsetChanged=function(){this.updatePixelPosition()};Yu.prototype.handlePositionChanged=function(){this.updatePixelPosition();if(this.get(Yu.Property.POSITION)&&this.autoPan){this.panIntoView()}};Yu.prototype.handlePositioningChanged=function(){this.updatePixelPosition()};Yu.prototype.setElement=function(t){this.set(Yu.Property.ELEMENT,t)};Yu.prototype.setMap=function(t){this.set(Yu.Property.MAP,t)};Yu.prototype.setOffset=function(t){this.set(Yu.Property.OFFSET,t)};Yu.prototype.setPosition=function(t){this.set(Yu.Property.POSITION,t)};Yu.prototype.panIntoView=function(){var t=this.getMap();if(!t||!t.getTargetElement()){return}var i=this.getRect(t.getTargetElement(),t.getSize());var s=this.getElement();var e=this.getRect(s,[Po.outerWidth(s),Po.outerHeight(s)]);var r=this.autoPanMargin;if(!Ma.containsExtent(i,e)){var n=e[0]-i[0];var h=i[2]-e[2];var a=e[1]-i[1];var o=i[3]-e[3];var f=[0,0];if(n<0){f[0]=n-r}else if(h<0){f[0]=Math.abs(h)+r}if(a<0){f[1]=a-r}else if(o<0){f[1]=Math.abs(o)+r}if(f[0]!==0||f[1]!==0){var u=t.getView().getCenter();var l=t.getPixelFromCoordinate(u);var v=[l[0]+f[0],l[1]+f[1]];t.getView().animate({center:t.getCoordinateFromPixel(v),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing})}}};Yu.prototype.getRect=function(t,i){var s=t.getBoundingClientRect();var e=s.left+window.pageXOffset;var r=s.top+window.pageYOffset;return[e,r,e+i[0],r+i[1]]};Yu.prototype.setPositioning=function(t){this.set(Yu.Property.POSITIONING,t)};Yu.prototype.setVisible=function(t){if(this.rendered.visible!==t){this.element.style.display=t?"":"none";this.rendered.visible=t}};Yu.prototype.updatePixelPosition=function(){var t=this.getMap();var i=this.getPosition();if(!t||!t.isRendered()||!i){this.setVisible(false);return}var s=t.getPixelFromCoordinate(i);var e=t.getSize();this.updateRenderedPosition(s,e)};Yu.prototype.updateRenderedPosition=function(t,i){var s=this.element.style;var e=this.getOffset();var r=this.getPositioning();this.setVisible(true);var n=e[0];var h=e[1];if(r==Xu.BOTTOM_RIGHT||r==Xu.CENTER_RIGHT||r==Xu.TOP_RIGHT){if(this.rendered.left_!==""){this.rendered.left_=s.left=""}var a=Math.round(i[0]-t[0]-n)+"px";if(this.rendered.right_!=a){this.rendered.right_=s.right=a}}else{if(this.rendered.right_!==""){this.rendered.right_=s.right=""}if(r==Xu.BOTTOM_CENTER||r==Xu.CENTER_CENTER||r==Xu.TOP_CENTER){n-=this.element.offsetWidth/2}var o=Math.round(t[0]+n)+"px";if(this.rendered.left_!=o){this.rendered.left_=s.left=o}}if(r==Xu.BOTTOM_LEFT||r==Xu.BOTTOM_CENTER||r==Xu.BOTTOM_RIGHT){if(this.rendered.top_!==""){this.rendered.top_=s.top=""}var f=Math.round(i[1]-t[1]-h)+"px";if(this.rendered.bottom_!=f){this.rendered.bottom_=s.bottom=f}}else{if(this.rendered.bottom_!==""){this.rendered.bottom_=s.bottom=""}if(r==Xu.CENTER_LEFT||r==Xu.CENTER_CENTER||r==Xu.CENTER_RIGHT){h-=this.element.offsetHeight/2}var u=Math.round(t[1]+h)+"px";if(this.rendered.top_!=u){this.rendered.top_=s.top=u}}};Yu.prototype.getOptions=function(){return this.options};Yu.Property={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};var Ju=function(t){this.opacity_=t.opacity;this.rotateWithView_=t.rotateWithView;this.rotation_=t.rotation;this.scale_=t.scale;this.snapToPixel_=t.snapToPixel};Ju.prototype.getOpacity=function(){return this.opacity_};Ju.prototype.getRotateWithView=function(){return this.rotateWithView_};Ju.prototype.getRotation=function(){return this.rotation_};Ju.prototype.getScale=function(){return this.scale_};Ju.prototype.getSnapToPixel=function(){return this.snapToPixel_};Ju.prototype.getAnchor=function(){};Ju.prototype.getImage=function(t){};Ju.prototype.getHitDetectionImage=function(t){};Ju.prototype.getImageState=function(){};Ju.prototype.getImageSize=function(){};Ju.prototype.getHitDetectionImageSize=function(){};Ju.prototype.getOrigin=function(){};Ju.prototype.getSize=function(){};Ju.prototype.setOpacity=function(t){this.opacity_=t};Ju.prototype.setRotateWithView=function(t){this.rotateWithView_=t};Ju.prototype.setRotation=function(t){this.rotation_=t};Ju.prototype.setScale=function(t){this.scale_=t};Ju.prototype.setSnapToPixel=function(t){this.snapToPixel_=t};Ju.prototype.listenImageChange=function(t,i){};Ju.prototype.load=function(){};Ju.prototype.unlistenImageChange=function(t,i){};var Ku=function(t){this.checksums_=null;this.canvas_=null;this.hitDetectionCanvas_=null;this.fill_=t.fill!==undefined?t.fill:null;this.origin_=[0,0];this.points_=t.points;this.radius_=t.radius!==undefined?t.radius:t.radius1;this.radius2_=t.radius2;this.angle_=t.angle!==undefined?t.angle:0;this.stroke_=t.stroke!==undefined?t.stroke:null;this.anchor_=null;this.size_=null;this.imageSize_=null;this.hitDetectionImageSize_=null;this.atlasManager_=t.atlasManager;this.render_(this.atlasManager_);var i=t.snapToPixel!==undefined?t.snapToPixel:true;var s=t.rotateWithView!==undefined?t.rotateWithView:false;Ju.call(this,{opacity:1,rotateWithView:s,rotation:t.rotation!==undefined?t.rotation:0,scale:1,snapToPixel:i})};ta.inherits(Ku,Ju);Ku.prototype.clone=function(){var t=new Ku({fill:this.getFill()?this.getFill().clone():undefined,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():undefined,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});t.setOpacity(this.getOpacity());t.setScale(this.getScale());return t};Ku.prototype.getAnchor=function(){return this.anchor_};Ku.prototype.getAngle=function(){return this.angle_};Ku.prototype.getFill=function(){return this.fill_};Ku.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_};Ku.prototype.getImage=function(t){return this.canvas_};Ku.prototype.getImageSize=function(){return this.imageSize_};Ku.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_};Ku.prototype.getImageState=function(){return vf.LOADED};Ku.prototype.getOrigin=function(){return this.origin_};Ku.prototype.getPoints=function(){return this.points_};Ku.prototype.getRadius=function(){return this.radius_};Ku.prototype.getRadius2=function(){return this.radius2_};Ku.prototype.getSize=function(){return this.size_};Ku.prototype.getStroke=function(){return this.stroke_};Ku.prototype.listenImageChange=function(t,i){};Ku.prototype.load=function(){};Ku.prototype.unlistenImageChange=function(t,i){};Ku.prototype.render_=function(t){var i;var s="";var e="";var r=0;var n=null;var h=0;var a;var o=0;if(this.stroke_){a=this.stroke_.getColor();if(a===null){a=gf.defaultStrokeStyle}a=zf.asColorLike(a);o=this.stroke_.getWidth();if(o===undefined){o=gf.defaultLineWidth}n=this.stroke_.getLineDash();h=this.stroke_.getLineDashOffset();if(!Ja.CANVAS_LINE_DASH){n=null;h=0}e=this.stroke_.getLineJoin();if(e===undefined){e=gf.defaultLineJoin}s=this.stroke_.getLineCap();if(s===undefined){s=gf.defaultLineCap}r=this.stroke_.getMiterLimit();if(r===undefined){r=gf.defaultMiterLimit}}var f=2*(this.radius_+o)+1;var u={strokeStyle:a,strokeWidth:o,size:f,lineCap:s,lineDash:n,lineDashOffset:h,lineJoin:e,miterLimit:r};if(t===undefined){var l=Po.createCanvasContext2D(f,f);this.canvas_=l.canvas;f=this.canvas_.width;i=f;this.draw_(u,l,0,0);this.createHitDetectionCanvas_(u)}else{f=Math.round(f);var v=!this.fill_;var c;if(v){c=this.drawHitDetectionCanvas_.bind(this,u)}var d=this.getChecksum();var m=t.add(d,f,f,this.draw_.bind(this,u),c);this.canvas_=m.image;this.origin_=[m.offsetX,m.offsetY];i=m.image.width;if(v){this.hitDetectionCanvas_=m.hitImage;this.hitDetectionImageSize_=[m.hitImage.width,m.hitImage.height]}else{this.hitDetectionCanvas_=this.canvas_;this.hitDetectionImageSize_=[i,i]}}this.anchor_=[f/2,f/2];this.size_=[f,f];this.imageSize_=[i,i]};Ku.prototype.draw_=function(t,i,s,e){var r,n,h;i.setTransform(1,0,0,1,0,0);i.translate(s,e);i.beginPath();var a=this.points_;if(a===Infinity){i.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,true)}else{var o=this.radius2_!==undefined?this.radius2_:this.radius_;if(o!==this.radius_){a=2*a}for(r=0;r<=a;r++){n=r*2*Math.PI/a-Math.PI/2+this.angle_;h=r%2===0?this.radius_:o;i.lineTo(t.size/2+h*Math.cos(n),t.size/2+h*Math.sin(n))}}if(this.fill_){var f=this.fill_.getColor();if(f===null){f=gf.defaultFillStyle}i.fillStyle=zf.asColorLike(f);i.fill()}if(this.stroke_){i.strokeStyle=t.strokeStyle;i.lineWidth=t.strokeWidth;if(t.lineDash){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.lineCap=t.lineCap;i.lineJoin=t.lineJoin;i.miterLimit=t.miterLimit;i.stroke()}i.closePath()};Ku.prototype.createHitDetectionCanvas_=function(t){this.hitDetectionImageSize_=[t.size,t.size];if(this.fill_){this.hitDetectionCanvas_=this.canvas_;return}var i=Po.createCanvasContext2D(t.size,t.size);this.hitDetectionCanvas_=i.canvas;this.drawHitDetectionCanvas_(t,i,0,0)};Ku.prototype.drawHitDetectionCanvas_=function(t,i,s,e){i.setTransform(1,0,0,1,0,0);i.translate(s,e);i.beginPath();var r=this.points_;if(r===Infinity){i.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,true)}else{var n=this.radius2_!==undefined?this.radius2_:this.radius_;if(n!==this.radius_){r=2*r}var h,a,o;for(h=0;h<=r;h++){o=h*2*Math.PI/r-Math.PI/2+this.angle_;a=h%2===0?this.radius_:n;i.lineTo(t.size/2+a*Math.cos(o),t.size/2+a*Math.sin(o))}}i.fillStyle=gf.defaultFillStyle;i.fill();if(this.stroke_){i.strokeStyle=t.strokeStyle;i.lineWidth=t.strokeWidth;if(t.lineDash){i.setLineDash(t.lineDash);i.lineDashOffset=t.lineDashOffset}i.stroke()}i.closePath()};Ku.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-";var i=this.fill_?this.fill_.getChecksum():"-";var s=!this.checksums_||(t!=this.checksums_[1]||i!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]);if(s){var e="r"+t+i+(this.radius_!==undefined?this.radius_.toString():"-")+(this.radius2_!==undefined?this.radius2_.toString():"-")+(this.angle_!==undefined?this.angle_.toString():"-")+(this.points_!==undefined?this.points_.toString():"-");this.checksums_=[e,t,i,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]};var Zu=function(t){var i=t||{};Ku.call(this,{points:Infinity,fill:i.fill,radius:i.radius,snapToPixel:i.snapToPixel,stroke:i.stroke,atlasManager:i.atlasManager})};ta.inherits(Zu,Ku);Zu.prototype.clone=function(){var t=new Zu({fill:this.getFill()?this.getFill().clone():undefined,stroke:this.getStroke()?this.getStroke().clone():undefined,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});t.setOpacity(this.getOpacity());t.setScale(this.getScale());return t};Zu.prototype.setRadius=function(t){this.radius_=t;this.render_(this.atlasManager_)};var $u=function(t){var i=t||{};this.color_=i.color!==undefined?i.color:null;this.checksum_=undefined};$u.prototype.clone=function(){var t=this.getColor();return new $u({color:t&&t.slice?t.slice():t||undefined})};$u.prototype.getColor=function(){return this.color_};$u.prototype.setColor=function(t){this.color_=t;this.checksum_=undefined};$u.prototype.getChecksum=function(){if(this.checksum_===undefined){if(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient){this.checksum_=ta.getUid(this.color_).toString()}else{this.checksum_="f"+(this.color_?Mf.asString(this.color_):"-")}}return this.checksum_};var Qu=function(t){var i=t||{};this.geometry_=null;this.geometryFunction_=Qu.defaultGeometryFunction;if(i.geometry!==undefined){this.setGeometry(i.geometry)}this.fill_=i.fill!==undefined?i.fill:null;this.image_=i.image!==undefined?i.image:null;this.renderer_=i.renderer!==undefined?i.renderer:null;this.stroke_=i.stroke!==undefined?i.stroke:null;this.text_=i.text!==undefined?i.text:null;this.zIndex_=i.zIndex};Qu.prototype.clone=function(){var t=this.getGeometry();if(t&&t.clone){t=t.clone()}return new Qu({geometry:t,fill:this.getFill()?this.getFill().clone():undefined,image:this.getImage()?this.getImage().clone():undefined,stroke:this.getStroke()?this.getStroke().clone():undefined,text:this.getText()?this.getText().clone():undefined,zIndex:this.getZIndex()})};Qu.prototype.getRenderer=function(){return this.renderer_};Qu.prototype.setRenderer=function(t){this.renderer_=t};Qu.prototype.getGeometry=function(){return this.geometry_};Qu.prototype.getGeometryFunction=function(){return this.geometryFunction_};Qu.prototype.getFill=function(){return this.fill_};Qu.prototype.setFill=function(t){this.fill_=t};Qu.prototype.getImage=function(){return this.image_};Qu.prototype.setImage=function(t){this.image_=t};Qu.prototype.getStroke=function(){return this.stroke_};Qu.prototype.setStroke=function(t){this.stroke_=t};Qu.prototype.getText=function(){return this.text_};Qu.prototype.setText=function(t){this.text_=t};Qu.prototype.getZIndex=function(){return this.zIndex_};Qu.prototype.setGeometry=function(t){if(typeof t==="function"){this.geometryFunction_=t}else if(typeof t==="string"){this.geometryFunction_=function(i){return i.get(t)}}else if(!t){this.geometryFunction_=Qu.defaultGeometryFunction}else if(t!==undefined){this.geometryFunction_=function(){return t}}this.geometry_=t};Qu.prototype.setZIndex=function(t){this.zIndex_=t};Qu.createFunction=function(t){var i;if(typeof t==="function"){i=t}else{var s;if(Array.isArray(t)){s=t}else{va.assert(t instanceof Qu,41);s=[t]}i=function(){return s}}return i};Qu.default_=null;Qu.defaultFunction=function(t,i){if(!Qu.default_){var s=new $u({color:"rgba(255,255,255,0.4)"});var e=new Pu({color:"#3399CC",width:1.25});Qu.default_=[new Qu({image:new Zu({fill:s,stroke:e,radius:5}),fill:s,stroke:e})]}return Qu.default_};Qu.createDefaultEditing=function(){var t={};var i=[255,255,255,1];var s=[0,153,255,1];var e=3;t[da.POLYGON]=[new Qu({fill:new $u({color:[255,255,255,.5]})})];t[da.MULTI_POLYGON]=t[da.POLYGON];t[da.LINE_STRING]=[new Qu({stroke:new Pu({color:i,width:e+2})}),new Qu({stroke:new Pu({color:s,width:e})})];t[da.MULTI_LINE_STRING]=t[da.LINE_STRING];t[da.CIRCLE]=t[da.POLYGON].concat(t[da.LINE_STRING]);t[da.POINT]=[new Qu({image:new Zu({radius:e*2,fill:new $u({color:s}),stroke:new Pu({color:i,width:e/2})}),zIndex:Infinity})];t[da.MULTI_POINT]=t[da.POINT];t[da.GEOMETRY_COLLECTION]=t[da.POLYGON].concat(t[da.LINE_STRING],t[da.POINT]);return t};Qu.defaultGeometryFunction=function(t){return t.getGeometry()};var tl=function(t){ua.call(this);this.id_=undefined;this.geometryName_="geometry";this.style_=null;this.styleFunction_=undefined;this.geometryChangeKey_=null;ra.listen(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);if(t!==undefined){if(t instanceof Ca||!t){var i=t;this.setGeometry(i)}else{var s=t;this.setProperties(s)}}};ta.inherits(tl,ua);tl.prototype.clone=function(){var t=new tl(this.getProperties());t.setGeometryName(this.getGeometryName());var i=this.getGeometry();if(i){t.setGeometry(i.clone())}var s=this.getStyle();if(s){t.setStyle(s)}return t};tl.prototype.getGeometry=function(){return this.get(this.geometryName_)};tl.prototype.getId=function(){return this.id_};tl.prototype.getGeometryName=function(){return this.geometryName_};tl.prototype.getStyle=function(){return this.style_};tl.prototype.getStyleFunction=function(){return this.styleFunction_};tl.prototype.handleGeometryChange_=function(){this.changed()};tl.prototype.handleGeometryChanged_=function(){if(this.geometryChangeKey_){ra.unlistenByKey(this.geometryChangeKey_);this.geometryChangeKey_=null}var t=this.getGeometry();if(t){this.geometryChangeKey_=ra.listen(t,oa.CHANGE,this.handleGeometryChange_,this)}this.changed()};tl.prototype.setGeometry=function(t){this.set(this.geometryName_,t)};tl.prototype.setStyle=function(t){this.style_=t;this.styleFunction_=!t?undefined:tl.createStyleFunction(t);this.changed()};tl.prototype.setId=function(t){this.id_=t;this.changed()};tl.prototype.setGeometryName=function(t){ra.unlisten(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);this.geometryName_=t;ra.listen(this,ua.getChangeEventType(this.geometryName_),this.handleGeometryChanged_,this);this.handleGeometryChanged_()};tl.createStyleFunction=function(t){var i;if(typeof t==="function"){if(t.length==2){i=function(i){return t(this,i)}}else{i=t}}else{var s;if(Array.isArray(t)){s=t}else{va.assert(t instanceof Qu,41);s=[t]}i=function(){return s}}return i};var il={};il.createOrUpdate=function(t,i,s,e){if(e!==undefined){e[0]=t;e[1]=i;e[2]=s;return e}else{return[t,i,s]}};il.getKeyZXY=function(t,i,s){return t+"/"+i+"/"+s};il.getKey=function(t){return il.getKeyZXY(t[0],t[1],t[2])};il.fromKey=function(t){return t.split("/").map(Number)};il.hash=function(t){return(t[1]<<t[0])+t[2]};il.quadKey=function(t){var i=t[0];var s=new Array(i);var e=1<<i-1;var r,n;for(r=0;r<i;++r){n=48;if(t[1]&e){n+=1}if(t[2]&e){n+=2}s[r]=String.fromCharCode(n);e>>=1}return s.join("")};il.withinExtentAndZ=function(t,i){var s=t[0];var e=t[1];var r=t[2];if(i.getMinZoom()>s||s>i.getMaxZoom()){return false}var n=i.getExtent();var h;if(!n){h=i.getFullTileRange(s)}else{h=i.getTileRangeForExtentAndZ(n,s)}if(!h){return true}else{return h.containsXY(e,r)}};var sl={};sl.createFromTemplate=function(t,i){var s=/\{z\}/g;var e=/\{x\}/g;var r=/\{y\}/g;var n=/\{-y\}/g;return function(h,a,o){if(!h){return undefined}else{return t.replace(s,h[0].toString()).replace(e,h[1].toString()).replace(r,(function(){var t=-h[2]-1;return t.toString()})).replace(n,(function(){var t=h[0];var s=i.getFullTileRange(t);va.assert(s,55);var e=s.getHeight()+h[2];return e.toString()}))}}};sl.createFromTemplates=function(t,i){var s=t.length;var e=new Array(s);for(var r=0;r<s;++r){e[r]=sl.createFromTemplate(t[r],i)}return sl.createFromTileUrlFunctions(e)};sl.createFromTileUrlFunctions=function(t){if(t.length===1){return t[0]}return function(i,s,e){if(!i){return undefined}else{var r=il.hash(i);var n=ca.modulo(r,t.length);return t[n](i,s,e)}}};sl.nullTileUrlFunction=function(t,i,s){return undefined};sl.expandUrl=function(t){var i=[];var s=/\{([a-z])-([a-z])\}/.exec(t);if(s){var e=s[1].charCodeAt(0);var r=s[2].charCodeAt(0);var n;for(n=e;n<=r;++n){i.push(t.replace(s[0],String.fromCharCode(n)))}return i}s=s=/\{(\d+)-(\d+)\}/.exec(t);if(s){var h=parseInt(s[2],10);for(var a=parseInt(s[1],10);a<=h;a++){i.push(t.replace(s[0],a.toString()))}return i}i.push(t);return i};var el=function(t,i,s){aa.call(this);var e=s?s:{};this.tileCoord=t;this.state=i;this.interimTile=null;this.key="";this.transition_=e.transition===undefined?250:e.transition;this.transitionStarts_={}};ta.inherits(el,aa);el.prototype.changed=function(){this.dispatchEvent(oa.CHANGE)};el.prototype.getKey=function(){return this.key+"/"+this.tileCoord};el.prototype.getInterimTile=function(){if(!this.interimTile){return this}var t=this.interimTile;do{if(t.getState()==po.LOADED){return t}t=t.interimTile}while(t);return this};el.prototype.refreshInterimChain=function(){if(!this.interimTile){return}var t=this.interimTile;var i=this;do{if(t.getState()==po.LOADED){t.interimTile=null;break}else if(t.getState()==po.LOADING){i=t}else if(t.getState()==po.IDLE){i.interimTile=t.interimTile}else{i=t}t=i.interimTile}while(t)};el.prototype.getTileCoord=function(){return this.tileCoord};el.prototype.getState=function(){return this.state};el.prototype.setState=function(t){this.state=t;this.changed()};el.prototype.load=function(){};el.prototype.getAlpha=function(t,i){if(!this.transition_){return 1}var s=this.transitionStarts_[t];if(!s){s=i;this.transitionStarts_[t]=s}else if(s===-1){return 1}var e=i-s+1e3/60;if(e>=this.transition_){return 1}return So.easeIn(e/this.transition_)};el.prototype.inTransition=function(t){if(!this.transition_){return false}return this.transitionStarts_[t]!==-1};el.prototype.endTransition=function(t){if(this.transition_){this.transitionStarts_[t]=-1}};var rl=function(t,i,s,e,r,n){el.call(this,t,i,n);this.crossOrigin_=e;this.src_=s;this.image_=new Image;if(e!==null){this.image_.crossOrigin=e}this.imageListenerKeys_=null;this.tileLoadFunction_=r};ta.inherits(rl,el);rl.prototype.disposeInternal=function(){if(this.state==po.LOADING){this.unlistenImage_();this.image_=rl.getBlankImage()}if(this.interimTile){this.interimTile.dispose()}this.state=po.ABORT;this.changed();el.prototype.disposeInternal.call(this)};rl.prototype.getImage=function(){return this.image_};rl.prototype.getKey=function(){return this.src_};rl.prototype.handleImageError_=function(){this.state=po.ERROR;this.unlistenImage_();this.image_=rl.getBlankImage();this.changed()};rl.prototype.handleImageLoad_=function(){if(this.image_.naturalWidth&&this.image_.naturalHeight){this.state=po.LOADED}else{this.state=po.EMPTY}this.unlistenImage_();this.changed()};rl.prototype.load=function(){if(this.state==po.ERROR){this.state=po.IDLE;this.image_=new Image;if(this.crossOrigin_!==null){this.image_.crossOrigin=this.crossOrigin_}}if(this.state==po.IDLE){this.state=po.LOADING;this.changed();this.imageListenerKeys_=[ra.listenOnce(this.image_,oa.ERROR,this.handleImageError_,this),ra.listenOnce(this.image_,oa.LOAD,this.handleImageLoad_,this)];this.tileLoadFunction_(this,this.src_)}};rl.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(ra.unlistenByKey);this.imageListenerKeys_=null};rl.getBlankImage=function(){var t=Po.createCanvasContext2D(1,1);t.fillStyle="rgba(0,0,0,0)";t.fillRect(0,0,1,1);return t.canvas};var nl=function(t){_f.call(this,t)};ta.inherits(nl,_f);nl.prototype.expireCache=function(t){var i,s;while(this.canExpireCache()){i=this.peekLast();s=i.tileCoord[0].toString();if(s in t&&t[s].contains(i.tileCoord)){break}else{this.pop().dispose()}}};nl.prototype.pruneExceptNewestZ=function(){if(this.getCount()===0){return}var t=this.peekFirstKey();var i=il.fromKey(t);var s=i[0];this.forEach((function(t){if(t.tileCoord[0]!==s){this.remove(il.getKey(t.tileCoord));t.dispose()}}),this)};var hl={};hl.calculateSourceResolution=function(t,i,s,e){var r=Na.transform(s,i,t);var n=Na.getPointResolution(i,e,s);var h=i.getMetersPerUnit();if(h!==undefined){n*=h}var a=t.getMetersPerUnit();if(a!==undefined){n/=a}var o=t.getExtent();if(!o||Ma.containsCoordinate(o,r)){var f=Na.getPointResolution(t,n,r)/n;if(isFinite(f)&&f>0){n/=f}}return n};hl.enlargeClipPoint_=function(t,i,s,e){var r=s-t,n=e-i;var h=Math.sqrt(r*r+n*n);return[Math.round(s+r/h),Math.round(e+n/h)]};hl.render=function(t,i,s,e,r,n,h,a,o,f,u){var l=Po.createCanvasContext2D(Math.round(s*t),Math.round(s*i));if(o.length===0){return l.canvas}l.scale(s,s);var v=Ma.createEmpty();o.forEach((function(t,i,s){Ma.extend(v,t.extent)}));var c=Ma.getWidth(v);var d=Ma.getHeight(v);var m=Po.createCanvasContext2D(Math.round(s*c/e),Math.round(s*d/e));var p=s/e;o.forEach((function(t,i,s){var e=t.extent[0]-v[0];var r=-(t.extent[3]-v[3]);var n=Ma.getWidth(t.extent);var h=Ma.getHeight(t.extent);m.drawImage(t.image,f,f,t.image.width-2*f,t.image.height-2*f,e*p,r*p,n*p,h*p)}));var _=Ma.getTopLeft(h);a.getTriangles().forEach((function(t,i,r){var h=t.source,a=t.target;var o=h[0][0],f=h[0][1],u=h[1][0],c=h[1][1],d=h[2][0],p=h[2][1];var g=(a[0][0]-_[0])/n,M=-(a[0][1]-_[1])/n;var z=(a[1][0]-_[0])/n,w=-(a[1][1]-_[1])/n;var y=(a[2][0]-_[0])/n,b=-(a[2][1]-_[1])/n;var x=o,E=f;o=0;f=0;u-=x;c-=E;d-=x;p-=E;var S=[[u,c,0,0,z-g],[d,p,0,0,y-g],[0,0,u,c,w-M],[0,0,d,p,b-M]];var G=ca.solveLinearSystem(S);if(!G){return}l.save();l.beginPath();var P=(g+z+y)/3,k=(M+w+b)/3;var N=hl.enlargeClipPoint_(P,k,g,M);var I=hl.enlargeClipPoint_(P,k,z,w);var C=hl.enlargeClipPoint_(P,k,y,b);l.moveTo(I[0],I[1]);l.lineTo(N[0],N[1]);l.lineTo(C[0],C[1]);l.clip();l.transform(G[0],G[2],G[1],G[3],g,M);l.translate(v[0]-x,v[3]-E);l.scale(e/s,-e/s);l.drawImage(m.canvas,0,0);l.restore()}));if(u){l.save();l.strokeStyle="black";l.lineWidth=1;a.getTriangles().forEach((function(t,i,s){var e=t.target;var r=(e[0][0]-_[0])/n,h=-(e[0][1]-_[1])/n;var a=(e[1][0]-_[0])/n,o=-(e[1][1]-_[1])/n;var f=(e[2][0]-_[0])/n,u=-(e[2][1]-_[1])/n;l.beginPath();l.moveTo(a,o);l.lineTo(r,h);l.lineTo(f,u);l.closePath();l.stroke()}));l.restore()}return l.canvas};var al=function(t,i,s,e,r){this.sourceProj_=t;this.targetProj_=i;var n={};var h=Na.getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var i=t[0]+"/"+t[1];if(!n[i]){n[i]=h(t)}return n[i]};this.maxSourceExtent_=e;this.errorThresholdSquared_=r*r;this.triangles_=[];this.wrapsXInSource_=false;this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!e&&!!this.sourceProj_.getExtent()&&Ma.getWidth(e)==Ma.getWidth(this.sourceProj_.getExtent());this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ma.getWidth(this.sourceProj_.getExtent()):null;this.targetWorldWidth_=this.targetProj_.getExtent()?Ma.getWidth(this.targetProj_.getExtent()):null;var a=Ma.getTopLeft(s);var o=Ma.getTopRight(s);var f=Ma.getBottomRight(s);var u=Ma.getBottomLeft(s);var l=this.transformInv_(a);var v=this.transformInv_(o);var c=this.transformInv_(f);var d=this.transformInv_(u);this.addQuad_(a,o,f,u,l,v,c,d,ta.RASTER_REPROJECTION_MAX_SUBDIVISION);if(this.wrapsXInSource_){var m=Infinity;this.triangles_.forEach((function(t,i,s){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])}));this.triangles_.forEach((function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var i=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];if(i[0][0]-m>this.sourceWorldWidth_/2){i[0][0]-=this.sourceWorldWidth_}if(i[1][0]-m>this.sourceWorldWidth_/2){i[1][0]-=this.sourceWorldWidth_}if(i[2][0]-m>this.sourceWorldWidth_/2){i[2][0]-=this.sourceWorldWidth_}var s=Math.min(i[0][0],i[1][0],i[2][0]);var e=Math.max(i[0][0],i[1][0],i[2][0]);if(e-s<this.sourceWorldWidth_/2){t.source=i}}}),this)}n={}};al.prototype.addTriangle_=function(t,i,s,e,r,n){this.triangles_.push({source:[e,r,n],target:[t,i,s]})};al.prototype.addQuad_=function(t,i,s,e,r,n,h,a,o){var f=Ma.boundingExtent([r,n,h,a]);var u=this.sourceWorldWidth_?Ma.getWidth(f)/this.sourceWorldWidth_:null;var l=this.sourceWorldWidth_;var v=this.sourceProj_.canWrapX()&&u>.5&&u<1;var c=false;if(o>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var d=Ma.boundingExtent([t,i,s,e]);var m=Ma.getWidth(d)/this.targetWorldWidth_;c|=m>ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH}if(!v&&this.sourceProj_.isGlobal()&&u){c|=u>ta.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH}}if(!c&&this.maxSourceExtent_){if(!Ma.intersects(f,this.maxSourceExtent_)){return}}if(!c){if(!isFinite(r[0])||!isFinite(r[1])||!isFinite(n[0])||!isFinite(n[1])||!isFinite(h[0])||!isFinite(h[1])||!isFinite(a[0])||!isFinite(a[1])){if(o>0){c=true}else{return}}}if(o>0){if(!c){var p=[(t[0]+s[0])/2,(t[1]+s[1])/2];var _=this.transformInv_(p);var g;if(v){var M=(ca.modulo(r[0],l)+ca.modulo(h[0],l))/2;g=M-ca.modulo(_[0],l)}else{g=(r[0]+h[0])/2-_[0]}var z=(r[1]+h[1])/2-_[1];var w=g*g+z*z;c=w>this.errorThresholdSquared_}if(c){if(Math.abs(t[0]-s[0])<=Math.abs(t[1]-s[1])){var y=[(i[0]+s[0])/2,(i[1]+s[1])/2];var b=this.transformInv_(y);var x=[(e[0]+t[0])/2,(e[1]+t[1])/2];var E=this.transformInv_(x);this.addQuad_(t,i,y,x,r,n,b,E,o-1);this.addQuad_(x,y,s,e,E,b,h,a,o-1)}else{var S=[(t[0]+i[0])/2,(t[1]+i[1])/2];var G=this.transformInv_(S);var P=[(s[0]+e[0])/2,(s[1]+e[1])/2];var k=this.transformInv_(P);this.addQuad_(t,S,P,e,r,G,k,a,o-1);this.addQuad_(S,i,s,P,G,n,h,k,o-1)}return}}if(v){if(!this.canWrapXInSource_){return}this.wrapsXInSource_=true}this.addTriangle_(t,s,e,r,h,a);this.addTriangle_(t,i,s,r,n,h)};al.prototype.calculateSourceExtent=function(){var t=Ma.createEmpty();this.triangles_.forEach((function(i,s,e){var r=i.source;Ma.extendCoordinate(t,r[0]);Ma.extendCoordinate(t,r[1]);Ma.extendCoordinate(t,r[2])}));return t};al.prototype.getTriangles=function(){return this.triangles_};var ol=function(t,i,s,e,r,n,h,a,o,f,u){el.call(this,r,po.IDLE);this.renderEdges_=u!==undefined?u:false;this.pixelRatio_=h;this.gutter_=a;this.canvas_=null;this.sourceTileGrid_=i;this.targetTileGrid_=e;this.wrappedTileCoord_=n?n:r;this.sourceTiles_=[];this.sourcesListenerKeys_=null;this.sourceZ_=0;var l=e.getTileCoordExtent(this.wrappedTileCoord_);var v=this.targetTileGrid_.getExtent();var c=this.sourceTileGrid_.getExtent();var d=v?Ma.getIntersection(l,v):l;if(Ma.getArea(d)===0){this.state=po.EMPTY;return}var m=t.getExtent();if(m){if(!c){c=m}else{c=Ma.getIntersection(c,m)}}var p=e.getResolution(this.wrappedTileCoord_[0]);var _=Ma.getCenter(d);var g=hl.calculateSourceResolution(t,s,_,p);if(!isFinite(g)||g<=0){this.state=po.EMPTY;return}var M=f!==undefined?f:ta.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;this.triangulation_=new al(t,s,d,c,g*M);if(this.triangulation_.getTriangles().length===0){this.state=po.EMPTY;return}this.sourceZ_=i.getZForResolution(g);var z=this.triangulation_.calculateSourceExtent();if(c){if(t.canWrapX()){z[1]=ca.clamp(z[1],c[1],c[3]);z[3]=ca.clamp(z[3],c[1],c[3])}else{z=Ma.getIntersection(z,c)}}if(!Ma.getArea(z)){this.state=po.EMPTY}else{var w=i.getTileRangeForExtentAndZ(z,this.sourceZ_);for(var y=w.minX;y<=w.maxX;y++){for(var b=w.minY;b<=w.maxY;b++){var x=o(this.sourceZ_,y,b,h);if(x){this.sourceTiles_.push(x)}}}if(this.sourceTiles_.length===0){this.state=po.EMPTY}}};ta.inherits(ol,el);ol.prototype.disposeInternal=function(){if(this.state==po.LOADING){this.unlistenSources_()}el.prototype.disposeInternal.call(this)};ol.prototype.getImage=function(){return this.canvas_};ol.prototype.reproject_=function(){var t=[];this.sourceTiles_.forEach((function(i,s,e){if(i&&i.getState()==po.LOADED){t.push({extent:this.sourceTileGrid_.getTileCoordExtent(i.tileCoord),image:i.getImage()})}}),this);this.sourceTiles_.length=0;if(t.length===0){this.state=po.ERROR}else{var i=this.wrappedTileCoord_[0];var s=this.targetTileGrid_.getTileSize(i);var e=typeof s==="number"?s:s[0];var r=typeof s==="number"?s:s[1];var n=this.targetTileGrid_.getResolution(i);var h=this.sourceTileGrid_.getResolution(this.sourceZ_);var a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=hl.render(e,r,this.pixelRatio_,h,this.sourceTileGrid_.getExtent(),n,a,this.triangulation_,t,this.gutter_,this.renderEdges_);this.state=po.LOADED}this.changed()};ol.prototype.load=function(){if(this.state==po.IDLE){this.state=po.LOADING;this.changed();var t=0;this.sourcesListenerKeys_=[];this.sourceTiles_.forEach((function(i,s,e){var r=i.getState();if(r==po.IDLE||r==po.LOADING){t++;var n;n=ra.listen(i,oa.CHANGE,(function(s){var e=i.getState();if(e==po.LOADED||e==po.ERROR||e==po.EMPTY){ra.unlistenByKey(n);t--;if(t===0){this.unlistenSources_();this.reproject_()}}}),this);this.sourcesListenerKeys_.push(n)}}),this);this.sourceTiles_.forEach((function(t,i,s){var e=t.getState();if(e==po.IDLE){t.load()}}));if(t===0){setTimeout(this.reproject_.bind(this),0)}}};ol.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(ra.unlistenByKey);this.sourcesListenerKeys_=null};var fl=function(t){this.minZoom=t.minZoom!==undefined?t.minZoom:0;this.resolutions_=t.resolutions;va.assert(pa.isSorted(this.resolutions_,(function(t,i){return i-t}),true),17);var i;if(!t.origins){for(var s=0,e=this.resolutions_.length-1;s<e;++s){if(!i){i=this.resolutions_[s]/this.resolutions_[s+1]}else{if(this.resolutions_[s]/this.resolutions_[s+1]!==i){i=undefined;break}}}}this.zoomFactor_=i;this.maxZoom=this.resolutions_.length-1;this.origin_=t.origin!==undefined?t.origin:null;this.origins_=null;if(t.origins!==undefined){this.origins_=t.origins;va.assert(this.origins_.length==this.resolutions_.length,20)}var r=t.extent;if(r!==undefined&&!this.origin_&&!this.origins_){this.origin_=Ma.getTopLeft(r)}va.assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18);this.tileSizes_=null;if(t.tileSizes!==undefined){this.tileSizes_=t.tileSizes;va.assert(this.tileSizes_.length==this.resolutions_.length,19)}this.tileSize_=t.tileSize!==undefined?t.tileSize:!this.tileSizes_?ta.DEFAULT_TILE_SIZE:null;va.assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22);this.extent_=r!==undefined?r:null;this.fullTileRanges_=null;this.tmpSize_=[0,0];if(t.sizes!==undefined){this.fullTileRanges_=t.sizes.map((function(t,i){var s=new If(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));return s}),this)}else if(r){this.calculateTileRanges_(r)}};fl.tmpTileCoord_=[0,0,0];fl.prototype.forEachTileCoord=function(t,i,s){var e=this.getTileRangeForExtentAndZ(t,i);for(var r=e.minX,n=e.maxX;r<=n;++r){for(var h=e.minY,a=e.maxY;h<=a;++h){s([i,r,h])}}};fl.prototype.forEachTileCoordParentTileRange=function(t,i,s,e,r){var n,h,a;var o=null;var f=t[0]-1;if(this.zoomFactor_===2){h=t[1];a=t[2]}else{o=this.getTileCoordExtent(t,r)}while(f>=this.minZoom){if(this.zoomFactor_===2){h=Math.floor(h/2);a=Math.floor(a/2);n=If.createOrUpdate(h,h,a,a,e)}else{n=this.getTileRangeForExtentAndZ(o,f,e)}if(i.call(s,f,n)){return true}--f}return false};fl.prototype.getExtent=function(){return this.extent_};fl.prototype.getMaxZoom=function(){return this.maxZoom};fl.prototype.getMinZoom=function(){return this.minZoom};fl.prototype.getOrigin=function(t){if(this.origin_){return this.origin_}else{return this.origins_[t]}};fl.prototype.getResolution=function(t){return this.resolutions_[t]};fl.prototype.getResolutions=function(){return this.resolutions_};fl.prototype.getTileCoordChildTileRange=function(t,i,s){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){var e=t[1]*2;var r=t[2]*2;return If.createOrUpdate(e,e+1,r,r+1,i)}var n=this.getTileCoordExtent(t,s);return this.getTileRangeForExtentAndZ(n,t[0]+1,i)}return null};fl.prototype.getTileRangeExtent=function(t,i,s){var e=this.getOrigin(t);var r=this.getResolution(t);var n=Oo.toSize(this.getTileSize(t),this.tmpSize_);var h=e[0]+i.minX*n[0]*r;var a=e[0]+(i.maxX+1)*n[0]*r;var o=e[1]+i.minY*n[1]*r;var f=e[1]+(i.maxY+1)*n[1]*r;return Ma.createOrUpdate(h,o,a,f,s)};fl.prototype.getTileRangeForExtentAndZ=function(t,i,s){var e=fl.tmpTileCoord_;this.getTileCoordForXYAndZ_(t[0],t[1],i,false,e);var r=e[1];var n=e[2];this.getTileCoordForXYAndZ_(t[2],t[3],i,true,e);return If.createOrUpdate(r,e[1],n,e[2],s)};fl.prototype.getTileCoordCenter=function(t){var i=this.getOrigin(t[0]);var s=this.getResolution(t[0]);var e=Oo.toSize(this.getTileSize(t[0]),this.tmpSize_);return[i[0]+(t[1]+.5)*e[0]*s,i[1]+(t[2]+.5)*e[1]*s]};fl.prototype.getTileCoordExtent=function(t,i){var s=this.getOrigin(t[0]);var e=this.getResolution(t[0]);var r=Oo.toSize(this.getTileSize(t[0]),this.tmpSize_);var n=s[0]+t[1]*r[0]*e;var h=s[1]+t[2]*r[1]*e;var a=n+r[0]*e;var o=h+r[1]*e;return Ma.createOrUpdate(n,h,a,o,i)};fl.prototype.getTileCoordForCoordAndResolution=function(t,i,s){return this.getTileCoordForXYAndResolution_(t[0],t[1],i,false,s)};fl.prototype.getTileCoordForXYAndResolution_=function(t,i,s,e,r){var n=this.getZForResolution(s);var h=s/this.getResolution(n);var a=this.getOrigin(n);var o=Oo.toSize(this.getTileSize(n),this.tmpSize_);var f=e?.5:0;var u=e?0:.5;var l=Math.floor((t-a[0])/s+f);var v=Math.floor((i-a[1])/s+u);var c=h*l/o[0];var d=h*v/o[1];if(e){c=Math.ceil(c)-1;d=Math.ceil(d)-1}else{c=Math.floor(c);d=Math.floor(d)}return il.createOrUpdate(n,c,d,r)};fl.prototype.getTileCoordForXYAndZ_=function(t,i,s,e,r){var n=this.getOrigin(s);var h=this.getResolution(s);var a=Oo.toSize(this.getTileSize(s),this.tmpSize_);var o=e?.5:0;var f=e?0:.5;var u=Math.floor((t-n[0])/h+o);var l=Math.floor((i-n[1])/h+f);var v=u/a[0];var c=l/a[1];if(e){v=Math.ceil(v)-1;c=Math.ceil(c)-1}else{v=Math.floor(v);c=Math.floor(c)}return il.createOrUpdate(s,v,c,r)};fl.prototype.getTileCoordForCoordAndZ=function(t,i,s){return this.getTileCoordForXYAndZ_(t[0],t[1],i,false,s)};fl.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]};fl.prototype.getTileSize=function(t){if(this.tileSize_){return this.tileSize_}else{return this.tileSizes_[t]}};fl.prototype.getFullTileRange=function(t){if(!this.fullTileRanges_){return null}else{return this.fullTileRanges_[t]}};fl.prototype.getZForResolution=function(t,i){var s=pa.linearFindNearest(this.resolutions_,t,i||0);return ca.clamp(s,this.minZoom,this.maxZoom)};fl.prototype.calculateTileRanges_=function(t){var i=this.resolutions_.length;var s=new Array(i);for(var e=this.minZoom;e<i;++e){s[e]=this.getTileRangeForExtentAndZ(t,e)}this.fullTileRanges_=s};var ul={};ul.getForProjection=function(t){var i=t.getDefaultTileGrid();if(!i){i=ul.createForProjection(t);t.setDefaultTileGrid(i)}return i};ul.wrapX=function(t,i,s){var e=i[0];var r=t.getTileCoordCenter(i);var n=ul.extentFromProjection(s);if(!Ma.containsCoordinate(n,r)){var h=Ma.getWidth(n);var a=Math.ceil((n[0]-r[0])/h);r[0]+=h*a;return t.getTileCoordForCoordAndZ(r,e)}else{return i}};ul.createForExtent=function(t,i,s,e){var r=e!==undefined?e:_a.TOP_LEFT;var n=ul.resolutionsFromExtent(t,i,s);return new fl({extent:t,origin:Ma.getCorner(t,r),resolutions:n,tileSize:s})};ul.createXYZ=function(t){var i={};ea.assign(i,t!==undefined?t:{});if(i.extent===undefined){i.extent=Na.get("EPSG:3857").getExtent()}i.resolutions=ul.resolutionsFromExtent(i.extent,i.maxZoom,i.tileSize);delete i.maxZoom;return new fl(i)};ul.resolutionsFromExtent=function(t,i,s){var e=i!==undefined?i:ta.DEFAULT_MAX_ZOOM;var r=Ma.getHeight(t);var n=Ma.getWidth(t);var h=Oo.toSize(s!==undefined?s:ta.DEFAULT_TILE_SIZE);var a=Math.max(n/h[0],r/h[1]);var o=e+1;var f=new Array(o);for(var u=0;u<o;++u){f[u]=a/Math.pow(2,u)}return f};ul.createForProjection=function(t,i,s,e){var r=ul.extentFromProjection(t);return ul.createForExtent(r,i,s,e)};ul.extentFromProjection=function(t){t=Na.get(t);var i=t.getExtent();if(!i){var s=180*Na.METERS_PER_UNIT[ba.DEGREES]/t.getMetersPerUnit();i=Ma.createOrUpdate(-s,-s,s,s)}return i};var ll=function(t){this.html_=t.html;this.tileRanges_=t.tileRanges?t.tileRanges:null};ll.prototype.getHTML=function(){return this.html_};ll.prototype.intersectsAnyTileRange=function(t,i,s){if(!this.tileRanges_){return true}var e,r,n,h;for(h in t){if(!(h in this.tileRanges_)){continue}n=t[h];var a;for(e=0,r=this.tileRanges_[h].length;e<r;++e){a=this.tileRanges_[h][e];if(a.intersects(n)){return true}var o=i.getTileRangeForExtentAndZ(ul.extentFromProjection(s),parseInt(h,10));var f=o.getWidth();if(n.minX<o.minX||n.maxX>o.maxX){if(a.intersects(new If(ca.modulo(n.minX,f),ca.modulo(n.maxX,f),n.minY,n.maxY))){return true}if(n.getWidth()>f&&a.intersects(o)){return true}}}}return false};var vl=function(t){ua.call(this);this.projection_=Na.get(t.projection);this.attributions_=null;this.attributions2_=this.adaptAttributions_(t.attributions);this.logo_=t.logo;this.state_=t.state!==undefined?t.state:Io.READY;this.wrapX_=t.wrapX!==undefined?t.wrapX:false};ta.inherits(vl,ua);vl.prototype.adaptAttributions_=function(t){if(!t){return null}if(t instanceof ll){this.attributions_=[t];return function(i){return[t.getHTML()]}}if(Array.isArray(t)){if(t[0]instanceof ll){this.attributions_=t;var i=t.map((function(t){return t.getHTML()}));return function(t){return i}}this.attributions_=t.map((function(t){return new ll({html:t})}));return function(i){return t}}if(typeof t==="function"){return t}this.attributions_=[new ll({html:t})];return function(i){return[t]}};vl.prototype.forEachFeatureAtCoordinate=ta.nullFunction;vl.prototype.getAttributions=function(){return this.attributions_};vl.prototype.getAttributions2=function(){return this.attributions2_};vl.prototype.getLogo=function(){return this.logo_};vl.prototype.getProjection=function(){return this.projection_};vl.prototype.getResolutions=function(){};vl.prototype.getState=function(){return this.state_};vl.prototype.getWrapX=function(){return this.wrapX_};vl.prototype.refresh=function(){this.changed()};vl.prototype.setAttributions=function(t){this.attributions2_=this.adaptAttributions_(t);this.changed()};vl.prototype.setLogo=function(t){this.logo_=t};vl.prototype.setState=function(t){this.state_=t;this.changed()};var cl=function(t){vl.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX});this.opaque_=t.opaque!==undefined?t.opaque:false;this.tilePixelRatio_=t.tilePixelRatio!==undefined?t.tilePixelRatio:1;this.tileGrid=t.tileGrid!==undefined?t.tileGrid:null;this.tileCache=new nl(t.cacheSize);this.tmpSize=[0,0];this.key_="";this.tileOptions={transition:t.transition}};ta.inherits(cl,vl);cl.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()};cl.prototype.expireCache=function(t,i){var s=this.getTileCacheForProjection(t);if(s){s.expireCache(i)}};cl.prototype.forEachLoadedTile=function(t,i,s,e){var r=this.getTileCacheForProjection(t);if(!r){return false}var n=true;var h,a,o;for(var f=s.minX;f<=s.maxX;++f){for(var u=s.minY;u<=s.maxY;++u){a=il.getKeyZXY(i,f,u);o=false;if(r.containsKey(a)){h=r.get(a);o=h.getState()===po.LOADED;if(o){o=e(h)!==false}}if(!o){n=false}}}return n};cl.prototype.getGutter=function(t){return 0};cl.prototype.getKey=function(){return this.key_};cl.prototype.setKey=function(t){if(this.key_!==t){this.key_=t;this.changed()}};cl.prototype.getOpaque=function(t){return this.opaque_};cl.prototype.getResolutions=function(){return this.tileGrid.getResolutions()};cl.prototype.getTile=function(t,i,s,e,r){};cl.prototype.getTileGrid=function(){return this.tileGrid};cl.prototype.getTileGridForProjection=function(t){if(!this.tileGrid){return ul.getForProjection(t)}else{return this.tileGrid}};cl.prototype.getTileCacheForProjection=function(t){var i=this.getProjection();if(i&&!Na.equivalent(i,t)){return null}else{return this.tileCache}};cl.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_};cl.prototype.getTilePixelSize=function(t,i,s){var e=this.getTileGridForProjection(s);var r=this.getTilePixelRatio(i);var n=Oo.toSize(e.getTileSize(t),this.tmpSize);if(r==1){return n}else{return Oo.scale(n,r,this.tmpSize)}};cl.prototype.getTileCoordForTileUrlFunction=function(t,i){var s=i!==undefined?i:this.getProjection();var e=this.getTileGridForProjection(s);if(this.getWrapX()&&s.isGlobal()){t=ul.wrapX(e,t,s)}return il.withinExtentAndZ(t,e)?t:null};cl.prototype.refresh=function(){this.tileCache.clear();this.changed()};cl.prototype.useTile=ta.nullFunction;cl.Event=function(t,i){ha.call(this,t);this.tile=i};ta.inherits(cl.Event,ha);var dl={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};var ml=function(t){cl.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition});this.tileLoadFunction=t.tileLoadFunction;this.tileUrlFunction=this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.nullTileUrlFunction;this.urls=null;if(t.urls){this.setUrls(t.urls)}else if(t.url){this.setUrl(t.url)}if(t.tileUrlFunction){this.setTileUrlFunction(t.tileUrlFunction)}this.tileLoadingKeys_={}};ta.inherits(ml,cl);ml.prototype.getTileLoadFunction=function(){return this.tileLoadFunction};ml.prototype.getTileUrlFunction=function(){return this.tileUrlFunction};ml.prototype.getUrls=function(){return this.urls};ml.prototype.handleTileChange=function(t){var i=t.target;var s=ta.getUid(i);var e=i.getState();var r;if(e==po.LOADING){this.tileLoadingKeys_[s]=true;r=dl.TILELOADSTART}else if(s in this.tileLoadingKeys_){delete this.tileLoadingKeys_[s];r=e==po.ERROR?dl.TILELOADERROR:e==po.LOADED||e==po.ABORT?dl.TILELOADEND:undefined}if(r!=undefined){this.dispatchEvent(new cl.Event(r,i))}};ml.prototype.setTileLoadFunction=function(t){this.tileCache.clear();this.tileLoadFunction=t;this.changed()};ml.prototype.setTileUrlFunction=function(t,i){this.tileUrlFunction=t;this.tileCache.pruneExceptNewestZ();if(typeof i!=="undefined"){this.setKey(i)}else{this.changed()}};ml.prototype.setUrl=function(t){var i=this.urls=sl.expandUrl(t);this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTemplates(i,this.tileGrid),t)};ml.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTemplates(t,this.tileGrid),i)};ml.prototype.useTile=function(t,i,s){var e=il.getKeyZXY(t,i,s);if(this.tileCache.containsKey(e)){this.tileCache.get(e)}};var pl=function(t){ml.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:pl.defaultTileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition});this.crossOrigin=t.crossOrigin!==undefined?t.crossOrigin:null;this.tileClass=t.tileClass!==undefined?t.tileClass:rl;this.tileCacheForProjection={};this.tileGridForProjection={};this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold;this.renderReprojectionEdges_=false};ta.inherits(pl,ml);pl.prototype.canExpireCache=function(){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.canExpireCache.call(this)}if(this.tileCache.canExpireCache()){return true}else{for(var t in this.tileCacheForProjection){if(this.tileCacheForProjection[t].canExpireCache()){return true}}}return false};pl.prototype.expireCache=function(t,i){if(!ta.ENABLE_RASTER_REPROJECTION){ml.prototype.expireCache.call(this,t,i);return}var s=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==s?i:{});for(var e in this.tileCacheForProjection){var r=this.tileCacheForProjection[e];r.expireCache(r==s?i:{})}};pl.prototype.getGutter=function(t){if(ta.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!Na.equivalent(this.getProjection(),t)){return 0}else{return this.getGutterInternal()}};pl.prototype.getGutterInternal=function(){return 0};pl.prototype.getOpaque=function(t){if(ta.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!Na.equivalent(this.getProjection(),t)){return false}else{return ml.prototype.getOpaque.call(this,t)}};pl.prototype.getTileGridForProjection=function(t){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.getTileGridForProjection.call(this,t)}var i=this.getProjection();if(this.tileGrid&&(!i||Na.equivalent(i,t))){return this.tileGrid}else{var s=ta.getUid(t).toString();if(!(s in this.tileGridForProjection)){this.tileGridForProjection[s]=ul.getForProjection(t)}return this.tileGridForProjection[s]}};pl.prototype.getTileCacheForProjection=function(t){if(!ta.ENABLE_RASTER_REPROJECTION){return ml.prototype.getTileCacheForProjection.call(this,t)}var i=this.getProjection();if(!i||Na.equivalent(i,t)){return this.tileCache}else{var s=ta.getUid(t).toString();if(!(s in this.tileCacheForProjection)){this.tileCacheForProjection[s]=new nl(this.tileCache.highWaterMark)}return this.tileCacheForProjection[s]}};pl.prototype.createTile_=function(t,i,s,e,r,n){var h=[t,i,s];var a=this.getTileCoordForTileUrlFunction(h,r);var o=a?this.tileUrlFunction(a,e,r):undefined;var f=new this.tileClass(h,o!==undefined?po.IDLE:po.EMPTY,o!==undefined?o:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);f.key=n;ra.listen(f,oa.CHANGE,this.handleTileChange,this);return f};pl.prototype.getTile=function(t,i,s,e,r){var n=this.getProjection();if(!ta.ENABLE_RASTER_REPROJECTION||!n||!r||Na.equivalent(n,r)){return this.getTileInternal(t,i,s,e,n||r)}else{var h=this.getTileCacheForProjection(r);var a=[t,i,s];var o;var f=il.getKey(a);if(h.containsKey(f)){o=h.get(f)}var u=this.getKey();if(o&&o.key==u){return o}else{var l=this.getTileGridForProjection(n);var v=this.getTileGridForProjection(r);var c=this.getTileCoordForTileUrlFunction(a,r);var d=new ol(n,l,r,v,a,c,this.getTilePixelRatio(e),this.getGutterInternal(),function(t,i,s,e){return this.getTileInternal(t,i,s,e,n)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);d.key=u;if(o){d.interimTile=o;d.refreshInterimChain();h.replace(f,d)}else{h.set(f,d)}return d}}};pl.prototype.getTileInternal=function(t,i,s,e,r){var n=null;var h=il.getKeyZXY(t,i,s);var a=this.getKey();if(!this.tileCache.containsKey(h)){n=this.createTile_(t,i,s,e,r,a);this.tileCache.set(h,n)}else{n=this.tileCache.get(h);if(n.key!=a){var o=n;n=this.createTile_(t,i,s,e,r,a);if(o.getState()==po.IDLE){n.interimTile=o.interimTile}else{n.interimTile=o}n.refreshInterimChain();this.tileCache.replace(h,n)}}return n};pl.prototype.setRenderReprojectionEdges=function(t){if(!ta.ENABLE_RASTER_REPROJECTION||this.renderReprojectionEdges_==t){return}this.renderReprojectionEdges_=t;for(var i in this.tileCacheForProjection){this.tileCacheForProjection[i].clear()}this.changed()};pl.prototype.setTileGridForProjection=function(t,i){if(ta.ENABLE_RASTER_REPROJECTION){var s=Na.get(t);if(s){var e=ta.getUid(s).toString();if(!(e in this.tileGridForProjection)){this.tileGridForProjection[e]=i}}}};pl.defaultTileLoadFunction=function(t,i){t.getImage().src=i};var _l={KVP:"KVP",REST:"REST"};var gl=function(t){this.matrixIds_=t.matrixIds;fl.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})};ta.inherits(gl,fl);gl.prototype.getMatrixId=function(t){return this.matrixIds_[t]};gl.prototype.getMatrixIds=function(){return this.matrixIds_};gl.createFromCapabilitiesMatrixSet=function(t,i,s){var e=[];var r=[];var n=[];var h=[];var a=[];var o=s!==undefined?s:[];var f="SupportedCRS";var u="TileMatrix";var l="Identifier";var v="ScaleDenominator";var c="TopLeftCorner";var d="TileWidth";var m="TileHeight";var p=t[f];var _=Na.get(p.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(p);var g=_.getMetersPerUnit();var M=_.getAxisOrientation().substr(0,2)=="ne";t[u].sort((function(t,i){return i[v]-t[v]}));t[u].forEach((function(t,i,s){var f;if(o.length>0){f=pa.find(o,(function(i,s,e){return t[l]==i[u]}))}else{f=true}if(f){r.push(t[l]);var p=t[v]*28e-5/g;var _=t[d];var z=t[m];if(M){n.push([t[c][1],t[c][0]])}else{n.push(t[c])}e.push(p);h.push(_==z?_:[_,z]);a.push([t["MatrixWidth"],-t["MatrixHeight"]])}}));return new gl({extent:i,origins:n,resolutions:e,matrixIds:r,tileSizes:h,sizes:a})};var Ml={};Ml.appendParams=function(t,i){var s=[];Object.keys(i).forEach((function(t){if(i[t]!==null&&i[t]!==undefined){s.push(t+"="+encodeURIComponent(i[t]))}}));var e=s.join("&");t=t.replace(/[?&]$/,"");t=t.indexOf("?")===-1?t+"?":t+"&";return t+e};var zl=function(t){this.version_=t.version!==undefined?t.version:"1.0.0";this.format_=t.format!==undefined?t.format:"image/jpeg";this.dimensions_=t.dimensions!==undefined?t.dimensions:{};this.layer_=t.layer;this.matrixSet_=t.matrixSet;this.style_=t.style;var i=t.urls;if(i===undefined&&t.url!==undefined){i=sl.expandUrl(t.url)}this.requestEncoding_=t.requestEncoding!==undefined?t.requestEncoding:_l.KVP;var s=this.requestEncoding_;var e=t.tileGrid;var r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};if(s==_l.KVP){ea.assign(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_})}var n=this.dimensions_;this.createFromWMTSTemplate_=function(t){t=s==_l.KVP?Ml.appendParams(t,r):t.replace(/\{(\w+?)\}/g,(function(t,i){return i.toLowerCase()in r?r[i.toLowerCase()]:t}));return function(i,r,h){if(!i){return undefined}else{var a={TileMatrix:e.getMatrixId(i[0]),TileCol:i[1],TileRow:-i[2]-1};ea.assign(a,n);var o=t;if(s==_l.KVP){o=Ml.appendParams(o,a)}else{o=o.replace(/\{(\w+?)\}/g,(function(t,i){return a[i]}))}return o}}};var h=i&&i.length>0?sl.createFromTileUrlFunctions(i.map(this.createFromWMTSTemplate_)):sl.nullTileUrlFunction;pl.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:e,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:h,urls:i,wrapX:t.wrapX!==undefined?t.wrapX:false,transition:t.transition});this.setKey(this.getKeyForDimensions_())};ta.inherits(zl,pl);zl.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):sl.createFromTileUrlFunctions(t.map(this.createFromWMTSTemplate_.bind(this))),i)};zl.prototype.getDimensions=function(){return this.dimensions_};zl.prototype.getFormat=function(){return this.format_};zl.prototype.getLayer=function(){return this.layer_};zl.prototype.getMatrixSet=function(){return this.matrixSet_};zl.prototype.getRequestEncoding=function(){return this.requestEncoding_};zl.prototype.getStyle=function(){return this.style_};zl.prototype.getVersion=function(){return this.version_};zl.prototype.getKeyForDimensions_=function(){var t=0;var i=[];for(var s in this.dimensions_){i[t++]=s+"-"+this.dimensions_[s]}return i.join("/")};zl.prototype.updateDimensions=function(t){ea.assign(this.dimensions_,t);this.setKey(this.getKeyForDimensions_())};zl.optionsFromCapabilities=function(t,i){var s=t["Contents"]["Layer"];var e=pa.find(s,(function(t,s,e){return t["Identifier"]==i["layer"]}));if(e===null){return null}var r=t["Contents"]["TileMatrixSet"];var n,h,a;if(e["TileMatrixSetLink"].length>1){if("projection"in i){n=pa.findIndex(e["TileMatrixSetLink"],(function(t,s,e){var n=pa.find(r,(function(i){return i["Identifier"]==t["TileMatrixSet"]}));var h=n["SupportedCRS"];var a=Na.get(h.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(h);var o=Na.get(i["projection"]);if(a&&o){return Na.equivalent(a,o)}else{return h==i["projection"]}}))}else{n=pa.findIndex(e["TileMatrixSetLink"],(function(t,s,e){return t["TileMatrixSet"]==i["matrixSet"]}))}}else{n=0}if(n<0){n=0}h=e["TileMatrixSetLink"][n]["TileMatrixSet"];a=e["TileMatrixSetLink"][n]["TileMatrixSetLimits"];var o=e["Format"][0];if("format"in i){o=i["format"]}n=pa.findIndex(e["Style"],(function(t,s,e){if("style"in i){return t["Title"]==i["style"]}else{return t["isDefault"]}}));if(n<0){n=0}var f=e["Style"][n]["Identifier"];var u={};if("Dimension"in e){e["Dimension"].forEach((function(t,i,s){var e=t["Identifier"];var r=t["Default"];if(r===undefined){r=t["Value"][0]}u[e]=r}))}var l=t["Contents"]["TileMatrixSet"];var v=pa.find(l,(function(t,i,s){return t["Identifier"]==h}));var c;var d=v["SupportedCRS"];if(d){c=Na.get(d.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Na.get(d)}if("projection"in i){var m=Na.get(i["projection"]);if(m){if(!c||Na.equivalent(m,c)){c=m}}}var p=e["WGS84BoundingBox"];var _,g;if(p!==undefined){var M=Na.get("EPSG:4326").getExtent();g=p[0]==M[0]&&p[2]==M[2];_=Na.transformExtent(p,"EPSG:4326",c);var z=c.getExtent();if(z){if(!Ma.containsExtent(z,_)){_=undefined}}}var w=gl.createFromCapabilitiesMatrixSet(v,_,a);var y=[];var b=i["requestEncoding"];b=b!==undefined?b:"";if("OperationsMetadata"in t&&"GetTile"in t["OperationsMetadata"]){var x=t["OperationsMetadata"]["GetTile"]["DCP"]["HTTP"]["Get"];for(var E=0,S=x.length;E<S;++E){if(x[E]["Constraint"]){var G=pa.find(x[E]["Constraint"],(function(t){return t["name"]=="GetEncoding"}));var P=G["AllowedValues"]["Value"];if(b===""){b=P[0]}if(b===_l.KVP){if(pa.includes(P,_l.KVP)){y.push(x[E]["href"])}}else{break}}else if(x[E]["href"]){b=_l.KVP;y.push(x[E]["href"])}}}if(y.length===0){b=_l.REST;e["ResourceURL"].forEach((function(t){if(t["resourceType"]==="tile"){o=t["format"];y.push(t["template"])}}))}return{urls:y,layer:i["layer"],matrixSet:h,format:o,projection:c,requestEncoding:b,tileGrid:w,style:f,dimensions:u,wrapX:g,crossOrigin:i["crossOrigin"]}};var wl={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};var yl={};yl.DOCUMENT=document.implementation.createDocument("","",null);yl.createElementNS=function(t,i){return yl.DOCUMENT.createElementNS(t,i)};yl.getAllTextContent=function(t,i){return yl.getAllTextContent_(t,i,[]).join("")};yl.getAllTextContent_=function(t,i,s){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE){if(i){s.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,""))}else{s.push(t.nodeValue)}}else{var e;for(e=t.firstChild;e;e=e.nextSibling){yl.getAllTextContent_(e,i,s)}}return s};yl.isDocument=function(t){return t instanceof Document};yl.isNode=function(t){return t instanceof Node};yl.getAttributeNS=function(t,i,s){return t.getAttributeNS(i,s)||""};yl.setAttributeNS=function(t,i,s,e){t.setAttributeNS(i,s,e)};yl.parse=function(t){return(new DOMParser).parseFromString(t,"application/xml")};yl.makeArrayExtender=function(t,i){return function(s,e){var r=t.call(i,s,e);if(r!==undefined){var n=e[e.length-1];pa.extend(n,r)}}};yl.makeArrayPusher=function(t,i){return function(s,e){var r=t.call(i!==undefined?i:this,s,e);if(r!==undefined){var n=e[e.length-1];n.push(r)}}};yl.makeReplacer=function(t,i){return function(s,e){var r=t.call(i!==undefined?i:this,s,e);if(r!==undefined){e[e.length-1]=r}}};yl.makeObjectPropertyPusher=function(t,i,s){return function(e,r){var n=t.call(s!==undefined?s:this,e,r);if(n!==undefined){var h=r[r.length-1];var a=i!==undefined?i:e.localName;var o;if(a in h){o=h[a]}else{o=h[a]=[]}o.push(n)}}};yl.makeObjectPropertySetter=function(t,i,s){return function(e,r){var n=t.call(s!==undefined?s:this,e,r);if(n!==undefined){var h=r[r.length-1];var a=i!==undefined?i:e.localName;h[a]=n}}};yl.makeChildAppender=function(t,i){return function(s,e,r){t.call(i!==undefined?i:this,s,e,r);var n=r[r.length-1];var h=n.node;h.appendChild(s)}};yl.makeArraySerializer=function(t,i){var s,e;return function(i,r,n){if(s===undefined){s={};var h={};h[i.localName]=t;s[i.namespaceURI]=h;e=yl.makeSimpleNodeFactory(i.localName)}yl.serialize(s,e,r,n)}};yl.makeSimpleNodeFactory=function(t,i){var s=t;return function(t,e,r){var n=e[e.length-1];var h=n.node;var a=s;if(a===undefined){a=r}var o=i;if(i===undefined){o=h.namespaceURI}return yl.createElementNS(o,a)}};yl.OBJECT_PROPERTY_NODE_FACTORY=yl.makeSimpleNodeFactory();yl.makeSequence=function(t,i){var s=i.length;var e=new Array(s);for(var r=0;r<s;++r){e[r]=t[i[r]]}return e};yl.makeStructureNS=function(t,i,s){var e=s!==undefined?s:{};var r,n;for(r=0,n=t.length;r<n;++r){e[t[r]]=i}return e};yl.parseNode=function(t,i,s,e){var r;for(r=i.firstElementChild;r;r=r.nextElementSibling){var n=t[r.namespaceURI];if(n!==undefined){var h=n[r.localName];if(h!==undefined){h.call(e,r,s)}}}};yl.pushParseAndPop=function(t,i,s,e,r){e.push(t);yl.parseNode(i,s,e,r);return e.pop()};yl.serialize=function(t,i,s,e,r,n){var h=(r!==undefined?r:s).length;var a,o;for(var f=0;f<h;++f){a=s[f];if(a!==undefined){o=i.call(n,a,e,r!==undefined?r[f]:undefined);if(o!==undefined){t[o.namespaceURI][o.localName].call(n,o,a,e)}}}};yl.pushSerializeAndPop=function(t,i,s,e,r,n,h){r.push(t);yl.serialize(i,s,e,r,n,h);return r.pop()};var bl={};bl.loadFeaturesXhr=function(t,i,s,e){return function(r,n,h){var a=new XMLHttpRequest;a.open("GET",typeof t==="function"?t(r,n,h):t,true);if(i.getType()==wl.ARRAY_BUFFER){a.responseType="arraybuffer"}a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=i.getType();var n;if(r==wl.JSON||r==wl.TEXT){n=a.responseText}else if(r==wl.XML){n=a.responseXML;if(!n){n=yl.parse(a.responseText)}}else if(r==wl.ARRAY_BUFFER){n=a.response}if(n){s.call(this,i.readFeatures(n,{featureProjection:h}),i.readProjection(n),i.getLastExtent())}else{e.call(this)}}else{e.call(this)}}.bind(this);a.onerror=function(){e.call(this)}.bind(this);a.send()}};bl.xhr=function(t,i){return bl.loadFeaturesXhr(t,i,(function(t,i){this.addFeatures(t)}),ta.nullFunction)};var xl={};xl.all=function(t,i){return[[-Infinity,-Infinity,Infinity,Infinity]]};xl.bbox=function(t,i){return[t]};xl.tile=function(t){return function(i,s){var e=t.getZForResolution(s);var r=t.getTileRangeForExtentAndZ(i,e);var n=[];var h=[e,0,0];for(h[1]=r.minX;h[1]<=r.maxX;++h[1]){for(h[2]=r.minY;h[2]<=r.maxY;++h[2]){n.push(t.getTileCoordExtent(h))}}return n}};var El={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature"};var Sl=function(t){var i=t||{};vl.call(this,{attributions:i.attributions,logo:i.logo,projection:undefined,state:Io.READY,wrapX:i.wrapX!==undefined?i.wrapX:true});this.loader_=ta.nullFunction;this.format_=i.format;this.overlaps_=i.overlaps==undefined?true:i.overlaps;this.url_=i.url;if(i.loader!==undefined){this.loader_=i.loader}else if(this.url_!==undefined){va.assert(this.format_,7);this.loader_=bl.xhr(this.url_,this.format_)}this.strategy_=i.strategy!==undefined?i.strategy:xl.all;var s=i.useSpatialIndex!==undefined?i.useSpatialIndex:true;this.featuresRtree_=s?new Nu:null;this.loadedExtentsRtree_=new Nu;this.nullGeometryFeatures_={};this.idIndex_={};this.undefIdIndex_={};this.featureChangeKeys_={};this.featuresCollection_=null;var e,r;if(i.features instanceof Qa){e=i.features;r=e.getArray()}else if(Array.isArray(i.features)){r=i.features}if(!s&&e===undefined){e=new Qa(r)}if(r!==undefined){this.addFeaturesInternal(r)}if(e!==undefined){this.bindFeaturesCollection_(e)}};ta.inherits(Sl,vl);Sl.prototype.addFeature=function(t){this.addFeatureInternal(t);this.changed()};Sl.prototype.addFeatureInternal=function(t){var i=ta.getUid(t).toString();if(!this.addToIndex_(i,t)){return}this.setupChangeEvents_(i,t);var s=t.getGeometry();if(s){var e=s.getExtent();if(this.featuresRtree_){this.featuresRtree_.insert(e,t)}}else{this.nullGeometryFeatures_[i]=t}this.dispatchEvent(new Sl.Event(El.ADDFEATURE,t))};Sl.prototype.setupChangeEvents_=function(t,i){this.featureChangeKeys_[t]=[ra.listen(i,oa.CHANGE,this.handleFeatureChange_,this),ra.listen(i,sa.PROPERTYCHANGE,this.handleFeatureChange_,this)]};Sl.prototype.addToIndex_=function(t,i){var s=true;var e=i.getId();if(e!==undefined){if(!(e.toString()in this.idIndex_)){this.idIndex_[e.toString()]=i}else{s=false}}else{va.assert(!(t in this.undefIdIndex_),30);this.undefIdIndex_[t]=i}return s};Sl.prototype.addFeatures=function(t){this.addFeaturesInternal(t);this.changed()};Sl.prototype.addFeaturesInternal=function(t){var i,s,e,r;var n=[];var h=[];var a=[];for(s=0,e=t.length;s<e;s++){r=t[s];i=ta.getUid(r).toString();if(this.addToIndex_(i,r)){h.push(r)}}for(s=0,e=h.length;s<e;s++){r=h[s];i=ta.getUid(r).toString();this.setupChangeEvents_(i,r);var o=r.getGeometry();if(o){var f=o.getExtent();n.push(f);a.push(r)}else{this.nullGeometryFeatures_[i]=r}}if(this.featuresRtree_){this.featuresRtree_.load(n,a)}for(s=0,e=h.length;s<e;s++){this.dispatchEvent(new Sl.Event(El.ADDFEATURE,h[s]))}};Sl.prototype.bindFeaturesCollection_=function(t){var i=false;ra.listen(this,El.ADDFEATURE,(function(s){if(!i){i=true;t.push(s.feature);i=false}}));ra.listen(this,El.REMOVEFEATURE,(function(s){if(!i){i=true;t.remove(s.feature);i=false}}));ra.listen(t,$a.ADD,(function(t){if(!i){i=true;this.addFeature(t.element);i=false}}),this);ra.listen(t,$a.REMOVE,(function(t){if(!i){i=true;this.removeFeature(t.element);i=false}}),this);this.featuresCollection_=t};Sl.prototype.clear=function(t){if(t){for(var i in this.featureChangeKeys_){var s=this.featureChangeKeys_[i];s.forEach(ra.unlistenByKey)}if(!this.featuresCollection_){this.featureChangeKeys_={};this.idIndex_={};this.undefIdIndex_={}}}else{if(this.featuresRtree_){this.featuresRtree_.forEach(this.removeFeatureInternal,this);for(var e in this.nullGeometryFeatures_){this.removeFeatureInternal(this.nullGeometryFeatures_[e])}}}if(this.featuresCollection_){this.featuresCollection_.clear()}if(this.featuresRtree_){this.featuresRtree_.clear()}this.loadedExtentsRtree_.clear();this.nullGeometryFeatures_={};var r=new Sl.Event(El.CLEAR);this.dispatchEvent(r);this.changed()};Sl.prototype.forEachFeature=function(t,i){if(this.featuresRtree_){return this.featuresRtree_.forEach(t,i)}else if(this.featuresCollection_){return this.featuresCollection_.forEach(t,i)}};Sl.prototype.forEachFeatureAtCoordinateDirect=function(t,i,s){var e=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(e,(function(e){var r=e.getGeometry();if(r.intersectsCoordinate(t)){return i.call(s,e)}else{return undefined}}))};Sl.prototype.forEachFeatureInExtent=function(t,i,s){if(this.featuresRtree_){return this.featuresRtree_.forEachInExtent(t,i,s)}else if(this.featuresCollection_){return this.featuresCollection_.forEach(i,s)}};Sl.prototype.forEachFeatureIntersectingExtent=function(t,i,s){return this.forEachFeatureInExtent(t,(function(e){var r=e.getGeometry();if(r.intersectsExtent(t)){var n=i.call(s,e);if(n){return n}}}))};Sl.prototype.getFeaturesCollection=function(){return this.featuresCollection_};Sl.prototype.getFeatures=function(){var t;if(this.featuresCollection_){t=this.featuresCollection_.getArray()}else if(this.featuresRtree_){t=this.featuresRtree_.getAll();if(!ea.isEmpty(this.nullGeometryFeatures_)){pa.extend(t,ea.getValues(this.nullGeometryFeatures_))}}return t};Sl.prototype.getFeaturesAtCoordinate=function(t){var i=[];this.forEachFeatureAtCoordinateDirect(t,(function(t){i.push(t)}));return i};Sl.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_.getInExtent(t)};Sl.prototype.getClosestFeatureToCoordinate=function(t,i){var s=t[0];var e=t[1];var r=null;var n=[NaN,NaN];var h=Infinity;var a=[-Infinity,-Infinity,Infinity,Infinity];var o=i?i:wa.TRUE;this.featuresRtree_.forEachInExtent(a,(function(t){if(o(t)){var i=t.getGeometry();var f=h;h=i.closestPointXY(s,e,n,h);if(h<f){r=t;var u=Math.sqrt(h);a[0]=s-u;a[1]=e-u;a[2]=s+u;a[3]=e+u}}}));return r};Sl.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)};Sl.prototype.getFeatureById=function(t){var i=this.idIndex_[t.toString()];return i!==undefined?i:null};Sl.prototype.getFormat=function(){return this.format_};Sl.prototype.getOverlaps=function(){return this.overlaps_};Sl.prototype.getResolutions=function(){};Sl.prototype.getUrl=function(){return this.url_};Sl.prototype.handleFeatureChange_=function(t){var i=t.target;var s=ta.getUid(i).toString();var e=i.getGeometry();if(!e){if(!(s in this.nullGeometryFeatures_)){if(this.featuresRtree_){this.featuresRtree_.remove(i)}this.nullGeometryFeatures_[s]=i}}else{var r=e.getExtent();if(s in this.nullGeometryFeatures_){delete this.nullGeometryFeatures_[s];if(this.featuresRtree_){this.featuresRtree_.insert(r,i)}}else{if(this.featuresRtree_){this.featuresRtree_.update(r,i)}}}var n=i.getId();if(n!==undefined){var h=n.toString();if(s in this.undefIdIndex_){delete this.undefIdIndex_[s];this.idIndex_[h]=i}else{if(this.idIndex_[h]!==i){this.removeFromIdIndex_(i);this.idIndex_[h]=i}}}else{if(!(s in this.undefIdIndex_)){this.removeFromIdIndex_(i);this.undefIdIndex_[s]=i}}this.changed();this.dispatchEvent(new Sl.Event(El.CHANGEFEATURE,i))};Sl.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&ea.isEmpty(this.nullGeometryFeatures_)};Sl.prototype.loadFeatures=function(t,i,s){var e=this.loadedExtentsRtree_;var r=this.strategy_(t,i);var n,h;for(n=0,h=r.length;n<h;++n){var a=r[n];var o=e.forEachInExtent(a,(function(t){return Ma.containsExtent(t.extent,a)}));if(!o){this.loader_.call(this,a,i,s);e.insert(a,{extent:a.slice()})}}};Sl.prototype.removeLoadedExtent=function(t){var i=this.loadedExtentsRtree_;var s;i.forEachInExtent(t,(function(i){if(Ma.equals(i.extent,t)){s=i;return true}}));if(s){i.remove(s)}};Sl.prototype.removeFeature=function(t){var i=ta.getUid(t).toString();if(i in this.nullGeometryFeatures_){delete this.nullGeometryFeatures_[i]}else{if(this.featuresRtree_){this.featuresRtree_.remove(t)}}this.removeFeatureInternal(t);this.changed()};Sl.prototype.removeFeatureInternal=function(t){var i=ta.getUid(t).toString();this.featureChangeKeys_[i].forEach(ra.unlistenByKey);delete this.featureChangeKeys_[i];var s=t.getId();if(s!==undefined){delete this.idIndex_[s.toString()]}else{delete this.undefIdIndex_[i]}this.dispatchEvent(new Sl.Event(El.REMOVEFEATURE,t))};Sl.prototype.removeFromIdIndex_=function(t){var i=false;for(var s in this.idIndex_){if(this.idIndex_[s]===t){delete this.idIndex_[s];i=true;break}}return i};Sl.prototype.setLoader=function(t){this.loader_=t};Sl.Event=function(t,i){ha.call(this,t);this.feature=i};ta.inherits(Sl.Event,ha);var Gl={};Gl.lineString=function(t,i,s,e,r,n){var h=NaN;var a=NaN;var o=(s-i)/e;if(o===1){h=t[i];a=t[i+1]}else if(o==2){h=(1-r)*t[i]+r*t[i+e];a=(1-r)*t[i+1]+r*t[i+e+1]}else if(o!==0){var f=t[i];var u=t[i+1];var l=0;var v=[0];var c;for(c=i+e;c<s;c+=e){var d=t[c];var m=t[c+1];l+=Math.sqrt((d-f)*(d-f)+(m-u)*(m-u));v.push(l);f=d;u=m}var p=r*l;var _=pa.binarySearch(v,p);if(_<0){var g=(p-v[-_-2])/(v[-_-1]-v[-_-2]);var M=i+(-_-2)*e;h=ca.lerp(t[M],t[M+e],g);a=ca.lerp(t[M+1],t[M+e+1],g)}else{h=t[i+_*e];a=t[i+_*e+1]}}if(n){n[0]=h;n[1]=a;return n}else{return[h,a]}};Gl.lineStringCoordinateAtM=function(t,i,s,e,r,n){if(s==i){return null}var h;if(r<t[i+e-1]){if(n){h=t.slice(i,i+e);h[e-1]=r;return h}else{return null}}else if(t[s-1]<r){if(n){h=t.slice(s-e,s);h[e-1]=r;return h}else{return null}}if(r==t[i+e-1]){return t.slice(i,i+e)}var a=i/e;var o=s/e;while(a<o){var f=a+o>>1;if(r<t[(f+1)*e-1]){o=f}else{a=f+1}}var u=t[a*e-1];if(r==u){return t.slice((a-1)*e,(a-1)*e+e)}var l=t[(a+1)*e-1];var v=(r-u)/(l-u);h=[];var c;for(c=0;c<e-1;++c){h.push(ca.lerp(t[(a-1)*e+c],t[a*e+c],v))}h.push(r);return h};Gl.lineStringsCoordinateAtM=function(t,i,s,e,r,n,h){if(h){return Gl.lineStringCoordinateAtM(t,i,s[s.length-1],e,r,n)}var a;if(r<t[e-1]){if(n){a=t.slice(0,e);a[e-1]=r;return a}else{return null}}if(t[t.length-1]<r){if(n){a=t.slice(t.length-e);a[e-1]=r;return a}else{return null}}var o,f;for(o=0,f=s.length;o<f;++o){var u=s[o];if(i==u){continue}if(r<t[i+e-1]){return null}else if(r<=t[u-1]){return Gl.lineStringCoordinateAtM(t,i,u,e,r,false)}i=u}return null};var Pl=function(t,i){Aa.call(this);this.flatMidpoint_=null;this.flatMidpointRevision_=-1;this.maxDelta_=-1;this.maxDeltaRevision_=-1;this.setCoordinates(t,i)};ta.inherits(Pl,Aa);Pl.prototype.appendCoordinate=function(t){if(!this.flatCoordinates){this.flatCoordinates=t.slice()}else{pa.extend(this.flatCoordinates,t)}this.changed()};Pl.prototype.clone=function(){var t=new Pl(null);t.setFlatCoordinates(this.layout,this.flatCoordinates.slice());return t};Pl.prototype.closestPointXY=function(t,i,s,e){if(e<Ma.closestSquaredDistanceXY(this.getExtent(),t,i)){return e}if(this.maxDeltaRevision_!=this.getRevision()){this.maxDelta_=Math.sqrt(Ta.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0));this.maxDeltaRevision_=this.getRevision()}return Ta.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,false,t,i,s,e)};Pl.prototype.forEachSegment=function(t,i){return Ua.forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)};Pl.prototype.getCoordinateAtM=function(t,i){if(this.layout!=za.XYM&&this.layout!=za.XYZM){return null}var s=i!==undefined?i:false;return Gl.lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,s)};Pl.prototype.getCoordinates=function(){return La.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Pl.prototype.getCoordinateAt=function(t,i){return Gl.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)};Pl.prototype.getLength=function(){return Bf.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)};Pl.prototype.getFlatMidpoint=function(){if(this.flatMidpointRevision_!=this.getRevision()){this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_);this.flatMidpointRevision_=this.getRevision()}return this.flatMidpoint_};Pl.prototype.getSimplifiedGeometryInternal=function(t){var i=[];i.length=Fa.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0);var s=new Pl(null);s.setFlatCoordinates(za.XY,i);return s};Pl.prototype.getType=function(){return da.LINE_STRING};Pl.prototype.intersectsExtent=function(t){return Ba.lineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)};Pl.prototype.setCoordinates=function(t,i){if(!t){this.setFlatCoordinates(za.XY,null)}else{this.setLayout(i,t,1);if(!this.flatCoordinates){this.flatCoordinates=[]}this.flatCoordinates.length=Oa.coordinates(this.flatCoordinates,0,t,this.stride);this.changed()}};Pl.prototype.setFlatCoordinates=function(t,i){this.setFlatCoordinatesInternal(t,i);this.changed()};var kl={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};var Nl=function(t){var i=t?t:{};var s=ea.assign({},i);delete s.preload;delete s.useInterimTilesOnError;jo.call(this,s);this.setPreload(i.preload!==undefined?i.preload:0);this.setUseInterimTilesOnError(i.useInterimTilesOnError!==undefined?i.useInterimTilesOnError:true);this.type=df.TILE};ta.inherits(Nl,jo);Nl.prototype.getPreload=function(){return this.get(kl.PRELOAD)};Nl.prototype.setPreload=function(t){this.set(kl.PRELOAD,t)};Nl.prototype.getUseInterimTilesOnError=function(){return this.get(kl.USE_INTERIM_TILES_ON_ERROR)};Nl.prototype.setUseInterimTilesOnError=function(t){this.set(kl.USE_INTERIM_TILES_ON_ERROR,t)};var Il=function(t){var i=t?t:{};var s=ea.assign({},i);delete s.style;delete s.renderBuffer;delete s.updateWhileAnimating;delete s.updateWhileInteracting;jo.call(this,s);this.declutter_=i.declutter!==undefined?i.declutter:false;this.renderBuffer_=i.renderBuffer!==undefined?i.renderBuffer:100;this.style_=null;this.styleFunction_=undefined;this.setStyle(i.style);this.updateWhileAnimating_=i.updateWhileAnimating!==undefined?i.updateWhileAnimating:false;this.updateWhileInteracting_=i.updateWhileInteracting!==undefined?i.updateWhileInteracting:false;this.renderMode_=i.renderMode||mf.VECTOR;this.type=df.VECTOR};ta.inherits(Il,jo);Il.prototype.getDeclutter=function(){return this.declutter_};Il.prototype.setDeclutter=function(t){this.declutter_=t};Il.prototype.getRenderBuffer=function(){return this.renderBuffer_};Il.prototype.getRenderOrder=function(){return this.get(Il.Property_.RENDER_ORDER)};Il.prototype.getStyle=function(){return this.style_};Il.prototype.getStyleFunction=function(){return this.styleFunction_};Il.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_};Il.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_};Il.prototype.setRenderOrder=function(t){this.set(Il.Property_.RENDER_ORDER,t)};Il.prototype.setStyle=function(t){this.style_=t!==undefined?t:Qu.defaultFunction;this.styleFunction_=t===null?undefined:Qu.createFunction(this.style_);this.changed()};Il.prototype.getRenderMode=function(){return this.renderMode_};Il.Property_={RENDER_ORDER:"renderOrder"};var Cl={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"};var Al=function(t){var i=t?t:{};var s=i.className!==undefined?i.className:"ol-scale-line";this.innerElement_=document.createElement("DIV");this.innerElement_.className=s+"-inner";this.element_=document.createElement("DIV");this.element_.className=s+" "+Do.CLASS_UNSELECTABLE;this.element_.appendChild(this.innerElement_);this.viewState_=null;this.minWidth_=i.minWidth!==undefined?i.minWidth:64;this.renderedVisible_=false;this.renderedWidth_=undefined;this.renderedHTML_="";var e=i.render?i.render:Al.render;Fo.call(this,{element:this.element_,render:e,target:i.target});ra.listen(this,ua.getChangeEventType(Al.Property_.UNITS),this.handleUnitsChanged_,this);this.setUnits(i.units||Cl.METRIC)};ta.inherits(Al,Fo);Al.LEADING_DIGITS=[1,2,5];Al.prototype.getUnits=function(){return this.get(Al.Property_.UNITS)};Al.render=function(t){var i=t.frameState;if(!i){this.viewState_=null}else{this.viewState_=i.viewState}this.updateElement_()};Al.prototype.handleUnitsChanged_=function(){this.updateElement_()};Al.prototype.setUnits=function(t){this.set(Al.Property_.UNITS,t)};Al.prototype.updateElement_=function(){var t=this.viewState_;if(!t){if(this.renderedVisible_){this.element_.style.display="none";this.renderedVisible_=false}return}var i=t.center;var s=t.projection;var e=this.getUnits();var r=e==Cl.DEGREES?ba.DEGREES:ba.METERS;var n=Na.getPointResolution(s,t.resolution,i,r);if(e!=Cl.DEGREES){n*=s.getMetersPerUnit()}var h=this.minWidth_*n;var a="";if(e==Cl.DEGREES){var o=Na.METERS_PER_UNIT[ba.DEGREES];if(s.getUnits()==ba.DEGREES){h*=o}else{n/=o}if(h<o/60){a="″";n*=3600}else if(h<o){a="′";n*=60}else{a="°"}}else if(e==Cl.IMPERIAL){if(h<.9144){a="in";n/=.0254}else if(h<1609.344){a="ft";n/=.3048}else{a="mi";n/=1609.344}}else if(e==Cl.NAUTICAL){n/=1852;a="nm"}else if(e==Cl.METRIC){if(h<.001){a="μm";n*=1e6}else if(h<1){a="mm";n*=1e3}else if(h<1e3){a="m"}else{a="km";n/=1e3}}else if(e==Cl.US){if(h<.9144){a="in";n*=39.37}else if(h<1609.344){a="ft";n/=.30480061}else{a="mi";n/=1609.3472}}else{va.assert(false,33)}var f=3*Math.floor(Math.log(this.minWidth_*n)/Math.log(10));var u,l;while(true){u=Al.LEADING_DIGITS[(f%3+3)%3]*Math.pow(10,Math.floor(f/3));l=Math.round(u/n);if(isNaN(l)){this.element_.style.display="none";this.renderedVisible_=false;return}else if(l>=this.minWidth_){break}++f}var v=u+" "+a;if(this.renderedHTML_!=v){this.innerElement_.innerHTML=v;this.renderedHTML_=v}if(this.renderedWidth_!=l){this.innerElement_.style.width=l+"px";this.renderedWidth_=l}if(!this.renderedVisible_){this.element_.style.display="";this.renderedVisible_=true}};Al.Property_={UNITS:"units"};var Rl={FRACTION:"fraction"};var Tl=function(t,i,s,e,r,n){aa.call(this);this.hitDetectionImage_=null;this.image_=!t?new Image:t;if(e!==null){this.image_.crossOrigin=e}this.canvas_=n?document.createElement("CANVAS"):null;this.color_=n;this.imageListenerKeys_=null;this.imageState_=r;this.size_=s;this.src_=i;this.tainting_=false;if(this.imageState_==vf.LOADED){this.determineTainting_()}};ta.inherits(Tl,aa);Tl.get=function(t,i,s,e,r,n){var h=Pf.iconImageCache;var a=h.get(i,e,n);if(!a){a=new Tl(t,i,s,e,r,n);h.set(i,e,n,a)}return a};Tl.prototype.determineTainting_=function(){var t=Po.createCanvasContext2D(1,1);try{t.drawImage(this.image_,0,0);t.getImageData(0,0,1,1)}catch(t){this.tainting_=true}};Tl.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(oa.CHANGE)};Tl.prototype.handleImageError_=function(){this.imageState_=vf.ERROR;this.unlistenImage_();this.dispatchChangeEvent_()};Tl.prototype.handleImageLoad_=function(){this.imageState_=vf.LOADED;if(this.size_){this.image_.width=this.size_[0];this.image_.height=this.size_[1]}this.size_=[this.image_.width,this.image_.height];this.unlistenImage_();this.determineTainting_();this.replaceColor_();this.dispatchChangeEvent_()};Tl.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_};Tl.prototype.getImageState=function(){return this.imageState_};Tl.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_){if(this.tainting_){var i=this.size_[0];var s=this.size_[1];var e=Po.createCanvasContext2D(i,s);e.fillRect(0,0,i,s);this.hitDetectionImage_=e.canvas}else{this.hitDetectionImage_=this.image_}}return this.hitDetectionImage_};Tl.prototype.getSize=function(){return this.size_};Tl.prototype.getSrc=function(){return this.src_};Tl.prototype.load=function(){if(this.imageState_==vf.IDLE){this.imageState_=vf.LOADING;this.imageListenerKeys_=[ra.listenOnce(this.image_,oa.ERROR,this.handleImageError_,this),ra.listenOnce(this.image_,oa.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}};Tl.prototype.replaceColor_=function(){if(this.tainting_||this.color_===null){return}this.canvas_.width=this.image_.width;this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);var i=t.getImageData(0,0,this.image_.width,this.image_.height);var s=i.data;var e=this.color_[0]/255;var r=this.color_[1]/255;var n=this.color_[2]/255;for(var h=0,a=s.length;h<a;h+=4){s[h]*=e;s[h+1]*=r;s[h+2]*=n}t.putImageData(i,0,0)};Tl.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(ra.unlistenByKey);this.imageListenerKeys_=null};var Ol={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};var Ll=function(t){var i=t||{};this.anchor_=i.anchor!==undefined?i.anchor:[.5,.5];this.normalizedAnchor_=null;this.anchorOrigin_=i.anchorOrigin!==undefined?i.anchorOrigin:Ol.TOP_LEFT;this.anchorXUnits_=i.anchorXUnits!==undefined?i.anchorXUnits:Rl.FRACTION;this.anchorYUnits_=i.anchorYUnits!==undefined?i.anchorYUnits:Rl.FRACTION;this.crossOrigin_=i.crossOrigin!==undefined?i.crossOrigin:null;var s=i.img!==undefined?i.img:null;var e=i.imgSize!==undefined?i.imgSize:null;var r=i.src;va.assert(!(r!==undefined&&s),4);va.assert(!s||s&&e,5);if((r===undefined||r.length===0)&&s){r=s.src||ta.getUid(s).toString()}va.assert(r!==undefined&&r.length>0,6);var n=i.src!==undefined?vf.IDLE:vf.LOADED;this.color_=i.color!==undefined?Mf.asArray(i.color):null;this.iconImage_=Tl.get(s,r,e,this.crossOrigin_,n,this.color_);this.offset_=i.offset!==undefined?i.offset:[0,0];this.offsetOrigin_=i.offsetOrigin!==undefined?i.offsetOrigin:Ol.TOP_LEFT;this.origin_=null;this.size_=i.size!==undefined?i.size:null;var h=i.opacity!==undefined?i.opacity:1;var a=i.rotateWithView!==undefined?i.rotateWithView:false;var o=i.rotation!==undefined?i.rotation:0;var f=i.scale!==undefined?i.scale:1;var u=i.snapToPixel!==undefined?i.snapToPixel:true;Ju.call(this,{opacity:h,rotation:o,scale:f,snapToPixel:u,rotateWithView:a})};ta.inherits(Ll,Ju);Ll.prototype.clone=function(){return new Ll({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||undefined,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:this.size_!==null?this.size_.slice():undefined,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})};Ll.prototype.getAnchor=function(){if(this.normalizedAnchor_){return this.normalizedAnchor_}var t=this.anchor_;var i=this.getSize();if(this.anchorXUnits_==Rl.FRACTION||this.anchorYUnits_==Rl.FRACTION){if(!i){return null}t=this.anchor_.slice();if(this.anchorXUnits_==Rl.FRACTION){t[0]*=i[0]}if(this.anchorYUnits_==Rl.FRACTION){t[1]*=i[1]}}if(this.anchorOrigin_!=Ol.TOP_LEFT){if(!i){return null}if(t===this.anchor_){t=this.anchor_.slice()}if(this.anchorOrigin_==Ol.TOP_RIGHT||this.anchorOrigin_==Ol.BOTTOM_RIGHT){t[0]=-t[0]+i[0]}if(this.anchorOrigin_==Ol.BOTTOM_LEFT||this.anchorOrigin_==Ol.BOTTOM_RIGHT){t[1]=-t[1]+i[1]}}this.normalizedAnchor_=t;return this.normalizedAnchor_};Ll.prototype.getColor=function(){return this.color_};Ll.prototype.getImage=function(t){return this.iconImage_.getImage(t)};Ll.prototype.getImageSize=function(){return this.iconImage_.getSize()};Ll.prototype.getHitDetectionImageSize=function(){return this.getImageSize()};Ll.prototype.getImageState=function(){return this.iconImage_.getImageState()};Ll.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)};Ll.prototype.getOrigin=function(){if(this.origin_){return this.origin_}var t=this.offset_;if(this.offsetOrigin_!=Ol.TOP_LEFT){var i=this.getSize();var s=this.iconImage_.getSize();if(!i||!s){return null}t=t.slice();if(this.offsetOrigin_==Ol.TOP_RIGHT||this.offsetOrigin_==Ol.BOTTOM_RIGHT){t[0]=s[0]-i[0]-t[0]}if(this.offsetOrigin_==Ol.BOTTOM_LEFT||this.offsetOrigin_==Ol.BOTTOM_RIGHT){t[1]=s[1]-i[1]-t[1]}}this.origin_=t;return this.origin_};Ll.prototype.getSrc=function(){return this.iconImage_.getSrc()};Ll.prototype.getSize=function(){return!this.size_?this.iconImage_.getSize():this.size_};Ll.prototype.listenImageChange=function(t,i){return ra.listen(this.iconImage_,oa.CHANGE,t,i)};Ll.prototype.load=function(){this.iconImage_.load()};Ll.prototype.unlistenImageChange=function(t,i){ra.unlisten(this.iconImage_,oa.CHANGE,t,i)};var Fl=`<svg width="16" height="24" viewBox="0 0 16 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.0011 22.5728L13.2809 12.0132H2.72134L8.0011 22.5728Z" fill="#DEDEDE" stroke="#BFBFBF" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" fill="#D0021B"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" stroke="#D0021B" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.99976 1.42721L2.71999 11.9867H13.2795L7.99976 1.42721Z" stroke="black" stroke-opacity="0.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const Dl=()=>`:host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}:host[hidden],:host[stzh-hidden]{display:none}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host{}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-olmap{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block}stzh-olmap[hidden],stzh-olmap[stzh-hidden]{display:none}stzh-olmap::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}stzh-olmap *,stzh-olmap *::before,stzh-olmap *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}stzh-olmap{}stzh-olmap .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}stzh-olmap .stzh-fylingfocus-focused{outline-style:none !important}stzh-olmap .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}stzh-olmap{position:relative;width:100%;aspect-ratio:1/1}@media print{stzh-olmap{page-break-inside:avoid;break-inside:avoid}}@media screen and (min-width: 600px){stzh-olmap{aspect-ratio:16/9}}@media screen and (min-width: 900px){stzh-olmap{aspect-ratio:21/9}}.stzh-olmap__map{position:absolute;width:100%;height:100%;top:0;left:0}.stzh-olmap__map--print{margin-top:var(--stzh-space-xxlarge);max-width:100%;height:auto}.stzh-olmap__print-image{display:block;max-width:100%}.stzh-olmap .ol-overlaycontainer-stopevent{touch-action:manipulation}.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom-in,.stzh-olmap .ol-zoom-out,.stzh-olmap .ol-rotate-reset{font-family:var(--stzh-font-family-light);font-weight:var(--stzh-font-weight-light);font-style:var(--stzh-font-style-light);font-size:var(--stzh-font-deca-font-size);line-height:var(--stzh-font-deca-text-line-height);letter-spacing:var(--stzh-font-deca-text-letter-spacing);position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border:none;border-radius:0;color:var(--stzh-color-primary);transition:all var(--stzh-base-transition-animation-speed) ease;background-color:var(--stzh-color-white);width:var(--stzh-form-input-small-height);height:var(--stzh-form-input-small-height);cursor:pointer}.stzh-olmap .ol-print stzh-icon,.stzh-olmap .ol-location stzh-icon,.stzh-olmap .ol-zoom-in stzh-icon,.stzh-olmap .ol-zoom-out stzh-icon,.stzh-olmap .ol-rotate-reset stzh-icon{--size:var(--stzh-icon-size-small)}.stzh-olmap .ol-print:hover,.stzh-olmap .ol-location:hover,.stzh-olmap .ol-zoom-in:hover,.stzh-olmap .ol-zoom-out:hover,.stzh-olmap .ol-rotate-reset:hover{color:var(--stzh-color-primary70);background:var(--stzh-color-secondary20)}.stzh-olmap .ol-layer,.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom,.stzh-olmap .ol-rotate-reset{position:absolute;right:var(--stzh-space-xsmall);bottom:var(--stzh-space-xsmall);box-shadow:var(--stzh-box-shadow-popover);border-radius:var(--stzh-button-border-radius)}@media print{.stzh-olmap .ol-layer,.stzh-olmap .ol-print,.stzh-olmap .ol-location,.stzh-olmap .ol-zoom,.stzh-olmap .ol-rotate-reset{display:none}}.stzh-olmap .ol-layer{left:var(--stzh-space-xsmall);right:auto;padding:var(--stzh-space-xxxsmall);border:none;cursor:pointer}.stzh-olmap .ol-layer__thumbnail{width:4.75rem;height:4.75rem;display:block}.stzh-olmap .ol-layer__text{font-family:var(--stzh-font-family-light);font-weight:var(--stzh-font-weight-light);font-style:var(--stzh-font-style-light);font-size:var(--stzh-font-pico-font-size);line-height:var(--stzh-font-pico-text-line-height);position:absolute;bottom:0;left:0;right:0;text-align:left;background-color:var(--stzh-color-white);color:var(--stzh-color-primary);padding-left:calc(var(--stzh-space-xxxsmall) + 0.0625rem);padding-right:calc(var(--stzh-space-xxxsmall) + 0.0625rem)}.stzh-olmap .ol-layer:hover .ol-layer__text{color:var(--stzh-color-primary-hover)}.stzh-olmap .ol-location{margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2)}.stzh-olmap .ol-location:hover{color:var(--stzh-color-primary-hover);background:var(--stzh-color-white)}.stzh-olmap .ol-location.active{color:var(--stzh-color-white);background:var(--stzh-color-primary)}.stzh-olmap .ol-zoom{margin-bottom:calc(var(--stzh-form-input-small-height) + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall));background-color:transparent;border-radius:var(--stzh-button-border-radius);overflow:hidden}.stzh-olmap .ol-zoom-in{margin-bottom:var(--stzh-space-xxxsmall)}.stzh-olmap .ol-rotate-reset{width:2rem;height:2rem;border-radius:50%;box-shadow:none;margin-right:calc((var(--stzh-form-input-small-height) - 2rem) / 2);margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2 + var(--stzh-space-xxxsmall))}.stzh-olmap .ol-rotate-reset span{border:0;clip:rect(0 0 0 0);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-olmap .ol-rotate-reset svg{width:0.99rem;height:1.32188rem}.stzh-olmap .ol-hidden{display:none}.stzh-olmap .ol-compass{display:flex;align-items:center;justify-content:center}.stzh-olmap .ol-scale-line{position:absolute;left:var(--stzh-space-xsmall);bottom:var(--stzh-space-xsmall);margin-left:calc(4.75rem + var(--stzh-space-xxxsmall) + var(--stzh-space-xsmall))}.stzh-olmap .ol-scale-line-inner{font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);position:relative;color:var(--stzh-color-black);text-align:center;filter:drop-shadow(-0.0625rem 0px 0px white) drop-shadow(0.0625rem 0px 0px white) drop-shadow(0px -0.0625rem 0px white) drop-shadow(0px 0.0625rem 0px white)}.stzh-olmap .ol-scale-line-inner::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:0.28125rem;border:0.0625rem solid var(--stzh-color-black);border-top:0}.stzh-olmap .ol-attribution{display:none}.stzh-olmap{}.stzh-olmap--has-no-layer-control .ol-scale-line{margin-left:0}.stzh-olmap{}.stzh-olmap--has-no-print-control .ol-zoom{margin-bottom:0}.stzh-olmap--has-no-print-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 2 + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall))}.stzh-olmap{}.stzh-olmap--has-location-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 4 + var(--stzh-space-xsmall) * 3 + var(--stzh-space-xxxsmall))}.stzh-olmap--has-location-control.stzh-olmap--has-no-print-control .ol-location{margin-bottom:calc(var(--stzh-form-input-small-height) * 2 + var(--stzh-space-xsmall) + var(--stzh-space-xxxsmall))}.stzh-olmap--has-location-control.stzh-olmap--has-no-print-control .ol-rotate-reset{margin-bottom:calc(var(--stzh-form-input-small-height) * 3 + var(--stzh-space-xsmall) * 2 + var(--stzh-space-xxxsmall))}.stzh-olmap{}.stzh-olmap__popover{background-color:var(--stzh-color-grey10);width:18.75rem}@media screen and (max-width: 599px){.stzh-olmap__popover{position:fixed;right:0;bottom:0;left:0;width:100%;z-index:5;display:flex}}.stzh-olmap__popover-content{padding:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-olmap__popover-content{padding:var(--stzh-space-small)}}@media screen and (min-width: 900px){.stzh-olmap__popover-content{padding:var(--stzh-space-medium)}}@media screen and (min-width: 1260px){.stzh-olmap__popover-content{padding:var(--stzh-space-xlarge)}}.stzh-olmap__popover-content stzh-heading{margin-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 600px){.stzh-olmap__popover-content{aspect-ratio:2/1}}.stzh-olmap__popover-link{position:absolute;top:0;right:0;bottom:0;left:0}.stzh-olmap__popover-image{position:relative}@media screen and (max-width: 599px){.stzh-olmap__popover-image{width:8.75rem;min-width:8.75rem;height:8.75rem;max-height:8.75rem;overflow:hidden}}.stzh-olmap__popover-image img{width:100%}@media screen and (max-width: 599px){.stzh-olmap__popover-image img{position:absolute;top:50%;left:50%;width:100%;height:100%;object-fit:cover;transform:translate(-50%, -50%)}}.stzh-olmap__popover *{text-decoration:none}`;window.proj4=Qh;window.proj4.defs("EPSG:2056","+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs");const Wl={anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction",scale:.5,src:`${window.stzhComponents.pathMedia}/olmap/marker.png`};const jl=Object.assign(Object.assign({},Wl),{src:`${window.stzhComponents.pathMedia}/olmap/marker-active.png`});const Vl=Object.assign(Object.assign({},Wl),{anchor:[.5,.5],src:`${window.stzhComponents.pathMedia}/olmap/marker-position.png`});const Ul=class{constructor(s){t(this,s);this.stzhInitialized=i(this,"stzhInitialized");this.stzhPostRender=i(this,"stzhPostRender");this.stzhMoveStart=i(this,"stzhMoveStart");this.stzhMoveEnd=i(this,"stzhMoveEnd");this.stzhMovePanZoom=i(this,"stzhMovePanZoom");this.hostname="www.ogc.stadt-zuerich.ch";this.scaleControl=true;this.layerControl=true;this.printControl=true;this.locationControl=false;this.layer="streets";this.zoom=7;this.zoomLocation=7;this.center=[2683311,1247082];this.centerMarker=true;this.pinchRotateThreshold=.3;this.resolutions=[67.73333333333,33.8666666667,16.9333333333,8.4666666667,4.2333333333,2.1166666667,1.0583333333,.5291666667,.2645833333,.1322916667,.0661458333];this.writeExtentToUrlEnabled=false;this.layers={streets:{thumbnailUrl:`${window.stzhComponents.pathMedia}/olmap/thumb-streets.jpg`,options:{url:"https://{Hostname}/mapproxy/wmts/1.0.0/{Layer}/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",layer:"basiskarte_zuerich_gebaeudeschraegansicht",matrixSet:"ktzh",origin:[2480237,1315832],extent:[2666867,1220962,2719695.5,1285537]}},satellite:{thumbnailUrl:`${window.stzhComponents.pathMedia}/olmap/thumb-satellite.jpg`,options:{url:"https://{Hostname}/mapproxy/wmts/1.0.0/{Layer}/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",layer:"orthofoto",matrixSet:"ktzh",origin:[2480237,1315832],extent:[2666867,1220962,2719695.5,1285537]}}};this._layers={};this.geoPositionChanged=false;this.handlePostRender=()=>{this.stzhPostRender.emit({component:"stzh-olmap"})};this.handleDoubleClick=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleMoveStart=()=>{this.stzhMoveStart.emit({component:"stzh-olmap"})};this.handleMoveEnd=()=>{this.stzhMoveEnd.emit({component:"stzh-olmap"});this.writeExtentToUrl().catch()};this.handlePointerdrag=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleChangeResolution=()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})};this.handleInsideModalOpen=()=>{if(this.map){requestAnimationFrame((()=>{this.map.updateSize()}))}};this.handlePrintButtonClick=()=>{if(!this.printIframe){this.printIframe=document.createElement("iframe");Object.assign(this.printIframe.style,{height:"0px",width:"0px",position:"absolute",border:"none"});this.element.append(this.printIframe)}this.printIframe.innerHTML="";const t=this.printIframe.contentWindow;const i=this.constructor.style.replace('@charset "UTF-8";',"");const s=Array.from(document.querySelectorAll("link")).map((t=>t.outerHTML));let e;this.map.once("postcompose",(function(t){const i=t.context.canvas;e=i.toDataURL("image/png")}));this.map.renderSync();t.document.body.innerHTML=`\n ${s.join("")}\n\n <style type="text/css">\n ${i}\n </style>\n\n <div class="stzh-olmap__map stzh-olmap__map--print">\n <img class="stzh-olmap__print-image" src="${e}">\n ${this.element.querySelector(".ol-scale-line.ol-unselectable").outerHTML}\n </div>\n `;setTimeout((()=>{try{t.document.execCommand("print",false,null)}catch(i){t.print()}}),1e3)}}layersWatcher(t){if(typeof t==="string"){this._layers=JSON.parse(t)}else{this._layers=t}}resolutionsWatcher(t){if(typeof t==="string"){this._resolutions=JSON.parse(t)}else{this._resolutions=t}}zoomWatcher(t){if(this.map){this.map.getView().setZoom(t)}}scaleControlWatcher(t){if(!this.map){return}if(t){this.scaleControlOl=new Al({units:"metric"});this.map.addControl(this.scaleControlOl)}else{if(this.scaleControl){this.map.removeControl(this.scaleControlOl)}this.scaleControlOl=null}}printControlWatcher(t){if(!this.map){return}if(t){this.printControlElement=document.createElement("button");this.printControlElement.className="ol-print";this.printControlElement.type="button";this.printControlElement.ariaLabel=this.localization.printLabel;this.printControlElement.addEventListener("click",this.handlePrintButtonClick);this.printControlElement.innerHTML='<stzh-icon name="print" class="ol-print__icon"></stzh-icon>';this.printControlOl=new Fo({element:this.printControlElement});this.map.addControl(this.printControlOl)}else{if(this.printControlOl){this.map.removeControl(this.printControlOl)}this.printControlOl=null;this.printControlElement=null}}layerControlWatcher(t){if(!this.map||this.layersArray.length===1){return}if(t){this.layerControlElement=document.createElement("button");this.layerControlElement.className="ol-layer";this.layerControlElement.type="button";this.layerControlElement.addEventListener("click",(()=>{this.layer=this.layer==="streets"?"satellite":"streets"}));this.layerControlImageElement=document.createElement("img");this.layerControlImageElement.className="ol-layer__thumbnail";this.layerControlImageElement.setAttribute("role","presentation");this.layerControlImageElement.setAttribute("alt","");this.layerControlTextElement=document.createElement("span");this.layerControlTextElement.className="ol-layer__text";this.layerControlElement.appendChild(this.layerControlImageElement);this.layerControlElement.appendChild(this.layerControlTextElement);this.layerControlOl=new Fo({element:this.layerControlElement});this.map.addControl(this.layerControlOl)}else{if(this.layerControlOl){this.map.removeControl(this.layerControlOl)}this.layerControlOl=null;this.layerControlElement=null;this.layerControlImageElement=null;this.layerControlTextElement=null}}locationControlWatcher(t){if(!this.map){return}if(t){this.locationControlElement=document.createElement("button");this.locationControlElement.type="button";this.locationControlElement.className="ol-location";this.locationControlElement.innerHTML='<stzh-icon name="target-bullet" class="ol-location__icon"></stzh-icon>';this.locationControlElement.addEventListener("click",(()=>{const t=this.geolocation.getTracking();if(t){this.disableLocationTracking().catch()}else{this.enableLocationTracking().catch()}}));this.locationControlOl=new Fo({element:this.locationControlElement});this.geolocation=new Za({projection:this.map.getView().getProjection()});this.positionMarkerOl=new tl;this.positionMarkerOl.setId("position");const t=new Qu({image:new Ll(Vl)});this.positionMarkerOl.setStyle(t);this.positionLayer.getSource().addFeature(this.positionMarkerOl);this.geolocation.on("change:position",(()=>{const t=this.geolocation.getPosition();this.positionMarkerOl.setGeometry(new Wa(t));if(!this.geoPositionChanged&&Ma.containsExtent(this._layers[this.layer].options.extent,this.positionMarkerOl.getGeometry().getExtent())){this.geoPositionChanged=true;this.map.getView().setCenter(t);if(this.zoomLocation){this.map.getView().setZoom(this.zoomLocation)}}}));this.geolocation.on("change:tracking",(()=>{const t=this.geolocation.getTracking();this.positionMarkerOl.setGeometry(null);this.setLocationControlState(t)}));this.geolocation.on("error",(()=>{this.setLocationControlState(false)}));this.map.addControl(this.locationControlOl)}else{this.disableLocationTracking().catch();if(this.locationControlOl){this.map.removeControl(this.locationControlOl)}if(this.positionMarkerOl){this.positionLayer.getSource().removeFeature(this.positionMarkerOl)}this.locationControlOl=null;this.locationControlElement=null;this.geolocation=null;this.positionMarkerOl=null}}layerWatcher(t){if(!this.map){return}Object.entries(this.rasterLayers).forEach((([i,s])=>{if(i===t){s.setVisible(true);this.map.getView().set("projection",this.projections[t]);const e=this.layersArray.find((([t])=>t!==this.layer));if(e){if(this.layerControlImageElement){this.layerControlImageElement.src=e[1].thumbnailUrl}if(this.layerControlTextElement){let t="";if(i==="streets"){t=this.localization.streetsLayerTitle}else if(i==="satellite"){t=this.localization.satelliteLayerTitle}this.layerControlTextElement.textContent=e[1].title||t}}}else{s.setVisible(false)}}))}centerWatcher(t){if(typeof t==="string"){this._center=JSON.parse(t)}else{this._center=t}if(this.map&&!this._initialExtent){this.map.getView().setCenter(this._center);if(this.centerMarkerOl){this.centerMarkerOl.setGeometry(new Wa(this._center))}}}async centerMarkerWatcher(t){if(t){this.centerMarkerOl=await this.addIconMarker(this._center)}else if(this.centerMarkerOl){this.removeIconMarker(this.centerMarkerOl)}}async getMap(){return this.map}async writeExtentToUrl(){if(this.writeExtentToUrlEnabled){const t=this.map.getView();const i=t.calculateExtent(this.map.getSize());const[s,e,r,n]=i;const h=new URLSearchParams(window.location.search);h.set("extent[0]",s.toFixed(10));h.set("extent[1]",e.toFixed(10));h.set("extent[2]",r.toFixed(10));h.set("extent[3]",n.toFixed(10));const a=`${window.location.pathname}?${h.toString()}`;history.replaceState(null,"",a)}}async getVisibleMarkers(){const t=this.iconLayer.getSource();const i=t.getFeatures();if(i.length===0){return[]}const s=this.map.getView().calculateExtent(this.map.getSize());return i.filter((t=>{const i=t.getGeometry().getExtent();return Ma.intersects(s,i)}))}async findMarkerById(t){const i=this.iconLayer.getSource().getFeatures();return i.find((i=>i.get("id")===t))}async addIconMarker(t,i){const s=new tl({geometry:new Wa(t)});const e=new Qu({image:new Ll(Wl)});if(i&&i.id){s.setProperties({id:i.id});s.setId(i.id)}s.setProperties({stzh:i});s.setStyle(e);this.iconLayer.getSource().addFeature(s);return s}async addIconMarkers(t){for(const i of t){await this.addIconMarker(i.coordinates,i.props)}return true}async updateViewToFitMarkers(t=1e3){const i=this.iconLayer.getSource();const s=i.getFeatures();if(s.length===0){return}let e=Ma.createEmpty();s.forEach((t=>{Ma.extend(e,t.getGeometry().getExtent())}));this.map.getView().fit(e,{size:this.map.getSize(),duration:t})}async removeAllIconMarkers(){return this.iconLayer.getSource().clear()}async removeIconMarker(t){return this.iconLayer.getSource().removeFeature(t)}async setIconMarkerActive(t){t.setStyle(new Qu({image:new Ll(jl)}))}async setIconMarkerInactive(t){t.setStyle(new Qu({image:new Ll(Wl)}))}async setAllIconMarkersInactive(){const t=this.iconLayer.getSource();const i=t.getFeatures();i.forEach((t=>{this.setIconMarkerInactive(t).catch((t=>console.error(t)))}))}async enableLocationTracking(t=true){this.setLocationControlState(true);this.geoPositionChanged=!t;if(this.geolocation){this.geolocation.setTracking(true)}}async disableLocationTracking(){this.setLocationControlState(false);if(this.geolocation){this.geolocation.setTracking(false)}}async getDistance(t,i){const s=new Pl([t,i]);const e=ma.getLength(s,{projection:this.map.getView().getProjection()});return e}handleLoad(){if(this.map){requestAnimationFrame((()=>{this.map.updateSize()}))}}showPopover(t,i){if(i.imageUri){this.popoverElement.innerHTML=`<div class="stzh-olmap__popover-image"><img src="${i.imageUri}" alt="${i.title}"></div>`}let s='<div class="stzh-olmap__popover-content">';if(i.title){s+=`<stzh-heading curve="p2">${i.title}</stzh-heading>`}if(i.text){s+=`<stzh-text size="milli" color="info">${i.text}</stzh-text>`}if(i.data&&i.data.length){i.data.map((t=>{s+=`<div class="stzh-poi-teaser-list-item">\n <stzh-icon name="${t.icon}"></stzh-icon>\n <stzh-text size="micro">\n ${t.text}\n </stzh-text>\n </div>`}))}s+="</div>";this.popoverElement.innerHTML+=s;if(i.href){this.popoverElement.innerHTML+=`<a href="${i.href}" class="stzh-olmap__popover-link"></a>`}const e=new Yu({element:this.popoverElement,position:t,positioning:"bottom-center",offset:[0,-50],autoPan:false,autoPanAnimation:{duration:300}});this.map.addOverlay(e);this.map.renderSync()}initializeMarkerHover(){this.map.on("pointermove",(t=>{const i=this.map.getEventPixel(t.originalEvent);const s=this.map.hasFeatureAtPixel(i,{layerFilter:t=>t===this.iconLayer});const e=this.map.getTargetElement();if(s){e.style.cursor="pointer"}else{e.style.cursor=""}}))}setLocationControlState(t){if(this.positionLayer){this.positionLayer.setVisible(t)}if(this.locationControlElement){this.locationControlElement.classList.toggle("active",t)}}createMap(){const t=document.createElement("stzh-icon");t.ariaLabel=this.localization.zoomInLabel;t.name="plus";t.addEventListener("click",(()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})}));const i=document.createElement("stzh-icon");i.ariaLabel=this.localization.zoomOutLabel;i.name="minus";i.addEventListener("click",(()=>{this.stzhMovePanZoom.emit({component:"stzh-olmap"})}));const s=document.createElement("div");s.innerHTML=Fl;const e=document.createElement("span");e.innerText=this.localization.rotateLabel;s.appendChild(e);const r=new Hu({controls:qo.defaults({zoomOptions:{zoomInLabel:t,zoomOutLabel:i,zoomInTipLabel:"",zoomOutTipLabel:""},rotateOptions:{label:s,tipLabel:""}}),interactions:new Qa([new Qo,new Jo,new $o,new of({threshold:this.pinchRotateThreshold}),new ff,new nf,new hf,new ef]),loadTilesWhileAnimating:true,loadTilesWhileInteracting:true,target:this.mapElement,logo:false});return r}createRasterLayer(t,i){return new Nl({title:"wmts",type:"base",extent:i.extent,source:this.createLayerSource(t,i)})}createLayerSource(t,i){if(!this.projections){this.projections={}}this.projections[t]=new Ea({code:"EPSG:2056",extent:i.extent});return this.creatRasterSource(t,i)}creatRasterSource(t,i){const{url:s,layer:e,matrixSet:r,origin:n}=i;const h=[];for(let t=0;t<this._resolutions.length;t++){h.push(t)}const a=new gl({origin:n,resolutions:this._resolutions,matrixIds:h,tileSize:[512,512]});return new zl({url:s,tileGrid:a,style:"default",projection:this.projections[t],crossOrigin:"anonymous",layer:e,matrixSet:r,requestEncoding:"REST"})}createIconLayer(){return new Il({source:new Sl({})})}initMap(){this.map=this.createMap();this.map.on("postrender",this.handlePostRender);this.map.on("movestart",this.handleMoveStart);this.map.on("dblclick",this.handleDoubleClick);this.map.on("moveend",this.handleMoveEnd);this.map.on("pointerdrag",this.handlePointerdrag);this.map.on("change:resolution",this.handleChangeResolution);this.layersArray=Object.entries(this._layers);if(this.layersArray.length>2){throw new Error("There are only two different layers allowed.")}this.rasterLayers={};this.layersArray.forEach((([t,i])=>{i.options.url=i.options.url.replace(/\{hostname\}/gi,this.hostname);this.rasterLayers[t]=this.createRasterLayer(t,i.options);this.map.addLayer(this.rasterLayers[t])}));this.positionLayer=this.createIconLayer();this.positionLayer.setVisible(false);this.map.addLayer(this.positionLayer);this.iconLayer=this.createIconLayer();this.map.addLayer(this.iconLayer);const t=new Go({center:this._center,projection:this.projections[this.layer],zoom:this.zoom,resolutions:this._resolutions});if(this._initialExtent){t.fit(this._initialExtent,{size:this.map.getSize()})}this.map.setView(t);this.centerWatcher(this.center);this.scaleControlWatcher(this.scaleControl);this.printControlWatcher(this.printControl);this.locationControlWatcher(this.locationControl);this.layerControlWatcher(this.layerControl);this.layerWatcher(this.layer);this.centerMarkerWatcher(this.centerMarker);this.initializeMarkerHover();this.map.on("singleclick",(t=>{this.setAllIconMarkersInactive().catch();this.popoverElement.innerHTML="";this.map.forEachFeatureAtPixel(t.pixel,(t=>{if(t.getGeometry()instanceof Wa){this.setIconMarkerActive(t).catch();const i=t.getProperties();if(i.stzh){this.showPopover(i.geometry.flatCoordinates,i.stzh)}return true}}))}));requestAnimationFrame((()=>{this.stzhInitialized.emit({component:"stzh-olmap"})}));this.handleMoveEnd()}componentShouldUpdate(t,i,s){return["hostname","localization","layers","resolutions","pinchRotateThreshold"].includes(s)}async componentWillLoad(){this.layersWatcher(this.layers);this.resolutionsWatcher(this.resolutions);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"olmap")}const t=new URLSearchParams(window.location.search);const i=[parseFloat(t.get("extent[0]")),parseFloat(t.get("extent[1]")),parseFloat(t.get("extent[2]")),parseFloat(t.get("extent[3]"))];if(!isNaN(i[0])&&!isNaN(i[1])&&!isNaN(i[2])&&!isNaN(i[3])){this._initialExtent=i}}componentWillUpdate(){if(this.map){this.map.setTarget(null);this.map=null}}componentDidRender(){if(this.map){return}this.initMap()}connectedCallback(){const t=this.element.closest("stzh-dialog");if(t){t.addEventListener("stzhOpen",this.handleInsideModalOpen)}}disconnectedCallback(){if(this.map){this.map.setTarget(null);this.map=null}const t=this.element.closest("stzh-dialog");if(t){t.removeEventListener("stzhOpen",this.handleInsideModalOpen)}}render(){const t={"stzh-olmap":true,"stzh-olmap--has-no-layer-control":!this.layerControl,"stzh-olmap--has-no-print-control":!this.printControl,"stzh-olmap--has-location-control":this.locationControl};return r(h,{key:"c9b7fbab4f2ff6a4d6d5649b577cf81dac859dbd"},r("div",{key:"d0f5c05bbabc558c53b87e82404857e95f8ef917",class:t},r("div",{key:"75c924f63e70f010585953b904e7d1f4a9d43fb1",ref:t=>this.mapElement=t,class:"stzh-olmap__map"}),r("div",{key:"76813ad15b4f4d94a37b1f1e9daa39fb1f1d2bc9",ref:t=>this.popoverElement=t,class:"stzh-olmap__popover"})))}get element(){return a(this)}static get watchers(){return{layers:["layersWatcher"],resolutions:["resolutionsWatcher"],zoom:["zoomWatcher"],scaleControl:["scaleControlWatcher"],printControl:["printControlWatcher"],layerControl:["layerControlWatcher"],locationControl:["locationControlWatcher"],layer:["layerWatcher"],center:["centerWatcher"],centerMarker:["centerMarkerWatcher"]}}};Ul.style=Dl();export{p as stzh_header,Ul as stzh_olmap};
|
|
8
|
+
//# sourceMappingURL=p-1e34154e.entry.js.map
|