(function(){var c=window.sg.common.$q,e=window.sg.common.utils,f=window.sg.common.constants.BREAKPOINTS,a=function(b){this.selector={cardText:".notice-card__text"};this.el={window:c(window),component:c(b),cardText:null};this.handler={resize:this.resize.bind(this)};a.instances.set(b,this);this.setElements();this.init()};a.prototype.setElements=function(){this.el.cardText=this.el.component.find(this.selector.cardText);this.mobileFlag=this.desktopFlag=!1};a.prototype.init=function(){this.bindEvents();
this.resize()};a.prototype.reInit=function(){this.setElements();this.bindEvents();this.resize()};a.prototype.setDefault=function(){this.el.cardText.css({height:""})};a.prototype.setHeight=function(){this.setDefault();var a=[];this.el.cardText.target.forEach(function(b){b=c(b);a.push(b.outerHeight())});var d=Math.max.apply(null,a);this.el.cardText.css({height:d+"px"})};a.prototype.resize=function(){f.MOBILE<e.getViewPort().width?(!1===this.desktopFlag&&(this.desktopFlag=!0,this.mobileFlag=!1),this.setHeight()):
!1===this.mobileFlag&&(this.mobileFlag=!0,this.desktopFlag=!1,this.setDefault())};a.prototype.bindEvents=function(){this.el.window.off("resize",this.handler.resize).on("resize",this.handler.resize)};a.instances=new WeakMap;var d=function(){c(".notice-card").target.forEach(function(b){a.instances.has(b)||new a(b)})};c.ready(d);window.sg.components.noticeCard={init:d,reInit:function(){c(".notice-card").target.forEach(function(b){a.instances.has(b)?a.instances.get(b).reInit():new a(b)})}}})();