@geotrekce/geotrek-rando-widget 0.0.2 → 0.0.3
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/{grw-app_7.cjs.entry.js → grw-app_10.cjs.entry.js} +275 -47
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/grw-app/grw-app.css +1 -0
- package/dist/collection/components/grw-app/grw-app.js +82 -6
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +30 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +53 -0
- package/dist/collection/components/grw-map/grw-map.css +81 -0
- package/dist/collection/components/grw-map/grw-map.js +255 -31
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +30 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +41 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +16 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +38 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +3 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +4 -4
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +35 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +40 -6
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +1 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +2 -2
- package/dist/collection/store/grw-trek-provider.js +11 -5
- package/dist/collection/store/grw-treks-provider.js +3 -3
- package/dist/collection/store/store.js +3 -0
- package/dist/collection/stories/App.js +14 -6
- package/dist/collection/stories/App.stories.js +10 -6
- package/dist/collection/stories/TrekCard.js +2 -1
- package/dist/collection/stories/TrekCard.stories.js +4 -3
- package/dist/collection/stories/TrekDetail.js +3 -1
- package/dist/collection/stories/TrekDetail.stories.js +5 -3
- package/dist/collection/stories/TrekMap.js +6 -4
- package/dist/collection/stories/TrekMap.stories.js +7 -5
- package/dist/collection/stories/TreksList.js +2 -1
- package/dist/collection/stories/TreksList.stories.js +4 -3
- package/dist/collection/stories/TreksMap.stories.js +3 -3
- package/dist/collection/utils/utils.js +2 -2
- package/dist/components/grw-app.js +31 -5
- package/dist/components/grw-information-desk-detail.d.ts +11 -0
- package/dist/components/grw-information-desk-detail.js +6 -0
- package/dist/components/grw-information-desk-detail2.js +34 -0
- package/dist/components/grw-map2.js +203 -28
- package/dist/components/grw-poi-detail.d.ts +11 -0
- package/dist/components/grw-poi-detail.js +6 -0
- package/dist/components/grw-poi-detail2.js +32 -0
- package/dist/components/grw-sensitive-area-detail.d.ts +11 -0
- package/dist/components/grw-sensitive-area-detail.js +6 -0
- package/dist/components/grw-sensitive-area-detail2.js +32 -0
- package/dist/components/grw-trek-card2.js +3 -3
- package/dist/components/grw-trek-detail2.js +25 -5
- package/dist/components/grw-trek-provider2.js +11 -5
- package/dist/components/grw-treks-list2.js +2 -2
- package/dist/components/grw-treks-provider2.js +3 -3
- package/dist/components/length.js +2 -2
- package/dist/components/store.js +3 -0
- package/dist/esm/geotrek-rando-widget.js +1 -1
- package/dist/esm/{grw-app_7.entry.js → grw-app_10.entry.js} +273 -48
- package/dist/esm/loader.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-73bc92fe.entry.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +4 -0
- package/dist/types/components/grw-information-desk-detail/grw-information-desk-detail.d.ts +5 -0
- package/dist/types/components/grw-map/grw-map.d.ts +13 -4
- package/dist/types/components/grw-poi-detail/grw-poi-detail.d.ts +5 -0
- package/dist/types/components/grw-sensitive-area-detail/grw-sensitive-area-detail.d.ts +5 -0
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +1 -0
- package/dist/types/components.d.ts +65 -1
- package/dist/types/store/store.d.ts +7 -1
- package/dist/types/types/types.d.ts +46 -3
- package/package.json +5 -7
- package/readme.md +20 -1
- package/dist/geotrek-rando-widget/p-b7c66d2d.entry.js +0 -1
|
@@ -194,12 +194,15 @@ const { state, onChange } = createStore({
|
|
|
194
194
|
difficulties: [],
|
|
195
195
|
routes: [],
|
|
196
196
|
practices: [],
|
|
197
|
+
currentSensitiveAreas: null,
|
|
198
|
+
currentPois: null,
|
|
197
199
|
currentTrek: null,
|
|
200
|
+
currentInformationDesks: null,
|
|
198
201
|
});
|
|
199
202
|
|
|
200
203
|
const arrowBackImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>`;
|
|
201
204
|
|
|
202
|
-
const grwAppCss = ".app-container{position:relative;height:100%;max-height:100vh}.header-container,.large-view-header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title,.large-view-header-container .title{color:#ffffff;margin-left:24px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.loader-container,.large-view-loader-container{display:flex;justify-content:center;align-items:center;height:100%}.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.content-container{position:relative;display:flex;height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.loader-container{position:absolute;width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.large-view-loader-container{position:relative;width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}";
|
|
205
|
+
const grwAppCss = ".app-container{position:relative;height:100%;max-height:100vh;font-family:\"Roboto\"}.header-container,.large-view-header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title,.large-view-header-container .title{color:#ffffff;margin-left:24px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.loader-container,.large-view-loader-container{display:flex;justify-content:center;align-items:center;height:100%}.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.content-container{position:relative;display:flex;height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.loader-container{position:absolute;width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.large-view-loader-container{position:relative;width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}";
|
|
203
206
|
|
|
204
207
|
const GrwApp = class {
|
|
205
208
|
constructor(hostRef) {
|
|
@@ -207,12 +210,16 @@ const GrwApp = class {
|
|
|
207
210
|
this.showTrek = false;
|
|
208
211
|
this.showMap = false;
|
|
209
212
|
this.isLargeView = false;
|
|
213
|
+
this.language = 'fr';
|
|
210
214
|
this.appName = 'Geotrek Rando Widget';
|
|
211
215
|
this.colorPrimary = '#6b0030';
|
|
212
|
-
this.
|
|
216
|
+
this.colorPrimaryShade = '#4a0021';
|
|
217
|
+
this.colorPrimaryTint = '#974c6e';
|
|
213
218
|
this.colorTrekLine = '#6b0030';
|
|
214
219
|
this.colorDepartureIcon = '#006b3b';
|
|
215
220
|
this.colorArrivalIcon = '#85003b';
|
|
221
|
+
this.colorSensitiveArea = '#4974a5';
|
|
222
|
+
this.colorPoiIcon = '#974c6e';
|
|
216
223
|
this.largeViewSize = 664;
|
|
217
224
|
}
|
|
218
225
|
onTrekCardPress(event) {
|
|
@@ -237,7 +244,7 @@ const GrwApp = class {
|
|
|
237
244
|
this.showMap = this.isLargeView;
|
|
238
245
|
}
|
|
239
246
|
render() {
|
|
240
|
-
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, index.h("grw-treks-provider", { api: this.api, "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 && index.h("grw-trek-provider", { api: state.api, "trek-id": this.currentTrekId }), index.h("div", { class: "app-container" }, index.h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, this.showTrek ? index.h("div", { onClick: () => this.onTrekDetailsClose(), class: "arrow-back-icon", innerHTML: arrowBackImage }) : index.h("div", { class: "title" }, this.appName)), index.h("div", { class: "content-container" }, index.h("div", { class: this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container', style: { display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' } }, index.h("grw-treks-list", { "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint })), this.showTrek && !state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-loader-container' : 'loader-container' }, index.h("span", { class: "loader" }))), state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container' }, index.h("grw-trek-detail", { "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint }))), index.h("grw-map", { class: this.isLargeView ? 'large-view-app-map-container' : 'app-map-container', style: { visibility: this.showMap ? 'visible' : 'hidden' }, "url-layer": this.urlLayer, center: this.center, zoom: this.zoom, attribution: this.attribution, "color-trek-line": this.colorTrekLine, "color-departure-icon": this.colorDepartureIcon, "color-arrival-icon": this.colorArrivalIcon })), index.h("div", { class: "map-visibility-button", style: { display: this.isLargeView ? 'none' : 'flex' } }, index.h("div", { onClick: () => (this.showMap = !this.showMap) }, this.showMap ? (this.showTrek ? 'Voir la fiche' : 'Voir la liste') : 'Voir la carte')))));
|
|
247
|
+
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, index.h("grw-treks-provider", { api: this.api, language: this.language, "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 && index.h("grw-trek-provider", { api: state.api, language: this.language, "trek-id": this.currentTrekId }), index.h("div", { class: "app-container" }, index.h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, this.showTrek ? index.h("div", { onClick: () => this.onTrekDetailsClose(), class: "arrow-back-icon", innerHTML: arrowBackImage }) : index.h("div", { class: "title" }, this.appName)), index.h("div", { class: "content-container" }, index.h("div", { class: this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container', style: { display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' } }, index.h("grw-treks-list", { "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint })), this.showTrek && !state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-loader-container' : 'loader-container' }, index.h("span", { class: "loader" }))), state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container' }, index.h("grw-trek-detail", { "color-primary": this.colorPrimary, "color-primary-shade": this.colorPrimaryShade, "color-primary-tint": this.colorPrimaryTint }))), index.h("grw-map", { class: this.isLargeView ? 'large-view-app-map-container' : 'app-map-container', style: { visibility: this.showMap ? 'visible' : 'hidden' }, "url-layer": this.urlLayer, center: this.center, zoom: this.zoom, attribution: this.attribution, "color-trek-line": this.colorTrekLine, "color-departure-icon": this.colorDepartureIcon, "color-arrival-icon": this.colorArrivalIcon, "color-sensitive-area": this.colorSensitiveArea, "color-poi-icon": this.colorPoiIcon })), index.h("div", { class: "map-visibility-button", style: { display: this.isLargeView ? 'none' : 'flex' } }, index.h("div", { onClick: () => (this.showMap = !this.showMap) }, this.showMap ? (this.showTrek ? 'Voir la fiche' : 'Voir la liste') : 'Voir la carte')))));
|
|
241
248
|
}
|
|
242
249
|
get element() { return index.getElement(this); }
|
|
243
250
|
static get watchers() { return {
|
|
@@ -246,6 +253,20 @@ const GrwApp = class {
|
|
|
246
253
|
};
|
|
247
254
|
GrwApp.style = grwAppCss;
|
|
248
255
|
|
|
256
|
+
const grwInformationDeskDetailCss = ":host{display:flex;flex-direction:column;padding:0px 8px 8px 8px}.information-desk-img{width:180px}.information-desk-img img{width:180px;border-radius:8px}.information-desk-right-container{display:flex;flex-direction:column;padding:8px}.information-desk-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:0px 0px 8px 0px}.information-desk-description{font-size:16px}";
|
|
257
|
+
|
|
258
|
+
const GrwInformationDeskDetail = class {
|
|
259
|
+
constructor(hostRef) {
|
|
260
|
+
index.registerInstance(this, hostRef);
|
|
261
|
+
}
|
|
262
|
+
render() {
|
|
263
|
+
return (index.h(index.Host, null, this.informationDesk.photo_url && (index.h("div", { class: "information-desk-img" }, index.h("img", { src: this.informationDesk.photo_url, loading: "lazy" }))), index.h("div", { class: "information-desk-right-container" }, this.informationDesk.name && index.h("div", { class: "information-desk-name" }, this.informationDesk.name), this.informationDesk.description && index.h("div", { class: "information-desk-description", innerHTML: this.informationDesk.description }), this.informationDesk.postal_code ||
|
|
264
|
+
this.informationDesk.municipality ||
|
|
265
|
+
(this.informationDesk.street && (index.h("div", null, this.informationDesk.postal_code, ` ${this.informationDesk.municipality}`, ` ${this.informationDesk.street}`))), this.informationDesk.phone && (index.h("div", null, index.h("a", { href: `tel:${this.informationDesk.phone}` }, this.informationDesk.phone))), this.informationDesk.email && (index.h("div", null, index.h("a", { href: `mailto:${this.informationDesk.email}` }, this.informationDesk.email))), this.informationDesk.website && (index.h("div", null, index.h("a", { href: `${this.informationDesk.website}` }, this.informationDesk.website))))));
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
GrwInformationDeskDetail.style = grwInformationDeskDetailCss;
|
|
269
|
+
|
|
249
270
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
250
271
|
|
|
251
272
|
function createCommonjsModule(fn, basedir, module) {
|
|
@@ -14387,25 +14408,29 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
|
|
|
14387
14408
|
|
|
14388
14409
|
const departureArrivalImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>`;
|
|
14389
14410
|
|
|
14390
|
-
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
14411
|
+
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}";
|
|
14391
14412
|
|
|
14392
14413
|
const GrwMap = class {
|
|
14393
14414
|
constructor(hostRef) {
|
|
14394
14415
|
index.registerInstance(this, hostRef);
|
|
14416
|
+
this.trekCardPress = index.createEvent(this, "trekCardPress", 7);
|
|
14395
14417
|
this.mapIsReady = false;
|
|
14396
14418
|
this.center = '1, 1';
|
|
14397
14419
|
this.zoom = 10;
|
|
14420
|
+
this.colorPrimary = '#6b0030';
|
|
14421
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14398
14422
|
this.colorTrekLine = '#6b0030';
|
|
14399
14423
|
this.colorDepartureIcon = '#006b3b';
|
|
14400
14424
|
this.colorArrivalIcon = '#85003b';
|
|
14401
|
-
this.
|
|
14402
|
-
this.
|
|
14425
|
+
this.colorSensitiveArea = ' #4974a5';
|
|
14426
|
+
this.colorPoiIcon = '#974c6e';
|
|
14403
14427
|
}
|
|
14404
14428
|
componentDidLoad() {
|
|
14405
14429
|
this.map = leafletSrc.map(this.element, {
|
|
14406
14430
|
center: this.center.split(',').map(Number),
|
|
14407
14431
|
zoom: this.zoom,
|
|
14408
14432
|
});
|
|
14433
|
+
leafletSrc.control.scale().addTo(this.map);
|
|
14409
14434
|
leafletSrc.tileLayer(this.urlLayer, {
|
|
14410
14435
|
maxZoom: 19,
|
|
14411
14436
|
attribution: this.attribution,
|
|
@@ -14437,33 +14462,56 @@ const GrwMap = class {
|
|
|
14437
14462
|
}
|
|
14438
14463
|
addTreks() {
|
|
14439
14464
|
var _a;
|
|
14440
|
-
const
|
|
14465
|
+
const trekscurrentDepartureCoordinates = [];
|
|
14441
14466
|
const treksFeatureCollection = {
|
|
14442
14467
|
type: 'FeatureCollection',
|
|
14443
14468
|
features: [],
|
|
14444
14469
|
};
|
|
14445
14470
|
for (const trek of state.treks) {
|
|
14446
|
-
|
|
14471
|
+
trekscurrentDepartureCoordinates.push(trek.departure_geom);
|
|
14447
14472
|
treksFeatureCollection.features.push({
|
|
14448
14473
|
type: 'Feature',
|
|
14449
|
-
properties: { practice: (_a = state.practices.find(practice => practice.id === trek.practice)) === null || _a === void 0 ? void 0 : _a.pictogram },
|
|
14450
14474
|
geometry: { type: 'Point', coordinates: trek.departure_geom },
|
|
14475
|
+
properties: {
|
|
14476
|
+
id: trek.id,
|
|
14477
|
+
name: trek.name,
|
|
14478
|
+
practice: (_a = state.practices.find(practice => practice.id === trek.practice)) === null || _a === void 0 ? void 0 : _a.pictogram,
|
|
14479
|
+
imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].url,
|
|
14480
|
+
},
|
|
14451
14481
|
});
|
|
14452
14482
|
}
|
|
14453
|
-
if (
|
|
14454
|
-
const bounds = leafletSrc.latLngBounds(
|
|
14483
|
+
if (trekscurrentDepartureCoordinates.length > 0) {
|
|
14484
|
+
const bounds = leafletSrc.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14455
14485
|
this.currentBounds = bounds;
|
|
14456
14486
|
this.map.fitBounds(this.currentBounds);
|
|
14457
14487
|
}
|
|
14458
14488
|
this.treksLayer = leafletSrc.geoJSON(treksFeatureCollection, {
|
|
14459
14489
|
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14460
14490
|
icon: leafletSrc.divIcon({
|
|
14491
|
+
html: geoJsonPoint.properties.practice && `<img src=${geoJsonPoint.properties.practice} />`,
|
|
14461
14492
|
className: 'trek-marker',
|
|
14462
14493
|
iconSize: 48,
|
|
14463
|
-
html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : '',
|
|
14464
14494
|
}),
|
|
14465
14495
|
autoPanOnFocus: false,
|
|
14466
14496
|
}),
|
|
14497
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14498
|
+
layer.once('click', () => {
|
|
14499
|
+
const trekDeparturePopup = leafletSrc.DomUtil.create('div');
|
|
14500
|
+
trekDeparturePopup.className = 'trek-departure-popup';
|
|
14501
|
+
trekDeparturePopup.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);
|
|
14502
|
+
const trekName = leafletSrc.DomUtil.create('div');
|
|
14503
|
+
trekName.innerHTML = geoJsonPoint.properties.name;
|
|
14504
|
+
trekName.className = 'trek-name';
|
|
14505
|
+
if (geoJsonPoint.properties.imgSrc) {
|
|
14506
|
+
trekName.className += ' trek-name-margin-top';
|
|
14507
|
+
const trekImg = leafletSrc.DomUtil.create('img');
|
|
14508
|
+
trekImg.src = geoJsonPoint.properties.imgSrc;
|
|
14509
|
+
trekDeparturePopup.appendChild(trekImg);
|
|
14510
|
+
}
|
|
14511
|
+
trekDeparturePopup.appendChild(trekName);
|
|
14512
|
+
layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false }).openPopup();
|
|
14513
|
+
});
|
|
14514
|
+
},
|
|
14467
14515
|
}).addTo(this.map);
|
|
14468
14516
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14469
14517
|
}
|
|
@@ -14474,39 +14522,40 @@ const GrwMap = class {
|
|
|
14474
14522
|
}
|
|
14475
14523
|
}
|
|
14476
14524
|
addTrek() {
|
|
14477
|
-
const
|
|
14525
|
+
const currentTrekFeature = {
|
|
14478
14526
|
type: 'Feature',
|
|
14479
14527
|
geometry: state.currentTrek.geometry,
|
|
14480
14528
|
properties: {},
|
|
14481
14529
|
};
|
|
14482
|
-
this.
|
|
14530
|
+
this.currentTrekLayer = leafletSrc.geoJSON(currentTrekFeature, {
|
|
14483
14531
|
style: () => ({
|
|
14484
14532
|
color: this.colorTrekLine,
|
|
14485
14533
|
}),
|
|
14534
|
+
interactive: false,
|
|
14486
14535
|
}).addTo(this.map);
|
|
14487
14536
|
const bounds = leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14488
14537
|
this.currentBounds = bounds;
|
|
14489
14538
|
this.map.fitBounds(this.currentBounds);
|
|
14490
|
-
const
|
|
14491
|
-
const
|
|
14492
|
-
const
|
|
14539
|
+
const currentDepartureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];
|
|
14540
|
+
const currentArrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];
|
|
14541
|
+
const currentDepartureArrivalFeatureCollection = {
|
|
14493
14542
|
type: 'FeatureCollection',
|
|
14494
14543
|
features: [
|
|
14495
14544
|
{
|
|
14496
14545
|
type: 'Feature',
|
|
14497
14546
|
properties: { type: 'departure' },
|
|
14498
|
-
geometry: { type: 'Point', coordinates:
|
|
14547
|
+
geometry: { type: 'Point', coordinates: currentDepartureCoordinates },
|
|
14499
14548
|
},
|
|
14500
14549
|
],
|
|
14501
14550
|
};
|
|
14502
|
-
if (
|
|
14503
|
-
|
|
14551
|
+
if (currentDepartureCoordinates[0] !== currentArrivalCoordinates[0] || currentDepartureCoordinates[1] !== currentArrivalCoordinates[1]) {
|
|
14552
|
+
currentDepartureArrivalFeatureCollection.features.push({
|
|
14504
14553
|
type: 'Feature',
|
|
14505
14554
|
properties: { type: 'arrival' },
|
|
14506
|
-
geometry: { type: 'Point', coordinates:
|
|
14555
|
+
geometry: { type: 'Point', coordinates: currentArrivalCoordinates },
|
|
14507
14556
|
});
|
|
14508
14557
|
}
|
|
14509
|
-
this.
|
|
14558
|
+
this.currentDepartureArrivalLayer = leafletSrc.geoJSON(currentDepartureArrivalFeatureCollection, {
|
|
14510
14559
|
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14511
14560
|
icon: leafletSrc.divIcon({
|
|
14512
14561
|
html: departureArrivalImage,
|
|
@@ -14515,18 +14564,162 @@ const GrwMap = class {
|
|
|
14515
14564
|
iconAnchor: [0, 48],
|
|
14516
14565
|
}),
|
|
14517
14566
|
autoPanOnFocus: false,
|
|
14567
|
+
interactive: false,
|
|
14518
14568
|
}),
|
|
14519
14569
|
}).addTo(this.map);
|
|
14570
|
+
if (state.currentTrek.parking_location) {
|
|
14571
|
+
const currentParking = {
|
|
14572
|
+
type: 'Feature',
|
|
14573
|
+
properties: {},
|
|
14574
|
+
geometry: { type: 'Point', coordinates: state.currentTrek.parking_location },
|
|
14575
|
+
};
|
|
14576
|
+
this.currentParkingLayer = leafletSrc.geoJSON(currentParking, {
|
|
14577
|
+
pointToLayer: (_geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14578
|
+
icon: leafletSrc.divIcon({
|
|
14579
|
+
html: '<div>P</div>',
|
|
14580
|
+
className: 'parking-icon',
|
|
14581
|
+
iconSize: 48,
|
|
14582
|
+
iconAnchor: [0, 48],
|
|
14583
|
+
}),
|
|
14584
|
+
autoPanOnFocus: false,
|
|
14585
|
+
interactive: false,
|
|
14586
|
+
}),
|
|
14587
|
+
}).addTo(this.map);
|
|
14588
|
+
}
|
|
14589
|
+
if (state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) {
|
|
14590
|
+
const currentSensitiveAreasFeatureCollection = {
|
|
14591
|
+
type: 'FeatureCollection',
|
|
14592
|
+
features: [],
|
|
14593
|
+
};
|
|
14594
|
+
for (const sensitiveArea of state.currentSensitiveAreas) {
|
|
14595
|
+
currentSensitiveAreasFeatureCollection.features.push({
|
|
14596
|
+
type: 'Feature',
|
|
14597
|
+
properties: {},
|
|
14598
|
+
geometry: sensitiveArea.geometry,
|
|
14599
|
+
});
|
|
14600
|
+
}
|
|
14601
|
+
this.currentSensitiveAreasLayer = leafletSrc.geoJSON(currentSensitiveAreasFeatureCollection, { style: () => ({ color: this.colorSensitiveArea }) }).addTo(this.map);
|
|
14602
|
+
leafletSrc.Control.SensitiveAreasCheckboxContainer = leafletSrc.Control.extend({
|
|
14603
|
+
onAdd: () => {
|
|
14604
|
+
const sensitiveAreasCheckboxContainer = leafletSrc.DomUtil.create('div');
|
|
14605
|
+
sensitiveAreasCheckboxContainer.className = 'sensitiveAreasCheckboxContainer';
|
|
14606
|
+
const sensitiveAreasCheckbox = leafletSrc.DomUtil.create('input');
|
|
14607
|
+
sensitiveAreasCheckbox.setAttribute('id', 'sensitiveAreasCheckbox');
|
|
14608
|
+
sensitiveAreasCheckbox.setAttribute('type', 'checkbox');
|
|
14609
|
+
sensitiveAreasCheckbox.setAttribute('checked', 'true');
|
|
14610
|
+
sensitiveAreasCheckbox.onclick = value => value.composedPath()[0].checked ? this.map.addLayer(this.currentSensitiveAreasLayer) : this.map.removeLayer(this.currentSensitiveAreasLayer);
|
|
14611
|
+
const sensitiveAreasLabel = leafletSrc.DomUtil.create('label');
|
|
14612
|
+
sensitiveAreasLabel.setAttribute('for', 'sensitiveAreasCheckbox');
|
|
14613
|
+
sensitiveAreasLabel.innerHTML =
|
|
14614
|
+
currentSensitiveAreasFeatureCollection.features.length > 1 || currentSensitiveAreasFeatureCollection.features[0].geometry.type === 'MultiPolygon'
|
|
14615
|
+
? 'Afficher les zones sensibles'
|
|
14616
|
+
: 'Afficher la zone sensible';
|
|
14617
|
+
sensitiveAreasCheckboxContainer.appendChild(sensitiveAreasCheckbox);
|
|
14618
|
+
sensitiveAreasCheckboxContainer.appendChild(sensitiveAreasLabel);
|
|
14619
|
+
return sensitiveAreasCheckboxContainer;
|
|
14620
|
+
},
|
|
14621
|
+
});
|
|
14622
|
+
leafletSrc.control.sensitiveAreasCheckboxContainer = () => {
|
|
14623
|
+
return new leafletSrc.Control.SensitiveAreasCheckboxContainer();
|
|
14624
|
+
};
|
|
14625
|
+
this.sensitiveAreasControl = leafletSrc.control.sensitiveAreasCheckboxContainer({ position: 'topright' }).addTo(this.map);
|
|
14626
|
+
}
|
|
14627
|
+
if (state.currentPois && state.currentPois.length > 0) {
|
|
14628
|
+
const currentPoisFeatureCollection = {
|
|
14629
|
+
type: 'FeatureCollection',
|
|
14630
|
+
features: [],
|
|
14631
|
+
};
|
|
14632
|
+
for (const currentPoi of state.currentPois) {
|
|
14633
|
+
currentPoisFeatureCollection.features.push({
|
|
14634
|
+
type: 'Feature',
|
|
14635
|
+
properties: { name: currentPoi.name, type_pictogram: currentPoi.type_pictogram },
|
|
14636
|
+
geometry: currentPoi.geometry,
|
|
14637
|
+
});
|
|
14638
|
+
}
|
|
14639
|
+
this.currentPoisLayer = leafletSrc.geoJSON(currentPoisFeatureCollection, {
|
|
14640
|
+
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14641
|
+
icon: leafletSrc.divIcon({
|
|
14642
|
+
html: geoJsonPoint.properties.type_pictogram && `<img src=${geoJsonPoint.properties.type_pictogram} />`,
|
|
14643
|
+
className: 'poi-icon',
|
|
14644
|
+
iconSize: 48,
|
|
14645
|
+
}),
|
|
14646
|
+
autoPanOnFocus: false,
|
|
14647
|
+
}),
|
|
14648
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14649
|
+
layer.once('mouseover', () => {
|
|
14650
|
+
const poiTooltip = leafletSrc.DomUtil.create('div');
|
|
14651
|
+
poiTooltip.className = 'poi-tooltip';
|
|
14652
|
+
const poiName = leafletSrc.DomUtil.create('div');
|
|
14653
|
+
poiName.innerHTML = geoJsonPoint.properties.name;
|
|
14654
|
+
poiName.className = 'poi-name';
|
|
14655
|
+
poiTooltip.appendChild(poiName);
|
|
14656
|
+
layer.bindTooltip(poiTooltip).openTooltip();
|
|
14657
|
+
});
|
|
14658
|
+
},
|
|
14659
|
+
}).addTo(this.map);
|
|
14660
|
+
}
|
|
14661
|
+
if (state.currentInformationDesks && state.currentInformationDesks.length > 0) {
|
|
14662
|
+
const currentInformationDesksFeatureCollection = {
|
|
14663
|
+
type: 'FeatureCollection',
|
|
14664
|
+
features: [],
|
|
14665
|
+
};
|
|
14666
|
+
for (const currentInformationDesk of state.currentInformationDesks) {
|
|
14667
|
+
currentInformationDesksFeatureCollection.features.push({
|
|
14668
|
+
type: 'Feature',
|
|
14669
|
+
properties: { name: currentInformationDesk.name, type_pictogram: currentInformationDesk.type.pictogram },
|
|
14670
|
+
geometry: { type: 'Point', coordinates: [Number(currentInformationDesk.longitude), Number(currentInformationDesk.latitude)] },
|
|
14671
|
+
});
|
|
14672
|
+
}
|
|
14673
|
+
this.currentInformationDesksLayer = leafletSrc.geoJSON(currentInformationDesksFeatureCollection, {
|
|
14674
|
+
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14675
|
+
icon: leafletSrc.divIcon({
|
|
14676
|
+
html: geoJsonPoint.properties.type_pictogram && `<img src=${geoJsonPoint.properties.type_pictogram} />`,
|
|
14677
|
+
className: 'information-desks-icon',
|
|
14678
|
+
iconSize: 48,
|
|
14679
|
+
}),
|
|
14680
|
+
autoPanOnFocus: false,
|
|
14681
|
+
}),
|
|
14682
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14683
|
+
layer.once('mouseover', () => {
|
|
14684
|
+
const informationDesksTooltip = leafletSrc.DomUtil.create('div');
|
|
14685
|
+
informationDesksTooltip.className = 'information-desks-tooltip';
|
|
14686
|
+
const informationDesksName = leafletSrc.DomUtil.create('div');
|
|
14687
|
+
informationDesksName.innerHTML = geoJsonPoint.properties.name;
|
|
14688
|
+
informationDesksName.className = 'information-desks-name';
|
|
14689
|
+
informationDesksTooltip.appendChild(informationDesksName);
|
|
14690
|
+
layer.bindTooltip(informationDesksTooltip).openTooltip();
|
|
14691
|
+
});
|
|
14692
|
+
},
|
|
14693
|
+
}).addTo(this.map);
|
|
14694
|
+
}
|
|
14520
14695
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14521
14696
|
}
|
|
14522
14697
|
removeTrek() {
|
|
14523
|
-
if (this.
|
|
14524
|
-
this.map.removeLayer(this.
|
|
14525
|
-
this.
|
|
14698
|
+
if (this.currentTrekLayer) {
|
|
14699
|
+
this.map.removeLayer(this.currentTrekLayer);
|
|
14700
|
+
this.currentTrekLayer = null;
|
|
14526
14701
|
}
|
|
14527
|
-
if (this.
|
|
14528
|
-
this.map.removeLayer(this.
|
|
14529
|
-
this.
|
|
14702
|
+
if (this.currentDepartureArrivalLayer) {
|
|
14703
|
+
this.map.removeLayer(this.currentDepartureArrivalLayer);
|
|
14704
|
+
this.currentDepartureArrivalLayer = null;
|
|
14705
|
+
}
|
|
14706
|
+
if (this.currentParkingLayer) {
|
|
14707
|
+
this.map.removeLayer(this.currentParkingLayer);
|
|
14708
|
+
this.currentParkingLayer = null;
|
|
14709
|
+
}
|
|
14710
|
+
if (this.currentSensitiveAreasLayer) {
|
|
14711
|
+
this.map.removeLayer(this.currentSensitiveAreasLayer);
|
|
14712
|
+
this.currentSensitiveAreasLayer = null;
|
|
14713
|
+
this.map.removeControl(this.sensitiveAreasControl);
|
|
14714
|
+
this.sensitiveAreasControl = null;
|
|
14715
|
+
}
|
|
14716
|
+
if (this.currentPoisLayer) {
|
|
14717
|
+
this.map.removeLayer(this.currentPoisLayer);
|
|
14718
|
+
this.currentPoisLayer = null;
|
|
14719
|
+
}
|
|
14720
|
+
if (this.currentInformationDesksLayer) {
|
|
14721
|
+
this.map.removeLayer(this.currentInformationDesksLayer);
|
|
14722
|
+
this.currentInformationDesksLayer = null;
|
|
14530
14723
|
}
|
|
14531
14724
|
}
|
|
14532
14725
|
render() {
|
|
@@ -14535,12 +14728,37 @@ const GrwMap = class {
|
|
|
14535
14728
|
'--color-primary-tint': this.colorPrimaryTint,
|
|
14536
14729
|
'--color-departure-icon': this.colorDepartureIcon,
|
|
14537
14730
|
'--color-arrival-icon': this.colorArrivalIcon,
|
|
14731
|
+
'--color-poi-icon': this.colorPoiIcon,
|
|
14538
14732
|
} }, !this.mapIsReady && (index.h("div", { class: "map-loader-container" }, index.h("span", { class: "loader" })))));
|
|
14539
14733
|
}
|
|
14540
14734
|
get element() { return index.getElement(this); }
|
|
14541
14735
|
};
|
|
14542
14736
|
GrwMap.style = grwMapCss;
|
|
14543
14737
|
|
|
14738
|
+
const grwPoiDetailCss = ":host{display:flex;flex-direction:column;padding:0px 8px 8px 8px}.poi-img{width:180px}.poi-img img{width:180px;border-radius:8px}.poi-right-container{display:flex;flex-direction:column;padding:8px}.poi-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:0px 0px 8px 0px}.poi-description{font-size:16px}";
|
|
14739
|
+
|
|
14740
|
+
const GrwPoiDetail = class {
|
|
14741
|
+
constructor(hostRef) {
|
|
14742
|
+
index.registerInstance(this, hostRef);
|
|
14743
|
+
}
|
|
14744
|
+
render() {
|
|
14745
|
+
return (index.h(index.Host, null, this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].thumbnail && (index.h("div", { class: "poi-img" }, index.h("img", { src: this.poi.attachments[0].thumbnail, loading: "lazy" }))), index.h("div", { class: "poi-right-container" }, index.h("div", { class: "poi-name" }, this.poi.name), index.h("div", { class: "poi-description", innerHTML: this.poi.description }))));
|
|
14746
|
+
}
|
|
14747
|
+
};
|
|
14748
|
+
GrwPoiDetail.style = grwPoiDetailCss;
|
|
14749
|
+
|
|
14750
|
+
const grwSensitiveAreaDetailCss = ":host{display:flex;flex-direction:column;padding:0px 8px 8px 8px}.sensitive-area-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:0px 0px 8px 0px}.sensitive-area-description{font-size:16px}";
|
|
14751
|
+
|
|
14752
|
+
const GrwSensitiveAreaDetail = class {
|
|
14753
|
+
constructor(hostRef) {
|
|
14754
|
+
index.registerInstance(this, hostRef);
|
|
14755
|
+
}
|
|
14756
|
+
render() {
|
|
14757
|
+
return (index.h(index.Host, null, index.h("div", { class: "sensitive-area-name" }, this.sensitiveArea.name), index.h("div", { class: "sensitive-area-description", innerHTML: this.sensitiveArea.description })));
|
|
14758
|
+
}
|
|
14759
|
+
};
|
|
14760
|
+
GrwSensitiveAreaDetail.style = grwSensitiveAreaDetailCss;
|
|
14761
|
+
|
|
14544
14762
|
function formatDuration(duration) {
|
|
14545
14763
|
let formattedDuration;
|
|
14546
14764
|
if (duration < 24) {
|
|
@@ -14555,10 +14773,10 @@ function formatDuration(duration) {
|
|
|
14555
14773
|
return formattedDuration;
|
|
14556
14774
|
}
|
|
14557
14775
|
function formatLength(length) {
|
|
14558
|
-
return `${Math.round(length / 1000)}
|
|
14776
|
+
return `${Math.round(length / 1000)}km`;
|
|
14559
14777
|
}
|
|
14560
14778
|
function formatAscent(ascent) {
|
|
14561
|
-
return `${ascent}
|
|
14779
|
+
return `${ascent}m`;
|
|
14562
14780
|
}
|
|
14563
14781
|
|
|
14564
14782
|
const ascentImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="352 144 464 144 464 256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M48,368,169.37,246.63a32,32,0,0,1,45.26,0l50.74,50.74a32,32,0,0,0,45.26,0L448,160" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>`;
|
|
@@ -14567,14 +14785,14 @@ const durationImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" heigh
|
|
|
14567
14785
|
|
|
14568
14786
|
const lengthImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="304 96 416 96 416 208" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="405.77" y1="106.2" x2="111.98" y2="400.02" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><polyline points="208 416 96 416 96 304" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>`;
|
|
14569
14787
|
|
|
14570
|
-
const grwTrekCardCss = ".trek-card-container{width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{width:100%;height:auto}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";
|
|
14788
|
+
const grwTrekCardCss = ".trek-card-container{font-family:\"Roboto\";width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{border-radius:8px 8px 0px 0px;width:100%;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";
|
|
14571
14789
|
|
|
14572
14790
|
const GrwTrekCard = class {
|
|
14573
14791
|
constructor(hostRef) {
|
|
14574
14792
|
index.registerInstance(this, hostRef);
|
|
14575
14793
|
this.trekCardPress = index.createEvent(this, "trekCardPress", 7);
|
|
14576
14794
|
this.colorPrimary = '#6b0030';
|
|
14577
|
-
this.colorPrimaryTint = '#
|
|
14795
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14578
14796
|
}
|
|
14579
14797
|
componentWillLoad() {
|
|
14580
14798
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
@@ -14594,7 +14812,7 @@ const GrwTrekCard = class {
|
|
|
14594
14812
|
}
|
|
14595
14813
|
render() {
|
|
14596
14814
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14597
|
-
return (index.h(index.Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id), style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-card-container" }, this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].
|
|
14815
|
+
return (index.h(index.Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id), style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-card-container" }, this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].thumbnail && (index.h("img", { class: "image", src: `${this.currentTrek.attachments[0].thumbnail}`, loading: "lazy" })), index.h("div", { class: "sub-container" }, index.h("div", { class: "name" }, (_a = this.currentTrek) === null || _a === void 0 ? void 0 : _a.name), index.h("div", { class: "description", innerHTML: (_b = this.currentTrek) === null || _b === void 0 ? void 0 : _b.description_teaser }), index.h("div", { class: "icons-labels-container" }, index.h("div", { class: "row" }, index.h("div", { class: "icon-label difficulty" }, ((_c = this.difficulty) === null || _c === void 0 ? void 0 : _c.pictogram) && index.h("img", { src: this.difficulty.pictogram }), (_d = this.difficulty) === null || _d === void 0 ? void 0 :
|
|
14598
14816
|
_d.label), index.h("div", { class: "icon-label duration" }, index.h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration(this.currentTrek.duration)), index.h("div", { class: "icon-label route" }, ((_e = this.route) === null || _e === void 0 ? void 0 : _e.pictogram) && index.h("img", { src: this.route.pictogram }), (_f = this.route) === null || _f === void 0 ? void 0 :
|
|
14599
14817
|
_f.route)), index.h("div", { class: "row" }, index.h("div", { class: "icon-label length" }, index.h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), index.h("div", { class: "icon-label ascent" }, index.h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), index.h("div", { class: "icon-label practice" }, ((_g = this.practice) === null || _g === void 0 ? void 0 : _g.pictogram) && index.h("img", { src: this.practice.pictogram }), (_h = this.practice) === null || _h === void 0 ? void 0 :
|
|
14600
14818
|
_h.name))))))));
|
|
@@ -14602,13 +14820,14 @@ const GrwTrekCard = class {
|
|
|
14602
14820
|
};
|
|
14603
14821
|
GrwTrekCard.style = grwTrekCardCss;
|
|
14604
14822
|
|
|
14605
|
-
const grwTrekDetailCss = ".trek-detail-container{display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .description{padding:0px 24px 24px 24px}";
|
|
14823
|
+
const grwTrekDetailCss = ".trek-detail-container{font-family:\"Roboto\";display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{border-radius:8px;align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .downloads-container{padding:0px 24px 24px 24px;display:flex;flex-direction:column;justify-content:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-primary);font-size:18px;margin-bottom:18px}.trek-detail-container .downloads-container .links-container a{background-color:var(--color-primary);padding:8px;color:#ffffff;text-decoration:none;border-radius:8px}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:0px 12px}.trek-detail-container .downloads-container .links-container a:hover{background-color:var(--color-primary-shade)}.trek-detail-container .description{padding:0px 24px 24px 24px}.trek-detail-container .pois-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title{color:var(--color-primary);font-size:36px;font-weight:bold;padding:16px}";
|
|
14606
14824
|
|
|
14607
14825
|
const GrwTrekDetail = class {
|
|
14608
14826
|
constructor(hostRef) {
|
|
14609
14827
|
index.registerInstance(this, hostRef);
|
|
14610
14828
|
this.colorPrimary = '#6b0030';
|
|
14611
|
-
this.
|
|
14829
|
+
this.colorPrimaryShade = '#4a0021';
|
|
14830
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14612
14831
|
}
|
|
14613
14832
|
componentWillLoad() {
|
|
14614
14833
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
@@ -14628,10 +14847,10 @@ const GrwTrekDetail = class {
|
|
|
14628
14847
|
}
|
|
14629
14848
|
render() {
|
|
14630
14849
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
14631
|
-
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-detail-container" }, index.h("div", { class: "name" }, this.currentTrek.name), this.currentTrek.attachments && this.currentTrek.attachments[0] && index.h("img", { class: "image", src: this.currentTrek.attachments[0].
|
|
14850
|
+
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-shade': this.colorPrimaryShade, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-detail-container" }, index.h("div", { class: "name" }, this.currentTrek.name), this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].thumbnail && (index.h("img", { class: "image", src: this.currentTrek.attachments[0].thumbnail, loading: "lazy" })), index.h("div", { class: "sub-container" }, index.h("div", { class: "icons-labels-container" }, index.h("div", { class: "row" }, index.h("div", { class: "icon-label difficulty" }, ((_a = this.difficulty) === null || _a === void 0 ? void 0 : _a.pictogram) && index.h("img", { src: this.difficulty.pictogram }), (_b = this.difficulty) === null || _b === void 0 ? void 0 :
|
|
14632
14851
|
_b.label), index.h("div", { class: "icon-label duration" }, index.h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration((_c = this.currentTrek) === null || _c === void 0 ? void 0 : _c.duration)), index.h("div", { class: "icon-label route" }, ((_d = this.route) === null || _d === void 0 ? void 0 : _d.pictogram) && index.h("img", { src: this.route.pictogram }), (_e = this.route) === null || _e === void 0 ? void 0 :
|
|
14633
14852
|
_e.route)), index.h("div", { class: "row" }, index.h("div", { class: "icon-label length" }, index.h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), index.h("div", { class: "icon-label ascent" }, index.h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), index.h("div", { class: "icon-label practice" }, ((_f = this.practice) === null || _f === void 0 ? void 0 : _f.pictogram) && index.h("img", { src: this.practice.pictogram }), (_g = this.practice) === null || _g === void 0 ? void 0 :
|
|
14634
|
-
_g.name)))), index.h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser })))));
|
|
14853
|
+
_g.name)))), index.h("div", { class: "downloads-container" }, index.h("div", { class: "download-title" }, "T\u00E9l\u00E9chargements"), index.h("div", { class: "links-container" }, index.h("a", { href: `${this.currentTrek.gpx}` }, "GPX"), index.h("a", { href: `${this.currentTrek.kml}` }, "KML"), index.h("a", { href: `${this.currentTrek.pdf}` }, "PDF"))), index.h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser }), state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0 && (index.h("div", { class: "sensitive-areas-container" }, index.h("div", { class: "sensitive-areas-title" }, "Zones sensibles"), state.currentSensitiveAreas.map(sensitiveArea => (index.h("grw-sensitive-area-detail", { sensitiveArea: sensitiveArea }))))), state.currentInformationDesks && state.currentInformationDesks.length > 0 && (index.h("div", { class: "information-desks-container" }, index.h("div", { class: "information-desks-title" }, "Lieux de renseignement"), state.currentInformationDesks.map(informationDesk => (index.h("grw-information-desk-detail", { informationDesk: informationDesk }))))), state.currentPois && state.currentPois.length > 0 && (index.h("div", { class: "pois-container" }, index.h("div", { class: "pois-title" }, "Points d'int\u00E9r\u00EAts"), state.currentPois.map(poi => (index.h("grw-poi-detail", { poi: poi })))))))));
|
|
14635
14854
|
}
|
|
14636
14855
|
};
|
|
14637
14856
|
GrwTrekDetail.style = grwTrekDetailCss;
|
|
@@ -14644,16 +14863,22 @@ const GrwTrekProvider = class {
|
|
|
14644
14863
|
componentWillLoad() {
|
|
14645
14864
|
state.api = this.api;
|
|
14646
14865
|
return Promise.all([
|
|
14647
|
-
fetch(`${this.api}trek_difficulty/?language=${this.language}`),
|
|
14648
|
-
fetch(`${this.api}trek_route/?language=${this.language}`),
|
|
14649
|
-
fetch(`${this.api}trek_practice/?language=${this.language}`),
|
|
14650
|
-
fetch(`${this.api}
|
|
14866
|
+
fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`),
|
|
14867
|
+
fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`),
|
|
14868
|
+
fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`),
|
|
14869
|
+
fetch(`${this.api}sensitivearea/?language=${this.language}&trek=${this.trekId}&fields=id,geometry,name,description`).catch(() => new Response('[]')),
|
|
14870
|
+
fetch(`${this.api}poi/?language=${this.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,type_label,type_pictogram,url,published,geometry&page_size=999`),
|
|
14871
|
+
fetch(`${this.api}informationdesk/?language=${this.language}&near_trek=${this.trekId}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`),
|
|
14872
|
+
fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,route,geometry,gpx,kml,pdf,parking_location`),
|
|
14651
14873
|
])
|
|
14652
14874
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
14653
|
-
.then(([difficulties, routes, practices, trek]) => {
|
|
14875
|
+
.then(([difficulties, routes, practices, sensitiveAreas, pois, informationDesks, trek]) => {
|
|
14654
14876
|
state.difficulties = difficulties.results;
|
|
14655
14877
|
state.routes = routes.results;
|
|
14656
14878
|
state.practices = practices.results;
|
|
14879
|
+
state.currentSensitiveAreas = sensitiveAreas.results;
|
|
14880
|
+
state.currentPois = pois.results;
|
|
14881
|
+
state.currentInformationDesks = informationDesks.results;
|
|
14657
14882
|
state.currentTrek = trek;
|
|
14658
14883
|
});
|
|
14659
14884
|
}
|
|
@@ -14665,14 +14890,14 @@ const GrwTrekProvider = class {
|
|
|
14665
14890
|
}
|
|
14666
14891
|
};
|
|
14667
14892
|
|
|
14668
|
-
const grwTreksListCss = ":host{display:flex;flex-wrap:wrap;justify-content:space-around;height:100%;max-height:100vh;overflow-y:auto}grw-trek-card{margin:6px}";
|
|
14893
|
+
const grwTreksListCss = ":host{font-family:\"Roboto\";display:flex;flex-wrap:wrap;justify-content:space-around;height:100%;max-height:100vh;overflow-y:auto}grw-trek-card{margin:6px}";
|
|
14669
14894
|
|
|
14670
14895
|
const GrwTreksList = class {
|
|
14671
14896
|
constructor(hostRef) {
|
|
14672
14897
|
index.registerInstance(this, hostRef);
|
|
14673
14898
|
this.treksToDisplay = [];
|
|
14674
14899
|
this.colorPrimary = '#6b0030';
|
|
14675
|
-
this.colorPrimaryTint = '#
|
|
14900
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14676
14901
|
this.handleInfiniteScrollBind = this.handleInfiniteScroll.bind(this);
|
|
14677
14902
|
this.step = 10;
|
|
14678
14903
|
}
|
|
@@ -14717,9 +14942,9 @@ const GrwTreksProvider = class {
|
|
|
14717
14942
|
this.practices && (treksRequest += `&practices=${this.practices}`);
|
|
14718
14943
|
treksRequest += `&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,route,departure_geom&page_size=999`;
|
|
14719
14944
|
return Promise.all([
|
|
14720
|
-
fetch(`${this.api}trek_difficulty/?language=${this.language}`),
|
|
14721
|
-
fetch(`${this.api}trek_route/?language=${this.language}`),
|
|
14722
|
-
fetch(`${this.api}trek_practice/?language=${this.language}`),
|
|
14945
|
+
fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`),
|
|
14946
|
+
fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`),
|
|
14947
|
+
fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`),
|
|
14723
14948
|
fetch(treksRequest),
|
|
14724
14949
|
])
|
|
14725
14950
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
@@ -14736,7 +14961,10 @@ const GrwTreksProvider = class {
|
|
|
14736
14961
|
};
|
|
14737
14962
|
|
|
14738
14963
|
exports.grw_app = GrwApp;
|
|
14964
|
+
exports.grw_information_desk_detail = GrwInformationDeskDetail;
|
|
14739
14965
|
exports.grw_map = GrwMap;
|
|
14966
|
+
exports.grw_poi_detail = GrwPoiDetail;
|
|
14967
|
+
exports.grw_sensitive_area_detail = GrwSensitiveAreaDetail;
|
|
14740
14968
|
exports.grw_trek_card = GrwTrekCard;
|
|
14741
14969
|
exports.grw_trek_detail = GrwTrekDetail;
|
|
14742
14970
|
exports.grw_trek_provider = GrwTrekProvider;
|