@coolon/angular-ui-powerups 0.0.121 → 0.0.123
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 +117 -14
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +8 -3
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/place-component.js +19 -5
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-definition.js +7 -1
- package/esm2015/lib/place/place-definition.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +83 -7
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +8 -3
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/place-component.js +19 -5
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-definition.js +11 -2
- package/esm5/lib/place/place-definition.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +83 -7
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +114 -14
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +118 -15
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/place-component.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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("@coolon/typescript-utilities"),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("lodash"),require("@angular/animations"),require("resize-observer-polyfill"),require("@angular/material/dialog"),require("rxjs")):"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","@coolon/typescript-utilities","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill","@angular/material/dialog","rxjs"],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.typescriptUtilities,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver,t.ng.material.dialog,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,h,v,g,y,m,b,I,C){"use strict";var P="default"in y?y.default:y;b=b&&b.hasOwnProperty("default")?b.default:b;var M=function(t,e){return(M=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}M(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var x=function(){return(x=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 R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function S(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 O(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(O(arguments[e]));return t}var T=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 E=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),U=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}(E);var N=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[T,U],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[T,U]}]}],t}(),F=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(),R("design:type",s.ValueModel),R("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(E);var 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-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(F),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-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}(F),j=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(),R("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),A([s.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(F);var V=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}(F),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),H=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[L,V,k,j,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,N],exports:[L,V,k,j,B]}]}],t}(),q=new n.InjectionToken("InteractionActivityData");t.ɵbi=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){l.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.ɵbi||(t.ɵbi={}));var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e}(t.ɵbi),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}(G);var z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.isActive=function(){return this.active.value},e.prototype.dispose=function(){s.assert.isFalsey(this.isActive()),t.prototype.dispose.call(this)},e.prototype.cancelActiveActivity=function(){return S(this,void 0,void 0,(function(){var t,e,n=this;return w(this,(function(i){switch(i.label){case 0:return t=s.Dsl.disposeWith(this).when,[4,this.getActiveActivity()];case 1:return e=i.sent(),[2,new Promise((function(i){t.valueOf(n.activeActivity).changes((function(t){i(!t)}),{once:!0}),e.cancel()}))]}}))}))},e}(s.GarbageCollector);t.ɵbk=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:z}]},e}(G),function(t){function e(){}t.Data=e}(t.ɵbk||(t.ɵbk={}));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}(G);var X=function(e){function n(){var t=e.call(this)||this;t._activityListDelegate=new s.DelegatingListModel;var n=s.Dsl.disposeWith(t),i=n.chain,o=(n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return t._currentActivity=i(t.activityList).last(),o.valueOf(t._currentActivity).becomesTruthy((function(e){t.deferredGetCurrentActivity&&(t.deferredGetCurrentActivity.resolve(e),t.deferredGetCurrentActivity=null)})),t}return D(n,e),n.prototype.setActivityList=function(t){this._activityListDelegate.setDelegate(t)},Object.defineProperty(n.prototype,"activityList",{get:function(){return this._activityListDelegate.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeActivity",{get:function(){return this._currentActivity},enumerable:!0,configurable:!0}),n.prototype.getActiveActivity=function(){return S(this,void 0,void 0,(function(){return w(this,(function(t){return this.isActive()?this.deferredGetCurrentActivity?[2,this.deferredGetCurrentActivity.promise]:this._currentActivity.value?[2,this._currentActivity.value]:(this.deferredGetCurrentActivity=s.Deferred.defer(),[2,this.deferredGetCurrentActivity.promise]):[2,Promise.reject("no activity in progress")]}))}))},n.prototype.startActivity=function(t,e){return this._startActivity(t,e)},n.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},n.prototype.alert=function(t){return this._startActivity(K,t,!1)},n.prototype.confirmOrReject=function(t){return this._startActivity(W,t,!0)},n.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbk,{confirm:e,activityType:n,data:i},!0)},n}(z);var Y=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:z,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(){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.prototype.dispose=function(){this.component.dispose()},t}();var Q=function(t){function e(){var e=t.call(this)||this;e.throttledNestedActivityFinishEvents=new s.MutableStream,e._initialActivityOutletContext=new s.MutableValueModel,e.initialActivityOutletContextEvent=new n.EventEmitter,e.dynamicHeight=!1,e.activityTabs=new s.MutableListModel,e._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(e),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(e.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return e.onNestedActivityFinished()})),e.setActivityList(e._activityList.readonly),e.active=o(e._initialActivityOutletContext).isNotNil(),e}return D(e,t),Object.defineProperty(e.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext.value},set:function(t){s.assert.isNil(this._initialActivityOutletContext.value),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext.value=t,this.activityTabs.push(new Z(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}),e.prototype.ngOnInit=function(){},e.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()},e.prototype._startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new Z(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}))},e.prototype.finishInitialActivity=function(){this.updateActivityList(),this._initialActivityOutletContext.value=null,this.initialActivityOutletContextEvent.emit(null)},e.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},e.prototype.cleanupStaleNestedActivities=function(){if(this.tabs.selectedIndex<this.activityTabs.length-1){var t=this.activityTabs.value,e=t.slice(0,1+this.tabs.selectedIndex);t.slice(1+this.tabs.selectedIndex).forEach((function(t){return t.dispose()})),this.activityTabs.runInTransaction((function(t){t.value=e}))}},e.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},e.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},e.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},e.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},e.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}"]}]}],e.ctorParameters=function(){return[]},e.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:[Y]}]},e}(X);var J=function(){};var $=0;t.ɵv=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new s.GarbageCollector,this.exclusiveContext=new s.MutableValueModel,this._activeModalInteractionContextModel=new s.MutableValueModel,this._activeInlineInteractionContextModel=new s.MutableValueModel;var e=s.Dsl.disposeWith(this.garbage),n=e.chain;e.valueOf,e.before,e.when,e.after,e.observe,e.switchOn;this._activeInteractionContext=n(this._activeModalInteractionContextModel).otherwise(this._activeInlineInteractionContextModel).pluck("interactionContext"),this.active=n(this._activeInteractionContext).isNotNil(),this.modelInteractionActive=n(this._activeModalInteractionContextModel).isNotNil(),this.inlineInteractionActive=n(this._activeInlineInteractionContextModel).isNotNil(),this.activeInteractionContextIds=n(new s.MutableListModel).append(this._activeInlineInteractionContextModel).append(this._activeModalInteractionContextModel).rejectNil().pluck("id")}return t.prototype.isActive=function(){return this.active.value},t.prototype.isModalActive=function(){return this.modelInteractionActive.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(e){var n=this.modelInteractionContextFactory.createInteractionContext();return e.registerDisposable(new t.Monitor("modal",n,this._activeModalInteractionContextModel,this.exclusiveContext)),n},t.prototype._registerInplaceInteractionContext=function(e){e.registerDisposable(new t.Monitor("ip"+ ++$,e,this._activeInlineInteractionContextModel,this.exclusiveContext))},t.prototype.getActiveContext=function(){return l.assert.isTruthy(this.isActive()),this._activeInteractionContext.value},t.prototype._createExclusiveModalInteractionContext=function(){this.exclusiveContext.value=this.modelInteractionContextFactory.createInteractionContext();var t=this;return this.exclusiveContext.value.registerDisposable({dispose:function(){t.exclusiveContext.value=null}}),this.exclusiveContext.value},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:J}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(J))},token:t,providedIn:"root"}),t}(),function(t){function e(){}t.Callback=e;var n=function(t){function e(e,n,i,o){var r=t.call(this)||this;r.id=e,r.interactionContext=n,r.currentActiveMonitor=i,r.exclusiveContext=o;var a=s.Dsl.disposeWith(r),c=(a.chain,a.valueOf,a.before,a.when);a.after,a.observe,a.switchOn;return c.valueOf(n.active).becomesTruthy((function(){return r.onStarted()})),c.valueOf(n.active).becomesFalsey((function(){return r.onFinished()})),n.registerDisposable(r),r}return D(e,t),e.prototype.onStarted=function(){this.assertCanStart(),this.currentActiveMonitor.value=this},e.prototype.assertCanStart=function(){l.assert.isFalsey(this.currentActiveMonitor.value),this.exclusiveContext.value&&this.interactionContext!==this.exclusiveContext.value&&s.lang.illegalState("Interaction started while exclusive lock active. This is usually because you using a different context during place.canDeactivate(interactionContext)")},e.prototype.onFinished=function(){this.assertCurrentlyActive(),this.currentActiveMonitor.value=null},e.prototype.assertCurrentlyActive=function(){l.assert.isTruthy(this.currentActiveMonitor.value===this)},e}(s.GarbageCollector);t.Monitor=n}(t.ɵv||(t.ɵv={}));var tt=function(e){function i(t){var n=e.call(this)||this;return n.interactionService=t,n._active=new s.MutableValueModel(!1),n.interactionService._registerInplaceInteractionContext(n),n}return D(i,e),i.prototype.ngAfterViewInit=function(){this.setActivityList(this.interactionContext.activityList)},Object.defineProperty(i.prototype,"active",{get:function(){return this._active.readonly},enumerable:!0,configurable:!0}),i.prototype._startActivity=function(t,e){var n=this;this._active.value=!0;var i=this;return new Promise((function(o,r){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i._active.value=!1,o(t)},onCancel:function(t){i._active.value=!1,r(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[{type:t.ɵv}]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(X);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:[Q,W,t.ɵbk,K,Y,tt],exports:[Q,Y,tt],entryComponents:[Q,W,t.ɵbk,K],providers:[t.ɵv]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=l.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 S(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=l.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(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),A([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),A([h.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("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,s.DebugContext.get(this.visit).tag(this.placeDefinition.component.name+".visit"),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([v.Memoize(),R("design:type",t.PlaceDefinition),R("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(E),(nt=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(nt)},nt.getRouteParameters=function(t){return l.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!y.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,x({},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=y.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!y.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var at=new n.InjectionToken("AUP_PLACE_CONFIG");var st=function(){function t(t,e,n){this.component=t,this.navigationState=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"interactionService",{get:function(){return this.navigationState.interactionService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"placeRouter",{get:function(){return this.navigationState.placeRouter},enumerable:!0,configurable:!0}),t.prototype.canDeactivate=function(t,e){return S(this,void 0,void 0,(function(){return w(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return S(this,void 0,void 0,(function(){var n,i;return w(this,(function(o){switch(o.label){case 0:return this.navigationState.isPopState?this.isPrimaryComponent&&this.interactionService.isModalActive()?(n=this.placeRouter.getActiveInteractionIdsFromUrl(e.url),i=this.interactionService.activeInteractionContextIds.value,y.isEqual(i,n)?[3,2]:[4,this.interactionService.getActiveContext().cancelActiveActivity()]):[3,3]:[3,5];case 1:return o.sent(),[2,t.updateInteractionIds(this.interactionService.activeInteractionContextIds.value)];case 2:return[3,5];case 3:return this.component.interactionContext&&this.component.interactionContext.isActive()?[4,this.component.interactionContext.cancelActiveActivity()]:[3,5];case 4:return o.sent(),[2,t.updateInteractionIds(this.interactionService.activeInteractionContextIds.value)];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationState.interactionContext)];if(this.component.interactionContext&&this.component.interactionContext.isActive())return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}();t.NavigationState=function(t){function e(e){var n=t.call(this)||this;return n.context=e,n._visits=new Map,n.debugPropertyKeys=[],n}return D(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"idle",{get:function(){return!this.isTransitional},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"placeRouter",{get:function(){return this.context.placeRouter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionService",{get:function(){return this.context.interactionService},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionContext",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},e.prototype.onPlaceNavigationStart=function(t,e){return this.illegalTransition("onPlaceNavigationStart")},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterStarted=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.onBackClickedDuringNavigationInteraction=function(t){return this.illegalTransition("onBackClickedDuringNavigationInteraction")},e.prototype.canDeactivatePlace=function(t,e,n){return S(this,void 0,void 0,(function(){return w(this,(function(t){return[2,this.illegalTransition("canDeactivatePlace")]}))}))},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return s.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.placeRouter.getCurrentRouterUrl()},e.prototype.createTransitionStateFor=function(t){var n="popstate"===t.navigationTrigger,i=this.interactionService.isActive();return n?i?new e.LeavingInteractionAfterPopStateTransition(this.context,this.currentRouterUrl(),t.url):new e.PopStateTransition(this.context,this.currentRouterUrl(),t.url):i?new e.StartingInteractionTransition(this.context,this.currentRouterUrl()):new e.NavigationTransition(this.context,this.currentRouterUrl())},e.prototype.createIdleState=function(){return this.interactionService.isActive()?new e.IdleDuringInteraction(this.context,this.currentRouterUrl()):new e.Idle(this.context)},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.placeRouter.resetBrowserLocation(t,e)},e.prototype.ignore=function(t,e){return e=e?" -> "+e:"",s.Logger.get(this).info("Ignoring router event"+e+": "+t.constructor.name+" -> "+t.url+" :: "+this.toString()),this},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.replaceBuggeredUrlAfterAngularRouterCancelled=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e}(s.GarbageCollector),function(t){var e=function(t,e,n){this.placeRouter=t,this.interactionService=e,this.notifySuccess=n};t.Context=e;var n=function(t){function e(e){var n=t.call(this,e)||this;return n.isTransitional=!1,n.startingUrl=null,n.isPopState=!1,n}return D(e,t),e.prototype.onPlaceNavigationStart=function(t,e){var n=new o(this.context,e);return n.storeVisit(t),n},e.prototype.onRouterStarted=function(t){return t.url===this.currentRouterUrl()?(s.Logger.get(this).info("navigation started to same url -> "+t.url),this):this.placeRouter.hasActiveInteractionIds(t.url)?(s.Logger.get(this).info("navigation started with interaction outlet -> "+t.url),new u(this.context,t.url)):this.createTransitionStateFor(t)},e.prototype.onPopState=function(t){return this.createTransitionStateFor(t)},e}(t);t.Idle=n;var i=function(t){function e(e,n){var i=t.call(this,e)||this;return i.startingUrl=n,i.isTransitional=!0,i.componentDeactivationHandlers=new Map,i._interactionContext=i.interactionService._createExclusiveModalInteractionContext(),i.onDispose((function(){i._interactionContext&&i._interactionContext.dispose()})),i}return D(e,t),Object.defineProperty(e.prototype,"interactionContext",{get:function(){return this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this},e.prototype.onRouterEnd=function(t){return this.context.notifySuccess(this),new n(this.context)},e.prototype.onBackClickedDuringNavigationInteraction=function(t){s.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachInteractionContext();s.Dsl.disposeWith(e).when;return s.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.createNavigationInteractionCancelledState(t)},e.prototype.canDeactivatePlace=function(t,e,n){return S(this,void 0,void 0,(function(){var i,o;return w(this,(function(r){return(i=this.componentDeactivationHandlers.get(t))||(o=0===this.componentDeactivationHandlers.size,i=new st(t,this,o),this.componentDeactivationHandlers.set(t,i)),[2,i.canDeactivate(e,n)]}))}))},e.prototype.detachInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(t);t.AbstractNavigationTransition=i;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl"],e}return D(e,t),e.prototype.onRouterCancelled=function(t){return this},e.prototype.onRouterError=function(t){return new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return new d(this.context,this.startingUrl,t)},e}(i);t.NavigationTransition=o;var r=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o}return D(e,t),e.prototype.onRouterCancelled=function(t){return this.replaceBuggeredUrlAfterAngularRouterCancelled(this.poppedHistoryUrl),s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.resetBrowserLocation(this.startingUrl),new n(this.context)},e.prototype.onRouterError=function(t){return this.illegalTransition("when do I get this???")},e.prototype.createNavigationInteractionCancelledState=function(t){return new f(this.context,this.startingUrl,t,this.poppedHistoryUrl)},e}(i);t.PopStateTransition=r;var a=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.startingUrl=n,i.isTransitional=!0,i}return D(e,t),e}(i);t.AbstractInteractionTransition=a;var c=function(t){function e(e,n){var i=t.call(this,e)||this;return i.startingUrl=n,i.isTransitional=!1,i.isPopState=!1,i.debugPropertyKeys=["startingUrl"],i}return D(e,t),e.prototype.onPlaceNavigationStart=function(t,e){var n=new u(this.context,e);return n.storeVisit(t),n},e.prototype.onRouterStarted=function(t){return new u(this.context,t.url)},e.prototype.onPopState=function(t){return new p(this.context,t.url,t.url)},e}(t);t.IdleDuringInteraction=c;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return D(e,t),e.prototype.onRouterCancelled=function(t){if(this.context.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;return this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url),new c(this.context,this.startingUrl)}return new n(this.context)},e.prototype.onRouterError=function(t){return new c(this.context,this.startingUrl)},e.prototype.onRouterEnd=function(t){return this.context.interactionService.isActive()?new c(this.context,this.startingUrl):new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return new l(this.context,this.startingUrl,t)},e}(a);t.StartingInteractionTransition=u;var l=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.startingUrl=n,o.locationChangeTriggerUrl=i,o.isPopState=!1,o.firstCancelHandled=!1,o.popStateHandled=!1,o.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],o}return D(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()},e.prototype.onRouterEnd=function(t){return this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return S(this,void 0,void 0,(function(){return w(this,(function(t){return[2,!1]}))}))},e}(t);t.LeavingInteractionTransitionCancelled=l;var p=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o}return D(e,t),e.prototype.onRouterCancelled=function(t){if(this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;return this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url),new c(this.context,this.startingUrl)}return new n(this.context)},e.prototype.onRouterEnd=function(t){return this.context.interactionService.isActive()?new c(this.context,this.startingUrl):new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(a);t.LeavingInteractionAfterPopStateTransition=p;var d=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.startingUrl=n,o.clickedLinkUrl=i,o.isPopState=!1,o.clickedLinkMatchedBackButtonUrl=!1,o.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],o}return D(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){return this.firstCancelEventUrl?!this.clickedLinkMatchedBackButtonUrl&&this.popStateEventUrl?this.finaliseRouting():void 0:(this.firstCancelEventUrl=t.url,this.clickedLinkMatchedBackButtonUrl=t.url===this.clickedLinkUrl,this.ignore(t))},e.prototype.onRouterEnd=function(t){return this.clickedLinkMatchedBackButtonUrl?this.finaliseRouting():this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.finaliseRouting=function(){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.replaceBuggeredUrlAfterAngularRouterCancelled(this.clickedLinkUrl),this.interactionService.isActive()){var t=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(t).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()},e.prototype.canDeactivatePlace=function(t,e,n){return S(this,void 0,void 0,(function(){return w(this,(function(t){return[2,!1]}))}))},e}(t);t.LinkTriggeredNavigationInteractionCancelled=d;var f=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.startingUrl=n,r.locationChangeTriggerUrl=i,r.poppedHistoryUrl=o,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return D(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled&&this.popStateHandled){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.replaceBuggeredUrlAfterAngularRouterCancelled(this.locationChangeTriggerUrl),this.resetBrowserLocation(this.poppedHistoryUrl),this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()}return this.firstCancelHandled=!0,this.ignore(t)},e.prototype.onRouterEnd=function(t){return this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return S(this,void 0,void 0,(function(){return w(this,(function(t){return[2,!1]}))}))},e}(t);t.PopStateTriggeredNavigationInteractionCancelled=f}(t.NavigationState||(t.NavigationState={}));var ct=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.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),i=_(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,_([r,o.length],o)),n.root.children.primary.segments=i,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=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.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractionIds=function(){return this.getInteractionIds().length>0},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t}(),function(t){function e(){}t.INTERACTION_QUERY_PARAM="aup-interactions",t.INTERACTION_ID_SEPARATOR="--",t.parseInteractionIds=function(e){return e.split(t.INTERACTION_ID_SEPARATOR)},t.createPathIdFor=function(e){return e.join(t.INTERACTION_ID_SEPARATOR)},t.NavigationOptions=e}(t.UrlSnapshot||(t.UrlSnapshot={}));var ut=function(i){function o(e,n,o,r,a){var c=i.call(this)||this;c.router=e,c.urlSerializer=n,c.angularLocation=o,c.placeHistory=r,c.interactionService=a,c._navigationStateModel=new s.MutableValueModel,c._activeVisits=new s.MutableListModel;var l=s.Dsl.disposeWith(c),p=l.chain,d=(l.valueOf,l.before,l.when);l.after,l.observe,l.switchOn;c.activeVisitIndex=p(c._activeVisits).indexBy("placeDefinition"),c.navigationInProgress=p(c.navigationStateModel).pluck("isTransitional"),c._navigationSessionContext=new t.NavigationState.Context(c,c.interactionService,(function(t){c.processNavigationSuccess(t)})),c._navigationStateModel.value=new t.NavigationState.Idle(c._navigationSessionContext),c._navigationStateTypeModel=p(c._navigationStateModel).map((function(t){return t.constructor})),c.router.events.subscribe((function(t){t instanceof u.NavigationStart&&("popstate"===t.navigationTrigger?c.runStateTransition((function(e){return e.onPopState(t)})):c.runStateTransition((function(e){return e.onRouterStarted(t)}))),t instanceof u.NavigationEnd&&(console.log(t),c.runStateTransition((function(e){return e.onRouterEnd(t)}))),t instanceof u.NavigationError&&(console.log(t),c.runStateTransition((function(e){return e.onRouterError(t)}))),t instanceof u.NavigationCancel&&(console.log(t),c.runStateTransition((function(e){return e.onRouterCancelled(t)})))})),d.listOf(c.interactionService.activeInteractionContextIds).changes((function(t,e){c.syncInteractionIdsWithRouter(t,e)}),{unless:c.navigationInProgress});var f=new s.MutableStream;return o.onUrlChange((function(t){var e=c._navigationStateModel.value;if(console.log("URLChange -> "+t,{state:e}),f.publish({url:t,state:e}),e.isTransitional){var n=c.navigationState.interactionContext;n&&n.isActive()&&c.runStateTransition((function(e){return e.onBackClickedDuringNavigationInteraction(t)}))}})),c}return D(o,i),o.prototype.processNavigationSuccess=function(t){var e=this;s.assert.isTruthy(this.navigationInProgress.value);var n=t.getVisits();n.forEach((function(t){return e.placeHistory.add(t)})),this._activeVisits.value=n},Object.defineProperty(o.prototype,"navigationState",{get:function(){return this._navigationStateModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationStateModel",{get:function(){return this._navigationStateModel.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 S(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return this.doNavigation(t,(function(i){return S(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 S(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.url).updateVisitSegments(n);return console.log("### Push Changes to route Redirect",{commands:i.url}),t.navigateByUrl(i)}))]:[2]}))}))},o.prototype.doNavigation=function(t,e){return S(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&s.lang.illegalState("Navigation already in progress"),this.runStateTransition((function(e){var i=n.navigationState.onPlaceNavigationStart(t,n.getCurrentRouterUrl());return i.storeVisit(t),i})),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,e(this.router)];case 2:return i.sent(),[3,4];case 3:return this.navigationState.isTransitional&&!this.router.getCurrentNavigation()&&this.runStateTransition((function(t){return t.onRouterEnd(new u.NavigationEnd(-1,"",""))})),[7];case 4:return[2]}}))}))},o.prototype.runStateTransition=function(t){var e=this._navigationStateModel.value,n=t(this.navigationState);this._navigationStateModel.value=n,n!==e&&(e.dispose(),s.Logger.get(this).info("Router State Transition: "+e.toString()+" -> "+n.toString()))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.extractChildPath=function(t){return P.flatten(t.children.map((function(t){return t.url})))},o.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},o.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},o.prototype.forward=function(){this.angularLocation.forward()},o.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return e.forEach((function(e){i.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(i.join(""))},o.prototype.getCurrentRouterUrl=function(){return this.router.routerState?this.router.routerState.snapshot.url:null},o.prototype.getCurrentRouteSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},o.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},o.prototype.hasActiveInteractionIds=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},o.prototype.navigateByUrl=function(t,e){return this.router.navigateByUrl(t.urlTree,e)},o.prototype.syncInteractionIdsWithRouter=function(t,e){var n=this;if(s.assert.isFalsey(this.navigationInProgress.value),console.log({startingActivity:t.length>e.length,wasBackButton:this.navigationState.isPopState}),P.isEqual(t,e))console.log("activity ids were the same, skipping");else{var i=t.length>e.length,o=i&&e.length<1,r=t.length<1;if(i)console.log("adding activity"),this.navigateByUrl(this.getCurrentRouteSnapshot().updateInteractionIds(t),{replaceUrl:!o});else{var a=this.getCurrentRouteSnapshot().updateInteractionIds(t);r?this.navigateByUrl(a,{replaceUrl:!0}).then((function(){n.angularLocation.back()})):this.navigateByUrl(a,{replaceUrl:!0})}}},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:e.Location},{type:ct},{type:t.ɵv}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(e.Location),n.ɵɵinject(ct),n.ɵɵinject(t.ɵv))},token:o,providedIn:"root"}),o}(s.GarbageCollector);var lt=m.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),pt=[m.query(":enter, :leave",lt,{optional:!0}),m.group([m.query(":enter",[m.style({transform:"translateX(-100%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(0%)"}))],{optional:!0}),m.query(":leave",[m.style({transform:"translateX(0%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(100%)"}))],{optional:!0})])],dt=[m.query(":enter, :leave",lt,{optional:!0}),m.group([m.query(":enter",[m.style({transform:"translateX(100%)",minHeight:"1px"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(0%)"}))],{optional:!0}),m.query(":leave",[m.style({transform:"translateX(0%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function ft(t){return m.trigger("routeAnimations",[m.transition(":increment",dt,{params:{duration:t}}),m.transition(":decrement",pt,{params:{duration:t}})])}var ht=ft("0.3s");var vt=function(t){function e(e,i,o,r){var a=t.call(this)||this;a.router=e,a.placeRouter=i,a.placeConfig=o,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,l=c.valueOf,p=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r),a._activePlaceVisitModel.setDelegate(new s.MutableValueModel),a._inOutletUpdate=l.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var d=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),f=u(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(d).reduce((function(t){var e=0;return f.value&&(e=t.indexOf(f.value),y.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),y.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:f}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),p.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),p.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationInProgress}),u(a._activePlace).postponeWhile(i.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return D(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),e.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},e.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.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.animateModel.value||this.animationDone()},e.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)}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},e.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n [@.disabled]="!animateModel.value"\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:[ht],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}"]}]}],e.ctorParameters=function(){return[{type:u.Router},{type:ut},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[at]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},e.propDecorators={animate:[{type:n.Input}],animateModel:[{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.StoreInValueModel("animateModel"),R("design:type",Boolean)],e.prototype,"animate",void 0),A([s.UseDelegate({defaultValue:!0}),R("design:type",s.ValueModel)],e.prototype,"animateModel",void 0),A([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),A([s.StoreInListModel("customPlaceAnimationOrderModel"),R("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),e}(E);var gt=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"),R("design:type",Array)],i.prototype,"places",void 0),A([s.UseDelegate(),R("design:type",s.ListModel)],i.prototype,"placesModel",void 0),A([s.StoreInValueModel("placeOutletModel"),R("design:type",vt)],i.prototype,"placeOutlet",void 0),A([s.UseDelegate(),R("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),A([h.Memoize(),R("design:type",Function),R("design:paramtypes",[t.PlaceDefinition]),R("design:returntype",Object)],i.prototype,"getNav",null),i}(E);var yt=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(),R("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),A([s.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var mt=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}(gt);var It=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}(gt),Ct=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,d.MatListModule,f.MatTooltipModule,p.MatIconModule,N],declarations:[mt,yt,vt,It,bt,gt],entryComponents:[yt],exports:[yt,vt,mt,It,bt,gt],providers:[]}]}],t}(),Pt=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,N,H,Ct,et],exports:[et,Ct,N,H,B]}]}],t}(),Mt=m.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),Dt=m.trigger("slideDownOnEnter",[m.transition(":enter",[Mt,m.animate("{{duration}}")],{params:{duration:"100ms"}}),m.transition(":leave",[m.animate("{{duration}}",Mt)],{params:{duration:"100ms"}})]),xt=m.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),At=m.trigger("slideRightOnEnter",[m.transition(":enter",[xt,m.animate("{{duration}}")],{params:{duration:"100ms"}}),m.transition(":leave",[m.animate("{{duration}}",xt)],{params:{duration:"100ms"}})]),Rt=function(t,e){this.width=t,this.height=e};var St,wt=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 wt(t.clientX-this.left,t.clientY-this.top):new wt(t.x-this.left,t.y-this.top)},e}(Rt),(St=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new St(e.top,e.left,e.width,e.height)};var Ot=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 b((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(E);function _t(){}(function(t){function e(){}t.Callback=e})(_t||(_t={}));var Tt=function(t){function e(e,n){var i=t.call(this)||this;return i.dialogService=e,i.config=n,i._activeModel=new s.MutableValueModel(!1),l.assert.notNil(e),i.onDispose((function(){i.isActive()&&s.lang.illegalState("Dispose called while active.")})),i}return D(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeModel.readonly},enumerable:!0,configurable:!0}),e.prototype._startActivity=function(t,e,n){var i=this;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._activeModel.value=!0;var o=x({},this.config,{data:e,disableClose:n,panelClass:"dialog-interaction-context"}),r=this,a=this.dialogService.open(Q,o);return new Promise((function(n,i){var o=a.componentInstance;r.safelyUpdateActivityListDelegate(o.activityList),o.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(),a.afterOpened().subscribe((function(t){a.updateSize()}))})).finally((function(){r.safelyUpdateActivityListDelegate(null),i._activeModel.value=!1}))},e.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e.setActivityList(t)}))},e}(X);var Et=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Ut=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,l.assert.notNil(e),o}return D(e,t),e.prototype.createInteractionContext=function(){var t=x({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig,this.dialogServiceDefaults);return new Tt(this.dialogService,t)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:o.MatDialog},{type:I.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[Et]}]},{type:I.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[I.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(I.MatDialog),n.ɵɵinject(Et,8),n.ɵɵinject(I.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e}(J);function Nt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!!y.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})(Nt||(Nt={}));var Ft=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Lt(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(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();var Lt=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}();var kt=function(){function t(){}return t.prototype.canActivate=function(t,e){return S(this,void 0,void 0,(function(){return w(this,(function(t){return[2,!0]}))}))},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}(),jt=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 S(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(),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}();var Vt,Bt,Ht,qt,Gt=function(){function e(t,e,n,i,o,r){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.interactionService=o,this.injector=r}return e.prototype.canActivate=function(t,e){return S(this,void 0,void 0,(function(){var n=this;return w(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return S(n,void 0,void 0,(function(){var n,o=this;return w(this,(function(r){switch(r.label){case 0:return[4,this.cleanInteractionState(t,e,(function(){return S(o,void 0,void 0,(function(){var n,o,r,a,s;return w(this,(function(c){switch(c.label){case 0:return n=new Ft(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationState.getVisitFor(i)||new rt(i,o),[4,new jt(t,this.router,this.placeHistory,this.injector).sanitise(r.mergeRouteParameters(o))];case 1:return a=c.sent(),this.placeRouter.navigationState.storeVisit(a),r.hasRoutingChangedFrom(a)?(s=this.placeRouter.parseUrl(e.url).updateVisitSegments(a),console.log("##### Place Guard Redirect",s),[2,s]):[2,!0]}}))}))}))];case 1:return n=r.sent(),[2,this.handleGuardResult(n)]}}))}))}))]}))}))},e.prototype.canDeactivate=function(t,e,n,i){return S(this,void 0,void 0,(function(){var e,o,r;return w(this,(function(a){switch(a.label){case 0:return e=this.placeRouter.parseUrl(n.url),o=this.placeRouter.parseUrl(i.url),[4,this.placeRouter.navigationState.canDeactivatePlace(t,e,o)];case 1:return r=a.sent(),[2,this.handleGuardResult(r)]}}))}))},e.prototype.handleGuardResult=function(e){return e instanceof t.UrlSnapshot?e.urlTree:e},e.prototype.authorisePlaceThen=function(e,n,i){return S(this,void 0,void 0,(function(){var o,r,a;return w(this,(function(c){switch(c.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=c.sent(),[3,3];case 2:a=!0,c.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return S(this,void 0,void 0,(function(){var n;return w(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof C.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return S(this,void 0,void 0,(function(){var t;return w(this,(function(i){return t=this.placeRouter.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractionIds()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();Vt=t.Formatter||(t.Formatter={}),Bt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Ht=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}(),qt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Vt.STRING=new Bt,Vt.NUMBER=new Ht,Vt.BOOLEAN=new qt,t.ACTIVITY_DATA=q,t.AUP_PLACE_CONFIG=at,t.AbstractActivity=G,t.AbstractInputComponent=F,t.AbstractPlaceNavigationComponent=gt,t.Activity=t.ɵbi,t.ActivityContainerComponent=Q,t.ActivityOutletComponent=Y,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=Pt,t.BusyOverlayComponent=yt,t.CommandDirective=T,t.ComponentsModule=H,t.ConfirmThenDialogComponent=t.ɵbk,t.ConfirmationDialogComponent=W,t.ConsolidatedParameterMap=Ft,t.DEFINITION_META_DATA_KEY=it,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=Et,t.DialogInteractionContext=Tt,t.DialogInteractionContextFactory=Ut,t.Dimension=Rt,t.DirectivesModule=N,t.DisposableComponent=E,t.EmptyStateComponent=mt,t.FocusBindingDirective=U,t.InplaceInteractionContextComponent=tt,t.InteractionContext=z,t.InteractionContextBase=X,t.InteractionModule=et,t.InteractionService=t.ɵv,t.LEFT_RIGHT_PLACE_ANIMATION=ht,t.ListPlaceNavComponent=bt,t.ModalInteractionContextFactory=J,t.NoopAuthGuard=kt,t.NoopComponent=B,t.NumberInputComponent=L,t.PasswordInputComponent=k,t.Place=Nt,t.PlaceComponentDeactivationHandler=st,t.PlaceGuard=Gt,t.PlaceHistory=ct,t.PlaceModule=Ct,t.PlaceOutletComponent=vt,t.PlaceRouter=ut,t.Point=wt,t.ROUTE_PARAMETER_LIST_KEY=ot,t.ResizeAwareComponent=Ot,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);l.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate({tag:"@RouteId("+i.constructor.name+"."+o.toString()+")"})(i,o)}},t.SelectInputComponent=j,t.StringInputComponent=V,t.TabbedPlaceNavigationComponent=It,t.Visit=rt,t.VisitParameter=function(e){var n=l.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));l.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate({tag:"@VisitParameter("+i.constructor.name+"."+o.toString()+")"})(i,o)}},t.VisitParameterList=function(e){var n=l.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));s.UseDelegate({tag:"@VisitParameterList("+i.constructor.name+"."+o.toString()+")"})(i,o),l.Klass.get(i).addToOwnMetadataList(ot,r)}},t.VisitSanitiser=jt,t.leftRightPlaceAnimation=ft,t.slideDownOnEnterAnimation=Dt,t.slideRightOnEnterAnimation=At,t.ɵa=N,t.ɵb=T,t.ɵba=et,t.ɵbb=Q,t.ɵbc=X,t.ɵbd=z,t.ɵbe=Y,t.ɵbf=W,t.ɵbg=G,t.ɵbh=q,t.ɵbl=K,t.ɵbn=tt,t.ɵc=U,t.ɵd=E,t.ɵe=H,t.ɵf=L,t.ɵg=F,t.ɵh=V,t.ɵi=k,t.ɵj=j,t.ɵk=B,t.ɵl=Ct,t.ɵm=mt,t.ɵn=yt,t.ɵo=vt,t.ɵp=ft,t.ɵq=ht,t.ɵr=at,t.ɵt=ut,t.ɵu=ct,t.ɵw=J,t.ɵx=It,t.ɵy=gt,t.ɵz=bt,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("@coolon/typescript-utilities"),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("lodash"),require("@angular/animations"),require("resize-observer-polyfill"),require("@angular/material/dialog"),require("rxjs")):"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","@coolon/typescript-utilities","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill","@angular/material/dialog","rxjs"],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.typescriptUtilities,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver,t.ng.material.dialog,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,h,g,v,y,m,b,I,C){"use strict";var P="default"in y?y.default:y;b=b&&b.hasOwnProperty("default")?b.default:b;var M=function(t,e){return(M=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 x(t,e){function n(){this.constructor=t}M(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 w(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 S(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 O(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(O(arguments[e]));return t}var T=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 x(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 E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),U=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 x(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}(E);var N=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[T,U],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[T,U]}]}],t}(),k=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 x(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"]}]},w([s.UseDelegate(),A("design:type",s.ValueModel),A("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(E);var F=function(t){function e(){return t.call(this)||this}return x(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}(k),L=function(t){function e(){return t.call(this)||this}return x(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}(k),j=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 x(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}]},w([s.UseDelegate(),A("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),w([s.StoreInListModel("optionsModel"),A("design:type",Array)],e.prototype,"options",void 0),e}(k);var V=function(t){function e(){return t.call(this)||this}return x(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}(k),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),H=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,V,L,j,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,N],exports:[F,V,L,j,B]}]}],t}(),q=new n.InjectionToken("InteractionActivityData");t.ɵbi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return x(e,t),e.prototype.initialise=function(t){l.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.ɵbi||(t.ɵbi={}));var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e}(t.ɵbi),K=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return x(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}(G);var z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.isActive=function(){return this.active.value},e.prototype.dispose=function(){s.assert.isFalsey(this.isActive()),t.prototype.dispose.call(this)},e.prototype.cancelActiveActivity=function(){return R(this,void 0,void 0,(function(){var t,e,n=this;return S(this,(function(i){switch(i.label){case 0:return t=s.Dsl.disposeWith(this).when,[4,this.getActiveActivity()];case 1:return e=i.sent(),[2,new Promise((function(i){t.valueOf(n.activeActivity).changes((function(t){i(!t)}),{once:!0}),e.cancel()}))]}}))}))},e}(s.GarbageCollector);t.ɵbk=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 x(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:z}]},e}(G),function(t){function e(){}t.Data=e}(t.ɵbk||(t.ɵbk={}));var W=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return x(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}(G);var X=function(e){function n(){var t=e.call(this)||this;t._activityListDelegate=new s.DelegatingListModel;var n=s.Dsl.disposeWith(t),i=n.chain,o=(n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return t._currentActivity=i(t.activityList).last(),o.valueOf(t._currentActivity).becomesTruthy((function(e){t.deferredGetCurrentActivity&&(t.deferredGetCurrentActivity.resolve(e),t.deferredGetCurrentActivity=null)})),t}return x(n,e),n.prototype.setActivityList=function(t){this._activityListDelegate.setDelegate(t)},Object.defineProperty(n.prototype,"activityList",{get:function(){return this._activityListDelegate.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeActivity",{get:function(){return this._currentActivity},enumerable:!0,configurable:!0}),n.prototype.getActiveActivity=function(){return R(this,void 0,void 0,(function(){return S(this,(function(t){return this.isActive()?this.deferredGetCurrentActivity?[2,this.deferredGetCurrentActivity.promise]:this._currentActivity.value?[2,this._currentActivity.value]:(this.deferredGetCurrentActivity=s.Deferred.defer(),[2,this.deferredGetCurrentActivity.promise]):[2,Promise.reject("no activity in progress")]}))}))},n.prototype.startActivity=function(t,e){return this._startActivity(t,e)},n.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},n.prototype.alert=function(t){return this._startActivity(K,t,!1)},n.prototype.confirmOrReject=function(t){return this._startActivity(W,t,!0)},n.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbk,{confirm:e,activityType:n,data:i},!0)},n}(z);var Y=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:z,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(){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.prototype.dispose=function(){this.component.dispose()},t}();var Q=function(t){function e(){var e=t.call(this)||this;e.throttledNestedActivityFinishEvents=new s.MutableStream,e._initialActivityOutletContext=new s.MutableValueModel,e.initialActivityOutletContextEvent=new n.EventEmitter,e.dynamicHeight=!1,e.activityTabs=new s.MutableListModel,e._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(e),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(e.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return e.onNestedActivityFinished()})),e.setActivityList(e._activityList.readonly),e.active=o(e._initialActivityOutletContext).isNotNil(),e}return x(e,t),Object.defineProperty(e.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext.value},set:function(t){s.assert.isNil(this._initialActivityOutletContext.value),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext.value=t,this.activityTabs.push(new Z(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}),e.prototype.ngOnInit=function(){},e.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()},e.prototype._startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new Z(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}))},e.prototype.finishInitialActivity=function(){this.updateActivityList(),this._initialActivityOutletContext.value=null,this.initialActivityOutletContextEvent.emit(null)},e.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},e.prototype.cleanupStaleNestedActivities=function(){if(this.tabs.selectedIndex<this.activityTabs.length-1){var t=this.activityTabs.value,e=t.slice(0,1+this.tabs.selectedIndex);t.slice(1+this.tabs.selectedIndex).forEach((function(t){return t.dispose()})),this.activityTabs.runInTransaction((function(t){t.value=e}))}},e.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},e.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},e.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},e.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},e.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}"]}]}],e.ctorParameters=function(){return[]},e.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:[Y]}]},e}(X);var J=function(){};var $=0;t.ɵv=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new s.GarbageCollector,this.exclusiveContext=new s.MutableValueModel,this._activeModalInteractionContextModel=new s.MutableValueModel,this._activeInlineInteractionContextModel=new s.MutableValueModel;var e=s.Dsl.disposeWith(this.garbage),n=e.chain;e.valueOf,e.before,e.when,e.after,e.observe,e.switchOn;this._activeInteractionContext=n(this._activeModalInteractionContextModel).otherwise(this._activeInlineInteractionContextModel).pluck("interactionContext"),this.active=n(this._activeInteractionContext).isNotNil(),this.modelInteractionActive=n(this._activeModalInteractionContextModel).isNotNil(),this.inlineInteractionActive=n(this._activeInlineInteractionContextModel).isNotNil(),this.activeInteractionContextIds=n(new s.MutableListModel).append(this._activeInlineInteractionContextModel).append(this._activeModalInteractionContextModel).rejectNil().pluck("id")}return t.prototype.isActive=function(){return this.active.value},t.prototype.isModalActive=function(){return this.modelInteractionActive.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(e){var n=this.modelInteractionContextFactory.createInteractionContext();return e.registerDisposable(new t.Monitor("modal",n,this._activeModalInteractionContextModel,this.exclusiveContext)),n},t.prototype._registerInplaceInteractionContext=function(e){e.registerDisposable(new t.Monitor("ip"+ ++$,e,this._activeInlineInteractionContextModel,this.exclusiveContext))},t.prototype.getActiveContext=function(){return l.assert.isTruthy(this.isActive()),this._activeInteractionContext.value},t.prototype._createExclusiveModalInteractionContext=function(){this.exclusiveContext.value=this.modelInteractionContextFactory.createInteractionContext();var t=this;return this.exclusiveContext.value.registerDisposable({dispose:function(){t.exclusiveContext.value=null}}),this.exclusiveContext.value},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:J}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(J))},token:t,providedIn:"root"}),t}(),function(t){function e(){}t.Callback=e;var n=function(t){function e(e,n,i,o){var r=t.call(this)||this;r.id=e,r.interactionContext=n,r.currentActiveMonitor=i,r.exclusiveContext=o;var a=s.Dsl.disposeWith(r),c=(a.chain,a.valueOf,a.before,a.when);a.after,a.observe,a.switchOn;return c.valueOf(n.active).becomesTruthy((function(){return r.onStarted()})),c.valueOf(n.active).becomesFalsey((function(){return r.onFinished()})),n.registerDisposable(r),r}return x(e,t),e.prototype.onStarted=function(){this.assertCanStart(),this.currentActiveMonitor.value=this},e.prototype.assertCanStart=function(){l.assert.isFalsey(this.currentActiveMonitor.value),this.exclusiveContext.value&&this.interactionContext!==this.exclusiveContext.value&&s.lang.illegalState("Interaction started while exclusive lock active. This is usually because you using a different context during place.canDeactivate(interactionContext)")},e.prototype.onFinished=function(){this.assertCurrentlyActive(),this.currentActiveMonitor.value=null},e.prototype.assertCurrentlyActive=function(){l.assert.isTruthy(this.currentActiveMonitor.value===this)},e}(s.GarbageCollector);t.Monitor=n}(t.ɵv||(t.ɵv={}));var tt=function(e){function i(t){var n=e.call(this)||this;return n.interactionService=t,n._active=new s.MutableValueModel(!1),n.interactionService._registerInplaceInteractionContext(n),n}return x(i,e),i.prototype.ngAfterViewInit=function(){this.setActivityList(this.interactionContext.activityList)},Object.defineProperty(i.prototype,"active",{get:function(){return this._active.readonly},enumerable:!0,configurable:!0}),i.prototype._startActivity=function(t,e){var n=this;this._active.value=!0;var i=this;return new Promise((function(o,r){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i._active.value=!1,o(t)},onCancel:function(t){i._active.value=!1,r(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[{type:t.ɵv}]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(X);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:[Q,W,t.ɵbk,K,Y,tt],exports:[Q,Y,tt],entryComponents:[Q,W,t.ɵbk,K],providers:[t.ɵv]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=l.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 S(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 x(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 x(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 x(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=l.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.get(n.name).split(",").map((function(t){return t.trim()}));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},w([h.Memoize(),A("design:type",Function),A("design:paramtypes",[]),A("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),w([h.Memoize(),A("design:type",Function),A("design:paramtypes",[Object]),A("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),w([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 x(n,e),n.prototype.initialiseVisit=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,s.DebugContext.get(this.visit).tag(this.placeDefinition.component.name+".visit"),this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];s.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName);var n=this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){var n=e.getParameter(t.name);return console.log("push to component",{name:t.name,value:n,visit:e}),n},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}));setTimeout((function(){n.writeRight()}))},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(){},w([s.Trace(),A("design:type",Function),A("design:paramtypes",[t.ParameterDefinition]),A("design:returntype",void 0)],n.prototype,"installBinding",null),w([g.Memoize(),A("design:type",t.PlaceDefinition),A("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(E),(nt=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(nt)},nt.getRouteParameters=function(t){return l.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!y.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=y.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!y.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var at=new n.InjectionToken("AUP_PLACE_CONFIG");var st=function(){function t(t,e,n){this.component=t,this.navigationState=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"interactionService",{get:function(){return this.navigationState.interactionService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"placeRouter",{get:function(){return this.navigationState.placeRouter},enumerable:!0,configurable:!0}),t.prototype.canDeactivate=function(t,e){return R(this,void 0,void 0,(function(){return S(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return R(this,void 0,void 0,(function(){var n,i;return S(this,(function(o){switch(o.label){case 0:return this.navigationState.isPopState?this.isPrimaryComponent&&this.interactionService.isModalActive()?(n=this.placeRouter.getActiveInteractionIdsFromUrl(e.url),i=this.interactionService.activeInteractionContextIds.value,y.isEqual(i,n)?[3,2]:[4,this.interactionService.getActiveContext().cancelActiveActivity()]):[3,3]:[3,5];case 1:return o.sent(),[2,t.updateInteractionIds(this.interactionService.activeInteractionContextIds.value)];case 2:return[3,5];case 3:return this.component.interactionContext&&this.component.interactionContext.isActive()?[4,this.component.interactionContext.cancelActiveActivity()]:[3,5];case 4:return o.sent(),[2,t.updateInteractionIds(this.interactionService.activeInteractionContextIds.value)];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationState.interactionContext)];if(this.component.interactionContext&&this.component.interactionContext.isActive())return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}();t.NavigationState=function(t){function e(e){var n=t.call(this)||this;return n.context=e,n._visits=new Map,n.debugPropertyKeys=[],n}return x(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"idle",{get:function(){return!this.isTransitional},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"placeRouter",{get:function(){return this.context.placeRouter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionService",{get:function(){return this.context.interactionService},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionContext",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},e.prototype.onPlaceNavigationStart=function(t,e){return this.illegalTransition("onPlaceNavigationStart")},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterStarted=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.onBackClickedDuringNavigationInteraction=function(t){return this.illegalTransition("onBackClickedDuringNavigationInteraction")},e.prototype.canDeactivatePlace=function(t,e,n){return R(this,void 0,void 0,(function(){return S(this,(function(t){return[2,this.illegalTransition("canDeactivatePlace")]}))}))},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return s.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.placeRouter.getCurrentRouterUrl()},e.prototype.createTransitionStateFor=function(t){var n="popstate"===t.navigationTrigger,i=this.interactionService.isActive();return n?i?new e.LeavingInteractionAfterPopStateTransition(this.context,this.currentRouterUrl(),t.url):new e.PopStateTransition(this.context,this.currentRouterUrl(),t.url):i?new e.StartingInteractionTransition(this.context,this.currentRouterUrl()):new e.NavigationTransition(this.context,this.currentRouterUrl())},e.prototype.createIdleState=function(){return this.interactionService.isActive()?new e.IdleDuringInteraction(this.context,this.currentRouterUrl()):new e.Idle(this.context)},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.placeRouter.resetBrowserLocation(t,e)},e.prototype.ignore=function(t,e){return e=e?" -> "+e:"",s.Logger.get(this).info("Ignoring router event"+e+": "+t.constructor.name+" -> "+t.url+" :: "+this.toString()),this},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.replaceBuggeredUrlAfterAngularRouterCancelled=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e}(s.GarbageCollector),function(t){var e=function(t,e,n){this.placeRouter=t,this.interactionService=e,this.notifySuccess=n};t.Context=e;var n=function(t){function e(e){var n=t.call(this,e)||this;return n.isTransitional=!1,n.startingUrl=null,n.isPopState=!1,n}return x(e,t),e.prototype.onPlaceNavigationStart=function(t,e){var n=new o(this.context,e);return n.storeVisit(t),n},e.prototype.onRouterStarted=function(t){return t.url===this.currentRouterUrl()?(s.Logger.get(this).info("navigation started to same url -> "+t.url),this):this.placeRouter.hasActiveInteractionIds(t.url)?(s.Logger.get(this).info("navigation started with interaction outlet -> "+t.url),new u(this.context,t.url)):this.createTransitionStateFor(t)},e.prototype.onPopState=function(t){return this.createTransitionStateFor(t)},e}(t);t.Idle=n;var i=function(t){function e(e,n){var i=t.call(this,e)||this;return i.startingUrl=n,i.isTransitional=!0,i.componentDeactivationHandlers=new Map,i._interactionContext=i.interactionService._createExclusiveModalInteractionContext(),i.onDispose((function(){i._interactionContext&&i._interactionContext.dispose()})),i}return x(e,t),Object.defineProperty(e.prototype,"interactionContext",{get:function(){return this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this},e.prototype.onRouterEnd=function(t){return this.context.notifySuccess(this),new n(this.context)},e.prototype.onBackClickedDuringNavigationInteraction=function(t){s.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachInteractionContext();s.Dsl.disposeWith(e).when;return s.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.createNavigationInteractionCancelledState(t)},e.prototype.canDeactivatePlace=function(t,e,n){return R(this,void 0,void 0,(function(){var i,o;return S(this,(function(r){return(i=this.componentDeactivationHandlers.get(t))||(o=0===this.componentDeactivationHandlers.size,i=new st(t,this,o),this.componentDeactivationHandlers.set(t,i)),[2,i.canDeactivate(e,n)]}))}))},e.prototype.detachInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(t);t.AbstractNavigationTransition=i;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl"],e}return x(e,t),e.prototype.onRouterCancelled=function(t){return this},e.prototype.onRouterError=function(t){return new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return new d(this.context,this.startingUrl,t)},e}(i);t.NavigationTransition=o;var r=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o}return x(e,t),e.prototype.onRouterCancelled=function(t){return this.replaceBuggeredUrlAfterAngularRouterCancelled(this.poppedHistoryUrl),s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.resetBrowserLocation(this.startingUrl),new n(this.context)},e.prototype.onRouterError=function(t){return this.illegalTransition("when do I get this???")},e.prototype.createNavigationInteractionCancelledState=function(t){return new f(this.context,this.startingUrl,t,this.poppedHistoryUrl)},e}(i);t.PopStateTransition=r;var a=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.startingUrl=n,i.isTransitional=!0,i}return x(e,t),e}(i);t.AbstractInteractionTransition=a;var c=function(t){function e(e,n){var i=t.call(this,e)||this;return i.startingUrl=n,i.isTransitional=!1,i.isPopState=!1,i.debugPropertyKeys=["startingUrl"],i}return x(e,t),e.prototype.onPlaceNavigationStart=function(t,e){var n=new u(this.context,e);return n.storeVisit(t),n},e.prototype.onRouterStarted=function(t){return new u(this.context,t.url)},e.prototype.onPopState=function(t){return new p(this.context,t.url,t.url)},e}(t);t.IdleDuringInteraction=c;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return x(e,t),e.prototype.onRouterCancelled=function(t){if(this.context.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;return this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url),new c(this.context,this.startingUrl)}return new n(this.context)},e.prototype.onRouterError=function(t){return new c(this.context,this.startingUrl)},e.prototype.onRouterEnd=function(t){return this.context.interactionService.isActive()?new c(this.context,this.startingUrl):new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return new l(this.context,this.startingUrl,t)},e}(a);t.StartingInteractionTransition=u;var l=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.startingUrl=n,o.locationChangeTriggerUrl=i,o.isPopState=!1,o.firstCancelHandled=!1,o.popStateHandled=!1,o.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],o}return x(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()},e.prototype.onRouterEnd=function(t){return this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return R(this,void 0,void 0,(function(){return S(this,(function(t){return[2,!1]}))}))},e}(t);t.LeavingInteractionTransitionCancelled=l;var p=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o}return x(e,t),e.prototype.onRouterCancelled=function(t){if(this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;return this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url),new c(this.context,this.startingUrl)}return new n(this.context)},e.prototype.onRouterEnd=function(t){return this.context.interactionService.isActive()?new c(this.context,this.startingUrl):new n(this.context)},e.prototype.createNavigationInteractionCancelledState=function(t){return this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(a);t.LeavingInteractionAfterPopStateTransition=p;var d=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.startingUrl=n,o.clickedLinkUrl=i,o.isPopState=!1,o.clickedLinkMatchedBackButtonUrl=!1,o.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],o}return x(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){return this.firstCancelEventUrl?!this.clickedLinkMatchedBackButtonUrl&&this.popStateEventUrl?this.finaliseRouting():void 0:(this.firstCancelEventUrl=t.url,this.clickedLinkMatchedBackButtonUrl=t.url===this.clickedLinkUrl,this.ignore(t))},e.prototype.onRouterEnd=function(t){return this.clickedLinkMatchedBackButtonUrl?this.finaliseRouting():this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.finaliseRouting=function(){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.replaceBuggeredUrlAfterAngularRouterCancelled(this.clickedLinkUrl),this.interactionService.isActive()){var t=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(t).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()},e.prototype.canDeactivatePlace=function(t,e,n){return R(this,void 0,void 0,(function(){return S(this,(function(t){return[2,!1]}))}))},e}(t);t.LinkTriggeredNavigationInteractionCancelled=d;var f=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.startingUrl=n,r.locationChangeTriggerUrl=i,r.poppedHistoryUrl=o,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return x(e,t),Object.defineProperty(e.prototype,"isTransitional",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.onRouterStarted=function(t){return this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled&&this.popStateHandled){if(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.replaceBuggeredUrlAfterAngularRouterCancelled(this.locationChangeTriggerUrl),this.resetBrowserLocation(this.poppedHistoryUrl),this.interactionService.isActive()){var e=this.interactionService.activeInteractionContextIds.value;this.resetBrowserLocation(this.placeRouter.parseUrl(this.startingUrl).updateInteractionIds(e).url)}else this.resetBrowserLocation(this.startingUrl);return this.createIdleState()}return this.firstCancelHandled=!0,this.ignore(t)},e.prototype.onRouterEnd=function(t){return this.ignore(t)},e.prototype.onRouterError=function(t){return this.ignore(t)},e.prototype.onPopState=function(t){return this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return R(this,void 0,void 0,(function(){return S(this,(function(t){return[2,!1]}))}))},e}(t);t.PopStateTriggeredNavigationInteractionCancelled=f}(t.NavigationState||(t.NavigationState={}));var ct=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.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),i=_(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,_([r,o.length],o)),n.root.children.primary.segments=i,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=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.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractionIds=function(){return this.getInteractionIds().length>0},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t}(),function(t){function e(){}t.INTERACTION_QUERY_PARAM="aup-interactions",t.INTERACTION_ID_SEPARATOR="--",t.parseInteractionIds=function(e){return e.split(t.INTERACTION_ID_SEPARATOR)},t.createPathIdFor=function(e){return e.join(t.INTERACTION_ID_SEPARATOR)},t.NavigationOptions=e}(t.UrlSnapshot||(t.UrlSnapshot={}));var ut=function(i){function o(e,n,o,r,a){var c=i.call(this)||this;c.router=e,c.urlSerializer=n,c.angularLocation=o,c.placeHistory=r,c.interactionService=a,c._navigationStateModel=new s.MutableValueModel,c._activeVisits=new s.MutableListModel;var l=s.Dsl.disposeWith(c),p=l.chain,d=(l.valueOf,l.before,l.when);l.after,l.observe,l.switchOn;c.activeVisitIndex=p(c._activeVisits).indexBy("placeDefinition"),c.navigationInProgress=p(c.navigationStateModel).pluck("isTransitional"),c._navigationSessionContext=new t.NavigationState.Context(c,c.interactionService,(function(t){c.processNavigationSuccess(t)})),c._navigationStateModel.value=new t.NavigationState.Idle(c._navigationSessionContext),c._navigationStateTypeModel=p(c._navigationStateModel).map((function(t){return t.constructor})),c.router.events.subscribe((function(t){t instanceof u.NavigationStart&&("popstate"===t.navigationTrigger?c.runStateTransition((function(e){return e.onPopState(t)})):c.runStateTransition((function(e){return e.onRouterStarted(t)}))),t instanceof u.NavigationEnd&&(console.log(t),c.runStateTransition((function(e){return e.onRouterEnd(t)}))),t instanceof u.NavigationError&&(console.log(t),c.runStateTransition((function(e){return e.onRouterError(t)}))),t instanceof u.NavigationCancel&&(console.log(t),c.runStateTransition((function(e){return e.onRouterCancelled(t)})))})),d.listOf(c.interactionService.activeInteractionContextIds).changes((function(t,e){c.syncInteractionIdsWithRouter(t,e)}),{unless:c.navigationInProgress});var f=new s.MutableStream;return o.onUrlChange((function(t){var e=c._navigationStateModel.value;if(console.log("URLChange -> "+t,{state:e}),f.publish({url:t,state:e}),e.isTransitional){var n=c.navigationState.interactionContext;n&&n.isActive()&&c.runStateTransition((function(e){return e.onBackClickedDuringNavigationInteraction(t)}))}})),c}return x(o,i),o.prototype.processNavigationSuccess=function(t){var e=this;s.assert.isTruthy(this.navigationInProgress.value);var n=t.getVisits();n.forEach((function(t){return e.placeHistory.add(t)})),this._activeVisits.value=n},Object.defineProperty(o.prototype,"navigationState",{get:function(){return this._navigationStateModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationStateModel",{get:function(){return this._navigationStateModel.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 S(this,(function(i){return this.doNavigation(t,(function(i){return R(n,void 0,void 0,(function(){var n;return S(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 S(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.url).updateVisitSegments(n);return console.log("### Push Changes to route Redirect",{commands:i.url}),t.navigateByUrl(i)}))]:[2]}))}))},o.prototype.doNavigation=function(t,e){return R(this,void 0,void 0,(function(){var n=this;return S(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&s.lang.illegalState("Navigation already in progress"),this.runStateTransition((function(e){var i=n.navigationState.onPlaceNavigationStart(t,n.getCurrentRouterUrl());return i.storeVisit(t),i})),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,e(this.router)];case 2:return i.sent(),[3,4];case 3:return this.navigationState.isTransitional&&!this.router.getCurrentNavigation()&&this.runStateTransition((function(t){return t.onRouterEnd(new u.NavigationEnd(-1,"",""))})),[7];case 4:return[2]}}))}))},o.prototype.runStateTransition=function(t){var e=this._navigationStateModel.value,n=t(this.navigationState);this._navigationStateModel.value=n,n!==e&&(e.dispose(),s.Logger.get(this).info("Router State Transition: "+e.toString()+" -> "+n.toString()))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.extractChildPath=function(t){return P.flatten(t.children.map((function(t){return t.url})))},o.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},o.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},o.prototype.forward=function(){this.angularLocation.forward()},o.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return e.forEach((function(e){i.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(i.join(""))},o.prototype.getCurrentRouterUrl=function(){return this.router.routerState?this.router.routerState.snapshot.url:null},o.prototype.getCurrentRouteSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},o.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},o.prototype.hasActiveInteractionIds=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},o.prototype.navigateByUrl=function(t,e){return this.router.navigateByUrl(t.urlTree,e)},o.prototype.syncInteractionIdsWithRouter=function(t,e){var n=this;if(s.assert.isFalsey(this.navigationInProgress.value),console.log({startingActivity:t.length>e.length,wasBackButton:this.navigationState.isPopState}),P.isEqual(t,e))console.log("activity ids were the same, skipping");else{var i=t.length>e.length,o=i&&e.length<1,r=t.length<1;if(i)console.log("adding activity"),this.navigateByUrl(this.getCurrentRouteSnapshot().updateInteractionIds(t),{replaceUrl:!o});else{var a=this.getCurrentRouteSnapshot().updateInteractionIds(t);r?this.navigateByUrl(a,{replaceUrl:!0}).then((function(){n.angularLocation.back()})):this.navigateByUrl(a,{replaceUrl:!0})}}},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:e.Location},{type:ct},{type:t.ɵv}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(e.Location),n.ɵɵinject(ct),n.ɵɵinject(t.ɵv))},token:o,providedIn:"root"}),o}(s.GarbageCollector);var lt=m.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),pt=[m.query(":enter, :leave",lt,{optional:!0}),m.group([m.query(":enter",[m.style({transform:"translateX(-100%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(0%)"}))],{optional:!0}),m.query(":leave",[m.style({transform:"translateX(0%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(100%)"}))],{optional:!0})])],dt=[m.query(":enter, :leave",lt,{optional:!0}),m.group([m.query(":enter",[m.style({transform:"translateX(100%)",minHeight:"1px"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(0%)"}))],{optional:!0}),m.query(":leave",[m.style({transform:"translateX(0%)"}),m.animate("{{duration}} ease-out",m.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function ft(t){return m.trigger("routeAnimations",[m.transition(":increment",dt,{params:{duration:t}}),m.transition(":decrement",pt,{params:{duration:t}})])}var ht=ft("0.3s");var gt=function(t){function e(e,i,o,r){var a=t.call(this)||this;a.router=e,a.placeRouter=i,a.placeConfig=o,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,l=c.valueOf,p=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r);var d=new s.MutableValueModel;s.DebugContext.tag(d,"PlaceOutletComponent -> mutableValueModel"),a._activePlaceVisitModel.setDelegate(d),s.DebugContext.tag(a._activePlaceVisitModel,"PlaceOutletComponent._activePlaceVisitModel"),a._inOutletUpdate=l.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var f=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),h=u(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(f).reduce((function(t){var e=0;return h.value&&(e=t.indexOf(h.value),y.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),y.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:h}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),p.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),p.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationInProgress}),u(a._activePlace).postponeWhile(i.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return x(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),e.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},e.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.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;s.DebugContext.tag(i,"PlaceOutletCompeont.visitModel"),n._activePlaceVisitModel.setDelegate(i),e.initialiseVisit(i)}catch(t){console.error(t)}})),this.animateModel.value||this.animationDone()},e.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)}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},e.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n [@.disabled]="!animateModel.value"\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:[ht],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}"]}]}],e.ctorParameters=function(){return[{type:u.Router},{type:ut},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[at]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},e.propDecorators={animate:[{type:n.Input}],animateModel:[{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}]}]},w([s.StoreInValueModel("animateModel"),A("design:type",Boolean)],e.prototype,"animate",void 0),w([s.UseDelegate({defaultValue:!0}),A("design:type",s.ValueModel)],e.prototype,"animateModel",void 0),w([s.UseDelegate(),A("design:type",s.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),w([s.StoreInListModel("customPlaceAnimationOrderModel"),A("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),e}(E);var vt=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 x(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}]},w([s.StoreInListModel("placesModel"),A("design:type",Array)],i.prototype,"places",void 0),w([s.UseDelegate(),A("design:type",s.ListModel)],i.prototype,"placesModel",void 0),w([s.StoreInValueModel("placeOutletModel"),A("design:type",gt)],i.prototype,"placeOutlet",void 0),w([s.UseDelegate(),A("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),w([h.Memoize(),A("design:type",Function),A("design:paramtypes",[t.PlaceDefinition]),A("design:returntype",Object)],i.prototype,"getNav",null),i}(E);var yt=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}]},w([s.UseDelegate(),A("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),w([s.StoreInValueModel("busyModel"),A("design:type",Boolean)],t.prototype,"busy",void 0),t}();var mt=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 x(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}(vt);var It=function(t){function e(){return t.call(this)||this}return x(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}(vt),Ct=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,d.MatListModule,f.MatTooltipModule,p.MatIconModule,N],declarations:[mt,yt,gt,It,bt,vt],entryComponents:[yt],exports:[yt,gt,mt,It,bt,vt],providers:[]}]}],t}(),Pt=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,N,H,Ct,et],exports:[et,Ct,N,H,B]}]}],t}(),Mt=m.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),xt=m.trigger("slideDownOnEnter",[m.transition(":enter",[Mt,m.animate("{{duration}}")],{params:{duration:"100ms"}}),m.transition(":leave",[m.animate("{{duration}}",Mt)],{params:{duration:"100ms"}})]),Dt=m.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),wt=m.trigger("slideRightOnEnter",[m.transition(":enter",[Dt,m.animate("{{duration}}")],{params:{duration:"100ms"}}),m.transition(":leave",[m.animate("{{duration}}",Dt)],{params:{duration:"100ms"}})]),At=function(t,e){this.width=t,this.height=e};var Rt,St=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 x(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new St(t.clientX-this.left,t.clientY-this.top):new St(t.x-this.left,t.y-this.top)},e}(At),(Rt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Rt(e.top,e.left,e.width,e.height)};var Ot=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 x(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new b((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(E);function _t(){}(function(t){function e(){}t.Callback=e})(_t||(_t={}));var Tt=function(t){function e(e,n){var i=t.call(this)||this;return i.dialogService=e,i.config=n,i._activeModel=new s.MutableValueModel(!1),l.assert.notNil(e),i.onDispose((function(){i.isActive()&&s.lang.illegalState("Dispose called while active.")})),i}return x(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeModel.readonly},enumerable:!0,configurable:!0}),e.prototype._startActivity=function(t,e,n){var i=this;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._activeModel.value=!0;var o=D({},this.config,{data:e,disableClose:n,panelClass:"dialog-interaction-context"}),r=this,a=this.dialogService.open(Q,o);return new Promise((function(n,i){var o=a.componentInstance;r.safelyUpdateActivityListDelegate(o.activityList),o.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(),a.afterOpened().subscribe((function(t){a.updateSize()}))})).finally((function(){r.safelyUpdateActivityListDelegate(null),i._activeModel.value=!1}))},e.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e.setActivityList(t)}))},e}(X);var Et=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),Ut=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,l.assert.notNil(e),o}return x(e,t),e.prototype.createInteractionContext=function(){var t=D({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig,this.dialogServiceDefaults);return new Tt(this.dialogService,t)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:o.MatDialog},{type:I.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[Et]}]},{type:I.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[I.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(I.MatDialog),n.ɵɵinject(Et,8),n.ɵɵinject(I.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e}(J);function Nt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!!y.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})(Nt||(Nt={}));var kt=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Ft(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}),w([h.Memoize(),A("design:type",Array),A("design:paramtypes",[])],t.prototype,"keys",null),t}();var Ft=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}();var Lt=function(){function t(){}return t.prototype.canActivate=function(t,e){return R(this,void 0,void 0,(function(){return S(this,(function(t){return[2,!0]}))}))},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}(),jt=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 S(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(),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}();var Vt,Bt,Ht,qt,Gt=function(){function e(t,e,n,i,o,r){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.interactionService=o,this.injector=r}return e.prototype.canActivate=function(t,e){return R(this,void 0,void 0,(function(){var n=this;return S(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return R(n,void 0,void 0,(function(){var n,o=this;return S(this,(function(r){switch(r.label){case 0:return[4,this.cleanInteractionState(t,e,(function(){return R(o,void 0,void 0,(function(){var n,o,r,a,s;return S(this,(function(c){switch(c.label){case 0:return n=new kt(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationState.getVisitFor(i)||new rt(i,o),[4,new jt(t,this.router,this.placeHistory,this.injector).sanitise(r.mergeRouteParameters(o))];case 1:return a=c.sent(),this.placeRouter.navigationState.storeVisit(a),r.hasRoutingChangedFrom(a)?(s=this.placeRouter.parseUrl(e.url).updateVisitSegments(a),console.log("##### Place Guard Redirect",s),[2,s]):[2,!0]}}))}))}))];case 1:return n=r.sent(),[2,this.handleGuardResult(n)]}}))}))}))]}))}))},e.prototype.canDeactivate=function(t,e,n,i){return R(this,void 0,void 0,(function(){var e,o,r;return S(this,(function(a){switch(a.label){case 0:return e=this.placeRouter.parseUrl(n.url),o=this.placeRouter.parseUrl(i.url),[4,this.placeRouter.navigationState.canDeactivatePlace(t,e,o)];case 1:return r=a.sent(),[2,this.handleGuardResult(r)]}}))}))},e.prototype.handleGuardResult=function(e){return e instanceof t.UrlSnapshot?e.urlTree:e},e.prototype.authorisePlaceThen=function(e,n,i){return R(this,void 0,void 0,(function(){var o,r,a;return S(this,(function(c){switch(c.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=c.sent(),[3,3];case 2:a=!0,c.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return R(this,void 0,void 0,(function(){var n;return S(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof C.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return R(this,void 0,void 0,(function(){var t;return S(this,(function(i){return t=this.placeRouter.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractionIds()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();Vt=t.Formatter||(t.Formatter={}),Bt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Ht=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}(),qt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Vt.STRING=new Bt,Vt.NUMBER=new Ht,Vt.BOOLEAN=new qt,t.ACTIVITY_DATA=q,t.AUP_PLACE_CONFIG=at,t.AbstractActivity=G,t.AbstractInputComponent=k,t.AbstractPlaceNavigationComponent=vt,t.Activity=t.ɵbi,t.ActivityContainerComponent=Q,t.ActivityOutletComponent=Y,t.AlertDialogComponent=K,t.AngularUiPowerupsModule=Pt,t.BusyOverlayComponent=yt,t.CommandDirective=T,t.ComponentsModule=H,t.ConfirmThenDialogComponent=t.ɵbk,t.ConfirmationDialogComponent=W,t.ConsolidatedParameterMap=kt,t.DEFINITION_META_DATA_KEY=it,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=Et,t.DialogInteractionContext=Tt,t.DialogInteractionContextFactory=Ut,t.Dimension=At,t.DirectivesModule=N,t.DisposableComponent=E,t.EmptyStateComponent=mt,t.FocusBindingDirective=U,t.InplaceInteractionContextComponent=tt,t.InteractionContext=z,t.InteractionContextBase=X,t.InteractionModule=et,t.InteractionService=t.ɵv,t.LEFT_RIGHT_PLACE_ANIMATION=ht,t.ListPlaceNavComponent=bt,t.ModalInteractionContextFactory=J,t.NoopAuthGuard=Lt,t.NoopComponent=B,t.NumberInputComponent=F,t.PasswordInputComponent=L,t.Place=Nt,t.PlaceComponentDeactivationHandler=st,t.PlaceGuard=Gt,t.PlaceHistory=ct,t.PlaceModule=Ct,t.PlaceOutletComponent=gt,t.PlaceRouter=ut,t.Point=St,t.ROUTE_PARAMETER_LIST_KEY=ot,t.ResizeAwareComponent=Ot,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);l.Klass.get(i).addToOwnMetadataList(ot,r),s.UseDelegate({tag:"@RouteId("+i.constructor.name+"."+o.toString()+")"})(i,o)}},t.SelectInputComponent=j,t.StringInputComponent=V,t.TabbedPlaceNavigationComponent=It,t.Visit=rt,t.VisitParameter=function(e){var n=l.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));l.Klass.get(i).addToOwnMetadataList(ot,r);var a={backingModel:new s.MutableValueModel,binding:null},c="@VisitParameter("+i.constructor.name+"."+o.toString()+")";s.DebugContext.get(a.backingModel).tag(c),s.Logger.get(a.backingModel).tag(c),Object.defineProperty(i,o,{get:function(){return a.backingModel},set:function(t){a.binding&&a.binding.dispose(),t&&(a.binding=new s.Binding(a.backingModel,t),t.query().isNil()?a.binding.writeRight():(a.backingModel.query().isNil()||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),a.binding.writeLeft()))}})}},t.VisitParameterList=function(e){var n=l.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));l.Klass.get(i).addToOwnMetadataList(ot,r);var a={backingModel:new s.MutableListModel,binding:null},c="@VisitParameterList("+i.constructor.name+"."+o.toString()+")";s.DebugContext.get(a.backingModel).tag(c),s.Logger.get(a.backingModel).tag(c),Object.defineProperty(i,o,{get:function(){return a.backingModel},set:function(t){a.binding&&a.binding.dispose(),t&&(a.binding=new s.Binding(a.backingModel,t),t.query().isEmpty()?a.binding.writeRight():(a.backingModel.query().isEmpty()||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),a.binding.writeLeft()))}})}},t.VisitSanitiser=jt,t.leftRightPlaceAnimation=ft,t.slideDownOnEnterAnimation=xt,t.slideRightOnEnterAnimation=wt,t.ɵa=N,t.ɵb=T,t.ɵba=et,t.ɵbb=Q,t.ɵbc=X,t.ɵbd=z,t.ɵbe=Y,t.ɵbf=W,t.ɵbg=G,t.ɵbh=q,t.ɵbl=K,t.ɵbn=tt,t.ɵc=U,t.ɵd=E,t.ɵe=H,t.ɵf=F,t.ɵg=k,t.ɵh=V,t.ɵi=L,t.ɵj=j,t.ɵk=B,t.ɵl=Ct,t.ɵm=mt,t.ɵn=yt,t.ɵo=gt,t.ɵp=ft,t.ɵq=ht,t.ɵr=at,t.ɵt=ut,t.ɵu=ct,t.ɵw=J,t.ɵx=It,t.ɵy=vt,t.ɵz=bt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|