@geotrekce/geotrek-rando-widget 0.4.2 → 0.4.4
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/geotrek-rando-widget.cjs.js +1 -1
- package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
- package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js +2 -2
- package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-filters_12.cjs.entry.js +46 -38
- package/dist/cjs/grw-filters_12.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filters_12.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filters_12.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js +6 -5
- package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.map +1 -1
- package/dist/cjs/{i18n-cfc000c9.js → i18n-a5ad3083.js} +15 -13
- package/dist/cjs/i18n-a5ad3083.js.br +0 -0
- package/dist/cjs/i18n-a5ad3083.js.gz +0 -0
- package/dist/cjs/i18n-a5ad3083.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.br +0 -0
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/utils-332e41b3.js.map +1 -1
- package/dist/collection/components/grw-app/grw-app.js +1 -1
- package/dist/collection/components/grw-app/grw-app.js.br +0 -0
- package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
- package/dist/collection/components/grw-app/grw-app.js.map +1 -1
- package/dist/collection/components/grw-filters/grw-filters.js +1 -1
- package/dist/collection/components/grw-filters/grw-filters.js.br +0 -0
- package/dist/collection/components/grw-filters/grw-filters.js.gz +0 -0
- package/dist/collection/components/grw-filters/grw-filters.js.map +1 -1
- package/dist/collection/components/grw-map/grw-map.js +16 -20
- package/dist/collection/components/grw-map/grw-map.js.br +0 -0
- package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js.map +1 -1
- package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js +1 -1
- package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.br +0 -0
- package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.gz +0 -0
- package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.map +1 -1
- package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js +1 -1
- package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.br +0 -0
- package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.gz +0 -0
- package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.map +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
- package/dist/collection/i18n/i18n.js +14 -12
- package/dist/collection/i18n/i18n.js.br +0 -0
- package/dist/collection/i18n/i18n.js.gz +0 -0
- package/dist/collection/i18n/i18n.js.map +1 -1
- package/dist/collection/store/grw-touristic-content-provider.js +19 -1
- package/dist/collection/store/grw-touristic-content-provider.js.br +0 -0
- package/dist/collection/store/grw-touristic-content-provider.js.gz +0 -0
- package/dist/collection/store/grw-touristic-content-provider.js.map +1 -1
- package/dist/collection/store/grw-touristic-contents-provider.js +1 -1
- package/dist/collection/store/grw-touristic-contents-provider.js.br +0 -0
- package/dist/collection/store/grw-touristic-contents-provider.js.gz +0 -0
- package/dist/collection/store/grw-touristic-contents-provider.js.map +1 -1
- package/dist/collection/store/grw-touristic-event-provider.js +23 -5
- package/dist/collection/store/grw-touristic-event-provider.js.br +0 -0
- package/dist/collection/store/grw-touristic-event-provider.js.gz +0 -0
- package/dist/collection/store/grw-touristic-event-provider.js.map +1 -1
- package/dist/collection/store/grw-trek-provider.js +33 -5
- package/dist/collection/store/grw-trek-provider.js.br +0 -0
- package/dist/collection/store/grw-trek-provider.js.gz +0 -0
- package/dist/collection/store/grw-trek-provider.js.map +1 -1
- package/dist/collection/store/grw-treks-provider.js +6 -6
- package/dist/collection/store/grw-treks-provider.js.br +0 -0
- package/dist/collection/store/grw-treks-provider.js.gz +0 -0
- package/dist/collection/store/grw-treks-provider.js.map +1 -1
- package/dist/collection/stories/App.js +6 -0
- package/dist/collection/stories/App.js.br +0 -0
- package/dist/collection/stories/App.js.gz +0 -0
- package/dist/collection/stories/App.stories.js +3 -0
- package/dist/collection/stories/App.stories.js.br +0 -0
- package/dist/collection/stories/App.stories.js.gz +0 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/esm/geotrek-rando-widget.js +1 -1
- package/dist/esm/geotrek-rando-widget.js.br +0 -0
- package/dist/esm/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm/grw-app.entry.js +2 -2
- package/dist/esm/grw-app.entry.js.br +0 -0
- package/dist/esm/grw-app.entry.js.gz +0 -0
- package/dist/esm/grw-app.entry.js.map +1 -1
- package/dist/esm/grw-filters_12.entry.js +46 -38
- package/dist/esm/grw-filters_12.entry.js.br +0 -0
- package/dist/esm/grw-filters_12.entry.js.gz +0 -0
- package/dist/esm/grw-filters_12.entry.js.map +1 -1
- package/dist/esm/grw-touristic-event-card-provider.entry.js +6 -5
- package/dist/esm/grw-touristic-event-card-provider.entry.js.br +0 -0
- package/dist/esm/grw-touristic-event-card-provider.entry.js.gz +0 -0
- package/dist/esm/grw-touristic-event-card-provider.entry.js.map +1 -1
- package/dist/esm/{i18n-60e9fdd3.js → i18n-e6325e81.js} +15 -13
- package/dist/esm/i18n-e6325e81.js.br +0 -0
- package/dist/esm/i18n-e6325e81.js.gz +0 -0
- package/dist/esm/i18n-e6325e81.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.js.br +0 -0
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/utils-b09ac7c9.js.map +1 -1
- package/dist/esm-es5/geotrek-rando-widget.js +1 -1
- package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-app.entry.js.br +0 -0
- package/dist/esm-es5/grw-app.entry.js.gz +0 -0
- package/dist/esm-es5/grw-app.entry.js.map +1 -1
- package/dist/esm-es5/grw-filters_12.entry.js +3 -3
- package/dist/esm-es5/grw-filters_12.entry.js.br +0 -0
- package/dist/esm-es5/grw-filters_12.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filters_12.entry.js.map +1 -1
- package/dist/esm-es5/grw-touristic-event-card-provider.entry.js +1 -1
- package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.br +0 -0
- package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.gz +0 -0
- package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.map +1 -1
- package/dist/esm-es5/i18n-e6325e81.js +2 -0
- package/dist/esm-es5/i18n-e6325e81.js.br +0 -0
- package/dist/esm-es5/i18n-e6325e81.js.gz +0 -0
- package/dist/esm-es5/i18n-e6325e81.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.br +0 -0
- package/dist/esm-es5/loader.js.gz +0 -0
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/utils-b09ac7c9.js.map +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
- package/dist/geotrek-rando-widget/p-0f47847d.system.js +2 -0
- package/dist/geotrek-rando-widget/p-0f47847d.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-0f47847d.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-0f47847d.system.js.map +1 -0
- package/dist/geotrek-rando-widget/p-1f8e7e57.js.map +1 -1
- package/dist/geotrek-rando-widget/{p-3c32c109.system.entry.js → p-2c4abcd9.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-2c4abcd9.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-2c4abcd9.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-3c32c109.system.entry.js.map → p-2c4abcd9.system.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/{p-bcd87b5c.entry.js → p-3bbe169c.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-3bbe169c.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-3bbe169c.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-3bbe169c.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-42ee320d.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-42ee320d.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-42ee320d.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-42ee320d.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-5e7ed046.js +2 -0
- package/dist/geotrek-rando-widget/p-5e7ed046.js.br +0 -0
- package/dist/geotrek-rando-widget/p-5e7ed046.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-5e7ed046.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-feeb03a9.system.entry.js → p-b40c2ea8.system.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-b40c2ea8.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b40c2ea8.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b40c2ea8.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-ba971c93.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-ba971c93.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ba971c93.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-d5584258.entry.js.map → p-ba971c93.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/p-c63228e8.system.js.map +1 -1
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js +1 -1
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.map +1 -1
- package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.map +1 -0
- package/dist/types/components/grw-map/grw-map.d.ts +2 -2
- package/dist/types/components.d.ts +6 -0
- package/dist/types/i18n/i18n.d.ts +1 -0
- package/dist/types/store/grw-touristic-content-provider.d.ts +1 -0
- package/dist/types/store/grw-touristic-event-provider.d.ts +1 -0
- package/dist/types/store/grw-trek-provider.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/i18n-cfc000c9.js.br +0 -0
- package/dist/cjs/i18n-cfc000c9.js.gz +0 -0
- package/dist/cjs/i18n-cfc000c9.js.map +0 -1
- package/dist/esm/i18n-60e9fdd3.js.br +0 -0
- package/dist/esm/i18n-60e9fdd3.js.gz +0 -0
- package/dist/esm/i18n-60e9fdd3.js.map +0 -1
- package/dist/esm-es5/i18n-60e9fdd3.js +0 -2
- package/dist/esm-es5/i18n-60e9fdd3.js.br +0 -0
- package/dist/esm-es5/i18n-60e9fdd3.js.gz +0 -0
- package/dist/esm-es5/i18n-60e9fdd3.js.map +0 -1
- package/dist/geotrek-rando-widget/p-3c32c109.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-3c32c109.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-7eca502d.js +0 -2
- package/dist/geotrek-rando-widget/p-7eca502d.js.br +0 -0
- package/dist/geotrek-rando-widget/p-7eca502d.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-7eca502d.js.map +0 -1
- package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-b92fdd4e.system.js +0 -2
- package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.map +0 -1
- package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-d5584258.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-d5584258.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d5584258.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-feeb03a9.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-feeb03a9.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-feeb03a9.system.entry.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as i,H as e,g as s}from"./p-0c07a3f0.js";import{t as r}from"./p-5e7ed046.js";import{s as o,o as n,r as a}from"./p-048b3a1e.js";import{t as l,h,a as c,b as d}from"./p-1f8e7e57.js";const p='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}grw-app{display:block;position:relative;width:var(--app-width);height:var(--app-height);font-family:"Roboto";color:var(--color-on-surface);overflow:hidden;line-height:initial;max-width:100dvw;max-height:100dvh}.app-container{position:relative;width:100%;height:100%;overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2);height:var(--header-height)}.header-container .arrow-back-container,.large-view-header-container .arrow-back-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;margin:0px 16px}.header-container .arrow-back-container .arrow-back-icon,.large-view-header-container .arrow-back-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:0px;text-align:left}.handle-search-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-search-filters-container .handle-search-container{width:calc(50% + 48px);max-width:220px}.handle-search-filters-container .handle-filters-button{margin-left:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-search-filters-container .handle-filters-button span{font-size:18px}.header-detail{height:64px}.large-view-header-container .handle-search-filters-container{-ms-flex-pack:start;justify-content:flex-start}.init-loader-container,.loader-container,.large-view-loader-container{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - var(--header-height));background-color:var(--color-background)}.content-treks{height:calc(100% - var(--header-height))}.content-trek{height:100%}.app-treks-list-container,.app-trek-detail-container,.app-touristic-content-detail-container,.app-touristic-event-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{max-width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{font-size:24px;margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}grw-treks-list,grw-touristic-contents-list{max-height:calc(100vh - var(--header-height))}grw-trek-detail,grw-touristic-content-detail,grw-touristic-event-detail{max-height:calc(100vh - 64px)}.app-map-container{width:100%;position:absolute}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container,.large-view-app-touristic-content-detail-container,.large-view-app-touristic-event-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}.segmented-buttons-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:calc(100% - 32px);height:40px;margin:16px;border:1px solid var(--color-outline);border-radius:20px;line-height:20px}.segmented-buttons-container .segment{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:500;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface-variant);background-color:transparent;border-radius:0px;min-width:40px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.segmented-buttons-container .segment:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.segmented-buttons-container .segment:not(:last-child){border-right:1px solid var(--color-outline)}.segmented-buttons-container .segment:last-child{border-top-right-radius:20px;border-bottom-right-radius:20px}.segmented-buttons-container .selected-segment{color:var(--color-on-secondary-container);background-color:var(--color-secondary-container)}';const u=class{constructor(i){t(this,i);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTouristicContent=false;this.showTouristicEvent=false;this.showHomeMap=false;this.showTrekMap=false;this.showTouristicContentMap=false;this.showTouristicEventMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.currentTouristicContentId=undefined;this.currentTouristicEventId=undefined;this.appWidth="100%";this.appHeight="100vh";this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.center=undefined;this.zoom=undefined;this.nameLayer=undefined;this.urlLayer=undefined;this.attributionLayer=undefined;this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false;this.treks=true;this.touristicContents=false;this.touristicEvents=false}onTrekCardPress(t){this.currentTouristicContentId=null;this.showTouristicContent=false;o.currentTouristicContent=null;this.currentTouristicEventId=null;this.showTouristicEvent=false;o.currentTouristicEvent=null;const i=o.parentTrekId?o.parentTrekId:o.currentTrekSteps?this.currentTrekId:null;o.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;const e=new URL(window.location.toString());e.searchParams.set("trek",this.currentTrekId.toString());if(o.currentTrekSteps){e.searchParams.set("parenttrek",i.toString())}window.history.pushState({},"",e)}onParentTrekPress(t){o.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;const i=new URL(window.location.toString());i.searchParams.set("trek",this.currentTrekId.toString());i.searchParams.delete("parenttrek");window.history.pushState({},"",i)}onTouristicContentCardPress(t){o.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicContentId=t.detail;this.showTouristicContent=true;this.showTouristicContentMap=false;const i=new URL(window.location.toString());i.searchParams.delete("trek");i.searchParams.set("touristiccontent",this.currentTouristicContentId.toString());window.history.pushState({},"",i)}onTouristiceEventCardPress(t){o.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicEventId=t.detail;this.showTouristicEvent=true;this.showTouristicEventMap=false;const i=new URL(window.location.toString());i.searchParams.delete("trek");i.searchParams.set("touristicevent",this.currentTouristicEventId.toString());window.history.pushState({},"",i)}onWindowResize(){this.handleView()}onCenterOnMap(){if(!this.isLargeView){this.showTrekMap=true}}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentWillLoad(){if(this.treks){o.mode="treks"}else if(this.touristicContents){o.mode="touristicContents"}const t=new URL(window.location.toString());const i=t.searchParams.get("trek");const e=t.searchParams.get("parenttrek");const s=t.searchParams.get("touristiccontent");const r=t.searchParams.get("touristicevent");if(i){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);o.parentTrekId=e?Number(e):null;this.currentTrekId=Number(i);this.showTrek=true}else if(s){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicContentId=Number(s);this.showTouristicContent=true}else if(r){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicEventId=Number(r);this.showTouristicEvent=true}}componentDidLoad(){n("trekNetworkError",(()=>{if(o.trekNetworkError){const t=new URL(window.location.toString());t.searchParams.delete("trek");t.searchParams.delete("parenttrek");t.searchParams.delete("touristiccontent");t.searchParams.delete("touristicevent");window.history.replaceState({},"",t);this.onDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()}onDetailsClose(){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicContentMap=false;this.showTouristicEvent=false;this.showTouristicEventMap=false;o.currentTouristicContent=null;o.currentTouristicEvent=null;o.currentTrek=null;o.currentTrekSteps=null;o.parentTrekId=null;this.currentTrekId=null;this.showTrek=false}handleView(){this.isLargeView=this.appElement.getBoundingClientRect().width>=this.largeViewSize;this.showHomeMap=this.isLargeView;this.showTrekMap=this.isLargeView}handleFilters(){this.showFilters=!this.showFilters}handleBackButton(){if(window.history.state&&window.history.state.isInitialHistoryWithDetails){this.onDetailsClose();const t=new URL(window.location.toString());t.searchParams.delete("trek");t.searchParams.delete("touristiccontent");t.searchParams.delete("touristicevent");window.history.pushState({},"",t)}else{window.history.back()}}handlePopState(){const t=new URL(window.location.toString());const i=Number(t.searchParams.get("trek"));const e=t.searchParams.get("touristiccontent");const s=t.searchParams.get("touristicevent");if(i&&this.currentTrekId!==i){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicEvent=false;o.currentTouristicContent=null;o.currentTouristicEvent=null;o.currentTrek=null;this.currentTrekId=i;this.showTrek=true}else if(!i&&!e&&!s){this.onDetailsClose()}}handleShowMap(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else if(this.showTouristicContent){this.showTouristicContentMap=!this.showTouristicContentMap}else if(this.showTouristicEvent){this.showTouristicEventMap=!this.showTouristicEventMap}else{this.showHomeMap=!this.showHomeMap}}getMapVisibilityIconButton(){let t;if(this.showTrek){t=this.showTrekMap?"summarize":"map"}else if(this.showTouristicContent){t=this.showTouristicContentMap?"summarize":"map"}else if(this.showTouristicEvent){t=this.showTouristicEventMap?"summarize":"map"}else{t=this.showHomeMap?"list":"map"}return t}getMapVisibilityLabelButton(){let t;if(this.showTrek){t=this.showTrekMap?r[o.language].showDetails:r[o.language].showRoute}else if(this.showTouristicContent){t=this.showTouristicContentMap?r[o.language].showDetails:r[o.language].showMap}else if(this.showTouristicEvent){t=this.showTouristicEventMap?r[o.language].showDetails:r[o.language].showMap}else{t=this.showHomeMap?r[o.language].showList:r[o.language].showMap}return t}disconnectedCallback(){a();window.removeEventListener("popstate",this.handlePopStateBind)}changeMode(t){o.searchValue="";if(t==="treks"&&o.currentTreks){l.forEach((t=>{o[t.property].forEach((t=>t.selected=false))}));o.selectedActivitiesFilters=0;o.selectedThemesFilters=0;o.selectedLocationFilters=0;o.currentTreks=h()}else if(t==="touristicContents"&&o.currentTouristicContents){c.forEach((t=>{o[t.property].forEach((t=>t.selected=false))}));o.selectedActivitiesFilters=0;o.selectedLocationFilters=0;o.currentTouristicContents=d()}o.mode=t}render(){return i(e,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor,"--app-width":this.appWidth,"--app-height":this.appHeight,"--header-height":Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1?"136px":"64px"}},!o.currentTreks&&!o.currentTrek&&!o.currentTouristicContent&&!o.currentTouristicEvent&&!o.currentTouristicContents&&i("div",{class:"init-loader-container"},i("span",{class:"loader"})),this.treks&&o.mode==="treks"&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&!o.currentTreks&&i("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!o.currentTrek&&i("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId,portals:this.portals}),this.showTouristicContent&&this.currentTouristicContentId&&i("grw-touristic-content-provider",{api:this.api,languages:this.languages,"touristic-content-id":this.currentTouristicContentId,portals:this.portals}),this.showTouristicEvent&&this.currentTouristicEventId&&i("grw-touristic-event-provider",{api:this.api,languages:this.languages,"touristic-event-id":this.currentTouristicEventId,portals:this.portals}),this.touristicContents&&o.mode==="touristicContents"&&!o.currentTouristicContents&&!this.showTouristicContent&&i("grw-touristic-contents-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals}),(o.currentTreks||o.currentTrek||o.touristicContents||o.currentTouristicContent||o.currentTouristicEvent)&&i("div",{class:"app-container"},i("div",{class:`${this.isLargeView?"large-view-header-container":"header-container"}${this.showTrek||this.showTouristicContent||this.showTouristicEvent?" header-detail":""}`},Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&i("div",{class:"segmented-buttons-container"},this.treks&&i("label",{class:`segment${o.mode==="treks"?" selected-segment":""}`,onClick:()=>this.changeMode("treks")},r[o.language].home.segment.treks),this.touristicContents&&i("label",{class:`segment${o.mode==="touristicContents"?" selected-segment":""}`,onClick:()=>this.changeMode("touristicContents")},r[o.language].home.segment.touristicContents)),!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent?i("div",{class:"handle-search-filters-container"},i("div",{class:"handle-search-container"},i("grw-search",null)),i("div",{class:"handle-filters-container"},i("button",{onClick:()=>this.handleFilters(),class:"handle-filters-button"},i("span",{translate:false,class:"material-symbols material-symbols-outlined margin-right-icon"},"filter_list"),r[o.language].filter))):i("div",{class:"arrow-back-container"},i("button",{onClick:()=>this.handleBackButton(),class:"arrow-back-icon"},i("span",{translate:false,class:"material-symbols material-symbols-outlined"},"arrow_back")))),i("div",{class:`content-container ${this.showTrek||this.showTouristicContent||this.showTouristicEvent?"content-trek":"content-treks"}`},i("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek||this.showTouristicContent||this.showTouristicEvent?"none":"flex",position:this.showTrek?"absolute":"relative"}},o.mode==="treks"&&this.treks&&i("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow}),o.mode==="touristicContents"&&this.touristicContents&&i("grw-touristic-contents-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!o.currentTrek||this.showTouristicContent&&!o.currentTouristicContent||this.showTouristicEvent&&!o.currentTouristicEvent||!o.currentTreks&&o.mode==="treks"||!o.touristicContents&&o.mode==="touristicContents"&&i("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},i("span",{class:"loader"})),o.currentTrek&&i("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},i("grw-trek-detail",{style:{visibility:!this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:!this.showTrekMap?"1":"0"},"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,weather:this.weather,"is-large-view":this.isLargeView})),this.showTouristicContent&&i("div",{class:this.isLargeView?"large-view-app-touristic-content-detail-container":"app-touristic-content-detail-container"},i("grw-touristic-content-detail",{style:{visibility:!this.showTouristicContentMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicContentMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),this.showTouristicEvent&&i("div",{class:this.isLargeView?"large-view-app-touristic-event-detail-container":"app-touristic-event-detail-container"},i("grw-touristic-event-detail",{style:{visibility:!this.showTouristicEventMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicEventMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),i("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showHomeMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.showTouristicContentMap&&this.showTouristicContent||this.showTouristicEventMap&&this.showTouristicEvent||this.isLargeView?"visible":"hidden",zIndex:this.showHomeMap||this.showTrekMap||this.showTouristicContentMap||this.showTouristicEventMap?"1":"0"},center:this.center,zoom:this.zoom,"name-layer":this.nameLayer,"url-layer":this.urlLayer,"attribution-layer":this.attributionLayer,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView,"use-gradient":this.useGradient})),(!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent||this.showTrek&&o.currentTrek||this.showTouristicContent&&o.currentTouristicContent||this.showTouristicEvent&&o.currentTouristicEvent)&&i("div",{class:"map-visibility-button-container"},i("button",{onClick:()=>this.handleShowMap(),class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},i("span",{translate:false,class:"material-symbols material-symbols-outlined"},this.getMapVisibilityIconButton()),this.getMapVisibilityLabelButton()))),!this.showTrek&&this.showFilters&&i("grw-filters",{handleFilters:()=>this.handleFilters()}))}get appElement(){return s(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};u.style=p;export{u as grw_app};
|
|
2
|
+
//# sourceMappingURL=p-ba971c93.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["grwAppCss","GrwApp","this","largeViewSize","handlePopStateBind","handlePopState","bind","onTrekCardPress","event","currentTouristicContentId","showTouristicContent","state","currentTouristicContent","currentTouristicEventId","showTouristicEvent","currentTouristicEvent","parentTrek","parentTrekId","currentTrekSteps","currentTrekId","currentTrek","detail","showTrek","showTrekMap","url","URL","window","location","toString","searchParams","set","history","pushState","onParentTrekPress","delete","onTouristicContentCardPress","showTouristicContentMap","onTouristiceEventCardPress","showTouristicEventMap","onWindowResize","handleView","onCenterOnMap","isLargeView","watchPropHandler","dispatchEvent","Event","componentWillLoad","treks","mode","touristicContents","trekParam","get","touristicContentParam","touristicEventParam","replaceState","isInitialHistoryWithDetails","Number","componentDidLoad","onChange","trekNetworkError","urlRedirect","onDetailsClose","addEventListener","appElement","getBoundingClientRect","width","showHomeMap","handleFilters","showFilters","handleBackButton","back","handleShowMap","getMapVisibilityIconButton","mapIconButton","getMapVisibilityLabelButton","mapLabelButton","translate","language","showDetails","showRoute","showMap","showList","disconnectedCallback","reset","removeEventListener","changeMode","searchValue","currentTreks","treksFilters","forEach","filter","property","currentFilter","selected","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","handleTreksFiltersAndSearch","currentTouristicContents","touristicContentsFilters","handleTouristicContentsFiltersAndSearch","render","h","Host","style","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","appWidth","appHeight","touristicEvents","class","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","onClick","home","segment","display","position","visibility","zIndex","weather","center","zoom","nameLayer","urlLayer","attributionLayer","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient"],"sources":["./src/components/grw-app/grw-app.scss?tag=grw-app","./src/components/grw-app/grw-app.tsx"],"sourcesContent":[".material-symbols {\n font-family: 'Material Symbols Outlined';\n}\n\n.material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\ngrw-app {\n display: block;\n position: relative;\n width: var(--app-width);\n height: var(--app-height);\n font-family: 'Roboto';\n color: var(--color-on-surface);\n overflow: hidden;\n line-height: initial;\n max-width: 100dvw;\n max-height: 100dvh;\n}\n\n.app-container {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.header-container,\n.large-view-header-container {\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n height: var(--header-height);\n .arrow-back-container {\n display: flex;\n align-items: center;\n height: 100%;\n margin: 0px 16px;\n .arrow-back-icon {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n border: none;\n background-color: var(--color-background);\n border-radius: 50%;\n height: 48px;\n width: 48px;\n padding: 0px;\n text-align: left;\n }\n }\n}\n\n.handle-search-filters-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0px 16px;\n height: 64px;\n\n .handle-search-container {\n width: calc(50% + 48px);\n max-width: 220px;\n }\n\n .handle-filters-button {\n margin-left: 16px;\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: var(--color-background);\n color: var(--color-on-surface);\n padding: 12px 24px;\n border-radius: 20px;\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.10000000149011612px;\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n span {\n font-size: 18px;\n }\n }\n}\n\n.header-detail {\n height: 64px;\n}\n\n.large-view-header-container {\n .handle-search-filters-container {\n justify-content: flex-start;\n }\n}\n\n.init-loader-container,\n.loader-container,\n.large-view-loader-container {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n background-color: var(--color-background);\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.content-container {\n position: relative;\n display: flex;\n height: calc(100% - var(--header-height));\n background-color: var(--color-background);\n}\n\n.content-treks {\n height: calc(100% - var(--header-height));\n}\n\n.content-trek {\n height: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container,\n.app-touristic-content-detail-container,\n.app-touristic-event-detail-container,\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n max-width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.app-map-container,\n.large-view-app-map-container {\n width: 100%;\n height: 100%;\n}\n\n.map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: absolute;\n bottom: 24px;\n z-index: 4;\n .map-visibility-button {\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n text-decoration: none;\n padding: 16px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n box-shadow: var(--elevation-1);\n border-radius: 12px;\n height: 56px;\n font-size: 16px;\n width: unset;\n &:hover {\n box-shadow: var(--elevation-4);\n }\n span {\n font-size: 24px;\n margin-right: 8px;\n color: var(--color-on-primary-container);\n }\n }\n}\n\n.init-loader-container,\n.loader-container {\n width: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container {\n width: 100%;\n}\n\ngrw-treks-list,\ngrw-touristic-contents-list {\n max-height: calc(100vh - var(--header-height));\n}\n\ngrw-trek-detail,\ngrw-touristic-content-detail,\ngrw-touristic-event-detail {\n max-height: calc(100vh - 64px);\n}\n\n.app-map-container {\n width: 100%;\n position: absolute;\n}\n\n.large-view-loader-container {\n width: 50%;\n}\n\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container,\n.large-view-app-touristic-content-detail-container,\n.large-view-app-touristic-event-detail-container {\n width: 50%;\n}\n\n.large-view-app-map-container {\n position: relative;\n width: 50%;\n}\n\n.segmented-buttons-container {\n display: flex;\n justify-content: center;\n width: calc(100% - 32px);\n height: 40px;\n margin: 16px;\n border: 1px solid var(--color-outline);\n border-radius: 20px;\n line-height: 20px;\n .segment {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface-variant);\n background-color: transparent;\n border-radius: 0px;\n min-width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n &:first-child {\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n }\n &:not(:last-child) {\n border-right: 1px solid var(--color-outline);\n }\n &:last-child {\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n }\n }\n .selected-segment {\n color: var(--color-on-secondary-container);\n background-color: var(--color-secondary-container);\n }\n}\n","import { Component, Host, h, Listen, State, Prop, Element, Watch } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\nimport { mode } from 'types/types';\nimport { handleTouristicContentsFiltersAndSearch, handleTreksFiltersAndSearch, touristicContentsFilters, treksFilters } from 'utils/utils';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() appElement: HTMLElement;\n @State() showTrek = false;\n @State() showTouristicContent = false;\n @State() showTouristicEvent = false;\n @State() showHomeMap = false;\n @State() showTrekMap = false;\n @State() showTouristicContentMap = false;\n @State() showTouristicEventMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @State() currentTouristicContentId: number;\n @State() currentTouristicEventId: number;\n @Prop() appWidth: string = '100%';\n @Prop() appHeight: string = '100vh';\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() nameLayer: string;\n @Prop() urlLayer: string;\n @Prop() attributionLayer: string;\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n @Prop() useGradient = false;\n\n @Prop() treks = true;\n @Prop() touristicContents = false;\n @Prop() touristicEvents = false;\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n state.currentTouristicContent = null;\n this.currentTouristicEventId = null;\n this.showTouristicEvent = false;\n state.currentTouristicEvent = null;\n const parentTrek = state.parentTrekId ? state.parentTrekId : state.currentTrekSteps ? this.currentTrekId : null;\n state.currentTrek = null;\n this.currentTrekId = event.detail;\n this.showTrek = true;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n if (state.currentTrekSteps) {\n url.searchParams.set('parenttrek', parentTrek.toString());\n }\n window.history.pushState({}, '', url);\n }\n\n @Listen('parentTrekPress', { target: 'window' })\n onParentTrekPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = event.detail;\n this.showTrek = true;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n url.searchParams.delete('parenttrek');\n window.history.pushState({}, '', url);\n }\n\n @Listen('touristicContentCardPress', { target: 'window' })\n onTouristicContentCardPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = false;\n this.currentTouristicContentId = event.detail;\n this.showTouristicContent = true;\n this.showTouristicContentMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.set('touristiccontent', this.currentTouristicContentId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('touristicEventCardPress', { target: 'window' })\n onTouristiceEventCardPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = false;\n this.currentTouristicEventId = event.detail;\n this.showTouristicEvent = true;\n this.showTouristicEventMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.set('touristicevent', this.currentTouristicEventId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n if (this.treks) {\n state.mode = 'treks';\n } else if (this.touristicContents) {\n state.mode = 'touristicContents';\n }\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n const parentTrekId = url.searchParams.get('parenttrek');\n const touristicContentParam = url.searchParams.get('touristiccontent');\n const touristicEventParam = url.searchParams.get('touristicevent');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n state.parentTrekId = parentTrekId ? Number(parentTrekId) : null;\n this.currentTrekId = Number(trekParam);\n this.showTrek = true;\n } else if (touristicContentParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n this.currentTouristicContentId = Number(touristicContentParam);\n this.showTouristicContent = true;\n } else if (touristicEventParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n this.currentTouristicEventId = Number(touristicEventParam);\n this.showTouristicEvent = true;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n urlRedirect.searchParams.delete('parenttrek');\n urlRedirect.searchParams.delete('touristiccontent');\n urlRedirect.searchParams.delete('touristicevent');\n window.history.replaceState({}, '', urlRedirect);\n this.onDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onDetailsClose() {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n this.showTouristicContentMap = false;\n this.showTouristicEvent = false;\n this.showTouristicEventMap = false;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n\n state.currentTrek = null;\n state.currentTrekSteps = null;\n state.parentTrekId = null;\n this.currentTrekId = null;\n this.showTrek = false;\n }\n\n handleView() {\n this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showHomeMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithDetails) {\n this.onDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.delete('touristiccontent');\n url.searchParams.delete('touristicevent');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n const touristicContentParam = url.searchParams.get('touristiccontent');\n const touristicEventParam = url.searchParams.get('touristicevent');\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n this.showTouristicEvent = false;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n state.currentTrek = null;\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam && !touristicContentParam && !touristicEventParam) {\n this.onDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else if (this.showTouristicContent) {\n this.showTouristicContentMap = !this.showTouristicContentMap;\n } else if (this.showTouristicEvent) {\n this.showTouristicEventMap = !this.showTouristicEventMap;\n } else {\n this.showHomeMap = !this.showHomeMap;\n }\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n\n if (this.showTrek) {\n mapIconButton = this.showTrekMap ? 'summarize' : 'map';\n } else if (this.showTouristicContent) {\n mapIconButton = this.showTouristicContentMap ? 'summarize' : 'map';\n } else if (this.showTouristicEvent) {\n mapIconButton = this.showTouristicEventMap ? 'summarize' : 'map';\n } else {\n mapIconButton = this.showHomeMap ? 'list' : 'map';\n }\n\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n\n if (this.showTrek) {\n mapLabelButton = this.showTrekMap ? translate[state.language].showDetails : translate[state.language].showRoute;\n } else if (this.showTouristicContent) {\n mapLabelButton = this.showTouristicContentMap ? translate[state.language].showDetails : translate[state.language].showMap;\n } else if (this.showTouristicEvent) {\n mapLabelButton = this.showTouristicEventMap ? translate[state.language].showDetails : translate[state.language].showMap;\n } else {\n mapLabelButton = this.showHomeMap ? translate[state.language].showList : translate[state.language].showMap;\n }\n\n return mapLabelButton;\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n changeMode(mode: mode) {\n state.searchValue = '';\n if (mode === 'treks' && state.currentTreks) {\n treksFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTreks = handleTreksFiltersAndSearch();\n } else if (mode === 'touristicContents' && state.currentTouristicContents) {\n touristicContentsFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTouristicContents = handleTouristicContentsFiltersAndSearch();\n }\n state.mode = mode;\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n '--app-width': this.appWidth,\n '--app-height': this.appHeight,\n '--header-height': Number(this.treks) + Number(this.touristicContents) + Number(this.touristicEvents) > 1 ? '136px' : '64px',\n }}\n >\n {!state.currentTreks && !state.currentTrek && !state.currentTouristicContent && !state.currentTouristicEvent && !state.currentTouristicContents && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {this.treks && state.mode === 'treks' && !this.showTrek && !this.showTouristicContent && !this.showTouristicEvent && !state.currentTreks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {this.showTouristicContent && this.currentTouristicContentId && (\n <grw-touristic-content-provider api={this.api} languages={this.languages} touristic-content-id={this.currentTouristicContentId}></grw-touristic-content-provider>\n )}\n {this.showTouristicEvent && this.currentTouristicEventId && (\n <grw-touristic-event-provider api={this.api} languages={this.languages} touristic-event-id={this.currentTouristicEventId}></grw-touristic-event-provider>\n )}\n {this.touristicContents && state.mode === 'touristicContents' && !state.currentTouristicContents && !this.showTouristicContent && (\n <grw-touristic-contents-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n ></grw-touristic-contents-provider>\n )}\n {(state.currentTreks || state.currentTrek || state.touristicContents || state.currentTouristicContent || state.currentTouristicEvent) && (\n <div class=\"app-container\">\n <div\n class={`${this.isLargeView ? 'large-view-header-container' : 'header-container'}${\n this.showTrek || this.showTouristicContent || this.showTouristicEvent ? ' header-detail' : ''\n }`}\n >\n {Number(this.treks) + Number(this.touristicContents) + Number(this.touristicEvents) > 1 && !this.showTrek && !this.showTouristicContent && !this.showTouristicEvent && (\n <div class=\"segmented-buttons-container\">\n {this.treks && (\n <label class={`segment${state.mode === 'treks' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('treks')}>\n {translate[state.language].home.segment.treks}\n </label>\n )}\n {this.touristicContents && (\n <label class={`segment${state.mode === 'touristicContents' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('touristicContents')}>\n {translate[state.language].home.segment.touristicContents}\n </label>\n )}\n </div>\n )}\n {!this.showTrek && !this.showTouristicContent && !this.showTouristicEvent ? (\n <div class=\"handle-search-filters-container\">\n <div class=\"handle-search-container\">\n <grw-search></grw-search>\n </div>\n <div class=\"handle-filters-container\">\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined margin-right-icon\">\n filter_list\n </span>\n {translate[state.language].filter}\n </button>\n </div>\n </div>\n ) : (\n <div class=\"arrow-back-container\">\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined\">\n arrow_back\n </span>\n </button>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek || this.showTouristicContent || this.showTouristicEvent ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek || this.showTouristicContent || this.showTouristicEvent ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n {state.mode === 'treks' && this.treks && (\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n )}\n {state.mode === 'touristicContents' && this.touristicContents && (\n <grw-touristic-contents-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-touristic-contents-list>\n )}\n </div>\n {(this.showTrek && !state.currentTrek) ||\n (this.showTouristicContent && !state.currentTouristicContent) ||\n (this.showTouristicEvent && !state.currentTouristicEvent) ||\n (!state.currentTreks && state.mode === 'treks') ||\n (!state.touristicContents && state.mode === 'touristicContents' && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n ))}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n style={{\n visibility: (!this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTrekMap ? '1' : '0',\n }}\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n weather={this.weather}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n {this.showTouristicContent && (\n <div class={this.isLargeView ? 'large-view-app-touristic-content-detail-container' : 'app-touristic-content-detail-container'}>\n <grw-touristic-content-detail\n style={{\n visibility: !this.showTouristicContentMap || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTouristicContentMap ? '1' : '0',\n }}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n is-large-view={this.isLargeView}\n ></grw-touristic-content-detail>\n </div>\n )}\n {this.showTouristicEvent && (\n <div class={this.isLargeView ? 'large-view-app-touristic-event-detail-container' : 'app-touristic-event-detail-container'}>\n <grw-touristic-event-detail\n style={{\n visibility: !this.showTouristicEventMap || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTouristicEventMap ? '1' : '0',\n }}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n is-large-view={this.isLargeView}\n ></grw-touristic-event-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility:\n (this.showHomeMap && !this.showTrek) ||\n (this.showTrekMap && this.showTrek) ||\n (this.showTouristicContentMap && this.showTouristicContent) ||\n (this.showTouristicEventMap && this.showTouristicEvent) ||\n this.isLargeView\n ? 'visible'\n : 'hidden',\n zIndex: this.showHomeMap || this.showTrekMap || this.showTouristicContentMap || this.showTouristicEventMap ? '1' : '0',\n }}\n center={this.center}\n zoom={this.zoom}\n name-layer={this.nameLayer}\n url-layer={this.urlLayer}\n attribution-layer={this.attributionLayer}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n use-gradient={this.useGradient}\n ></grw-map>\n </div>\n {((!this.showTrek && !this.showTouristicContent && !this.showTouristicEvent) ||\n (this.showTrek && state.currentTrek) ||\n (this.showTouristicContent && state.currentTouristicContent) ||\n (this.showTouristicEvent && state.currentTouristicEvent)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined\">\n {this.getMapVisibilityIconButton()}\n </span>\n {this.getMapVisibilityLabelButton()}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && <grw-filters handleFilters={() => this.handleFilters()}></grw-filters>}\n </Host>\n );\n }\n}\n"],"mappings":"8LAAA,MAAMA,EAAY,g1N,MCWLC,EAAM,M,yBA0DjBC,KAAAC,cAAgB,KAChBD,KAAAE,mBAA2CF,KAAKG,eAAeC,KAAKJ,M,cAzDhD,M,0BACY,M,wBACF,M,iBACP,M,iBACA,M,6BACY,M,2BACF,M,iBACV,M,iBACA,M,2HAII,O,eACC,Q,kCAER,K,mUAcF,M,qBAEQ,U,oBACD,U,kBACF,U,oBACE,U,yBACK,U,2BACE,U,2BACA,U,6BACE,U,6BACA,U,+BACE,U,qBACV,U,+BACU,U,8BACD,U,wBACN,U,cACV,U,mBAEK,U,wBACK,U,kBACN,U,iBACD,M,WAEN,K,uBACY,M,qBACF,K,CAM1BK,gBAAgBC,GACdN,KAAKO,0BAA4B,KACjCP,KAAKQ,qBAAuB,MAC5BC,EAAMC,wBAA0B,KAChCV,KAAKW,wBAA0B,KAC/BX,KAAKY,mBAAqB,MAC1BH,EAAMI,sBAAwB,KAC9B,MAAMC,EAAaL,EAAMM,aAAeN,EA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BAAyBpC,KAAKY,oBACpCZ,KAAKwC,YACD,UACA,SACNkG,OAAQ1I,KAAKgE,aAAehE,KAAKqB,aAAerB,KAAKkC,yBAA2BlC,KAAKoC,sBAAwB,IAAM,KAErHwG,OAAQ5I,KAAK4I,OACbC,KAAM7I,KAAK6I,KAAI,aACH7I,KAAK8I,UAAS,YACf9I,KAAK+I,SAAQ,oBACL/I,KAAKgJ,iBAAgB,oBACrBhJ,KAAKuG,gBAAe,mBACrBvG,KAAK0G,eAAc,0BACZ1G,KAAK6G,sBAAqB,6BACvB7G,KAAK8G,wBAAuB,mBACtC9G,KAAKiH,gBAAe,kBACrBjH,KAAKiJ,cAAa,uBACbjJ,KAAKkJ,mBAAkB,iBAC7BlJ,KAAKmJ,aAAY,gBAClBnJ,KAAKwC,YAAW,eACjBxC,KAAKoJ,iBAGnBpJ,KAAKoB,WAAapB,KAAKQ,uBAAyBR,KAAKY,oBACtDZ,KAAKoB,UAAYX,EAAMS,aACvBlB,KAAKQ,sBAAwBC,EAAMC,yBACnCV,KAAKY,oBAAsBH,EAAMI,wBAClCuF,EAAA,OAAKqB,MAAM,mCACTrB,EAAA,UAAQgC,QAAS,IAAMpI,KAAKqE,gBAAiBoD,MAAM,wBAAwBnB,MAAO,CAAEiC,QAASvI,KAAKwC,YAAc,OAAS,SAEvH4D,EAAA,QAAM1B,UAAW,MAAO+C,MAAM,8CAC3BzH,KAAKsE,8BAEPtE,KAAKwE,kCAMdxE,KAAKoB,UAAYpB,KAAKkE,aAAekC,EAAA,eAAanC,cAAe,IAAMjE,KAAKiE,kB"}
|
|
1
|
+
{"version":3,"names":["grwAppCss","GrwApp","this","largeViewSize","handlePopStateBind","handlePopState","bind","onTrekCardPress","event","currentTouristicContentId","showTouristicContent","state","currentTouristicContent","currentTouristicEventId","showTouristicEvent","currentTouristicEvent","parentTrek","parentTrekId","currentTrekSteps","currentTrekId","currentTrek","detail","showTrek","showTrekMap","url","URL","window","location","toString","searchParams","set","history","pushState","onParentTrekPress","delete","onTouristicContentCardPress","showTouristicContentMap","onTouristiceEventCardPress","showTouristicEventMap","onWindowResize","handleView","onCenterOnMap","isLargeView","watchPropHandler","dispatchEvent","Event","componentWillLoad","treks","mode","touristicContents","trekParam","get","touristicContentParam","touristicEventParam","replaceState","isInitialHistoryWithDetails","Number","componentDidLoad","onChange","trekNetworkError","urlRedirect","onDetailsClose","addEventListener","appElement","getBoundingClientRect","width","showHomeMap","handleFilters","showFilters","handleBackButton","back","handleShowMap","getMapVisibilityIconButton","mapIconButton","getMapVisibilityLabelButton","mapLabelButton","translate","language","showDetails","showRoute","showMap","showList","disconnectedCallback","reset","removeEventListener","changeMode","searchValue","currentTreks","treksFilters","forEach","filter","property","currentFilter","selected","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","handleTreksFiltersAndSearch","currentTouristicContents","touristicContentsFilters","handleTouristicContentsFiltersAndSearch","render","h","Host","style","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","appWidth","appHeight","touristicEvents","class","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","onClick","home","segment","display","position","visibility","zIndex","weather","center","zoom","nameLayer","urlLayer","attributionLayer","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient"],"sources":["./src/components/grw-app/grw-app.scss?tag=grw-app","./src/components/grw-app/grw-app.tsx"],"sourcesContent":[".material-symbols {\n font-family: 'Material Symbols Outlined';\n}\n\n.material-symbols-outlined {\n font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;\n}\n\ngrw-app {\n display: block;\n position: relative;\n width: var(--app-width);\n height: var(--app-height);\n font-family: 'Roboto';\n color: var(--color-on-surface);\n overflow: hidden;\n line-height: initial;\n max-width: 100dvw;\n max-height: 100dvh;\n}\n\n.app-container {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.header-container,\n.large-view-header-container {\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n height: var(--header-height);\n .arrow-back-container {\n display: flex;\n align-items: center;\n height: 100%;\n margin: 0px 16px;\n .arrow-back-icon {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n border: none;\n background-color: var(--color-background);\n border-radius: 50%;\n height: 48px;\n width: 48px;\n padding: 0px;\n text-align: left;\n }\n }\n}\n\n.handle-search-filters-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0px 16px;\n height: 64px;\n\n .handle-search-container {\n width: calc(50% + 48px);\n max-width: 220px;\n }\n\n .handle-filters-button {\n margin-left: 16px;\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: var(--color-background);\n color: var(--color-on-surface);\n padding: 12px 24px;\n border-radius: 20px;\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.10000000149011612px;\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n span {\n font-size: 18px;\n }\n }\n}\n\n.header-detail {\n height: 64px;\n}\n\n.large-view-header-container {\n .handle-search-filters-container {\n justify-content: flex-start;\n }\n}\n\n.init-loader-container,\n.loader-container,\n.large-view-loader-container {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n background-color: var(--color-background);\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.content-container {\n position: relative;\n display: flex;\n height: calc(100% - var(--header-height));\n background-color: var(--color-background);\n}\n\n.content-treks {\n height: calc(100% - var(--header-height));\n}\n\n.content-trek {\n height: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container,\n.app-touristic-content-detail-container,\n.app-touristic-event-detail-container,\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n max-width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.app-map-container,\n.large-view-app-map-container {\n width: 100%;\n height: 100%;\n}\n\n.map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: absolute;\n bottom: 24px;\n z-index: 4;\n .map-visibility-button {\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n text-decoration: none;\n padding: 16px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n box-shadow: var(--elevation-1);\n border-radius: 12px;\n height: 56px;\n font-size: 16px;\n width: unset;\n &:hover {\n box-shadow: var(--elevation-4);\n }\n span {\n font-size: 24px;\n margin-right: 8px;\n color: var(--color-on-primary-container);\n }\n }\n}\n\n.init-loader-container,\n.loader-container {\n width: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container {\n width: 100%;\n}\n\ngrw-treks-list,\ngrw-touristic-contents-list {\n max-height: calc(100vh - var(--header-height));\n}\n\ngrw-trek-detail,\ngrw-touristic-content-detail,\ngrw-touristic-event-detail {\n max-height: calc(100vh - 64px);\n}\n\n.app-map-container {\n width: 100%;\n position: absolute;\n}\n\n.large-view-loader-container {\n width: 50%;\n}\n\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container,\n.large-view-app-touristic-content-detail-container,\n.large-view-app-touristic-event-detail-container {\n width: 50%;\n}\n\n.large-view-app-map-container {\n position: relative;\n width: 50%;\n}\n\n.segmented-buttons-container {\n display: flex;\n justify-content: center;\n width: calc(100% - 32px);\n height: 40px;\n margin: 16px;\n border: 1px solid var(--color-outline);\n border-radius: 20px;\n line-height: 20px;\n .segment {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface-variant);\n background-color: transparent;\n border-radius: 0px;\n min-width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n &:first-child {\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n }\n &:not(:last-child) {\n border-right: 1px solid var(--color-outline);\n }\n &:last-child {\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n }\n }\n .selected-segment {\n color: var(--color-on-secondary-container);\n background-color: var(--color-secondary-container);\n }\n}\n","import { Component, Host, h, Listen, State, Prop, Element, Watch } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\nimport { mode } from 'types/types';\nimport { handleTouristicContentsFiltersAndSearch, handleTreksFiltersAndSearch, touristicContentsFilters, treksFilters } from 'utils/utils';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() appElement: HTMLElement;\n @State() showTrek = false;\n @State() showTouristicContent = false;\n @State() showTouristicEvent = false;\n @State() showHomeMap = false;\n @State() showTrekMap = false;\n @State() showTouristicContentMap = false;\n @State() showTouristicEventMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @State() currentTouristicContentId: number;\n @State() currentTouristicEventId: number;\n @Prop() appWidth: string = '100%';\n @Prop() appHeight: string = '100vh';\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() nameLayer: string;\n @Prop() urlLayer: string;\n @Prop() attributionLayer: string;\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n @Prop() useGradient = false;\n\n @Prop() treks = true;\n @Prop() touristicContents = false;\n @Prop() touristicEvents = false;\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n state.currentTouristicContent = null;\n this.currentTouristicEventId = null;\n this.showTouristicEvent = false;\n state.currentTouristicEvent = null;\n const parentTrek = state.parentTrekId ? state.parentTrekId : state.currentTrekSteps ? this.currentTrekId : null;\n state.currentTrek = null;\n this.currentTrekId = event.detail;\n this.showTrek = true;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n if (state.currentTrekSteps) {\n url.searchParams.set('parenttrek', parentTrek.toString());\n }\n window.history.pushState({}, '', url);\n }\n\n @Listen('parentTrekPress', { target: 'window' })\n onParentTrekPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = event.detail;\n this.showTrek = true;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n url.searchParams.delete('parenttrek');\n window.history.pushState({}, '', url);\n }\n\n @Listen('touristicContentCardPress', { target: 'window' })\n onTouristicContentCardPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = false;\n this.currentTouristicContentId = event.detail;\n this.showTouristicContent = true;\n this.showTouristicContentMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.set('touristiccontent', this.currentTouristicContentId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('touristicEventCardPress', { target: 'window' })\n onTouristiceEventCardPress(event: CustomEvent<number>) {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = false;\n this.currentTouristicEventId = event.detail;\n this.showTouristicEvent = true;\n this.showTouristicEventMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.set('touristicevent', this.currentTouristicEventId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n if (this.treks) {\n state.mode = 'treks';\n } else if (this.touristicContents) {\n state.mode = 'touristicContents';\n }\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n const parentTrekId = url.searchParams.get('parenttrek');\n const touristicContentParam = url.searchParams.get('touristiccontent');\n const touristicEventParam = url.searchParams.get('touristicevent');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n state.parentTrekId = parentTrekId ? Number(parentTrekId) : null;\n this.currentTrekId = Number(trekParam);\n this.showTrek = true;\n } else if (touristicContentParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n this.currentTouristicContentId = Number(touristicContentParam);\n this.showTouristicContent = true;\n } else if (touristicEventParam) {\n window.history.replaceState({ isInitialHistoryWithDetails: true }, '', url);\n this.currentTouristicEventId = Number(touristicEventParam);\n this.showTouristicEvent = true;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n urlRedirect.searchParams.delete('parenttrek');\n urlRedirect.searchParams.delete('touristiccontent');\n urlRedirect.searchParams.delete('touristicevent');\n window.history.replaceState({}, '', urlRedirect);\n this.onDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onDetailsClose() {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n this.showTouristicContentMap = false;\n this.showTouristicEvent = false;\n this.showTouristicEventMap = false;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n\n state.currentTrek = null;\n state.currentTrekSteps = null;\n state.parentTrekId = null;\n this.currentTrekId = null;\n this.showTrek = false;\n }\n\n handleView() {\n this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showHomeMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithDetails) {\n this.onDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n url.searchParams.delete('touristiccontent');\n url.searchParams.delete('touristicevent');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n const touristicContentParam = url.searchParams.get('touristiccontent');\n const touristicEventParam = url.searchParams.get('touristicevent');\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTouristicContentId = null;\n this.showTouristicContent = false;\n this.showTouristicEvent = false;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n state.currentTrek = null;\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam && !touristicContentParam && !touristicEventParam) {\n this.onDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else if (this.showTouristicContent) {\n this.showTouristicContentMap = !this.showTouristicContentMap;\n } else if (this.showTouristicEvent) {\n this.showTouristicEventMap = !this.showTouristicEventMap;\n } else {\n this.showHomeMap = !this.showHomeMap;\n }\n }\n\n getMapVisibilityIconButton() {\n let mapIconButton: string;\n\n if (this.showTrek) {\n mapIconButton = this.showTrekMap ? 'summarize' : 'map';\n } else if (this.showTouristicContent) {\n mapIconButton = this.showTouristicContentMap ? 'summarize' : 'map';\n } else if (this.showTouristicEvent) {\n mapIconButton = this.showTouristicEventMap ? 'summarize' : 'map';\n } else {\n mapIconButton = this.showHomeMap ? 'list' : 'map';\n }\n\n return mapIconButton;\n }\n\n getMapVisibilityLabelButton() {\n let mapLabelButton: string;\n\n if (this.showTrek) {\n mapLabelButton = this.showTrekMap ? translate[state.language].showDetails : translate[state.language].showRoute;\n } else if (this.showTouristicContent) {\n mapLabelButton = this.showTouristicContentMap ? translate[state.language].showDetails : translate[state.language].showMap;\n } else if (this.showTouristicEvent) {\n mapLabelButton = this.showTouristicEventMap ? translate[state.language].showDetails : translate[state.language].showMap;\n } else {\n mapLabelButton = this.showHomeMap ? translate[state.language].showList : translate[state.language].showMap;\n }\n\n return mapLabelButton;\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n changeMode(mode: mode) {\n state.searchValue = '';\n if (mode === 'treks' && state.currentTreks) {\n treksFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTreks = handleTreksFiltersAndSearch();\n } else if (mode === 'touristicContents' && state.currentTouristicContents) {\n touristicContentsFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTouristicContents = handleTouristicContentsFiltersAndSearch();\n }\n state.mode = mode;\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n '--app-width': this.appWidth,\n '--app-height': this.appHeight,\n '--header-height': Number(this.treks) + Number(this.touristicContents) + Number(this.touristicEvents) > 1 ? '136px' : '64px',\n }}\n >\n {!state.currentTreks && !state.currentTrek && !state.currentTouristicContent && !state.currentTouristicEvent && !state.currentTouristicContents && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {this.treks && state.mode === 'treks' && !this.showTrek && !this.showTouristicContent && !this.showTouristicEvent && !state.currentTreks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId} portals={this.portals}></grw-trek-provider>\n )}\n {this.showTouristicContent && this.currentTouristicContentId && (\n <grw-touristic-content-provider\n api={this.api}\n languages={this.languages}\n touristic-content-id={this.currentTouristicContentId}\n portals={this.portals}\n ></grw-touristic-content-provider>\n )}\n {this.showTouristicEvent && this.currentTouristicEventId && (\n <grw-touristic-event-provider\n api={this.api}\n languages={this.languages}\n touristic-event-id={this.currentTouristicEventId}\n portals={this.portals}\n ></grw-touristic-event-provider>\n )}\n {this.touristicContents && state.mode === 'touristicContents' && !state.currentTouristicContents && !this.showTouristicContent && (\n <grw-touristic-contents-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n ></grw-touristic-contents-provider>\n )}\n {(state.currentTreks || state.currentTrek || state.touristicContents || state.currentTouristicContent || state.currentTouristicEvent) && (\n <div class=\"app-container\">\n <div\n class={`${this.isLargeView ? 'large-view-header-container' : 'header-container'}${\n this.showTrek || this.showTouristicContent || this.showTouristicEvent ? ' header-detail' : ''\n }`}\n >\n {Number(this.treks) + Number(this.touristicContents) + Number(this.touristicEvents) > 1 && !this.showTrek && !this.showTouristicContent && !this.showTouristicEvent && (\n <div class=\"segmented-buttons-container\">\n {this.treks && (\n <label class={`segment${state.mode === 'treks' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('treks')}>\n {translate[state.language].home.segment.treks}\n </label>\n )}\n {this.touristicContents && (\n <label class={`segment${state.mode === 'touristicContents' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('touristicContents')}>\n {translate[state.language].home.segment.touristicContents}\n </label>\n )}\n </div>\n )}\n {!this.showTrek && !this.showTouristicContent && !this.showTouristicEvent ? (\n <div class=\"handle-search-filters-container\">\n <div class=\"handle-search-container\">\n <grw-search></grw-search>\n </div>\n <div class=\"handle-filters-container\">\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined margin-right-icon\">\n filter_list\n </span>\n {translate[state.language].filter}\n </button>\n </div>\n </div>\n ) : (\n <div class=\"arrow-back-container\">\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined\">\n arrow_back\n </span>\n </button>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek || this.showTouristicContent || this.showTouristicEvent ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek || this.showTouristicContent || this.showTouristicEvent ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n {state.mode === 'treks' && this.treks && (\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n )}\n {state.mode === 'touristicContents' && this.touristicContents && (\n <grw-touristic-contents-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-touristic-contents-list>\n )}\n </div>\n {(this.showTrek && !state.currentTrek) ||\n (this.showTouristicContent && !state.currentTouristicContent) ||\n (this.showTouristicEvent && !state.currentTouristicEvent) ||\n (!state.currentTreks && state.mode === 'treks') ||\n (!state.touristicContents && state.mode === 'touristicContents' && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n ))}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n style={{\n visibility: (!this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTrekMap ? '1' : '0',\n }}\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n weather={this.weather}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n {this.showTouristicContent && (\n <div class={this.isLargeView ? 'large-view-app-touristic-content-detail-container' : 'app-touristic-content-detail-container'}>\n <grw-touristic-content-detail\n style={{\n visibility: !this.showTouristicContentMap || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTouristicContentMap ? '1' : '0',\n }}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n is-large-view={this.isLargeView}\n ></grw-touristic-content-detail>\n </div>\n )}\n {this.showTouristicEvent && (\n <div class={this.isLargeView ? 'large-view-app-touristic-event-detail-container' : 'app-touristic-event-detail-container'}>\n <grw-touristic-event-detail\n style={{\n visibility: !this.showTouristicEventMap || this.isLargeView ? 'visible' : 'hidden',\n zIndex: !this.showTouristicEventMap ? '1' : '0',\n }}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n color-background={this.colorBackground}\n is-large-view={this.isLargeView}\n ></grw-touristic-event-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility:\n (this.showHomeMap && !this.showTrek) ||\n (this.showTrekMap && this.showTrek) ||\n (this.showTouristicContentMap && this.showTouristicContent) ||\n (this.showTouristicEventMap && this.showTouristicEvent) ||\n this.isLargeView\n ? 'visible'\n : 'hidden',\n zIndex: this.showHomeMap || this.showTrekMap || this.showTouristicContentMap || this.showTouristicEventMap ? '1' : '0',\n }}\n center={this.center}\n zoom={this.zoom}\n name-layer={this.nameLayer}\n url-layer={this.urlLayer}\n attribution-layer={this.attributionLayer}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n use-gradient={this.useGradient}\n ></grw-map>\n </div>\n {((!this.showTrek && !this.showTouristicContent && !this.showTouristicEvent) ||\n (this.showTrek && state.currentTrek) ||\n (this.showTouristicContent && state.currentTouristicContent) ||\n (this.showTouristicEvent && state.currentTouristicEvent)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n {/* @ts-ignore */}\n <span translate={false} class=\"material-symbols material-symbols-outlined\">\n {this.getMapVisibilityIconButton()}\n </span>\n {this.getMapVisibilityLabelButton()}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && <grw-filters handleFilters={() => this.handleFilters()}></grw-filters>}\n </Host>\n );\n }\n}\n"],"mappings":"mMAAA,MAAMA,EAAY,g1N,MCWLC,EAAM,M,yBA0DjBC,KAAAC,cAAgB,KAChBD,KAAAE,mBAA2CF,KAAKG,eAAeC,KAAKJ,M,cAzDhD,M,0BACY,M,wBACF,M,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TrB,EAAA,UAAQgC,QAAS,IAAMpI,KAAKqE,gBAAiBoD,MAAM,wBAAwBnB,MAAO,CAAEiC,QAASvI,KAAKwC,YAAc,OAAS,SAEvH4D,EAAA,QAAM1B,UAAW,MAAO+C,MAAM,8CAC3BzH,KAAKsE,8BAEPtE,KAAKwE,kCAMdxE,KAAKoB,UAAYpB,KAAKkE,aAAekC,EAAA,eAAanC,cAAe,IAAMjE,KAAKiE,kB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","treksFilters","exports","property","trekProperty","trekPropertyIsArray","type","segment","touristicContentsFilters","touristicContentProperty","touristicContentPropertyIsArray","handleTreksFiltersAndSearch","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","treks","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","treksFilters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLowerCase","handleTouristicContentsFiltersAndSearch","filtersTouristicContents","touristicContent","currentFiltersId_4","touristicContents","minValue_2","maxValue_2","currentFiltersId_3","touristicContentsFilters_1","searchTouristicContents","currentTouristicContents"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...filtersTreks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents =>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sC,EAAAvB,G,EAANf,E,CA+DX,IAAMuC,EAA0BzC,EAAgBiC,EAA2B7B,EAAMgC,kBACjF,OAAOT,QAAQvB,EAAMwB,aACjBa,EAAwBvC,QAAO,SAAAwC,GAA4B,OAAAA,EAAyBZ,KAAKC,cAAcnB,SAASR,EAAMwB,YAAYG,cAAvE,IAC3DU,CACN,C"}
|
|
1
|
+
{"version":3,"names":["formatDuration","duration","formattedDuration","concat","Math","floor","round","formatLength","length","formatAscent","ascent","treksFilters","exports","property","trekProperty","trekPropertyIsArray","type","segment","touristicContentsFilters","touristicContentProperty","touristicContentPropertyIsArray","handleTreksFiltersAndSearch","isUsingFilter","filtersTreks","filter","currentFiltersId","state","currentFilter","selected","map","id","__spreadArray","trek","some","includes","currentFilterId","find","minValue","maxValue","_i","currentFiltersId_2","treks","minValue_1","maxValue_1","isNaN","_a","currentFiltersId_1","treksFilters_1","searchTreks","Boolean","searchValue","currentTrek","name","toLowerCase","handleTouristicContentsFiltersAndSearch","filtersTouristicContents","touristicContent","currentFiltersId_4","touristicContents","minValue_2","maxValue_2","currentFiltersId_3","touristicContentsFilters_1","searchTouristicContents","currentTouristicContents"],"sources":["src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration = `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...filtersTreks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n"],"mappings":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gC,kBAEjF,OAAOT,QAAQvB,EAAMwB,aACjBa,EAAwBvC,QAAO,SAAAwC,GAA4B,OAAAA,EAAyBZ,KAAKC,cAAcnB,SAASR,EAAMwB,YAAYG,cAAvE,IAC3DU,CACN,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./p-d2c035bc.system.js"],(function(r,o){"use strict";var e,n,t,i,c,a;return{setters:[function(o){e=o.p;n=o.w;t=o.d;i=o.N;c=o.a;a=o.b;r("setNonce",o.s)}],execute:function(){function r(r){var o,e,n;return(n=(e=(o=r.head)===null||o===void 0?void 0:o.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&n!==void 0?n:undefined}var s=function(r){return"__sc_import_".concat(r.replace(/\s|-/g,"_"))};var l=function(){{e.$cssShim$=n.__cssshim}var r=Array.from(t.querySelectorAll("script")).find((function(r){return new RegExp("/".concat(i,"(\\.esm)?\\.js($|\\?|#)")).test(r.src)||r.getAttribute("data-stencil-namespace")===i}));var a=(r||{})["data-opts"]||{};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,n.location.href)).href;{u(a.resourcesUrl,r)}if(!n.customElements){return o.import("./p-fe22d872.system.js").then((function(){return a}))}}return c(a)};var u=function(o,c){var a=s(i);try{n[a]=new Function("w","return import(w);//".concat(Math.random()))}catch(u){var l=new Map;n[a]=function(i){var s;var u=new URL(i,o).href;var p=l.get(u);if(!p){var d=t.createElement("script");d.type="module";d.crossOrigin=c.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '".concat(u,"'; window.").concat(a,".m = m;")],{type:"application/javascript"}));var y=(s=e.$nonce$)!==null&&s!==void 0?s:r(t);if(y!=null){d.setAttribute("nonce",y)}p=new Promise((function(r){d.onload=function(){r(n[a].m);d.remove()}}));l.set(u,p);t.head.appendChild(d)}return p}}};l().then((function(r){return a([["p-
|
|
1
|
+
System.register(["./p-d2c035bc.system.js"],(function(r,o){"use strict";var e,n,t,i,c,a;return{setters:[function(o){e=o.p;n=o.w;t=o.d;i=o.N;c=o.a;a=o.b;r("setNonce",o.s)}],execute:function(){function r(r){var o,e,n;return(n=(e=(o=r.head)===null||o===void 0?void 0:o.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&n!==void 0?n:undefined}var s=function(r){return"__sc_import_".concat(r.replace(/\s|-/g,"_"))};var l=function(){{e.$cssShim$=n.__cssshim}var r=Array.from(t.querySelectorAll("script")).find((function(r){return new RegExp("/".concat(i,"(\\.esm)?\\.js($|\\?|#)")).test(r.src)||r.getAttribute("data-stencil-namespace")===i}));var a=(r||{})["data-opts"]||{};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,n.location.href)).href;{u(a.resourcesUrl,r)}if(!n.customElements){return o.import("./p-fe22d872.system.js").then((function(){return a}))}}return c(a)};var u=function(o,c){var a=s(i);try{n[a]=new Function("w","return import(w);//".concat(Math.random()))}catch(u){var l=new Map;n[a]=function(i){var s;var u=new URL(i,o).href;var p=l.get(u);if(!p){var d=t.createElement("script");d.type="module";d.crossOrigin=c.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '".concat(u,"'; window.").concat(a,".m = m;")],{type:"application/javascript"}));var y=(s=e.$nonce$)!==null&&s!==void 0?s:r(t);if(y!=null){d.setAttribute("nonce",y)}p=new Promise((function(r){d.onload=function(){r(n[a].m);d.remove()}}));l.set(u,p);t.head.appendChild(d)}return p}}};l().then((function(r){return a([["p-2c4abcd9.system",[[0,"grw-app",{appWidth:[1,"app-width"],appHeight:[1,"app-height"],api:[1],languages:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],center:[1],zoom:[2],nameLayer:[1,"name-layer"],urlLayer:[1,"url-layer"],attributionLayer:[1,"attribution-layer"],weather:[4],colorPrimaryApp:[1,"color-primary-app"],colorOnPrimary:[1,"color-on-primary"],colorSurface:[1,"color-surface"],colorOnSurface:[1,"color-on-surface"],colorSurfaceVariant:[1,"color-surface-variant"],colorOnSurfaceVariant:[1,"color-on-surface-variant"],colorPrimaryContainer:[1,"color-primary-container"],colorOnPrimaryContainer:[1,"color-on-primary-container"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorBackground:[1,"color-background"],colorSurfaceContainerHigh:[1,"color-surface-container-high"],colorSurfaceContainerLow:[1,"color-surface-container-low"],fabBackgroundColor:[1,"fab-background-color"],fabColor:[1,"fab-color"],colorTrekLine:[1,"color-trek-line"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],useGradient:[4,"use-gradient"],treks:[4],touristicContents:[4,"touristic-contents"],touristicEvents:[4,"touristic-events"],showTrek:[32],showTouristicContent:[32],showTouristicEvent:[32],showHomeMap:[32],showTrekMap:[32],showTouristicContentMap:[32],showTouristicEventMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32],currentTouristicContentId:[32],currentTouristicEventId:[32]},[[8,"trekCardPress","onTrekCardPress"],[8,"parentTrekPress","onParentTrekPress"],[8,"touristicContentCardPress","onTouristicContentCardPress"],[8,"touristicEventCardPress","onTouristiceEventCardPress"],[9,"resize","onWindowResize"],[8,"centerOnMap","onCenterOnMap"]]]]],["p-9d562b29.system",[[1,"grw-select-language"]]],["p-ea78e5f0.system",[[1,"grw-touristic-event-card-provider",{languages:[1],api:[1],touristicEventId:[1,"touristic-event-id"],portals:[1]}]]],["p-bf8d8171.system",[[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterPlaceholder:[1,"filter-placeholder"],filterNameProperty:[1,"filter-name-property"],segment:[1]},[[8,"resetFilter","onResetFilter"]]]]],["p-638b7451.system",[[1,"grw-information-desk",{informationDesk:[16],displayShortDescription:[32]}],[1,"grw-poi",{poi:[16],displayShortDescription:[32],displayFullscreen:[32]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}],[1,"grw-touristic-event-card",{touristicEvent:[16],displayFullscreen:[32]}],[1,"grw-touristic-content-card",{touristicContent:[16],isLargeView:[4,"is-large-view"],isInsideHorizontalList:[4,"is-inside-horizontal-list"],displayFullscreen:[32]},[[1,"mouseover","handleMouseOver"],[1,"mouseleave","handleMouseLeave"]]],[1,"grw-trek-card",{trek:[16],colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],isLargeView:[4,"is-large-view"],resetStoreOnDisconnected:[4,"reset-store-on-disconnected"],isStep:[4,"is-step"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32],departureCity:[32]},[[1,"mouseover","handleMouseOver"],[1,"mouseleave","handleMouseLeave"]]]]],["p-b40c2ea8.system",[[1,"grw-trek-detail",{trek:[16],colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorPrimaryContainer:[1,"color-primary-container"],colorOnPrimaryContainer:[1,"color-on-primary-container"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],colorBackground:[1,"color-background"],resetStoreOnDisconnected:[4,"reset-store-on-disconnected"],weather:[4],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],displayFullscreen:[32],cities:[32],options:[32]}],[1,"grw-filters",{handleFilters:[16],selectedSegment:[32]}],[1,"grw-touristic-contents-list",{colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],isLargeView:[4,"is-large-view"],resetStoreOnDisconnected:[4,"reset-store-on-disconnected"],touristicContentsToDisplay:[32]}],[1,"grw-treks-list",{colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],isLargeView:[4,"is-large-view"],resetStoreOnDisconnected:[4,"reset-store-on-disconnected"],treksToDisplay:[32]}],[1,"grw-map",{nameLayer:[1,"name-layer"],urlLayer:[1,"url-layer"],attributionLayer:[1,"attribution-layer"],center:[1],zoom:[2],colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorPrimaryContainer:[1,"color-primary-container"],colorOnPrimaryContainer:[1,"color-on-primary-container"],colorBackground:[1,"color-background"],colorTrekLine:[1,"color-trek-line"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],useGradient:[4,"use-gradient"],resetStoreOnDisconnected:[4,"reset-store-on-disconnected"],isLargeView:[4,"is-large-view"],mapIsReady:[32]},[[8,"centerOnMap","onCenterOnMap"],[8,"stepsIsInViewport","stepsIsInViewport"],[8,"descriptionIsInViewport","descriptionIsInViewport"],[8,"parkingIsInViewport","parkingIsInViewport"],[8,"informationDeskIsInViewport","onInformationDesksIsInViewport"],[8,"sensitiveAreaIsInViewport","sensitiveAreaIsInViewport"],[8,"poiIsInViewport","poiIsInViewport"],[8,"touristicContentsIsInViewport","touristicContentsIsInViewport"],[8,"touristicEventsIsInViewport","touristicEventsIsInViewport"],[8,"cardTrekMouseOver","onCardTrekMouseOver"],[8,"cardTrekMouseLeave","onCardTrekMouseLeave"],[8,"cardTouristicContentMouseOver","onTouristicContentMouseOver"],[8,"cardTouristicContentMouseLeave","onTouristicContentMouseLeave"]]],[1,"grw-search"],[1,"grw-touristic-content-detail",{colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorPrimaryContainer:[1,"color-primary-container"],colorOnPrimaryContainer:[1,"color-on-primary-container"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],colorBackground:[1,"color-background"],isLargeView:[4,"is-large-view"],displayFullscreen:[32]}],[1,"grw-touristic-content-provider",{languages:[1],api:[1],touristicContentId:[1,"touristic-content-id"],portals:[1]}],[1,"grw-touristic-contents-provider",{languages:[1],api:[1],touristicContentId:[1,"touristic-content-id"],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1]}],[1,"grw-touristic-event-detail",{colorPrimaryApp:[1,"color-primary-app"],colorOnSurface:[1,"color-on-surface"],colorPrimaryContainer:[1,"color-primary-container"],colorOnPrimaryContainer:[1,"color-on-primary-container"],colorSecondaryContainer:[1,"color-secondary-container"],colorOnSecondaryContainer:[1,"color-on-secondary-container"],colorSurfaceContainerLow:[1,"color-surface-container-low"],colorBackground:[1,"color-background"],isLargeView:[4,"is-large-view"],displayFullscreen:[32]}],[1,"grw-trek-provider",{languages:[1],api:[1],trekId:[1,"trek-id"],portals:[1]}],[1,"grw-treks-provider",{languages:[1],api:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1]}]]]],r)}))}}}));
|
|
2
2
|
//# sourceMappingURL=p-cc8a7df2.system.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","getDynamicImportFunction","namespace","concat","replace","patchBrowser","plt","$cssShim$","win","__cssshim","scriptElm","Array","from","querySelectorAll","find","s","RegExp","NAMESPACE","test","src","opts","history","scrollRestoration","then","resourcesUrl","URL","location","href","patchDynamicImport","customElements","module","import","promiseResolve","base","orgScriptElm","importFunctionName","Function","Math","random","e","moduleMap_1","Map","url","mod","get","script_1","createElement","type","crossOrigin","createObjectURL","Blob","nonce","$nonce$","setAttribute","Promise","resolve","onload","m","remove","set","appendChild","options","bootstrapLazy","appWidth","appHeight","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","center","zoom","nameLayer","urlLayer","attributionLayer","weather","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient","treks","touristicContents","touristicEvents","showTrek","showTouristicContent","showTouristicEvent","showHomeMap","showTrekMap","showTouristicContentMap","showTouristicEventMap","showFilters","isLargeView","currentTrekId","currentTouristicContentId","currentTouristicEventId","touristicEventId","filterType","filterName","filterPlaceholder","filterNameProperty","segment","informationDesk","displayShortDescription","poi","displayFullscreen","sensitiveArea","touristicEvent","touristicContent","isInsideHorizontalList","trek","resetStoreOnDisconnected","isStep","currentTrek","difficulty","route","practice","departureCity","labels","sources","accessibilities","accessibilityLevel","handleFilters","selectedSegment","touristicContentsToDisplay","treksToDisplay","mapIsReady","touristicContentId","trekId"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"8LAaA,SAASA,EAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH,SAAY,OAAS,EAAIA,EAAGI,cAAc,6BAA+B,MAAQH,SAAY,OAAS,EAAIA,EAAGI,aAAa,cAAgB,MAAQH,SAAY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AA,uBAAAG,sBAAA,8BAAAC,wBAAA,iCAAAG,gBAAA,uBAAAK,cAAA,sBAAAC,mBAAA,2BAAAC,aAAA,qBAAAC,YAAA,mBAAA+B,yBAAA,kCAAAnB,YAAA,oBAAAkC,WAAA,kwBAAAhE,gBAAA,wBAAAG,eAAA,uBAAAG,sBAAA,8BAAAC,wBAAA,iCAAAC,wBAAA,gCAAAC,0BAAA,mCAAAG,yBAAA,kCAAAF,gBAAA,uBAAAoB,YAAA,oBAAAa,kBAAA,4CAAA1D,UAAA,IAAAD,IAAA,IAAAiF,mBAAA,mEAAAhF,UAAA,IAAAD,IAAA,IAAAiF,mBAAA,2BAAA/E,OAAA,cAAAC,OAAA,IAAAC,UAAA,IAAAC,WAAA,IAAAC,OAAA,IAAAC,QAAA,uCAAAS,gBAAA,wBAAAG,eAAA,uBAAAG,sBAAA,8BAAAC,wBAAA,iCAAAC,wBAAA,gCAAAC,0BAAA,mCAAAG,yBAAA,kCAAAF,gBAAA,uBAAAoB,YAAA,oBAAAa,kBAAA,+BAAA1D,UAAA,IAAAD,IAAA,IAAAkF,OAAA,yCAAAjF,UAAA,IAAAD,IAAA,IAAAE,OAAA,cAAAC,OAAA,IAAAC,UAAA,IAAAC,WAAA,IAAAC,OAAA,IAAAC,QAAA,IAAAC,OAAA,IAAAC,UAAA,SAAAb,EAC9D,G"}
|
|
1
|
+
{"version":3,"names":["queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","getDynamicImportFunction","namespace","concat","replace","patchBrowser","plt","$cssShim$","win","__cssshim","scriptElm","Array","from","querySelectorAll","find","s","RegExp","NAMESPACE","test","src","opts","history","scrollRestoration","then","resourcesUrl","URL","location","href","patchDynamicImport","customElements","module","import","promiseResolve","base","orgScriptElm","importFunctionName","Function","Math","random","e","moduleMap_1","Map","url","mod","get","script_1","createElement","type","crossOrigin","createObjectURL","Blob","nonce","$nonce$","setAttribute","Promise","resolve","onload","m","remove","set","appendChild","options","bootstrapLazy","appWidth","appHeight","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","center","zoom","nameLayer","urlLayer","attributionLayer","weather","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient","treks","touristicContents","touristicEvents","showTrek","showTouristicContent","showTouristicEvent","showHomeMap","showTrekMap","showTouristicContentMap","showTouristicEventMap","showFilters","isLargeView","currentTrekId","currentTouristicContentId","currentTouristicEventId","touristicEventId","filterType","filterName","filterPlaceholder","filterNameProperty","segment","informationDesk","displayShortDescription","poi","displayFullscreen","sensitiveArea","touristicEvent","touristicContent","isInsideHorizontalList","trek","resetStoreOnDisconnected","isStep","currentTrek","difficulty","route","practice","departureCity","labels","sources","accessibilities","accessibilityLevel","handleFilters","selectedSegment","touristicContentsToDisplay","treksToDisplay","mapIsReady","touristicContentId","trekId"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"8LAaA,SAASA,EAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH,SAAY,OAAS,EAAIA,EAAGI,cAAc,6BAA+B,MAAQH,SAAY,OAAS,EAAIA,EAAGI,aAAa,cAAgB,MAAQH,SAAY,EAAIA,EAAKI,SAC1N,CAEA,IAAMC,EAA2B,SAACC,GAAc,qBAAAC,OAAeD,EAAUE,QAAQ,QAAS,KAA1C,EAChD,IAAMC,EAAe,WAM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AAA,mBAAA+B,yBAAA,kCAAAnB,YAAA,oBAAAkC,WAAA,kwBAAAhE,gBAAA,wBAAAG,eAAA,uBAAAG,sBAAA,8BAAAC,wBAAA,iCAAAC,wBAAA,gCAAAC,0BAAA,mCAAAG,yBAAA,kCAAAF,gBAAA,uBAAAoB,YAAA,oBAAAa,kBAAA,4CAAA1D,UAAA,IAAAD,IAAA,IAAAiF,mBAAA,2BAAA1E,QAAA,4CAAAN,UAAA,IAAAD,IAAA,IAAAiF,mBAAA,2BAAA/E,OAAA,cAAAC,OAAA,IAAAC,UAAA,IAAAC,WAAA,IAAAC,OAAA,IAAAC,QAAA,uCAAAS,gBAAA,wBAAAG,eAAA,uBAAAG,sBAAA,8BAAAC,wBAAA,iCAAAC,wBAAA,gCAAAC,0BAAA,mCAAAG,yBAAA,kCAAAF,gBAAA,uBAAAoB,YAAA,oBAAAa,kBAAA,+BAAA1D,UAAA,IAAAD,IAAA,IAAAkF,OAAA,cAAA3E,QAAA,+BAAAN,UAAA,IAAAD,IAAA,IAAAE,OAAA,cAAAC,OAAA,IAAAC,UAAA,IAAAC,WAAA,IAAAC,OAAA,IAAAC,QAAA,IAAAC,OAAA,IAAAC,UAAA,SAAAb,EAC9D,G"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++){if(s||!(n in e)){if(!s)s=Array.prototype.slice.call(e,0,n);s[n]=e[n]}}return t.concat(s||Array.prototype.slice.call(e))};System.register(["./p-d2c035bc.system.js","./p-10ee2e5e.system.js"],(function(t){"use strict";var e,i,n,r;return{setters:[function(t){e=t.r;i=t.h;n=t.H},function(t){r=t.s}],execute:function(){var s=t("grw_touristic_event_card_provider",function(){function t(t){e(this,t);this.controller=new AbortController;this.signal=this.controller.signal;this.init={cache:"default",signal:this.signal};this.languages="fr";this.api=undefined;this.touristicEventId=undefined;this.portals=undefined}t.prototype.connectedCallback=function(){if(!r.api){r.api=this.api;r.languages=this.languages.split(",");r.language=r.languages[0]}this.handleTouristicEvent()};t.prototype.handleTouristicEvent=function(){var t=[];t.push(!r.cities?fetch("".concat(r.api,"city/?language=").concat(r.language,"&fields=id,name&published=true&page_size=999"),this.init):new Response("null"));t.push(!r.touristicEventTypes?fetch("".concat(r.api,"touristicevent_type/?language=").concat(r.language).concat(this.portals?"&portals=".concat(this.portals):"","&published=true&fields=id,type,pictogram&page_size=999"),this.init):new Response("null"));Promise.all(__spreadArray(__spreadArray([],t,true),[fetch("".concat(r.api,"touristicevent/").concat(this.touristicEventId,"/?language=").concat(r.language,"&fields=id,name,attachments,description,description_teaser,type,geometry,cities,pdf,practical_info,contact,email,website&published=true"),this.init)],false)).then((function(t){return Promise.all(t.map((function(t){return t.json()})))})).then((function(t){var e=t[0],i=t[1],n=t[2];r.trekNetworkError=false;if(e){r.cities=e.results}if(i){r.touristicEventTypes=i.results}r.currentTouristicEvent=n})).catch((function(){r.trekNetworkError=true}))};t.prototype.disconnectedCallback=function(){this.controller.abort();r.trekNetworkError=false};t.prototype.render=function(){return i(n,null)};return t}())}}}));
|
|
2
|
+
//# sourceMappingURL=p-ea78e5f0.system.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GrwTouristicEventProvider","exports","this","controller","AbortController","signal","init","cache","class_1","prototype","connectedCallback","state","api","languages","split","language","handleTouristicEvent","requests","push","cities","fetch","concat","Response","touristicEventTypes","portals","Promise","all","__spreadArray","touristicEventId","then","responses","map","response","json","_a","touristicEvent","trekNetworkError","results","currentTouristicEvent","catch","disconnectedCallback","abort","render","h","Host"],"sources":["src/store/grw-touristic-event-provider.tsx"],"sourcesContent":["import { Build, Component, h, Host, Prop } from '@stencil/core';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-touristic-event-card-provider',\n shadow: true,\n})\nexport class GrwTouristicEventProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() touristicEventId: string;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: Build.isDev ? 'force-cache' : 'default', signal: this.signal };\n\n connectedCallback() {\n if (!state.api) {\n state.api = this.api;\n state.languages = this.languages.split(',');\n state.language = state.languages[0];\n }\n this.handleTouristicEvent();\n }\n\n handleTouristicEvent() {\n const requests = [];\n requests.push(!state.cities ? fetch(`${state.api}city/?language=${state.language}&fields=id,name&published=true&page_size=999`, this.init) : new Response('null'));\n requests.push(\n !state.touristicEventTypes\n ? fetch(\n `${state.api}touristicevent_type/?language=${state.language}${\n this.portals ? '&portals='.concat(this.portals) : ''\n }&published=true&fields=id,type,pictogram&page_size=999`,\n this.init,\n )\n : new Response('null'),\n );\n\n Promise.all([\n ...requests,\n fetch(\n `${state.api}touristicevent/${this.touristicEventId}/?language=${state.language}&fields=id,name,attachments,description,description_teaser,type,geometry,cities,pdf,practical_info,contact,email,website&published=true`,\n this.init,\n ),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([cities, touristicEventTypes, touristicEvent]) => {\n state.trekNetworkError = false;\n\n if (cities) {\n state.cities = cities.results;\n }\n if (touristicEventTypes) {\n state.touristicEventTypes = touristicEventTypes.results;\n }\n state.currentTouristicEvent = touristicEvent;\n })\n .catch(() => {\n state.trekNetworkError = true;\n });\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.trekNetworkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"],"mappings":"sbAOaA,EAAyBC,EAAA,+C,wBAMpCC,KAAAC,WAAa,IAAIC,gBACjBF,KAAAG,OAASH,KAAKC,WAAWE,OACzBH,KAAAI,KAAoB,CAAEC,MAAqC,UAAWF,OAAQH,KAAKG,Q,eAP/D,K,0EASpBG,EAAAC,UAAAC,kBAAA,WACE,IAAKC,EAAMC,IAAK,CACdD,EAAMC,IAAMV,KAAKU,IACjBD,EAAME,UAAYX,KAAKW,UAAUC,MAAM,KACvCH,EAAMI,S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|
82
82
|
handleLayerVisibility(visible: boolean, layer: L.GeoJSON): void;
|
|
83
|
-
addTreks(): void;
|
|
83
|
+
addTreks(resetBounds?: boolean): void;
|
|
84
84
|
removeTreks(): void;
|
|
85
85
|
handleTreksWithinBounds(): void;
|
|
86
86
|
handleTouristicContentsWithinBounds(): void;
|
|
@@ -96,7 +96,7 @@ export declare class GrwMap {
|
|
|
96
96
|
hideTrekLine(): void;
|
|
97
97
|
addTouristicContent(): void;
|
|
98
98
|
removeTouristicContent(): void;
|
|
99
|
-
addTouristicContents(): void;
|
|
99
|
+
addTouristicContents(resetBounds?: boolean): void;
|
|
100
100
|
removeTouristicContents(): void;
|
|
101
101
|
addTouristicEvent(): void;
|
|
102
102
|
removeTouristicEvent(): void;
|