@smarterplan/ngx-smarterplan-locations 0.2.20 → 0.2.21
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/esm2020/lib/components/carousel/carousel.component.mjs +27 -27
- package/esm2020/lib/components/chevron/chevron.component.mjs +17 -17
- package/esm2020/lib/components/detail-location/detail-location.component.mjs +154 -154
- package/esm2020/lib/components/form-location/form-location.component.mjs +237 -237
- package/esm2020/lib/components/images/images.component.mjs +90 -90
- package/esm2020/lib/components/locations/locations.component.mjs +141 -141
- package/esm2020/lib/components/locations/map/map-popup/map-popup.component.mjs +65 -65
- package/esm2020/lib/components/locations/map/map.component.mjs +90 -90
- package/esm2020/lib/components/plans/calibration/calibration.component.mjs +468 -468
- package/esm2020/lib/components/plans/edit-plan/edit-plan.component.mjs +324 -324
- package/esm2020/lib/components/plans/plans.component.mjs +210 -210
- package/esm2020/lib/components/tab-navigation/tab-navigation.component.mjs +41 -41
- package/esm2020/lib/components/visits/visits.component.mjs +235 -235
- package/esm2020/lib/components/zones/add-audio-zone/add-audio-zone.component.mjs +230 -230
- package/esm2020/lib/components/zones/add-zone/add-zone.component.mjs +294 -294
- package/esm2020/lib/components/zones/add-zone/selection/selection.component.mjs +76 -76
- package/esm2020/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.mjs +413 -414
- package/esm2020/lib/components/zones/zones.component.mjs +232 -232
- package/esm2020/lib/helper.service.mjs +134 -134
- package/esm2020/lib/ngx-smarterplan-location-routing.module.mjs +49 -49
- package/esm2020/lib/ngx-smarterplan-locations.module.mjs +122 -122
- package/esm2020/lib/ngx-smarterplan-locations.service.mjs +13 -13
- package/esm2020/lib/pipes/count-audio-sweeps.pipe.mjs +27 -0
- package/esm2020/lib/radio-button/radio-button.component.mjs +26 -26
- package/esm2020/public-api.mjs +8 -8
- package/esm2020/smarterplan-ngx-smarterplan-locations.mjs +4 -4
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs +3627 -3648
- package/fesm2015/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs +3475 -3494
- package/fesm2020/smarterplan-ngx-smarterplan-locations.mjs.map +1 -1
- package/lib/components/carousel/carousel.component.d.ts +12 -12
- package/lib/components/chevron/chevron.component.d.ts +9 -9
- package/lib/components/detail-location/detail-location.component.d.ts +51 -51
- package/lib/components/form-location/form-location.component.d.ts +45 -45
- package/lib/components/images/images.component.d.ts +28 -28
- package/lib/components/locations/locations.component.d.ts +50 -50
- package/lib/components/locations/map/map-popup/map-popup.component.d.ts +22 -22
- package/lib/components/locations/map/map.component.d.ts +22 -22
- package/lib/components/plans/calibration/calibration.component.d.ts +140 -140
- package/lib/components/plans/edit-plan/edit-plan.component.d.ts +55 -55
- package/lib/components/plans/plans.component.d.ts +59 -59
- package/lib/components/tab-navigation/tab-navigation.component.d.ts +13 -13
- package/lib/components/visits/visits.component.d.ts +51 -51
- package/lib/components/zones/add-audio-zone/add-audio-zone.component.d.ts +63 -63
- package/lib/components/zones/add-zone/add-zone.component.d.ts +67 -67
- package/lib/components/zones/add-zone/selection/selection.component.d.ts +44 -44
- package/lib/components/zones/add-zone/sweep-plan-selection/sweep-plan-selection.component.d.ts +96 -96
- package/lib/components/zones/zones.component.d.ts +67 -67
- package/lib/helper.service.d.ts +53 -53
- package/lib/ngx-smarterplan-location-routing.module.d.ts +7 -7
- package/lib/ngx-smarterplan-locations.module.d.ts +35 -35
- package/lib/ngx-smarterplan-locations.service.d.ts +6 -6
- package/lib/pipes/count-audio-sweeps.pipe.d.ts +10 -0
- package/lib/radio-button/radio-button.component.d.ts +12 -12
- package/package.json +2 -2
- package/public-api.d.ts +4 -4
- package/smarterplan-ngx-smarterplan-locations.d.ts +5 -5
- package/esm2020/lib/components/plan-legend/plan-legend.component.mjs +0 -47
- package/lib/components/plan-legend/plan-legend.component.d.ts +0 -14
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { latLng, marker, tileLayer, latLngBounds, point, Marker, icon, } from "leaflet";
|
|
3
|
-
import { MapPopupComponent } from './map-popup/map-popup.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@asymmetrik/ngx-leaflet";
|
|
6
|
-
const iconRetinaUrl = "assets/marker-icon-2x.png";
|
|
7
|
-
const iconUrl = "assets/marker-icon.png";
|
|
8
|
-
const shadowUrl = "assets/marker-shadow.png";
|
|
9
|
-
const iconDefault = icon({
|
|
10
|
-
iconRetinaUrl,
|
|
11
|
-
iconUrl,
|
|
12
|
-
shadowUrl,
|
|
13
|
-
iconSize: [25, 41],
|
|
14
|
-
iconAnchor: [12, 41],
|
|
15
|
-
popupAnchor: [1, -34],
|
|
16
|
-
tooltipAnchor: [16, -28],
|
|
17
|
-
shadowSize: [41, 41],
|
|
18
|
-
});
|
|
19
|
-
Marker.prototype.options.icon = iconDefault;
|
|
20
|
-
export class MapComponent {
|
|
21
|
-
constructor(componentFactoryResolver, injector) {
|
|
22
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
23
|
-
this.injector = injector;
|
|
24
|
-
this.options = {
|
|
25
|
-
layers: [
|
|
26
|
-
tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
|
27
|
-
maxZoom: 18,
|
|
28
|
-
attribution: "...",
|
|
29
|
-
}),
|
|
30
|
-
],
|
|
31
|
-
zoom: 5.5,
|
|
32
|
-
center: latLng(47.06394, 2.77736),
|
|
33
|
-
};
|
|
34
|
-
this.layers = [];
|
|
35
|
-
}
|
|
36
|
-
ngOnChanges(changes) {
|
|
37
|
-
if (changes.spaces) {
|
|
38
|
-
const nm = [];
|
|
39
|
-
const bd = [];
|
|
40
|
-
if (!changes.spaces.currentValue) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
// Filtering out spaces without lat/longitudes
|
|
44
|
-
for (const s of changes.spaces.currentValue) {
|
|
45
|
-
if (s.latitude === null || s.longitude === null) {
|
|
46
|
-
console.log(`${s.name} has not coordinates for ${s.addresses}`);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
// We use the popup system from leaflet, as it packs a few improvements
|
|
50
|
-
// on using bootstrap: autoclose other popups, closing option.
|
|
51
|
-
const m = marker([s.latitude, s.longitude]);
|
|
52
|
-
m.bindPopup(this.createPopupComponent(s, m));
|
|
53
|
-
nm.push(m);
|
|
54
|
-
bd.push(latLng(s.latitude, s.longitude));
|
|
55
|
-
}
|
|
56
|
-
// Note how we set the layers in one assignment, in order to have leaflet
|
|
57
|
-
// detects the change correctly
|
|
58
|
-
// We also set the bounds afterward, for the map to be properly zoomed and
|
|
59
|
-
// centered
|
|
60
|
-
this.layers = nm;
|
|
61
|
-
if (this.map && bd.length > 0) {
|
|
62
|
-
this.map.fitBounds(latLngBounds(bd), {
|
|
63
|
-
padding: point(48, 48),
|
|
64
|
-
maxZoom: 12,
|
|
65
|
-
animate: true,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
onMapReady(map) {
|
|
71
|
-
this.map = map;
|
|
72
|
-
}
|
|
73
|
-
createPopupComponent(space, marker) {
|
|
74
|
-
const comp = this.componentFactoryResolver
|
|
75
|
-
.resolveComponentFactory(MapPopupComponent)
|
|
76
|
-
.create(this.injector);
|
|
77
|
-
comp.instance.space = space;
|
|
78
|
-
comp.instance.marker = marker;
|
|
79
|
-
comp.changeDetectorRef.detectChanges();
|
|
80
|
-
return comp.location.nativeElement;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
-
MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapComponent, selector: "lib-map", inputs: { spaces: "spaces" }, usesOnChanges: true, ngImport: i0, template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""], directives: [{ type: i1.LeafletDirective, selector: "[leaflet]", inputs: ["leafletFitBoundsOptions", "leafletPanOptions", "leafletZoomOptions", "leafletZoomPanOptions", "leafletOptions", "leafletZoom", "leafletCenter", "leafletFitBounds", "leafletMaxBounds", "leafletMinZoom", "leafletMaxZoom"], outputs: ["leafletMapReady", "leafletZoomChange", "leafletCenterChange", "leafletClick", "leafletDoubleClick", "leafletMouseDown", "leafletMouseUp", "leafletMouseMove", "leafletMouseOver", "leafletMouseOut", "leafletMapMove", "leafletMapMoveStart", "leafletMapMoveEnd", "leafletMapZoom", "leafletMapZoomStart", "leafletMapZoomEnd"] }, { type: i1.LeafletLayersDirective, selector: "[leafletLayers]", inputs: ["leafletLayers"] }] });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, decorators: [{
|
|
86
|
-
type: Component,
|
|
87
|
-
args: [{ selector: 'lib-map', template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""] }]
|
|
88
|
-
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { spaces: [{
|
|
89
|
-
type: Input
|
|
90
|
-
}] } });
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { latLng, marker, tileLayer, latLngBounds, point, Marker, icon, } from "leaflet";
|
|
3
|
+
import { MapPopupComponent } from './map-popup/map-popup.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@asymmetrik/ngx-leaflet";
|
|
6
|
+
const iconRetinaUrl = "assets/marker-icon-2x.png";
|
|
7
|
+
const iconUrl = "assets/marker-icon.png";
|
|
8
|
+
const shadowUrl = "assets/marker-shadow.png";
|
|
9
|
+
const iconDefault = icon({
|
|
10
|
+
iconRetinaUrl,
|
|
11
|
+
iconUrl,
|
|
12
|
+
shadowUrl,
|
|
13
|
+
iconSize: [25, 41],
|
|
14
|
+
iconAnchor: [12, 41],
|
|
15
|
+
popupAnchor: [1, -34],
|
|
16
|
+
tooltipAnchor: [16, -28],
|
|
17
|
+
shadowSize: [41, 41],
|
|
18
|
+
});
|
|
19
|
+
Marker.prototype.options.icon = iconDefault;
|
|
20
|
+
export class MapComponent {
|
|
21
|
+
constructor(componentFactoryResolver, injector) {
|
|
22
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
23
|
+
this.injector = injector;
|
|
24
|
+
this.options = {
|
|
25
|
+
layers: [
|
|
26
|
+
tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
|
27
|
+
maxZoom: 18,
|
|
28
|
+
attribution: "...",
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
31
|
+
zoom: 5.5,
|
|
32
|
+
center: latLng(47.06394, 2.77736),
|
|
33
|
+
};
|
|
34
|
+
this.layers = [];
|
|
35
|
+
}
|
|
36
|
+
ngOnChanges(changes) {
|
|
37
|
+
if (changes.spaces) {
|
|
38
|
+
const nm = [];
|
|
39
|
+
const bd = [];
|
|
40
|
+
if (!changes.spaces.currentValue) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// Filtering out spaces without lat/longitudes
|
|
44
|
+
for (const s of changes.spaces.currentValue) {
|
|
45
|
+
if (s.latitude === null || s.longitude === null) {
|
|
46
|
+
console.log(`${s.name} has not coordinates for ${s.addresses}`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
// We use the popup system from leaflet, as it packs a few improvements
|
|
50
|
+
// on using bootstrap: autoclose other popups, closing option.
|
|
51
|
+
const m = marker([s.latitude, s.longitude]);
|
|
52
|
+
m.bindPopup(this.createPopupComponent(s, m));
|
|
53
|
+
nm.push(m);
|
|
54
|
+
bd.push(latLng(s.latitude, s.longitude));
|
|
55
|
+
}
|
|
56
|
+
// Note how we set the layers in one assignment, in order to have leaflet
|
|
57
|
+
// detects the change correctly
|
|
58
|
+
// We also set the bounds afterward, for the map to be properly zoomed and
|
|
59
|
+
// centered
|
|
60
|
+
this.layers = nm;
|
|
61
|
+
if (this.map && bd.length > 0) {
|
|
62
|
+
this.map.fitBounds(latLngBounds(bd), {
|
|
63
|
+
padding: point(48, 48),
|
|
64
|
+
maxZoom: 12,
|
|
65
|
+
animate: true,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
onMapReady(map) {
|
|
71
|
+
this.map = map;
|
|
72
|
+
}
|
|
73
|
+
createPopupComponent(space, marker) {
|
|
74
|
+
const comp = this.componentFactoryResolver
|
|
75
|
+
.resolveComponentFactory(MapPopupComponent)
|
|
76
|
+
.create(this.injector);
|
|
77
|
+
comp.instance.space = space;
|
|
78
|
+
comp.instance.marker = marker;
|
|
79
|
+
comp.changeDetectorRef.detectChanges();
|
|
80
|
+
return comp.location.nativeElement;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
+
MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: MapComponent, selector: "lib-map", inputs: { spaces: "spaces" }, usesOnChanges: true, ngImport: i0, template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""], directives: [{ type: i1.LeafletDirective, selector: "[leaflet]", inputs: ["leafletFitBoundsOptions", "leafletPanOptions", "leafletZoomOptions", "leafletZoomPanOptions", "leafletOptions", "leafletZoom", "leafletCenter", "leafletFitBounds", "leafletMaxBounds", "leafletMinZoom", "leafletMaxZoom"], outputs: ["leafletMapReady", "leafletZoomChange", "leafletCenterChange", "leafletClick", "leafletDoubleClick", "leafletMouseDown", "leafletMouseUp", "leafletMouseMove", "leafletMouseOver", "leafletMouseOut", "leafletMapMove", "leafletMapMoveStart", "leafletMapMoveEnd", "leafletMapZoom", "leafletMapZoomStart", "leafletMapZoomEnd"] }, { type: i1.LeafletLayersDirective, selector: "[leafletLayers]", inputs: ["leafletLayers"] }] });
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: MapComponent, decorators: [{
|
|
86
|
+
type: Component,
|
|
87
|
+
args: [{ selector: 'lib-map', template: "<div [leafletLayers]=\"layers\" [leafletOptions]=\"options\" (leafletMapReady)=\"onMapReady($event)\" id=\"map\" leaflet\n style=\"height: 500px; margin-top: 30px; z-index: 195\"></div>\n", styles: [""] }]
|
|
88
|
+
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { spaces: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}] } });
|
|
91
91
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zbWFydGVycGxhbi1sb2NhdGlvbnMvc3JjL2xpYi9jb21wb25lbnRzL2xvY2F0aW9ucy9tYXAvbWFwLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zbWFydGVycGxhb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AgICAgICAgICBtYXhab29tOiAxOCxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGlvbjogXCIuLi5cIixcbiAgICAgICAgICAgIH0pLFxuICAgICAgICBdLFxuICAgICAgICB6b29tOiA1LjUsXG4gICAgICAgIGNlbnRlcjogbGF0TG5nKDQ3LjA2Mzk0LCAyLjc3NzM2KSxcbiAgICB9O1xuXG4gICAgbGF5ZXJzOiBhbnlbXSA9IFtdO1xuXG4gICAgbWFwOiBhbnk7XG5cbiAgICBuZ09uQ2hhbmdlcyhjaGFuZ2VzOiBTaW1wbGVDaGFuZ2VzKSB7XG4gICAgICAgIGlmIChjaGFuZ2VzLnNwYWNlcykge1xuICAgICAgICAgICAgY29uc3Qgbm0gPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGJkID0gW107XG4gICAgICAgICAgICBpZiAoIWNoYW5nZXMuc3BhY2VzLmN1cnJlbnRWYWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEZpbHRlcmluZyBvdXQgc3BhY2VzIHdpdGhvdXQgbGF0L2xvbmdpdHVkZXNcbiAgICAgICAgICAgIGZvciAoY29uc3QgcyBvZiBjaGFuZ2VzLnNwYWNlcy5jdXJyZW50VmFsdWUgYXMgU3BhY2VbXSkge1xuICAgICAgICAgICAgICAgIGlmIChzLmxhdGl0dWRlID09PSBudWxsIHx8IHMubG9uZ2l0dWRlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFxuICAgICAgICAgICAgICAgICAgICAgICAgYCR7cy5uYW1lfSBoYXMgbm90IGNvb3JkaW5hdGVzIGZvciAke3MuYWRkcmVzc2VzfWAsXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBXZSB1c2UgdGhlIHBvcHVwIHN5c3RlbSBmcm9tIGxlYWZsZXQsIGFzIGl0IHBhY2tzIGEgZmV3IGltcHJvdmVtZW50c1xuICAgICAgICAgICAgICAgIC8vIG9uIHVzaW5nIGJvb3RzdHJhcDogYXV0b2Nsb3NlIG90aGVyIHBvcHVwcywgY2xvc2luZyBvcHRpb24uXG4gICAgICAgICAgICAgICAgY29uc3QgbSA9IG1hcmtlcihbcy5sYXRpdHVkZSwgcy5sb25naXR1ZGVdKTtcblxuICAgICAgICAgICAgICAgIG0uYmluZFBvcHVwKHRoaXMuY3JlYXRlUG9wdXBDb21wb25lbnQocywgbSkpO1xuXG4gICAgICAgICAgICAgICAgbm0ucHVzaChtKTtcbiAgICAgICAgICAgICAgICBiZC5wdXNoKGxhdExuZyhzLmxhdGl0dWRlLCBzLmxvbmdpdHVkZSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gTm90ZSBob3cgd2Ugc2V0IHRoZSBsYXllcnMgaW4gb25lIGFzc2lnbm1lbnQsIGluIG9yZGVyIHRvIGhhdmUgbGVhZmxldFxuICAgICAgICAgICAgLy8gZGV0ZWN0cyB0aGUgY2hhbmdlIGNvcnJlY3RseVxuICAgICAgICAgICAgLy8gV2UgYWxzbyBzZXQgdGhlIGJvdW5kcyBhZnRlcndhcmQsIGZvciB0aGUgbWFwIHRvIGJlIHByb3Blcmx5IHpvb21lZCBhbmRcbiAgICAgICAgICAgIC8vIGNlbnRlcmVkXG4gICAgICAgICAgICB0aGlzLmxheWVycyA9IG5tO1xuICAgICAgICAgICAgaWYgKHRoaXMubWFwICYmIGJkLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLm1hcC5maXRCb3VuZHMobGF0TG5nQm91bmRzKGJkKSwge1xuICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBwb2ludCg0OCwgNDgpLFxuICAgICAgICAgICAgICAgICAgICBtYXhab29tOiAxMixcbiAgICAgICAgICAgICAgICAgICAgYW5pbWF0ZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uTWFwUmVhZHkobWFwOiBNYXApIHtcbiAgICAgICAgdGhpcy5tYXAgPSBtYXA7XG4gICAgfVxuXG4gICAgY3JlYXRlUG9wdXBDb21wb25lbnQoc3BhY2U6IFNwYWNlLCBtYXJrZXI6IE1hcmtlcikge1xuICAgICAgICBjb25zdCBjb21wID0gdGhpcy5jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXJcbiAgICAgICAgLnJlc29sdmVDb21wb25lbnRGYWN0b3J5KE1hcFBvcHVwQ29tcG9uZW50KVxuICAgICAgICAuY3JlYXRlKHRoaXMuaW5qZWN0b3IpO1xuICAgICAgICBjb21wLmluc3RhbmNlLnNwYWNlID0gc3BhY2U7XG4gICAgICAgIGNvbXAuaW5zdGFuY2UubWFya2VyID0gbWFya2VyO1xuICAgICAgICBjb21wLmNoYW5nZURldGVjdG9yUmVmLmRldGVjdENoYW5nZXMoKTtcbiAgICAgICAgcmV0dXJuIGNvbXAubG9jYXRpb24ubmF0aXZlRWxlbWVudDtcbiAgICB9XG5cbn1cbiIsIjxkaXYgW2xlYWZsZXRMYXllcnNdPVwibGF5ZXJzXCIgW2xlYWZsZXRPcHRpb25zXT1cIm9wdGlvbnNcIiAobGVhZmxldE1hcFJlYWR5KT1cIm9uTWFwUmVhZHkoJGV2ZW50KVwiIGlkPVwibWFwXCIgbGVhZmxldFxuICAgIHN0eWxlPVwiaGVpZ2h0OiA1MDBweDsgbWFyZ2luLXRvcDogMzBweDsgei1pbmRleDogMTk1XCI+PC9kaXY+XG4iXX0=
|