!function(){function e(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,c=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw c}}}}function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n700&&(document.getElementsByClassName("header-top-links-box").length>0&&(document.getElementsByClassName("header-top-links-box")[0].style.display="block"),document.getElementsByClassName("header-menu-container").length>0&&(document.getElementsByClassName("header-menu-container")[0].style.display="block"),document.getElementsByClassName("search-form-wrapper").length>0&&(document.getElementsByClassName("search-form-wrapper")[0].style.visibility="visible"),document.getElementById("header-container")))){var n=document.getElementById("header-container");n.style.paddingTop="0",n.style.paddingBottom="0"}}))}},{key:"saveSettings",value:function(e){var t=this;this.isProcessing=!0,console.log(e.controls),this.mainSvc.saveSettings(this.userFirstName,this.userLastName,e.controls.currentPassword.value,e.controls.newPassword.value,e.controls.confirmPassword.value).subscribe((function(e){t.isProcessing=!1,e.error?l.a.fire("Error Occurred!",e.errorMessage,"error"):e.success&&l.a.fire("Settings Saved Successfully!","","success").then((function(e){t.modalService.dismissAll()}))}),(function(e){t.isProcessing=!1,l.a.fire("Error Occurred!","Something went wrong. Please re-try again.","error")}))}}]),e}()).\u0275fac=function(e){return new(e||y)(u.Jb(d.a),u.Jb(g.e))},y.\u0275cmp=u.Db({type:y,selectors:[["app-portal"]],decls:52,vars:2,consts:[[1,"pt-2","pb-2"],[1,"container"],[1,"d-sm-flex","d-none","align-items-center","justify-content-between"],[1,"d-flex","align-items-center","justify-content-between"],["routerLink","/app/dashboard"],["alt","","src","https://secure3.mearie.ca/hubfs/portal-app/assets/logo-2022.svg",2,"max-width","310px","margin-right","5px"],["routerLink","/app/dashboard",1,"main-menu-item"],[1,"main-menu-item"],["href","https://secure3.mearie.ca/contact-us",1,"main-menu-item"],["href","tel:18006689979",1,"main-menu-item"],[1,"main-menu-secondary"],["href","https://secure3.mearie.ca/","target","_blank",1,"main-menu-secondary-item"],[1,"main-menu-secondary-item"],[1,"main-menu-secondary-item",2,"cursor","pointer",3,"click"],[1,"d-flex","d-sm-none","align-items-center","justify-content-between"],["alt","","src","https://secure3.mearie.ca/hubfs/portal-app/assets/logo-2022.svg",2,"max-width","60px"],["ngbDropdown","","display","dynamic",1,"dropdown"],["id","dropdownBasic1","ngbDropdownToggle","",1,"btn","btn-lg","btn-outline-secondary"],[1,"fas","fa-bars"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["ngbDropdownItem","","routerLink","/app/dashboard"],["ngbDropdownItem","",3,"click"],[1,"hero-container"],[1,"d-sm-flex","align-items-sm-center"],[1,"white"],["class","container mt-3",4,"ngIf"],[1,"inner-body"],["modalSettings",""],[1,"container","mt-3"],[1,"alert","alert-primary"],[1,"fa","fa-exclamation-circle"],["type","button",1,"btn","btn-dark",3,"click"],[1,"fa","fa-check"],[3,"ngSubmit"],["settingsForm","ngForm"],[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],[1,"fa","fa-edit"],[1,"modal-body"],[1,"form-group","row"],["for","firstName",1,"col-form-label","col-sm-4"],[1,"col-sm-8"],["id","firstName","name","firstName","required","","type","text",1,"form-control",3,"ngModel","value","ngModelChange"],["firstName","ngModel"],["for","lastName",1,"col-form-label","col-sm-4"],["id","lastName","name","lastName","required","","type","text",1,"form-control",3,"ngModel","ngModelChange"],["lastName","ngModel"],["for","currentPassword",1,"col-form-label","col-sm-4"],["ngModel","","id","currentPassword","name","currentPassword","type","password",1,"form-control"],["for","newPassword",1,"col-form-label","col-sm-4"],["placeholder","Must be at least 12 - 20 characters long","id","newPassword","minlength","8","name","newPassword","ngModel","","type","password",1,"form-control"],["newPassword","ngModel"],["for","confirmPassword",1,"col-form-label","col-sm-4"],["id","confirmPassword","minlength","8","name","confirmPassword","ngModel","","type","password",1,"form-control"],["confirmPassword","ngModel"],[1,"modal-footer"],["type","submit",1,"btn","btn-default",3,"disabled"],[3,"ngIf"],["type","button",1,"btn","btn-grey",3,"click"],[1,"fa","fa-times"],[1,"fa","fa-cog","fa-spin"]],template:function(e,t){if(1&e){var n=u.Pb();u.Ob(0,"header",0),u.Ob(1,"div",1),u.Ob(2,"div",2),u.Ob(3,"div",3),u.Ob(4,"a",4),u.Kb(5,"img",5),u.Nb(),u.Ob(6,"a",6),u.zc(7,"My MEARIE Home"),u.Nb(),u.Ob(8,"span",7),u.zc(9,"|"),u.Nb(),u.Ob(10,"a",8),u.zc(11,"Contact Us"),u.Nb(),u.Ob(12,"span",7),u.zc(13,"|"),u.Nb(),u.Ob(14,"a",9),u.zc(15,"Toll Free: 1800-668-9979"),u.Nb(),u.Nb(),u.Ob(16,"div",10),u.Ob(17,"a",11),u.zc(18,"MEARIE.ca"),u.Nb(),u.Ob(19,"span",12),u.zc(20,"|"),u.Nb(),u.Ob(21,"a",13),u.Zb("click",(function(){return t.doLogout()})),u.zc(22,"Logout"),u.Nb(),u.Ob(23,"span",12),u.zc(24,"/"),u.Nb(),u.Ob(25,"a",13),u.Zb("click",(function(){u.qc(n);var e=u.pc(51);return t.open(e)})),u.zc(26,"Settings"),u.Nb(),u.Nb(),u.Nb(),u.Ob(27,"div",14),u.Ob(28,"a",4),u.Kb(29,"img",15),u.Nb(),u.Ob(30,"div",16),u.Ob(31,"button",17),u.Kb(32,"i",18),u.Nb(),u.Ob(33,"div",19),u.Ob(34,"button",20),u.zc(35,"My MEARIE Home"),u.Nb(),u.Ob(36,"button",21),u.Zb("click",(function(){return t.location.href="https://secure3.mearie.ca/contact-us"})),u.zc(37,"Contact Us"),u.Nb(),u.Ob(38,"button",21),u.Zb("click",(function(){u.qc(n);var e=u.pc(51);return t.open(e)})),u.zc(39,"Settings"),u.Nb(),u.Ob(40,"button",21),u.Zb("click",(function(){return t.doLogout()})),u.zc(41,"Logout"),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Ob(42,"div",22),u.Ob(43,"div",1),u.Ob(44,"div",23),u.Ob(45,"h4",24),u.zc(46),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.xc(47,p,10,0,"div",25),u.Ob(48,"div",26),u.Kb(49,"router-outlet"),u.Nb(),u.xc(50,v,47,14,"ng-template",null,27,u.yc)}2&e&&(u.xb(46),u.Bc("Welcome ",null===t.mainSvc.user?"User":t.mainSvc.user.firstName,""),u.xb(1),u.gc("ngIf",t.showUpdatePasswordNotification))},directives:[s.d,g.a,g.d,g.c,g.b,s.c,a.k,s.f,f.p,f.i,f.j,f.a,f.m,f.h,f.k,f.e],styles:["#dropdownBasic1[_ngcontent-%COMP%]:after{content:none}header[_ngcontent-%COMP%]{background:#fff}"]}),y),x=((O=function(){function e(){i(this,e)}return c(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||O)},O.\u0275cmp=u.Db({type:O,selectors:[["app-load-message"]],decls:2,vars:0,consts:[[1,"fa","fa-cog","fa-spin"]],template:function(e,t){1&e&&(u.Kb(0,"i",0),u.zc(1," Loading...\n"))},styles:[".heading-line[_ngcontent-%COMP%]{border:1px solid #00205b;width:60px}"]}),O);function k(e,t){1&e&&u.Kb(0,"app-load-message")}function w(e,t){1&e&&(u.Ob(0,"div",7),u.Kb(1,"i",8),u.zc(2," Failed to load categories. Reload page to try-again. "),u.Nb())}function P(e,t){if(1&e&&(u.Ob(0,"a",16),u.zc(1),u.Nb()),2&e){var n=u.bc(2).$implicit;u.ic("routerLink","/app/category/",n.id,""),u.xb(1),u.Ac(n.title)}}function I(e,t){if(1&e&&(u.Ob(0,"a",17),u.zc(1),u.Nb()),2&e){var n=u.bc(2).$implicit;u.xb(1),u.Ac(n.title)}}function C(e,t){if(1&e&&(u.Ob(0,"a",18),u.zc(1),u.Nb()),2&e){var n=u.bc(2).$implicit;u.xb(1),u.Ac(n.title)}}function z(e,t){if(1&e&&(u.Ob(0,"a",19),u.zc(1),u.Nb()),2&e){var n=u.bc(2).$implicit;u.xb(1),u.Ac(n.title)}}function M(e,t){if(1&e&&(u.Ob(0,"a",20),u.zc(1),u.Nb()),2&e){var n=u.bc(2).$implicit;u.xb(1),u.Ac(n.title)}}var E=function(){return["28","7","30","2"]};function K(e,t){if(1&e&&(u.Ob(0,"li"),u.xc(1,P,2,2,"a",11),u.xc(2,I,2,1,"a",12),u.xc(3,C,2,1,"a",13),u.xc(4,z,2,1,"a",14),u.xc(5,M,2,1,"a",15),u.Nb()),2&e){var n=u.bc().$implicit;u.xb(1),u.gc("ngIf",-1==u.kc(5,E).indexOf(n.id)),u.xb(1),u.gc("ngIf","28"==n.id),u.xb(1),u.gc("ngIf","7"==n.id),u.xb(1),u.gc("ngIf","30"==n.id),u.xb(1),u.gc("ngIf","2"==n.id)}}function L(e,t){1&e&&u.xc(0,K,6,6,"li",10),2&e&&u.gc("ngIf",t.$implicit.latest_resources.length>0)}function S(e,t){if(1&e&&(u.Ob(0,"ul",2),u.xc(1,L,1,1,"ng-template",9),u.Nb()),2&e){var n=u.bc();u.wc("display",n.showCategory?"block":"none"),u.xb(1),u.gc("ngForOf",n.categories)}}var B,_=((B=function(){function e(t){i(this,e),this.mainSvc=t,this.isProcessing=!1,this.loadError=!1,this.categories=[],this.showCategory=!1}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.isProcessing=!0,this.showCategory=window.outerWidth>700,this.mainSvc.getTopLevelCategories().subscribe((function(t){e.isProcessing=!1,t.error&&(e.loadError=!0),t.success&&(e.categories=t.childCategories)}),(function(t){e.loadError=!0}))}},{key:"showHideCategory",value:function(){this.showCategory=!this.showCategory}}]),e}()).\u0275fac=function(e){return new(e||B)(u.Jb(d.a))},B.\u0275cmp=u.Db({type:B,selectors:[["app-categories-panel"]],decls:15,vars:3,consts:[[3,"ngIf"],[1,"header","d-none","d-sm-block"],[1,"list-categories",2,"border-top","solid 1px #DBDBDB"],["routerLink","/app/my-courses"],[1,"d-block","d-sm-none","mb-3"],["type","button",1,"btn","btn-default",3,"click"],["class","list-categories","style","border-top: solid 1px #DBDBDB;",3,"display",4,"ngIf"],[1,"alert","alert-danger"],[1,"fa","fa-exclamation-triangle"],["ngFor","",3,"ngForOf"],[4,"ngIf"],[3,"routerLink",4,"ngIf"],["routerLink","/app/cbd-search",4,"ngIf"],["routerLink","/app/resource/page/4",4,"ngIf"],["routerLink","/app/resource/page/40",4,"ngIf"],["routerLink","/app/resource/page/30",4,"ngIf"],[3,"routerLink"],["routerLink","/app/cbd-search"],["routerLink","/app/resource/page/4"],["routerLink","/app/resource/page/40"],["routerLink","/app/resource/page/30"]],template:function(e,t){1&e&&(u.xc(0,k,1,0,"ng-template",0),u.xc(1,w,3,0,"ng-template",0),u.Ob(2,"h5",1),u.zc(3,"Training"),u.Nb(),u.Ob(4,"ul",2),u.Ob(5,"li"),u.Ob(6,"a",3),u.zc(7,"My Courses"),u.Nb(),u.Nb(),u.Nb(),u.Kb(8,"br"),u.Ob(9,"h5",1),u.zc(10,"Categories"),u.Nb(),u.Ob(11,"div",4),u.Ob(12,"button",5),u.Zb("click",(function(){return t.showHideCategory()})),u.zc(13,"Show Categories"),u.Nb(),u.Nb(),u.xc(14,S,2,3,"ul",6)),2&e&&(u.gc("ngIf",t.isProcessing),u.xb(1),u.gc("ngIf",t.loadError),u.xb(13),u.gc("ngIf",!t.isProcessing&&!t.loadError))},directives:[a.k,s.d,x,a.j],styles:[".list-categories[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0}.list-categories[_ngcontent-%COMP%] li.header[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-style:normal;font-weight:400;font-size:18px;color:#222a41;border-bottom:1px solid #dbdbdb}.list-categories[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{border-bottom:1px solid #dbdbdb;padding:10px 0}.list-categories[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#666869;text-decoration:none;font-size:14px}.list-categories[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]}),B);function A(e,t){if(1&e&&(u.Ob(0,"div",1),u.Ob(1,"div",2),u.Ob(2,"div",3),u.Ob(3,"div",4),u.Ob(4,"h5",5),u.zc(5,"MEARIE P&C Insurance Portal"),u.Nb(),u.Ob(6,"p",6),u.zc(7," The MEARIE P&C Insurance Portal includes "),u.Ob(8,"strong"),u.zc(9,"Applications"),u.Nb(),u.zc(10," for MEARIE Insurance products and the self-serve "),u.Ob(11,"strong"),u.zc(12,"Certificate Request"),u.Nb(),u.Nb(),u.Nb(),u.Ob(13,"div",7),u.Ob(14,"a",8),u.zc(15,"Click Here"),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb()),2&e){var n=u.bc();u.xb(14),u.hc("href",n.portalLink,u.sc)}}var F,D=((F=function(){function e(t){i(this,e),this.mainSvc=t,this.isProcessing=!1,this.showBar=!1,this.portalLink=null}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.mainSvc.getFeaturePermission("mearie-insurance-portal").subscribe((function(t){t.success&&(e.showBar=t.canAccess,e.showBar&&e.getPortalLink())}),(function(t){e.showBar=!1}))}},{key:"getPortalLink",value:function(){var e=this;this.mainSvc.getBrokerCoreLink().subscribe((function(t){t.success&&(e.portalLink=t.portalLink)}),(function(t){e.portalLink=null}))}}]),e}()).\u0275fac=function(e){return new(e||F)(u.Jb(d.a))},F.\u0275cmp=u.Db({type:F,selectors:[["app-insurance-bar"]],decls:1,vars:1,consts:[[3,"ngIf"],[1,"card","mt-3"],[1,"card-body",2,"padding","0.5rem 1rem"],[1,"d-flex","justify-content-end","align-items-center"],[1,"mr-3"],[1,"blue"],[1,"mb-0"],[1,"text-right"],[1,"btn","btn-lg","btn-default",2,"white-space","nowrap",3,"href"]],template:function(e,t){1&e&&u.xc(0,A,16,1,"ng-template",0),2&e&&u.gc("ngIf",t.showBar&&null!==t.portalLink)},directives:[a.k],styles:[""]}),F);function R(e,t){1&e&&(u.Ob(0,"div",1),u.Ob(1,"div",2),u.Ob(2,"div",3),u.Ob(3,"div",4),u.Ob(4,"h5",5),u.zc(5,"Group Benefits Digital Enrollment Form"),u.Nb(),u.Nb(),u.Ob(6,"div",6),u.Ob(7,"a",7),u.zc(8,"Click Here"),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb())}var T,j=((T=function(){function e(t){i(this,e),this.mainSvc=t,this.isProcessing=!1,this.showBar=!1}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.mainSvc.getFeaturePermission("group-benefits-digital-enrollment-form").subscribe((function(t){t.success&&(e.showBar=t.canAccess)}),(function(t){e.showBar=!1}))}}]),e}()).\u0275fac=function(e){return new(e||T)(u.Jb(d.a))},T.\u0275cmp=u.Db({type:T,selectors:[["app-group-benefits-bar"]],decls:1,vars:1,consts:[[3,"ngIf"],[1,"card","mt-3"],[1,"card-body",2,"padding","0.5rem 1rem"],[1,"row","align-items-center"],[1,"col-sm-8"],[1,"mb-0",2,"font-weight","normal"],[1,"col-sm-4","text-right"],["href","https://ca.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=4b21d452-72c3-4210-ac03-699d6ca59424&env=ca&acct=2e4ef24c-bd05-4e1a-8262-c04c37248b90&v=2","target","_blank",1,"btn","btn-lg","btn-default"]],template:function(e,t){1&e&&u.xc(0,R,9,0,"ng-template",0),2&e&&u.gc("ngIf",t.showBar)},directives:[a.k],styles:[""]}),T);function Z(e,t){if(1&e&&(u.Ob(0,"div",1),u.Ob(1,"div",2),u.Ob(2,"div",3),u.Ob(3,"div",4),u.Ob(4,"h5",5),u.zc(5,"Access Brokercore"),u.Nb(),u.Nb(),u.Ob(6,"div",6),u.Ob(7,"a",7),u.zc(8,"Click Here"),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb()),2&e){var n=u.bc();u.xb(7),u.hc("href",n.portalLink,u.sc)}}var J,$=((J=function(){function e(t){i(this,e),this.mainSvc=t,this.showBrokerCore=!1,this.showBrokerCoreTest=!1,this.portalLink=null}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.mainSvc.getFeaturePermission("broker-core").subscribe((function(t){t.success&&(e.showBrokerCore=t.canAccess,e.showBrokerCore&&e.getPortalLink())}),(function(t){e.showBrokerCore=!1})),this.mainSvc.getFeaturePermission("broker-core-test").subscribe((function(t){t.success&&(e.showBrokerCoreTest=t.canAccess)}),(function(t){e.showBrokerCoreTest=!1}))}},{key:"getPortalLink",value:function(){var e=this;this.mainSvc.getBrokerCoreLink().subscribe((function(t){t.success&&(e.portalLink=t.portalLink)}),(function(t){e.portalLink=null}))}}]),e}()).\u0275fac=function(e){return new(e||J)(u.Jb(d.a))},J.\u0275cmp=u.Db({type:J,selectors:[["app-broker-core-bar"]],decls:1,vars:1,consts:[[3,"ngIf"],[1,"card","mt-3"],[1,"card-body",2,"padding","0.5rem 1rem"],[1,"row","align-items-center"],[1,"col-sm-8"],[1,"mb-0",2,"font-weight","normal"],[1,"col-sm-4","text-right"],["target","_blank",1,"btn","btn-lg","btn-default",3,"href"]],template:function(e,t){1&e&&u.xc(0,Z,9,1,"ng-template",0),2&e&&u.gc("ngIf",t.showBrokerCore&&!t.showBrokerCoreTest&&null!==t.portalLink)},directives:[a.k],styles:[""]}),J);function U(e,t){if(1&e&&(u.Ob(0,"div",1),u.Ob(1,"div",2),u.Ob(2,"div",3),u.Ob(3,"div",4),u.Ob(4,"h5",5),u.zc(5,"Access Brokercore (Test)"),u.Nb(),u.Nb(),u.Ob(6,"div",6),u.Ob(7,"a",7),u.zc(8,"Click Here"),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb()),2&e){var n=u.bc();u.xb(7),u.hc("href",n.portalLink,u.sc)}}var q,H=((q=function(){function e(t){i(this,e),this.mainSvc=t,this.showBar=!1,this.portalLink=null}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.mainSvc.getFeaturePermission("broker-core-test").subscribe((function(t){t.success&&(e.showBar=t.canAccess,e.showBar&&e.getPortalLink())}),(function(t){e.showBar=!1}))}},{key:"getPortalLink",value:function(){var e=this;this.mainSvc.getBrokerCoreLink(!0).subscribe((function(t){t.success&&(e.portalLink=t.portalLink)}),(function(t){e.portalLink=null}))}}]),e}()).\u0275fac=function(e){return new(e||q)(u.Jb(d.a))},q.\u0275cmp=u.Db({type:q,selectors:[["app-broker-core-bar-test"]],decls:1,vars:1,consts:[[3,"ngIf"],[1,"card","mt-3"],[1,"card-body",2,"padding","0.5rem 1rem"],[1,"row","align-items-center"],[1,"col-sm-8"],[1,"mb-0",2,"font-weight","normal"],[1,"col-sm-4","text-right"],["target","_blank",1,"btn","btn-lg","btn-default",3,"href"]],template:function(e,t){1&e&&u.xc(0,U,9,1,"ng-template",0),2&e&&u.gc("ngIf",t.showBar&&null!==t.portalLink)},directives:[a.k],styles:[""]}),q);function G(e,t){1&e&&u.Kb(0,"app-load-message")}function V(e,t){1&e&&(u.Ob(0,"div",6),u.Kb(1,"i",7),u.zc(2," Failed to load page. Refresh to try-again. "),u.Nb())}function W(e,t){if(1&e&&(u.Ob(0,"a",25),u.Kb(1,"i",26),u.Ob(2,"span",27),u.zc(3),u.Nb(),u.Nb()),2&e){var n=u.bc().$implicit;u.jc("routerLink","/app/resource/",n.type,"/",n.id,""),u.xb(3),u.Ac(n.title)}}function Y(e,t){if(1&e&&(u.Ob(0,"a",28),u.Kb(1,"i",29),u.Ob(2,"span",27),u.zc(3),u.Nb(),u.Nb()),2&e){var n=u.bc().$implicit;u.ic("routerLink","/app/document/",n.hash,""),u.xb(3),u.Ac(n.title)}}function X(e,t){if(1&e&&(u.Ob(0,"li"),u.xc(1,W,4,3,"a",23),u.xc(2,Y,4,2,"a",24),u.Nb()),2&e){var n=t.$implicit;u.xb(1),u.gc("ngIf","page"===n.type),u.xb(1),u.gc("ngIf","document"===n.type)}}function Q(e,t){if(1&e&&(u.Ob(0,"div",11),u.Ob(1,"div",12),u.Ob(2,"div"),u.Ob(3,"div",13),u.Kb(4,"i",14),u.Nb(),u.Nb(),u.Ob(5,"div"),u.Ob(6,"h3",15),u.zc(7),u.Nb(),u.Kb(8,"div",16),u.Nb(),u.Nb(),u.Ob(9,"div",17),u.Ob(10,"ul",18),u.xc(11,X,3,2,"li",19),u.Nb(),u.Nb(),u.Ob(12,"div",20),u.Ob(13,"a",21),u.zc(14,"View All"),u.Nb(),u.Kb(15,"i",22),u.Nb(),u.Nb()),2&e){var n=u.bc().$implicit;u.xb(7),u.Ac(n.title),u.xb(4),u.gc("ngForOf",n.latest_resources),u.xb(2),u.ic("routerLink","/app/category/",n.id,"")}}function ee(e,t){1&e&&u.xc(0,Q,16,3,"div",10),2&e&&u.gc("ngIf",t.$implicit.latest_resources.length>0)}function te(e,t){if(1&e&&(u.Ob(0,"div",8),u.xc(1,ee,1,1,"ng-template",9),u.Nb()),2&e){var n=u.bc();u.xb(1),u.gc("ngForOf",n.categories)}}var ne,re=((ne=function(){function e(t){i(this,e),this.mainSvc=t,this.loadError=!1,this.isProcessing=!1,this.categories=[]}return c(e,[{key:"ngOnInit",value:function(){var e=this;this.isProcessing=!0,document.title="My MEARIE Home",this.mainSvc.getTopLevelCategories().subscribe((function(t){e.isProcessing=!1,e.loadError=t.error,t.success&&(e.categories=t.childCategories)}),(function(t){e.loadError=!0}))}},{key:"ngAfterViewInit",value:function(){for(var e=document.getElementsByClassName("list-category-box-entry"),t=1,n=1,r=0;r0)}}var Le,Se=((Le=function(){function e(t){i(this,e),this.mainSvc=t,this.searchKeyword="",this.isProcessing=!1,this.loadError=!1,this.results=[]}return c(e,[{key:"ngOnInit",value:function(){}},{key:"ngOnChanges",value:function(e){e.searchKeyword.currentValue!==e.searchKeyword.previousValue&&(this.results=[],this.search())}},{key:"search",value:function(){var e=this;0!==this.searchKeyword.length&&(this.isProcessing=!0,this.mainSvc.doSearchResource(this.searchKeyword,this.category).subscribe((function(t){e.isProcessing=!1,e.loadError=t.error,t.success&&(e.results=t.results)}),(function(t){e.isProcessing=!1,e.loadError=!0})))}}]),e}()).\u0275fac=function(e){return new(e||Le)(u.Jb(d.a))},Le.\u0275cmp=u.Db({type:Le,selectors:[["app-search-result"]],inputs:{searchKeyword:"searchKeyword",category:"category"},features:[u.vb],decls:4,vars:3,consts:[[1,"pb-3"],[3,"ngIf"],[1,"alert","alert-danger"],[1,"fa","fa-exclamation-triangle"],["type","button",1,"btn","btn-default",3,"click"],["style","padding: 0; margin: 0; list-style-type: square;",4,"ngIf"],[1,"alert","alert-warning"],[2,"padding","0","margin","0","list-style-type","square"],["class","m-3",4,"ngFor","ngForOf"],[1,"m-3"],[2,"font-size","1.5em"],["class","fa fa-file-pdf",4,"ngIf"],["class","fa fa-file",4,"ngIf"],["target","_blank","class","blue",3,"routerLink",4,"ngIf"],[1,"fa","fa-file-pdf"],[1,"fa","fa-file"],["target","_blank",1,"blue",3,"routerLink"]],template:function(e,t){1&e&&(u.Ob(0,"div",0),u.xc(1,xe,1,0,"ng-template",1),u.xc(2,ke,5,0,"ng-template",1),u.xc(3,Ke,2,2,"ng-template",1),u.Nb()),2&e&&(u.xb(1),u.gc("ngIf",t.isProcessing),u.xb(1),u.gc("ngIf",t.loadError),u.xb(1),u.gc("ngIf",!t.isProcessing))},directives:[a.k,x,a.j,s.d],styles:[""]}),Le);function Be(e,t){1&e&&u.Kb(0,"app-load-message")}function _e(e,t){1&e&&(u.Ob(0,"div",5),u.Kb(1,"i",6),u.zc(2," Failed to load category. Please refresh to try again. "),u.Nb())}function Ae(e,t){if(1&e&&(u.Ob(0,"div"),u.Kb(1,"br"),u.Ob(2,"p"),u.zc(3),u.Nb(),u.Nb()),2&e){var n=u.bc(2);u.xb(3),u.Ac(n.category.description)}}function Fe(e,t){1&e&&u.Kb(0,"app-erisk")}function De(e,t){1&e&&u.Kb(0,"i",39)}function Re(e,t){1&e&&u.Kb(0,"i",40)}function Te(e,t){if(1&e&&(u.Ob(0,"a",41),u.zc(1),u.Nb()),2&e){var n=u.bc().$implicit;u.jc("routerLink","/app/resource/",n.type,"/",n.id,""),u.xb(1),u.Ac(n.title)}}function je(e,t){if(1&e&&(u.Ob(0,"a",42),u.zc(1),u.Nb()),2&e){var n=u.bc().$implicit;u.ic("routerLink","/app/document/",n.hash,""),u.xb(1),u.Ac(n.title)}}function Ze(e,t){if(1&e&&(u.Ob(0,"div",32),u.Ob(1,"div",33),u.Ob(2,"div",34),u.xc(3,De,1,0,"i",35),u.xc(4,Re,1,0,"i",36),u.Nb(),u.Ob(5,"div"),u.xc(6,Te,2,3,"a",37),u.xc(7,je,2,2,"a",38),u.Nb(),u.Nb(),u.zc(8),u.Nb()),2&e){var n=t.$implicit,r=t.last,i=u.bc(4);u.xb(3),u.gc("ngIf","document"===n.type),u.xb(1),u.gc("ngIf","page"===n.type),u.xb(2),u.gc("ngIf","page"===n.type),u.xb(1),u.gc("ngIf","document"===n.type),u.xb(1),u.Bc(" ",r?i.processGridItems():""," ")}}function Je(e,t){if(1&e&&(u.Ob(0,"div",30),u.xc(1,Ze,9,5,"div",31),u.Nb()),2&e){var n=u.bc(3);u.xb(1),u.gc("ngForOf",n.category.latest_resources)}}function $e(e,t){if(1&e&&(u.xc(0,Je,2,1,"div",29),u.Kb(1,"br")),2&e){var n=u.bc(2);u.gc("ngIf",n.category.latest_resources.length>0)}}function Ue(e,t){if(1&e&&u.Kb(0,"app-category-resources",43),2&e){var n=u.bc(2);u.gc("categoryId",n.category.id)("skipDocuments",n.skipDocuments)("skipPages",n.skipPages)("sortOrder",n.sortOrder)}}function qe(e,t){if(1&e){var n=u.Pb();u.Ob(0,"div",44),u.Ob(1,"div",45),u.Ob(2,"h4"),u.Kb(3,"i",46),u.zc(4," Search Result for "),u.Ob(5,"strong"),u.zc(6),u.Nb(),u.Nb(),u.Nb(),u.Ob(7,"div",47),u.Ob(8,"button",48),u.Zb("click",(function(){u.qc(n),u.bc();var e=u.pc(24);return u.bc().isSearchMode=!1,e.value=""})),u.Kb(9,"i",49),u.Nb(),u.Nb(),u.Nb(),u.Kb(10,"app-search-result",50)}if(2&e){var r=u.bc(2);u.xb(6),u.Bc('" ',r.searchKeyword,' "'),u.xb(4),u.gc("searchKeyword",r.searchKeyword)("category",r.category.id)}}function He(e,t){if(1&e){var n=u.Pb();u.Ob(0,"div",7),u.Ob(1,"div",8),u.Ob(2,"div",9),u.Ob(3,"div",10),u.Kb(4,"i",11),u.Nb(),u.Nb(),u.Ob(5,"div"),u.Ob(6,"h3"),u.zc(7),u.Nb(),u.Kb(8,"div",12),u.Nb(),u.Nb(),u.xc(9,Ae,4,1,"div",13),u.Nb(),u.xc(10,Fe,1,0,"app-erisk",13),u.Ob(11,"div",14),u.Ob(12,"div",15),u.Ob(13,"div",16),u.Ob(14,"select",17,18),u.Zb("change",(function(){u.qc(n);var e=u.pc(15);return u.bc().updateResourceList(e)})),u.Ob(16,"option",19),u.zc(17,"Latest First"),u.Nb(),u.Ob(18,"option",20),u.zc(19,"Alphabetically A-Z"),u.Nb(),u.Ob(20,"option",21),u.zc(21,"Oldest First"),u.Nb(),u.Nb(),u.Ob(22,"div",22),u.Kb(23,"input",23,24),u.Ob(25,"div",25),u.Ob(26,"button",26),u.Zb("click",(function(){u.qc(n);var e=u.pc(24);return u.bc().doSearch(e.value)})),u.Kb(27,"i",27),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.Nb(),u.xc(28,$e,2,1,"ng-template",4),u.xc(29,Ue,1,4,"app-category-resources",28),u.xc(30,qe,11,3,"ng-template",4)}if(2&e){var r=u.bc();u.xb(7),u.Ac(r.category.title),u.xb(2),u.gc("ngIf",r.category.description.length>0),u.xb(1),u.gc("ngIf","7"===r.category.id),u.xb(4),u.gc("value",r.sortOrder),u.xb(14),u.gc("ngIf",!r.isSearchMode),u.xb(1),u.gc("ngIf",!r.isSearchMode),u.xb(1),u.gc("ngIf",r.isSearchMode)}}var Ge,Ve=((Ge=function(){function t(e,n,r){i(this,t),this.mainSvc=e,this.router=n,this.activatedRoute=r,this.isProcessing=!1,this.loadError=!1,this.category=null,this.childCategories=[],this.searchKeyword=null,this.sortOrder="latest",this.skipDocuments=[],this.skipPages=[],this.isSearchMode=!1}return c(t,[{key:"ngOnInit",value:function(){var t=this;this.activatedRoute.params.subscribe((function(n){t.isProcessing=!0,t.mainSvc.getCategory(n.id).subscribe((function(n){if(t.isProcessing=!1,t.loadError=n.error,n.success){if(t.category=n.category,console.log(t.category),document.title=t.category.title,t.childCategories=n.childCategories,1===t.category.latest_resources.length){var r,i=t.category.latest_resources[0];r="page"===i.type?"/app/resource/page/"+i.id:"/app/document/"+i.hash,t.router.navigateByUrl(r)}var o,c=e(t.category.latest_resources);try{for(c.s();!(o=c.n()).done;){var a=o.value;"document"===a.type?t.skipDocuments.push(a.id):t.skipPages.push(a.id)}}catch(s){c.e(s)}finally{c.f()}}}),(function(e){t.isProcessing=!1,t.loadError=!0}))}))}},{key:"doSearch",value:function(e){e.length>0&&(this.searchKeyword=e,this.isSearchMode=!0)}},{key:"updateResourceList",value:function(e){this.sortOrder=e.options[e.selectedIndex].value}},{key:"processGridItems",value:function(){for(var e=document.getElementsByClassName("latest-res-entry"),t=1,n=1,r=0;r0))},directives:[_,f.p,f.i,f.j,f.n,f.h,f.k,f.l,f.o,f.a,a.k,x,a.j,s.d],styles:[".list-result[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:0 0 0 15px}.list-result[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{margin-bottom:25px}.list-result[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:14px;color:#999}.list-result[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:0}"]}),Mt)},{path:"broker-core-sso-error",component:(zt=function(){function e(){i(this,e)}return c(e,[{key:"ngOnInit",value:function(){}}]),e}(),zt.\u0275fac=function(e){return new(e||zt)},zt.\u0275cmp=u.Db({type:zt,selectors:[["app-broker-core-error"]],decls:13,vars:0,consts:[[1,"container"],[1,"m-2"],["href","mailto:insurance@mearie.ca"]],template:function(e,t){1&e&&(u.Ob(0,"div",0),u.Ob(1,"div",1),u.Ob(2,"h3"),u.zc(3,"Error:"),u.Nb(),u.Ob(4,"p"),u.zc(5," Sorry, there is something wrong with your contact permission. Please contact "),u.Ob(6,"a",2),u.zc(7,"insurance@mearie.ca"),u.Nb(),u.zc(8," for more information. "),u.Nb(),u.Ob(9,"p"),u.zc(10," Thank you,"),u.Kb(11,"br"),u.zc(12," The MEARIE Group "),u.Nb(),u.Nb(),u.Nb())},styles:[""]}),zt)}]}],_t=((St=function e(){i(this,e)}).\u0275mod=u.Hb({type:St}),St.\u0275inj=u.Gb({factory:function(e){return new(e||St)},imports:[[s.e.forChild(Bt)],s.e]}),St),At=((Lt=function e(){i(this,e)}).\u0275mod=u.Hb({type:Lt}),Lt.\u0275inj=u.Gb({factory:function(e){return new(e||Lt)},imports:[[a.c,f.c,_t,g.f]]}),Lt)}}])}();