text: AUI.add("aui-resize-iframe",function(c){var g=c.Lang,b=g.isString,k="resizeiframe",e=c.getClassName,h="height",d="hidden",f="no",i="scrolling",j="width",a=e(k,"monitored",h);ResizeIframe=c.Component.create({NAME:k,NS:k,EXTENDS:c.Plugin.Base,ATTRS:{height:{value:0},monitorHeight:{value:true},width:{value:null}},prototype:{initializer:function(m){var l=this;var n=l.get("host");l.node=n;l._iframeEl=n.getDOM();l._defaultHeight=m.height;l.bindUI();l.syncUI();},bindUI:function(){var l=this;l.after("heightChange",l._afterHeightChange);l.after("monitorHeightChange",l._afterMonitorHeightChange);l.after("widthChange",l._afterWidthChange);},syncUI:function(){var l=this;l._uiSetMonitorHeight(l.get("monitorHeight"));},destructor:function(){var l=this;l._uiSetMonitorHeight(false);},pauseMonitor:function(){var l=this;l._clearInterval();},restartMonitor:function(){var l=this;if(l.get("monitorHeight")){l._setInterval();}},_afterHeightChange:function(m){var l=this;l.set("monitorHeight",false);l._uiSetHeight(m.newVal);},_afterMonitorHeightChange:function(m){var l=this;l._uiSetMonitorHeight(m.newVal);},_afterWidthChange:function(m){var l=this;l._uiSetWidth(m.newVal);},_clearInterval:function(){var l=this;var m=l._iframeDoc;if(m){var n=m.documentElement;if(n){n.style.overflowY="";}}if(l._intervalId){c.clearInterval(l._intervalId);l._intervalId=null;}},_onResize:function(){var l=this;l._iframeDoc=null;var m=l._iframeHeight;var p=l._iframeEl.contentWindow;var o;try{o=p.document;l._iframeDoc=o;}catch(n){}if(o){m=ResizeIframe._getContentHeight(p,o,l._iframeHeight);l._uiSetHeight(m);}else{l._clearInterval();l._uiSetHeight(l._defaultHeight);}},_setInterval:function(m){var l=this;if(!l._intervalId){l._onResize();l._intervalId=c.setInterval(l._onResize,100,l);}},_uiSetHeight:function(m){var l=this;if(l._iframeHeight!=m){l._iframeHeight=m;l.node.setStyle(h,m);}},_uiSetMonitorHeight:function(m){var l=this;var n=l.node;if(m){l._setInterval();l._loadHandle=n.on("load",l._setInterval,l);n.addClass(a);}else{l._clearInterval();if(l._loadHandle){l._loadHandle.detach();}n.removeClass(a);}},_uiSetWidth:function(m){var l=this;l.node.setStyle(j,m);},_iframeHeight:0}});c.mix(ResizeIframe,{getContentHeight:function(o){var l=null;try{var n;if(o.nodeName&&o.nodeName.toLowerCase()=="iframe"){o=o.contentWindow;}else{if(c.instanceOf(o,c.Node)){o=o.getDOM().contentWindow;}}n=o.document;l=ResizeIframe._getContentHeight(o,n);}catch(m){}return l;},_getContentHeight:function(r,q,m){var p=null;if(q&&r.location.href!="about:blank"){var s=q.documentElement;var o=q.body;if(s){s.style.overflowY=d;}var l=(o&&o.offsetHeight)||0;var n=(q.compatMode=="CSS1Compat");if(n&&l){p=l;}else{p=ResizeIframe._getQuirksHeight(r)||m;}}return p;},_getQuirksHeight:function(p){var s=0;var r=p.document;var l=r&&r.documentElement;var u=r&&r.body;var n=0;if(p.innerHeight){n=p.innerHeight;}else{if(l&&l.clientHeight){n=l.clientHeight;}else{if(u){n=u.clientHeight;}}}if(r){var q;var o;var m=(u&&u.offsetHeight);if(l){q=l.clientHeight;o=l.scrollHeight;m=l.offsetHeight;}if(q!=m&&u){m=u.offsetHeight;o=u.scrollHeight;}var t;if(o>n){t=Math.max;}else{t=Math.min;}s=t(o,m);}return s;}});c.Plugin.ResizeIframe=ResizeIframe;},"@VERSION@",{skinnable:true,requires:["aui-base","aui-task-manager","plugin"]});