var __assign=this&&this.__assign||Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t<u;t++)for(i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n},__spreadArrays,WebBlender,__extends,__decorate,MeePortal;!function(n){var t,i;t=n.OneUI||(n.OneUI={});(i=t.Angular||(t.Angular={})).baseModuleName="oneui.base";angular.module(i.baseModuleName,["ngSanitize","ui.router"])}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.restrict="A";this.classString=n instanceof Array?n.join(" "):n}return n.prototype.link=function(n,t){t.addClass(this.classString)},n}();i.AddClassDirective=r}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.attributesToAdd=n;this.restrict="A"}return n.prototype.link=function(n,t,i){var r=this;Object.keys(this.attributesToAdd).forEach(function(n){i.$set(n,r.attributesToAdd[n])})},n}();i.AddAttributeDirective=r}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u){this.$timeout=n;this.announcer=t;this.focuser=i;this.utils=r;this.watchOperationProgress=u}return n.prototype.monitorOperationProgress=function(n,t){var i=this;(Array.isArray(t)?t:[t]).forEach(function(t){i.watchOperationProgress(n,t.operationName,function(n,r){"started"===r?t.onWorkingAnnounce&&i.announcer.announce(t.onWorkingAnnounce):"finished"===r?(t.onSuccessAnnounce&&i.announcer.announce(t.onSuccessAnnounce),t.onSuccessSelector&&i.focuser.focus(t.onSuccessSelector,{})):"failed"===r&&(t.onFailureAnnounce&&i.announcer.announce(t.onFailureAnnounce),t.onFailureSelector&&i.focuser.focus(t.onFailureSelector,{}))})})},n.$inject=["$timeout","$meeA11yAnnouncer","$meeA11yFocuser","$meeA11yUtil","$meeWatchOperationProgress"],n}();angular.module(i.baseModuleName).service("$meeA11y",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$window=n;this.$meeHtmlUtil=t;this.focusableSelectors="a[href], button, input, map[name] area[href], object, textarea, .c-select-menu button, h1[tabindex], h2[tabindex], h3[tabindex], h4[tabindex], h5[tabindex], h6[tabindex]";this.errorName="MeeA11yUtil"}return n.prototype.getFocusableSelectors=function(){return this.focusableSelectors},n.prototype.isAutoFocusable=function(n){return(n.matches(this.focusableSelectors)||n.matches("[tabindex][aria-label]")||n.matches("[tabindex]")&&n.matches("h1, h2, h3, h4, h5, h6")||n.hasAttribute("mee-force-focusable"))&&!n.matches["[disabled='true']"]&&!this.$meeHtmlUtil.isHidden(n)},n.prototype.findFirstFocusableElement=function(n){var i,t,r;if(null===n||!n)throw new Error(this.errorName+".getFirstFocusableElement: passed targetElement was null or falsy");if(this.isAutoFocusable(n))return n;for(i=n.querySelectorAll(this.getFocusableSelectors()),t=0;t<i.length;t++)if(r=i[t],this.isAutoFocusable(r))return r;return null},n.$inject=["$window","$meeHtmlUtil"],n}();angular.module(i.baseModuleName).service("$meeA11yUtil",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$timeout=n;this.timeoutDelayMsec=100;this.liveElementId="mee_announcer_live_element";document.getElementById(this.liveElementId)?this.liveElement||(this.liveElement=document.getElementById(this.liveElementId)):this.liveElement=this.createLiveElement()}return n.prototype.announce=function(n,t){var i=this;void 0===t&&(t="polite");this.liveElement.textContent="";this.liveElement.setAttribute("aria-live",t);this.$timeout(function(){i.liveElement.textContent=n},this.timeoutDelayMsec,!1)},n.prototype.createLiveElement=function(){var n=document.createElement("div");return n.classList.add("x-screen-reader"),n.setAttribute("id",this.liveElementId),n.setAttribute("role","status"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),document.body.appendChild(n),n},n.$inject=["$timeout"],n}();angular.module(i.baseModuleName).service("$meeA11yAnnouncer",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$q=n;this.$timeout=t;this.$meeA11yUtil=i;this.errorName="$meeA11y.focuser";this.robustFocuserTimeout=1}return n.prototype.focus=function(n,t){if(void 0===t&&(t={}),!n)throw new Error(this.errorName+".focus: passed selector was falsy");"string"==typeof n?this.focusBySelector(n,t,"focus"):this.focusByElement(n,t)},n.prototype.focusBySelector=function(n,t,i){var r=this;this.robustFindElement(n).then(function(n){r.focusByElement(n,t)}).catch(function(){console.debug(r.errorName+"."+i+": was not able to find target element via "+n+", did not set focus")})},n.prototype.focusByElement=function(n,t){var i;i=t&&t.simpleSearch?n:this.$meeA11yUtil.findFirstFocusableElement(n);this.setFocusOn(i)},n.prototype.robustFindElement=function(n){var t=this,i=this.findElement(n);return i?this.$q.resolve(i):this.$timeout(this.robustFocuserTimeout).then(function(){var i=t.findElement(n);return i?t.$q.resolve(i):t.$q.reject()})},n.prototype.findElement=function(n){var t=document.querySelectorAll(n);return angular.element(t)[0]},n.prototype.setFocusOn=function(n){this.$timeout().then(function(){n.focus()})},n.$inject=["$q","$timeout","$meeA11yUtil"],n}();angular.module(i.baseModuleName).service("$meeA11yFocuser",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$document=n;this.$timeout=t;this.$meeA11yUtil=i;this.$meeStringUtil=r;this.restrict="A"}return n.factory=function(){var t=function(t,i,r,u){return new n(t,i,r,u)};return t.$inject=["$document","$timeout","$meeA11yUtil","$meeStringUtil"],t},n.prototype.link=function(n,t,i){var u=this,r=angular.element(t)[0],f=this.$meeStringUtil.extractTokens(i.meeAutoFocus);if(1<f.length)throw new Error("meeAutoFocus: Given more than one parameter");this.$meeA11yUtil.isAutoFocusable(r)&&r.setAttribute("autofocus","true");this.$timeout(function(){var t,i,n,e;if(1===f.length&&(t=f[0],!(r=u.$document[0].getElementById(t))))throw new Error("meeAutoFocus: Element with ID of '"+t+"' does not exist");if(!u.$meeA11yUtil.isAutoFocusable(r))for(i=r.querySelectorAll(u.$meeA11yUtil.getFocusableSelectors()),n=0;n<i.length;n++)if(e=i[n],u.$meeA11yUtil.isAutoFocusable(e)){r=e;break}u.$meeA11yUtil.isAutoFocusable(r)&&r.focus()},200)},n}();angular.module(i.baseModuleName).directive("meeAutoFocus",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(t,i,r){var u=this;this.$rootScope=t;this.$meeStringUtil=i;this.$meeUtil=r;this.errors={};this.changedErrors={};this.updateErrorViewsImpl=r.debounce(function(){u.$rootScope.$broadcast(n.ErrorsChangedEventName,Object.keys(u.changedErrors));u.changedErrors={}},100)}return n.prototype.getError=function(n){if(!n)throw new Error("Error id must be provided.");return this.errors[n]},n.prototype.setError=function(n,t){this.setErrorImpl(n,t);this.updateErrorViews()},n.prototype.setErrors=function(n){var i,t,r,u;if(!n)throw new Error("Errors must be provided.");if(i=Object.keys(n),!i.length)throw new Error("Errors property bag does not have any errors defined.");for(t=0,r=i;t<r.length;t++)u=r[t],this.setErrorImpl(u,n[u]);this.updateErrorViews()},n.prototype.reset=function(n){if(!n)throw new Error("Error id must be provided.");var t=n;this.errors[t]&&(delete this.errors[t],this.changedErrors[t]=!0,this.updateErrorViews())},n.prototype.getErrorsInCategory=function(n){var i=this,t={};return this.getCategoryIds(n).forEach(function(n){t[n]=i.errors[n]}),t},n.prototype.hasErrorsInCategory=function(n){return!!this.getCategoryIds(n).length},n.prototype.resetCategory=function(n){for(var r,t=0,i=this.getCategoryIds(n);t<i.length;t++)r=i[t],delete this.errors[r],this.changedErrors[r]=!0;this.updateErrorViews()},n.prototype.subscribeForErrorsChangedNotification=function(t,i){return t.$on(n.ErrorsChangedEventName,function(n,t){return i(t)})},n.prototype.updateErrorViews=function(){this.updateErrorViewsImpl()},n.prototype.setErrorImpl=function(n,t){if(!n)throw new Error("Error id must be provided.");if(!t)throw new Error("Error must be provided for "+n+".");var i=n;this.errors[i]=t;this.changedErrors[i]=!0},n.prototype.getCategoryIds=function(n){if(!n)throw new Error("Error category must be provided.");for(var u=Object.keys(this.errors),t=[],f=function(n){var i=n+".",r=u.filter(function(n){return n.substr(0,i.length)===i});t.push.apply(t,r)},i=0,r=this.$meeStringUtil.extractTokens(n);i<r.length;i++)f(r[i]);return t},n.$inject=["$rootScope","$meeStringUtil","$meeUtil"],n.ErrorsChangedEventName="$meeErrors_errorsChanged",n}();angular.module(i.baseModuleName).service("$meeErrors",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u,f){this.$meeErrors=n;this.$scope=t;this.$element=i;this.$meeUtil=r;this.$meeHtmlUtil=u;this.options=f}return n.prototype.$onInit=function(){var n=this;if(!this.options.errorId)throw new Error("errorId must be provided.");if(this.options.kind){if("screenreader"!==this.options.kind)throw new Error("Kind '"+this.options.kind+"' is not supported.");this.errorClass="x-screen-reader"}this.errorElementId="error-"+this.$meeUtil.nextUid();this.refreshView([this.options.errorId]);this.errorsUnsubscribeFunc=this.$meeErrors.subscribeForErrorsChangedNotification(this.$scope,function(t){return n.refreshView(t)})},n.prototype.$onDestroy=function(){this.errorsUnsubscribeFunc&&this.errorsUnsubscribeFunc()},n.prototype.getErrorElementId=function(){return this.errorElementId},n.prototype.getErrorText=function(){return this.errorText},n.prototype.getErrorClass=function(){return this.errorClass},n.prototype.refreshView=function(n){var t=this,i,r;-1!==n.indexOf(this.options.errorId)&&(i=this.$meeErrors.getError(this.options.errorId),r=!1,r=!0===i?(delete this.errorText,!0):(this.errorText=i,!!this.errorText),this.$meeUtil.afterContentComplete(function(){var h="[data-error-id~='"+t.options.errorId+"']",c=t.$element.parent()[0],l=t.options.inputSelectorFormat.replace(/\{0\}/g,h),e=c.querySelectorAll(l),o=c.querySelectorAll(h),s="aria-labelledby",u="data-element-errors",n,f,i;if(r){for(n=0;n<o.length;n++)(f=o[n]).classList.add("error-input-container"),t.$meeHtmlUtil.addTokenToAttributeValueOnce(f,u,t.options.errorId);for(n=0;n<e.length;n++)(i=e[n]).classList.add("error-input"),i.setAttribute("aria-invalid","true"),t.$meeHtmlUtil.addTokenToAttributeValueOnce(i,u,t.options.errorId),t.errorText?t.$meeHtmlUtil.addTokenToAttributeValueOnce(i,s,t.errorElementId):t.$meeHtmlUtil.removeTokenFromAttributeValue(i,s,t.errorElementId)}else{for(n=0;n<o.length;n++)f=o[n],t.$meeHtmlUtil.removeTokenFromAttributeValue(f,u,t.options.errorId),f.getAttribute(u)||f.classList.remove("error-input-container");for(n=0;n<e.length;n++)i=e[n],t.$meeHtmlUtil.removeTokenFromAttributeValue(i,u,t.options.errorId),t.$meeHtmlUtil.removeTokenFromAttributeValue(i,s,t.errorElementId),i.getAttribute(u)||(i.classList.remove("error-input"),i.removeAttribute("aria-invalid"))}}))},n}();angular.module(i.baseModuleName).factory("errorViewFactory",[function(){return function(n,t,i,u,f,e){return new r(n,t,i,u,f,e)}}])}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.element=n}return n.prototype.$onInit=function(){var n=["xs","sm","md","lg","xl","xxl"];if(-1===n.indexOf(this.size))throw new Error("mee-media component - Error '"+this.size+"' is not a supported size. Supported sizes are "+n.join(", "));},n.$inject=["$element"],n}();u=function(){function n(){this.restrict="A"}return n.prototype.link=function(n,t){t.addClass("c-heading-6")},n}();angular.module(i.baseModuleName).component("meeMedia",{transclude:{image:"?mediaImage",body:"?mediaBody"},template:'<div ng-transclude="image"><\/div>\n                       <div mee-metatext class="media-body-wrapper" ng-transclude="body"><\/div>',bindings:{size:"@"},controller:r}).directive("mediaHeading",function(){return new u})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.beginMultiStepScenario=function(){},n.prototype.endStep=function(){},n.prototype.cancelStep=function(){},n.prototype.endMultiStepScenario=function(){},n.prototype.cancelMultiStepScenario=function(){},n}();angular.module(i.baseModuleName).service("$meeModalStateServiceTelemetry",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u,f){var e=this;this.$state=n;this.$meeModalDialogService=t;this.$meeModalStateServiceTelemetry=i;this.$rootScope=r;this.$window=u;this.$stateProvider=f;this.trackBi=!1;r.$on("$stateChangeStart",function(n,t,i){e.handleStateChange(n,t,i)});this.previouslyFocusedElement=null}return n.prototype.show=function(n,t,i){var r=this,u;if(this.activeModalDialogElementSelector)throw new Error('$meeModal: "'+this.activeModalDialogElementSelector+'" is currently open. Please close it before opening "'+n+'".');if(i&&i.trackBi&&!i.bi)throw new Error("$meeModal: BI information must be provided.");return this.initialStateId=this.$state.current.name,this.previouslyFocusedElement=this.$window.document.activeElement,this.previouslyFocusedElement&&this.previouslyFocusedElement.focus||(this.previouslyFocusedElement=null),u={onDismissed:function(){r.dismissInternal(i)},modalHostOptions:i&&i.modalHostOptions},this.$meeModalDialogService.show(n,u).then(function(){r.onBackButtonDismissed=function(){return r.$meeModalDialogService.hide().then(function(){return r.dismissInternal(i)})};var u,f=r.initialStateId;if(r.backStack=[],r.activeModalDialogElementSelector=n,i&&(r.activeModalData=i.data,i.stateIdOnLastGoBack))if("string"==typeof i.stateIdOnLastGoBack)f=i.stateIdOnLastGoBack;else{if(!i.stateIdOnLastGoBack.stateId)throw new Error("$meeModal: stateIdOnLastGoBack.stateId must be set.");f=i.stateIdOnLastGoBack.stateId;u=i.stateIdOnLastGoBack}return r.backStack.push({hide:!0,stateId:f,stateParams:u&&u.stateParams,stateOptions:u&&u.stateOptions}),r.trackBi=i&&!!i.trackBi,r.bi=r.trackBi&&{scenario:{area:i.bi.area,scenario:i.bi.scenario,currentStep:i.bi.firstStep,attribution:i.bi.attribution},doNotEndScenario:i.bi.doNotEndScenario},r.trackBi&&!i.bi.doNotStartScenario&&r.$meeModalStateServiceTelemetry.beginMultiStepScenario(angular.copy(r.bi.scenario)),r.switchToInternal({stateId:t,stateOptions:i&&i.stateOptions,stateParams:i&&i.stateParams,modalHostOptions:i&&i.modalHostOptions})})},n.prototype.showSimple=function(n,t,i){var r=this.$state.current.name+"."+t;return null===this.$state.get(r)&&this.$stateProvider.state(r,{views:{"modalContent@":{template:"<"+t+"><\/"+t+">"}}}),this.show(n,r,i)},n.prototype.hide=function(n,t){return n||(n=this.initialStateId),"string"==typeof n?this.hideInternal({stateId:n,bi:t}):this.hideInternal(n)},n.prototype.switchTo=function(n,t){var i;if(i="string"==typeof n?{stateId:n,bi:t}:n,this.trackBi&&!i.bi)throw new Error("$meeModal: BI information must be provided.");return this.backStack.push(__assign({},this.activeState,{biStep:this.trackBi&&this.bi.scenario.currentStep})),this.switchToInternal(i)},n.prototype.goBack=function(n){var t,i,r;if(!this.backStack||!this.backStack.length)throw new Error("$meeModal: Back stack is empty.");return(t=this.backStack.pop(),t.hide)?this.hide({stateId:t.stateId,bi:n,stateParams:t.stateParams,stateOptions:t.stateOptions}):(i=void 0,this.trackBi&&(r=n||{success:!0},i=__assign({step:t.biStep},r)),this.switchToInternal({stateId:t.stateId,bi:i,stateParams:t.stateParams,stateOptions:t.stateOptions,modalHostOptions:t.modalHostOptions}))},n.prototype.stayInCurrentState=function(n){if(!this.activeModalDialogElementSelector)throw new Error("$meeModal: There is no active modal dialog flow.");if(this.trackBi&&!n)throw new Error("$meeModal: BI information must be provided.");this.trackBi&&this.$meeModalStateServiceTelemetry.endStep(this.bi.scenario,{step:this.bi.scenario.currentStep,success:n.success,error:n.error})},n.prototype.getData=function(){return this.activeModalData},n.prototype.setData=function(n){this.activeModalData=n},n.prototype.isArgumentOfType=function(n,t){return n&&void 0!==n[t]},n.prototype.switchToInternal=function(n){var r=this,t,i;if(!this.activeModalDialogElementSelector)throw new Error("$meeModal: There is no active modal dialog flow.");return this.trackBi&&n.bi&&(t=n.bi,(t.cancel?this.$meeModalStateServiceTelemetry.cancelStep:this.$meeModalStateServiceTelemetry.endStep)(angular.copy(this.bi.scenario),t),this.bi.scenario.currentStep=t.step),i=this.$state.get(n.stateId),i&&(i._isModal=!0),this.$state.go(n.stateId,n.stateParams,n.stateOptions).then(function(){r.$meeModalDialogService.stateSwitched({modalHostOptions:n.modalHostOptions});r.activeState={stateId:n.stateId,stateParams:n.stateParams,stateOptions:n.stateOptions,modalHostOptions:n.modalHostOptions}})},n.prototype.hideInternal=function(n){var t=this;if(!this.activeModalDialogElementSelector)throw new Error("$meeModalThere is no active modal dialog flow.");return this.$meeModalDialogService.hide().then(function(){return t.onHidden(n)})},n.prototype.dismissInternal=function(n){var r=n&&n.onDismissed&&n.onDismissed(),i,t;if(!r){if(i=this.initialStateId,t=void 0,n&&n.stateIdOnDismiss)if("string"==typeof n.stateIdOnDismiss)i=n.stateIdOnDismiss;else{if(!n.stateIdOnDismiss.stateId)throw new Error("$meeModal: stateIdOnDismiss.stateId must be set.");i=n.stateIdOnDismiss.stateId;t=n.stateIdOnDismiss}r={stateId:i,stateParams:t&&t.stateParams,stateOptions:t&&t.stateOptions,bi:{cancel:!0,success:!0}}}this.onHidden(r)},n.prototype.onHidden=function(n){var t,i;if(this.trackBi&&!this.bi.doNotEndScenario&&(t=n&&n.bi?n.bi:{success:!0},(t.cancel?this.$meeModalStateServiceTelemetry.cancelMultiStepScenario:this.$meeModalStateServiceTelemetry.endMultiStepScenario)(angular.copy(this.bi.scenario),t)),i=this.previouslyFocusedElement,this.resetServiceState(),!n.stateId)throw new Error("$meeModal: Cannot find state to switch to after hiding modal dialog.");this.$state.go(n.stateId,n.stateParams,n.stateOptions).then(function(){i&&i.focus()})},n.prototype.resetServiceState=function(){delete this.activeModalDialogElementSelector;delete this.activeState;delete this.activeModalData;delete this.backStack;delete this.onBackButtonDismissed;this.previouslyFocusedElement=null;this.trackBi=!1;delete this.bi},n.prototype.handleStateChange=function(n,t,i){var r=this;this.onBackButtonDismissed&&!t._isModal&&(i&&i._modalDismissQuietly?this.$meeModalDialogService.hide().then(function(){return r.resetServiceState()}):(n.preventDefault(),this.onBackButtonDismissed()))},n.$inject=["$state","$meeModalDialogService","$meeModalStateServiceTelemetry","$rootScope","$window","$stateProvider"],n}();angular.module(i.baseModuleName).config(["$stateProvider","$provide",function(n,t){t.value("$stateProvider",n)}]).service("$meeModal",r)}(MeePortal||(MeePortal={})),function(n){var t;(function(n){function f(n,u,f){function s(u){t[n]=u;f.$broadcast(i,n,u);r&&r()}var e,h=function(n){return s("finished"),n},c=function(n){throw s("failed"),n;},o;s("started");try{return o=u(),(e=o)&&e.then&&e.catch&&e.finally?o.then(h,c):h(o)}catch(u){c(u)}}var i="OperationProgress",e={EventName:i,OperationInert:"inert",OperationStarted:"started",OperationFinished:"finished",OperationFailed:"failed"},r,u,t;angular.module(n.baseModuleName).constant("$meeOperationProgress",e);t={};angular.module(n.baseModuleName).run(["$meeUtil",function(n){r=n.debounce(function(){return t={}},500)}]);angular.module(n.baseModuleName).factory("$meeMonitoredOperation",["$rootScope",function(n){return function(t,i){return f(t,i,n)}}]);angular.module(n.baseModuleName).factory("$meeWatchOperationProgress",["$meeStringUtil",function(n){return function(r,u,f){function y(n,t){a.apply(v,[n,t])}var h,a,c,e,v,o,l,s;if(!(a="string"!=typeof u?u||f:(h=u,f)))throw new Error("Callback for watched operation progress must be provided.");for(c=!!h,e=[],c&&(e=n.extractTokens(h)),v=this,o=0,l=e;o<l.length;o++)s=l[o],t[s]&&y(s,t[s]);r.$on(i,function(n,t,i){c&&-1===e.indexOf(t)||y(t,i)})}}]);n.__overrideMonitorOperationProgressInjectorForTests=function(n){u=n};n.MonitorOperationProgress=function(n){if(!n)throw new Error("operationName must be provided.");return function(t,i){var r=t[i];return t[i]=function(){for(var t,o,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(t=u||this.__getAngularInjector&&this.__getAngularInjector(),t||(t=angular.element(document.querySelector(".ng-scope")).injector()),!t||!t.invoke)throw new Error("MonitorOperationProgress decorator could not obtain AngularJS injector instance. Make sure your class exposes __getAngularInjector() method that returns AngularJS injector service. In unit tests call __overrideMonitorOperationProgressForTests() in setup code.");return o=this,t.invoke(["$rootScope",function(t){return f(n,function(){return r.apply(o,e)},t)}])}}}})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f,e,o,s,h,c,l;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.watchOperationProgress=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeWatchOperationProgress"],t},n.prototype.link=function(n,t,i){if(!i.meeProgressShow)throw new Error("Operation name must be specified.");t.css("display","none");this.watchOperationProgress(n,i.meeProgressShow,function(n,i){"started"===i?t.css("display",""):t.css("display","none")})},n}();u=function(){function n(n){this.watchOperationProgress=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeWatchOperationProgress"],t},n.prototype.link=function(n,t,i){if(!i.meeProgressApplyClass)throw new Error("Operation name must be specified.");if(!i.className)throw new Error("className must be specified.");this.watchOperationProgress(n,i.meeProgressApplyClass,function(n,r){"started"===r?t.addClass(i.className):t.removeClass(i.className)})},n}();f=function(){function n(n,t){this.watchOperationProgress=n;this.meeProgressFocusService=t;this.restrict="A"}return n.factory=function(){var t=function(t,i){return new n(t,i)};return t.$inject=["$meeWatchOperationProgress","meeProgressFocusService"],t},n.prototype.link=function(n,t,i){var r=this;if(!i.meeProgressHide)throw new Error("Operation name must be specified.");this.watchOperationProgress(n,i.meeProgressHide,function(n,i){"started"===i?(r.meeProgressFocusService.saveFocus(t),t.css("display","none")):(t.css("display",""),r.meeProgressFocusService.restoreFocus(t))})},n}();e=function(){function n(n,t,i,r){this.$scope=n;this.watchOperationProgress=t;this.meeProgressFocusService=i;this.$element=r;this.isDisabled=!1}return n.prototype.$postLink=function(){var n=this;if(!this.meeProgressDisabled)throw new Error("Operation name must be specified.");this.watchOperationProgress(this.$scope,this.meeProgressDisabled,function(t,i){var r="started"===i;r?n.meeProgressFocusService.saveFocus(n.$element):n.meeProgressFocusService.restoreFocus(n.$element);n.isDisabled=r})},n.$inject=["$scope","$meeWatchOperationProgress","meeProgressFocusService","$element"],n}();o=function(){function n(n){this.$compile=n;this.priority=1001;this.terminal=!0;this.restrict="A";this.scope=!0;this.controllerAs="$meeProgressDisabled";this.controller=e;this.bindToController={meeProgressDisabled:"@"}}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$compile"],t},n.prototype.compile=function(n){var i=this,t=n.attr("ng-disabled");return t=t?"$meeProgressDisabled.isDisabled || ("+t+")":"$meeProgressDisabled.isDisabled",n.attr("ng-disabled",t),function(n,t){i.$compile(t,null,i.priority)(n)}},n}();s=function(){function n(n){this.watchOperationProgress=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeWatchOperationProgress"],t},n.prototype.link=function(n,t,i){if(!i.meeProgressVisible)throw new Error("Operation name must be specified.");t.css("visibility","hidden");this.watchOperationProgress(n,i.meeProgressVisible,function(n,i){"started"===i?t.css("visibility",""):t.css("visibility","hidden")})},n}();h=function(){function n(n,t){this.watchOperationProgress=n;this.meeProgressFocusService=t;this.restrict="A"}return n.factory=function(){var t=function(t,i){return new n(t,i)};return t.$inject=["$meeWatchOperationProgress","meeProgressFocusService"],t},n.prototype.link=function(n,t,i){var r=this;if(!i.meeProgressHidden)throw new Error("Operation name must be specified.");this.watchOperationProgress(n,i.meeProgressHidden,function(n,i){"started"===i?(r.meeProgressFocusService.saveFocus(t),t.css("visibility","hidden")):(t.css("visibility",""),r.meeProgressFocusService.restoreFocus(t))})},n}();c=function(){function n(n,t){this.watchOperationProgress=n;this.meeProgressFocusService=t;this.restrict="A"}return n.factory=function(){var t=function(t,i){return new n(t,i)};return t.$inject=["$meeWatchOperationProgress","meeProgressFocusService"],t},n.prototype.link=function(n,t,i){var r=this;if(!i.meeProgressCollapse)throw new Error("Operation name must be specified.");this.watchOperationProgress(n,i.meeProgressCollapse,function(n,i){"started"===i?(r.meeProgressFocusService.saveFocus(t),t.css("visibility","collapse")):(t.css("visibility",""),r.meeProgressFocusService.restoreFocus(t))})},n}();l=function(){function n(n,t){this.$document=n;this.$timeout=t}return n.prototype.saveFocus=function(n){var t=this.$document[0].activeElement;n[0].contains(t)&&(this.savedFocusElement=t)},n.prototype.restoreFocus=function(n){var t=this;this.savedFocusElement&&this.$document[0].activeElement===this.$document[0].body&&n[0].contains(this.savedFocusElement)&&this.$timeout(function(){t.savedFocusElement.focus();t.savedFocusElement=null})},n.$inject=["$document","$timeout"],n}();angular.module(i.baseModuleName).service("meeProgressFocusService",l).directive("meeProgressShow",r.factory()).directive("meeProgressHide",f.factory()).directive("meeProgressDisabled",o.factory()).directive("meeProgressVisible",s.factory()).directive("meeProgressHidden",h.factory()).directive("meeProgressCollapse",c.factory()).directive("meeProgressApplyClass",u.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$scope=n;this.watchOperationProgress=t;this.$element=i;this.$meeUtil=r;this.states={inert:"inert",inProgress:"started",failed:"failed",finished:"finished"};this.ariaLabelAttributeName="data-aria-label"}return n.prototype.$onInit=function(){var n=this;this.currentState="inert";this.watchOperationProgress(this.$scope,this.watchOperation,function(t,i){n.currentState=n.inertWhenFinished&&"finished"===i?"inert":i;n.updateScreenReaderMessage()})},n.prototype.$postLink=function(){this.updateScreenReaderMessage()},n.prototype.updateScreenReaderMessage=function(){var n=this;this.$meeUtil.afterContentComplete(function(){switch(n.currentState){case"started":n.screenReaderMessage=n.$element.find("inprogress-view").attr(n.ariaLabelAttributeName);break;case"failed":n.screenReaderMessage=n.$element.find("failed-view").attr(n.ariaLabelAttributeName);break;case"finished":n.screenReaderMessage=n.$element.find("finished-view").attr(n.ariaLabelAttributeName);break;default:n.screenReaderMessage=n.$element.find("inert-view").attr(n.ariaLabelAttributeName)}})},n.$inject=["$scope","$meeWatchOperationProgress","$element","$meeUtil"],n}();angular.module(i.baseModuleName).component("meeProgressView",{controller:r,template:'\n<p aria-live="polite" class="x-screen-reader">{{$ctrl.screenReaderMessage}}<\/p>\n<div ng-transclude="inert" ng-show="$ctrl.currentState == $ctrl.states.inert"><\/div>\n<div ng-transclude="inprogress" ng-show="$ctrl.currentState == $ctrl.states.inProgress"><\/div>\n<div ng-transclude="failed" ng-show="$ctrl.currentState == $ctrl.states.failed"><\/div>\n<div ng-transclude="finished" ng-show="$ctrl.currentState == $ctrl.states.finished"><\/div>',transclude:{inert:"inertView",inprogress:"inprogressView",failed:"failedView",finished:"finishedView"},bindings:{watchOperation:"@",inertWhenFinished:"<"}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){var i=this;this.$scope=n;this.$q=t;this.showImage=!1;this.render=!1;this.httpsREGEX=/^https:\/\//;this.validateUrlUsesHttps=function(n){return i.httpsREGEX.test(n)}}return n.prototype.$onInit=function(){var n=this;this.$scope.$watch(function(){return n.src},function(){n.render=!1;n.showImage=!0;n.validateUrl(n.src).then(function(t){n.render=t}).catch(function(){n.render=!1}).finally(function(){n.showImage=n.render})})},n.prototype.validateUrl=function(n){var t=this.validator({url:n});return void 0!==t?this.$q.resolve(t):this.$q.resolve(this.validateUrlUsesHttps(n))},n.prototype.onLoad=function(){this.showImage=!0},n.prototype.onError=function(){this.showImage=!1},n.$inject=["$scope","$q"],n}();angular.module(i.baseModuleName).component("meeSafeImage",{template:'\n                    <img \n                        alt="{{$ctrl.alt}}"\n                        data-load-callback="$ctrl.onLoad()" \n                        data-error-callback="$ctrl.onError()" \n                        ng-if="$ctrl.render"\n                        ng-show="$ctrl.showImage"\n                        ng-src="{{$ctrl.src}}" \n                        mee-image="{{$ctrl.imgClass}}"\n                        mee-safe-image-on-load-and-error />\n                    <ng-transclude ng-hide="$ctrl.showImage"> \n                        <span \n                            aria-hidden="true"\n                            ng-hide="$ctrl.showImage" \n                            ng-class="$ctrl.icon"><\/span>\n                    <\/ng-transclude>\n                ',bindings:{alt:"@",validator:"&",icon:"@",imgClass:"@",src:"<"},transclude:!0,controller:r}).directive("meeSafeImageOnLoadAndError",function(){return{restrict:"A",scope:{loadCallback:"&",errorCallback:"&"},link:function(n,t){t.on("load",function(){return n.$evalAsync(function(){return n.loadCallback()})});t.on("error",function(){return n.$evalAsync(function(){return n.errorCallback()})})}}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeUtil=n;this.errorPrefix="$meeComponentRegistry: ";this.idStorage={};this.classStorage={}}return n.prototype.getInstanceById=function(n){if(!n)throw new Error(this.errorPrefix+" getInstanceById(): Passed id was falsy");if(!this.idStorage[n])throw new Error(this.errorPrefix+" getInstanceById(): Id not found in id storage");return this.idStorage[n].componentInstance},n.prototype.getInstancesByClass=function(n){var u;if(!n)throw new Error(this.errorPrefix+" getInstancesByClass(): Passed className was falsy");if(!this.classStorage[n])return[];for(var i=[],r=this.classStorage[n],t=0;t<r.length;t++)u=r[t],i.push(this.idStorage[u].componentInstance);return i},n.prototype.register=function(n,t,i){if(!n||!t||!i)throw new Error(this.errorPrefix+" register(): className, id, or componentInstance was falsy");this.idStorage[t]={className:n,componentInstance:i};this.addToClassStorage(n,t)},n.prototype.registerWithoutId=function(n,t){var i=this.$meeUtil.nextUid();return this.register(n,i,t),i},n.prototype.deregister=function(n){if(!n)throw new Error(this.errorPrefix+" deregister(): Passed id was falsy");if(!this.idStorage[n])throw new Error(this.errorPrefix+" deregister(): Id not found in id storage");var t=this.idStorage[n].className;this.classStorage[t]&&-1<this.classStorage[t].indexOf(n)&&this.classStorage[t].splice(this.classStorage[t].indexOf(n),1);delete this.idStorage[n]},n.prototype.addToClassStorage=function(n,t){this.classStorage[n]||(this.classStorage[n]=[]);this.classStorage[n].push(t)},n.$inject=["$meeUtil"],n}();angular.module(i.baseModuleName).service("$meeComponentRegistry",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$meeStringUtil=n;this.$window=t;this.polyfillElementMatches()}return n.prototype.prependClass=function(n,t){if(t){var i=n[0],r=this.$meeStringUtil.extractTokens(i.className);n.hasClass(t)?r[0]!==t&&(n.removeClass(t),i.className=t+" "+i.className):i.className=t+" "+i.className}},n.prototype.isHidden=function(n){var t=this.$window.getComputedStyle(n);return"none"===t.display||"hidden"===t.visibility||"0"===n.style.height.substring(0,1)&&"0."!=n.style.height.substring(0,2)||"0"===n.style.width.substring(0,1)&&"0."!=n.style.width.substring(0,2)||this.closestPolyfill(n)},n.prototype.closestPolyfill=function(n){return Element.prototype.closest||(Element.prototype.closest=function(n){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(n))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),!!n.closest(".ng-hide")},n.prototype.addTokenToAttributeValueOnce=function(n,t,i){if(!i)throw new Error("addTokenToAttributeValueOnce(): token must be specified.");var u=n.getAttribute(t)||"",r=this.$meeStringUtil.extractTokens(u);-1===r.indexOf(i)&&(r.push(i),n.setAttribute(t,r.join(" ")))},n.prototype.removeTokenFromAttributeValue=function(n,t,i){var r,u;if(!i)throw new Error("removeTokenFromAttributeValue(): token must be specified.");r=n.getAttribute(t)||"";r&&(u=this.$meeStringUtil.extractTokens(r).filter(function(n){return i!==n}),n.setAttribute(t,u.join(" ")))},n.prototype.polyfillElementMatches=function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(n){for(var i=(this.document||this.ownerDocument).querySelectorAll(n),t=i.length;0<=--t&&i.item(t)!==this;);return-1<t})},n.$inject=["$meeStringUtil","$window"],n}();angular.module(i.baseModuleName).service("$meeHtmlUtil",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.fireIrisBeacon=function(n){if(!n)return null;var t=document.createElement("img");return t.onerror=t.onload=t.onabort=function(){t.onerror=t.onload=t.onabort=null;t.src=""},t.src=n,t},n}();angular.module(i.baseModuleName).service("$meeIrisUtilityService",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.extractTokens=function(n){return n&&n.match(/[^\x20\t\r\n\f]+/g)||[]},n}();angular.module(i.baseModuleName).service("$meeStringUtil",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.extractBIID=function(n){var i=n.getAttribute("data-bi-id"),t,r;return i?i:(t=n.getAttribute("id"),t)?t:(r=n.getAttribute("name"),r||null)},n.prototype.extractTargetUrlForBI=function(n){var t=n.getAttribute("href"),i;return t?t:(i=n.getAttribute("ui-sref"),i||void 0)},n}();angular.module(i.baseModuleName).service("$meeTelemetryUtilityService",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.reportClick=function(){},n}();angular.module(i.baseModuleName).service("$meeTelemetryService",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$timeout=n;this.$rootScope=t}return n.prototype.nextUid=function(){return"auto-"+n.nextUniqueId++},n.prototype.getNewRandomNumber=function(n,t){for(var i;(i=Math.floor(Math.random()*n))===t&&1<n;);return i},n.prototype.debounce=function(n,t,i){var r,u=this;return function(){var f=this,e=arguments,o=i&&!r;r&&(u.$timeout.cancel(r),r=null);r=u.$timeout(function(){r=null;i||n.apply(f,e)},t);o&&n.apply(f,e)}},n.prototype.afterContentComplete=function(n){var t,i=this;this.$rootScope.$evalAsync(angular.noop);this.afterContentCompleteScope&&this.$rootScope.$$childTail===this.afterContentCompleteScope||(t=this.afterContentCompleteScope,this.afterContentCompleteScope=this.$rootScope.$new());this.afterContentCompleteScope.$watch("true",function(){t&&t.$destroy();i.$rootScope.$evalAsync(n)})},n.$inject=["$timeout","$rootScope"],n.nextUniqueId=0,n}();angular.module(i.baseModuleName).service("$meeUtil",r)}(MeePortal||(MeePortal={})),function(n){var t,i;i=n.OneUI||(n.OneUI={});(t=i.Angular||(i.Angular={})).moduleName="oneui";angular.module(t.moduleName,["ngSanitize","ui.router","oneui.base"]);angular.module(t.moduleName).constant("$oneUiDefaults",{paragraphStyle:"para3Lean"})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.element=n;this.attrs=t;this.controllers=[]}return n.prototype.$postLink=function(){if(this.attrs.kind){var n=this.attrs.kind.split(" ").filter(function(n){return"close-others"===n});this.closeOthers=!!n[0]}},n.prototype.registerController=function(n){var i=this,t=n.expandedChangedCallback;n.expandedChangedCallback=function(r){i.expandedChanged(n);t&&t(r)};this.controllers.push(n)},n.prototype.expandedChanged=function(n){this.closeOthers&&n.isExpanded()&&this.controllers.forEach(function(t){n!==t&&t.collapseDrawer()})},n.$inject=["$element","$attrs"],n}();angular.module(i.moduleName).component("meeAccordion",{transclude:!0,template:"<div ng-transclude><\/div>",controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$element=n;this.$attrs=t;this.$meeStringUtil=i;this.$scope=r}return Object.defineProperty(n.prototype,"meeDisabled",{set:function(n){this.$element&&this.$element[0].setAttribute("aria-disabled",""+n)},enumerable:!0,configurable:!0}),n.prototype.$postLink=function(){var t=this.$meeStringUtil.extractTokens(this.$attrs.kind),n=this.$element[0],u=n.children[0],r,i;if(-1!==t.indexOf("checkbox")?n.setAttribute("role","menuitemcheckbox"):-1!==t.indexOf("radio")?n.setAttribute("role","menuitemradio"):n.setAttribute("role","menuitem"),-1!==t.indexOf("text-only")?n.classList.add("f-context-text-only"):n.classList.add("f-context-action-trigger"),-1!==t.indexOf("divider")&&n.classList.add("f-divider"),n.classList.remove("ng-isolate-scope"),n.classList.add("ng-isolate-scope"),n.classList.remove("ng-scope"),n.classList.add("ng-scope"),this.$attrs.glyph)for(u.classList.add("c-glyph"),r=this.$meeStringUtil.extractTokens(this.$attrs.glyph),i=0;i<r.length;i++)u.classList.add(r[i]);else if(-1===t.indexOf("text-only"))throw new Error("mee-action-menu-item: Specify a glyph or use the 'text-only' option.");},n.$inject=["$element","$attrs","$meeStringUtil","$scope"],n}();u=function(){function n(){this.restrict="A";this.controllerAs="actionMenuItem";this.controller=r;this.bindToController={meeDisabled:"<?"};this.template="<span ng-transclude><\/span>";this.transclude=!0;this.scope={}}return n.factory=function(){return function(){return new n}},n}();angular.module(i.moduleName).directive("meeActionMenuItem",u.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f,e,o;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r="##menuItems##";u="##buttonText##";f="##titleText##";e=function(){function n(n,t,i,r){this.$element=n;this.$mwfUtil=t;this.$meeStringUtil=i;this.$timeout=r}return n.prototype.$postLink=function(){var n=this;this.$mwfUtil.create(mwf.ActionMenu,this.$element).then(function(t){return n.actionMenuCallback(t)})},n.prototype.actionMenuCallback=function(n){n.subscribe(this)},n.prototype.onSelection=function(n){var t=this;this.onSelect&&this.$timeout().then(function(){return t.onSelect({id:n.id})})},n.prototype.handleKeyDown=function(n){if(13===n.keyCode||32===n.keyCode){var t=n.target||n.srcElement;this.$timeout(function(){return angular.element(t).triggerHandler("click")})}},n.$inject=["$element","$meeMwfUtil","$meeStringUtil","$timeout"],n}();o=function(){function n(){this.restrict="E";this.controllerAs="actionMenu";this.controller=e;this.bindToController={meeDisabled:"<?",onSelect:"&?onSelect",biId:"@?"};this.scope=!0}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var e=n.find("li"),h="",t,c,o,s,i;if(!e||0===e.length)throw new Error("mee-action-menu: At least one <mee-action-menu-item> element must be provided.");if(t=n.find("mee-action-menu-trigger"),c=t.attr("title")?t.attr("title"):"",!t||1!==t.length)throw new Error("mee-action-menu: Exactly one <mee-action-menu-trigger> element must be provided.");for(o=0;o<e.length;o++)s=e[o],s.getAttribute("ng-click")&&s.setAttribute("ng-keydown",this.controllerAs+".handleKeyDown($event)"),h=h+"\n                                "+s.outerHTML;return i='<div class="c-action-menu">\n                        <button class="c-action-trigger" aria-haspopup="true" aria-expanded="false" ng-disabled="actionMenu.meeDisabled" ng-attr-data-bi-id="{{actionMenu.biId}}" title="##titleText##">##buttonText##<\/button>\n                        <ul class="c-context-menu" role="menu">\n                          ##menuItems##\n                        <\/ul>\n                      <\/div>',i=(i=(i=i.replace(r,h)).replace(u,t.html())).replace(f,c),n.html(i),function(){}},n}();angular.module(i.moduleName).directive("meeActionMenu",o.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.compile=function(n,t){var r=this,i;if(-1!==this.$meeStringUtil.extractTokens(t.meeActionTrigger).indexOf("glyph-only")){if(!t.glyph)throw new Error('meeActionTrigger: The "glyph-only" options requires a glyph to be specified.');i=n[0].innerText;n.empty();n.attr("aria-label",i);n.append('<span class="x-screen-reader">'+i+"<\/span>")}return function(n,t,i){t.addClass("c-action-trigger");i.glyph&&t.addClass("c-glyph glyph-"+i.glyph);var u=r.$meeStringUtil.extractTokens(i.meeActionTrigger);-1!==u.indexOf("heavyweight")&&i.$addClass("f-heavyweight");-1!==u.indexOf("align-margin")&&i.$addClass("f-align-margin")}},n}();angular.module(i.moduleName).directive("meeActionTrigger",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.element=n;this.attrs=t;this.$meeUtil=i;this.mwfUtil=r}return n.prototype.$postLink=function(){var t,i=this,r,u;if(this.attrs&&this.attrs.kind&&(r=this.attrs.kind.split(" "),t=r.filter(function(n){return"use-glyph"!==n&&"enable-cancel"!==n})[0],this.showGlyph=-1!==r.indexOf("use-glyph"),this.showCancelButton=-1!==r.indexOf("enable-cancel"),this.alertBugRepro=-1!==r.indexOf("bugRepro")),t){if("error"!==t&&"warning"!==t&&"info"!==t&&"bugRepro"!==t)throw new Error("mee-alert: '"+t+"' is not a valid option for 'kind'.");}else t="error";this.glyphClass=n.iconClassMap[t];u=this.element[0].getElementsByClassName("m-alert")[0];u.classList.add(n.alertClassMap[t]);this.alertBugRepro&&u.setAttribute("role","alert");this.showCancelButton&&!this.attrs.cancelLabel&&console.warn("Alert component: please provide aria-label text by using the cancel-label attribute.");this.$meeUtil.afterContentComplete(function(){var r,n,t;if(i.removeIfEmpty("alert-header"),i.removeIfEmpty("alert-actions"),r=i.element[0].getElementsByClassName("alert-actions")[0],r){if(n=r.getElementsByTagName("a"),2<n.length)throw new Error("Invalid markup. You may specify a maximum of two alert actions.");for(t=0;t<n.length;t++)n[t].classList.add("c-action-trigger")}i.alertBugRepro||u.setAttribute("role","alert");i.mwfUtil.create(mwf.Alert,i.element).then(function(n){return i.alertCallback(n)})})},n.prototype.alertCallback=function(n){n.subscribe(this)},n.prototype.onAlertClosed=function(){this.onClosed&&this.onClosed()},n.prototype.removeIfEmpty=function(n){var t=this.element[0].getElementsByClassName(n)[0];t.textContent||t.parentNode.removeChild(t)},n.$inject=["$element","$attrs","$meeUtil","$meeMwfUtil"],n.iconClassMap={error:"glyph-incident-triangle",warning:"glyph-warning",info:"glyph-info",bugRepro:"bug"},n.alertClassMap={error:"f-error",warning:"f-warning",info:"f-information",bugRepro:"bug"},n}();angular.module(i.moduleName).component("meeAlert",{template:'<div class="m-alert">\n                            <button ng-if="$ctrl.showCancelButton" class="c-action-trigger c-glyph glyph-cancel alert-cancel-button" ng-attr-aria-label="{{$ctrl.attrs.cancelLabel}}"><\/button>\n                            <div>\n                                <div ng-if="$ctrl.showGlyph" aria-hidden="true" ng-class="[\'c-glyph alert-icon-div\', $ctrl.glyphClass]"><\/div>\n                                <div class="c-heading alert-header" ng-transclude="alert-header"><\/div>\n\n                                <p class="c-paragraph">\n                                    <span class="alert-content" ng-transclude="alert-content"><\/span>\n                                    <span class="alert-actions c-group" ng-transclude="alert-actions"><\/span>\n                                <\/p>\n                            <\/div>\n                        <\/div>',bindings:{onClosed:"&?onClosed"},transclude:{"alert-header":"?alertHeader","alert-content":"alertContent","alert-actions":"?alertActions"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.link=function(t,i,r){var u,e,f;if(i.addClass("c-badge"),r.meeBadge)for(u=0,e=this.$meeStringUtil.extractTokens(r.meeBadge);u<e.length;u++){if(f=e[u],!(f in n.classMap))throw new Error("'"+f+"' is not a valid option for 'mee-badge'");i.addClass(n.classMap[f])}},n.classMap={small:"f-small",large:"f-large",responsive:"f-responsive",highlight:"f-highlight",lowlight:"f-lowlight"},n}();angular.module(i.moduleName).directive("meeBadge",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A";this.template="<span><ng-transclude><\/ng-transclude><\/span>";this.transclude=!0}return n.prototype.link=function(n,t){if("A"!==t[0].tagName&&"BUTTON"!==t[0].tagName)throw new Error("'"+t[0].tagName+"' is an invalid tag type for call-to action; requires <a> or <button> tag");t.addClass("c-call-to-action c-glyph f-lightweight")},n}();angular.module(i.moduleName).directive("meeBannerLink",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=["space-3-col","space-col-image"];u=function(){function n(n){this.$transclude=n}return n.prototype.$onInit=function(){if(-1===r.indexOf(this.layout))throw new Error("mee-banner component - Error '"+this.layout+"' is not a supported layout.");},n.prototype.hasSlot=function(n,t){return!t&&this.$transclude.isSlotFilled(n)},n.$inject=["$transclude"],n}();angular.module(i.moduleName).component("meeBanner",{transclude:{meeBannerSlot1:"?meeBannerSlot1",meeBannerSlot2:"?meeBannerSlot2",meeBannerSlot3:"?meeBannerSlot3",meeBannerSlot4:"?meeBannerSlot4"},template:'\n                <div data-grid="col-12" class="amc-banner theme-dark">\n                    <div data-grid="container pad-12x">\n                        <div ng-if="$ctrl.layout == \'space-3-col\'"\n                                class="space-3-col banner-padded-content"\n                                data-grid="col-12 stack-3">\n                                <div ng-if="$ctrl.hasSlot(\'meeBannerSlot1\', $ctrl.hideSlot1)"\n                                    ng-transclude="meeBannerSlot1"\n                                    class="main-column"\n                                    data-grid="col-5" ><\/div>\n\n                                <div class="info-columns" data-grid="col-7 stack-1">\n                                    <div ng-if="$ctrl.hasSlot(\'meeBannerSlot2\', $ctrl.hideSlot2)"\n                                        ng-transclude="meeBannerSlot2"\n                                        class="info-column"\n                                        data-grid="col-4"><\/div>\n\n                                    <div ng-if="$ctrl.hasSlot(\'meeBannerSlot3\', $ctrl.hideSlot3)"\n                                        ng-transclude="meeBannerSlot3"\n                                        class="info-column"\n                                        data-grid="col-4"><\/div>\n\n                                    <div ng-if="$ctrl.hasSlot(\'meeBannerSlot4\', $ctrl.hideSlot4)"\n                                        ng-transclude="meeBannerSlot4"\n                                        class="info-column"\n                                        data-grid="col-4"><\/div>\n                                <\/div>\n                        <\/div>\n\n                        <div ng-if="$ctrl.layout == \'space-col-image\'"\n                            class="space-col-image"\n                            data-grid="col-12">\n                            <div class="title-statement-section banner-padded-content"\n                                 data-grid="col-9 stack-3">\n                                <div ng-if="$ctrl.hasSlot(\'meeBannerSlot1\', $ctrl.hideSlot1)"\n                                     ng-transclude="meeBannerSlot1"\n                                     class="title-column"\n                                     data-grid="col-9"><\/div>\n                                <div ng-if="$ctrl.hasSlot(\'meeBannerSlot2\', $ctrl.hideSlot2)"\n                                     ng-transclude="meeBannerSlot2"\n                                     class="statement-column"\n                                     data-grid="col-3"><\/div>\n                            <\/div>\n                            <div ng-if="$ctrl.hasSlot(\'meeBannerSlot3\', $ctrl.hideSlot3)"\n                                 ng-transclude="meeBannerSlot3"\n                                 class="image-column"\n                                 data-grid="col-3">\n                            <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            ',bindings:{layout:"@",hideSlot1:"<",hideSlot2:"<",hideSlot3:"<",hideSlot4:"<"},controller:u})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A";this.scope={cmsLink:"<"}}return n.prototype.link=function(n,t,i){var r=n.cmsLink,u;if(r&&("meeNoHref"in i||(t.attr("href",r.url),r.target&&t.attr("target",r.target)),t.text(r.text),r.id&&t.attr("id",r.id),r.ariaLabel&&t.attr("aria-label",r.ariaLabel),r.customAttrs))for(u in r.customAttrs)t.attr(u,r.customAttrs[u])},n}();angular.module(i.moduleName).directive("cmsLink",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.element=n;this.$timeout=t;this.$meeTelemetryService=i;this.$meeTelemetryUtilityService=r}return n.prototype.$onInit=function(){this.clickable=void 0===this.clickable||this.clickable},n.prototype.onClick=function(n){this.triggerCTA(n)},n.prototype.triggerCTA=function(n){var i=this,t;n.target.closest&&n.target.closest("a[mee-banner-link]")||n.target.tagName&&"a"===n.target.tagName.toLowerCase()||(t=this.element[0].querySelectorAll("a[mee-banner-link]")[0],t&&this.clickable&&this.$timeout(function(){i.$meeTelemetryService.reportClick({clickId:i.$meeTelemetryUtilityService.extractBIID(t),targetUri:i.$meeTelemetryUtilityService.extractTargetUrlForBI(t)});t.click()}))},n.$inject=["$element","$timeout","$meeTelemetryService","$meeTelemetryUtilityService"],n}();u={template:'<div ng-class="{\'clickable\': $ctrl.clickable}" ng-click="$ctrl.onClick($event);">\n                       <div ng-transclude="media-image"><\/div>\n                       <div ng-transclude="media-body"><\/div>\n                   <\/div>',transclude:{"media-image":"?mediaImage","media-body":"?mediaBody"},bindings:{clickable:"<?"},controller:i.MeeBannerMediaComponent=r};angular.module(i.moduleName).component("meeBannerMedia",u)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.link=function(n,t,i){var r,u,f;if(t.addClass("c-button"),i.meeButton)for(r=0,u=this.$meeStringUtil.extractTokens(i.meeButton);r<u.length;r++){f=u[r];switch(f){case"primary":t.addClass("f-primary");break;case"lightweight":t.addClass("f-lightweight");break;case"flex":t.addClass("f-flex");break;default:throw new Error("Unsupported mee-button type: "+f);}}},n}();angular.module(i.moduleName).directive("meeButton",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A";this.template="<span><ng-transclude><\/ng-transclude><\/span>";this.transclude=!0}return n.prototype.link=function(t,i,r){if(r.meeCallToAction&&!(r.meeCallToAction in n.classMap))throw new Error("'"+r.meeCallToAction+"' is not a valid option for 'mee-call-to-action'");if("A"!==i[0].tagName)throw new Error("'"+i[0].tagName+"' is an invalid tag type for call-to action; requires <a> tag");i.addClass("c-call-to-action c-glyph");i.addClass(n.classMap[r.meeCallToAction])},n.classMap={primary:"",secondary:"f-secondary",lightweight:"f-lightweight",featurePrimary:"f-primary"},n}();angular.module(i.moduleName).directive("meeCallToAction",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A"}return n.prototype.link=function(t,i,r){if(!(r.meeCaption in n.classMap))throw new Error("'"+r.meeCaption+"' is not a valid option for 'mee-caption'");i.addClass(n.classMap[r.meeCaption]||n.classMap.caption1)},n.classMap={caption1:"c-caption-1",caption2:"c-caption-2"},n}();angular.module(i.moduleName).directive("meeCaption",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t;(function(n){n.CardGroupLayout={feed:"f-feed",channel:"f-channel"};var t=function(){function t(n,t){this.$scope=n;this.$element=t}return t.prototype.$postLink=function(){if(this.groupLayout&&!(this.groupLayout in n.CardGroupLayout))throw new Error("Invalid Markup: The Card Component 'groupLayout' attribute is invalid. See CardGroupLayoutType for valid values. Value: "+this.groupLayout);},t.prototype.getGroupLayout=function(t){return t?n.CardGroupLayout[t]:""},t.$inject=["$scope","$element"],t}();angular.module(n.moduleName).component("meeCardGroup",{transclude:!0,bindings:{groupLayout:"@"},controller:t,template:"<div ng-class=\"['m-card-group', $ctrl.getGroupLayout($ctrl.groupLayout)]\" ng-transclude />"})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){n.CardDisplay={single:"f-single",double:"f-double"};var t=function(){function t(n,t,i){this.$scope=n;this.$element=t;this.$transclude=i;this.clickableHeader=!1}return t.prototype.$postLink=function(){if(this.$element.addClass("c-card"),this.displayType||(this.displayType="single"),!(this.displayType in n.CardDisplay))throw new Error("Invalid Markup: The Card Component 'displayType' attribute is invalid. See CardDisplayType for valid values. Value: "+this.displayType);this.$element.addClass(n.CardDisplay[this.displayType])},t.prototype.hasHeader=function(){return this.$transclude.isSlotFilled("header")},t.prototype.onHeaderClick=function(n){n.currentTarget&&n.currentTarget.classList.contains("clickable")&&n.target&&n.target.hasAttribute("mee-heading")&&this.$scope.$broadcast("$meeCardHeaderClicked")},t.$inject=["$scope","$element","$transclude"],t}();n.CardComponent=t;angular.module(n.moduleName).component("meeCard",{transclude:{header:"?cardHeader",content:"cardContent"},controller:t,bindings:{displayType:"@",clickableHeader:"<?"},template:'<div class="card-heading" ng-class="{clickable: $ctrl.clickableHeader}" ng-if="$ctrl.hasHeader()" ng-click="$ctrl.onHeaderClick($event)" ng-transclude="header"><\/div><div class="c-card-content" ng-transclude="content"><\/div>'})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u,f,e,o,s){var h=this;if(this.$scope=n,this.$timeout=t,this.element=i,this.onCallToActionClick=r,this.clickable=u,this.rewardsPoints=f,this.$meeTelemetryService=e,this.$meeTelemetryUtilityService=o,this.$meeHtmlUtil=s,this.clickable=void 0===this.clickable||this.clickable,this.clickable&&(this.element.addClass("clickable"),this.element[0].addEventListener("click",this.onClick.bind(this)),this.unsubscribeHeaderClickListener=this.$scope.$on("$meeCardHeaderClicked",function(){h.$timeout(function(){h.cardHeaderClick()})})),this.showRewardsPoints=void 0!==this.rewardsPoints,this.rewardsPoints<0)throw new Error("Base card content component - Error: '"+this.rewardsPoints+"' must be a positive number.");}return n.prototype.onDestroy=function(){this.clickable&&(this.element[0].removeEventListener("click",this.onClick.bind(this)),this.unsubscribeHeaderClickListener&&this.unsubscribeHeaderClickListener())},n.prototype.onCTAClick=function(n){this.onCallToActionClick?(n.preventDefault(),this.clickable||this.onCallToActionClick()):this.clickable&&n.stopPropagation()},n.prototype.onClick=function(n){this.triggerCallToAction(n)},n.prototype.cardHeaderClick=function(){var n=this.element[0];n&&!this.$meeHtmlUtil.isHidden(n)&&this.element[0].click()},n.prototype.triggerCallToAction=function(n){var i=n.srcElement.classList.contains("c-call-to-action"),t;("A"===n.srcElement.tagName||"BUTTON"===n.srcElement.tagName||n.srcElement.classList.contains("c-context-menu")||n.srcElement.parentElement&&("BUTTON"===n.srcElement.parentElement.tagName||n.srcElement.parentElement.classList.contains("c-context-menu")))&&!i||(this.onCallToActionClick?this.onCallToActionClick():i||(t=this.element[0].querySelectorAll("a[mee-call-to-action]")[0],t&&(this.$meeTelemetryService.reportClick({clickId:this.$meeTelemetryUtilityService.extractBIID(t),targetUri:this.$meeTelemetryUtilityService.extractTargetUrlForBI(t)}),t.click())))},n}();i.CardContentPrimitives=r;angular.module(i.moduleName).factory("cardContentPrimitivesFactory",[function(){return function(n,t,i,u,f,e,o,s,h){return new r(n,t,i,u,f,e,o,s,h)}}])}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$window=n;this.$meeTelemetryService=t;this.$meeIrisUtilityService=i}return n.prototype.$onInit=function(){this.model.impressionBeaconUrl&&this.$meeIrisUtilityService.fireIrisBeacon(this.model.impressionBeaconUrl)},n.prototype.onCallToActionClick=function(){this.$meeTelemetryService.reportClick({clickId:this.model.biId,targetUri:this.model.link.url});var n=this.model.clickBeaconUrl;n&&(n=n.replace(/{ACTION}/g,"click"),this.$meeIrisUtilityService.fireIrisBeacon(n));this.$window.open(this.model.link.url,"_blank")},n.$inject=["$window","$meeTelemetryService","$meeIrisUtilityService"],n}();i.IrisCardContentComponent=r;angular.module(i.moduleName).component("irisCardContent",{template:'\n                <simple-card-content\n                     ng-if="$ctrl.model"\n                     title="{{$ctrl.model.title}}"\n                     description="{{$ctrl.model.description}}"\n                     align="center"\n                     call-to-action="$ctrl.model.link"\n                     on-call-to-action-click="$ctrl.onCallToActionClick()"\n                     clickable="$ctrl.model.clickable" >\n                    <card-image aria-hidden="true">\n                        <img mee-image alt="{{$ctrl.model.image.alt}}" ng-src="{{$ctrl.model.image.src}}" class="card-image">\n                    <\/card-image>\n                <\/simple-card-content>\n            ',bindings:{model:"<"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,r,i;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={template:'<div class="list-container">\n                        <div ng-class="[\'list-items\', $ctrl.itemSize]">\n                            <mee-media ng-repeat="item in $ctrl.items" size="{{$ctrl.itemSize}}">\n                                <media-image>\n                                    <div class="item-image" ng-transclude="item-image"><\/div>\n                                <\/media-image>\n                                <media-body>\n                                    <p ng-if="item.title" class="ellipsis" mee-heading="heading6" media-heading>{{item.title}}<\/p>\n                                    <p ng-if="item.description" class="ellipsis" mee-metatext>{{item.description}}<\/p>\n                                    <a ng-if="item.link" class="ellipsis" mee-hyperlink cms-link="item.link"><\/a>\n                                <\/media-body>\n                            <\/mee-media>\n                        <\/div>\n                    <\/div>\n                    <div class="call-to-action-container" ng-if="$ctrl.callToAction"><a mee-call-to-action="lightweight" class="ellipsis" cms-link="$ctrl.callToAction" ng-click="$ctrl.cardContentPrimitives.onCTAClick($event)"><\/a><\/div>\n                    <div ng-if="$ctrl.cardContentPrimitives.showRewardsPoints" class="rewards-points-container">\n                        <span class="c-glyph glyph-add"><\/span>\n                        <span mee-heading="subheading3" class="f-lean">{{$ctrl.rewardsPoints}}<\/span>\n                    <\/div>',bindings:{items:"<",callToAction:"<?",onCallToActionClick:"&?onCallToActionClick",clickable:"<?",rewardsPoints:"<?"},transclude:{"item-image":"itemImage"},require:{card:"^meeCard"},controller:function(){function n(n,t,i,r,u,f,e){this.$scope=n;this.$timeout=t;this.element=i;this.cardContentPrimitivesFactory=r;this.$meeTelemetryService=u;this.$meeTelemetryUtilityService=f;this.$meeHtmlUtil=e}return n.prototype.$onInit=function(){if(this.cardContentPrimitives=this.cardContentPrimitivesFactory(this.$scope,this.$timeout,this.element,this.onCallToActionClick,this.clickable,this.rewardsPoints,this.$meeTelemetryService,this.$meeTelemetryUtilityService,this.$meeHtmlUtil),"double"===this.card.displayType){if(this.items.length<4)throw new Error('List card content component in Double card - Error: array must contain at least 4 elements - use a single card (<mee-card display-type="single">) when the list contains between 2 and 3 elements');this.items=this.items.slice(0,6);this.itemSize=4===this.items.length?"xxl":"xl"}else{if(this.items.length<2)throw new Error("List card content component in Single card - Error: array must contain at least 2 elements - use a simple-card-component to render a single item");this.items=this.items.slice(0,3);this.itemSize=2===this.items.length?"xxl":"xl"}},n.prototype.$onDestroy=function(){this.cardContentPrimitives.onDestroy()},n.$inject=["$scope","$timeout","$element","cardContentPrimitivesFactory","$meeTelemetryService","$meeTelemetryUtilityService","$meeHtmlUtil"],n}()};angular.module(r.moduleName).component("listCardContent",i).component("listPaneContent",i)}(MeePortal||(MeePortal={})),function(n){var t,r,i;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={template:'<div class="image-container" ng-transclude="card-image"><\/div>\n                    <div ng-if="!$ctrl.rewardsPoints" class="action-menu-container" ng-transclude="action-menu"><\/div>\n                    <div class="text-container">\n                        <p ng-if="$ctrl.title" mee-heading="{{ $ctrl.headerKind === \'large\' ? \'subheading3\' : \'subheading5\'}}" class="card-title">{{$ctrl.title}}<\/p>\n                        <div class="description-container">\n                            <span ng-if="$ctrl.description" class="card-description">{{$ctrl.description}}<\/span>\n                            <div ng-transclude="description"><\/div>\n                        <\/div>\n                    <\/div>\n                    <div class="call-to-action-container" ng-if="$ctrl.callToAction"><a mee-call-to-action="lightweight" class="ellipsis" cms-link="$ctrl.callToAction" ng-click="$ctrl.cardContentPrimitives.onCTAClick($event)"><\/a><\/div>\n                    <div ng-if="$ctrl.rewardsPoints" class="rewards-points-container">\n                        <span class="c-glyph glyph-add"><\/span>\n                        <span mee-heading="subheading3" class="f-lean">{{$ctrl.rewardsPoints}}<\/span>\n                    <\/div>',bindings:{title:"@",description:"@?",callToAction:"<?",onCallToActionClick:"&?onCallToActionClick",align:"@?",headerKind:"@?",clickable:"<?",rewardsPoints:"<?",flip:"<?"},transclude:{"card-image":"cardImage","action-menu":"?actionMenu",description:"?description"},controller:function(){function n(n,t,i,r,u,f,e){this.$scope=n;this.$timeout=t;this.element=i;this.cardContentPrimitivesFactory=r;this.$meeTelemetryService=u;this.$meeTelemetryUtilityService=f;this.$meeHtmlUtil=e}return n.prototype.$onInit=function(){if(this.cardContentPrimitives=this.cardContentPrimitivesFactory(this.$scope,this.$timeout,this.element,this.onCallToActionClick,this.clickable,this.rewardsPoints,this.$meeTelemetryService,this.$meeTelemetryUtilityService,this.$meeHtmlUtil),this.align){if(-1===["left","center","right"].indexOf(this.align))throw new Error("simple card content component - Error: '"+this.align+"' is not a supported alignment.");}else this.align="left";if(this.headerKind){if(-1===["normal","large"].indexOf(this.headerKind))throw new Error("simple card content component - Error: '"+this.headerKind+"' is not a supported header kind.");}else this.headerKind="normal";this.flip&&this.element.addClass("flip")},n.prototype.$onDestroy=function(){this.cardContentPrimitives.onDestroy()},n.$inject=["$scope","$timeout","$element","cardContentPrimitivesFactory","$meeTelemetryService","$meeTelemetryUtilityService","$meeHtmlUtil"],n}()};angular.module(r.moduleName).component("simpleCardContent",i).component("simplePaneContent",i)}(MeePortal||(MeePortal={})),function(n){var t,r,i;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={template:'<simple-card-content title="{{$ctrl.title}}" description="{{$ctrl.description}}" call-to-action="$ctrl.callToAction" on-call-to-action-click="$ctrl.onCallToActionClick()" align="{{$ctrl.align}}" header-kind="{{$ctrl.headerKind}}" clickable="$ctrl.clickable" rewards-points="$ctrl.rewardsPoints">\n                        <card-image ng-transclude="card-image"><\/card-image>\n                        <action-menu ng-transclude="action-menu"><\/action-menu>\n                        <description>\n                            <div class="image-slots">\n                                <span ng-transclude="image-slot-1"><\/span>\n                                <span ng-transclude="image-slot-2"><\/span>\n                                <span ng-transclude="image-slot-3"><\/span>\n                                <span ng-transclude="image-slot-4"><\/span>\n                            <\/div>\n                            <div ng-transclude="extra-description"><\/div>\n                        <\/description>\n                    <\/simple-card-content>',bindings:{title:"@",description:"@",callToAction:"<?",onCallToActionClick:"&?onCallToActionClick",align:"@?",headerKind:"@?",clickable:"<?",rewardsPoints:"<?"},transclude:{"card-image":"cardImage","action-menu":"?actionMenu","image-slot-1":"imageSlot1","image-slot-2":"?imageSlot2","image-slot-3":"?imageSlot3","image-slot-4":"?imageSlot4","extra-description":"?extraDescription"},controller:function(){function n(n){this.$window=n}return n.prototype.$onInit=function(){var n=this;if(!this.description)throw new Error("Mosaic card content: description is required.");this.onCallToActionClick||(this.onCallToActionClick=function(){return n.$window.location.href=n.callToAction.url})},n.$inject=["$window"],n}()};angular.module(r.moduleName).component("mosaicCardContent",i).component("mosaicPaneContent",i)}(MeePortal||(MeePortal={})),function(n){var t,r,i;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={template:'<div class="overview-header">\n                           <p mee-heading="subheading6" class="card-title">{{$ctrl.title}}<\/p>\n                           <div class="call-to-action-container" ng-if="$ctrl.callToAction" ng-show="$ctrl.showCallToActionLink"><a mee-call-to-action="lightweight" class="ellipsis" cms-link="$ctrl.callToAction" ng-click="$ctrl.cardContentPrimitives.onCTAClick($event)"><\/a><\/div>\n                        <\/div>\n                        <div class="overview-content-container">\n                            <div class="overview-left-panel">\n                                <div ng-transclude="overviewLeftPanel"><\/div>\n                            <\/div>\n                            <div class="overview-right-panel">\n                                <div ng-transclude="overviewRightPanel"><\/div>\n                            <\/div>\n                            <div class="overview-bottom-panel">\n                                <div ng-transclude="overviewBottomPanel"><\/div>\n                            <\/div>\n                        <\/div>\n                    <\/div>',bindings:{title:"@",showCallToActionLink:"<?",callToAction:"<?",onCallToActionClick:"&?onCallToActionClick",clickable:"<?"},transclude:{overviewLeftPanel:"overviewLeftPanel",overviewRightPanel:"overviewRightPanel",overviewBottomPanel:"overviewBottomPanel"},require:{card:"^meeCard"},controller:function(){function n(n,t,i,r,u,f,e){this.$scope=n;this.$timeout=t;this.element=i;this.cardContentPrimitivesFactory=r;this.$meeTelemetryService=u;this.$meeTelemetryUtilityService=f;this.$meeHtmlUtil=e;this.showCallToActionLink=!1}return n.prototype.$onInit=function(){if(this.cardContentPrimitives=this.cardContentPrimitivesFactory(this.$scope,this.$timeout,this.element,this.onCallToActionClick,this.clickable,null,this.$meeTelemetryService,this.$meeTelemetryUtilityService,this.$meeHtmlUtil),"double"!==this.card.displayType)throw new Error('Overview card content component not in Double card - Error: overview must be in a double card (<mee-card display-type="double">), please correct');if(!this.title)throw new Error("Overview card content: title is required.");},n.prototype.$onDestroy=function(){this.cardContentPrimitives.onDestroy()},n.$inject=["$scope","$timeout","$element","cardContentPrimitivesFactory","$meeTelemetryService","$meeTelemetryUtilityService","$meeHtmlUtil"],n}()};angular.module(r.moduleName).component("overviewCardContent",i).component("overviewPaneContent",i)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$element=n;this.$meeUtil=t;this.$meeMwfUtil=i;this.transcludedItems=[]}return n.prototype.$postLink=function(){var n=this,t=angular.element(this.$element[0].querySelector("div.c-carousel"));this.isSingleSlide=this.singleSlide&&"true"===this.singleSlide;this.$meeUtil.afterContentComplete(function(){var r=n.$element[0].querySelector("ul[ng-transclude]"),i;if(n.transcludedItems=Array.prototype.slice.call(r.children),!(1<n.transcludedItems.length))throw new Error("mee-carousel: Your code must include at least two elements inside carousel.");if(n.autoplay&&"true"===n.autoplay){if(i=angular.element(n.$element[0].querySelector("div.btn-group")),t.addClass("f-auto-play"),i.append('<button class="c-action-toggle c-glyph glyph-play f-toggle" data-toggled-label="'+n.toggledLabel+'" data-toggled-glyph="glyph-pause" aria-label="'+n.ariaLabel+'"><\/button>'),n.interval&&5e3<=n.interval)t.attr("data-js-interval",n.interval);else if(n.interval)throw new Error("mee-carousel: Invalid markup. interval value can only be number greater than or equal to 5000, Ok with empty input.");}else if(n.autoplay&&"false"!==n.autoplay)throw new Error("mee-carousel: Invalid markup. autoplay value can only be true/false, Ok with empty input.");n.$meeMwfUtil.create(n.isSingleSlide?mwf.SingleSlideCarousel:mwf.MultiSlideCarousel,t)})},n.$inject=["$element","$meeUtil","$meeMwfUtil"],n}();angular.module(i.moduleName).component("meeCarousel",{template:'<div class="c-carousel" ng-class="{\'f-single-slide\': $ctrl.isSingleSlide, \'f-multi-slide\': !$ctrl.isSingleSlide}" role="region">\n                           <div class="c-group btn-group" ng-if="!$ctrl.isSingleSlide">\n                               <div class="c-sequence-indicator" role="tablist">\n                                   <button role="tab" ng-repeat="item in $ctrl.transcludedItems"><\/button>\n                               <\/div>\n                           <\/div>\n                           <button class="c-flipper f-previous" aria-hidden="true" tabindex="-1"><\/button>\n                           <button class="c-flipper f-next" aria-hidden="true" tabindex="-1"><\/button>\n                           <div itemscope>\n                               <ul ng-class="{\'c-group\': $ctrl.isSingleSlide}" ng-transclude><\/ul>\n                           <\/div>\n                        <\/div>',bindings:{autoplay:"@",interval:"@",toggledLabel:"@",ariaLabel:"@",singleSlide:"@"},transclude:!0,controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$element=n;this.mwfUtil=t;this.$scope=i}return n.prototype.onCheckBoxComponentChange=function(){this.ngModelCtrl.$setViewValue(this.ngModel);this.isIndeterminate=!1},n.prototype.$postLink=function(){var n=this;this.$element.addClass("c-checkbox");this.isIndeterminate&&this.$element.find("input").attr("data-js-checkbox","indeterminate");this.$scope.$watch(function(){return n.isIndeterminate},function(){n.$element.find("input").prop("indeterminate",n.isIndeterminate)});this.mwfUtil.create(mwf.Checkbox,this.$element)},n.$inject=["$element","$meeMwfUtil","$scope"],n}();angular.module(i.moduleName).component("meeCheckbox",{transclude:!0,template:'\n                <label class="c-label" >\n                    <input ng-model="$ctrl.ngModel"\n                            type="checkbox"\n                            ng-attr-aria-label="{{ $ctrl.meeAriaLabel }}"\n                            ng-disabled="$ctrl.ngDisabled"\n                            ng-change="$ctrl.onCheckBoxComponentChange()">\n                    <span ng-transclude><\/span>\n                <\/label>',bindings:{ngModel:"<",ngDisabled:"<",isIndeterminate:"=?",meeAriaLabel:"@"},require:{ngModelCtrl:"^ngModel"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A";this.controller=function(){}}return n.prototype.link=function(n,t){t[0].classList.add("c-group");t[0].classList.add("f-wrap-items")},n}();u=function(){function n(n,t){this.element=n;this.attrs=t}return n.prototype.$postLink=function(){if(this.attrs.glyph||(this.attrs.glyph="cancel"),!(this.attrs.glyph in n.classMap))throw new Error("'"+this.attrs.glyph+"' is not a valid option for 'glyph'");this.element[0].classList.add("c-choice-summary");this.glyphStyle=n.classMap[this.attrs.glyph]},n.prototype.itemSelected=function(n){this.onItemClicked({$event:{target:n.currentTarget}})},n.$inject=["$element","$attrs"],n.classMap={edit:"glyph-edit",cancel:"glyph-cancel",add:"glyph-add",up:"glyph-chevron-up",down:"glyph-chevron-down"},n}();angular.module(i.moduleName).directive("meeChoiceSummary",function(){return new r});angular.module(i.moduleName).directive("choiceSummaryItem",function(){return{controller:u,restrict:"A",transclude:!0,scope:!0,controllerAs:"choiceSummaryItemCtrl",bindToController:{meeBiId:"@",meeAriaLabel:"@",onItemClicked:"&"},template:'<a ng-click="choiceSummaryItemCtrl.itemSelected($event)"\n                          aria-label="{{choiceSummaryItemCtrl.meeAriaLabel}}"\n                          ng-class="[\'c-action-trigger\', \'c-glyph\', choiceSummaryItemCtrl.glyphStyle]"\n                          mee-no-href\n                          role="button"\n                          data-bi-id="{{choiceSummaryItemCtrl.meeBiId}}">\n                       <\/a>\n                       <span ng-transclude><\/span>',require:{choiceSummaryCtrl:"^meeChoiceSummary"}}})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f,e,o,s,h;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$meeUtil=n;this.$element=t}return n.prototype.$postLink=function(){var i=this.$element.find("label")[0],n=this.$element.find("input")[0],r=this.$element.find("button")[0],t=n.getAttribute("id")||"combo-"+this.$meeUtil.nextUid();i.setAttribute("for",t);n.setAttribute("id",t);r.setAttribute("name","button-"+this.$meeUtil.nextUid())},n.$inject=["$meeUtil","$element"],n}();u=function(){function n(){this.restrict="E";this.controller=r}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var t=n[0],e=t.querySelector("label"),u,i,f,o,r,s,h;if(!e)throw new Error("mee-combo: label required.");if(u=t.querySelector("input"),!u)throw new Error("mee-combo: input required.");if(u.setAttribute("combo-input",""),i=t.querySelector("combo-items"),!i)throw new Error("mee-combo: combo-items required.");if(f=t.getAttribute("dropdown-trigger-label"),!f)throw new Error("mee-combo: Attr dropdown-trigger-label required.");return o=this.createButtonTrigger(f),e.classList.add("c-label"),r=this.createComboWrapperDiv(),r.appendChild(u),r.appendChild(o),r.appendChild(i),t.appendChild(r),n.html(t.innerHTML.replace(/combo-items/g,"ul").replace(/combo-item/g,"li")),(i=t.querySelector("ul")).setAttribute("combo-items",""),h=t.querySelectorAll("li"),(s=h,Array.prototype.slice.call(s)).forEach(function(n){return n.setAttribute("combo-item","")}),angular.element(i).wrap(this.createUlWrapperDiv()),function(){}},n.prototype.createComboWrapperDiv=function(){var n=document.createElement("div");return n.setAttribute("combo-div",""),n},n.prototype.createButtonTrigger=function(n){var t=document.createElement("button");return t.setAttribute("combo-button",""),t.innerText=n,t},n.prototype.createUlWrapperDiv=function(){var n=document.createElement("div");return n.setAttribute("role","group"),n},n}();f=function(){function n(n,t){var i=this;this.$element=n;this.$mwfUtil=t;this.comboCallback=function(n){n.subscribe(i)};this.onSelectionChanged=function(n){i.ngModelCtrl&&i.ngModelCtrl.$setViewValue(n.value)}}return n.prototype.$postLink=function(){this.$element.addClass("c-combo");this.$mwfUtil.create(mwf.Combo,this.$element).then(this.comboCallback)},n.$inject=["$element","$meeMwfUtil"],n}();e=function(){function n(n){this.$element=n;this.defaultName="comboField"}return n.prototype.$onInit=function(){this.comboCtrl.ngModelCtrl=this.ngModelCtrl},n.prototype.$postLink=function(){this.$element.attr("name",this.$element.attr("name")||this.defaultName);this.$element.attr("role","combobox");this.$element.attr("type","text");this.$element.attr("autocomplete","off")},n.$inject=["$element"],n}();o=function(){function n(n){this.$element=n}return n.prototype.$postLink=function(){this.$element.addClass("c-glyph")},n.$inject=["$element"],n}();s=function(){function n(n){this.$element=n}return n.prototype.$postLink=function(){this.$element.attr("aria-expanded","false");this.$element.attr("tabindex",0);this.$element.attr("role","listbox")},n.$inject=["$element"],n}();h=function(){function n(n){this.$element=n}return n.prototype.$postLink=function(){this.$element.attr("role","option")},n.$inject=["$element"],n}();angular.module(i.moduleName).directive("meeCombo",u.factory()).directive("comboDiv",function(){return{restrict:"A",controller:f}}).directive("comboInput",function(){return{restrict:"A",controller:e,bindToController:{},require:{comboCtrl:"^comboDiv",ngModelCtrl:"?ngModel"}}}).directive("comboButton",function(){return{restrict:"A",controller:o,template:'<span class="x-screen-reader" ng-transclude><\/span>',transclude:!0,scope:{}}}).directive("comboItems",function(){return{restrict:"A",controller:s}}).directive("comboItem",function(){return{restrict:"A",controller:h,template:'<span tabindex="0" ng-transclude><\/span>',transclude:!0,scope:{}}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A";this.subDividerStr="subdivider";this.classMap={bottom3x:"f-pad-bottom-3x",top3x:"f-pad-top-3x",vertical3x:"f-pad-vertical-3x",bottom6x:"f-pad-bottom-6x",top6x:"f-pad-top-6x",vertical6x:"f-pad-vertical-6x"}}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.link=function(n,t,i){var o="c-divider",r,f,e,u;if(i.meeDivider){if(r=this.$meeStringUtil.extractTokens(i.meeDivider),2<r.length||2==r.length&&-1===r.indexOf(this.subDividerStr))throw new Error("meeDivider: Only one style option and the optional subdivider flag are allowed: ["+r+"]");for(f=0,e=r;f<e.length;f++){if(u=e[f],u!=this.subDividerStr&&!this.classMap[u])throw new Error("meeDivider: Style is not supported "+u+" is not one of "+this.classMap);switch(u){case"subdivider":o="c-subdivider";break;default:t.addClass(this.classMap[u])}}}t.addClass(o);t.attr("role","presentation")},n}();angular.module(i.moduleName).directive("meeDivider",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u){var f=this;this.element=n;this.attrs=t;this.$meeUtil=i;this.mwfUtil=r;this.$scope=u;this.onExpandedChanged=function(n){n.isExpanded!==f.expanded&&f.$scope.$evalAsync(function(){f.expanded=n.isExpanded;f.expandedChangedCallback&&f.expandedChangedCallback({$event:{expanded:n.isExpanded}})})}}return n.prototype.$postLink=function(){var n=this,t;this.divider=this.attrs.kind&&-1!==this.attrs.kind.indexOf("divider");this.expanded=!(!this.attrs.state||-1===this.attrs.state.indexOf("expanded"));this.contentId=this.attrs.id?this.attrs.id:"mee-drawer-"+this.$meeUtil.nextUid();this.contentId=this.contentId+"-drawer-content";t=this.element;t.addClass("c-drawer");this.divider&&t.addClass("f-divider");this.triggerElem=this.element.children()[0];this.triggerElem.className=this.triggerElem.className+" c-glyph drawer-glyph";this.triggerElem.setAttribute("aria-controls",this.contentId);this.triggerElem.setAttribute("aria-expanded",this.expanded?"true":"false");this.contentElem=this.element.children()[1];this.contentElem.setAttribute("id",this.contentId);this.mwfUtil.create(mwf.Drawer,this.element).then(function(t){(n.mwfComponent=t).subscribe(n);n.accordionCtrl&&n.accordionCtrl.registerController(n)})},n.prototype.isExpanded=function(){return this.expanded},n.prototype.collapseDrawer=function(){this.mwfComponent.collapseDrawer()},n.prototype.expandDrawer=function(){this.mwfComponent.expandDrawer()},n.$inject=["$element","$attrs","$meeUtil","$meeMwfUtil","$scope"],n}();u=function(){function n(){this.restrict="E";this.scope=!0;this.controllerAs="drawer";this.bindToController={expandedChangedCallback:"&?onExpandedChanged"};this.controller=r;this.require={accordionCtrl:"?^^meeAccordion"}}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var t=n.html(),i;if(-1===t.indexOf("drawer-trigger"))throw new Error("Invalid markup. Your code must include a <drawer-trigger> element.");if(-1===t.indexOf("drawer-content"))throw new Error("Invalid markup. Your code must include a <drawer-content> element.");return i=t.replace(/drawer-trigger/g,"button").replace(/drawer-content/g,"div"),n.html(i),function(){}},n}();angular.module(i.moduleName).directive("meeDrawer",u.factory())}(MeePortal||(MeePortal={})),function(n){var t,i;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});angular.module(i.moduleName).component("meeEntityDescriptor",{template:'<div class="entity-descriptor">\n                        <mee-media size="lg">\n                            <media-image ng-transclude="image"><\/media-image>\n                            <media-body>\n                                <div ng-transclude="heading"><\/div>\n                                <div mee-heading="subheading6" ng-transclude="description"><\/div>\n                            <\/media-body>\n                        <\/mee-media>\n                      <\/div>',transclude:{image:"descriptorImage",heading:"descriptorHeading",description:"descriptorDescription"}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$scope=n;this.$window=t;this.$element=i;this.$meeUtil=r;this.isWithDropdown=!1;this.hasLinks=!1;this.countVisibleLinks=1/0}return n.prototype.$onInit=function(){var n=this;this.links&&0<this.links.length&&(this.hasLinks=!0,this.navMenuTriggerText&&(this.isWithDropdown=!0,this.maxLinksToDisplay=this.maxLinksToDisplay||1/0,this.countVisibleLinks=this.maxLinksToDisplay,this.$scope.$watchCollection(function(){return n.links.slice(0,n.countVisibleLinks)},function(t){return n.visibleLinks=t})))},n.prototype.$postLink=function(){var n=this;this.isWithDropdown&&this.$meeUtil.afterContentComplete(function(){n.linksMeasurements=n.$element[0].getElementsByClassName("nav-menu-links-measurements")[0];n.linksMeasurements&&(n.updateNavLinks(),n.resizeCallback=function(){return n.updateNavLinks()},n.$window.addEventListener("resize",n.resizeCallback))})},n.prototype.$doCheck=function(){this.linksMeasurements&&this.updateNavLinks()},n.prototype.$onDestroy=function(){this.resizeCallback&&this.$window.removeEventListener("resize",this.resizeCallback)},n.prototype.isStateLink=function(n){return n&&n.state},n.prototype.createUISref=function(n){return n.state+"("+JSON.stringify(n.stateParams)+")"},n.prototype.updateNavLinks=function(){for(var i=this,t=this.linksMeasurements.getElementsByClassName("nav-menu-link"),n=Math.min(t.length,this.maxLinksToDisplay);1<n&&0!=t[n-1].offsetTop;--n);n!==this.countVisibleLinks&&this.$scope.$evalAsync(function(){i.countVisibleLinks=n})},n.$inject=["$scope","$window","$element","$meeUtil"],n}();angular.module(i.moduleName).component("meeEntity",{template:'<div ng-transclude="meeEntityDescriptor"><\/div>\n                       <div class="x-clearfix">\n                            <mee-link-navigation ng-if="!$ctrl.isWithDropdown && $ctrl.hasLinks" links="$ctrl.links" align="left" accessibility-label="{{$ctrl.accessibilityLabel}}"><\/mee-link-navigation>\n\n                            <div ng-if="$ctrl.isWithDropdown" class="nav-menu-links-measurements" aria-hidden="true" role="presentation">\n                                <ul>\n                                    <li class="nav-menu-button">{{$ctrl.navMenuTriggerText}}<\/li>\n                                    <li class="nav-menu-link" ng-repeat="link in $ctrl.links | limitTo : $ctrl.maxLinksToDisplay">{{link.text || "&nbsp;"}}<\/li>\n                                <\/ul>\n                            <\/div>\n\n                            <div ng-if="$ctrl.isWithDropdown" class="nav-menu-links">\n                                <mee-link-navigation links="$ctrl.visibleLinks" align="left" accessibility-label="{{$ctrl.accessibilityLabel}}"><\/mee-link-navigation>\n                                <mee-nav-menu menu-style="accent" ng-show="$ctrl.countVisibleLinks < $ctrl.links.length">\n                                    <menu-trigger>{{$ctrl.navMenuTriggerText}}<\/menu-trigger>\n                                    <ul>\n                                        <li ng-repeat="link in $ctrl.links | limitTo : \'Infinity\' : $ctrl.countVisibleLinks">\n                                            <a ng-if="!$ctrl.isStateLink(link)" mee-hyperlink cms-link="link"><\/a>\n                                            <a ng-if="$ctrl.isStateLink(link)" id="{{link.id}}" mee-hyperlink ui-sref="{{$ctrl.createUISref(link)}}" ui-sref-opts="{{link.stateOptions}}">{{link.text}}<\/a>\n                                        <\/li>\n                                    <\/ul>\n                                <\/mee-nav-menu>\n                            <\/div>\n\n                        <\/div>\n                        <div>\n                            <hr mee-divider="top3x">\n                            <div ng-transclude="entityBody"><\/div>\n                        <\/div>',transclude:{meeEntityDescriptor:"meeEntityDescriptor",entityBody:"entityBody"},bindings:{links:"<",maxLinksToDisplay:"<?",navMenuTriggerText:"@",accessibilityLabel:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u,f){this.$meeErrors=n;this.$scope=t;this.$element=i;this.$meeUtil=r;this.$meeHtmlUtil=u;this.errorViewFactory=f}return n.prototype.$onInit=function(){var n={errorId:this.errorId,kind:this.kind,inputSelectorFormat:"{0} input, {0} .c-select-menu button, {0} textarea"};this.errorView=this.errorViewFactory(this.$meeErrors,this.$scope,this.$element,this.$meeUtil,this.$meeHtmlUtil,n);this.errorView.$onInit()},n.prototype.$onDestroy=function(){this.errorView.$onDestroy()},n.prototype.getErrorText=function(){return this.errorView.getErrorText()},n.prototype.getErrorElementId=function(){return this.errorView.getErrorElementId()},n.prototype.getErrorClass=function(){return this.errorView.getErrorClass()},n.$inject=["$meeErrors","$scope","$element","$meeUtil","$meeHtmlUtil","errorViewFactory"],n}();angular.module(i.moduleName).component("meeInlineError",{template:'<div ng-if="$ctrl.getErrorText()" id="{{$ctrl.getErrorElementId()}}" ng-class="[\'c-label\', $ctrl.getErrorClass()]" role="alert" aria-live="polite" aria-atomic="true" aria-relevant="text">{{$ctrl.getErrorText()}}<\/div>',bindings:{errorId:"@",kind:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.hasMessage=function(){return!!this.message},n}();angular.module(i.moduleName).component("meeErrorMessageMwf",{template:'<div class="mee-error-text" ng-if="$ctrl.hasMessage()" role="alert" aria-live="assertive">{{$ctrl.message}}<\/div>',bindings:{message:"@errorText"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.link=function(t,i,r){var u,e,f;for(i.addClass("m-feature"),u=0,e=this.$meeStringUtil.extractTokens(r.meeFeature);u<e.length;u++){if(f=e[u],!(f in n.classMap))throw new Error("Unsupported mee-feature option: "+f);i.addClass(n.classMap[f])}},n.classMap={"background-neutral-10":"f-background-neutral-10","background-neutral-20":"f-background-neutral-20","background-neutral-30":"f-background-neutral-30","background-neutral-45":"f-background-neutral-45","background-neutral-55":"f-background-neutral-55","background-neutral-65":"f-background-neutral-65","background-neutral-75":"f-background-neutral-75","background-neutral-80":"f-background-neutral-80","background-neutral-90":"f-background-neutral-90","background-neutral-100":"f-background-neutral-100","background-accent":"f-background-accent","align-left":"f-align-left","align-center":"f-align-center","align-right":"f-align-right","set-16x9-Ratio":"f-set-ratio","image-priority":"f-image-priority"},n}();angular.module(i.moduleName).directive("meeFeature",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$element=n;this.$attrs=t;this.$meeUtil=i;this.$meeStringUtil=r;this.size="sm";this.hideActions=!1}return n.prototype.$postLink=function(){var r=this.$meeStringUtil.extractTokens(this.$attrs.kind),u=this.$element[0],n,t,i;(-1!==r.indexOf("error")&&u.classList.add("f-error"),-1!==r.indexOf("flex"))?u.classList.add("f-flex"):(n=this.$element.find("media-body"),t=n[0],t.classList.add("x-visible-inline"),t.setAttribute("data-grid","col-12 stack-2"),i=n.children()[0],this.hideActions?i.setAttribute("data-grid","col-12"):this.$meeUtil.afterContentComplete(function(){i.setAttribute("data-grid","col-8");n.children()[1].setAttribute("data-grid","col-4")}))},n.$inject=["$element","$attrs","$meeUtil","$meeStringUtil"],n}();angular.module(i.moduleName).component("meeFeedItem",{template:'<mee-media size="{{$ctrl.size}}">\n                            <media-image ng-transclude="image"><\/media-image>\n                            <media-body>\n                                <div ng-transclude="message"><\/div>\n                                <div ng-if="!$ctrl.hideActions" ng-transclude="actions"><\/div>\n                            <\/media-body>\n                       <\/mee-media>',transclude:{image:"feedImage",message:"feedMessage",actions:"?feedActions"},bindings:{size:"@?",hideActions:"<?"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.element=n;this.$meeUtil=t;this.$meeMwfUtil=i;this.$meeA11y=r;this.hasBeak=!1;this.replaceNewLinesRegex=/(\r\n|\n|\r)/gm;this.replaceExtraSpacesRegex=/\s+/g}return n.prototype.$postLink=function(){var t=this,r=this.element.parent(),u=r.prop("tagName"),i;if(!n.validParentTags.some(function(n){return n===u}))throw new Error("mee-flyout: Is not supported when transcluded under '"+u+"' tag. It's only supported with tags: "+n.validParentTags.join(", "));if(this.placement!==n.placementMap.top&&this.placement!==n.placementMap.bottom&&this.placement!==n.placementMap.right&&this.placement!==n.placementMap.left)throw new Error("mee-flyout: '"+this.placement+"' is not a valid value for argument placement.");this.id||(this.id="mee-flyout-"+this.$meeUtil.nextUid(),this.element.attr("id",this.id));i=this.element.parent();i.attr("aria-haspopup","true");i.attr("data-js-flyout",this.id);i.after(this.element);this.element.addClass("c-flyout");this.element.attr("role","tooltip");this.element.attr("data-js-flyout-placement",this.placement);this.element.attr("data-js-flyout-dismissible",this.dismissible);this.element.attr("aria-hidden","true");this.hasBeak&&this.element.addClass("f-beak");r.on("click",function(){if(!t.flyout.shown){var n=t.element[0].innerText;n&&(n=(n=(n=n.trim()).replace(t.replaceNewLinesRegex," ")).replace(t.replaceExtraSpacesRegex," "),t.$meeA11y.announcer.announce(n))}});this.$meeMwfUtil.create(mwf.Flyout,this.element).then(function(n){t.flyout=n})},n.$inject=["$element","$meeUtil","$meeMwfUtil","$meeA11y"],n.placementMap={right:"right",left:"left",top:"top",bottom:"bottom"},n.validParentTags=["A","BUTTON"],n}();angular.module(i.moduleName).component("meeFlyout",{transclude:!0,template:"<ng-transclude><\/ng-transclude>",bindings:{id:"@",placement:"@",hasBeak:"<?",dismissible:"@",ngClass:"<"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeHtmlUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeHtmlUtil"],t},n.prototype.link=function(t,i,r){if(!(r.meeHeading in n.classMap))throw new Error("'"+r.meeHeading+"' is not a valid option for 'mee-heading'");var u=n.classMap[r.meeHeading]||n.classMap.heading1;this.$meeHtmlUtil.prependClass(i,u)},n.classMap={heading:"c-heading",heading1:"c-heading-1",heading2:"c-heading-2",heading3:"c-heading-3",heading4:"c-heading-4",heading5:"c-heading-5",heading6:"c-heading-6",amcheading1:"amc-heading-1",subheading:"c-subheading",subheading1:"c-subheading-1",subheading2:"c-subheading-2",subheading3:"c-subheading-3",subheading4:"c-subheading-4",subheading5:"c-subheading-5",subheading6:"c-subheading-6"},n}();angular.module(i.moduleName).directive("meeHeading",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f,e,o,s;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=["left","right","center"];u=["top","center","bottom"];f=["accessory","app","article","device","game","movie","music-album","music-artist","software","tv-show"];e=["dark","light"];o=["20","40","60","80","100"];s=function(){function n(n){this.$element=n}return n.prototype.$postLink=function(){if(this.horz&&r.indexOf(this.horz)<0)throw new Error("Invalid markup. The Hero item 'horz' attribute is invalid");if(this.vert&&u.indexOf(this.vert)<0)throw new Error("Invalid markup. The Hero item 'vert' "+this.vert+" attribute is invalid");if(this.context&&f.indexOf(this.context)<0)throw new Error("Invalid markup. The Hero item 'context' attribute is invalid");if(this.theme&&e.indexOf(this.theme)<0)throw new Error("Invalid markup. The Hero item 'theme' attribute is invalid");if(this.mask&&o.indexOf(this.mask)<0)throw new Error("Invalid markup. The Hero item 'mask' attribute is invalid");this.typeClass=this.getClass()},n.prototype.getClass=function(){return"m-hero-item "+(this.horz?"f-x-"+this.horz+" ":"")+" "+(this.vert?"f-y-"+this.vert+" ":"")+" "+(this.context?"context-"+this.context+" ":"")+" "+(this.theme?"theme-"+this.theme+" ":"")+" "+(this.mask?"f-mask-"+this.mask+" ":"")},n.$inject=["$element","$meeMwfUtil"],n}();angular.module(i.moduleName).directive("meeHeroItem",function(){return{restrict:"E",compile:function(n){var t,i=n[0],f=i.querySelector("background-picture"),r,u;if(!f)throw new Error("Invalid markup. Your code must include a <background-picture> element.");if(t='<section ng-class="$heroItemCtrl.typeClass">\n                            ###bgwrap###\n                            <div>\n                                <div>###aawrap###<\/div>\n                            <\/div>\n                            ###oawrap###\n                       <\/section>'.replace(/###bgwrap###/gi,angular.element(f).html()),r=i.querySelector("action-area"),!r)throw new Error("Invalid markup. Your code must include a <action-area> element.");return t=t.replace(/###aawrap###/gi,angular.element(r).html()),u=i.querySelector("optional-area"),t=u?t.replace(/###oawrap###/gi,angular.element(u).html()):t.replace(/###oawrap###/gi,""),n.html(t),function(){}},scope:!0,bindToController:{horz:"@",vert:"@",context:"@",theme:"@",mask:"@"},controllerAs:"$heroItemCtrl",controller:s}})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A"}return n.prototype.link=function(n,t){t.addClass("c-hyperlink")},n}();u=function(){function n(){this.restrict="A"}return n.prototype.compile=function(n,t){if("A"!==n[0].nodeName)throw new Error("'"+n[0].tagName+"' is an invalid element type for mee-no-href; requires <a> tag");if(t.href||t.ngHref||t.uiSref)throw new Error("href attribute should not be set along with mee-no-href directive");return n.attr("href","javascript:;"),function(n,t){t.attr("role")||t.attr("role","button")}},n}();angular.module(i.moduleName).directive("meeHyperlink",function(){return new r}).directive("meeNoHref",function(){return new u})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$meeStringUtil=n;this.restrict="A"}return n.factory=function(){var t=function(t){return new n(t)};return t.$inject=["$meeStringUtil"],t},n.prototype.link=function(t,i,r){var u,e,f;if(i.addClass("c-image"),r.meeImage)for(u=0,e=this.$meeStringUtil.extractTokens(r.meeImage);u<e.length;u++){if(f=e[u],!(f in n.classMap))throw new Error("'"+f+"' is not a valid option for 'mee-image'");i.addClass(n.classMap[f])}},n.classMap={round:"f-round","pad-bottom-3x":"f-pad-bottom-3x","pad-top-3x":"f-pad-top-3x","pad-left-3x":"f-pad-left-3x","pad-right-3x":"f-pad-right-3x","pad-vertical-3x":"f-pad-vertical-3x","pad-horizontal-3x":"f-pad-horizontal-3x","pad-bottom-6x":"f-pad-bottom-6x","pad-top-6x":"f-pad-top-6x","pad-left-6x":"f-pad-left-6x","pad-right-6x":"f-pad-right-6x","pad-vertical-6x":"f-pad-vertical-6x","pad-horizontal-6x":"f-pad-horizontal-6x"},n}();angular.module(i.moduleName).directive("meeImage",r.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$transclude=n}return n.prototype.$onInit=function(){this.hasOptionalContent=this.$transclude.isSlotFilled("optionalHeading")||this.$transclude.isSlotFilled("optionalDescription")},n.$inject=["$transclude"],n}();angular.module(i.moduleName).component("meeInformationContent",{template:'<div class="information-content-component">\n                        <mee-media size="xxl">\n                            <media-image ng-transclude="image"><\/media-image>\n                            <media-body>\n                                <h4 ng-transclude="heading"><\/h4>\n                                <div ng-transclude="description"><\/div>\n                                <div ng-transclude="status"><\/div>\n                            <\/media-body>\n                            <media-body ng-if="$ctrl.hasOptionalContent">\n                                <h4 ng-transclude="optionalHeading"><\/h4>\n                                <div ng-transclude="optionalDescription"><\/div>\n                            <\/media-body>\n                        <\/mee-media>\n                      <\/div>',transclude:{image:"informationContentImage",heading:"informationContentHeading",description:"informationContentDescription",status:"?informationContentStatus",optionalHeading:"?informationContentOptionalHeading",optionalDescription:"?informationContentOptionalDescription"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$transclude=n}return n.$inject=["$transclude"],n}();angular.module(i.moduleName).component("meeInformationData",{template:'<div class="information-data-component">\n                            <div ng-transclude="gridContent"><\/div>\n                      <\/div>',transclude:{gridContent:"gridContent"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.attrs=n;this.$element=t;this.$transclude=i}return n.prototype.$postLink=function(){if(this.attrs.kind){var n=this.attrs.kind.split(" ");this.isWarning=!n.indexOf("warning")}this.isWarning?this.$element.addClass("warning"):this.$element.addClass("default");this.$element.find("information-datum-image").addClass("media-icon c-glyph glyph-"+this.attrs.glyph)},n.$inject=["$attrs","$element","$transclude"],n}();angular.module(i.moduleName).component("meeInformationDatum",{template:'<div class="information-datum-component">\n                        <mee-media size="sm">\n                            <media-image ng-transclude="image"><\/media-image>\n                            <media-body>\n                                <h5 ng-transclude="heading"><\/h5>\n                                <div ng-transclude="content"><\/div>\n                            <\/media-body>\n                        <\/mee-media>\n                      <\/div>',transclude:{image:"informationDatumImage",heading:"informationDatumHeading",content:"informationDatumContent"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A"}return n.prototype.link=function(n,t){t.addClass("c-label")},n}();angular.module(i.moduleName).directive("meeLabel",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.element=n}return n.prototype.$postLink=function(){switch(this.element.addClass("m-link-navigation"),this.element.attr("data-grid","col-12"),this.navClasses=["c-link-navigation"],this.accessibilityLabel&&this.element.find("nav").attr("aria-label",this.accessibilityLabel),this.align=this.align||"middle",this.align){case"left":this.navClasses.push("f-align-left");break;case"right":this.navClasses.push("f-align-right");break;case"middle":break;default:throw new Error("mee-link-navigation component - Error '"+this.align+"' is not a supported alignment. Supported alignment are left, right, middle(default)");}},n.prototype.isStateLink=function(n){return n&&n.state},n.prototype.createUISref=function(n){return n.state+"("+JSON.stringify(n.stateParams)+")"},n.$inject=["$element"],n}();angular.module(i.moduleName).component("meeLinkNavigation",{template:'<nav role="navigation" ng-class="$ctrl.navClasses">\n                         <ul>\n                            <li ng-repeat="link in $ctrl.links">\n                                <a ng-if="!$ctrl.isStateLink(link)" mee-hyperlink cms-link="link"><\/a>\n                                <a ng-if="$ctrl.isStateLink(link)" id="{{link.id}}" mee-hyperlink ui-sref="{{$ctrl.createUISref(link)}}" ui-sref-opts="{{link.stateOptions}}">{{link.text}}<\/a>\n                            <\/li>\n                         <\/ul>\n                       <\/nav>\n                      ',bindings:{links:"<",align:"@",accessibilityLabel:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t,i,r,u;(i=t||(t={}))[i.lean=0]="lean";i[i.bare=1]="bare";r=function(){function n(n){this.$meeStringUtil=n}return n.$inject=["$meeStringUtil"],n}();u=function(){function n(){this.restrict="A";this.controller=r;this.styleOptions={}}return n.prototype.link=function(t,i,r,u){i.addClass("c-list");r.meeList&&u.$meeStringUtil.extractTokens(r.meeList).forEach(function(t){i.addClass(n.GetClassFromStyleName(t))})},n.GetClassFromStyleName=function(n){switch(t[n]){case t.bare:return"f-bare";case t.lean:return"f-lean";default:throw new Error("mee-list: "+n+" is not a valid option");}},n}();angular.module(n.moduleName).directive("meeList",function(){return new u})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.$inject=[],n}();u=function(){function n(){}return n.prototype.link=function(n,t){t.attr("aria-hidden","true");t.addClass("mee-loading-container mee-loading-animation")},n}();angular.module(i.moduleName).component("meeLoadingPlaceholder",{transclude:!0,template:'<span mee-loading-container>\n                            <span class="mee-loading-placeholder-content" ng-transclude><\/span>\n                       <\/span>\n            ',controller:r}).directive("meeLoadingContainer",function(){return new u})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A"}return n.prototype.link=function(n,t){t.addClass("c-meta-text")},n}();angular.module(i.moduleName).directive("meeMetatext",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u){this.$meeMwfUtil=n;this.$meeHtmlUtil=t;this.$timeout=i;this.$window=r;this.$meeA11y=u}return n.prototype.create=function(n){return new u(n,this.$meeMwfUtil,this.$meeHtmlUtil,this.$timeout,this.$window,this.$meeA11y)},n.$inject=["$meeMwfUtil","$meeHtmlUtil","$timeout","$window","$meeA11y"],n}();u=function(){function n(n,t,i,r,u,f){var e=this;if(this.modalDialogElementSelector=n,this.$meeMwfUtil=t,this.$meeHtmlUtil=i,this.$timeout=r,this.$window=u,this.$meeA11y=f,this.dialogInputSelectors="select, input, textarea, button, a, .glyph-cancel",this.nonInteractiveDataAttributeSelector="[data-oneui-dialog-hide], [disabled]",this.topBoundSelector="[data-top-bound]",this.bottomBoundSelector="[data-bottom-bound]",this.closeButtonSelector="[data-modal-close-button]",this.modalDialogElement=this.$window.document.querySelector(n),!this.modalDialogElement)throw new Error("MwfModalDialogWrapper: modal dialog element "+n+" not found.");mwf.Dialog.dialogInputSelectors="#id-that-does-not-exist";this.whenInitialized=this.$meeMwfUtil.create(mwf.Dialog,this.modalDialogElement).then(function(n){return e.initializeDialog(n)})}return n.prototype.initialize=function(){return this.whenInitialized},n.prototype.show=function(){this.dialog.show()},n.prototype.hide=function(){this.dialog.hide()},n.prototype.update=function(){this.dialog.update()},n.prototype.subscribe=function(n){return this.dialog.subscribe(n)},n.prototype.unsubscribe=function(n){return this.dialog.unsubscribe(n)},n.prototype.initializeDialog=function(n){var t=this;this.dialog=n;this.dialogControls={topBound:this.modalDialogElement.querySelector(this.topBoundSelector),bottomBound:this.modalDialogElement.querySelector(this.bottomBoundSelector),closeButton:this.modalDialogElement.querySelector(this.closeButtonSelector)};this.dialogControls.topBound.addEventListener("focusin",function(n){t.onBoundFocused(n)});this.dialogControls.bottomBound.addEventListener("focusin",function(n){t.onBoundFocused(n)});this.dialogControls.closeButton.addEventListener("click",function(n){t.onCloseButtonClick(n)});this.dialogControls.closeButton.addEventListener("keydown",function(n){t.onCloseButtonKeydown(n)});this.modalDialogElement.addEventListener("keydown",function(n){t.onKeydown(n)})},n.prototype.onBoundFocused=function(n){var t=this.getInteractiveElements(),i;t.length&&(i=(n.target||n.srcElement)==this.dialogControls.topBound?t.length-1:0,this.$meeA11y.focuser.focus(t[i],{}))},n.prototype.onKeydown=function(n){switch(n.which||n.keyCode||n.charCode){case 27:n.preventDefault();this.$meeA11y.utils.isAutoFocusable(this.dialogControls.closeButton)&&this.hide()}},n.prototype.onCloseButtonKeydown=function(n){switch(n.which||n.keyCode||n.charCode){case 13:case 32:n.preventDefault();this.hide()}},n.prototype.onCloseButtonClick=function(){this.hide()},n.prototype.getInteractiveElements=function(){for(var n,i=[],r=this.modalDialogElement.querySelectorAll(this.dialogInputSelectors),t=0;t<r.length;t++)n=r[t],n.matches(this.nonInteractiveDataAttributeSelector)||this.$meeHtmlUtil.isHidden(n)||i.push(n);return i},n}();angular.module(i.moduleName).service("$meeMwfDialogWrapperFactory",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u){this.element=n;this.$scope=t;this.$meeModalDialogService=i;this.$meeStringUtil=r;this.$timeout=u}return n.prototype.$onInit=function(){this.originalOptions={kind:this.kind,ariaDialogLabel:this.meeAriaDialogLabel,ariaCloseButtonLabel:this.meeAriaCloseButtonLabel}},n.prototype.$postLink=function(){var n=this;this.dialogElement=this.element[0].querySelector(".c-dialog");this.$meeModalDialogService.setUpdateHostOptionsCallback(function(t){return n.updateHostOptionsCallback(t)});this.$timeout().then(function(){return n.refreshModalHostOptions()})},n.prototype.updateHostOptionsCallback=function(n){n&&("closed"===n?(this.kind=this.originalOptions.kind,this.meeAriaDialogLabel=this.originalOptions.ariaDialogLabel,this.meeAriaCloseButtonLabel=this.originalOptions.ariaCloseButtonLabel):(n.kind&&(this.kind=n.kind),n.ariaDialogLabel&&(this.meeAriaDialogLabel=n.ariaDialogLabel),n.ariaCloseButtonLabel&&(this.meeAriaCloseButtonLabel=n.ariaCloseButtonLabel)),this.refreshModalHostOptions())},n.prototype.refreshModalHostOptions=function(){var n,t,f,u;for(this.hasCloseButton=!1,n=0,t=["f-flow","f-lightbox"];n<t.length;n++)f=t[n],this.dialogElement.classList.remove(f);if(this.kind){for(var i=!1,r=0,e=this.$meeStringUtil.extractTokens(this.kind);r<e.length;r++){u=e[r];switch(u){case"flow":this.dialogElement.classList.add("f-flow");this.dialogElement.classList.remove("f-lightbox");i=!0;break;case"lightbox":this.dialogElement.classList.add("f-lightbox");this.dialogElement.classList.remove("f-flow");i=!0;break;case"scroll":this.dialogElement.classList.add("f-scroll");break;case"close-button":this.hasCloseButton=!0;break;default:throw new Error("Unsupported kind specified: "+u+".");}}i||(console.warn("ModalDialogHostComponent: when kind 'close-button' requested, 'flow' or 'lightbox' kind must be requested as well."),this.hasCloseButton=!1)}},n.$inject=["$element","$scope","$meeModalDialogService","$meeStringUtil","$timeout"],n}();angular.module(i.moduleName).component("meeModalDialogHost",{template:'\n<div data-grid="container">\n    <div class="c-dialog" id="{{$ctrl.modalId}}" aria-hidden="true" data-modal-dialog-host>\n        <div role="presentation" tabindex="-1"><\/div>\n        <div role="dialog" tabindex="-1" ng-attr-aria-label="{{$ctrl.meeAriaDialogLabel}}">\n            <div data-top-bound tabindex="0"><\/div>\n            <mee-progress-ants-mwf mee-progress-visible="modalOperation"><\/mee-progress-ants-mwf>\n            <button ng-show="$ctrl.hasCloseButton" data-modal-close-button role="button" class="c-glyph glyph-cancel" tabindex="0" ng-attr-aria-label="{{$ctrl.meeAriaCloseButtonLabel}}" mee-progress-hidden="modalOperation"><\/button>\n            <div ui-view="modalContent" role="document"><\/div>\n            <div data-bottom-bound tabindex="0"><\/div>\n        <\/div>\n    <\/div>\n<\/div>',bindings:{modalId:"@",kind:"@",meeAriaDialogLabel:"@",meeAriaCloseButtonLabel:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$q=n;this.$meeMwfDialogWrapperFactory=t;this.isDialogShown=!1}return n.prototype.show=function(n,t){var i=this;if(this.isDialogShown)throw new Error("ModalDialogServiceMwfImpl: Another modal dialog is already shown.");return this.whenModalDialogShown=this.$q.defer(),this.dialog||(this.dialog=this.$meeMwfDialogWrapperFactory.create(n)),this.dialog.initialize().then(function(){return i.setupAndShowDialog(t)}),this.whenModalDialogShown.promise},n.prototype.hide=function(){var n=this,t,i;if(!this.isDialogShown)throw new Error("ModalDialogServiceMwfImpl: There is no active modal dialog to hide.");return this.dialog.unsubscribe(this.onDismissCallbackSubscriber),t=this.$q.defer(),i={onHidden:function(){n.dialog.unsubscribe(i);n.notifyHostDialogClosed();n.isDialogShown=!1;t.resolve()},onShown:function(){},onButtonClicked:function(){}},this.dialog.subscribe(i),this.dialog.hide(),t.promise},n.prototype.stateSwitched=function(n){if(!this.isDialogShown)throw new Error("ModalDialogServiceMwfImpl: There is no active modal dialog to notify about state switch.");n&&n.modalHostOptions&&this.onUpdateHostOptionsCallback&&this.onUpdateHostOptionsCallback(n.modalHostOptions);this.dialog.update()},n.prototype.setUpdateHostOptionsCallback=function(n){this.onUpdateHostOptionsCallback=n},n.prototype.notifyHostDialogClosed=function(){this.onUpdateHostOptionsCallback&&this.onUpdateHostOptionsCallback("closed")},n.prototype.setupAndShowDialog=function(n){var t=this,i={onShown:function(){t.dialog.unsubscribe(i);n&&n.modalHostOptions&&t.onUpdateHostOptionsCallback&&t.onUpdateHostOptionsCallback(n.modalHostOptions);t.isDialogShown=!0;t.whenModalDialogShown.resolve()},onHidden:function(){},onButtonClicked:function(){}};this.onDismissCallbackSubscriber={onHidden:function(){t.dialog.unsubscribe(t.onDismissCallbackSubscriber);t.notifyHostDialogClosed();t.isDialogShown=!1;n.onDismissed()},onShown:function(){},onButtonClicked:function(){}};this.dialog.subscribe(i);this.dialog.subscribe(this.onDismissCallbackSubscriber);this.dialog.show()},n.$inject=["$q","$meeMwfDialogWrapperFactory"],n}();angular.module(i.moduleName).service("$meeModalDialogService",r)}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.link=function(t,i,r){if(i.addClass("m-multi-column"),!r.meeMultiColumn)throw new Error("mee-multi-column component - Error. Please pass number of columns attribute to this component.");var u=parseInt(r.meeMultiColumn);if(isNaN(u))throw new Error("mee-multi-column component - Error. Please pass integer value as attribute to this component.");i.addClass(n.GetNumberOfColumnsClassName(r.meeMultiColumn))},n.GetNumberOfColumnsClassName=function(n){return"f-columns-"+n},n}();angular.module(i.moduleName).directive("meeMultiColumn",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$meeStringUtil=n;this.mwfUtil=t;this.$meeUtil=i;this.restrict="E";this.scope={};this.onKeydown.bind(this)}return n.prototype.compile=function(n){var t=this;return n=this.createNavMenuMarkup(n),function(n,i,r){r.menuStyle&&t.$meeStringUtil.extractTokens(r.menuStyle).forEach(function(n){i.addClass(t.getClassFromStyleName(n))});i[0].querySelector(".c-menu").addEventListener("keydown",t.onKeydown.bind(t));var u=t.$meeUtil.nextUid();i.children().eq(0).attr("aria-controls",u);i.children().eq(1).attr("id",u);t.mwfUtil.create(mwf.NavigationMenu,i)}},n.prototype.getClassFromStyleName=function(n){switch(n){case"accent":return"f-accent";default:throw new Error("mee-nav-menu: '"+n+"' is not a valid style for argument menu-style.");}},n.prototype.createNavMenuMarkup=function(n){var i=n.html(),s=i.length,r,t,u,f,e,o;if((i=i.replace(/menu-trigger/g,"button").replace(/menu-items/g,"ul").replace(/menu-item/g,"li")).length===s)throw new Error("Invalid markup. Check out our demo pages.");if(n.html(i),n.addClass("c-navigation-menu"),r=n.children().eq(0),"BUTTON"!==r.prop("tagName"))throw new Error("mee-nav-menu: menu-trigger is not the first element.");if(r.attr("aria-expanded","false"),r.attr("aria-haspopup","true"),t=n.children().eq(1),"UL"!==t.prop("tagName"))throw new Error("mee-nav-menu: menu-items is not the second element.");for(t.addClass("c-menu"),t.attr("aria-hidden","true"),u=0;u<t.children().length;u++){if(f=t.children().eq(u),e=f.prop("tagName"),"LI"!==e)throw new Error("mee-nav-menu: '"+e+"' is not a valid tag under menu-items.");if(o=f.children().prop("tagName"),"A"!==o)throw new Error("mee-nav-menu: '"+o+"' is not a valid tag under menu-item.");}return n},n.prototype.onKeydown=function(n){switch(n.which||n.keyCode||n.charCode){case 13:case 32:n.preventDefault();n.target.click()}},n}();angular.module(i.moduleName).directive("meeNavMenu",["$meeStringUtil","$meeMwfUtil","$meeUtil",function(n,t,i){return new r(n,t,i)}])}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});u='<div class="c-pivot">\n                               <button class="c-flipper f-previous" aria-hidden="true" tabindex="-1" role="presentation"><\/button>\n                               <ul role="tablist">\n                                 '+(r="##links##")+'\n                               <\/ul>\n                               <button class="c-flipper f-next" aria-hidden="true" tabindex="-1" role="presentation"><\/button>\n                               <section aria-hidden="true"><\/section>\n                             <\/div>';f=function(){function n(n,t,i,r,u,f,e){this.element=n;this.$meeUtil=t;this.$mwfUtil=i;this.$timeout=r;this.$compile=u;this.$scope=f;this.$state=e;this.stateMapping={};this.useExactState=!1}return n.prototype.$postLink=function(){var n=this;if(this.kind){if("use-exact-state"!==this.kind)throw new Error("Error: nav-pivot does not support kind "+this.kind);this.useExactState=!0}this.handleStateChange(this.$state.current.name);this.$scope.$on("$stateChangeSuccess",function(t,i){n.handleStateChange(i.name)});this.$meeUtil.afterContentComplete(function(){for(var h,f,l,s,e="",o=n.element[0].getElementsByTagName("mee-nav-pivot-item"),i=0;i<o.length;i++){if(h=o[i].getAttribute("tab-title").trim(),f=o[i].getAttribute("ui-sref"),!f)throw new Error("nav-pivot: ui-sref value must be specified for each pivot item.");var t=f.split("(")[0],a="{{$ctrl.isStateCurrent('"+t+"')}}",c='ui-sref="'+f+"\" ng-class=\"{ 'f-active' : $ctrl.isStateCurrent('"+t+"') }\"";n.isStateCurrent(t)&&(c+=' class="f-active"');e=e+'\n                                 <li role="tab"\n                                    '+c+'\n                                    aria-selected="'+a+'"\n                                    data-bi-id="'+t+'"\n                                    ng-keydown="$ctrl.handleKeyDown($event)">\n                                   '+(n.stateMapping[t]=h)+"\n                                 <\/li>"}l=u.replace(r,e);s=n.$compile(l)(n.$scope);n.element.empty().append(s);n.$mwfUtil.create(mwf.Pivot,s).then(function(t){n.pivotControl=t})})},n.prototype.isStateCurrent=function(n){return this.useExactState?this.currentStateId===n:0===this.currentStateId.indexOf(n)},n.prototype.handleStateChange=function(n){var t=this;this.currentStateId=n;this.pivotControl&&this.$timeout(function(){if(!t.element[0].querySelector('li[role="tab"][tabindex="0"].f-active'))for(var i=t.element[0].querySelectorAll('li[role="tab"]'),n=0;n<i.length;n++)if(i[n].classList.contains("f-active")){t.pivotControl.setControllerIndex(n);break}})},n.prototype.handleKeyDown=function(n){var t=this;this.$timeout(function(){if("ArrowLeft"===n.key||"ArrowRight"===n.key){var i=t.element[0].querySelector('li[role="tab"].f-active');i&&i.click()}})},n.$inject=["$element","$meeUtil","$meeMwfUtil","$timeout","$compile","$scope","$state"],n}();angular.module(i.moduleName).component("meeNavPivot",{bindings:{kind:"@"},controller:f})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){};angular.module(i.moduleName).component("meePaneGroup",{transclude:!0,controller:r,template:'<div class="m-panes" ng-transclude />'})}(MeePortal||(MeePortal={})),function(n){var t,r,i,u,f;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={"align-middle":"f-align-middle",stacked:"f-stacked",normal:""};u=function(){function n(n){this.$meeStringUtil=n}return n.$inject=["$meeStringUtil"],n}();f=function(){function n(){this.restrict="A";this.controller=u}return n.prototype.link=function(n,t,r,u){var f=u.$meeStringUtil.extractTokens(r.meePane);if(1<f.length)throw new Error("Invalid Markup: The Pane directive option is invalid. See PaneDisplayType for valid values.");f.forEach(function(n){if(!(n in i))throw new Error("Invalid Markup: The Pane directive option is invalid. See PaneDisplayType for valid values.");t.addClass(i[n])})},n}();angular.module(r.moduleName).directive("meePane",function(){return new f})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$oneUiDefaults=n;this.restrict="A"}return n.prototype.link=function(t,i,r){var u=r.meeParagraph||this.$oneUiDefaults.paragraphStyle;if(!(u in n.classMap))throw new Error("'"+u+"' is not a valid option for 'mee-paragraph'");i.addClass(n.classMap[u])},n.classMap={para1:"c-paragraph-1",para2:"c-paragraph-2",para3:"c-paragraph-3",para4:"c-paragraph-4",para1Lean:"c-paragraph-1 f-lean",para2Lean:"c-paragraph-2 f-lean",para3Lean:"c-paragraph-3 f-lean",para4Lean:"c-paragraph-4 f-lean"},n}();angular.module(i.moduleName).directive("meeParagraph",["$oneUiDefaults",function(n){return new r(n)}])}(MeePortal||(MeePortal={})),function(n){var i,t,r;i=n.OneUI||(n.OneUI={});t=i.Angular||(i.Angular={});r=function(){function n(n,t){this.element=n;this.$meeHtmlUtil=t;this._picture=null;this._image=null}return n.prototype.$postLink=function(){this.validateSize();this.validateImage();this.addAccessibilityAttributes();this.addClasses()},n.prototype.validateSize=function(){if(!this.size||!this.isValidSizeString(this.size))throw new Error("Invalid markup: The Persona component must have a valid 'size' attribute. "+this.getPossibleSizeValuesString());this.sizeValue=n.classMap[this.size]},n.prototype.isValidSizeString=function(t){return t in n.classMap},n.prototype.getPossibleSizeValuesString=function(){return'Possible values are: [ "'+Object.keys(n.classMap).join('" , "')+'" ];'},n.prototype.validateImage=function(){if(1<this.image.length)throw new Error("Invalid markup: The Persona component cannot contain more than one image.");},n.prototype.addClasses=function(){this.image.addClass("c-image f-round");this.$meeHtmlUtil.prependClass(this.element,""+this.sizeValue)},n.prototype.addAccessibilityAttributes=function(){this.hasText()?(this.image.attr("alt")&&console.warn("The persona component 'img' element was given an alt text, when it should not have one! The given value will be ignored. Consider using the 'picture-aria-label' attribute instead."),this.image.removeAttr("alt")):this.hasCustomImage()?(this.image.attr("alt",this.pictureAriaLabel),this.image.attr("title",this.pictureAriaLabel)):(this.picture.attr("role","img"),this.picture.attr("aria-label",this.pictureAriaLabel),this.picture.attr("title",this.pictureAriaLabel))},n.prototype.hasText=function(){var t=this.element.find("persona-body").children(),i,n;if(0===t.length)return!1;for(i=!0,n=0;n<t.length;n++)if(t[n].innerText){i=!1;break}return!i},n.prototype.hasCustomImage=function(){return 0!==this.image.length},Object.defineProperty(n.prototype,"picture",{get:function(){return this._picture||(this._picture=this.element.find("picture")),this._picture},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"image",{get:function(){return this._image||(this._image=this.picture.find("img")),this._image},enumerable:!0,configurable:!0}),n.$inject=["$element","$meeHtmlUtil"],n.classMap={persona1:"m-persona-1",persona2:"m-persona-2",persona3:"m-persona-3",persona4:"m-persona-4",persona5:"m-persona-5"},n}();angular.module(t.moduleName).component("meePersona",{template:'\n                <div>\n                    <picture ng-transclude="image"><\/picture>\n                <\/div>\n                <div ng-transclude="body">\n                <\/div>\n            ',transclude:{image:"?personaImage",body:"?personaBody"},bindings:{size:"@",pictureAriaLabel:"@"},controller:r}).directive("personaName",function(){return new t.AddClassDirective("c-heading")}).directive("personaInfo",function(){return new t.AddClassDirective("c-subheading")})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.$element=n;this.$meeStringUtil=t;this.$meeUtil=i;this.$scope=r}return n.prototype.$onInit=function(){var n=this.meePersonaMenu.triggerPersonaId+"-"+this.itemId;this.$element.attr("id",n)},n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){var t=n.$element[0],r=n.meePersonaMenu.ngModel,u=n.meePersonaMenu.triggerPersonaId+"-"+r;if(n.$element[0].getAttribute("id")===u){n.$element.addClass("active-persona-menu-item");var f=n.$element.find("persona-image").children(),e=n.$element.find("persona-body").children(),i=document.getElementById(n.meePersonaMenu.triggerPersonaId),o=i.children[0].children[0].children[0],s=i.children[1].children[0];o.appendChild(f.clone(!0)[0]);s.appendChild(e.clone(!0)[0])}t.classList.add("f-context-text-only");t.classList.remove("ng-isolate-scope");t.classList.add("ng-isolate-scope");t.classList.remove("ng-scope");t.classList.add("ng-scope")})},n.$inject=["$element","$meeStringUtil","$meeUtil","$scope"],n}();u=function(){function n(){this.restrict="A";this.controllerAs="personaMenuItem";this.controller=r;this.bindToController={itemId:"@"};this.require={meePersonaMenu:"^meePersonaMenu"};this.template="<span ng-transclude><\/span>";this.transclude=!0;this.scope={}}return n.factory=function(){return function(){return new n}},n}();angular.module(i.moduleName).directive("meePersonaMenuItem",u.factory())}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r="##menuItems##";u=function(){function n(n,t,i,r){var u=this;this.$element=n;this.$meeUtil=t;this.$mwfUtil=i;this.$meeStringUtil=r;this.actionMenuCallback=function(n){n.subscribe(u)}}return Object.defineProperty(n.prototype,"ngModel",{get:function(){return this._ngModel},set:function(n){this.updatePersonaMenu(this._ngModel,n);this._ngModel=n},enumerable:!0,configurable:!0}),n.prototype.onSelection=function(n){var t=n.id.replace(this.triggerPersonaId+"-","");this.updatePersonaMenu(this._ngModel,t)},n.prototype.updatePersonaMenu=function(n,t){var f=this,i,r,s,u;if(this.triggerPersonaId&&(i=this.triggerPersonaId+"-"+n,r=this.triggerPersonaId+"-"+t,r&&i&&i!==r)){this.ngModelCtrl=this.$element.controller("ngModel");s=document.getElementById(i);u=document.getElementById(r);s.classList.remove("active-persona-menu-item");u.classList.add("active-persona-menu-item");var h=document.getElementById(this.triggerPersonaId),e=h.children[0].children[0].children[0],c=e.children[0],o=h.children[1].children[0],l=o.children[0],a=u.getElementsByTagName("persona-image")[0].children[0],v=u.getElementsByTagName("persona-body")[0].children[0];e.removeChild(c);e.appendChild(a.cloneNode(!0));o.removeChild(l);o.appendChild(v.cloneNode(!0));this.$meeUtil.afterContentComplete(function(){f.ngModel=t;f.ngModelCtrl.$setViewValue(f.ngModel)})}},n.prototype.$onInit=function(){var n=this.$meeUtil.nextUid();this.triggerPersonaId="trigger-persona-"+n},n.prototype.$postLink=function(){this.$mwfUtil.create(mwf.ActionMenu,this.$element).then(this.actionMenuCallback)},n.$inject=["$element","$meeUtil","$meeMwfUtil","$meeStringUtil"],n}();f=function(){function n(){this.restrict="E";this.controllerAs="personaMenu";this.controller=u;this.bindToController={ngDisabled:"<?",ngModel:"<",triggerPersonaSize:"@",triggerPictureAriaLabel:"@"}}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var t=n.find("li"),f="",i,e,u;if(!t||0===t.length)throw new Error("mee-persona-menu: At least one <mee-persona-menu-item> element must be provided.");for(i=0;i<t.length;i++)e=t[i],e.setAttribute("role","menuitemradio"),f=f+"\n                                "+e.outerHTML;return u='<div class="c-action-menu">\n                        <button class="c-action-trigger" aria-haspopup="true" aria-expanded="false" ng-disabled="personaMenu.ngDisabled">\n                          <mee-persona id="{{personaMenu.triggerPersonaId}}" class="x-float-left" size="{{personaMenu.triggerPersonaSize}}" picture-aria-label="{{personaMenu.triggerPictureAriaLabel}}">\n                            <persona-image>\n                            <\/persona-image>\n                            <persona-body>\n                            <\/persona-body>\n                          <\/mee-persona>\n                        <\/button>\n                        <ul class="c-context-menu" role="menu">\n                          ##menuItems##\n                        <\/ul>\n                      <\/div>',u=u.replace(r,f),n.html(u),function(){}},n}();angular.module(i.moduleName).directive("meePersonaMenu",f.factory())}(MeePortal||(MeePortal={})),function(n){var i,r,t,u,f,e,o;i=n.OneUI||(n.OneUI={});r=i.Angular||(i.Angular={});t=function(n){return Array.prototype.slice.call(n)};u=function(){function n(){this.restrict="E";this.controller=f;this.bindToController={ngDisabled:"<?"}}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var i=n[0],l=i.getElementsByTagName("mee-tab-title"),a=i.getElementsByTagName("mee-tab-content"),r=i.getElementsByTagName("mee-tab"),f=r[0].getAttribute("ng-repeat"),e,o,u,h,c;f&&(r[0].removeAttribute("ng-repeat"),e=r[0].getElementsByTagName("mee-tab-title"),o=r[0].getElementsByTagName("mee-tab-content"),t(e).forEach(function(n){return n.setAttribute("ng-repeat",f)}),t(o).forEach(function(n){return n.setAttribute("ng-repeat",f)}));t(r).forEach(function(n){var i=n.getAttribute("active"),t;i&&(n.removeAttribute("active"),t=n.getElementsByTagName("mee-tab-title"),t&&t[0].setAttribute("active",i))});var v=this.createFlipperButtonWithClass("f-previous"),y=this.createFlipperButtonWithClass("f-next"),s=this.createUlWrapperDiv();return t(l).forEach(function(n){return s.appendChild(n)}),u=this.createPivotWrapperDiv(),u.appendChild(v),u.appendChild(s),u.appendChild(y),t(a).forEach(function(n){return u.appendChild(n)}),i.appendChild(u),t(r).forEach(function(n){return i.removeChild(n)}),h=i.querySelectorAll("mee-tab-title"),t(h).forEach(function(n){n.setAttribute("mee-tab-title","");n.setAttribute("role","tab")}),c=i.querySelectorAll("mee-tab-content"),t(c).forEach(function(n){n.setAttribute("mee-tab-content","");n.setAttribute("role","tabpanel");n.setAttribute("aria-hidden","true")}),n.html(i.innerHTML.replace(/<mee-tab-title/g,"<li").replace(/<\/mee-tab-title/g,"<\/li").replace(/<mee-tab-content/g,"<section").replace(/<\/mee-tab-content/g,"<\/section")),function(){}},n.prototype.createFlipperButtonWithClass=function(n){var t=document.createElement("button");return t.setAttribute("class",n+" c-flipper"),t.setAttribute("tabIndex","-1"),t},n.prototype.createUlWrapperDiv=function(){var n=document.createElement("ul");return n.setAttribute("role","tablist"),n},n.prototype.createPivotWrapperDiv=function(){var n=document.createElement("div");return n.setAttribute("pivot-div",""),n},n}();f=function(){function n(n,t){this.$element=n;this.$meeUtil=t}return n.prototype.$onChanges=function(n){n.ngDisabled&&this.updateDisabledState()},n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){var f=n.$element[0],r=f.querySelectorAll("li[role='tab']"),i=f.querySelectorAll("section[role='tabpanel']"),u=!1;if(!r||0===i.length)throw new Error("At least one tab title needs to be provided.");if(!i||0===i.length)throw new Error("At least one tab content needs to be provided.");if(r.length!==i.length)throw new Error("Number of tab titles and tab contents mismatch");t(r).forEach(function(n){if("true"===n.getAttribute("active")){if(u)throw new Error("Cannot set more than one tabs active");u=!0}});u=!0;n.updateDisabledState()})},n.prototype.updateDisabledState=function(){var n=this.$element[0].getElementsByClassName("c-pivot")[0];n&&(this.ngDisabled?(n.setAttribute("data-f-state","disabled"),n.classList.add("f-disabled")):(n.removeAttribute("data-f-state"),n.classList.remove("f-disabled")))},n.$inject=["$element","$meeUtil"],n}();e=function(){function n(n,t,i){this.$meeUtil=n;this.$element=t;this.$mwfUtil=i}return n.prototype.$postLink=function(){var n=this;this.$element[0].classList.add("c-pivot");this.$meeUtil.afterContentComplete(function(){n.linkContentAndSetActive();n.$mwfUtil.create(mwf.Pivot,n.$element)})},n.prototype.linkContentAndSetActive=function(){var u=this,i=this.$element[0],f=i.querySelectorAll("li[role='tab']"),e=i.querySelectorAll("section[role='tabpanel']"),r=0,n=[];t(f).forEach(function(t){if(!t.getAttribute("aria-controls")){var i=u.$meeUtil.nextUid();t.setAttribute("aria-controls",i);n.push(t);e[r].setAttribute("id",i)}r++});1===n.length&&n[0]&&n[0].click()},n.$inject=["$meeUtil","$element","$meeMwfUtil"],n}();o=function(){function n(n,t){this.$meeUtil=n;this.$element=t}return n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){n.pivotDivCtrl.linkContentAndSetActive()});this.active&&this.$element[0].classList.add("f-active")},n.$inject=["$meeUtil","$element"],n}();angular.module(r.moduleName).directive("meePivot",u.factory()).directive("pivotDiv",function(){return{restrict:"A",controller:e}}).directive("meeTabTitle",function(){return{restrict:"A",controller:o,bindToController:{active:"<"},require:{pivotDivCtrl:"^pivotDiv"},template:"<div ng-transclude><\/div>",transclude:!0,scope:{}}}).directive("meeTabContent",function(){return{restrict:"A",template:"<div ng-transclude><\/div>",transclude:!0,scope:{}}})}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t,i,r;(i=t||(t={}))[i.regional=0]="regional";i[i.local=1]="local";i[i.small=2]="small";i[i.large=3]="large";i[i.top=4]="top";r=function(){function n(n,t){this.element=n;this.$meeStringUtil=t}return n.prototype.$onInit=function(){var n=this;this.element.addClass("c-progress");this.element.attr("role","progressbar");this.kind?(this.$meeStringUtil.extractTokens(this.kind).forEach(function(t){n.element.addClass(n.GetClassFromKind(t))}),t[this.kind]===t.local&&this.element.addClass(this.GetClassFromKind(t[t.small]))):this.element.addClass(this.GetClassFromKind(t[t.regional]))},n.prototype.GetClassFromKind=function(n){switch(t[n]){case t.regional:return"f-indeterminate-regional";case t.local:return"f-indeterminate-local";case t.large:return"f-progress-large";case t.small:return"f-progress-small";case t.top:return"mee-progress-top";default:throw new Error("mee-progress-ants-mwf component - Error '"+n+"' is not a supported style. Check out our demo pages.");}},n.$inject=["$element","$meeStringUtil"],n}();angular.module(n.moduleName).component("meeProgressAntsMwf",{template:"<span><\/span>\n             <span><\/span>\n             <span><\/span>\n             <span><\/span>\n             <span><\/span>",bindings:{kind:"@"},controller:r})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){}return n.prototype.$onInit=function(){},n.$inject=[],n}();angular.module(i.moduleName).component("meeProgressDeterminate",{template:'<progress \n                            class="c-progress" \n                            role="progressbar"\n                            aria-valuemax="100"  \n                            max="100" \n                            ng-attr-value="{{ $ctrl.progressValue }}"\n                            aria-valuenow="{{ $ctrl.progressValue }}"\n                            aria-valuemin="0" \n                            tabindex="-1"\n                            aria-label="{{ $ctrl.meeAriaLabel }}">\n                       <\/progress>',bindings:{meeAriaLabel:"@",progressValue:"<"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$scope=n;this.$element=t;this.$meeUtil=i}return n.prototype.$onInit=function(){var n=this;if(this.groupStyle){if("inline"!==this.groupStyle)throw new Error('OneUI.Angular - mee-radio-group: "'+this.groupStyle+'" is not a valid value for argument group-style.');this.inlineClassName="f-inline"}this.radioName||(this.radioName="radio-group-"+this.$meeUtil.nextUid());this.$scope.$watch(function(){return n.$element.find("mee-radio").length},function(t){var r,i,u;if(0<t)for(r=n.$element.find("mee-radio"),i=0;i<r.length;i++)u=r[i].querySelector("input"),u.setAttribute("aria-posinset",(i+1).toString()),u.setAttribute("aria-setsize",t.toString())})},n.prototype.onRadioComponentChange=function(){this.ngModelCtrl.$setViewValue(this.ngModel)},n.$inject=["$scope","$element","$meeUtil"],n}();angular.module(i.moduleName).component("meeRadioGroup",{transclude:!0,require:{ngModelCtrl:"^ngModel"},template:"<fieldset ng-class=\"['c-radio', $ctrl.inlineClassName]\" ng-disabled=\"$ctrl.ngDisabled\">\n                            <legend ng-class=\"['c-label', $ctrl.isLegendVisible ? '': 'x-screen-reader']\">{{$ctrl.legend}}<\/legend>\n                            <div>\n                               <div ng-transclude><\/div>\n                           <\/div>\n                        <\/fieldset>",bindings:{legend:"@",isLegendVisible:"<",groupStyle:"@",ngDisabled:"<",ngModel:"=",ngChange:"&",radioName:"@"},controller:r}).component("meeRadio",{transclude:!0,template:'<label class="c-label">\n                            <input\n                                ng-attr-id="{{ $ctrl.radioId }}"\n                                ng-model="$ctrl.meeRadioGroup.ngModel"\n                                type="radio"\n                                value="{{$ctrl.value}}"\n                                name="{{$ctrl.meeRadioGroup.radioName}}"\n                                ng-attr-aria-label="{{$ctrl.meeAriaLabel}}"\n                                ng-disabled="$ctrl.ngDisabled"\n                                ng-change="$ctrl.meeRadioGroup.onRadioComponentChange()">\n                            <span ng-transclude><\/span>\n                        <\/label>',bindings:{radioId:"@",meeAriaLabel:"@",ngDisabled:"<",value:"@"},require:{meeRadioGroup:"^meeRadioGroup"}})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.element=n;this.attrs=t;this.$meeUtil=i;this.$mwfUtil=r}return n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){var t,r,i;if(n.selectionType=n.attrs.kind||"single",n.selectionType&&"multiple"!==n.selectionType&&"single"!==n.selectionType)throw new Error("mee-refine-menu: Invalid option for 'kind' attribute.");n.expanded=n.attrs.state&&-1!==n.attrs.state.indexOf("expanded");t=n.element.find("button")[0];t.setAttribute("aria-expanded",n.expanded?"true":"false");t.innerText=n.attrs.triggerText;r=n.$meeUtil.nextUid();t.setAttribute("aria-controls",r);i=n.element.find("ul")[0];i.setAttribute("id",r);i.setAttribute("data-js-select-type","multiple"===n.selectionType?"multi-select":"single-select");i.setAttribute("aria-label",n.attrs.meeAriaLabel);n.$mwfUtil.create(mwf.Drawer,n.element)})},n.prototype.itemClicked=function(n,t){"single"!==this.selectionType||"true"!==n.target.getAttribute("aria-selected")?this.onSelected({$event:{id:t,target:n.currentTarget}}):n.stopImmediatePropagation()},n.$inject=["$element","$attrs","$meeUtil","$meeMwfUtil"],n}();u=function(){function n(n,t){this.element=n;this.$meeUtil=t}return n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){null!==n.element[0].getAttribute("selected")&&n.element.find("a")[0].setAttribute("aria-selected","true");n.ariaLabel=n.element[0].getAttribute("mee-aria-label");n.id||(n.id=n.$meeUtil.nextUid());n.element.attr("role","presentation")})},n.prototype.itemClicked=function(n){this.refineMenuCtrl.itemClicked(n,this.id)},n.$inject=["$element","$meeUtil"],n}();angular.module(i.moduleName).component("meeRefineMenu",{controller:r,bindings:{onSelected:"&"},transclude:!0,template:'<div class="c-drawer" ng-class="{\'hide-x\': $ctrl.selectionType === \'single\'}">\n                         <button class="c-glyph"><\/button>\n                         <ul role="tablist" ng-transclude><\/ul>\n                       <\/div>'});angular.module(i.moduleName).directive("refineMenuItem",function(){return{controller:u,restrict:"A",transclude:!0,scope:!0,controllerAs:"refineMenuItemCtrl",bindToController:{id:"@?",icon:"@?"},template:'<a class="c-refine-item"\n                          aria-label="{{refineMenuItemCtrl.ariaLabel}}"\n                          ng-click="refineMenuItemCtrl.itemClicked($event)"\n                          role="tab"\n                          mee-no-href>\n                         <span aria-hidden="true" ng-if="refineMenuItemCtrl.icon" class="mee-refine-icon {{refineMenuItemCtrl.icon}}"><\/span>\n                         <span aria-hidden="true" ng-transclude><\/span>\n                       <\/a>',require:{refineMenuCtrl:"^meeRefineMenu"}}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r){this.element=n;this.attrs=t;this.$mwfUtil=i;this.$meeUtil=r;this.initialLoadComplete=!1}return n.prototype.$postLink=function(){var n=this,t=this.$meeUtil.nextUid(),i;this.element.find("div")[0].setAttribute("id",t);i=this.element[0].getElementsByClassName("refine-menu-collection-button");i[0].setAttribute("aria-controls",t);i[1].setAttribute("aria-controls",t);this.$meeUtil.afterContentComplete(function(){for(var u,i,f,r=n.element.find("mee-refine-menu"),t=0;t<r.length;t++)u=document.createElement("hr"),u.className="c-divider",r[t].parentElement.insertBefore(u,r[t]);if(i=n.element[0].getElementsByClassName("refine-menu-header-container")[0],f=n.element.find("refine-menu-header")[0],1<f.children.length)throw new Error("mee-refine-menu-collection: refine-menu-header must contain a single top-level element.");i.insertBefore(f.childNodes[1],i.children[1]);i.removeChild(i.children[0]);n.$mwfUtil.create(mwf.RefineMenu,n.element).then(function(){n.initialLoadComplete=!0})})},n.$inject=["$element","$attrs","$meeMwfUtil","$meeUtil"],n}();angular.module(i.moduleName).component("meeRefineMenuCollection",{transclude:{header:"refineMenuHeader",content:"refineMenuContent"},template:'<nav class="c-refine-menu">\n                               <div data-mobile-target>\n                                 <div class="refine-menu-header-container">\n                                   <ng-transclude class="refine-menu-header" ng-transclude-slot="header"><\/ng-transclude>\n                                   <button class="c-action-trigger c-glyph glyph-cancel refine-menu-collection-button" \n                                           aria-label="{{$ctrl.meeCollapseAriaLabel}}" \n                                           aria-expanded="true">\n                                   <\/button>\n                                 <\/div>\n                                 <ng-transclude ng-transclude-slot="content"><\/ng-transclude>\n                               <\/div>\n                               <button class="c-action-trigger refine-menu-collection-button" \n                                       aria-label="{{$ctrl.meeExpandAriaLabel}}" \n                                       aria-expanded="true"\n                                       ng-show="$ctrl.initialLoadComplete">\n                                 {{$ctrl.expandText}}\n                               <\/button>\n                             <\/nav>',controller:r,bindings:{meeCollapseAriaLabel:"@",collapseText:"@",meeExpandAriaLabel:"@",expandText:"@"}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$sce=n}return n.$inject=["$sce"],n}();angular.module(i.moduleName).component("meeRichParagraph",{template:"<p \n                mee-paragraph=\"{{$ctrl.meeParagraphStyle}}\"\n                ng-bind-html='$ctrl.$sce.trustAsHtml($ctrl.text)'><\/p>",bindings:{text:"<",meeParagraphStyle:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.$sce=n}return n.$inject=["$sce"],n}();angular.module(i.moduleName).component("meeRichSpan",{template:"<span ng-class=\"$ctrl.meeClass\" ng-bind-html='$ctrl.$sce.trustAsHtml($ctrl.text)'><\/span>",bindings:{text:"<",meeClass:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i,r,u){this.element=n;this.$meeUtil=t;this.$meeStringUtil=i;this.mwfUtil=r;this.$timeout=u}return n.prototype.$onInit=function(){var i=this,t,n,r;if(this.selectElement=this.element.find("select"),!this.selectElement.length)throw new Error("mee-select: select tag is missing");this.element.addClass("c-select");t=this.id?this.id+"-select":"select-"+this.$meeUtil.nextUid();this.selectElement.attr("id",t);this.selectElement.prop("disabled",this.ngDisabled);n=this.element.find("label");n.length&&(r=t+".label",n.attr("id",r),n.attr("for",t),n.addClass("c-label"));this.menuStyle&&this.$meeStringUtil.extractTokens(this.menuStyle).forEach(function(n){i.element.addClass(i.getClassFromStyleName(n))})},n.prototype.$postLink=function(){var n=this;this.$meeUtil.afterContentComplete(function(){var r=!1,i,t;if(n.ngModelCtrl)for(i=n.element.find("option"),t=0;t<i.length;t++)i[t].value===n.ngModelCtrl.$modelValue&&(r=!0,i.eq(t).attr("selected","selected"));!r&&n.unselectedText&&n.selectElement.attr("aria-label",n.unselectedText);n.mwfUtil.create(mwf.Select,n.element).then(function(t){n.selectControl=t;n.ngModelCtrl&&(n.selectControl.subscribe({onSelectionChanged:function(t){n.$timeout(function(){n.ngModelCtrl.$setViewValue(t.id)})}}),n.ngModelCtrl.$render=function(){n.selectControl.setSelectedItem(n.ngModelCtrl.$modelValue)})})})},n.prototype.$onChanges=function(n){var i=n.ngDisabled,t;i&&(t=!!i.currentValue,this.selectElement&&this.selectElement.prop("disabled",t),this.selectControl&&(this.selectControl.selectMenuDiv.setAttribute("aria-disabled",t),this.selectControl.selectMenuTrigger.disabled=t))},n.prototype.getClassFromStyleName=function(n){switch(n){case"accent":this.menuStyleClassName="f-accent";break;case"border":this.menuStyleClassName="f-border";break;case"flex":this.menuStyleClassName="f-flex";break;case"scroll":this.menuStyleClassName="f-scroll";break;default:throw new Error("mee-select: '"+this.menuStyle+"' is not a valid value for argument menu-style.");}return this.menuStyleClassName},n.$inject=["$element","$meeUtil","$meeStringUtil","$meeMwfUtil","$timeout"],n}();angular.module(i.moduleName).component("meeSelect",{require:{ngModelCtrl:"?ngModel"},bindings:{menuStyle:"@",unselectedText:"@",ngDisabled:"<?",id:"@"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$meeMwfUtil=n;this.$meeUtil=t}return n.$inject=["$meeMwfUtil","$meeUtil"],n}();u=function(){function n(n,t){this.element=n;this.$meeUtil=t;this.restrict="A";this.labelledbyId=this.$meeUtil.nextUid()}return n.prototype.$postLink=function(){var n=this;this.element.append('<span id="'+this.labelledbyId+'" class="x-screen-reader" role="status" aria-live="assertive"><\/span>');this.$meeUtil.afterContentComplete(function(){var t=n.$meeUtil.nextUid();n.element.find("button").attr("name",t)})},n.$inject=["$element","$meeUtil"],n}();f=function(){function n(){this.restrict="A";this.controller=r}return n.factory=function(){return function(){return new n}},n.prototype.link=function(n,t,i,r){t.addClass("c-select-button");t.attr("role","checkbox");t.attr("aria-checked","false");r.$meeMwfUtil.create(mwf.SelectButton,t)},n}();angular.module(i.moduleName).directive("meeSelectButtonGroup",function(){return{controller:u,restrict:"A",transclude:!0,controllerAs:"selectButtonGroupCtrl",template:'<div class="c-group f-wrap-items" role="group" aria-labelledby="{{selectButtonGroupCtrl.labelledbyId}}" ng-transclude>\n                       <\/div>'}});angular.module(i.moduleName).directive("selectButtonItem",f.factory())}(MeePortal||(MeePortal={})),function(n){var t,r,i,u,f;t=n.OneUI||(n.OneUI={});r=t.Angular||(t.Angular={});i={hidden:"f-hidden",normal:""};u=function(){function n(n,t){this.$meeStringUtil=n;this.$meeMwfUtil=t}return n.$inject=["$meeStringUtil","$meeMwfUtil"],n}();f=function(){function n(){this.restrict="A";this.controller=u}return n.prototype.link=function(n,t,r,u){t.addClass("m-sticky");var f=u.$meeStringUtil.extractTokens(r.meeSticky);if(1<f.length)throw new Error("Invalid Markup: The Sticky directive option is invalid. See StickyDisplayType for valid values.");f.forEach(function(n){if(!(n in i))throw new Error("Invalid Markup: The Sticky directive option is invalid. See StickyDisplayType for valid values.");t.addClass(i[n])});u.$meeMwfUtil.create(mwf.Sticky,t)},n}();angular.module(r.moduleName).directive("meeSticky",function(){return new f})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="E"}return n.prototype.link=function(n,t){t.addClass("c-table")},n}();angular.module(i.moduleName).directive("meeTable",function(){return new r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="A"}return n.prototype.link=function(n,t){t.addClass("c-tag")},n}();u=function(){function n(){this.restrict="A";this.scope={meeTagShowMore:"<?"}}return n.prototype.link=function(n,t){var i=this;t.addClass("c-tag f-show-all");n.$onChanges=function(){i.updateText(n,t)};this.updateText(n,t)},n.prototype.updateText=function(n,t){if(void 0!==n.meeTagShowMore){var i=+n.meeTagShowMore;if(isNaN(i))throw new Error("mee-tag-show-more expects a number");if(99<i||i<1)throw new Error("mee-tag-show-more expects a number between 1 and 99");t.text("+"+i)}},n}();angular.module(i.moduleName).directive("meeTag",function(){return new r}).directive("meeTagShowMore",function(){return new u})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u,f,e,o,s,h,c,l;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(){this.restrict="E";this.controller=u;this.controllerAs="$ctrlMeeTextActionDirective";this.bindToController={glyph:"@meeTextActionKind",displayType:"@meeDisplayType",autoSuggest:"<meeAutoSuggest",autoSuggestPosition:"@meeAutoSuggestPosition",autoSuggestScrollable:"<meeAutoSuggestScrollable",autoSuggestActOnSelect:"<meeAutoSuggestActOnSelect",autoSuggestGetSuggestionsAsync:"&meeGetSuggestions",autoSuggestPerformAction:"&meePerformAction",autoSuggestNoSuggestionLabel:"@meeNoSuggestionLabel",autoSuggestDebounceTimeout:"<meeDebounceTimeout"}}return n.factory=function(){return function(){return new n}},n.prototype.compile=function(n){var t=n[0],e=t.getAttribute("mee-text-action-kind"),o=!!t.getAttribute("mee-auto-suggest"),r=t.getElementsByTagName("label"),u=t.getElementsByTagName("input"),f=t.getElementsByTagName("button"),i;return this.validate(e,o,u,f,t),u[0].setAttribute("mee-text-action-input",""),f[0].setAttribute("mee-text-action-button",""),i=this.createTextActionWrapperDiv(),i.appendChild(u[0]),i.appendChild(f[0]),i.appendChild(this.createSuggestionBoxDiv()),r&&r.length&&(r[0].setAttribute("mee-text-action-label",""),t.appendChild(r[0])),t.appendChild(i),n.html(t.innerHTML),function(){}},n.prototype.validate=function(n,t,i,r,u){if(!n)throw new Error("A kind attribute must be provided.");if(!i||1!==i.length)throw new Error("A single input element must be provided.");if(!r||1!==r.length)throw new Error("A single button element must be provided.");if(!i[0].getAttribute("aria-label")&&!i[0].getAttribute("placeholder"))throw new Error("aria-label or placeholder should be provided for input element.");if(!r[0].getAttribute("aria-label"))throw new Error("aria-label should be provided for button element.");if(t){if(!u.getAttribute("mee-get-suggestions"))throw new Error("mee-get-suggestions attribute must be specified if auto-suggest is enabled.");if(!u.getAttribute("mee-no-suggestion-label"))throw new Error("mee-no-suggestion-label attribute must be specified if auto-suggest is enabled.");if(u.getAttribute("mee-auto-suggest-act-on-select")&&!u.getAttribute("mee-perform-action"))throw new Error("No 'mee-perform-action' attr specified.");}},n.prototype.createTextActionWrapperDiv=function(){var n=document.createElement("div");return n.setAttribute("mee-text-action-div",""),n},n.prototype.createSuggestionBoxDiv=function(){var n=document.createElement("div"),t,i;return n.setAttribute("mee-text-action-suggestion-box",""),t=document.createElement("ul"),t.setAttribute("mee-text-action-suggestion-results",""),i=document.createElement("ul"),i.setAttribute("mee-text-action-suggestion-no-results",""),n.appendChild(t),n.appendChild(i),n},n}();u=function(){function n(n,t,i){this.$scope=n;this.$meeUtil=t;this.$element=i}return n.prototype.$onInit=function(){this.$scope.glyph=this.glyph.trim();this.$scope.inputControlId=this.$meeUtil.nextUid();this.$scope.autoSuggest={isEnabled:this.autoSuggest,listControlId:this.$meeUtil.nextUid(),position:this.autoSuggestPosition||"default",scrollable:this.autoSuggestScrollable,actOnSelect:this.autoSuggestActOnSelect,noSuggestionLabel:this.autoSuggestNoSuggestionLabel,debounceTimeout:this.autoSuggestDebounceTimeout||0,getSuggestionsAsyncCallback:this.autoSuggestGetSuggestionsAsync,performActionMethod:this.autoSuggestPerformAction}},n.prototype.$postLink=function(){if(this.displayType)switch(this.displayType){case"small":this.$element[0].classList.add("f-small");break;case"flex":this.$element[0].classList.add("f-flex");break;default:throw new Error("Unknown display type specified: "+this.displayType);}},n.prototype.registerInputCtrl=function(n){this.inputCtrl=n},n.prototype.registerButtonCtrl=function(n){this.buttonCtrl=n},n.prototype.registerSuggestionResultsCtrl=function(n){this.suggestionResultsCtrl=n},n.prototype.registerNoSuggestionResultsCtrl=function(n){this.noSuggestionResultsCtrl=n},n.prototype.setViewState=function(n){this.inputCtrl.setViewState(n);this.suggestionResultsCtrl.hideResults();this.autoSuggestActOnSelect?(this.buttonCtrl.performAction(n),this.inputCtrl.setViewState(""),this.inputCtrl.focus()):this.buttonCtrl.focus()},n.prototype.hideSuggestionsWithNoResults=function(){this.noSuggestionResultsCtrl.hideResults()},n.$inject=["$scope","$meeUtil","$element"],n}();f=function(){function n(n){this.$element=n}return n.prototype.$postLink=function(){this.$element[0].classList.add("c-text-action");this.$element[0].setAttribute("autocomplete","off");this.$element[0].setAttribute("role","combobox");this.$element[0].setAttribute("aria-expanded","false");this.$element[0].classList.add("c-search")},n.$inject=["$element"],n}();e=function(){function n(n,t){this.$scope=n;this.$element=t}return n.prototype.$onInit=function(){this.textActionCtrl.registerInputCtrl(this)},n.prototype.setViewState=function(n){this.ngModelCtrl.$setViewValue(n);this.$element.val(n)},n.prototype.focus=function(){this.$element[0].focus()},n.prototype.$postLink=function(){var n=this.$element[0],u=n.getAttribute("mee-text-action-kind"),i=n.getAttribute("aria-label"),r=n.getAttribute("placeholder"),t=this.$scope.autoSuggest;n.setAttribute("id",this.$scope.inputControlId);n.classList.add("x-hidden-focus");t&&t.isEnabled?(n.setAttribute("type","search"),n.setAttribute("name","search-field"),n.setAttribute("role","searchbox"),n.setAttribute("aria-controls",t.listControlId),n.setAttribute("aria-autocomplete","list"),n.setAttribute("aria-expanded","false")):u||n.setAttribute("type","text");i||n.setAttribute("aria-label",r);r||n.setAttribute("placeholder",i)},n.$inject=["$scope","$element"],n}();o=function(){function n(n,t){this.$scope=n;this.$element=t}return n.prototype.$postLink=function(){this.$element.addClass("c-label");this.$element[0].setAttribute("for",this.$scope.inputControlId)},n.$inject=["$scope","$element"],n}();s=function(){function n(n,t){this.$scope=n;this.$element=t}return n.prototype.$onInit=function(){this.textActionCtrl.registerButtonCtrl(this)},n.prototype.$postLink=function(){var n=this.$element[0];switch(n.querySelector("span").textContent=n.getAttribute("aria-label"),n.classList.add("c-glyph"),this.$scope.glyph){case"add":case"search":case"forward":case"check-mark":case"download":n.setAttribute("name","search-button");n.setAttribute("name",this.$scope.glyph+"-button");n.classList.add("glyph-"+this.$scope.glyph);break;default:throw new Error("Unknown text-action kind attribute: "+this.$scope.glyph+".");}},n.prototype.focus=function(){this.$element[0].focus()},n.prototype.performAction=function(){this.$scope.autoSuggest.performActionMethod()},n.$inject=["$scope","$element"],n}();h=function(){function n(n,t,i,r){var u=this;this.$scope=n;this.$element=t;this.$mwfUtil=i;this.$meeUtil=r;this.autoSuggestComponentCreated=function(n){if(!n)throw new Error("Could not find any created mwf.AutoSuggest element.");var t=u.$meeUtil.debounce(function(t){u.$scope.autoSuggest.getSuggestionsAsyncCallback({text:t}).then(function(t){n.updateSuggestions(t);u.clickJackFormSubmission()}).catch(function(){console.error("Something went wrong while getting suggestions")})},u.$scope.autoSuggest.debounceTimeout);n.subscribe({onMatchPatternChanged:function(n){t(n.pattern)}})}}return n.prototype.$postLink=function(){var n=this.$element[0];n.classList.add("m-auto-suggest");n.setAttribute("id",this.$scope.autoSuggest.listControlId);n.setAttribute("role","group");this.$mwfUtil.create(mwf.AutoSuggest,this.$element).then(this.autoSuggestComponentCreated)},n.prototype.clickJackFormSubmission=function(){var n=this;this.$element.children().find("span").on("click",function(t){n.preventDefaultAndUpdateState(t)});this.$element.children().find("span").on("keydown",function(t){13===t.keyCode&&n.preventDefaultAndUpdateState(t)})},n.prototype.preventDefaultAndUpdateState=function(n){n.preventDefault();n.stopPropagation();n.currentTarget.textContent===this.$scope.autoSuggest.noSuggestionLabel?this.textActionCtrl.hideSuggestionsWithNoResults():this.textActionCtrl.setViewState(n.currentTarget.textContent)},n.$inject=["$scope","$element","$meeMwfUtil","$meeUtil"],n}();c=function(){function n(n,t){this.$scope=n;this.$element=t}return n.prototype.$onInit=function(){this.textActionCtrl.registerSuggestionResultsCtrl(this)},n.prototype.$postLink=function(){var n=this.$element[0],t=this.$scope.autoSuggest.scrollable;n.classList.add("c-menu");t&&n.classList.add("f-auto-suggest-scroll");n.setAttribute("aria-hidden","true");n.setAttribute("data-js-auto-suggest-position",this.$scope.autoSuggest.position);n.setAttribute("tabindex","0");n.setAttribute("role","listbox")},n.prototype.hideResults=function(){this.$element[0].setAttribute("aria-hidden","true")},n.$inject=["$scope","$element"],n}();l=function(){function n(n,t){this.$scope=n;this.$element=t}return n.prototype.$onInit=function(){this.textActionCtrl.registerNoSuggestionResultsCtrl(this)},n.prototype.$postLink=function(){var n=this.$element[0];this.$element.find("span")[0].textContent=this.$scope.autoSuggest.noSuggestionLabel;n.classList.add("c-menu");n.classList.add("f-auto-suggest-no-results");n.setAttribute("aria-hidden","true");n.setAttribute("data-js-auto-suggest-position",this.$scope.autoSuggest.position);n.setAttribute("tabindex","0")},n.prototype.hideResults=function(){this.$element[0].setAttribute("aria-hidden","true")},n.$inject=["$scope","$element"],n}();angular.module(i.moduleName).directive("meeTextAction",r.factory()).directive("meeTextActionDiv",function(){return{restrict:"A",controllerAs:"$ctrlMeeTextActionDiv",controller:f,scope:{}}}).directive("meeTextActionInput",function(){return{restrict:"A",controller:e,controllerAs:"$ctrlMeeTextActionInput",bindToController:{},require:{textActionCtrl:"^meeTextAction",ngModelCtrl:"?ngModel"},scope:!0}}).directive("meeTextActionLabel",function(){return{restrict:"A",controller:o,controllerAs:"$ctrlMeeTextActionLabel",scope:!0}}).directive("meeTextActionButton",function(){return{restrict:"A",controller:s,controllerAs:"$ctrlMeeTextActionButton",bindToController:{},require:{textActionCtrl:"^meeTextAction"},template:'<span class="x-screen-reader" ng-transclude><\/span>',transclude:!0,scope:!0}}).directive("meeTextActionSuggestionBox",function(){return{restrict:"A",controller:h,controllerAs:"$ctrlMeeTextActionSuggestionBox",bindToController:{},require:{textActionCtrl:"^meeTextAction"},scope:!0}}).directive("meeTextActionSuggestionResults",function(){return{restrict:"A",controller:c,controllerAs:"$ctrlMeeTextActionSuggestionResults",bindToController:{},require:{textActionCtrl:"^meeTextAction",ngModelCtrl:"?ngModel"},scope:!0}}).directive("meeTextActionSuggestionNoResults",function(){return{restrict:"A",controller:l,controllerAs:"$ctrlMeeTextActionSuggestionNoResults",bindToController:{},require:{textActionCtrl:"^meeTextAction",ngModelCtrl:"?ngModel"},template:'<li class="c-menu-item" ng-transclude><span tabindex="-1"><\/span><\/li>',transclude:!0,scope:!0}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$element=n;this.$meeStringUtil=t;this.$meeUtil=i}return n.prototype.$postLink=function(){var t,i,u,r,f,e,o,s;if(this.$element.addClass("c-textarea"),t=this.$element.find("label"),1!==t.length)throw new Error("A single LABEL element must be provided. Refer to demo for supported ways of hiding the label.");if(i=this.$element.find("textarea"),1!==i.length)throw new Error("A single TEXTAREA element must be provided.");if(u=this.$element.attr("kind"),u)for(r=0,f=this.$meeStringUtil.extractTokens(u);r<f.length;r++){if(e=f[r],o=n.KnownKinds[e],!o)throw new Error("Unknown text area attribute specified: "+e+".");i.addClass(o)}s=this.textAreaId||"text-"+this.$meeUtil.nextUid();t.attr("for",s);i.attr("id",s);t.addClass("c-label")},n.$inject=["$element","$meeStringUtil","$meeUtil"],n.KnownKinds={"not-resizable":"f-no-resize",scrollable:"f-scroll",flex:"f-flex"},n}();angular.module(i.moduleName).component("meeTextArea",{controller:r,bindings:{textAreaId:"@"}})}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$element=n;this.$meeUtil=t}return n.prototype.$postLink=function(){var i=this.$element.find("label"),n,t,r;if(1!==i.length)throw new Error("A single LABEL element must be provided. Refer to demo for supported ways of hiding the label.");if(n=this.$element.find("input"),1!==n.length)throw new Error("A single INPUT element must be provided.");if(n.addClass("c-text-field"),n.attr("type")||n.attr("type","text"),t=this.$element.attr("kind"),t)switch(t){case"small":n.addClass("f-small");break;case"flex":n.addClass("f-flex");break;default:throw new Error("Unknown text field kind specified: "+t+".");}r=this.inputId||"text-"+this.$meeUtil.nextUid();i.attr("for",r);n.attr("id",r);i.addClass("c-label")},n.$inject=["$element","$meeUtil"],n}();angular.module(i.moduleName).component("meeTextField",{controller:r,bindings:{inputId:"@"}})}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t,i,r;(i=t||(t={}))[i.small=0]="small";i[i.flex=1]="flex";r=function(){function n(){this.restrict="A"}return n.prototype.link=function(t,i,r){i.attr("type","text");i.addClass("c-text-field");r.meeTextInput&&i.addClass(n.GetClassFromStyleName(r.meeTextInput))},n.GetClassFromStyleName=function(n){switch(t[n]){case t.small:return"f-small";case t.flex:return"f-flex";default:throw new Error("mee-text-input: "+n+" is not a valid option");}},n}();angular.module(n.moduleName).directive("meeTextInput",function(){return new r})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t,i){this.$element=n;this.$meeMwfUtil=t;this.$meeUtil=i}return Object.defineProperty(n.prototype,"labelId",{get:function(){return this.toggleButtonId+"-label"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stateLabelId",{get:function(){return this.toggleButtonId+"-state-label"},enumerable:!0,configurable:!0}),n.prototype.$onInit=function(){this.id||(this.id="mee-toggle-"+this.$meeUtil.nextUid());this.toggleButtonId=this.id+"-button"},n.prototype.$postLink=function(){var n=this;this.$element.addClass("c-toggle");this.$meeMwfUtil.create(mwf.Toggle,this.$element).then(function(t){return n.initializeMwfToggle(t)})},n.prototype.$onChanges=function(){var n=!!this.ngModel,t;if(this.mwfToggle)if(t=this.$element.find("button")[0],t.disabled)try{t.disabled=!1;this.mwfToggle.setToggleCheckedState(n)}finally{t.disabled=!0}else this.mwfToggle.setToggleCheckedState(n);else this.initialNgModel=n,this.initialLabel=n?this.onLabel:this.offLabel},n.prototype.initializeMwfToggle=function(n){var t=this;return n.subscribe({onToggled:function(n){return t.ngModelCtrl.$setViewValue(n.checked)}}),this.mwfToggle=n},n.$inject=["$element","$meeMwfUtil","$meeUtil"],n}();angular.module(i.moduleName).component("meeToggle",{template:'\n                <div class="c-toggle">\n                    <label\n                        ng-class="{ \'x-screen-reader\': $ctrl.isAriaOnlyLabel, \'c-label\': true }"\n                        for="{{$ctrl.toggleButtonId}}"\n                        id="{{$ctrl.labelId}}">{{$ctrl.label}}<\/label>\n                    <button\n                        id={{$ctrl.toggleButtonId}}\n                        name="{{$ctrl.toggleButtonId}}"\n                        role="checkbox"\n                        aria-checked="{{$ctrl.initialNgModel}}"\n                        aria-labelledby="{{$ctrl.labelId}} {{$ctrl.stateLabelId}}"\n                        ng-disabled="$ctrl.ngDisabled"\n                        data-bi-ctrlstate="{{$ctrl.ngModel}}"><\/button>\n                    <span\n                        id="{{$ctrl.stateLabelId}}"\n                        data-on-string="{{$ctrl.onLabel}}"\n                        data-off-string="{{$ctrl.offLabel}}">{{$ctrl.initialLabel}}<\/span>\n                <\/div>',bindings:{id:"@",ngModel:"<",ngDisabled:"<",label:"@",onLabel:"@",offLabel:"@",isAriaOnlyLabel:"<?"},require:{ngModelCtrl:"^ngModel"},controller:r})}(MeePortal||(MeePortal={})),function(n){var t,i,r,u;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n){this.element=n}return n.prototype.$postLink=function(){this.element.attr({"aria-describedby":this.meeTooltipTrigger,"data-toggle":"toggle"})},n.$inject=["$element"],n}();u=function(){function n(n,t){this.element=n;this.$meeMwfUtil=t}return n.prototype.$postLink=function(){this.$meeMwfUtil.create(mwf.Tooltip,angular.element(this.element[0].querySelector("span")))},n.$inject=["$element","$meeMwfUtil"],n}();angular.module(i.moduleName).directive("meeTooltipTrigger",function(){return{controller:r,bindToController:{meeTooltipTrigger:"@"}}}).component("meeTooltip",{transclude:!0,template:'<span id="{{ $ctrl.tooltipId }}" class="c-tooltip" role="tooltip" aria-hidden="true" ng-transclude><\/span>',bindings:{tooltipId:"@"},controller:u})}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t,i;(i=t||(t={}))[i.horizontal=0]="horizontal";i[i.vertical=1]="vertical";var r=function(){function n(){}return n.prototype.$postLink=function(){this.validateKindAttribute()},n.prototype.itemClicked=function(n,t){this.itemSelectedId=n;this.ngModel=t;this.ngModelCtrl.$setViewValue(t)},n.prototype.validateKindAttribute=function(){if(this.orientation||(this.orientation=n.DefaultOrientation),!(this.orientation in t))throw new Error("Invalid Markup: The UserPicker Component 'orientation' attribute is invalid. See Enum UserPickerOrientation for valid values.");},n.prototype.getClasses=function(){return{vertical:this.orientation===t[t.vertical],horizontal:this.orientation===t[t.horizontal]}},n.DefaultOrientation=t[t.vertical],n}(),u=function(){function n(n){this.$meeUtil=n}return n.prototype.itemClicked=function(n){n.preventDefault();this.pickerComponent.itemClicked(this.id,this.value)},n.prototype.$postLink=function(){if(!this.value)throw new Error("Invalid Markup: the Picker Item should have a 'value' attribute!");this.id=this.$meeUtil.nextUid();this.isItemSelected()&&(this.pickerComponent.itemSelectedId=this.id)},n.prototype.isItemSelected=function(){return this.value===this.pickerComponent.ngModel},n.$inject=["$meeUtil"],n}(),f=function(){this.transclude=!0;this.restrict="E";this.replace=!0;this.require={pickerComponent:"^^meeUserPicker"};this.bindToController={kind:"@?",value:"<",onPicked:"&"};this.controller=u;this.controllerAs="itemController";this.template='\n            <li ng-class="{ \'selected\': itemController.isItemSelected() }" role="option" id="{{itemController.id}}">\n                <button ng-if="!itemController.kind" ng-click="itemController.itemClicked($event)" ng-transclude><\/button>\n                <div ng-if="itemController.kind == \'custom\'" ng-click="itemController.itemClicked($event)" ng-transclude><\/div>\n            <\/li>\n        '};angular.module(n.moduleName).component("meeUserPicker",{template:'\n            <ul ng-transclude="item" ng-class="$ctrl.getClasses()" tabindex="0" role="listbox" aria-activedescendant="{{$ctrl.itemSelectedId}}">\n            <\/ul>\n            ',require:{ngModelCtrl:"ngModel"},transclude:{item:"userPickerItem"},bindings:{ngModel:"<",orientation:"@?"},controller:r}).directive("userPickerItem",function(){return new f})})((t=n.OneUI||(n.OneUI={})).Angular||(t.Angular={}))}(MeePortal||(MeePortal={})),function(n){var t,i,r;t=n.OneUI||(n.OneUI={});i=t.Angular||(t.Angular={});r=function(){function n(n,t){this.$q=n;this.$meeUtil=t}return n.prototype.create=function(n,t){var i=t&&(t instanceof HTMLElement?t:t[0]);return this.createInternal(n,i)},n.prototype.createInternal=function(n,t){var i=this;return new this.$q(function(r,u){i.$meeUtil.afterContentComplete(function(){t||u(new Error("$meeMwfUtil: Provided HTML element instance is falsy and cannot be used for creating MWF component."));try{mwf.ComponentFactory.create([{component:n,elements:[t],callback:function(n){1===n.length?r(n[0]):u(new Error('"MeeMwfUtil.create - MWF returned an unexpected number of instances in its callback to create:" '+n.length))}}])}catch(n){u(n)}})})},n.$inject=["$q","$meeUtil"],n}();angular.module(i.moduleName).service("$meeMwfUtil",r)}(MeePortal||(MeePortal={}));angular.module("commonModule",["ngCookies"]).constant("defaultTimeSpanFormats",{hrMin:"{hr} hr {min} min",hr:"{hr} hr",min:"{min} min"}).config(["$locationProvider",function(n){n.hashPrefix("")}]),function(n){var t;(function(t){var i;(function(t){var i;(function(){angular.module("commonModule").filter("flowTracking",function(){return function(t,i){return t&&i?n.Utilities.addQueryParameter(t,"fref",i):t}})})(i=t.Filters||(t.Filters={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(n,t){var i=n,r;return i?(t!=null&&(Array.isArray(t)||typeof t=="object")?i=i.replace(/\{(\w+)\}/g,function(n,i){var r=t[i];return r===null||r===undefined?"":r}):(r=t===null||t===undefined?"":t,i=i.replace(/\{0\}/g,r)),i):i}return n}angular.module("commonModule").filter("stringFormat",n)})(t=n.Filters||(n.Filters={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){angular.module("commonModule").filter("timeSpanFormat",["defaultTimeSpanFormats","timeSpanService","stringFormatFilter",function(n,t,i){return function(r,u){var f,e;return u||(u=n),f=t.parseTimeSpan(r),f&&!f.Days?(e=f.Hours&&f.Minutes?u.hrMin:f.Hours?u.hr:u.min,i(e,{hr:f.Hours,min:f.Minutes})):r}}])})(t=n.Filters||(n.Filters={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){this.restrict="E";this.scope={image:"="};this.template="<img ng-src='{{image.src}}' ng-attr-alt='{{image.alt}}' ng-attr-title='{{image.title}}' ng-class='imageClass' />";this.link=function(n,t,i){n.imageClass=i["class"]}}return n}();n.cmsImageDirective=t;angular.module("commonModule").directive("meeCmsImage",function(){return new t})})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(){}function t(){return"<a ng-attr-id='{{link.id}}' href='{{link.url}}' target='{{link.target}}'>{{link.text}}<\/a>"}return{restrict:"A",scope:{link:"=linkData"},replace:!0,link:n,template:t()}}angular.module("commonModule").directive("meeCmsLink",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(){}function t(){return"<section class='section' ng-if='group.links' ng-attr-aria-label='{{$parent.group.title}}'><header class='section-header' ng-if='$parent.group.title'><h2 class='section-title text-maxlines-1'>{{$parent.$parent.group.title}}<\/h2><\/header><p ng-if='$parent.group.description'>{{$parent.$parent.group.description}}<\/p><ul><li ng-repeat='link in $parent.group.links'><span data-mee-cms-link data-link-data='link'><\/span><\/li><\/ul><\/section>"}return{restrict:"A",scope:{group:"=linkGroupData"},replace:!0,link:n,template:t()}}angular.module("commonModule").directive("meeCmsLinkGroup",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(n){return{restrict:"A",link:function(t,i,r){var u=null,f=null;t.$watch(r.compileHtml,function(r){u=r;i.html(r);n(i.contents())(f||t)});t.$watch(r.compileScope,function(t){t!=null&&(f=t,u&&(i.html(u),n(i.contents())(f)))})}}}angular.module("commonModule").directive("compileHtml",n);n.$inject=["$compile"]})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){var n=this;return this.restrict="A",this.replace=!1,this.scope=!1,this.link=function(t,i,r){r.$observe("sortTrigger",function(){return n.sortElements(t,i)})},this.sortElements=function(n,t){t.children().sortNodes(function(t){return n.$eval(t)})},this}return n.factory=function(){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return n.apply({},i)}},n}();n.domSorterDirective=t;angular.module("commonModule").directive("meeDomSorter",t.factory())})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){var t=this;return this.restrict="A",this.replace=!0,this.scope={message:"@errorText"},this.link=function(i,r,u){i.hasMessage=function(){return t.hasMessage(i)};i.id="mee-error-message-"+n.nextId;n.nextId++;u.$observe("errorText",function(n){return t.errorChanged(i,r,n)})},this.template=function(){return"<div id='{{$parent.id}}' role='alert' ng-if='hasMessage()' aria-live='assertive' aria-atomic='true' aria-relevant='text'><span class='alert alert-error'>{{$parent.message}}<\/span><\/div>"},this.errorChanged=function(n,i,r){var u,f,e;(n.message=r,u=i.siblings(".form-control"),u.length)&&(f="aria-labelledby",e=u.attr(f)||"",t.hasMessage(n)?(u.addClass("has-error"),u.attr("aria-invalid","true"),u.attr(f,e+" "+n.id)):(u.removeClass("has-error"),u.removeAttr("aria-invalid"),u.attr(f,e.replace(n.id,"").trim())))},this.hasMessage=function(n){return!!n.message},this}return n.factory=function(){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return n.apply({},i)}},n.nextId=1,n}();n.errorMessageDirective=t;angular.module("commonModule").directive("meeErrorMessage",t.factory())})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){return{link:function(n,t,i){t.bind("error",function(){angular.element(this).attr("src",i.fallbackSrc)})}}}angular.module("commonModule").directive("fallbackSrc",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){var n=this;return this.restrict="E",this.replace=!0,this.scope={model:"=",onSelect:"&"},this.template='\n            <div class="family-picker">\n                <ng-repeat ng-repeat="member in model.members">\n                    <div class="person person-small ng-class:{ active: member === selectedMember }">\n                        <a href="#" ng-click="selectMember($event, member)" title="{{member.name}}">\n                            <img class="person-graphic"\n                                 data-bi-id="family-member"\n                                 ng-src="{{member.pictureUrl}}"\n                                 ng-show="member.pictureUrl"\n                                 data-mee-onerror\n                                 data-error-callback="profilePictureFailed(member)" />\n\n                            <div class="mee-no-picture" ng-hide="member.pictureUrl">\n                                <div data-mee-no-picture><\/div>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/ng-repeat>\n            <\/div>\n        ',this.link=function(t){t.selectMember=n.selectMember;t.profilePictureFailed=n.profilePictureFailed;n.$scope=t;n.$scope.$watch("model.members",n.familyMembersChanged)},this.selectMember=function(t,i){t.preventDefault();n.memberSelected(i)},this.profilePictureFailed=function(n){n.pictureUrl=""},this.memberSelected=function(t){n.$scope.selectedMember=t;n.$scope.onSelect&&n.$scope.onSelect({member:t&&t.data})},this.familyMembersChanged=function(t){t&&t.length?n.memberSelected(t[0]):n.memberSelected(null)},this}return n.factory=function(){return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return n.apply({},i)}},n}();n.familyPickerDirective=t;angular.module("commonModule").directive("meeFamilyPicker",t.factory())})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(){}function t(){return"<div><span class='mee-icon mee-icon-Contact'><\/span><\/div>"}return{restrict:"A",scope:!1,replace:!0,template:t(),link:n}}angular.module("commonModule").directive("meeNoPicture",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(n,t){t.bind("error",function(){return n.$evalAsync(function(){return n.errorCallback()})})}return{restrict:"A",scope:{errorCallback:"&"},link:n}}angular.module("commonModule").directive("meeOnerror",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(n,t){t.bind("load",function(){return n.$evalAsync(function(){return n.loadCallback()})})}return{restrict:"A",scope:{loadCallback:"&"},link:n}}angular.module("commonModule").directive("meeOnload",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(){}function t(){return"<div class='progress indeterminate'><div class='progress-bar indeterminate indeterminate-bar' role='progressbar'><div class='indeterminate-indicators'><div class='indeterminate-indicator indicator-1'><div class='dot'> <\/div><\/div><div class='indeterminate-indicator indicator-2'><div class='dot'> <\/div><\/div><div class='indeterminate-indicator indicator-3'><div class='dot'> <\/div><\/div><div class='indeterminate-indicator indicator-4'><div class='dot'> <\/div><\/div><div class='indeterminate-indicator indicator-5'><div class='dot'> <\/div><\/div><\/div><\/div><\/div>"}return{restrict:"A",scope:!1,replace:!0,link:n,template:t()}}angular.module("commonModule").directive("meeProgressAnts",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(){}function t(n,t){var r="",i="";switch(t.size){case"medium":r="ring-medium";i="indeterminate-medium";break;case"large":r="ring-large";i="indeterminate-large"}return"\n<div class='progress ring "+r+" indeterminate'>\n    <div class='indeterminate progress-bar' role='progressbar'>\n        <div class='indeterminate-ring "+i+" indicator-1'><\/div>\n        <div class='indeterminate-ring "+i+" indicator-2'><\/div>\n        <div class='indeterminate-ring "+i+" indicator-3'><\/div>\n        <div class='indeterminate-ring "+i+" indicator-4'><\/div>\n        <div class='indeterminate-ring "+i+" indicator-5'><\/div>\n    <\/div>\n<\/div>\n"}return{restrict:"A",scope:!1,replace:!0,link:n,template:t}}angular.module("commonModule").directive("meeProgressRing",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(n){return{restrict:"A",scope:{resizeCallback:"=resize"},link:function(t){var i=angular.element(n);i.bind("resize",function(){t.resizeCallback()})}}}angular.module("commonModule").directive("resize",n);n.$inject=["$window"]})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(n){function t(t,i,r){r.$set("autofocus",!0);n(function(){return i.focus()},200)}return{restrict:"A",scope:!1,link:t}}n.$inject=["$timeout"];angular.module("commonModule").directive("meeSetFocus",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(){function n(n,t,i){n.$watch(i.meeVisible,function(n){t.css("visibility",n?"visible":"hidden")})}return{restrict:"A",multiElement:!0,link:n}}angular.module("commonModule").directive("meeVisible",n)})(t=n.Directives||(n.Directives={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i=function(){function t(){}return t.prototype.$onInit=function(){this.imageSet&&(this.imageSet.fontIcon?this.fontIcon=this.imageSet.fontIcon:this.imageSet.imagePngMedium?this.image=this.imageSet.imagePngMedium:this.imageSet.imagePngSmall?this.image=this.imageSet.imagePngSmall:this.imageSet.imageSvgMedium?this.image=this.imageSet.imageSvgMedium:this.imageSet.imageSvgSmall?this.image=this.imageSet.imageSvgSmall:this.imageSet.imageUrl&&(this.image=this.imageSet.imageUrl))},t.$inject=[],__decorate([n.Angular.Decorators.Component("commonModule","cmsImageSet",{bindings:{imageSet:"<"},template:'\n                <span\n                      ng-if="$ctrl.fontIcon"\n                      ng-class="[\'mee-icon\', $ctrl.fontIcon]"\n                      ng-style="{color:$ctrl.imageSet.color}"\n                      ng-attr-aria-label="{{$ctrl.imageSet.altText}}"\n                      ng-attr-aria-hidden="{{$ctrl.imageSet.altText ? undefined :\'true\'}}">\n                <\/span>\n                <img\n                     ng-if="$ctrl.image"\n                     ng-src="{{$ctrl.image}}"\n                     ng-attr-alt="{{$ctrl.imageSet.altText}}"\n                     ng-attr-title="{{$ctrl.imageSet.hoverText}}"\n                     mee-image />\n            '})],t)}();t.CmsImageSetComponent=i})(i=t.Components||(t.Components={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(){this.restrict="A";this.scope={cmsImage:"<"}}return n.prototype.link=function(n,t){var i=n.cmsImage;i&&(t.attr("src",i.src),i.alt&&t.attr("alt",i.alt),i.title&&t.attr("title",i.title))},n}();angular.module("commonModule").directive("cmsImage",function(){return new n})})(t=n.Components||(n.Components={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i=function(){function t(n,t){this.$state=n;this.telemetryService=t}return t.prototype.$onInit=function(){},t.prototype.getCurrentCvValue=function(){return this.telemetryService.portalCv.getCurrentCvValue()},t.prototype.onTryAgainLink=function(){this.onTryAgain?this.onTryAgain():this.$state.reload()},t.$inject=["$state","telemetryService"],__decorate([n.Angular.Decorators.Component("commonModule","defaultFailedView",{template:'<mee-alert kind="error">\n                              <alert-header>{{$ctrl.strings.errorTitle}}<\/alert-header>\n                              <alert-content>{{$ctrl.strings.errorMessage}}<\/alert-content>\n                              <alert-actions>\n                                  <a ng-click="$ctrl.onTryAgainLink()" href="#" data-bi-id="progress-view-reload">{{$ctrl.strings.tryAgainButton}}<\/a>\n                              <\/alert-actions>\n                          <\/mee-alert>\n                          <div>\n                              <p mee-paragraph="para3" class="text-center-align">TraceId: {{::$ctrl.getCurrentCvValue()}}<\/p>\n                          <\/div>',bindings:{strings:"<",onTryAgain:"&?"}})],t)}();t.DefaultFailedViewComponent=i})(i=t.Components||(t.Components={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i=function(){function t(){}return t.prototype.$onInit=function(){},t.$inject=[],__decorate([n.Angular.Decorators.Component("commonModule","defaultInprogressView",{template:'<div class="default-inprogress-view">\n                           <mee-progress-ants-mwf kind="local" class="progress-centered"><\/mee-progress-ants-mwf>\n                           <p mee-paragraph="para3" class="load-text">{{$ctrl.strings.progressMessage}}<\/p>\n                       <\/div>',bindings:{strings:"<"}})],t)}();t.DefaultInprogressViewComponent=i})(i=t.Components||(t.Components={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r;(function(i){var r=function(){function i(){this.images=[]}return i.prototype.$onChanges=function(){this.data&&!this.model&&this.data.ad&&this.data.ad.textPosition&&this.data.prm&&this.data.tracking&&(this.model=this.data.ad,this.model.trackingBeaconUrl=this.enforceSecureUrl(this.data.tracking.baseUri.replace("{ACTION}","click")),this.model.impressionBeaconUrl=this.enforceSecureUrl(this.data.prm._imp),this.meeFeatureAttributes=this.setMeeFeatureAttributes(this.model.textPosition,this.model.bgColor),this.extractImages(this.model),this.fireBeacon(this.model.impressionBeaconUrl))},i.prototype.setMeeFeatureAttributes=function(n,t){if(!n)return null;var i=n?"align-"+n:"",r=t?"background-"+t:"";return i+" "+r},i.prototype.fireBeacon=function(n){if(!n)return null;var t=document.createElement("img");return t.onerror=t.onload=t.onabort=function(){t.onerror=t.onload=t.onabort=null;t.src=""},t.src=n,t},i.prototype.extractImages=function(n){var u,f,i,r,t,e;if(n.svg){this.useSvg();return}for(u=["vp1","vp2","vp3","vp4","vp5","vp6"],f={vp1:"(min-width: 0)",vp2:"(min-width: 320px)",vp3:"(min-width: 540px)",vp4:"(min-width: 768px)",vp5:"(min-width: 1084px)",vp6:"(min-width: 1400px)"},i=0,r=u;i<r.length;i++)t=r[i],n[t]&&n[t]!=null&&n[t].trim().length>0&&(e={viewportSize:t,src:this.enforceSecureUrl(n[t]),media:f[t]},this.images.push(e));this.images.sort(function(n,t){return t.viewportSize.localeCompare(n.viewportSize)});this.hasSvg=!1;this.hasNoSvgAndAtLeastOneImage=this.images.length>0;this.hasNoSvgAndMoreThanOneImage=this.images.length>1;this.hasNoSvgAndAtLeastOneImage&&(this.images[this.images.length-1].media="(min-width:0)")},i.prototype.useSvg=function(){this.hasSvg=!0;this.hasNoSvgAndAtLeastOneImage=!1;this.hasNoSvgAndMoreThanOneImage=!1},i.prototype.enforceSecureUrl=function(t){return n.Utilities.enforceSecureUrl(t)},__decorate([t.Angular.Decorators.Component("commonModule","irisFeaturePromotion",{template:'<section ng-if="$ctrl.meeFeatureAttributes"\n                                     mee-feature="{{ $ctrl.meeFeatureAttributes }}"\n                                     id="iris-feature-campaign">\n                                <picture>\n                                    <img ng-if="$ctrl.hasSvg"\n                                         mee-image ng-src="{{ $ctrl.enforceSecureUrl($ctrl.model.svg) }}"\n                                         alt="{{ $ctrl.model.alt }}"\n                                         aria-label="{{ $ctrl.model.ariaText }}"\n                                         role="img"/>\n                                    <source ng-if="$ctrl.hasNoSvgAndMoreThanOneImage"\n                                            ng-repeat="image in $ctrl.images"\n                                            ng-srcset="{{ image.src }}"\n                                            media="{{ image.media }}">\n                                    <img ng-if="$ctrl.hasNoSvgAndAtLeastOneImage"\n                                         mee-image ng-src="{{ $ctrl.images[0].src }}"\n                                         alt="{{ $ctrl.model.imgAltText }}"\n                                         aria-label="{{ $ctrl.model.imgAriaText }}"/>\n                                <\/picture>\n                                <div>\n                                    <h2 mee-heading="heading"><strong>{{ $ctrl.model.heading }}<\/strong><\/h2>\n                                    <p mee-paragraph="para4">{{ $ctrl.model.text }}<\/p>\n                                    <div class="c-group">\n                                        <a mee-call-to-action="featurePrimary"\n                                           ng-href="{{ $ctrl.enforceSecureUrl($ctrl.model.action1Url) | flowTracking:$ctrl.getTrackingIdCallback() }}"\n                                           target="_self"\n                                           ng-click="$ctrl.fireBeacon($ctrl.model.trackingBeaconUrl)"\n                                           aria-label="{{ $ctrl.model.action1AriaText }}"\n                                           data-bi-id="{{ $ctrl.getTrackingIdCallback() }}">\n                                            {{ $ctrl.model.action1Text }}\n                                        <\/a>\n                                        <a ng-if="$ctrl.model.action2Url"\n                                           mee-call-to-action="featurePrimary"\n                                           ng-href="{{ $ctrl.enforceSecureUrl($ctrl.model.action2Url) | flowTracking:$ctrl.getTrackingIdCallback() }}"\n                                           target="_self"\n                                           aria-label="{{ $ctrl.model.action2AriaText }}"\n                                           data-bi-id="{{ $ctrl.getTrackingIdCallback() }}">\n                                            {{ $ctrl.model.action2Text }}\n                                        <\/a>\n                                    <\/div>\n                                    <p mee-caption="caption2">\n                                        {{ $ctrl.model.disclaimerText }}\n                                        <a ng-if="$ctrl.model.disclaimerLink1Url"\n                                           mee-hyperlink\n                                           ng-href="{{ $ctrl.enforceSecureUrl($ctrl.model.disclaimerLink1Url) | flowTracking:$ctrl.getTrackingIdCallback() }}"\n                                           target="_self"\n                                           aria-label="{{ $ctrl.model.disclaimerLink1AriaText }}"\n                                           data-bi-id="{{ $ctrl.getTrackingIdCallback() }}.disclaimer">\n                                            {{ $ctrl.model.disclaimerLink1Text }}\n                                        <\/a>\n                                        <a ng-if="$ctrl.model.disclaimerLink2Url"\n                                           mee-hyperlink\n                                           ng-href="{{ $ctrl.enforceSecureUrl($ctrl.model.disclaimerLink2Url) | flowTracking:$ctrl.getTrackingIdCallback() }}"\n                                           target="_self"\n                                           aria-label="{{ $ctrl.model.disclaimerLink2AriaText }}"\n                                           data-bi-id="{{ $ctrl.getTrackingIdCallback() }}.disclaimer">\n                                            {{ $ctrl.model.disclaimerLink2Text }}\n                                        <\/a>\n                                    <\/p>\n                                <\/div>\n                            <\/section>',bindings:{data:"<",getTrackingIdCallback:"&"}})],i)}();i.IrisFeaturePromotionComponent=r})(r=i.Components||(i.Components={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t=function(){function t(n,t){this.commonConfig=n;this.$window=t}return t.prototype.elevateToHbi=function(n){this.$window.location.href=this.getSigninUrl("hbi",n)},t.prototype.getSigninUrl=function(t,i){var r=this.$window.location.href,u;i&&(r=r.indexOf("?")>-1?r+"&"+i:r+"?"+i);u=n.Utilities.updateQueryParam(this.commonConfig.completeSignInReturnUrl,"ru",encodeURIComponent(r));switch(t){case"mbi":return u;case"hbi":return n.Utilities.updateQueryParam(this.commonConfig.hbiSignInUrl,"wreply",encodeURIComponent(u));default:throw new Error("Unrecognized policy.");}},t.$inject=["commonConfig","$window"],t}();angular.module("commonModule").service("authenticationService",t)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(n){this.$window=n}return n.prototype.isCopySupported=function(){return document.queryCommandSupported("copy")},n.prototype.copy=function(n){try{var t=this.$window.document.getElementById(n);return t.select(),this.$window.document.execCommand("copy"),!0}catch(i){return!1}},n.prototype.copyText=function(n){var t=angular.element("<input>");angular.element("body").append(t);t.val(n).select();try{return this.$window.document.execCommand("copy"),!0}catch(i){return!1}finally{t.remove()}},n.$inject=["$window"],n}();angular.module("commonModule").service("clipboardService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(n){this.$meeUtil=n;this.errorPrefix="componentRegistryService: ";this.idStorage={};this.classStorage={}}return n.prototype.getInstanceById=function(n){if(n){if(!this.idStorage[n])throw new Error(this.errorPrefix+" getInstanceById(): Id not found in id storage");}else throw new Error(this.errorPrefix+" getInstanceById(): Passed id was falsy");return this.idStorage[n].componentInstance},n.prototype.getInstancesByClass=function(n){var i,r,t,u;if(n){if(!this.classStorage[n])return[]}else throw new Error(this.errorPrefix+" getInstancesByClass(): Passed className was falsy");for(i=[],r=this.classStorage[n],t=0;t<r.length;t++)u=r[t],i.push(this.idStorage[u].componentInstance);return i},n.prototype.register=function(n,t,i){if(!n||!t||!i)throw new Error(this.errorPrefix+" register(): className, id, or componentInstance was falsy");this.idStorage[t]={className:n,componentInstance:i};this.addToClassStorage(n,t)},n.prototype.registerWithoutId=function(n,t){var i=this.$meeUtil.nextUid();return this.register(n,i,t),i},n.prototype.deregister=function(n){if(n){if(!this.idStorage[n])throw new Error(this.errorPrefix+" deregister(): Id not found in id storage");}else throw new Error(this.errorPrefix+" deregister(): Passed id was falsy");var t=this.idStorage[n].className;this.classStorage[t]&&this.classStorage[t].indexOf(n)>-1&&this.classStorage[t].splice(this.classStorage[t].indexOf(n),1);delete this.idStorage[n]},n.prototype.addToClassStorage=function(n,t){this.classStorage[n]||(this.classStorage[n]=[]);this.classStorage[n].push(t)},n.$inject=["$meeUtil"],n}();angular.module("commonModule").service("componentRegistryService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(n){var t=this,i;this.commonConfig=n;this.defaultTimeDate="01/01/1996";this.toShortDate=function(n){var i=t.checkDate(n);return t.formatSupported?i.toLocaleDateString(t.culture,{year:"numeric",month:"numeric",day:"numeric"}):i.toDateString()};this.toLongDate=function(n){var i=t.checkDate(n);return t.formatSupported?i.toLocaleDateString(t.culture,{year:"numeric",month:"long",day:"numeric"}):i.toDateString()};this.toShortTime=function(n){var i=t.checkTimespan(n);return t.formatSupported?i.toLocaleTimeString(t.culture,{hour:"2-digit",minute:"2-digit"}):i.toTimeString()};this.culture=this.commonConfig.userCulture||navigator.language;i=new Date;this.formatSupported=!!i.toLocaleDateString&&!!i.toLocaleTimeString}return n.prototype.toLongDateTime=function(n){var t=this.checkDate(n);return this.formatSupported?t.toLocaleString(this.culture):t.toDateString()},n.prototype.toShortMonthDay=function(n){var t=this.checkDate(n);return this.formatSupported?t.toLocaleDateString(this.culture,{month:"short",day:"numeric"}):t.toDateString()},n.prototype.getMonthNames=function(){for(var r=this.getIntl().DateTimeFormat(this.culture,{month:"long"}),t=new Date(2018,0),i=[],n=0;n<12;n++)t.setMonth(n),i.push(r.format(t));return i},n.prototype.getIntl=function(){return Intl},n.prototype.checkDate=function(n){if(!n)throw new Error("timestamp not specified");if(typeof n=="string"){var t=Date.parse(n);if(isNaN(t))throw new Error("Unsupported timestamp format");n=new Date(n)}return n},n.prototype.checkTimespan=function(t){if(typeof t=="string"){var i=n.timeRegExp;if(i.test(t))return new Date(this.defaultTimeDate+" "+t)}return this.checkDate(t)},n.$inject=["commonConfig"],n.timeRegExp=new RegExp("^(([0-1]?[0-9]|2[0-3])(:[0-5][0-9])(:[0-5][0-9])(:[0-5][0-9])?)$|^24:00:00$|^24:00:00:00$"),n}();angular.module("commonModule").service("dateTimeFormatter",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){function t(){return n.Devices}angular.module("commonModule").service("deviceService",t)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(n,t,i,r){var u=this;this.$state=n;this.$meeModal=t;this.telemetry=i;this.$rootScope=r;this.getData=function(){return u.data};this.setData=function(n){u.data=n};r.$on("$stateChangeStart",function(n,t){if(t._isFatalErrorPage)try{u.end({error:"unhandled exception"})}catch(i){}})}return n.prototype.begin=function(n){return this.telemetry.portalScenarios.beginMultiStepScenario(n.bi.area,n.bi.scenario,n.bi.step,{attribution:n.bi.attribution,data:n.bi.data}),this.beginFlow(n)},n.prototype.resume=function(n){return this.telemetry.portalScenarios.endStep({area:n.bi.area,name:n.bi.scenario,step:n.fromStep.step,next:n.bi.step,isSuccess:n.fromStep.isSuccess,error:n.fromStep.error,attribution:n.bi.attribution,data:n.fromStep.data}),this.beginFlow(n)},n.prototype.beginFlow=function(n){this.backStack=[];this.exitState=n.exitState;this.bi={area:n.bi.area,scenario:n.bi.scenario,currentStep:n.bi.step,scenarioEnded:!1,attribution:n.bi.attribution,error:n.bi.error,data:n.bi.data};var t,i;if(typeof n.state=="string"?i=n.state:t=n.state,this.current={modalStateId:i,stateId:t&&t.id,stateParams:t&&t.params,stateOptions:t&&t.options,biStep:n.bi.step,biData:n.bi.data},t)return this.isModalOpen=!1,this.$state.go(t.id,t.params,t.options);if(i)return this.isModalOpen=!0,this.$meeModal.show(n.modalId||"#modal-host",i,n.modalShowOptions);throw new Error("Initial state not specified");},n.prototype.switchTo=function(n){if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");if(!this.current.modalStateId&&!n.state&&n.modalStateId)throw new Error("Opening a modal in the middle of a flow is not supported");if(this.telemetry.portalScenarios.endStep(this.makeScenarioResult(n.bi)),this.backStack.push(this.current),this.current={modalStateId:n.modalSwitchToOptions?n.modalSwitchToOptions.stateId:n.modalStateId,stateId:n.state&&n.state.id,stateParams:n.state&&n.state.params,stateOptions:n.state&&n.state.options,biStep:n.bi.step,biData:n.bi.data},this.isModalOpen&&(n.modalStateId||n.modalSwitchToOptions)){var t=n.modalSwitchToOptions||{stateId:n.modalStateId};return this.$meeModal.switchTo(t)}if(n.state)return this.isModalOpen?(this.isModalOpen=!1,this.$meeModal.hide({stateId:n.state.id,stateParams:n.state.params,stateOptions:n.state.options})):this.$state.go(n.state.id,n.state.params,n.state.options);throw new Error("Different state not specified. Use stayInCurrentState if not switching to a different state was intentional");},n.prototype.goBack=function(n){var t,i;if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");if(this.backStack.length<1)throw new Error("Cannot go back");if(t=this.backStack.pop(),t.modalStateId&&!this.current.modalStateId)throw new Error("Going back to a modal is not supported");if(this.current=t,i=n||{step:this.current.biStep,data:this.current.biData},this.telemetry.portalScenarios.cancelStep(this.makeScenarioResult(i)),this.current.modalStateId)return this.$meeModal.goBack();if(this.current.stateId)return this.$state.go(this.current.stateId,this.current.stateParams,this.current.stateOptions);throw new Error("Should not reach here");},n.prototype.cancel=function(n){if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");return n=n||{},n.step||(n.step=this.current.biStep),n.data||(n.data=this.current.biData),this.telemetry.portalScenarios.cancelMultiStepScenario(this.makeScenarioResult(n)),this.bi.scenarioEnded=!0,this},n.prototype.end=function(n){if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");return n=n||{},n.step||(n.step=this.current.biStep),n.data||(n.data=this.current.biData),this.telemetry.portalScenarios.endMultiStepScenario(this.makeScenarioResult(n)),this.bi.scenarioEnded=!0,this},n.prototype.exit=function(n){if(!this.bi.scenarioEnded)throw new Error("Scenario not ended");var t=n||this.exitState;return this.isModalOpen?this.$meeModal.hide({stateId:t.id,stateParams:t.params,stateOptions:t.options}):this.$state.go(t.id,t.params,t.options)},n.prototype.stayInCurrentState=function(n){if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");n.step=n.step||this.bi.currentStep;this.telemetry.portalScenarios.endStep(this.makeScenarioResult(n))},n.prototype.leave=function(n){if(this.bi.scenarioEnded)throw new Error("Scenario has already ended");this.telemetry.portalScenarios.endStep(this.makeScenarioResult(n));this.bi.scenarioEnded=!0},n.prototype.getCurrentBiStep=function(){return this.current.biStep},n.prototype.makeScenarioResult=function(n){if(!n||!n.step)throw new Error("step not specified");this.bi.data=angular.extend({},this.bi.data,n.data);var t={area:this.bi.area,name:this.bi.scenario,attribution:this.bi.attribution,data:this.bi.data,step:this.bi.currentStep,next:n.step,isSuccess:!n.error,error:n.error};return this.bi.currentStep=n.step,t},n.$inject=["$state","$meeModal","telemetryService","$rootScope"],n}();angular.module("commonModule").service("flowService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(){"use strict";function n(){return MeePortal.Logger}angular.module("commonModule").service("loggingService",n)}(),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(){this.head=angular.element(document.querySelector("html > head"));this.tags={}}return n.prototype.add=function(n,t){var i,r;if(typeof n=="string")if(this.tags[n])this.findTag(n).attr("content",t);else{if(this.findTag(n).length>0)throw new Error("Metatag not added through MetatagService already exists");this.tags[n]=!0;angular.element("<meta name='"+n+"' content='"+t+"'>").appendTo(this.head)}else{i=n;for(r in i)this.add(r,i[r])}},n.prototype.remove=function(n){this.tags[n]&&(delete this.tags[n],this.findTag(n).remove())},n.prototype.clear=function(){for(var n in this.tags)this.remove(n)},n.prototype.findTag=function(n){return this.head.children("meta[name='"+n+"']")},n.$inject=[],n}();angular.module("commonModule").service("metatagService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){var t=this;this.$q=n;this.get=function(n){return t.jqueryPromiseInScope($.portalAjaxGet(n))};this.post=function(n){return t.jqueryPromiseInScope($.portalAjaxPost(n))};this.put=function(n){return t.jqueryPromiseInScope($.portalAjaxPut(n))};this.del=function(n){return t.jqueryPromiseInScope($.portalAjaxDelete(n))};this.getAntiforgeryToken=function(){return $.getAntiForgeryToken()};this.jqueryPromiseInScope=function(n){var i=$.Deferred(),r=t.$q.defer();return r.promise.then(function(n){i.resolve(n.data,n.textStatus,n.jqXHR)},function(n){i.reject(n.jqXHR,n.textStatus,n.errorThrown)}),n.then(function(n,t,i){r.resolve({data:n,textStatus:t,jqXHR:i})},function(n,t,i){r.reject({jqXHR:n,textStatus:t,errorThrown:i})}),i.promise()}}return n.$inject=["$q"],n}();n.PortalAjaxService=t;angular.module("commonModule").service("portalAjaxService",t)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(){function t(n,t){this.$q=n;this.$injector=t}return t.prototype.get=function(n){return this.createAngularPromise($.portalAjaxGet,n)},t.prototype.post=function(n){return this.createAngularPromise($.portalAjaxPost,n)},t.prototype.put=function(n){return this.createAngularPromise($.portalAjaxPut,n)},t.prototype.del=function(n){return this.createAngularPromise($.portalAjaxDelete,n)},t.prototype.getAntiforgeryToken=function(){return $.getAntiForgeryToken()},t.prototype.createAngularPromise=function(n,t){var r=this,i=this.$q.defer();return n(t).then(function(n,t,r){i.resolve({data:n,textStatus:t,jqXHR:r})},function(n,u,f){r.addCustomDataToFailedComponentEvent(n,t);i.reject({jqXHR:n,textStatus:u,errorThrown:f})}),i.promise},t.prototype.addCustomDataToFailedComponentEvent=function(t,i){var f,r,u;if(this.$injector.has("pageReliabilityService")&&(f=this.$injector.get("pageReliabilityService"),r=f.getActiveComponentOperations(),r))for(u=0;u<r.length;u++)r[u].customData["amcqos-lastFailedAjaxRequest-status"]=t.status,r[u].customData["amcqos-lastFailedAjaxRequest-operationName"]=i.operationName,r[u].customData["amcqos-lastFailedAjaxRequest-url"]=n.Telemetry.globalUrlScrubber(i.url)},t.$inject=["$q","$injector"],t}();t.PortalAjaxServiceAngular=i;angular.module("commonModule").service("portalAjaxServiceAngular",i)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t=function(){function t(n,t){this.ajax=n;this.$q=t;this.requestRoot="/api/promotion-campaigns/";this.cachedGetCampaignPromises={};this.cachedGetCampaignResponses={}}return t.prototype.getCampaignData=function(n){var i=this;return this.cachedGetCampaignPromises[n]?this.cachedGetCampaignPromises[n]:this.cachedGetCampaignResponses[n]?this.$q.resolve(this.cachedGetCampaignResponses[n]):(this.cachedGetCampaignPromises[n]=this.ajax.get({serviceName:t.serviceName,operationName:"GLOBAL.CAMPAIGNS.GETCAMPAIGNDATA",data:{surfaceName:n},parentOperationName:"GetCampaignDataV2",url:this.requestRoot+"campaign-data",dataType:"auto"}),this.cachedGetCampaignPromises[n].then(function(t){i.cachedGetCampaignResponses[n]=t}).finally(function(){i.cachedGetCampaignPromises[n]=null}),this.cachedGetCampaignPromises[n])},t.prototype.getCampaignsData=function(n){var i=this;return this.cachedGetCampaignPromises[n]?this.cachedGetCampaignPromises[n]:this.cachedGetCampaignResponses[n]?this.$q.resolve(this.cachedGetCampaignResponses[n]):(this.cachedGetCampaignPromises[n]=this.ajax.get({serviceName:t.serviceName,operationName:"GLOBAL.CAMPAIGNS.GETCAMPAIGNDATA",data:{surfacesNames:n},parentOperationName:"GetCampaignDataV2",url:this.requestRoot+"campaigns-data",dataType:"auto"}),this.cachedGetCampaignPromises[n].then(function(t){i.cachedGetCampaignResponses[n]=t}).finally(function(){i.cachedGetCampaignPromises[n]=null}),this.cachedGetCampaignPromises[n])},t.prototype.getCampaignBatchData=function(n,i){var r=this;return this.cachedGetCampaignPromises[n]?this.cachedGetCampaignPromises[n]:this.cachedGetCampaignResponses[n]?this.$q.resolve(this.cachedGetCampaignResponses[n]):(this.cachedGetCampaignPromises[n]=this.ajax.get({serviceName:t.serviceName,operationName:"GLOBAL.CAMPAIGNS.GETCAMPAIGNDATA",data:{surfaceName:n,batchCount:i},parentOperationName:"GetCampaignDataV2",url:this.requestRoot+"campaign-batch-data",dataType:"auto"}),this.cachedGetCampaignPromises[n].then(function(t){r.cachedGetCampaignResponses[n]=t}).finally(function(){r.cachedGetCampaignPromises[n]=null}),this.cachedGetCampaignPromises[n])},t.prototype.fireIrisBeacon=function(t){var r=n.Utilities.enforceSecureUrl(t),i;return r?(i=document.createElement("img"),i.onerror=i.onload=i.onabort=function(){i.onerror=i.onload=i.onabort=null;i.src=""},i.src=r,i):null},t.$inject=["portalAjaxServiceAngular","$q"],t.serviceName="PromotionService",t}();angular.module("commonModule").service("promotionService",t)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(n,t,i,r,u){n.preventDefault();var f=r.href(""+t.name,i);u.location.assign(f)}angular.module("commonModule").run(["$state","$rootScope","$window",function(t,i,r){i.$on("$stateChangeStart",function(i,u,f){u.redirectReact&&n(i,u,f,t,r)})}])})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(n,t){this.$promise=n;this.$window=t;this.errorPrefix="scriptLoaderService: ";this.promiseCache={}}return n.prototype.loadScript=function(n,t){var u=this,r,i,f;if(!n)throw new Error(this.errorPrefix+"scriptUrl is invalid");if(this.promiseCache[n])return this.promiseCache[n];if(r=this.$promise.defer(),this.promiseCache[n]=r.promise,i=this.$window.document.createElement("script"),i.src=n,i.onload=i.onreadystatechange=function(){i.onload=i.onreadystatechange=null;r.resolve()},i.onerror=function(){i.onerror=null;r.reject(u.errorPrefix+"unable to load "+n)},f=t?this.$window.document.querySelector(t):this.$window.document.body,!f)throw new Error(this.errorPrefix+"unable to insert script tag into the dom");return f.appendChild(i),r.promise.finally(function(){u.promiseCache[n]&&delete u.promiseCache[n]})},n.$inject=["$q","$window"],n}();angular.module("commonModule").service("scriptLoaderService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__spreadArrays=this&&this.__spreadArrays||function(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f++)u[f]=e[t];return u},function(n){var t;(function(t){var i;(function(t){var i;(function(t){var r=function(){function n(t,i,r,u){var f=this;this.telemetryService=t;this.logger=i;this.$timeout=r;this.$window=u;this.reconnectionDelayMsec=5e3;this.queuedServerCallbacks=[];this.onConnectedCallbacks=[];$.connection.hub.stateChanged(function(t){var i=$.connection.hub.lastError&&$.connection.hub.lastError.message;switch(t.newState){case 4:f.logger.trace(n.loggerId,"Disconnected",i);f.$timeout(f.reconnectionDelayMsec).then(function(){return f.start()});break;case 0:f.logger.trace(n.loggerId,"Connecting");break;case 1:for(f.logger.trace(n.loggerId,"Connected");f.queuedServerCallbacks.length>0;)f.queuedServerCallbacks.shift()();f.onConnectedCallbacks.slice(0).forEach(function(n){return n()});break;case 2:f.logger.trace(n.loggerId,"Reconnecting",i)}})}return Object.defineProperty(n.prototype,"isConnected",{get:function(){return $.connection.hub.state===1},enumerable:!1,configurable:!0}),n.prototype.getWindow=function(){return this.$window},n.prototype.onConnected=function(n){this.onConnectedCallbacks.push(n)},n.prototype.unsubscribeOnConnected=function(n){this.onConnectedCallbacks=this.onConnectedCallbacks.filter(function(t){return t!==n})},n.prototype.start=function(){$.connection.hub.state===4&&$.connection.hub.start()},n.prototype.restart=function(){$.connection.hub.stop();this.start()},Object.defineProperty(n.prototype,"familyHub",{get:function(){return this._familyHub||(this._familyHub=new i("FamilyHub",$.connection.familyHub,this))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"servicesHub",{get:function(){return this._servicesHub||(this._servicesHub=new i("ServicesHub",$.connection.servicesHub,this))},enumerable:!1,configurable:!0}),n.$inject=["telemetryService","loggingService","$timeout","$window"],n.loggerId="SignalREvent",n}(),i,u,f;t.SignalRService=r;i=function(){function n(n,t,i){this.hubName=n;this.hub=t;this.service=i;this.handlers=[];this.loggerId=r.loggerId+" - "+this.hubName}return n.prototype.subscribe=function(n,t){var i=this;this.hub.client[n]||(this.handlers[n]=[],this.hub.client[n]=function(){i.service.logger.trace(i.loggerId,"Event received:",n);i.handlers[n].slice(0).forEach(function(n){return n()})},this.service.restart());this.handlers[n].push(t);this.service.logger.trace(this.loggerId,"Event subscribed:",n)},n.prototype.unsubscribe=function(n,t){if(this.hub.client[n]){var i=this.handlers[n].length;this.handlers[n]=this.handlers[n].filter(function(n){return n!==t});this.handlers[n].length!==i&&this.service.logger.trace(this.loggerId,"Event unsubscribed:",n)}},n.prototype.send=function(n){for(var r=this,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];this.service.isConnected?this.sendEvent.apply(this,__spreadArrays([n],i)):(this.service.queuedServerCallbacks.push(function(){return r.sendEvent.apply(r,__spreadArrays([n],i))}),this.service.start())},n.prototype.sendEvent=function(n){for(var e,r,u,t=this,f=[],i=1;i<arguments.length;i++)f[i-1]=arguments[i];this.service.telemetryService.portalCv.incrementCv();e={CV:this.service.telemetryService.portalCv.getCurrentCvValue(),CC:this.service.telemetryService.portalCc.serialize(),Referrer:this.service.telemetryService.portalBi.getCurrentLocation()};r=(new Date).getTime();(u=this.hub.server[n]).call.apply(u,__spreadArrays([this,e],f)).done(function(){t.reportOutgoingApi(n,undefined,r);t.service.logger.trace(t.loggerId,"Event sent:",n)}).fail(function(i){t.reportOutgoingApi(n,i,r);t.service.logger.trace(t.loggerId,"Event sent FAILED:",n+". "+i)})},n.prototype.reportOutgoingApi=function(n,t,i){var r="SIGNALR."+this.hubName.toUpperCase()+"."+n.toUpperCase();this.service.telemetryService.portalQos.reportOutgoingApi({operationName:r,currentOperationName:n,isSuccess:!t,errorMessage:t,latencyMs:(new Date).getTime()-i,requestUri:this.service.getWindow().origin+"/signalr",serviceName:"MeePortal",serviceType:"SignalR",httpMethod:"WebSocket",serviceErrorCode:t?500:-1,httpStatusCode:t?"500":"200",contentType:"application/json"})},n}();t.PortalSignalRHub=i;u=function(){function n(){this.noopHub=new f}return n.prototype.onConnected=function(){},n.prototype.unsubscribeOnConnected=function(){},Object.defineProperty(n.prototype,"servicesHub",{get:function(){return this.noopHub},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"familyHub",{get:function(){return this.noopHub},enumerable:!1,configurable:!0}),n}();t.NoopSignalRService=u;f=function(){function n(){}return n.prototype.subscribe=function(){},n.prototype.unsubscribe=function(){},n.prototype.send=function(){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},n.prototype.sendPersistent=function(){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return-1},n.prototype.stopSendPersistent=function(){},n}();angular.module("commonModule").service("signalRService",n.Utilities.isInFlight("GSignalR")?r:u)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){function n(n){return{portalBi:n.portalBi,portalQos:n.portalQos,portalClientPerf:n.portalClientPerf,portalScenarios:n.portalScenarios,portalCv:n.portalCv,portalCc:n.portalCc}}function t(){return function(n){throw n;}}n.$inject=["$window"];angular.module("commonModule").service("telemetryService",n).factory("$exceptionHandler",t)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t=function(){function t(n,t){this.commonConfig=n;this.formatString=t}return t.prototype.updateSessionId=function(){angular.element("#threatmetrix").attr("src",this.formatString(this.commonConfig.threatMetrixUrlFormat,n.Utilities.generateGuid()))},t.$inject=["commonConfig","stringFormatFilter"],t}();angular.module("commonModule").service("threatMetrixService",t)})(i=t.Services||(t.Services={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){var n=function(){function n(){}return n.prototype.parseTimeSpan=function(n){if(typeof n!="string")return n;var t=n.match(/^(?:(\d+)\.)?(\d\d):(\d\d):(\d\d)(\.\d+)?$/);return t?{Days:+t[1]||0,Hours:+t[2],Minutes:+t[3],Seconds:+t[4],Milliseconds:+t[5]*1e3||0}:null},n.$inject=[],n}();angular.module("commonModule").service("timeSpanService",n)})(t=n.Services||(n.Services={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){function r(n,t,r){var f,u;i&&(i.result=2,i.customData.errorMessage=r.message,i.customData.stackTrace=r.stack,i.__finish());f=n.getActiveComponentOperations();f.forEach(function(n){n.result=2;n.customData.errorMessage=r.message;n.customData.stackTrace=r.stack;n.__finish()});u=n.getCurrentPage();u&&(u.customData.stackTrace=r.stack,n.finishCurrentPage({success:!1}))}function f(){return i}var i,u=angular.module("clientReliabilityModule",[]).config(["$provide",function(n){n.decorator("$exceptionHandler",["$delegate","$injector",function(n,t){return function(i,u){var f=t.get("pageReliabilityService"),e=t.get("componentReliabilityService");r(f,e,i);n(i,u)}}])}]);u.run(["$rootScope","pageReliabilityService","componentReliabilityService","performanceService",function(t,r,u,f){var e;i=u.trackComponentOperation(n.Telemetry.portalAreaName+".app",2e4);e=t.$on("$stateChangeStart",function(){var t,n;i.customData.startTime=i.getStartTime();i.customData.endTime=f.nowOrNaN();t=i.customData.endTime;i.durationMs=t;i.result=1;i.__finish();n=r.getCurrentPage();n&&(n.customData.alt=t,n.kind="application",i=null);e()})}]);t.getApplicationLoadOperation=f})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){var r="Ms.Osgs.ClientReliability",u=function(){function n(n,t,i,r,u,f,e){var o=this;this.name=n;this.timeoutMs=t;this.$timeout=i;this.logger=r;this.eventLogger=u;this.performanceService=f;this.pageOperation=e;this.result=0;this.kind="component";this.customData={};this.loggerId="ComponentOperation";this.__finish=function(){o.isFinished()||(o.$timeout.cancel(o.timeoutPromise),o.timeoutPromise=null,o.durationMs||(o.durationMs=o.performanceService.nowOrNaN()-o.startTime),o.eventLogger.reportEvent(o),o.logger.trace(o.loggerId,"Component finishes",o.name))};this.getStartTime=function(){return o.startTime};this.isFinished=function(){return!o.timeoutPromise};this.startTime=this.performanceService.nowOrNaN();this.timeoutPromise=this.$timeout(function(){r.trace(o.loggerId,"Component timeout",n);o.result=4;o.__finish()},t);r.trace(this.loggerId,"Component starts",n)}return n.prototype.getPageOperation=function(){return this.pageOperation},n}(),i=function(){function t(t,i,f,e){var o=this;this.$timeout=t;this.telemetryService=i;this.logger=f;this.performanceService=e;this.loggerId="ComponentOperation";this.trackComponentOperation=function(n,t,i){return new u(n,t,o.$timeout,o.logger,o,o.performanceService,i)};this.reportEvent=function(t){var u,f,e;if(t&&t.isFinished()){var s={name:r,content:{}},h=n.Telemetry.portalAreaName||"default",i=t.name;t.kind==="component"&&(u=t.getPageOperation(),i=u&&u.name||"unknown");s.content[r]={uri:o.telemetryService.portalBi.getCurrentLocation(),referrerUri:o.telemetryService.portalBi.getCurrentReferrer(),pageName:i,area:h,name:t.name,result:t.result,durationMs:t.durationMs,kind:t.kind,data:JSON.stringify(t.customData,o.$errorSerializer)};o.telemetryService.portalQos.reportRawEvent(s);t.result===3&&t.kind==="component"&&o.logger.trace(o.loggerId,"Component "+t.name+" was cancelled. If it was specified as a requiredComponent on the "+i+" page, then its QoS will be impacted.");switch(t.kind){case"application":case"page":f={loadTimeMsec:t.durationMs||0};"application"===t.kind&&(f.application={loadTimeMsec:t.customData.alt||0});e=[{name:"area",value:h},{name:"pageName",value:i},{name:"result",value:t.result}];t.result!==1&&t.kind==="page"&&e.push({name:"failedRequiredComponent",value:t.customData.componentsNotLoaded});o.telemetryService.portalClientPerf.reportViewPerformanceMetrics(f,e)}}}}return t.prototype.$errorSerializer=function(n,t){if(t instanceof Error){var i={};return Object.getOwnPropertyNames(t).forEach(function(n){i[n]=t[n]}),i}return t},t}();t.ComponentReliabilityService=i;i.$inject=["$timeout","telemetryService","loggingService","performanceService"];angular.module("clientReliabilityModule").service("componentReliabilityService",i)})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t=function(){function t(n,t,i,r,u,f){var e=this;this.componentReliabilityService=n;this.telemetryService=t;this.$rootScope=i;this.$timeout=r;this.$state=u;this.$q=f;this.activeComponentOperations=[];this.loadedComponents=[];this.requiredComponents=[];this.optionalComponents=[];this.expectedTransitions=[];this.ignoreCancelledComponents=!1;i.$on("$stateChangeStart",function(n,t,i,r,u){e.onUiStateChangeStart(t,i,r,u)});i.$on("$stateChangeSuccess",function(n,t,i,r,u){e.onUiStateChangeSuccess(t,i,r,u)})}return t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.finishCurrentPage=function(n){this.currentPage&&!this.currentPage.isFinished()&&(this.currentPage.result=n.success?1:2,this.currentPage.__finish())},t.prototype.trackComponentOperation=function(n,i){if(i===void 0&&(i=t.DefaultComponentTimeoutMsec),!n)return null;if(this.requiredComponents.indexOf(n)===-1&&this.optionalComponents.indexOf(n)===-1)throw new Error(this.currentPage.name+" - Please add Component: "+n+" to either requiredComponents or optionalComponents in route registration.");var r=this.componentReliabilityService.trackComponentOperation(n,i,this.currentPage);return this.activeComponentOperations.push(r),r},t.prototype.addRequiredComponentName=function(n){this.requiredComponents.push(n)},t.prototype.finishComponent=function(n,t){if(n&&!n.isFinished()){n.result=t||2;n.__finish();this.removeItemIfExist(this.activeComponentOperations,n);n.result===1&&this.loadedComponents.push(n.name);var i=this.requiredComponents.indexOf(n.name);if(i!==-1){if(n.result!==1&&!(n.result===3&&this.ignoreCancelledComponents)){this.setFailedComponentInformationForTracking();this.finishCurrentPage({success:!1});return}this.requiredComponents.splice(i,1)}this.finishCurrentPageWhenAllRequiredComponentsLoaded()}},t.prototype.destroyComponent=function(n){var t=this;n&&this.$timeout().then(function(){n.isFinished()||(t.$state.current._isFatalErrorPage?t.finishComponent(n,2):(n.result=3,n.__finish()));t.removeItemIfExist(t.getLoadedComponents(),n.name)})},t.prototype.getActiveComponentOperations=function(){return this.activeComponentOperations},t.prototype.getLoadedComponents=function(){return this.loadedComponents},t.prototype.getComponentNameFromDomElement=function(n){return n.attr("data-rid")||n.attr("id")||""},t.prototype.overrideDefaultTimeout=function(n){t.DefaultComponentTimeoutMsec=n;t.DefaultPageTimeoutMsec=n},t.prototype.getDefaultComponentTimeout=function(){return t.DefaultComponentTimeoutMsec},t.prototype.completeOrCancelCurrentPageIfNotFinished=function(n){this.currentPage&&!this.currentPage.isFinished()&&(this.expectedTransitions.indexOf(n.name)===-1?(this.currentPage.result=3,this.setFailedComponentInformationForTracking()):this.currentPage.result=1,this.currentPage.__finish())},t.prototype.removeItemIfExist=function(n,t){var i=n.indexOf(t);i!==-1&&n.splice(i,1)},t.prototype.isAllRequiredComponentLoaded=function(){return this.requiredComponents.length===0},t.prototype.finishCurrentPageWhenAllRequiredComponentsLoaded=function(){this.isAllRequiredComponentLoaded()&&this.finishCurrentPage({success:!0})},t.prototype.ignoreStateChange=function(n,t){return n.data&&n.data.alwaysLogPageView?!1:!n.url&&n.name.indexOf(t.name)>-1?!0:this.lastKnownUrl===n.url&&angular.equals(n.params,this.lastKnownStateParams)?!0:!1},t.prototype.prepareComponentLists=function(n){var t,i,r;n&&(n.data&&(n.data.hasOwnProperty("requiredComponents")&&n.data.requiredComponents&&(t=this.requiredComponents).push.apply(t,n.data.requiredComponents),n.data.hasOwnProperty("optionalComponents")&&n.data.optionalComponents&&(i=this.optionalComponents).push.apply(i,n.data.optionalComponents),n.data.hasOwnProperty("expectedTransitions")&&n.data.expectedTransitions&&(r=this.expectedTransitions).push.apply(r,n.data.expectedTransitions)),this.prepareComponentLists(n.parent))},t.prototype.defaultBiPageView=function(t){return{path:"/"+n.Telemetry.portalAreaName+"/"+t.name.replace(".","/"),viewId:n.Telemetry.portalAreaName+"."+t.name}},t.prototype.onUiStateChangeStart=function(i,r,u,f){var o=this,s,h,e,c,l;this.ignoreStateChange(i,u)||(s=this.findStateWithUrl(i),this.completeOrCancelCurrentPageIfNotFinished(i),this.expectedTransitions=[],this.requiredComponents=[],this.optionalComponents=[],h=(n.Telemetry.portalAreaName||"default")+"."+s.name,this.currentPage=this.componentReliabilityService.trackComponentOperation(h,t.DefaultPageTimeoutMsec,null),this.currentPage.kind="page",e=this.$q.defer(),i.data&&i.data.pageReadyEvent?(c=this.$timeout(function(){return e.reject()},t.DefaultPageTimeoutMsec),l=this.$rootScope.$on(i.data.pageReadyEvent,function(){o.$timeout.cancel(c);e.resolve()}),e.promise.finally(function(){return l()})):e.resolve(),e.promise.finally(function(){var n;n=i.data&&i.data.biPageView?i.data.biPageView(i,r,u,f):o.defaultBiPageView(i,r,u,f);o.telemetryService.portalBi.reportSpaPageView(n)}))},t.prototype.onUiStateChangeSuccess=function(n,t,i){var r=this,u;this.ignoreStateChange(n,i)||(u=this.findStateWithUrl(n),this.lastKnownUrl=u.url&&u.url.toString(),this.lastKnownStateParams=angular.copy(n.params),this.prepareComponentLists(this.$state.$current),this.ignoreCancelledComponents=n.data&&n.data.ignoreCancelledComponents,this.requiredComponents.length>0?this.$timeout(function(){for(var n=r.requiredComponents.length-1;n>=0;n--)r.getLoadedComponents().indexOf(r.requiredComponents[n])!==-1&&r.requiredComponents.splice(n,1);r.finishCurrentPageWhenAllRequiredComponentsLoaded()}):this.finishCurrentPageWhenAllRequiredComponentsLoaded())},t.prototype.findStateWithUrl=function(n){if(n._isFatalErrorPage)return n;for(var t=n.name||"undefined";n.url!=="^";){if(n.url)return n;n=this.$state.get("^",n)}throw new Error('state "'+t+'" does not roll up to a state with a URL.');},t.prototype.setFailedComponentInformationForTracking=function(){this.currentPage.customData||(this.currentPage.customData={});this.currentPage.customData.componentsNotLoaded=this.requiredComponents},t.$inject=["componentReliabilityService","telemetryService","$rootScope","$timeout","$state","$q"],t.DefaultPageTimeoutMsec=15e3,t.DefaultComponentTimeoutMsec=15e3,t}();angular.module("clientReliabilityModule").service("pageReliabilityService",t)})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.$window=n}return n.prototype.nowOrNaN=function(){return this.$window.performance&&this.$window.performance.now?this.$window.performance.now():NaN},n.$inject=["$window"],n}();n.PerformanceService=t;angular.module("clientReliabilityModule").service("performanceService",t)})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(t,i,r){return function(u){var f=function(t){function i(n){for(var r,u=[],i=1;i<arguments.length;i++)u[i-1]=arguments[i];return r=t.apply(this,u)||this,r.pageReliabilityService=n,r}return __extends(i,t),i.prototype.$onInit=function(){var i=this,r,u;if(t.prototype.$onInit)throw new Error("$onInit is not supported, please use componentOnInit instead.");if(!this.componentOnInit)throw new Error("componentOnInit is not defined, please implement IComponentReliability interface.");if(!this.getInstrumentationComponentName)throw new Error("getInstrumentationComponentName is not defined, please implement IComponentReliability interface.");this.componentOperation=this.pageReliabilityService.trackComponentOperation(this.getInstrumentationComponentName());r=this.getCustomOperationData&&this.getCustomOperationData()||{};n.InstrumentedComponentHelper.setCustomOperationData(r,this.componentOperation);u=this.componentOnInit();n.InstrumentedComponentHelper.isAngularPromise(u)?u.then(function(){r=i.getCustomOperationData&&i.getCustomOperationData()||{};n.InstrumentedComponentHelper.setCustomOperationData(r,i.componentOperation);i.pageReliabilityService.finishComponent(i.componentOperation,1)},function(t){r=i.getCustomOperationData&&i.getCustomOperationData()||{};r.error=t;n.InstrumentedComponentHelper.setCustomOperationData(r,i.componentOperation);i.pageReliabilityService.finishComponent(i.componentOperation,2)}):(r=this.getCustomOperationData&&this.getCustomOperationData()||{},n.InstrumentedComponentHelper.setCustomOperationData(r,this.componentOperation),this.pageReliabilityService.finishComponent(this.componentOperation,1),console.warn("instrumentedComponent: Instrumented components should return a promise in componentOnInit(). If your component does not retrieve any data or your component does not need to be instrumented, consider using the Component decorator instead."))},i.prototype.$onDestroy=function(){t.prototype.$onDestroy&&t.prototype.$onDestroy.call(this);this.pageReliabilityService.destroyComponent(this.componentOperation)},i.dependencies=["pageReliabilityService"],i.$inject=u.$inject?i.dependencies.concat(u.$inject):i.dependencies,i}(u);return angular.module(t).component(i,angular.extend(r,{controller:f})),f}}n.InstrumentedComponent=t})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return!!n&&!!n.then&&!!n.catch&&!!n.finally}function i(n,t){if(t){t.customData={};for(var i in n)t.customData[i]=n[i]}}n.isAngularPromise=t;n.setCustomOperationData=i})(t=n.InstrumentedComponentHelper||(n.InstrumentedComponentHelper={}))})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__spreadArrays=this&&this.__spreadArrays||function(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f++)u[f]=e[t];return u},function(n){var t;(function(n){var t;(function(n){var t;(function(n){function i(t,i,r,u,f,e,o,s){var l,c=o||{},v=s?s:r.getDefaultComponentTimeout(),h=i.trackComponentOperation(f+":"+e,v);n.InstrumentedComponentHelper.setCustomOperationData(c,h);try{l=t()}catch(a){h.result=2;c.error=a;n.InstrumentedComponentHelper.setCustomOperationData(c,h);h.__finish();throw a;}return n.InstrumentedComponentHelper.isAngularPromise(l)?l.then(function(n){return h.result=1,u.resolve(n)}).catch(function(n){return h.result=2,c.error=n,u.reject(n)}).finally(function(){n.InstrumentedComponentHelper.setCustomOperationData(c,h);h.__finish()}):(h.result=1,n.InstrumentedComponentHelper.setCustomOperationData(c,h),h.__finish(),l)}function r(n){t=n}function u(n,r){return function(u,f){var e=u[f];return u[f]=function(){for(var u,s,h,c=this,o=[],f=0;f<arguments.length;f++)o[f]=arguments[f];if(u=t,u||(u=angular.element(document.querySelector(".ng-scope")).injector()),!u||!u.invoke)throw new Error("Could not obtain AngularJS injector instance. For unit tests call __overrideInstrumentedComponentOperationInjectorForTests() before the component is initialized.");if(!this.getInstrumentationComponentName)throw new Error("Instrumented Component Operation: Make sure the class has implemented the IComponentReliabilityOperations interface.");return s=e.bind.apply(e,__spreadArrays([this],o)),h=this.getCustomOperationData&&this.getCustomOperationData(),u.invoke(["pageReliabilityService","componentReliabilityService","$q",function(t,u,f){return i(s,u,t,f,c.getInstrumentationComponentName(),n,h,r)}])}}}var t;n.__overrideInstrumentedComponentOperationInjectorForTests=r;n.InstrumentedComponentOperation=u})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){function f(t){return function(r){var c=t.get("$state"),e=t.get("$log"),l=t.get("$timeout"),o=t.get("$window"),a=t.get("pageReliabilityService");r.stack?e.error(r.stack):e.error("Unhandled exception occurred, but no stack information was provided.");o.portalUnhandledException&&i.unhandledErrors||(o.portalUnhandledException=r.stack||r.message);try{var f=/\/([^/]+\.js):(\d+):\d+/.exec(r.stack||""),s="",h=0;f&&(s=f[1],h=parseInt(f[2]));n.Telemetry.globalErrorLoggingHandler(s,r.message,h,r.stack)}finally{i.unhandledErrors++;i.pendingSwitchToFatalErrorState||(i.pendingSwitchToFatalErrorState=l(1e3).then(function(){var n=i.unhandledErrors!==0;i={unhandledErrors:0,pendingSwitchToFatalErrorState:null};n&&(a.finishCurrentPage({success:!1}),c.go(u))}))}}}var i;t.moduleName="unhandledExceptionHandlerModule";var u="fatalError",r=angular.module(t.moduleName,["ui.router","ngRoute"]).config(["$stateProvider",function(n){n.state(u,{template:"<fatal-error><\/fatal-error>",_isFatalErrorPage:!0,params:{_modalDismissQuietly:!0},allowAnonymous:!0})}]).config(["$qProvider",function(n){n.errorOnUnhandledRejections(!1)}]),e={data:{title:"",summary:""}};r.constant("fatalErrorCmsContent",e);r.run(["portalAjaxServiceAngular",function(n){n.get({serviceName:"MeePortal",operationName:"GetFatalErrorPageContent",url:"/CmsContent/fatalError",contentType:"application/json"}).then(function(n){e.data=n.data})}]);i={unhandledErrors:0};r.run(["$rootScope","$meeWatchOperationProgress",function(n,t){t(n,function(n,t){t==="failed"&&i.unhandledErrors--})}]);r.run(["$rootScope","$window",function(n,t){n.$on("$stateChangeStart",function(n,i){i.name!==u&&(t.portalUnhandledException=undefined)})}]);t.portalExceptionHandlerFactory=f;f.$inject=["$injector"];r.factory("$exceptionHandler",f)})(i=t.UnhandledExceptionHandler||(t.UnhandledExceptionHandler={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t){var i=this;this.fatalErrorCmsContent=n;this.telemetryService=t;this.$onInit=function(){angular.element("#site-footer").show()};this.getCurrentCvValue=function(){return i.telemetryService.portalCv.getCurrentCvValue()}}return n.$inject=["fatalErrorCmsContent","telemetryService"],n}();angular.module(n.moduleName).component("fatalError",{template:'<div class="full-height">\n                      <header class="page-title-header text-center">\n                        <h1 mee-heading="heading2" id="error-title" class="text-center-align">{{$ctrl.fatalErrorCmsContent.data.title}}<\/h1>\n                        <p mee-heading="subheading2" id="error-summary" class="text-center-align">{{$ctrl.fatalErrorCmsContent.data.summary}}<\/p>\n                      <\/header>\n                      <div>\n                        <p mee-paragraph="para3" class="text-center-align">TraceId: {{$ctrl.getCurrentCvValue()}}<\/p>\n                     <\/div>\n                  <\/div>\n                ',controller:t})})(t=n.UnhandledExceptionHandler||(n.UnhandledExceptionHandler={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(){function t(n,t,i,r,u,f,e){var o=this;this.$window=n;this.$promise=t;this.$templateRequest=i;this.$compile=r;this.telemetryService=u;this.$element=f;this.$scope=e;this.pins=[];this.pinPopup=null;this.refreshMap=function(n){o.hidePinPopup();o.map.layers.clear();o.locations=[];o.loadLocationsAsync().then(function(){if(o.locations.length){var t=n&&n.latitude||o.locations[0].latitude,i=n&&n.longitude||o.locations[0].longitude;o.map.setView({center:new Microsoft.Maps.Location(t,i)})}})};this.resized=function(){var t=o.hostElement.width(),n=t/1.78;o.onGetMapHeight&&(n=o.onGetMapHeight({width:t})||n);o.hostElement.height(n);o.hidePinPopup()};this.hidePinPopup=function(){o.pinPopup&&o.pinPopup.setMap(null)};this.pinClicked=function(n,t){var r,i;(o.hidePinPopup(),r=t instanceof Array?_.map(t,function(n){return n.data||n}):t.data||t,i=o.onGetPopupHtmlContent&&o.onGetPopupHtmlContent({location:r}),i)&&o.showPinPopup(n,i)};this.showPinPopup=function(n,t){var f=t.adjustLocation,e=t.model,r=t.template,u=function(t){o.showPinPopupHtmlTemplate(t);o.positionPinPopup(n,f);o.setPinPopupContent(t,e)},i;r?(i=o.$promise.defer(),i.resolve(r),i.promise.then(u)):o.$templateRequest(t.templateUrl).then(u)};this.positionPinPopup=function(n,t){var f={x:o.hostElement.width(),y:o.hostElement.height()},e=o.getPinPopupElement().outerWidth(),r=o.map.tryLocationToPixel(n,Microsoft.Maps.PixelReference.control),i=t&&t(f,e,r),u;i&&i.anchorPoint?(u=o.map.tryPixelToLocation(new Microsoft.Maps.Point(i.anchorPoint.x,i.anchorPoint.y),Microsoft.Maps.PixelReference.control),o.pinPopup.setLocation(u)):o.pinPopup.setLocation(n);o.pinPopup.setOptions({offset:i&&i.pinOffset&&new Microsoft.Maps.Point(i.pinOffset.x,i.pinOffset.y)});i&&i.centerMap&&(i&&i.mapCenterOffset&&(r.x+=i.mapCenterOffset.x,r.y+=i.mapCenterOffset.y),o.map.setView({center:o.map.tryPixelToLocation(r,Microsoft.Maps.PixelReference.control)}))};this.setPinPopupContent=function(n,t){var i,r,u;o.showPinPopupHtmlTemplate(n);i=o.$scope.$new(!0,o.$scope);i.model=t;r=o.getPinPopupElement();u=o.$compile(r.contents())(i)};this.showPinPopupHtmlTemplate=function(n){o.pinPopup.setOptions({htmlContent:n});o.pinPopup.setMap(o.map)};this.getPinPopupElement=function(){return angular.element(".pin-popup",o.hostElement)};this.loadLocationsAsync=function(){var n=o.$promise.defer();return o.onLoadLocations?o.onLoadLocations().then(function(t){o.locations=t||[];o.convertLocationsToPins();o.displayPins(!1);n.resolve()}):n.reject(),n.promise};this.addLocationsToMap=function(n){var t;n&&n.length&&(o.hidePinPopup(),(t=o.locations).push.apply(t,n),o.convertLocationsToPins(),o.displayPins(!0))};this.convertLocationsToPins=function(){o.pins=[];_.each(o.locations,function(n){var i=new Microsoft.Maps.Location(n.latitude,n.longitude),t=new Microsoft.Maps.Pushpin(i,{icon:n.icon&&n.icon.url,title:n.data&&n.data.title,subTitle:n.data&&n.data.subtitle});t.metadata=n;o.pins.push(t);Microsoft.Maps.Events.addHandler(t,"click",function(){o.onPinClicked&&o.onPinClicked({location:n.data||n})||o.pinClicked(i,n)})})};this.displayPins=function(n){var t,r,i;n&&o.map.layers.clear();1===o.options.viewType?(t=angular.copy(o.options.clusterLayerOptions||{}),r=t.clusteredPinCallback,t.clusteredPinCallback=function(n){return o.setupClusteredPin(n,r)},o.map.layers.insert(new Microsoft.Maps.ClusterLayer(o.pins,t))):(i=new Microsoft.Maps.Layer,i.setPrimitives(o.pins),o.map.layers.insert(i))};this.setupClusteredPin=function(n,t){Microsoft.Maps.Events.addHandler(n,"click",function(t){var u=_.map(n.containedPushpins,function(n){var t=n.metadata;return t.data||t}),r,i,f,e,s;if(n.containedPushpins){for(r=[],i=0,f=n.containedPushpins.length;i<f;i++)e={latitude:n.containedPushpins[i].metadata.latitude,longitude:n.containedPushpins[i].metadata.longitude},r.push(e);s=Microsoft.Maps.LocationRect.fromLocations(r);o.map.setView({bounds:s,padding:100})}o.onPinClicked&&o.onPinClicked({location:u})||o.pinClicked(t.location,u)});t&&t(n)};this.reportBingMapsInitialization=function(n,t){var i=n?200:503;o.telemetryService.portalQos.reportOutgoingApi({isSuccess:n,latencyMs:(new Date).getTime()-t,requestUri:o.telemetryService.portalBi.getCurrentLocation(),serviceName:"BingMaps",operationName:"Initialization",currentOperationName:"ControlInitialization",httpMethod:"GET",serviceErrorCode:i,httpStatusCode:i.toString()})}}i=t;t.prototype.getInstrumentationComponentName=function(){return"shared.mee-bing-maps"};t.prototype.componentOnInit=function(){var t=this,o=(new Date).getTime(),f=this.$promise.defer(),r,u,e;return this.locations=[],this.hostElement=this.$element.find(".maps-host"),r=[],1===this.options.viewType&&r.push("Microsoft.Maps.Clustering"),u=this.$promise.when(n.BingMapWaiter.onInit()),r.length&&(e=this.$promise.defer(),u=u.then(function(){return Microsoft.Maps.loadModule(r,function(){e.resolve()}),e.promise})),u.then(function(){t.map=new Microsoft.Maps.Map(t.hostElement.get(0),{credentials:t.options.apiKey,mapTypeId:t.options.mapType||Microsoft.Maps.MapTypeId.road,showDashboard:!!t.options.showDashboard,showScalebar:!!t.options.showScalebar,showZoomButtons:!!t.options.showZoomButtons,showMapTypeSelector:!!t.options.showMapTypeSelector,showLocateMeButton:!!t.options.showLocateMeButton,zoom:t.options.zoom,minZoom:t.options.minZoom,maxZoom:t.options.maxZoom});t.pinPopup=new Microsoft.Maps.Infobox(t.map.getCenter());Microsoft.Maps.Events.addHandler(t.map,"viewchangestart",t.hidePinPopup);t.$window.addEventListener("resize",function(){return t.resized()});t.resized();t.$scope.$on(i.RefreshMapEvent,function(){return t.refreshMap()});t.$scope.$on(i.AddLocationsMapEvent,function(n,i){return t.addLocationsToMap(i)});t.$scope.$on(i.ClosePinPopupEvent,function(){return t.hidePinPopup()});t.$scope.$on(i.RefreshMapSetViewEvent,function(n,i){return t.refreshMap(i)});t.reportBingMapsInitialization(!0,o);t.refreshMap();f.resolve()}).catch(function(n){t.reportBingMapsInitialization(!1,o);t.onMapInitializerError();f.reject(n)}),f.promise};var i;return t.$inject=["$window","$q","$templateRequest","$compile","telemetryService","$element","$scope"],t.RefreshMapEvent="refreshMap",t.AddLocationsMapEvent="addLocationsToMap",t.ClosePinPopupEvent="closePinPopup",t.RefreshMapSetViewEvent="refreshMapSetView",i=__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent("commonModule","meeBingMaps",{bindings:{options:"=",onMapInitializerError:"&",onLoadLocations:"&",onPinClicked:"&",onGetPopupHtmlContent:"&",onGetMapHeight:"&"},template:'<div class="maps-host"><\/div>'})],t)}();t.BingMapsComponent=i})(i=t.Components||(t.Components={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r;(function(){var i=function(){function i(n,t,i,r,u,f,e){this.$window=n;this.catpchaConfig=t;this.commonConfig=i;this.scriptLoader=r;this.formatString=u;this.$element=f;this.componentRegistryService=e;this.errorPrefix="captchaComponent: ";this.captchaScriptsId="captcha-challenge-scripts";this.componentClassName="Captcha";this.isHipClientLoaded=!1;this.isReloaded=!1}return i.prototype.getInstrumentationComponentName=function(){return"captcha.component"},i.prototype.componentOnInit=function(){var r=this,t,i;return this.setupGlobals(),t=Math.random(),this.flowId=n.Utilities.generateGuid().replace(new RegExp("-","g"),""),this.componentRegistryService.register(this.componentClassName,this.componentId,this),i=this.formatString(this.catpchaConfig.javascriptUrlFormat,[this.catpchaConfig.javascriptUrlDomain,this.commonConfig.userCulture,this.flowId,this.catpchaConfig.scenarioId,t]),this.$window.addEventListener("resize",function(){return r.resizeCaptcha()}),this.resizeCaptcha(),this.scriptLoader.loadScript(i,"#"+this.captchaScriptsId)},i.prototype.$onDestroy=function(){this.$window.removeEventListener("resize",this.resizeCaptcha)},i.prototype.resizeCaptcha=function(){var n=this.$element.find("#captcha-challenge"),t=this.$element.find(".hip-input");t&&n&&n.width()&&t.css("width",n.width())},i.prototype.verify=function(){var t=this,n;if(!this.isHipClientLoaded)throw new Error("The captcha element is not initialized.");return n=null,WebHip.verify(function(i,r){WebHip.clientValidation();var u=!0;WebHip.error!==0&&(t.reload(),u=!1);n={isSuccess:u,solution:i,hid:r,flowId:t.flowId}}),n},i.prototype.reload=function(){WebHip.reloadHIP(1);this.isReloaded=!0},i.prototype.postLoad=function(){if(this.isHipClientLoaded=!0,this.isReloaded&&this.invalidInputMessage){var n=WebHip.setFocus();this.$element.find("#"+n).attr("aria-label",this.invalidInputMessage)}},i.prototype.instructionOutsideCallback=function(n){var t=this.$element.find("#captcha-input-label");t.html(n)},i.prototype.setupGlobals=function(){var n=this.$element.find("#captcha-challenge"),t=500;n&&n.width()&&(t=n.width());this.$window.WebHip={showMenu:!0,showError:!0,errorMessage:"",instructionsInside:!1,showInstruction:!1,holder:"captcha-challenge-holder",scriptHolder:""+this.captchaScriptsId,inputWidth:t,type:"visual",cssSet:{cssCdHIPMenu:"hip-menu",cssCdHIPInput:"hip-input",cssCdHIPLink:"hip-link",cssCdHIPError:"hip-error",cssCdHIPErrorImg:"hip-error-image"},postLoad:this.postLoad.bind(this),instructionOutsideCallback:this.instructionOutsideCallback.bind(this)}},i.$inject=["$window","captchaConfig","commonConfig","scriptLoaderService","stringFormatFilter","$element","componentRegistryService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("verify")],i.prototype,"verify",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reload")],i.prototype,"reload",null),__decorate([t.Angular.ClientReliability.InstrumentedComponent("captchaModule","captcha",{template:'<div class="captcha-section">\n                           <div id="captcha-challenge">\n                               <div id="captcha-challenge-holder">\n                               <\/div>\n                               <label id="captcha-input-label" aria-hidden="true">\n                               <\/label>\n                               <div id="captcha-challenge-scripts">\n                               <\/div>\n                           <\/div>\n                       <\/div>',bindings:{componentId:"<",invalidInputMessage:"<?"}})],i)}()})(r=i.Components||(i.Components={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){n.moduleName="webBlendModule";n.webBlendBasePath="/Scripts/Shared/WebBlend";angular.module(n.moduleName,["ng"])})(t=n.WebBlend||(n.WebBlend={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));WebBlender=function(n){var r=[],c,l=function(n){var t=n.originalEvent||n,u,i;if(t&&t.data&&JSON.parse)try{u=JSON.parse(t.data);u.message==="ready"&&clearTimeout(c)}catch(f){}for(i=0;i<r.length;i++)r[i](t)};n(window).on("message",l);var u,e=function(t,i,r,u){var e=t&&t.toLowerCase&&t.toLowerCase()||"",f;switch(e){case"dev":f="cliblends.dev.microsoft.com";break;case"int":f="uniblends.www.microsoft.com/int";break;case"ppe":f="uniblends.www.microsoft.com/ppe";break;case"prod":default:f="www.microsoft.com/uniblends"}return"https://{host}/{client}{deviceFamily}{flight}".replace("{host}",f).replace("{client}",i&&n.trim(i)?"?client="+i:"?client=").replace("{deviceFamily}",u&&n.trim(u)?"&deviceFamily="+n.trim(u):"").replace("{flight}",r&&n.trim(r)?"&setflight="+n.trim(r):"")},a=function(t,i,r){var f=t&&t.toLowerCase&&t.toLowerCase()||"",u;switch(f){case"dev":u="oneblend.dev.microsoft.com";break;case"int":u="unistoreblends-int.www.microsoft.com";break;case"ppe":u="unistoreblends-ppe.www.microsoft.com";break;default:u="www.microsoft.com"}return"https://{host}/webblend/api/config{client}{flight}".replace("{host}",u).replace("{client}",i&&n.trim(i)?"?client="+i:"").replace("{flight}",r&&n.trim(r)?(i&&n.trim(i)?"&setflight=":"?setflight=")+r:"")},v=function(n,t){var r=n&&n.toLowerCase&&n.toLowerCase()||"",i;switch(r){case"dev":case"int":i="purchase-int.mp.microsoft.com";break;default:i="purchase.mp.microsoft.com"}return"https://{host}/{purchaseServiceVersion}/users/me/orders".replace("{host}",i).replace("{purchaseServiceVersion}",t==7?"v7.0":"v6.0")},o=function(){function n(){return Math.floor(Math.random()*16).toString(16)}var t="xxxxxxxx-xxxx-4xxx-Rxxx-xxxxxxxxxxxx".replace(/x/g,n);return t.replace("R",(8|Math.floor(Math.random()*3)).toString(16))},s=function(t,i){var u="wb_auto_blend_container",r=n("#"+u),f=i&&i.width||"456px",e=i&&i.height||"560px";return r.length?r.css({height:e,width:f}):(r=n("<iframe />",{id:u,name:u,src:"",style:"width:{width}; height:{height}; position:relative; top:0; left:0; border:0; outline:none; display:block".replace("{width}",f).replace("{height}",e)}),r.appendTo(t)),r},ft=function(n,t){var i=document&&document.cookie&&document.cookie.indexOf(t)>-1,u,r;if(!i)for(u=n&&n.split(",")||[],r=0;!i&&r<u.length;r++)u[r]===t&&(i=!0);return i},y=function(n,t){var i=document.getElementById(n);i.contentWindow.postMessage(JSON.stringify({startdata:t}),"*")},t=function(t,i,r,f,o,h,c,l){var p,v,b,k,d,w,g,nt,tt;u=n("#"+i);p=(new Date).getTime();v=s(u,c);v.attr("src","");b="wb_auto_blend_container";t.Client=o;t.configUrl=a(r,o,f);k=h.substr(2).replace("/",".");t.selApps=k;g=e(r,o,f,l);v.attr("src",g);d=(new Date).getTime();w=d-p;v.one("load",function(){w&&window.postMessage(JSON.stringify({message:"status",data:"blenderSDK: blender iframe loaded in "+w+"ms"}),"*");y(b,t)});nt=(new Date).getTime();tt=nt-p;window.postMessage(JSON.stringify({message:"status",data:"blenderSDK: Loaded in "+tt+"ms"}),"*")},i=function(n,t){t&&(n.Layout=t.layout||"",n.CssOverride=t.cssOverride||"")},p=function(t){if(t){u=n("#"+t.ParentElementId);var i=s(u,{height:0,width:0}),r=e(t.Environment,t.ClientType,t.Flight,t.DeviceFamily);i.attr("src",r);window.postMessage(JSON.stringify({message:"status",data:"blenderSDK: Preload started"}),"*")}},h=function(n){var r={};n&&(r.AvailabilityId=n.AvailabilityId||"",r.ProductId=n.ProductId||"",r.SkuId=n.SkuId||"",r.Quantity=n.Quantity||1,r.Auth=n.Auth||"",r.XToken=n.XToken||"",r.Culture=n.Culture||"",r.Market=n.Market||"",r.CV=n.CV||"",r.IdentityType=n.IdentityType,r.IdentityValue=n.IdentityValue,r.PurchaseServiceVersion=n.PurchaseServiceVersion||"",r.useDelegatedAuth=n.UseDelegatedAuth||!1,r.OrderId=n.OrderId,r.Order=n.Order,r.Jwt=n.Jwt,r.Product=n.Product,r.TestClient=n.TestClient||"",r.DeviceContext="moId=PUBLIC&oemId=PUBLIC&scmId=PUBLIC",n.Options&&(r.CampaignId=n.Options.CampaignId||"",r.OptionalCampaignId=n.Options.OptionalCampaignId||"",r.OfferType=n.Options.OfferType||"",r.AddPiSuccessUrl=n.Options.AddPiSuccessUrl||"",r.AddPiFailureUrl=n.Options.AddPiFailureUrl||""),n.MediaOptions&&(r.ProductType=n.MediaOptions.ProductType||"",r.TransactionType=n.MediaOptions.TransactionType||"buy",r.Title=n.MediaOptions.Title||"",r.TitleNo=n.MediaOptions.TitleNo||"",r.SubTitle1=n.MediaOptions.SubTitle1||"",r.SubTitle2=n.MediaOptions.SubTitle2||"",r.ExpirationBeforePlayInHours=n.MediaOptions.ExpirationBeforePlayInHours||"",r.ExpirationAfterPlayInHours=n.MediaOptions.ExpirationAfterPlayInHours||""),n.BeneficiaryData&&(r.BeneficiaryEmail=n.BeneficiaryData.email,r.BeneficiaryFirstName=n.BeneficiaryData.firstName||"",r.BeneficiaryLastName=n.BeneficiaryData.lastName||""),i(r,n.Style),t(r,n.ParentElementId,n.Environment,n.Flight,n.ClientType,"#/purchase/confirm",n.IframeOptions,n.DeviceFamily||""))},w=function(t){var i={billingInformation:null,clientContext:{client:t.ClientType,deviceId:t.DeviceId,deviceType:t.DeviceFamily},friendlyName:null,items:[{availabilityId:t.AvailabilityId,beneficiary:t.IdentityType&&t.IdentityValue?{identityType:t.IdentityType,identityValue:t.IdentityValue}:null,campaignId:t.CampaignId,giftingInformation:null,optionalCampaignId:t.OptionalCampaignId,orderManagementPolityId:null,productId:t.ProductId,quantity:t.Quantity,renewalContext:null,setBlockInformation:null,skuId:t.SkuId}],language:t.Languages||t.Culture,market:t.Market,orderId:o(),orderState:"Purchased"};n.ajax({type:"POST",url:v(t.Environment,t.PurchaseServiceVersion),data:JSON.stringify(i),contentType:"application/json",beforeSend:function(n){n.setRequestHeader("MS-CV",t.CV);n.setRequestHeader("Authorization",t.Auth?'WLID1.0="'+t.Auth+'"':t.XToken)}}).then(function(i){var u=i&&n.isArray(i.orderLineItems)&&i.orderLineItems||[],r=u[0],e=r.purchaseRestriction&&r.purchaseRestriction.purchaseApprovalState&&r.purchaseRestriction.purchaseApprovalState.toLowerCase&&r.purchaseRestriction.purchaseApprovalState.toLowerCase(),s=r.parentalApprovalState&&r.parentalApprovalState.toLowerCase&&r.parentalApprovalState.toLowerCase();e==="blockedbypolicy"||e==="blockedbyage"||s==="blockedbypolicy"||s==="blockedbyage"?f(i.orderId,t.Auth,t.ParentElementId,t.Environment,t.Flight,t.ClientType,t.Culture,t.Market,t.CV,t.IframeOptions,t.PurchaseServiceVersion,t.Jwt,t.BeneficiaryData,t.Style,t.DeviceFamily,t.TestClient):window.postMessage(JSON.stringify({flowId:t.FlowId||o(),version:"1.0.0.1",message:"done",status:"success",data:{orderId:i.orderId,count:u.length,lineItems:u}}),"*")},function(n){var r=n&&n.responseJSON,u=r&&r.code&&r.code.toLowerCase&&r.code.toLowerCase();u==="forbidden"?f(i.orderId,t.Auth,t.ParentElementId,t.Environment,t.Flight,t.ClientType,t.Culture,t.Market,t.CV,t.IframeOptions,t.PurchaseServiceVersion,t.Jwt,t.BeneficiaryData,t.Style,t.DeviceFamily,t.TestClient):h(t)})},b=function(n,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt){var it={AvailabilityId:n,ProductId:r,SkuId:u,Quantity:g||1,Auth:e,Culture:l,Market:a,CV:v,IdentityType:y,IdentityValue:p,PurchaseServiceVersion:k,TestClient:tt||"",DeviceContext:"moId=PUBLIC&oemId=PUBLIC&scmId=PUBLIC"};f&&(it.CampaignId=f.campaignId||"",it.OptionalCampaignId=f.optionalCampaignId||"",it.OfferType=f.offerType||"");w&&(it.ProductType=w.productType||"",it.TransactionType=w.transactionType||"buy",it.Title=w.title||"",it.TitleNo=w.titleNo||"",it.SubTitle1=w.subTitle1||"",it.SubTitle2=w.subTitle2||"",it.ExpirationBeforePlayInHours=w.expirationBeforePlayInHours||"",it.ExpirationAfterPlayInHours=w.expirationAfterPlayInHours||"");i(it,d);t(it,o,s,h,c,"#/purchase/confirm",b,nt||"")},f=function(n,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){var k={OrderId:n,Auth:r,Culture:s,Market:h,CV:c,PurchaseServiceVersion:a,Jwt:v,TestClient:b||"",DeviceContext:"moId=PUBLIC&oemId=PUBLIC&scmId=PUBLIC"};y&&(k.BeneficiaryEmail=y.email,k.BeneficiaryFirstName=y.firstName||"",k.BeneficiaryLastName=y.lastName||"");i(k,p);t(k,u,f,e,o,"#/purchase/confirm",l,w||"")},k=function(n,r,u,f,e,o,s,h,c,l){var a={Auth:n,Culture:o,Market:s,CV:h,context:"primaryPi"};i(a,l);t(a,r,u,f,e,"#/paymentAndBilling/choosePaymentMethodFamily",c)},d=function(n,r,u,f,e,o,s,h,c,l,a){var v={Auth:n,Culture:o,Market:s,CV:h,PaymentInstrumentId:c};i(v,a);t(v,r,u,f,e,"#/paymentAndBilling/editPaymentInstrument",l)},g=function(n){var r={},u;n&&(r.Auth=n.Auth||"",r.XToken=n.XToken||"",r.Culture=n.Culture||"",r.Market=n.Market||"",r.CV=n.CV||"",r.context="primaryPi",r.PaymentMethodFamily=n.PaymentMethodFamily||"",r.PaymentMethodType=n.PaymentMethodType||"",r.BillableAccountId=n.BillableAccountId||"",r.PurchaseServiceVersion="7",r.Gamertag=n.Gamertag||"",r.GamerpicUrl=n.GamerpicUrl||"",u=n.DeviceFamily||"web",i(r,n.Style),t(r,n.ParentElementId,n.Environment,n.Flight,n.ClientType,"#/paymentAndBilling/choosePaymentMethodFamily",n.IframeOptions,u))},nt=function(n){var r={},u;n&&(r.Auth=n.Auth||"",r.XToken=n.XToken||"",r.Culture=n.Culture||"",r.Market=n.Market||"",r.CV=n.CV||"",r.PaymentInstrumentId=n.PaymentInstrumentId,r.PaymentMethodFamily=n.PaymentMethodFamily||"",r.PaymentMethodType=n.PaymentMethodType||"",r.PurchaseServiceVersion="7",u=n.DeviceFamily||"web",i(r,n.Style),t(r,n.ParentElementId,n.Environment,n.Flight,n.ClientType,"#/paymentAndBilling/editPaymentInstrument",n.IframeOptions,u))},tt=function(n){var r={},u;n&&(r.tokenString=n.TokenString||"",r.Auth=n.Auth||"",r.XToken=n.XToken||"",r.Culture=n.Culture||"",r.Market=n.Market||"",r.CV=n.CV||"",r.useDelegatedAuth=n.UseDelegatedAuth||!1,r.PurchaseServiceVersion=n.PurchaseServiceVersion||"7",r.UrlRef=n.UrlRef||"",r.EnableOcrScanLink=n.EnableOcrScanLink||"",u=n.DeviceFamily||"web",i(r,n.Style),t(r,n.ParentElementId,n.Environment,n.Flight,n.ClientType,"#/redeem/enterCode",n.IframeOptions,u))},it=function(n,r,u,f,e,o,s,h,c,l,a,v,y){var p={tokenString:n,Auth:r,Culture:s,Market:h,CV:c,PurchaseServiceVersion:"7",UrlRef:v,EnableOcrScanLink:y};i(p,a);t(p,u,f,e,o,"#/redeem/enterCode",l)},rt=function(n){for(var t=0;t<r.length;t++)if(""+r[t]==""+n){console.error("Same message handler function already registered: "+n);return}r.push(n)},ut=function(n){for(var t=0;t<r.length;t++)""+r[t]==""+n&&r.pop(n)};return{loadSingleItemPurchaseHtml:b,loadOrderPurchaseHtml:f,loadRedeemHtml:it,loadAddPaymentInstrumentHtml:k,loadEditPaymentInstrumentHtml:d,registerMessageHandler:rt,unregisterMessageHandler:ut,clientTypes:{UniversalWebStore:"UniversalWebStore",MusicVideoReading:"MusicVideoReading",EnterpriseStore:"EnterpriseStore",AccountMicrosoftCom:"AccountMicrosoftCom"},addPaymentInstrument:g,editPaymentInstrument:nt,purchaseSingleItem:h,purchaseFreeItem:w,redeem:tt,preLoadBlend:p}}(jQuery),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.telemetry=n}return n.prototype.registerMessageHandler=function(n){WebBlender.registerMessageHandler(n)},n.prototype.unregisterMessageHandler=function(n){WebBlender.unregisterMessageHandler(n)},n.prototype.purchaseSingleItem=function(n){this.telemetry.portalCv.incrementCv();n.CV=this.telemetry.portalCv.getCurrentCvValue();WebBlender.purchaseSingleItem(n)},n.$inject=["telemetryService"],n}();n.WebBlenderService=t;angular.module(n.moduleName).service("webBlenderService",t)})(t=n.WebBlend||(n.WebBlend={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){n.moduleName="commerceModule";n.commerceBasePath="/Scripts/Shared/Commerce";angular.module(n.moduleName,["ng",n.CommerceDataModule.commerceDataModuleName])})(t=n.Commerce||(n.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n){this.commerceDataService=n}return r.prototype.getInstrumentationComponentName=function(){return"commerce.order-summary"},r.prototype.componentOnInit=function(){return this.updateOrders(this.initialOrderCount,0)},r.prototype.showAll=function(){return this.updateOrders(this.maxOrderCount,1)},r.prototype.updateOrders=function(n,t){var r=this,u,i,f;return this.timeRangeInDays>=0&&(i=new Date,u=new Date(i.setDate(i.getDate()-this.timeRangeInDays))),f={count:n,scenario:t,beginTime:u,childJwt:this.childJwt},this.commerceDataService.getOrderSummary(f).then(function(n){r.model=n;r.hasOrders=n.orders&&n.orders.length!==0})},r.$inject=["controlsService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("orderSummaryInit")],r.prototype,"componentOnInit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("showAll")],r.prototype,"showAll",null),__decorate([t.Angular.ClientReliability.InstrumentedComponent(i.moduleName,"orderSummary",{templateUrl:i.commerceBasePath+"/OrderSummary/order-summary.html",bindings:{initialOrderCount:"<",maxOrderCount:"<",timeRangeInDays:"<",childJwt:"<",errorMessage:"<",seeAllMessage:"<",loadingMessage:"<",doneMessage:"<"}})],r)}();i.OrderSummaryComponent=r})(i=t.Commerce||(t.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var u=function(){function u(n,t,i,r){this.$location=n;this.ajaxService=t;this.currentUser=r;this.controlsEndpoint=i.cpControlsEndpoint}return u.prototype.getOrderSummary=function(t){var i={count:t.count,beginTime:t.beginTime?t.beginTime.toISOString():"",isInD365Orders:n.Utilities.isInFlight("D365Orders")},r=u.getOrderSummaryOperationName(t.scenario);return this.getRequest(r,"orders/summary",i,t.childJwt)},u.prototype.getPaymentInstruments=function(n){return this.getRequest(i.getPaymentInstruments,"paymentinstrument/get",n).then(function(n){return n.Models})},u.prototype.getMetadata=function(n){var t=this.controlsEndpoint+"default/metadata",f=this.getWindowMockParameter(),e={cid:this.currentUser.cid,metadata:n.metadata,xhr:!0,partner:r.mscom,"mock-scenarios":f},o={serviceName:u.serviceName,operationName:i.getMetadata,url:t,data:e,cache:!1,crossDomain:!0,xhrFields:{withCredentials:!0}};return this.ajaxService.get(o).then(function(n){return n.data})},u.prototype.getRequest=function(n,t,i,r){return this.ajaxService.get(this.createRequestSettings(n,t,i,null,r)).then(function(n){return n.data})},u.prototype.putRequest=function(n,t,i){return this.ajaxService.put(this.createRequestSettings(n,t,i,null)).then(function(n){return n.data})},u.prototype.postRequest=function(n,t,i,r){return this.ajaxService.post(this.createRequestSettings(n,t,i,r)).then(function(n){return n.data})},u.prototype.createRequestSettings=function(t,i,f,e,o){var c=this.getWindowMockParameter(),s={lang:this.currentUser.locale,token:this.currentUser.proxyTicket,cid:this.currentUser.cid,timeZoneOffsetMinutes:(new Date).getTimezoneOffset(),xhr:!0,partner:r.amc};c?(s["mock-scenarios"]=c,s.cid=""):o&&(s.jwt=o);var l=angular.extend({},f,s),a=n.Utilities.addQueryParametersFromObject(this.controlsEndpoint+i,l),h={serviceName:u.serviceName,operationName:t,url:a,cache:!1};return e&&(h.data=JSON.stringify(e),h.contentType="application/json"),h},u.prototype.getWindowMockParameter=function(){return this.$location.search()[u.mockScenariosKey]},u.getOrderSummaryOperationName=function(n){switch(n){case 0:return i.getOrderSummary.family.initial;case 1:return i.getOrderSummary.family.showAll;case 2:return i.getOrderSummary.home}throw new Error("Unhandled scenario: "+n);},u.$inject=["$location","portalAjaxServiceAngular",t.CommerceDataModule.commerceConfigKey,t.CommerceDataModule.commerceCurrentUserKey],u.mockScenariosKey="mock-scenarios",u.serviceName="CP Controls",u}(),i={getOrderSummary:{family:{initial:"getOrderSummary.family.initial",showAll:"getOrderSummary.family.showAll"},home:"getOrderSummary.home.cards"},getPaymentInstruments:"getPaymentInstruments",getMetadata:"getMetadata"},r={amc:"amc",amcDelegate:"amcDel",xbox:"xbox",mscom:"mscom"};angular.module(t.moduleName).service("controlsService",u)})(i=t.Commerce||(t.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(n,t,i,r,u,f,e){this.telemetryService=n;this.$window=t;this.$q=i;this.commerceConfig=r;this.currentUser=u;this.$sce=f;this.$timeout=e;this.controlsEndpoint=this.commerceConfig.cpControlsEndpoint;this.inProgress=!1}return t.prototype.iFrameAuth=function(n){var i=this,u,f,r;return(n===void 0&&(n=t.authTimeoutMs),this.inProgress)?this.promise:(this.defer=this.$q.defer(),u=this.__messageListener.bind(this),this.$window.addEventListener("message",u),this.inProgress=!0,f=this.$timeout(function(){i.defer.reject("Silent auth timeout after "+n+" ms")},n),r=document.createElement("iframe"),r.src=this.getIframeSrc(),r.setAttribute("role","none"),this.setIframeToInvisible(r),angular.element("body").append(r),this.promise=this.defer.promise.finally(function(){i.inProgress=!1;i.defer=null;i.$timeout.cancel(f);i.$window.removeEventListener("message",u)}),this.promise)},t.prototype.fullFrameAuth=function(n){this.$window.location.replace(this.controlsEndpoint+"authentication/signin?r="+encodeURIComponent(n)+"&"+this.getIncrementedCvQueryKeyValue())},t.prototype.getIframeSrc=function(){return this.controlsEndpoint+"silentauth?cid="+this.currentUser.cid+"&"+this.getIncrementedCvQueryKeyValue()},t.prototype.getIncrementedCvQueryKeyValue=function(){return this.telemetryService.portalCv.incrementCv(),"mscv="+encodeURIComponent(this.telemetryService.portalCv.getCurrentCvValue())},t.prototype.setIframeToInvisible=function(n){var t=angular.element(n);t.css("height","1px");t.css("width","1px");t.css("display","block");t.css("border","0");t.css("position","absolute")},t.prototype.__messageListener=function(n){if(n.origin==this.controlsEndpoint.substr(0,this.controlsEndpoint.length-1)){var t;try{t=JSON.parse(n.data)}catch(i){}if(t)switch(t.action){case"auth":t.auth?this.defer.resolve():this.defer.reject("Silent auth failed")}}},t.$inject=["telemetryService","$window","$q",n.CommerceDataModule.commerceConfigKey,n.CommerceDataModule.commerceCurrentUserKey,"$sce","$timeout"],t.authTimeoutMs=1e4,t}();n.SilentAuthService=t;angular.module(n.moduleName).service("silentAuthService",t)})(t=n.Commerce||(n.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(n){var t;(function(t){var i=function(){function i(n,t){this.$state=n;this.flowService=t}return i.prototype.getInstrumentationComponentName=function(){return"shared.commerce.payment-select"},i.prototype.componentOnInit=function(){if(this.data=angular.copy(this.data),this.data&&angular.isArray(this.data.items)){var n=this.data.items.filter(function(n){return n.selected});n.length>0?this.current=n[0]:this.data.autoSelect&&this.data.items.length>0&&(this.current=this.data.items[0])}this.showMissingPiMessage=!!this.legacyBillingId||this.piRemovedDueToBillingAddress},i.prototype.onSelectChange=function(n){var t=_.find(this.data.items,function(t){return t.htmlId===n}),i,r;if(this.redirectState=t.redirectState||this.redirectState,i=angular.extend({},t.redirectParams,this.redirectParams),r=angular.extend({},t.redirectOptions,this.redirectOptions),t.beginFlow)this.flowService.setData(t.flowData),this.flowService.begin(i.flowBeginData);else if(t.redirect&&this.redirectState)this.sendBiOnRedirect?this.flowService.switchTo({bi:{step:"PiOneClick."+i.state},state:{id:this.redirectState,params:i,options:r}}):this.$state.go(this.redirectState,i,r);else if(this.data.items.forEach(function(n){return n.selected=!1}),t.selected=!0,this.current=t,this.onSelect)this.onSelect({piid:t.id})},i.$inject=["$state","flowService"],__decorate([n.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"paymentSelect",{templateUrl:"/Scripts/Shared/Commerce/PaymentSelect/payment-select.html",bindings:{current:"=",text:"@",missingPiText:"@",missingPiContentText:"@",getMoreInfoText:"@",missingPiInline:"<",legacyBillingId:"@",data:"<",sendBiOnRedirect:"<",onSelect:"&?",redirectState:"@?",redirectParams:"<?",redirectOptions:"<?",piRemovedDueToBillingAddress:"=?"}})],i)}();t.PaymentSelect=i})(t=n.Commerce||(n.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r="amcweb",u=function(){function u(n,t,i,r,u){this.$promise=n;this.pidlService=t;this.$timeout=i;this.cpService=r;this.flowService=u}return u.prototype.componentOnInit=function(){var t=this,i;if(n.Utilities.isInFlight("PidlSuccess")){i=this.getMockPaymentSession();i.challengeStatus="Succeeded";this.onSuccessHandlePaymentChallenge(i)}else if(n.Utilities.isInFlight("PidlFailPIValError"))this.onFailureHandlePaymentChallenge({error:{innererror:{InnerError:{ErrorCode:"ValidatePIOnAttachFailed",Message:"Failed",UserDisplayMessage:"Your bank could not authorize this payment method. Contact them for more info."}}}});else if(n.Utilities.isInFlight("PidlFail"))this.onFailureHandlePaymentChallenge({error:{innererror:{InnerError:{Message:"Failed"}}}});else if(n.Utilities.isInFlight("PidlTimeout"))this.onFailureHandlePaymentChallenge({error:{innererror:{InnerError:{Message:"TimedOut"}}}});else if(n.Utilities.isInFlight("PidlCancel"))this.onCancelHandlePaymentChallenge();else return this.flowService.stayInCurrentState({step:"DelegateAuthStart"}),this.cpService.addFlight("DelegateAuthRedirect"),this.cpService.getAccessToken({scopeSet:"pidl",isForceInteractiveAuthEnabled:!0,returnUrl:this.paymentChallenge.returnUrl}).then(function(n){var i,u;if(!n){t.flowService.stayInCurrentState({step:"DelegateAuthNoToken"});t.onFailureHandlePaymentChallenge(t.buildChallengeError("Unknown","VerifyExperienceAuthError",""))}t.flowService.stayInCurrentState({step:"DelegateAuthSuccess"});i=t.paymentChallenge.pidlEnvironment;t.pidlService.setEnvironment(i);t.pidlService.setUserContext("me","MSADELEGATE1.0",n.token);u=t.pidlService.getPidlEventName("render");t.pidlService.register({partner:r,operation:"3DSChallenge",eventMatcher:u});var f={piid:t.paymentChallenge.paymentId,language:t.paymentChallenge.language,partner:r,piCid:t.paymentChallenge.piCid,amount:t.paymentChallenge.totalAmount,currency:t.paymentChallenge.currency,country:t.paymentChallenge.country,hasPreOrder:t.paymentChallenge.hasPreOrder,isLegacy:t.paymentChallenge.isLegacy,isMOTO:t.paymentChallenge.isMoto,challengeScenario:t.paymentChallenge.challengeScenario,challengeWindowSize:t.paymentChallenge.challengeWindowSize},e={telemetry:{context:{client:"amcweb",deviceFamily:"amc.web",pageName:t.paymentChallenge.pageName,isTest:!1}},display:{containerId:"pidl-container",showPlaceholderInTextbox:!0,busyBlockShowHideHandler:function(n){n?$("#loading-spinner").show():$("#loading-spinner").hide()}}},o={params:f,autoDetectMarket:!0,common:e,component:t};t.pidlService.renderThreeDSChallengeForComponent(o).then(function(n){if(!n)t.onFailureHandlePaymentChallenge(t.buildChallengeError("Unknown","FailedToRenderThreeDsChallenge",""))})}).catch(function(n){var i=n&&n.errorCode?n.errorCode:"Delegate auth error not detected";if(!n.isInteractiveAuth&&i!=="login_required"){t.flowService.stayInCurrentState({step:"DelegateAuthFail",error:i});t.onFailureHandlePaymentChallenge(t.buildChallengeError("Unknown","UserLoginAbsenceError",i))}return t.flowService.end({error:i,data:{isUserError:!0}}),t.$promise.resolve()})},u.prototype.getInstrumentationComponentName=function(){return"shared.commerce.payment-threeds-challenge"},u.prototype.onSuccessHandlePaymentChallenge=function(n){var t=this;this.scheduleOnDigestCycle(function(){return t.onHandleChallengeSucceeded({paymentSession:n})})},u.prototype.onFailureHandlePaymentChallenge=function(n){var t=this,i=this.getParsedChallangeError(n);this.scheduleOnDigestCycle(function(){return t.onHandleChallengeFailed({errorObject:i})})},u.prototype.onCancelHandlePaymentChallenge=function(){var n=this;this.scheduleOnDigestCycle(function(){return n.onHandleChallengeCancelled()})},u.prototype.getPidlComponentConfiguration=function(){var t;return n.Utilities.isInFlight("SvcPSD2XboxTest")?(t=this.pidlService.getUserContext(),t.additionalHeaders={},t.additionalHeaders["x-ms-test"]=JSON.stringify({scenarios:"px-service-psd2-e2e-emulator",contact:"pidlsdk"})):n.Utilities.isInFlight("SvcValPITest")&&(t=this.pidlService.getUserContext(),t.additionalHeaders={},t.additionalHeaders["x-ms-test"]=JSON.stringify({scenarios:"px.pims.validate.failed",contact:"pidlsdk"})),{handlers:{map:{"default":this.defaultPidlEventHandler.bind(this)}},returnOpts:{callbacks:{success:this.onSuccessHandlePaymentChallenge.bind(this),failure:this.onFailureHandlePaymentChallenge.bind(this),gohome:this.onCancelHandlePaymentChallenge.bind(this)}}}},u.prototype.defaultPidlSuccessHandler=function(){},u.prototype.defaultPidlHomeHandler=function(){},u.prototype.defaultPidlFailureHandler=function(){},u.prototype.defaultPidlEventHandler=function(){},u.prototype.scheduleOnDigestCycle=function(n){this.$timeout().then(n)},u.prototype.getMockPaymentSession=function(){return{id:"mock",amount:1,currency:"USD",country:"US",language:"en",partner:"mock-amc",piid:"mock",isChallengeRequired:!0,challengeStatus:"Succeeded",signature:"mock-signature"}},u.prototype.getParsedChallangeError=function(n){var t={ChallengeStatus:"Unknown",ErrorType:"UnknownError",UserDisplayMessage:"PIDL error not detected"},i;return!n||!n.error||!n.error.innererror?t:(i=n.error.innererror.InnerError,i&&(t.ChallengeStatus=i.Message,t.ErrorType=i.ErrorCode?i.ErrorCode:t.ErrorType,t.UserDisplayMessage=i.UserDisplayMessage?i.UserDisplayMessage:t.UserDisplayMessage),t.ErrorType.replace(/[^0-9a-zA-Z-_. ]/g,""),t)},u.prototype.buildChallengeError=function(n,t,i){return{error:{innererror:{InnerError:{Message:n,ErrorCode:t,UserDisplayMessage:i}}}}},u.$inject=["$q","pidlService","$timeout","cpService","flowService"],__decorate([t.Angular.ClientReliability.InstrumentedComponent(i.moduleName,"paymentThreedsChallenge",{templateUrl:"/Scripts/Shared/Commerce/PaymentChallenge/payment-threeds-challenge.html",bindings:{paymentChallenge:"<",onHandleChallengeSucceeded:"&onHandleChallengeSucceeded",onHandleChallengeFailed:"&onHandleChallengeFailed",onHandleChallengeCancelled:"&onHandleChallengeCancelled"}})],u)}();i.PaymentThreedsChallenge=u})(i=t.Commerce||(t.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r="amcweb",u=function(){function u(n,t,i,r,u){this.$promise=n;this.pidlService=t;this.$timeout=i;this.cpService=r;this.flowService=u}return u.prototype.componentOnInit=function(){if(n.Utilities.isInFlight("SvcValAddrFail"))this.onFailureAddressValidation(this.buildValidateAddressError("Validate address failed","ValidateAddressFailed"));else if(n.Utilities.isInFlight("SvcValAddrSuccess"))this.onSuccessAddressValidation({id:"mockAddrId",parameters:null});else return this.flowService.stayInCurrentState({step:"ValidateAddressDelegateAuthStart"}),this.cpService.addFlight("DelegateAuthRedirect"),this.cpService.getAccessToken({scopeSet:"pidl",isForceInteractiveAuthEnabled:!0,returnUrl:this.valAddress.returnUrl}).then(this.onCPCSuccess.bind(this)).catch(this.onCPCFails.bind(this)),this.$promise.resolve()},u.prototype.onCPCSuccess=function(n){var t=this,i,u;if(!n){this.flowService.stayInCurrentState({step:"ValidateAddressDelegateAuthNoToken"});this.onFailureAddressValidation(this.buildValidateAddressError("Authentication error"));return}this.flowService.stayInCurrentState({step:"ValidateAddressDelegateAuthSuccess"});i=this.valAddress.pidlEnvironment;this.pidlService.setEnvironment(i);this.pidlService.setUserContext("me","MSADELEGATE1.0",n.token);u=this.pidlService.getPidlEventName("render");this.pidlService.register({partner:r,operation:"ValidateAddress",eventMatcher:u});var f={parameters:{language:this.valAddress.language,partner:this.valAddress.partner,market:this.valAddress.country,type:"jarvis_v3",addressId:this.valAddress.addressId}},e={telemetry:{context:{client:r,deviceFamily:"amc.web",pageName:this.valAddress.pageName,isTest:!1}},display:{containerId:"pidl-container",showPlaceholderInTextbox:!0,busyBlockShowHideHandler:function(n){n?$("#loading-spinner").show():$("#loading-spinner").hide()}}},o={params:f,autoDetectMarket:!0,common:e,component:this};this.pidlService.renderValidateAddressForComponent(o).then(function(n){if(!n)t.onFailureAddressValidation(t.buildValidateAddressError("Failed to render validateAddress"))})},u.prototype.onCPCFails=function(n){var i=this,t=n&&n.errorCode?n.errorCode:"Delegate auth error not detected",r=this.buildValidateAddressError("user authentication failed",t);this.flowService.stayInCurrentState({step:"ValidateAddressDelegateAuthFail",error:t});this.scheduleOnDigestCycle(function(){return i.onValidateAddressFailed({errorObject:r})})},u.prototype.getInstrumentationComponentName=function(){return"shared.commerce.validate-address"},u.prototype.onSuccessAddressValidation=function(n){var t=this;this.flowService.stayInCurrentState({step:"ValidateAddressSucceeded"});this.scheduleOnDigestCycle(function(){return t.onValidateAddressSucceeded({addressProps:n})})},u.prototype.onFailureAddressValidation=function(n){var t=this,i=this.getParsedValidateAddressError(n);this.flowService.stayInCurrentState({step:"ValidateAddressFailed",error:i.Message});this.scheduleOnDigestCycle(function(){return t.onValidateAddressFailed({errorObject:n})})},u.prototype.onCancelAddressValidation=function(){},u.prototype.getPidlComponentConfiguration=function(){var t;return n.Utilities.isInFlight("SvcValAddrTest")?(t=this.pidlService.getUserContext(),t.additionalHeaders={},t.additionalHeaders["x-ms-test"]=JSON.stringify({scenarios:"\tpx.account.v3.address.interactionrequired",contact:"pidlsdk"})):n.Utilities.isInFlight("SvcValMultplAddrTest")?(t=this.pidlService.getUserContext(),t.additionalHeaders={},t.additionalHeaders["x-ms-test"]=JSON.stringify({scenarios:"px.account.v3.address.multiplesuggestedaddresses",contact:"pidlsdk"})):n.Utilities.isInFlight("SvcValAddrNonUSTest")&&(t=this.pidlService.getUserContext(),t.additionalHeaders={},t.additionalHeaders["x-ms-test"]=JSON.stringify({scenarios:"px.account.v3.address.ca",contact:"pidlsdk"})),{handlers:{map:{"default":this.defaultPidlEventHandler.bind(this)}},returnOpts:{callbacks:{success:this.onSuccessAddressValidation.bind(this),failure:this.onFailureAddressValidation.bind(this),gohome:this.onCancelAddressValidation.bind(this)}}}},u.prototype.defaultPidlSuccessHandler=function(){},u.prototype.defaultPidlHomeHandler=function(){},u.prototype.defaultPidlFailureHandler=function(){},u.prototype.defaultPidlEventHandler=function(){},u.prototype.scheduleOnDigestCycle=function(n){this.$timeout().then(n)},u.prototype.getParsedValidateAddressError=function(n){var t={Message:"Unknown",ErrorType:"UnknownError"},i;return!n||!n.error||!n.error.innererror?t:(i=n.error.innererror,i&&(t.Message=i.message,t.ErrorType=i.code?i.code:t.ErrorType),t)},u.prototype.buildValidateAddressError=function(n,t){return{error:{innererror:{message:n,code:t,InnerError:{Message:n,ErrorCode:t}}}}},u.$inject=["$q","pidlService","$timeout","cpService","flowService"],__decorate([t.Angular.ClientReliability.InstrumentedComponent(i.moduleName,"validateAddress",{templateUrl:"/Scripts/Shared/Commerce/ValidateAddress/validate-address.html",bindings:{valAddress:"<",onValidateAddressSucceeded:"&onValidateAddressSucceeded",onValidateAddressFailed:"&onValidateAddressFailed"}})],u)}();i.ValidateAddress=u})(i=t.Commerce||(t.Commerce={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){n.familyCommonModuleName="familyCommonModule";angular.module(n.familyCommonModuleName,["ng","commonModule"])})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var u=function(){function n(){}return n}(),t,i,r;n.DeviceModel=u;t=function(){function n(){}return n}();n.LastKnownLocation=t;i=function(){function n(){}return n}();n.LocationModel=i;r=function(){function n(){}return n.Android="#Microsoft.FamilySafety.Reporting.Api.OData.AndroidPhone",n.Phone="#Microsoft.FamilySafety.Reporting.Api.OData.Phone",n.Pc="#Microsoft.FamilySafety.Reporting.Api.OData.Pc",n.XboxOne="#Microsoft.FamilySafety.Reporting.Api.OData.XboxOne",n}();n.DeviceODataEnumClass=r})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(t){var i=this;this.familyResponse=t;this.getAllChildren=function(){return _.where(i.members,{IsChild:!0})};this.getChildren=function(){return _.where(i.members,{IsChild:!0,IsPending:!1})};this.getMsaChildren=function(){return _.where(i.members,{IsChild:!0,IsPending:!1,IsLocal:!1})};this.getMsaAndPendingChildren=function(){return _.where(i.members,{IsChild:!0,IsLocal:!1})};this.getLocalChildren=function(){return _.where(i.members,{IsChild:!0,IsLocal:!0})};this.getPendingChildren=function(){return _.where(i.members,{IsChild:!0,IsPending:!0})};this.getAllAdults=function(){return _.where(i.members,{IsChild:!1})};this.getAdults=function(){return _.where(i.members,{IsChild:!1,IsPending:!1})};this.getPendingAdults=function(){return _.where(i.members,{IsChild:!1,IsPending:!0})};this.getAllMsaMembers=function(){return _.where(i.members,{IsLocal:!1,IsPending:!1})};this.getAllMsaAndPendingMembers=function(){return _.where(i.members,{IsLocal:!1})};this.getAllPendingMembers=function(){return _.where(i.members,{IsPending:!0})};this.getAllExtendedMembers=function(){return _.where(i.members,{IsExtended:!0})};this.getMemberInfo=function(n){var t=_.find(i.members,function(t){return i.matchMemberWithId(t,n)});return t&&(t.CanRemoveSelf=i.getAdults().length>1||i.getAllChildren().length===0),t};this.getAllMembers=function(){return i.members};this.getMemberWithCid=function(n){return _.find(i.members,function(t){return t.Cid===n})};this.getChildById=function(n){return _.find(i.members,function(t){return t.IsChild&&(t.Cid===n||t.AccountId===n||t.Puid===decodeURIComponent(n))})};this.matchMemberWithId=function(n,t){return n.Cid===t||n.AccountId===t||n.Puid===decodeURIComponent(t)||n.PrimaryId===t};this.getFamilyMsaChildCountClassification=function(){var n=null,t;return i.isFamilyMember()&&(t=i.getMsaChildren().length,t===0?n="0":t===1?n="1":t>1&&(n=">1")),n};t&&(this.responseData=t,this.members=_.map(t.Members,function(t){return new n.UserModel(t)}),this.currentMember=t.Members.length>0?_.first(_.where(this.members,{IsSelf:!0})):null,this.isUserAChild=t.IsUserAChild,this.isUserAMinor=t.IsUserAMinor,this.hasLocalAccounts=t.HasLocalAccounts,this.canLeaveFamily=t.CanLeaveFamily,this.msaNonPendingmemberCount=this.getAllMsaMembers().length,this.userSafetySettings=t.UserSafetySettings,this.isActivityReportingEnabled=t.UserSafetySettings&&t.UserSafetySettings.activitySettings&&t.UserSafetySettings.activitySettings.ReportingEnabled)}return t.prototype.isFamilyMember=function(){return!!this.currentMember},t.prototype.getMaxFamilyMemberAllowed=function(){return 20},t.prototype.isFamilyFull=function(){return this.getAllMsaAndPendingMembers().length>=this.getMaxFamilyMemberAllowed()},t}();n.FamilyRosterModel=t})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.AccountId=n.AccountId;this.AccountName=n.AccountName;this.Cid=n.Cid;this.Devices=n.Devices;this.DisplayName=n.DisplayName;this.DisplayNameForUserCultureAndMarket=n.DisplayNameForUserCultureAndMarket;this.Email=n.PrimaryId;this.Puid=n.Puid;this.FirstName=n.FirstName;this.FullName=n.FullName;this.HasProfile=n.HasProfile;this.InvitedSince=n.InvitedSince;this.IsBroken=n.IsBroken;this.IsChild=n.IsChild;this.IsLocal=n.IsLocal;this.IsExtended=n.IsExtended;this.IsParent=n.IsParent;this.IsPending=n.IsPending;this.IsPrimaryIdMobile=n.IsPrimaryIdMobile;this.IsSelf=n.IsSelf;this.JsonWebToken=n.JsonWebToken;this.LastName=n.LastName;this.LocalAccountEmail=n.LocalAccountEmail;this.PrimaryId=n.PrimaryId;this.ProfilePicture=n.ProfilePicture;this.RemoveSet=n.RemoveSet;this.SettingsPath=n.SettingsPath;this.TimeZoneId=n.TimeZoneId;this.WindowsVersion=n.WindowsVersion;this.CanRemoveSelf=n.CanRemoveSelf;this.Country=n.Country;this.LocalAccountMachineName="";this.SubDisplayName=this.PrimaryId;this.IsLocal&&this.Devices&&this.Devices.length>0&&(this.LocalAccountMachineName=this.Devices[0].Name,this.SubDisplayName=this.Devices[0].Name);this.FamilyServiceId=this.IsLocal?"computer_"+this.AccountId:this.Puid;this.childId=this.IsLocal?this.AccountId:this.Cid;this.SettingLinkType=this.IsLocal?"Local":"Msa";this.settingLinkType=this.SettingLinkType}return n}();n.UserModel=t})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){this.icons={phone:"mee-icon mee-icon-CellPhone",tablet:"mee-icon mee-icon-Tablet",pc:"mee-icon mee-icon-TVMonitor",console:"mee-icon mee-icon-XboxOneConsole",laptop:"mee-icon mee-icon-System",multiple:"mee-icon mee-icon-Devices2",unknown:"mee-icon mee-icon-System",windows10:"mee-icon mee-icon-WindowsLogo windows10-logo",windowsphone8:"mee-icon mee-icon-WindowsLogo windows-phone8-logo",xboxone:"mee-icon mee-icon-XboxLogo xbox-one-logo",androidphone:"mee-icon mee-icon-CellPhone"}}return n.prototype.getIcons=function(){return this.icons},n.prototype.getDeviceIcon=function(n){var t=(n.DisplayDeviceType||"").toLowerCase();return this.icons[t]||this.icons.unknown},n.prototype.getVersionString=function(n,t){if(this.isAndroid(n))return t.DeviceVersionDisplayNames.AndroidRunningLauncher;var i=null;switch(n.Version.toLowerCase()){case"windowslive":i=t.AppsGamesOlderDeviceVersionText;break;case"windows8":i=t.DeviceVersionDisplayNames.Windows8;break;case"windows8_1":case"windows8_1_https":i=t.DeviceVersionDisplayNames.Windows81;break;case"windows10":switch(n.DisplayDeviceType.toLowerCase()){case"phone":i=t.DeviceVersionDisplayNames.Windows10Phone;break;case"console":i=t.DeviceVersionDisplayNames.XboxOne;break;default:i=t.DeviceVersionDisplayNames.Windows10PC}}return i},n.prototype.isAndroid=function(n){var t=(n.DeviceODataType||"").toLowerCase(),i=(n.OSDisplayName||"").toLowerCase(),r=(n.Version||"").toLowerCase();return t.indexOf("android")!==-1||r.indexOf("android")!==-1||i.indexOf("android")!==-1},n.prototype.isWindows10=function(n){var t=(n.OSDisplayName||"").toLowerCase();return t.indexOf("windows")!==-1&&t.indexOf("10")!==-1},n}();angular.module(n.familyCommonModuleName).service("familyDeviceHelperService",t)})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i=function(){function i(n,i,r,u,f){this.$q=n;this.$window=i;this.$injector=r;this.$rootScope=u;this.ajax=f;this.cacheExpiryTimeInMinutes=30;this.baseUrl="/family/api/";this.familyServiceName="FamilyService";this.authError=!1;this.authRefreshFlag="authRefresh=true";this.authRefreshFlagObject={authRefresh:!0};this.familyRosterUpdatedEvent="FamilyRosterService.RosterUpdated";this.getFamilyPromise=null;this.failedDeviceCalls=0;this.invalidateFamilyCache();var e=this.$injector.has("initialFamilyRosterModel")&&this.$injector.get("initialFamilyRosterModel");e&&(this.familyDataCache=new t.FamilyRosterModel(e),this.getFamilyCacheExpireTime=new Date,this.getFamilyCacheExpireTime.setMinutes(this.getFamilyCacheExpireTime.getMinutes()+this.cacheExpiryTimeInMinutes))}return i.prototype.getWindow=function(){return this.$window},i.prototype.getFamily=function(){var n=this;return this.getFamilyPromise!==null?this.getFamilyPromise:this.shouldRefreshCache(this.getFamilyCacheExpireTime)?this.getFamilyPromise===null?(this.getFamilyPromise=this.getFamilyInternal(),this.$q(function(t,i){n.getFamilyPromise.then(function(i){n.familyDataCache=i;n.getFamilyCacheExpireTime=new Date;n.getFamilyCacheExpireTime.setMinutes(n.getFamilyCacheExpireTime.getMinutes()+n.cacheExpiryTimeInMinutes);n.getFamilyPromise=null;t(i)},function(n){i(n)})})):this.getFamilyPromise:this.$q(function(t){t(n.familyDataCache)})},i.prototype.getFamilyRosterWithChildrenDevices=function(){var n=this;return this.failedDeviceCalls=0,this.$q(function(t,i){n.getFamily().then(function(r){var e,o,f,u;if(n.shouldRefreshCache(n.getDevicesCacheExpireTime)){for(e=[],o=0,f=0;f<n.familyDataCache.members.length;f++)u=n.familyDataCache.members[f],(n.familyDataCache.isUserAChild&&u===n.familyDataCache.currentMember||!n.familyDataCache.isUserAChild&&u.IsChild&&!u.IsLocal&&u.Puid&&u.JsonWebToken)&&e.push(n.getMemberDevices(u.Puid,u.JsonWebToken,f));return o=e.length,n.$q.all(e).then(function(i){n.getDevicesCacheExpireTime=new Date;n.getDevicesCacheExpireTime.setMinutes(n.getDevicesCacheExpireTime.getMinutes()+n.cacheExpiryTimeInMinutes);n.failedDeviceCalls=o-i.length;for(var u=0;u<i.length;u++)r.members[i[u].memberIndex].Devices=i[u].devices;t(r)},function(n){i(n)})}t(n.familyDataCache)},function(n){i(n)})})},i.prototype.getDevices=function(n,t){var i={childId:n,jsonWebToken:t};return this.get("getDevices","devices",i).then(function(n){return n})},i.prototype.addPendingMember=function(n){var i=this,t={inviteId:n.inviteId,isChild:n.isChild,isInline:!!n.isInline,intent:n.inviteType||"Family",matchAccount:!1};return n.captchaResult&&angular.extend(t,{solution:n.captchaResult.solution,hid:n.captchaResult.hid,fid:n.captchaResult.flowId}),this.post("AddPendingMember",t,"pending-member").then(function(t){return n.invalidateCache!==!1&&i.invalidateFamilyCache(),t})},i.prototype.removeMember=function(n){var t=this;return this.del("RemoveMember",{removeSet:n},"member").then(function(n){return t.invalidateFamilyCache(),n})},i.prototype.invalidateFamilyCache=function(){this.getFamilyCacheExpireTime=new Date;this.getFamilyCacheExpireTime.setMinutes(this.getFamilyCacheExpireTime.getMinutes()-100);this.getDevicesCacheExpireTime=new Date;this.getDevicesCacheExpireTime.setMinutes(this.getDevicesCacheExpireTime.getMinutes()-100);this.authError||this.$rootScope.$broadcast(this.familyRosterUpdatedEvent)},i.prototype.getMemberDevices=function(n,t,i){var u=this;return this.$q(function(f,e){u.getDevices(n,t).then(function(n){f(new r(n,i))},function(n){e(n)})})},i.prototype.shouldRefreshCache=function(n){var t=new Date;return t>n},i.prototype.getFamilyInternal=function(){return this.get("GetFamilyRoster","roster").then(function(n){return new t.FamilyRosterModel(n)})},i.prototype.get=function(n,t,i){var r=this.baseUrl+t;return this.customGet({serviceName:this.familyServiceName,operationName:n,data:i,url:r,cache:!1}).then(function(n){return n.data})},i.prototype.post=function(n,t,i,r){var u=this.baseUrl+i;return this.customPost({serviceName:this.familyServiceName,operationName:n,url:u,data:t,cache:!1,overrideRequestQosData:r}).then(function(n){return n.data})},i.prototype.del=function(n,t,i){var r=this.baseUrl+i;return this.customDel({serviceName:this.familyServiceName,operationName:n,url:r,data:t,cache:!1}).then(function(n){return n.data})},i.prototype.customGet=function(n){var t=this;return this.customAjaxOperation(function(){return t.ajax.get(n)})},i.prototype.customPost=function(n){var t=this;return this.customAjaxOperation(function(){return t.ajax.post(n)})},i.prototype.customDel=function(n){var t=this;return this.customAjaxOperation(function(){return t.ajax.del(n)})},i.prototype.customAjaxOperation=function(t){var i=this;return t().then(function(n){return i.$q.resolve(n)}).catch(function(t){return t.jqXHR.status===401&&i.shouldRecover()?(i.authError=!0,i.getWindow().location.href=n.Utilities.addQueryParametersFromObject(i.getWindow().location.href,i.authRefreshFlagObject),i.$q.resolve({data:null})):i.$q.reject(t)})},i.prototype.shouldRecover=function(){return this.getWindow().location.href.indexOf(this.authRefreshFlag)===-1},i.$inject=["$q","$window","$injector","$rootScope","portalAjaxServiceAngular"],i}(),r=function(){function n(n,t){this.devices=n;this.memberIndex=t}return n}();angular.module(t.familyCommonModuleName).service("rosterService",i)})(i=t.Family||(t.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){function u(u,f,e,o,s,h,c){u.state(f+".AddFlow",{url:c?"?fref":null,abstract:!0});u.state(""+f+i.officeSharing,{url:c?"startofficesharing":null,views:{"modalContent@":{template:"<start-office-sharing><\/start-office-sharing>"}},params:{dialogId:e,callerName:o,inviteType:s,parentState:f,returnState:h||f,isScenarioStarted:!1,licenseId:null},data:{biPageView:r}});u.state(""+f+i.officeSharing+i.officeSharingStart,{templateUrl:t.appFolderBasePath+"StartOfficeSharing/start-office-sharing.html"});u.state(""+f+i.addFamilyMember,{url:c?"addmember":null,views:{"modalContent@":{template:"<add-family-member><\/add-family-member>"}},params:{dialogId:e,callerName:o,inviteType:s,parentState:f,returnState:h||f,isScenarioStarted:!1,inviteId:null,defaultRoleOption:null,onSuccess:null},data:{biPageView:r,requiredComponents:n.Utilities.isInFlight("FamHIP")&&!n.Utilities.isInFlight("FamWebOnboarding")?["captcha.component"]:[]}});u.state(""+f+i.addFamilyMember+i.addFamilyMemberAdd,{templateUrl:t.appFolderBasePath+"AddFamilyMember/add-member.html"});u.state(""+f+i.addFamilyMember+i.addFamilyMemberComplete,{templateUrl:t.appFolderBasePath+"AddFamilyMember/complete.html"});u.state(""+f+i.addFamilyMember+i.addFamilyMemberFull,{templateUrl:t.appFolderBasePath+"AddFamilyMember/family-full.html"});u.state(""+f+i.addFamilyMember+i.addFamilyMemberName,{templateUrl:t.appFolderBasePath+"AddFamilyMember/add-member-name.html"});u.state(""+f+i.addFamilyMember+i.addFamilyMemberRole,{templateUrl:t.appFolderBasePath+"AddFamilyMember/add-member-role.html"});u.state(""+f+i.addFamilyMember+i.addFamilyMemberCaptcha,{url:c?"-hip":null,templateUrl:t.appFolderBasePath+"AddFamilyMember/add-member-captcha.html",data:{requiredComponents:c&&n.Utilities.isInFlight("FamHIP")?["captcha.component"]:[]}});u.state(""+f+i.addFamilyMember+i.addFamilyMemberError,{templateUrl:t.appFolderBasePath+"AddFamilyMember/add-member-error.html"});u.state(""+f+i.addOfficeGuest,{url:c?"addofficeguest":null,views:{"modalContent@":{template:"<add-office-guest><\/add-office-guest>"}},params:{dialogId:e,callerName:o,parentState:f,returnState:h||f,isScenarioStarted:!1,remainingSharedUsers:0,licenseId:null,onSuccess:null},data:{biPageView:r}});u.state(""+f+i.addOfficeGuest+i.addOfficeGuestAdd,{templateUrl:t.appFolderBasePath+"AddOfficeGuest/add-office-guest.html"})}t.familyAddFlowModuleName="familyAddFlowModule";t.appFolderBasePath="/Scripts/Shared/Family/AddFlow/Components/";var r=function(n){return{path:"/"+n.name.replace(".","/").toLocaleLowerCase(),viewId:n.name.toLocaleLowerCase()}},i={addFamilyMember:".AddFlow.FamilyMember",addFamilyMemberAdd:".Add",addFamilyMemberComplete:".Complete",addFamilyMemberFull:".FamilyFull",addFamilyMemberName:".Name",addFamilyMemberRole:".Role",addFamilyMemberCaptcha:".Captcha",addFamilyMemberError:".Error",addOfficeGuest:".AddFlow.OfficeGuest",addOfficeGuestAdd:".Add",officeSharing:".AddFlow.OfficeSharing",officeSharingStart:".Start"};angular.module(t.familyAddFlowModuleName,["ng","ui.router","oneui","unhandledExceptionHandlerModule","clientReliabilityModule","commonModule","familyCommonModule","captchaModule"]).constant("addFlowConfig",{area:"Family",maxRemainingSharedOfficeUsers:4,scenarios:{addMember:"AddMember",createChildMsa:"CreateChildMsa"},scenarioStates:{addFamilyMemberDialog:"AddFamilyMemberDialog",addFamilyMemberAppDialog:"AddfamilyMemberAppDialog",addOfficeGuestDialog:"AddOfficeGuestDialog",createNewChildMsa:"CreateNewChildMsa",sendAdultEmailInvite:"SendAdultEmailInvite",sendAdultMobileInvite:"SendAdultMobileInvite",sendChildEmailInvite:"SendChildEmailInvite",sendChildMobileInvite:"SendChildMobileInvite",sendInvite:"SendInvite",startOfficeSharingDialog:"StartSharingDialog"}}).constant("familyAddFlowStates",i).constant("familyAddFlowComponentNames",{addFamilyMemberComponent:"shared.addflow.familymember",addOfficeGuestComponent:"shared.addflow.officeguest",startOfficeSharingComponent:"shared.addflow.startofficesharing"}).constant("familyAddFlowRouteSetup",u)})(i=t.Family||(t.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.$state=n;this.$q=t;this.config=i;this.telemetry=r}return n.prototype.beginScenario=function(n,t){this.telemetry.portalScenarios.beginMultiStepScenario(this.config.area,this.config.scenarios.addMember,n,{attribution:{origin:t}})},n.prototype.endScenario=function(n,t,i,r,u){var f={area:this.config.area,name:this.config.scenarios.addMember,step:n,isSuccess:t,error:r,data:u,attribution:{origin:i}};this.telemetry.portalScenarios.endMultiStepScenario(f)},n.prototype.endStep=function(n,t,i,r,u,f){var e={area:this.config.area,name:this.config.scenarios.addMember,step:n,next:t,isSuccess:i,error:u,data:f,attribution:{origin:r}};this.telemetry.portalScenarios.endStep(e)},n.prototype.cancelScenario=function(n,t,i,r,u){var f={area:this.config.area,name:this.config.scenarios.addMember,step:n,isSuccess:t,error:r,data:u,attribution:{origin:i}};this.telemetry.portalScenarios.cancelMultiStepScenario(f)},n.$inject=["$state","$q","addFlowConfig","telemetryService"],n}();n.AddFlowBiService=t;angular.module(n.familyAddFlowModuleName).service("addFlowBiService",t)})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i){this.ajaxService=n;this.$injector=t;this.$q=i;this.baseUrl="/family/addflow/content/";this.contentServiceName="Compass";this.content=this.$injector.has("addFlowContent")?this.$injector.get("addFlowContent"):null}return n.prototype.getAddFlowContent=function(){var n=this;return this.content?this.$q.resolve(this.content):this.get("GetAddFlowContent").then(function(t){return n.content=t,n.content})},n.prototype.get=function(n){return this.ajaxService.get({serviceName:this.contentServiceName,operationName:n,url:this.baseUrl,cache:!1}).then(function(n){return n.data})},n.$inject=["portalAjaxServiceAngular","$injector","$q"],n}();n.AddFlowContentService=t;angular.module(n.familyAddFlowModuleName).service("addFlowContentService",t)})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.ajaxService=n;this.baseUrl="/family/api/";this.memberViewServiceName="MemberViewService"}return n.prototype.addOfficeSharingGuest=function(n,t){return this.post("AddOfficeSharingGuest",{inviteId:n,licenseId:t},"add-guest")},n.prototype.post=function(n,t,i){var r=this.baseUrl+i;return this.ajaxService.post({dataType:"auto",serviceName:this.memberViewServiceName,operationName:n,url:r,data:t,cache:!1}).then(function(n){return n.data})},n.$inject=["portalAjaxServiceAngular"],n}();n.AddFlowMemberViewService=t;angular.module(n.familyAddFlowModuleName).service("addFlowMemberViewService",t)})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r="child",u=function(){function u(n,t,i,r,u,f,e,o,s,h,c,l,a,v){this.$scope=n;this.$state=t;this.$q=i;this.config=r;this.addFlowStates=u;this.$window=f;this.$meeErrors=e;this.$cookies=o;this.rosterService=s;this.contentService=h;this.addFlowBiService=c;this.$meeModal=l;this.familyAddFlowComponentNames=a;this.componentRegistryService=v;this.isInviteSent=!1;this.membersInvited=[];this.allowMultipleInvites=!0;this.isFlowRestarted=!1;this.isInviteMemberInProgress=!1;this.isInviteError=!1;this.isMobileInvite=!1;this.strings={};this.images={};this.captchaId="FamilyAddFlow";this.inviteId=""}return u.prototype.getInstrumentationComponentName=function(){return this.familyAddFlowComponentNames.addFamilyMemberComponent},u.prototype.componentOnInit=function(){var n=this,t=this.rosterService.getFamily(),i=this.contentService.getAddFlowContent();return this.$q.all([t,i]).then(function(t){return n.familyRosterModel=t[0],n.compassTemplate=t[1],n.postLoadSetup()})},u.prototype.postLoadSetup=function(){var t=this;return this.showCaptcha=n.Utilities.isInFlight("FamHIP"),this.strings=this.compassTemplate.strings,this.images=this.compassTemplate.images,this.baseStateName=this.$state.current.name,this.params=this.$state.params,this.inviteId=this.params.inviteId,this.selectedRole=this.params.defaultRoleOption||"child",n.Utilities.isInFlight("FamWebOnboarding")&&(this.selectedRole=null),this.allowMultipleInvites=!this.inviteId,this.roleUrl=n.Utilities.isInFlight("FamWebOnboarding")?this.images.onboardingRoleIconNone.url:"",this.cancelMultiStepScenario=function(){t.$meeErrors.reset("family.addmember.error");t.isInviteSent||t.addFlowBiService.cancelScenario(t.config.scenarioStates.addFamilyMemberDialog,!0,t.params.callerName);return{stateId:t.params.returnState}},this.inviteText=this.strings.emailOrMobile,this.inviteAriaText=this.strings.inviteInputAriaText,this.routeToProperState()},u.prototype.routeToProperState=function(){var r=this,t,i,u,f,e;return this.familyRosterModel.currentMember&&this.familyRosterModel.currentMember.IsChild?this.$state.go(this.params.returnState):(u=20,this.familyRosterModel.getAllMsaAndPendingMembers().length+this.membersInvited.length>=u?(t=""+this.baseStateName+this.addFlowStates.addFamilyMemberFull,i=this.strings.familyFullErrorTitle):n.Utilities.isInFlight("FamWebOnboarding")?(t=""+this.baseStateName+this.addFlowStates.addFamilyMemberName,i=this.strings.addMemberTitle,this.params.isScenarioStarted||this.addFlowBiService.beginScenario(this.config.scenarioStates.addFamilyMemberAppDialog,this.params.callerName)):(t=""+this.baseStateName+this.addFlowStates.addFamilyMemberAdd,i=this.strings.addMemberTitle,this.params.isScenarioStarted||this.addFlowBiService.beginScenario(this.config.scenarioStates.addFamilyMemberDialog,this.params.callerName)),this.isFlowRestarted||this.params.isScenarioStarted?(this.params.isScenarioStarted&&this.addFlowBiService.endStep(this.params.biStep,this.config.scenarioStates.addFamilyMemberDialog,!0,this.params.callerName),f={stateId:t,modalHostOptions:{ariaDialogLabel:i}},this.$meeModal.switchTo(f)):(e={stateIdOnDismiss:this.$state.params.returnState,onDismissed:this.cancelMultiStepScenario,modalHostOptions:{ariaDialogLabel:i,ariaCloseButtonLabel:this.strings.closeDialogAriaText,kind:"flow close-button"}},this.$meeModal.show(this.$state.params.dialogId,t,e).then(function(){angular.element("#create-new-child-link").on("click",function(){r.createNewChildMsa()});angular.element("#create-new-member-link").on("click",function(){r.createNewChildMsa()});r.$scope.$emit(r.addFlowStates.addFamilyMember)})))},u.prototype.existsInMemberList=function(n,t){return!!_.find(n,function(n){return n.PrimaryId.toUpperCase()===t.toUpperCase()})},u.prototype.existsInList=function(n,t){return n.indexOf(t.toLowerCase())!==-1},u.prototype.updateErrorMessage=function(n){this.$meeErrors.setError("family.addmember.error",n);this.isInviteMemberInProgress=!1;this.isInviteError=!0},u.prototype.validatePhoneNumber=function(n){return n.length>5&&n.length<20},u.prototype.validateInput=function(){var t=this.inviteId.trim(),i="",r=!0;return this.existsInMemberList(this.familyRosterModel.getAllPendingMembers(),t)||this.existsInList(this.membersInvited,t)?(i=this.strings.invitationHasAlreadySent,r=!1):this.existsInMemberList(this.familyRosterModel.getAllMsaMembers(),t)?(i=this.strings.addMemberAlreadyExistsFailError,r=!1):n.Utilities.isEmailValid(t)||(this.isMobileInvite=!0,this.validatePhoneNumber(t)?t.substr(0,1)==="1"?t="+"+t:t.substr(0,1)==="+"||(t="+1"+t):(r=!1,i=this.strings.emailOrMobileError)),{id:t,errorString:i,isInputValid:r}},u.prototype.inviteMember=function(){this.isInviteError=!1;this.isInviteMemberInProgress=!0;var n=this.validateInput();return n.isInputValid?(this.$meeErrors.reset("family.addmember.error"),this.inviteMemberV2(!0)):(this.updateErrorMessage(n.errorString),this.$q.resolve())},u.prototype.validateName=function(){this.isInviteMemberInProgress=!0;this.isInviteError=!1;var n=this.validateInput();if(!n.isInputValid){this.updateErrorMessage(n.errorString);return}return this.clearError(),this.switchToRole()},u.prototype.onRoleSelected=function(n){this.selectedRole=n;this.roleUrl=this.isMember()?this.images.onboardingRoleIconMember.url:this.images.onboardingRoleIconOrganizer.url},u.prototype.isMember=function(){return this.selectedRole===r},u.prototype.validateCaptcha=function(){var t,n=null;return this.showCaptcha&&(t=this.componentRegistryService.getInstanceById(this.captchaId),n=t.verify(),!n.isSuccess)?(this.updateErrorMessage(this.strings.incorrectCaptcha),t.reload(),n):(this.clearError(),n)},u.prototype.switchToName=function(){return this.isInviteError&&this.clearError(),this.isInviteMemberInProgress=!1,this.switchState(".Name",this.strings.onboardingAddMemberTitle)},u.prototype.switchToRole=function(){return this.switchState(".Role",this.strings.onboardingMemberRoleTitle)},u.prototype.switchToCaptcha=function(){return this.showCaptcha?this.switchState(".Captcha",this.strings.onboardingCaptchaTitle):this.inviteMemberV2(!1)},u.prototype.switchToError=function(){return this.switchState(".Error",this.strings.addMemberGenericFailError)},u.prototype.inviteMemberV2=function(n){var t=this,f,e;this.$meeErrors.reset("family.addmember.error");var i=this.selectedRole==="child",r=null,u=null;return this.showCaptcha&&(r=this.componentRegistryService.getInstanceById(this.captchaId),u=this.validateCaptcha(),!u.isSuccess)?(this.updateErrorMessage(this.strings.incorrectCaptcha),this.$q.resolve("Incorrect captcha")):(f=this.validateInput(),e={inviteId:f.id,isChild:i,captchaResult:u},this.rosterService.addPendingMember(e).then(function(n){if(n.accrualUrl){t.$window.location.href=n.accrualUrl;return}t.isInviteSent=!0;t.isInviteError=!1;t.isInviteMemberInProgress=!1;t.membersInvited.push(f.id.toLowerCase())}).then(function(){return t.params.onSuccess&&t.params.onSuccess()||t.$q.resolve()}).then(function(){var r;if(r=t.isMobileInvite?i?t.config.scenarioStates.sendChildMobileInvite:t.config.scenarioStates.sendAdultMobileInvite:i?t.config.scenarioStates.sendChildEmailInvite:t.config.scenarioStates.sendAdultEmailInvite,t.addFlowBiService.endStep(t.config.scenarioStates.addFamilyMemberDialog,r,!0,t.params.callerName),n)return t.switchState(".Complete",t.strings.inviteSentTitle);t.endFlow()}).catch(function(i){var u,e=i.jqXHR.responseJSON&&i.jqXHR.responseJSON.error||"generic",o=!!r,f=t.$q.resolve();switch(e){case"InvalidEmail":u=t.strings.emailOrMobileError;o=!1;n||(f=t.switchToName());break;case"InvalidHipArguments":case"HipValidationFailed":u=t.strings.incorrectCaptcha;n||(f=t.switchToCaptcha());break;case"Family.FamilySizeExceedLimit":u=t.strings.familySizeExceedLimitError;n||(f=t.switchToName());break;case"Family.InvalidCountryCode":case"Family.InvalidMobileNumber":case"Family.UnsupportedCountryMobileInvitation":u=t.strings.emailOrMobileError;n||(f=t.switchToName());break;default:u=t.strings.addMemberGenericFailError;n||(f=t.switchToError())}return o&&r.reload(),t.isInviteMemberInProgress=!1,t.addFlowBiService.endStep(t.config.scenarioStates.addFamilyMemberDialog,t.config.scenarioStates.addFamilyMemberDialog,!1,t.params.callerName,e),t.updateErrorMessage(u),f}))},u.prototype.clearError=function(){this.isInviteError=!1;this.$meeErrors.reset("family.addmember.error")},u.prototype.switchState=function(n,t){var i={stateId:""+this.baseStateName+n,modalHostOptions:{ariaDialogLabel:t}};return this.$meeModal.switchTo(i)},u.prototype.overrideRequestQosData=function(n,t,i){if(t&&t.status===409||t&&t.responseJSON&&(t.responseJSON.error==="Family.FamilySizeExceedLimit"||t.responseJSON.error==="Family.InvalidMobileNumber"||t.responseJSON.error==="Family.UnsupportedCountryMobileInvitation"))return i.isSuccess=!0,1},u.prototype.createNewChildMsa=function(){var n=_.where(this.familyRosterModel.getAllMsaMembers(),{IsSelf:!1}),t=_.pluck(n,"Cid");this.$cookies.put(this.config.scenarios.createChildMsa,JSON.stringify(t),{path:"/family"});this.addFlowBiService.endStep(this.config.scenarioStates.addFamilyMemberDialog,this.config.scenarioStates.createNewChildMsa,!0,this.params.callerName)},u.prototype.endFlow=function(){var n={stateId:this.$state.params.returnState};this.$meeModal.hide(n)},u.prototype.restartFlow=function(){this.inviteId="";this.isFlowRestarted=!0;this.$meeErrors.reset("invite.member.error");this.routeToProperState()},u.$inject=["$scope","$state","$q","addFlowConfig","familyAddFlowStates","$window","$meeErrors","$cookies","rosterService","addFlowContentService","addFlowBiService","$meeModal","familyAddFlowComponentNames","componentRegistryService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("inviteMember")],u.prototype,"inviteMember",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("inviteMemberV2"),n.OneUI.Angular.MonitorOperationProgress("modalOperation")],u.prototype,"inviteMemberV2",null),__decorate([t.Angular.ClientReliability.InstrumentedComponent(i.familyAddFlowModuleName,"addFamilyMember",{template:"<div ui-view><\/div>"})],u)}();i.AddFamilyMemberComponent=u})(i=t.Family||(t.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n,t,i,r,u,f,e,o,s,h,c){this.$state=n;this.$q=t;this.config=i;this.addFlowStates=r;this.$meeErrors=u;this.contentService=f;this.memberViewService=e;this.addFlowBiService=o;this.formatString=s;this.$meeModal=h;this.componentNames=c;this.isInviteInProgress=!1;this.strings={}}return r.prototype.getInstrumentationComponentName=function(){return this.componentNames.addOfficeGuestComponent},r.prototype.componentOnInit=function(){var n=this;if(this.params=this.$state.params,!this.params.licenseId||this.params.remainingSharedUsers<1||this.params.remainingSharedUsers>this.config.maxRemainingSharedOfficeUsers){var t={licenseId:this.params.licenseId,remainingSharedUsers:this.params.remainingSharedUsers},i=this.formatString(this.componentNames.addOfficeGuestComponent+": {0}",this.params.licenseId?"Invalid RemainingSharedUsers":"Invalid LicenseId"),r=this.$q.reject(i+" - "+JSON.stringify(t));return this.params.isScenarioStarted?(this.addFlowBiService.endScenario(this.config.scenarioStates.addOfficeGuestDialog,!1,this.params.callerName,i,t),this.$meeModal.hide(this.getHideOptions()).finally(function(){return r})):r}return this.contentService.getAddFlowContent().then(function(t){return n.strings=t.strings,n.postLoadSetup()})},r.prototype.getHideOptions=function(){return{stateId:this.params.returnState}},r.prototype.postLoadSetup=function(){if(this.strings.addGuestMessageLine2=this.formatString(this.strings.addGuestMessageLine2,this.params.remainingSharedUsers),this.params.isScenarioStarted)return this.addFlowBiService.endStep(this.params.biStep,this.config.scenarioStates.addOfficeGuestDialog,!0,this.params.callerName),this.$q.resolve();var n={stateIdOnDismiss:this.params.returnState,modalHostOptions:{ariaDialogLabel:this.strings.addFlowDialogAriaText,ariaCloseButtonLabel:this.strings.closeDialogAriaText,kind:"flow"}};return this.addFlowBiService.beginScenario(this.config.scenarioStates.addOfficeGuestDialog,this.params.callerName),this.$meeModal.show(this.$state.params.dialogId,this.addFlowStates.addOfficeGuestAdd,n)},r.prototype.addGuest=function(){var n=this;return this.isInviteInProgress=!0,this.$meeErrors.reset("family.addofficeguest.error"),this.memberViewService.addOfficeSharingGuest(this.inviteId,this.params.licenseId).then(function(){return n.params.onSuccess&&n.params.onSuccess()||n.$q.resolve()}).then(function(){n.addFlowBiService.endScenario(n.config.scenarioStates.addOfficeGuestDialog,!0,n.params.callerName);var t={stateId:n.params.returnState};n.$meeModal.hide(t)}).catch(function(t){var i,r=t.jqXHR.responseJSON&&t.jqXHR.responseJSON.error||"generic";return i=r==="UserErrorAlreadyInvited"?n.strings.addGuestAlreadyInvitedError:n.strings.addMemberGenericFailError,n.isInviteInProgress=!1,n.$meeErrors.setError("family.addofficeguest.error",i),n.addFlowBiService.endStep(n.config.scenarioStates.addOfficeGuestDialog,n.config.scenarioStates.addOfficeGuestDialog,!1,n.params.callerName,r),n.$q.reject(t)})},r.prototype.cancel=function(){this.$meeErrors.reset("family.addofficeguest.error");var n={stateId:this.params.returnState};this.addFlowBiService.cancelScenario(this.config.scenarioStates.addOfficeGuestDialog,!0,this.params.callerName);this.$meeModal.hide(n)},r.$inject=["$state","$q","addFlowConfig","familyAddFlowStates","$meeErrors","addFlowContentService","addFlowMemberViewService","addFlowBiService","stringFormatFilter","$meeModal","familyAddFlowComponentNames"],__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation")],r.prototype,"addGuest",null),__decorate([t.Angular.ClientReliability.InstrumentedComponent(i.familyAddFlowModuleName,"addOfficeGuest",{template:"<div ui-view><\/div>"})],r)}();i.AddOfficeGuestComponent=r})(i=t.Family||(t.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o){this.$state=n;this.$q=t;this.config=i;this.addFlowStates=r;this.contentService=u;this.addFlowBiService=f;this.$meeModal=e;this.componentNames=o;this.isInviteInProgress=!1;this.strings={}}return i.prototype.getInstrumentationComponentName=function(){return this.componentNames.startOfficeSharingComponent},i.prototype.componentOnInit=function(){var n=this;return(this.params=this.$state.params,!this.params.licenseId)?this.$q.reject("Shared.AddFlow.StartOfficeSharing: License id of '"+this.params.licenseId+"' is not valid"):this.contentService.getAddFlowContent().then(function(t){return n.strings=t.strings,n.valueProps=t.valueProps,n.postLoadSetup()})},i.prototype.postLoadSetup=function(){this.params.remainingSharedUsers=this.config.maxRemainingSharedOfficeUsers;this.params.biStep=this.config.scenarioStates.startOfficeSharingDialog;this.params.isScenarioStarted=!0;var n={stateIdOnDismiss:this.params.returnState,modalHostOptions:{ariaDialogLabel:this.strings.addFlowDialogAriaText,ariaCloseButtonLabel:this.strings.closeDialogAriaText,kind:"flow close-button"}};return this.addFlowBiService.beginScenario(this.config.scenarioStates.startOfficeSharingDialog,this.params.callerName),this.$meeModal.show(this.$state.params.dialogId,this.addFlowStates.officeSharingStart,n)},i.prototype.goToAddGuest=function(){var n={stateId:""+this.params.parentState+this.addFlowStates.addOfficeGuest,stateParams:this.params};this.$meeModal.switchTo(n)},i.prototype.goToAddFamilyMember=function(){var n={stateId:""+this.params.parentState+this.addFlowStates.addFamilyMember,stateParams:this.params};this.$meeModal.switchTo(n)},i.prototype.cancel=function(){this.addFlowBiService.cancelScenario(this.config.scenarioStates.startOfficeSharingDialog,!0,this.params.callerName);this.$meeModal.hide(this.params.returnState)},i.$inject=["$state","$q","addFlowConfig","familyAddFlowStates","addFlowContentService","addFlowBiService","$meeModal","familyAddFlowComponentNames"],__decorate([n.Angular.ClientReliability.InstrumentedComponent(t.familyAddFlowModuleName,"startOfficeSharing",{template:"<div ui-view><\/div>"})],i)}();t.StartOfficeSharingComponent=i})(t=n.Family||(n.Family={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t="Address,Neighborhood,PopulatedPlace,AdminDivision1",i="LocationApi.FindLocationByPoint",r=function(){function r(t,i){this.ajax=t;this.$promise=i;this.addressCache={};this.bingMapsJsSettings=n.BingMapJsSettings}return r.prototype.getAreaName=function(n){var t=this,i=n.lat+","+n.long,r=this.addressCache[i];return r?r:(this.addressCache[i]=this.loadAreaName(n).then(function(i){return i.data.errorDetails&&i.data.errorDetails.length>0?t.$promise.reject(i.data):t.getLocationAddressFromBingResponse(n,i.data)}).catch(function(n){return delete t.addressCache[i],t.$promise.reject(n)}),this.addressCache[i])},r.prototype.loadAreaName=function(n){return this.ajax.get({serviceName:"BingMaps",operationName:i,url:""+this.bingMapsJsSettings.restAPIUrl+this.bingMapsJsSettings.restLocationAPI+n.lat+","+n.long,dataType:"jsonp",data:{key:this.bingMapsJsSettings.key,o:"json",c:this.bingMapsJsSettings.locale,includeEntityTypes:t},jsonp:"jsonp"})},r.prototype.getLocationAddressFromBingResponse=function(n,t){return t&&t.resourceSets&&t.resourceSets.length>0&&t.resourceSets[0].resources&&t.resourceSets[0].resources.length>0&&t.resourceSets[0].resources[0].address?t.resourceSets[0].resources[0].address.formattedAddress:null},r.prototype.formatUnresolvedLocationName=function(n){return n.lat.toFixed(4)+", "+n.long.toFixed(4)},r.$inject=["portalAjaxServiceAngular","$q"],r}();angular.module("commonModule").service("areaNameLookupService",r)})(i=t.Components||(t.Components={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){function i(n,t,i,r,u){n[t]={url:r,views:{"modalContent@":{template:"<"+i+"><\/"+i+">"}},data:{requiredComponents:u}}}function s(r,u,f){if(r[t.settingsPagesBaseStateName]={abstract:!0,views:{"content@Family":{template:'<settings family-roster-model="$resolve.familyRosterModel" class="x-offset-content x-clearfix" data-grid="col-12"><\/settings>'}},data:{requiredComponents:[t.settingsComponentNames.settings],optionalComponents:[t.settingsComponentNames.recentActivity,t.settingsComponentNames.screenTime,t.settingsComponentNames.appLimits,t.settingsComponentNames.spending,t.settingsComponentNames.contentRestrictionsAppsGames,t.settingsComponentNames.contentRestrictionsWebRestrictions,t.settingsComponentNames.contentRestrictionsStore,t.settingsComponentNames.commerceOrderSummary,t.settingsComponentNames.findYourChild,t.settingsComponentNames.bingMaps]}},(!f.IsUserAChild||n.Utilities.isInFlight("FamMemberViews"))&&n.Utilities.isInFlight("FamOverview")&&n.Utilities.isInFlight("FamReactTier1"))r[t.settingsStateNames.recentActivity]={url:"/settings/recent-activity/:childId",redirectReact:!0},r[t.settingsPagesBaseStateName+".Overview"]={url:"/settings/overview/:childId",redirectReact:!0};else{function e(n,u,f){r[n]={url:u,views:{"content@Family.Settings":{template:"<recent-activity><\/recent-activity>"}},data:{requiredComponents:[t.settingsComponentNames.recentActivity],optionalComponents:[t.promotionName]}};i(r,f,"casa-install-modal");i(r,n+".DeviceNotifySignInSteps","device-notify-sign-in-steps");i(r,n+".DeviceNotifyTelemetrySteps","device-notify-telemetry-steps");i(r,n+".DeviceNotifyError","device-error-state-dialog")}e(t.settingsStateNames.recentActivity,"/settings/recent-activity/:childId",t.casaInstallModalStateNames.recentActivity);e(t.settingsStateNames.overview,"/settings/overview/:childId",t.casaInstallModalStateNames.overview)}(!f.IsUserAChild||n.Utilities.isInFlight("FamMemberViews"))&&n.Utilities.isInFlight("FamNewScreenTime")&&n.Utilities.isInFlight("FamReactTier1")&&!u?(r[t.settingsPagesBaseStateName+".ScreenTime"]={url:"/settings/screen-time/:childId",redirectReact:!0},r[t.appLimitsPageStateName]={url:"/settings/app-limits/:childId",redirectReact:!0}):(r[t.settingsPagesBaseStateName+".ScreenTime"]={url:"/settings/screen-time/:childId",views:{"content@Family.Settings":{template:'<screen-time family-roster-model="$resolve.familyRosterModel" compass-content="$resolve.compassContent" child-info="$resolve.childInfo"><\/screen-time>'}},resolve:{compassContent:["contentService",function(n){return n.getScreenTimeOneUiContent()}],childInfo:["rosterService","familyRosterModel","$stateParams",function(n,t,i){return t.getMemberInfo(i.childId)}]},data:{requiredComponents:[t.settingsComponentNames.screenTime],optionalComponents:[t.settingsComponentNames.screenTimePc,t.settingsComponentNames.screenTimeXbox,t.settingsComponentNames.screenTimeOneAllowance]}},i(r,t.settingsPagesBaseStateName+".ScreenTime.timeLimitDialog","time-limit-dialog-base"),n.Utilities.isInFlight("FamAppLimits")&&(r[t.appLimitsPageStateName]={url:"/settings/app-limits/:childId",views:{"content@Family.Settings":{template:"<app-limits><\/app-limits>"}},data:{requiredComponents:[t.settingsComponentNames.appLimits],optionalComponents:[t.settingsComponentNames.appLimitsDrawer,t.settingsComponentNames.appLimitsSlider,t.settingsComponentNames.appLimitsWebBlocking,t.settingsComponentNames.appLimitsWebBlockingWarning],expectedTransitions:[t.settingsStateNames.recentActivity,t.settingsStateNames.overview,t.familyLandingPageStateName]}},i(r,t.appLimitsStateNames.freModal,"app-limits-fre-modal"),i(r,t.appLimitsStateNames.coldStartAndroidStep1,"app-limits-cold-start-android-step1-modal"),i(r,t.appLimitsStateNames.coldStartAndroidStep2,"app-limits-cold-start-android-step2-modal"),i(r,t.appLimitsStateNames.coldStartAndroidStep3,"app-limits-cold-start-android-step3-modal"),i(r,t.appLimitsStateNames.coldStartAndroidStep4,"app-limits-cold-start-android-step4-modal"),i(r,t.appLimitsStateNames.coldStartCasaStep1,"app-limits-cold-start-casa-step1-modal"),i(r,t.appLimitsStateNames.coldStartCasaStep2,"app-limits-cold-start-casa-step2-modal"),i(r,t.appLimitsStateNames.coldStartCasaStep3,"app-limits-cold-start-casa-step3-modal"),i(r,t.appLimitsStateNames.coldStartCasaStep4,"app-limits-cold-start-casa-step4-modal"),i(r,t.appLimitsStateNames.coldStartWindows,"app-limits-cold-start-windows-modal"),i(r,t.appLimitsStateNames.coldStartXbox,"app-limits-cold-start-xbox-modal"),i(r,t.appLimitsStateNames.deviceErrorStateDialog,"device-error-state-dialog"),i(r,t.appLimitsStateNames.webBlockingFreModal,"web-blocking-fre-modal"),i(r,t.appLimitsStateNames.webBlockingWarningModal,"web-blocking-warning-modal")));n.Utilities.isInFlight("FamAppRewards")&&(r[t.settingsPagesBaseStateName+".AppRewards"]={url:"/settings/app-rewards/:childId",views:{"content@Family.Settings":{template:"<app-rewards><\/app-rewards>"}},data:{requiredComponents:[t.settingsComponentNames.appRewards]}});(!f.IsUserAChild||n.Utilities.isInFlight("FamMemberViews"))&&n.Utilities.isInFlight("FamContentFilters")&&n.Utilities.isInFlight("FamReactTier1")?(r[t.settingsPagesBaseStateName+".ContentRestrictions"]={url:"/settings/content-restrictions/:childId",redirectReact:!0},r[t.settingsPagesBaseStateName+".ContentFilters"]={url:"/settings/content-filters/:childId",redirectReact:!0}):(r[t.settingsPagesBaseStateName+".ContentRestrictions"]={url:"/settings/content-restrictions/:childId",views:{"content@Family.Settings":{template:'<content-restrictions family-roster-model="$resolve.familyRosterModel" compass-content="$resolve.compassContent" child-info="$resolve.childInfo"><\/content-restrictions>'}},resolve:{compassContent:["contentService",function(n){return n.getContentRestrictionsOneUiContent()}],childInfo:["rosterService","familyRosterModel","$stateParams",function(n,t,i){return t.getMemberInfo(i.childId)}]},data:{requiredComponents:[t.settingsComponentNames.contentRestrictionsAppsGames,t.settingsComponentNames.contentRestrictionsWebRestrictions],optionalComponents:[t.settingsComponentNames.contentRestrictionsStore]}},i(r,t.settingsPagesBaseStateName+".ContentRestrictions.crRatingsDialog","cr-ratings-dialog"));r[t.settingsPagesBaseStateName+".Spending"]=n.Utilities.isInFlight("FamSpending")?{url:"/settings/spending/:childId",redirectReact:!0}:{url:"/settings/spending/:childId",views:{"content@Family.Settings":{template:'<spending compass-content="$resolve.compassContent" family-roster-model="$resolve.familyRosterModel"><\/spending>'}},resolve:{compassContent:["contentService",function(n){return n.getSpendingContent()}]},data:{requiredComponents:[t.settingsComponentNames.spending],optionalComponents:[t.settingsComponentNames.commerceOrderSummary]}};r[t.settingsPagesBaseStateName+".FindYourChild"]={url:"/settings/find-your-child/:childId",views:{"content@Family.Settings":{template:'<find-your-child compass-content="$resolve.compassContent" child-info="$resolve.childInfo"><\/find-your-child>'}},resolve:{compassContent:["contentService",function(n){return n.getFindYourChildOneUiContent()}],childInfo:["rosterService","familyRosterModel","$stateParams",function(n,t,i){return t.getMemberInfo(i.childId)}]},data:{requiredComponents:n.Utilities.isInFlight("CasaFindChild")?[t.settingsComponentNames.findYourChild]:[t.settingsComponentNames.findYourChild,t.settingsComponentNames.bingMaps]}};r[t.settingsStateNames.managePermissions]={url:"/settings/manage-permissions/",views:{"content@Family.Settings":{template:'<manage-permissions family-roster-model="$resolve.familyRosterModel" compass-content="$resolve.compassContent"><\/manage-permissions>'}},resolve:{compassContent:["contentService",function(n){return n.getManagePermissionsOneUiContent()}]},data:{requiredComponents:[t.settingsComponentNames.managePermissionsDevices],optionalComponents:[]}}}function h(n,t){var i,r;n[t.baseState]={url:"/"+t.baseurl+"?invitationToken&email&ma&role&c&C",template:"<accept-base />"};n[t.signedOutState]={url:"/signedout",template:"<accept />"};n[t.memberBelowAgeState]={template:"<accept />"};n[t.memberAboveAgeState]={template:"<accept />"};n[t.organizerState]={template:"<accept />"};i={errorCode:null};n[t.errorBaseState]={template:"<accept-error-base />",params:i,data:{requiredComponents:["acceptErrorBase"]}};r=["accept.error.expired","accept.error.genericError","accept.error.inOtherFamily","accept.error.sizeLimit","accept.error.windowsMatchAccount"];r.forEach(function(t){n[t]={template:"<accept-error />"}})}function c(n,t){n[""+t.baseState]={url:"/"+t.url+"?"+t.askParamName,template:'<family-buy family-roster-model="$resolve.familyRosterModel"  compass-content="$resolve.compassContent"><\/family-buy>',params:{ask:null},resolve:{familyRosterModel:["rosterService",function(n){return n.getFamily()}],compassContent:["contentService",function(n){return n.getAskAParentContent()}]},data:{requiredComponents:[""+t.instrumentedComponentName],expectedTransitions:[t.notificationState,t.baseState+"."+t.purchaseState]}};n[t.baseState+"."+t.purchaseState]={url:"/purchase",template:'<family-buy-purchase family-roster-model="$resolve.familyRosterModel" compass-content="$resolve.compassContent"><\/family-buy-purchase>',params:{Child:null,PurchaseRequest:null,IsAuthRedirect:null},data:{requiredComponents:[""+t.purchaseComponentName],optionalComponents:["family.purchaseRequestFeed"],expectedTransitions:[t.notificationState]}};n[t.baseState+"."+t.completeState]={params:{familyProduct:null,cid:""},template:'<family-buy-complete family-roster-model="$resolve.familyRosterModel" compass-content="$resolve.compassContent"><\/family-buy-complete>'}}function l(n,r){var u=e(r);i(n,r+".Why?","why",u+"learnwhy/?memberId",["family.why"]);n[r+".Why?.LearnMore"]={views:{why:{templateUrl:t.appFolderBasePath+"Landing/Why/why.learn-more.html"}}}}function f(n,r){var u=e(r);i(n,r+".RemoveFlow","remove-flow",u+"remove/?memberId&domId&authRefresh",["family.removeflow"]);n[r+".RemoveFlow.Confirm"]={views:{removeflow:{templateUrl:t.appFolderBasePath+"Landing/RemoveFlow/remove-flow.confirm.html"}}};i(n,r+".ResendInvite","resend-invite",u+"resend/?memberId&authRefresh",["family.resendinvite"]);n[r+".ResendInvite.Complete"]={views:{resendInvite:{templateUrl:t.appFolderBasePath+"Landing/ResendInvite/resend-invite.complete.html"}}};n[r+".ResendInvite.Error"]={views:{resendInvite:{templateUrl:t.appFolderBasePath+"Landing/ResendInvite/resend-invite.error.html"}}};n[r+".ResendInvite.Progress"]={views:{resendInvite:{templateUrl:t.appFolderBasePath+"Landing/ResendInvite/resend-invite.progress.html"}}};i(n,r+".VerifyNow","verify-now",u+"verify/?memberId&authRefresh",["family.verifynow"]);n[r+".VerifyNow.Confirm"]={views:{verifyNow:{templateUrl:t.appFolderBasePath+"Landing/VerifyNow/verify-now.confirm.html"}}}}function a(u,e,o,a,v,y,p){var w={},d,b,k;w.Family={abstract:!0,views:{"":{template:"<family><\/family>"}},resolve:{familyRosterModel:["rosterService",function(n){return n.getFamily()}]},data:{requiredComponents:[],optionalComponents:[]}};n.Utilities.isInFlight("FamAccept")?(w[t.familyLandingPageStateName]={url:"/",views:{"content@Family":{template:'<landing family-roster-model="$resolve.familyRosterModel" compass-strings="$resolve.compassStrings"><\/landing>'}},resolve:{compassStrings:["familyConfig",function(n){var i=n.content.landing,t=i.Strings;return t.ScreenTimeRequests=i.ScreenTimeRequests,t.LearnMore=t.DelinkingMoreInfoLinkText,t.LandingActionLinks=i.LandingActionLinks,t.Upsells=i.FamilyUpsells,t.Images=i.Images,t.DeviceNotify=n.content.deviceNotify,t.LandingBanner=n.content.landingBanner,t.ColdStartData=n.content.coldStartData,t.DeviceErrorStateNotifications=i.DeviceErrorStateNotifications,t}]},data:{requiredComponents:[],optionalComponents:[o.addFamilyMemberComponent,o.addOfficeGuestComponent,o.startOfficeSharingComponent,t.promotionName,"family.purchaseRequestFeed",a.purchaseComponentName,t.settingsComponentNames.screenTime,t.settingsComponentNames.spending,t.settingsComponentNames.recentActivity]}},d={activePromos:{},promoSurfaceRef:null,promoInstanceId:null,bypassColdStart:null},w[t.familyLandingPageStateName].params=d):w[t.familyLandingPageStateName]={url:"/",views:{"content@Family":{template:'<landing family-roster-model="$resolve.familyRosterModel" compass-strings="$resolve.compassStrings"><\/landing>'}},resolve:{compassStrings:["familyConfig",function(n){var i=n.content.landing,t=i.Strings;return t.ScreenTimeRequests=i.ScreenTimeRequests,t.LearnMore=t.DelinkingMoreInfoLinkText,t.LandingActionLinks=i.LandingActionLinks,t.Upsells=i.FamilyUpsells,t.Images=i.Images,t.DeviceNotify=n.content.deviceNotify,t.LandingBanner=n.content.landingBanner,t.ColdStartData=n.content.coldStartData,t.DeviceErrorStateNotifications=i.DeviceErrorStateNotifications,t}]},data:{requiredComponents:[],optionalComponents:[o.addFamilyMemberComponent,o.addOfficeGuestComponent,o.startOfficeSharingComponent,t.promotionName,"family.purchaseRequestFeed",a.purchaseComponentName,t.settingsComponentNames.screenTime,t.settingsComponentNames.spending,t.settingsComponentNames.recentActivity]},params:{activePromos:{},promoSurfaceRef:null,promoInstanceId:null}};w["Family.Landing.About"]={url:"about",views:{"content@Family":{template:"<landing-cold-start-v2><\/landing-cold-start-v2>"}},data:{requiredComponents:["Family.Landing.Coldstart.V2"],optionalComponents:[]}};w["Family.Landing.LearnMore"]={url:"learnmore",views:{"content@Family":{template:"<landing-cold-start-v2><\/landing-cold-start-v2>"}},data:{requiredComponents:["Family.Landing.Coldstart.V2"],optionalComponents:[]}};w["Family.Landing.Promo"]={url:"promo/:promoId?ref&instanceId",views:{"content@Family":{template:"<promo><\/promo>"},"banner@Family":{template:""}},data:{requiredComponents:["Family.Landing.Promo"],optionalComponents:[],expectedTransitions:[t.familyLandingPageStateName,t.appLimitsPageStateName]}};f(w,t.familyLandingPageStateName);l(w,t.familyLandingPageStateName);i(w,t.casaInstallModalStateNames.landing,"casa-install-modal");i(w,t.familyLandingPageStateNames.appLimitsPromoFamilyUserWithNoChildFreModal,"family-landing-app-limits-promo-family-user-with-no-child-fre-modal");i(w,t.familyLandingPageStateNames.appLimitsPromoUserWithNoFamilySetupYetFreModal,"family-landing-app-limits-promo-user-with-no-family-setup-yet-fre-modal");i(w,t.familyLandingPageStateName+".DeviceNotifySignInSteps","device-notify-sign-in-steps");i(w,t.familyLandingPageStateName+".DeviceNotifyError","device-error-state-dialog");i(w,t.familyLandingPageStateName+".BrowserBlocked","browser-blocked");s(w,v,p);e(u,t.familyLandingPageStateName,"#family-dialog","family","Family",null,!0);v||(w[t.familyLandingPageStateName].views["banner@Family"]={template:'<family-landing-banner family-roster-model="$resolve.familyRosterModel" compass-strings="$resolve.compassStrings"><\/family-landing-banner>'},w[t.familyLandingPageStateName].data.requiredComponents.push("family.landing.banner"),w[t.settingsPagesBaseStateName]&&(w[t.settingsPagesBaseStateName].views["banner@Family"]={template:'<family-settings-banner family-roster-model="$resolve.familyRosterModel"><\/family-settings-banner>'},w[t.settingsPagesBaseStateName].data.requiredComponents.push("family.settings.banner")));n.Utilities.isInFlight("FamNotifications")&&(w[t.notificationsPageStateName]={url:"/notifications",views:{"content@Family":{template:'<notification-center family-roster-model="$resolve.familyRosterModel" compass-strings="$resolve.compassStrings" class="x-offset-content x-clearfix"><\/notification-center>'}},resolve:{compassStrings:["familyConfig",function(n){var i=n.content.landing,t=i.Strings;return t.ScreenTimeRequests=i.ScreenTimeRequests,t.LearnMore=t.DelinkingMoreInfoLinkText,t.LandingActionLinks=i.LandingActionLinks,t.Upsells=i.FamilyUpsells,t.Images=i.Images,t.DeviceNotify=n.content.deviceNotify,t.LandingBanner=n.content.landingBanner,t.ColdStartData=n.content.coldStartData,t.DeviceErrorStateNotifications=i.DeviceErrorStateNotifications,t}]},data:{requiredComponents:["family.notification-center"],optionalComponents:[]}},f(w,t.notificationsPageStateName),i(w,t.notificationsPageStateName+".DeviceNotifySignInSteps","device-notify-sign-in-steps"),i(w,t.notificationsPageStateName+".DeviceNotifyError","device-error-state-dialog"),i(w,t.notificationsPageStateName+".BrowserBlocked","browser-blocked"));c(w,a);h(w,y);for(b in w)w.hasOwnProperty(b)&&(u.state(b,w[b]),w[b].url&&(k=w[b],k.data||(k.data={}),k.data.biPageView||(k.data.biPageView=r)))}function v(n,t){var i;n.portalQos.registerRawEventSchemas([(i={name:t},i[t]={part:"C",def:{fields:[{name:"pageId",type:"string"},{name:"area",type:"string"}]}},i)])}function e(n){return n===t.familyLandingPageStateName?"":"/"}t.moduleName="familyApp";t.appFolderBasePath="/Areas/Family/ScriptsOneUi/";t.settingsFolderBasePath="/Areas/Family/ScriptsOneUISettings/Components/Settings/";t.settingsBaseComponentName="family.settings";t.settingsComponentNames={settings:t.settingsBaseComponentName,recentActivity:t.settingsBaseComponentName+".recentActivity",screenTime:t.settingsBaseComponentName+".screenTime",screenTimePc:t.settingsBaseComponentName+".screenTimePc",screenTimeXbox:t.settingsBaseComponentName+".screenTimeXbox",screenTimeOneAllowance:t.settingsBaseComponentName+".screenTimeOneAllowance",spending:t.settingsBaseComponentName+".spending",contentRestrictionsAppsGames:t.settingsBaseComponentName+".content-restrictions.appsgames",contentRestrictionsWebRestrictions:t.settingsBaseComponentName+".content-restrictions.web-restrictions",contentRestrictionsStore:t.settingsBaseComponentName+".content-restrictions.store",commerceOrderSummary:"commerce.order-summary",findYourChild:t.settingsBaseComponentName+".find-your-child",managePermissions:t.settingsBaseComponentName+".manage-permissions",managePermissionsActivityReporting:t.settingsBaseComponentName+".manage-permissions.activity-reporting",managePermissionsDevices:t.settingsBaseComponentName+".manage-permissions.devices",managePermissionsLocation:t.settingsBaseComponentName+".manage-permissions.location",bingMaps:"shared.mee-bing-maps",appLimits:t.settingsBaseComponentName+".app-limits",appLimitsDrawer:t.settingsBaseComponentName+".app-limits.drawer",appLimitsSlider:t.settingsBaseComponentName+".app-limits.slider",appLimitsWebBlocking:t.settingsBaseComponentName+".app-limits.web-blocking",appLimitsWebBlockingFre:t.settingsBaseComponentName+".app-limits.web-blocking.fre",appLimitsWebBlockingWarning:t.settingsBaseComponentName+".app-limits.web-blocking.warning",appRewards:t.settingsBaseComponentName+".app-rewards"};t.familyLandingPageStateName="Family.Landing";t.familyLandingPageStateNames={appLimitsPromoFamilyUserWithNoChildFreModal:t.familyLandingPageStateName+".familyLandingAppLimitsPromoFamilyUserWithNoChildFreModal",appLimitsPromoUserWithNoFamilySetupYetFreModal:t.familyLandingPageStateName+".familyLandingAppLimitsPromoUserWithNoFamilySetupYetFreModal"};t.settingsPagesBaseStateName="Family.Settings";t.appLimitsPageStateName=t.settingsPagesBaseStateName+".AppLimits";t.appLimitsStateNames={freModal:t.appLimitsPageStateName+".appLimitsFreModal",coldStartAndroidStep1:t.appLimitsPageStateName+".appLimitsColdStartAndroidModalStep1",coldStartAndroidStep2:t.appLimitsPageStateName+".appLimitsColdStartAndroidModalStep2",coldStartAndroidStep3:t.appLimitsPageStateName+".appLimitsColdStartAndroidModalStep3",coldStartAndroidStep4:t.appLimitsPageStateName+".appLimitsColdStartAndroidModalStep4",coldStartCasaStep1:t.appLimitsPageStateName+".appLimitsColdStartCasaModalStep1",coldStartCasaStep2:t.appLimitsPageStateName+".appLimitsColdStartCasaModalStep2",coldStartCasaStep3:t.appLimitsPageStateName+".appLimitsColdStartCasaModalStep3",coldStartCasaStep4:t.appLimitsPageStateName+".appLimitsColdStartCasaModalStep4",coldStartWindows:t.appLimitsPageStateName+".appLimitsColdStartWindowsModal",coldStartXbox:t.appLimitsPageStateName+".appLimitsColdStartXboxModal",deviceErrorStateDialog:t.appLimitsPageStateName+".appLimitsDeviceErrorStateDialog",webBlockingFreModal:t.appLimitsPageStateName+".appLimitsWebBlockingFreModal",webBlockingWarningModal:t.appLimitsPageStateName+".appLimitsWebBlockingWarningModal"};t.settingsStateNames={managePermissions:t.settingsPagesBaseStateName+".ManagePermissions",recentActivity:t.settingsPagesBaseStateName+".RecentActivity",overview:t.settingsPagesBaseStateName+".Overview"};t.promotionName="family.promotion.primary";t.notificationsPageStateName="Family.Notifications";t.familyHostModalId="#family-dialog";t.casaInstallModalSuffix="CasaInstallModal";t.casaInstallModalStateNames={landing:t.familyLandingPageStateName+"."+t.casaInstallModalSuffix,recentActivity:t.settingsStateNames.recentActivity+"."+t.casaInstallModalSuffix,overview:t.settingsStateNames.overview+"."+t.casaInstallModalSuffix};var r,u,o=angular.module(t.moduleName,["ui.router","ngRoute","ngSanitize","commonModule","familyDataModule","unhandledExceptionHandlerModule","clientReliabilityModule","oneui","familyCommonModule","familyAddFlowModule","commerceModule","webBlendModule","captchaModule"]).config(["$stateProvider","$urlRouterProvider","$locationProvider","familyAddFlowRouteSetup","familyAddFlowComponentNames","buyNames","familyConfig","acceptConfig","initialFamilyRosterModel",function(t,i,u,f,e,o,s,h,c){r=function(n){return{path:"/"+n.name.replace(".","/").toLocaleLowerCase(),viewId:n.name.toLocaleLowerCase()}};a(t,f,e,o,s.isRequestOriginApp,h,c);u.html5Mode({enabled:!0,requireBase:!1});i.otherwise(function(n){var t=n.get("$window");return"/"+t.location.search});i.when("/settings/purchase-spending/:childId","/settings/spending/:childId");i.when("/settings/web-browsing/:childId","/settings/content-restrictions/:childId");n.Utilities.isInFlight("FamOverview")&&n.Utilities.isInFlight("FamReactTier1")||i.when("/settings/overview/:childId","/settings/recent-activity/:childId");n.Utilities.isInFlight("FamContentFilters")&&n.Utilities.isInFlight("FamReactTier1")||i.when("/settings/content-filters/:childId","/settings/content-restrictions/:childId")}]);o.run(["$rootScope","telemetryService","familyConfig",function(n,t,i){n.globalErrorStatusCode=null;n.dataContainer="container";n.portalBiReportClick=function(n){window.portalBi.reportClick({pageArea:"body",containerGroup:"Family",clickId:n})};n.$on("$stateChangeStart",function(){u=(new Date).getTime()});n.recordPageView=function(i){n.firstPageLoad&&(n.firstPageLoad=!1);t.portalBi.reportSpaPageView({path:"/family/"+i,viewId:"family."+i.replace(/[/]/g,".")})};n.recordPartialPageView=function(n,i){i||(i=(new Date).getTime()-u);t.portalBi.reportPartialView({viewId:"family."+n,pltMsec:i})};v(t,i.events.familyInterceptNotificationShown)}])})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){var f=this;this.$rootscope=n;this.$state=t;this.addFlowStates=i;this.$cookies=r;this.appConfig=u;this.notifications=[];this.shouldHideLoadingAnimation=!1;this.shouldRenderComponents=!1;this.mainContentReady=!1;this.addMemberReady=!1;n.$on(this.appConfig.familyLoadingEvent,function(){f.mainContentReady=!1});n.$on(this.appConfig.familyLoadedEvent,function(){f.mainContentReady=!0});this.isAddMemberState()&&n.$on(this.addFlowStates.addFamilyMember,function(){f.addMemberReady=!0});n.$on(this.appConfig.familyNotificationEvent,function(n,t){t.isDismissable&&t.cookieName&&f.$cookies.get(t.cookieName)||(t.setOriginatingState(f.$state.current.name),f.notifications.push(t))});n.$on("$stateChangeStart",function(n,t){f.notifications=_.where(f.notifications,{originatingState:t.name})})}return i.prototype.$onInit=function(){},i.prototype.renderPage=function(){return this.mainContentReady&&(!this.isAddMemberState()||this.addMemberReady)},i.prototype.renderFooter=function(){return!this.appConfig.isRequestOriginApp},i.prototype.renderFooterHelp=function(){return!this.appConfig.isFamilySpendingMobileViewEnabled&&!this.appConfig.isRequestOriginApp},i.prototype.hideLoadingMsg=function(){return this.renderPage()},i.prototype.dismissNotification=function(n){var t=this.notifications[n],i;t&&(t.cookieName?(this.$rootscope.portalBiReportClick("dismiss_notification_"+t.cookieName),i=new Date,i.setDate(i.getDate()+360),this.$cookies.put(t.cookieName,"1",{expires:i,path:"/family"})):this.$rootscope.portalBiReportClick("dismiss_notification"),this.notifications.splice(n,1))},i.prototype.getDataContainer=function(){return this.$rootscope.dataContainer},i.prototype.isAddMemberState=function(){return this.$state.current.name==t.familyLandingPageStateName+this.addFlowStates.addFamilyMember},i.$inject=["$rootScope","$state","familyAddFlowStates","$cookies","familyConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"family",{templateUrl:t.appFolderBasePath+"family.html",bindings:{}})],i)}();t.FamilyComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.familyConfig=n;this.$state=t;this.acceptConfig=i}return i.prototype.$onInit=function(){var n;switch(this.familyConfig.accept.experience){case"memberBelowAge":n=this.acceptConfig.memberBelowAgeState;break;case"memberAboveAge":n=this.acceptConfig.memberAboveAgeState;break;case"organizer":n=this.acceptConfig.organizerState;break;case"signedOut":n=this.acceptConfig.signedOutState;break;default:throw new Error("Accept base experience not supported: "+this.familyConfig.accept.experience);}this.$state.go(n,null,{location:"replace"})},i.$inject=["familyConfig","$state","acceptConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"acceptBase",{template:"<ui-view />"})],i)}();t.AcceptBase=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o){this.familyConfig=n;this.formatString=t;this.currentUser=i;this.apiService=r;this.familyRosterService=u;this.$state=f;this.$window=e;this.acceptConfig=o;this.imageAriaLabelledById="main-page-title"}return i.prototype.$onInit=function(){var n=this.familyConfig.content.accept;this.acceptData=this.familyConfig.accept;this.learnMoreText=n.shared.learnMoreLink.text;this.learnMoreUrl=this.formatString(n.shared.learnMoreLink.url,{language:this.currentUser.culture});switch(this.acceptData.experience){case"memberBelowAge":this.renderContent={title:n.memberBelowAge.title,description:n.memberBelowAge.description,valueProps:[n.memberBelowAge.valuePropMoney,n.memberBelowAge.valuePropLocation,n.memberBelowAge.valuePropActivity,n.memberBelowAge.valuePropLimits,],cancelButtonText:n.shared.switchAccountButtonText,joinButtonText:n.shared.joinNow,joinButtonExplanationText:this.getSignInDescription(n.shared.signedInAsConfirmationText),imageUrl:n.memberBelowAge.family.src};break;case"memberAboveAge":this.renderContent={title:n.memberAboveAge.title,description:n.memberAboveAge.description,valueProps:[n.memberAboveAge.valuePropAskToBuy,n.memberAboveAge.valuePropLocation,n.memberAboveAge.valuePropActivity,n.memberAboveAge.valuePropLimits,],cancelButtonText:n.shared.switchAccountButtonText,joinButtonText:n.shared.joinNow,joinButtonExplanationText:this.getSignInDescription(n.shared.signedInAsConfirmationText),imageUrl:n.memberAboveAge.family.src};break;case"organizer":this.renderContent={title:n.organizer.title,description:n.organizer.description,valueProps:[n.organizer.valuePropFiltersLimits,n.organizer.valuePropMap,n.organizer.valuePropSpending,n.organizer.valuePropActivity,],cancelButtonText:n.shared.switchAccountButtonText,joinButtonText:n.shared.joinNow,joinButtonExplanationText:this.getSignInDescription(n.shared.signedInAsConfirmationText),imageUrl:n.organizer.family.src};break;case"signedOut":this.renderContent={title:n.signedOut.title,description:n.signedOut.description,valueProps:[n.signedOut.valuePropSafe,n.signedOut.valuePropFind,n.signedOut.valuePropShare,n.signedOut.valuePropCalendar,n.signedOut.valuePropOneNote,],cancelButtonText:n.signedOut.noThanks,joinButtonText:n.shared.joinNow,joinButtonExplanationText:n.signedOut.signInNextStepExplanation,imageUrl:n.signedOut.family.src};break;default:throw new Error("Accept experience not supported: "+this.acceptData.experience);}},i.prototype.getSignInDescription=function(n){return this.formatString(n,{emailAddress:this.acceptData.email})},i.prototype.cancel=function(){this.acceptData.experience=="signedOut"?this.goToFamilyLanding():this.$window.location.href=this.acceptData.signOutSignInUrl},i.prototype.join=function(){var n=this;this.acceptData.experience=="signedOut"?this.$window.location.href=this.acceptData.signInUrl:this.apiService.acceptMember(this.acceptData.acceptApiParameters).then(function(){n.familyRosterService.invalidateFamilyCache();n.goToFamilyLanding()}).catch(function(t){var i=t.jqXHR.responseJSON;n.$state.go(n.acceptConfig.errorBaseState,{errorCode:i.error},{location:"replace"})})},i.prototype.goToFamilyLanding=function(){return this.$state.go(t.familyLandingPageStateName,null,{location:"replace"})},i.$inject=["familyConfig","stringFormatFilter","currentUser","apiService","rosterService","$state","$window","acceptConfig",],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"accept",{templateUrl:t.appFolderBasePath+"Accept/accept.html"})],i)}();t.Accept=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$state=n;this.imageAriaLabelledById="main-page-title"}return i.prototype.getInstrumentationComponentName=function(){return"acceptErrorBase"},i.prototype.componentOnInit=function(){var n=this.$state.params.errorCode;switch(n){case"Family.FamilySizeExceedLimit":this.goToSpecificErrorExperience("accept.error.sizeLimit");break;case"Family.MemberExistsInOtherFamily":this.goToSpecificErrorExperience("accept.error.inOtherFamily");break;case"Family.PendingMemberNotInFamily":case"Family.UnableToFindValidSecondaryCode":case"Family.UnableToFindValidInvitationToken":case"Family.PendingMemberAlreadyRemoved":this.goToSpecificErrorExperience("accept.error.expired");break;case"Family.UnableToAcceptInvitationWithAccount":this.goToSpecificErrorExperience("accept.error.windowsMatchAccount");break;case"Family.NotAllowedToAddMember":case"Family.ActionThrottledForFamily":case"Family.ActionThrottledForUser":this.goToSpecificErrorExperience("accept.error.genericError");break;default:throw new Error("Accept error not yet supported: "+n);}},i.prototype.goToSpecificErrorExperience=function(n){this.$state.go(n,null,{location:"replace"})},i.$inject=["$state",],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"acceptErrorBase",{template:"<ui-view />"})],i)}();t.AcceptErrorBase=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.familyConfig=n;this.$state=t;this.stringFormatFilter=i;this.$window=r;this.telemetry=u;this.imageAriaLabelledById="main-page-title";this.currentStateName=this.$state.current.name}return i.prototype.$onInit=function(){var n=this.familyConfig.content.accept,t;switch(this.currentStateName){case"accept.error.sizeLimit":this.renderContent={title:n.errors.familySizeExceedLimit.title,description:n.errors.familySizeExceedLimit.description,imageUrl:n.errors.familySizeExceedLimit.family.src};break;case"accept.error.inOtherFamily":this.renderContent={title:n.errors.memberExistsInOtherFamily.title,description:n.errors.memberExistsInOtherFamily.description,instruction:n.errors.memberExistsInOtherFamily.instructions.htmlString,buttonText:n.errors.memberExistsInOtherFamily.buttonText,imageUrl:n.errors.memberExistsInOtherFamily.family.src};break;case"accept.error.expired":this.renderContent={title:n.errors.pendingMemberNotInFamily.title,description:n.errors.pendingMemberNotInFamily.description,instruction:n.errors.pendingMemberNotInFamily.instructions,imageUrl:n.errors.pendingMemberNotInFamily.family.src};break;case"accept.error.windowsMatchAccount":t=this.stringFormatFilter(n.errors.matchAccount.instructions.htmlString,this.familyConfig.accept.email);this.renderContent={title:n.errors.matchAccount.title,instruction:t,buttonText:n.errors.matchAccount.buttonText,imageUrl:n.errors.matchAccount.family.src};break;case"accept.error.genericError":this.renderContent={title:n.errors.genericError.title,description:n.errors.genericError.description,imageUrl:n.errors.genericError.family.src};this.traceId=this.telemetry.portalCv.getCurrentCvValue();break;default:throw new Error("Unsupported state in accept error component: "+this.currentStateName);}},i.prototype.clickOk=function(){switch(this.currentStateName){case"accept.error.inOtherFamily":this.$state.go(t.familyLandingPageStateName,{bypassColdStart:!0});break;case"accept.error.windowsMatchAccount":this.$window.location.href=this.familyConfig.accept.signOutSignInUrl;default:this.$state.go(t.familyLandingPageStateName)}},i.$inject=["familyConfig","$state","stringFormatFilter","$window","telemetryService",],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"acceptError",{templateUrl:t.appFolderBasePath+"Accept/accept.error.html"})],i)}();t.AcceptError=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){angular.module(n.moduleName).constant("acceptConfig",{area:"Family",baseState:"accept",signedOutState:"accept.signedout",memberBelowAgeState:"accept.memberBelowAge",memberAboveAgeState:"accept.memberAboveAge",organizerState:"accept.organizer",baseurl:"accept",errorBaseState:"accept.error"})})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.$anchorScroll=n;this.$stateParams=t;this.$q=i;this.buyNames=r;this.buyScenario=u;this.telemetry=f}return i.prototype.$onInit=function(){this.strings=this.compassContent.template.Content.Strings;this.urls=this.compassContent.template.Content.Links;this.familyProduct=this.$stateParams.familyProduct;this.cid=this.$stateParams.cid;this.telemetry.portalScenarios.endMultiStepScenario({area:this.buyNames.area,name:this.buyScenario.name,step:this.buyScenario.displayReceipt,isSuccess:!0,data:{productId:this.familyProduct.ProductDocument.Product.ProductId,productKind:this.familyProduct.ProductDocument.Product.ProductKind,productPrice:this.familyProduct.Price}});this.$anchorScroll()},i.$inject=["$anchorScroll","$stateParams","$q","buyNames","buyScenario","telemetryService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"familyBuyComplete",{templateUrl:t.appFolderBasePath+"Buy/family-buy.complete.html",bindings:{familyRosterModel:"<",compassContent:"<"}})],i)}();t.FamilyBuyComplete=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;angular.module(t.moduleName).constant("buyScenario",{name:"BuyInit",displayFeed:"DisplayFeed",feedAllow:"FeedAllow",feedDeny:"FeedDeny",loadPage:"LoadPage",fullFrameAuth:"FullFrameAuth",fullFrameAuthReturned:"FullFrameAuthReturned",displayPurchase:"DisplayPurchase",displayReceipt:"DisplayReceipt",displayCsvFlowRedirect:"DisplayCsvRedirect",displayAlreadyCompleted:"DisplayAlreadyCompleted",displayExpired:"DisplayExpired",displayProductRemoved:"DisplayProductRemoved"}).constant("buyNames",{area:"Family",baseState:"Buy",completeState:"Complete",purchaseState:"Purchase",notificationState:"Family.Landing",instrumentedComponentName:"family.buy",purchaseComponentName:"family.buy.purchase",completeComponentName:"family.buy.complete",url:"buy",askParamName:"ask"}).constant("buyErrors",{redirectState:"Family.Landing",parsingParams:"Error parsing ask param",missingPurchaseParams:"Parameters missing on purchase page",missingCid:"Ask param missing childId",missingFsid:"Ask param missing fssRequestId",typeCid:"Ask param cid is the wrong type",typeFsid:"Ask param fsid is the wrong type",childNotInFamily:"Child not a member of this family",childCannotApprovePurchase:"Child cannot purchase for child",requestDoesNotExist:"Request does not exist for this child",failedToLoadProduct:"Failed to load product details.",failedToGetMscomctOnFullAuth:"Failed to retrieve mscomct on full auth",failedToGetMscomctTimeout:"Timeout retrieving mscomct",webBlenderError:"WebBlender had an error",timedOutWaitingForBlender:"Timed out waiting for blender ready.",failedToAllow:"Error during allow transition.",failedToDeny:"Error denying request."});i=function(){function i(n,t,i,r,u,f,e,o,s,h){this.$state=n;this.rosterService=t;this.telemetry=i;this.$q=r;this.buyScenario=u;this.buyNames=f;this.buyErrors=e;this.apiService=o;this.$stateParams=s;this.notificationsService=h;this.biData={}}return i.prototype.getInstrumentationComponentName=function(){return this.buyNames.instrumentedComponentName},i.prototype.componentOnInit=function(){var n=this,t,r,u,f,i;this.strings=this.compassContent.template.Content.Strings;t=!1;try{r=JSON.parse(decodeURIComponent(this.$stateParams.ask));this.childId=r.cid;this.fssRequestId=r.fsid;this.askParamSrc=r.src}catch(e){t=!0}if(this.askParamSrc==="site"?(this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.buyScenario.feedAllow,next:this.buyScenario.loadPage,isSuccess:!t}),this.currentStep=this.buyScenario.loadPage):this.askParamSrc==="auth"?(this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.buyScenario.fullFrameAuth,next:this.buyScenario.fullFrameAuthReturned,isSuccess:!t}),this.currentStep=this.buyScenario.fullFrameAuthReturned):(this.telemetry.portalScenarios.beginMultiStepScenario(this.buyNames.area,this.buyScenario.name,this.buyScenario.loadPage),this.currentStep=this.buyScenario.loadPage),t)return this.handleExperienceError(this.buyErrors.parsingParams);if(this.familyRosterModel.isUserAChild)return this.showInlineMessageToUser(this.buyErrors.childCannotApprovePurchase,this.strings.SignInAsValidUserExplanationChild);if(!this.childId)return this.handleExperienceError(this.buyErrors.missingCid);if(!this.fssRequestId)return this.handleExperienceError(this.buyErrors.missingFsid);if(typeof this.childId!="string")return this.handleExperienceError(this.buyErrors.typeCid);if(typeof this.fssRequestId!="string")return this.handleExperienceError(this.buyErrors.typeFsid);for(u=this.familyRosterModel.getAllChildren(),f=!1,i=0;i<u.length;i++)if(u[i].Cid===this.childId){f=!0;this.child=u[i];break}return f?this.apiService.getPurchaseRequests(this.child.FamilyServiceId).then(function(t){for(var u,i,r=0;r<t.Requests.length;r++)if(n.fssRequestId===t.Requests[r].Id){i=t.Requests[r];break}return i?i.RequestStatus===2?(n.sendCompletedRequestNotification(),n.telemetry.portalScenarios.endStep({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,next:n.buyScenario.displayAlreadyCompleted}),n.$state.go(n.buyNames.notificationState,null,{location:"replace"})):(u={Child:n.child,PurchaseRequest:i,IsAuthRedirect:n.askParamSrc==="auth"},n.$state.go(n.buyNames.baseState+"."+n.buyNames.purchaseState,u,{location:"replace"})):(n.sendExpiredRequestNotification(),n.telemetry.portalScenarios.endStep({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,next:n.buyScenario.displayExpired}),n.$state.go(n.buyNames.notificationState,null,{location:"replace"}))}):this.showInlineMessageToUser(this.buyErrors.childNotInFamily,this.strings.SignInAsValidUserExplanationNotInFamily)},i.prototype.failStep=function(n){this.telemetry.portalScenarios.endMultiStepScenario({area:this.buyNames.area,name:this.buyScenario.name,step:this.currentStep,isSuccess:!1,error:n})},i.prototype.handleExperienceError=function(n){return this.failStep(n),this.$state.go(this.buyErrors.redirectState,null,{location:"replace"})},i.prototype.showInlineMessageToUser=function(n,t){return this.shouldDisplayError=!0,this.displayErrorString=t,this.failStep(n),this.$q.resolve()},i.prototype.sendExpiredRequestNotification=function(){var i=this,n=new t.BasicNotificationData,r;n.iconClasses="mee-icon-Important mee-border";n.title=this.strings.RequestExpired;n.body=this.strings.RequestExpiredSubtext;n.dismissAriaLabel=this.strings.DismissNotificationAriaText;r=function(){i.telemetry.portalScenarios.endMultiStepScenario({area:i.buyNames.area,step:i.buyScenario.displayExpired,name:i.buyScenario.name,isSuccess:!0})};this.notificationsService.addNotification({type:t.NotificationType.Basic,data:n,onInit:r})},i.prototype.sendCompletedRequestNotification=function(){var i=this,n=new t.BasicNotificationData,r;n.iconClasses="mee-icon-Accept mee-border";n.title=this.strings.AlreadyApproved;n.body=this.strings.AlreadyApprovedSubtext;n.dismissAriaLabel=this.strings.DismissNotificationAriaText;r=function(){i.telemetry.portalScenarios.endMultiStepScenario({area:i.buyNames.area,step:i.buyScenario.displayAlreadyCompleted,name:i.buyScenario.name,isSuccess:!0})};this.notificationsService.addNotification({type:t.NotificationType.Basic,data:n,onInit:r})},i.$inject=["$state","rosterService","telemetryService","$q","buyScenario","buyNames","buyErrors","apiService","$stateParams","notificationsService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familyBuy",{templateUrl:t.appFolderBasePath+"Buy/family-buy.html",bindings:{familyRosterModel:"<",compassContent:"<"}})],i)}();t.FamilyBuy=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){this.familyProductService=n;this.$q=t;this.$timeout=i;this.telemetry=r;this.buyScenario=u;this.buyNames=f;this.buyErrors=e;this.commerceDataService=o;this.$scope=s;this.silentAuthService=h;this.webBlenderService=c;this.mDollarOrderService=l;this.$state=a;this.$stateParams=v;this.apiService=y;this.$window=p;this.notificationsService=w;this.webBlenderReadyTimeoutMs=3e4;this.silentAuthReadyTimeoutMs=3e4;this.biData={};this.blendDivId="blendDivId";this.shouldDisplayError=!1}return i.prototype.getInstrumentationComponentName=function(){return this.buyNames.purchaseComponentName},i.prototype.componentOnInit=function(){var n=this,i,r;return(this.currentStep=this.$stateParams.IsAuthRedirect?this.buyScenario.fullFrameAuthReturned:this.buyScenario.loadPage,!this.$stateParams.Child||!this.$stateParams.PurchaseRequest)?this.errorRedirectPage(this.buyErrors.missingPurchaseParams):(this.strings=this.compassContent.template.Content.Strings,this.urls=this.compassContent.template.Content.Links,this.blenderLoadQosTracker=this.$q.defer(),this.childMarket=this.$stateParams.PurchaseRequest.Market,i=this.apiService.getProductDetails(this.$stateParams.Child.FamilyServiceId,this.$stateParams.PurchaseRequest.ProductId,this.$stateParams.PurchaseRequest.SkuId,this.$stateParams.PurchaseRequest.Market,this.$stateParams.PurchaseRequest.Language).then(function(t){return n.biData.productId=t.ProductDocument.Product.ProductId,n.biData.productKind=t.ProductDocument.Product.ProductKind,n.biData.productPrice=t.Price,n.headerString=n.familyProductService.isRental(t)?n.strings.PurchaseHeaderRent:n.strings.PurchaseHeader,t}).catch(function(i){var r,u;return i&&i.jqXHR&&i.jqXHR.status===400?(r=new t.BasicNotificationData,r.iconClasses="mee-icon-Important mee-border",r.title=n.strings.ProductNotAvailable,r.body=n.strings.ProductNoLongerAvailable,r.dismissAriaLabel=n.strings.DismissNotificationAriaText,u=function(){n.telemetry.portalScenarios.endMultiStepScenario({area:n.buyNames.area,step:n.buyScenario.displayProductRemoved,name:n.buyScenario.name,isSuccess:!0})},n.notificationsService.addNotification({type:t.NotificationType.Basic,data:r,onInit:u}),n.telemetry.portalScenarios.endStep({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,next:n.buyScenario.displayProductRemoved}),n.$state.go(n.buyNames.notificationState,null,{location:"replace"}).then(function(){return n.$q.reject(n.strings.ProductNotAvailable)})):n.errorRedirectPage(n.buyErrors.failedToLoadProduct)}),r=(this.$stateParams.IsAuthRedirect?this.commerceDataService.getMetadata({metadata:"mscomct"}).catch(function(){return n.shouldDisplayError=!0,n.$q.resolve()}):this.silentAuthService.iFrameAuth(this.silentAuthReadyTimeoutMs).then(function(){return n.commerceDataService.getMetadata({metadata:"mscomct"})})).catch(function(t){if(n.$stateParams.IsAuthRedirect)n.errorRedirectPage(n.buyErrors.failedToGetMscomctOnFullAuth);else if(t&&t.indexOf("timeout")!==-1)n.errorRedirectPage(n.buyErrors.failedToGetMscomctTimeout);else{n.telemetry.portalScenarios.endStep({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,next:n.buyScenario.fullFrameAuth,isSuccess:!0,data:n.biData});n.currentStep=n.buyScenario.fullFrameAuth;var i={fsid:n.$stateParams.PurchaseRequest.Id,cid:n.$stateParams.Child.Cid,src:"auth"},r=n.$state.href(n.buyNames.baseState,{ask:JSON.stringify(i)},{absolute:!0});n.silentAuthService.fullFrameAuth(r)}}),this.$q.all({familyProduct:i,metadata:r}).then(function(t){if(n.familyProduct=t.familyProduct,n.familyProductService.requiresCsvFundFlow(n.familyProduct))return n.csvLinkHref=""+n.urls.AddMoneyLink.Url+n.$stateParams.Child.Cid+"?market="+n.childMarket+"&fref=amc.family.aap",n.telemetry.portalScenarios.endStep({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,next:n.buyScenario.displayCsvFlowRedirect,isSuccess:!0,data:n.biData}),n.currentStep=n.buyScenario.displayCsvFlowRedirect,n.isInAppCsvFlow=!0,n.telemetry.portalScenarios.endMultiStepScenario({area:n.buyNames.area,name:n.buyScenario.name,step:n.currentStep,isSuccess:!0,data:n.biData}),n.$q.resolve();var i=n.mDollarOrderService.getPurchaseOnBehalfOfCreateOrderInfo({AvailabilityId:t.familyProduct.AvailabilityId,ProductId:n.$stateParams.PurchaseRequest.ProductId,SkuId:n.$stateParams.PurchaseRequest.SkuId,BeneficiaryId:n.$stateParams.Child.FamilyServiceId,Market:n.childMarket,Language:n.$stateParams.PurchaseRequest.Language}),r=n.mDollarOrderService.createOrder(i,t.metadata),u=n.apiService.approvePurchaseRequest(n.$stateParams.Child.FamilyServiceId,i.orderId,n.$stateParams.PurchaseRequest.ProductId,n.$stateParams.PurchaseRequest.SkuId).catch(function(){});return n.$q.all({order:r,approve:u}).then(function(r){return n.blenderLoadQosTrackerTimeoutPromise=n.$timeout(function(){n.blenderLoadQosTracker.reject(n.buyErrors.timedOutWaitingForBlender);n.errorRedirectPage(n.buyErrors.timedOutWaitingForBlender)},n.webBlenderReadyTimeoutMs),n.onWebBlendMessageReceived=function(t){n.webBlendMessageHandler(t)},n.webBlenderService.registerMessageHandler(n.onWebBlendMessageReceived),n.webBlenderService.purchaseSingleItem(n.getPurchaseSingleItemObject(i.orderId,r.order,t.metadata,i)),n.blenderLoadQosTracker.promise}).catch(function(){throw new Error("Unable to create order");})}).catch(function(t){if(t==n.strings.ProductNotAvailable)return n.$q.resolve();throw new Error(t);}))},i.prototype.onAlertClosed=function(){this.telemetry.portalScenarios.cancelMultiStepScenario(this.getStepResults("Full frame auth error",!1));this.$state.go(this.buyErrors.redirectState,null,{location:"replace"})},i.prototype.$onDestroy=function(){this.webBlenderService.unregisterMessageHandler(this.onWebBlendMessageReceived)},i.prototype.webBlendMessageHandler=function(n){if(n.origin==="https://www.microsoft.com"&&typeof n.data=="string"){var i=void 0,t=void 0;try{t=JSON.parse(n.data);i=t.message}catch(r){}t&&i&&(i==="error"?(this.telemetry.portalQos.reportClientError({category:this.buyNames.area,data:t,message:t.data&&t.data.errorMessage||"generic"}),this.errorRedirectPage(this.buyErrors.webBlenderError)):i==="transitioned"?t.context&&t.context==="error":i==="ready"?(this.$timeout.cancel(this.blenderLoadQosTrackerTimeoutPromise),this.blenderLoadQosTracker.resolve(i),this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.currentStep,next:this.buyScenario.displayPurchase,isSuccess:!0,data:this.biData}),this.currentStep=this.buyScenario.displayPurchase):i==="done"?t.status==="cancel"?(this.cancelScenario("User canceled"),this.$state.go(this.buyErrors.redirectState,null,{location:"replace"})):(this.completePurchaseRequest(),this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.currentStep,next:this.buyScenario.displayReceipt,isSuccess:!0,data:this.biData}),this.$state.go(this.buyNames.baseState+"."+this.buyNames.completeState,{familyProduct:this.familyProduct,cid:this.$stateParams.Child.Cid},{location:"replace"})):i==="openUrl"&&typeof t.targetUrl!="undefined"&&(this.cancelScenario("Blender open url"),this.$window.location.href=t.targetUrl))}},i.prototype.completePurchaseRequest=function(){return this.apiService.completePurchaseRequest(this.$stateParams.Child.FamilyServiceId,this.$stateParams.PurchaseRequest.ProductId,this.$stateParams.PurchaseRequest.SkuId,this.familyProduct.ProductDocument.Product.ProductFamily)},i.prototype.getPurchaseSingleItemObject=function(n,t,i,r){return{OrderId:n,Order:t,Auth:'WLID1.0="'+i.metadata.mscomct+'"',ParentElementId:this.blendDivId,Environment:"prod",ClientType:r.clientContext.client,Culture:r.language,Market:r.market,IframeOptions:{height:"420px",width:"100%"},PurchaseServiceVersion:"7",Jwt:this.$stateParams.Child.JsonWebToken,BeneficiaryData:{email:this.$stateParams.Child.PrimaryId,firstName:this.$stateParams.Child.FirstName,lastName:this.$stateParams.Child.LastName},Product:this.familyProduct.ProductDocument}},i.prototype.errorRedirectPage=function(n){var t=this;return this.endScenario(n,!1),this.$state.go(this.buyErrors.redirectState,null,{location:"replace"}).then(function(){return t.$q.reject(n)})},i.prototype.getStepResults=function(n,t){return{area:this.buyNames.area,name:this.buyScenario.name,step:this.currentStep,isSuccess:t,error:n,data:this.biData}},i.prototype.endScenario=function(n,t){this.telemetry.portalScenarios.endMultiStepScenario(this.getStepResults(n,t))},i.prototype.cancelScenario=function(n){this.telemetry.portalScenarios.cancelMultiStepScenario(this.getStepResults(n,!0))},i.$inject=["familyProductService","$q","$timeout","telemetryService","buyScenario","buyNames","buyErrors","controlsService","$scope","silentAuthService","webBlenderService","mDollarOrderService","$state","$stateParams","apiService","$window","notificationsService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("FamilyBuyPurchaseComponentInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("completePurchaseRequest")],i.prototype,"completePurchaseRequest",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familyBuyPurchase",{templateUrl:t.appFolderBasePath+"Buy/family-buy.purchase.html",bindings:{familyRosterModel:"<",compassContent:"<"}})],i)}();t.FamilyBuyPurchase=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$scope=n;this.formatString=t;this.currentUser=i;this.rosterService=r;this.familyBannerService=u}return i.prototype.$onInit=function(){var n=this;return this.$scope.$on(this.rosterService.familyRosterUpdatedEvent,function(){return n.reloadFamilyRosterModelAndUpdateContent()}),this.reloadFamilyRosterModelAndUpdateContent()},i.prototype.reloadFamilyRosterModelAndUpdateContent=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.familyRosterModel=t;n.updateContent()})},i.prototype.updateContent=function(){this.manageChildProfileInfoLink=this.formatString(this.compassStrings.ManageChildProfileInfoLink,[this.currentCulture]);this.twoLetterLang=this.currentUser.twoLetterLang;this.currentCulture=this.currentUser.culture;this.shouldShowHeader=!this.familyBannerService.shouldShowLandingBanner(this.familyRosterModel)},i.$inject=["$scope","stringFormatFilter","currentUser","rosterService","familyBannerService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"familyHeader",{templateUrl:t.appFolderBasePath+"Components/family-header.html",bindings:{heading:"@",compassStrings:"<"}})],i)}()})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.$onInit=function(){this.isProfilePictureLoadingError=!this.profilePictureUrl},i.prototype.onProfilePictureLoadingError=function(){this.isProfilePictureLoadingError=!0;this.profilePictureUrl=""},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"meeProfileImage",{template:'<img mee-image="round"\n                             alt="{{$ctrl.alt}}"\n                             ng-src="{{$ctrl.profilePictureUrl}}"\n                             ng-if="!!$ctrl.profilePictureUrl && !$ctrl.isProfilePictureLoadingError"\n                             data-mee-onerror\n                             data-error-callback="$ctrl.onProfilePictureLoadingError()" />\n                       <div ng-if="$ctrl.isProfilePictureLoadingError">\n                            <i class="mee-icon mee-icon-Contact mee-border"><\/i>\n                       <\/div>',bindings:{profilePictureUrl:"@",alt:"@"}})],i)}();t.ProfileImageComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$state=n;this.$meeModal=t}return i.prototype.$onInit=function(){var n=this.$meeModal.getData();this.content=n.content;this.compass=n.compass;this.onApproved=n.onApproved;this.onCanceled=n.onCanceled},i.prototype.onAllow=function(){this.$meeModal.goBack();this.onApproved()},i.prototype.onCancel=function(){this.$meeModal.goBack();this.onCanceled()},i.$inject=["$state","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"browserBlocked",{templateUrl:t.appFolderBasePath+"Components/Browser/browser-blocked.html"})],i)}();t.BrowserBlockedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(){this.deviceIcons={phone:"mee-icon-CellPhone",tablet:"mee-icon-Tablet",pc:"mee-icon-TVMonitor",console:"mee-icon-XboxOneConsole",laptop:"mee-icon-System",multiple:"mee-icon-Devices2",unknown:"mee-icon-System",windows10:"mee-icon-WindowsLogo windows10-logo",windowsphone8:"mee-icon-WindowsLogo windows-phone8-logo",xboxone:"mee-icon-XboxLogo xbox-one-logo"}}return n}();angular.module(n.moduleName).component("deviceFontIcon",{template:"<div><span ng-class=\"['mee-icon', $ctrl.deviceIcons[$ctrl.deviceType.toLowerCase()]]\"><\/span><\/div>",bindings:{deviceType:"<"},controller:t})})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){angular.module(n.moduleName).component("deviceInfo",{templateUrl:n.appFolderBasePath+"Components/DeviceInfo/deviceInfo.html",bindings:{name:"@",type:"@",version:"@"}})})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$meeModal=n}return i.prototype.$onInit=function(){var n=this.$meeModal.getData();this.cms=n.cms;this.isSingleInstruction=!this.cms.dialogInstructionSteps.length},i.prototype.close=function(){this.$meeModal.goBack()},i.$inject=["$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceErrorStateDialog",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-error-state-dialog.html"})],i)}();t.DeviceErrorStateDialogComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i="deviceNotifyError",r=function(){function r(n,t,i,r){this.familyConfig=n;this.deviceNotificationSvc=t;this.formatString=i;this.dateTimeFormatter=r}return r.prototype.getErrorString=function(t){var i=t.PrimaryErrorState;return this.formatString(this.familyConfig.content.landing.DeviceErrorStateNotifications[t.PrimaryErrorStateType].summaryMessage,{deviceName:t.Name,timestamp:i.LastDetectedOn&&this.dateTimeFormatter.toLongDateTime(n.Utilities.parseServerDatetime(i.LastDetectedOn))})},r.prototype.openDeviceNotifyErrorModal=function(n){this.deviceNotificationSvc.openDeviceErrorStateDialog(n,"Family.Settings.RecentActivity.DeviceNotifyError",i)},r.$inject=["familyConfig","deviceNotificationService","stringFormatFilter","dateTimeFormatter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifyError",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-error.html",bindings:{devices:"<"}})],r)}();t.DeviceNotifyLauncherErrorComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifyLauncherAttention",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-launcher-attention.html",bindings:{devices:"<",compass:"<"}})],i)}();t.DeviceNotifyLauncherAttentionComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$meeModal=n;this.appConfig=t}return i.prototype.$onInit=function(){var n=this.$meeModal.getData();this.devices=n.devices;this.compass=this.appConfig.content.deviceNotify},i.prototype.onCloseButton=function(){this.$meeModal.goBack()},i.$inject=["$meeModal","familyConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifySignInSteps",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-sign-in-steps.html"})],i)}();t.DeviceNotifySignInStepsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.svc=n}return i.prototype.openDeviceNotifySignInStepsModal=function(){this.svc.openDeviceNotifySignInStepsModal(this.devices)},i.$inject=["recentActivityService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifySignIn",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-sign-in.html",bindings:{devices:"<",compass:"<"}})],i)}();t.DeviceNotifySignInComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$meeModal=n;this.appConfig=t}return i.prototype.$onInit=function(){var n=this.$meeModal.getData();this.devices=n.devices;this.compass=this.appConfig.content.deviceNotify},i.prototype.onCloseButton=function(){this.$meeModal.goBack()},i.$inject=["$meeModal","familyConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifyTelemetrySteps",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-telemetry-steps.html"})],i)}();t.DeviceNotifyTelemetryStepsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.svc=n}return i.prototype.openDeviceNotifyTelemetryStepsModal=function(){this.svc.openDeviceNotifyTelemetryStepsModal(this.devices)},i.$inject=["recentActivityService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceNotifyTelemetry",{templateUrl:t.appFolderBasePath+"Components/DeviceNotification/device-notify-telemetry.html",bindings:{devices:"<",compass:"<"}})],i)}();t.DeviceNotifyTelemetryComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.$meeModal=n}return n.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.options=this.passedData.options},n.prototype.yes=function(){this.passedData.callback("yes");this.$meeModal.hide()},n.prototype.no=function(){this.passedData.callback("no");this.$meeModal.hide()},n.$inject=["$meeModal"],n}();n.DialogYesNo=t;angular.module(n.moduleName).component("dialogYesNo",{templateUrl:n.appFolderBasePath+"Components/DialogYesNo/dialog-yes-no.html",controller:t})})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"familyBannerTask",{templateUrl:t.appFolderBasePath+"Components/FamilyBanner/family-banner-task.html",bindings:{icon:"<",titleText:"<",infoText:"<",link:"<"}})],i)}();t.FamilyBannerTaskComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$q=n;this.familyBannerService=t}return i.prototype.componentOnInit=function(){return this.onChildModelChange()},i.prototype.$onChanges=function(n){n.childModel&&!n.childModel.isFirstChange()&&this.onChildModelChange()},i.prototype.onChildModelChange=function(){var n=this,t;return this.task1=null,this.task2=null,this.task3=null,t=this.bannerConfig.tasks.map(function(t){return n.familyBannerService.getTaskState(t,n.childModel)}),this.$q.all(t).then(function(t){t.forEach(function(t){t&&n.setNextTask(t)})})},i.prototype.setNextTask=function(n){this.task1?this.task2?this.task3||(this.task3=n):this.task2=n:this.task1=n},i.prototype.getInstrumentationComponentName=function(){return"family.banner"},i.$inject=["$q","familyBannerService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familyBanner",{templateUrl:t.appFolderBasePath+"Components/FamilyBanner/family-banner.html",bindings:{bannerConfig:"<",childModel:"<"},transclude:{profile:"familyBannerProfile"}})],i)}();t.FamilyBannerComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i="Family.Settings.RecentActivity",r=function(){function r(n,t,i,r,u){this.$scope=n;this.rosterService=t;this.pageReliabilityService=i;this.familyBannerService=r;this.$state=u}return r.prototype.componentOnInit=function(){var n=this;this.$scope.$on(this.rosterService.familyRosterUpdatedEvent,function(){return n.reloadFamilyRosterModelAndUpdateContent()});this.updateContent()},r.prototype.reloadFamilyRosterModelAndUpdateContent=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.familyRosterModel=t;n.updateContent()})},r.prototype.updateContent=function(){var t,n;this.shouldShowBanner=this.familyBannerService.shouldShowLandingBanner(this.familyRosterModel);this.shouldShowBanner&&(this.pageReliabilityService.addRequiredComponentName("family.banner"),this.compassData=this.compassStrings.LandingBanner,t=this.familyRosterModel.getChildren(),this.familyMembers=this.familyRosterModel.getAdults().concat(t),this.showAddMember=!this.familyRosterModel.isFamilyFull(),this.singleChild=t.length==1?t[0]:null,n=this.showAddMember?5:6,this.familyMembers.length>n?(--n,this.firstFamilyMembers=this.familyMembers.slice(0,n),this.secondFamilyMembers=this.familyMembers.slice(n)):(this.firstFamilyMembers=this.familyMembers,this.secondFamilyMembers=[]))},r.prototype.userLink=function(n){return n.IsChild?this.$state.href(i,{childId:n.childId}):"#adult-"+n.Cid},r.prototype.getInstrumentationComponentName=function(){return"family.landing.banner"},r.$inject=["$scope","rosterService","pageReliabilityService","familyBannerService","$state"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reloadFamilyRosterModelAndUpdateContent")],r.prototype,"reloadFamilyRosterModelAndUpdateContent",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familyLandingBanner",{templateUrl:t.appFolderBasePath+"Components/FamilyBanner/family-landing-banner.html",bindings:{familyRosterModel:"<",compassStrings:"<"}})],r)}();t.FamilyLandingBannerComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$scope=n;this.$state=t;this.pageReliabilityService=i;this.familyBannerService=r;this.familyConfig=u;this.formatString=f;this.rosterService=e}return i.prototype.componentOnInit=function(){var n=this;return this.$scope.$on(this.rosterService.familyRosterUpdatedEvent,function(){return n.reloadFamilyRosterModelAndUpdateContent()}),this.updateContent()},i.prototype.reloadFamilyRosterModelAndUpdateContent=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.familyRosterModel=t;n.updateContent()})},i.prototype.updateContent=function(){var n=this;this.shouldShowBanner=this.familyBannerService.shouldShowSettingsBanner(this.familyRosterModel);this.shouldShowBanner&&(this.pageReliabilityService.addRequiredComponentName("family.banner"),this.compassData=this.familyConfig.content.settingsBanner,this.$scope.$watch(function(){return n.$state.params.childId},function(t){return n.onChildChanged(t)}))},i.prototype.onChildSelected=function(n){this.$state.go(".",{childId:n})},i.prototype.getInstrumentationComponentName=function(){return"family.settings.banner"},i.prototype.onChildChanged=function(n){var t=this.familyRosterModel.getMemberInfo(n);this.selectedChild=t;this.otherChildren=this.familyRosterModel.getChildren().filter(function(n){return n!==t});t&&(this.selectedChildContact=t.IsLocal?this.formatString(this.familyConfig.content.landing.Strings.LocalAccountOn,[t.LocalAccountMachineName]):t.PrimaryId)},i.$inject=["$scope","$state","pageReliabilityService","familyBannerService","familyConfig","stringFormatFilter","rosterService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familySettingsBanner",{templateUrl:t.appFolderBasePath+"Components/FamilyBanner/family-settings-banner.html",bindings:{familyRosterModel:"<"}})],i)}();t.FamilySettingsBannerComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.apiService=n;this.promotionService=t;this.$q=i}return i.prototype.getInstrumentationComponentName=function(){return"family.promotion.primary"},i.prototype.getTrackingIdCallback=function(){var n=this.getInstrumentationComponentName();return this.data&&this.data.ad.cid&&(n=n+"."+this.data.ad.cid),n},i.prototype.componentOnInit=function(){var n=this;return this.promotionService.getCampaignData(this.surfaceName).then(function(t){return n.isError(JSON.parse(t.data))})},i.prototype.isError=function(n){var t=this.getInstrumentationComponentName(),i;if(!n)return i="Iris error: no data returned for "+this.surfaceName+" in "+t+" component",this.$q.reject(i);if(n.error&&n.error.code){if(n.error.code===2e3||n.error.code===2040)return this.$q.resolve();var r="Iris error surface: "+this.surfaceName+" in "+t+" component",u="Iris error code: "+n.error.code,f="Iris error message: "+n.error.msg,e=r+"\n"+u+"\n"+f;return this.$q.reject(e)}return this.data=n,this.$q.resolve()},i.$inject=["apiService","promotionService","$q"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-family-promotion")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"familyFeaturePromotion",{bindings:{surfaceName:"@"},template:'<iris-feature-promotion id="family-feature-promotion" data="$ctrl.data"><\/iris-feature-promotion>'})],i)}();t.FamilyFeaturePromotionComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.appConfig=n}return i.prototype.$onInit=function(){this.helpLinks=this.appConfig.content.helpLinks;this.title=this.helpLinks.TitleText;this.links=this.helpLinks.Links},i.$inject=["familyConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"footerHelp",{templateUrl:t.appFolderBasePath+"Components/FooterHelp/footer-help.component.html",bindings:{}})],i)}();t.FooterHelpComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){function t(n){for(var t=0;!n[t].offsetTop&&++t<n.length;);return t}function i(n){for(var i="info",t=0;t<n.length;t++)switch(n[t].type){case"error":return"error";case"warning":i="warning";continue}return i}var r=function(){function n(n,t,i){this.$timeout=n;this.$element=t;this.$window=i;this.hiddenTagCount=0}return n.prototype.$onInit=function(){var n=this;this.$timeout(function(){n.showMoreElem=n.$element.find(".tag-show-more");n.tagElems=n.$element.find(".tag-item")});this.onResizeHandler=function(){return n.updateTagShowMore()};this.$window.addEventListener("resize",this.onResizeHandler)},n.prototype.$onDestroy=function(){this.$window.removeEventListener("resize",this.onResizeHandler)},n.prototype.$onChanges=function(){this.tagElems=this.$element.find(".tag-item")},n.prototype.$doCheck=function(){this.updateTagShowMore()},n.prototype.setOverflowVisible=function(){this.overflow="visible";this.tagElems&&this.tagElems.find("button[tabindex='-1']").attr("tabindex","0")},n.prototype.iconClasses=function(n){if(n)return"tag-icon mee-icon "+n},n.prototype.updateTagShowMore=function(){var n=this.showMoreElem,u=this.tagElems,r,f;if(this.overflow!=="visible"&&u&&u.length&&n&&n.length){if(r=u.length-this.hiddenTagCount,n[0].offsetTop||r&&u[r-1].offsetTop||this.hiddenTagCount&&!u[r].offsetTop){if(n.addClass("ng-hide"),r=t(u),this.hiddenTagCount=u.length-r,this.hiddenTagCount)do n.insertBefore(u[r]),f=i(this.tags.slice(r)),n.attr("data-tag-type",f),n.children().eq(0).text("+"+this.hiddenTagCount),n.removeClass("ng-hide");while(n[0].offsetTop&&--r>=0&&this.hiddenTagCount++);u.slice(0,r).find("button[tabindex]").attr("tabindex","0");u.slice(r).find("button[tabindex]").attr("tabindex","-1")}}else this.hiddenTagCount=0;n&&!this.hiddenTagCount&&n.addClass("ng-hide")},n.$inject=["$timeout","$element","$window"],n}();angular.module(n.moduleName).component("tagGroup",{templateUrl:n.appFolderBasePath+"Components/TagGroup/tagGroup.html",bindings:{tags:"<",tagSize:"@?",overflow:"@?"},controller:r})})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){function t(t){return{restrict:"E",scope:{website:"@"},templateUrl:n.appFolderBasePath+"Directives/WebFavIcon/webFavIcon.html",link:function(n){n.$watch("website",function(i){var u,r;n.isFavIconAvailable=!0;u="^http(s)?://";n.website.match(u)||(i=t("http://{0}",i));r=document.createElement("a");r.href=i;n.favIconUrl=t("{0}//{1}/favicon.ico",[r.protocol,r.hostname]);n.setFavIconUnavailable=function(){n.isFavIconAvailable=!1}})}}}angular.module(n.moduleName).directive("webFavIcon",t);t.$inject=["stringFormatFilter"]})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i,r;t.adultViewFolderBasePath=t.appFolderBasePath+"Landing/AdultView/";t.childViewFolderBasePath=t.appFolderBasePath+"Landing/ChildView/";t.coldStartViewFolderBasePath=t.appFolderBasePath+"Landing/ColdStartView/";t.sharedComponentFolderBasePath=t.appFolderBasePath+"Landing/Shared/",function(n){n[n.ColdStart=0]="ColdStart";n[n.AdultView=1]="AdultView";n[n.ChildView=2]="ChildView";n[n.ColdStartV2=3]="ColdStartV2"}(i=t.LandingExperience||(t.LandingExperience={}));r=function(){function r(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p=this;this.$rootScope=n;this.$window=t;this.$scope=i;this.$q=r;this.appConfig=u;this.$state=f;this.pageReliability=e;this.rosterService=o;this.telemetry=s;this.$cookies=h;this.currentUser=c;this.coldStartService=l;this.flowService=a;this.familyLandingAppLimitsPromoFamilyUserWithNoChildFlow=v;this.familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow=y;this.biEventNames={inlineAdd:"inline-add",inlineAddMobile:"inline-add-mobile",inviteAccepted:"invite-accepted",inviteAcceptedMobile:"invite-accepted-mobile",inviteAcceptedClient:"invite-accepted-client",familyCreatedMsa:"family-created-msa"};this.onAppLimitsPromoFreModalDismissed=function(){return p.flowService.cancel(),null}}return r.prototype.$onInit=function(){var t=this;this.activePromos=this.$state.params.activePromos;this.promoSurfaceRef=this.$state.params.promoSurfaceRef;this.promoInstanceId=this.$state.params.promoInstanceId;this.determineFreExperience().then(function(){t.continueMultiStepScenario();t.determineExperienceToShow();n.Utilities.isInFlight("ExpAa6");t.$scope.$on(t.rosterService.familyRosterUpdatedEvent,function(){return t.reloadFamilyRosterAndDetermineExperience()});t.$window.sessionStorage.removeItem("FamilyVerifyNowRemoveSet")})},r.prototype.getInstrumentationComponentName=function(){return"family.landing.component"},r.prototype.reloadFamilyRosterAndDetermineExperience=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.familyRosterModel=t;n.determineExperienceToShow()})},r.prototype.determineExperienceToShow=function(){n.Utilities.isInFlight("FamAccept")?this.coldStartService.userIsAloneOrChildFromModel(this.familyRosterModel)&&!this.$state.params.bypassColdStart?(this.pageReliability.addRequiredComponentName("Family.Landing.Coldstart.V2"),this.experienceToShow=i.ColdStartV2):this.familyRosterModel.isUserAChild?(this.pageReliability.addRequiredComponentName("family.landing.child"),this.pageReliability.addRequiredComponentName("family.landing.child-view-children-panel"),this.pageReliability.addRequiredComponentName("family.landing.child-view-adults-panel"),this.experienceToShow=i.ChildView):(this.pageReliability.addRequiredComponentName("family.landing.adult-view"),this.pageReliability.addRequiredComponentName("family.landing.children-panel"),this.pageReliability.addRequiredComponentName("family.landing.adults-panel"),this.experienceToShow=i.AdultView):this.coldStartService.userIsAloneOrChildFromModel(this.familyRosterModel)?(this.pageReliability.addRequiredComponentName("Family.Landing.Coldstart.V2"),this.experienceToShow=i.ColdStartV2):this.familyRosterModel.isUserAChild?(this.pageReliability.addRequiredComponentName("family.landing.child"),this.pageReliability.addRequiredComponentName("family.landing.child-view-children-panel"),this.pageReliability.addRequiredComponentName("family.landing.child-view-adults-panel"),this.experienceToShow=i.ChildView):(this.pageReliability.addRequiredComponentName("family.landing.adult-view"),this.pageReliability.addRequiredComponentName("family.landing.children-panel"),this.pageReliability.addRequiredComponentName("family.landing.adults-panel"),this.experienceToShow=i.AdultView)},r.prototype.continueMultiStepScenario=function(){var n,t;switch(this.getQueryParamValue("event")){case this.biEventNames.inviteAccepted:n=this.isUserAChild?this.appConfig.scenarioStates.sendChildEmailInvite:this.appConfig.scenarioStates.sendAdultEmailInvite;this.checkNoCookieThenEndScenario(this.appConfig.scenarios.addMember,n,!this.shouldShowColdStart);this.$rootScope.portalBiReportClick(this.isUserAChild?"interstitial-child-accepted-invite":"interstitial-adult-accepted-invite");break;case this.biEventNames.inviteAcceptedMobile:t=this.isUserAChild?this.appConfig.scenarioStates.sendChildMobileInvite:this.appConfig.scenarioStates.sendAdultMobileInvite;this.checkNoCookieThenEndScenario(this.appConfig.scenarios.addMember,t,!this.shouldShowColdStart);this.$rootScope.portalBiReportClick(this.isUserAChild?"interstitial-child-accepted-invite-mobile":"interstitial-adult-accepted-invite-mobile");break;case this.biEventNames.inviteAcceptedClient:this.$rootScope.portalBiReportClick(this.isUserAChild?"interstitial-child-accepted-invite-client":"interstitial-adult-accepted-invite-client");break;case this.biEventNames.inlineAdd:this.checkTaskCompletionCookieThenEndScenario(this.appConfig.scenarioStates.showFamilyLandingPage,!this.shouldShowColdStart);this.$rootScope.portalBiReportClick(this.isUserAChild?"interstitial-child-added-inline":"interstitial-adult-added-inline");break;case this.biEventNames.inlineAddMobile:this.checkTaskCompletionCookieThenEndScenario(this.appConfig.scenarioStates.showFamilyLandingPage,!this.shouldShowColdStart);this.$rootScope.portalBiReportClick(this.isUserAChild?"interstitial-child-added-inline-mobile":"interstitial-adult-added-inline-mobile");break;case this.biEventNames.familyCreatedMsa:this.telemetry.portalScenarios.endMultiStepScenario({area:this.appConfig.Area,name:this.appConfig.scenarios.createNewChildMsaCompletionTracking,step:this.appConfig.scenarioStates.createNewChildMsa,isSuccess:!0})}},r.prototype.checkTaskCompletionCookieThenEndScenario=function(n,t){var i=this.$cookies.get(this.appConfig.taskCompletionScenarioNameCookie);i&&(this.telemetry.portalScenarios.endMultiStepScenario({area:this.appConfig.Area,name:i,step:n,isSuccess:t}),this.$cookies.remove(this.appConfig.taskCompletionScenarioNameCookie,{path:"/"}))},r.prototype.checkNoCookieThenEndScenario=function(n,t,i){var r=this.$cookies.get(n);r||(this.telemetry.portalScenarios.endMultiStepScenario({area:this.appConfig.Area,name:n,step:t,isSuccess:i}),this.$cookies.put(n,"1",{path:"/family"}))},r.prototype.getQueryParamValue=function(t){var i=n.Utilities.parseUrl();return i.params[t]},r.prototype.determineFreExperience=function(){if(this.activePromos&&this.activePromos["app-limits"])if(this.familyRosterModel.isFamilyMember()){if(this.familyRosterModel.getMsaChildren().length===0)return this.openAppLimitsPromoFamilyUserWithNoChildFreModal()}else return this.openAppLimitsPromoUserWithNoFamilySetupYetFreModal();return this.$q.resolve()},r.prototype.openAppLimitsPromoUserWithNoFamilySetupYetFreModal=function(){var n={compassStrings:this.compassStrings,promoSurfaceRef:this.promoSurfaceRef,promoInstanceId:this.promoInstanceId},t={modalHostOptions:{ariaDialogLabel:this.compassStrings.AppLimitsPromoUserWithNoFamilySetupYetFreModalHeading,kind:"flow close-button"},data:n,onDismissed:this.onAppLimitsPromoFreModalDismissed};return this.flowService.setData(n),this.flowService.begin(this.familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow.getBeginData(t))},r.prototype.openAppLimitsPromoFamilyUserWithNoChildFreModal=function(){var n={compassStrings:this.compassStrings,promoSurfaceRef:this.promoSurfaceRef,promoInstanceId:this.promoInstanceId},t={modalHostOptions:{ariaDialogLabel:this.compassStrings.AppLimitsPromoFamilyUserWithNoChildFreModalHeading,kind:"flow close-button"},data:n,onDismissed:this.onAppLimitsPromoFreModalDismissed};return this.flowService.setData(n),this.flowService.begin(this.familyLandingAppLimitsPromoFamilyUserWithNoChildFlow.getBeginData(t))},r.$inject=["$rootScope","$window","$scope","$q","familyConfig","$state","pageReliabilityService","rosterService","telemetryService","$cookies","currentUser","coldStartService","flowService","familyLandingAppLimitsPromoFamilyUserWithNoChildFlow","familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reloadFamilyRosterAndDetermineExperience")],r.prototype,"reloadFamilyRosterAndDetermineExperience",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"landing",{templateUrl:t.appFolderBasePath+"Landing/landing.html",bindings:{familyRosterModel:"<",compassStrings:"<"}})],r)}();t.LandingComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a){this.$rootScope=n;this.$cookies=t;this.$q=i;this.appConfig=r;this.notificationsService=u;this.cookieNotificationService=f;this.officeCampaignService=e;this.pendingMemberNotificationService=o;this.actionResponseNotificationService=s;this.telemetry=h;this.formatString=c;this.currentUser=l;this.casaInstallModalService=a}return i.prototype.componentOnInit=function(){var t,i,r,u;return this.setupFamily(),this.notifications=this.notificationsService.getNotifications(),this.manageChildProfileInfoLink=this.formatString(this.compassStrings.ManageChildProfileInfoLink,[this.currentUser.culture]),t=this.createOfficeNotications(),i=this.createPendingMemberNotifications(),this.checkForCreateChildMsaScenario(),n.Utilities.isInFlight("FamLocalActsBanner")&&this.checkForLocalAccountsInFamily(),r=this.createActionResponseNotifications(),this.notificationsService.addNotifications(this.cookieNotificationService.createNotifications()),this.$rootScope.recordPageView("landing-adult-view"),this.$rootScope.dataContainer="container",u=this.casaInstallModalService.launchModal(),this.$q.all([t,i,r,u])},i.prototype.$onChanges=function(n){if(n.familyRosterModel&&!n.familyRosterModel.isFirstChange())this.onFamilyUpdated(n.familyRosterModel)},i.prototype.getInstrumentationComponentName=function(){return"family.landing.adult-view"},i.prototype.setupFamily=function(){this.children=this.familyRosterModel.getChildren();this.adults=this.familyRosterModel.getAdults();this.currentMember=this.familyRosterModel.currentMember},i.prototype.onFamilyUpdated=function(n){var r=this,i,u,f;return this.familyRosterModel=n.currentValue,this.setupFamily(),this.notificationsService.removeNotificationsOfType(t.NotificationType.OfficeCampaign),this.notificationsService.removeNotificationsOfType(t.NotificationType.PendingMember),i=this.createPendingMemberNotifications(),u=n.previousValue,u.getAllMsaMembers().length===this.familyRosterModel.getAllMsaMembers().length?i.then(function(){r.notificationsService.addNotifications(r.officeNotifications)}):(f=this.createOfficeNotications(),this.$q.all([f,i]))},i.prototype.createOfficeNotications=function(){var n=this;return this.officeCampaignService.createNotifications({compassStrings:this.compassStrings,market:this.currentUser.market,msaNonPendingMemberCount:this.familyRosterModel.msaNonPendingmemberCount}).then(function(t){n.notificationsService.addNotifications(t);n.officeNotifications=t})},i.prototype.createPendingMemberNotifications=function(){var n=this;return this.pendingMemberNotificationService.createNotifications({compassStrings:this.compassStrings,familyRosterModel:this.familyRosterModel}).then(function(t){n.notificationsService.addNotifications(t)})},i.prototype.createActionResponseNotifications=function(){var n=this;return this.actionResponseNotificationService.createNotifications({compassStrings:this.compassStrings,familyRosterModel:this.familyRosterModel}).then(function(t){n.notificationsService.addNotifications(t)})},i.prototype.checkForLocalAccountsInFamily=function(){var f=this.familyRosterModel.hasLocalAccounts,i,r,u;f&&(i=new t.BasicNotificationData,i.iconClasses="mee-icon mee-icon-Important mee-border",i.title=this.compassStrings.LocalActsDecomTitle,r=n.Utilities.formatString("<a href='{0}' target='_blank'>{1}<\/a>","https://aka.ms/famsafeoffline",this.compassStrings.LearnMoreText),i.body=n.Utilities.formatString(this.compassStrings.LocalActsDecomDesc,r),i.dismissAriaLabel=this.compassStrings.DismissNotificationAriaText,u={type:t.NotificationType.Basic,data:i},this.notificationsService.addNotification(u))},i.prototype.checkForCreateChildMsaScenario=function(){var n=this,f=this.$cookies.get(this.appConfig.scenarios.createChildMsa)||null,i=JSON.parse(f),u;if(i){this.$cookies.remove(this.appConfig.scenarios.createChildMsa,{path:"/family"});var e=_.where(this.familyRosterModel.getAllMsaMembers(),{IsSelf:!1}),o=_.pluck(e,"Cid"),r=_.difference(o,i);r.length&&(_.forEach(r,function(i){var u=_.findWhere(n.familyRosterModel.getAllMsaMembers(),{Cid:i}),r,f;u&&(r=new t.BasicNotificationData,r.iconClasses="mee-icon mee-border mee-icon-Accept",r.title=n.compassStrings.NewMemberNotificationTitle,r.body=n.formatString(n.compassStrings.NewMemberNotificationBody,u.DisplayNameForUserCultureAndMarket),r.dismissAriaLabel=n.compassStrings.DismissNotificationAriaText,f={type:t.NotificationType.Basic,data:r},n.notificationsService.addNotification(f))}),u={area:this.appConfig.Area,name:this.appConfig.scenarios.addMember,step:this.appConfig.scenarioStates.createNewChildMsa,isSuccess:!0},this.telemetry.portalScenarios.endMultiStepScenario(u))}},i.$inject=["$rootScope","$cookies","$q","familyConfig","notificationsService","cookieNotificationService","officeCampaignService","pendingMemberNotificationService","actionResponseNotificationService","telemetryService","stringFormatFilter","currentUser","casaInstallModalService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onFamilyUpdated")],i.prototype,"onFamilyUpdated",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"landingAdult",{templateUrl:t.adultViewFolderBasePath+"landing.adult-view.html",bindings:{familyRosterModel:"<",compassStrings:"<"}})],i)}();t.LandingAdultViewComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.apiService=n;this.formatString=t;this.$q=i;this.feeds={}}return i.prototype.componentOnInit=function(){return this.initDefer=this.$q.defer(),this.adultsIdsList=_.map(this.adults,function(n){return n.FamilyServiceId}),this.getOfficeCampaignInformation(),this.initDefer.promise},i.prototype.getInstrumentationComponentName=function(){return"family.landing.adults-panel"},i.prototype.getOfficeCampaignInformation=function(){var n=this;return this.apiService.getOfficeCampaigns().then(function(t){return n.feeds[n.currentMember.Puid]={officeDetail:t},_.each(n.adultsIdsList,function(t){n.feeds[t]=n.feeds[t]||{officeDetail:null}}),n.$q.resolve()})},i.prototype.onAdultComponentFinishLoading=function(n){var t=this.adultsIdsList.indexOf(n);t!==-1&&this.adultsIdsList.splice(t,1);this.adultsIdsList.length===0&&this.initDefer.resolve()},i.$inject=["apiService","stringFormatFilter","$q"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"adultsPanel",{templateUrl:t.adultViewFolderBasePath+"Adults/adults-panel.html",bindings:{adults:"<",compassStrings:"<",currentMember:"<"}})],i)}();t.AdultsPanelComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$rootScope=n;this.appConfig=t;this.apiService=i;this.childFeedsService=r;this.$q=u}return i.prototype.componentOnInit=function(){var t=this,n;return this.feeds={},this.initDefer=this.$q.defer(),n=[this.initDefer.promise],this.children&&this.children.length!==0?(this.childrenIdsList=_.map(this.children,function(n){return n.FamilyServiceId}),n.push(this.fetchFeeds()),_.some(this.children,function(n){return!n.IsLocal})&&n.push(this.fetchDevices())):this.initDefer.resolve(),this.$q.all(n).finally(function(){t.$rootScope.$emit(t.appConfig.familyLoadedEvent)})},i.prototype.getInstrumentationComponentName=function(){return"family.landing.children-panel"},i.prototype.onChildComponentFinishLoading=function(n){var t=this.childrenIdsList.indexOf(n);t!==-1&&this.childrenIdsList.splice(t,1);this.childrenIdsList.length===0&&this.initDefer.resolve()},i.prototype.fetchFeeds=function(){var n=this;return this.childFeedsService.getLandingPageFeeds(_.filter(this.children,function(n){return!n.IsExtended})).then(function(t){n.feeds=t})},i.prototype.fetchDevices=function(){var t=this,n=_.filter(this.children,function(n){return!n.IsLocal&&!n.IsExtended}),i=_.map(n,function(n){return n.FamilyServiceId}),r=_.map(n,function(n){return n.JsonWebToken});return this.apiService.getAllDevices(i.join(","),r.join(",")).then(function(n){t.devices=n})},i.$inject=["$rootScope","familyConfig","apiService","childFeedsService","$q"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"childrenPanel",{templateUrl:t.adultViewFolderBasePath+"Children/children-panel.html",bindings:{children:"<",compassStrings:"<"}})],i)}();t.ChildrenPanelComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n,t,i,r,u){this.$q=n;this.$location=t;this.formatString=i;this.formatTimeSpan=r;this.dateTimeFormatter=u;this.parsers={};this.parsers.AppTimeRequestResponse=this.createAppTimeRequestResponseNotification.bind(this)}return Object.defineProperty(t.prototype,"zeroTimeSpan",{get:function(){return"00:00:00"},enumerable:!1,configurable:!0}),t.prototype.getActionResponse=function(){var t,n,i;try{return t=void 0,n=this.$location.search().ref,n&&this.parsers[n]&&(i=this.$location.search()[n],t=this.decodeResponse(i),this.$location.search(n,null),this.$location.search("ref",null),t.refer=n),this.$q.resolve(t)}catch(r){return this.$q.reject(r)}},t.prototype.createNotifications=function(n){var t=this;return this.getActionResponse().then(function(i){var r=[],u;return i&&(u=t.parsers[i.refer],r.push(u(n,i))),t.$q.resolve(r)})},t.prototype.createAppTimeRequestResponseNotification=function(t,i){var r=i.duration,u,f,s,h,e=i.isAppBlocked?t.compassStrings.ScreenTimeRequests.AppBlocked:t.compassStrings.ScreenTimeRequests.App,l=e.NotificationTitle,o,c;return i.responseCode<200||i.responseCode>299?(u="mee-icon mee-icon-Error mee-error-color",f=i.responseCode===404?t.compassStrings.ScreenTimeRequests.Global.NotificationNotFound:t.compassStrings.InlineErrorGeneral):r&&r!==this.zeroTimeSpan?(u="mee-icon mee-border mee-icon-Accept",f=e.ActionAllowCompletedAriaText,s=this.formatTimeSpan(r),h=this.getEndTime(r)):(u="mee-icon mee-icon-Blocked",f=e.ActionDenyCompletedAriaText),o={name:i.childFirstName,appName:i.appName,duration:s,endTime:h},c=new n.BasicNotificationData({title:this.formatString(l||"{name}",o),iconClasses:u,dismissAriaLabel:t.compassStrings.DismissNotificationAriaText,body:this.formatString(f,o)}),{type:n.NotificationType.Basic,data:c}},t.prototype.getEndTime=function(n){var i=typeof n=="string"&&n.match(/^(\d\d):(\d\d):(\d\d)$/);if(i){var r=+i[1],u=+i[2],t=new Date;return t.setMinutes(t.getMinutes()+u),t.setHours(t.getHours()+r),this.dateTimeFormatter.toShortTime(t)}},t.prototype.decodeResponse=function(n){return JSON.parse(decodeURIComponent(atob(n).split("").map(function(n){return"%"+("0"+n.charCodeAt(0).toString(16)).slice(-2)}).join("")))},t.$inject=["$q","$location","stringFormatFilter","timeSpanFormatFilter","dateTimeFormatter"],t}();angular.module(n.moduleName).service("actionResponseNotificationService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){n&&(this.title=n.title,this.body=n.body,this.iconClasses=n.iconClasses,this.dismissAriaLabel=n.dismissAriaLabel)}return n.prototype.equals=function(n){if(!n)return!1;var t=n;return t&&t.iconClasses===this.iconClasses&&t.title===this.title&&t.body===this.body},n}();n.BasicNotificationData=t})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.notificationsService=n;this.$meeUtil=t}return i.prototype.$onInit=function(){this.messageId=this.$meeUtil.nextUid();this.notificationContent=this.notification.content.data;this.notification.content.onInit&&this.notification.content.onInit()},i.prototype.dismiss=function(){this.notificationContent.onDismiss&&this.notificationContent.onDismiss();this.notificationsService.removeNotification(this.notification)},i.$inject=["notificationsService","$meeUtil"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"meeBasicNotification",{templateUrl:t.appFolderBasePath+"Landing/AdultView/Notifications/basic-notification.html",bindings:{notification:"<"}})],i)}();t.BasicNotificationComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"notificationLayout",{template:'<mee-media size="lg">\n                           <media-image>\n                               <span ng-transclude="icon"><\/span>\n                           <\/media-image>\n                           <media-body data-grid="col-12 stack-2">\n                               <div data-grid="col-8">\n                                   <h2 media-heading ng-transclude="title"><\/h2>\n                                   <p mee-paragraph="para3" class="f-lean x-visible-inline" ng-transclude="body"><\/p>\n                               <\/div>\n                               <div data-grid="col-4" ng-transclude="actions">\n                           <\/media-body>\n                       <\/mee-media>',transclude:{icon:"notificationIcon",title:"?notificationTitle",body:"notificationBody",actions:"notificationActions"}})],i)}()})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i,r;(function(n){n[n.OfficeCampaign=0]="OfficeCampaign";n[n.PendingMember=1]="PendingMember";n[n.Basic=2]="Basic"})(i=t.NotificationType||(t.NotificationType={}));r=function(){function r(){this.notificationType=i}return r.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"meeNotifications",{templateUrl:t.appFolderBasePath+"Landing/AdultView/Notifications/notifications.html",bindings:{notifications:"<",title:"@"}})],r)}();t.NotificationsComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.equals=function(n){if(!n)return!1;var t=n;return t&&t.id===this.id},n}();n.OfficeCampaignNotificationData=t})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function i(n,t,i){this.formatString=n;this.apiService=t;this.$cookies=i;this.campaignNames={officeHomeNoFamily:"office-home-no-family",officeHomeWithFamily:"office-home-with-family",officeHomeTry:"office-home-try"}}return i.prototype.createNotifications=function(n){var t=this;return this.compassStrings=n.compassStrings,this.apiService.getOfficeCampaigns().then(function(i){return[t.createCampaign(i,n.market,n.msaNonPendingMemberCount)]})},i.prototype.dismissCampaign=function(n){this.storeCampaignDismissedInCookie(n.id)},i.prototype.createCampaign=function(n,i,r){var f=r?r-1:0,u={type:t.NotificationType.OfficeCampaign,data:null};return n.remainingSharedUsers>0&&(u=f?this.createOfficeHomeWithFamilyHeadingCampaign(n,i):this.createOfficeHomeWithNoFamilyCampaign()),u},i.prototype.createOfficeHomeWithNoFamilyCampaign=function(){var i=new n.FamilyOneUi.OfficeCampaignNotificationData;return i.id=this.campaignNames.officeHomeNoFamily,i.title=this.compassStrings.Office365Home,i.body=this.compassStrings.OfficeCampaignText2,i.share="",i.shareLink="",i.dismissText="",{type:t.NotificationType.OfficeCampaign,data:i}},i.prototype.createOfficeHomeWithFamilyHeadingCampaign=function(i,r){var f,u;return this.isCampaignDismissed(this.campaignNames.officeHomeWithFamily)?{type:t.NotificationType.OfficeCampaign,data:null}:(f=i.remainingSharedUsers===1?this.compassStrings.OfficeCampaignText1Singular:this.compassStrings.OfficeCampaignText1Plural,u=new n.FamilyOneUi.OfficeCampaignNotificationData,u.id=this.campaignNames.officeHomeWithFamily,u.title=this.compassStrings.Office365Home,u.body=this.formatString(f,[i.remainingSharedUsers]),u.share=this.compassStrings.ShareWithYourFamily,u.shareLink=this.formatString(this.compassStrings.ShareWithYourFamilyLink,[r]),u.dismissText=this.compassStrings.DismissButtonText,{type:t.NotificationType.OfficeCampaign,data:u})},i.prototype.isCampaignDismissed=function(n){return!!this.$cookies.get(n)},i.prototype.storeCampaignDismissedInCookie=function(n){var t=new Date;t.setDate(t.getDate()+360);this.$cookies.put(n,"1",{expires:t,secure:!1,path:"/family"})},i.$inject=["stringFormatFilter","apiService","$cookies"],i}();angular.module(t.moduleName).service("officeCampaignService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.$rootScope=n;this.notificationsService=t;this.officeCampaignService=i}return i.prototype.$onInit=function(){this.notificationContent=this.notification.content.data;this.$rootScope.recordPartialPageView(this.notificationContent.id,0)},i.prototype.dismiss=function(){this.notificationsService.removeNotification(this.notification);this.officeCampaignService.dismissCampaign(this.notificationContent)},i.$inject=["$rootScope","notificationsService","officeCampaignService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"meeOfficeNotification",{templateUrl:t.appFolderBasePath+"Landing/AdultView/Notifications/office-notification.html",bindings:{notification:"<"}})],i)}();t.OfficeNotificationComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.equals=function(n){if(!n)return!1;var t=n;return t&&t.primaryId===this.primaryId},n}();n.PendingMemberNotificationData=t})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function i(n){this.$q=n}return i.prototype.createNotifications=function(i){var r=this.$q.defer(),u=i.familyRosterModel.getAllPendingMembers(),f=_.map(u,function(r){var u=new n.FamilyOneUi.PendingMemberNotificationData;return u.primaryId=r.PrimaryId,u.title=i.compassStrings.PendingMember,u.message=i.compassStrings.PendingMemberInviteSentMessage,u.removeText=i.compassStrings.Remove,u.removeAriaText=i.compassStrings.RemoveAriaText,u.resendInviteText=i.compassStrings.ResendInvite,u.resendInviteAriaText=i.compassStrings.ResendInviteAriaText,u.verifyNowText=i.compassStrings.VerifyNow,u.verifyNowAriaText=i.compassStrings.VerifyNowAriaText,{type:t.NotificationType.PendingMember,data:u}});return r.resolve(f),r.promise},i.$inject=["$q"],i}();angular.module(t.moduleName).service("pendingMemberNotificationService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$state=n;this.formatString=t}return i.prototype.$onInit=function(){this.notificationContent=this.notification.content.data;this.notificationContent.message=this.formatString(this.notificationContent.message,this.notificationContent.primaryId);this.notificationContent.removeAriaText=this.formatString(this.notificationContent.removeAriaText,this.notificationContent.primaryId);this.notificationContent.resendInviteAriaText=this.formatString(this.notificationContent.resendInviteAriaText,this.notificationContent.primaryId);this.notificationContent.verifyNowAriaText=this.formatString(this.notificationContent.verifyNowAriaText,this.notificationContent.primaryId);this.showResendInvite=!n.Utilities.isInFlight("FamHIP")},i.$inject=["$state","stringFormatFilter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"meePendingMemberNotification",{templateUrl:t.appFolderBasePath+"Landing/AdultView/Notifications/pending-member-notification.html",bindings:{notification:"<"}})],i)}();t.PendingMemberNotificationComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.$rootScope=n;this.appConfig=t;this.casaInstallModalService=i}return i.prototype.$onInit=function(){return this.children=this.familyRosterModel.getChildren(),this.adults=this.familyRosterModel.getAdults(),this.currentMember=this.familyRosterModel.currentMember,this.children.splice(this.children.indexOf(this.currentMember),1),this.$rootScope.recordPageView("landing-child-view"),this.$rootScope.$emit(this.appConfig.familyLoadedEvent),this.casaInstallModalService.launchModal()},i.$inject=["$rootScope","familyConfig","casaInstallModalService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"landingChild",{templateUrl:t.childViewFolderBasePath+"landing.child.html",bindings:{familyRosterModel:"=",compassStrings:"<"}})],i)}();t.LandingChildComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"childViewAdultsPanel",{templateUrl:t.childViewFolderBasePath+"Adults/child-view-adults-panel.html",bindings:{adults:"<",compassStrings:"<"}})],i)}();t.ChildAdultsPanelComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){this.navLinkList=[]}return i.prototype.$onInit=function(){var i=n.Utilities.isInFlight("FamOverview"),r=n.Utilities.isInFlight("FamMemberViews"),f=n.Utilities.isInFlight("FamNewScreenTime"),e=n.Utilities.isInFlight("FamContentFilters"),t=n.Utilities.isInFlight("FamReactTier1"),u;this.canViewActivityReport?(u=i&&t?"landing-overview":"landing-recent-activity",this.pushNavLink(u)):i&&r&&t&&this.pushNavLink("landing-overview");r&&t&&(f&&this.pushNavLink("landing-screen-time"),e&&this.pushNavLink("landing-content-filters"));this.pushNavLink("landing-manage-permissions");this.canLeaveFamily&&this.pushNavLink("landing-remove")},i.prototype.pushNavLink=function(n){this.navLinkList.push(_.find(this.compassStrings.LandingActionLinks.Links,function(t){return t.Link.Id===n}))},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"childViewChildrenPanel",{templateUrl:t.childViewFolderBasePath+"Children/child-view-children-panel.html",bindings:{children:"<",currentMember:"<",compassStrings:"<",canLeaveFamily:"<",canViewActivityReport:"<"}})],i)}();t.ChildChildrenPanelComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$rootScope=n;this.commonConfig=t;this.appConfig=i;this.currentUser=r;this.coldStartService=u;this.$element=f;this.$timeout=e}return i.prototype.getInstrumentationComponentName=function(){return"Family.Landing.Coldstart.V2"},i.prototype.componentOnInit=function(){var t=this;return this.coldStartData=this.appConfig.content.coldStartData,this.isAuthenticated=this.currentUser.isAuthenticated,this.commonConfig.userCulture==="en-US"&&(this.video=this.coldStartData.video,this.subtitleLanguage="en",this.$timeout().then(function(){t.$element.find("#main-image-coldstartv2 video").on("ended",function(){this.load()})})),this.addMemberHref=this.appConfig.hrefs.addMember,this.signInHref=this.appConfig.hrefs.signIn,this.panes=n.Utilities.isInFlight("CASAPremiumPanes")?this.coldStartData.premiumPanes:this.coldStartData.panes,this.isInOhanaStringsFlight=n.Utilities.isInFlight("CASAColdStartPage"),this.isInPremiumPanesFlight=n.Utilities.isInFlight("CASAPremiumPanes"),this.coldStartService.userIsAloneOrChild().then(function(n){t.shouldShowAddMember=n;t.$rootScope.$emit(t.appConfig.familyLoadedEvent)})},i.prototype.getHeroElementForAnimation=function(){var n=this.$element.find("#main-image-coldstartv2");return n&&n[0]},i.prototype.getPaneElementForAnimation=function(n){var t=this.$element.find("simple-pane-content card-image");return t&&t[n]},i.prototype.getCardElementForAnimation=function(n){var t=this.$element.find("simple-card-content card-image");return t&&t[n]},i.$inject=["$rootScope","commonConfig","familyConfig","currentUser","coldStartService","$element","$timeout"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"landingColdStartV2",{templateUrl:t.coldStartViewFolderBasePath+"landing.cold-start-v2.html"})],i)}()})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$state=n;this.$q=t;this.familyConfig=i;this.telemetry=r;this.rosterService=u}return i.prototype.getInstrumentationComponentName=function(){return"Family.Landing.Promo"},i.prototype.componentOnInit=function(){var n=this,i=this.$state.params.promoId;switch(i){case"app-limits":return this.rosterService.getFamily().then(function(i){var r,u,f=n.$state.params.ref?n.$state.params.ref:null,e=n.$state.params.instanceId?n.$state.params.instanceId:null;return i.isFamilyMember()?i.currentMember.IsChild?n.$state.go(t.familyLandingPageStateName):i.getMsaChildren().length===0?n.$state.go(t.familyLandingPageStateName,{activePromos:{"app-limits":!0},promoSurfaceRef:f,promoInstanceId:e}):i.getMsaChildren().length>=1?n.$state.go(t.appLimitsPageStateName,{childId:i.getMsaChildren()[0].childId}):n.$state.go(t.familyLandingPageStateName):n.$state.go(t.familyLandingPageStateName,{activePromos:{"app-limits":!0},promoSurfaceRef:f,promoInstanceId:e}),n.telemetry.portalQos.registerRawEventSchemas([(r={name:n.familyConfig.events.appLimitsPromoLinkClicked},r[n.familyConfig.events.appLimitsPromoLinkClicked]={part:"C",def:{fields:[{name:"pageid",type:"string"},{name:"surfaceRef",type:"string"},{name:"instanceId",type:"string"},{name:"isFamilyMember",type:"string"},{name:"isChild",type:"string"},{name:"childCountClassification",type:"string"}]}},r)]),n.telemetry.portalQos.reportRawEvent({name:n.familyConfig.events.appLimitsPromoLinkClicked,content:(u={},u[n.familyConfig.events.appLimitsPromoLinkClicked]={pageId:n.telemetry.portalBi.getCurrentLocation(),surfaceRef:String(f),instanceId:String(e),isFamilyMember:String(i.isFamilyMember()),isChild:String(i.isFamilyMember()?i.currentMember.IsChild:null),childCountClassification:String(i.getFamilyMsaChildCountClassification())},u)}),n.$q.resolve()});default:return this.$state.go(t.familyLandingPageStateName)}},i.$inject=["$state","$q","familyConfig","telemetryService","rosterService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"promo",{template:""})],i)}();t.PromoComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,i){var r=this;this.flowService=n;this.familyLandingAppLimitsPromoFamilyUserWithNoChildFlow=i;this.getAddChildStepModalStateSwitchToOptions=function(){return{stateId:"Family.Landing.AddFlow.FamilyMember",stateParams:{defaultRoleOption:"child",isScenarioStarted:!0,callerName:r.promoSurfaceRef,fref:t.familyLandingPageStateNames.appLimitsPromoFamilyUserWithNoChildFreModal},stateOptions:{location:"replace"}}}}return i.prototype.$onInit=function(){this.passedData=this.flowService.getData();this.compassStrings=this.passedData.compassStrings;this.promoSurfaceRef=this.passedData.promoSurfaceRef;this.promoInstanceId=this.passedData.promoInstanceId},i.prototype.cancel=function(){return this.flowService.cancel(),this.flowService.exit()},i.prototype.addChild=function(){var n=this.getAddChildStepModalStateSwitchToOptions();return this.flowService.switchTo({bi:{step:this.familyLandingAppLimitsPromoFamilyUserWithNoChildFlow.steps.addChild},modalStateId:n.stateId,modalSwitchToOptions:n})},i.$inject=["flowService","familyLandingAppLimitsPromoFamilyUserWithNoChildFlow"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"familyLandingAppLimitsPromoFamilyUserWithNoChildFreModal",{templateUrl:t.appFolderBasePath+"Landing/Promo/AppLimits/FamilyUserWithNoChild/family-landing-app-limits-promo-family-user-with-no-child-fre-modal.html"})],i)}();t.FamilyLandingAppLimitsPromoFamilyUserWithNoChildFreModalComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n){this.familyConfig=n;this.steps={freModal:this.familyConfig.scenarioStates.freModal,addChild:this.familyConfig.scenarioStates.addChild}}return t.prototype.getStepData=function(n){return{bi:{step:this.steps[n.step]},modalStateId:n.stateId}},t.prototype.getBeginData=function(t){var i=t.data;return{bi:{area:this.familyConfig.Area,scenario:this.familyConfig.scenarios.familyLandingAppLimitsPromoFamilyUserWithNoChildFlow,step:this.steps.freModal,data:{promoSurfaceRef:i.promoSurfaceRef,promoInstanceId:i.promoInstanceId}},state:n.familyLandingPageStateNames.appLimitsPromoFamilyUserWithNoChildFreModal,modalId:n.familyHostModalId,modalShowOptions:t,exitState:{id:n.familyLandingPageStateName}}},t.$inject=["familyConfig"],t}();n.FamilyLandingAppLimitsPromoFamilyUserWithNoChildFlow=t;angular.module(n.moduleName).service("familyLandingAppLimitsPromoFamilyUserWithNoChildFlow",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,i){var r=this;this.flowService=n;this.familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow=i;this.getCreateFamilyStepModalStateSwitchToOptions=function(){return{stateId:"Family.Landing.AddFlow.FamilyMember",stateParams:{defaultRoleOption:"child",isScenarioStarted:!0,callerName:r.promoSurfaceRef,fref:t.familyLandingPageStateNames.appLimitsPromoUserWithNoFamilySetupYetFreModal},stateOptions:{location:"replace"}}}}return i.prototype.$onInit=function(){this.passedData=this.flowService.getData();this.compassStrings=this.passedData.compassStrings;this.promoSurfaceRef=this.passedData.promoSurfaceRef;this.promoInstanceId=this.passedData.promoInstanceId},i.prototype.cancel=function(){return this.flowService.cancel(),this.flowService.exit()},i.prototype.createFamily=function(){var n=this.getCreateFamilyStepModalStateSwitchToOptions();return this.flowService.switchTo({bi:{step:this.familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow.steps.createFamily},modalStateId:n.stateId,modalSwitchToOptions:n})},i.$inject=["flowService","familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"familyLandingAppLimitsPromoUserWithNoFamilySetupYetFreModal",{templateUrl:t.appFolderBasePath+"Landing/Promo/AppLimits/UserWithNoFamilySetupYet/family-landing-app-limits-promo-user-with-no-family-setup-yet-fre-modal.html"})],i)}();t.FamilyLandingAppLimitsPromoUserWithNoFamilySetupYetFreModalComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n){this.familyConfig=n;this.steps={freModal:this.familyConfig.scenarioStates.freModal,createFamily:this.familyConfig.scenarioStates.createFamily}}return t.prototype.getStepData=function(n){return{bi:{step:this.steps[n.step]},modalStateId:n.stateId}},t.prototype.getBeginData=function(t){var i=t.data;return{bi:{area:this.familyConfig.Area,scenario:this.familyConfig.scenarios.familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow,step:this.steps.freModal,data:{promoSurfaceRef:i.promoSurfaceRef,promoInstanceId:i.promoInstanceId}},state:n.familyLandingPageStateNames.appLimitsPromoUserWithNoFamilySetupYetFreModal,modalId:n.familyHostModalId,modalShowOptions:t,exitState:{id:n.familyLandingPageStateName}}},t.$inject=["familyConfig"],t}();n.FamilyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow=t;angular.module(n.moduleName).service("familyLandingAppLimitsPromoUserWithNoFamilySetupYetFlow",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a){this.$state=n;this.$q=t;this.$timeout=i;this.$scope=r;this.$meeA11yAnnouncer=u;this.$meeA11yFocuser=f;this.rosterService=e;this.memberModalDialogService=o;this.appConfig=s;this.formatFilter=h;this.telemetry=c;this.flowService=l;this.removeMemberFlow=a;this.strings={};this.template={};this.isRemoveFailed=!1;this.isRemoveInProgress=!1}return i.prototype.getInstrumentationComponentName=function(){return"family.removeflow"},i.prototype.componentOnInit=function(){var n=this;return this.memberId=this.$state.params.memberId,this.domId=this.$state.params.domId,this.parentStateName=this.$state.current.name.substring(0,this.$state.current.name.lastIndexOf(".")),this.strings=this.appConfig.content.removeMember.Strings,this.template=this.appConfig.content.removeMember,this.rosterService.getFamily().then(function(t){return n.onGetFamilySuccess(t)}).catch(function(t){n.$state.go(n.parentStateName);n.$q.reject(t)})},i.prototype.onGetFamilySuccess=function(n){var t=this;return this.memberModalDialogService.extractMember(n,this).then(function(){t.setCanRemoveSelf(n);t.setupStringsAndButtons();var i={parentStateName:t.parentStateName,isMemberChild:t.member.IsChild,isMemberSelf:t.member.IsSelf,ariaDialogLabel:t.removeConfirmationTitle,ariaCloseButtonLabel:t.strings.CloseDialogAriaText};return t.flowService.begin(t.removeMemberFlow.getBeginData(i))})},i.prototype.setCanRemoveSelf=function(n){this.memberModalDialogService.isValidFamilyRosterModel(n)&&(this.member.CanRemoveSelf=n.getAdults().length>1||n.getChildren().length===0)},i.prototype.removeMember=function(){var n=this;return this.isRemoveInProgress=!0,this.isRemoveFailed=!1,this.flowService.stayInCurrentState({step:this.removeMemberFlow.steps.progress}),this.rosterService.removeMember(this.member.RemoveSet).then(function(){return n.$meeA11yAnnouncer.announce(n.formatFilter(n.strings.RemoveMemberConfirmationAnnouncement,n.member.DisplayName||n.member.PrimaryId)),n.flowService.end().exit({id:n.parentStateName}).then(function(){n.$meeA11yFocuser.focus("#main-content-landing",{})})}).catch(function(t){n.isRemoveInProgress=!1;var r=t.jqXHR.responseJSON&&t.jqXHR.responseJSON.error||"generic",i=!1;switch(r){case"Family.NotAllowedToRemoveMemberReceivingLegalConsent":i=!0;n.removeConfirmationTitle=n.strings.RemoveChildReceivingConsentErrorTitle;n.removeConfirmationDescription=n.strings.RemoveChildReceivingConsentErrorMessage;break;case"Family.NotAllowedToRemoveMemberProvidingLegalConsent":i=!0;n.member.IsSelf?(n.removeConfirmationTitle=n.strings.RemoveSelfProvidingConsentErrorTitle,n.removeConfirmationDescription=n.strings.RemoveSelfProvidingConsentErrorMessage):(n.removeConfirmationTitle=n.strings.RemoveAdminProvidingConsentErrorTitle,n.removeConfirmationDescription=n.strings.RemoveAdminProvidingConsentErrorMessage)}return(n.flowService.stayInCurrentState({error:r,step:n.removeMemberFlow.steps.initial}),i)?(n.isRemoveDisabled=!0,n.$q.resolve()):(n.displayError(),n.$q.reject(t))})},i.prototype.displayError=function(){this.isRemoveFailed=!0;this.removeMemberError=this.strings.RemoveMemberGenericFailError},i.prototype.cancel=function(){this.flowService.cancel().exit();this.$meeA11yFocuser.focus("#"+this.domId+" mee-entity mee-action-menu button",{})},i.prototype.setupStringsAndButtons=function(){this.isRemoveDisabled=!1;this.member.IsPending?(this.removeConfirmationTitle=this.template.Strings.RemovePendingMemberConfirmationTitle,this.removeConfirmationDescription=this.formatFilter(this.template.Strings.RemovePendingMemberConfirmationDescription,this.member.PrimaryId)):this.member.IsChild&&this.member.IsSelf?(this.removeConfirmationTitle=this.template.Strings.ConfirmationPageTitle,this.removeConfirmationDescription=this.template.Strings.ConfirmationPageContent):this.member.IsChild?(this.removeConfirmationTitle=this.formatFilter(this.template.Strings.RemoveMemberConfirmationTitle,this.member.DisplayName),this.removeConfirmationDescription=this.template.Strings.RemoveChildConfirmationDescription):this.member.IsSelf?this.member.CanRemoveSelf?(this.removeConfirmationTitle=this.template.Strings.RemoveSelfTitle,this.removeConfirmationDescription=this.template.Strings.RemoveSelfConfirmationDescription):(this.removeConfirmationTitle=this.template.Strings.RemoveSelfBlockedTitle,this.removeConfirmationDescription=this.template.Strings.RemoveSelfBlockedDescription,this.isRemoveDisabled=!0):(this.removeConfirmationTitle=this.formatFilter(this.template.Strings.RemoveMemberConfirmationTitle,this.member.DisplayName),this.removeConfirmationDescription=this.formatFilter(this.template.Strings.RemoveAdultConfirmationDescription,this.member.DisplayName))},i.$inject=["$state","$q","$timeout","$scope","$meeA11yAnnouncer","$meeA11yFocuser","rosterService","memberModalDialogService","familyConfig","stringFormatFilter","telemetryService","flowService","removeMemberFlow"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeMember"),n.OneUI.Angular.MonitorOperationProgress("modalOperation")],i.prototype,"removeMember",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"removeFlow",{template:"<div ui-view='removeflow'><\/div>"})],i)}();t.RemoveMemberComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.familyConfig=n;this.steps={initial:"RemoveMember",progress:"Removing"};this.scenarios={removeChildOneUi:"RemoveChildOneUi",removeAdultOneUi:"RemoveAdultOneUi",removeSelfOneUi:"RemoveSelfOneUi"}}return n.prototype.getBeginData=function(n){var t=n.isMemberSelf?this.scenarios.removeSelfOneUi:n.isMemberChild?this.scenarios.removeChildOneUi:this.scenarios.removeAdultOneUi;return{modalId:"#family-dialog",state:n.parentStateName+".RemoveFlow.Confirm",bi:{area:this.familyConfig.Area,scenario:t,step:this.steps.initial},exitState:{id:n.parentStateName},modalShowOptions:{stateIdOnDismiss:n.parentStateName,modalHostOptions:{ariaDialogLabel:n.ariaDialogLabel,ariaCloseButtonLabel:n.ariaCloseButtonLabel,kind:"flow"}}}},n.$inject=["familyConfig"],n}();angular.module(n.moduleName).service("removeMemberFlow",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l){this.$q=n;this.$state=t;this.$scope=i;this.$rootscope=r;this.$window=u;this.$timeout=f;this.appConfig=e;this.rosterService=o;this.memberModalDialogService=s;this.$meeModal=h;this.telemetry=c;this.formatString=l;this.strings={};this.images={};this.familyLandingStateName="Family.Landing";this.twoMinutesInMilliseconds=12e4}return i.prototype.getInstrumentationComponentName=function(){return"family.resendinvite"},i.prototype.componentOnInit=function(){var n=this,t;return this.memberId=this.$state.params.memberId,this.strings=this.appConfig.content.addMember.Strings,this.images=this.appConfig.content.addMember.Images,this.baseStateName=this.$state.current.name,this.parentStateName=this.baseStateName.substring(0,this.baseStateName.lastIndexOf(".")),this.currentState=this.appConfig.scenarioStates.resendInviteStart,t={stateIdOnDismiss:this.parentStateName,modalHostOptions:{ariaDialogLabel:this.strings.ResendInviteDialogAriaText,ariaCloseButtonLabel:this.strings.CloseDialogAriaText,kind:"flow"}},this.telemetry.portalScenarios.beginMultiStepScenario(this.appConfig.Area,this.appConfig.scenarios.resendInvite,this.currentState),this.$meeModal.show("#family-dialog",this.baseStateName+".Progress",t).then(function(){return n.rosterService.getFamily().then(function(t){return n.memberModalDialogService.extractMember(t,n).then(function(){n.member?n.memberModalDialogService.isValidFamilyRosterModel(t)||n.telemetry.portalScenarios.endMultiStepScenario(n.createMultiStepScenarioResult(n.getInstrumentationComponentName()+" flow: Opened dialog with bad member id")):n.telemetry.portalScenarios.endMultiStepScenario(n.createMultiStepScenarioResult(n.getInstrumentationComponentName()+" flow: Opened dialog with bad member id",{memberId:n.$state.params.memberId}));n.inviteMember()})})})},i.prototype.inviteMember=function(){var n=this,t=(new Date).getTime()-new Date(this.member.InvitedSince).getTime(),i;return t<this.twoMinutesInMilliseconds?(this.completedTitle=this.strings.ResendInviteBlockedTitle,this.completedDescription=this.strings.ResendInviteBlockedDescription,this.telemetry.portalScenarios.endMultiStepScenario(this.createMultiStepScenarioResult("Blocked spam in first two minutes",{secondsSinceLastInvite:t/1e3})),this.$meeModal.switchTo(this.baseStateName+".Complete"),this.$q.resolve()):(i={inviteId:this.member.PrimaryId,isChild:this.member.IsChild},this.rosterService.addPendingMember(i).then(function(t){if(t.accrualUrl){n.$window.location.href=t.accrualUrl;return}n.telemetry.portalScenarios.endMultiStepScenario(n.createMultiStepScenarioResult());n.member.InvitedSince=(new Date).toJSON();n.completedTitle=n.strings.InviteSentTitle;n.completedDescription=n.member.IsChild?n.strings.MemberInviteSentMessage:n.strings.OrganizerInviteSentMessage;n.$meeModal.switchTo(n.baseStateName+".Complete")}).catch(function(t){var i=t.jqXHR.responseJSON&&t.jqXHR.responseJSON.error||"generic",r=n.currentState;return n.currentState=n.appConfig.scenarioStates.resendInviteError,n.telemetry.portalScenarios.endStep({area:n.appConfig.Area,name:n.appConfig.scenarios.resendInvite,step:r,next:n.currentState,isSuccess:!1,error:i}),n.$meeModal.switchTo(n.baseStateName+".Error"),n.$q.reject(t)}))},i.prototype.createMultiStepScenarioResult=function(n,t){var i={area:this.appConfig.Area,name:this.appConfig.scenarios.resendInvite,step:this.currentState,isSuccess:!n};return n&&(i.error=n),t&&(i.data=t),i},i.prototype.endFlow=function(){this.$meeModal.hide(this.parentStateName)},i.prototype.cancel=function(){this.telemetry.portalScenarios.cancelMultiStepScenario(this.createMultiStepScenarioResult());this.$meeModal.hide(this.parentStateName)},i.$inject=["$q","$state","$scope","$rootScope","$window","$timeout","familyConfig","rosterService","memberModalDialogService","$meeModal","telemetryService","stringFormatFilter"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("inviteMember"),n.OneUI.Angular.MonitorOperationProgress("modalOperation")],i.prototype,"inviteMember",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"resendInvite",{template:"<div ui-view='resendInvite'><\/div>"})],i)}();t.ResendInviteComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$state=n;this.navLinkList=[];this.maxLinkLen=0}return i.prototype.$onInit=function(){var n,t;this.adult.IsSelf&&(n={url:"/family/settings/manage-permissions/",text:this.compassStrings.ManagePermissionLinkText,target:"_self",id:"landing-manage-permissions",ariaLabel:this.compassStrings.ManagePermissionLinkText},this.navLinkList.push(n));this.canRemove&&(t={url:this.$state.href("Family.Landing.RemoveFlow",{memberId:this.adult.Cid}),text:this.adult.IsSelf?this.compassStrings.LeaveFamily:this.compassStrings.RemoveMember,id:"landing-remove-"+this.adult.Cid,ariaLabel:this.compassStrings.RemoveMember},this.navLinkList.push(t))},i.prototype.onFeedsProcessed=function(){this.onComponentLoaded({userId:this.adult.FamilyServiceId})},i.$inject=["$state"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"adult",{templateUrl:t.sharedComponentFolderBasePath+"Adult/adult.html",bindings:{adult:"<",compassStrings:"<",feeds:"<",canRemove:"<",onComponentLoaded:"&"}})],i)}();t.AdultComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i,r;(function(n){n[n.Campaign=0]="Campaign"})(i||(i={}));r=function(){function r(n,t){this.formatString=n;this.currentUser=t;this.feedItems=[];this.feedType=i}return r.prototype.$onInit=function(){var n,t;this.feeds&&this.feeds.officeDetail&&this.feeds.officeDetail.remainingSharedUsers>0&&(t=this.feeds.officeDetail.remainingSharedUsers===1?this.compassStrings.OfficeCampaignText1InlineSingular:this.compassStrings.OfficeCampaignText1InlinePlural,n={feedType:i.Campaign,message:this.formatString(t,[this.feeds.officeDetail.remainingSharedUsers]),linkText:this.compassStrings.ShareWithYourFamily,link:this.formatString(this.compassStrings.ShareWithYourFamilyLink,[this.currentUser.market]),icon:"mee-icon-OfficeLogo",biLabel:"landing-share-office"},this.feedItems.push(n));this.onComponentLoaded({userId:this.member.FamilyServiceId})},r.$inject=["stringFormatFilter","currentUser"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"adultFeeds",{templateUrl:t.sharedComponentFolderBasePath+"Adult/Feeds/adult.feeds.html",bindings:{member:"<",feeds:"<",compassStrings:"<",onComponentLoaded:"&"}})],r)}();t.AdultFeedsComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$rootScope=n}return i.prototype.$onInit=function(){this.$rootScope.recordPartialPageView("office-campaign-feed",0)},i.$inject=["$rootScope"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"officeCampaignFeed",{templateUrl:t.sharedComponentFolderBasePath+"Adult/Feeds/office-campaign-feed.html",bindings:{item:"<"}})],i)}();t.OfficeCampaignFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$cookies=n;this.$rootscope=t}return i.prototype.isBannerDismissed=function(){var n=!!this.$cookies.get(this.bannerId);return n||this.$rootscope.recordPartialPageView(this.bannerId,1),n},i.prototype.dismissed=function(){var n=new Date;n.setDate(n.getDate()+360);this.$cookies.put(this.bannerId,"1",{expires:n,secure:!1,path:"/family"})},i.$inject=["$cookies","$rootScope"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"campaignBanner",{templateUrl:t.sharedComponentFolderBasePath+"CampaignBanner/campaign-banner.html",bindings:{title:"@",description:"@",buttonLabel:"@",buttonAriaLabel:"@",buttonLink:"@",imageUrl:"@",bannerId:"@",dismissAriaLabel:"@"}})],i)}();t.CampaignBannerComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i,r;(function(n){n[n.Msa=0]="Msa";n[n.Local=1]="Local";n[n.LocalOrMsa=2]="LocalOrMsa";n[n.All=3]="All";n[n.Broken=4]="Broken";n[n.Pending=5]="Pending"})(i||(i={}));r=function(){function r(n,t){this.$state=n;this.formatString=t;this.userNavLinks=[]}u=r;r.prototype.$onInit=function(){this.maxLinkLen=n.Utilities.isInFlight("FamOverview")&&n.Utilities.isInFlight("FamReactTier1")?1:3;this.memberId=this.child.IsLocal?this.child.AccountId:this.child.Cid;this.child.IsExtended?this.addNavLinksForExtendedMember():!this.navLinkList||this.processNavLinks();this.childOnDevice=this.formatString(this.compassStrings.LocalAccountOn,[this.child.LocalAccountMachineName])};r.prototype.onFeedsProcessed=function(){this.onComponentLoaded({userId:this.child.FamilyServiceId})};r.prototype.processNavLinks=function(){var n=this;this.accountState=i.Pending;this.child.IsPending||(this.accountState=this.child.IsBroken?i.Broken:this.child.IsLocal?i.Local:i.Msa);angular.forEach(this.navLinkList,function(t){if(i[n.accountState]===t.LinkType||n.isAccountStateMatchesLocalOrMsa(n.accountState,t.LinkType)||t.LinkType===i[i.All]){var r={id:t.Link.Id+"-"+n.id,url:"",text:"",target:t.Link.Target?t.Link.TargetText:null,ariaLabel:""};if(r.text=n.formatString(t.Link.Text,n.child.FirstName),r.ariaLabel=n.formatString(t.AriaLabel,n.child.FirstName),t.Link.Id===u.RemoveMemberId)r.url=n.$state.href("Family.Landing.RemoveFlow",{memberId:n.memberId,domId:n.id}),n.child.IsSelf&&(r.text=n.compassStrings.LeaveFamily);else if(t.Link.Id===u.ManagePermissionsId){if(!n.child.IsSelf)return;r.url=""+t.Link.Url}else r.url=t.Link.Id===u.XboxSettingsLinkId?""+t.Link.Url:""+t.Link.Url+n.memberId;n.userNavLinks.push(r)}})};r.prototype.addNavLinksForExtendedMember=function(){var n={url:this.$state.href("Family.Landing.RemoveFlow",{memberId:this.child.Cid}),text:this.compassStrings.RemoveMember,id:"landing-remove-"+this.child.Cid,ariaLabel:this.compassStrings.RemoveMember};this.userNavLinks.push(n)};r.prototype.isAccountStateMatchesLocalOrMsa=function(n,t){return(n===i.Msa||n===i.Local)&&t===i[i.LocalOrMsa]};var u;return r.$inject=["$state","stringFormatFilter"],r.RemoveMemberId="landing-remove",r.ManagePermissionsId="landing-manage-permissions",r.XboxSettingsLinkId="landing-nav-xbox-settings",u=__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"child",{templateUrl:t.sharedComponentFolderBasePath+"Child/child.html",bindings:{id:"@",child:"<",compassStrings:"<",feeds:"<?",devices:"<?",onComponentLoaded:"&",navLinkList:"<?",asChild:"<?"}})],r)}();t.ChildComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i,r;(function(n){n[n.SyncFailedDevices=0]="SyncFailedDevices";n[n.LauncherNeedsAttentionDevices=1]="LauncherNeedsAttentionDevices";n[n.DevicesErrors=2]="DevicesErrors";n[n.PurchaseRequest=3]="PurchaseRequest";n[n.WebRequest=4]="WebRequest";n[n.ContentRestrictionRequest=5]="ContentRestrictionRequest";n[n.AppTimeRequest=6]="AppTimeRequest";n[n.ScreenTimeRequest=7]="ScreenTimeRequest";n[n.PlayTimeRequest=8]="PlayTimeRequest";n[n.Devices=9]="Devices";n[n.StoredAmount=10]="StoredAmount"})(i=t.FeedType||(t.FeedType={}));r=function(){function r(n,t,r,u,f){this.formatString=n;this.currentUser=t;this.buyNames=r;this.buyScenario=u;this.telemetry=f;this.feedItems=[];this.feedType=i}return r.prototype.$onChanges=function(){this.convertFeedsToViewModel()},r.prototype.onActionSucceeded=function(){},r.prototype.isScreenTimeRequest=function(n){return n===i.PlayTimeRequest||n===i.ScreenTimeRequest||n==i.AppTimeRequest},r.prototype.convertFeedsToViewModel=function(){var n=this,t=[];this.feeds.purchaseRequests=_.filter(this.feeds.purchaseRequests,function(n){return n.RequestStatus!==2});t=_.map(this.feeds.purchaseRequests,function(n){return{purchaseRequest:n,feedType:i.PurchaseRequest}});t.length>0&&this.telemetry.portalScenarios.beginMultiStepScenario(this.buyNames.area,this.buyScenario.name,this.buyScenario.displayFeed);var u=_.map(this.feeds.webRequests,function(t){return{website:t.Website,allowText:n.compassStrings.AllowWebsiteLinkText,feedType:i.WebRequest}}),f=_.map(this.feeds.contentRestrictionsRequests,function(t){return{content:t.Content,allowText:n.compassStrings.AllowAppLinkText,feedType:i.ContentRestrictionRequest}}),e=_.map(this.feeds.screenTimeRequests,function(n){return{feedType:i.ScreenTimeRequest,requestedTime:n.RequestedTime,isGlobal:n.IsGlobal}}),o=_.map(this.feeds.storedAmountDetails,function(t){var r;return r=t.Amount==="NA"?n.formatString(n.compassStrings.InMsAccountEmpty,[n.member.DisplayName]):t.AmountBlocked?t.Amount:n.formatString(n.compassStrings.InMsAccount,[t.Amount]),{message:r,feedType:i.StoredAmount,amount:t.Amount}}),s=this.devices&&this.devices.length>0?[{feedType:i.Devices,devices:this.devices}]:[],h=_.map(this.feeds.playTimeRequests,function(n){return{feedType:i.PlayTimeRequest,requestedTime:n.RequestedTime,isGlobal:n.IsGlobal}}),c=_.map(this.feeds.appTimeRequests,function(n){return{feedType:i.AppTimeRequest,appId:n.AppId,appName:n.AppName,isAppBlocked:n.IsAppBlocked}}),l=this.feeds.syncFailedDevices&&this.feeds.syncFailedDevices.length>0?[{feedType:i.SyncFailedDevices,devices:this.feeds.syncFailedDevices}]:[],r=[];this.feeds.launcherNeedsAttentionDevices&&this.feeds.launcherNeedsAttentionDevices.length>0&&(r=_.map(this.feeds.launcherNeedsAttentionDevices,function(n){return{feedType:i.LauncherNeedsAttentionDevices,DeviceId:n.DeviceId,DeviceFormFactor:n.DeviceFormFactor,DeviceName:n.DeviceName,DeviceOSName:n.DeviceOSName}}));var a=_.filter(this.feeds.devicesWithErrorStates,function(n){return n.PrimaryErrorStateType!=="WindowsDesktopWindowsVersionSupportsAppBlocking"}),v=_.map(a,function(n){return{feedType:i.DevicesErrors,device:n}});this.feedItems=[].concat(c,u,f,e,o,s,t,h,l,r,v);this.onComponentLoaded({userId:this.member.FamilyServiceId})},r.$inject=["stringFormatFilter","currentUser","buyNames","buyScenario","telemetryService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"childFeeds",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/child.feeds.html",bindings:{id:"@",member:"<",feeds:"<",devices:"<",compassStrings:"<",onComponentLoaded:"&"}})],r)}();t.ChildFeedsComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$q=n;this.apiService=t;this.appConfig=i;this.$meeModal=r}return i.prototype.$onInit=function(){this.title=this.content.Description.Title;this.iconUri=this.content.Description.IconUriString;this.contentId=this.content.ContentId;this.appIsBlockedBrowsers()&&(this.preventPostAction=!0)},i.prototype.getInstrumentationComponentName=function(){return"family.exception-request-appgame"},i.prototype.allow=function(){var n=this;this.appIsBlockedBrowsers()?this.$meeModal.show("#family-dialog","Family.Landing.BrowserBlocked",{stateIdOnDismiss:"Family.Landing",modalHostOptions:{kind:"flow"},data:{content:this.content,compass:this.compass,onApproved:function(){n.makeAllowRequest()},onCanceled:function(){n.actionFailed=!1}}}):this.makeAllowRequest()},i.prototype.makeAllowRequest=function(){var n=this;return this.isInProgress=!0,this.apiService.setContentOrWebRequestApproved(this.userId,this.contentId,!1).then(function(){return n.onAllowSucceeded(),n.isInProgress=!1,n.preventPostAction=!1,n.$q.resolve()}).catch(function(t){return n.onAllowFailed(),n.actionFailed=!0,n.isInProgress=!1,n.$q.reject(t)})},i.prototype.deny=function(){var n=this;return this.isInProgress=!0,this.apiService.removeContentOrWebRequest(this.userId,this.contentId,!1).then(function(){return n.onDenySucceeded(),n.isInProgress=!1,n.$q.resolve()}).catch(function(t){return n.onDenyFailed(),n.actionFailed=!0,n.isInProgress=!1,n.$q.reject(t)})},i.prototype.appIsBlockedBrowsers=function(){var n=this,t;return!this.title||!this.contentId?!1:(t=Object.keys(this.appConfig.blockedBrowsers),!!_.find(t,function(t){return t===n.title.toLowerCase()&&!!n.contentId.toLowerCase().match(n.appConfig.blockedBrowsers[t])}))},i.$inject=["$q","apiService","familyConfig","$meeModal"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("makeAllowRequest")],i.prototype,"makeAllowRequest",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deny")],i.prototype,"deny",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"contentRequestFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/content-request-feed.html",bindings:{userId:"@",content:"<",requestMessage:"@",errorMessage:"@",allowText:"@",allowedText:"@",allowAriaText:"@",allowedAriaText:"@",denyText:"@",deniedText:"@",denyAriaText:"@",deniedAriaText:"@",onAllowSucceeded:"&",onAllowFailed:"&",onDenySucceeded:"&",onDenyFailed:"&",compass:"<"}})],i)}();t.ContentRequestFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i="deviceErrorsFeed",r=function(){function r(n,t,i,r,u){this.familyConfig=n;this.deviceNotificationSvc=t;this.$location=i;this.formatString=r;this.dateTimeFormatter=u}return r.prototype.$onInit=function(){var n=this.$location.search();n.deviceId==this.device.Id&&n.errorState==this.device.PrimaryErrorStateType&&(this.$location.replace().search({deviceId:null,errorState:null}),this.openDeviceNotifyErrorModal())},r.prototype.getErrorString=function(){var t=this.device.PrimaryErrorState;return this.formatString(this.familyConfig.content.landing.DeviceErrorStateNotifications[this.device.PrimaryErrorStateType].summaryMessage,{deviceName:this.device.Name,timestamp:t.LastDetectedOn&&this.dateTimeFormatter.toLongDateTime(n.Utilities.parseServerDatetime(t.LastDetectedOn))})},r.prototype.openDeviceNotifyErrorModal=function(){this.deviceNotificationSvc.openDeviceErrorStateDialog(this.device,"Family.Landing.DeviceNotifyError",i)},r.$inject=["familyConfig","deviceNotificationService","$location","stringFormatFilter","dateTimeFormatter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"devicesErrorsFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/devices-errors-feed.html",bindings:{device:"<"}})],r)}();t.DeviceErrorFeedComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"devicesFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/devices-feed.html",bindings:{id:"@",userId:"@",message:"@",actionText:"@",actionAriaText:"@",devices:"<"}})],i)}();t.DevicesFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.formatString=n}return i.prototype.$onInit=function(){this.showResendInvite=!n.Utilities.isInFlight("FamHIP");this.onComponentLoaded({userId:this.member.FamilyServiceId})},i.$inject=["stringFormatFilter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"extendedMemberFeeds",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/extended-member.feeds.html",bindings:{id:"@",member:"<",compassStrings:"<",onComponentLoaded:"&"}})],i)}();t.ExtendedMemberFeedsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.allow=function(){this.preventPostActionOnAllow||(this.postActionObj={text:this.allowedText,ariaLabel:this.allowedAriaText,"class":"c-meta-text",glyph:"mee-icon mee-icon-Completed"});this.onAllowClicked()},i.prototype.deny=function(){this.postActionObj={text:this.deniedText,ariaLabel:this.deniedAriaText,"class":"c-meta-text",glyph:"mee-icon mee-icon-Blocked"};this.onDenyClicked()},i.prototype.$onChanges=function(n){n.preventPostActionOnAllow&&n.preventPostActionOnAllow.currentValue===!1&&(this.postActionObj={text:this.allowedText,ariaLabel:this.allowedAriaText,"class":"c-meta-text",glyph:"mee-icon mee-icon-Completed"})},i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"feedAllowDenyAction",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/feed-allow-deny-action.html",bindings:{allowText:"@",allowedText:"@",allowAriaText:"@",allowedAriaText:"@",denyText:"@",deniedText:"@",denyAriaText:"@",deniedAriaText:"@",allowBiId:"@",denyBiId:"@",onAllowClicked:"&",onDenyClicked:"&",failed:"<",errorMessage:"@",isInProgress:"<",preventPostActionOnAllow:"<"}})],i)}();t.FeedAllowDenyActionComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"launcherNeedsAttentionFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/launcher-needs-attention-feed.html",bindings:{message:"@",actionLink:"@",actionUrl:"@",actionAriaLabel:"@?"}})],i)}();t.LauncherNeedsAttentionFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c){this.familyProductService=n;this.familyConfig=t;this.$q=i;this.apiService=r;this.$state=u;this.buyNames=f;this.buyScenario=e;this.buyErrors=o;this.formatString=s;this.telemetry=h;this.$window=c;this.biData={}}return i.prototype.componentOnInit=function(){var n=this;return this.isInProgress=!0,this.apiService.getProductDetails(this.member.FamilyServiceId,this.purchaseRequest.ProductId,this.purchaseRequest.SkuId,this.purchaseRequest.Market,this.purchaseRequest.Language).then(function(t){n.product=t;n.biData.productId=t.ProductDocument.Product.ProductId;n.biData.productKind=t.ProductDocument.Product.ProductKind;n.biData.productPrice=t.Price;n.initializeMessageText(t)}).catch(function(t){t&&t.jqXHR&&t.jqXHR.status===400&&(n.productRemoved=!0)}).finally(function(){n.isInProgress=!1})},i.prototype.getInstrumentationComponentName=function(){return"family.purchaseRequestFeed"},i.prototype.allow=function(){this.isInProgress=!0;this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.buyScenario.displayFeed,next:this.buyScenario.feedAllow,isSuccess:!0,data:this.biData});this.$window.location.href=this.getBuyUrlWithParam()},i.prototype.deny=function(){var n=this,t;return this.isInProgress=!0,t=!0,this.telemetry.portalScenarios.endStep({area:this.buyNames.area,name:this.buyScenario.name,step:this.buyScenario.displayFeed,next:this.buyScenario.feedDeny,isSuccess:!0,data:this.biData}),this.apiService.denyPurchaseRequest(this.member.FamilyServiceId,this.purchaseRequest.ProductId,this.purchaseRequest.SkuId).then(function(){return n.onDenySucceeded(),n.$q.resolve()}).catch(function(i){return n.onDenyFailed(),t=!1,n.failed=!0,n.$q.reject(i)}).finally(function(){n.telemetry.portalScenarios.endMultiStepScenario({area:n.buyNames.area,name:n.buyScenario.name,step:n.buyScenario.feedDeny,isSuccess:t,error:t?null:n.buyErrors.failedToDeny,data:n.biData});n.isInProgress=!1})},i.prototype.getAskParamStringValue=function(){var n={fsid:this.purchaseRequest.Id,cid:this.member.Cid,src:"site"};return JSON.stringify(n)},i.prototype.getBuyUrlWithParam=function(){return this.$state.href(this.buyNames.baseState,{ask:this.getAskParamStringValue()},{absolute:!0})},i.prototype.initializeMessageText=function(){var t,i,r,n,u,f,e;switch(this.product.ProductDocument.Product.ProductKind){case"TvSeason":t=[this.member.FirstName,this.product.Title,this.product.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeriesTitle,this.product.RatingLongName,this.product.Price];this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestTvSeasonFeedMessage,t);this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvSeasonFeedMessageAllowAria,t);this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvSeasonFeedMessageDenyAria,t);this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvSeasonFeedMessageDeniedAria,t);break;case"TvEpisode":i=[this.member.FirstName,this.product.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeriesTitle,this.product.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeasonPosition.toString(),this.product.RatingLongName,this.product.Price];this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestTvEpisodeFeedMessage,i);this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvEpisodeFeedMessageAllowAria,i);this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvEpisodeFeedMessageDenyAria,i);this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestTvEpisodeFeedMessageDeniedAria,i);break;case"MusicTrack":case"MusicAlbum":r=[this.member.FirstName,this.product.Title,this.product.ProductDocument.Product.LocalizedProperties[0].ArtistDisplayName.ArtistDisplayText,this.product.RatingLongName,this.product.Price];this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestMusicFeedMessage,r);this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestMusicFeedMessageAllowAria,r);this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestMusicFeedMessageDenyAria,r);this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestMusicFeedMessageDeniedAria,r);break;case"Movie":n=[this.member.FirstName,this.product.Title,this.product.RatingLongName,this.product.Price];this.familyProductService.isRental(this.product)?(this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageRent,n),this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageRentAllowAria,n),this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageRentDenyAria,n),this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageRentDeniedAria,n)):(this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestFeedMessage,n),this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageAllowAria,n),this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageDenyAria,n),this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageDeniedAria,n));break;case"CSV":u=[this.member.FirstName,this.product.Price];this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestCsvFeedMessage,u);this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestCsvFeedMessageAllowAria,u);this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestCsvFeedMessageDenyAria,u);this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestCsvFeedMessageDeniedAria,u);break;default:f=[this.member.FirstName,this.product.Title,this.product.RatingLongName,this.product.Price];e=[this.member.FirstName,this.getAskAParentProductTitleLink(),this.product.RatingLongName,this.product.Price];this.requestMessage=this.formatString(this.cmsStrings.PurchaseRequestFeedMessage,e);this.allowAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageAllowAria,f);this.denyAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageDenyAria,f);this.deniedAriaText=this.formatString(this.cmsStrings.PurchaseRequestFeedMessageDeniedAria,f)}},i.prototype.getAskAParentProductTitleLink=function(){if(!this.familyProductService.hasProductDisplayPage(this.product))return this.product.Title;var n=encodeURIComponent(this.getAskParamStringValue());switch(this.product.ProductDocument.Product.ProductFamily){case"Games":return'<a class="c-hyperlink" id="purchase-request-feed-games-product-display-page" target="_blank" href="'+this.familyConfig.microsoftUrl+"/"+this.purchaseRequest.Language+"/store/apps/"+this.purchaseRequest.ProductId+"?ask="+n+'">'+this.product.Title+"<\/a>";case"Apps":return'<a class="c-hyperlink" id="purchase-request-feed-apps-product-display-page" target="_blank" href="'+this.familyConfig.microsoftUrl+"/"+this.purchaseRequest.Language+"/store/apps/"+this.purchaseRequest.ProductId+"?ask="+n+'">'+this.product.Title+"<\/a>";case"Books":return'<a class="c-hyperlink" id="purchase-request-feed-books-product-display-page" target="_blank" href="'+this.familyConfig.microsoftUrl+"/"+this.purchaseRequest.Language+"/store/p/"+this.product.Title.toLowerCase().replace(" ","-")+"/"+this.purchaseRequest.ProductId+"?ask="+n+'">'+this.product.Title+"<\/a>";case"Edu":case"Avatars":case"Movies":case"TV":case"Barcelona":case"Bundles":case"Passes":case"OperatingSystem":case"Fees":case"Azure":case"CSV":case"Software":case"Devices":case"MusicAlbums":case"MusicTracks":case"MusicVideos":default:return this.product.Title}},i.$inject=["familyProductService","familyConfig","$q","apiService","$state","buyNames","buyScenario","buyErrors","stringFormatFilter","telemetryService","$window"],__decorate([n.OneUI.Angular.MonitorOperationProgress("FamilyPurchaseRequestFeedComponentInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deny")],i.prototype,"deny",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"purchaseRequestFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/purchase-request-feed.html",bindings:{purchaseRequest:"<",cmsStrings:"<",member:"<",errorMessage:"@",allowText:"@",denyText:"@",deniedText:"@",onAllowSucceeded:"&",onAllowFailed:"&",onDenySucceeded:"&",onDenyFailed:"&"}})],i)}();t.PurchaseRequestFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=["00:15:00","00:30:00","01:00:00","02:00:00","08:00:00"],r="mee-icon-XboxLogo",u="mee-icon-Stopwatch",f="mee-icon mee-icon-Completed",e="mee-icon mee-icon-Error",o="mee-icon mee-icon-Blocked",s="mee-error-color",h=function(){function h(n,t,i,r,u){this.$q=n;this.apiService=t;this.formatString=i;this.monitoredOperation=r;this.dateTimeFormatter=u}return h.prototype.$onInit=function(){var o=this,n=angular.copy(this.cmsData.ScreenTimeRequests.Global),f,e;this.isGlobal||angular.extend(n,this.cmsStringPerRequestType());this.viewData={glyph:this.requestType==t.FeedType.PlayTimeRequest&&!this.isGlobal?r:u,strings:n};this.formatParams={name:this.member.DisplayName,appName:this.appName};this.formattedStrings={askPermissionText:this.formatString(n.AskPermissionText,this.formatParams),allowAriaText:this.formatString(n.ActionAllowAriaText,this.formatParams),denyAriaText:this.formatString(n.ActionDenyAriaText,this.formatParams)};this.duration={model:"",lookup:{"00:15:00":n.ActionAllow15m,"00:30:00":n.ActionAllow30m,"01:00:00":n.ActionAllow1h,"02:00:00":n.ActionAllow2h,"03:00:00":n.ActionAllow3h,"08:00:00":n.ActionAllow8h}};f=n.AllowTimeSpans?n.AllowTimeSpans.split(","):i;this.duration.options=_.map(f,function(n){return{val:n,text:o.duration.lookup[n]}});e=Math.random().toString(16).slice(2);this.programmaticOperationName="screenTimeProgress_"+this.member.childId+"_"+e},h.prototype.getInstrumentationComponentName=function(){switch(this.requestType){case t.FeedType.AppTimeRequest:return"family.exception-request-apptime";case t.FeedType.PlayTimeRequest:return"family.exception-request-playtime";default:return"family.exception-request-screentime"}},h.prototype.approveClicked=function(){this.approve()},h.prototype.denyClicked=function(){this.deny()},h.prototype.approve=function(){var n=this;return this.monitoredOperation(this.programmaticOperationName,function(){return n.apiService.approveTimeRequest({childId:n.member.FamilyServiceId,appId:n.appId,duration:n.duration.model},n.requestType,n.member.JsonWebToken).then(function(){var i=n.duration.lookup[n.duration.model],r=n.getEndTime(n.duration.model),t=_.extend({duration:i,endTime:r},n.formatParams);n.actionConfirmation={text:n.formatString(n.viewData.strings.ActionAllowCompleted,t),ariaLabel:n.formatString(n.viewData.strings.ActionAllowCompletedAriaText,t),glyph:f};n.onApproveSuccess()}).catch(function(t){if(t.jqXHR.status===404)n.actionConfirmation={text:n.viewData.strings.NotificationNotFound,ariaLabel:n.viewData.strings.NotificationNotFound,glyph:e,messageClass:s};else return n.$q.reject(t)})})},h.prototype.deny=function(){var n=this;return this.monitoredOperation(this.programmaticOperationName,function(){return n.apiService.denyTimeRequest({childId:n.member.FamilyServiceId,appId:n.appId},n.requestType,n.member.JsonWebToken).then(function(){n.actionConfirmation={text:n.viewData.strings.ActionDenyCompleted,ariaLabel:n.formatString(n.viewData.strings.ActionDenyCompletedAriaText,n.formatParams),glyph:o};n.onDenySuccess()})})},h.prototype.getEndTime=function(n){var i=typeof n=="string"&&n.match(/^(\d\d):(\d\d):(\d\d)$/);if(i){var r=+i[1],u=+i[2],t=new Date;return t.setMinutes(t.getMinutes()+u),t.setHours(t.getHours()+r),this.dateTimeFormatter.toShortTime(t)}},h.prototype.cmsStringPerRequestType=function(){switch(this.requestType){case t.FeedType.AppTimeRequest:return this.isAppBlocked?this.cmsData.ScreenTimeRequests.AppBlocked:this.cmsData.ScreenTimeRequests.App;case t.FeedType.PlayTimeRequest:return this.cmsData.ScreenTimeRequests.Xbox;default:return this.cmsData.ScreenTimeRequests.PC}},h.$inject=["$q","apiService","stringFormatFilter","$meeMonitoredOperation","dateTimeFormatter"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("approve")],h.prototype,"approve",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deny")],h.prototype,"deny",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"screenTimeGenericFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/screen-time-generic-feed.html",bindings:{requestType:"<",isGlobal:"<?",appId:"<?",appName:"<?",isAppBlocked:"<?",member:"<",cmsData:"<",onDenySuccess:"&",onApproveSuccess:"&"}})],h)}();t.ScreenTimeFeedComponent=h})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.appConfig=n;this.telemetry=t}return i.prototype.onLinkClick=function(){this.telemetry.portalScenarios.beginMultiStepScenario(this.appConfig.Family,this.appConfig.scenarios.childFunding,this.appConfig.addMoneySteps.addMoneyButtonClicked)},i.$inject=["familyConfig","telemetryService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"storedAmountFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/stored-amount-feed.html",bindings:{item:"<",actionLink:"@",actionText:"@",actionAriaText:"@"}})],i)}();t.StoredAmountFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.deviceNotificationService=n}return i.prototype.openDeviceNotifySignInStepsModal=function(){this.deviceNotificationService.openDeviceNotifyModal(this.devices,"Family.Landing.DeviceNotifySignInSteps")},i.$inject=["deviceNotificationService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"syncFailedFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/sync-failed-feed.html",bindings:{message:"@",actionText:"@",devices:"<"}})],i)}();t.SyncFailedFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$q=n;this.apiService=t}return i.prototype.getInstrumentationComponentName=function(){return"family.exception-request-website"},i.prototype.allow=function(){var n=this;return this.isInProgress=!0,this.apiService.setContentOrWebRequestApproved(this.userId,this.website,!0).then(function(){return n.onAllowSucceeded(),n.isInProgress=!1,n.$q.resolve()}).catch(function(t){return n.onAllowFailed(),n.failed=!0,n.isInProgress=!1,n.$q.reject(t)})},i.prototype.deny=function(){var n=this;return this.isInProgress=!0,this.apiService.removeContentOrWebRequest(this.userId,this.website,!0).then(function(){return n.onDenySucceeded(),n.isInProgress=!1,n.$q.resolve()}).catch(function(t){return n.onDenyFailed(),n.failed=!0,n.isInProgress=!1,n.$q.reject(t)})},i.$inject=["$q","apiService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("allow")],i.prototype,"allow",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deny")],i.prototype,"deny",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"webRequestFeed",{templateUrl:t.sharedComponentFolderBasePath+"Child/Feeds/web-request-feed.html",bindings:{userId:"@",website:"@",requestMessage:"@",errorMessage:"@",allowText:"@",allowedText:"@",allowAriaText:"@",allowedAriaText:"@",denyText:"@",deniedText:"@",denyAriaText:"@",deniedAriaText:"@",onAllowSucceeded:"&",onAllowFailed:"&",onDenySucceeded:"&",onDenyFailed:"&"}})],i)}();t.WebRequestFeedComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h){this.$state=n;this.$q=t;this.$window=i;this.$cookies=r;this.appConfig=u;this.rosterService=f;this.memberModalDialogService=e;this.telemetry=o;this.$meeModal=s;this.formatString=h;this.strings={}}return i.prototype.getInstrumentationComponentName=function(){return"family.verifynow"},i.prototype.componentOnInit=function(){var n=this;return this.memberId=this.$state.params.memberId,this.strings=this.appConfig.content.addMember.Strings,this.parentStateName=this.$state.current.name.substring(0,this.$state.current.name.lastIndexOf(".")),this.cancelMultiStepScenario=function(){var t={area:n.appConfig.Area,name:n.scenario,isSuccess:!0,step:n.appConfig.scenarioStates.opened};return n.telemetry.portalScenarios.cancelMultiStepScenario(t),null},this.rosterService.getFamily().then(function(t){return n.memberModalDialogService.extractMember(t,n).then(function(){n.currentUserProfilePicture=t.currentMember.ProfilePicture;var i={stateIdOnDismiss:n.parentStateName,onDismissed:n.cancelMultiStepScenario,modalHostOptions:{ariaDialogLabel:n.strings.VerifyNowTitle,ariaCloseButtonLabel:n.strings.CloseDialogAriaText,kind:"flow"}};n.verifyNowDescription=n.formatString(n.strings.VerifyNowDescription,n.member.PrimaryId);n.scenario=n.member.PrimaryId.indexOf("@")!==-1?n.member.IsChild?n.appConfig.scenarios.verifyNowChild:n.appConfig.scenarios.verifyNowAdult:n.member.IsChild?n.appConfig.scenarios.verifyNowChildMobile:n.appConfig.scenarios.verifyNowAdultMobile;n.telemetry.portalScenarios.beginMultiStepScenario(n.appConfig.Area,n.scenario,n.appConfig.scenarioStates.opened);n.$meeModal.show("#family-dialog",n.$state.current.name+".Confirm",i)})})},i.prototype.verifyMember=function(){var n=this,t;return this.isVerifyMemberError=!1,this.isVerifyMemberInProgress=!0,t={inviteId:this.member.PrimaryId,isChild:this.member.IsChild,isInline:!0,invalidateCache:!1},this.rosterService.addPendingMember(t).then(function(t){n.$cookies.put(n.appConfig.taskCompletionScenarioNameCookie,n.scenario,{path:"/"});n.$cookies.put(n.appConfig.verifyNowPendingMemberIdCookie,n.member.PrimaryId,{path:"/"});var i={area:n.appConfig.Area,name:n.scenario,isSuccess:!0,step:n.appConfig.scenarioStates.opened,next:n.appConfig.scenarioStates.loginWithPendingMemberMsa};return n.telemetry.portalScenarios.endStep(i),n.$window.location.href=t.redirectUrl,n.$q.resolve()}).catch(function(t){var i={area:n.appConfig.Area,name:n.scenario,isSuccess:!1,step:n.appConfig.scenarioStates.opened,next:n.appConfig.scenarioStates.opened,error:t.jqXHR.responseJSON&&t.jqXHR.responseJSON.error||"generic"};return n.isVerifyMemberError=!0,n.isVerifyMemberInProgress=!1,n.telemetry.portalScenarios.endStep(i),n.$q.reject(t)})},i.prototype.cancel=function(){this.$meeModal.hide(this.parentStateName);this.cancelMultiStepScenario()},i.$inject=["$state","$q","$window","$cookies","familyConfig","rosterService","memberModalDialogService","telemetryService","$meeModal","stringFormatFilter"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("verifyMember"),n.OneUI.Angular.MonitorOperationProgress("modalOperation")],i.prototype,"verifyMember",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"verifyNow",{template:"<div ui-view='verifyNow'><\/div>"})],i)}();t.VerifyNowComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o){this.$state=n;this.$q=t;this.$window=i;this.appConfig=r;this.rosterService=u;this.memberModalDialogService=f;this.$meeModal=e;this.stringFormatFilter=o;this.strings={}}return i.prototype.componentOnInit=function(){var n=this;return this.memberId=this.$state.params.memberId,this.strings=this.appConfig.content.landing.Strings,this.baseStateName=this.$state.current.name,this.parentStateName=this.baseStateName.substring(0,this.baseStateName.lastIndexOf(".")),this.rosterService.getFamily().then(function(t){return n.memberModalDialogService.extractMember(t,n).then(function(){var t={stateIdOnDismiss:n.parentStateName,modalHostOptions:{ariaDialogLabel:n.stringFormatFilter(n.strings.WhyDialogAriaLabel,n.member.FirstName),ariaCloseButtonLabel:n.strings.CloseDialogAriaLabel,kind:"flow"}};n.$meeModal.show("#family-dialog",n.baseStateName+".LearnMore",t)})})},i.prototype.getInstrumentationComponentName=function(){return"family.why"},i.prototype.cancel=function(){this.$meeModal.hide(this.parentStateName)},i.prototype.learnMore=function(){this.$window.location.href=this.strings.LearnMoreUrl?this.strings.LearnMoreUrl:""},i.$inject=["$state","$q","$window","familyConfig","rosterService","memberModalDialogService","$meeModal","stringFormatFilter"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"why",{template:"<div ui-view='why'><\/div>"})],i)}();t.WhyComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var r=function(){function n(){}return n}(),t,i;n.ContentRestrictionsModel=r;t=function(){function n(){}return n}();n.ContentRestriction=t;i=function(){function n(){}return n}();n.Content=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t;(function(n){var r=function(){function n(n,t){this.isError=n;this.message=t;this.actionText="";this.actionLink="";this.originatingState="";this.isDismissable=!1;this.isActionable=!1;this.isOpenNewWindow=!1;this.isWarning=!1}return n.prototype.getIsError=function(){return this.isError},n.prototype.getOriginatingState=function(){return this.originatingState},n.prototype.setOriginatingState=function(n){this.originatingState=n},n}(),t,i,e,o,u,f,s,h,c,l;n.Notification=r;t=function(n){function t(t){var i=n.call(this,!1,t)||this;return i.message=t,i}return __extends(t,n),t}(r);n.SimpleNotification=t;i=function(n){function t(t){var i=n.call(this,!0,t)||this;return i.message=t,i}return __extends(t,n),t}(r);n.ErrorNotification=i;e=function(n){function t(t,i){var r=n.call(this,i)||this;return r.cookieName=t,r.message=i,r.isDismissable=!0,r}return __extends(t,n),t}(t);n.DismissableSimpleNotification=e;o=function(n){function t(t,i){var r=n.call(this,i)||this;return r.cookieName=t,r.message=i,r.isDismissable=!0,r}return __extends(t,n),t}(i);n.DismissableErrorNotification=o;u=function(n){function t(t,i,r,u){var f=n.call(this,u)||this;return f.isOpenNewWindow=t,f.actionText=i,f.actionLink=r,f.message=u,f.isActionable=!0,f}return __extends(t,n),t}(t);n.ActionableSimpleNotification=u;f=function(n){function t(t,i,r,u){var f=n.call(this,u)||this;return f.isOpenNewWindow=t,f.actionText=i,f.actionLink=r,f.message=u,f.isActionable=!0,f}return __extends(t,n),t}(i);n.ActionableErrorNotification=f;s=function(n){function t(t,i,r,u,f){var e=n.call(this,t,r,u,f)||this;return e.isOpenNewWindow=t,e.cookieName=i,e.actionText=r,e.actionLink=u,e.message=f,e.isDismissable=!0,e}return __extends(t,n),t}(u);n.ActionableDismissableSimpleNotification=s;h=function(n){function t(t,i,r,u,f){var e=n.call(this,t,r,u,f)||this;return e.isOpenNewWindow=t,e.cookieName=i,e.actionText=r,e.actionLink=u,e.message=f,e.isDismissable=!0,e}return __extends(t,n),t}(f);n.ActionableDismissableErrorNotification=h;c=function(n){function t(t){var i=n.call(this,t)||this;return i.message=t,i.isWarning=!0,i}return __extends(t,n),t}(t);n.SimpleWarningNotification=c;l=function(n){function t(t){var i=n.call(this,t)||this;return i.message=t,i.isDismissable=!0,i.isWarning=!0,i}return __extends(t,n),t}(t);n.SimpleDismissableWarningNotification=l})(t=n.Models||(n.Models={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var i=function(){function n(){}return n}(),t;n.FamilyNavModel=i;t=function(){function n(){this.index="0";this.onText="";this.offText="";this.isOn=!1}return n}();n.Toggle=t})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){this.familyConfig=n;this.$rootScope=t;this.$state=i;this.$meeModal=r;this.$promise=u;this.$window=f;this.childFeedsService=e;this.formatString=o;this.dateTimeFormatter=s;this.formatTimeSpan=h;this.deviceNotificationService=c;this.officeCampaignService=l;this.actionResponseNotificationService=a;this.cookieNotificationService=v;this.buyNames=y;this.familyProductService=p;this.apiService=w;this.currentUser=b}return i.prototype.componentOnInit=function(){var t=this,n;return this.heading=this.compassStrings.NotificationsTitle,this.actionableNotificationsTitle=this.compassStrings.NotificationCenterActionableNotificationsTitle,this.otherNotificationsTitle=this.compassStrings.NotificationCenterOtherNotificationsTitle,this.children=this.familyRosterModel.getChildren(),this.childrenFeedsPromise=this.childFeedsService.getLandingPageFeeds(this.children),n=[],n.push(this.addAlertNotifications()),n.push(this.addActionableNotifications()),n.push(this.addOfficeNotifications()),n.push(this.addOtherNotifications()),this.$promise.all(n).finally(function(){t.$rootScope.$emit(t.familyConfig.familyLoadedEvent)})},i.prototype.getInstrumentationComponentName=function(){return"family.notification-center"},i.prototype.getWindow=function(){return this.$window},i.prototype.onNotificationActionClick=function(n,t,i){i.callback&&(n.preventDefault(),i.callback())},i.prototype.addAlertNotifications=function(){var n=this;return this.alertNotifications=[],this.childrenFeedsPromise.then(function(t){_.forEach(n.children,function(i){var r=t[i.Puid];r&&(r.syncFailedDevices&&r.syncFailedDevices.length>0&&n.alertNotifications.push(n.makeDeviceSyncFailedNotification(i,r.syncFailedDevices)),_.forEach(r.launcherNeedsAttentionDevices,function(t){n.alertNotifications.push(n.makeDeviceLauncherNeedsAttentionNotification(i,t))}),_.forEach(r.devicesWithErrorStates,function(t){n.alertNotifications.push(n.makeDeviceWithErrorStatesNotification(i,t))}))})})},i.prototype.addActionableNotifications=function(){var n=this;return this.actionableNotifications=this.makePendingMemeberNotifications(),this.childrenFeedsPromise.then(function(i){var r=[];return _.forEach(n.children,function(u){var f=i[u.Puid],o,e;f&&(o=_.filter(f.purchaseRequests,function(n){return n.RequestStatus!==2}),_.forEach(o,function(t){r.push(n.makePurchaseRequestNotification(u,t).then(function(t){t&&n.actionableNotifications.push(t)}))}),_.forEach(f.webRequests,function(t){n.actionableNotifications.push(n.makeWebRequestNotification(u,t))}),_.forEach(f.contentRestrictionsRequests,function(t){n.actionableNotifications.push(n.makeContentRestrictionRequestNotification(u,t))}),e=_.map(f.appTimeRequests,function(n){return{requestType:t.FeedType.AppTimeRequest,appId:n.AppId,appName:n.AppName,isAppBlocked:n.IsAppBlocked}}),e=e.concat(_.map(f.screenTimeRequests,function(n){return{requestType:t.FeedType.ScreenTimeRequest,requestedTime:n.RequestedTime,isGlobal:n.IsGlobal}})),e=e.concat(_.map(f.playTimeRequests,function(n){return{requestType:t.FeedType.PlayTimeRequest,requestedTime:n.RequestedTime,isGlobal:n.IsGlobal}})),_.forEach(e,function(t){n.actionableNotifications.push(n.makeTimeRequestNotification(u,t))}))}),n.$promise.all(r)})},i.prototype.addOfficeNotifications=function(){var n=this;return this.makeOfficeNotifications().then(function(t){n.officeNotifications=t})},i.prototype.addOtherNotifications=function(){var n=this;return this.otherNotifications=this.makeCookieNotifications(),this.makeActionResponseNotification().then(function(t){t&&n.otherNotifications.push(t)})},i.prototype.makeDeviceSyncFailedNotification=function(n,t){var i=this;return{icon:"mee-icon-Warning",message:this.compassStrings.DeviceNotifySignInMessage,actions:[{biid:"notifications-syncfailed-devices",lightweight:!0,text:this.compassStrings.SeeDevices,callback:function(){i.deviceNotificationService.openDeviceNotifyModal(t,"Family.Notifications.DeviceNotifySignInSteps")}}]}},i.prototype.makeDeviceLauncherNeedsAttentionNotification=function(n,t){var i=this.formatString(this.compassStrings.DeviceNotify.DeviceNotifyLauncherAttentionMessage,{devicename:t.DeviceName});return{icon:"mee-icon-Warning",message:i,actions:[{biid:"notifications-launcher-attention",lightweight:!0,text:this.compassStrings.DeviceNotify.DeviceNotifyFixLinkText,ariaText:this.formatString(this.compassStrings.DeviceNotify.DeviceNotifyFixLinkAriaLabel,i),url:this.compassStrings.DeviceNotify.DeviceNotifyLauncherAttentionFixLinkUrl}]}},i.prototype.makeDeviceWithErrorStatesNotification=function(t,i){var r=this,u=i.PrimaryErrorState,f=this.formatString(this.familyConfig.content.landing.DeviceErrorStateNotifications[i.PrimaryErrorStateType].summaryMessage,{deviceName:i.Name,timestamp:u.LastDetectedOn&&this.dateTimeFormatter.toLongDateTime(n.Utilities.parseServerDatetime(u.LastDetectedOn))});return{icon:"mee-icon-Warning",message:f,actions:[{biid:"notifications-device-notify-error",lightweight:!0,text:this.familyConfig.content.deviceNotify.DeviceNotifyFixLinkText,callback:function(){r.deviceNotificationService.openDeviceErrorStateDialog(i,"Family.Notifications.DeviceNotifyError",r.getInstrumentationComponentName())}}]}},i.prototype.makePendingMemeberNotifications=function(){var n=this,t=[],i=this.familyRosterModel.getAllPendingMembers();return _.forEach(i,function(i){t.push({userImageUrl:i.ProfilePicture,message:n.formatString(n.compassStrings.PendingMemberInviteSentMessage,i.PrimaryId),actions:[{biid:"notifications-pendingmemeber-verify",isPrimary:!0,text:n.compassStrings.VerifyNow,ariaText:n.formatString(n.compassStrings.VerifyNowAriaText,i.PrimaryId),callback:function(){n.$state.go("Family.Notifications.VerifyNow",{memberId:i.PrimaryId})}},{biid:"notifications-pendingmember-resend",isPrimary:!0,text:n.compassStrings.ResendInvite,ariaText:n.formatString(n.compassStrings.ResendInviteAriaText,i.PrimaryId),callback:function(){n.$state.go("Family.Notifications.ResendInvite",{memberId:i.PrimaryId})}},{biid:"notifications-pendingmember-remove",text:n.compassStrings.Remove,ariaText:n.formatString(n.compassStrings.RemoveAriaText,i.PrimaryId),callback:function(){n.$state.go("Family.Notifications.RemoveFlow",{memberId:i.PrimaryId})}}]})}),t},i.prototype.makePurchaseRequestNotification=function(n,t){var i=this,r=function(){var i={fsid:t.Id,cid:n.Cid,src:"site"};return JSON.stringify(i)},e=function(){return i.$state.href(i.buyNames.baseState,{ask:r()},{absolute:!0})},u=function(t){var r,u;switch(t.ProductDocument.Product.ProductKind){case"TvSeason":return r=[n.FirstName,t.Title,t.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeriesTitle,t.RatingLongName,t.Price],{message:i.formatString(i.compassStrings.PurchaseRequestTvSeasonFeedMessage,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestTvSeasonFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestTvSeasonFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestTvSeasonFeedMessageDeniedAria,r)};case"TvEpisode":return r=[n.FirstName,t.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeriesTitle,t.ProductDocument.Product.LocalizedProperties[0].Parents[0].SeasonPosition.toString(),t.RatingLongName,t.Price],{message:i.formatString(i.compassStrings.PurchaseRequestTvEpisodeFeedMessage,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestTvEpisodeFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestTvEpisodeFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestTvEpisodeFeedMessageDeniedAria,r)};case"MusicTrack":case"MusicAlbum":return r=[n.FirstName,t.Title,t.ProductDocument.Product.LocalizedProperties[0].ArtistDisplayName.ArtistDisplayText,t.RatingLongName,t.Price],{message:i.formatString(i.compassStrings.PurchaseRequestMusicFeedMessage,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestMusicFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestMusicFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestMusicFeedMessageDeniedAria,r)};case"Movie":return(r=[n.FirstName,t.Title,t.RatingLongName,t.Price],i.familyProductService.isRental(t))?{message:i.formatString(i.compassStrings.PurchaseRequestFeedMessageRent,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageRentAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageRentDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageRentDeniedAria,r)}:{message:i.formatString(i.compassStrings.PurchaseRequestFeedMessage,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageDeniedAria,r)};case"CSV":return r=[n.FirstName,t.Price],{message:i.formatString(i.compassStrings.PurchaseRequestCsvFeedMessage,r),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestCsvFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestCsvFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestCsvFeedMessageDeniedAria,r)};default:return r=[n.FirstName,t.Title,t.RatingLongName,t.Price],u=[n.FirstName,f(t),t.RatingLongName,t.Price],{message:i.formatString(i.compassStrings.PurchaseRequestFeedMessage,u),allowAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageAllowAria,r),denyAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageDenyAria,r),deniedAriaText:i.formatString(i.compassStrings.PurchaseRequestFeedMessageDeniedAria,r)}}},f=function(n){if(!i.familyProductService.hasProductDisplayPage(n))return n.Title;var u=encodeURIComponent(r());switch(n.ProductDocument.Product.ProductFamily){case"Games":return'<a class="c-hyperlink" id="notifications-purchase-exception-games-pdp" target="_blank" href="'+i.familyConfig.microsoftUrl+"/"+t.Language+"/store/apps/"+t.ProductId+"?ask="+u+'">'+n.Title+"<\/a>";case"Apps":return'<a class="c-hyperlink" id="notifications-purchase-exception-apps-pdp" target="_blank" href="'+i.familyConfig.microsoftUrl+"/"+t.Language+"/store/apps/"+t.ProductId+"?ask="+u+'">'+n.Title+"<\/a>";case"Books":return'<a class="c-hyperlink" id="notifications-purchase-exception-books-pdp" target="_blank" href="'+i.familyConfig.microsoftUrl+"/"+t.Language+"/store/p/"+n.Title.toLowerCase().replace(" ","-")+"/"+t.ProductId+"?ask="+u+'">'+n.Title+"<\/a>";default:return n.Title}};return this.apiService.getProductDetails(n.FamilyServiceId,t.ProductId,t.SkuId,t.Market,t.Language).then(function(t){var r=u(t);return{userImageUrl:n.ProfilePicture,message:r.message,actions:[{isPrimary:!0,biid:"notifications-purchase-exception-deny",text:i.compassStrings.DenyAction,ariaText:r.denyAriaText,callback:function(){return i.$promise.reject()}},{isPrimary:!0,biid:"notifications-purchase-exception-allow",text:i.compassStrings.AllowAction,ariaText:r.allowAriaText,callback:function(){return i.$promise.defer().promise}},{biid:"notifications-purchase-exception-review",text:"Review",callback:function(){return i.$promise.resolve({icon:"mee-icon-Completed",text:"Approved"})}}]}}).catch(function(){return null})},i.prototype.makeWebRequestNotification=function(n,t){return{userImageUrl:n.ProfilePicture,message:this.compassStrings.AskedPermissionWeb+' <a class="c-hyperlink" target="_blank" href="'+t.Website+'">'+t.Website+"<\/a>",actions:[{isPrimary:!0,biid:"notifications-web-exception-allow",text:this.compassStrings.AllowAction,ariaText:this.formatString(this.compassStrings.AllowWebsiteActionAriaTextNew,[n.FirstName,t.Website]),callback:function(){}},{biid:"notifications-web-exception-dismiss",text:this.compassStrings.DenyAction,ariaText:this.formatString(this.compassStrings.DenyWebsiteActionAriaText,[n.FirstName,t.Website]),callback:function(){}}]}},i.prototype.makeContentRestrictionRequestNotification=function(n,t){var i=this,r=function(n,t){return _.any(Object.keys(t),function(i){return i===n.Description.Title.toLowerCase()&&!!n.ContentId.toLowerCase().match(t[i])})};return{userImageUrl:n.ProfilePicture,message:this.compassStrings.AskedPermissionContent+" "+t.Content.Description.Title,actions:[{isPrimary:!0,biid:"notifications-app-exception-allow",text:this.compassStrings.AllowAction,ariaText:this.formatString(this.compassStrings.AllowAppActionAriaText,[n.FirstName,t.Content.Description.Title]),callback:function(){r(t.Content,i.familyConfig.blockedBrowsers)&&i.$meeModal.show("#family-dialog","Family.Notifications.BrowserBlocked",{stateIdOnDismiss:"Family.Notifications",modalHostOptions:{kind:"flow"},data:{content:t.Content,compass:i.compassStrings,onApproved:function(){},onCanceled:function(){}}})}},{biid:"notifications-app-exception-dismiss",text:this.compassStrings.DenyAction,ariaText:this.formatString(this.compassStrings.DenyAppActionAriaText,[n.FirstName,t.Content.Description.Title]),callback:function(){}}]}},i.prototype.makeTimeRequestNotification=function(n,i){var r=angular.copy(this.compassStrings.ScreenTimeRequests.Global),u;if(!i.isGlobal)switch(i.requestType){case t.FeedType.AppTimeRequest:angular.extend(r,this.compassStrings.ScreenTimeRequests.App);break;case t.FeedType.PlayTimeRequest:angular.extend(r,this.compassStrings.ScreenTimeRequests.Xbox);break;default:angular.extend(r,this.compassStrings.ScreenTimeRequests.PC)}return u={name:n.FirstName,appName:i.appName},{userImageUrl:n.ProfilePicture,message:this.formatString(r.AskPermissionText,u),actions:[{isPrimary:!0,biid:"notifications-playtime-exception-deny",text:this.compassStrings.DenyAction,ariaText:this.formatString(r.ActionDenyAriaText,u),callback:function(){}},{isPrimary:!0,biid:"notifications-playtime-exception-30min",text:r.ActionAllow30m,callback:function(){}},{biid:"notifications-playtime-exception-review",text:"Review",callback:function(){}}]}},i.prototype.makeCookieNotifications=function(){return _.map(this.cookieNotificationService.createNotificationsData(),function(n){return{message:n.body}})},i.prototype.makeActionResponseNotification=function(){var n=this;return this.actionResponseNotificationService.getActionResponse().then(function(t){var r,i,u,f,e,o;return t?(r=n.familyRosterModel.getChildById(t.childId)||{},i=t.duration,t.responseCode<200||t.responseCode>299?u=t.responseCode===404?n.compassStrings.ScreenTimeRequests.Global.NotificationNotFound:n.compassStrings.InlineErrorGeneral:i&&i!==n.actionResponseNotificationService.zeroTimeSpan?(u=n.compassStrings.ScreenTimeRequests.App.ActionAllowCompletedAriaText,f=n.formatTimeSpan(i),e=n.actionResponseNotificationService.getEndTime(i)):u=n.compassStrings.ScreenTimeRequests.App.ActionDenyCompletedAriaText,o=n.formatString(u,{name:r?r.FirstName:t.childFirstName,appName:t.appName,duration:f,endTime:e}),{message:o,userImageUrl:r.ProfilePicture}):null})},i.prototype.makeOfficeNotifications=function(){var n=this;return this.officeCampaignService.createNotifications({compassStrings:this.compassStrings,market:this.currentUser.market,msaNonPendingMemberCount:this.familyRosterModel.msaNonPendingmemberCount}).then(function(t){var i=[];return _.forEach(t,function(t){var r=t.data,u={icon:"mee-icon-OfficeLogo",message:r.body,actions:[]};r.shareLink&&u.actions.push({biid:"notifications-office-share",text:r.share,glyph:"share",url:r.shareLink});r.dismissText&&u.actions.push({biid:"notifications-office-dismiss",text:r.dismissText,glyph:"delete",callback:function(){n.officeCampaignService.dismissCampaign(r);n.officeNotifications=n.officeNotifications.filter(function(n){return n!==u})}});i.push(u)}),i})},i.$inject=["familyConfig","$rootScope","$state","$meeModal","$q","$window","childFeedsService","stringFormatFilter","dateTimeFormatter","timeSpanFormatFilter","deviceNotificationService","officeCampaignService","actionResponseNotificationService","cookieNotificationService","buyNames","familyProductService","apiService","currentUser"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"notificationCenter",{templateUrl:t.appFolderBasePath+"NotificationCenter/notification-center.html",bindings:{familyRosterModel:"<",compassStrings:"<"}})],i)}();t.NotificationCenterComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.$sce=n;this.$promise=t;this.$meeErrors=i;this.$meeA11y=r;this.$meeUtil=u;this.monitoredOperation=f}return i.prototype.getInstrumentationComponentName=function(){return"family.notification-center.notification"},i.prototype.$onInit=function(){var n=this.$meeUtil.nextUid();this.operationName="notification-"+n;this.errorId="notification-error-"+n},i.prototype.onActionClick=function(n,t){if(t.callback){if(n.preventDefault(),!this.inProgress){var i=t.callback();i&&this.handleActionPromise(i)}}else if(!t.url)throw new Error("URL must be specified when not using a callback");},i.prototype.handleActionPromise=function(n){var t=this;return this.inProgress=!0,this.$meeErrors.reset(this.errorId),this.failed=!1,this.monitoredOperation(this.operationName,function(){return n.then(function(n){t.actionResult=n;t.$meeA11y.announcer.announce(t.actionResult.ariaText||t.actionResult.text)}).catch(function(){return t.$meeErrors.setError(t.errorId,t.cms.InlineErrorGeneral),t.$meeA11y.announcer.announce(t.cms.InlineErrorGeneral),t.failed=!0,t.$promise.reject()}).finally(function(){t.inProgress=!1})})},i.$inject=["$sce","$q","$meeErrors","$meeA11y","$meeUtil","$meeMonitoredOperation"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("handleActionPromise")],i.prototype,"handleActionPromise",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"notification",{templateUrl:t.appFolderBasePath+"NotificationCenter/notification.html",bindings:{model:"<",cms:"<"}})],i)}();t.NotificationComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n,t,i,r){var u=this;this.ajaxService=n;this.$q=t;this.rosterService=i;this.timeSpanService=r;this.baseUrl="/family/api/";this.familyServiceName="FamilyService";this.getScreenTimeGlobal=function(n){var t={childId:n};return u.get("GetScreenTimeGlobal","screen-time-global",t)};this.updateScreenTimeWeekAllowedIntervalsGlobal=function(n,t){var i=u.transformScreenTimeAPIData(n,t);return u.post("updateScreenTimeAllowedIntervalsGlobal",i,"screen-time-global/week")};this.updateScreenTimeDayAllowedIntervalsGlobal=function(n,t){var i={childId:n,dayOfWeek:t.DayOfWeek,allowedIntervals:t.Timeline};return u.post("updateScreenTimeAllowedIntervalsGlobal",i,"screen-time-global/day-allow-int")};this.updateScreenTimeAllowanceGlobal=function(n,t){var i=u.transformDailyScreenTimeData(n,t);return u.post("UpdateScreenTimeGlobalDayAllowance",i,"screen-time-global/day-allow")}}return t.prototype.getOfficeCampaigns=function(){return this.get("GetOfficeSubscriptionDetail","office-subscription-detail")},t.prototype.getAllDevices=function(n,t){var i={childIds:n,jsonWebTokens:t};return this.post("getAllDevices",i,"all-devices").then(function(n){return _.mapObject(n,function(n){return n||[]})})},t.prototype.getChildLauncherLocation=function(n){return this.get("getChildLauncherLoc","child-launcher-loc",{childCid:n})},t.prototype.getDeviceNotifications=function(n){return this.get("getDeviceNotifications","device-notifications",{childId:n})},t.prototype.getContentRestrictions=function(n){var t={childId:n};return this.get("GetContentRestrictions","settings/apps-games",t)},t.prototype.updateContentRestrictionsSettings=function(n,t){var i={childId:n,contentRatingAge:t};return this.put("UpdateContentRestrictionsSettings",i,"settings/update-content-settings")},t.prototype.addContentRestrictionExclusion=function(n,t,i,r,u,f){var e={childId:n,contentId:t,title:i,rating:r,familyName:u,isAllowed:f};return this.post("AddContentRestrictionExclusion",e,"settings/apps-games")},t.prototype.setContentRestrictionsToggle=function(n,t){var i={childId:n,isContentEnabled:t};return this.put("UpdateContentRestrictionsToggle",i,"settings/apps-games-toggle")},t.prototype.getRegionalRatingBoards=function(){return this.get("GetRegionalRatingsBoard","settings/apps-ratings")},t.prototype.removeAppsGamesExclusion=function(n,t){var i={childId:n,appId:t};return this.del("RemoveContentRestrictionsExclusion",i,"settings/remove-apps-games")},t.prototype.getWebsiteFilterSettings=function(n){var t={childId:n};return this.get("GetWebsiteFilterSettings","settings/web-browsing",t)},t.prototype.setWebsiteFilterToggle=function(n,t,i){if(t)return this.enableBlockingAppLimitsWebFilter(n,i);var r={childId:n,isEnabled:t};return this.post("SetWebsiteFilterToggle",r,"settings/web-browsing-toggle")},t.prototype.setWebsiteFilterUseAllowedListOnly=function(n,t){var i={childId:n,useAllowedListOnly:t};return this.post("SetWebsiteFilterOption",i,"settings/web-browsing-option")},t.prototype.addWebsiteToAllowedList=function(n,t){var i={childId:n,website:t};return this.post("AddWebsiteToAllowedList",i,"settings/allow-website")},t.prototype.addWebsiteToBlockedList=function(n,t){var i={childId:n,website:t};return this.post("AddWebsiteToBlockedList",i,"settings/block-website")},t.prototype.removeWebsite=function(n,t){var i={childId:n,website:t};return this.del("RemoveWebsite",i,"settings/remove-website")},t.prototype.isScreenTimeEnabled=function(n){var t={childId:n};return this.get("IsScreenTimeEnabled","is-screen-time-enabled",t)},t.prototype.getScreenTime=function(n){var t={childId:n};return this.get("GetScreenTime","screen-time",t)},t.prototype.getTimeAllowancePolicy=function(n){var t={childId:n};return this.get("GetTimeAllowancePolicy","screen-time/time-allowance-policy",t)},t.prototype.updateScreenTimeEnabledSetting=function(n,t){var i={childId:n,isScreenTimeEnabled:t};return this.post("UpdateScreenTimeEnabledSetting",i,"screen-time-isenabled")},t.prototype.updateTimeAllowancePolicySetting=function(n,t){var i={childId:n,allowancePolicy:t};return this.post("UpdateTimeAllowancePolicySetting",i,"screen-time/time-allowance-policy")},t.prototype.updateScreenTimeDaySetting=function(n,t,i,r,u){var f={childId:n,dayOfWeek:t,startTimeIndex:i,endTimeIndex:r,allowanceIndex:u};return this.post("UpdateScreenTimeDaySetting",f,"screen-time-day")},t.prototype.getScreenTimeV2=function(n){var t={childId:n};return this.get("GetScreenTimeV2","st",t)},t.prototype.updateScreenTimeWeekAllowedIntervalsV2=function(n,t){var i=this.transformScreenTimeAPIData(n,t);return this.post("UpdateScreenTimeAllowedIntervalsV2",i,"st/week")},t.prototype.updateScreenTimeDayAllowedIntervalsV2=function(n,t){var i={childId:n,dayOfWeek:t.DayOfWeek,allowedIntervals:t.Timeline};return this.post("UpdateScreenTimeAllowedIntervalsV2",i,"st/day-allow-int")},t.prototype.updateScreenTimeAllowanceV2=function(n,t){var i=this.transformDailyScreenTimeData(n,t);return this.post("UpdateScreenTimeV2DayAllowance",i,"st/day-allow")},t.prototype.updateScreenTimeEnabledV2=function(n,t){var i={childId:n,isScreenTimeEnabled:t};return this.post("UpdateScreenTimeV2Enabled",i,"st/isenabled")},t.prototype.getAllAppLimits=function(n,t){var i={childId:n};return this.get("GetAllAppLimits","app-limits/get-all-app-limits",i,this.jwtHeader(t))},t.prototype.getAppLimitsBlockedApps=function(n,t){var i={childId:n};return this.get("GetAppLimitsBlockedApps","app-limits/get-blocked-apps",i,this.jwtHeader(t))},t.prototype.getUserDeviceSupportMatrix=function(n,t,i){var r={childId:n,deviceState:t};return this.get("GetAppLimitsBlockedApps","app-limits/get-user-device-support-matrix",r,this.jwtHeader(i))},t.prototype.toggleAppLimits=function(n,t,i){var r={childId:n,enable:i};return this.post("ToggleAppLimits",r,"app-limits/toggle-app-limits",this.jwtHeader(t))},t.prototype.setAppPolicy=function(n,t,i,r){var u={childId:n,appId:i,appLimitPolicy:r};return this.post("SetAppPolicy",u,"app-limits/set-app-policy",this.jwtHeader(t))},t.prototype.addAppLimitsWebsitesToCRBlockedList=function(n,t){var i={childId:n,websites:t};return this.post("AddWebsitesToCRBlockedList",i,"app-limits/add-websites-to-cr-blocked-list")},t.prototype.removeWebsitesFromCRBlockedList=function(n,t){var i={childId:n,websites:t};return this.del("RemoveWebsitesFromCRBlockedList",i,"app-limits/remove-websites-from-cr-blocked-list")},t.prototype.enableBlockingAppLimitsWebFilter=function(n,t){var i={childId:n};return this.post("EnableWebBlocking",i,"app-limits/enable-web-blocking",this.jwtHeader(t))},t.prototype.getRewardApps=function(n,t){var i={userPuid:n};return this.get("GetRewardApps","app-rewards/reward-apps",i,this.jwtHeader(t))},t.prototype.setRewardApps=function(n,t,i,r,u){var f={userPuid:n,adminPuid:t,rewardEarningApps:i,rewardUsingApps:r};return this.put("PutRewardApps",f,"app-rewards/reward-apps",this.jwtHeader(u))},t.prototype.getScreenTimeXbox=function(n){var t={childId:n};return this.get("GetScreenTimeXbox","screen-time-xbox",t)},t.prototype.updateScreenTimeWeekAllowedIntervalsXbox=function(n,t){var i=this.transformScreenTimeAPIData(n,t);return this.post("UpdateScreenTimeAllowedIntervalsXbox",i,"screen-time-xbox/week")},t.prototype.updateScreenTimeDayAllowedIntervalsXbox=function(n,t){var i={childId:n,dayOfWeek:t.DayOfWeek,allowedIntervals:t.Timeline};return this.post("UpdateScreenTimeAllowedIntervalsXbox",i,"screen-time-xbox/day-allow-int")},t.prototype.updateScreenTimeAllowanceXbox=function(n,t){var i=this.transformDailyScreenTimeData(n,t);return this.post("UpdateScreenTimeXboxDayAllowance",i,"screen-time-xbox/day-allow")},t.prototype.updateScreenTimeEnabledXbox=function(n,t){var i={childId:n,isScreenTimeEnabled:t};return this.post("UpdateScreenTimeXboxEnabled",i,"screen-time-xbox/enabled")},t.prototype.transformDailyScreenTimeData=function(n,t){var i=this.timeSpanService.parseTimeSpan(t.Allowance);return{childId:n,dayOfWeek:t.DayOfWeek,timeSpanDays:i.Days,timeSpanHours:i.Hours,timeSpanMinutes:i.Minutes}},t.prototype.transformScreenTimeAPIData=function(n,t){return{childId:n,weekData:[t.DaysArray[0].Timeline,t.DaysArray[1].Timeline,t.DaysArray[2].Timeline,t.DaysArray[3].Timeline,t.DaysArray[4].Timeline,t.DaysArray[5].Timeline,t.DaysArray[6].Timeline]}},t.prototype.getPaymentOptions=function(n){var t={childPuid:n};return this.get("GetPaymentOptions","ps/getpo",t)},t.prototype.getChildCsv=function(n){var t={childsPuidList:n};return this.get("GetChildCsv","ps/getChildCsv",t)},t.prototype.getPaymentRestrictions=function(n){var t={childId:n};return this.get("GetPaymentRestrictions","ps/get-payment-settings",t)},t.prototype.setAcquisitionPolicy=function(n,t){var i={childId:n,policy:t};return this.post("SetAcquisitionPolicy",i,"ps/set-acquisition-policy")},t.prototype.setPurchaseNotificationsEnabled=function(n,t){var i={childId:n,enabled:t};return this.post("SetPurchaseNotificationsEnabled",i,"ps/set-notifications-enabled")},t.prototype.getLandingPageFeeds=function(n){var t={memberIdList:n};return this.get("GetLandingPageFeeds","landing-page-feeds",t)},t.prototype.getRatingsNames=function(n){var t={ratingsList:n};return this.get("GetRatingsNames","ratings-names",t)},t.prototype.setContentOrWebRequestApproved=function(n,t,i){var r={childId:n,contentId:t,isWebRequest:i};return this.post("SetContentOrWebRequestApproved",r,"content-web-requests")},t.prototype.removeContentOrWebRequest=function(n,t,i){var r={childId:n,contentId:t,isWebRequest:i};return this.del("RemoveContentOrWebRequest",r,"content-web-requests")},t.prototype.approveTimeRequest=function(t,i,r){return i===n.FeedType.AppTimeRequest?this.post("ApproveAppTimeRequest",t,"app-limits/approve-time-request",this.jwtHeader(r)):i===n.FeedType.PlayTimeRequest?this.post("ApprovePlayTimeRequest",t,"playtime-request"):this.post("SetScreenTimeRequestApproved",t,"screen-time-request")},t.prototype.denyTimeRequest=function(t,i,r){return i===n.FeedType.AppTimeRequest?this.post("RejectAppTimeRequest",t,"app-limits/reject-time-request",this.jwtHeader(r)):i===n.FeedType.PlayTimeRequest?this.del("DenyPlayTimeRequest",t,"playtime-request"):this.del("RemoveScreenTimeRequest",t,"screen-time-request")},t.prototype.moveWebBrowsingSettings=function(n,t){var i={brokenChildId:n,childId:t};return this.put("MoveWebBrowsingSettings",i,"child-update/move-web-browsing-settings")},t.prototype.getActivityReportSettings=function(n){var t={childId:n};return this.get("GetActivityReportsSettings","recent-activity/settings",t)},t.prototype.getActivityReport=function(n,t){var i={childId:n,isPreviousWeek:t};return this.get("GetActivityReport","recent-activity/user-report",i)},t.prototype.setActivityReportSettings=function(n,t,i){var r={childId:n,areActivityReportsEnabled:t,areEmailReportsEnabled:i};return this.post("SetActivityReportsSettings",r,"recent-activity/settings")},t.prototype.getFindYourChildIsEnabledSettings=function(n){var t={childId:n};return this.get("GetFindYourChildIsEnabledSettings","settings/find/child/enabled",t)},t.prototype.updateFindYourChildIsEnabledSettings=function(n,t){var i={childId:n,isEnabled:t};return this.put("UpdateFindYourChildIsEnabledSettings",i,"settings/find/child/enabled")},t.prototype.getFindYourFamilyConsentSettings=function(n){var t={puids:n.join()};return this.get("GetFindYourFamilyConsentSettings","find-family-consent",t)},t.prototype.updateFindYourFamilyConsentSettings=function(n,t){var i={userId:n,enabled:t};return this.put("UpdateFindYourFamilyConsentSettings",i,"find-family-consent")},t.prototype.sendLocationSharingRequest=function(n){var t={userId:n};return this.post("SendLocationSharingRequest",t,"find-family-request")},t.prototype.getPurchaseRequests=function(n){return this.get("getPurchaseRequests","buy/requests",{onBehalfOfPuid:n})},t.prototype.denyPurchaseRequest=function(n,t,i){var r={onBehalfOfPuid:n,productId:t,skuId:i};return this.del("denyPurchaseRequest",r,"buy/requests/deny")},t.prototype.approvePurchaseRequest=function(n,t,i,r){var u={onBehalfOfPuid:n,orderId:t,productId:i,skuId:r};return this.post("approvePurchaseRequest",u,"buy/requests/approve")},t.prototype.completePurchaseRequest=function(n,t,i,r){var u={onBehalfOfPuid:n,productId:t,skuId:i,productFamily:r};return this.post("completePurchaseRequest",u,"buy/requests/complete")},t.prototype.getProductDetails=function(n,t,i,r,u){var f=t+"/"+i,e={bigId:f,puid:n,productMarket:r,productLang:u};return this.get("getProductDetails","product",e)},t.prototype.getManagePermissionsDevicesSettingOneUi=function(){return this.get("GetManagePermissionsDevicesSettingsOneUiRouteId","settings/get-manage-permissions-devices-oneui")},t.prototype.setDeviceHealthPermissionsToggle=function(n){var t={isEnabled:n};return this.post("SetDeviceHealthToggleOneUi",t,"settings/set-manage-permissions-devices-consent-oneui")},t.prototype.getManagePermissionsPXSUserSettingsOneUi=function(){return this.get("GetManagePermissionsActivityOneUiRouteId","settings/get-manage-permissions-pxs-user-settings-oneui")},t.prototype.setManagePermissionsPXSUserSettingsOneUi=function(n){var t={updatedSettings:n};return this.post("SetManagePermissionsActivityOneUi",t,"settings/set-manage-permissions-pxs-user-settings-oneui")},t.prototype.getPrivacyOBOBit=function(n){var t=this;return this.operationWithRetryOnForbidden(n,function(n){var i={familyToken:n};return t.get("GetPrivacyOBOBit","settings/get-privacy-obo-bit",i)})},t.prototype.operationWithRetryOnForbidden=function(n,t){var i=this;return t(n.JsonWebToken).catch(function(r){return r.jqXHR&&r.jqXHR.status===403?i.rosterService.getFamily().then(function(i){var r=i.getChildById(n.childId).JsonWebToken;return t(r)}):i.$q.reject(r)})},t.prototype.getFeaturePromotionSummary=function(){return this.get("GetFamilyPromotionSummary","family-promotion/family-promotion-summary")},t.prototype.acceptMember=function(n){return this.post("AcceptMember",n,"accept-member")},t.prototype.jwtHeader=function(n){if(n)return{"X-JwtFamilyRelationshipToken":n}},t.prototype.get=function(n,t,i,r){var u=this.baseUrl+t;return this.ajaxService.get(this.makeAjaxConfig(n,i,u,r)).then(function(n){return n.data})},t.prototype.post=function(n,t,i,r,u){var e=this.baseUrl+i,f=this.makeAjaxConfig(n,t,e,r);return f.overrideRequestQosData=u,this.ajaxService.post(f).then(function(n){return n.data})},t.prototype.put=function(n,t,i,r){var u=this.baseUrl+i;return this.ajaxService.put(this.makeAjaxConfig(n,t,u,r)).then(function(n){return n.data})},t.prototype.del=function(n,t,i,r){var u=this.baseUrl+i;return this.ajaxService.del(this.makeAjaxConfig(n,t,u,r)).then(function(n){return n.data})},t.prototype.makeAjaxConfig=function(n,t,i,r){var u={serviceName:this.familyServiceName,operationName:n,url:i,data:t,cache:!1,dataType:"auto"};return r&&(u.additionalHeaders=r),u},t.$inject=["portalAjaxServiceAngular","$q","rosterService","timeSpanService"],t}();angular.module(n.moduleName).service("apiService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.telemetry=n;this.area=t;this.name=i;this.initialState=r;this.biState={CurrentState:this.initialState,PreviousState:this.initialState,PreviousEndStepResult:null,HasMultiStepScenarioEnded:!1,IsStateSuccess:!1}}return n.prototype.setBiStateSuccess=function(n){this.biState.IsStateSuccess=n},n.prototype.beginMultiStepScenario=function(){this.telemetry.portalScenarios.beginMultiStepScenario(this.area,this.name,this.biState.CurrentState)},n.prototype.endMultiStepScenario=function(){if(!this.biState.HasMultiStepScenarioEnded&&this.biState.CurrentState!==this.initialState){var n={area:this.area,name:this.name,isSuccess:this.biState.IsStateSuccess,step:this.biState.CurrentState};this.telemetry.portalScenarios.endMultiStepScenario(n)}},n.prototype.switchToStep=function(n){this.biState.CurrentState=n;this.biState.PreviousEndStepResult!=undefined&&this.telemetry.portalScenarios.endStep(this.biState.PreviousEndStepResult);this.biState.PreviousEndStepResult={area:this.area,name:this.name,isSuccess:this.biState.IsStateSuccess,step:this.biState.PreviousState,next:this.biState.CurrentState};this.biState.PreviousState=this.biState.CurrentState},n}(),i=function(){function n(n){this.telemetry=n}return n.prototype.createBiHelper=function(n,i,r){return new t(this.telemetry,n,i,r)},n.$inject=["telemetryService"],n}();angular.module(n.moduleName).service("biHelperFactory",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.apiService=n}return n.prototype.getLandingPageFeeds=function(n){var t=this,i=this.getMSAKidIdList(n);return this.apiService.getLandingPageFeeds(i).then(function(i){return t.onGetLandingPageFeedsSuccess(i,n)})},n.prototype.onGetLandingPageFeedsSuccess=function(n,t){var i={};return _.each(t,function(n){i[n.FamilyServiceId]={purchaseRequests:[],webRequests:[],contentRestrictionsRequests:[],screenTimeRequests:[],playTimeRequests:[],storedAmountDetails:[],syncFailedDevices:[],launcherNeedsAttentionDevices:[],devicesWithErrorStates:[],appTimeRequests:[]}}),n.ExceptionRequests&&_.each(n.ExceptionRequests.FamilyRequests,function(n){var t=i[n.UserId];t.webRequests=n.WebRestrictions?n.WebRestrictions.WebsiteRequests:[];t.contentRestrictionsRequests=n.ContentRestrictions?n.ContentRestrictions.ContentRestrictionsRequests:[];t.screenTimeRequests=n.ScreenTimeRestrictions?n.ScreenTimeRestrictions.ScreenTimeRequests:[]}),n.ExceptionRequestsV0&&_.each(n.ExceptionRequestsV0,function(n){var t=i[n.Id];t.purchaseRequests=n.PurchaseRestrictions?n.PurchaseRestrictions.Requests:[];t.playTimeRequests=n.PlayTimeRestrictions?n.PlayTimeRestrictions.Requests:[];n.TimeRestrictions&&n.TimeRestrictions.Requests&&(t.screenTimeRequests=n.TimeRestrictions.Requests)}),_.each(n.AccountDetails,function(n){var t=i[n.Id];t.storedAmountDetails=n.AccountBalance}),n.SyncFailedDevices&&_.each(n.SyncFailedDevices,function(n){var t=i[n.UserId];t.syncFailedDevices=n.Devices}),n.LauncherNeedsAttentionDevices&&_.each(n.LauncherNeedsAttentionDevices,function(n){var t=i[n.UserId];t.launcherNeedsAttentionDevices=n.Devices}),n.DevicesWithErrorStates&&_.each(n.DevicesWithErrorStates,function(n){var t=i[n.UserId];t.devicesWithErrorStates=n.DevicesWithStates}),n.AppTimeRequests&&_.each(n.AppTimeRequests,function(n){var t=i[n.UserId];t.appTimeRequests=n.Requests}),i},n.prototype.getMSAKidIdList=function(n){for(var i=[],r=!1,t=0;t<n.length;t++)n[t].IsPending||(n[t].IsLocal?r=!0:i.push(n[t].Puid));return r&&i.length===0&&i.push("LocalOnly"),i.join(",")},n.$inject=["apiService"],n}();n.ChildFeedsService=t;angular.module(n.moduleName).service("childFeedsService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(n,t){this.$q=n;this.rosterService=t}return t.prototype.userIsAloneOrChild=function(){var n=this;return this.rosterService.getFamily().then(function(t){return n.userIsAloneOrChildFromModel(t)})},t.prototype.userIsAloneOrChildFromModel=function(t){var i=n.Utilities.isInFlight("FamLocalActsBanner")&&t.getAllChildren().length===0&&t.getAllAdults().length===1&&t.hasLocalAccounts;return!0&&!t.currentMember||t.getAllChildren().length===0&&t.getAllAdults().length<=1&&!i},t.$inject=["$q","rosterService"],t}();angular.module(t.moduleName).service("coldStartService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.ajaxService=n;this.baseUrl="/family/api/content/";this.contentServiceName="Compass"}return n.prototype.getLandingPageContent=function(){return this.get("GetContentLandingPage","landing")},n.prototype.getAddMemberContent=function(){return this.get("GetContentAddMember","addmember")},n.prototype.getAddMoneyContent=function(){return this.get("GetContentAddMoney","addmoney")},n.prototype.getRemoveMemberContent=function(){return this.get("GetContentRemoveMember","removemember")},n.prototype.getActivityReportsContent=function(){return this.get("GetContentActivityReports","activityreports")},n.prototype.getActivityReportsOneUiContent=function(){return this.get("GetContentActivityReportsOneUi","recentactivity")},n.prototype.getWebsiteFilterContent=function(){return this.get("GetContentWebsiteFilter","websitefilter")},n.prototype.getScreenTimeContent=function(){return this.get("GetContentScreenTime","screentime")},n.prototype.getScreenTimeOneUiContent=function(){return this.get("GetContentScreenTimeOneUi","screentimeOneUi")},n.prototype.getContentRestrictionsOneUiContent=function(){return this.get("GetContentContentRestrictionsOneUi","contentRestrictionsOneUi")},n.prototype.getManagePermissionsOneUiContent=function(){return this.get("GetManagePermissionsOneUi","managePermissionsOneUi")},n.prototype.getAppsGamesContent=function(){return this.get("GetContentAppsGames","appsgames")},n.prototype.getPurchaseSpendingContent=function(){return this.get("GetContentPurchaseSpending","purchasespending")},n.prototype.getSpendingContent=function(){return this.get("GetContentSpending","spending")},n.prototype.getFindYourChildContent=function(){return this.get("GetContentFindYourChild","findyourchild")},n.prototype.getFindYourChildOneUiContent=function(){return this.get("GetContentFindYourChildOneUi","findyourchildoneui")},n.prototype.getChildUpdateContent=function(){return this.get("GetContentChildUpdate","childupdate")},n.prototype.getFindYourFamilyContent=function(){return this.get("GetContentFindYourFamily","findyourfamily")},n.prototype.getAskAParentContent=function(){return this.get("GetAskAParentContent","askaparent")},n.prototype.getAppLimitsContent=function(){return this.get("GetAppLimitsContent","applimits")},n.prototype.getCasaModalContent=function(){return this.get("getCasaModalContent","getcasamodal")},n.prototype.get=function(n,t,i){var r=this.baseUrl+t;return this.ajaxService.get({serviceName:this.contentServiceName,operationName:n,data:i,url:r,cache:!1}).then(function(n){return n.data})},n.$inject=["portalAjaxServiceAngular"],n}();n.ContentService=t;angular.module(n.moduleName).service("contentService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n,i,r,u,f,e){var o=this;this.commonConfig=n;this.$cookies=i;this.$location=r;this.appConfig=u;this.telemetry=f;this.formatString=e;this.parsers={};this.parsers[t.COOKIE_CONTENT_APPROVE]=function(n){return o.parseContentRequest(n)};this.parsers[t.COOKIE_CONTENT_DENIED]=function(n){return o.parseContentRequest(n)};this.parsers[t.COOKIE_PLAYTIME_APPROVE]=function(n){return o.parseApproveTimeRequest(n)};this.parsers[t.COOKIE_PLAYTIME_DENIED]=function(n){return o.parseDenyTimeRequest(n)};this.parsers[t.COOKIE_SCREENTIME_APPROVE]=function(n){return o.parseApproveTimeRequest(n)};this.parsers[t.COOKIE_SCREENTIME_DENIED]=function(n){return o.parseDenyTimeRequest(n)};this.rebuildTemplates(undefined)}return t.prototype.rebuildTemplates=function(n){var i=n||this.appConfig.content.landing;this.cookieTemplates={};this.cookieTemplates["GameRequests|"+t.COOKIE_CONTENT_APPROVE]=i.Strings.FERSingleGame;this.cookieTemplates["GameRequests|"+t.COOKIE_CONTENT_DENIED]=i.Strings.FERSingleGameDismiss;this.cookieTemplates["ApplicationRequests|"+t.COOKIE_CONTENT_APPROVE]=i.Strings.FERSingleApp;this.cookieTemplates["ApplicationRequests|"+t.COOKIE_CONTENT_DENIED]=i.Strings.FERSingleAppDismiss;this.cookieTemplates["WebsiteRequests|"+t.COOKIE_CONTENT_APPROVE]=i.Strings.FERSingleWebsite;this.cookieTemplates["WebsiteRequests|"+t.COOKIE_CONTENT_DENIED]=i.Strings.FERSingleWebsiteDismiss;this.cookieTemplates[t.COOKIE_PLAYTIME_APPROVE]=i.Strings.ScreenTimeRequests.Global.NotificationApproved;this.cookieTemplates[t.COOKIE_PLAYTIME_DENIED]=i.Strings.ScreenTimeRequests.Global.NotificationDenied;this.cookieTemplates[t.COOKIE_SCREENTIME_APPROVE]=i.Strings.ScreenTimeRequests.Global.NotificationApproved;this.cookieTemplates[t.COOKIE_SCREENTIME_DENIED]=i.Strings.ScreenTimeRequests.Global.NotificationDenied;this.cookieTemplates["00:15:00"]=i.Strings.ScreenTimeRequests.Global.ActionAllow15m;this.cookieTemplates["00:30:00"]=i.Strings.ScreenTimeRequests.Global.ActionAllow30m;this.cookieTemplates["01:00:00"]=i.Strings.ScreenTimeRequests.Global.ActionAllow1h;this.cookieTemplates["02:00:00"]=i.Strings.ScreenTimeRequests.Global.ActionAllow2h;this.cookieTemplates["08:00:00"]=i.Strings.ScreenTimeRequests.Global.ActionAllow8h},t.prototype.getTemplate=function(n){return this.cookieTemplates[n]},t.prototype.createNotificationsData=function(){var u=this,n="mee-icon mee-border mee-icon-Accept",i="mee-icon mee-icon-Blocked",f=[{cookieName:t.COOKIE_CONTENT_APPROVE,ref:"approve-email-request",icons:n},{cookieName:t.COOKIE_CONTENT_DENIED,ref:"remove-email-request",icons:i},{cookieName:t.COOKIE_PLAYTIME_APPROVE,ref:"approve-playtime-request",icons:n},{cookieName:t.COOKIE_PLAYTIME_DENIED,ref:"remove-playtime-request",icons:i},{cookieName:t.COOKIE_SCREENTIME_APPROVE,ref:"approve-screentime-request",icons:n},{cookieName:t.COOKIE_SCREENTIME_DENIED,ref:"remove-screentime-request",icons:i}],r=[];return _.forEach(f,function(n){var t=u.createNotificationData(n);t&&r.push(t)}),r},t.prototype.createNotifications=function(){return _.map(this.createNotificationsData(),function(t){return{type:n.NotificationType.Basic,data:t}})},t.prototype.createNotificationData=function(n){var t=null,i=this.$cookies.get(n.cookieName),u=this.$location.search().ref||"",r;return i&&u.indexOf(n.ref)!==-1&&(r=this.parsers[n.cookieName],t=r({cookieName:n.cookieName,request:i,icons:n.icons}),this.$location.search("ref",null),this.$cookies.remove(n.cookieName,{expires:new Date})),t},t.prototype.createNotification=function(t){return{type:n.NotificationType.Basic,data:this.createNotificationData(t)}},t.prototype.parseContentRequest=function(t){var i=t.request.split("|"),u=i[0],f=i[1],r=i[2],o=this.formatString("{0}|{1}",[f,t.cookieName]),e=this.getTemplate(o);return!u||!f||!r||!e?(this.telemetry.portalQos.reportClientError({message:t.cookieName+" value is malformed.  Verify corresponding controller."}),null):new n.BasicNotificationData({title:r,iconClasses:t.icons,dismissAriaLabel:this.appConfig.content.landing.DismissNotificationAriaText,body:e.replace("{name}",u).replace("{content}",r)})},t.prototype.parseDenyTimeRequest=function(t){var i=t.request.split("|")[0],r=this.getTemplate(t.cookieName);return!i||!r?(this.telemetry.portalQos.reportClientError({message:t.cookieName+" value is malformed.  Verify corresponding controller."}),null):new n.BasicNotificationData({title:i,iconClasses:t.icons,dismissAriaLabel:this.appConfig.content.landing.DismissNotificationAriaText,body:this.formatString(r,{name:i})})},t.prototype.parseApproveTimeRequest=function(t){var u=t.request.split("|"),f=u[0],i=u[1],e=this.getTemplate(t.cookieName),o=this.getUnlockTime(i),s=this.getTemplate(i),r;return!f||!i||!o||!e?(this.telemetry.portalQos.reportClientError({message:t.cookieName+" value is malformed.  Verify corresponding controller."}),null):(r=o.toLocaleTimeString(this.commonConfig.userCulture,{hour:"2-digit",minute:"2-digit"}),new n.BasicNotificationData({title:r,iconClasses:t.icons,dismissAriaLabel:this.appConfig.content.landing.DismissNotificationAriaText,body:this.formatString(e,{name:f,endtime:r,duration:s})}))},t.prototype.getUnlockTime=function(n){if(!n||n.indexOf(":")===-1)return null;var t=new Date,i=n.split(":"),r=i[0],f=i[1],e=i[2],u=parseInt(r)||parseInt(f);return parseInt(r)!==0?t.setHours(t.getHours()+u):t.setMinutes(t.getMinutes()+u),t},t.COOKIE_CONTENT_APPROVE="SetRequestApprovedDirect",t.COOKIE_PLAYTIME_APPROVE="PlayTimeApprove",t.COOKIE_SCREENTIME_APPROVE="ScreenTimeApprove",t.COOKIE_CONTENT_DENIED="RemoveRequestDirect",t.COOKIE_PLAYTIME_DENIED="PlayTimeDenied",t.COOKIE_SCREENTIME_DENIED="ScreenTimeDenied",t.$inject=["commonConfig","$cookies","$location","familyConfig","telemetryService","stringFormatFilter"],t}();angular.module(n.moduleName).service("cookieNotificationService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i="{deviceName}",r=function(){function r(n,t,i,r,u){this.familyConfig=n;this.$meeModal=t;this.stringFormatFilter=i;this.telemetry=r;this.dateTimeFormatter=u}return r.prototype.openDeviceNotifyModal=function(n,t){var i={modalHostOptions:{ariaDialogLabel:this.familyConfig.content.deviceNotify.DeviceNotifyStepsHeader,ariaCloseButtonLabel:this.familyConfig.content.deviceNotify.DeviceNotifyStepsCloseButton,kind:"flow close-button"},data:{devices:n}};this.$meeModal.show("#family-dialog",t,i)},r.prototype.openDeviceErrorStateDialog=function(i,r,u){var f=i.PrimaryErrorState,o=this.getDeviceErrorStateNotificationConfig(i,this.familyConfig.content.landing.DeviceErrorStateNotifications),e,s;o?(e=this.formatStringsInDialogCmsTemplate(o,{deviceName:i.Name,timestamp:f.LastDetectedOn&&this.dateTimeFormatter.toLongDateTime(n.Utilities.parseServerDatetime(f.LastDetectedOn))}),s={modalHostOptions:{ariaDialogLabel:e.dialogHeader,ariaCloseButtonLabel:e.closeButtonLabel,kind:"flow close-button"},data:{cms:e,device:i}},this.$meeModal.show(t.familyHostModalId,r,s)):this.telemetry.portalQos.reportClientError({category:u,data:{device:i,stateInError:f},message:"Cannot find message for state "+f.Type+" and device type "+i.Class})},r.prototype.formatStringsInDialogCmsTemplate=function(n,t){var i=this;return _.mapObject(n,function(n){return typeof n=="string"?i.stringFormatFilter(n,t):_.map(n,function(n){return i.stringFormatFilter(n,t)})})},r.prototype.getDeviceErrorStateNotificationConfig=function(n,t){var r=t[n.PrimaryErrorStateType];return r&&(r.closeButtonLabel||(r.closeButtonLabel=this.familyConfig.content.deviceNotify.DeviceNotifyStepsCloseButton),r.dialogDeviceCaption||(r.dialogDeviceCaption=i)),r},r.$inject=["familyConfig","$meeModal","stringFormatFilter","telemetryService","dateTimeFormatter"],r}();angular.module(t.moduleName).service("deviceNotificationService",r)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function t(n,t){this.$q=n;this.$meeModal=t}return t.prototype.yesNo=function(t){var i=this.$q.defer(),r={modalHostOptions:{ariaDialogLabel:t.title,ariaCloseButtonLabel:t.noLabel,kind:"flow close-button"},onDismissed:function(){return i.resolve("dismiss"),null},data:{options:t,callback:function(n){i.resolve(n)}}};return this.$meeModal.showSimple(n.familyHostModalId,"dialog-yes-no",r).then(function(){return i.promise})},t.$inject=["$q","$meeModal"],t}();angular.module(n.moduleName).service("dialogService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u){this.$q=n;this.$state=t;this.formatString=i;this.apiService=r;this.currentUser=u}return n.prototype.shouldShowLandingBanner=function(n){return!n.isUserAChild&&n.members.length>1},n.prototype.shouldShowSettingsBanner=function(n){return this.shouldShowLandingBanner(n)&&!!this.$state.params.childId},n.prototype.getTaskState=function(n,t){var u=this,i,r;t&&!t.IsLocal&&(i={childName:t.DisplayName,firstName:t.FirstName,cid:t.childId});switch(n.key){case"funding":r=this.getFundingTaskStateAndData(t,i);break;case"screentime":r=this.getScreenTimeTaskStateAndData(t,i);break;case"aap":r=this.getAskAParentTaskStateAndData(t,i);break;default:r=this.$q.resolve({state:"default",data:i})}return this.$q.when(r).then(function(t){var i=t.state&&(n.states[t.state]||n.states.default);return i&&t.data&&(i=u.formatTaskState(i,t.data)),i||undefined})},n.prototype.getFundingTaskStateAndData=function(n,t){if(!n||!t)return this.$q.resolve({state:""});var i="default",r=this.currentUser.market;return t.market=r,this.apiService.getChildCsv(n.Puid).then(function(n){var f,u,e;return n[0]&&(f=n[0].AccountBalance,u=f[0],f.length>1&&(e=f.filter(function(n){return n.Market==r}),e.length&&(u=e[0])),u.Amount=="NA"?i="not-funded":(t.amount=u.Amount,t.market=u.Market,i="funded")),{state:i,data:t}}).catch(function(){return{state:i,data:t}})},n.prototype.getScreenTimeTaskStateAndData=function(n,t){if(!n||!t)return this.$q.resolve({state:""});var i="default";return this.apiService.isScreenTimeEnabled(n.Puid).then(function(n){return i=n===!0?"enabled":"disabled",{state:i,data:t}}).catch(function(){return{state:i,data:t}})},n.prototype.getAskAParentTaskStateAndData=function(n,t){if(!n||!t)return this.$q.resolve({state:""});var i="default";return this.apiService.getPaymentRestrictions(n.FamilyServiceId).then(function(n){return i=n.AcquisitionPolicy===1?"enabled":"disabled",{state:i,data:t}}).catch(function(){return{state:i,data:t}})},n.prototype.formatTaskState=function(n,t){var r=this,i=function(n){return _.mapObject(n,function(n){return typeof n=="string"?r.formatString(n,t):n?i(n):n})};return i(n)},n.$inject=["$q","$state","stringFormatFilter","apiService","currentUser"],n}();angular.module(n.moduleName).service("familyBannerService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o){this.stringFormat=n;this.familyConfig=t;this.surveyService=i;this.$state=r;this.$timeout=u;this.$rootScope=f;this.currentUser=e;this.initialFamilyRosterModel=o;this.pageChangeTracker=0;this.defaultDelayInMilliseconds=5e3;this.enabledSurveyPages={}}return i.prototype.register=function(){var n=this,i,r,u;this.registerIfFlightAndTextAvailable("FamT1SurveyAngContentRestrictions","fam-rt1-angular-content-restrictions",t.settingsPagesBaseStateName+".ContentRestrictions","landing-store");this.registerIfFlightAndTextAvailable("FamT1SurveyAngScreenTime","fam-rt1-angular-screen-time",t.settingsPagesBaseStateName+".ScreenTime","landing-screen-time");this.registerIfFlightAndTextAvailable("FamT1SurveyAngAppLimits","fam-rt1-angular-app-limits",t.settingsPagesBaseStateName+".AppLimits","landing-app-limits");this.initialFamilyRosterModel.IsUserAChild?this.registerIfFlightAndTextAvailable("FamSurveyAngMemberViewActivity","fam-angular-member-views-activity",t.settingsPagesBaseStateName+".RecentActivity","landing-recent-activity"):this.registerIfFlightAndTextAvailable("FamT1SurveyAngActivity","fam-rt1-angular-activity",t.settingsPagesBaseStateName+".RecentActivity","landing-recent-activity");i=function(t){r.surveyService.registerSurveyDefinitionCallback(t,function(i){return n.formatQuestion(t,i)})};r=this;for(u in this.enabledSurveyPages)i(u);this.$rootScope.$on("$stateChangeStart",function(t,i){return n.startPromptTimer(i)});this.startPromptTimer(this.$state.current)},i.prototype.registerIfFlightAndTextAvailable=function(t,i,r,u){if(n.Utilities.isInFlight(t)){var f=this.familyConfig.content.landing.LandingActionLinks.Links.filter(function(n){return n.Link.Id==u});f.length>0&&(this.enabledSurveyPages[i]={stateName:r,localizedPageName:f[0].Link.Text})}},i.prototype.formatQuestion=function(n,t){t.SurveyTemplate.Content.Prompt.Title=this.stringFormat(t.SurveyTemplate.Content.Prompt.Title,{pageName:this.enabledSurveyPages[n].localizedPageName})},i.prototype.startPromptTimer=function(n){var i=this,t;this.isSameOrChildState(n.name)||(this.trackPageChange(n.name),this.isSurveyEnabledForState(n.name)&&(t=this.pageChangeTracker,this.$timeout(function(){return i.showSurveyPromptIfConditionsMet(t)},this.defaultDelayInMilliseconds,!0)))},i.prototype.showSurveyPromptIfConditionsMet=function(n){n===this.pageChangeTracker&&this.surveyService.showSurvey(this.getSurveyIdForCurrentState(),this.currentUser.userEmail)},i.prototype.trackPageChange=function(n){this.pageChangeTracker++;this.pageNameCurrent=n},i.prototype.getSurveyIdFromState=function(n){for(var t in this.enabledSurveyPages)if(this.enabledSurveyPages[t].stateName===n)return t;return null},i.prototype.getSurveyIdForCurrentState=function(){return this.getSurveyIdFromState(this.pageNameCurrent)},i.prototype.isSurveyEnabledForState=function(n){return this.getSurveyIdFromState(n)!==null},i.prototype.isSameOrChildState=function(n){return n.indexOf(this.pageNameCurrent)===0},i.$inject=["stringFormatFilter","familyConfig","surveyService","$state","$timeout","$rootScope","currentUser","initialFamilyRosterModel"],i}();angular.module(t.moduleName).service("familyGenericSurveyService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(){}return t.prototype.isRental=function(n){return n.ProductDocument.Product.DisplaySkuAvailabilities[0].Sku.SkuType.toUpperCase()==="RENTAL"},t.prototype.hasProductDisplayPage=function(n){return n.ProductDocument.Product.DisplaySkuAvailabilities[0].Availabilities[0].Actions.indexOf("Details")>-1},t.prototype.requiresCsvFundFlow=function(t){switch(t.ProductDocument.Product.ProductKind){case"Application":case"Book":case"Game":case"Movie":case"MusicAlbum":case"MusicTrack":case"TvEpisode":case"TvSeason":case"Bundles":return!1;case"PASS":return n.Utilities.isInFlight("FamAapPass")?!1:!0;default:return!0}},t}();angular.module(t.moduleName).service("familyProductService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(n,t){this.ajaxService=n;this.appConfig=t;this.ordersRelativeUrl="/v7.0/users/me/orders";this.orderServceName="MDollarOrderService"}return t.prototype.getPurchaseOnBehalfOfCreateOrderInfo=function(t){return{orderId:n.Utilities.generateGuid(),orderState:"Editing",clientContext:{client:"AccountMicrosoftCom"},language:t.Language,market:t.Market,items:[{availabilityId:t.AvailabilityId,productId:t.ProductId,skuId:t.SkuId,quantity:1,beneficiary:{identityType:"Msa",identityValue:t.BeneficiaryId}}]}},t.prototype.createOrder=function(n,t){var i=[];return i.Authorization='WLID1.0="'+t.metadata.mscomct+'"',this.ajaxService.post({serviceName:this.orderServceName,operationName:"CreateOrder",url:this.appConfig.serviceUrls.mDollarPurchaseUrl+this.ordersRelativeUrl,data:n,cache:!1,additionalHeaders:i}).then(function(n){return n.data})},t.$inject=["portalAjaxServiceAngular","familyConfig"],t}();angular.module(t.moduleName).service("mDollarOrderService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.$state=n;this.$q=t}return n.prototype.extractMember=function(n,t){return n&&n.members?(t.member=n.getMemberInfo(t.memberId),!t.member)?(this.$state.go(t.parentStateName),this.$q.reject(t.getInstrumentationComponentName()+" flow: Opened dialog with bad member id: "+t.memberId)):this.$q.resolve():(this.$state.go(t.parentStateName),this.$q.reject(t.getInstrumentationComponentName()+" flow: FamilyRosterModel members array undefined"))},n.prototype.isValidFamilyRosterModel=function(n){return n&&!!n.members},n.$inject=["$state","$q"],n}();n.MemberModalDialogService=t;angular.module(n.moduleName).service("memberModalDialogService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(){this.data=[];n.nextId=0}return n.prototype.getNotifications=function(){return this.data},n.prototype.removeNotification=function(n){var t=this.indexOf(n);this.removeNoticationByIndex(t)},n.prototype.removeNotificationContent=function(n){var t=this.indexOfContent(n);this.removeNoticationByIndex(t)},n.prototype.removeNotificationsOfType=function(n){var t=this;_.filter(this.data,function(t){return t.content.type===n}).forEach(function(n){return t.removeNotification(n)})},n.prototype.addNotification=function(t){t.data&&this.indexOfContent(t)===-1&&this.data.push({id:n.nextId++,content:t})},n.prototype.addNotifications=function(n){var t=this;_.each(n,function(n){t.addNotification(n)})},n.prototype.indexOf=function(n){return _.findIndex(this.data,function(t){return t.id===n.id})},n.prototype.indexOfContent=function(n){return _.findIndex(this.data,function(t){return t.content.type===n.type&&t.content.data.equals(n.data)})},n.prototype.removeNoticationByIndex=function(n){n!==-1&&this.data.splice(n,1)},n}();angular.module(n.moduleName).service("notificationsService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function n(){}return n}(),r=function(){function r(n,t,i,r,u,f,e){this.familyGenericSurveyService=n;this.$scope=t;this.$state=i;this.rosterService=r;this.familyBannerService=u;this.appConfig=f;this.$timeout=e;this.viewName="settings";this.familyNav=[];this.recentActivityPageStateName="Family.Settings.RecentActivity";this.spendingPageStateName="Family.Settings.Spending";this.findYourChildPageStateName="Family.Settings.FindYourChild";this.defaultState=this.recentActivityPageStateName;this.settingsPage=this.appConfig.content.settings;this.childId=this.$state.params.childId;this.settingLinks=this.settingsPage.SettingsLinks.Links;this.msaSettingLinks=[];this.localSettingsLinks=[];this.isActivityReportPage=this.$state.current.name===this.recentActivityPageStateName;this.isChildListEnabled=!0}return r.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.settings},r.prototype.componentOnInit=function(){var t=this;this.$scope.$on(this.rosterService.familyRosterUpdatedEvent,function(){return t.reloadFamilyRosterModelAndUpdateContent()});this.updateContent();n.Utilities.isInFlight("FamT1SurveyAngAll")&&!this.appConfig.isRequestOriginApp&&this.familyGenericSurveyService.register()},r.prototype.reloadFamilyRosterModelAndUpdateContent=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.familyRosterModel=t;n.updateContent()})},r.prototype.updateContent=function(){var n=this;try{this.shouldShowHeader=!this.familyBannerService.shouldShowSettingsBanner(this.familyRosterModel);this.userInfo=this.familyRosterModel.currentMember;this.isUserViewingSelf=this.$state.current.name==t.settingsStateNames.managePermissions||this.childId&&(this.$state.current.name==t.settingsStateNames.recentActivity||this.$state.current.name==t.settingsStateNames.overview)&&this.userInfo.Cid==this.childId;this.setupUserViewExperience();this.$scope.$watch(function(){return n.$state.params.childId},function(t){t&&t!=n.childId&&(n.childId=t,n.isValidState=!1,n.getChildInfo(),n.isLoading=!0,n.settingLinks=n.childInfo.IsLocal?n.localSettingsLinks:n.msaSettingLinks,n.$timeout(function(){n.isLoading=!1}))})}catch(r){if(r instanceof i)this.$state.go("Family.Landing",null,{location:"replace"});else throw r;}},r.prototype.setupUserViewExperience=function(){this.isUserViewingSelf?(this.setupSettingsLinksForSelfView(),this.isChildListEnabled=!1,this.isValidState=!0,this.updatePageState()):(this.getChildInfo(),this.setupFamilyPicker(),this.setupChildSettingsLinks())},r.prototype.setupSettingsLinksForSelfView=function(){for(var i,n=0,r=this.settingLinks;n<r.length;n++){i=r[n];switch(i.Link.Id){case t.settingsStateNames.overview:case t.settingsStateNames.recentActivity:this.userInfo.IsChild&&(this.childId=this.userInfo.Cid,this.msaSettingLinks.push(i));break;case t.settingsStateNames.managePermissions:this.msaSettingLinks.push(i)}}this.settingLinks=this.msaSettingLinks},r.prototype.setupFamilyPicker=function(){this.shouldShowHeader&&(this.childList=this.familyRosterModel.getChildren(),this.childInfo=this.familyRosterModel.getMemberInfo(this.childId),(this.userInfo.IsChild||this.childList&&this.childList.length<2)&&(this.isChildListEnabled=!1))},r.prototype.setupChildSettingsLinks=function(){for(var n,t=0,i=this.settingLinks;t<i.length;t++){n=i[t];switch(n.LinkType){case"All":this.localSettingsLinks.push(n);this.msaSettingLinks.push(n);break;case"Msa":n.Link.Url.indexOf("manage-permissions")===-1&&this.msaSettingLinks.push(n)}}this.settingLinks=this.childInfo.IsLocal?this.localSettingsLinks:this.msaSettingLinks},r.prototype.isNavPivotVisible=function(){return!this.isLoading&&!this.appConfig.isRequestOriginApp},r.prototype.getChildInfo=function(){if(this.childInfo=this.familyRosterModel.getMemberInfo(this.childId),(!this.familyRosterModel.isUserAChild||this.isActivityReportPage)&&this.childInfo)this.isValidState=!0,this.updatePageState();else throw new i;},r.prototype.updatePageState=function(){this.$scope.$emit(this.appConfig.familyLoadedEvent)},r.prototype.switchSettingsPage=function(n){var r=this,t=this.familyRosterModel.getMemberInfo(n),i=this.$state.current.name,u=t&&t.IsLocal&&i===this.findYourChildPageStateName;t&&!u?(t.IsLocal&&i===this.spendingPageStateName&&(i=this.recentActivityPageStateName),this.isLoading=!0,this.settingLinks=t.IsLocal?this.localSettingsLinks:this.msaSettingLinks,this.$timeout(function(){r.$state.go(i,{childId:""+n}).then(function(){r.isLoading=!1})})):this.$state.go("Family.Landing",null,{location:"replace"})},r.$inject=["familyGenericSurveyService","$scope","$state","rosterService","familyBannerService","familyConfig","$timeout"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reloadFamilyRosterModelAndUpdateContent")],r.prototype,"reloadFamilyRosterModelAndUpdateContent",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"settings",{templateUrl:t.settingsFolderBasePath+"settings.html",bindings:{familyRosterModel:"<"}})],r)}();t.SettingsComponent=r})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(){var t="1.00:00:00",i="00:00:00",r=8,u=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00","1.00:00:00"],f=function(){function n(n,t){this.formatTimeSpan=n;this.dateTimeFormatter=t}return n.prototype.formatTimeLimit=function(n,t){return this.formatTimeLimitInternal(n,t.template.allowanceListItems)},n.prototype.formatTimeLimitShort=function(n,t){return this.formatTimeLimitInternal(n,t.template.allowanceListItemsShort)},n.prototype.formatTimeLimitInternal=function(n,i){n=n||t;var r=_.find(i,function(t){return t.timestamp===n});return r?r.label:this.formatTimeSpan(n)},n.prototype.isAllowanceBlocked=function(n){return n===i},n.prototype.isAllowanceNoLimit=function(n){return!n||n===t},n.prototype.isScheduleNoLimit=function(n){return this.isAllowanceBlocked(n.allowance)||n.allottedInterval.start==="00:00:00"&&n.allottedInterval.end==="1.00:00:00"},n.prototype.isNoLimit=function(n){return this.isAllowanceNoLimit(n.allowance)&&this.isScheduleNoLimit(n)},n.prototype.getDeviceChartData=function(n,t){var i={},u=t.length,r=_.filter(n,function(n){return n.usedAppCount>0});return r.sort(function(n,t){return n.averageAppUsageDuration<t.averageAppUsageDuration?1:n.averageAppUsageDuration>t.averageAppUsageDuration?-1:0}),r.forEach(function(n,r){i[n.id]={name:n.name,color:t[r%u]}}),i},n.prototype.getStartTimeSpans=function(){return this.getIntervalListItems().slice(0,-1)},n.prototype.getEndTimeSpans=function(){return this.getIntervalListItems().slice(1)},n.prototype.getIntervalListItems=function(){var n=this;return this.intervalListItems||(this.intervalListItems=u.map(function(t){return{timestamp:t,label:n.dateTimeFormatter.toShortTime(t.slice(-r))}}))},n.prototype.getAppLimitUpdateBroadcastName=function(n){return"app-limit-update-broadcast-"+n},n.$inject=["timeSpanFormatFilter","dateTimeFormatter"],n}();angular.module(n.moduleName).service("appLimitsService",f)})(t=n.AppLimits||(n.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=["#0078D4","#00188F","#00A5B0","#4B003F","#917EDB","#E3008C","#022F22","#EF6950","#502006","#3cb44b","#911eb4","#42d4f4","#f032e6","#fabebe","#9a6324","#800000","#808000","#ffd8b1",],u=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){this.$scope=n;this.$q=t;this.$state=i;this.$rootScope=r;this.$meeErrors=u;this.apiService=f;this.contentService=e;this.rosterService=o;this.appLimitsService=s;this.appConfig=h;this.$location=c;this.$anchorScroll=l;this.$timeout=a;this.$meeModal=v;this.telemetryService=y;this.setGlobalToggleError="applimits.global.toggle";this.appLimitsAnchor="app-limits";this.isActivityReportingEnabled=!0;this.isPrivacyOboEnabled=!0;this.globalToggleOn=!1;this.defaultNumberOfAppsToShow=10;this.shouldShowAllApps=!1;this.filter="none";this.filterDeviceId=null;this.appLimitsOrderBy="";this.isSortedDescending=!0;this.freCookieName="app-limits-fre";this.coldStartId="app-limits.cold-start";this.showSurvey=!1;this.appLimitsSurveyName="fam-app-limits-survey";this.deviceChartDataLookup={}}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appLimits},i.prototype.componentOnInit=function(){var n=this;return this.getChildInfo().then(function(){return n.childInfo.IsLocal?(n.$state.go("Family.Settings.RecentActivity",{childId:""+n.childInfo.childId}),n.$q.resolve()):(n.setGeneralStrings(),n.scrollIfNecessary(),n.getData())},function(){n.telemetryService.portalQos.reportClientError({category:n.getInstrumentationComponentName()+":componentOnInit",data:{},message:"The childInfo was returned as falsy, childID: "+n.$state.params.childId});n.$state.go(t.familyLandingPageStateName)})},i.prototype.getData=function(){var n=this;return this.$q.all([this.getAppLimitsAndExtendedData(),this.getPrivacyConsentBit(),this.getCmsContent(),this.getWebsiteFilterData()]).then(function(){n.isPrivacyOboEnabled&&n.isActivityReportingEnabled?n.deviceChartDataLookup=n.appLimitsService.getDeviceChartData(n.appLimitsData.devices,r):n.appLimitsData={devices:[],apps:[],enabled:!1};n.filteredDeviceList=n.appLimitsData.devices;n.filteredDeviceLookup=n.filteredDeviceList.reduce(function(n,t){return n[t.id]=t,n},{});n.determineAppLimitsState();n.determineFreExperience();n.bindSendFeedbackLink();n.userData.appLimitsEnabled=n.appLimitsData.enabled;n.globalToggleLabel=n.cms.template.strings.timeLimits;n.allDataLoaded=!0})},i.prototype.getChildInfo=function(){var n=this;return this.rosterService.getFamily().then(function(t){var i=t.getChildById(n.$state.params.childId);if(!i)return n.$q.reject();n.childInfo=i})},i.prototype.getPrivacyConsentBit=function(){var n=this;return this.apiService.getPrivacyOBOBit(this.childInfo).then(function(t){n.isPrivacyOboEnabled=t.onBehalfOfPrivacy===null?!0:t.onBehalfOfPrivacy})},i.prototype.getCmsContent=function(){var n=this;return this.contentService.getAppLimitsContent().then(function(t){n.cms=t;n.howToAdd=n.cms.template.links.howToAddADeviceLink;n.appLimitsDescription=n.cms.template.paragraphsWithStyle.appLimitsDescWithFeedbackAndLearnMore})},i.prototype.getAppLimitsAndExtendedData=function(){var n=this;return this.apiService.getAllAppLimits(this.childInfo.FamilyServiceId,this.childInfo.JsonWebToken).then(function(t){n.isPrivacyOboEnabled&&(n.appLimitsData=t,n.reorderedAppLimitsList=n.appLimitsData.apps.slice(),n.reorderedAppLimitsList.sort(n.reorderListByUsage))}).catch(function(t){if(t.jqXHR&&t.jqXHR.status===403)n.isActivityReportingEnabled=!1;else return n.$q.reject(t)})},i.prototype.setGeneralStrings=function(){this.errorMessage=this.appConfig.content.settings.Strings.errorMessage;this.appLimitsTitle=this.appConfig.content.settings.Strings.AppLimits},i.prototype.getWebsiteFilterData=function(){var n=this;return this.apiService.getWebsiteFilterSettings(this.childInfo.FamilyServiceId).then(function(t){n.userData?n.userData.websiteFilterData=t:n.userData={websiteFilterData:t}})},i.prototype.toggleAppLimits=function(){var n=this;return this.$meeErrors.reset(this.setGlobalToggleError),this.apiService.toggleAppLimits(this.childInfo.FamilyServiceId,this.childInfo.JsonWebToken,this.globalToggleOn).then(function(){n.appLimitsData.enabled=n.globalToggleOn;n.userData.appLimitsEnabled=n.appLimitsData.enabled;n.determineAppLimitsState()}).catch(function(t){return n.globalToggleOn=!n.globalToggleOn,n.$meeErrors.setError(n.setGlobalToggleError,n.errorMessage),n.$q.reject(t)})},i.prototype.limitAppsToShow=function(n){return this.shouldDisplayShowMore(n)?n.slice(0,this.defaultNumberOfAppsToShow):n},i.prototype.showMore=function(){this.shouldShowAllApps=!0},i.prototype.shouldDisplayShowMore=function(n){return!this.shouldShowAllApps&&n.length>this.defaultNumberOfAppsToShow+1},i.prototype.showLess=function(){this.shouldShowAllApps=!1},i.prototype.shouldDisplayShowLess=function(n){return this.shouldShowAllApps&&n.length>this.defaultNumberOfAppsToShow+1},i.prototype.reorderListByUsage=function(n,t){var i=n.usage?n.usage.averageDailyUsageDuration:"",r=t.usage?t.usage.averageDailyUsageDuration:"";return i>r?1:i<r?-1:t.name.localeCompare(n.name)},i.prototype.determineAppLimitsState=function(){if(!this.isPrivacyOboEnabled){this.selectedTextWhenToggleIsOff=this.cms.template.paragraphsWithStyle.activityReportingPermissionDisabled;return}if(!this.isActivityReportingEnabled){var n=this.cms.template.paragraphsWithStyle.appLimitsOffMessage;this.selectedTextWhenToggleIsOff=n.replace("{childId}",this.childInfo.childId);return}this.appLimitsData.enabled&&(this.globalToggleOn=!0)},i.prototype.determineFreExperience=function(){if(this.appLimitsData.enabled&&!cookieManager.default.getCookie(this.freCookieName,!0)&&!_.find(this.appLimitsData.apps,function(n){return!!n.policy})){this.openFreModal();var n={name:this.freCookieName,value:"true",requiresConsent:!0};cookieManager.default.setCookie(n)}},i.prototype.openFreModal=function(){var n={cms:this.cms},i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.freHeading,kind:"flow close-button"},data:n};this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.freModal,i)},i.prototype.scrollIfNecessary=function(){var n=this;this.$location.hash().indexOf(this.appLimitsAnchor)>-1&&this.$timeout().then(function(){n.$location.hash(n.appLimitsAnchor);n.$anchorScroll()})},i.prototype.filterWithLimits=function(){var n=this;this.$timeout(function(){n.filter="withLimits"})},i.prototype.filterWithoutLimits=function(){var n=this;this.$timeout(function(){n.filter="withoutLimits"})},i.prototype.filterBlocked=function(){var n=this;this.$timeout(function(){n.filter="blocked"})},i.prototype.noFilter=function(){var n=this;this.$timeout(function(){n.filter="none"})},i.prototype.filterForDevice=function(n){var t=this;this.$timeout(function(){t.filterDeviceId=n})},i.prototype.noFilterForDevice=function(){this.filterForDevice(null)},i.prototype.getFilterForExistenceOfAtLeastOneAppInstalledOnDevice=function(){return function(n){return n.installedAppCount>0}},i.prototype.getFilterForLimits=function(){switch(this.filter){case"withLimits":return function(n){return n.policy&&n.policy.enabled};case"withoutLimits":return function(n){return!n.policy||!n.policy.enabled};case"blocked":return function(n){return n.policy&&n.policy.enabled&&n.policy.blocked};default:return function(){return!0}}},i.prototype.getFilterForDevice=function(){var n=this;return function(t){return n.filterDeviceId==null||t.deviceIds&&_.contains(t.deviceIds,n.filterDeviceId)}},i.prototype.sortByUsage=function(){var n=this;this.$timeout(function(){n.appLimitsOrderBy="";n.isSortedDescending=!0})},i.prototype.sortByName=function(){var n=this;this.$timeout(function(){n.appLimitsOrderBy="name";n.isSortedDescending=!1})},i.prototype.sortByAscending=function(){var n=this;this.$timeout(function(){n.isSortedDescending=!1})},i.prototype.sortByDescending=function(){var n=this;this.$timeout(function(){n.isSortedDescending=!0})},i.prototype.scrollHowToAdd=function(){this.$location.hash(this.coldStartId);this.$anchorScroll()},i.prototype.bindSendFeedbackLink=function(){var n=this;this.$timeout(function(){angular.element("#app-limit-desc-fb").bind("click",function(t){t.preventDefault();n.$rootScope.$broadcast("show-feedback")})})},i.prototype.determineShowList=function(){return this.isPrivacyOboEnabled&&this.isActivityReportingEnabled},i.$inject=["$scope","$q","$state","$rootScope","$meeErrors","apiService","contentService","rosterService","appLimitsService","familyConfig","$location","$anchorScroll","$timeout","$meeModal","telemetryService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("appLimitsGetData")],i.prototype,"getData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getChildInfo")],i.prototype,"getChildInfo",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getPrivacyConsentBit")],i.prototype,"getPrivacyConsentBit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getCmsContent")],i.prototype,"getCmsContent",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getAppLimitsAndExtendedData")],i.prototype,"getAppLimitsAndExtendedData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("app-limits-get-website-filter-settings")],i.prototype,"getWebsiteFilterData",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("toggleAppLimits"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("toggleAppLimits")],i.prototype,"toggleAppLimits",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"appLimits",{templateUrl:t.settingsFolderBasePath+"AppLimits/app-limits.html"})],i)}();i.AppLimitsComponent=u})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i,r,u,f,e){this.$meeModal=t;this.flowService=i;this.appLimitsColdStartFlow=r;this.appLimitsColdStartCasaFlow=u;this.$element=f;this.$timeout=e;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride");this.isCasaAppAvailabilityEnabled=n.Utilities.isInFlight("CasaAppAvailability");this.androidCardId="app-limits.cold-start-card.android";this.casaCardId="app-limits.cold-start-card.casa";this.windowsCardId="app-limits.cold-start-card.windows";this.xboxCardId="app-limits.cold-start-card.xbox"}return i.prototype.$onInit=function(){var n=this;this.androidCardImageData=this.generateBodymovin("animatedColdStartCardAndroid");this.windowsCardImageData=this.generateBodymovin("animatedColdStartCardWindows");this.xboxCardImageData=this.generateBodymovin("animatedColdStartCardXbox");this.$timeout().then(function(){n.androidCardEntryElement=document.getElementById(n.androidCardId);n.windowsCardEntryElement=document.getElementById(n.windowsCardId);n.xboxCardEntryElement=document.getElementById(n.xboxCardId)})},i.prototype.generateBodymovin=function(n){return{src:this.cms.template.assets[n],alt:""}},i.prototype.openCasaModal=function(){var t={cms:this.cms},i;n.Utilities.isInFlight("CasaAppAvailability")?(i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.casaStep1Title,kind:"flow close-button"},data:t},this.flowService.setData(t),this.flowService.begin(this.appLimitsColdStartCasaFlow.getBeginData(i))):(i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.step1ModalTitle,kind:"flow close-button"},data:t},this.flowService.setData(t),this.flowService.begin(this.appLimitsColdStartFlow.getBeginData(i)))},i.prototype.openWindowsModal=function(){var n={cms:this.cms},i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.windowsModalTitle,kind:"flow close-button"},data:n};this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.coldStartWindows,i)},i.prototype.openXboxModal=function(){var n={cms:this.cms},i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.xboxModalTitle,kind:"flow close-button"},data:n};this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.coldStartXbox,i)},i.$inject=["$meeModal","flowService","appLimitsColdStartFlow","appLimitsColdStartCasaFlow","$element","$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStart",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/app-limits-cold-start.html",bindings:{cms:"<"}})],i)}();i.AppLimitsColdStart=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i){this.$meeModal=n;this.flowService=t;this.appLimitsColdStartFlow=i}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.description=this.cms.template.paragraphsWithStyle.installLauncher},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep2,step:"step2"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartFlow"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartAndroidStep1Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Android/app-limits-cold-start-android-step1-modal.html"})],i)}();i.AppLimitsColdStartAndroidStep1ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i,r,u){this.$meeModal=t;this.flowService=i;this.appLimitsColdStartFlow=r;this.$element=u;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.description=this.cms.template.paragraphsWithStyle.installLauncher;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep2,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep3,step:"step3"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep1,step:"step1"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartAndroidStep2Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Android/app-limits-cold-start-android-step2-modal.html"})],i)}();i.AppLimitsColdStartAndroidStep2ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i,r,u){this.$meeModal=t;this.flowService=i;this.appLimitsColdStartFlow=r;this.$element=u;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.description=this.cms.template.paragraphsWithStyle.installLauncher;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep3,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep4,step:"step4"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep2,step:"step2"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartAndroidStep3Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Android/app-limits-cold-start-android-step3-modal.html"})],i)}();i.AppLimitsColdStartAndroidStep3ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i,r,u){this.$meeModal=t;this.flowService=i;this.appLimitsColdStartFlow=r;this.$element=u;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.description=this.cms.template.paragraphsWithStyle.installLauncher;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep4,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.close=function(){this.flowService.end();this.flowService.exit()},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartAndroidStep3,step:"step3"};this.flowService.switchTo(this.appLimitsColdStartFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartAndroidStep4Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Android/app-limits-cold-start-android-step4-modal.html"})],i)}();i.AppLimitsColdStartAndroidStep4ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(t){var i=function(){function t(n){this.familyConfig=n;this.steps={step1:this.familyConfig.scenarioStates.appLimitsColdStartAndroidStep1,step2:this.familyConfig.scenarioStates.appLimitsColdStartAndroidStep2,step3:this.familyConfig.scenarioStates.appLimitsColdStartAndroidStep3,step4:this.familyConfig.scenarioStates.appLimitsColdStartAndroidStep4}}return t.prototype.getStepData=function(n){return{bi:{step:this.steps[n.step]},modalStateId:n.stateId}},t.prototype.getBeginData=function(t){return{bi:{area:this.familyConfig.Area,scenario:this.familyConfig.scenarios.appLimitsColdStartAndroidFlow,step:this.steps.step1},state:n.appLimitsStateNames.coldStartAndroidStep1,modalId:n.familyHostModalId,modalShowOptions:t,exitState:{id:"Family.Settings.AppLimits"}}},t.$inject=["familyConfig"],t}();t.AppLimitsColdStartFlow=i;angular.module(n.moduleName).service("appLimitsColdStartFlow",i)})(t=n.AppLimits||(n.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i){this.$meeModal=n;this.flowService=t;this.appLimitsColdStartCasaFlow=i}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep2,step:"step2"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartCasaFlow"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartCasaStep1Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Casa/app-limits-cold-start-casa-step1-modal.html"})],i)}();i.AppLimitsColdStartCasaStep1ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r){this.$meeModal=n;this.flowService=t;this.appLimitsColdStartCasaFlow=i;this.$element=r}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep2,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep3,step:"step3"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep1,step:"step1"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartCasaFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartCasaStep2Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Casa/app-limits-cold-start-casa-step2-modal.html"})],i)}();i.AppLimitsColdStartCasaStep2ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r){this.$meeModal=n;this.flowService=t;this.appLimitsColdStartCasaFlow=i;this.$element=r}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep3,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.next=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep4,step:"step4"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep2,step:"step2"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartCasaFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartCasaStep3Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Casa/app-limits-cold-start-casa-step3-modal.html"})],i)}();i.AppLimitsColdStartCasaStep3ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r){this.$meeModal=n;this.flowService=t;this.appLimitsColdStartCasaFlow=i;this.$element=r}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.imageData={src:this.cms.template.assets.animatedColdStartAndroidStep4,alt:""};this.animationEntryElement=this.$element[0]},i.prototype.close=function(){this.flowService.end();this.flowService.exit()},i.prototype.back=function(){var n={stateId:t.appLimitsStateNames.coldStartCasaStep3,step:"step3"};this.flowService.switchTo(this.appLimitsColdStartCasaFlow.getStepData(n))},i.$inject=["$meeModal","flowService","appLimitsColdStartCasaFlow","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartCasaStep4Modal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Casa/app-limits-cold-start-casa-step4-modal.html"})],i)}();i.AppLimitsColdStartCasaStep4ModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(t){var i=function(){function t(n){this.familyConfig=n;this.steps={step1:this.familyConfig.scenarioStates.appLimitsColdStartCasaStep1,step2:this.familyConfig.scenarioStates.appLimitsColdStartCasaStep2,step3:this.familyConfig.scenarioStates.appLimitsColdStartCasaStep3,step4:this.familyConfig.scenarioStates.appLimitsColdStartCasaStep4}}return t.prototype.getStepData=function(n){return{bi:{step:this.steps[n.step]},modalStateId:n.stateId}},t.prototype.getBeginData=function(t){return{bi:{area:this.familyConfig.Area,scenario:this.familyConfig.scenarios.appLimitsColdStartCasaFlow,step:this.steps.step1},state:n.appLimitsStateNames.coldStartCasaStep1,modalId:n.familyHostModalId,modalShowOptions:t,exitState:{id:"Family.Settings.AppLimits"}}},t.$inject=["familyConfig"],t}();t.AppLimitsColdStartCasaFlow=i;angular.module(n.moduleName).service("appLimitsColdStartCasaFlow",i)})(t=n.AppLimits||(n.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i){this.$meeModal=t;this.$element=i;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.description=this.cms.template.paragraphsWithStyle.windowsModalDescription;this.firstInstruction=this.cms.template.paragraphsWithStyle.windowsModalLi1;this.secondInstruction=this.cms.template.paragraphsWithStyle.windowsModalLi2;this.imageData={src:this.cms.template.assets.animatedColdStartCardWindows,alt:""};this.entryElement=this.$element[0]},i.prototype.close=function(){this.$meeModal.goBack()},i.$inject=["$meeModal","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartWindowsModal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Windows/app-limits-cold-start-windows-modal.html"})],i)}();i.AppLimitsColdStartWindowsModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i){this.$meeModal=t;this.$element=i;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.firstInstruction=this.cms.template.paragraphsWithStyle.xboxModalLi1;this.secondInstruction=this.cms.template.paragraphsWithStyle.xboxModalLi2;this.imageData={src:this.cms.template.assets.animatedColdStartCardXbox,alt:""};this.entryElement=this.$element[0]},i.prototype.close=function(){this.$meeModal.goBack()},i.$inject=["$meeModal","$element"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsColdStartXboxModal",{templateUrl:t.settingsFolderBasePath+"AppLimits/ColdStart/Xbox/app-limits-cold-start-xbox-modal.html"})],i)}();i.AppLimitsColdStartXboxModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var u=["DeviceAdminPermissionEnabled","AccessibilityServiceEnabled","AppUsagePermissionEnabled",],f=["HeartbeatOk","WindowsVersionSupportsAppBlocking"],e=["MSASignedIn","LauncherVersionSupportsAppLimits","WindowsVersionSupportsAppLimits","MultipleAppLimitsPermissions","DeviceAdminPermissionEnabled","AccessibilityServiceEnabled","AppUsagePermissionEnabled",],o="{deviceName}",r="appLimitsDeviceList",s=function(){function i(n,t,i,r,u){this.$meeModal=n;this.appConfig=t;this.stringFormatFilter=i;this.dateTimeFormatter=r;this.telemetry=u}return i.prototype.$onInit=function(){this.deviceList=this.getDeviceTagGroupItems()},i.prototype.getDeviceTagGroupItems=function(){var n=this;return this.devices.map(function(t){var i={name:t.name,iconClass:"mee-icon-"+n.getDeviceIcon(t.formFactor),type:"info"},r;return t.states&&t.states.length&&(r=n.getDeviceStatesBySeverity(t.states),r.error.length?(i.type="error",i.label=n.cms.template.strings.deviceTagErrorAriaLabel,i.onClick=function(){n.openDeviceErrorStateDialog(t,r.error[0])}):r.warning.length&&(i.type="warning",i.label=n.cms.template.strings.deviceTagWarningAriaLabel,i.onClick=function(){n.openDeviceErrorStateDialog(t,r.warning[0])})),i})},i.prototype.openDeviceErrorStateDialog=function(n,i){var f=this.getDeviceErrorStateNotificationConfig(n,i.type),u,e;f?(u=this.formatStringsInDialogCmsTemplate(f,{deviceName:n.name,timestamp:i.lastDetectedOn&&this.dateTimeFormatter.toLongDateTime(i.lastDetectedOn)}),e={modalHostOptions:{ariaDialogLabel:u.dialogHeader,ariaCloseButtonLabel:u.closeButtonLabel,kind:"flow close-button"},data:{cms:u,device:n}},this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.deviceErrorStateDialog,e)):this.telemetry.portalQos.reportClientError({category:r,data:{device:n,stateInError:i},message:"Cannot find message for state "+i.type+" and device type "+n.class})},i.prototype.formatStringsInDialogCmsTemplate=function(n,t){var i=this;return _.mapObject(n,function(n){return typeof n=="string"?i.stringFormatFilter(n,t):_.map(n,function(n){return i.stringFormatFilter(n,t)})})},i.prototype.getDeviceErrorStateNotificationConfig=function(n,t){var r="unknown",i;return n.class==="Windows.Desktop"?r="windowsDesktop":n.class==="Windows.Xbox"?r="windowsXbox":n.class.match(/^Android/)&&(r="android"),i=this.cms.template.deviceErrorStateNotifications[""+r+t],t==="WindowsVersionSupportsAppBlocking"&&(i=this.cms.template.deviceErrorStateNotifications.someAppsMayGetBlockedUnderContentRestrictions),i&&(i.closeButtonLabel||(i.closeButtonLabel=this.appConfig.content.deviceNotify.DeviceNotifyStepsCloseButton),i.dialogDeviceCaption||(i.dialogDeviceCaption=o)),i},i.prototype.getDeviceStatesBySeverity=function(n){var i={},t;return n.forEach(function(n){n.value===!1&&(i[n.type]=n)}),t=function(n){return _.compact(_.map(n,function(n){return i[n]}))},t(u).length>1&&(i.MultipleAppLimitsPermissions={type:"MultipleAppLimitsPermissions",value:!1}),{warning:t(f),error:t(e)}},i.prototype.getDeviceIcon=function(n){switch(n){case"pc":return"TVMonitor";case"laptop":return"DeviceLaptopNoPic";case"console":return"XboxOneConsole";case"tablet":return"Tablet";default:return"CellPhone"}},i.$inject=["$meeModal","familyConfig","stringFormatFilter","dateTimeFormatter","telemetryService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,r,{templateUrl:t.settingsFolderBasePath+"AppLimits/Devices/app-limits-device-list.html",bindings:{cms:"<",devices:"<",tagSize:"@?"}})],i)}();i.AppLimitsDeviceList=s})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r){this.appLimitsService=n;this.stringFormatFilter=t;this.dateTimeFormatter=i;this.$scope=r}return i.prototype.$onInit=function(){var n=this;this.$scope.$watch(function(){return n.appData.policy},function(){return n.populateStatusLabels()},!0);this.$scope.$watch(function(){return n.userData.appLimitsEnabled},function(){return n.populateStatusLabels()},!0)},i.prototype.populateStatusLabels=function(){this.policyScheduleAndLimitLabels=[];this.appData&&(this.appData.policy&&this.appData.policy.enabled?this.appData.policy.blocked?this.setLabelToBlocked():!this.userData||this.userData.appLimitsEnabled?this.setLabelToLimits():this.appData.usage&&this.appData.usage.averageDailyUsageDuration&&this.setLabelToUsage():this.appData.usage&&this.appData.usage.averageDailyUsageDuration&&this.setLabelToUsage())},i.prototype.setLabelToBlocked=function(){this.pushLabel(this.cms.template.paragraphsWithStyle.statusBlocked)},i.prototype.setLabelToUsage=function(){var n=this.formatTimeLimit(this.appData.usage.averageDailyUsageDuration);this.pushLabel(this.cms.template.paragraphsWithStyle.averageUse,n)},i.prototype.setLabelToLimits=function(){var n=this.cms.template.dateClassDataWithStyles,i=this.appData.policy.limits,t=this.getStringFormatValues(i.weekday),r=this.getStringFormatValues(i.weekend);angular.equals(t,r)?this.pushFormattedLimitString(t,n.everyday):(this.pushFormattedLimitString(t,n.weekday),this.pushFormattedLimitString(r,n.weekend))},i.prototype.pushFormattedLimitString=function(n,t){n&&(n.limit&&n.from?(this.pushLabel(t.statusAllowanceAndSchedule,n,"policy-status-long"),this.pushLabel(t.statusAllowanceAndScheduleShort,n,"policy-status-short")):n.limit?(this.pushLabel(t.statusAllowanceOnly,n,"policy-status-long"),this.pushLabel(t.statusAllowanceOnlyShort,n,"policy-status-short")):n.from&&this.pushLabel(t.statusScheduleOnly,n))},i.prototype.getStringFormatValues=function(n){if(n){var t={},i=!this.appLimitsService.isAllowanceNoLimit(n.allowance),r=n.allottedInterval&&!this.appLimitsService.isScheduleNoLimit(n);return i&&(t.limitShort=this.formatTimeLimitShort(n.allowance),t.limit=this.formatTimeLimit(n.allowance)),r&&(t.from=this.formatTime(n.allottedInterval.start),t.to=this.formatTime(n.allottedInterval.end)),t}},i.prototype.pushLabel=function(n,t,i){t===void 0&&(t={});i===void 0&&(i=null);this.policyScheduleAndLimitLabels.push({sizeClass:i,htmlFormattedText:this.stringFormatFilter(n,t)})},i.prototype.formatTimeLimit=function(n){return this.appLimitsService.formatTimeLimit(n,this.cms)},i.prototype.formatTimeLimitShort=function(n){return this.appLimitsService.formatTimeLimitShort(n,this.cms)},i.prototype.formatTime=function(n){var t=n.slice(-8);return this.dateTimeFormatter.toShortTime(t)},i.$inject=["appLimitsService","stringFormatFilter","dateTimeFormatter","$scope"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsDrawerStatusText",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/app-limits-drawer-status-text.html",bindings:{cms:"<",appData:"<",userData:"<"}})],i)}();i.AppLimitsDrawerStatusTextComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t,i,r,u,f,e,o,s,h,c,l,a,v,y){this.$rootScope=t;this.$scope=i;this.$q=r;this.$element=u;this.currentUser=f;this.apiService=e;this.monitoredOperation=o;this.appLimitsService=s;this.$meeA11y=h;this.telemetry=c;this.familyConfig=l;this.surveyService=a;this.dialogService=v;this.stringFormatFilter=y;this.showError=!1;this.appTimeEnforcementPolicy="weekendAndWeekday";this.startTime="00:00:00";this.endTime="1.00:00:00";this.interceptCookie="intercept-fam-app-limits";this.isInSurveyFlight=n.Utilities.isInFlight("FamAppLimitsSurvey");this.isInInterceptFlight=n.Utilities.isInFlight("FamIntercept")}return i.prototype.componentOnInit=function(){var n=this,t,i;if(this.enabledToggle=!!this.appData.policy&&this.appData.policy.enabled,this.updatePolicyOperationName="app-update-policy_"+this.appData.id,this.updatePolicyBound=this.updatePolicy.bind(this),this.fallbackChar=this.appData.name&&this.appData.name[0],this.appLimitUpdateBroadcastName=this.appLimitsService.getAppLimitUpdateBroadcastName(this.appData.id),this.expandDrawerCallback=function(){n.usingInitialDrawerOpenedDefaults=n.areLimitsIneffective(n.appData.policy);n.doesPolicyHaveLimits(n.appData.policy)||(n.appData.policy=n.getPolicyDefaultByInteractionMethod("drawerClick"))},this.devices=[],this.appData.deviceIds&&this.deviceLookup)for(t=0;t<this.appData.deviceIds.length;t++)i=this.deviceLookup[this.appData.deviceIds[t]],i&&this.devices.push(i);this.showAppLimitsChart=!!this.appData.usage&&this.appData.usage.averageDailyUsageDuration&&(!this.appData.policy||!this.appData.policy.blocked)},i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appLimitsDrawer},i.prototype.$postLink=function(){this.drawerComponent=this.$element.find("mee-drawer").controller("meeDrawer")},i.prototype.doesPolicyHaveLimits=function(n){return!!(n&&(n.blocked||n.limits.weekday&&n.limits.weekend))},i.prototype.areLimitsIneffective=function(n){return!this.doesPolicyHaveLimits(n)||!n.blocked&&this.appLimitsService.isNoLimit(n.limits.weekday)&&this.appLimitsService.isNoLimit(n.limits.weekend)},i.prototype.getPolicyDefaultByInteractionMethod=function(n){var t;return t=n==="toggle"?this.getDrawerOpenedByToggleLimtDefaults():this.getDrawerOpenedLimitDefaults(),{enabled:this.enabledToggle,blocked:!1,appTimeEnforcementPolicy:this.appTimeEnforcementPolicy,limits:{weekday:t.weekday,weekend:t.weekend}}},i.prototype.getDrawerOpenedLimitDefaults=function(){return{weekday:{allowance:"1.00:00:00",allottedInterval:{start:"00:00:00",end:"1.00:00:00"}},weekend:{allowance:"1.00:00:00",allottedInterval:{start:"00:00:00",end:"1.00:00:00"}}}},i.prototype.getDrawerOpenedByToggleLimtDefaults=function(){return{weekday:{allowance:"01:00:00",allottedInterval:{start:"07:00:00",end:"21:00:00"}},weekend:{allowance:"01:00:00",allottedInterval:{start:"07:00:00",end:"22:00:00"}}}},i.prototype.areControlsDisabled=function(){return!(this.usingInitialDrawerOpenedDefaults||this.appData.policy&&this.appData.policy.enabled)},i.prototype.onEnabledToggleChange=function(){var n=this,t,i=!1,r=this.$q.resolve(!0);return this.areLimitsIneffective(this.appData.policy)?(t=this.getPolicyDefaultByInteractionMethod("toggle"),i=!0):(t=angular.copy(this.appData.policy),t.enabled=this.enabledToggle,t.blocked&&!t.enabled&&(t.blocked=!1,this.doesPolicyHaveLimits(t)||(t=this.getPolicyDefaultByInteractionMethod("unblock")),i=!0,r=this.shouldUnblockApp())),r.then(function(r){if(r)return n.updatePolicy(t,i).then(function(){n.enabledToggle&&n.drawerComponent.expandDrawer()},function(){return n.enabledToggle=n.appData.policy?n.appData.policy.enabled:!1,n.$q.reject()});n.enabledToggle=n.appData.policy?n.appData.policy.enabled:!1})},i.prototype.updateBlocked=function(n){var t=this;return n?this.updateBlockedHelper(!0):this.shouldUnblockApp().then(function(n){return n&&t.updateBlockedHelper(!1)})},i.prototype.updatePolicy=function(n,t){var i=this;if(t===void 0&&(t=!1),!n)throw Error("updatePolicy must be called with a parameter");return this.showError=!1,this.appData.policy&&this.appData.policy.enabled&&this.areLimitsIneffective(n)?n.enabled=!1:!this.appData.policy||this.appData.policy.enabled||this.areLimitsIneffective(n)||(n.enabled=!0),n.displayName=this.appData.name,this.monitoredOperation(this.updatePolicyOperationName,function(){return i.apiService.setAppPolicy(i.childInfo.FamilyServiceId,i.childInfo.JsonWebToken,i.appData.id,n).then(function(){i.showError=!1;i.appData.policy&&!t?angular.merge(i.appData.policy,n):i.appData.policy=angular.copy(n);i.enabledToggle=n.enabled;i.usingInitialDrawerOpenedDefaults=i.areLimitsIneffective(i.appData.policy);i.postUpdatePolicy()}).catch(function(n){return i.showError=!0,i.$meeA11y.announcer.announce(i.cms.template.strings.errorMessage,"assertive"),i.drawerComponent.expandDrawer(),i.$q.reject(n)})})},i.prototype.postUpdatePolicy=function(){this.callFeedbackTools();this.broadcastUpdateApp()},i.prototype.updateBlockedHelper=function(n){var t=angular.copy(this.appData.policy);return t.blocked=n,n||this.doesPolicyHaveLimits(t)||(t=this.getPolicyDefaultByInteractionMethod("unblock")),this.updatePolicy(t)},i.prototype.shouldUnblockApp=function(){return this.appData.thirdPartyWebBrowser&&this.userData.websiteFilterData.isWebsiteFilterEnabled?this.dialogService.yesNo({title:this.cms.template.strings.blockedBrowserWarningDialogTitle,text:this.stringFormatFilter(this.cms.template.strings.blockedBrowserWarningDialogText,{appName:this.appData.name}),yesLabel:this.cms.template.strings.blockedBrowserWarningDialogYesLabel,noLabel:this.cms.template.strings.blockedBrowserWarningDialogNoLabel}).then(function(n){return n==="yes"}):this.$q.resolve(!0)},i.prototype.broadcastUpdateApp=function(){this.$rootScope.$broadcast(this.appLimitUpdateBroadcastName)},i.prototype.callFeedbackTools=function(){this.isInInterceptFlight?cookieManager.default.getCookie(this.interceptCookie,!1)||this.currentUser.culture.toLowerCase()!=="en-us"||this.callInterceptFeedbackApi():this.isInSurveyFlight&&this.surveyService.showSurvey("fam-app-limits-survey")},i.prototype.callInterceptFeedbackApi=function(){var n,t,i;typeof FeedbackAPI!="undefined"&&(t=new FeedbackAPI({title:this.cms.template.strings.interceptTitle,description:this.cms.template.strings.interceptDesc,vanityName:"AMC App Limits",imageUrl:"",duration:15,marginRight:10,marginBottom:50}),t.show(),i={name:this.interceptCookie,value:"1",requiresConsent:!0},cookieManager.default.setCookie(i),this.telemetry.portalQos.reportRawEvent({name:this.familyConfig.events.familyInterceptNotificationShown,content:(n={},n[this.familyConfig.events.familyInterceptNotificationShown]={pageId:this.telemetry.portalBi.getCurrentLocation(),area:"AppLimits"},n)}))},i.$inject=["$rootScope","$scope","$q","$element","currentUser","apiService","$meeMonitoredOperation","appLimitsService","$meeA11y","telemetryService","familyConfig","surveyService","dialogService","stringFormatFilter"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateAppLimitsPolicy")],i.prototype,"updatePolicy",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"appLimitsDrawer",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/app-limits-drawer.html",bindings:{appData:"<",childInfo:"<",cms:"<",deviceChartDataLookup:"<deviceChartData",deviceLookup:"<",userData:"<"}})],i)}();i.AppLimitsDrawerComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){function r(n){var t=n.split(":"),i=t[0]?+t[0]:0,r=t[1]?+t[1]:0;return i*60+r}function f(n){var t=Math.floor(n/60),i=n%60,r=(t<10?"0":"")+t,u=(i<10?"0":"")+i;return r+":"+u+":00"}var e="#b9b9b9",u=4,i={min:1,max:2,multiplier:.1},o=function(){function o(n,t,i,r,u,f,e){this.$window=n;this.$meeUtil=t;this.commonConfig=i;this.$element=r;this.familyConfig=u;this.dateTimeFormatter=f;this.timeSpanFormat=e;this.chartAnimationDuration=333;this.onResizeHandler=this.$meeUtil.debounce(this.resizeChart.bind(this),100)}return o.prototype.$onInit=function(){},o.prototype.$postLink=function(){this.shortDayNames=this.familyConfig.daysShortData;this.longDayNames=this.familyConfig.daysLongData;kendo.drawing.DASH_ARRAYS.dot2=[2,2];this.processChartData();this.render();this.$window.addEventListener("resize",this.onResizeHandler)},o.prototype.$onDestroy=function(){this.$window.removeEventListener("resize",this.onResizeHandler)},o.prototype.render=function(){var n=this,t=this.commonConfig.isRightToLeft,i={theme:"Metro",legend:{visible:!1},panes:[{clip:!1}],seriesDefaults:{type:"column",gap:.5,visual:function(t){return n.createBars(t)}},series:[{data:this.organizedData.usageDataValues}],valueAxis:[{visible:!1,majorGridLines:{visible:!1}}],categoryAxis:[{reverse:t,categories:this.organizedData.chartCategoryLabels,line:{visible:!0,color:"rgba(0, 0, 0, 0.1)"},majorGridLines:{visible:!1},labels:{color:"#000000",visual:function(t){return n.renderCategoryLabel(t)}}}],chartArea:{background:"#F9F9F9",margin:{top:10},height:150},tooltip:{visible:!0,template:function(t){return n.getTooltipTemplate(t)},border:{width:0}},render:function(t){return n.renderAverageContent(t)}};this.createChart(i)},o.prototype.createChart=function(n){var t=this.$element.find(".app-limits-chart");t&&t.kendoChart(n)},o.prototype.resizeChart=function(){var n=this.$element.find(".app-limits-chart");n&&kendo.resize(n,!1)},o.prototype.processChartData=function(){var n=new Date(this.chartData.beginDate),v=new Date(n.getFullYear(),n.getMonth(),n.getDate()+6),s=n.getDay(),t=this.shortDayNames.slice(s).concat(this.shortDayNames.slice(0,s)),i,e,h,o,l;for(t[0]+="\n"+this.dateTimeFormatter.toShortMonthDay(n),t[t.length-1]+="\n"+this.dateTimeFormatter.toShortMonthDay(v),i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),e=[],h=0;h<7;h++,i.setDate(i.getDate()+1))e.push(i.toISOString().substr(0,10));o={};l=this.chartData.devices.slice().sort(function(n,t){return n.totalDuration<t.totalDuration?1:n.totalDuration>t.totalDuration?-1:0});l.forEach(function(n,t){o[n.deviceId]=t});var c=e.map(function(){return 0}),a=[],y=this.chartData.dailyUsages;y.forEach(function(n){var i=e.indexOf(n.date.substr(0,10)),t,s,h;i>-1&&(c[i]=r(n.duration),t=n.perDevice.map(function(n){return{deviceId:n.deviceId,usage:n.duration,usageValue:r(n.duration)}}).sort(function(n,t){return o[n.deviceId]-o[t.deviceId]}),t.length>u&&(s=u-1,h=_.reduce(t.slice(s),function(n,t){return n+t.usageValue},0),t=t.slice(0,s),t.push({deviceId:undefined,usage:f(h),usageValue:h})),a[i]=t)});this.organizedData={weekStartDay:s,chartCategoryLabels:t,usageDataValues:c,maxUsageDataValue:Math.max.apply(Math,c),dailyUsageByDevice:a}},o.prototype.getTooltipTemplate=function(n){var t=this,r=$("#app-limits-chart-template").html(),u=kendo.template(r),i=this.organizedData.chartCategoryLabels.indexOf(n.category),f=(i+this.organizedData.weekStartDay)%7,e=this.longDayNames[f],o=this.organizedData.dailyUsageByDevice[i],s=o.map(function(n){return{name:n.deviceId&&t.deviceChartDataLookup[n.deviceId]?t.deviceChartDataLookup[n.deviceId].name:t.cms.template.strings.usageChartOtherDevices,time:t.timeSpanFormat(n.usage),color:t.colorForDevice(n.deviceId)}});return u({dayName:e,devices:s})},o.prototype.renderCategoryLabel=function(n){var t=n.createVisual();return t.children.length>1&&(t.children[1].chartElement.options.color="#777777"),t},o.prototype.renderAverageContent=function(n){var s=r(this.chartData.averageDailyUsageDuration),h=this.maxUsageBarBottom-this.maxUsageBarTop,t=this.maxUsageBarBottom-s/this.organizedData.maxUsageDataValue*h,f=n.sender.getSize().width,e=new kendo.drawing.Path({stroke:{color:"#464646",width:1.5,dashType:"dot2"}}),o;e.moveTo(0,t).lineTo(f,t);n.sender.surface.draw(e);var c=t<16?t+2:t-16,u=new kendo.geometry.Point(0,c),i=new kendo.drawing.Text(this.timeSpanFormat(this.chartData.averageDailyUsageDuration),u);i.options.fill.color="#666666";this.commonConfig.isRightToLeft&&u.setX(f-i.bbox().width());o=new kendo.drawing.Rect(new kendo.geometry.Rect(u,i.bbox().getSize()),{fill:{color:"white"},stroke:{color:"white",width:2},opacity:.6});n.sender.surface.draw(o);n.sender.surface.draw(i)},o.prototype.createBars=function(n){var w=this,b,f,s,h,e,o,u;if(n.value!==0){this.maxUsageBarBottom||n.sender._model.traverse(function(n){n instanceof kendo.dataviz.BarChart&&n.options.animation&&(n.options.animation.duration=w.chartAnimationDuration)});var l=n.rect,r=l.origin,t=l.size;t.width>20&&(b=(t.width-20)/2,r.x+=b,t.width=20);t.height<1&&(r.y+=1-t.height,t.height=1);f=l.bottomRight();n.value===this.organizedData.maxUsageDataValue&&(this.maxUsageBarTop=r.y,this.maxUsageBarBottom=f.y);s=new kendo.drawing.Path;h=t.height/t.width;h>=1?(e=t.width/2,u=e*Math.max(.9,1.12-.11*h),s.moveTo(r.x,r.y+u).lineTo(r.x,f.y-u).arc(180,0,e,e,!0).lineTo(f.x,r.y+u).arc(0,180,e,e,!0)):(o=t.height/2,u=o*Math.max(.9,1.14-.12/h),s.moveTo(r.x+u,r.y).lineTo(f.x-u,r.y).arc(270,90,o,o).lineTo(r.x+u,f.y).arc(90,270,o,o));var g=this.organizedData.chartCategoryLabels.indexOf(n.category),a=this.organizedData.dailyUsageByDevice[g],v=a.length-1,k=i.multiplier&&v&&Math.max(i.min,Math.min(i.max,t.height*i.multiplier/v)),nt=(t.height-k*v)/n.value,y=s.bbox(),d=(y.size.height-t.height)/2,c=y.origin.clone(),p=new kendo.drawing.Group;return a.forEach(function(n,t){var i=n.usageValue*nt+(t===0?d:0)+(t===a.length-1?d:0),r=kendo.geometry.Size.create(y.size.width,i),u=new kendo.drawing.Rect(new kendo.geometry.Rect(c,r),{fill:{color:w.colorForDevice(n.deviceId)},stroke:{color:"none"}});p.append(u);c=new kendo.geometry.Point(c.x,c.y+i+k)}),p.clip(s),p}},o.prototype.colorForDevice=function(n){return n&&this.deviceChartDataLookup[n]?this.deviceChartDataLookup[n].color:e},o.$inject=["$window","$meeUtil","commonConfig","$element","familyConfig","dateTimeFormatter","timeSpanFormatFilter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsChart",{template:'<div class="app-limits-chart"><\/div>',bindings:{cms:"<",chartData:"<",deviceChartDataLookup:"<deviceChartData"}})],o)}();t.AppLimitsChartComponent=o})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r,u){this.appLimitsService=n;this.$scope=t;this.$timeout=i;this.$meeErrors=r;this.$meeUtil=u;this.scheduleErrorId="schedule.conflict"}return i.prototype.$onInit=function(){var n=this;this.$scope.$watch(function(){return n.appData.policy.limits[n.limitsControlType]},function(t){n.limitDataClone?angular.merge(n.limitDataClone,t):n.limitDataClone=angular.copy(t)});this.limitsOptions=this.cms.template.allowanceListItems;this.uid=this.$meeUtil.nextUid();this.limitsAriaLabel=this.limitsControlType==="weekend"?this.cms.template.strings.ariaLabelAppDrawerWeekendLimit:this.cms.template.strings.ariaLabelAppDrawerWeekdayLimit;this.sliderConfig={appName:this.appData.name,controlType:this.limitsControlType,limitsAriaLabel:this.limitsAriaLabel,sliderIdPostfix:this.uid}},i.prototype.updateScheduleTime=function(){this.$meeErrors.reset(this.scheduleErrorId);this.limitDataClone.allottedInterval.start>=this.limitDataClone.allottedInterval.end?this.$meeErrors.setError(this.scheduleErrorId,this.cms.template.strings.errorScheduleTiming):this.updateLimit()},i.prototype.updateAllowance=function(n){n!=this.limitDataClone.allowance&&(this.limitDataClone.allowance=n,this.updateLimit())},i.prototype.updateLimit=function(){var n=this,t=angular.copy(this.appData.policy);t.limits[this.limitsControlType]=angular.copy(this.limitDataClone);this.updatePolicy(t).finally(function(){angular.merge(n.limitDataClone,n.appData.policy.limits[n.limitsControlType])})},i.prototype.getStartTimeSpans=function(){return this.appLimitsService.getStartTimeSpans()},i.prototype.getEndTimeSpans=function(){return this.appLimitsService.getEndTimeSpans()},i.prototype.isAllowanceBlocked=function(){return this.limitDataClone&&this.appLimitsService.isAllowanceBlocked(this.limitDataClone.allowance)},i.$inject=["appLimitsService","$scope","$timeout","$meeErrors","$meeUtil"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"limitsControl",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/LimitsControl/limits-control.html",bindings:{cms:"<",appData:"<",limitsControlType:"@",limitsLabel:"@",isDisabled:"<",updatePolicy:"<",updatePolicyOperationName:"<"}})],i)}();i.LimitsControlComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r,u,f,e,o,s,h,c){this.$scope=n;this.$q=t;this.$element=i;this.apiService=r;this.monitoredOperation=u;this.appLimitsService=f;this.$timeout=e;this.$meeA11y=o;this.$meeUtil=s;this.$meeErrors=h;this.$meeModal=c;this.freCookieName="app-limits-web-blocking-fre"}return i.prototype.componentOnInit=function(){var i=this,n=this.appData.urls||[],t=this.userData&&this.userData.websiteFilterData;this.userBlockedWebsites=t&&this.userData.websiteFilterData.blockedList||[];this.isWebsiteFilterEnabled=t&&this.userData.websiteFilterData.isWebsiteFilterEnabled||!1;this.webFilter=this.generateInitialWebFilter(n,this.userBlockedWebsites);this.canonicalizedUrls=_.map(n,function(n){return i.canonicalizeUrl(n)});this.webFilter.appHasWebsites&&(this.appLimitUpdateBroadcastName=this.appLimitsService.getAppLimitUpdateBroadcastName(this.appData.id),this.webBlockingUid=this.$meeUtil.nextUid(),this.webBlockingErrorId="app-limits-web-blocking-error-"+this.webBlockingUid,this.multipleUrls=n.length>1,this.checkboxModel=this.generateInitialWebFilterCheckboxModel(this.webFilter),this.setupFreListener())},i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appLimitsWebBlocking},i.prototype.setupFreListener=function(){var n=this;cookieManager.default.getCookie(this.freCookieName,!0)||this.$scope.$on(this.appLimitUpdateBroadcastName,function(){n.determineFreExperience()})},i.prototype.determineFreExperience=function(){var n=this;cookieManager.default.getCookie(this.freCookieName,!0)||this.webFilter.checkedEnum==="checked"||this.openFreModal().then(function(){var t={name:n.freCookieName,value:"true",requiresConsent:!0};cookieManager.default.setCookie(t)})},i.prototype.openFreModal=function(){var n={cms:this.cms,isWebsiteFilterEnabled:this.userData.websiteFilterData.isWebsiteFilterEnabled,childCid:this.childInfo.Cid},i={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.blockWebsitesFreTitle,kind:"flow close-button"},data:n};return this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.webBlockingFreModal,i)},i.prototype.openWarningModal=function(){var n=this,i={cms:this.cms,callback:this.warningModalCallback.bind(this),childInfo:this.childInfo},r={modalHostOptions:{ariaDialogLabel:this.cms.template.strings.freHeading,kind:"flow close-button"},onDismissed:function(){return n.resetCheckbox()},data:i};return this.$meeModal.show(t.familyHostModalId,t.appLimitsStateNames.webBlockingWarningModal,r)},i.prototype.updateWebsiteBlocking=function(){return this.userData.websiteFilterData.isWebsiteFilterEnabled?this.updateWebsiteBlockingHelper():this.openWarningModal()},i.prototype.updateWebsiteBlockingHelper=function(){return this.webFilter.checkedEnum==="checked"?this.removeWebsiteBlockingForApp():this.addWebsiteBlockingForApp()},i.prototype.warningModalCallback=function(n){var t=this;return n.then(function(){t.isWebsiteFilterEnabled=!0;t.userData.websiteFilterData.isWebsiteFilterEnabled=!0;t.$meeModal.goBack().then(function(){t.webFilter.checkedEnum!="checked"&&t.updateWebsiteBlockingHelper()})},function(){t.$meeModal.goBack();t.resetCheckbox()})},i.prototype.resetCheckbox=function(){this.checkboxModel=this.generateWebFilterCheckboxModel(this.webFilter)},i.prototype.addWebsiteBlockingForApp=function(){return this.handleWebsiteBlockingApiResponse(this.apiService.addAppLimitsWebsitesToCRBlockedList(this.childInfo.FamilyServiceId,this.webFilter.unblockedUrls),!0)},i.prototype.removeWebsiteBlockingForApp=function(){return this.handleWebsiteBlockingApiResponse(this.apiService.removeWebsitesFromCRBlockedList(this.childInfo.FamilyServiceId,this.webFilter.blockedUrls),!1)},i.prototype.handleWebsiteBlockingApiResponse=function(n,t){var i=this;return this.$meeErrors.reset(this.webBlockingErrorId),this.monitoredOperation(this.progressName,function(){return n.then(function(n){i.webFilter=t?i.generateUpdatedWebFilter(n.failedUrls,n.succededUrls):i.generateUpdatedWebFilter(n.succededUrls,n.failedUrls)},function(){i.$meeErrors.setError(i.webBlockingErrorId,i.cms.template.strings.checkboxWebsiteBlockingError)}).finally(function(){i.checkboxModel=i.generateWebFilterCheckboxModel(i.webFilter)})})},i.prototype.generateInitialWebFilter=function(n,t){var i={checkedEnum:"unchecked",unblockedUrls:[],blockedUrls:[],appHasWebsites:n.length>0};return n.length?(i=this.updateWebFilterUrls(i,n,t),i.checkedEnum=this.generateWebFilterCheckboxEnum(i.unblockedUrls,i.blockedUrls),i):i},i.prototype.updateWebFilterUrls=function(n,t,i){var f=this,r,u;for(i=_.map(i,function(n){return f.canonicalizeUrl(n)}),r=0;r<t.length;r++)u=this.canonicalizeUrl(t[r]),i.indexOf(u)>=0?n.blockedUrls.push(t[r]):n.unblockedUrls.push(t[r]);return n},i.prototype.canonicalizeUrl=function(n){return n.replace(/(^https:\/\/|^http:\/\/|www\.|\/$)/g,"").toLocaleLowerCase()},i.prototype.generateWebFilterCheckboxEnum=function(n,t){return n.length===0&&t.length>0?"checked":n.length>0&&t.length>0?"partial":"unchecked"},i.prototype.generateWebFilterCheckboxModel=function(n){return{isChecked:n.checkedEnum==="checked",isIntermediate:n.checkedEnum==="partial"}},i.prototype.generateUpdatedWebFilter=function(n,t){return{checkedEnum:this.generateWebFilterCheckboxEnum(n,t),unblockedUrls:n,blockedUrls:t,appHasWebsites:!0}},i.prototype.generateInitialWebFilterCheckboxModel=function(n){return{isChecked:this.isWebsiteFilterEnabled?n.checkedEnum==="checked":!1,isIntermediate:n.checkedEnum==="partial"}},i.$inject=["$scope","$q","$element","apiService","$meeMonitoredOperation","appLimitsService","$timeout","$meeA11y","$meeUtil","$meeErrors","$meeModal"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("addAppLimitsWebFilterForApp")],i.prototype,"addWebsiteBlockingForApp",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeAppLimitsWebFilterForApp")],i.prototype,"removeWebsiteBlockingForApp",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"appLimitsWebBlocking",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/WebBlocking/app-limits-web-blocking.html",bindings:{appData:"<",childInfo:"<",cms:"<",progressName:"<",userData:"<"}})],i)}();i.AppLimitsWebBlockingComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r,u){this.$q=n;this.$meeModal=t;this.$meeErrors=i;this.apiService=r;this.$timeout=u;this.errorId="web-blocking-warning-modal"}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appLimitsWebBlockingWarning},i.prototype.componentOnInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.childInfo=this.passedData.childInfo},i.prototype.close=function(){this.passedData.callback(this.$q.reject());this.$meeErrors.reset(this.errorId)},i.prototype.agree=function(){var n=this;this.$meeErrors.reset(this.errorId);this.enableBlocking().then(function(){n.passedData.callback(n.$q.resolve())},function(){n.$meeErrors.setError(n.errorId,n.cms.template.strings.errorMessage)})},i.prototype.enableBlocking=function(){return this.apiService.enableBlockingAppLimitsWebFilter(this.childInfo.FamilyServiceId,this.childInfo.JsonWebToken)},i.$inject=["$q","$meeModal","$meeErrors","apiService","$timeout"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("appLimitsWebFilterEnableBlocking"),n.OneUI.Angular.MonitorOperationProgress("enable-blocking")],i.prototype,"enableBlocking",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"webBlockingWarningModal",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/WebBlocking/BlockWarning/web-blocking-warning-modal.html"})],i)}();i.WebBlockingWarningModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n){this.$meeModal=n}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms;this.isWebsiteFilterEnabled=this.passedData.isWebsiteFilterEnabled;this.childCid=this.passedData.childCid},i.prototype.close=function(){this.$meeModal.goBack()},i.$inject=["$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"webBlockingFreModal",{templateUrl:t.settingsFolderBasePath+"AppLimits/Drawer/WebBlocking/Fre/web-blocking-fre-modal.html"})],i)}();i.WebBlockingFreModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(t){this.$meeModal=t;this.isFamAppStyleOverrideEnabled=n.Utilities.isInFlight("FamAppStyleOverride")}return i.prototype.$onInit=function(){this.passedData=this.$meeModal.getData();this.cms=this.passedData.cms},i.prototype.close=function(){this.$meeModal.goBack()},i.$inject=["$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appLimitsFreModal",{templateUrl:t.settingsFolderBasePath+"AppLimits/Fre/app-limits-fre-modal.html"})],i)}();i.AppLimitsFreModalComponent=r})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r={ArrowLeft:37,ArrowRight:39,ArrowUp:38,ArrowDown:40,PageUp:33,PageDown:34,Home:36,End:35},u=["02:00:00","04:00:00","06:00:00"],f=function(){function i(n,t,i,u,f){var e=this;this.$element=n;this.$timeout=t;this.$scope=i;this.$meeUtil=u;this.commonConfig=f;this.sliderIdPrefix="app-limits-slider";this.mainMouseButtonCode=0;this.debounceTimeout=500;this.mappedKeyCodes=r;this.onMouseMove=function(n){e.setSliderFromLocation(n.clientX);n.preventDefault()};this.onMouseUp=function(n){window.removeEventListener("mousemove",e.onMouseMove);window.removeEventListener("mouseup",e.onMouseUp);e.finalizeAllowanceChange();n.preventDefault()}}return i.prototype.componentOnInit=function(){var n=this,t;return this.allowanceList=this.cms.template.allowanceListItems.slice(),this.numberOfAllowanceTicks=this.allowanceList.length-1,this.commonConfig.isRightToLeft&&(this.mappedKeyCodes=angular.copy(r),this.mappedKeyCodes.ArrowLeft=r.ArrowRight,this.mappedKeyCodes.ArrowRight=r.ArrowLeft),t=this.sliderConfig.sliderIdPostfix,this.sliderId=this.sliderIdPrefix+"-"+t,this.sliderThumbId=this.sliderIdPrefix+"-thumb-"+t,this.sliderThumbLabelId=this.sliderIdPrefix+"-thumb-label-"+t,this.sliderTrackProgressIndicatorId=this.sliderIdPrefix+"-track-progress-indicator-"+t,this.sliderTrackId=this.sliderIdPrefix+"-track-"+t,this.sliderLabelId=this.sliderIdPrefix+"-input-label-"+t,this.abvLabel=this.sliderConfig.controlType=="weekday"?this.cms.template.paragraphsWithStyle.weekdayAbvLabelStyled:this.cms.template.paragraphsWithStyle.weekendAbvLabelStyled,this.ticks=u.map(function(t){var i=_.findIndex(n.allowanceList,function(n){return t===n.timestamp});return{allowance:n.allowanceList[i],allowanceIndex:i}}),this.debounceFinalizeAllowanceChange=this.$meeUtil.debounce(function(){n.finalizeAllowanceChange()},this.debounceTimeout),this.$timeout(function(){n.thumb=n.$element.find("#"+n.sliderThumbId)[0];n.trackProgressIndicator=n.$element.find("#"+n.sliderTrackProgressIndicatorId)[0];n.thumbWidth=n.thumb.offsetWidth;var t=n.$element.find("#"+n.sliderTrackId)[0];t.addEventListener("mousedown",function(t){n.onMouseDown(t)});t.addEventListener("touchstart",function(t){n.onTrackTouchStart(t)});t.addEventListener("touchmove",function(t){n.onTrackTouchMove(t)});t.addEventListener("touchcancel",function(t){n.onTrackTouchEnd(t)});t.addEventListener("touchend",function(t){n.onTrackTouchEnd(t)});n.setSliderFromTimeSpan(n.allowance)})},i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appLimitsSlider},i.prototype.$onChanges=function(n){n.allowance&&!n.allowance.isFirstChange()&&this.thumb&&this.setSliderFromTimeSpan(this.allowance)},i.prototype.finalizeAllowanceChange=function(){var n=this;this.currentThumbAllowance.allowance.timestamp!==this.allowance&&(this.allowance=this.currentThumbAllowance.allowance.timestamp,this.$scope.$evalAsync(function(){n.updateAllowanceCallback({allowance:n.currentThumbAllowance.allowance.timestamp})}))},i.prototype.onKeyDown=function(n){if(!this.isDisabled){var t;switch(n.keyCode){case this.mappedKeyCodes.ArrowUp:case this.mappedKeyCodes.PageUp:case this.mappedKeyCodes.ArrowRight:t=this.currentThumbAllowance.allowanceIndex+1;break;case this.mappedKeyCodes.ArrowDown:case this.mappedKeyCodes.PageDown:case this.mappedKeyCodes.ArrowLeft:t=this.currentThumbAllowance.allowanceIndex-1;break;case this.mappedKeyCodes.Home:t=0;break;case this.mappedKeyCodes.End:t=this.numberOfAllowanceTicks;break;default:return}this.isUpdateInProgress||(this.setSliderFromIndex(t),this.debounceFinalizeAllowanceChange());n.preventDefault()}},i.prototype.addMovementHandlers=function(){window.addEventListener("mousemove",this.onMouseMove);window.addEventListener("mouseup",this.onMouseUp)},i.prototype.onMouseDown=function(n){var t=this;if(n.button===this.mainMouseButtonCode&&!this.isDisabled){if(this.isUpdateInProgress)this.thumb.focus();else if(n.target!==this.thumb)this.$timeout(function(){t.thumb.dispatchEvent(n)},0,!1);else{this.thumb.focus();this.onMouseMove(n);this.addMovementHandlers()}n.preventDefault()}},i.prototype.onTrackTouchStart=function(n){if(!this.isDisabled&&n.touches[0]){if(n.target!==this.thumb&&this.thumb.focus(),!this.isUpdateInProgress)this.onTrackTouchMove(n);n.preventDefault()}},i.prototype.onTrackTouchMove=function(n){!this.isDisabled&&n.touches[0]&&(this.isUpdateInProgress||this.setSliderFromLocation(n.touches[0].clientX),n.preventDefault())},i.prototype.onTrackTouchEnd=function(n){this.isDisabled||(this.isUpdateInProgress||this.finalizeAllowanceChange(),n.preventDefault())},i.prototype.setSliderFromTimeSpan=function(n){if(n){var t=_.findIndex(this.allowanceList,function(t){return n===t.timestamp});this.setSliderFromIndex(t)}},i.prototype.setSliderFromLocation=function(n){var t=this.thumb.parentElement.getBoundingClientRect();if(!(t.width<=0)){var r=n-t.left,u=t.width/this.numberOfAllowanceTicks,i=Math.round(r/u);this.commonConfig.isRightToLeft&&(i=this.numberOfAllowanceTicks-i);this.setSliderFromIndex(i)}},i.prototype.setSliderFromIndex=function(n){n<=0?n=0:n>this.numberOfAllowanceTicks&&(n=this.numberOfAllowanceTicks);var t={allowance:this.allowanceList[n],allowanceIndex:n};this.setLocation(n);this.setTrackProgressIndicatorWidth(n);this.currentThumbAllowance=t;this.thumb&&this.$scope.$evalAsync()},i.prototype.setLocation=function(n){if(this.thumb){var t=this.getPositionStyle(n);angular.merge(this.thumb.style,t)}},i.prototype.setTrackProgressIndicatorWidth=function(n){this.trackProgressIndicator&&(this.trackProgressIndicator.style.width="calc("+this.thumbWidth/2+"px + ((100% - "+this.thumbWidth+"px) / "+this.numberOfAllowanceTicks+" * "+n+"))")},i.prototype.getPositionStyle=function(n){var t={},i=this.commonConfig.isRightToLeft?"right":"left";return t[i]="calc(100% / "+this.numberOfAllowanceTicks+" * "+n+")",t},i.prototype.getInitialButtonPositionStyle=function(){if(this.allowance)return this.currentThumbAllowance||this.setSliderFromTimeSpan(this.allowance),this.currentThumbAllowance&&this.getPositionStyle(this.currentThumbAllowance.allowanceIndex)},i.$inject=["$element","$timeout","$scope","$meeUtil","commonConfig"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"appLimitsSlider",{templateUrl:t.settingsFolderBasePath+"AppLimits/Slider/app-limits-slider.html",bindings:{cms:"<",allowance:"<",updateAllowanceCallback:"&",sliderConfig:"<",isDisabled:"<",isUpdateInProgress:"<ngDisabled"}})],i)}();i.AppLimitsSliderComponent=f})(i=t.AppLimits||(t.AppLimits={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(){var t=function(){function n(){}return n}();angular.module(n.moduleName).service("appRewardsService",t)})(t=n.AppRewards||(n.AppRewards={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)};__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n,t,i,r){this.$q=n;this.$state=t;this.apiService=i;this.rosterService=r;this.appRewardsAnchor="app-rewards";this.appRewardsTitle="App Rewards";this.appRewardsDescription="After setting app and game limits, you can also set app rewards. Your child can earn reward time which goes towards automatic time extensions.";this.rewardAppsHeader="Reward Apps";this.saveButtonText="Save";this.rewardStateNone="None";this.rewardStateEarning="Earns Reward Time";this.rewardStateUsing="Uses Reward Time"}return i.prototype.componentOnInit=function(){var n=this;return this.getFamilyInfo().then(function(){return n.childInfo.IsLocal?(n.$state.go("Family.Settings.RecentActivity",{childId:""+n.childInfo.childId}),n.$q.resolve()):n.getAppData()})},i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.appRewards},i.prototype.getFamilyInfo=function(){var n=this;return this.rosterService.getFamily().then(function(t){n.parentInfo=t.currentMember;var i=t.getChildById(n.$state.params.childId);if(!i)return n.$q.reject();n.childInfo=i})},i.prototype.getAppData=function(){var n=this;return this.$q.all([this.apiService.getAllAppLimits(this.childInfo.FamilyServiceId,this.childInfo.JsonWebToken),this.apiService.getRewardApps(this.childInfo.FamilyServiceId,this.childInfo.JsonWebToken)]).then(function(t){var r=t[0],i=t[1];n.appData=r.apps.map(function(n){var t="none";return _.find(i.rewardEarningApps,function(t){return t===n.id})?t="earning":_.find(i.rewardUsingApps,function(t){return t===n.id})&&(t="using"),__assign(__assign({},n),{rewardState:t})})})},i.prototype.saveRewardApps=function(){var n=_.filter(this.appData,function(n){return n.rewardState==="earning"}).map(function(n){return n.id}),t=_.filter(this.appData,function(n){return n.rewardState==="using"}).map(function(n){return n.id});return this.apiService.setRewardApps(this.childInfo.FamilyServiceId,this.parentInfo.FamilyServiceId,n,t,this.childInfo.JsonWebToken)},i.$inject=["$q","$state","apiService","rosterService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getFamilyInfo")],i.prototype,"getFamilyInfo",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getAppData")],i.prototype,"getAppData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("saveRewardApps")],i.prototype,"saveRewardApps",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"appRewards",{templateUrl:t.settingsFolderBasePath+"AppRewards/app-rewards.html"})],i)}();i.AppRewardsComponent=r})(i=t.AppRewards||(t.AppRewards={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r=function(){function i(n){this.flowService=n}return i.prototype.$onInit=function(){this.cms=this.flowService.getData()},i.prototype.onButtonClick=function(){this.flowService.end().exit()},i.$inject=["flowService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"casaInstallModal",{templateUrl:t.settingsFolderBasePath+"Casa/Modal/casa-install-modal.html"})],i)}();i.CasaInstallModalComponent=r})(i=t.Casa||(t.Casa={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(){var t=function(){function t(n,t){this.$state=n;this.flowService=t;this.casaScenarioAreaName="Family";this.casaScenarioName="CasaModal";this.steps={start:"casa-modal-launched",cancel:"casa-modal-dismissed"}}return t.prototype.getBeginData=function(t){var i=this,r={modalHostOptions:{ariaDialogLabel:t.template.strings.getCasaModalAriaLabel,kind:"flow close-button"},onDismissed:function(){return i.flowService.cancel({step:i.steps.cancel}),null}};return{bi:{area:this.casaScenarioAreaName,scenario:this.casaScenarioName,step:this.steps.start},state:this.$state.current.name+"."+n.casaInstallModalSuffix,exitState:{id:this.$state.current.name},modalId:n.familyHostModalId,modalShowOptions:r}},t.$inject=["$state","flowService"],t}();angular.module(n.moduleName).service("casaInstallModalFlow",t)})(t=n.Casa||(n.Casa={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(){var i=function(){function t(n,t,i,r,u){this.$q=n;this.$window=t;this.casaInstallModalFlow=i;this.contentService=r;this.flowService=u;this.casaInstallModalCookieName="casa-modal-shown";this.cookieExpirationInDays=7}return t.prototype.launchModal=function(){var n=this;return this.isEligibleToViewModal()?this.contentService.getCasaModalContent().then(function(t){return n.flowService.setData(t),n.flowService.begin(n.casaInstallModalFlow.getBeginData(t)).then(function(){n.onModalShown()})}):this.$q.resolve()},t.prototype.isEligibleToViewModal=function(){return n.Utilities.isInFlight("CasaAppAvailability")&&this.isMobileView()&&this.isUnderNotificationLimit()&&!1},t.prototype.isMobileView=function(){return!!this.$window.navigator.userAgent.match(/iphone|ipod|android/i)},t.prototype.isUnderNotificationLimit=function(){return n.Utilities.isInFlight("GCookieBanner")?typeof WcpConsent!="undefined"&&WcpConsent?!cookieManager.default.getCookie(this.casaInstallModalCookieName,!0,WcpConsent.consentCategories.Analytics):!0:!cookieManager.default.getCookie(this.casaInstallModalCookieName,!0)},t.prototype.incrementNotificationCount=function(){var t=new Date,i;t.setDate(t.getDate()+this.cookieExpirationInDays);i={name:this.casaInstallModalCookieName,value:"true",requiresConsent:!0,expiresOn:t};n.Utilities.isInFlight("GCookieBanner")&&typeof WcpConsent!="undefined"&&WcpConsent&&(i.category=WcpConsent.consentCategories.Analytics);cookieManager.default.setCookie(i)},t.prototype.onModalShown=function(){this.incrementNotificationCount()},t.$inject=["$q","$window","casaInstallModalFlow","contentService","flowService"],t}();angular.module(t.moduleName).service("casaInstallModalService",i)})(i=t.Casa||(t.Casa={}))})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.$meeModal=n;this.familyConfig=t;this.formatString=i}return n.prototype.setupService=function(n,t){this.cms=n;this.childInfo=t},n.prototype.setWebsiteToggleChangedFn=function(n){this.websiteToggleChangedFn=n},n.prototype.getCMS=function(){return this.cms},n.prototype.getChildInfo=function(){return this.childInfo},n.prototype.getChildId=function(){return this.childInfo.FamilyServiceId},n.prototype.getFamilyConfig=function(){return this.familyConfig},n.prototype.getBlockedBrowsers=function(){return this.familyConfig.blockedBrowsers},n.prototype.getIsLocal=function(){return this.childInfo.IsLocal},n.prototype.getLocalAccountMachineName=function(){return this.childInfo.LocalAccountMachineName},n.prototype.updateViewWhenWebFilterToggleChanged=function(){this.websiteToggleChangedFn()},n.prototype.openRatingsModal=function(n,t){var i={modalHostOptions:{ariaDialogLabel:this.cms.Strings.AppsGamesDialogContentRatingsHeader,ariaCloseButtonLabel:this.cms.Strings.CloseDialogAriaText,kind:"flow close-button"},data:{ratings:n,selectedAgeIndex:t}};this.$meeModal.show("#family-dialog","Family.Settings.ContentRestrictions.crRatingsDialog",i)},n.prototype.cleanUrl=function(n){var t=n.slice(),i;return t=t.replace(/^https:\/\//,""),t=t.replace(/^http:\/\//,""),t=t.replace(/^www\./,""),t=t.replace(/\/+$/,""),i=t.match(/^[^\/]+/),i&&(t=t.replace(i[0],i[0].toLowerCase())),t},n.$inject=["$meeModal","familyConfig","stringFormatFilter"],n}();angular.module(n.moduleName).service("contentRestrictionsService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.contentRestrictionsService=n;this.crAppsGamesAPIService=t;this.crWebAPIService=i}return i.prototype.$onInit=function(){this.cms=this.compassContent.template;this.contentRestrictionsService.setupService(this.cms,this.childInfo);this.crAppsGamesAPIService.setupService(this.childInfo);this.crWebAPIService.setupService(this.childInfo)},i.$inject=["contentRestrictionsService","crAppsGamesAPIService","crWebAPIService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"$onInit",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"contentRestrictions",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/content-restrictions.html",bindings:{compassContent:"<",childInfo:"<",familyRosterModel:"<"}})],i)}();t.ContentRestrictionsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(t,i,r,u,f,e,o,s,h,c){this.$q=t;this.$meeErrors=i;this.$anchorScroll=r;this.$scope=u;this.$meeA11y=f;this.apiService=e;this.dialogService=o;this.stringFormatFilter=s;this.contentRestrictionsService=h;this.crAppsGamesAPIService=c;this.selectedAgeIndexMin=0;this.updateAppsGamesToggleWorking=!1;this.updateAppsGamesToggleId="content-restrictions-apps-games-enabled-toggle";this.updateAppsGamesAgeSettingId="content-restrictions-apps-games-rating-select";this.blockedAppsDisplayOption="legacy";this.isInFamRemoveCRToggleFlight=n.Utilities.isInFlight("FamRemoveCRToggle")}r=i;i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.contentRestrictionsAppsGames};i.prototype.componentOnInit=function(){var n=this;return this.getAppsGamesDataWorking=!0,this.setInitialNeededData(),this.contentRestrictionsService.setWebsiteToggleChangedFn(function(){n.getAppsGamesDataHandler()}),this.$meeA11y.monitorOperationProgress(this.$scope,[{operationName:r.updateAppsGamesToggle,onFailureSelector:"#"+this.updateAppsGamesToggleId,onSuccessAnnounce:this.cms.Strings.SuccessfullyChangedToggle,onSuccessSelector:"#"+this.updateAppsGamesToggleId,onWorkingAnnounce:this.cms.Strings.Working},{operationName:r.updateAppsGamesAgeSetting,onFailureSelector:"#"+this.updateAppsGamesAgeSettingId,onSuccessAnnounce:this.cms.Strings.SuccessfullyUpdatedAgeRatings,onSuccessSelector:"#"+this.updateAppsGamesAgeSettingId,onWorkingAnnounce:this.cms.Strings.Working}]),this.$q.all([this.getAppsGamesDataHandler(),this.getRatings()]).then(function(){n.$anchorScroll()})};i.prototype.getAppsGamesDataHandler=function(){var n=this;return this.$q.all([this.getAppsGamesData(),this.getAppLimitsBlockedApps()]).then(function(t){var r,i=t[0],u=t[1];n.allowedList=i.allowedList;n.blockedList=u.blockedApps.map(function(n){return{ContentId:n.id,ContentTitle:n.name,IsAllowed:!1,AppLimitsData:n,Content:{ContentId:n.id,Description:{Title:n.name,IconUriString:n.iconUrl}}}});n.blockedAppsDisplayOption!=="modern"&&(r=n.blockedList).push.apply(r,i.blockedList);n.ageOfMajority=i.ageRatingUpperBound;n.startAge=i.ageRatingLowerBound;n.selectedAgeIndexMax=n.ageOfMajority-n.startAge;n.selectedAgeIndex=n.determineAgeRatingIndex(i.maxAgeRating,i.isApplicationRestrictionsEnabled,i.isGameRestrictionsEnabled).toString();n.appsGamesToggle=i.isContentEnabled;n.appsGamesToggleProtected=!!i.isContentEnabled}).catch(function(t){return n.$meeErrors.setError("ag-load-error",n.cms.Strings.ErrorLoadingData),n.$q.reject(t)}).finally(function(){n.getAppsGamesDataWorking=!1})};i.prototype.determineAgeRatingIndex=function(n,t,i){return this.contentRestrictionsService.getIsLocal()?n<=this.startAge?this.selectedAgeIndexMin:n>=this.ageOfMajority?this.selectedAgeIndexMax:t&&!i?this.selectedAgeIndexMax:n-this.startAge:n<=this.startAge?this.selectedAgeIndexMin:n>=this.ageOfMajority?this.selectedAgeIndexMax:n-this.startAge};i.prototype.setInitialNeededData=function(){this.cms=this.contentRestrictionsService.getCMS();this.childId=this.contentRestrictionsService.getChildId();this.appsGamesToggleProtected=!1;this.isLocal=this.contentRestrictionsService.getIsLocal();this.allowedConfig={watchFnPartialId:"allowed_ag",icon:"mee-icon mee-icon-GenericApp",drawerTriggerText:this.cms.Strings.AlwaysAllowed,drawerTriggerAriaLabel:this.cms.Strings.AppsGamesAriaAlwaysAllowed,overallHeader:this.cms.Strings.AppsGamesHeader,noItemsInList:this.cms.Strings.AppsGamesNoAllowedItems,removeAriaLabel:this.cms.Strings.AppsGamesAriaRemoveFromAllowed,removeFn:this.removeFromAllowedListFn.bind(this),undoAriaLabel:this.cms.Strings.AppsGamesAriaUndoRemovalAllowed,undoRemoveFn:this.undoRemoveFromAllowedListFn.bind(this)};this.blockedConfig={watchFnPartialId:"blocked_ag",icon:"mee-icon mee-icon-GenericApp",drawerTriggerText:this.cms.Strings.AlwaysBlocked,drawerTriggerAriaLabel:this.cms.Strings.AppsGamesAriaAlwaysBlocked,overallHeader:this.cms.Strings.AppsGamesHeader,noItemsInList:this.cms.Strings.AppsGamesNoBlockedItems,removeAriaLabel:this.cms.Strings.AppsGamesAriaRemoveFromBlocked,removeFn:this.removeFromBlockedListFn.bind(this),removeWarningFn:this.openRemoveBrowserWarningModal.bind(this),undoAriaLabel:this.cms.Strings.AppsGamesAriaUndoRemovalBlocked,undoRemoveFn:this.undoRemoveFromBlockedListFn.bind(this)}};i.prototype.getRatings=function(){var n=this;return this.getRatingsData().then(function(t){return n.ratings=t,n.$q.resolve()}).catch(function(t){return n.$q.reject(t)})};i.prototype.updateAppsGamesToggleFn=function(){var n=this;return this.updateAppsGamesToggleWorking=!0,this.$meeErrors.reset("ag-toggle-error"),this.updateAppsGamesToggle().then(function(){n.appsGamesToggle=!n.appsGamesToggle}).catch(function(t){return n.$meeErrors.setError("ag-toggle-error",n.cms.Strings.ErrorGeneral),n.appsGamesToggleProtected=!n.appsGamesToggleProtected,n.$q.reject(t)}).finally(function(){n.updateAppsGamesToggleWorking=!1})};i.prototype.updateAgeSettingsFn=function(){var n=this;return this.$meeErrors.reset("ag-selected-age-error"),this.updateAgeSettings().catch(function(t){return n.$meeErrors.setError("ag-selected-age-error",n.cms.Strings.ErrorGeneral),n.$q.reject(t)})};i.prototype.removeFromAllowedListFn=function(n){return this.crAppsGamesAPIService.removeFromAllowedList(n)};i.prototype.undoRemoveFromAllowedListFn=function(n){return this.crAppsGamesAPIService.undoRemoveFromAllowedList(n)};i.prototype.removeFromBlockedListFn=function(n){return n&&n.AppLimitsData?this.toggleAppLimitsBlocked(n.AppLimitsData,!1):this.crAppsGamesAPIService.removeFromBlockedList(n)};i.prototype.undoRemoveFromBlockedListFn=function(n){return n&&n.AppLimitsData?this.toggleAppLimitsBlocked(n.AppLimitsData,!0):this.crAppsGamesAPIService.undoRemoveFromBlockedList(n)};i.prototype.openRatingsModal=function(){this.contentRestrictionsService.openRatingsModal(this.ratings,this.selectedAgeIndex)};i.prototype.openRemoveBrowserWarningModal=function(n,t){this.dialogService.yesNo({title:this.cms.Strings.BlockedBrowserWarningDialogTitle,text:this.stringFormatFilter(this.cms.Strings.BlockedBrowserWarningDialogText,{appName:n}),yesLabel:this.cms.Strings.BlockedBrowserWarningDialogYesLabel,noLabel:this.cms.Strings.BlockedBrowserWarningDialogNoLabel}).then(function(n){return n==="yes"&&t()})};i.prototype.getRatingsData=function(){return this.crAppsGamesAPIService.getRegionalRatingBoards()};i.prototype.getAppsGamesData=function(){return this.crAppsGamesAPIService.getAppsGamesData()};i.prototype.updateAppsGamesToggle=function(){return this.crAppsGamesAPIService.updateAppsGamesToggle(this.appsGamesToggleProtected)};i.prototype.updateAgeSettings=function(){return this.crAppsGamesAPIService.updateAgeSettings(Number(this.selectedAgeIndex)+this.startAge)};i.prototype.getAppLimitsBlockedApps=function(){var t=this,i=this.$q.resolve({blockedApps:[]}),n=this.contentRestrictionsService.getChildInfo();return this.apiService.getUserDeviceSupportMatrix(n.FamilyServiceId,"WindowsVersionSupportsAppBlocking",n.JsonWebToken).then(function(r){var u=r.devicesByStateValue,e=u.false&&u.false.length>0,f=!e||u.true&&u.true.length>0||u.null&&u.null.length>0;return t.blockedAppsDisplayOption=e&&f?"mixed":f?"modern":"legacy",f?t.apiService.getAppLimitsBlockedApps(n.FamilyServiceId,n.JsonWebToken):i})};i.prototype.toggleAppLimitsBlocked=function(n,t){var r=this.contentRestrictionsService.getChildInfo(),i=angular.copy(n.policy);return i.enabled=i.blocked=t,i.displayName=n.name,this.apiService.setAppPolicy(r.FamilyServiceId,r.JsonWebToken,n.id,i)};var r;return i.$inject=["$q","$meeErrors","$anchorScroll","$scope","$meeA11y","apiService","dialogService","stringFormatFilter","contentRestrictionsService","crAppsGamesAPIService"],i.updateAppsGamesToggle="update-apps-games-toggle",i.updateAppsGamesAgeSetting="update-apps-games-age-setting",__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateAppsGamesToggleFn"),n.OneUI.Angular.MonitorOperationProgress(r.updateAppsGamesToggle)],i.prototype,"updateAppsGamesToggleFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateAgeSettingsFn")],i.prototype,"updateAgeSettingsFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeFromAllowedListFn")],i.prototype,"removeFromAllowedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("undoRemoveFromAllowedListFn")],i.prototype,"undoRemoveFromAllowedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeFromBlockedListFn")],i.prototype,"removeFromBlockedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("undoRemoveFromBlockedListFn")],i.prototype,"undoRemoveFromBlockedListFn",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-apps-games-settings")],i.prototype,"getAppsGamesData",null),__decorate([n.OneUI.Angular.MonitorOperationProgress(r.updateAppsGamesToggle)],i.prototype,"updateAppsGamesToggle",null),__decorate([n.OneUI.Angular.MonitorOperationProgress(r.updateAppsGamesAgeSetting)],i.prototype,"updateAgeSettings",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-app-limits-blocked-apps")],i.prototype,"getAppLimitsBlockedApps",null),r=__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"crAppsGames",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/AppsGames/cr-apps-games.html"})],i)}();t.CrAppsGamesComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.apiService=n;this.contentRestrictionsService=t}return n.prototype.setupService=function(n){this.childFamilyServiceId=n.FamilyServiceId},n.prototype.getAppsGamesData=function(){return this.apiService.getContentRestrictions(this.childFamilyServiceId)},n.prototype.updateAgeSettings=function(n){return this.apiService.updateContentRestrictionsSettings(this.childFamilyServiceId,n)},n.prototype.updateAppsGamesToggle=function(n){return this.apiService.setContentRestrictionsToggle(this.childFamilyServiceId,n)},n.prototype.removeFromAllowedList=function(n){return this.apiService.removeAppsGamesExclusion(this.childFamilyServiceId,n.ContentId)},n.prototype.removeFromBlockedList=function(n){return this.apiService.removeAppsGamesExclusion(this.childFamilyServiceId,n.ContentId)},n.prototype.undoRemoveFromAllowedList=function(n){return this.apiService.addContentRestrictionExclusion(this.childFamilyServiceId,n.ContentId,n.ContentTitle,"",n.Content.FamilyName,n.IsAllowed)},n.prototype.undoRemoveFromBlockedList=function(n){return this.apiService.addContentRestrictionExclusion(this.childFamilyServiceId,n.ContentId,n.ContentTitle,"",n.Content.FamilyName,n.IsAllowed)},n.prototype.getRegionalRatingBoards=function(){return this.apiService.getRegionalRatingBoards()},n.$inject=["apiService","contentRestrictionsService"],n}();angular.module(n.moduleName).service("crAppsGamesAPIService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$meeModal=n;this.contentRestrictionsService=t;this.$meeA11y=i;this.$timeout=r;this.contentRatings=[];this.startingAge=3}return i.prototype.$onInit=function(){var n=this;this.setInitialNeededData();this.setRatingsToShow(this.selectedAgeIndex);this.$timeout(function(){n.$meeA11y.focuser.focus("#family-dialog > div[role='dialog'] > button",{});n.$meeA11y.announcer.announce(n.cms.Strings.AppsGamesDialogContentRatingsHeader)})},i.prototype.setInitialNeededData=function(){this.cms=this.contentRestrictionsService.getCMS();this.passedData=this.$meeModal.getData();this.ratings=this.passedData.ratings;this.selectedAgeIndex=this.passedData.selectedAgeIndex},i.prototype.setRatingsToShow=function(t){var i=Number(t)+this.startingAge;this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.MSRatings));this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.TVRatings));this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.MovieRatings));this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.MusicRatings));this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.GameRatings));n.Utilities.isInFlight("FamBookRatings")&&this.contentRatings.push(this.determineRatingsToShow(i,this.ratings.BookRatings))},i.prototype.determineRatingsToShow=function(n,t){for(var r,f=-1,e=-1,u=t.length?t:this.ratings.MSRatings,i=0;i<u.length;i++)r=u[i],n>=r.Age&&f<r.Age&&(e=i,f=r.Age);return u[e]},i.$inject=["$meeModal","contentRestrictionsService","$meeA11y","$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"crRatingsDialog",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/Dialog/cr-ratings-dialog.html"})],i)}();t.CrRatingsDialogComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"crBaseLayout",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/Shared/cr-base-layout.html",transclude:{sectionHeader:"sectionHeader",leftHeaderPanel:"leftHeaderPanel",rightHeaderPanel:"rightHeaderPanel",sectionContent:"?sectionContent"}})],i)}();t.CrBaseLayoutComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$q=n;this.$meeErrors=t;this.contentRestrictionsService=i;this.$meeA11y=r;this.showLimit=5;this.showLimitDefault=5}return i.prototype.$onInit=function(){this.setInitialNeededData()},i.prototype.setInitialNeededData=function(){this.cms=this.contentRestrictionsService.getCMS()},i.prototype.showAll=function(){this.showLimit=this.data.length;this.$meeA11y.focuser.focus("#content-restrictions-showless-"+this.config.watchFnPartialId,{})},i.prototype.showLess=function(){this.showLimit=this.showLimitDefault;this.$meeA11y.focuser.focus("#content-restrictions-showall-"+this.config.watchFnPartialId,{})},i.$inject=["$q","$meeErrors","contentRestrictionsService","$meeA11y"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"crDrawerRows",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/Shared/cr-drawer-rows.html",bindings:{config:"<",data:"<"},transclude:{drawerHeader:"?drawerHeader"}})],i)}();t.CrDrawerRowsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$q=n;this.$meeErrors=t;this.contentRestrictionsService=i;this.monitoredOperation=r;this.$meeUtil=u;this.agCatalogString="catalog:"}return i.prototype.$onInit=function(){this.setInitialNeededData();this.determineDataTypeAndSetupComponentData(this.data)},i.prototype.determineDataTypeAndSetupComponentData=function(n){if(typeof n!="string"){if(n.ContentId.indexOf(this.agCatalogString)>-1){var t=n.ContentId.substring(8);this.agCatalogUrl=this.cms.Strings.CatalogUrl+t}this.displayAG=!0;this.itemTitle=n.ContentTitle;this.iconUrl=n.Content.Description.IconUriString;this.removeCallBackData=n;this.undoRemoveCallBackData=n}else this.displayAG=!1,this.itemTitle=n,this.removeCallBackData=n,this.undoRemoveCallBackData=n},i.prototype.showLegacyDeviceNotice=function(){return typeof this.data!="string"&&!this.data.IsAllowed&&!this.data.AppLimitsData},i.prototype.setInitialNeededData=function(){this.cms=this.contentRestrictionsService.getCMS();this.removed=!1;var n=this.$meeUtil.nextUid();this.watchOperationNameRemove="cr_"+this.config.watchFnPartialId+"_"+n+"_remove";this.watchOperationNameUndo="cr_"+this.config.watchFnPartialId+"_"+n+"_undo";this.watchOperationNameRemoveError="cr_"+this.config.watchFnPartialId+"_"+n+"_remove_error";this.watchOperationNameUndoError="cr_"+this.config.watchFnPartialId+"_"+n+"_undo_error"},i.prototype.removeClicked=function(){this.config.removeWarningFn&&typeof this.removeCallBackData!="string"&&this.checkIfBrowser()?this.config.removeWarningFn(this.data.ContentTitle,this.removeClickedInternal.bind(this),this.removeCallBackData):this.removeClickedInternal()},i.prototype.checkIfBrowser=function(){if(typeof this.data!="string"){if(this.data.AppLimitsData&&this.data.AppLimitsData.thirdPartyWebBrowser)return!0;var t=this.contentRestrictionsService.getBlockedBrowsers(),n=t[this.data.ContentTitle.toLowerCase()];return!!(n&&this.data.ContentId.toLowerCase().match(n))}},i.prototype.removeClickedInternal=function(){var n=this;return this.monitoredOperation(this.watchOperationNameRemove,function(){return n.$meeErrors.reset(n.watchOperationNameRemoveError),n.config.removeFn(n.removeCallBackData).then(function(t){return n.removed=!0,n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.watchOperationNameRemoveError,n.cms.Strings.ErrorAllowBlock),n.$q.reject(t)})})},i.prototype.undoClicked=function(){var n=this;return this.monitoredOperation(this.watchOperationNameUndo,function(){return n.$meeErrors.reset(n.watchOperationNameUndoError),n.config.undoRemoveFn(n.undoRemoveCallBackData).then(function(t){return n.removed=!1,n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.watchOperationNameUndoError,n.cms.Strings.ErrorAllowBlock),n.$q.reject(t)})})},i.$inject=["$q","$meeErrors","contentRestrictionsService","$meeMonitoredOperation","$meeUtil"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"crRow",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/Shared/cr-row.html",bindings:{config:"<",data:"<"}})],i)}();t.CrRowComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.apiService=n;this.contentRestrictionsService=t}return n.prototype.setupService=function(n){this.childInfo=n},n.prototype.getWebsiteFilterData=function(){return this.apiService.getWebsiteFilterSettings(this.childInfo.FamilyServiceId)},n.prototype.updateWebsiteFilterToggle=function(n){return this.apiService.setWebsiteFilterToggle(this.childInfo.FamilyServiceId,n,this.childInfo.JsonWebToken)},n.prototype.updateUseAllowedListOnly=function(n){return this.apiService.setWebsiteFilterUseAllowedListOnly(this.childInfo.FamilyServiceId,n)},n.prototype.addWebsiteToAllowedList=function(n){return this.apiService.addWebsiteToAllowedList(this.childInfo.FamilyServiceId,n)},n.prototype.addWebsiteToBlockedList=function(n){return this.apiService.addWebsiteToBlockedList(this.childInfo.FamilyServiceId,n)},n.prototype.removeWebsiteFromAllowedList=function(n){return this.apiService.removeWebsite(this.childInfo.FamilyServiceId,n)},n.prototype.removeWebsiteFromBlockedList=function(n){return this.apiService.removeWebsite(this.childInfo.FamilyServiceId,n)},n.prototype.undoRemoveAllowedWebsite=function(n){return this.apiService.addWebsiteToAllowedList(this.childInfo.FamilyServiceId,n)},n.prototype.undoRemoveBlockedWebsite=function(n){return this.apiService.addWebsiteToBlockedList(this.childInfo.FamilyServiceId,n)},n.$inject=["apiService","contentRestrictionsService"],n}();angular.module(n.moduleName).service("crWebAPIService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(t,i,r,u,f,e,o,s,h,c){var l=this;this.$q=t;this.$meeErrors=i;this.$timeout=r;this.$anchorScroll=u;this.pageReliabilityService=f;this.contentRestrictionsService=e;this.crWebAPIService=o;this.$meeA11y=s;this.$scope=h;this.surveyService=c;this.errorIdAddAllowed="cr.web.add.allowed-error";this.errorIdAddBlocked="cr.web.add.blocked-error";this.errorIdAddAllowedInlist="cr.web.add.allowed-inlist-error";this.errorIdAddBlockedInlist="cr.web.add.blocked-inlist-error";this.loadError=!1;this.urlHttpReplace="http://";this.updateWebFilterToggleId="content-restrictions-web-enable-toggle";this.updateAllowedListOnlyToggleId="content-restrictions-web-only-allowed-checkbox";this.isInSurveyFlight=n.Utilities.isInFlight("FamWebFilterSurvey");this.indexOfWebsiteInList=function(n,t){for(var r,u=l.contentRestrictionsService.cleanUrl(t),i=0;i<n.length;i++)if(r=l.contentRestrictionsService.cleanUrl(n[i]),u===r)return i;return-1}}r=i;i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.contentRestrictionsWebRestrictions};i.prototype.componentOnInit=function(){var n=this;return this.getWebFilterSettingsWorking=!0,this.setInitialNeededData(),this.getWebsiteFilterData().then(function(t){n.allowedList=t.allowedList;n.blockedList=t.blockedList;n.$timeout().then(function(){n.isWebsiteFilterEnabledProtected=!!t.isWebsiteFilterEnabled;n.useAllowedListOnlyProtected=!!t.useAllowedListOnly;n.$anchorScroll()});n.useAllowedListOnly=t.useAllowedListOnly;n.isWebsiteFilterEnabled=t.isWebsiteFilterEnabled}).catch(function(t){return n.$meeErrors.setError("web-load-error",n.cms.Strings.ErrorLoadingData),n.$q.reject(t)}).finally(function(){n.getWebFilterSettingsWorking=!1})};i.prototype.setInitialNeededData=function(){this.cms=this.contentRestrictionsService.getCMS();this.childId=this.contentRestrictionsService.getChildId();this.isWebsiteFilterEnabledProtected=!1;this.useAllowedListOnly=!1;this.isLocal=this.contentRestrictionsService.getIsLocal();this.isInAppLimitsFlight=n.Utilities.isInFlight("FamAppLimits");this.allowedConfig={watchFnPartialId:"allowed_wf",icon:"mee-icon mee-icon-Globe",drawerTriggerText:this.cms.Strings.AlwaysAllowed,drawerTriggerAriaLabel:this.cms.Strings.WebAriaAlwaysAllowed,overallHeader:this.cms.Strings.WebHeader,noItemsInList:this.cms.Strings.WebNoAllowedItems,removeAriaLabel:this.cms.Strings.WebAriaRemoveFromAllowed,removeFn:this.removeWebsiteFromAllowedListFn.bind(this),undoAriaLabel:this.cms.Strings.WebAriaUndoRemovalAllowed,undoRemoveFn:this.undoRemoveWebsiteFromAllowedListFn.bind(this)};this.blockedConfig={watchFnPartialId:"blocked_wf",icon:"mee-icon mee-icon-Globe",drawerTriggerText:this.cms.Strings.AlwaysBlocked,drawerTriggerAriaLabel:this.cms.Strings.WebAriaAlwaysBlocked,overallHeader:this.cms.Strings.WebHeader,noItemsInList:this.cms.Strings.WebNoBlockedItems,removeAriaLabel:this.cms.Strings.WebAriaRemoveFromBlocked,removeFn:this.removeWebsiteFromBlockedListFn.bind(this),undoAriaLabel:this.cms.Strings.WebAriaUndoRemovalBlocked,undoRemoveFn:this.undoRemoveWebsiteFromBlockedListFn.bind(this)};this.$meeA11y.monitorOperationProgress(this.$scope,[{operationName:r.updateWebFilterToggle,onFailureSelector:"#"+this.updateWebFilterToggleId,onSuccessAnnounce:this.cms.Strings.SuccessfullyChangedToggle,onSuccessSelector:"#"+this.updateWebFilterToggleId,onWorkingAnnounce:this.cms.Strings.Working},{operationName:r.updateAllowedListOnlyToggle,onFailureSelector:"#"+this.updateAllowedListOnlyToggleId,onSuccessSelector:"#"+this.updateAllowedListOnlyToggleId,onWorkingAnnounce:this.cms.Strings.Working}])};i.prototype.textActionKeyHandlerAllowed=function(n){n.keyCode===13&&this.addWebsiteToAllowedListFn()};i.prototype.textActionKeyHandlerBlocked=function(n){n.keyCode===13&&this.addWebsiteToBlockedListFn()};i.prototype.addWebsiteToAllowedListFn=function(){var n=this;if(this.$meeErrors.resetCategory("cr.web.add"),this.indexOfWebsiteInList(this.allowedList,this.addAllowedWebsiteText)==-1)return this.addWebsiteToAllowedList().then(function(t){n.allowedList.unshift(t.Website);var i=n.indexOfWebsiteInList(n.blockedList,n.addAllowedWebsiteText);i>-1&&n.blockedList.splice(i,1);n.addAllowedWebsiteText=null;n.$meeA11y.announcer.announce(n.cms.Strings.AriaSuccessfullyAddedWebsiteAllowed,"assertive");n.$meeA11y.focuser.focus("#content-restrictions-web-add-allowed-text-action",{})}).catch(function(t){return n.$meeErrors.setError(n.errorIdAddAllowed,n.cms.Strings.ErrorGeneral),n.$meeA11y.focuser.focus("#content-restrictions-web-add-allowed-text-action",{}),n.$q.reject(t)});this.$meeErrors.setError(this.errorIdAddAllowedInlist,this.cms.Strings.ErrorWebsiteInList)};i.prototype.addWebsiteToBlockedListFn=function(){var n=this;if(this.$meeErrors.resetCategory("cr.web.add"),this.indexOfWebsiteInList(this.blockedList,this.addBlockedWebsiteText)==-1)return this.addWebsiteToBlockedList().then(function(t){n.blockedList.unshift(t.Website);var i=n.indexOfWebsiteInList(n.allowedList,n.addBlockedWebsiteText);i>-1&&n.allowedList.splice(i,1);n.addBlockedWebsiteText=null;n.$meeA11y.announcer.announce(n.cms.Strings.AriaSuccessfullyAddedWebsiteBlocked,"assertive");n.$meeA11y.focuser.focus("#content-restrictions-web-add-blocked-text-action",{})}).catch(function(t){return n.$meeErrors.setError(n.errorIdAddBlocked,n.cms.Strings.ErrorGeneral),n.$meeA11y.focuser.focus("#content-restrictions-web-add-blocked-text-action",{}),n.$q.reject(t)});this.$meeErrors.setError(this.errorIdAddBlockedInlist,this.cms.Strings.ErrorWebsiteInList)};i.prototype.updateUseAllowedListOnlyFn=function(){var n=this;return this.$meeErrors.reset("web-use-allowed-only-error"),this.websiteFilterCheckboxChangedWorking=!0,this.updateUseAllowedListOnly().then(function(){n.useAllowedListOnly=!n.useAllowedListOnly}).catch(function(t){return n.$meeErrors.setError("web-use-allowed-only-error",n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.useAllowedListOnlyProtected=!n.useAllowedListOnlyProtected}),n.$q.reject(t)}).finally(function(){n.websiteFilterCheckboxChangedWorking=!1})};i.prototype.updateIsWebsiteFilterEnabledFn=function(){var n=this;return this.$meeErrors.reset("web-toggle-error"),this.updateWebFilterToggleWorking=!0,this.isInSurveyFlight&&!this.isWebsiteFilterEnabledProtected&&this.surveyService.showSurvey("fam-web-filter-survey"),this.updateIsWebsiteFilterEnabled().then(function(){return n.isWebsiteFilterEnabled=!!n.isWebsiteFilterEnabledProtected,n.contentRestrictionsService.updateViewWhenWebFilterToggleChanged(),n.$q.resolve()}).catch(function(t){return n.$meeErrors.setError("web-toggle-error",n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.isWebsiteFilterEnabledProtected=!n.isWebsiteFilterEnabledProtected}),n.$q.reject(t)}).finally(function(){n.updateWebFilterToggleWorking=!1})};i.prototype.removeWebsiteFromAllowedListFn=function(n){return this.crWebAPIService.removeWebsiteFromAllowedList(n)};i.prototype.undoRemoveWebsiteFromAllowedListFn=function(n){return this.crWebAPIService.undoRemoveAllowedWebsite(n)};i.prototype.removeWebsiteFromBlockedListFn=function(n){return this.crWebAPIService.removeWebsiteFromBlockedList(n)};i.prototype.undoRemoveWebsiteFromBlockedListFn=function(n){return this.crWebAPIService.undoRemoveBlockedWebsite(n)};i.prototype.getWebsiteFilterData=function(){return this.crWebAPIService.getWebsiteFilterData()};i.prototype.updateIsWebsiteFilterEnabled=function(){return this.crWebAPIService.updateWebsiteFilterToggle(this.isWebsiteFilterEnabledProtected)};i.prototype.addWebsiteToAllowedList=function(){return this.crWebAPIService.addWebsiteToAllowedList(this.addAllowedWebsiteText)};i.prototype.addWebsiteToBlockedList=function(){return this.crWebAPIService.addWebsiteToBlockedList(this.addBlockedWebsiteText)};i.prototype.updateUseAllowedListOnly=function(){return this.crWebAPIService.updateUseAllowedListOnly(this.useAllowedListOnlyProtected)};var r;return i.$inject=["$q","$meeErrors","$timeout","$anchorScroll","pageReliabilityService","contentRestrictionsService","crWebAPIService","$meeA11y","$scope","surveyService"],i.updateWebFilterToggle="update-web-filter-toggle",i.updateAllowedListOnlyToggle="update-allowed-list-only",__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("addWebsiteToAllowedListFn")],i.prototype,"addWebsiteToAllowedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("addWebsiteToBlockedListFn")],i.prototype,"addWebsiteToBlockedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateUseAllowedListOnlyFn"),n.OneUI.Angular.MonitorOperationProgress(r.updateAllowedListOnlyToggle)],i.prototype,"updateUseAllowedListOnlyFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateIsWebsiteFilterEnabledFn"),n.OneUI.Angular.MonitorOperationProgress(r.updateWebFilterToggle)],i.prototype,"updateIsWebsiteFilterEnabledFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeWebsiteFromAllowedListFn")],i.prototype,"removeWebsiteFromAllowedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("undoRemoveWebsiteFromAllowedListFn")],i.prototype,"undoRemoveWebsiteFromAllowedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("removeWebsiteFromBlockedListFn")],i.prototype,"removeWebsiteFromBlockedListFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("undoRemoveWebsiteFromBlockedListFn")],i.prototype,"undoRemoveWebsiteFromBlockedListFn",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-website-filter-settings")],i.prototype,"getWebsiteFilterData",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("update-website-filter-toggle")],i.prototype,"updateIsWebsiteFilterEnabled",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("add-website-to-allowed-list")],i.prototype,"addWebsiteToAllowedList",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("add-website-to-blocked-list")],i.prototype,"addWebsiteToBlockedList",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("update-use-allowed-list-only")],i.prototype,"updateUseAllowedListOnly",null),r=__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"crWeb",{templateUrl:t.settingsFolderBasePath+"ContentRestrictions/WebBrowsing/cr-web.html"})],i)}();t.CrWebComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(t,i,r,u,f,e,o,s,h,c,l,a){this.$state=t;this.$q=i;this.apiService=r;this.$timeout=u;this.$scope=f;this.currentUser=e;this.areaNameLookupService=o;this.telemetryService=s;this.deviceHelperService=h;this.formatString=c;this.scriptLoader=l;this.appConfig=a;this.isFindYourChildActivated=!1;this.notifications=[];this.isLocationToggleDisabled=!1;this.isInCasaFlight=!1;this.isInCasaCtaFlight=!1;this.deviceTypePhone=1;this.bingMapsOptions={apiKey:n.BingMapJsSettings.key,viewType:0,showDashboard:!0,showZoomButtons:!0,zoom:12,minZoom:3,maxZoom:15}}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.findYourChild},i.prototype.componentOnInit=function(){var t=this;return(this.cms=this.compassContent.template,!this.cms)?this.$q.reject("Error: FindYourChild.componentOnInit: cms is null"):(this.isInCasaFlight=n.Utilities.isInFlight("CasaFindChild"),this.isInCasaCtaFlight=n.Utilities.isInFlight("CasaFindChildCta"),this.isFamAmesLocationEnabled=n.Utilities.isInFlight("FamAmesLocation"),this.isInCasaFlight)?this.$q.resolve():(this.getBingMapsJsPromise=this.scriptLoader.loadScript(this.appConfig.external.bingMapJs),this.upsellDisclaimer=this.formatString(this.cms.Strings.UpsellDisclaimer,this.cms.Strings.LauncherVersion),this.cms.Strings.ErrorLocationNotFoundLinkUrl=this.formatString(this.cms.Strings.ErrorLocationNotFoundLinkUrl,{CLCID_HEX:this.currentUser.lcid}),this.cms.Strings.DeviceNotifyLauncherAttentionFixLinkUrl=this.formatString(this.cms.Strings.DeviceNotifyLauncherAttentionFixLinkUrl,{CLCID_HEX:this.currentUser.lcid}),this.mapInitializingDefered=this.$q.defer(),this.apiService.getPrivacyOBOBit(this.childInfo).then(function(n){var i=n.locationPrivacy==null?!0:n.locationPrivacy;return i?t.getFindYourChildSettings().then(function(n){if(n&&n.IsEnabled){var i=t.getMLSData(),r=t.getWindowsPhoneDevices(),u=t.apiService.getDeviceNotifications(t.childInfo.Puid);return t.$q.all([i,r,u]).then(t.handleInitPromises.bind(t)).then(function(){return t.mapInitializingDefered.promise})}return t.updateLocationString(),t.ensureBingMapsJsAndReloadMapImpl(),t.mapInitializingDefered.promise}):(t.updateLocationString(),t.ensureBingMapsJsAndReloadMapImpl(),t.isLocationToggleDisabled=!0,t.mapInitializingDefered.promise)}))},i.prototype.getLastUpdatedPhone=function(t,i){var f,e,r,u,o,s,h;return t=t||{HasLocation:!1,Location:null},f=_.where(i,{Locatable:!0,DeviceType:this.deviceTypePhone}).filter(function(n){return!!n.LastKnownLocation}),e=f.length>0,e&&(u=f.sort(function(n,t){return n.LastUpdatedTimeUnixTimestamp-t.LastUpdatedTimeUnixTimestamp})[0],r=u),t.HasLocation&&(o={DeviceId:t.Location.Source.DeviceId,DeviceODataType:n.Shared.Family.DeviceODataEnumClass.Android,DisplayDeviceType:"",Version:"",Name:t.Location.Source.DeviceName},r=o),e&&t.HasLocation&&(s=new Date(u.LastUpdatedTimeUnixTimestamp),h=new Date(t.Location.DateTime),r=h>=s?o:u),r},i.prototype.handleInitPromises=function(n){var u=n[0],s=n[1],t=n[2],f=s[this.childInfo.Puid],i,r,e,o;if(this.hasEligibleDevice=this.getEligiblePhones(f).length>0,this.mlsLocationInfo=u,this.selectedPhone=this.getLastUpdatedPhone(u,f),this.updateLocationString(),this.ensureBingMapsJsAndReloadMapImpl(),t&&t.launcherNeedsAttentionDevices&&t.launcherNeedsAttentionDevices.length>0)for(i=0,r=t.launcherNeedsAttentionDevices;i<r.length;i++)e=r[i],o=this.formatString(this.cms.Strings.DeviceNotifyLauncherAttentionMessage,{devicename:e.deviceName}),this.notifications.push(o)},i.prototype.getMLSData=function(){return this.apiService.getChildLauncherLocation(this.childInfo.Cid)},i.prototype.getWindowsPhoneDevices=function(){return this.apiService.getAllDevices(this.childInfo.Puid,this.childInfo.JsonWebToken)},i.prototype.showUpsell=function(){return!this.hasEligibleDevice&&this.isFindYourChildActivated||!this.isFindYourChildActivated},i.prototype.showErrorMessage=function(){return!this.hasLocation()&&this.hasEligibleDevice&&this.isFindYourChildActivated&&this.notifications.length===0},i.prototype.canEnableFindYourChild=function(){return this.selectedPhone!=null},i.prototype.isFindYourChildViewActivated=function(){return this.canEnableFindYourChild()&&this.isFindYourChildActivated},i.prototype.hasLocation=function(){return this.latestLocationResponse&&this.latestLocationResponse.locations.length>0},i.prototype.showLocationString=function(){return this.childLocationString&&this.hasLocation()&&this.isFindYourChildViewActivated()},i.prototype.locationTimeString=function(){return this.lastLocation=new Date(this.latestLocationResponse.locations[0].timestamp),this.lastLocation.toLocaleString()},i.prototype.getEligiblePhones=function(n){var t=this,i;return n?(i=_.where(n,{DeviceType:this.deviceTypePhone}),i.filter(function(n){return t.deviceHelperService.isWindows10(n)||t.deviceHelperService.isAndroid(n)})):[]},i.prototype.convertLocationDataToPin=function(n){return{longitude:n.long,latitude:n.lat,icon:{url:""},data:n}},i.prototype.ensureBingMapsJsAndReloadMapImpl=function(){var n=this;this.getBingMapsJsPromise.then(function(){return n.reloadMapImpl()})},i.prototype.reloadMapImpl=function(){this.$scope.$broadcast(n.Shared.Angular.Components.BingMapsComponent.RefreshMapEvent)},i.prototype.onGetMapHeight=function(){return angular.element(".map").height()},i.prototype.updateFindYourChildActivatedFn=function(){var n=this;return this.apiService.updateFindYourChildIsEnabledSettings(this.childInfo.Puid,this.isFindYourChildActivated).then(function(){if(n.isFindYourChildActivated){var t=n.getMLSData(),i=n.getWindowsPhoneDevices(),r=n.apiService.getDeviceNotifications(n.childInfo.Puid);return n.$q.all([t,i,r]).then(n.handleInitPromises.bind(n))}})},i.prototype.getFindYourChildSettings=function(){var n=this;return this.apiService.getFindYourChildIsEnabledSettings(this.childInfo.Puid).then(function(t){return n.isFindYourChildActivated=t.IsEnabled,t})},i.prototype.onMapInitializerError=function(){this.mapInitializingDefered.reject("Failed to initialize Bing Maps control")},i.prototype.onLoadLocations=function(){var i=this,r=this.getLocationData(),t=r.locations.map(function(n){return i.convertLocationDataToPin(n)});return this.$scope.$broadcast(n.Shared.Angular.Components.BingMapsComponent.AddLocationsMapEvent,t),this.updateLocationString(),this.mapInitializingDefered.resolve(),this.$q.resolve(t)},i.prototype.getLocationData=function(){return this.latestLocationResponse=this.selectedPhone&&this.isFindYourChildViewActivated()?this.deviceHelperService.isAndroid(this.selectedPhone)?{locations:[{category:"",lat:this.mlsLocationInfo.Location.Latitude,long:this.mlsLocationInfo.Location.Longitude,timestamp:this.mlsLocationInfo.Location.DateTime}]}:{locations:[{category:"",lat:+this.selectedPhone.LastKnownLocation.Location.Latitude,long:+this.selectedPhone.LastKnownLocation.Location.Longitude,timestamp:""+this.selectedPhone.LastUpdatedTimeUnixTimestamp}]}:{locations:[]},this.latestLocationResponse},i.prototype.updateLocationString=function(){var n=this;this.hasLocation()?this.areaNameLookupService.getAreaName(this.latestLocationResponse.locations[0]).then(function(t){n.childLocationString=t}):this.childLocationString=""},i.$inject=["$state","$q","apiService","$timeout","$scope","currentUser","areaNameLookupService","telemetryService","familyDeviceHelperService","stringFormatFilter","scriptLoaderService","familyConfig"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getMLSData")],i.prototype,"getMLSData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getAllDevices")],i.prototype,"getWindowsPhoneDevices",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateFindYourChildEnabledToggle"),n.OneUI.Angular.MonitorOperationProgress("set-find-your-child-enabled")],i.prototype,"updateFindYourChildActivatedFn",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-find-your-child-enabled")],i.prototype,"getFindYourChildSettings",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"findYourChild",{templateUrl:t.settingsFolderBasePath+"FindYourChild/find-your-child.html",bindings:{compassContent:"<",childInfo:"<"}})],i)}();t.FindYourChildComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function t(n,t){this.$q=n;this.apiService=t}return t.prototype.configurePageService=function(n,t){this.cms=n;this.familyRosterModel=t},t.prototype.getCMS=function(){return this.cms},t.prototype.getUsersThatCanView=function(){var n=this.familyRosterModel.getAdults(),t=this.getCurrentUser();return _.filter(n,function(n){return n.Cid!=t.Cid})},t.prototype.getCurrentUser=function(){return this.familyRosterModel.currentMember},t.prototype.getPXSUserSettings=function(){var n=this;return this.apiService.getManagePermissionsPXSUserSettingsOneUi().then(function(t){return n.userSettings=t,n.$q.resolve(n.convertToManagePermissionsModel(t))})},t.prototype.updateLocationBit=function(n){var t=this,i=this.userSettings.locationPrivacy;return this.userSettings.locationPrivacy=n,this.setPXSUserSettings().catch(function(n){return t.userSettings.locationPrivacy=i,t.$q.reject(n)})},t.prototype.updateOBOPrivacyBit=function(n){var t=this,i=this.userSettings.onBehalfOfPrivacy;return this.userSettings.onBehalfOfPrivacy=n,this.setPXSUserSettings().catch(function(n){return t.userSettings.onBehalfOfPrivacy=i,t.$q.reject(n)})},t.prototype.setPXSUserSettings=function(){var n=this;return this.apiService.setManagePermissionsPXSUserSettingsOneUi(this.userSettings).then(function(t){n.userSettings=t}).catch(function(t){if(t&&t.jqXHR){var i=t.jqXHR.responseJSON;if(i&&i.succeeded)return n.userSettings=i,n.$q.resolve()}return n.$q.reject(t)})},t.prototype.convertToManagePermissionsModel=function(n){return{locationPrivacy:n.locationPrivacy==null?!0:n.locationPrivacy,onBehalfOfPrivacy:n.onBehalfOfPrivacy==null?!0:n.onBehalfOfPrivacy,toggleAgeGroup:n.toggleAgeGroup}},t.$inject=["$q","apiService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("pxs.working")],t.prototype,"updateLocationBit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("pxs.working")],t.prototype,"updateOBOPrivacyBit",null),t}();angular.module(t.moduleName).service("managePermissionsService",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.managePermissionsService=n;this.pageReliabilityService=t}return i.prototype.$onInit=function(){this.cms=this.compassContent.template;this.managePermissionsService.configurePageService(this.cms,this.familyRosterModel);this.isAdmin=this.managePermissionsService.getCurrentUser().IsParent;this.isAdmin||(this.pageReliabilityService.addRequiredComponentName(t.settingsComponentNames.managePermissionsActivityReporting),this.pageReliabilityService.addRequiredComponentName(t.settingsComponentNames.managePermissionsLocation))},i.$inject=["managePermissionsService","pageReliabilityService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"$onInit",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"managePermissions",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/manage-permissions.html",bindings:{compassContent:"<",familyRosterModel:"<"}})],i)}();t.ManagePermissionsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$q=n;this.$meeErrors=t;this.$timeout=i;this.managePermissionsService=r;this.$meeA11y=u;this.isActivityPermissionsEnabled=!0;this.isActivityPermissionsEnabledProtector=!0;this.toggleErrorId="error.mp.activity.toggle"}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.managePermissionsActivityReporting},i.prototype.componentOnInit=function(){return this.setInitialNeededData(),this.getActivityPermissionsData()},i.prototype.setInitialNeededData=function(){this.cms=this.managePermissionsService.getCMS();this.canViewList=this.managePermissionsService.getUsersThatCanView();var n=this.managePermissionsService.getCurrentUser();this.descriptionText=n.IsChild?this.cms.ParagraphsWithStyleCompiled.ActivityReportingDescription:this.cms.ParagraphsWithStyleCompiled.ActivityReportingDescription},i.prototype.getActivityPermissionsData=function(){var n=this;return this.isActivityToggleDisabled=!0,this.managePermissionsService.getPXSUserSettings().then(function(t){n.$timeout().then(function(){n.isActivityPermissionsEnabledProtector=!!t.onBehalfOfPrivacy;n.isActivityPermissionsEnabled=!!t.onBehalfOfPrivacy});var i=t.toggleAgeGroup==="upsell"||t.toggleAgeGroup==="disabled";return n.isActivityToggleDisabled=!!i,t}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$q.reject(t)})},i.prototype.setActivityPermissionsToggle=function(){var n=this;return this.$meeErrors.reset(this.toggleErrorId),this.managePermissionsService.updateOBOPrivacyBit(this.isActivityPermissionsEnabledProtector).then(function(t){return n.isActivityPermissionsEnabled=!!n.isActivityPermissionsEnabledProtector,t}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.isActivityPermissionsEnabledProtector=!n.isActivityPermissionsEnabledProtector}),n.$q.reject(t)}).finally(function(){n.$meeA11y.focuser.focus("#manage-permissions-activity-toggle",{})})},i.$inject=["$q","$meeErrors","$timeout","managePermissionsService","$meeA11y"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getActivityPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("get-activity-permissions")],i.prototype,"getActivityPermissionsData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("setActivityPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("set-activity-permissions")],i.prototype,"setActivityPermissionsToggle",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"mpActivity",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/ActivityReporting/mp-activity.html"})],i)}();t.MpActivityComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.$q=n;this.$meeErrors=t;this.$timeout=i;this.managePermissionsService=r;this.apiService=u;this.$meeA11y=f;this.toggleErrorId="error.mp.devices.toggle"}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.managePermissionsDevices},i.prototype.componentOnInit=function(){return this.setInitialNeededData(),this.getDevicesPermissionsData()},i.prototype.setInitialNeededData=function(){this.cms=this.managePermissionsService.getCMS();this.canViewList=this.managePermissionsService.getUsersThatCanView();this.isDevicesPermissionsEnabledProtector=!1;var n=this.managePermissionsService.getCurrentUser();this.descriptionText=n.IsChild?this.cms.ParagraphsWithStyleCompiled.ChildDevicesDescription:this.cms.ParagraphsWithStyleCompiled.AdultDevicesDescription},i.prototype.getDevicesPermissionsData=function(){var n=this;return this.isDevicesToggleDisabled=!0,this.getDevicesPermissionsDataCall().then(function(t){return n.$timeout().then(function(){if(t.useDefaultValue){var i=n.managePermissionsService.getCurrentUser();n.isDevicesPermissionsEnabledProtector=!!(i&&i.IsChild);n.isDevicesPermissionsEnabled=!!(i&&i.IsChild)}else n.isDevicesPermissionsEnabledProtector=!!t.isDeviceHealthToggleOn,n.isDevicesPermissionsEnabled=!!t.isDeviceHealthToggleOn}),n.isDevicesToggleDisabled=!t.isDeviceHealthToggleEnabled,n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$q.reject(t)})},i.prototype.setDevicesPermissionsToggle=function(){var n=this;return this.$meeErrors.reset(this.toggleErrorId),this.setDeviceHealthPermissionsToggleCall(this.isDevicesPermissionsEnabledProtector).then(function(t){return n.isDevicesPermissionsEnabled=!!n.isDevicesPermissionsEnabledProtector,n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.isDevicesPermissionsEnabledProtector=!n.isDevicesPermissionsEnabledProtector}),n.$q.reject(t)}).finally(function(){n.$meeA11y.focuser.focus("#manage-permissions-devices-toggle",{})})},i.prototype.getDevicesPermissionsDataCall=function(){return this.apiService.getManagePermissionsDevicesSettingOneUi()},i.prototype.setDeviceHealthPermissionsToggleCall=function(n){return this.apiService.setDeviceHealthPermissionsToggle(n)},i.$inject=["$q","$meeErrors","$timeout","managePermissionsService","apiService","$meeA11y"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getDevicesPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("get-devices-permissions")],i.prototype,"getDevicesPermissionsData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("setDevicesPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("set-devices-permissions")],i.prototype,"setDevicesPermissionsToggle",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getDeviceHealthPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("get-devices-permissions-data")],i.prototype,"getDevicesPermissionsDataCall",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("setDeviceHealthPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("set-devices-permissions-toggle")],i.prototype,"setDeviceHealthPermissionsToggleCall",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"mpDevices",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/Devices/mp-devices.html"})],i)}();t.MpDevicesComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$q=n;this.$meeErrors=t;this.$timeout=i;this.managePermissionsService=r;this.$meeA11y=u;this.toggleErrorId="error.mp.location.toggle";this.isFamAmesLocationEnabled=!1}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.managePermissionsLocation},i.prototype.componentOnInit=function(){return this.cms=this.managePermissionsService.getCMS(),this.canViewList=this.managePermissionsService.getUsersThatCanView(),this.toggle={isDisabled:!0,isPermissionEnabled:!0,isPermissionEnabledProtector:!0},this.isFamAmesLocationEnabled=n.Utilities.isInFlight("FamAmesLocation"),this.getLocationPermissions()},i.prototype.getLocationPermissions=function(){var n=this;return this.managePermissionsService.getPXSUserSettings().then(function(t){return n.$timeout().then(function(){n.toggle.isPermissionEnabledProtector=!!t.locationPrivacy;n.toggle.isPermissionEnabled=!!t.locationPrivacy}),n.toggle.isDisabled=!!(t.toggleAgeGroup==="upsell"||t.toggleAgeGroup==="disabled"),n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$q.reject(t)})},i.prototype.setLocationPermissionsToggle=function(){var n=this;return this.$meeErrors.reset(this.toggleErrorId),this.managePermissionsService.updateLocationBit(this.toggle.isPermissionEnabledProtector).then(function(t){return n.toggle.isPermissionEnabled=!!n.toggle.isPermissionEnabledProtector,n.$q.resolve(t)}).catch(function(t){return n.$meeErrors.setError(n.toggleErrorId,n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.toggle.isPermissionEnabledProtector=!n.toggle.isPermissionEnabledProtector}),n.$q.reject(t)}).finally(function(){n.$meeA11y.focuser.focus("#manage-permissions-location-toggle",{})})},i.$inject=["$q","$meeErrors","$timeout","managePermissionsService","$meeA11y"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("getLocationPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("get-location-permissions")],i.prototype,"getLocationPermissions",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("setLocationPermissionsToggle"),n.OneUI.Angular.MonitorOperationProgress("set-location-permissions")],i.prototype,"setLocationPermissionsToggle",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"mpLocation",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/Location/mp-location.html"})],i)}()})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"mpBase",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/Shared/mp-base.html",transclude:{mpHeader:"mpHeader",leftColumn:"leftColumn",rightColumn:"rightColumn",canViewContent:"canViewContent"}})],i)}();t.MpViewComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.managePermissionsService=n}return i.prototype.$onInit=function(){this.setInitialNeededData()},i.prototype.setInitialNeededData=function(){this.cms=this.managePermissionsService.getCMS()},i.$inject=["managePermissionsService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"mpCanView",{templateUrl:t.settingsFolderBasePath+"ManagePermissions/Shared/mp-can-view.html",bindings:{canViewList:"<",listLabel:"@"}})],i)}();t.MpCanViewComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a){this.$rootScope=n;this.$window=t;this.$scope=i;this.$meeErrors=r;this.$state=u;this.$q=f;this.appConfig=e;this.telemetry=o;this.svc=s;this.metatagService=h;this.currentUser=c;this.formatString=l;this.casaInstallModalService=a;this.disabledToggle=!1;this.getPermissionBitWorking=!0;this.permissionDenied=!1;this.showChildUpsell=!1}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.recentActivity},i.prototype.componentOnInit=function(){var t=this;return this.content={views:{child:"settings/recent-activity/child",childPrevious:"settings/recent-activity/child/previous-seven-days",local:"settings/recent-activity/local",standard:"settings/recent-activity",previous:"settings/recent-activity/previous-seven-days",previousLocal:"settings/recent-activity/previous-seven-days/local"},childId:this.$state.params.childId},this.content.views.current=this.content.views.standard,this.handlers={webreport:{isReadOnly:!1,onAllowDomainCallback:function(n){return t.onAllow(n.head.comparable,n)},onAllowDomainUndoCallback:function(n){return t.onUndoAllow(n)},onAllowUriCallback:function(n){return t.onAllow(n.head.comparable,n)},onAllowUriUndoCallback:function(n){return t.onUndoAllow(n)},onBlockDomainCallback:function(n){return t.onBlock(n.head.comparable,n)},onBlockDomainUndoCallback:function(n){return t.onUndoBlock(n)},onBlockUriCallback:function(n){return t.onBlock(n.head.comparable,n)},onBlockUriUndoCallback:function(n){return t.onUndoBlock(n)},onExpandCallback:function(){},onShowAllCallback:function(){}},appreport:{isReadOnly:!1,onExpandCallback:function(){},onShowAllCallback:function(){},onAllowCallback:function(n){return t.onRestrictApp(n,n.datamodel.Allowed)},onBlockCallback:function(n){return t.onRestrictApp(n,n.datamodel.Allowed)},onAllowUndoCallback:function(n){return t.onRestrictApp(n,!n.datamodel.Allowed)},onBlockUndoCallback:function(n){return t.onRestrictApp(n,!n.datamodel.Allowed)}}},this.components={drawers:{}},this.showUpsell=!1,this.showDeviceNotifications=!1,this.isInMiscStringsFlight=n.Utilities.isInFlight("CasaMiscStrings"),this.postPrivacyChangeOnInit().then(function(){return t.casaInstallModalService.launchModal()})},i.prototype.postPrivacyChangeOnInit=function(){var t=this.svc.getCompassContent(!0),n,i;return t.then(this.onLoadCompassContent.bind(this)),n=this.svc.getUserInfo(this.content.childId,!0),n.then(this.onLoadRosterContent.bind(this)),i=this.svc.getPrivacyOboBit(n),this.handlePrivacyBitPromise(i,t,n),this.$q.all([t,n,i])},i.prototype.handlePrivacyBitPromise=function(n,t,i){var r=this;return n.then(function(n){var u,f=n.onBehalfOfPrivacy==null?!0:n.onBehalfOfPrivacy;return f?u=r.onPermissionAllowedLoadData(t,i):(r.permissionDenied=!0,u=r.$q.resolve(f),r.showChildUpsell=r.content.roster.isChild),r.getPermissionBitWorking=!1,u}).catch(function(n){return r.getPermissionBitWorking=!1,r.$q.reject(n)})},i.prototype.onPermissionAllowedLoadData=function(n,t){var i=this.svc.getSettingsChain(this.content.childId,!0),r=this.svc.getReportChain(this.content.childId,!1,!0),u=this.$q.all([n,t]),f=this.$q.all([n,i]),e=this.$q.all([n,i,r]);return i.then(this.onLoadSettingsContent.bind(this)),r.then(this.onLoadReportContent.bind(this)),this.$q.all([u.then(this.onLoadRosterExperience.bind(this)),f.then(this.onLoadSettingsControls.bind(this)),e.then(this.onLoadFullReport.bind(this))])},i.prototype.$onDestroy=function(){this.svc.clearCache();this.metatagService.clear()},i.prototype.onLoadCompassContent=function(n){if(this.content.compass=n,this.content.compass&&this.content.compass.ReportRangeLastWeek&&this.content.compass.ReportRangePreviousWeek){this.content.compass.ColdStartHeaderSubTextDisclaimer=this.formatString(this.content.compass.ColdStartHeaderSubTextDisclaimer,this.content.compass.LauncherVersion);this.content.compass.InPrivateBrowsingMessageUrl=this.formatString(this.content.compass.InPrivateBrowsingMessageUrl,this.currentUser.lcid);this.content.compass.DeviceNotifyLauncherAttentionFixLinkUrl=this.formatString(this.content.compass.DeviceNotifyLauncherAttentionFixLinkUrl,{CLCID_HEX:this.currentUser.lcid});var t=[{biId:"this-week",text:this.content.compass.ReportRangeLastWeek,val:this.content.compass.ReportRangeLastWeek},{biId:"previous-week",text:this.content.compass.ReportRangePreviousWeek,val:this.content.compass.ReportRangePreviousWeek}];this.components.selector={options:t,model:t[0].val,isPreviousWeek:!1,disabled:""};this.components.drawers.web={kind:"",state:"expanded"};this.components.drawers.app={kind:"",state:"expanded"};this.components.drawers.screen={kind:"",state:"expanded"};this.components.drawers.search={kind:"",state:"expanded"};this.components.drawers.privacy={kind:"",state:"expanded"};this.components.drawers.notifications={kind:"divider",state:"expanded"}}else throw new Error("Error: onLoadCompassContent: compass content is not retreived properly");},i.prototype.onLoadRosterContent=function(n){this.content.roster=n;n.shouldRedirect===!0&&this.$state.go("Family.Home")},i.prototype.onLoadSettingsContent=function(n){this.content.settings=n},i.prototype.onLoadReportContent=function(){},i.prototype.onLoadSettingsControls=function(){this.components.toggles={report:{id:"report-toggle",isOn:this.content.settings.AreActivityReportsEnabled,caption:this.content.compass.SettingToggleControlLabel,onLabel:this.content.compass.SettingToggleControlOn,offLabel:this.content.compass.SettingToggleControlOff,isDisabled:!1},email:{id:"email-toggle",isOn:this.content.settings.AreEmailReportsEnabled,caption:this.content.compass.EmailToggleControlLabel,onLabel:this.content.compass.EmailToggleControlOn,offLabel:this.content.compass.EmailToggleControlOff,isDisabled:!1}};var n=this.content.settings.AreActivityReportsEnabled?"":"expanded";this.components.drawers.settings={kind:"divider",state:n};this.showUpsell=!this.content.settings.AreActivityReportsEnabled},i.prototype.onLoadRosterExperience=function(){var n={name:"failed",props:{text:this.content.compass.ErrorReportLoad}},t={name:"inProgress"},i={name:"finished"},f=this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.WebBrowsingNoActivityMessageForChild,parentMsg:this.content.compass.WebBrowsingNoActivityMessage}),r,u;this.content.webreport={state:f.state,states:f.states,blocked:this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.BlockedWebsitesNoActivityMessageForChild,parentMsg:this.content.compass.BlockedWebsitesNoActivityMessage}),visited:this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.VisitedWebsitesNoActivityMessageForChild,parentMsg:this.content.compass.VisitedWebsitesNoActivityMessage}),suspect:this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.SuspiciousWebsitesNoActivityMessageForChild,parentMsg:this.content.compass.SuspiciousWebsitesNoActivityMessage})};this.content.appreport={combined:this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.AppsGamesNoActivityMessageForChild,parentMsg:this.content.compass.AppsGamesNoActivityMessage})};r=this.setupStates({progress:t,failed:n,finished:i,childMsg:this.content.compass.SearchesNoActivityMessageForChild,parentMsg:this.content.compass.SearchesNoActivityMessage});this.content.searchreport={state:r.state,states:r.states,web:{heading:this.content.compass.SearchesSubHeaderWeb},video:{heading:this.content.compass.SearchesSubHeaderVideo},image:{heading:this.content.compass.SearchesSubHeaderImage}};u=this.setupStates({childMsg:this.content.compass.ScreenTimeNoActivityMessageForChild,parentMsg:this.content.compass.ScreenTimeNoActivityMessage});this.content.screentimereport={state:u.state,states:u.states};this.content.webreport.state=this.content.webreport.states.progress},i.prototype.setupStates=function(n){var t=n.inert||{name:"inert",props:{text:this.content.roster.isChild?n.childMsg:n.parentMsg}},i=n.progress||{name:"inProgress"},r=n.failed||{name:"failed",props:{text:this.content.compass.ErrorReportLoad}},u=n.finished||{name:"finished"};return{state:t,states:{inert:t,progress:i,failed:r,finished:u}}},i.prototype.onLoadWebReport=function(n){var i=this.content.webreport,r=this.updateXTable(n.blocked,"blocked"),u=this.updateXTable(n.visited,"visited"),f=this.updateXTable(n.suspect,"suspect"),e=r+u+f,t;i.state=i&&e!==0?i.states.finished:i.states.inert;t=this.content.searchreport;t.web.results=n.web;t.image.results=n.image;t.video.results=n.video;t.state=n.web.length>0||n.image.length>0||n.video.length>0?t.states.finished:t.states.inert},i.prototype.onLoadAppReport=function(n){var t=this.content.appreport,i=n.combined;t.combined.data=n.combined;t.combined.state=i&&i.rows.length>0?t.combined.states.finished:t.combined.states.inert},i.prototype.onLoadScreenTimeReport=function(n){var t=this.content.screentimereport;t.data=n;t.state=n.chartData&&n.chartData.perDeviceData&&n.chartData.perDeviceData.length>0?t.states.finished:t.states.inert},i.prototype.onLoadFullReport=function(n){var t=this.content.webreport,i=n[2]&&n[2].WebReport,r;t.state=i&&i.length!=0?t.states.finished:t.states.inert;n[2]&&!this.content.roster.isChild&&(this.content.basicTelemetryDevices=n[2].BasicTelemetryDevices,this.content.syncFailedDevices=n[2].SyncFailedDevices,this.content.launcherNeedsAttentionDevices=n[2].LauncherNeedsAttentionDevices,this.content.devicesWithErrorStates=n[2].DevicesWithErrorStates,this.content.devicesWithErrorStates&&(this.content.devicesWithErrorStates=this.content.devicesWithErrorStates.filter(function(n){return n.PrimaryErrorStateType!=="WindowsDesktopWindowsVersionSupportsAppBlocking"})),r=[this.content.basicTelemetryDevices,this.content.syncFailedDevices,this.content.launcherNeedsAttentionDevices,this.content.devicesWithErrorStates,],this.showDeviceNotifications=r.some(function(n){return n&&n.length>0}));this.handlers.webreport.isReadOnly=!this.content.settings.IsWebsiteFilteringEnabled||this.content.roster.isChild===!0;this.handlers.appreport.isReadOnly=!this.content.settings.hasStoreAppRestrictionsEnabled&&!this.content.settings.hasWin32AppRestrictionsEnabled||this.content.roster.isChild===!0;var u=this.svc.getWebReport(this.content.roster.familySid,!1,!1,this.$q.when(this.handlers.webreport)).then(this.onLoadWebReport.bind(this)),f=this.svc.getApplicationReport(this.content.roster.familySid,!1,!1,this.$q.when(this.handlers.appreport)).then(this.onLoadAppReport.bind(this)),e=this.svc.getScreenTimeUsageReport(this.content.roster.familySid,!1,!1).then(this.onLoadScreenTimeReport.bind(this));return this.$q.all([u,f,e])},i.prototype.changeViewName=function(){var n=this.content.views,i=this.content.roster,t=this.components.selector;return!i||!t?(n.current=n.standard,n.current):(n.current=i.isChild===!0?t.isPreviousWeek?n.childPrevious:n.child:i.child.IsLocal===!0?t.isPreviousWeek?n.previousLocal:n.local:t.isPreviousWeek?n.previous:n.standard,n.current)},i.prototype.onChangeReportDate=function(n){n.isPreviousWeek=!n.isPreviousWeek;this.metatagService.add("awa-view",this.changeViewName());this.content.appreport.combined.state=this.content.appreport.combined.states.progress;this.content.webreport.state=this.content.webreport.states.progress;this.content.searchreport.state=this.content.searchreport.states.progress;this.content.screentimereport.state=this.content.screentimereport.states.progress;var t=this.svc.getWebReport(this.content.roster.familySid,n.isPreviousWeek,!1,this.$q.when(this.handlers.webreport)).then(this.onLoadWebReport.bind(this)),i=this.svc.getApplicationReport(this.content.roster.familySid,n.isPreviousWeek,!1,this.$q.when(this.handlers.appreport)).then(this.onLoadAppReport.bind(this)),r=this.svc.getScreenTimeUsageReport(this.content.roster.familySid,n.isPreviousWeek,!1).then(this.onLoadScreenTimeReport.bind(this));return this.$q.all([t,i,r])},i.prototype.onToggleReporting=function(n,t){var i=this.onSettingsChange(n,t,"reporting");return this.showUpsell=!n.isOn,i},i.prototype.onToggleEmail=function(n,t){return this.onSettingsChange(t,n,"email")},i.prototype.onSettingsChange=function(n,t,i){var r=this,u=!1;return this.content.settings.AreActivityReportsEnabled===!1&&n.isOn&&(u=!0,this.components.toggles.email.isOn=!0),this.svc.saveSettings(this.content.roster.familySid,i,n.isOn,t.isOn).then(function(n){r.content.settings=n;r.components.toggles.email.isOn=r.content.settings.AreEmailReportsEnabled}).catch(function(n){return r.$meeErrors.setError("ra-toggle-error",r.content.compass.ErrorGeneric),u&&(r.components.toggles.email.isOn=r.content.settings.AreActivityReportsEnabled),r.$q.reject(n)})},i.prototype.onAllow=function(n,t){var i=this,r=t.action.state;return this.updateActionStates(n,"progress",this.content.webreport.blocked.data),this.svc.allowWebsite(this.content.roster.familySid,n).then(function(u){i.content.settings=u;i.updateActionStates(n,"finished",i.content.webreport.blocked.data);i.updateActionStates(n,"inert",i.content.webreport.visited.data);t.action.state=r===t.action.states.undo?t.action.states.inert:t.action.states.undo}).catch(function(t){return i.updateActionStates(n,"failed",i.content.webreport.blocked.data),i.$q.reject(t)})},i.prototype.onUndoAllow=function(n){var t=this,i=n.head.comparable;return this.content.settings.NormalizedWebExceptionsOriginalKeys[i]!==undefined?this.svc.blockWebsite(this.content.roster.familySid,i).then(function(n){t.content.settings=n;t.restoreActionStates(i,t.content.webreport.visited.data);t.restoreActionStates(i,t.content.webreport.blocked.data)}).catch(function(n){return t.updateActionStates(i,"failed",t.content.webreport.blocked.data),t.$q.reject(n)}):this.svc.removeWebsiteFilters(this.content.roster.familySid,i).then(function(n){t.content.settings=n;t.restoreActionStates(i,t.content.webreport.visited.data);t.restoreActionStates(i,t.content.webreport.blocked.data)}).catch(function(n){return t.updateActionStates(i,"failed",t.content.webreport.blocked.data),t.$q.reject(n)})},i.prototype.onUndoBlock=function(n){var t=this,i=n.head.comparable;return this.content.settings.NormalizedWebExceptionsOriginalKeys[i]!==undefined?this.svc.allowWebsite(this.content.roster.familySid,i).then(function(n){t.content.settings=n;t.restoreActionStates(i,t.content.webreport.visited.data);t.restoreActionStates(i,t.content.webreport.blocked.data)}).catch(function(n){return t.updateActionStates(i,"failed",t.content.webreport.visited.data),t.$q.reject(n)}):this.svc.removeWebsiteFilters(this.content.roster.familySid,i).then(function(n){t.content.settings=n;t.restoreActionStates(i,t.content.webreport.visited.data);t.restoreActionStates(i,t.content.webreport.blocked.data)}).catch(function(n){return t.updateActionStates(i,"failed",t.content.webreport.visited.data),t.$q.reject(n)})},i.prototype.onBlock=function(n,t){var i=this,r=t.action.state;return this.updateActionStates(n,"progress",this.content.webreport.visited.data),this.svc.blockWebsite(this.content.roster.familySid,n).then(function(u){i.content.settings=u;i.updateActionStates(n,"finished",i.content.webreport.visited.data);i.updateActionStates(n,"inert",i.content.webreport.blocked.data);t.action.state=r===t.action.states.undo?t.action.states.inert:t.action.states.undo}).catch(function(t){return i.updateActionStates(n,"failed",i.content.webreport.visited.data),i.$q.reject(t)})},i.prototype.onRestrictApp=function(n,t){var i=this,r=n.action.state;return n.action.state=n.action.states.progress,r===n.action.states.undo&&_.contains(this.content.settings.ContentExclusionsMapOriginalKeys,n.datamodel.Application.Id)===!1?this.svc.unrestrictApplication(this.content.roster.familySid,n.datamodel.Application).then(function(t){i.content.settings=t;n.action.state=n.action.states.inert}).catch(function(t){return n.action.state=n.action.states.failed,i.$q.reject(t)}):this.svc.restrictApplication(this.content.roster.familySid,n.datamodel.Application,t).then(function(t){i.content.settings=t;n.action.state=r===n.action.states.undo?n.action.states.inert:n.action.states.undo}).catch(function(t){return n.action.state=n.action.states.failed,i.$q.reject(t)})},i.prototype.updateActionStates=function(n,t,i){var r=i.uindex[n];r&&_.each(r,function(n){n.action.state=n.action.states[t]})},i.prototype.restoreActionStates=function(n,t){var i=t.uindex[n];i&&_.each(i,function(n){n.action.state=n.action.undoState})},i.prototype.updateXTable=function(n,t){var i=this.content.webreport;return(i[t].data=n,n&&n.rows.length>0)?(i[t].state=i[t].states.finished,n.rows.length):(i[t].state=i[t].states.inert,0)},i.$inject=["$rootScope","$window","$scope","$meeErrors","$state","$q","familyConfig","telemetryService","recentActivityService","metatagService","currentUser","stringFormatFilter","casaInstallModalService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onChangeReportDate")],i.prototype,"onChangeReportDate",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onToggleReporting")],i.prototype,"onToggleReporting",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onToggleEmail")],i.prototype,"onToggleEmail",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onAllow")],i.prototype,"onAllow",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onUndoAllow")],i.prototype,"onUndoAllow",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onUndoBlock")],i.prototype,"onUndoBlock",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onBlock")],i.prototype,"onBlock",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("onRestrictApp")],i.prototype,"onRestrictApp",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"recentActivity",{templateUrl:t.settingsFolderBasePath+"RecentActivity/recent-activity.html"})],i)}();t.RecentActivityComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l,a){this.$q=n;this.apiService=t;this.contentService=i;this.rosterService=r;this.telemetryService=u;this.formatString=f;this.appConfig=e;this.webFactory=o;this.webParser=s;this.dvcParser=h;this.appParser=c;this.screenTimeParser=l;this.deviceNotificationService=a;this.cache={app:{},web:{},screenTime:{},user:{},report:{},device:{},compass:{},settings:{}}}return n.prototype.getCompassContent=function(n){var t=this,r=this.cache.compass.content,i;return r!==undefined&&n===!1?r:(i=this.cache.compass.api,(i===undefined||n===!0)&&(i=this.contentService.getActivityReportsOneUiContent(),this.cache.compass.api=i),this.$q.when(i).then(function(n){if(n&&n.template&&n.template.Strings){var i=n.template.Strings;return i.DayNames=n.template.DayNames,i.ShortestDayNames=n.template.ShortestDayNames,i.AbbreviatedDayNames=n.template.AbbreviatedDayNames,i.DeviceVersionDisplayNames=n.template.DeviceVersionDisplayNames,t.cache.compass.content=t.$q.resolve(i),t.cache.compass.content}return t.$q.reject("Compass Content could not be retrieved")}).catch(function(n){return t.cache.compass.api=undefined,t.$q.reject(n)}))},n.prototype.getUserInfo=function(n,t){var i=this,u=this.cache.user.content,r;return u!==undefined&&t===!1?u:(r=this.cache.user.api,(r===undefined||t===!0)&&(r=this.rosterService.getFamilyRosterWithChildrenDevices(),this.cache.user.api=r),this.$q.when(r).then(function(t){var r=t.getChildById(n),e=_.findIndex(r.Devices,function(n){return n.OSEdition==="WindowsPhone8"})!==-1,o=t.isUserAChild===!0&&!t.isActivityReportingEnabled,f={child:r,family:t,isChild:t.isUserAChild,familySid:r.FamilyServiceId,hasLocalAccount:r.Devices&&r.Devices.length>0,hasWindowsPhone8:e,shouldRedirect:o},u;return t.isUserAChild===!0&&(t.userSafetySettings===undefined||t.userSafetySettings===null)?(u={message:i.formatString("Activity Reports - user is child but no userSafetySettings in family model, childId: {0}",n),category:"family.recent-activity-service.getUserInfo",data:f},i.telemetryService.portalQos.reportClientError(u),i.cache.user.api=undefined,i.$q.reject(u)):(i.cache.user.content=i.$q.resolve(f),i.cache.user.content)}).catch(function(n){return i.cache.user.api=undefined,i.$q.reject(n)}))},n.prototype.getSettings=function(n,t){var i=this,u="api"+n,f="content"+n,e=this.cache.settings[f],r;return e!==undefined&&t===!1?e:(r=this.cache.settings[u],(r===undefined||t===!0)&&(r=this.apiService.getActivityReportSettings(n),this.cache.settings[u]=r),this.$q.when(r).then(function(n){var t=n,r=i.webFactory.create(null,null);return n.ContentRestrictionsLegacyState?(t.hasStoreAppRestrictionsEnabled=n.ContentRestrictionsLegacyState.IsGameRestrictionsEnabled,t.hasWin32AppRestrictionsEnabled=n.ContentRestrictionsLegacyState.IsApplicationRestrictionsEnabled):(t.hasStoreAppRestrictionsEnabled=n.IsContentEnabled,t.hasWin32AppRestrictionsEnabled=n.IsContentEnabled),t.hasMixedState=t.hasStoreAppRestrictionsEnabled&&!t.hasWin32AppRestrictionsEnabled,t.hasAnyRestriction=t.hasStoreAppRestrictionsEnabled&&t.hasWin32AppRestrictionsEnabled,t.NormalizedWebExceptions={},t.NormalizedWebExceptionsOriginalKeys={},_.each(t.WebExceptionMap,function(n,i){var u=r.getNormalizedUrl(i);t.NormalizedWebExceptions[u]=n;t.NormalizedWebExceptionsOriginalKeys[u]=n}),t.ContentExclusionsMapOriginalKeys=_.keys(t.ContentExclusionMap),i.cache.settings[f]=i.$q.resolve(t),i.cache.settings[f]}).catch(function(n){return i.cache.settings[u]=undefined,i.$q.reject(n)}))},n.prototype.getReport=function(n,t,i){var r=this,f="api"+n+t,e="content"+n+t,o=this.cache.report[e],u;return o!==undefined&&i===!1?o:(u=this.cache.report[f],(u===undefined||i===!0)&&(u=this.apiService.getActivityReport(n,t),this.cache.report[f]=u),this.$q.when(u).then(function(n){var t=n;return r.cache.report[e]=r.$q.resolve(t),r.cache.report[e]}).catch(function(n){return r.cache.report[f]=undefined,r.$q.reject(n)}))},n.prototype.getWebReport=function(n,t,i,r){var u=this,e="api"+n+t,o="content"+n+t,s=this.cache.web[o],f;return s!==undefined&&i===!1?s:(f=this.cache.web[e],(f===undefined||i===!0)&&(f=this.$q.all([this.getCompassContent(!1),this.getSettings(n,!1),this.getReport(n,t,i),r]),this.cache.web[e]=f),this.$q.when(f).then(function(n){var t=u.webParser.findStrategy(n[0],n[1],n[2].WebReport,n[3]).execute();return u.cache.web[o]=u.$q.resolve(t),u.cache.web[o]}).catch(function(n){return u.cache.web[e]=undefined,u.$q.reject(n)}))},n.prototype.getDeviceReport=function(n,t,i){var r=this,f="api"+n+t,e="content"+n+t,o=this.cache.device[e],u;return o!==undefined&&i===!1?o:(u=this.cache.device[f],(u===undefined||i===!0)&&(u=this.$q.all([this.getCompassContent(!1),this.getReport(n,t,i)]),this.cache.device[f]=u),this.$q.when(u).then(function(n){var t=r.dvcParser.findStrategy(n[1].Devices).execute(n[0]);return r.cache.device[e]=r.$q.resolve(t),r.cache.device[e]}).catch(function(n){return r.cache.device[f]=undefined,r.$q.reject(n)}))},n.prototype.getApplicationReport=function(n,t,i,r){var u=this,e="api"+n+t,o="content"+n+t,s=this.cache.app[o],f;return s!==undefined&&i===!1?s:(f=this.cache.app[e],(f===undefined||i===!0)&&(f=this.$q.all([this.getCompassContent(!1),this.getSettings(n,!1),this.getReport(n,t,i),this.getDeviceReport(n,t,!1),r]),this.cache.app[e]=f),this.$q.when(f).then(function(n){var t=u.appParser.findStrategy(n[0],n[2].ApplicationUsage,n[3],n[1],n[4]).execute();return u.cache.app[o]=u.$q.resolve(t),u.cache.app[o]}).catch(function(n){return u.cache.app[e]=undefined,u.$q.reject(n)}))},n.prototype.getScreenTimeUsageReport=function(n,t,i){var r=this,f="api"+n+t,e="content"+n+t,o=this.cache.screenTime[e],u;return o!==undefined&&i===!1?o:(u=this.cache.screenTime[f],(u===undefined||i===!0)&&(u=this.$q.all([this.getCompassContent(!1),this.getReport(n,t,i),this.getDeviceReport(n,t,!1),]),this.cache.screenTime[f]=u),this.$q.when(u).then(function(n){var i=r.screenTimeParser.findStrategy(n[0],n[1].ComputerUsage,n[2]).execute(t);return r.cache.screenTime[e]=r.$q.resolve(i),r.cache.screenTime[e]}).catch(function(n){return r.cache.screenTime[f]=undefined,r.$q.reject(n)}))},n.prototype.getSettingsChain=function(n,t){var i=this;return this.getUserInfo(n,!1).then(function(n){return i.getSettings(n.familySid,t)})},n.prototype.getReportChain=function(n,t,i){var r=this;return this.getUserInfo(n,!1).then(function(n){return r.getReport(n.familySid,t,i)})},n.prototype.allowWebsite=function(n,t){var i=this;return this.$q.when(this.apiService.addWebsiteToAllowedList(n,t)).then(function(t){var r=i.webFactory.create(null,null),u=r.getNormalizedUrl(t.Website);return i.$q.when(i.getSettings(n,!1)).then(function(n){return n.NormalizedWebExceptions[u]=!0,i.$q.resolve(n)})})},n.prototype.blockWebsite=function(n,t){var i=this;return this.$q.when(this.apiService.addWebsiteToBlockedList(n,t)).then(function(t){var r=i.webFactory.create(null,null),u=r.getNormalizedUrl(t.Website);return i.$q.when(i.getSettings(n,!1)).then(function(n){return n.NormalizedWebExceptions[u]=!1,i.$q.resolve(n)})})},n.prototype.removeWebsiteFilters=function(n,t){var i=this;return this.$q.when(this.apiService.removeWebsite(n,t)).then(function(){return i.$q.when(i.getSettings(n,!1)).then(function(n){return n.NormalizedWebExceptions[t]=undefined,i.$q.resolve(n)})})},n.prototype.restrictApplication=function(n,t,i){var r=this;return this.$q.when(this.apiService.addContentRestrictionExclusion(n,t.Id,t.Name,t.Rating,t.FamilyName,!i)).then(function(){return r.$q.when(r.getSettings(n,!1)).then(function(n){return n.ContentExclusionMap[t.Id]=!i,r.$q.resolve(n)})})},n.prototype.unrestrictApplication=function(n,t){var i=this;return this.$q.when(this.apiService.removeAppsGamesExclusion(n,t.Id)).then(function(){return i.$q.when(i.getSettings(n,!1)).then(function(n){return n.ContentExclusionMap[t.Id]=undefined,i.$q.resolve(n)})})},n.prototype.saveSettings=function(n,t,i,r){var u=this,f=t==="reporting"?i:r;return this.$q.when(this.apiService.setActivityReportSettings(n,i,f)).then(function(){return u.$q.when(u.getSettings(n,!1)).then(function(n){return n.AreEmailReportsEnabled=f,n.AreActivityReportsEnabled=i,u.$q.resolve(n)})})},n.prototype.openDeviceNotifySignInStepsModal=function(n){this.deviceNotificationService.openDeviceNotifyModal(n,"Family.Settings.RecentActivity.DeviceNotifySignInSteps")},n.prototype.openDeviceNotifyTelemetryStepsModal=function(n){this.deviceNotificationService.openDeviceNotifyModal(n,"Family.Settings.RecentActivity.DeviceNotifyTelemetrySteps")},n.prototype.getPrivacyOboBit=function(n){var t=this;return n.then(function(n){return n.isChild?t.apiService.getManagePermissionsPXSUserSettingsOneUi():t.apiService.getPrivacyOBOBit(n.child)})},n.prototype.clearCache=function(){return this.$q.when(this.reset())},n.prototype.reset=function(){this.cache.app={};this.cache.web={};this.cache.user={};this.cache.report={};this.cache.device={};this.cache.compass={};this.cache.settings={};this.cache.screenTime={}},n.$inject=["$q","apiService","contentService","rosterService","telemetryService","stringFormatFilter","familyConfig","webReportHelperFactory","webReportStrategyFinder","deviceReportStrategyFinder","appReportStrategyFinder","screenTimeReportStrategyFinder","deviceNotificationService"],n}();n.RecentActivityService=t;angular.module(n.moduleName).service("recentActivityService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.$onInit=function(){this.headingString=this.permissionDenied?this.compass.PermissionDeniedChildUpsell:this.compass.ActivityReportingOff},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"activityUpsell",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ActivityUpsell/activity-upsell.component.html",bindings:{compass:"<",isChild:"<",permissionDenied:"<"}})],i)}();t.ActivityUpsellComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){this.isInFlightFamAppLimits=n.Utilities.isInFlight("FamAppLimits")}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"appreport",{templateUrl:t.settingsFolderBasePath+"RecentActivity/AppReport/appreport.component.html",bindings:{drawer:"<",report:"<",compass:"<",childId:"<",roster:"<",settings:"<"}})],i)}();t.AppReportComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.compass=n;this.formatString=t}return n.prototype.getShowMoreLessDisplay=function(){return{showMoreLabel:this.compass.ActionShowAll,showLessLabel:this.compass.ActionShowLess}},n.prototype.getAppsGamesExpandAria=function(n){return this.formatString(this.compass.ActionExpandAppsGamesForNarrator,n)},n.prototype.createAllowStates=function(n){return{inert:{name:"inert",props:{text:this.compass.ActionAllow,aria:this.formatString(this.compass.ActionAllowForNarrator,n),glyph:"checkbox",biId:"allow-application-button"}},progress:{name:"inProgress"},finished:{name:"finished",props:{text:this.compass.ActionAllowCompleted,aria:this.formatString(this.compass.ActionAllowCompletedForNarrator,n),glyph:"checkbox"}},failed:{name:"failed",props:{text:this.compass.ErrorGeneric,aria:this.compass.ErrorGeneric}},undo:{name:"undo",props:{text:this.compass.ActionUndo,aria:this.formatString(this.compass.ActionUndoAllowForNarrator,n),biId:"undo-allow-application-button"}}}},n.prototype.createBlockStates=function(n){return{inert:{name:"inert",props:{text:this.compass.ActionBlock,aria:this.formatString(this.compass.ActionBlockForNarrator,n),glyph:"blocked",biId:"block-application-button"}},progress:{name:"inProgress"},finished:{name:"finished",props:{text:this.compass.ActionBlockCompleted,aria:this.formatString(this.compass.ActionBlockCompletedForNarrator,n),glyph:"blocked"}},failed:{name:"failed",props:{text:this.compass.ErrorGeneric,aria:this.compass.ErrorGeneric}},undo:{name:"undo",props:{text:this.compass.ActionUndo,aria:this.formatString(this.compass.ActionUndoBlockForNarrator,n),biId:"undo-block-application-button"}}}},n.prototype.createUnblockableStates=function(n){return{inert:{name:"inert",props:{text:"",aria:"",glyph:""}},progress:{name:"inProgress"},finished:{name:"finished",props:{text:this.compass.ActionCannotBlockMessage,aria:this.formatString(this.compass.ActionCannotBlockMessageForNarrator,n),glyph:"unblockable"}},failed:{name:"failed",props:{text:this.compass.ErrorGeneric,aria:this.compass.ErrorGeneric}}}},n.prototype.createReadStates=function(){var n={text:undefined,aria:undefined,glyph:undefined};return{inert:{name:"inert",props:n},progress:{name:"inProgress",props:n},finished:{name:"finished",props:n},failed:{name:"failed",props:n}}},n.prototype.createExpander=function(n){return{isExpanded:n.isExpanded,onExpand:n.onExpand,ariaLabel:n.ariaLabel,biId:"expand-application-button"}},n.prototype.getHoursMinutesStringFromTotalMinutes=function(n,t){var i=Math.floor(n/60),r=Math.floor(n)%60,u;return i&&r?(u=t?this.compass.TimeUsedHoursMinutesSplitLine:this.compass.TimeUsedHoursMinutes,this.formatString(u,[i,r])):i?this.formatString(this.compass.TimeUsedHours,i):r?this.formatString(this.compass.TimeUsedMinutes,r):this.compass.TimeUsedLessThanOneMinute},n}(),i=function(){function n(n){this.formatString=n}return n.prototype.create=function(n){return new t(n,this.formatString)},n.prototype.createInject=function(n,i){return new t(n,i)},n.$inject=["stringFormatFilter"],n}();angular.module(n.moduleName).service("appReportHelperFactory",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.helperFactory=n;this.defaultStrategyFactory=t}return n.prototype.findStrategy=function(n,t,i,r,u){var f=this.helperFactory.create(n);return this.defaultStrategyFactory.create(t,r,i,u,f)},n.$inject=["appReportHelperFactory","appReportDefaultStrategyFactory"],n}();angular.module(n.moduleName).service("appReportStrategyFinder",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(t,i,r,u,f,e){this.timeSpanService=t;this.events=i;this.settings=r;this.devices=u;this.actions=f;this.helper=e;this.utils=n.Utilities}return t.prototype.execute=function(){var a=this,c=this.helper.getShowMoreLessDisplay(),r={rows:[],index:{},order:undefined,limit:{all:!1,min:5,showMoreLabel:c.showMoreLabel,showLessLabel:c.showLessLabel,biId:"show-more-applications-button"},onShowAll:this.actions.onShowAllCallback},t={},u,e;if(_.isArray(this.events)===!1)return{combined:r};for(u=0,e=this.events;u<e.length;u++){var n=e[u],i=n.Application.Id,o=this.devices[n.DeviceId],l=this.utils.parseServerDatetime(n.LastUsageTime),s=this.timeSpanService.parseTimeSpan(n.TimeUsed),h=s.Hours*60+s.Minutes+s.Seconds/60,f=void 0;_.has(t,i)===!1?(f=this.rollupToTable(i,n,r,h),t[i]={app:f,date:l,isAllowed:n.Allowed,isMixedState:!1,datamodel:n,devices:[o]}):(f=t[i].app,t[i].devices.push(o),this.updateRollupState(t[i],n,l,h));this.executeUsage(f,n,o,h)}return _.each(r.index,function(n){var i=a.updateAppState(n,t);t[i].app=null}),{combined:r}},t.prototype.executeUsage=function(n,t,i,r){if(_.has(n.index,t.DeviceId)){n.index[t.DeviceId].meta1.comparable+=r;n.index[t.DeviceId].meta1.display=this.helper.getHoursMinutesStringFromTotalMinutes(n.index[t.DeviceId].meta1.comparable,!1);return}var f=this.helper.createUnblockableStates(i.Name),e={src:undefined,alt:undefined,icon:i.Icon,mode:"icon",flip:!1},u={id:_.uniqueId("dvc_"),head:{display:i.Name,comparable:t.DeviceId},subhead:{display:i.Version,comparable:i.Version},meta1:{display:this.helper.getHoursMinutesStringFromTotalMinutes(r,!1),comparable:r},meta2:{display:"",comparable:""},image:e,action:{state:f.inert,states:f,callback:undefined},datamodel:i};i.IsAndroid&&(u.action.state=u.action.states.finished);n.index[t.DeviceId]=u;n.children.push(u)},t.prototype.switchAppStateToCantBlock=function(n){n.summary.action.state=n.summary.action.states.finished},t.prototype.updateAppState=function(n,t){var i=n.summary.head.comparable,r=t[i],u=r.datamodel;return n.summary.datamodel=u,n.summary.meta1.display=this.helper.getHoursMinutesStringFromTotalMinutes(n.summary.meta1.comparable,!1),r=null,i},t.prototype.updateRollupState=function(n,t,i,r){n.app.summary.meta1.comparable+=r;n.isMixedState=n.isMixedState||t.Allowed!=n.isAllowed;i>n.date&&(n.isAllowed=t.Allowed,n.date=i,n.datamodel=t)},t.prototype.rollupToTable=function(n,t,i,r){var f=this.actions.isReadOnly?this.helper.createReadStates():this.helper.createUnblockableStates(t.Application.Name),e={src:undefined,alt:undefined,icon:"mee-icon mee-icon-GenericApp",flip:!1,mode:"icon"},o={id:_.uniqueId("app_"),head:{display:t.Application.Name,comparable:n},meta1:{display:undefined,comparable:r},meta2:{display:"",comparable:""},image:e,action:{state:f.inert,states:f,callback:undefined},datamodel:t},u={index:{},summary:o,children:[],expander:this.helper.createExpander({isExpanded:!1,onExpand:this.actions.onExpandCallback,ariaLabel:this.helper.getAppsGamesExpandAria(t.Application.Name)}),limit:{all:!1,min:0}};return i.rows.push(u),i.index[n]=u,u},t.prototype.isAndroidDevicesOnlyMetadata=function(n){return n.devices.every(function(n){return n.IsAndroid})},t}(),r=function(){function n(n){this.timeSpanService=n}return n.prototype.create=function(n,t,r,u,f){return new i(this.timeSpanService,n,t,r,u,f)},n.$inject=["timeSpanService"],n}();angular.module(t.moduleName).service("appReportDefaultStrategyFactory",r)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deskDrawer",{templateUrl:t.settingsFolderBasePath+"RecentActivity/DeskDrawer/desk-drawer.component.html",transclude:{action:"?action",heading:"heading",content:"content"},bindings:{drawer:"<"}})],i)}();t.DeskDrawerComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.devices=n;this.helper=t}return n.prototype.execute=function(n){var r={},f,i,t,u;if(_.isArray(this.devices)===!1)return r;for(f=this.devices.length,i=0;i<f;i++)t=this.devices[i],u=this.helper.getVersionString(t,n),r[t.DeviceId]={Name:t.Name||u,Type:t.DisplayDeviceType,Version:u,Icon:this.helper.getDeviceIcon(t),IsAndroid:this.helper.isAndroid(t)};return r},n}(),i=function(){function n(){}return n.prototype.create=function(n,i){return new t(n,i)},n.$inject=[],n}();angular.module(n.moduleName).service("deviceReportDefaultStrategyFactory",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"deviceDisclaimer",{templateUrl:t.settingsFolderBasePath+"RecentActivity/DeviceReport/device.disclaimer.component.html",transclude:{exclusions:"?exclusions"},bindings:{family:"<",compass:"<"}})],i)}();t.DeviceDisclaimerComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.deviceHelperService=n;this.defaultStrategyFactory=t}return n.prototype.findStrategy=function(n){return this.defaultStrategyFactory.create(n,this.deviceHelperService)},n.$inject=["familyDeviceHelperService","deviceReportDefaultStrategyFactory"],n}();angular.module(n.moduleName).service("deviceReportStrategyFinder",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"progressiveXtable",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-progressive.xtable.component.html",bindings:{state:"<",states:"<",xtable:"<?",rollupTemplate:"<"}})],i)}();t.ProgressiveXTableComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.$onInit=function(){var n=["-summary.meta2.comparable","-summary.meta1.comparable"];if(this.order?this.order.rollup||(this.order.rollup=n):this.order={rollup:n,children:undefined},!this.limit)throw new Error("xtable requires limit: XTableDisplayLimits");this.displayedLimit=this.limit.min},i.prototype.onShowAllClick=function(){this.limit.all=!this.limit.all;this.displayedLimit=this.rows?this.limit.all?this.rows.length:this.limit.min:0;this.onShowAll(this.limit,this.rows)},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtable",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.component.html",bindings:{rows:"<",order:"<",limit:"<",onShowAll:"&",rollupTemplate:"<"}})],i)}();t.XTableComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$timeout=n}return i.prototype.$onInit=function(){if(this.order||(this.order=["-meta2.comparable","-meta1.comparable"]),!this.limit)throw new Error("xtable-rollup requires limit: XTableDisplayLimits");this.displayedLimit=this.limit.min;this.pendingTimeouts=[]},i.prototype.$onDestroy=function(){this.cleanup()},i.prototype.onExpandClick=function(){var r=this,n,t;if(this.pendingTimeouts=this.pendingTimeouts||[],this.expander.isExpanded=!this.expander.isExpanded,this.limit.all=!this.limit.all,this.children){if(n=15,this.displayedLimit=this.limit.all?n:this.limit.min,this.limit.all&&this.children.length>n){var u=Math.ceil(this.children.length%n),f=u>0?this.children.length+n:this.children.length,e=function(n){i.pendingTimeouts.push(i.$timeout(function(){r.displayedLimit=n}))},i=this;for(t=n*2;t<f;t+=n)e(t)}this.limit.all===!1&&this.cleanup()}else this.displayedLimit=0;this.expander.onExpand(this.summary,this.expander,this.limit)},i.prototype.isUrlValid=function(t){return n.Utilities.isUrlValid(t)},i.prototype.cleanup=function(){for(var t=this.pendingTimeouts.length,n=0;n<t;n++)this.$timeout.cancel(this.pendingTimeouts.pop())},i.$inject=["$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtableRollup",{templateUrl:["$element","$attrs",function(n,i){switch(i.template){case"linked":return t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.rollup.linked.component.html";default:return t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.rollup.component.html"}}],bindings:{order:"<",limit:"<",summary:"<",children:"<",expander:"<",template:"<?"}})],i)}();t.XTableRollupComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$meeA11y=n;this.$meeUtil=t}return i.prototype.$onInit=function(){this.actionId=this.$meeUtil.nextUid();this.undoId=this.$meeUtil.nextUid()},i.prototype.callbackWrapper=function(){var n=this;this.callback().then(function(){n.$meeA11y.focuser.focus("#"+n.undoId,{})})},i.prototype.undoCallbackWrapper=function(){var n=this;this.undoCallback().then(function(){n.$meeA11y.focuser.focus("#"+n.actionId,{})})},i.$inject=["$meeA11y","$meeUtil"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtableRowAction",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.row.action.component.html",transclude:{undo:"?undo",inert:"?inert",failed:"?failed",progress:"?inProgress",finished:"?finished"},bindings:{state:"<",states:"<",callback:"&",undoCallback:"&?"}})],i)}();t.XTableRowActionComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtableRow",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.row.component.html",transclude:{image:"?imageIcon",head:"?headContent",subhead:"?subheadContent",metadata1:"?metadataOne",metadata2:"?metadataTwo",action:"action",expander:"expander",actionSmallScreen:"actionSmallScreen"},bindings:{data:"<"}})],i)}();t.XTableRowComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.$onInit=function(){this.image.flip=!1;this.image.isValid=n.Utilities.isUrlValid(this.image.src)},i.prototype.onLoad=function(){this.image.mode==="image"&&(this.image.flip=!0)},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtableRowImage",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ExpansionTable/settings-xtable.row.image.component.html",bindings:{image:"<"}})],i)}();t.XTableRowImageComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(t,i,r,u){this.timeSpanService=t;this.events=i;this.devices=r;this.helper=u;this.utils=n.Utilities}return t.prototype.execute=function(n){var f=this,e=0,o=[],i=[],a=[0,0,0,0,0,0,0],v=[],y=0,s=[],r,h,l,u;if(!_.isEmpty(this.devices)&&!_.isEmpty(this.events)){var c=7,t={},p=c-(new Date).getDay()-1;if(_.forEach(this.events,function(n){var u,i,r;t.hasOwnProperty(n.DeviceId)||(t[n.DeviceId]={timesByDay:[0,0,0,0,0,0,0],totalTimeUsed:0});u=f.utils.parseServerDatetime(n.Date);i=f.timeSpanService.parseTimeSpan(n.TimeUsed);i&&(r=Math.ceil(i.Days*1440+i.Hours*60+i.Minutes+i.Seconds/60),t[n.DeviceId].timesByDay[(u.getDay()+p)%c]+=r,t[n.DeviceId].totalTimeUsed+=r,a[(u.getDay()+p)%c]+=r,e+=r)}),e>0){for(_.forEach(this.devices,function(n,r){if(t[r]){y++;var u={};t[r].timesByDay.forEach(function(t){u.hasOwnProperty(t.toString())||(u[t.toString()]=n.Name+": "+f.helper.createHoursMinutesStringFromTotalMinutes(t))});o.push({data:t[r].timesByDay,tooltipTexts:u,totalTime:t[r].totalTimeUsed});i.push({device:n,timeUsed:f.helper.createHoursMinutesStringFromTotalMinutes(t[r].totalTimeUsed),totalTime:t[r].totalTimeUsed,color:"#FFFFFF"})}}),i=_.sortBy(i,function(n){return 0-n.totalTime}),o=_.sortBy(o,function(n){return 0-n.totalTime}),s=this.helper.getSeriesColors(y),r=0;r<s.length;r++)i[r].color=s[r];for(h=0,l=a;h<l.length;h++)u=l[h],v.push({totalMinutes:u,timeUsedText:this.helper.createHoursMinutesStringFromTotalMinutes(u,{allowZero:!0}),timeUsedTextAbbreviated:this.helper.createHoursMinutesStringFromTotalMinutes(u,{useAbbreviated:!0,allowZero:!0}),timeUsedTextAbbreviatedSplitLine:this.helper.createHoursMinutesStringFromTotalMinutes(u,{useAbbreviated:!0,allowZero:!0,isSplitLine:!0})})}}return{totalTimeUsed:e,totalTimeUsedString:this.helper.createHoursMinutesStringFromTotalMinutes(e),deviceDisplayData:i,chartData:{categories:this.helper.createChartCategories(n),currentSeriesColors:s,perDeviceData:o,perDayData:v}}},t}(),r=function(){function n(n){this.timeSpanService=n}return n.prototype.create=function(n,t,r){return new i(this.timeSpanService,n,t,r)},n.$inject=["timeSpanService"],n}();angular.module(t.moduleName).service("screenTimeReportDefaultStrategyFactory",r)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$window=n;this.$document=t;this.$element=i;this.$scope=r;this.$meeUtil=u;this.$timeout=f;this.formatString=e;this.svgNs="http://www.w3.org/2000/svg"}return i.prototype.$postLink=function(){var n=this;this.onResizeHandler=this.$meeUtil.debounce(this.render.bind(this),100);this.element=this.$element.find("#screen-time-chart");this.$window.addEventListener("resize",this.onResizeHandler);this.$scope.$watch(function(){return n.chartData},function(t){t&&n.$timeout(function(){return n.render()})})},i.prototype.$onDestroy=function(){this.$window.removeEventListener("resize",this.onResizeHandler)},i.prototype.render=function(){for(var n,t,u,o,i,v,y=this.$document.prop("dir")==="rtl",s=angular.copy(this.chartData.perDeviceData),f=this.element.width(),r=this.$window.getComputedStyle(document.body),p=f/50,h=f<520,c=f>871,e=0,l=s;e<l.length;e++)n=l[e],n.gap=p;for(t=c?this.chartData.categories.large:h?this.chartData.categories.small:this.chartData.categories.medium,t=angular.copy(t),u=[],o=[],i=0;i<t.length;i++){var n=this.chartData.perDayData[i],w=c?n.timeUsedText:h?n.timeUsedTextAbbreviatedSplitLine:n.timeUsedTextAbbreviated,a=this.createDayLabel(w,t[i]);u.push(a[0]);o.push(a[1])}v={theme:"Metro",legend:{visible:!1},seriesDefaults:{type:"column",stack:!0},series:s,seriesColors:this.chartData.currentSeriesColors,seriesItem:{border:{width:0}},valueAxis:[{visible:!1,majorGridLines:{visible:!1}}],categoryAxis:[{reverse:y,categories:o,line:{visible:!0,color:"#F2F2F2"},majorGridLines:{visible:!1},labels:{font:r.fontSize+" "+r.fontFamily}}],tooltip:{visible:!0,color:"#FFFFFF",font:r.fontSize+" "+r.fontFamily,template:"#= series.tooltipTexts[value.toString()] #"},chartArea:{margin:{top:16,bottom:24}}};this.element.kendoChart(v);this.$timeout(function(){for(var h,n,r,c,f,t,e,o=angular.element("g > text"),s=0,i=0;i<u.length;i++)for(h=u[i].split("\n"),n=0,r=h;n<r.length;n++)c=r[n],o[s]&&(o[s++].innerHTML=c);if(f=angular.element(".screen-time-chart-sublabel.single-line").toArray(),f.length!==9)for(t=0,e=f;t<e.length;t++){var a=e[t],l=angular.element(a),v=parseInt(l.parent().attr("y"))+20;l.parent().attr("y",v)}})},i.prototype.createDayLabel=function(n,t){for(var u,s,i,c,f="",e="",r=n.split(","),l=r.length>1,o=0,h=r;o<h.length;o++)i=h[o],f+=kendo.format("\n<tspan class='screen-time-chart-label'>"+i+"<\/tspan>"),e+="\n"+i;for(r=t.split(","),u=0,s=r;u<s.length;u++)i=s[u],c="screen-time-chart-sublabel  "+(l?"":"single-line"),f+=kendo.format("\n<tspan class='"+c+"'>"+i+"<\/tspan>"),e+="\n"+i;return[f,e]},i.$inject=["$window","$document","$element","$scope","$meeUtil","$timeout","stringFormatFilter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"screenTimeReportChart",{template:"<div id='screen-time-chart'><\/div>",bindings:{chartData:"<"}})],i)}();t.ScreenTimeReportChartComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"screenTimeReport",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ScreenTimeReport/screen-time.report.component.html",transclude:{inert:"?inert",finished:"?finished"},bindings:{drawer:"<",childId:"<",compass:"<",settings:"<",report:"<",roster:"<"}})],i)}();t.ScreenTimeReportComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"screenTimeReportDeviceDisplay",{templateUrl:t.settingsFolderBasePath+"RecentActivity/ScreenTimeReport/screen-time.report.device-display.component.html",bindings:{data:"<"}})],i)}()})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(t,i){this.compass=t;this.formatString=i;this.screentimeChartColors=n.Utilities.isInFlight("FamAppStyleOverride")?["#0078D4","#14887B","#00A2AD","#917EDB","#006FC9","#744DA9","#00188F"]:["#0078D6","#30C6CC","#A4CF0C","#004EBC","#107C10","#005E50","#11255E"];this.colors=[{requiredNumOfDevices:7,color:this.screentimeChartColors[6]},{requiredNumOfDevices:4,color:this.screentimeChartColors[3]},{requiredNumOfDevices:1,color:this.screentimeChartColors[0]},{requiredNumOfDevices:2,color:this.screentimeChartColors[1]},{requiredNumOfDevices:3,color:this.screentimeChartColors[2]},{requiredNumOfDevices:5,color:this.screentimeChartColors[4]},{requiredNumOfDevices:6,color:this.screentimeChartColors[5]}];this.timeUsedFormats={timeUsedHours:this.compass.TimeUsedHours,timeUsedMinutes:this.compass.TimeUsedMinutes,timeUsedHoursMinutes:this.compass.TimeUsedHoursMinutes,timeUsedLessThanOneMinute:this.compass.TimeUsedLessThanOneMinute};this.abbreviatedTimeUsedFormats={timeUsedHours:this.compass.TimeUsedHoursAbbreviated,timeUsedMinutes:this.compass.TimeUsedMinutesAbbreviated,timeUsedHoursMinutes:this.compass.TimeUsedHoursMinutesAbbreviated,timeUsedLessThanOneMinute:this.compass.TimeUsedLessThanOneMinute,timeUsedHoursMinutesSplitLine:this.compass.TimeUsedHoursMinutesAbbreviatedSplitLine}}return t.prototype.createChartCategories=function(n){var f=this,t={small:[],medium:[],large:[]},r=this.compass.AbbreviatedDayNames.length,u=((new Date).getDay()+1)%r,i;return _.times(r,function(){t.small.push(f.compass.ShortestDayNames[u]);t.medium.push(f.compass.AbbreviatedDayNames[u]);t.large.push(f.compass.DayNames[u]);u=(u+1)%r}),n||(t.medium[r-1]=this.compass.ScreenTimeChartTodayLabel,t.large[r-1]=this.compass.ScreenTimeChartTodayLabel),i=n?this.compass.ScreenTimeThirteenDaysPriorDateLabel:this.compass.ScreenTimeSixDaysPriorDateLabel,t.large[0]+=","+i,t.medium[0]+=","+i,t.small[0]+=","+i,i=n?this.compass.ScreenTimeSevenDaysPriorDateLabel:this.compass.ScreenTimeCurrentDateLabel,t.large[t.large.length-1]+=","+i,t.medium[t.medium.length-1]+=","+i,t.small[t.small.length-1]+=","+i,t},t.prototype.createHoursMinutesStringFromTotalMinutes=function(n,t){t===void 0&&(t={useAbbreviated:!1,allowZero:!1,isSplitLine:!1});var i=t.useAbbreviated?this.abbreviatedTimeUsedFormats:this.timeUsedFormats,r=Math.floor(n/60),u=Math.floor(n)%60;return r&&u?this.formatString(t.isSplitLine?i.timeUsedHoursMinutesSplitLine:i.timeUsedHoursMinutes,[r,u]):r?this.formatString(i.timeUsedHours,r):u||t.allowZero?this.formatString(i.timeUsedMinutes,u):i.timeUsedLessThanOneMinute},t.prototype.getSeriesColors=function(n){var t=[];return _.forEach(this.colors,function(i){n>=i.requiredNumOfDevices&&t.push(i.color)}),t},t}(),r=function(){function n(n){this.formatString=n}return n.prototype.create=function(n){return new i(n,this.formatString)},n.prototype.createInject=function(n,t){return new i(n,t)},n.$inject=["stringFormatFilter"],n}();angular.module(t.moduleName).service("screenTimeReportHelperFactory",r)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.helperFactory=n;this.defaultStrategyFactory=t}return n.prototype.findStrategy=function(n,t,i){var r=this.helperFactory.create(n);return this.defaultStrategyFactory.create(t,i,r)},n.$inject=["screenTimeReportHelperFactory","screenTimeReportDefaultStrategyFactory"],n}();angular.module(n.moduleName).service("screenTimeReportStrategyFinder",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"searchReport",{templateUrl:t.settingsFolderBasePath+"RecentActivity/SearchReport/search-report.component.html",transclude:{inert:"?inert",finished:"?finished"},bindings:{drawer:"<",report:"<",compass:"<"}})],i)}();t.SearchReportComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"searchResult",{templateUrl:t.settingsFolderBasePath+"RecentActivity/SearchReport/search-result.component.html",bindings:{report:"<"}})],i)}();t.SearchResultComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"searchResultList",{templateUrl:t.settingsFolderBasePath+"RecentActivity/SearchReport/search-result.list.component.html",bindings:{results:"<"}})],i)}();t.SearchResultListComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"xtransition",{templateUrl:t.settingsFolderBasePath+"RecentActivity/Transition/settings-xtransition.component.html",transclude:{inert:"?inert",failed:"?failed",progress:"?inProgress",finished:"finished"},bindings:{state:"<",states:"<"}})],i)}();t.XTransitionComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(t,i,r,u,f){this.events=t;this.actions=i;this.settings=r;this.helper=u;this.formatString=f;this.utils=n.Utilities;this.readStates=this.helper.createReadStates()}return t.prototype.execute=function(){var e=this.settings.NormalizedWebExceptions,u=this.helper.getShowMoreLessDisplay(),i={visited:{rows:[],index:{},uindex:{},order:undefined,limit:{all:!1,min:5,showMoreLabel:u.showMoreLabel,showLessLabel:u.showLessLabel,biId:"show-more-visited-websites-button"},onShowAll:this.actions.onShowAllCallback},blocked:{rows:[],index:{},uindex:{},order:undefined,limit:{all:!1,min:5,showMoreLabel:u.showMoreLabel,showLessLabel:u.showLessLabel,biId:"show-more-blocked-websites-button"},onShowAll:this.actions.onShowAllCallback},suspect:{rows:[],index:{},uindex:{},order:undefined,limit:{all:!1,min:5,showMoreLabel:u.showMoreLabel,showLessLabel:u.showLessLabel,biId:"show-more-suspicious-websites-button"},onShowAll:this.actions.onShowAllCallback},web:[],image:[],video:[]},v,s,o,h,l;if(_.isArray(this.events)===!1)return i;for(v=this.events.length,s=0;s<v;s++){var r=this.events[s],n={visited:{children:[],metadata:{latest:null,display:null,visits:0},uindex:{}},blocked:{children:[],metadata:{latest:null,display:null,visits:0},uindex:{}},suspect:{children:[],metadata:{latest:null,display:null,visits:0},uindex:{}},domainStates:{}},f=this.helper.getNormalizedUrl(r.Domain),c=r.WebsitePageVisits,p=c.length;for(o=0;o<p;o++){if(h=c[o],l=h.PageVisit,l.Search){this.appendSearchResult(l,i);continue}var a=h.PageVisit.Decision!==t.BLOCKED_DECISION,y=this.executeVisit(n,r,c[o],e,a,f),w=this.getBucketAndUpdateDisplay(y,n,h.PageVisit,a,f,i);this.updateRollupState(r,n.domainStates,e,y,a,f,w)}this.rollupToTable(n,n.blocked,n.domainStates,e,r,i.blocked,this.helper.getBlockedWebsitesExpandAria(f));this.rollupToTable(n,n.visited,n.domainStates,e,r,i.visited,this.helper.getVisitedWebsitesExpandAria(f));this.rollupToTable(n,n.suspect,n.domainStates,e,r,i.suspect,this.helper.getSuspiciousWebsitesExpandAria(f))}return i},t.prototype.appendSearchResult=function(n,i){var r={id:_.uniqueId("search"),uri:this.helper.getSearchUrl(n.Website),text:n.Search,biId:"search-link"};switch(n.SearchType){case t.SEARCH_TYPE_IMAGE:r.aria=this.helper.getImageSearchResultAria(r.text);i.image.push(r);break;case t.SEARCH_TYPE_VIDEO:r.aria=this.helper.getVideoSearchResultAria(r.text);i.video.push(r);break;default:r.aria=this.helper.getWebSearchResultAria(r.text);i.web.push(r)}return r},t.prototype.executeVisit=function(n,t,i,r,u,f){var h=i.PageVisit,s=this.utils.parseServerDatetime(i.Date),c=this.formatString("{0} {1}",[this.helper.getShortDay(i.DayString,s),i.TimeString]).trim(),l=i.VisitCount,o=this.helper.getNormalizedUrl(h.Website),e={state:undefined,states:undefined,callback:undefined};return u?(e.states=this.actions.isReadOnly?this.readStates:this.helper.createBlockStates(o),e.callback=this.actions.onBlockUriCallback,e.undoCallback=this.actions.onBlockUriUndoCallback):(e.states=this.actions.isReadOnly?this.readStates:this.helper.createAllowStates(o),e.callback=this.actions.onAllowUriCallback,e.undoCallback=this.actions.onAllowUriUndoCallback),e.state=r.hasOwnProperty(o)?u===r[o]?e.states.inert:e.states.finished:r.hasOwnProperty(f)?u===r[f]?e.states.inert:e.states.finished:u===r[o]?e.states.finished:e.states.inert,e.undoState=e.state,{id:_.uniqueId("visit"),head:{display:o,comparable:o},meta1:{display:c,comparable:s},meta2:{display:undefined,comparable:l},image:{src:undefined,alt:"",flip:!1,icon:"",mode:"icon"},action:e,datamodel:i}},t.prototype.updateRollupState=function(n,t,i,r,u,f,e){var o=e.metadata,s=this.helper.getNormalizedUrl(n.Domain);t[s]=i.hasOwnProperty(f)?i[f]:t[f]?t[f]:i.hasOwnProperty(r.head.comparable)?!i[r.head.comparable]:u;e.children.push(r);o.visits+=r.meta2.comparable;(!o.latest||r.meta1.comparable>o.latest)&&(o.latest=r.meta1.comparable,o.display=r.meta1.display)},t.prototype.getBucketAndUpdateDisplay=function(i,r,u,f,e,o){var h,s,c=i.head.comparable===e;return f?n.Utilities.isInFlight("FamSuspectSitesOff")||this.settings.IsWebsiteFilteringEnabled!==!1||u.Category!==t.ADULT_CONTENT_CATEGORY?(s=o.visited.uindex,h=r.visited,i.meta2.display=this.helper.getVisitsDisplay(i.meta2.comparable)):(s=o.suspect.uindex,h=r.suspect,i.meta2.display=this.helper.getVisitsDisplay(i.meta2.comparable)):(s=o.blocked.uindex,h=r.blocked,i.meta2.display=this.helper.getAttemptsDisplay(i.meta2.comparable)),this.addToUriIndex(i.head.comparable,i,s),c===!1&&this.addToUriIndex(e,i,s),h},t.prototype.addToUriIndex=function(n,t,i){i.hasOwnProperty(n)===!1?i[n]=[t]:i[n].push(t)},t.prototype.rollupToTable=function(n,t,i,r,u,f,e){var o,l,a;if(t.children.length!==0){var s=this.helper.getNormalizedUrl(u.Domain),h=t.metadata,c={id:_.uniqueId("site"),head:{display:s,comparable:s},meta1:{display:h.display,comparable:h.latest},meta2:{display:undefined,comparable:h.visits},image:{src:undefined,alt:"favicon",icon:"mee-icon mee-icon-Globe",mode:"image",flip:!1},action:{state:undefined,states:undefined,callback:undefined,undoCallback:undefined,undoState:undefined},datamodel:u};this.addToUriIndex(s,c,f.uindex);o=c.action;l=r[s]?r[s]:i[s];t===n.blocked?(o.states=this.actions.isReadOnly?this.readStates:this.helper.createAllowStates(s),o.state=l?o.states.finished:o.states.inert,o.callback=this.actions.onAllowDomainCallback,o.undoCallback=this.actions.onAllowDomainUndoCallback,c.meta2.display=this.helper.getAttemptsDisplay(h.visits)):(o.states=this.actions.isReadOnly?this.readStates:this.helper.createBlockStates(s),o.state=l?o.states.inert:o.states.finished,o.callback=this.actions.onBlockDomainCallback,o.undoCallback=this.actions.onBlockDomainUndoCallback,c.meta2.display=this.helper.getVisitsDisplay(h.visits));o.undoState=o.state;a={summary:c,children:t.children,expander:this.helper.createExpander({isExpanded:!1,onExpand:this.actions.onExpandCallback,ariaLabel:e}),limit:{all:!1,min:0}};f.rows.push(a);f.index[s]=a}},t.BLOCKED_DECISION=1,t.SEARCH_TYPE_IMAGE=1,t.SEARCH_TYPE_VIDEO=2,t.ADULT_CONTENT_CATEGORY=3,t}(),r=function(){function n(n){this.formatString=n}return n.prototype.create=function(n,t,r,u){return new i(n,t,r,u,this.formatString)},n.prototype.createInject=function(n,t,r,u,f){return new i(n,t,r,u,f)},n.$inject=["stringFormatFilter"],n}();angular.module(t.moduleName).service("webReportDefaultStrategyFactory",r)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"webreportXtable",{templateUrl:t.settingsFolderBasePath+"RecentActivity/WebReport/webreport-xtable.component.html",transclude:{help:"?help"},bindings:{table:"<",heading:"<"}})],i)}();t.WebReportXTableComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){this.isInFamSuspectSitesOffFlight=n.Utilities.isInFlight("FamSuspectSitesOff")}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"webreport",{templateUrl:t.settingsFolderBasePath+"RecentActivity/WebReport/webreport.component.html",transclude:{inert:"?inert",finished:"?finished"},bindings:{drawer:"<",report:"<",childId:"<",compass:"<",roster:"<",settings:"<"}})],i)}();t.WebReportComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.compass=n;this.settings=t;this.formatString=i}return n.prototype.createAllowStates=function(n){return{inert:{name:"inert",props:{text:this.compass.ActionAllow,aria:this.formatString(this.compass.ActionAllowForNarrator,n),glyph:"checkbox",biId:"allow-website-button"}},progress:{name:"inProgress"},finished:{name:"finished",props:{text:this.compass.ActionAllowCompleted,aria:this.formatString(this.compass.ActionAllowCompletedForNarrator,n),glyph:"checkbox"}},failed:{name:"failed",props:{text:this.compass.ErrorGeneric,aria:this.compass.ErrorGeneric}},undo:{name:"undo",props:{text:this.compass.ActionUndo,aria:this.formatString(this.compass.ActionUndoAllowForNarrator,n),biId:"undo-allow-website-button"}}}},n.prototype.createBlockStates=function(n){return{inert:{name:"inert",props:{text:this.compass.ActionBlock,aria:this.formatString(this.compass.ActionBlockForNarrator,n),glyph:"blocked",biId:"block-website-button"}},progress:{name:"inProgress"},finished:{name:"finished",props:{text:this.compass.ActionBlockCompleted,aria:this.formatString(this.compass.ActionBlockCompletedForNarrator,n),glyph:"blocked"}},failed:{name:"failed",props:{text:this.compass.ErrorGeneric,aria:this.compass.ErrorGeneric}},undo:{name:"undo",props:{text:this.compass.ActionUndo,aria:this.formatString(this.compass.ActionUndoBlockForNarrator,n),biId:"undo-block-website-button"}}}},n.prototype.createReadStates=function(){var n={text:undefined,aria:undefined,glyph:undefined};return{inert:{name:"inert",props:n},progress:{name:"inProgress",props:n},finished:{name:"finished",props:n},failed:{name:"failed",props:n}}},n.prototype.createExpander=function(n){return{isExpanded:n.isExpanded,onExpand:n.onExpand,ariaLabel:n.ariaLabel,biId:"expand-website-button"}},n.prototype.getWebSearchResultAria=function(n){return this.formatString(this.compass.SearchesResultForWebNarrator,n)},n.prototype.getImageSearchResultAria=function(n){return this.formatString(this.compass.SearchesResultForImageNarrator,n)},n.prototype.getVideoSearchResultAria=function(n){return this.formatString(this.compass.SearchesResultForVideoNarrator,n)},n.prototype.getBlockedWebsitesExpandAria=function(n){return this.formatString(this.compass.ActionExpandBlockedWebsitesForNarrator,n)},n.prototype.getVisitedWebsitesExpandAria=function(n){return this.formatString(this.compass.ActionExpandVisitedWebsitesForNarrator,n)},n.prototype.getSuspiciousWebsitesExpandAria=function(n){return this.formatString(this.compass.ActionExpandSuspiciousWebsitesForNarrator,n)},n.prototype.getVisitsDisplay=function(n){return this.formatString(this.compass.WebsiteVisitText,n)},n.prototype.getAttemptsDisplay=function(n){return this.formatString(this.compass.WebsiteAttemptText,n)},n.prototype.getShortDay=function(n,t){if(this.isToday(t))return"";var i=this.compass.DayNames.indexOf(n);return this.compass.ShortestDayNames[i]},n.prototype.isToday=function(n){return(new Date).toDateString()===n.toDateString()},n.prototype.getShowMoreLessDisplay=function(){return{showMoreLabel:this.compass.ActionShowAll,showLessLabel:this.compass.ActionShowLess}},n.prototype.getNormalizedUrl=function(n){return n.replace(/^(https?:\/\/)?(www\.)?/,"").replace(/\/?$/,"")},n.prototype.getSearchUrl=function(n){return n},n}(),i=function(){function n(n,t){this.formatString=n;this.defaultStrategyFactory=t}return n.prototype.create=function(n,i){return new t(n,i,this.formatString)},n.prototype.createInject=function(n,i,r){return new t(n,i,r)},n.$inject=["stringFormatFilter"],n}();angular.module(n.moduleName).service("webReportHelperFactory",i)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.formatString=n;this.helperFactory=t;this.defaultStrategyFactory=i}return n.prototype.findStrategy=function(n,t,i,r){var u=this.helperFactory.create(n,t);return this.defaultStrategyFactory.create(i,r,t,u)},n.$inject=["stringFormatFilter","webReportHelperFactory","webReportDefaultStrategyFactory"],n}();angular.module(n.moduleName).service("webReportStrategyFinder",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.timeSpanService=n}return n.prototype.setupService=function(n,t){this.cms=n;this.childInfo=t},n.prototype.getCMS=function(){return this.cms},n.prototype.getAllowanceDropdownIndex=function(n){var t=this.timeSpanService.parseTimeSpan(n),i;return!t||t.Days==1?0:t.Hours==0&&t.Minutes==0?1:(i=t.Hours*2+1+(t.Minutes==0?0:1),i>this.cms.AllowanceListItems.length?0:i)},n.prototype.generateAllowedIntervals=function(n){for(var i={Begin:null,End:null},r=[],t=0;t<n.length;t++)n[t]&&!i.Begin?i.Begin=this.cms.TimeList[t]:n[t]&&i.Begin&&(i.End=this.cms.TimeList[t]),(!n[t]||t==n.length-1)&&i.Begin&&(i.End=t==n.length-1&&n[t]?this.cms.TimeList[0]:this.cms.TimeList[t],r.push(i),i={Begin:null,End:null});return r},n.prototype.buildScheduleAriaLabelForDay=function(n,t,i){var u=this.generateAllowedIntervals(n),f=this.cms.Strings.ScreenTimeNotYetSet.slice(),r,e;if(u.length>0)for(f=i+": "+t+": ",r=0;r<u.length;r++)e=u[r],f+=e.Begin+" "+this.cms.Strings.To+": "+e.End,r!=u.length-1&&(f+=this.cms.Strings.Comma+" ");return f},n.$inject=["timeSpanService"],n}();angular.module(n.moduleName).service("screenTimeService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(t,i,r,u,f,e,o,s){this.apiService=t;this.screenTimeService=i;this.$q=r;this.$meeErrors=u;this.$timeout=f;this.$meeA11y=e;this.$scope=o;this.appConfig=s;this.loading=!1;this.pcEnabled=!1;this.isProtectOneSchedule=!0;this.xboxEnabled=!1;this.isInFamilyAppVariantFlight=n.Utilities.isInFlight("FamilyAppVariant");this.isFamApp=!1}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.screenTime},i.prototype.componentOnInit=function(){var n=this;return this.cms=this.compassContent.template,this.childId=this.childInfo.FamilyServiceId,this.oneScheduleToggleError="screentime.toggleerror.one-schedule-toggle",this.isFamApp=this.isInFamilyAppVariantFlight&&this.appConfig.isRequestOriginApp,this.screenTimeService.setupService(this.cms,this.childInfo),this.experienceToShow=this.childInfo.IsLocal?"Local":"MSA",this.apiService.getTimeAllowancePolicy(this.childId).then(function(t){n.isOneSchedule=t==2;n.isProtectOneSchedule=n.isOneSchedule})},i.prototype.switchProgress=function(n){this.loading=n},i.prototype.updateTimeAllowancePolicy=function(){var n=this,t;return this.switchProgress(!0),this.$meeErrors.reset(this.oneScheduleToggleError),t=this.isProtectOneSchedule?2:1,this.apiService.updateTimeAllowancePolicySetting(this.childId,t).then(function(){n.switchProgress(!1);n.isOneSchedule=!n.isOneSchedule}).catch(function(t){return n.switchProgress(!1),n.$meeErrors.setError(n.oneScheduleToggleError,n.cms.Strings.ErrorScreenTimeToggle),n.$timeout().then(function(){n.isProtectOneSchedule=!n.isProtectOneSchedule}),n.$q.reject(t)}).finally(function(){n.$meeA11y.focuser.focus("#one-schedule-toggle",{})})},i.$inject=["apiService","screenTimeService","$q","$meeErrors","$timeout","$meeA11y","$scope","familyConfig"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("updateTimeAllowancePolicy"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateTimeAllowancePolicy")],i.prototype,"updateTimeAllowancePolicy",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"screenTime",{templateUrl:t.settingsFolderBasePath+"ScreenTime/screen-time.html",bindings:{compassContent:"<",childInfo:"<",familyRosterModel:"<",weekSettings:"<",xboxWeekSettings:"<"}})],i)}();t.ScreenTimeComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n){this.familyConfig=n;this.steps={opened:this.familyConfig.scenarioStates.opened,saved:this.familyConfig.scenarioStates.saved}}return n.prototype.getBeginData=function(n){var t=n.data.dayIndex!=null?this.familyConfig.scenarios.screenTimeDayFlow:this.familyConfig.scenarios.screenTimeWeekFlow;return{bi:{area:this.familyConfig.Area,scenario:t,step:this.steps.opened},state:"Family.Settings.ScreenTime.timeLimitDialog",modalId:"#family-dialog",modalShowOptions:n,exitState:{id:"Family.Settings.ScreenTime"}}},n.$inject=["familyConfig"],n}();angular.module(n.moduleName).service("screenTimeDialogFlow",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$meeErrors=n;this.screenTimeService=t;this.flowService=i;this.screenTimeDialogFlow=r;this.$meeA11y=u;this.allowedIntervals=[];this.asyncWorking=!1;this.disableSave=!0;this.SUBMITERROR="submitError"}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS();this.cmsTimelist=this.cms.TimeList.slice();this.dayName=this.cms.DaysOfTheWeek[this.dayInfo.DayOfWeek];this.newTimeline=this.dayInfo.Timeline.slice();this.oldTimeline=this.dayInfo.Timeline.slice();this.allowedIntervals=this.screenTimeService.generateAllowedIntervals(this.newTimeline);this.dialogHeader=this.cms.DialogHeaders[this.dayInfo.DayOfWeek]},i.prototype.transformEndTimelistAndOptionCallback=function(){this.transformEndTimelistAndOption({$event:{startOption:this.startOption,endOption:this.endOption}})},i.prototype.addTimeLimit=function(){var i=this.cmsTimelist.indexOf(this.startOption),t=this.cmsTimelist.indexOf(this.endOption),n;for(t===0&&(t=this.newTimeline.length),n=i;n<t;n++)this.newTimeline[n]=!0;this.allowedIntervals=this.screenTimeService.generateAllowedIntervals(this.newTimeline);this.updateDisableSave()},i.prototype.onModalCancel=function(){this.flowService.cancel();this.closeModalWrapper()},i.prototype.closeModalWrapper=function(){this.$meeErrors.reset(this.SUBMITERROR);this.flowService.exit()},i.prototype.removeTimeLimit=function(n){var r=this.cms.TimeList.indexOf(this.allowedIntervals[n].Begin),i=this.cms.TimeList.indexOf(this.allowedIntervals[n].End),t;for(this.allowedIntervals.splice(n,1),i<=r&&(i=48),t=r;t<i;t++)this.newTimeline[t]=!1;this.updateDisableSave();this.disableSave||this.allowedIntervals.length!==0?!this.disableSave&&this.allowedIntervals.length>0?this.$meeA11y.focuser.focus("#time-limit-schedule button",{}):this.$meeA11y.focuser.focus("#time-limit-day-cancel",{}):this.$meeA11y.focuser.focus("#time-limit-day-save",{})},i.prototype.submitTimeLimitChangeFn=function(){var n=this,t;this.$meeErrors.reset(this.SUBMITERROR);this.asyncWorking=!0;t=this.dayInfo.Timeline.slice();this.dayInfo.Timeline=this.newTimeline;this.flowService.stayInCurrentState({step:this.screenTimeDialogFlow.steps.saved});this.callSubmitFn().then(function(){n.asyncWorking=!1;n.flowService.end();n.closeModalWrapper()},function(t){n.dayInfo.Timeline=n.oldTimeline;n.asyncWorking=!1;n.flowService.stayInCurrentState({step:n.screenTimeDialogFlow.steps.opened,error:t});n.$meeErrors.setError(n.SUBMITERROR,n.cms.Strings.ErrorScreenTimeToggle)})},i.prototype.callSubmitFn=function(){return this.submitTimeLimitChangeDay({$event:{dayInfo:this.dayInfo}})},i.prototype.updateDisableSave=function(){this.disableSave=_.isEqual(this.newTimeline,this.dayInfo.Timeline);this.setSaveButtonAriaLabel()},i.prototype.setSaveButtonAriaLabel=function(){this.saveButtonAriaLabel=this.screenTimeService.buildScheduleAriaLabelForDay(this.newTimeline,this.dayName,"")},i.$inject=["$meeErrors","screenTimeService","flowService","screenTimeDialogFlow","$meeA11y"],__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation")],i.prototype,"callSubmitFn",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"timeLimitDayDialog",{templateUrl:t.settingsFolderBasePath+"ScreenTime/Dialog/time-limit-day-dialog.html",bindings:{cellIndex:"<",dayInfo:"<",endOption:"<",endTimelist:"<",startOption:"<",startTimelist:"<",submitTimeLimitChangeDay:"&",transformEndTimelistAndOption:"&"}})],i)}();t.TimeLimitDayDialogComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){var r=this;this.screenTimeService=n;this.flowService=t;this.$timeout=i;this.allowedIntervals=[];this.screenTimeStateName="Family.Settings.ScreenTime";this.setInitialNeededData=function(){r.cms=r.screenTimeService.getCMS();r.passedData=r.flowService.getData();r.cellIndex=r.passedData.cellIndex;r.dayIndex=r.passedData.dayIndex;r.weekSettings=r.passedData.weekSettings;r.updateScreenTimeDay=r.passedData.updateScreenTimeDay;r.updateScreenTimeWeek=r.passedData.updateScreenTimeWeek;r.cmsTimelist=r.cms.TimeList.slice();r.startTimelist=r.cmsTimelist.slice(0,48);r.endTimelist=r.cmsTimelist.slice(1,48);r.endTimelist.push(r.cmsTimelist[0])};this.transformEndTimelistAndOption=function(n){var t=n?r.cmsTimelist.indexOf(n.startOption):r.cmsTimelist.indexOf(r.startOption),u=n?r.cmsTimelist.indexOf(n.endOption):r.cmsTimelist.indexOf(r.endOption),i=r.cmsTimelist[0].slice();u<=t?t>=46?(r.endTimelist=t===46?[r.cmsTimelist[47].slice(),i]:[i],r.setEndOption(r.endTimelist[r.endTimelist.length-1])):(r.endTimelist=r.cmsTimelist.slice(t+1),r.endTimelist.push(i),u!=0&&r.setEndOption(r.cmsTimelist[t+2])):(r.endTimelist=r.cmsTimelist.slice(t+1),r.endTimelist.push(i),r.setEndOption(r.endTimelist[r.endTimelist.indexOf(r.endOption)]))}}return i.prototype.$onInit=function(){this.setInitialNeededData();this.dayIndex!=null?(this.dialogToShow="day",this.dayInfo=this.weekSettings.DaysArray[this.dayIndex]):(this.dialogToShow="week",this.weekInfo=this.weekSettings.DaysArray);this.setOnOpenIndices()},i.prototype.setOnOpenIndices=function(){if(this.cellIndex!=undefined){this.startOption=this.cmsTimelist[this.cellIndex];var n=this.screenTimeService.getAllowanceDropdownIndex(this.dayInfo.Allowance);n===0||n===1?n=2:n===2?n=0:n-=1;this.endOption=this.cellIndex+n>=this.cmsTimelist.length?this.cmsTimelist[0]:this.cmsTimelist[this.cellIndex+n]}else this.startOption=this.cmsTimelist[18],this.endOption=this.cmsTimelist[39];this.transformEndTimelistAndOption()},i.prototype.setEndOption=function(n){var t=this;this.$timeout().then(function(){t.endOption=n})},i.prototype.submitTimeLimitChangeDay=function(n){return this.updateScreenTimeDay(n)},i.prototype.submitTimeLimitChangeWeek=function(n){return this.updateScreenTimeWeek(n)},i.$inject=["screenTimeService","flowService","$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"timeLimitDialogBase",{templateUrl:t.settingsFolderBasePath+"ScreenTime/Dialog/time-limit-dialog-base.html"})],i)}();t.TimeLimitDialogBaseComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$meeErrors=n;this.screenTimeService=t;this.flowService=i;this.screenTimeDialogFlow=r;this.asyncWorking=!1;this.multiEditFlags=[!1,!1,!1,!1,!1,!1,!1];this.timelineBackup=[null,null,null,null,null,null,null];this.SUBMITERROR="submitError"}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS();for(var n=0;n<this.weekInfo.length;n++)this.timelineBackup[n]=this.weekInfo[n].Timeline.slice()},i.prototype.transformEndTimelistAndOptionCallback=function(){this.transformEndTimelistAndOption({$event:{startOption:this.startOption}})},i.prototype.onModalCancel=function(){this.flowService.cancel();this.closeModalWrapper()},i.prototype.closeModalWrapper=function(){this.$meeErrors.reset(this.SUBMITERROR);this.flowService.exit()},i.prototype.addTimeLimits=function(){var u=this.cms.TimeList.indexOf(this.startOption),i=this.cms.TimeList.indexOf(this.endOption),n,r,t;for(i===0&&(i=48),n=0;n<this.multiEditFlags.length;n++)if(this.multiEditFlags[n]){for(r=this.timelineBackup[n].slice(),t=u;t<i;t++)r[t]=!0;this.weekInfo[n].Timeline=r.slice()}},i.prototype.submitTimeLimitChangeFn=function(){var n=this;this.$meeErrors.reset(this.SUBMITERROR);this.asyncWorking=!0;this.addTimeLimits();this.flowService.stayInCurrentState({step:this.screenTimeDialogFlow.steps.saved});this.callSubmitFn().then(function(){n.asyncWorking=!1;n.flowService.end();n.closeModalWrapper()},function(t){for(var i=0;i<n.multiEditFlags.length;i++)n.multiEditFlags[i]&&(n.weekInfo[i].Timeline=n.timelineBackup[i]);n.asyncWorking=!1;n.flowService.stayInCurrentState({step:n.screenTimeDialogFlow.steps.opened,error:t});n.$meeErrors.setError(n.SUBMITERROR,n.cms.Strings.ErrorScreenTimeToggle)})},i.prototype.callSubmitFn=function(){return this.submitTimeLimitChangeWeek({$event:{weekInfo:this.weekInfo,changedDays:this.multiEditFlags}})},i.$inject=["$meeErrors","screenTimeService","flowService","screenTimeDialogFlow"],__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation")],i.prototype,"callSubmitFn",null),__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"timeLimitWeekDialog",{templateUrl:t.settingsFolderBasePath+"ScreenTime/Dialog/time-limit-week-dialog.html",bindings:{endOption:"<",endTimelist:"<",startOption:"<",startTimelist:"<",weekInfo:"<",submitTimeLimitChangeWeek:"&",transformEndTimelistAndOption:"&"}})],i)}();t.TimeLimitWeekDialogComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){var e=this;this.apiService=n;this.pageReliabilityService=t;this.screenTimeService=i;this.$q=r;this.$timeout=u;this.$meeErrors=f;this.isContentLoaded=!1;this.getWeekSettingsId="get-week-settings-global";this.setInitialNeededData=function(){e.cms=e.screenTimeService.getCMS();e.config={stType:"global",colorClass:"pc-color",deviceIcon:null,deviceDescription:null,deviceTitle:e.cms.Strings.OneAllowanceScreenTimeHeader,toggleText:null,toggleTextEnabled:null,toggleTextDisabled:null,loading:!0};e.childId=e.childInfo.FamilyServiceId};this.onGetWeekSettingSuccess=function(){e.weekSettings.DaysArray=[e.weekSettings.DailyRestrictions.Sunday,e.weekSettings.DailyRestrictions.Monday,e.weekSettings.DailyRestrictions.Tuesday,e.weekSettings.DailyRestrictions.Wednesday,e.weekSettings.DailyRestrictions.Thursday,e.weekSettings.DailyRestrictions.Friday,e.weekSettings.DailyRestrictions.Saturday];e.isContentLoaded=!0}}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.screenTimeOneAllowance},i.prototype.componentOnInit=function(){var n=this;return this.setInitialNeededData(),this.getWeekSettingsData().then(function(t){n.weekSettings=t;n.onGetWeekSettingSuccess();n.config.loading=!1}).catch(function(t){return n.$meeErrors.setError("screentime.loading-error-get-week-settings-global",n.cms.Strings.ErrorLoadingScreentimeData),n.$q.reject(t)})},i.prototype.getWeekSettingsData=function(){return this.apiService.getScreenTimeGlobal(this.childId)},i.prototype.updateScreenTimeDay=function(n){return this.apiService.updateScreenTimeDayAllowedIntervalsGlobal(this.childId,n.dayInfo)},i.prototype.updateScreenTimeWeek=function(){return this.apiService.updateScreenTimeWeekAllowedIntervalsGlobal(this.childId,this.weekSettings)},i.prototype.updateScreenTimeAllowanceForDay=function(n){return this.weekSettings.DaysArray[n.dayIndex].Allowance=n.allowance,this.apiService.updateScreenTimeAllowanceGlobal(this.childId,this.weekSettings.DaysArray[n.dayIndex])},i.$inject=["apiService","pageReliabilityService","screenTimeService","$q","$timeout","$meeErrors"],__decorate([n.OneUI.Angular.MonitorOperationProgress("get-week-settings-global")],i.prototype,"getWeekSettingsData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeDay")],i.prototype,"updateScreenTimeDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeWeek")],i.prototype,"updateScreenTimeWeek",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeAllowanceForDay")],i.prototype,"updateScreenTimeAllowanceForDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"screenTimeOneAllowance",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/OneAllowance/screen-time-one-allowance.html",bindings:{childInfo:"<"}})],i)}();t.ScreenTimeOneAllowanceComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){var f=this;this.$q=n;this.$meeErrors=t;this.apiService=i;this.pageReliabilityService=r;this.screenTimeService=u;this.getWeekSettingsId="get-week-settings-pc";this.isScreenTimeEnabled=!1;this.setInitialNeededData=function(){f.cms=f.screenTimeService.getCMS();var n=f.childInfo.IsLocal&&!!f.childInfo.LocalAccountMachineName?f.childInfo.LocalAccountMachineName:f.cms.Strings.PCScreenTimeHeader;f.config={stType:"pc",colorClass:"pc-color",deviceIcon:"mee-icon-System",deviceDescription:f.cms.Strings.PCText,deviceTitle:n,toggleText:f.cms.Strings.PCSettingControl,toggleTextEnabled:f.cms.Strings.DescriptionToggleTextEnabled,toggleTextDisabled:f.cms.Strings.DescriptionToggleTextDisabled,loading:!0};f.childId=f.childInfo.FamilyServiceId};this.onGetWeekSettingSuccess=function(){f.isScreenTimeEnabled=f.weekSettings.IsEnabled;f.weekSettings.DaysArray=[f.weekSettings.DailyRestrictions.Sunday,f.weekSettings.DailyRestrictions.Monday,f.weekSettings.DailyRestrictions.Tuesday,f.weekSettings.DailyRestrictions.Wednesday,f.weekSettings.DailyRestrictions.Thursday,f.weekSettings.DailyRestrictions.Friday,f.weekSettings.DailyRestrictions.Saturday]}}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.screenTimePc},i.prototype.componentOnInit=function(){var n=this;return this.setInitialNeededData(),this.getWeekSettingsData().then(function(t){n.weekSettings=t;n.onGetWeekSettingSuccess();n.config.loading=!1}).catch(function(t){return n.$meeErrors.setError("loadingerror-"+n.getWeekSettingsId,n.cms.Strings.ErrorLoadingScreentimeData),n.$q.reject(t)})},i.prototype.getWeekSettingsData=function(){return this.apiService.getScreenTimeV2(this.childId)},i.prototype.updateScreenTimeAllowanceForDay=function(n){return this.weekSettings.DaysArray[n.dayIndex].Allowance=n.allowance,this.apiService.updateScreenTimeAllowanceV2(this.childId,this.weekSettings.DaysArray[n.dayIndex])},i.prototype.updateScreenTimeIsEnabled=function(){return this.apiService.updateScreenTimeEnabledV2(this.childId,!this.isScreenTimeEnabled)},i.prototype.updateScreenTimeDay=function(n){return this.apiService.updateScreenTimeDayAllowedIntervalsV2(this.childId,n.dayInfo)},i.prototype.updateScreenTimeWeek=function(){return this.apiService.updateScreenTimeWeekAllowedIntervalsV2(this.childId,this.weekSettings)},i.$inject=["$q","$meeErrors","apiService","pageReliabilityService","screenTimeService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("get-week-settings-pc")],i.prototype,"getWeekSettingsData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeAllowanceForDay")],i.prototype,"updateScreenTimeAllowanceForDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeIsEnabled")],i.prototype,"updateScreenTimeIsEnabled",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeDay")],i.prototype,"updateScreenTimeDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeWeek")],i.prototype,"updateScreenTimeWeek",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"screenTimePc",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/screen-time-base.html",bindings:{childInfo:"<"}})],i)}();t.ScreenTimePcComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){this.$meeErrors=n;this.screenTimeService=t;this.$meeA11y=i;this.allowanceProgress=!1}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS()},i.prototype.updateAllowanceSelection=function(n){var t=this;this.switchAllowanceProgress(!0);this.$meeErrors.reset("allowance-"+this.dayName.toLowerCase());this.updateScreenTimeAllowanceForDay({$event:{dayIndex:n,allowanceIndex:this.allowanceIndex}}).then(function(){t.switchAllowanceProgress(!1)}).catch(function(){t.switchAllowanceProgress(!1)}).finally(function(){t.$meeA11y.focuser.focus("#st-allowance-limits-row-"+t.config.stType+"-"+t.cms.DaysOfTheWeek[n]+" mee-select",{})})},i.prototype.switchAllowanceProgress=function(n){this.allowanceProgress=!!n},i.prototype.openModalRowKeyboard=function(n,t){if(n){var i=n.which||n.keyCode||n.charCode;switch(i){case 13:case 32:n.preventDefault();this.openModal({$event:{dayIndex:t}})}}},i.prototype.openModalCell=function(n,t){var r,i;n&&(n.target&&n.target.attributes["cell-index"]?(r=Number(n.target.attributes["cell-index"].value),this.openModal({$event:{dayIndex:t,cellIndex:r}})):(i=!n.clientX&&!n.clientY,i||n.target.tagName.toLowerCase()!=="st-grid-row"||(i=Math.abs(n.offsetX-n.target.clientWidth/2)<2&&Math.abs(n.offsetY-n.target.clientHeight/2)<2),i&&this.openModal({$event:{dayIndex:t}})))},i.$inject=["$meeErrors","screenTimeService","$meeA11y"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"stAllowanceLimitsRow",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/st-allowance-limits-row.html",bindings:{allowanceIndex:"=",config:"<",dayName:"<",rowInfo:"=",openModal:"&",updateScreenTimeAllowanceForDay:"&"}})],i)}();t.STAllowanceLimitsRowComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){var u=this;this.screenTimeService=n;this.$q=t;this.flowService=i;this.screenTimeDialogFlow=r;this.allowanceDropdownValues=[null,null,null,null,null,null,null];this.openModal=function(n){var t=n?n.dayIndex:null,r=n?n.cellIndex:null,i={dayIndex:t,cellIndex:r,weekSettings:u.weekSettings,updateScreenTimeDay:u.updateScreenTimeDayDialog,updateScreenTimeWeek:u.updateScreenTimeWeekDialog},f={modalHostOptions:{ariaDialogLabel:t?u.cms.DialogHeaders[t]:u.cms.Strings.ModalDialogWeekHeader,kind:"flow close-button"},data:i};u.flowService.setData(i);u.flowService.begin(u.screenTimeDialogFlow.getBeginData(f))};this.updateScheduleAriaLabelsForGrid=function(n){n.forEach(function(n){var t=u.screenTimeService.buildScheduleAriaLabelForDay(u.weekSettings.DaysArray[n].Timeline,u.cms.DaysOfTheWeek[n],u.config.stType);u.weekSettings.DaysArray[n].TimelineText=t})};this.updateAllowanceSelection=function(n){return u.updateScreenTimeAllowanceForDay({$event:{dayIndex:n.dayIndex,allowance:u.getAllowanceObjectFromDropdownIndex(n.allowanceIndex)}})};this.updateScreenTimeDayDialog=function(n){return u.updateScreenTimeDay({$event:n}).then(function(t){return u.updateScheduleAriaLabelsForGrid([n.dayInfo.DayOfWeek]),u.$q.resolve(t)}).catch(function(n){return u.$q.reject(n)})};this.updateScreenTimeWeekDialog=function(n){return u.updateScreenTimeWeek({$event:n}).then(function(t){var i=[];return n.changedDays.forEach(function(n,t){n&&i.push(t)}),u.updateScheduleAriaLabelsForGrid(i),u.$q.resolve(t)}).catch(function(n){return u.$q.reject(n)})}}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS();for(var n=0;n<this.weekSettings.DaysArray.length;n++)this.allowanceDropdownValues[n]=this.screenTimeService.getAllowanceDropdownIndex(this.weekSettings.DaysArray[n].Allowance).toString(),this.updateScheduleAriaLabelsForGrid([n])},i.prototype.getAllowanceObjectFromDropdownIndex=function(n){if(n==0)return"1.00:00:00";if(n==1)return"00:00:00";var t=Math.floor((n-1)/2),i=n%2==0?30:0,r=(t<10?"0":"")+t,u=(i<10?"0":"")+i;return r+":"+u+":00"},i.$inject=["screenTimeService","$q","flowService","screenTimeDialogFlow"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"stAllowanceLimits",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/st-allowance-limits.html",bindings:{childInfo:"<",config:"<",weekSettings:"<",updateScreenTimeAllowanceForDay:"&",updateScreenTimeDay:"&",updateScreenTimeWeek:"&"}})],i)}();t.STAllowanceLimitsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$meeErrors=n;this.$timeout=t;this.screenTimeService=i;this.$meeUtil=r;this.$meeA11y=u;this.protectIsEnabledBool=!0;this.toggleProgress=!1}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS();this.colorClass=this.config.colorClass;this.deviceIcon=this.config.deviceIcon;this.protectIsEnabledBool=!!this.isScreenTimeEnabled;this.toggleUid=this.$meeUtil.nextUid()},i.prototype.toggleChange=function(){var n=this;this.switchProgress(!0);this.$meeErrors.reset("toggleerror-"+this.colorClass);this.updateScreenTimeIsEnabled({$event:{newIsEnabled:!this.isScreenTimeEnabled}}).then(function(){n.switchProgress(!1);n.isScreenTimeEnabled=!n.isScreenTimeEnabled}).catch(function(){n.switchProgress(!1);n.$meeErrors.setError("toggleerror-"+n.colorClass,n.cms.Strings.ErrorScreenTimeToggle);n.$timeout().then(function(){n.protectIsEnabledBool=!n.protectIsEnabledBool})}).finally(function(){n.$meeA11y.focuser.focus("#"+n.toggleUid,{})})},i.prototype.switchProgress=function(n){this.config.loading=!!n;this.toggleProgress=!!n},i.$inject=["$meeErrors","$timeout","screenTimeService","$meeUtil","$meeA11y"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"stDescriptionToggle",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/st-description-toggle.html",bindings:{config:"<",isScreenTimeEnabled:"=",updateScreenTimeIsEnabled:"&"}})],i)}();t.STDescriptionToggleComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.screenTimeService=n}return i.prototype.$onInit=function(){this.cms=this.screenTimeService.getCMS()},i.prototype.activeClass=function(n){return n?this.config.colorClass:""},i.$inject=["screenTimeService"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"stGridRow",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/st-grid-row.html",bindings:{config:"<",rowInfo:"="}})],i)}();t.STGridRowComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){var f=this;this.$q=n;this.$meeErrors=t;this.apiService=i;this.pageReliabilityService=r;this.screenTimeService=u;this.getWeekSettingsId="get-week-settings-xbox";this.isScreenTimeEnabled=!1;this.setInitialNeededData=function(){f.cms=f.screenTimeService.getCMS();f.config={stType:"xbox",colorClass:"xbox-color",deviceIcon:"mee-icon-XboxOneConsole",deviceDescription:f.cms.Strings.XboxText,deviceTitle:f.cms.Strings.XboxScreenTimeHeader,toggleText:f.cms.Strings.XboxSettingControl,toggleTextEnabled:f.cms.Strings.DescriptionToggleTextEnabled,toggleTextDisabled:f.cms.Strings.DescriptionToggleTextDisabled,loading:!0};f.childId=f.childInfo.FamilyServiceId};this.onGetWeekSettingSuccess=function(){f.isScreenTimeEnabled=f.weekSettings.IsEnabled;f.weekSettings.DaysArray=[f.weekSettings.DailyRestrictions.Sunday,f.weekSettings.DailyRestrictions.Monday,f.weekSettings.DailyRestrictions.Tuesday,f.weekSettings.DailyRestrictions.Wednesday,f.weekSettings.DailyRestrictions.Thursday,f.weekSettings.DailyRestrictions.Friday,f.weekSettings.DailyRestrictions.Saturday]}}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.screenTimeXbox},i.prototype.componentOnInit=function(){var n=this;return this.setInitialNeededData(),this.getWeekSettingsData().then(function(t){n.weekSettings=t;n.onGetWeekSettingSuccess();n.config.loading=!1}).catch(function(t){return n.$meeErrors.setError("loadingerror-"+n.getWeekSettingsId,n.cms.Strings.ErrorLoadingScreentimeData),n.$q.reject(t)})},i.prototype.getWeekSettingsData=function(){return this.apiService.getScreenTimeXbox(this.childId)},i.prototype.updateScreenTimeAllowanceForDay=function(n){return this.weekSettings.DaysArray[n.dayIndex].Allowance=n.allowance,this.apiService.updateScreenTimeAllowanceXbox(this.childId,this.weekSettings.DaysArray[n.dayIndex])},i.prototype.updateScreenTimeIsEnabled=function(){return this.apiService.updateScreenTimeEnabledXbox(this.childId,!this.isScreenTimeEnabled)},i.prototype.updateScreenTimeDay=function(n){return this.apiService.updateScreenTimeDayAllowedIntervalsXbox(this.childId,n.dayInfo)},i.prototype.updateScreenTimeWeek=function(){return this.apiService.updateScreenTimeWeekAllowedIntervalsXbox(this.childId,this.weekSettings)},i.$inject=["$q","$meeErrors","apiService","pageReliabilityService","screenTimeService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("get-week-settings-xbox")],i.prototype,"getWeekSettingsData",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeAllowanceForDay")],i.prototype,"updateScreenTimeAllowanceForDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeIsEnabled")],i.prototype,"updateScreenTimeIsEnabled",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeDay")],i.prototype,"updateScreenTimeDay",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateScreenTimeWeek")],i.prototype,"updateScreenTimeWeek",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"screenTimeXbox",{templateUrl:t.settingsFolderBasePath+"ScreenTime/ScreenTimeBody/Shared/screen-time-base.html",bindings:{childInfo:"<"}})],i)}();t.ScreenTimeXboxComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){this.showUpsell=!!this.showUpsell}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"settingsLayout",{templateUrl:t.settingsFolderBasePath+"Shared/SettingsLayout/settings-layout.html",transclude:{pageHeader:"?pageHeader",pageTitle:"?pageTitle",leftHeadingContent:"?leftHeadingContent",rightHeadingContent:"?rightHeadingContent",leftRightHeadingContent:"?leftRightHeadingContent",pageBody:"pageBody",upsell:"?upsell"},bindings:{showUpsell:"<?"}})],i)}();t.SettingsLayoutComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$scope=n;this.$rootScope=t;this.$state=i;this.apiService=r;this.familyConfig=u;this.$q=f;this.crStoreAPIService=e;this.childAllowsViewingData=!1;this.strings={};this.paragraphsWithStyles={};this.paymentOptionDisplayInfoCollection={};this.showPaymentOption=!1}return i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.spending},i.prototype.componentOnInit=function(){var n=this,t,i;if(this.childId=this.$state.params.childId,this.extractContent(this.compassContent),this.childInfo=this.familyRosterModel.getMemberInfo(this.childId),!this.childInfo)throw new Error("Error: spending:componentOnInit: childInfo is null");return t=this.apiService.getChildCsv(this.childInfo.FamilyServiceId).then(function(t){n.extractChildCSV(t)}),this.crStoreAPIService.setupService(this.childInfo),i=this.crStoreAPIService.getParentAllowedToSeeChildsData().then(function(t){n.childAllowsViewingData=t}),this.$q.all([t,i]).then(function(){if(n.childAllowsViewingData)return n.apiService.getPaymentOptions(n.childInfo.FamilyServiceId).then(function(t){n.extractPaymentOptions(t)})})},i.prototype.extractContent=function(n){if(n&&n.template&&n.template.PaymentOptionConfiguration&&n.template.PaymentOptionConfiguration.PaymentOptionDisplayInfoCollection)this.strings=n.template.Strings,this.paragraphsWithStyles=n.template.ParagraphsWithStyles,this.paymentOptionDisplayInfoCollection=n.template.PaymentOptionConfiguration.PaymentOptionDisplayInfoCollection;else throw new Error("Error: extractContent: compass content is not retreived properly");},i.prototype.extractChildCSV=function(n){if(n[0]&&n[0].AccountBalance)this.childCSV=n[0].AccountBalance;else throw new Error("Error: extractChildCSV: Child CSV balance is not retreived");},i.prototype.extractPaymentOptions=function(n){var i,t;if(n&&n.PaymentOptions)for(i=n.PaymentOptions,this.paymentOptions={CreditCards:[],PayPalAccounts:[],InicisAccounts:[]},t=0;t<i.length;t++)switch(i[t].PaymentInstrumentType){case 3:this.paymentOptions.CreditCards.push(i[t]);this.showPaymentOption=!0;break;case 5:this.paymentOptions.InicisAccounts.push(i[t]);this.showPaymentOption=!0;break;case 6:this.paymentOptions.PayPalAccounts.push(i[t]);this.showPaymentOption=!0}else throw new Error("Error: extractPaymentOption: Child payment option is not retreived");},i.viewName="settings/spending",i.$inject=["$scope","$rootScope","$state","apiService","familyConfig","$q","crStoreAPIService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("settingsInit")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"spending",{templateUrl:t.settingsFolderBasePath+"Spending/spending.html",bindings:{compassContent:"<",familyRosterModel:"<"}})],i)}();t.SpendingComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.$window=n;this.familyConfig=t;this.isColdStart=!1}return i.prototype.$onInit=function(){this.isColdStart=this.accountBalances&&this.accountBalances[0].Amount?this.accountBalances[0].Amount==="NA":!0;var n=this.$window.location.origin.toString()+"/family/settings/add-money/"+this.childId,t=this.familyConfig.isFamilySpendingMobileViewEnabled&&this.familyConfig.isRequestOriginApp?"?origin=familyapp&market=":"?market=";this.addMoneyHrefUrl=n.concat(t)},i.prototype.addMoneyHref=function(n){return""+this.addMoneyHrefUrl+n},i.$inject=["$window","familyConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"accountBalance",{templateUrl:t.settingsFolderBasePath+"Spending/AccountBalance/account-balance.html",bindings:{childId:"<",accountBalances:"<",compassStrings:"<",paragraphsWithStyles:"<",childSharesData:"<"}})],i)}();t.AccountBalanceComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return __decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"paymentOptions",{templateUrl:t.settingsFolderBasePath+"Spending/PaymentOptions/payment-options.html",bindings:{compassStrings:"<",paymentOptions:"<",paymentOptionDisplayInfoCollection:"<"}})],i)}();t.PaymentOptionsComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.formatString=n}return i.prototype.$onInit=function(){var n=this.paymentOption.CreditCardPaymentInstrument,t=n.ExpirationDate.substring(0,2)+"/"+n.ExpirationDate.substring(2,6);this.expiresOn=this.formatString(this.compassStrings.ExpiresOn,t);this.creditCardLogo=this.paymentOptionDisplayInfoCollection[n.CardType].Logo;this.creditCardUserId=this.paymentOptionDisplayInfoCollection[n.CardType].DisplayName+" **"+n.AccountNumberLastFour+" - "+n.AccountHolderName},i.$inject=["stringFormatFilter"],__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"creditCard",{templateUrl:t.settingsFolderBasePath+"Spending/PaymentOptions/CreditCard/credit-card.html",bindings:{compassStrings:"<",paymentOption:"<",paymentOptionDisplayInfoCollection:"<"}})],i)}();t.CreditCardComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.$onInit=function(){if(this.paymentOption&&this.paymentOptionDisplayInfoCollection)switch(this.paymentOption.PaymentInstrumentType){case 6:this.paymentLogo=this.paymentOptionDisplayInfoCollection.PayPalPayinPaymentInstrument.Logo;this.paymentUserId=this.paymentOptionDisplayInfoCollection.PayPalPayinPaymentInstrument.DisplayName+" - "+this.paymentOption.PayPalPayinPaymentInstrument.PayerEmail;break;case 5:this.paymentLogo=this.paymentOptionDisplayInfoCollection.InicisPayPaymentInstrument.Logo;this.paymentUserId=this.paymentOptionDisplayInfoCollection.InicisPayPaymentInstrument.DisplayName+" - "+this.paymentOption.InicisPayPaymentInstrument.BuyerEmail;break;default:throw new Error("payOnline: Payment type: "+this.paymentOption.PaymentInstrumentType+" is not supported.");}else throw new Error("PayOnlineComponent: paymentOption or paymentOptionDisplayInfoCollection can not be null");},__decorate([n.Shared.Angular.Decorators.Component(t.moduleName,"payOnline",{templateUrl:t.settingsFolderBasePath+"Spending/PaymentOptions/PayOnline/pay-online.html",bindings:{compassStrings:"<",paymentOption:"<",paymentOptionDisplayInfoCollection:"<"}})],i)}();t.PayOnlineComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t){this.apiService=n;this.contentRestrictionsService=t}return n.prototype.setupService=function(n){this.childFamilyServiceId=n.FamilyServiceId;this.childInfo=n},n.prototype.getStoreSettingsData=function(){return this.apiService.getPaymentRestrictions(this.childFamilyServiceId)},n.prototype.getParentAllowedToSeeChildsData=function(){return this.apiService.getPrivacyOBOBit(this.childInfo).then(function(n){return n.onBehalfOfPrivacy===!0||n.onBehalfOfPrivacy===null})},n.prototype.setAcquisitionPolicy=function(n){return this.apiService.setAcquisitionPolicy(this.childFamilyServiceId,parseInt(n))},n.prototype.setAskAParentEnabled=function(n){return this.apiService.setAcquisitionPolicy(this.childFamilyServiceId,n?1:2)},n.prototype.setPurchaseNotificationsEnabled=function(n){return this.apiService.setPurchaseNotificationsEnabled(this.childFamilyServiceId,n)},n.$inject=["apiService","contentRestrictionsService"],n}();angular.module(n.moduleName).service("crStoreAPIService",t)})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$q=n;this.$meeErrors=t;this.$timeout=i;this.$anchorScroll=r;this.crStoreAPIService=u;this.$meeA11y=f;this.$scope=e;this.loadError=!1;this.purchaseNotificationsWorking=!1;this.askAParentSettingWorking=!1;this.updateAskAParentToggleId="content-restrictions-ask-a-parent-toggle";this.updatePurchaseNotificationsToggleId="content-restrictions-purchase-notifications"}r=i;i.prototype.getInstrumentationComponentName=function(){return t.settingsComponentNames.contentRestrictionsStore};i.prototype.componentOnInit=function(){var n=this,t,i;return this.crStoreAPIService.setupService(this.childInfo),this.getStoreSettingsWorking=!0,this.setInitialNeededData(),t=this.getStoreSettingsData(),i=this.getPurchaseNotificationsAllowedByChild(),this.$q.all({getStoreSettingsDataPromise:t,getOboSettingsDataPromise:i}).then(function(t){n.askAParentSettingEnabled=t.getStoreSettingsDataPromise.AcquisitionPolicy===1;n.purchaseNotificationsEnabled=t.getStoreSettingsDataPromise.PurchaseNotificationsEnabled;n.purchaseNotificationsAllowedByChild=t.getOboSettingsDataPromise}).catch(function(t){return n.$meeErrors.setError("store-load-error",n.cms.Strings.ErrorLoadingData),n.loadError=!0,n.$q.reject(t)}).finally(function(){n.getStoreSettingsWorking=!1})};i.prototype.setInitialNeededData=function(){this.purchaseNotificationsEnabled=!1;this.$meeA11y.monitorOperationProgress(this.$scope,[{operationName:r.updateAskAParentToggle,onFailureSelector:"#"+this.updateAskAParentToggleId,onSuccessAnnounce:this.cms.Strings.SuccessfullyChangedToggle,onSuccessSelector:"#"+this.updateAskAParentToggleId,onWorkingAnnounce:this.cms.Strings.Working},{operationName:r.updatePurchaseNotificationsToggle,onFailureSelector:"#"+this.updatePurchaseNotificationsToggleId,onSuccessAnnounce:this.cms.Strings.SuccessfullyChangedToggle,onSuccessSelector:"#"+this.updatePurchaseNotificationsToggleId,onWorkingAnnounce:this.cms.Strings.Working}])};i.prototype.updateAskAParentEnabledFn=function(){var n=this;return this.$meeErrors.reset("store-askaparent-error"),this.updateAskAParentEnabled().catch(function(t){return n.$meeErrors.setError("store-askaparent-error",n.cms.Strings.ErrorGeneral),n.$q.reject(t)})};i.prototype.updatePurchaseNotificationsEnabledFn=function(){var n=this;return this.$meeErrors.reset("store-toggle-error"),this.purchaseNotificationsWorking=!0,this.updatePurchaseNotificationsEnabled().catch(function(t){return n.$meeErrors.setError("store-toggle-error",n.cms.Strings.ErrorGeneral),n.$timeout().then(function(){n.purchaseNotificationsEnabled=!n.purchaseNotificationsEnabled}),n.$q.reject(t)}).finally(function(){n.purchaseNotificationsWorking=!1})};i.prototype.getStoreSettingsData=function(){return this.crStoreAPIService.getStoreSettingsData()};i.prototype.getPurchaseNotificationsAllowedByChild=function(){return this.crStoreAPIService.getParentAllowedToSeeChildsData()};i.prototype.updateAskAParentEnabled=function(){return this.crStoreAPIService.setAskAParentEnabled(this.askAParentSettingEnabled)};i.prototype.updatePurchaseNotificationsEnabled=function(){return this.crStoreAPIService.setPurchaseNotificationsEnabled(this.purchaseNotificationsEnabled)};var r;return i.$inject=["$q","$meeErrors","$timeout","$anchorScroll","crStoreAPIService","$meeA11y","$scope"],i.updateAskAParentToggle="update-ask-a-parent-toggle",i.updatePurchaseNotificationsToggle="update-purchase-notifications-toggle",__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updateAskAParentEnabledFn"),n.OneUI.Angular.MonitorOperationProgress(r.updateAskAParentToggle)],i.prototype,"updateAskAParentEnabledFn",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("updatePurchaseNotificationsEnabledFn"),n.OneUI.Angular.MonitorOperationProgress(r.updatePurchaseNotificationsToggle)],i.prototype,"updatePurchaseNotificationsEnabledFn",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-store-settings")],i.prototype,"getStoreSettingsData",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("get-obo-settings")],i.prototype,"getPurchaseNotificationsAllowedByChild",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("update-askaparent")],i.prototype,"updateAskAParentEnabled",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("update-purchase-notifications")],i.prototype,"updatePurchaseNotificationsEnabled",null),r=__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.moduleName,"crStore",{templateUrl:t.settingsFolderBasePath+"Spending/Store/cr-store.html",bindings:{cms:"<",childInfo:"<"}})],i)}();t.CrStoreComponent=i})(t=n.FamilyOneUi||(n.FamilyOneUi={}))}(MeePortal||(MeePortal={}))