smart-house-frontend
Version:
2 lines • 314 kB
JavaScript
webpackJsonp([1],{403:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(29),a=i(389),h=i(387),c=i(404),l=i(406),p=i(530),d=i(416),u=i(28),f=i(541),g=i(410),m=i(409),v=i(434),y=function(){function e(){}return e=n([o.NgModule({id:t.id,imports:[u.CoreModule,h.SharedModule,v.DevicesModule,s.RouterModule,a.FormsModule,c.routing,f.ChartModule],declarations:p.default.slice(),exports:[l.HomeComponent],providers:[d.MapViewService,g.HomeService,m.HomeResolveService]}),r("design:paramtypes",[])],e)}();e.HomeModule=y},404:function(t,e,i){"use strict";var n=i(29),r=i(405),o=i(406),s=i(409);e.routes=[{path:"",children:[{path:r.default.BASE,component:o.HomeComponent,resolve:{viewList:s.HomeResolveService}},{path:r.default.CONSTRUCTOR,loadChildren:function(){return i(411)("ConstructorModule")}}]}],e.routing=n.RouterModule.forChild(e.routes)},405:function(t,e){"use strict";var i={BASE:"",CONSTRUCTOR:"constructor"};Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},406:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(29),a=function(){function t(t){this.activeRoute=t,this.viewList=[]}return t.prototype.isSubviewApplicable=function(t){return this.currentSubview!==t&&this.currentView[t].active},Object.defineProperty(t.prototype,"isMapSubviewActive",{get:function(){return this.currentView&&this.currentView.mapSubview.active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDashboardSubviewActive",{get:function(){return this.currentView&&this.currentView.dashboardSubview.active},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.activeRouteDataSubscription=this.activeRoute.data.subscribe(function(e){var i=e.viewList;t.viewList=i,i.length>0&&t.setCurrentView(i[0])})},t.prototype.ngOnDestroy=function(){this.activeRouteDataSubscription.unsubscribe()},t.prototype.setCurrentView=function(t){this.currentView=t,this.setCurrentSubview(t.defaultSubview)},t.prototype.setCurrentSubview=function(t){this.currentView&&this.isSubviewApplicable(t)&&(this.currentSubview=t)},t=n([o.Component({selector:"sh-home",template:i(407),styles:[i(408)]}),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof s.ActivatedRoute&&s.ActivatedRoute)&&e||Object])],t);var e}();e.HomeComponent=a},407:function(t,e){t.exports='<div class="home-nav">\n <div class="home-nav__logo"\n *ngIf="currentView?.name">\n {{currentView.name}}\n </div>\n <div class="home-nav__actions">\n <!--TODO: make a Toggle component-->\n <div class="home-nav__view-toggle toggle">\n <ul>\n View:\n <li class="toggle__item"\n [ngClass]="{\'toggle__item_active\': (currentSubview === \'mapSubview\'), \'toggle__item_disabled\': (!isMapSubviewActive)}"\n (click)="setCurrentSubview(\'mapSubview\')">\n Map\n </li>\n <li class="toggle__item"\n [ngClass]="{\'toggle__item_active\': (currentSubview === \'dashboardSubview\'), \'toggle__item_disabled\': (!isDashboardSubviewActive)}"\n (click)="setCurrentSubview(\'dashboardSubview\')">\n Dashboard\n </li>\n </ul>\n </div>\n <button class="button button_default"\n *ngIf="currentView"\n [routerLink]="[\'constructor\', currentView._id]">\n Edit\n </button>\n <button class="button button_success"\n [routerLink]="[\'constructor\']">\n + Create view\n </button>\n </div>\n</div>\n\n<div class="home-view home-view_empty"\n *ngIf="!currentView">\n <div class="home-view__empty-content">\n Please\n <a class="home-view__create-view"\n [routerLink]="[\'constructor\']">\n create\n </a>\n view\n </div>\n</div>\n\n<div\n class="home-view home-view_not-empty"\n *ngIf="currentView">\n <sh-map-view\n [currentMapView]="currentView.mapSubview"\n *ngIf="currentSubview == \'mapSubview\'"\n ></sh-map-view>\n <sh-dashboard-view\n [currentDasboardView]="currentView.dashboardSubview"\n *ngIf="currentSubview == \'dashboardSubview\'"\n ></sh-dashboard-view>\n</div>\n<sh-view-list\n *ngIf="viewList.length > 0"\n [listViews]="viewList"\n [currentView]="currentView"\n (onSelectView)="setCurrentView($event)">\n</sh-view-list>\n'},408:function(t,e){t.exports=".home-nav{overflow:auto}.home-nav__logo{display:inline-block;font-weight:bold;text-transform:capitalize;font-size:20px;height:40px;line-height:40px;margin:10px 0;vertical-align:bottom}.home-nav__actions{float:right}.home-nav__actions .button{margin:10px 0 10px 5px;width:auto;padding-left:15px;padding-right:15px;border-radius:2px}.home-nav__actions .button_default{background-color:#929292}.home-nav__actions .button_success{background-color:#A3C844;border-color:#A3C844}.home-nav__actions .home-nav__view-toggle{display:inline-block;vertical-align:bottom}.toggle{font-size:0.8em;font-weight:500}.toggle__item{height:10px;line-height:10px;display:inline-block;padding:0 5px;border-right:1px solid #d1d1d1;color:#d1d1d1;cursor:pointer}.toggle__item:hover{text-decoration:underline}.toggle__item_active{color:#000000;cursor:default}.toggle__item_active:hover{text-decoration:none}.toggle__item_disabled{cursor:default}.toggle__item_disabled:hover{text-decoration:none}.toggle__item:last-child{border-right:none}.home-view{position:relative;background:#f9f9f9;border:solid 1px #c7c8c2}.home-view_empty{height:400px}.home-view__empty-content{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:1.5em;color:#6b6b6b}.home-view__create-view{color:#a3c940}\n"},409:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(81),a=i(410),h=i(390),c=function(){function t(t,e){this.homeService=t,this.toastr=e}return t.prototype.resolve=function(){var t=this;return this.homeService.getViewList().catch(function(e){return t.toastr.error(e),s.Observable.never()})},t=n([o.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof a.HomeService&&a.HomeService)&&e||Object,"function"==typeof(i="undefined"!=typeof h.ToastsManager&&h.ToastsManager)&&i||Object])],t);var e,i}();e.HomeResolveService=c},410:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(67),a=i(80),h=function(){function t(t,e){this.http=t,this.httpUtils=e}return t.prototype.getViewList=function(){var t=this;return this.http.get("/views").catch(function(e){return t.httpUtils.extractErrorMessage(e)})},t.prototype.getView=function(t){var e=this;return this.http.get("/views/"+t).catch(function(t){return e.httpUtils.extractErrorMessage(t)})},t=n([o.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof s.ShHttpService&&s.ShHttpService)&&e||Object,"function"==typeof(i="undefined"!=typeof a.ShHttpUtilsService&&a.ShHttpUtilsService)&&i||Object])],t);var e,i}();e.HomeService=h},411:function(t,e,i){t.exports=function(t){return new Promise(function(e){i.e(2,function(n){if(t)e(i(412)[t]);else{var r=i(412);e(r.__esModule?r.default:r)}})})}},416:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(67),a=i(382),h=i(59),c=function(){function t(t,e,i){this.http=t,this.filesService=e,this.requestOptions=i}return t.prototype.resolvePictureUploadUrl=function(t){var e=t._id;return this.requestOptions.merge({url:"/map-view/"+e+"/picture"}).url},t.prototype.resolvePictureUrl=function(t){var e=t.pictureName;return this.filesService.resolveFileUrl(e)},t=n([o.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof s.ShHttpService&&s.ShHttpService)&&e||Object,"function"==typeof(i="undefined"!=typeof a.FilesService&&a.FilesService)&&i||Object,"function"==typeof(c="undefined"!=typeof h.RequestOptions&&h.RequestOptions)&&c||Object])],t);var e,i,c}();e.MapViewService=c},419:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(420),a=function(){function t(t){this.devicesService=t}return t.prototype.resolve=function(){return this.devicesService.getSensors()},t=n([o.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof s.DevicesService&&s.DevicesService)&&e||Object])],t);var e}();e.DeviceListResolver=a},420:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(67),a=function(){function t(t){this.http=t}return t.prototype.getSensors=function(){return this.http.get("/sensors")},t.prototype.get=function(t){return void 0===t&&(t=""),this.http.get("/sensors/"+t)},t.prototype.save=function(t){return this.http.post("/sensors",t)},t.prototype.update=function(t){return this.http.put("/sensors/"+t._id,t)},t.prototype.delete=function(t){return this.http.delete("/sensors/"+t._id)},t=n([o.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof s.ShHttpService&&s.ShHttpService)&&e||Object])],t);var e}();e.DevicesService=a},424:function(t,e){"use strict"},434:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(29),a=i(389),h=i(387),c=i(435),l=i(438),p=i(442),d=i(420),u=i(419),f=i(445),g=i(499),m=i(504),v=i(507),y=function(){function e(){}return e=n([o.NgModule({id:t.id,imports:[s.RouterModule,a.FormsModule,h.SharedModule],declarations:[p.DeviceWidgetComponent,v.SensorWidgetComponent,m.SwitcherWidgetComponent,g.ServoWidgetComponent,c.DeviceListComponent,l.DeviceComponent],exports:[c.DeviceListComponent,l.DeviceComponent,p.DeviceWidgetComponent],providers:[d.DevicesService,u.DeviceListResolver,f.DeviceWidgetService]}),r("design:paramtypes",[])],e)}();e.DevicesModule=y},435:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(29),a=i(420),h=i(398),c=[{topic:"mqttId",name:"ID",sortable:!0},{topic:"type",name:"Type",sortable:!0},{topic:"description",name:"Description",sortable:!0}],l=function(){function t(t,e,i,n){this.devicesService=t,this.dialogService=e,this.viewContainerRef=i,this.router=n,this.editOnItemClick=!0,this.showDeleteButton=!0,this.statisticLink="",this.sortBy="",this.reverse=!1,this._headers=[],this._headers=c}return t.prototype.setSortBy=function(t){var e=this;this.reverse=this.sortBy===t&&!this.reverse,this.sortBy=t,this.deviceList.sort(function(i,n){return i[t]<n[t]?e.reverse?1:-1:i[t]>n[t]?e.reverse?-1:1:0})},t.prototype.isActive=function(t){return t===this.sortBy},t.prototype.getItemEditLink=function(t){return this.editOnItemClick?["./",t]:[]},t.prototype.goToDeviceStatistic=function(t,e,i){i.stopPropagation(),this.router.navigate([this.statisticLink,t,"day",e])},t.prototype.removeSensor=function(t,e){var i=this,n={title:"",message:"Are you sure you want to delete this device?"};e.stopPropagation(),this.dialogService.confirm(this.viewContainerRef,n).filter(function(t){return t}).subscribe(function(){i.devicesService.delete(t).subscribe(function(t){i.deviceList=i.deviceList.filter(function(e){return e._id!==t._id})})})},Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},enumerable:!0,configurable:!0}),n([o.Input(),r("design:type",Object)],t.prototype,"deviceList",void 0),n([o.Input(),r("design:type",Boolean)],t.prototype,"editOnItemClick",void 0),n([o.Input(),r("design:type",Boolean)],t.prototype,"showDeleteButton",void 0),n([o.Input(),r("design:type",String)],t.prototype,"statisticLink",void 0),t=n([o.Component({selector:"sh-device-list",template:i(436),styles:[i(437)]}),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof a.DevicesService&&a.DevicesService)&&e||Object,"function"==typeof(l="undefined"!=typeof h.DialogService&&h.DialogService)&&l||Object,"function"==typeof(p="undefined"!=typeof o.ViewContainerRef&&o.ViewContainerRef)&&p||Object,"function"==typeof(d="undefined"!=typeof s.Router&&s.Router)&&d||Object])],t);var e,l,p,d}();e.DeviceListComponent=l},436:function(t,e){t.exports='<div *ngIf="deviceList.length === 0" class="empty-list">\n <div class="container empty-list__container">\n <div class="empty-list__container__text">\n <h3 class="empty-list__container__text__main">There are no devices yet</h3>\n <h4 class="empty-list__container__text__additional">Once you connect your device to the system, it will be listed here.</h4>\n </div><!-- empty-list__container__text -->\n </div><!-- empty-list__container -->\n</div><!-- empty-list -->\n\n<div *ngIf="deviceList.length !== 0" class="sensors-list">\n <table class="highlight responsive-table sensors-list-table">\n <thead class="sensors-list-table__head">\n <th *ngFor="let header of headers"\n (click)="setSortBy(header.topic)"\n class="sensors-list-table__head__item"\n [class.active]="isActive(header.topic)"\n [class.sortable]="header.sortable">\n {{ header.name }}\n <div [class]="reverse ? \'up\' : \'down\'"></div>\n </th><!-- sensors-list-table__head__item -->\n </thead><!-- sensors-list-table__head -->\n <tbody class="sensors-list-table__body">\n <tr *ngFor="let item of deviceList"\n [routerLink]="getItemEditLink(item._id)"\n class="sensors-list-table__body__row">\n <td *ngFor="let header of headers"\n class="sensors-list-table__body__row__item">\n {{item[header.topic]}}\n </td><!-- sensors-list-table__body__row__item -->\n <td *ngIf="statisticLink">\n <div class="sensor-widget_statistic-button"\n (click)="goToDeviceStatistic(item.mqttId, item.type, $event)">\n </div>\n </td>\n <td *ngIf="showDeleteButton"\n class="sensors-list-table__body__row__actions">\n <button (click)="removeSensor(item, $event)"\n class="waves-effect waves-light btn sensors-list-table__body__row__actions__remove"\n name="remove-device"\n type="remove">\n <i class="material-icons sensors-list-table__body__row__actions__remove__icon">delete</i>\n </button><!-- sensors-list-table__body__row__actions__remove -->\n </td><!-- sensors-list-table__body__row__actions -->\n </tr><!-- sensors-list-table__body__row -->\n </tbody><!-- sensors-list-table__body -->\n </table><!-- sensors-list-table -->\n</div><!-- sensors-list -->\n'},437:function(t,e){t.exports=".sub-header__actions{vertical-align:middle;line-height:54px}.sensors-list-table__head__item.sortable{cursor:pointer}.sensors-list-table__head__item.sortable.active .up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid black}.sensors-list-table__head__item.sortable.active .down{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid black}.sensors-list-table__body__row__actions__remove{padding:0 15px}.empty-list__container{padding:0px}.empty-list__container::before{content:'';display:block;background:url(\"./assets/empty-sensors-list.png\") no-repeat;background-size:150px;background-position:calc(100%/2);height:150px;margin:0 6px 0 0}.empty-list__container__text__main{font-family:Roboto-Regular;font-size:24px;text-align:center}.empty-list__container__text__additional{font-family:Roboto-Regular;font-size:15px;text-align:center}.sensor-widget_statistic-button{position:relative;display:block;float:left;cursor:pointer;width:24px;height:26px;margin-top:1px;background-color:#dedede;background-image:url(./assets/statistic.svg)}.sensor-widget_statistic-button:hover{box-shadow:0 2px 4px 0 rgba(0,0,0,0.5)}\n"},438:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(439),a=function(){function t(){this.switcher=!1}return t.prototype.switchSensor=function(){this.device.executor=!this.device.executor},t.prototype.switcherImageUrl=function(){return this.device.executor?"url(assets/switcherON.svg)":"url(assets/switcherOFF.svg)"},n([o.Input(),r("design:type","function"==typeof(e="undefined"!=typeof s.Device&&s.Device)&&e||Object)],t.prototype,"device",void 0),t=n([o.Component({selector:"sh-device",template:i(440),styles:[i(441)]}),r("design:paramtypes",[])],t);var e}();e.DeviceComponent=a},439:function(t,e){"use strict";var i=function(){function t(t){void 0===t&&(t={}),Object.assign(this,{mqttId:"",type:"servo",subType:"socket",description:"",executor:!1,sensor:!1},t)}return t}();e.Device=i},440:function(t,e){t.exports='<div class="device">\n <div class="device__icon"\n [style.background-image]="\'url(assets/\' + device?.subType + \'.svg)\'">\n </div>\n <div *ngIf="device?.type === \'switcher\'"\n (click)="switchSensor()">\n <div class="device__switcher"\n [style.background-image]="switcherImageUrl()">\n </div>\n </div>\n</div>\n'},441:function(t,e){t.exports=".device{width:42px;height:42px;position:absolute;cursor:move}.device__icon{width:100%;height:100%}.device__switcher{position:absolute;left:42px;top:0;width:42px;height:42px;cursor:pointer}\n"},442:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=function(){function t(){this.isEditMode=!1,this.onRemoveWidget=new o.EventEmitter}return t.prototype.removeWidget=function(){this.onRemoveWidget.emit(this.device)},n([o.Input(),r("design:type",Object)],t.prototype,"device",void 0),n([o.Input(),r("design:type",Boolean)],t.prototype,"isEditMode",void 0),n([o.Output(),r("design:type","function"==typeof(e="undefined"!=typeof o.EventEmitter&&o.EventEmitter)&&e||Object)],t.prototype,"onRemoveWidget",void 0),t=n([o.Component({selector:"sh-device-widget",template:i(443),styles:[i(444)]}),r("design:paramtypes",[])],t);var e}();e.DeviceWidgetComponent=s},443:function(t,e){t.exports='<div class="sensor-widget">\n <div class="sensor-widget_header">\n <div class="sensor-widget_button-statistics"\n [routerLink]="[\'../statistic/sensor-details\', device.mqttId, \'day\', device.type]">\n </div>\n <div class="sensor-widget_header_info">\n <span>{{device.description}}</span>\n </div>\n <button class="sensor-widget_button-close"\n *ngIf="isEditMode"\n (click)="removeWidget()">\n </button>\n </div>\n <div>\n <sh-sensor-widget\n [device]="device"\n *ngIf="!device.executor && !device.servo">\n </sh-sensor-widget>\n <sh-switcher-widget\n [device]="device"\n *ngIf="device.executor">\n </sh-switcher-widget>\n <sh-servo-widget\n [device]="device"\n *ngIf="device.servo">\n </sh-servo-widget>\n </div>\n</div>\n'},444:function(t,e){t.exports=".sensor-widget{position:relative;width:182px;height:182px;padding:2px;font-family:Roboto;text-align:center;color:white;background-color:#169eb1;border:solid 1px white;overflow:hidden}.sensor-widget_footer,.sensor-widget_header{position:absolute;width:100%;bottom:0;height:27px;max-height:27px;overflow:hidden}.sensor-widget_footer{bottom:0}.sensor-widget_header{top:0;z-index:1}.sensor-widget_button-close,.sensor-widget_button-statistics{position:absolute;top:0;width:27px;height:27px;border:none;box-shadow:none;cursor:pointer;background:transparent;background-repeat:no-repeat;background-position:center;opacity:0.5}.sensor-widget_button-close:hover,.sensor-widget_button-close:active,.sensor-widget_button-close:focus,.sensor-widget_button-statistics:hover,.sensor-widget_button-statistics:active,.sensor-widget_button-statistics:focus{opacity:1}.sensor-widget_button-close{right:0;background-image:url(./assets/close-icon.svg)}.sensor-widget_button-statistics{left:0;background-image:url(./assets/statistics-icon.svg)}.sensor-widget_header_info{line-height:27px;padding:0 27px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sensor-widget_info{margin-top:27px;padding:27px 27px;display:table;height:100%;width:100%}.sensor-widget_info_value{display:table-cell;vertical-align:middle;text-align:center;font-size:24px;line-height:1.5;font-weight:bold;width:100%}.sensor-widget_switcher-info{padding:27px 27px;display:table;height:100%;width:100%}\n"},445:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},o=i(3),s=i(446),a=function(){function t(){this.io=s,this.setupSocket()}return t.prototype.setupSocket=function(){this.socket=this.io.connect({backEndUrl:"",backEndWebSocketUrl:""}.backEndWebSocketUrl)},t.prototype.subscribe=function(t,e){function i(){this.socket.on("event",e),t&&this.socket.emit("subscribe",{device:t})}var n=this;this.socket.connected?i.apply(this):this.socket.on("connect",function(){i.apply(n)})},t.prototype.unsubscribe=function(t){this.socket.emit("unsubscribe",{device:t})},t.prototype.pushEvent=function(t){this.socket.emit("pushEvent",t)},t=n([o.Injectable(),r("design:paramtypes",[])],t)}();e.DeviceWidgetService=a},446:function(t,e,i){function n(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n=o(t),s=n.source,l=n.id,p=n.path,d=c[l]&&p in c[l].nsps,u=e.forceNew||e["force new connection"]||!1===e.multiplex||d;return u?(h("ignoring socket cache for %s",s),i=a(s,e)):(c[l]||(h("new io instance for %s",s),c[l]=a(s,e)),i=c[l]),n.query&&!e.query?e.query=n.query:e&&"object"==typeof e.query&&(e.query=r(e.query)),i.socket(n.path,e)}function r(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e.join("&")}var o=i(447),s=i(452),a=i(463),h=i(449)("socket.io-client");t.exports=e=n;var c=e.managers={};e.protocol=s.protocol,e.connect=n,e.Manager=i(463),e.Socket=i(493)},447:function(t,e,i){(function(e){function n(t,i){var n=t;i=i||e.location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t="undefined"!=typeof i?i.protocol+"//"+t:"https://"+t),o("parse %s",t),n=r(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var s=n.host.indexOf(":")!==-1,a=s?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(i&&i.port===n.port?"":":"+n.port),n}var r=i(448),o=i(449)("socket.io-client:url");t.exports=n}).call(e,function(){return this}())},448:function(t,e){var i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));for(var s=i.exec(t||""),a={},h=14;h--;)a[n[h]]=s[h]||"";return r!=-1&&o!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},449:[962,450],450:function(t,e,i){function n(){return e.colors[l++%e.colors.length]}function r(t){function i(){}function r(){var t=r,i=+new Date,o=i-(c||i);t.diff=o,t.prev=c,t.curr=i,c=i,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var h=0;s[0]=s[0].replace(/%([a-z%])/g,function(i,n){if("%%"===i)return i;h++;var r=e.formatters[n];if("function"==typeof r){var o=s[h];i=r.call(t,o),s.splice(h,1),h--}return i}),s=e.formatArgs.apply(t,s);var l=r.log||e.log||console.log.bind(console);l.apply(t,s)}i.enabled=!1,r.enabled=!0;var o=e.enabled(t)?r:i;return o.namespace=t,o}function o(t){e.save(t);for(var i=(t||"").split(/[\s,]+/),n=i.length,r=0;r<n;r++)i[r]&&(t=i[r].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var i,n;for(i=0,n=e.skips.length;i<n;i++)if(e.skips[i].test(t))return!1;for(i=0,n=e.names.length;i<n;i++)if(e.names[i].test(t))return!0;return!1}function h(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=r.debug=r,e.coerce=h,e.disable=s,e.enable=o,e.enabled=a,e.humanize=i(451),e.names=[],e.skips=[],e.formatters={};var c,l=0},451:function(t,e){function i(t){if(t=String(t),!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"days":case"day":case"d":return i*c;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*a;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=h?Math.round(t/h)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function r(t){return o(t,c,"day")||o(t,h,"hour")||o(t,a,"minute")||o(t,s,"second")||t+" ms"}function o(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}var s=1e3,a=60*s,h=60*a,c=24*h,l=365.25*c;t.exports=function(t,e){e=e||{};var o=typeof t;if("string"===o&&t.length>0)return i(t);if("number"===o&&isNaN(t)===!1)return e.long?r(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},452:function(t,e,i){function n(){}function r(t){var i="",n=!1;return i+=t.type,e.BINARY_EVENT!=t.type&&e.BINARY_ACK!=t.type||(i+=t.attachments,i+="-"),t.nsp&&"/"!=t.nsp&&(n=!0,i+=t.nsp),null!=t.id&&(n&&(i+=",",n=!1),i+=t.id),null!=t.data&&(n&&(i+=","),i+=d.stringify(t.data)),p("encoded %j as %s",t,i),i}function o(t,e){function i(t){var i=f.deconstructPacket(t),n=r(i.packet),o=i.buffers;o.unshift(n),e(o)}f.removeBlobs(t,i)}function s(){this.reconstructor=null}function a(t){var i={},n=0;if(i.type=Number(t.charAt(0)),
null==e.types[i.type])return l();if(e.BINARY_EVENT==i.type||e.BINARY_ACK==i.type){for(var r="";"-"!=t.charAt(++n)&&(r+=t.charAt(n),n!=t.length););if(r!=Number(r)||"-"!=t.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(r)}if("/"==t.charAt(n+1))for(i.nsp="";++n;){var o=t.charAt(n);if(","==o)break;if(i.nsp+=o,n==t.length)break}else i.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(i.id="";++n;){var o=t.charAt(n);if(null==o||Number(o)!=o){--n;break}if(i.id+=t.charAt(n),n==t.length)break}i.id=Number(i.id)}return t.charAt(++n)&&(i=h(i,t.substr(n))),p("decoded %s as %j",t,i),i}function h(t,e){try{t.data=d.parse(e)}catch(t){return l()}return t}function c(t){this.reconPack=t,this.buffers=[]}function l(t){return{type:e.ERROR,data:"parser error"}}var p=i(453)("socket.io-parser"),d=i(456),u=i(459),f=i(460),g=i(462);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=n,e.Decoder=s,n.prototype.encode=function(t,i){if(p("encoding packet %j",t),e.BINARY_EVENT==t.type||e.BINARY_ACK==t.type)o(t,i);else{var n=r(t);i([n])}},u(s.prototype),s.prototype.add=function(t){var i;if("string"==typeof t)i=a(t),e.BINARY_EVENT==i.type||e.BINARY_ACK==i.type?(this.reconstructor=new c(i),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",i)):this.emit("decoded",i);else{if(!g(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");i=this.reconstructor.takeBinaryData(t),i&&(this.reconstructor=null,this.emit("decoded",i))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},c.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length==this.reconPack.attachments){var e=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},c.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},453:function(t,e,i){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function r(){var t=arguments,i=this.useColors;if(t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff),!i)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var r=0,o=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))}),t.splice(o,0,n),t}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function a(){var t;try{t=e.storage.debug}catch(t){}return t}function h(){try{return window.localStorage}catch(t){}}e=t.exports=i(454),e.log=o,e.formatArgs=r,e.save=s,e.load=a,e.useColors=n,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:h(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},454:function(t,e,i){function n(){return e.colors[l++%e.colors.length]}function r(t){function i(){}function r(){var t=r,i=+new Date,o=i-(c||i);t.diff=o,t.prev=c,t.curr=i,c=i,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());var s=Array.prototype.slice.call(arguments);s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(i,n){if("%%"===i)return i;a++;var r=e.formatters[n];if("function"==typeof r){var o=s[a];i=r.call(t,o),s.splice(a,1),a--}return i}),"function"==typeof e.formatArgs&&(s=e.formatArgs.apply(t,s));var h=r.log||e.log||console.log.bind(console);h.apply(t,s)}i.enabled=!1,r.enabled=!0;var o=e.enabled(t)?r:i;return o.namespace=t,o}function o(t){e.save(t);for(var i=(t||"").split(/[\s,]+/),n=i.length,r=0;r<n;r++)i[r]&&(t=i[r].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var i,n;for(i=0,n=e.skips.length;i<n;i++)if(e.skips[i].test(t))return!1;for(i=0,n=e.names.length;i<n;i++)if(e.names[i].test(t))return!0;return!1}function h(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=r,e.coerce=h,e.disable=s,e.enable=o,e.enabled=a,e.humanize=i(455),e.names=[],e.skips=[],e.formatters={};var c,l=0},455:function(t,e){function i(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"days":case"day":case"d":return i*c;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*a;case"seconds":case"second":case"secs":case"sec":case"s":return i*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=h?Math.round(t/h)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function r(t){return o(t,c,"day")||o(t,h,"hour")||o(t,a,"minute")||o(t,s,"second")||t+" ms"}function o(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}var s=1e3,a=60*s,h=60*a,c=24*h,l=365.25*c;t.exports=function(t,e){return e=e||{},"string"==typeof t?i(t):e.long?r(t):n(t)}},456:function(t,e,i){var n;(function(t,r){(function(){function o(t,e){function i(t){if(i[t]!==m)return i[t];var o;if("bug-string-char-index"==t)o="a"!="a"[0];else if("json"==t)o=i("json-stringify")&&i("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var c=e.stringify,l="function"==typeof c&&b;if(l){(s=function(){return 1}).toJSON=s;try{l="0"===c(0)&&"0"===c(new n)&&'""'==c(new r)&&c(y)===m&&c(m)===m&&c()===m&&"1"===c(s)&&"[1]"==c([s])&&"[null]"==c([m])&&"null"==c(null)&&"[null,null,null]"==c([m,y,null])&&c({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===c(null,s)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new h(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==c(new h(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new h(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==c(new h(-1))}catch(t){l=!1}}o=l}if("json-parse"==t){var p=e.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){s=p(a);var d=5==s.a.length&&1===s.a[0];if(d){try{d=!p('"\t"')}catch(t){}if(d)try{d=1!==p("01")}catch(t){}if(d)try{d=1!==p("1.")}catch(t){}}}}catch(t){d=!1}o=d}}return i[t]=!!o}t||(t=c.Object()),e||(e=c.Object());var n=t.Number||c.Number,r=t.String||c.String,s=t.Object||c.Object,h=t.Date||c.Date,l=t.SyntaxError||c.SyntaxError,p=t.TypeError||c.TypeError,d=t.Math||c.Math,u=t.JSON||c.JSON;"object"==typeof u&&u&&(e.stringify=u.stringify,e.parse=u.parse);var f,g,m,v=s.prototype,y=v.toString,b=new h(-0xc782b5b800cec);try{b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(t){}if(!i("json")){var x="[object Function]",w="[object Date]",k="[object Number]",S="[object String]",M="[object Array]",C="[object Boolean]",A=i("bug-string-char-index");if(!b)var T=d.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],_=function(t,e){return O[e]+365*(t-1970)+T((t-1969+(e=+(e>1)))/4)-T((t-1901+e)/100)+T((t-1601+e)/400)};if((f=v.hasOwnProperty)||(f=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=y?f=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,f=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,f.call(this,t)}),g=function(t,e){var i,n,r,o=0;(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i;for(r in n)f.call(n,r)&&o++;return i=n=null,o?g=2==o?function(t,e){var i,n={},r=y.call(t)==x;for(i in t)r&&"prototype"==i||f.call(n,i)||!(n[i]=1)||!f.call(t,i)||e(i)}:function(t,e){var i,n,r=y.call(t)==x;for(i in t)r&&"prototype"==i||!f.call(t,i)||(n="constructor"===i)||e(i);(n||f.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var i,r,o=y.call(t)==x,s=!o&&"function"!=typeof t.constructor&&a[typeof t.hasOwnProperty]&&t.hasOwnProperty||f;for(i in t)o&&"prototype"==i||!s.call(t,i)||e(i);for(r=n.length;i=n[--r];s.call(t,i)&&e(i));}),g(t,e)},!i("json-stringify")){var P={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},L="000000",E=function(t,e){return(L+(e||0)).slice(-t)},R="\\u00",I=function(t){for(var e='"',i=0,n=t.length,r=!A||n>10,o=r&&(A?t.split(""):t);i<n;i++){var s=t.charCodeAt(i);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=P[s];break;default:if(s<32){e+=R+E(2,s.toString(16));break}e+=r?o[i]:t.charAt(i)}}return e+'"'},D=function(t,e,i,n,r,o,s){var a,h,c,l,d,u,v,b,x,A,O,P,L,R,B,z;try{a=e[t]}catch(t){}if("object"==typeof a&&a)if(h=y.call(a),h!=w||f.call(a,"toJSON"))"function"==typeof a.toJSON&&(h!=k&&h!=S&&h!=M||f.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&a<1/0){if(_){for(d=T(a/864e5),c=T(d/365.2425)+1970-1;_(c+1,0)<=d;c++);for(l=T((d-_(c,0))/30.42);_(c,l+1)<=d;l++);d=1+d-_(c,l),u=(a%864e5+864e5)%864e5,v=T(u/36e5)%24,b=T(u/6e4)%60,x=T(u/1e3)%60,A=u%1e3}else c=a.getUTCFullYear(),l=a.getUTCMonth(),d=a.getUTCDate(),v=a.getUTCHours(),b=a.getUTCMinutes(),x=a.getUTCSeconds(),A=a.getUTCMilliseconds();a=(c<=0||c>=1e4?(c<0?"-":"+")+E(6,c<0?-c:c):E(4,c))+"-"+E(2,l+1)+"-"+E(2,d)+"T"+E(2,v)+":"+E(2,b)+":"+E(2,x)+"."+E(3,A)+"Z"}else a=null;if(i&&(a=i.call(e,t,a)),null===a)return"null";if(h=y.call(a),h==C)return""+a;if(h==k)return a>-1/0&&a<1/0?""+a:"null";if(h==S)return I(""+a);if("object"==typeof a){for(R=s.length;R--;)if(s[R]===a)throw p();if(s.push(a),O=[],B=o,o+=r,h==M){for(L=0,R=a.length;L<R;L++)P=D(L,a,i,n,r,o,s),O.push(P===m?"null":P);z=O.length?r?"[\n"+o+O.join(",\n"+o)+"\n"+B+"]":"["+O.join(",")+"]":"[]"}else g(n||a,function(t){var e=D(t,a,i,n,r,o,s);e!==m&&O.push(I(t)+":"+(r?" ":"")+e)}),z=O.length?r?"{\n"+o+O.join(",\n"+o)+"\n"+B+"}":"{"+O.join(",")+"}":"{}";return s.pop(),z}};e.stringify=function(t,e,i){var n,r,o,s;if(a[typeof e]&&e)if((s=y.call(e))==x)r=e;else if(s==M){o={};for(var h,c=0,l=e.length;c<l;h=e[c++],s=y.call(h),(s==S||s==k)&&(o[h]=1));}if(i)if((s=y.call(i))==k){if((i-=i%1)>0)for(n="",i>10&&(i=10);n.length<i;n+=" ");}else s==S&&(n=i.length<=10?i:i.slice(0,10));return D("",(h={},h[""]=t,h),r,o,n,"",[])}}if(!i("json-parse")){var B,z,N=r.fromCharCode,j={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},H=function(){throw B=z=null,l()},W=function(){for(var t,e,i,n,r,o=z,s=o.length;B<s;)switch(r=o.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=A?o.charAt(B):o[B],B++,t;case 34:for(t="@",B++;B<s;)if(r=o.charCodeAt(B),r<32)H();else if(92==r)switch(r=o.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=j[r],B++;break;case 117:for(e=++B,i=B+4;B<i;B++)r=o.charCodeAt(B),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||H();t+=N("0x"+o.slice(e,B));break;default:H()}else{if(34==r)break;for(r=o.charCodeAt(B),e=B;r>=32&&92!=r&&34!=r;)r=o.charCodeAt(++B);t+=o.slice(e,B)}if(34==o.charCodeAt(B))return B++,t;H();default:if(e=B,45==r&&(n=!0,r=o.charCodeAt(++B)),r>=48&&r<=57){for(48==r&&(r=o.charCodeAt(B+1),r>=48&&r<=57)&&H(),n=!1;B<s&&(r=o.charCodeAt(B),r>=48&&r<=57);B++);if(46==o.charCodeAt(B)){for(i=++B;i<s&&(r=o.charCodeAt(i),r>=48&&r<=57);i++);i==B&&H(),B=i}if(r=o.charCodeAt(B),101==r||69==r){for(r=o.charCodeAt(++B),43!=r&&45!=r||B++,i=B;i<s&&(r=o.charCodeAt(i),r>=48&&r<=57);i++);i==B&&H(),B=i}return+o.slice(e,B)}if(n&&H(),"true"==o.slice(B,B+4))return B+=4,!0;if("false"==o.slice(B,B+5))return B+=5,!1;if("null"==o.slice(B,B+4))return B+=4,null;H()}return"$"},X=function(t){var e,i;if("$"==t&&H(),"string"==typeof t){if("@"==(A?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=W(),"]"!=t;i||(i=!0))i&&(","==t?(t=W(),"]"==t&&H()):H()),","==t&&H(),e.push(X(t));return e}if("{"==t){for(e={};t=W(),"}"!=t;i||(i=!0))i&&(","==t?(t=W(),"}"==t&&H()):H()),","!=t&&"string"==typeof t&&"@"==(A?t.charAt(0):t[0])&&":"==W()||H(),e[t.slice(1)]=X(W());return e}H()}return t},G=function(t,e,i){var n=F(t,e,i);n===m?delete t[e]:t[e]=n},F=function(t,e,i){var n,r=t[e];if("object"==typeof r&&r)if(y.call(r)==M)for(n=r.length;n--;)G(r,n,i);else g(r,function(t){G(r,t,i)});return i.call(t,e,r)};e.parse=function(t,e){var i,n;return B=0,z=""+t,i=X(W()),"$"!=W()&&H(),B=z=null,e&&y.call(e)==x?F((n={},n[""]=i,n),"",e):i}}}return e.runInContext=o,e}var s=i(458),a={function:!0,object:!0},h=a[typeof e]&&e&&!e.nodeType&&e,c=a[typeof window]&&window||this,l=h&&a[typeof t]&&t&&!t.nodeType&&"object"==typeof r&&r;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(c=l),h&&!s)o(c,h);else{var p=c.JSON,d=c.JSON3,u=!1,f=o(c,c.JSON3={noConflict:function(){return u||(u=!0,c.JSON=p,c.JSON3=d,p=d=null),f}});c.JSON={parse:f.parse,stringify:f.stringify}}s&&(n=function(){return f}.call(e,i,e,t),!(void 0!==n&&(t.exports=n)))}).call(this)}).call(e,i(457)(t),function(){return this}())},457:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},458:function(t,e){(function(e){t.exports=e}).call(e,{})},459:function(t,e){function i(t){if(t)return n(t)}function n(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){n.off(t,i),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,r=0;r<i.length;r++)if(n=i[r],n===e||n.fn===e){i.splice(r,1);break}return this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks[t];if(i){i=i.slice(0);for(var n=0,r=i.length;n<r;++n)i[n].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},460:function(t,e,i){(function(t){var n=i(461),r=i(462);e.deconstructPacket=function(t){function e(t){if(!t)return t;if(r(t)){var o={_placeholder:!0,num:i.length};return i.push(t),o}if(n(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a]);return s}if("object"==typeof t&&!(t instanceof Date)){var s={};for(var h in t)s[h]=e(t[h]);return s}return t}var i=[],o=t.data,s=t;return s.data=e(o),s.attachments=i.length,{packet:s,buffers:i}},e.reconstructPacket=function(t,e){function i(t){if(t&&t._placeholder){var r=e[t.num];return r}if(n(t)){for(var o=0;o<t.length;o++)t[o]=i(t[o]);return t}if(t&&"object"==typeof t){for(var s in t)t[s]=i(t[s]);return t}return t}return t.data=i(t.data),t.attachments=void 0,t},e.removeBlobs=function(e,i){function o(e,h,c){if(!e)return e;if(t.Blob&&e instanceof Blob||t.File&&e instanceof File){s++;var l=new FileReader;l.onload=function(){c?c[h]=this.result:a=this.result,--s||i(a)},l.readAsArrayBuffer(e)}else if(n(e))for(var p=0;p<e.length;p++)o(e[p],p,e);else if(e&&"object"==typeof e&&!r(e))for(var d in e)o(e[d],d,e)}var s=0,a=e;o(a),s||i(a)}}).call(e,function(){return this}())},461:function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},462:function(t,e){(function(e){function i(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=i}).call(e,function(){return this}())},463:function(t,e,i){function n(t,e){return this instanceof n?(t&&"object"==typeof t&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new a.Encoder,this.decoder=new a.Decoder,this.autoConnect=e.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(t,e)}var r=i(464),o=i(493),s=i(494),a=i(452),h=i(496),c=i(497),l=i(449)("socket.io-client:manager"),p=i(491),d=i(498),u=Object.prototype.hasOwnProperty;t.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)u.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},n.prototype.updateSocketIds=function(){for(var t in this.nsps)u.call(this.nsps,t)&&(this.nsps[t].id=this.engine.id)},s(n.prototype),n.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},n.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(t){return arguments.length?(this._