YUI.add("widget-stack",function(Y,NAME){var L=Y.Lang,UA=Y.UA,Node=Y.Node,Widget=Y.Widget,ZINDEX="zIndex",SHIM="shim",VISIBLE="visible",BOUNDING_BOX="boundingBox",RENDER_UI="renderUI",BIND_UI="bindUI",SYNC_UI="syncUI",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",PARENT_NODE="parentNode",FIRST_CHILD="firstChild",OWNER_DOCUMENT="ownerDocument",WIDTH="width",HEIGHT="height",PX="px",SHIM_DEFERRED="shimdeferred",SHIM_RESIZE="shimresize",VisibleChange="visibleChange",WidthChange="widthChange",
HeightChange="heightChange",ShimChange="shimChange",ZIndexChange="zIndexChange",ContentUpdate="contentUpdate",STACKED="stacked";function Stack(config){}Stack.ATTRS={shim:{value:UA.ie==6},zIndex:{value:0,setter:"_setZIndex"}};Stack.HTML_PARSER={zIndex:function(srcNode){return this._parseZIndex(srcNode)}};Stack.SHIM_CLASS_NAME=Widget.getClassName(SHIM);Stack.STACKED_CLASS_NAME=Widget.getClassName(STACKED);Stack.SHIM_TEMPLATE='\x3ciframe class\x3d"'+Stack.SHIM_CLASS_NAME+'" frameborder\x3d"0" title\x3d"Widget Stacking Shim" src\x3d"javascript:false" tabindex\x3d"-1" role\x3d"presentation"\x3e\x3c/iframe\x3e';
Stack.prototype={initializer:function(){this._stackNode=this.get(BOUNDING_BOX);this._stackHandles={};Y.after(this._renderUIStack,this,RENDER_UI);Y.after(this._syncUIStack,this,SYNC_UI);Y.after(this._bindUIStack,this,BIND_UI)},_syncUIStack:function(){this._uiSetShim(this.get(SHIM));this._uiSetZIndex(this.get(ZINDEX))},_bindUIStack:function(){this.after(ShimChange,this._afterShimChange);this.after(ZIndexChange,this._afterZIndexChange)},_renderUIStack:function(){this._stackNode.addClass(Stack.STACKED_CLASS_NAME)},
_parseZIndex:function(srcNode){var zIndex;if(!srcNode.inDoc()||srcNode.getStyle("position")==="static")zIndex="auto";else zIndex=srcNode.getComputedStyle("zIndex");return zIndex==="auto"?null:zIndex},_setZIndex:function(zIndex){if(L.isString(zIndex))zIndex=parseInt(zIndex,10);if(!L.isNumber(zIndex))zIndex=0;return zIndex},_afterShimChange:function(e){this._uiSetShim(e.newVal)},_afterZIndexChange:function(e){this._uiSetZIndex(e.newVal)},_uiSetZIndex:function(zIndex){this._stackNode.setStyle(ZINDEX,
zIndex)},_uiSetShim:function(enable){if(enable){if(this.get(VISIBLE))this._renderShim();else this._renderShimDeferred();if(UA.ie==6)this._addShimResizeHandlers()}else this._destroyShim()},_renderShimDeferred:function(){this._stackHandles[SHIM_DEFERRED]=this._stackHandles[SHIM_DEFERRED]||[];var handles=this._stackHandles[SHIM_DEFERRED],createBeforeVisible=function(e){if(e.newVal)this._renderShim()};handles.push(this.on(VisibleChange,createBeforeVisible))},_addShimResizeHandlers:function(){this._stackHandles[SHIM_RESIZE]=
this._stackHandles[SHIM_RESIZE]||[];var sizeShim=this.sizeShim,handles=this._stackHandles[SHIM_RESIZE];handles.push(this.after(VisibleChange,sizeShim));handles.push(this.after(WidthChange,sizeShim));handles.push(this.after(HeightChange,sizeShim));handles.push(this.after(ContentUpdate,sizeShim))},_detachStackHandles:function(handleKey){var handles=this._stackHandles[handleKey],handle;if(handles&&handles.length>0)while(handle=handles.pop())handle.detach()},_renderShim:function(){var shimEl=this._shimNode,
stackEl=this._stackNode;if(!shimEl){shimEl=this._shimNode=this._getShimTemplate();stackEl.insertBefore(shimEl,stackEl.get(FIRST_CHILD));this._detachStackHandles(SHIM_DEFERRED);this.sizeShim()}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(SHIM_DEFERRED);this._detachStackHandles(SHIM_RESIZE)}},sizeShim:function(){var shim=this._shimNode,node=this._stackNode;if(shim&&UA.ie===6&&this.get(VISIBLE)){shim.setStyle(WIDTH,
node.get(OFFSET_WIDTH)+PX);shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX)}},_getShimTemplate:function(){return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT))}};Y.WidgetStack=Stack},"patched-v3.18.1",{"requires":["base-build","widget"],"skinnable":true});
YUI.add("widget-stdmod",function(Y,NAME){var L=Y.Lang,Node=Y.Node,UA=Y.UA,Widget=Y.Widget,EMPTY="",HD="hd",BD="bd",FT="ft",HEADER="header",BODY="body",FOOTER="footer",FILL_HEIGHT="fillHeight",STDMOD="stdmod",NODE_SUFFIX="Node",CONTENT_SUFFIX="Content",FIRST_CHILD="firstChild",CHILD_NODES="childNodes",OWNER_DOCUMENT="ownerDocument",CONTENT_BOX="contentBox",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",AUTO="auto",HeaderChange="headerContentChange",BodyChange="bodyContentChange",FooterChange="footerContentChange",
FillHeightChange="fillHeightChange",HeightChange="heightChange",ContentUpdate="contentUpdate",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",APPLY_PARSED_CONFIG="_applyParsedConfig",UI=Y.Widget.UI_SRC;function StdMod(config){}StdMod.HEADER=HEADER;StdMod.BODY=BODY;StdMod.FOOTER=FOOTER;StdMod.AFTER="after";StdMod.BEFORE="before";StdMod.REPLACE="replace";var STD_HEADER=StdMod.HEADER,STD_BODY=StdMod.BODY,STD_FOOTER=StdMod.FOOTER,HEADER_CONTENT=STD_HEADER+CONTENT_SUFFIX,FOOTER_CONTENT=STD_FOOTER+
CONTENT_SUFFIX,BODY_CONTENT=STD_BODY+CONTENT_SUFFIX;StdMod.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:StdMod.BODY,validator:function(val){return this._validateFillHeight(val)}}};StdMod.HTML_PARSER={headerContent:function(contentBox){return this._parseStdModHTML(STD_HEADER)},bodyContent:function(contentBox){return this._parseStdModHTML(STD_BODY)},footerContent:function(contentBox){return this._parseStdModHTML(STD_FOOTER)}};StdMod.SECTION_CLASS_NAMES=
{header:Widget.getClassName(HD),body:Widget.getClassName(BD),footer:Widget.getClassName(FT)};StdMod.TEMPLATES={header:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_HEADER]+'"\x3e\x3c/div\x3e',body:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_BODY]+'"\x3e\x3c/div\x3e',footer:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_FOOTER]+'"\x3e\x3c/div\x3e'};StdMod.prototype={initializer:function(){this._stdModNode=this.get(CONTENT_BOX);Y.before(this._renderUIStdMod,this,RENDERUI);Y.before(this._bindUIStdMod,
this,BINDUI);Y.before(this._syncUIStdMod,this,SYNCUI)},_syncUIStdMod:function(){var stdModParsed=this._stdModParsed;if(!stdModParsed||!stdModParsed[HEADER_CONTENT])this._uiSetStdMod(STD_HEADER,this.get(HEADER_CONTENT));if(!stdModParsed||!stdModParsed[BODY_CONTENT])this._uiSetStdMod(STD_BODY,this.get(BODY_CONTENT));if(!stdModParsed||!stdModParsed[FOOTER_CONTENT])this._uiSetStdMod(STD_FOOTER,this.get(FOOTER_CONTENT));this._uiSetFillHeight(this.get(FILL_HEIGHT))},_renderUIStdMod:function(){this._stdModNode.addClass(Widget.getClassName(STDMOD));
this._renderStdModSections();this.after(HeaderChange,this._afterHeaderChange);this.after(BodyChange,this._afterBodyChange);this.after(FooterChange,this._afterFooterChange)},_renderStdModSections:function(){if(L.isValue(this.get(HEADER_CONTENT)))this._renderStdMod(STD_HEADER);if(L.isValue(this.get(BODY_CONTENT)))this._renderStdMod(STD_BODY);if(L.isValue(this.get(FOOTER_CONTENT)))this._renderStdMod(STD_FOOTER)},_bindUIStdMod:function(){this.after(FillHeightChange,this._afterFillHeightChange);this.after(HeightChange,
this._fillHeight);this.after(ContentUpdate,this._fillHeight)},_afterHeaderChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_HEADER,e.newVal,e.stdModPosition)},_afterBodyChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_BODY,e.newVal,e.stdModPosition)},_afterFooterChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_FOOTER,e.newVal,e.stdModPosition)},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal)},_validateFillHeight:function(val){return!val||val==StdMod.BODY||val==
StdMod.HEADER||val==StdMod.FOOTER},_uiSetFillHeight:function(fillSection){var fillNode=this.getStdModNode(fillSection);var currNode=this._currFillNode;if(currNode&&fillNode!==currNode)currNode.setStyle(HEIGHT,EMPTY);if(fillNode)this._currFillNode=fillNode;this._fillHeight()},_fillHeight:function(){if(this.get(FILL_HEIGHT)){var height=this.get(HEIGHT);if(height!=EMPTY&&height!=AUTO)this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT)))}},_uiSetStdMod:function(section,content,where){if(L.isValue(content)){var node=
this.getStdModNode(section,true);this._addStdModContent(node,content,where);this.set(section+CONTENT_SUFFIX,this._getStdModContent(section),{src:UI})}else this._eraseStdMod(section);this.fire(ContentUpdate)},_renderStdMod:function(section){var contentBox=this.get(CONTENT_BOX),sectionNode=this._findStdModSection(section);if(!sectionNode)sectionNode=this._getStdModTemplate(section);this._insertStdModSection(contentBox,section,sectionNode);this[section+NODE_SUFFIX]=sectionNode;return this[section+NODE_SUFFIX]},
_eraseStdMod:function(section){var sectionNode=this.getStdModNode(section);if(sectionNode){sectionNode.remove(true);delete this[section+NODE_SUFFIX]}},_insertStdModSection:function(contentBox,section,sectionNode){var fc=contentBox.get(FIRST_CHILD);if(section===STD_FOOTER||!fc)contentBox.appendChild(sectionNode);else if(section===STD_HEADER)contentBox.insertBefore(sectionNode,fc);else{var footer=this[STD_FOOTER+NODE_SUFFIX];if(footer)contentBox.insertBefore(sectionNode,footer);else contentBox.appendChild(sectionNode)}},
_getStdModTemplate:function(section){return Node.create(StdMod.TEMPLATES[section],this._stdModNode.get(OWNER_DOCUMENT))},_addStdModContent:function(node,children,where){switch(where){case StdMod.BEFORE:where=0;break;case StdMod.AFTER:where=undefined;break;default:where=StdMod.REPLACE}node.insert(children,where)},_getPreciseHeight:function(node){var height=node?node.get(OFFSET_HEIGHT):0,getBCR="getBoundingClientRect";if(node&&node.hasMethod(getBCR)){var preciseRegion=node.invoke(getBCR);if(preciseRegion)height=
preciseRegion.bottom-preciseRegion.top}return height},_findStdModSection:function(section){return this.get(CONTENT_BOX).one("\x3e ."+StdMod.SECTION_CLASS_NAMES[section])},_parseStdModHTML:function(section){var node=this._findStdModSection(section);if(node){if(!this._stdModParsed){this._stdModParsed={};Y.before(this._applyStdModParsedConfig,this,APPLY_PARSED_CONFIG)}this._stdModParsed[section+CONTENT_SUFFIX]=1;return node.get("innerHTML")}return null},_applyStdModParsedConfig:function(node,cfg,parsedCfg){var parsed=
this._stdModParsed;if(parsed){parsed[HEADER_CONTENT]=!(HEADER_CONTENT in cfg)&&HEADER_CONTENT in parsed;parsed[BODY_CONTENT]=!(BODY_CONTENT in cfg)&&BODY_CONTENT in parsed;parsed[FOOTER_CONTENT]=!(FOOTER_CONTENT in cfg)&&FOOTER_CONTENT in parsed}},_getStdModContent:function(section){return this[section+NODE_SUFFIX]?this[section+NODE_SUFFIX].get(CHILD_NODES):null},setStdModContent:function(section,content,where){this.set(section+CONTENT_SUFFIX,content,{stdModPosition:where})},getStdModNode:function(section,
forceCreate){var node=this[section+NODE_SUFFIX]||null;if(!node&&forceCreate)node=this._renderStdMod(section);return node},fillHeight:function(node){if(node){var contentBox=this.get(CONTENT_BOX),stdModNodes=[this.headerNode,this.bodyNode,this.footerNode],stdModNode,cbContentHeight,filled=0,remaining=0,validNode=false;for(var i=0,l=stdModNodes.length;i<l;i++){stdModNode=stdModNodes[i];if(stdModNode)if(stdModNode!==node)filled+=this._getPreciseHeight(stdModNode);else validNode=true}if(validNode){if(UA.ie||
UA.opera)node.set(OFFSET_HEIGHT,0);cbContentHeight=contentBox.get(OFFSET_HEIGHT)-parseInt(contentBox.getComputedStyle("paddingTop"),10)-parseInt(contentBox.getComputedStyle("paddingBottom"),10)-parseInt(contentBox.getComputedStyle("borderBottomWidth"),10)-parseInt(contentBox.getComputedStyle("borderTopWidth"),10);if(L.isNumber(cbContentHeight)){remaining=cbContentHeight-filled;if(remaining>=0)node.set(OFFSET_HEIGHT,remaining)}}}}};Y.WidgetStdMod=StdMod},"patched-v3.18.1",{"requires":["base-build",
"widget"]});
YUI.add("aui-aria",function(A,NAME){var Lang=A.Lang,isBoolean=Lang.isBoolean,isFunction=Lang.isFunction,isObject=Lang.isObject,isString=Lang.isString,STR_REGEX=/([^a-z])/ig,_toAriaRole=A.cached(function(str){return str.replace(STR_REGEX,function(){return""}).toLowerCase()});var Aria=A.Component.create({NAME:"aria",NS:"aria",ATTRS:{attributes:{value:{},validator:isObject},attributeValueFormat:{value:function(val){return val},validator:isFunction},attributeNode:{writeOnce:true,setter:A.one,valueFn:function(){return this.get("host").get("boundingBox")}},
roleName:{valueFn:function(){var instance=this;var host=instance.get("host");var roleName=_toAriaRole(host.constructor.NAME||"");return instance.isValidRole(roleName)?roleName:""},validator:isString},roleNode:{writeOnce:true,setter:A.one,valueFn:function(){return this.get("host").get("boundingBox")}},validateW3C:{value:true,validator:isBoolean}},EXTENDS:A.Plugin.Base,prototype:{initializer:function(){var instance=this;instance.publish("aria:processAttribute",{defaultFn:instance._defProcessFn,queuable:false,
emitFacade:true,bubbles:true,prefix:"aria"});instance._uiSetRoleName(instance.get("roleName"));instance.after("roleNameChange",instance._afterRoleNameChange);instance._bindHostAttributes()},isValidAttribute:function(attrName){var instance=this;return instance.get("validateW3C")?A.Plugin.Aria.W3C_ATTRIBUTES[attrName]:true},isValidRole:function(roleName){var instance=this;return instance.get("validateW3C")?A.Plugin.Aria.W3C_ROLES[roleName]:true},setAttribute:function(attrName,attrValue,node){var instance=
this;if(instance.isValidAttribute(attrName)){(node||instance.get("attributeNode")).set("aria-"+attrName,attrValue);return true}return false},setAttributes:function(attributes){var instance=this;A.Array.each(attributes,function(attribute){instance.setAttribute(attribute.name,attribute.value,attribute.node)})},setRole:function(roleName,node){var instance=this;if(instance.isValidRole(roleName)){(node||instance.get("roleNode")).set("role",roleName);return true}return false},setRoles:function(roles){var instance=
this;A.Array.each(roles,function(role){instance.setRole(role.name,role.node)})},_afterHostAttributeChange:function(event){var instance=this;instance._handleProcessAttribute(event)},_afterRoleNameChange:function(event){var instance=this;instance._uiSetRoleName(event.newVal)},_bindHostAttributes:function(){var instance=this;var attributes=instance.get("attributes");A.each(attributes,function(aria,attrName){var ariaAttr=instance._getAriaAttribute(aria,attrName);instance._handleProcessAttribute({aria:ariaAttr});
instance.afterHostEvent(attrName+"Change",function(event){event.aria=ariaAttr;instance._afterHostAttributeChange(event)})})},_defProcessFn:function(event){var instance=this;instance._setAttribute(event.aria)},_getAriaAttribute:function(aria,attrName){var instance=this;var attributeValueFormat=instance.get("attributeValueFormat");var prepared={};if(isString(aria))prepared=A.merge(prepared,{ariaName:aria,attrName:attrName,format:attributeValueFormat,node:null});else if(isObject(aria))prepared=A.mix(aria,
{ariaName:"",attrName:attrName,format:attributeValueFormat,node:null});return prepared},_handleProcessAttribute:function(event){var instance=this;instance.fire("aria:processAttribute",{aria:event.aria})},_setAttribute:function(ariaAttr){var instance=this;var host=instance.get("host");var attrValue=host.get(ariaAttr.attrName);var attrNode=ariaAttr.node;if(isFunction(attrNode))attrNode=attrNode.apply(instance,[ariaAttr]);instance.setAttribute(ariaAttr.ariaName,ariaAttr.format.apply(instance,[attrValue,
ariaAttr]),attrNode)},_uiSetRoleName:function(val){var instance=this;instance.setRole(val)}}});A.Plugin.Aria=Aria;A.Plugin.Aria.W3C_ROLES={"alert":1,"alertdialog":1,"application":1,"article":1,"banner":1,"button":1,"checkbox":1,"columnheader":1,"combobox":1,"command":1,"complementary":1,"composite":1,"contentinfo":1,"definition":1,"dialog":1,"directory":1,"document":1,"form":1,"grid":1,"gridcell":1,"group":1,"heading":1,"img":1,"input":1,"landmark":1,"link":1,"list":1,"listbox":1,"listitem":1,"log":1,
"main":1,"marquee":1,"math":1,"menu":1,"menubar":1,"menuitem":1,"menuitemcheckbox":1,"menuitemradio":1,"navigation":1,"note":1,"option":1,"presentation":1,"progressbar":1,"radio":1,"radiogroup":1,"range":1,"region":1,"roletype":1,"row":1,"rowheader":1,"scrollbar":1,"search":1,"section":1,"sectionhead":1,"select":1,"separator":1,"slider":1,"spinbutton":1,"status":1,"structure":1,"tab":1,"tablist":1,"tabpanel":1,"textbox":1,"timer":1,"toolbar":1,"tooltip":1,"tree":1,"treegrid":1,"treeitem":1,"widget":1,
"window":1};A.Plugin.Aria.W3C_ATTRIBUTES={"activedescendant":1,"atomic":1,"autocomplete":1,"busy":1,"checked":1,"controls":1,"describedby":1,"disabled":1,"dropeffect":1,"expanded":1,"flowto":1,"grabbed":1,"haspopup":1,"hidden":1,"invalid":1,"label":1,"labelledby":1,"level":1,"live":1,"multiline":1,"multiselectable":1,"orientation":1,"owns":1,"posinset":1,"pressed":1,"readonly":1,"relevant":1,"required":1,"selected":1,"setsize":1,"sort":1,"valuemax":1,"valuemin":1,"valuenow":1,"valuetext":1}},"3.1.0-deprecated.72",
{"requires":["plugin","aui-component"]});
YUI.add("aui-io-plugin-deprecated",function(A,NAME){var L=A.Lang,isBoolean=L.isBoolean,isString=L.isString,isNode=function(v){return v instanceof A.Node},StdMod=A.WidgetStdMod,TYPE_NODE="Node",TYPE_WIDGET="Widget",EMPTY="",FAILURE="failure",FAILURE_MESSAGE="failureMessage",HOST="host",ICON="icon",IO="io",IO_PLUGIN="IOPlugin",LOADING="loading",LOADING_MASK="loadingMask",NODE="node",OUTER="outer",PARSE_CONTENT="parseContent",QUEUE="queue",RENDERED="rendered",SECTION="section",SHOW_LOADING="showLoading",
SUCCESS="success",TYPE="type",WHERE="where",getCN=A.getClassName,CSS_ICON_LOADING=getCN(ICON,LOADING);var IOPlugin=A.Component.create({NAME:IO_PLUGIN,NS:IO,ATTRS:{node:{value:null,getter:function(value){var instance=this;if(!value){var host=instance.get(HOST);var type=instance.get(TYPE);if(type==TYPE_NODE)value=host;else if(type==TYPE_WIDGET){var section=instance.get(SECTION);if(!host.getStdModNode(section))host.setStdModContent(section,EMPTY);value=host.getStdModNode(section)}}return A.one(value)},
validator:isNode},failureMessage:{value:"Failed to retrieve content",validator:isString},loadingMask:{value:{}},parseContent:{value:true,validator:isBoolean},showLoading:{value:true,validator:isBoolean},section:{value:StdMod.BODY,validator:function(val){return!val||val==StdMod.BODY||val==StdMod.HEADER||val==StdMod.FOOTER}},type:{readOnly:true,valueFn:function(){var instance=this;var type=TYPE_NODE;if(instance.get(HOST)instanceof A.Widget)type=TYPE_WIDGET;return type},validator:isString},where:{value:StdMod.REPLACE,
validator:function(val){return!val||val==StdMod.AFTER||val==StdMod.BEFORE||val==StdMod.REPLACE||val==OUTER}}},EXTENDS:A.IORequest,prototype:{bindUI:function(){var instance=this;instance.on("activeChange",instance._onActiveChange);instance.on(SUCCESS,instance._successHandler);instance.on(FAILURE,instance._failureHandler);if(instance.get(TYPE)==TYPE_WIDGET&&instance.get(SHOW_LOADING)){var host=instance.get(HOST);host.after("heightChange",instance._syncLoadingMaskUI,instance);host.after("widthChange",
instance._syncLoadingMaskUI,instance)}},_autoStart:function(){var instance=this;instance.bindUI();IOPlugin.superclass._autoStart.apply(this,arguments)},_bindParseContent:function(){var instance=this;var node=instance.get(NODE);if(node&&!node.ParseContent&&instance.get(PARSE_CONTENT))node.plug(A.Plugin.ParseContent)},hideLoading:function(){var instance=this;var node=instance.get(NODE);if(node.loadingmask)node.loadingmask.hide()},setContent:function(content){var instance=this;instance._bindParseContent();
instance._getContentSetterByType().apply(instance,[content]);if(instance.overlayMaskBoundingBox)instance.overlayMaskBoundingBox.remove()},showLoading:function(){var instance=this;var node=instance.get(NODE);if(node.loadingmask){if(instance.overlayMaskBoundingBox)node.append(instance.overlayMaskBoundingBox)}else{node.plug(A.LoadingMask,instance.get(LOADING_MASK));instance.overlayMaskBoundingBox=node.loadingmask.overlayMask.get("boundingBox")}node.loadingmask.show()},start:function(){var instance=this;
var host=instance.get(HOST);if(!host.get(RENDERED))host.after("render",function(){instance._setLoadingUI(true)});IOPlugin.superclass.start.apply(instance,arguments)},_getContentSetterByType:function(){var instance=this;var setters={Node:function(content){var instance=this;var node=instance.get(NODE);if(content instanceof A.NodeList)content=content.toFrag();if(content instanceof A.Node)content=content._node;var where=instance.get(WHERE);if(where==OUTER)node.replace(content);else node.insert(content,
where)},Widget:function(content){var instance=this;var host=instance.get(HOST);host.setStdModContent.apply(host,[instance.get(SECTION),content,instance.get(WHERE)])}};return setters[this.get(TYPE)]},_setLoadingUI:function(show){var instance=this;if(instance.get(SHOW_LOADING))if(show)instance.showLoading();else instance.hideLoading()},_syncLoadingMaskUI:function(){var instance=this;instance.get(NODE).loadingmask.refreshMask()},_successHandler:function(event,id,xhr){var instance=this;instance.setContent(this.get("responseData"))},
_failureHandler:function(event,id,xhr){var instance=this;instance.setContent(instance.get(FAILURE_MESSAGE))},_onActiveChange:function(event){var instance=this;var host=instance.get(HOST);var widget=instance.get(TYPE)==TYPE_WIDGET;if(!widget||widget&&host&&host.get(RENDERED))instance._setLoadingUI(event.newVal)}}});A.Node.prototype.load=function(uri,config,callback){var instance=this;var index=uri.indexOf(" ");var selector;if(index>0){selector=uri.slice(index,uri.length);uri=uri.slice(0,index)}if(L.isFunction(config)){callback=
config;config=null}config=config||{};if(callback){config.after=config.after||{};config.after.success=callback}var where=config.where;config.uri=uri;config.where=where;if(selector){config.selector=selector;config.where=where||"replace"}instance.plug(A.Plugin.IO,config);return instance};A.namespace("Plugin").IO=IOPlugin},"3.1.0-deprecated.72",{"requires":["aui-overlay-base-deprecated","aui-parse-content","aui-io-request","aui-loading-mask-deprecated"]});
YUI.add("aui-io-request",function(A,NAME){var L=A.Lang,isBoolean=L.isBoolean,isFunction=L.isFunction,isString=L.isString,defaults=A.namespace("config.io"),getDefault=function(attr){return function(){return defaults[attr]}},ACCEPTS={all:"*/*",html:"text/html",json:"application/json, text/javascript",text:"text/plain",xml:"application/xml, text/xml"};var IORequest=A.Component.create({NAME:"IORequest",ATTRS:{autoLoad:{value:true,validator:isBoolean},cache:{value:true,validator:isBoolean},dataType:{setter:function(v){return(v||
"").toLowerCase()},value:null,validator:isString},responseData:{setter:function(v){return this._setResponseData(v)},value:null},uri:{setter:function(v){return this._parseURL(v)},value:null,validator:isString},active:{value:false,validator:isBoolean},cfg:{getter:function(){var instance=this;return{arguments:instance.get("arguments"),context:instance.get("context"),data:instance.getFormattedData(),form:instance.get("form"),headers:instance.get("headers"),method:instance.get("method"),on:{complete:A.bind(instance.fire,
instance,"complete"),end:A.bind(instance._end,instance),failure:A.bind(instance.fire,instance,"failure"),start:A.bind(instance.fire,instance,"start"),success:A.bind(instance._success,instance)},sync:instance.get("sync"),timeout:instance.get("timeout"),xdr:instance.get("xdr")}},readOnly:true},transaction:{value:null},arguments:{valueFn:getDefault("arguments")},context:{valueFn:getDefault("context")},data:{valueFn:getDefault("data")},form:{valueFn:getDefault("form")},headers:{getter:function(value){var header=
[];var instance=this;var dataType=instance.get("dataType");if(dataType)header.push(ACCEPTS[dataType]);header.push(ACCEPTS.all);return A.merge(value,{Accept:header.join(", ")})},valueFn:getDefault("headers")},method:{setter:function(val){return val.toLowerCase()},valueFn:getDefault("method")},selector:{value:null},sync:{valueFn:getDefault("sync")},timeout:{valueFn:getDefault("timeout")},xdr:{valueFn:getDefault("xdr")}},EXTENDS:A.Plugin.Base,prototype:{init:function(){var instance=this;IORequest.superclass.init.apply(this,
arguments);instance._autoStart()},destructor:function(){var instance=this;instance.stop();instance.set("transaction",null)},getFormattedData:function(){var instance=this;var value=instance.get("data");var dataFormatter=defaults.dataFormatter;if(isFunction(dataFormatter))value=dataFormatter.call(instance,value);return value},start:function(){var instance=this;instance.destructor();instance.set("active",true);var ioObj=instance._yuiIOObj;if(!ioObj){ioObj=new A.IO;instance._yuiIOObj=ioObj}var transaction=
ioObj.send(instance.get("uri"),instance.get("cfg"));instance.set("transaction",transaction)},stop:function(){var instance=this;var transaction=instance.get("transaction");if(transaction)transaction.abort()},_autoStart:function(){var instance=this;if(instance.get("autoLoad"))instance.start()},_parseURL:function(url){var instance=this;var cache=instance.get("cache");var method=instance.get("method");if(cache===false&&method==="get"){var ts=+new Date;var ret=url.replace(/(\?|&)_=.*?(&|$)/,"$1_\x3d"+
ts+"$2");url=ret+(ret===url?(url.match(/\?/)?"\x26":"?")+"_\x3d"+ts:"")}var uriFormatter=defaults.uriFormatter;if(isFunction(uriFormatter))url=uriFormatter.apply(instance,[url]);return url},_end:function(id,args){var instance=this;instance.set("active",false);instance.set("transaction",null);instance.fire("end",id,args)},_success:function(id,obj,args){var instance=this;instance.set("responseData",obj);instance.fire("success",id,obj,args)},_setResponseData:function(xhr){var data=null;var instance=
this;if(xhr){var dataType=instance.get("dataType");var contentType=xhr.getResponseHeader("content-type")||"";if(dataType==="xml"||!dataType&&contentType.indexOf("xml")>=0){data=xhr.responseXML;if(data.documentElement.tagName==="parsererror")throw"Parser error: IO dataType is not correctly parsing";}else data=xhr.responseText;if(data==="")data=null;if(dataType==="json")try{data=A.JSON.parse(data)}catch(e){}else{var selector=instance.get("selector");if(data&&selector){var tempRoot;if(data.documentElement)tempRoot=
A.one(data);else tempRoot=A.Node.create(data);data=tempRoot.all(selector)}}}return data}}});A.IORequest=IORequest;A.io.request=function(uri,config){return new A.IORequest(A.merge(config,{uri:uri}))}},"3.1.0-deprecated.72",{"requires":["io-base","json","plugin","querystring-stringify","aui-component"]});
YUI.add("aui-loading-mask-deprecated",function(A,NAME){var Lang=A.Lang,BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",HIDE="hide",HOST="host",MESSAGE_EL="messageEl",NAME="loadingmask",POSITION="position",SHOW="show",STATIC="static",STRINGS="strings",TARGET="target",TOGGLE="toggle",getClassName=A.getClassName,CSS_LOADINGMASK=getClassName(NAME),CSS_MASKED=getClassName(NAME,"masked"),CSS_MASKED_RELATIVE=getClassName(NAME,"masked","relative"),CSS_MESSAGE_LOADING=getClassName(NAME,"message"),CSS_MESSAGE_LOADING_CONTENT=
getClassName(NAME,"message","content"),TPL_MESSAGE_LOADING='\x3cdiv class\x3d"'+CSS_MESSAGE_LOADING+'"\x3e\x3cdiv class\x3d"'+CSS_MESSAGE_LOADING_CONTENT+'"\x3e{0}\x3c/div\x3e\x3c/div\x3e';var LoadingMask=A.Component.create({NAME:NAME,NS:NAME,ATTRS:{messageEl:{valueFn:function(val){var instance=this;var strings=instance.get(STRINGS);return A.Node.create(Lang.sub(TPL_MESSAGE_LOADING,[strings.loading]))}},strings:{value:{loading:"Loading\x26hellip;"}},target:{setter:function(){var instance=this;var target=
instance.get(HOST);if(target instanceof A.Widget)target=target.get(CONTENT_BOX);return target},value:null}},EXTENDS:A.Plugin.Base,prototype:{initializer:function(config){var instance=this;instance.IGNORED_ATTRS=A.merge({host:true},LoadingMask.ATTRS);instance.renderUI();instance.bindUI();instance._createDynamicAttrs(config)},renderUI:function(){var instance=this;var strings=instance.get(STRINGS);instance._renderOverlayMask();instance.overlayMask.get(BOUNDING_BOX).append(instance.get(MESSAGE_EL))},
bindUI:function(){var instance=this;instance._bindOverlayMaskUI()},destructor:function(){var instance=this;instance.overlayMask.destroy();instance._visibleChangeHandle.detach()},_bindOverlayMaskUI:function(){var instance=this;instance._visibleChangeHandle=instance.overlayMask.after("visibleChange",instance._afterVisibleChange,instance)},centerMessage:function(){var instance=this;instance.get(MESSAGE_EL).center(instance.overlayMask.get(BOUNDING_BOX))},refreshMask:function(){var instance=this;instance.overlayMask.refreshMask();
instance.centerMessage()},_afterVisibleChange:function(event){var instance=this;var target=instance.get(TARGET);var isStaticPositioned=target.getStyle(POSITION)==STATIC;target.toggleClass(CSS_MASKED,event.newVal);target.toggleClass(CSS_MASKED_RELATIVE,event.newVal&&isStaticPositioned);if(event.newVal)instance.refreshMask()},_renderOverlayMask:function(){var instance=this;var target=instance.get(TARGET);instance.overlayMask=(new A.OverlayMask({target:target,cssClass:CSS_LOADINGMASK})).render(target)},
_createDynamicAttrs:function(config){var instance=this;A.each(config,function(value,key){var ignoredAttr=instance.IGNORED_ATTRS[key];if(!ignoredAttr)instance.addAttr(key,{setter:function(val){this.overlayMask.set(key,val);return val},value:value})})}}});A.each([HIDE,SHOW,TOGGLE],function(method){LoadingMask.prototype[method]=function(){this.overlayMask[method]()}});A.LoadingMask=LoadingMask},"3.1.0-deprecated.72",{"requires":["plugin","aui-overlay-mask-deprecated"],"skinnable":true});
YUI.add("aui-overlay-base-deprecated",function(A,NAME){A.OverlayBase=A.Component.create({NAME:"overlay",ATTRS:{hideClass:{value:false}},AUGMENTS:[A.WidgetPosition,A.WidgetStack,A.WidgetPositionAlign,A.WidgetPositionConstrain,A.WidgetStdMod]})},"3.1.0-deprecated.72",{"requires":["widget-position","widget-stack","widget-position-align","widget-position-constrain","widget-stdmod","aui-component"]});
YUI.add("aui-overlay-context-deprecated",function(A,NAME){var L=A.Lang,isString=L.isString,isNumber=L.isNumber,isObject=L.isObject,isBoolean=L.isBoolean,isNodeList=function(v){return v instanceof A.NodeList},ALIGN="align",BL="bl",BOUNDING_BOX="boundingBox",CANCELLABLE_HIDE="cancellableHide",OVERLAY_CONTEXT="overlaycontext",CURRENT_NODE="currentNode",FOCUSED="focused",HIDE="hide",HIDE_DELAY="hideDelay",HIDE_ON="hideOn",HIDE_ON_DOCUMENT_CLICK="hideOnDocumentClick",MOUSEDOWN="mousedown",SHOW="show",
SHOW_DELAY="showDelay",SHOW_ON="showOn",TL="tl",TRIGGER="trigger",USE_ARIA="useARIA",VISIBLE="visible";var OverlayContext=A.Component.create({NAME:OVERLAY_CONTEXT,ATTRS:{align:{value:{node:null,points:[TL,BL]}},cancellableHide:{value:true,validator:isBoolean},currentNode:{valueFn:function(){return this.get(TRIGGER).item(0)}},delay:{value:null,validator:isObject},hideOn:{lazyAdd:false,value:"mouseout",setter:function(v){return this._setHideOn(v)}},hideOnDocumentClick:{lazyAdd:false,setter:function(v){return this._setHideOnDocumentClick(v)},
value:true,validator:isBoolean},hideDelay:{lazyAdd:false,setter:"_setHideDelay",value:0,validator:isNumber},showOn:{lazyAdd:false,value:"mouseover",setter:function(v){return this._setShowOn(v)}},showDelay:{lazyAdd:false,setter:"_setShowDelay",value:0,validator:isNumber},trigger:{lazyAdd:false,setter:function(v){if(isNodeList(v))return v;else if(isString(v))return A.all(v);return new A.NodeList([v])}},useARIA:{value:true},visible:{value:false}},EXTENDS:A.OverlayBase,constructor:function(config){var instance=
this;instance._showCallback=null;instance._hideCallback=null;OverlayContext.superclass.constructor.apply(this,arguments)},prototype:{initializer:function(){var instance=this;var trigger=instance.get(TRIGGER);if(trigger&&trigger.size())instance.set("align.node",trigger.item(0))},bindUI:function(){var instance=this;var boundingBox=instance.get(BOUNDING_BOX);boundingBox.on(MOUSEDOWN,instance._stopTriggerEventPropagation);instance.before("triggerChange",instance._beforeTriggerChange);instance.before("showOnChange",
instance._beforeShowOnChange);instance.before("hideOnChange",instance._beforeHideOnChange);instance.after("triggerChange",instance._afterTriggerChange);instance.after("showOnChange",instance._afterShowOnChange);instance.after("hideOnChange",instance._afterHideOnChange);boundingBox.on("click",A.bind(instance._cancelAutoHide,instance));boundingBox.on("mouseenter",A.bind(instance._cancelAutoHide,instance));boundingBox.on("mouseleave",A.bind(instance._invokeHideTaskOnInteraction,instance));instance.after("focusedChange",
A.bind(instance._invokeHideTaskOnInteraction,instance));instance.on("visibleChange",instance._onVisibleChangeOverlayContext)},hide:function(){var instance=this;instance.clearIntervals();instance.fire("hide");OverlayContext.superclass.hide.apply(instance,arguments)},show:function(event){var instance=this;instance.clearIntervals();instance.updateCurrentNode(event);instance.fire("show");OverlayContext.superclass.show.apply(instance,arguments);instance.refreshAlign()},syncUI:function(){var instance=this;
if(instance.get(USE_ARIA))instance.plug(A.Plugin.Aria,{attributes:{trigger:{ariaName:"controls",format:function(value){var id=instance.get(BOUNDING_BOX).generateID();return id},node:function(){return instance.get(TRIGGER)}},visible:{ariaName:"hidden",format:function(value){return!value}}},roleName:"dialog"})},toggle:function(event){var instance=this;if(instance.get(VISIBLE))instance._hideTask(event);else instance._showTask(event)},clearIntervals:function(){this._hideTask.cancel();this._showTask.cancel()},
refreshAlign:function(){var instance=this;var align=instance.get(ALIGN);var currentNode=instance.get(CURRENT_NODE);if(currentNode)instance._uiSetAlign(currentNode,align.points)},updateCurrentNode:function(event){var instance=this;var align=instance.get(ALIGN);var trigger=instance.get(TRIGGER);var currentTarget=null;if(event)currentTarget=event.currentTarget;var node=currentTarget||trigger.item(0)||align.node;if(node)instance.set(CURRENT_NODE,node)},_toggle:function(event){var instance=this;if(instance.get("disabled"))return;
var currentTarget=event.currentTarget;if(instance._lastTarget!=currentTarget)instance.hide();instance.toggle(event);event.stopPropagation();instance._lastTarget=currentTarget},_afterShowOnChange:function(event){var instance=this;var wasToggle=event.prevVal==instance.get(HIDE_ON);if(wasToggle){var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._hideCallback);instance._setHideOn(instance.get(HIDE_ON))}},_afterHideOnChange:function(event){var instance=this;var wasToggle=event.prevVal==
instance.get(SHOW_ON);if(wasToggle){var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._showCallback);instance._setShowOn(instance.get(SHOW_ON))}},_afterTriggerChange:function(event){var instance=this;instance._setShowOn(instance.get(SHOW_ON));instance._setHideOn(instance.get(HIDE_ON))},_beforeShowOnChange:function(event){var instance=this;var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._showCallback)},_beforeHideOnChange:function(event){var instance=this;
var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._hideCallback)},_beforeTriggerChange:function(event){var instance=this;var trigger=instance.get(TRIGGER);var showOn=instance.get(SHOW_ON);var hideOn=instance.get(HIDE_ON);trigger.detach(showOn,instance._showCallback);trigger.detach(hideOn,instance._hideCallback);trigger.detach(MOUSEDOWN,instance._stopTriggerEventPropagation)},_cancelAutoHide:function(event){var instance=this;if(instance.get(CANCELLABLE_HIDE))instance.clearIntervals();
event.stopPropagation()},_invokeHideTaskOnInteraction:function(event){var instance=this;var cancellableHide=instance.get(CANCELLABLE_HIDE);var focused=instance.get(FOCUSED);if(!focused&&!cancellableHide)instance._hideTask()},_onVisibleChangeOverlayContext:function(event){var instance=this;if(event.newVal&&instance.get("disabled"))event.preventDefault()},_stopTriggerEventPropagation:function(event){event.stopPropagation()},_setHideDelay:function(val){var instance=this;instance._hideTask=A.debounce(instance.hide,
val,instance);return val},_setHideOn:function(eventType){var instance=this;var trigger=instance.get(TRIGGER);var toggle=eventType==instance.get(SHOW_ON);if(toggle){instance._hideCallback=A.bind(instance._toggle,instance);trigger.detach(eventType,instance._showCallback)}else{var delay=instance.get(HIDE_DELAY);instance._hideCallback=function(event){instance._hideTask(event);event.stopPropagation()}}trigger.on(eventType,instance._hideCallback);return eventType},_setHideOnDocumentClick:function(value){var instance=
this;if(value)A.OverlayContextManager.register(instance);else A.OverlayContextManager.remove(instance);return value},_setShowDelay:function(val){var instance=this;instance._showTask=A.debounce(instance.show,val,instance);return val},_setShowOn:function(eventType){var instance=this;var trigger=instance.get(TRIGGER);var toggle=eventType==instance.get(HIDE_ON);if(toggle){instance._showCallback=A.bind(instance._toggle,instance);trigger.detach(eventType,instance._hideCallback)}else{var delay=instance.get(SHOW_DELAY);
instance._showCallback=function(event){instance._showTask(event);event.stopPropagation()}}if(eventType!=MOUSEDOWN)trigger.on(MOUSEDOWN,instance._stopTriggerEventPropagation);else trigger.detach(MOUSEDOWN,instance._stopTriggerEventPropagation);trigger.on(eventType,instance._showCallback);return eventType}}});A.OverlayContext=OverlayContext;A.OverlayContextManager=new A.OverlayManager({});A.on(MOUSEDOWN,function(){A.OverlayContextManager.hideAll()},A.getDoc())},"3.1.0-deprecated.72",{"requires":["aui-overlay-manager-deprecated",
"aui-delayed-task-deprecated","aui-aria"]});
YUI.add("aui-overlay-manager-deprecated",function(A,NAME){var Lang=A.Lang,isArray=Lang.isArray,isBoolean=Lang.isBoolean,isNumber=Lang.isNumber,isString=Lang.isString,BOUNDING_BOX="boundingBox",DEFAULT="default",HOST="host",OVERLAY_MANAGER="OverlayManager",GROUP="group",Z_INDEX="zIndex",Z_INDEX_BASE="zIndexBase";var OverlayManager=A.Component.create({NAME:OVERLAY_MANAGER.toLowerCase(),ATTRS:{zIndexBase:{value:1E3,validator:isNumber,setter:Lang.toInt}},EXTENDS:A.Base,prototype:{initializer:function(){var instance=
this;instance._overlays=[]},bringToTop:function(overlay){var instance=this;var overlays=instance._overlays.sort(instance.sortByZIndexDesc);var highest=overlays[0];if(highest!==overlay){var overlayZ=overlay.get(Z_INDEX);var highestZ=highest.get(Z_INDEX);overlay.set(Z_INDEX,highestZ+1);overlay.set("focused",true)}},destructor:function(){var instance=this;instance._overlays=[]},register:function(overlay){var instance=this;var overlays=instance._overlays;if(isArray(overlay))A.Array.each(overlay,function(o){instance.register(o)});
else{var zIndexBase=instance.get(Z_INDEX_BASE);var registered=instance._registered(overlay);if(!registered&&overlay&&(overlay instanceof A.Overlay||A.Component&&overlay instanceof A.Component)){var boundingBox=overlay.get(BOUNDING_BOX);overlays.push(overlay);var zIndex=overlay.get(Z_INDEX)||0;var newZIndex=overlays.length+zIndex+zIndexBase;overlay.set(Z_INDEX,newZIndex);overlay.on("focusedChange",instance._onFocusedChange,instance);boundingBox.on("mousedown",instance._onMouseDown,instance)}}return overlays},
remove:function(overlay){var instance=this;var overlays=instance._overlays;if(overlays.length)return A.Array.removeItem(overlays,overlay);return null},each:function(fn){var instance=this;var overlays=instance._overlays;A.Array.each(overlays,fn)},showAll:function(){this.each(function(overlay){overlay.show()})},hideAll:function(){this.each(function(overlay){overlay.hide()})},sortByZIndexDesc:function(a,b){if(!a||!b||!a.hasImpl(A.WidgetStack)||!b.hasImpl(A.WidgetStack))return 0;else{var aZ=a.get(Z_INDEX);
var bZ=b.get(Z_INDEX);if(aZ>bZ)return-1;else if(aZ<bZ)return 1;else return 0}},_registered:function(overlay){var instance=this;return A.Array.indexOf(instance._overlays,overlay)!=-1},_onMouseDown:function(event){var instance=this;var overlay=A.Widget.getByNode(event.currentTarget||event.target);var registered=instance._registered(overlay);if(overlay&&registered)instance.bringToTop(overlay)},_onFocusedChange:function(event){var instance=this;if(event.newVal){var overlay=event.currentTarget||event.target;
var registered=instance._registered(overlay);if(overlay&&registered)instance.bringToTop(overlay)}}}});A.OverlayManager=OverlayManager},"3.1.0-deprecated.72",{"requires":["overlay","plugin","aui-base-deprecated","aui-overlay-base-deprecated"]});
YUI.add("aui-overlay-mask-deprecated",function(A,NAME){var L=A.Lang,isArray=L.isArray,isString=L.isString,isNumber=L.isNumber,isValue=L.isValue,CONFIG=A.config,UA=A.UA,IE6=UA.ie<=6,ABSOLUTE="absolute",ALIGN_POINTS="alignPoints",BACKGROUND="background",BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",FIXED="fixed",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",OFFSET_WIDTH="offsetWidth",OPACITY="opacity",OVERLAY_MASK="overlaymask",POSITION="position",TARGET="target",WIDTH="width";var OverlayMask=
A.Component.create({NAME:OVERLAY_MASK,ATTRS:{alignPoints:{value:["tl","tl"],validator:isArray},background:{lazyAdd:false,value:null,validator:isString,setter:function(v){if(v)this.get(CONTENT_BOX).setStyle(BACKGROUND,v);return v}},target:{cloneDefaultValue:false,lazyAdd:false,value:CONFIG.doc,setter:function(v){var instance=this;var target=A.one(v);var isDoc=instance._isDoc=target.compareTo(CONFIG.doc);var isWin=instance._isWin=target.compareTo(CONFIG.win);instance._fullPage=isDoc||isWin;return target}},
opacity:{value:.5,validator:isNumber,setter:function(v){return this._setOpacity(v)}},shim:{value:A.UA.ie},visible:{value:false},zIndex:{value:1E3}},EXTENDS:A.OverlayBase,prototype:{bindUI:function(){var instance=this;OverlayMask.superclass.bindUI.apply(this,arguments);instance._eventHandles=[instance.after("targetChange",instance._afterTargetChange),instance.after("visibleChange",instance._afterVisibleChange),A.on("windowresize",A.bind(instance.refreshMask,instance))]},syncUI:function(){var instance=
this;instance.refreshMask()},destructor:function(){var instance=this;(new A.EventHandle(instance._eventHandles)).detach()},getTargetSize:function(){var instance=this;var target=instance.get(TARGET);var isDoc=instance._isDoc;var isWin=instance._isWin;var height=target.get(OFFSET_HEIGHT);var width=target.get(OFFSET_WIDTH);if(IE6)if(isWin){width=A.DOM.winWidth();height=A.DOM.winHeight()}else{if(isDoc){width=A.DOM.docWidth();height=A.DOM.docHeight()}}else if(instance._fullPage){height="100%";width="100%"}return{height:height,
width:width}},refreshMask:function(){var instance=this;var alignPoints=instance.get(ALIGN_POINTS);var target=instance.get(TARGET);var boundingBox=instance.get(BOUNDING_BOX);var targetSize=instance.getTargetSize();var fullPage=instance._fullPage;boundingBox.setStyles({position:IE6||!fullPage?ABSOLUTE:FIXED,left:0,top:0});var height=targetSize.height;var width=targetSize.width;if(isValue(height))instance.set(HEIGHT,height);if(isValue(width))instance.set(WIDTH,width);if(!fullPage)instance.align(target,
alignPoints)},_setOpacity:function(v){var instance=this;instance.get(CONTENT_BOX).setStyle(OPACITY,v);return v},_uiSetVisible:function(val){var instance=this;OverlayMask.superclass._uiSetVisible.apply(this,arguments);if(val)instance._setOpacity(instance.get(OPACITY))},_afterTargetChange:function(event){var instance=this;instance.refreshMask()},_afterVisibleChange:function(event){var instance=this;instance._uiSetVisible(event.newVal)},_uiSetXY:function(){var instance=this;if(!instance._fullPage||IE6)OverlayMask.superclass._uiSetXY.apply(instance,
arguments)}}});A.OverlayMask=OverlayMask},"3.1.0-deprecated.72",{"requires":["event-resize","aui-base-deprecated","aui-overlay-base-deprecated"],"skinnable":true});
YUI.add("aui-parse-content",function(A,NAME){var L=A.Lang,isString=L.isString,DOC=A.config.doc,PADDING_NODE="\x3cdiv\x3e_\x3c/div\x3e",SCRIPT_TYPES={"":1,"text/javascript":1,"text/parsed":1};var ParseContent=A.Component.create({NAME:"ParseContent",NS:"ParseContent",ATTRS:{queue:{value:null},preserveScriptNodes:{validator:L.isBoolean,value:false}},EXTENDS:A.Plugin.Base,prototype:{initializer:function(){var instance=this;ParseContent.superclass.initializer.apply(this,arguments);instance.set("queue",
new A.AsyncQueue);instance._bindAOP()},globalEval:function(data){var doc=A.getDoc();var head=doc.one("head")||doc.get("documentElement");var newScript=DOC.createElement("script");newScript.type="text/javascript";if(data)newScript.text=L.trim(data);head.appendChild(newScript).remove()},parseContent:function(content){var instance=this;var output=instance._extractScripts(content);instance._dispatch(output);return output},_addInlineScript:function(data){var instance=this;instance.get("queue").add({args:data,
context:instance,fn:instance.globalEval,timeout:0})},_bindAOP:function(){var instance=this;var cleanFirstArg=function(content){var args=Array.prototype.slice.call(arguments);var output=instance.parseContent(content);args.splice(0,1,output.fragment);return new A.Do.AlterArgs(null,args)};this.doBefore("insert",cleanFirstArg);this.doBefore("replaceChild",cleanFirstArg);var cleanArgs=function(content){var output=instance.parseContent(content);return new A.Do.AlterArgs(null,[output.fragment])};this.doBefore("replace",
cleanArgs);this.doBefore("setContent",cleanArgs)},_extractScripts:function(content){var instance=this,fragment=A.Node.create("\x3cdiv\x3e\x3c/div\x3e"),output={},preserveScriptNodes=instance.get("preserveScriptNodes");if(isString(content)){content=PADDING_NODE+content;A.DOM.addHTML(fragment,content,"append")}else{fragment.append(PADDING_NODE);fragment.append(content)}output.js=fragment.all("script").filter(function(script){var includeScript=SCRIPT_TYPES[script.getAttribute("type").toLowerCase()];
if(preserveScriptNodes)script.setAttribute("type","text/parsed");return includeScript});if(!preserveScriptNodes)output.js.each(function(node){node.remove()});fragment.get("firstChild").remove();output.fragment=fragment.get("childNodes").toFrag();return output},_dispatch:function(output){var instance=this;var queue=instance.get("queue");var scriptContent=[];output.js.each(function(node){var src=node.get("src");if(src){if(scriptContent.length){instance._addInlineScript(scriptContent.join(";"));scriptContent.length=
0}queue.add({autoContinue:false,fn:function(){A.Get.script(src,{onEnd:function(o){o.purge();queue.run()}})},timeout:0})}else{var dom=node._node;scriptContent.push(dom.text||dom.textContent||dom.innerHTML||"")}});if(scriptContent.length)instance._addInlineScript(scriptContent.join(";"));queue.run()}}});A.namespace("Plugin").ParseContent=ParseContent},"3.1.0-deprecated.72",{"requires":["async-queue","plugin","io-base","aui-component","aui-node-base"]});
(function(A,Liferay){var LayoutExporter={icons:{minus:themeDisplay.getPathThemeImages()+"/arrows/01_minus.png",plus:themeDisplay.getPathThemeImages()+"/arrows/01_plus.png"},publishToLive:function publishToLive(options){options=options||{};Liferay.Util.openWindow({dialog:{constrain:true,modal:true,on:{visibleChange:function visibleChange(event){var instance=this;if(!event.newVal)instance.destroy()}}},title:options.title,uri:options.url})}};Liferay.provide(LayoutExporter,"all",function(options){options=
options||{};var obj=options.obj;var pane=options.pane;if(obj&&obj.checked){pane=A.one(pane);if(pane)pane.hide()}},["aui-base"]);Liferay.provide(LayoutExporter,"details",function(options){options=options||{};var detail=A.one(options.detail);var img=A.one(options.toggle);if(detail&&img){var icon=LayoutExporter.icons.plus;if(detail.hasClass("hide")){detail.show();icon=LayoutExporter.icons.minus}else detail.hide();img.attr("src",icon)}},["aui-base"]);Liferay.provide(LayoutExporter,"proposeLayout",function(options){options=
options||{};var namespace=options.namespace;var reviewers=options.reviewers;var contents="\x3cdiv\x3e"+'\x3cform action\x3d"'+options.url+'" method\x3d"post"\x3e';if(reviewers.length>0){contents+='\x3ctextarea name\x3d"'+namespace+'description" style\x3d"height: 100px; width: 284px;"\x3e\x3c/textarea\x3e\x3cbr /\x3e\x3cbr /\x3e'+'Revisor'+' \x3cselect name\x3d"'+namespace+'reviewUserId"\x3e';for(var i=0;i<reviewers.length;i++)contents+='\x3coption value\x3d"'+reviewers[i].userId+
'"\x3e'+reviewers[i].fullName+"\x3c/option\x3e";contents+="\x3c/select\x3e\x3cbr /\x3e\x3cbr /\x3e"+'\x3cinput type\x3d"submit" value\x3d"'+'Continuar'+'" /\x3e'}else contents+='No\x20se\x20ha\x20encontrado\x20ningún\x20revisor\x2e'+"\x3cbr /\x3e"+'Por\x20favor\x2c\x20póngase\x20en\x20contacto\x20con\x20el\x20administrador\x20para\x20asignar\x20revisores\x2e'+"\x3cbr /\x3e\x3cbr /\x3e";contents+="\x3c/form\x3e"+"\x3c/div\x3e";Liferay.Util.openWindow({dialog:{destroyOnHide:true},title:contents})},["liferay-util-window"]);
Liferay.provide(LayoutExporter,"selected",function(options){options=options||{};var obj=options.obj;var pane=options.pane;if(obj&&obj.checked){pane=A.one(pane);if(pane)pane.show()}},["aui-base"]);Liferay.LayoutExporter=LayoutExporter})(AUI(),Liferay);
AUI.add("liferay-session",function(A){var Lang=A.Lang;var BUFFER_TIME=[];var CONFIG=A.config;var DOC=CONFIG.doc;var MAP_SESSION_STATE_EVENTS={active:"activated"};var SRC={};var SRC_EVENT_OBJ={src:SRC};var URL_BASE=themeDisplay.getPathMain()+"/portal/";var SessionBase=A.Component.create({ATTRS:{autoExtend:{value:false},redirectOnExpire:{value:true},redirectUrl:{value:""},sessionLength:{getter:"_getLengthInMillis",value:0},sessionState:{value:"active"},timestamp:{getter:"_getTimestamp",setter:"_setTimestamp",
value:0},warningLength:{getter:"_getLengthInMillis",setter:"_setWarningLength",value:0},warningTime:{getter:"_getWarningTime",value:0}},EXTENDS:A.Base,NAME:"liferaysession",prototype:{_afterSessionStateChange:function _afterSessionStateChange(event){var instance=this;var details=event.details;var newVal=event.newVal;var src=null;if("src"in event&&details.length)src=details[0];instance.fire(MAP_SESSION_STATE_EVENTS[newVal]||newVal,src)},_defActivatedFn:function _defActivatedFn(event){var instance=
this;instance.set("timestamp");if(event.src==SRC)Liferay.Util.fetch(URL_BASE+"extend_session")},_defExpiredFn:function _defExpiredFn(event){var instance=this;A.clearInterval(instance._intervalId);instance.set("timestamp","expired");if(event.src===SRC)instance._expireSession()},_expireSession:function _expireSession(){var instance=this;Liferay.Util.fetch(URL_BASE+"expire_session").then(function(response){if(response.ok){Liferay.fire("sessionExpired");if(instance.get("redirectOnExpire"))location.href=
instance.get("redirectUrl")}else A.setTimeout(function(){instance._expireSession()},1E3)})},_getLengthInMillis:function _getLengthInMillis(value){return value*1E3},_getTimestamp:function _getTimestamp(){var instance=this;return A.Cookie.get(instance._cookieKey,instance._cookieOptions)||instance._initTimestamp},_getWarningTime:function _getWarningTime(){var instance=this;return instance.get("sessionLength")-instance.get("warningLength")},_initEvents:function _initEvents(){var instance=this;instance.publish("activated",
{defaultFn:A.bind("_defActivatedFn",instance)});instance.publish("expired",{defaultFn:A.bind("_defExpiredFn",instance)});instance.publish("warned");instance._eventHandlers=[instance.on("sessionStateChange",instance._onSessionStateChange),instance.after("sessionStateChange",instance._afterSessionStateChange),A.on("io:complete",function(transactionId,response,args){if(!args||args&&args.sessionExtend||!Lang.isBoolean(args.sessionExtend))instance.resetInterval()}),Liferay.once("screenLoad",function(){instance.destroy()})]},
_onSessionStateChange:function _onSessionStateChange(event){var instance=this;var newVal=event.newVal;var prevVal=event.prevVal;if(prevVal=="expired"&&prevVal!=newVal)event.preventDefault();else if(prevVal=="active"&&prevVal==newVal)instance._afterSessionStateChange(event)},_setTimestamp:function _setTimestamp(value){var instance=this;value=String(value||Date.now());instance._initTimestamp=value;if(navigator.cookieEnabled)A.Cookie.set(instance._cookieKey,value,instance._cookieOptions)},_setWarningLength:function _setWarningLength(value){var instance=
this;return Math.min(instance.get("sessionLength"),value)},_startTimer:function _startTimer(){var instance=this;var sessionLength=instance.get("sessionLength");var sessionState=instance.get("sessionState");var warningTime=instance.get("warningTime");var registered=instance._registered;var interval=1E3;instance._intervalId=A.setInterval(function(){var timeOffset;var timestamp=instance.get("timestamp");var elapsed=sessionLength;if(Lang.toInt(timestamp)){timeOffset=Math.floor((Date.now()-timestamp)/
1E3)*1E3;elapsed=timeOffset;if(instance._initTimestamp!==timestamp){instance.set("timestamp",timestamp);if(sessionState!="active")instance.set("sessionState","active",SRC_EVENT_OBJ)}}else timestamp="expired";var extend=instance.get("autoExtend");var expirationMoment=false;var warningMoment=false;var hasExpired=elapsed>=sessionLength;var hasWarned=elapsed>=warningTime;if(hasWarned){if(timestamp=="expired"){expirationMoment=true;extend=false;hasExpired=true}if(hasExpired&&sessionState!="expired")if(extend){expirationMoment=
false;hasExpired=false;hasWarned=false;warningMoment=false;instance.extend()}else{instance.expire();expirationMoment=true}else if(hasWarned&&!hasExpired&&!extend&&sessionState!="warned"){instance.warn();warningMoment=true}}for(var i in registered)registered[i](elapsed,interval,hasWarned,hasExpired,warningMoment,expirationMoment)},interval)},_stopTimer:function _stopTimer(){var instance=this;A.clearInterval(instance._intervalId)},destructor:function destructor(){var instance=this;(new A.EventHandle(instance._eventHandlers)).detach();
instance._stopTimer()},expire:function expire(){var instance=this;instance.set("sessionState","expired",SRC_EVENT_OBJ)},extend:function extend(){var instance=this;instance.set("sessionState","active",SRC_EVENT_OBJ)},initializer:function initializer(){var instance=this;instance._cookieKey="LFR_SESSION_STATE_"+themeDisplay.getUserId();instance._cookieOptions={path:"/",secure:A.UA.secure};instance._registered={};instance.set("timestamp");instance._initEvents();instance._startTimer()},registerInterval:function registerInterval(fn){var instance=
this;var fnId;var registered=instance._registered;if(Lang.isFunction(fn)){fnId=A.stamp(fn);registered[fnId]=fn}return fnId},resetInterval:function resetInterval(){var instance=this;instance._stopTimer();instance._startTimer()},unregisterInterval:function unregisterInterval(fnId){var instance=this;var registered=instance._registered;if(Object.prototype.hasOwnProperty.call(registered,fnId))delete registered[fnId];return fnId},warn:function warn(){var instance=this;instance.set("sessionState","warned",
SRC_EVENT_OBJ)}}});SessionBase.SRC=SRC;var SessionDisplay=A.Component.create({ATTRS:{pageTitle:{value:DOC.title}},EXTENDS:A.Plugin.Base,NAME:"liferaysessiondisplay",NS:"display",prototype:{_afterDefActivatedFn:function _afterDefActivatedFn(){var instance=this;instance._uiSetActivated()},_afterDefExpiredFn:function _afterDefExpiredFn(){var instance=this;instance._host.unregisterInterval(instance._intervalId);instance._uiSetExpired()},_beforeHostWarned:function _beforeHostWarned(){var instance=this;
var host=instance._host;var sessionLength=host.get("sessionLength");var timestamp=host.get("timestamp");var warningLength=host.get("warningLength");var elapsed=sessionLength;if(Lang.toInt(timestamp))elapsed=Math.floor((Date.now()-timestamp)/1E3)*1E3;var remainingTime=sessionLength-elapsed;if(remainingTime>warningLength)remainingTime=warningLength;var banner=instance._getBanner();var counterTextNode=banner.one(".countdown-timer");instance._uiSetRemainingTime(remainingTime,counterTextNode);banner.show();
instance._intervalId=host.registerInterval(function(elapsed,interval,hasWarned,hasExpired,warningMoment){if(!hasWarned)instance._uiSetActivated();else if(!hasExpired){if(warningMoment){if(remainingTime<=0)remainingTime=warningLength;banner.show()}elapsed=Math.floor((Date.now()-timestamp)/1E3)*1E3;remainingTime=sessionLength-elapsed;instance._uiSetRemainingTime(remainingTime,counterTextNode)}remainingTime-=interval})},_destroyBanner:function _destroyBanner(){var instance=this;instance._banner=false;
var notificationContainer=A.one(".lfr-notification-container");if(notificationContainer)notificationContainer.remove()},_formatNumber:function _formatNumber(value){return Lang.String.padNumber(Math.floor(value),2)},_formatTime:function _formatTime(time){var instance=this;time=Number(time);if(Lang.isNumber(time)&&time>0){time/=1E3;BUFFER_TIME[0]=instance._formatNumber(time/3600);time%=3600;BUFFER_TIME[1]=instance._formatNumber(time/60);time%=60;BUFFER_TIME[2]=instance._formatNumber(time);time=BUFFER_TIME.join(":")}else time=
0;return time},_getBanner:function _getBanner(){var instance=this;var banner=instance._banner;if(!banner){banner=(new Liferay.Notification({closeable:true,delay:{hide:0,show:0},duration:500,message:instance._warningText,on:{click:function click(event){if(event.domEvent.target.test(".alert-link")){event.domEvent.preventDefault();instance._host.extend()}else if(event.domEvent.target.test(".close")){instance._destroyBanner();instance._alertClosed=true}}},title:'Advertencia',type:"warning"})).render("body");
instance._banner=banner}return banner},_onHostSessionStateChange:function _onHostSessionStateChange(event){var instance=this;if(event.newVal=="warned")instance._beforeHostWarned(event)},_uiSetActivated:function _uiSetActivated(){var instance=this;DOC.title=instance.reset("pageTitle").get("pageTitle");instance._host.unregisterInterval(instance._intervalId);var banner=instance._getBanner();if(banner)instance._destroyBanner()},_uiSetExpired:function _uiSetExpired(){var instance=this;var banner=instance._getBanner();
banner.setAttrs({message:instance._expiredText,title:'Peligro',type:"danger"});DOC.title=instance.get("pageTitle")},_uiSetRemainingTime:function _uiSetRemainingTime(remainingTime){var instance=this;remainingTime=instance._formatTime(remainingTime);if(!instance._alertClosed){var banner=instance._getBanner();banner.set("message",Lang.sub(instance._warningText,[remainingTime]))}DOC.title=Lang.sub('La\x20sesión\x20expira\x20en\x20\x7b0\x7d\x2e',[remainingTime])+" | "+instance.get("pageTitle")},
destructor:function destructor(){var instance=this;if(instance._banner)instance._destroyBanner()},initializer:function initializer(){var instance=this;var host=instance.get("host");if(Liferay.Util.getTop()==CONFIG.win){instance._host=host;instance._toggleText={hide:'Ocultar',show:'Mostrar'};instance._expiredText='La\x20sesión\x20expiró\x20por\x20inactividad\x2e\x20Guarde\x20los\x20datos\x20que\x20introdujo\x20antes\x20de\x20actualizar\x20la\x20página\x2e';instance._warningText='La\x20sesión\x20expirará\x20en\x20\x7b0\x7d\x20por\x20inactividad\x2e\x20Para\x20prolongar\x20la\x20sesión\x20otros\x20\x7b1\x7d\x20minuto\x28s\x29\x2c\x20presione\x20el\x20botón\x20\x3cem\x3eExtender\x3c\x2fem\x3e\x2e\x20\x7b2\x7d';
instance._warningText=Lang.sub(instance._warningText,['\x3cspan class\x3d"countdown-timer"\x3e{0}\x3c/span\x3e',host.get("sessionLength")/6E4,'\x3ca class\x3d"alert-link" href\x3d"#"\x3e'+'Extender'+"\x3c/a\x3e"]);host.on("sessionStateChange",instance._onHostSessionStateChange,instance);instance.afterHostMethod("_defActivatedFn",instance._afterDefActivatedFn);instance.afterHostMethod("_defExpiredFn",instance._afterDefExpiredFn)}else host.unplug(instance)}}});Liferay.SessionBase=
SessionBase;Liferay.SessionDisplay=SessionDisplay},"",{requires:["aui-timer","cookie","liferay-notification"]});
(function(A,Liferay){var Util=Liferay.namespace("Util");var Lang=A.Lang;var AArray=A.Array;var AObject=A.Object;var AString=A.Lang.String;var htmlEscapedValues=[];var htmlUnescapedValues=[];var MAP_HTML_CHARS_ESCAPED={'"':"\x26#034;","\x26":"\x26amp;","'":"\x26#039;","/":"\x26#047;","\x3c":"\x26lt;","\x3e":"\x26gt;","`":"\x26#096;"};var MAP_HTML_CHARS_UNESCAPED={};AObject.each(MAP_HTML_CHARS_ESCAPED,function(item,index){MAP_HTML_CHARS_UNESCAPED[item]=index;htmlEscapedValues.push(item);htmlUnescapedValues.push(index)});
var REGEX_DASH=/-([a-z])/gi;var STR_LEFT_SQUARE_BRACKET="[";var STR_RIGHT_SQUARE_BRACKET="]";var REGEX_HTML_ESCAPE=new RegExp(STR_LEFT_SQUARE_BRACKET+htmlUnescapedValues.join("")+STR_RIGHT_SQUARE_BRACKET,"g");var REGEX_HTML_UNESCAPE=new RegExp(htmlEscapedValues.join("|"),"gi");Util.MAP_HTML_CHARS_ESCAPED=MAP_HTML_CHARS_ESCAPED;Util.actsAsAspect=function(object){object["yield"]=null;object.rv={};object.before=function(method,f){var original=eval("this."+method);this[method]=function(){f.apply(this,
arguments);return original.apply(this,arguments)}};object.after=function(method,f){var original=eval("this."+method);this[method]=function(){this.rv[method]=original.apply(this,arguments);return f.apply(this,arguments)}};object.around=function(method,f){var original=eval("this."+method);this[method]=function(){this["yield"]=original;return f.apply(this,arguments)}}};Util.addInputFocus=function(){A.use("aui-base",function(A){var handleFocus=function handleFocus(event){var target=event.target;var tagName=
target.get("tagName");if(tagName)tagName=tagName.toLowerCase();var nodeType=target.get("type");if(tagName=="input"&&/text|password/.test(nodeType)||tagName=="textarea"){var action="addClass";if(/blur|focusout/.test(event.type))action="removeClass";target[action]("focus")}};A.on("focus",handleFocus,document);A.on("blur",handleFocus,document)});Util.addInputFocus=function(){}};Util.addInputType=function(el){Util.addInputType=Lang.emptyFn;if(Liferay.Browser.isIe()&&Liferay.Browser.getMajorVersion()<
7)Util.addInputType=function(el){if(el)el=A.one(el);else el=A.one(document.body);var defaultType="text";el.all("input").each(function(item){var type=item.get("type")||defaultType;item.addClass(type)})};return Util.addInputType(el)};Util.camelize=function(value,separator){var regex=REGEX_DASH;if(separator)regex=new RegExp(separator+"([a-z])","gi");value=value.replace(regex,function(match0,match1){return match1.toUpperCase()});return value};Util.clamp=function(value,min,max){return Math.min(Math.max(value,
min),max)};Util.escapeHTML=function(str,preventDoubleEscape,entities){var regex=REGEX_HTML_ESCAPE;var entitiesList=[];var entitiesValues;if(Lang.isObject(entities)){entitiesValues=[];AObject.each(entities,function(item,index){entitiesList.push(index);entitiesValues.push(item)});regex=new RegExp(STR_LEFT_SQUARE_BRACKET+AString.escapeRegEx(entitiesList.join(""))+STR_RIGHT_SQUARE_BRACKET,"g")}else{entities=MAP_HTML_CHARS_ESCAPED;entitiesValues=htmlEscapedValues}return str.replace(regex,A.bind("_escapeHTML",
Util,!!preventDoubleEscape,entities,entitiesValues))};Util.isEditorPresent=function(editorName){return Liferay.EDITORS&&Liferay.EDITORS[editorName]};Util.randomMinMax=function(min,max){return Math.round(Math.random()*(max-min))+min};Util.selectAndCopy=function(el){el.focus();el.select();if(document.all){var textRange=el.createTextRange();textRange.execCommand("copy")}};Util.setBox=function(oldBox,newBox){for(var i=oldBox.length-1;i>-1;i--)oldBox.options[i]=null;for(i=0;i<newBox.length;i++)oldBox.options[i]=
new Option(newBox[i].value,i);oldBox.options[0].selected=true};Util.startsWith=function(str,x){return str.indexOf(x)===0};Util.textareaTabs=function(event){var el=event.currentTarget.getDOM();if(event.isKey("TAB")){event.halt();var oldscroll=el.scrollTop;if(el.setSelectionRange){var caretPos=el.selectionStart+1;var elValue=el.value;el.value=elValue.substring(0,el.selectionStart)+"\t"+elValue.substring(el.selectionEnd,elValue.length);setTimeout(function(){el.focus();el.setSelectionRange(caretPos,caretPos)},
0)}else document.selection.createRange().text="\t";el.scrollTop=oldscroll;return false}};Util.uncamelize=function(value,separator){separator=separator||" ";value=value.replace(/([a-zA-Z][a-zA-Z])([A-Z])([a-z])/g,"$1"+separator+"$2$3");value=value.replace(/([a-z])([A-Z])/g,"$1"+separator+"$2");return value};Util.unescapeHTML=function(str,entities){var regex=REGEX_HTML_UNESCAPE;var entitiesMap=MAP_HTML_CHARS_UNESCAPED;if(entities){var entitiesValues=[];entitiesMap={};AObject.each(entities,function(item,
index){entitiesMap[item]=index;entitiesValues.push(item)});regex=new RegExp(entitiesValues.join("|"),"gi")}return str.replace(regex,A.bind("_unescapeHTML",Util,entitiesMap))};Util._escapeHTML=function(preventDoubleEscape,entities,entitiesValues,match){var result;if(preventDoubleEscape){var arrayArgs=AArray(arguments);var length=arrayArgs.length;var offset=arrayArgs[length-2];var string=arrayArgs[length-1];var nextSemicolonIndex=string.indexOf(";",offset);if(nextSemicolonIndex>=0){var entity=string.substring(offset,
nextSemicolonIndex+1);if(entitiesValues.indexOf(entity)>=0)result=match}}if(!result)result=entities[match];return result};Util._unescapeHTML=function(entities,match){return entities[match]};Liferay.provide(Util,"check",function(form,name,checked){var checkbox=A.one(form[name]);if(checkbox)checkbox.attr("checked",checked)},["aui-base"]);Liferay.provide(Util,"disableSelectBoxes",function(toggleBoxId,value,selectBoxId){var selectBox=A.one("#"+selectBoxId);var toggleBox=A.one("#"+toggleBoxId);if(selectBox&&
toggleBox){var dynamicValue=Lang.isFunction(value);var disabled=function disabled(){var currentValue=selectBox.val();var visible=value==currentValue;if(dynamicValue)visible=value(currentValue,value);toggleBox.attr("disabled",!visible)};disabled();selectBox.on("change",disabled)}},["aui-base"]);Liferay.provide(Util,"disableTextareaTabs",function(textarea){textarea=A.one(textarea);if(textarea&&textarea.attr("textareatabs")!="enabled"){textarea.attr("textareatabs","disabled");textarea.detach("keydown",
Util.textareaTabs)}},["aui-base"]);Liferay.provide(Util,"enableTextareaTabs",function(textarea){textarea=A.one(textarea);if(textarea&&textarea.attr("textareatabs")!="enabled"){textarea.attr("textareatabs","disabled");textarea.on("keydown",Util.textareaTabs)}},["aui-base"]);Liferay.provide(Util,"removeItem",function(box,value){box=A.one(box);var selectedIndex=box.get("selectedIndex");if(!value)box.all("option").item(selectedIndex).remove(true);else box.all("option[value\x3d"+value+STR_RIGHT_SQUARE_BRACKET).item(selectedIndex).remove(true)},
["aui-base"]);Liferay.provide(Util,"resizeTextarea",function(elString,usingRichEditor){var el=A.one("#"+elString);if(!el)el=A.one("textarea[name\x3d"+elString+STR_RIGHT_SQUARE_BRACKET);if(el){var pageBody=A.getBody();var diff;var resize=function resize(event){var pageBodyHeight=pageBody.get("winHeight");if(usingRichEditor)try{if(el.get("nodeName").toLowerCase()!="iframe")el=window[elString]}catch(e){}if(!diff){var buttonRow=pageBody.one(".button-holder");var templateEditor=pageBody.one(".lfr-template-editor");
if(buttonRow&&templateEditor){var region=templateEditor.getXY();diff=buttonRow.outerHeight(true)+region[1]+25}else diff=170}el=A.one(el);var styles={width:"98%"};if(event)styles.height=pageBodyHeight-diff;if(usingRichEditor)if(!el||!A.DOM.inDoc(el)){A.on("available",function(){el=A.one(window[elString]);if(el)el.setStyles(styles)},"#"+elString+"_cp");return}if(el)el.setStyles(styles)};resize();var dialog=Liferay.Util.getWindow();if(dialog){var resizeEventHandle=dialog.iframe.after("resizeiframe:heightChange",
resize);A.getWin().on("unload",resizeEventHandle.detach,resizeEventHandle)}}},["aui-base"]);Liferay.provide(Util,"setSelectedValue",function(col,value){var option=A.one(col).one("option[value\x3d"+value+STR_RIGHT_SQUARE_BRACKET);if(option)option.attr("selected",true)},["aui-base"]);Liferay.provide(Util,"switchEditor",function(options){var uri=options.uri;var windowName=Liferay.Util.getWindowName();var dialog=Liferay.Util.getWindow(windowName);if(dialog)dialog.iframe.set("uri",uri)},["aui-io"])})(AUI(),
Liferay);
