@coolon/angular-ui-powerups 0.0.55 → 0.0.56
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/bundles/coolon-angular-ui-powerups.umd.js +10 -3
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/place/route/route-parameter-value.js +11 -4
- package/esm5/lib/place/route/route-parameter-value.js +11 -4
- package/fesm2015/coolon-angular-ui-powerups.js +10 -3
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +10 -3
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/pectin/lib/promise/deferred.class"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@angular/router"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("lodash"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/pectin/lib/promise/deferred.class","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@angular/router","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.deferred_class,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.ng.router,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,r,o,i,a,u,s,l,c,p,f,d,m,y,h,g,v,b,P,I){"use strict";var w="default"in b?b.default:b;I=I&&I.hasOwnProperty("default")?I.default:I;var C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function D(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function x(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(u.GarbageCollector),_=function(t){function e(){var e=t.call(this)||this;e.valueModel=new u.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var r=e;return e.errorStateMatcher={isErrorState:function(t,e){return r.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},D([u.UseDelegate(),R("design:type",u.ValueModel),R("design:paramtypes",[u.ValueModel])],e.prototype,"userValueModel",null),e}(E);var j=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),F=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),T=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},D([u.UseDelegate(),R("design:type",u.ListModel)],e.prototype,"optionsModel",void 0),D([u.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(_);var k=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),L=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u.assert.notNil(this.pectinCommand),this.pectinCommand instanceof u.UnaryCommand?this._commandParameterProvided||u.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&u.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,u.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof u.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(u.GarbageCollector);var V=function(t){function r(e,n,r){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=r,o}return M(r,t),r.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},r.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,u.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):u.Logger.get(this).warn("pectinFocusBinding was nil")},r.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},r.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},r.prototype.isFocused=function(t){return this.document.activeElement===t},r.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(u.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):u.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(r.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),r.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},r.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},r.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],r.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},r.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},r}(E);var N=new n.InjectionToken("InteractionContext"),B=function(){};var q,H,U=new n.InjectionToken("InteractionActivityData");t.ɵv=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:B,useValue:this},{provide:U,useValue:t.activityData}],parent:this.injector}),r=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(r,0,e),this.activityComponentRef.instance.onDone(t.onDone),this.activityComponentRef.instance.onCancel(t.onCancel)},t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.prototype.notifyReady=function(){this.activityComponentRef.instance.onActivityReady&&this.activityComponentRef.instance.onActivityReady()},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}(),q=t.ɵv||(t.ɵv={}),H=function(){function t(t){this.context=t}return t.prototype.alert=function(t){return u.lang.notImplemented()},t.prototype.confirm=function(t){return u.lang.notImplemented()},t.prototype.startActivity=function(t,e){return u.lang.notImplemented()},t}(),q.OutletInteractionContext=H;var z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._doneListeners=new u.EventListenerList,e._cancelListeners=new u.EventListenerList,e._finishListeners=new u.EventListenerList,e._busyModel=(new u.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.onDone=function(t){this._doneListeners.add(t)},e.prototype.onCancel=function(t){this._cancelListeners.add(t)},e.prototype.done=function(t){var e=this;return this._doneListeners.fireAndWait((function(e){return e(t)})).finally((function(){return e.finalizeAndDispose()}))},e.prototype.cancel=function(t){var e=this;return this._cancelListeners.fireAndWait((function(e){return e(t)})).finally((function(){return e.finalizeAndDispose()}))},e.prototype.onActivityReady=function(){},e.prototype.finalizeAndDispose=function(){this._finishListeners.fire((function(t){return t()})),[this._finishListeners,this._doneListeners,this._cancelListeners].forEach((function(t){return t.dispose()}))},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(E);var K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[U]}]}]},e}(z);var X=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,u.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done(true)">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[U]}]}]},e}(z);t.ɵu=function(e){function r(){var t=e.call(this)||this;t.activityOutletTabs=new u.MutableListModel,t.obsoleteTabs=[];var n=u.Dsl.disposeWith(t),r=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return t.lastActivityTab=r(t.activityOutletTabs).last().otherwise(t.initialActivityOutlet),t}return M(r,e),r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;u.Dsl.disposeWith(this).observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},r.prototype.initialise=function(t){this.initialActivityOutlet=O({},t,{interactionContext:this})},r.prototype.startActivity=function(t,e){var n=this,r=l.Deferred.defer(),o={interactionContext:this,activityClass:t,activityData:e,onDone:r.resolve,onCancel:r.reject};return this.activityOutletTabs.push(o),this.tabs.selectedIndex=this.activityOutletTabs.length,r.promise.finally((function(){n.obsoleteTabs.push(o),n.tabs.selectedIndex=n.activityOutletTabs.length-1}))},r.prototype.alert=function(t){return this.startActivity(K,t)},r.prototype.confirm=function(t){return this.startActivity(X,t)},r.prototype.onAnimationFinished=function(){var t=this;this.activityOutletTabs.value=this.activityOutletTabs.value.filter((function(e){return!t.obsoleteTabs.includes(e)})),this.outlets.toArray()[this.tabs.selectedIndex].notifyReady()},r.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="initialActivityOutlet"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityOutletTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],r.ctorParameters=function(){return[]},r.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivityOutlet:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[t.ɵv]}]},r}(E),function(t){function e(){}t.ActivityContext=e}(t.ɵu||(t.ɵu={}));var W=function(e){function r(t){var n=e.call(this)||this;return n.dialogService=t,c.assert.notNil(t),n}return M(r,e),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(e,n,r){var o=this;void 0===r&&(r=!0);var i={data:n,disableClose:r,panelClass:"dialog-interaction-service",autoFocus:!1},a=this.dialogService.open(t.ɵu,i);return new Promise((function(t,r){var i=a.componentInstance;i.parentInteractionContext=o,i.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),a.close(e)},onCancel:function(t){r(t),a.close(t)}}),a.updateSize()}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirm=function(t){return this._startActivity(X,t,!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(p.MatDialog))},token:r,providedIn:"root"}),r}(B);var G=function(){function r(){}return r.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,s.PortalModule],declarations:[t.ɵu,X,K,t.ɵv],exports:[t.ɵu,t.ɵv],entryComponents:[t.ɵu,X,K],providers:[W]}]}],r}(),Z=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},D([u.UseDelegate(),R("design:type",u.ValueModel)],t.prototype,"busyModel",void 0),D([u.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Y=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),$=function(){function t(t,e,n,r,o,i,a){this.component=t,this.path=e,this.authenticate=n,this.order=r,this.data=o,this.routeParameters=i,this.children=a}return t.prototype.getRouteParameters=function(){return this.routeParameters},t.prototype.getData=function(t,e){return this.data?w.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchData=function(t,e){var n=this;if(this.data){var r=t.find((function(t){return!w.isNil(n.data[t])}));return r?this.data[r]:e}return e},t}();var J,Q="PLACE_DEFINITION_OPTIONS",tt=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.initialiseBindings=function(t){var e=this;u.assert.isNil(this.resolvedParameters),this.resolvedParameters=t,this.placeDefinition.getRouteParameters().forEach((function(t){e.installBinding(t)}))},e.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new u.Binding(this.resolvedParameters,e,{toRight:function(e){return e.getValueOf(t)},toLeft:function(e,n){return n.replace(t,e)}}))},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.canDeactivate=function(){return!0},e.prototype.onPlaceReady=function(){},D([g.Memoize(),R("design:type",$),R("design:paramtypes",[])],e.prototype,"placeDefinition",null),e}(E),(J=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return u.lang.constructorChain(t).includes(J)},J.getRouteParameters=function(t){return c.Klass.get(t).getMetadataList(tt)},J.getDefinition=function(t){return Reflect.getMetadata(Q,t)},J.injectDefinition=function(t,e){Reflect.defineMetadata(Q,e,t)};var et=function(e){function r(){var n=e.call(this)||this,r=u.Dsl.disposeWith(n),o=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n}return M(r,e),r.prototype.getNav=function(t){var e=t.getData("nav");return{title:function(){return e?e.title():t.searchData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getData("navIcon",null)}}},r.prototype.ngOnInit=function(){},r.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}]},D([u.StoreInListModel("placesModel"),R("design:type",Array)],r.prototype,"places",void 0),D([u.UseDelegate(),R("design:type",u.ListModel)],r.prototype,"placesModel",void 0),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[$]),R("design:returntype",Object)],r.prototype,"getNav",null),r}(E);var nt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(et);var rt=function(){function t(t){this.router=t,this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=w.last(e);n&&!t.hasChanged(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router))},token:t,providedIn:"root"}),t}();var ot=function(){function t(t){this.router=t}return t.prototype.pushParameterChangesToRoute=function(t,e,n){var r=e.hasRouteId()?"..":".";this.router.navigate([r].concat(this.createRouteParameters(n),this.getChildPath(t.snapshot)),{relativeTo:t})},t.prototype.getRedirectUrlTree=function(t,e){var n=t.url,r=e.hasRouteId()&&e.getFormattedRouteId()?[n[0].path,e.getFormattedRouteId(),e.getFormattedParameters()]:[n[0].path,e.getFormattedParameters()];return console.log("redirect path",r),this.router.createUrlTree(r)},t.prototype.getChildPath=function(t){return w.flatten(t.children.map((function(t){return t.url})))},t.prototype.createRouteParameters=function(t){var e=t.getFormattedRouteId();return e?[e,t.getFormattedParameters()]:[t.getFormattedParameters()]},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router))},token:t,providedIn:"root"}),t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.type=e;var r=c.Opts.get(n);this.name=r.getOptional("as",t),this.remember=r.getOptional("remember",!1),this.defaultValue=r.getOptional("defaultValue",null)}return t.prototype.getSanitiser=function(e){return this.remember||!w.isNil(this.defaultValue)?new t.DefaultParameterSanitiser(this.remember,this.defaultValue,e.get(rt)):null},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e}(t);t.RouteId=n;var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e}(t);t.ValueParameter=r;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!0,e}return M(e,t),e}(t);t.ArrayParameter=o;var i=function(){function t(t,e,n){this.remember=t,this.defaultValue=e,this.placeHistory=n}return t.prototype.sanitise=function(t,e){var n=t.value;if(t.isMissing()){var r=w.first(this.placeHistory.getHistory(e.placeDefinition));return this.remember&&r&&(n=r.getValueOf(t.definition)),t.isEmptyValue(n)?this.defaultValue:n}return n},t}();t.DefaultParameterSanitiser=i}(t.ParameterDefinition||(t.ParameterDefinition={})),t.RouteParameterValue=function(){function t(t,e){this.definition=t,this.rawValue=e}return t.prototype.isRouteId=function(){return this.definition.isRouteId},t.prototype.hasChanged=function(t){return this.isEmpty()?!this.isEmptyValue(t):this.isEmptyValue(t)||!this.isSameValue(t)},t.prototype.isEmpty=function(){return this.isEmptyValue(this.value)},t.prototype.isMissing=function(){return w.isUndefined(this.rawValue)},t.prototype.sanitise=function(t,e){return A(this,void 0,void 0,(function(){var n;return x(this,(function(r){return(n=this.definition.getSanitiser(e))?[2,n.sanitise(this,t)]:[2,this.value]}))}))},t}(),function(t){t.create=function(e,n){return e.isArray?new t.Array(e,n.has(e.name)?n.getAll(e.name):void 0):new t.Scalar(e,n.has(e.name)?n.get(e.name):void 0)};var e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return M(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.definition.type.parse(this.rawValue)},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return this.value===t},n.prototype.replace=function(e){return new t.Scalar(this.definition,this.isEmptyValue(e)?void 0:this.definition.type.format(e))},n.prototype.formattedValue=function(){return this.isEmpty()?void 0:this.definition.type.format(this.value)},n.prototype.isEmptyValue=function(t){return w.isNil(t)},D([h.Memoize(),R("design:type",Object),R("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Scalar=e;var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return M(n,e),Object.defineProperty(n.prototype,"value",{get:function(){var t=this;return(this.rawValue||[]).filter((function(t){return!w.isEmpty(t)})).map((function(e){return t.definition.type.parse(e)}))},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return w.isEqual(this.value,t)},n.prototype.replace=function(e){var n=this;return new t.Array(this.definition,this.isEmptyValue(e)?void 0:e.map((function(t){return n.definition.type.format(t)})))},n.prototype.formattedValue=function(){var t=this;return this.isEmpty()?[]:this.value.map((function(e){return t.definition.type.format(e)}))},n.prototype.isEmptyValue=function(t){return w.isNil(t)||t.length<1},D([h.Memoize(),R("design:type",n),R("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Array=n}(t.RouteParameterValue||(t.RouteParameterValue={})),t.ParameterSnapshot=function(){function e(t,e){this.placeDefinition=t,this.parameters=e}var n;return e.prototype.hasChanged=function(t,e){void 0===e&&(e=!1);var n=this.parameters.find((function(e){return e.hasChanged(t.getValueOf(e.definition))}));return n&&e&&console.log({name:n.definition.name,mine:n.value,theirs:t.getValueOf(n.definition)}),!!n},e.prototype.getParameter=function(t){return this.parameters.find((function(e){return e.definition===t}))},e.prototype.getValueOf=function(t){var e=this.getParameter(t);return e?e.value:null},e.prototype.getRouteIdValue=function(){return this.getRouteIdParameter()?this.getRouteIdParameter().value:null},e.prototype.getParameterValue=function(t){var e=this.parameters.find((function(e){return e.definition.name===t}));return e?e.value:null},e.prototype.getRouteIdParameter=function(){return this.parameters.find((function(t){return t.definition.isRouteId}))},e.prototype.getRouteParameters=function(){return this.parameters.filter((function(t){return!t.definition.isRouteId}))},e.prototype.hasRouteId=function(){return!!this.getRouteIdParameter()},e.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParameter();return t?t.formattedValue():null},e.prototype.getNonEmptyParameters=function(){return this.parameters.filter((function(t){return!t.isEmpty()}))},e.prototype.getFormattedParameters=function(){var t={};this.getNonEmptyParameters().filter((function(t){return!t.definition.isRouteId})).forEach((function(e){return t[e.definition.name]=e.formattedValue()}));return t},e.prototype.getAllParameters=function(){var t={};this.parameters.forEach((function(e){t[e.definition.name]=e.value}));return t},e.prototype.replace=function(t,n){return new e(this.placeDefinition,this.parameters.map((function(e){return e.definition===t?e.replace(n):e})))},e.prototype.sanitise=function(t){return A(this,void 0,void 0,(function(){var e,n,r,o,i,a;return x(this,(function(u){switch(u.label){case 0:return this.hasRouteId()?[4,(e=this.getRouteIdParameter()).sanitise(this,t)]:[3,2];case 1:if(a=u.sent(),e.hasChanged(a))return[2,this.replace(e.definition,a)];u.label=2;case 2:n=this,r=this.getRouteParameters(),o=0,u.label=3;case 3:return o<r.length?[4,(i=r[o]).sanitise(this,t)]:[3,6];case 4:a=u.sent(),i.hasChanged(a)&&(n=n.replace(i.definition,a)),u.label=5;case 5:return o++,[3,3];case 6:return[2,n]}}))}))},D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.ParameterDefinition]),R("design:returntype",t.RouteParameterValue)],e.prototype,"getParameter",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.ParameterDefinition]),R("design:returntype","function"==typeof(n="undefined"!=typeof S&&S)?n:Object)],e.prototype,"getValueOf",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[String]),R("design:returntype",Object)],e.prototype,"getParameterValue",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.RouteParameterValue.Scalar)],e.prototype,"getRouteIdParameter",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",Array)],e.prototype,"getRouteParameters",null),e}(),function(e){e.create=function(r,o,i){var a=new n(o,i),u=r.getRouteParameters().map((function(e){return t.RouteParameterValue.create(e,a)}));return new e(r,u)};var n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new r(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),D([h.Memoize(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();var r=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.ParameterSnapshot||(t.ParameterSnapshot={}));var it=P.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),at=[P.query(":enter, :leave",it,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(-100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(100%)"}))],{optional:!0})])],ut=[P.query(":enter, :leave",it,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(-100%)"}))],{optional:!0})])];function st(t){return P.trigger("routeAnimations",[P.transition(":increment",ut,{params:{duration:t}}),P.transition(":decrement",at,{params:{duration:t}})])}var lt=st("0.3s");var ct=function(e){function r(n,r){var o=e.call(this)||this;o.router=n,o.placeHistory=r,o.animate=!0,o._activePlace=new u.MutableValueModel,o._incomingRouteChange=new u.Guard,o._inOutletUpdate=new u.Guard,o._activatedRouteModel=new u.MutableValueModel,o._placeDefinition=new u.MutableValueModel,o._resolvedParameters=new u.MutableValueModel;var i=u.Dsl.disposeWith(o),a=i.chain,s=i.valueOf,l=(i.before,i.when),c=(i.after,i.observe,i.switchOn,a(o._activatedRouteModel).pullObservableValue((function(t){return t.paramMap}))),p=a(o._activatedRouteModel).pullObservableValue((function(t){return t.url}));return o.placeConfigured=s.all(a(o._inOutletUpdate).isFalsey(),o._placeDefinition,c,p).areTruthy(),l.anyOf(c,p).changes((function(){var e=t.ParameterSnapshot.create(o._placeDefinition.value,c.value,p.value);o._incomingRouteChange.whileTrue((function(){o._resolvedParameters.value=e,o.placeHistory.add(e)}))}),{postponeUntil:o.placeConfigured}),l.valueOf(o._resolvedParameters).changes((function(t,e){o.placeHistory.add(t),o.pushChangesToRoute(t,e)}),{unless:o.incomingRouteChange}),o}return M(r,e),r.prototype.ngOnInit=function(){},Object.defineProperty(r.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"activePlace",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),r.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._resolvedParameters)}catch(t){console.error(t)}})),this.animate||this.animationDone()},r.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},r.prototype.getPlaceOrder=function(t){return this.animate&&t&&t.activatedRouteData&&t.activatedRouteData.placeOrder},r.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},r.prototype.pushChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.router.pushParameterChangesToRoute(n,e,t)},r.prototype.sanitise=function(t,e){return t},r.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="getPlaceOrder(routerOutlet)"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[lt],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],r.ctorParameters=function(){return[{type:ot},{type:rt}]},r.propDecorators={animate:[{type:n.Input}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},r}(E);var pt=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(et),ft=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,y.RouterModule,i.MatTabsModule,d.MatListModule,m.MatTooltipModule,f.MatIconModule],declarations:[Y,Z,ct,pt,nt],entryComponents:[Z],exports:[Z,ct,Y,pt,nt],providers:[]}]}],t}(),dt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[L,V,j,k,F,T],imports:[e.CommonModule,a.BrowserAnimationsModule,r.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,i.MatTabsModule,ft,G],exports:[L,V,j,k,F,T,G,ft]}]}],t}(),mt=P.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var yt=function(t,e){this.width=t,this.height=e};var ht,gt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,r,o){var i=t.call(this,r,o)||this;return i.top=e,i.left=n,i.width=r,i.height=o,i}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new gt(t.clientX-this.left,t.clientY-this.top):new gt(t.x-this.left,t.y-this.top)},e}(yt),(ht=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new ht(e.top,e.left,e.width,e.height)};var vt=function(e){function n(n,r){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=r,o._boundsModel=new u.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new I((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(E);function bt(){}function Pt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new $(n,e.path,!b.isNil(e.authenticate)&&e.authenticate,e.order,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):u.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Callback=e})(bt||(bt={})),function(t){function e(){}t.Options=e}(Pt||(Pt={}));var It=function(){function t(t,e){this.router=t,this.injector=e}return t.prototype.canDeactivate=function(t,e,n,r){var o="/"+t.placeDefinition.path;return!!r.url.startsWith(o)||t.canDeactivate()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();var wt,Ct,Mt,Ot,Dt=function(){function e(t,e){this.placeRouter=t,this.injector=e}return e.prototype.canActivate=function(e,n){var r=this;if(t.PlaceComponent.isPlaceComponentConstructor(e.component)){var o=t.PlaceComponent.getDefinition(e.component),i=t.ParameterSnapshot.create(o,e.paramMap,e.url);return i.sanitise(this.injector).then((function(t){return u.Logger.get(r).info("ParameterSnapshot.sanitise ->",t.getAllParameters()),!t.hasChanged(i,!0)||r.placeRouter.getRedirectUrlTree(e,t)}))}return u.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:ot},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(ot),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}();wt=t.ParameterType||(t.ParameterType={}),Ct=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Mt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return w.isNil(t)||w.isEmpty(t)?null:+t},t}(),Ot=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),wt.STRING=new Ct,wt.NUMBER=new Mt,wt.BOOLEAN=new Ot,t.ACTIVITY_DATA=U,t.AbstractActivity=z,t.AbstractInputComponent=_,t.AbstractPlaceNavigationComponent=et,t.ActivityContainerComponent=t.ɵu,t.ActivityOutletComponent=t.ɵv,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=dt,t.BusyOverlayComponent=Z,t.CommandDirective=L,t.ConfirmationDialogComponent=X,t.DEFINITION_META_DATA_KEY=Q,t.DialogInteractionService=W,t.Dimension=yt,t.DisposableComponent=E,t.EmptyStateComponent=Y,t.FocusBindingDirective=V,t.INTERACTION_CONTEXT=N,t.InteractionContext=B,t.InteractionModule=G,t.LEFT_RIGHT_PLACE_ANIMATION=lt,t.LeavePlaceGuard=It,t.ListPlaceNavComponent=nt,t.NumberInputComponent=j,t.PasswordInputComponent=F,t.Place=Pt,t.PlaceDefinition=$,t.PlaceHistory=rt,t.PlaceModule=ft,t.PlaceOutletComponent=ct,t.PlaceRouteGuard=Dt,t.PlaceRouter=ot,t.Point=gt,t.ROUTE_PARAMETER_LIST_KEY=tt,t.ResizeAwareComponent=vt,t.RouteId=function(e,n){return function(r,o){var i=new t.ParameterDefinition.RouteId(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.RouteParameter=function(e,n){return function(r,o){var i=new t.ParameterDefinition.ValueParameter(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.RouteParameterList=function(e,n){return function(r,o){var i=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.SelectInputComponent=T,t.StringInputComponent=k,t.TabbedPlaceNavigationComponent=pt,t.leftRightPlaceAnimation=st,t.slideDownAndUpAnimation=function(t,e){u.OptionsHelper.get(e).getOptional("duration","100ms");var n=u.OptionsHelper.get(e).getOptional("hiddenStyleDef",mt);return P.trigger(t,[P.transition(":enter",[n,P.animate("100ms")]),P.transition(":leave",[P.animate("100ms",n)])])},t.ɵa=L,t.ɵb=V,t.ɵba=K,t.ɵbc=W,t.ɵbd=B,t.ɵc=E,t.ɵd=j,t.ɵe=_,t.ɵf=k,t.ɵg=F,t.ɵh=T,t.ɵi=ft,t.ɵj=Y,t.ɵk=Z,t.ɵl=ct,t.ɵm=st,t.ɵn=lt,t.ɵo=ot,t.ɵp=rt,t.ɵq=pt,t.ɵr=et,t.ɵs=nt,t.ɵt=G,t.ɵw=X,t.ɵx=z,t.ɵy=U,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/pectin/lib/promise/deferred.class"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@angular/router"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("lodash"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/pectin/lib/promise/deferred.class","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@angular/router","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.deferred_class,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.ng.router,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,r,o,i,a,u,s,l,c,p,f,d,m,y,h,g,v,b,P,I){"use strict";var w="default"in b?b.default:b;I=I&&I.hasOwnProperty("default")?I.default:I;var C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var O=function(){return(O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function D(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,u)}s((r=r.apply(t,e||[])).next())}))}function x(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(u.GarbageCollector),_=function(t){function e(){var e=t.call(this)||this;e.valueModel=new u.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var r=e;return e.errorStateMatcher={isErrorState:function(t,e){return r.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},D([u.UseDelegate(),R("design:type",u.ValueModel),R("design:paramtypes",[u.ValueModel])],e.prototype,"userValueModel",null),e}(E);var j=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),F=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),T=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},D([u.UseDelegate(),R("design:type",u.ListModel)],e.prototype,"optionsModel",void 0),D([u.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(_);var k=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),L=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u.assert.notNil(this.pectinCommand),this.pectinCommand instanceof u.UnaryCommand?this._commandParameterProvided||u.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&u.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,u.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof u.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(u.GarbageCollector);var V=function(t){function r(e,n,r){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=r,o}return M(r,t),r.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},r.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,u.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):u.Logger.get(this).warn("pectinFocusBinding was nil")},r.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},r.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},r.prototype.isFocused=function(t){return this.document.activeElement===t},r.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(u.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):u.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(r.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),r.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},r.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},r.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],r.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},r.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},r}(E);var N=new n.InjectionToken("InteractionContext"),B=function(){};var q,H,U=new n.InjectionToken("InteractionActivityData");t.ɵv=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:B,useValue:this},{provide:U,useValue:t.activityData}],parent:this.injector}),r=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(r,0,e),this.activityComponentRef.instance.onDone(t.onDone),this.activityComponentRef.instance.onCancel(t.onCancel)},t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.prototype.notifyReady=function(){this.activityComponentRef.instance.onActivityReady&&this.activityComponentRef.instance.onActivityReady()},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}(),q=t.ɵv||(t.ɵv={}),H=function(){function t(t){this.context=t}return t.prototype.alert=function(t){return u.lang.notImplemented()},t.prototype.confirm=function(t){return u.lang.notImplemented()},t.prototype.startActivity=function(t,e){return u.lang.notImplemented()},t}(),q.OutletInteractionContext=H;var z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._doneListeners=new u.EventListenerList,e._cancelListeners=new u.EventListenerList,e._finishListeners=new u.EventListenerList,e._busyModel=(new u.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.onDone=function(t){this._doneListeners.add(t)},e.prototype.onCancel=function(t){this._cancelListeners.add(t)},e.prototype.done=function(t){var e=this;return this._doneListeners.fireAndWait((function(e){return e(t)})).finally((function(){return e.finalizeAndDispose()}))},e.prototype.cancel=function(t){var e=this;return this._cancelListeners.fireAndWait((function(e){return e(t)})).finally((function(){return e.finalizeAndDispose()}))},e.prototype.onActivityReady=function(){},e.prototype.finalizeAndDispose=function(){this._finishListeners.fire((function(t){return t()})),[this._finishListeners,this._doneListeners,this._cancelListeners].forEach((function(t){return t.dispose()}))},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(E);var K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[U]}]}]},e}(z);var X=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,u.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done(true)">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[U]}]}]},e}(z);t.ɵu=function(e){function r(){var t=e.call(this)||this;t.activityOutletTabs=new u.MutableListModel,t.obsoleteTabs=[];var n=u.Dsl.disposeWith(t),r=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return t.lastActivityTab=r(t.activityOutletTabs).last().otherwise(t.initialActivityOutlet),t}return M(r,e),r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;u.Dsl.disposeWith(this).observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},r.prototype.initialise=function(t){this.initialActivityOutlet=O({},t,{interactionContext:this})},r.prototype.startActivity=function(t,e){var n=this,r=l.Deferred.defer(),o={interactionContext:this,activityClass:t,activityData:e,onDone:r.resolve,onCancel:r.reject};return this.activityOutletTabs.push(o),this.tabs.selectedIndex=this.activityOutletTabs.length,r.promise.finally((function(){n.obsoleteTabs.push(o),n.tabs.selectedIndex=n.activityOutletTabs.length-1}))},r.prototype.alert=function(t){return this.startActivity(K,t)},r.prototype.confirm=function(t){return this.startActivity(X,t)},r.prototype.onAnimationFinished=function(){var t=this;this.activityOutletTabs.value=this.activityOutletTabs.value.filter((function(e){return!t.obsoleteTabs.includes(e)})),this.outlets.toArray()[this.tabs.selectedIndex].notifyReady()},r.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="initialActivityOutlet"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityOutletTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],r.ctorParameters=function(){return[]},r.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivityOutlet:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[t.ɵv]}]},r}(E),function(t){function e(){}t.ActivityContext=e}(t.ɵu||(t.ɵu={}));var W=function(e){function r(t){var n=e.call(this)||this;return n.dialogService=t,c.assert.notNil(t),n}return M(r,e),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(e,n,r){var o=this;void 0===r&&(r=!0);var i={data:n,disableClose:r,panelClass:"dialog-interaction-service",autoFocus:!1},a=this.dialogService.open(t.ɵu,i);return new Promise((function(t,r){var i=a.componentInstance;i.parentInteractionContext=o,i.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),a.close(e)},onCancel:function(t){r(t),a.close(t)}}),a.updateSize()}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirm=function(t){return this._startActivity(X,t,!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(p.MatDialog))},token:r,providedIn:"root"}),r}(B);var G=function(){function r(){}return r.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,s.PortalModule],declarations:[t.ɵu,X,K,t.ɵv],exports:[t.ɵu,t.ɵv],entryComponents:[t.ɵu,X,K],providers:[W]}]}],r}(),Z=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},D([u.UseDelegate(),R("design:type",u.ValueModel)],t.prototype,"busyModel",void 0),D([u.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Y=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),$=function(){function t(t,e,n,r,o,i,a){this.component=t,this.path=e,this.authenticate=n,this.order=r,this.data=o,this.routeParameters=i,this.children=a}return t.prototype.getRouteParameters=function(){return this.routeParameters},t.prototype.getData=function(t,e){return this.data?w.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchData=function(t,e){var n=this;if(this.data){var r=t.find((function(t){return!w.isNil(n.data[t])}));return r?this.data[r]:e}return e},t}();var J,Q="PLACE_DEFINITION_OPTIONS",tt=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.initialiseBindings=function(t){var e=this;u.assert.isNil(this.resolvedParameters),this.resolvedParameters=t,this.placeDefinition.getRouteParameters().forEach((function(t){e.installBinding(t)}))},e.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new u.Binding(this.resolvedParameters,e,{toRight:function(e){return e.getValueOf(t)},toLeft:function(e,n){return n.replace(t,e)}}))},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.canDeactivate=function(){return!0},e.prototype.onPlaceReady=function(){},D([g.Memoize(),R("design:type",$),R("design:paramtypes",[])],e.prototype,"placeDefinition",null),e}(E),(J=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return u.lang.constructorChain(t).includes(J)},J.getRouteParameters=function(t){return c.Klass.get(t).getMetadataList(tt)},J.getDefinition=function(t){return Reflect.getMetadata(Q,t)},J.injectDefinition=function(t,e){Reflect.defineMetadata(Q,e,t)};var et=function(e){function r(){var n=e.call(this)||this,r=u.Dsl.disposeWith(n),o=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n}return M(r,e),r.prototype.getNav=function(t){var e=t.getData("nav");return{title:function(){return e?e.title():t.searchData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getData("navIcon",null)}}},r.prototype.ngOnInit=function(){},r.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}]},D([u.StoreInListModel("placesModel"),R("design:type",Array)],r.prototype,"places",void 0),D([u.UseDelegate(),R("design:type",u.ListModel)],r.prototype,"placesModel",void 0),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[$]),R("design:returntype",Object)],r.prototype,"getNav",null),r}(E);var nt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(et);var rt=function(){function t(t){this.router=t,this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=w.last(e);n&&!t.hasChanged(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router))},token:t,providedIn:"root"}),t}();var ot=function(){function t(t){this.router=t}return t.prototype.pushParameterChangesToRoute=function(t,e,n){var r=e.hasRouteId()?"..":".";this.router.navigate([r].concat(this.createRouteParameters(n),this.getChildPath(t.snapshot)),{relativeTo:t})},t.prototype.getRedirectUrlTree=function(t,e){var n=t.url,r=e.hasRouteId()&&e.getFormattedRouteId()?[n[0].path,e.getFormattedRouteId(),e.getFormattedParameters()]:[n[0].path,e.getFormattedParameters()];return console.log("redirect path",r),this.router.createUrlTree(r)},t.prototype.getChildPath=function(t){return w.flatten(t.children.map((function(t){return t.url})))},t.prototype.createRouteParameters=function(t){var e=t.getFormattedRouteId();return e?[e,t.getFormattedParameters()]:[t.getFormattedParameters()]},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router))},token:t,providedIn:"root"}),t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.type=e;var r=c.Opts.get(n);this.name=r.getOptional("as",t),this.remember=r.getOptional("remember",!1),this.defaultValue=r.getOptional("defaultValue",null)}return t.prototype.getSanitiser=function(e){return this.remember||!w.isNil(this.defaultValue)?new t.DefaultParameterSanitiser(this.remember,this.defaultValue,e.get(rt)):null},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e}(t);t.RouteId=n;var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e}(t);t.ValueParameter=r;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!0,e}return M(e,t),e}(t);t.ArrayParameter=o;var i=function(){function t(t,e,n){this.remember=t,this.defaultValue=e,this.placeHistory=n}return t.prototype.sanitise=function(t,e){var n=t.value;if(t.isMissing()){var r=w.first(this.placeHistory.getHistory(e.placeDefinition));return this.remember&&r&&(n=r.getValueOf(t.definition)),t.isEmptyValue(n)?this.defaultValue:n}return n},t}();t.DefaultParameterSanitiser=i}(t.ParameterDefinition||(t.ParameterDefinition={})),t.RouteParameterValue=function(){function t(t,e){this.definition=t,this.rawValue=e}return t.prototype.isRouteId=function(){return this.definition.isRouteId},t.prototype.hasChanged=function(t){return this.isEmpty()?!this.isEmptyValue(t):this.isEmptyValue(t)||!this.isSameValue(t)},t.prototype.isEmpty=function(){return this.isEmptyValue(this.value)},t.prototype.isMissing=function(){return w.isUndefined(this.rawValue)},t.prototype.sanitise=function(t,e){return A(this,void 0,void 0,(function(){var n;return x(this,(function(r){return(n=this.definition.getSanitiser(e))?[2,n.sanitise(this,t)]:[2,this.value]}))}))},t}(),function(t){t.create=function(e,n){if(e.isArray)return new t.Array(e,n.has(e.name)?n.getAll(e.name):void 0);var r=n.has(e.name)?n.get(e.name):void 0;return r=e.isRouteId&&w.isEmpty(r)?void 0:r,new t.Scalar(e,r)};var e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return M(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.definition.type.parse(this.rawValue)},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return this.value===t},n.prototype.replace=function(e){return new t.Scalar(this.definition,this.isEmptyValue(e)?void 0:this.definition.type.format(e))},n.prototype.formattedValue=function(){return this.isEmpty()?void 0:this.definition.type.format(this.value)},n.prototype.isEmptyValue=function(t){return w.isNil(t)},D([h.Memoize(),R("design:type",Object),R("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Scalar=e;var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return M(n,e),Object.defineProperty(n.prototype,"value",{get:function(){var t=this;return(this.rawValue||[]).filter((function(t){return!w.isEmpty(t)})).map((function(e){return t.definition.type.parse(e)}))},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return w.isEqual(this.value,t)},n.prototype.replace=function(e){var n=this;return new t.Array(this.definition,this.isEmptyValue(e)?void 0:e.map((function(t){return n.definition.type.format(t)})))},n.prototype.formattedValue=function(){var t=this;return this.isEmpty()?[]:this.value.map((function(e){return t.definition.type.format(e)}))},n.prototype.isEmptyValue=function(t){return w.isNil(t)||t.length<1},D([h.Memoize(),R("design:type",n),R("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Array=n}(t.RouteParameterValue||(t.RouteParameterValue={})),t.ParameterSnapshot=function(){function e(t,e){this.placeDefinition=t,this.parameters=e}var n;return e.prototype.hasChanged=function(t,e){void 0===e&&(e=!1);var n=this.parameters.find((function(e){return e.hasChanged(t.getValueOf(e.definition))}));return n&&e&&console.log({name:n.definition.name,mine:n.value,theirs:t.getValueOf(n.definition)}),!!n},e.prototype.getParameter=function(t){return this.parameters.find((function(e){return e.definition===t}))},e.prototype.getValueOf=function(t){var e=this.getParameter(t);return e?e.value:null},e.prototype.getRouteIdValue=function(){return this.getRouteIdParameter()?this.getRouteIdParameter().value:null},e.prototype.getParameterValue=function(t){var e=this.parameters.find((function(e){return e.definition.name===t}));return e?e.value:null},e.prototype.getRouteIdParameter=function(){return this.parameters.find((function(t){return t.definition.isRouteId}))},e.prototype.getRouteParameters=function(){return this.parameters.filter((function(t){return!t.definition.isRouteId}))},e.prototype.hasRouteId=function(){return!!this.getRouteIdParameter()},e.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParameter();return t?t.formattedValue():null},e.prototype.getNonEmptyParameters=function(){return this.parameters.filter((function(t){return!t.isEmpty()}))},e.prototype.getFormattedParameters=function(){var t={};this.getNonEmptyParameters().filter((function(t){return!t.definition.isRouteId})).forEach((function(e){return t[e.definition.name]=e.formattedValue()}));return t},e.prototype.getAllParameters=function(){var t={};this.parameters.forEach((function(e){t[e.definition.name]=e.value}));return t},e.prototype.replace=function(t,n){return new e(this.placeDefinition,this.parameters.map((function(e){return e.definition===t?e.replace(n):e})))},e.prototype.sanitise=function(t){return A(this,void 0,void 0,(function(){var e,n,r,o,i,a;return x(this,(function(u){switch(u.label){case 0:return this.hasRouteId()?[4,(e=this.getRouteIdParameter()).sanitise(this,t)]:[3,2];case 1:if(a=u.sent(),e.hasChanged(a))return[2,this.replace(e.definition,a)];u.label=2;case 2:n=this,r=this.getRouteParameters(),o=0,u.label=3;case 3:return o<r.length?[4,(i=r[o]).sanitise(this,t)]:[3,6];case 4:a=u.sent(),i.hasChanged(a)&&(n=n.replace(i.definition,a)),u.label=5;case 5:return o++,[3,3];case 6:return[2,n]}}))}))},D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.ParameterDefinition]),R("design:returntype",t.RouteParameterValue)],e.prototype,"getParameter",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.ParameterDefinition]),R("design:returntype","function"==typeof(n="undefined"!=typeof S&&S)?n:Object)],e.prototype,"getValueOf",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[String]),R("design:returntype",Object)],e.prototype,"getParameterValue",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.RouteParameterValue.Scalar)],e.prototype,"getRouteIdParameter",null),D([h.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",Array)],e.prototype,"getRouteParameters",null),e}(),function(e){e.create=function(r,o,i){var a=new n(o,i),u=r.getRouteParameters().map((function(e){return t.RouteParameterValue.create(e,a)}));return new e(r,u)};var n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new r(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),D([h.Memoize(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();var r=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.ParameterSnapshot||(t.ParameterSnapshot={}));var it=P.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),at=[P.query(":enter, :leave",it,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(-100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(100%)"}))],{optional:!0})])],ut=[P.query(":enter, :leave",it,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(-100%)"}))],{optional:!0})])];function st(t){return P.trigger("routeAnimations",[P.transition(":increment",ut,{params:{duration:t}}),P.transition(":decrement",at,{params:{duration:t}})])}var lt=st("0.3s");var ct=function(e){function r(n,r){var o=e.call(this)||this;o.router=n,o.placeHistory=r,o.animate=!0,o._activePlace=new u.MutableValueModel,o._incomingRouteChange=new u.Guard,o._inOutletUpdate=new u.Guard,o._activatedRouteModel=new u.MutableValueModel,o._placeDefinition=new u.MutableValueModel,o._resolvedParameters=new u.MutableValueModel;var i=u.Dsl.disposeWith(o),a=i.chain,s=i.valueOf,l=(i.before,i.when),c=(i.after,i.observe,i.switchOn,a(o._activatedRouteModel).pullObservableValue((function(t){return t.paramMap}))),p=a(o._activatedRouteModel).pullObservableValue((function(t){return t.url}));return o.placeConfigured=s.all(a(o._inOutletUpdate).isFalsey(),o._placeDefinition,c,p).areTruthy(),l.anyOf(c,p).changes((function(){var e=t.ParameterSnapshot.create(o._placeDefinition.value,c.value,p.value);o._incomingRouteChange.whileTrue((function(){o._resolvedParameters.value=e,o.placeHistory.add(e)}))}),{postponeUntil:o.placeConfigured}),l.valueOf(o._resolvedParameters).changes((function(t,e){o.placeHistory.add(t),o.pushChangesToRoute(t,e)}),{unless:o.incomingRouteChange}),o}return M(r,e),r.prototype.ngOnInit=function(){},Object.defineProperty(r.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"activePlace",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),r.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._resolvedParameters)}catch(t){console.error(t)}})),this.animate||this.animationDone()},r.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},r.prototype.getPlaceOrder=function(t){return this.animate&&t&&t.activatedRouteData&&t.activatedRouteData.placeOrder},r.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},r.prototype.pushChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.router.pushParameterChangesToRoute(n,e,t)},r.prototype.sanitise=function(t,e){return t},r.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="getPlaceOrder(routerOutlet)"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[lt],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],r.ctorParameters=function(){return[{type:ot},{type:rt}]},r.propDecorators={animate:[{type:n.Input}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},r}(E);var pt=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(et),ft=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,y.RouterModule,i.MatTabsModule,d.MatListModule,m.MatTooltipModule,f.MatIconModule],declarations:[Y,Z,ct,pt,nt],entryComponents:[Z],exports:[Z,ct,Y,pt,nt],providers:[]}]}],t}(),dt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[L,V,j,k,F,T],imports:[e.CommonModule,a.BrowserAnimationsModule,r.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,i.MatTabsModule,ft,G],exports:[L,V,j,k,F,T,G,ft]}]}],t}(),mt=P.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var yt=function(t,e){this.width=t,this.height=e};var ht,gt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,r,o){var i=t.call(this,r,o)||this;return i.top=e,i.left=n,i.width=r,i.height=o,i}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new gt(t.clientX-this.left,t.clientY-this.top):new gt(t.x-this.left,t.y-this.top)},e}(yt),(ht=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new ht(e.top,e.left,e.width,e.height)};var vt=function(e){function n(n,r){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=r,o._boundsModel=new u.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new I((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(E);function bt(){}function Pt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new $(n,e.path,!b.isNil(e.authenticate)&&e.authenticate,e.order,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):u.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Callback=e})(bt||(bt={})),function(t){function e(){}t.Options=e}(Pt||(Pt={}));var It=function(){function t(t,e){this.router=t,this.injector=e}return t.prototype.canDeactivate=function(t,e,n,r){var o="/"+t.placeDefinition.path;return!!r.url.startsWith(o)||t.canDeactivate()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();var wt,Ct,Mt,Ot,Dt=function(){function e(t,e){this.placeRouter=t,this.injector=e}return e.prototype.canActivate=function(e,n){var r=this;if(t.PlaceComponent.isPlaceComponentConstructor(e.component)){var o=t.PlaceComponent.getDefinition(e.component),i=t.ParameterSnapshot.create(o,e.paramMap,e.url);return i.sanitise(this.injector).then((function(t){return u.Logger.get(r).info("ParameterSnapshot.sanitise ->",t.getAllParameters()),!t.hasChanged(i,!0)||r.placeRouter.getRedirectUrlTree(e,t)}))}return u.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:ot},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(ot),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}();wt=t.ParameterType||(t.ParameterType={}),Ct=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Mt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return w.isNil(t)||w.isEmpty(t)?null:+t},t}(),Ot=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),wt.STRING=new Ct,wt.NUMBER=new Mt,wt.BOOLEAN=new Ot,t.ACTIVITY_DATA=U,t.AbstractActivity=z,t.AbstractInputComponent=_,t.AbstractPlaceNavigationComponent=et,t.ActivityContainerComponent=t.ɵu,t.ActivityOutletComponent=t.ɵv,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=dt,t.BusyOverlayComponent=Z,t.CommandDirective=L,t.ConfirmationDialogComponent=X,t.DEFINITION_META_DATA_KEY=Q,t.DialogInteractionService=W,t.Dimension=yt,t.DisposableComponent=E,t.EmptyStateComponent=Y,t.FocusBindingDirective=V,t.INTERACTION_CONTEXT=N,t.InteractionContext=B,t.InteractionModule=G,t.LEFT_RIGHT_PLACE_ANIMATION=lt,t.LeavePlaceGuard=It,t.ListPlaceNavComponent=nt,t.NumberInputComponent=j,t.PasswordInputComponent=F,t.Place=Pt,t.PlaceDefinition=$,t.PlaceHistory=rt,t.PlaceModule=ft,t.PlaceOutletComponent=ct,t.PlaceRouteGuard=Dt,t.PlaceRouter=ot,t.Point=gt,t.ROUTE_PARAMETER_LIST_KEY=tt,t.ResizeAwareComponent=vt,t.RouteId=function(e,n){return function(r,o){var i=new t.ParameterDefinition.RouteId(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.RouteParameter=function(e,n){return function(r,o){var i=new t.ParameterDefinition.ValueParameter(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.RouteParameterList=function(e,n){return function(r,o){var i=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n);c.Klass.get(r).addToOwnMetadataList(tt,i),u.UseDelegate()(r,o)}},t.SelectInputComponent=T,t.StringInputComponent=k,t.TabbedPlaceNavigationComponent=pt,t.leftRightPlaceAnimation=st,t.slideDownAndUpAnimation=function(t,e){u.OptionsHelper.get(e).getOptional("duration","100ms");var n=u.OptionsHelper.get(e).getOptional("hiddenStyleDef",mt);return P.trigger(t,[P.transition(":enter",[n,P.animate("100ms")]),P.transition(":leave",[P.animate("100ms",n)])])},t.ɵa=L,t.ɵb=V,t.ɵba=K,t.ɵbc=W,t.ɵbd=B,t.ɵc=E,t.ɵd=j,t.ɵe=_,t.ɵf=k,t.ɵg=F,t.ɵh=T,t.ɵi=ft,t.ɵj=Y,t.ɵk=Z,t.ɵl=ct,t.ɵm=st,t.ɵn=lt,t.ɵo=ot,t.ɵp=rt,t.ɵq=pt,t.ɵr=et,t.ɵs=nt,t.ɵt=G,t.ɵw=X,t.ɵx=z,t.ɵy=U,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|