@coolon/angular-ui-powerups 0.0.90 → 0.0.91
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 +468 -396
- 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/coolon-angular-ui-powerups.d.ts +19 -18
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +18 -17
- package/esm2015/lib/directives/command.directive.js +28 -5
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -7
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +3 -8
- package/esm2015/lib/interaction/interaction-context.js +70 -14
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +11 -19
- package/esm2015/lib/place/navigation-session.js +182 -39
- package/esm2015/lib/place/place-component.js +4 -19
- package/esm2015/lib/place/place-router.js +65 -31
- package/esm2015/lib/place/route/guards/enter-place-guard.service.js +2 -2
- package/esm2015/lib/place/route/guards/leave-place.guard.js +7 -177
- package/esm5/coolon-angular-ui-powerups.js +18 -17
- package/esm5/lib/directives/command.directive.js +32 -5
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -11
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +3 -12
- package/esm5/lib/interaction/interaction-context.js +89 -27
- package/esm5/lib/interaction/services/dialog-interaction.service.js +11 -22
- package/esm5/lib/place/navigation-session.js +225 -54
- package/esm5/lib/place/place-component.js +4 -35
- package/esm5/lib/place/place-router.js +75 -37
- package/esm5/lib/place/route/guards/enter-place-guard.service.js +2 -2
- package/esm5/lib/place/route/guards/leave-place.guard.js +7 -176
- package/fesm2015/coolon-angular-ui-powerups.js +353 -299
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +430 -359
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/directives/command.directive.d.ts +2 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +1 -2
- package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +3 -4
- package/lib/interaction/interaction-context.d.ts +6 -3
- package/lib/interaction/services/dialog-interaction.service.d.ts +3 -5
- package/lib/place/navigation-session.d.ts +26 -9
- package/lib/place/place-component.d.ts +4 -9
- package/lib/place/place-router.d.ts +6 -3
- package/lib/place/route/guards/leave-place.guard.d.ts +2 -10
- 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("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),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","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@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.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,m,y,h,g,v,b,P){"use strict";var C="default"in l?l.default:l;P=P&&P.hasOwnProperty("default")?P.default:P;var I=function(t,e){return(I=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}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var D=function(){return(D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function A(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function R(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function w(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}var F=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(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.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 s.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}(s.GarbageCollector);var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),S=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return M(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.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]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(j);var E=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[F,S]}]}],t}(),T=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.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"]}]},O([s.UseDelegate(),A("design:type",s.ValueModel),A("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(j);var N=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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}(T),L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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),V=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:"aup-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}]},O([s.UseDelegate(),A("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),O([s.StoreInListModel("optionsModel"),A("design:type",Array)],e.prototype,"options",void 0),e}(T);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:"aup-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}(T),U=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),B=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[N,k,L,V,U],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E],exports:[N,k,L,V,U]}]}],t}(),H=function(t){function e(){return t.call(this)||this}return M(e,t),Object.defineProperty(e.prototype,"currentActivity",{get:function(){return l.last(this.activityList.value)},enumerable:!0,configurable:!0}),e.prototype.confirm=function(t){return R(this,void 0,void 0,(function(){return w(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.confirmOrReject(t)];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}}))}))},e}(s.GarbageCollector);var q=new n.InjectionToken("InteractionActivityData");t.ɵbf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},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}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbf||(t.ɵbf={}));var G=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:H,useValue:this.interactionContext},{provide:q,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityComponentRef.instance.initialise(t),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"aup-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}();var z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(t.ɵbf),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:"aup-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<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(z);t.ɵbh=function(t){function e(e,n){var i=t.call(this)||this;return i.config=e,i.interactionContext=n,s.assert.notNil(e),i}return M(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"aup-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<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]},{type:H}]},e}(z),function(t){function e(){}t.Data=e}(t.ɵbh||(t.ɵbh={}));var W=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.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:"aup-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<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(z);var X=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Z=function(e){function i(){var t=e.call(this)||this;t.throttledNestedActivityFinishEvents=new s.MutableStream,t.initialActivityOutletContextEvent=new n.EventEmitter,t.dynamicHeight=!1,t.activityTabs=new s.MutableListModel,t._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(t),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(t.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return t.onNestedActivityFinished()})),t}return M(i,e),Object.defineProperty(i.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext},set:function(t){s.assert.isNil(this._initialActivityOutletContext),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext=t,this.activityTabs.push(new X(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return!!this._initialActivityOutletContext},Object.defineProperty(i.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFinished",{get:function(){return!this._initialActivityOutletContext},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},i.prototype.startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new X(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},i.prototype.alert=function(t){return this.startActivity(K,t)},i.prototype.confirmOrReject=function(t){return this.startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this.startActivity(t.ɵbh,{confirm:e,activityType:n,data:i})},i.prototype.finishInitialActivity=function(){this._initialActivityOutletContext=null,this.initialActivityOutletContextEvent.emit(null)},i.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},i.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},i.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},i.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},i.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},i.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[G]}]},i}(H);var Y=function(e){function i(){return e.call(this)||this}return M(i,e),i.prototype.ngOnInit=function(){},Object.defineProperty(i.prototype,"activityList",{get:function(){return this.interactionContext.activityList},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return this.interactionContext.isActive()},i.prototype.alert=function(t){return this._startActivity(K,t)},i.prototype.confirmOrReject=function(t){return this._startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbh,{confirm:e,activityType:n,data:i})},i.prototype.startActivity=function(t,e){return this._startActivity(t,e)},i.prototype._startActivity=function(t,e){var n=this;return new Promise((function(i,o){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i(t)},onCancel:function(t){o(t)}}}))},i.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(H);var J=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),$=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Q=function(t){function e(){return t.call(this,{initialValue:!1})||this}return M(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()},e}(s.ValueModel),tt=function(i){function r(t,e,n,o,r){var a=i.call(this)||this;a.dialogService=t,a.location=e,a.router=n,a.dialogServiceDefaults=o,a.matDialogDefaultConfig=r,a._activityList=new s.DelegatingListModel,a.startingGuard=new Q,p.assert.notNil(t);var c=s.Dsl.disposeWith(a),u=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;return a.active=u(a._activityList).isNotEmpty(),a}return M(r,i),r.prototype.isActive=function(){return this.active.value},r.prototype.cancelActivity=function(){this.currentActivity.cancel(null)},Object.defineProperty(r.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(t,e,n){var i=this;return void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this.startingGuard.whileTrue((function(){console.log("###### STARTING");var o=i,r=D({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},i.matDialogDefaultConfig,i.dialogServiceDefaults,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),a=i.dialogService.open(Z,r);return new Promise((function(n,i){var r=a.componentInstance;o.safelyUpdateActivityListDelegate(r.activityList),r.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize()})).finally((function(){console.log("###### FINISHED"),o.safelyUpdateActivityListDelegate(null)}))}))},r.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e._activityList.setDelegate(t)}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirmOrReject=function(t){return this._startActivity(W,t,!0)},r.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbh,{confirm:e,activityType:n,data:i},!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog},{type:e.Location},{type:u.Router},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[$]}]},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[d.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(d.MatDialog),n.ɵɵinject(e.Location),n.ɵɵinject(u.Router),n.ɵɵinject($,8),n.ɵɵinject(d.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:r,providedIn:"root"}),r}(H);var et=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Z,W,t.ɵbh,K,G,J,Y],exports:[Z,G,J,Y],entryComponents:[Z,W,t.ɵbh,K],providers:[tt]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return R(this,void 0,void 0,(function(){var i;return w(this,(function(o){return this.isMissingFrom(e)?(i=C.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},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.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=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.prototype.isEmptyValue=function(t){return C.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return M(e,t),e.prototype.isEmptyValue=function(t){return C.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!C.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?C.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!C.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&C.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},O([h.Memoize(),A("design:type",Function),A("design:paramtypes",[]),A("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([h.Memoize(),A("design:type",Function),A("design:paramtypes",[Object]),A("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([h.Memoize(),A("design:type",Function),A("design:paramtypes",[Object]),A("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var nt,it="PLACE_DEFINITION_OPTIONS",ot=Symbol("place:route:parameters");t.PlaceComponent=function(e){function n(){return e.call(this)||this}return M(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.canDeactivate=function(){return!0},n.prototype.onPlaceReady=function(){},n.prototype.onPlaceDestroyed=function(){this.dispose()},O([g.Memoize(),A("design:type",t.PlaceDefinition),A("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(s.GarbageCollector),(nt=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(nt)},nt.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(ot)},nt.getDefinition=function(t){return Reflect.getMetadata(it,t)},nt.injectDefinition=function(t,e){Reflect.defineMetadata(it,e,t)};var rt=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,D({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var at,st,ct,ut=new n.InjectionToken("AUP_PLACE_CONFIG");t.NavigationSession=function(){function t(t){this.firstNavigation=t,this._alreadyAccepted=[],this._visits=new Map}return t.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},t.prototype.getVisitFor=function(t){return this._visits.get(t)},t.prototype.mergePrivatePlaceParameters=function(t){return null},t.prototype.alreadyAccepted=function(t){return this._alreadyAccepted.includes(t)},t.prototype.rememberAcceptanceOf=function(t){this._alreadyAccepted.push(t)},t.prototype.setPopstateReturn=function(t){this._popStateReturnUrl=t},Object.defineProperty(t.prototype,"isPopState",{get:function(){return!!this._popStateReturnUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popStateReturnUrl",{get:function(){return this._popStateReturnUrl},enumerable:!0,configurable:!0}),t.prototype.getVisits=function(){return Array.from(this._visits.values())},t}(),at=t.NavigationSession||(t.NavigationSession={}),st=function(t){function e(e){var n=t.call(this,e)||this;return n.isExternal=!0,n}return M(e,t),e}(at),ct=function(t){function e(e){var n=t.call(this,!1)||this;return n.isExternal=!1,n.storeVisit(e),n}return M(e,t),e}(at),at.createInternal=function(t){return new ct(t)},at.createExternal=function(t){return new st(t)};var lt,pt,dt=function(){function t(){this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=C.first(e);n&&!t.hasChangedFrom(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[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();t.ɵt=function(i){function o(t,e,n,o){var r=i.call(this)||this;r.router=t,r.urlSerializer=e,r.angularLocation=n,r.placeHistory=o,r.firstRoute=!0,r._navigationSessionModel=new s.MutableValueModel,r._activeVisits=new s.MutableListModel;var a=s.Dsl.disposeWith(r),c=a.chain;a.valueOf,a.before,a.when,a.after,a.observe,a.switchOn;return r.activeVisitIndex=c(r._activeVisits).indexBy("placeDefinition"),n.onUrlChange((function(t){console.log("location.onUrlChange -> "+t)})),r.router.events.subscribe((function(t){t instanceof u.NavigationStart&&r.onAngularRouterStarted(t),(t instanceof u.NavigationEnd||t instanceof u.NavigationError)&&r.onAngularRouterFinished()})),r.navigationSessionActive=c(r.navigationSessionModel).isNotNil(),r.navigationSessionActive.subscribe((function(t){console.log("navigationSessionActive",t)})),r}return M(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return R(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return this.doNavigation(t,(function(i){return R(n,void 0,void 0,(function(){var n;return w(this,(function(i){switch(i.label){case 0:return n=_([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.pushVisitChangesToRoute=function(t,e,n){return R(this,void 0,void 0,(function(){var t=this;return w(this,(function(i){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(e){var i=t.createUrlManipulator(t.router.routerState.snapshot).createRedirectCommandsFor(n);return console.log("### Push Changes to route Redirect",{commands:i}),e.navigate(i)}))]:[2]}))}))},o.prototype.doNavigation=function(e,n){return R(this,void 0,void 0,(function(){return w(this,(function(i){switch(i.label){case 0:this._navigationSessionModel.value=t.NavigationSession.createInternal(e),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,n(this.router)];case 2:return i.sent(),[3,4];case 3:return this.navigationSession&&!this.router.getCurrentNavigation()&&this.onAngularRouterFinished(),[7];case 4:return[2]}}))}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.onAngularRouterStarted=function(e){if(!this.navigationSession){console.log("navigation started",{firstTime:this.firstRoute});var n=t.NavigationSession.createExternal(this.firstRoute);"popstate"===e.navigationTrigger&&n.setPopstateReturn(this.router.routerState.snapshot.url),this._navigationSessionModel.value=n}this.firstRoute=!1},o.prototype.onAngularRouterFinished=function(){var t=this,e=this._navigationSessionModel.value.getVisits();e.forEach((function(e){t.placeHistory.add(e)})),this._activeVisits.value=e,this._navigationSessionModel.value=null},o.prototype.extractChildPath=function(t){return C.flatten(t.children.map((function(t){return t.url})))},o.prototype.createUrlManipulator=function(t){return new o.UrlManipulator(this.urlSerializer.parse(t.url))},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:e.Location},{type:dt}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(e.Location),n.ɵɵinject(dt))},token:o,providedIn:"root"}),O([s.Trace(),A("design:type",Function),A("design:paramtypes",[rt,Object]),A("design:returntype",Promise)],o.prototype,"navigate",null),o}(s.GarbageCollector),lt=t.ɵt||(t.ɵt={}),pt=function(){function t(t){this.urlTree=t,console.log({segments:this.urlTree.root.children.primary.segments})}return t.prototype.cloneUrlSegmentList=function(){return _(this.urlTree.root.children.primary.segments)},t.prototype.updateVisitSegments=function(t){var e=this.cloneUrlSegmentList(),n=this.convertToUrlSegments(t),i=e.findIndex((function(t){return t.path===n[0].path}));return e.splice.apply(e,_([i,n.length],n)),e},t.prototype.convertToUrlSegments=function(t){return t.placeDefinition.hasRouteId()?[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new u.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.createRedirectCommandsFor=function(t){var e=this.updateVisitSegments(t),n=[];return e.forEach((function(t){n.push(t.path),t.parameterMap.keys.length>0&&n.push(t.parameters)})),n},O([s.Trace(),A("design:type",Function),A("design:paramtypes",[rt]),A("design:returntype",Array)],t.prototype,"createRedirectCommandsFor",null),t}(),lt.UrlManipulator=pt;var ft=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),mt=[b.query(":enter, :leave",ft,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],yt=[b.query(":enter, :leave",ft,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)",minHeight:"1px"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function ht(t){return b.trigger("routeAnimations",[b.transition(":increment",yt,{params:{duration:t}}),b.transition(":decrement",mt,{params:{duration:t}})])}var gt=ht("0.3s");var vt=function(e){function i(t,i,o,r){var a=e.call(this)||this;a.router=t,a.placeRouter=i,a.placeConfig=o,a.animate=!0,a.placeChanged=new n.EventEmitter,a._activePlace=new s.MutableValueModel,a._activePlaceVisitModel=new s.DelegatingValueModel,a._inOutletActivation=new s.Guard,a._inOutletDeactivation=new s.Guard,a._inRouteVisitUpdate=new s.Guard,a._activatedRouteModel=new s.MutableValueModel,a._placeDefinition=new s.MutableValueModel,a.initialPlaceIndex=null;var c=s.Dsl.disposeWith(a),u=c.chain,p=c.valueOf,d=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r),a._activePlaceVisitModel.setDelegate(new s.MutableValueModel),a._inOutletUpdate=p.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var f=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),m=u(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(f).reduce((function(t){var e=0;return m.value&&(e=t.indexOf(m.value),l.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),l.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:m}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),d.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),d.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationSessionActive}),u(a._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return a.placeChanged.emit(t)})),a}return M(i,e),i.prototype.ngOnInit=function(){},i.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),i.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(i.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),i.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},i.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(i.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),i.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletActivation.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition;var i=new s.MutableValueModel;n._activePlaceVisitModel.setDelegate(i),e.initialiseBindings(i)}catch(t){console.error(t)}})),this.animate||this.animationDone()},i.prototype.onOutletDeactivated=function(){var t=this;this._inOutletDeactivation.whileTrue((function(){t._activePlace.value=null,t._activatedRouteModel.value=null,t._placeDefinition.value=null,t._activePlaceVisitModel.setDelegate(null)}))},i.prototype.animationStarted=function(){},i.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},i.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n</div>\n\n',animations:[gt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],i.ctorParameters=function(){return[{type:u.Router},{type:t.ɵt},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[ut]}]},{type:i,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},i.propDecorators={animate:[{type:n.Input}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},O([s.UseDelegate(),A("design:type",s.ListModel)],i.prototype,"customPlaceAnimationOrderModel",void 0),O([s.StoreInListModel("customPlaceAnimationOrderModel"),A("design:type",Array)],i.prototype,"customPlaceAnimationOrder",void 0),i}(j);var bt=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new rt(t))})),n.activePlaceDefinition=o(n.placeOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition"),n}return M(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.decorators=[{type:n.Component,args:[{template:""}]}],i.ctorParameters=function(){return[]},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},O([s.StoreInListModel("placesModel"),A("design:type",Array)],i.prototype,"places",void 0),O([s.UseDelegate(),A("design:type",s.ListModel)],i.prototype,"placesModel",void 0),O([s.StoreInValueModel("placeOutletModel"),A("design:type",vt)],i.prototype,"placeOutlet",void 0),O([s.UseDelegate(),A("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),O([h.Memoize(),A("design:type",Function),A("design:paramtypes",[t.PlaceDefinition]),A("design:returntype",Object)],i.prototype,"getNav",null),i}(j);var Pt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-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}]},O([s.UseDelegate(),A("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),O([s.StoreInValueModel("busyModel"),A("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Ct=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-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(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),It=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:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).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:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}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}(bt);var Mt=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(bt),Dt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,m.MatListModule,y.MatTooltipModule,f.MatIconModule,E],declarations:[Ct,Pt,vt,Mt,It,bt],entryComponents:[Pt],exports:[Pt,vt,Ct,Mt,It,bt],providers:[]}]}],t}(),Ot=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E,B,Dt,et],exports:[et,Dt,E,B,U]}]}],t}(),At=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var Rt=function(t,e){this.width=t,this.height=e};var wt,xt=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,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new xt(t.clientX-this.left,t.clientY-this.top):new xt(t.x-this.left,t.y-this.top)},e}(Rt),(wt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new wt(e.top,e.left,e.width,e.height)};var _t=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.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 P((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}(j);function Ft(){}(function(t){function e(){}t.Callback=e})(Ft||(Ft={}));var jt,St,Et,Tt,Nt=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canActivate=function(t,e){return!0},t.prototype.canDeactivate=function(t,e,n,i){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:H}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(H))},token:t,providedIn:"root"}),O([s.Trace(),A("design:type",Function),A("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),A("design:returntype",Object)],t.prototype,"canActivate",null),O([s.Trace(),A("design:type",Function),A("design:paramtypes",[U,u.ActivatedRouteSnapshot,u.RouterStateSnapshot,u.RouterStateSnapshot]),A("design:returntype",Object)],t.prototype,"canDeactivate",null),t}();function Lt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Options=e})(Lt||(Lt={})),jt=t.Formatter||(t.Formatter={}),St=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Et=function(){function t(){}return t.prototype.format=function(t){return C.isNumber(t)&&!C.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return C.isNaN(e)?null:e},t}(),Tt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),jt.STRING=new St,jt.NUMBER=new Et,jt.BOOLEAN=new Tt;var Vt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return R(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return w(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();t.EnterPlaceGuard=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(n,i){return R(this,void 0,void 0,(function(){var o,r,a,c,u,l;return w(this,(function(p){switch(p.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(n.component)?(o=t.PlaceComponent.getDefinition(n.component),r=new e.ConsolidatedParameterMap(n.paramMap,n.url),a=o.parseRouteParams(r),c=this.placeRouter.navigationSession.getVisitFor(o)||new rt(o,a),[4,new Vt(n,this.router,this.placeHistory,this.injector).sanitise(c.mergeRouteParameters(a))]):[3,2];case 1:return u=p.sent(),this.placeRouter.navigationSession.storeVisit(u),c.hasRoutingChangedFrom(u)?(l=this.placeRouter.createUrlManipulator(i).createRedirectCommandsFor(u),console.log("##### Place Guard Redirect",l),[2,this.router.createUrlTree(l,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0];case 2:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+n.component)];case 3:return[2]}}))}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:t.ɵt},{type:dt},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(t.ɵt),n.ɵɵinject(dt),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}(),function(t){var e=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new n(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}),O([h.Memoize(),A("design:type",Array),A("design:paramtypes",[])],t.prototype,"keys",null),t}();t.ConsolidatedParameterMap=e;var n=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.EnterPlaceGuard||(t.EnterPlaceGuard={}));var kt=function(){function i(t,e,n,i,o){this.router=t,this.injector=e,this.placeRouter=n,this.dialogInteractionContext=i,this.angularLocation=o}return i.prototype.isLeavingTheCurrentPlace=function(t,e){var n="/"+e.path;return!t.url.startsWith(n)},i.prototype.canDeactivate=function(t,e,n,i){return R(this,void 0,void 0,(function(){var e,n;return w(this,(function(o){switch(o.label){case 0:return this.placeRouter.navigationSession.alreadyAccepted(t)?[2,!0]:[3,1];case 1:return e=this,n=!0,this.isLeavingTheCurrentPlace(i,t.placeDefinition)?(this.dialogInteractionContext.isActive()?(console.log("cancelling",{activity:this.dialogInteractionContext.currentActivity}),this.dialogInteractionContext.currentActivity.cancel(null),n=!1):n=!0,n&&t.interactionContext&&t.interactionContext.isActive()&&(n=!1,console.log("cancelling",{activity:t.interactionContext.currentActivity}),t.interactionContext.currentActivity.cancel(null)),n?[4,t.canDeactivate()]:[3,3]):[3,4];case 2:n=o.sent(),o.label=3;case 3:return[3,5];case 4:this.dialogInteractionContext.isActive()?(console.log("cancelling",{activity:this.dialogInteractionContext.currentActivity}),this.dialogInteractionContext.currentActivity.cancel(null),n=!1):n=!0,o.label=5;case 5:return n?e.placeRouter.navigationSession.rememberAcceptanceOf(t):this.placeRouter.navigationSession.isPopState&&(console.log("cancelled during popstate"),this.angularLocation.go(this.placeRouter.navigationSession.popStateReturnUrl)),[2,n]}}))}))},i.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:t.ɵt},{type:H},{type:e.Location}]},i.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(t.ɵt),n.ɵɵinject(H),n.ɵɵinject(e.Location))},token:i,providedIn:"root"}),i}();t.ACTIVITY_DATA=q,t.AUP_PLACE_CONFIG=ut,t.AbstractActivity=z,t.AbstractInputComponent=T,t.AbstractPlaceNavigationComponent=bt,t.Activity=t.ɵbf,t.ActivityContainerComponent=Z,t.ActivityOutletComponent=G,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=Ot,t.BusyOverlayComponent=Pt,t.CommandDirective=F,t.ComponentsModule=B,t.ConfirmThenDialogComponent=t.ɵbh,t.ConfirmationDialogComponent=W,t.DEFINITION_META_DATA_KEY=it,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=$,t.DialogInteractionService=tt,t.Dimension=Rt,t.DirectivesModule=E,t.DisposableComponent=j,t.EmptyStateComponent=Ct,t.FocusBindingDirective=S,t.InplaceInteractionContextComponent=Y,t.InteractionContext=H,t.InteractionGuard=Nt,t.InteractionModule=et,t.InteractionOutletComponent=J,t.LEFT_RIGHT_PLACE_ANIMATION=gt,t.LeavePlaceGuard=kt,t.ListPlaceNavComponent=It,t.NoopComponent=U,t.NumberInputComponent=N,t.PasswordInputComponent=L,t.Place=Lt,t.PlaceHistory=dt,t.PlaceModule=Dt,t.PlaceOutletComponent=vt,t.PlaceRouter=t.ɵt,t.Point=xt,t.ROUTE_PARAMETER_LIST_KEY=ot,t.ResizeAwareComponent=_t,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=V,t.StringInputComponent=k,t.TabbedPlaceNavigationComponent=Mt,t.Visit=rt,t.VisitParameter=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=Vt,t.leftRightPlaceAnimation=ht,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",At);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=E,t.ɵb=F,t.ɵba=H,t.ɵbb=G,t.ɵbc=W,t.ɵbd=z,t.ɵbe=q,t.ɵbi=K,t.ɵbk=J,t.ɵbl=Y,t.ɵbm=$,t.ɵbn=tt,t.ɵc=S,t.ɵd=j,t.ɵe=B,t.ɵf=N,t.ɵg=T,t.ɵh=k,t.ɵi=L,t.ɵj=V,t.ɵk=U,t.ɵl=Dt,t.ɵm=Ct,t.ɵn=Pt,t.ɵo=vt,t.ɵp=ht,t.ɵq=gt,t.ɵr=ut,t.ɵu=dt,t.ɵv=Mt,t.ɵw=bt,t.ɵx=It,t.ɵy=et,t.ɵz=Z,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("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),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","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@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.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,m,y,h,g,v,b,C){"use strict";var P="default"in l?l.default:l;C=C&&C.hasOwnProperty("default")?C.default:C;var I=function(t,e){return(I=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 D(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var M=function(){return(M=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function A(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function O(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function R(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function w(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}var F=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new s.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return D(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!0,configurable:!0}),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(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this._commandEnabled).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 s.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}(s.GarbageCollector);var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),S=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return D(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.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]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(j);var E=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[F,S]}]}],t}(),T=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return D(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"]}]},A([s.UseDelegate(),O("design:type",s.ValueModel),O("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(j);var N=function(t){function e(){return t.call(this)||this}return D(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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}(T),L=function(t){function e(){return t.call(this)||this}return D(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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),V=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 D(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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}]},A([s.UseDelegate(),O("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),A([s.StoreInListModel("optionsModel"),O("design:type",Array)],e.prototype,"options",void 0),e}(T);var k=function(t){function e(){return t.call(this)||this}return D(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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}(T),U=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),B=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[N,k,L,V,U],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E],exports:[N,k,L,V,U]}]}],t}(),H=function(t){function e(){var e=t.call(this)||this;e._activityListDelegate=new s.DelegatingListModel;var n=s.Dsl.disposeWith(e),i=(n.chain,n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return i.listOf(e.activityList).becomesPopulated((function(t){e.deferredGetCurrentActivity&&(e.deferredGetCurrentActivity.resolve(l.last(t)),e.deferredGetCurrentActivity=null)})),e}return D(e,t),e.prototype.setActivityList=function(t){this._activityListDelegate.setDelegate(t)},Object.defineProperty(e.prototype,"activityList",{get:function(){return this._activityListDelegate.readonly},enumerable:!0,configurable:!0}),e.prototype.getCurrentActivity=function(){return R(this,void 0,void 0,(function(){return w(this,(function(t){return this.isActive()?this.deferredGetCurrentActivity?[2,this.deferredGetCurrentActivity.promise]:this.activityList.length<1?(this.deferredGetCurrentActivity=s.Deferred.defer(),[2,this.deferredGetCurrentActivity.promise]):[2,l.last(this.activityList.value)]:[2,Promise.reject("no activity in progress")]}))}))},e.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},e}(s.GarbageCollector);var q=new n.InjectionToken("InteractionActivityData");t.ɵbg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return D(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},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}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbg||(t.ɵbg={}));var G=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:H,useValue:this.interactionContext},{provide:q,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityComponentRef.instance.initialise(t),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"aup-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}();var z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e}(t.ɵbg),K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return D(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-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<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(z);t.ɵbi=function(t){function e(e,n){var i=t.call(this)||this;return i.config=e,i.interactionContext=n,s.assert.notNil(e),i}return D(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"aup-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<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]},{type:H}]},e}(z),function(t){function e(){}t.Data=e}(t.ɵbi||(t.ɵbi={}));var W=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return D(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"aup-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<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(z);var X=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Z=function(e){function i(){var t=e.call(this)||this;t.throttledNestedActivityFinishEvents=new s.MutableStream,t.initialActivityOutletContextEvent=new n.EventEmitter,t.dynamicHeight=!1,t.activityTabs=new s.MutableListModel,t._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(t),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(t.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return t.onNestedActivityFinished()})),t.setActivityList(t._activityList.readonly),t}return D(i,e),Object.defineProperty(i.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext},set:function(t){s.assert.isNil(this._initialActivityOutletContext),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext=t,this.activityTabs.push(new X(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return!!this._initialActivityOutletContext},Object.defineProperty(i.prototype,"isFinished",{get:function(){return!this._initialActivityOutletContext},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},i.prototype.startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new X(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},i.prototype.alert=function(t){return this.startActivity(K,t)},i.prototype.confirmOrReject=function(t){return this.startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this.startActivity(t.ɵbi,{confirm:e,activityType:n,data:i})},i.prototype.finishInitialActivity=function(){this._initialActivityOutletContext=null,this.initialActivityOutletContextEvent.emit(null)},i.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},i.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},i.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},i.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},i.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},i.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[G]}]},i}(H);var Y=function(e){function i(){return e.call(this)||this}return D(i,e),i.prototype.ngAfterViewInit=function(){this.setActivityList(this.interactionContext.activityList)},i.prototype.isActive=function(){return this.interactionContext.isActive()},i.prototype.alert=function(t){return this._startActivity(K,t)},i.prototype.confirmOrReject=function(t){return this._startActivity(W,t)},i.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbi,{confirm:e,activityType:n,data:i})},i.prototype.startActivity=function(t,e){return this._startActivity(t,e)},i.prototype._startActivity=function(t,e){var n=this;return new Promise((function(i,o){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i(t)},onCancel:function(t){o(t)}}}))},i.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(H);var J=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),$=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Q=function(t){function e(){return t.call(this,{initialValue:!1})||this}return D(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()},e}(s.ValueModel),tt=function(i){function r(t,e,n,o,r){var a=i.call(this)||this;return a.dialogService=t,a.location=e,a.router=n,a.dialogServiceDefaults=o,a.matDialogDefaultConfig=r,a.startingGuard=new Q,a._inActivityPromise=new s.MutableValueModel(!1),p.assert.notNil(t),a}return D(r,i),r.prototype.isActive=function(){return this._inActivityPromise.value},Object.defineProperty(r.prototype,"active",{get:function(){return this._inActivityPromise.readonly},enumerable:!0,configurable:!0}),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(t,e,n){var i=this;return void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this.startingGuard.whileTrue((function(){console.log("###### STARTING"),i._inActivityPromise.value=!0;var o=i,r=M({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},i.matDialogDefaultConfig,i.dialogServiceDefaults,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),a=i.dialogService.open(Z,r);return new Promise((function(n,i){var r=a.componentInstance;o.safelyUpdateActivityListDelegate(r.activityList),r.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize()})).finally((function(){i._inActivityPromise.value=!1,console.log("###### FINISHED"),o.safelyUpdateActivityListDelegate(null)}))}))},r.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e.setActivityList(t)}))},r.prototype.alert=function(t){return this._startActivity(K,t,!1)},r.prototype.confirmOrReject=function(t){return this._startActivity(W,t,!0)},r.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbi,{confirm:e,activityType:n,data:i},!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog},{type:e.Location},{type:u.Router},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[$]}]},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[d.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(d.MatDialog),n.ɵɵinject(e.Location),n.ɵɵinject(u.Router),n.ɵɵinject($,8),n.ɵɵinject(d.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:r,providedIn:"root"}),r}(H);var et=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Z,W,t.ɵbi,K,G,J,Y],exports:[Z,G,J,Y],entryComponents:[Z,W,t.ɵbi,K],providers:[tt]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return R(this,void 0,void 0,(function(){var i;return w(this,(function(o){return this.isMissingFrom(e)?(i=P.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},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 D(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return D(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return D(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!P.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?P.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!P.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&P.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},A([h.Memoize(),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),A([h.Memoize(),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),A([h.Memoize(),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var nt,it="PLACE_DEFINITION_OPTIONS",ot=Symbol("place:route:parameters");t.PlaceComponent=function(e){function n(){return e.call(this)||this}return D(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.onPlaceReady=function(){},A([g.Memoize(),O("design:type",t.PlaceDefinition),O("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(j),(nt=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(nt)},nt.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(ot)},nt.getDefinition=function(t){return Reflect.getMetadata(it,t)},nt.injectDefinition=function(t,e){Reflect.defineMetadata(it,e,t)};var rt=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,M({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var at=new n.InjectionToken("AUP_PLACE_CONFIG");t.ɵu=function(){function t(t,e){this.firstNavigation=t,this.appModalInteractionContext=e,this._alreadyAccepted=[],this._visits=new Map,this.componentDeactivationHandlers=new Map,this.dialogOpenOnStart=this.appModalInteractionContext.isActive()}return t.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},t.prototype.getVisitFor=function(t){return this._visits.get(t)},t.prototype.canDeactivate=function(e,n){return R(this,void 0,void 0,(function(){var i,o;return w(this,(function(r){return(i=this.componentDeactivationHandlers.get(e))||(o=0===this.componentDeactivationHandlers.size,i=new t.ComponentDeactivationHandler(e,this.appModalInteractionContext,o),this.componentDeactivationHandlers.set(e,i)),[2,i.canDeactivate(n)]}))}))},t.prototype.setPopstateReturnUrl=function(t){this._popStateReturnUrl=t},Object.defineProperty(t.prototype,"isPopState",{get:function(){return!!this._popStateReturnUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popStateReturnUrl",{get:function(){return this._popStateReturnUrl},enumerable:!0,configurable:!0}),t.prototype.getVisits=function(){return Array.from(this._visits.values())},t}(),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isExternal=!0,i}return D(e,t),e}(t);var i=function(t){function e(e,n){var i=t.call(this,!1,n)||this;return i.isExternal=!1,i.storeVisit(e),i}return D(e,t),e}(t);var o=function(){function t(t){this.appModelInteractionContext=t}return t.prototype.createInternal=function(t){return new i(t,this.appModelInteractionContext)},t.prototype.createExternal=function(t){return new e(t,this.appModelInteractionContext)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:H}]},t}();t.Factory=o;var r=function(){function t(t,e,n){this.component=t,this.appModelInteractionContext=e,this.primary=n,this.alreadyAccepted=!1}return t.prototype.canDeactivate=function(t){return R(this,void 0,void 0,(function(){var e;return w(this,(function(n){switch(n.label){case 0:return console.log(this.constructor.name+".canDeactivate",{component:this.component}),this.alreadyAccepted?[2,!0]:[3,1];case 1:return this.primary&&this.appModelInteractionContext.isActive()?[4,this.cancelCurrentActivityOf(this.appModelInteractionContext)]:[3,3];case 2:return n.sent(),[2,!1];case 3:return e=this,[4,this.canDeactivateComponent(t)];case 4:return e.alreadyAccepted=n.sent(),[2,this.alreadyAccepted]}}))}))},t.prototype.canDeactivateComponent=function(t){return R(this,void 0,void 0,(function(){return w(this,(function(e){return this.component.interactionContext&&!this.isAppModalInteractionContext(this.component.interactionContext)&&this.component.interactionContext.isActive()?(this.cancelCurrentActivityOf(this.component.interactionContext),[2,!1]):this.isLeavingCurrentPlace(t)&&this.component.canDeactivate?[2,this.component.canDeactivate()]:[2,!0]}))}))},t.prototype.isAppModalInteractionContext=function(t){return this.appModelInteractionContext===t},t.prototype.cancelCurrentActivityOf=function(t){return R(this,void 0,void 0,(function(){var e;return w(this,(function(n){switch(n.label){case 0:return[4,t.getCurrentActivity()];case 1:return e=n.sent(),console.log("cancelling",{activity:e}),e.cancel(null),[2]}}))}))},t.prototype.isLeavingCurrentPlace=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}();t.ComponentDeactivationHandler=r}(t.ɵu||(t.ɵu={}));var st,ct,ut=function(){function t(){this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=P.first(e);n&&!t.hasChangedFrom(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[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();t.ɵt=function(i){function o(t,e,n,o,r){var a=i.call(this)||this;a.router=t,a.urlSerializer=e,a.navigationSessionFactory=n,a.angularLocation=o,a.placeHistory=r,a.firstRoute=!0,a._navigationSessionModel=new s.MutableValueModel,a._activeVisits=new s.MutableListModel;var c=s.Dsl.disposeWith(a),l=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;return a.activeVisitIndex=l(a._activeVisits).indexBy("placeDefinition"),o.onUrlChange((function(t){console.log("location.onUrlChange -> "+t)})),a.router.events.subscribe((function(t){t instanceof u.NavigationStart&&a.onAngularRouterStarted(t),t instanceof u.NavigationEnd&&a.onAngularRouterFinished(!1),t instanceof u.NavigationError&&a.onAngularRouterFinished(!0)})),a.navigationSessionActive=l(a.navigationSessionModel).isNotNil(),a.navigationSessionActive.subscribe((function(t){console.log("navigationSessionActive",t)})),a}return D(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return R(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return this.doNavigation(t,(function(i){return R(n,void 0,void 0,(function(){var n;return w(this,(function(i){switch(i.label){case 0:return n=_([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.pushVisitChangesToRoute=function(t,e,n){return R(this,void 0,void 0,(function(){var t=this;return w(this,(function(i){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(e){var i=t.parseUrl(t.router.routerState.snapshot).createRedirectCommandsFor(n);return console.log("### Push Changes to route Redirect",{commands:i}),e.navigate(i)}))]:[2]}))}))},o.prototype.doNavigation=function(t,e){return R(this,void 0,void 0,(function(){return w(this,(function(n){switch(n.label){case 0:this._navigationSessionModel.value=this.navigationSessionFactory.createInternal(t),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,e(this.router)];case 2:return n.sent(),[3,4];case 3:return this.navigationSession&&!this.router.getCurrentNavigation()&&this.onAngularRouterFinished(!1),[7];case 4:return[2]}}))}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.onAngularRouterStarted=function(t){if(!this.navigationSession){console.log("navigation started",{firstTime:this.firstRoute});var e=this.navigationSessionFactory.createExternal(this.firstRoute);"popstate"===t.navigationTrigger&&e.setPopstateReturnUrl(this.router.routerState.snapshot.url),this._navigationSessionModel.value=e}this.firstRoute=!1},o.prototype.onAngularRouterFinished=function(t){var e=this,n=this._navigationSessionModel.value;if(t)n.isPopState&&(console.log("cancelled during popstate"),this.angularLocation.go(n.popStateReturnUrl));else{var i=n.getVisits();i.forEach((function(t){return e.placeHistory.add(t)})),this._activeVisits.value=i}this._navigationSessionModel.value=null},o.prototype.extractChildPath=function(t){return P.flatten(t.children.map((function(t){return t.url})))},o.prototype.parseUrl=function(t){return new o.UrlHelper(this.urlSerializer.parse(t.url))},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:t.ɵu.Factory},{type:e.Location},{type:ut}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(t.ɵu.Factory),n.ɵɵinject(e.Location),n.ɵɵinject(ut))},token:o,providedIn:"root"}),A([s.Trace(),O("design:type",Function),O("design:paramtypes",[rt,Object]),O("design:returntype",Promise)],o.prototype,"navigate",null),o}(s.GarbageCollector),st=t.ɵt||(t.ɵt={}),ct=function(){function t(t){this.urlTree=t,console.log({segments:this.urlTree.root.children.primary.segments})}return t.prototype.cloneUrlSegmentList=function(){return _(this.urlTree.root.children.primary.segments)},t.prototype.updateVisitSegments=function(t){var e=this.cloneUrlSegmentList(),n=this.convertToUrlSegments(t),i=e.findIndex((function(t){return t.path===n[0].path}));return e.splice.apply(e,_([i,n.length],n)),e},t.prototype.convertToUrlSegments=function(t){return t.placeDefinition.hasRouteId()?[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new u.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.createRedirectCommandsFor=function(t){var e=this.updateVisitSegments(t),n=[];return e.forEach((function(t){n.push(t.path),t.parameterMap.keys.length>0&&n.push(t.parameters)})),n},t.prototype.includesPathOf=function(t){return this.cloneUrlSegmentList().find((function(e){return e.path===t.path}))},A([s.Trace(),O("design:type",Function),O("design:paramtypes",[rt]),O("design:returntype",Array)],t.prototype,"createRedirectCommandsFor",null),t}(),st.UrlHelper=ct;var lt=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),pt=[b.query(":enter, :leave",lt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],dt=[b.query(":enter, :leave",lt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)",minHeight:"1px"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function ft(t){return b.trigger("routeAnimations",[b.transition(":increment",dt,{params:{duration:t}}),b.transition(":decrement",pt,{params:{duration:t}})])}var mt=ft("0.3s");var yt=function(e){function i(t,i,o,r){var a=e.call(this)||this;a.router=t,a.placeRouter=i,a.placeConfig=o,a.animate=!0,a.placeChanged=new n.EventEmitter,a._activePlace=new s.MutableValueModel,a._activePlaceVisitModel=new s.DelegatingValueModel,a._inOutletActivation=new s.Guard,a._inOutletDeactivation=new s.Guard,a._inRouteVisitUpdate=new s.Guard,a._activatedRouteModel=new s.MutableValueModel,a._placeDefinition=new s.MutableValueModel,a.initialPlaceIndex=null;var c=s.Dsl.disposeWith(a),u=c.chain,p=c.valueOf,d=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r),a._activePlaceVisitModel.setDelegate(new s.MutableValueModel),a._inOutletUpdate=p.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var f=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),m=u(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(f).reduce((function(t){var e=0;return m.value&&(e=t.indexOf(m.value),l.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),l.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:m}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),d.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),d.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationSessionActive}),u(a._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return a.placeChanged.emit(t)})),a}return D(i,e),i.prototype.ngOnInit=function(){},i.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),i.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(i.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),i.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},i.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(i.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),i.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletActivation.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition;var i=new s.MutableValueModel;n._activePlaceVisitModel.setDelegate(i),e.initialiseBindings(i)}catch(t){console.error(t)}})),this.animate||this.animationDone()},i.prototype.onOutletDeactivated=function(){var t=this;this._inOutletDeactivation.whileTrue((function(){t._activePlace.value=null,t._activatedRouteModel.value=null,t._placeDefinition.value=null,t._activePlaceVisitModel.setDelegate(null)}))},i.prototype.animationStarted=function(){},i.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},i.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n</div>\n\n',animations:[mt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],i.ctorParameters=function(){return[{type:u.Router},{type:t.ɵt},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[at]}]},{type:i,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},i.propDecorators={animate:[{type:n.Input}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},A([s.UseDelegate(),O("design:type",s.ListModel)],i.prototype,"customPlaceAnimationOrderModel",void 0),A([s.StoreInListModel("customPlaceAnimationOrderModel"),O("design:type",Array)],i.prototype,"customPlaceAnimationOrder",void 0),i}(j);var ht=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new rt(t))})),n.activePlaceDefinition=o(n.placeOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition"),n}return D(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.decorators=[{type:n.Component,args:[{template:""}]}],i.ctorParameters=function(){return[]},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},A([s.StoreInListModel("placesModel"),O("design:type",Array)],i.prototype,"places",void 0),A([s.UseDelegate(),O("design:type",s.ListModel)],i.prototype,"placesModel",void 0),A([s.StoreInValueModel("placeOutletModel"),O("design:type",yt)],i.prototype,"placeOutlet",void 0),A([s.UseDelegate(),O("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),A([h.Memoize(),O("design:type",Function),O("design:paramtypes",[t.PlaceDefinition]),O("design:returntype",Object)],i.prototype,"getNav",null),i}(j);var gt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-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}]},A([s.UseDelegate(),O("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),A([s.StoreInValueModel("busyModel"),O("design:type",Boolean)],t.prototype,"busy",void 0),t}();var vt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-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(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),bt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return D(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:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).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:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}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}(ht);var Ct=function(t){function e(){return t.call(this)||this}return D(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(ht),Pt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,m.MatListModule,y.MatTooltipModule,f.MatIconModule,E],declarations:[vt,gt,yt,Ct,bt,ht],entryComponents:[gt],exports:[gt,yt,vt,Ct,bt,ht],providers:[]}]}],t}(),It=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,E,B,Pt,et],exports:[et,Pt,E,B,U]}]}],t}(),Dt=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var Mt=function(t,e){this.width=t,this.height=e};var At,Ot=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,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return D(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new Ot(t.clientX-this.left,t.clientY-this.top):new Ot(t.x-this.left,t.y-this.top)},e}(Mt),(At=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new At(e.top,e.left,e.width,e.height)};var Rt=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return D(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new C((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}(j);function wt(){}(function(t){function e(){}t.Callback=e})(wt||(wt={}));var xt,_t,Ft,jt,St=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canActivate=function(t,e){return!0},t.prototype.canDeactivate=function(t,e,n,i){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:H}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(H))},token:t,providedIn:"root"}),A([s.Trace(),O("design:type",Function),O("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),O("design:returntype",Object)],t.prototype,"canActivate",null),A([s.Trace(),O("design:type",Function),O("design:paramtypes",[U,u.ActivatedRouteSnapshot,u.RouterStateSnapshot,u.RouterStateSnapshot]),O("design:returntype",Object)],t.prototype,"canDeactivate",null),t}();function Et(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Options=e})(Et||(Et={})),xt=t.Formatter||(t.Formatter={}),_t=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Ft=function(){function t(){}return t.prototype.format=function(t){return P.isNumber(t)&&!P.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return P.isNaN(e)?null:e},t}(),jt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),xt.STRING=new _t,xt.NUMBER=new Ft,xt.BOOLEAN=new jt;var Tt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return R(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return w(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();t.EnterPlaceGuard=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(n,i){return R(this,void 0,void 0,(function(){var o,r,a,c,u,l;return w(this,(function(p){switch(p.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(n.component)?(o=t.PlaceComponent.getDefinition(n.component),r=new e.ConsolidatedParameterMap(n.paramMap,n.url),a=o.parseRouteParams(r),c=this.placeRouter.navigationSession.getVisitFor(o)||new rt(o,a),[4,new Tt(n,this.router,this.placeHistory,this.injector).sanitise(c.mergeRouteParameters(a))]):[3,2];case 1:return u=p.sent(),this.placeRouter.navigationSession.storeVisit(u),c.hasRoutingChangedFrom(u)?(l=this.placeRouter.parseUrl(i).createRedirectCommandsFor(u),console.log("##### Place Guard Redirect",l),[2,this.router.createUrlTree(l,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0];case 2:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+n.component)];case 3:return[2]}}))}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:t.ɵt},{type:ut},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(t.ɵt),n.ɵɵinject(ut),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}(),function(t){var e=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new n(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}),A([h.Memoize(),O("design:type",Array),O("design:paramtypes",[])],t.prototype,"keys",null),t}();t.ConsolidatedParameterMap=e;var n=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.EnterPlaceGuard||(t.EnterPlaceGuard={}));var Nt=function(){function e(t){this.placeRouter=t}return e.prototype.canDeactivate=function(t,e,n,i){return R(this,void 0,void 0,(function(){return w(this,(function(e){return[2,this.placeRouter.navigationSession.canDeactivate(t,this.placeRouter.parseUrl(i))]}))}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:t.ɵt}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(t.ɵt))},token:e,providedIn:"root"}),e}();t.ACTIVITY_DATA=q,t.AUP_PLACE_CONFIG=at,t.AbstractActivity=z,t.AbstractInputComponent=T,t.AbstractPlaceNavigationComponent=ht,t.Activity=t.ɵbg,t.ActivityContainerComponent=Z,t.ActivityOutletComponent=G,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=It,t.BusyOverlayComponent=gt,t.CommandDirective=F,t.ComponentsModule=B,t.ConfirmThenDialogComponent=t.ɵbi,t.ConfirmationDialogComponent=W,t.DEFINITION_META_DATA_KEY=it,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=$,t.DialogInteractionService=tt,t.Dimension=Mt,t.DirectivesModule=E,t.DisposableComponent=j,t.EmptyStateComponent=vt,t.FocusBindingDirective=S,t.InplaceInteractionContextComponent=Y,t.InteractionContext=H,t.InteractionGuard=St,t.InteractionModule=et,t.InteractionOutletComponent=J,t.LEFT_RIGHT_PLACE_ANIMATION=mt,t.LeavePlaceGuard=Nt,t.ListPlaceNavComponent=bt,t.NavigationSession=t.ɵu,t.NoopComponent=U,t.NumberInputComponent=N,t.PasswordInputComponent=L,t.Place=Et,t.PlaceHistory=ut,t.PlaceModule=Pt,t.PlaceOutletComponent=yt,t.PlaceRouter=t.ɵt,t.Point=Ot,t.ROUTE_PARAMETER_LIST_KEY=ot,t.ResizeAwareComponent=Rt,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=V,t.StringInputComponent=k,t.TabbedPlaceNavigationComponent=Ct,t.Visit=rt,t.VisitParameter=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=Tt,t.leftRightPlaceAnimation=ft,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",Dt);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=E,t.ɵb=F,t.ɵba=et,t.ɵbb=Z,t.ɵbc=G,t.ɵbd=W,t.ɵbe=z,t.ɵbf=q,t.ɵbj=K,t.ɵbl=J,t.ɵbm=Y,t.ɵbn=$,t.ɵbo=tt,t.ɵc=S,t.ɵd=j,t.ɵe=B,t.ɵf=N,t.ɵg=T,t.ɵh=k,t.ɵi=L,t.ɵj=V,t.ɵk=U,t.ɵl=Pt,t.ɵm=vt,t.ɵn=gt,t.ɵo=yt,t.ɵp=ft,t.ɵq=mt,t.ɵr=at,t.ɵv=H,t.ɵw=ut,t.ɵx=Ct,t.ɵy=ht,t.ɵz=bt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|