1window.currentMenu=null; 2var MENU_CONTAINER_DIV="menuDiv",MENU_LEFT_DIV="menuLeftDiv",MENU_RIGHT_DIV="menuRightDiv",MENU_BOTTOM_DIV="menuBottomDiv",MENU_TABLE_DIV="menuTableDiv",MENU_TABLE="menuInnerTable",MENU_DIVIDER="menuSeparator",MENU_ICON_ARROW="menuChildIcon",MENU_SPAN_CLASS="ddmSpan",MENU_SELECTED_CLASS="ddmTextOver",MENU_NOT_SELECTED_CLASS="ddmText",MENU_NOT_SELECTED_CLASS_HAS_CHILD="ddmTextHasChild",MENU_TEXT_SEPERATOR="ddmTextSeperator",MENU_TEXT_HEADING="ac_text_heading",MENU_DIV_CLASS="ddmDiv",ARROW_CLASS="ddmArrow", 3MENU_SEPERATOR="ddmSeperator",MENU_SEPERATOR_EMPTY="ddmSeperatorEmpty",MENU_ANCHOR="ddmAnchor",MENU_ANCHOR_DISABLED="ddmAnchorDisabled",MENU_INNER_TABLE="ddmInnerTable",BODY_SCROLL_DIV_CLASS="scrollarea",NAVMENUS="NAVMENUS",RECENTRECORDS="RECENTRECORDS",RECENTREPORTS="RECENTREPORTS",ROLEMENU="ROLEMENU",DROPDOWN_SELECTED_CLASS="dropdownSelected",DROPDOWN_NOT_SELECTED_CLASS="dropdownNotSelected",DROPDOWN_DIV_CLASS="dropdownDiv",DROPDOWN_INPUT_CLASS="dropdownInput textbox",DROPDOWN_ARROW_CLASS="uir-field-dropdown-arrow", 4DROPDOWN_INPUT_MAX_SIZE_PIXELS=300,PORTLET_DRAG_DROP_CLASS="portletlabelDragDrop",QUICKADD_DRAG_DROP_CLASS="quickaddDragDropIcon",PORTLET_HANDLE_CLASS="portletHandle",PORTLET_DRAG_DROP_BAR_CLASS="portletDragDropBar",AUTO_SUGGEST_UBER_CLASS="autosuggcell text",DROPDOWN_ARROW_DEFAULT="/images/forms/ddarrow.gif",DROPDOWN_ARROW_DISABLED="/images/forms/ddarrowDisabled.gif",DROPDOWN_ARROW_PRESS="/images/forms/ddarrowPress.gif",MULTIBUTTON_ARROW_DEFAULT="/images/forms/transarrowupstate.gif",MULTIBUTTON_ARROW_PRESS= 5"/images/forms/transarrowdownstate.gif",LEFT_ARROW_DEFAULT="/images/forms/larrow.gif",RIGHT_ARROW_DEFAULT="/images/forms/rarrow.gif",LEFT_ARROW_PRESS="/images/forms/larrow_down.gif",RIGHT_ARROW_PRESS="/images/forms/rarrow_down.gif",MOUSEOUTDELAY_TIME_MS=500,FRIENDLYDELAY_TIME_MS=250,MAX_SCROLLABLE_PORTLET_HEIGTH=325,MOUSE_UP_EVENT="mouseUPEvent",KC_TAB=9,KC_LEFT=37,KC_UP=38,KC_RIGHT=39,KC_DOWN=40,KC_ENTER=13,KC_SHIFT=16,KC_ESC=27,KC_SPACE=32;window.clickCount=0; 6document.onkeydown=function(a){handleHotKeys(a);NLPopupAutoSuggest_onKeyDown(a);return dropdownOnKeyDown(a)};document.onmousemove=function(a){autoSuggestOnMouseMove(a);quickaddDraggerOnMouseMove(a);isSuitePhone||(portletDraggerOnMouseMove(a),ddmOnMouseMove(a),dropdownOnMouseMove(a))};function documentOnClickHandler(a){++window.clickCount;isSuitePhone||(ddmOnClick(a),dropdownOnMouseClick(a));window.popup_onClickHandler&&window.popup_onClickHandler(a)}attachEventHandler("click",document,documentOnClickHandler); 7document.onmousedown=function(a){isSuitePhone||(quickaddDraggerOnMouseDown(a),portletDraggerOnMouseDown(a),dropdownOnMouseDown(a));NLPopupAutoSuggest_onMouseDown(a);if(window.divsToClose&&typeof window.divsToClose!="undefined"){for(a=0;a<window.divsToClose.length;a++)document.getElementById(window.divsToClose[a]).style.display="none";window.divsToClose=null}}; 8document.onmouseup=function(a){isSuitePhone||(quickaddDraggerOnMouseUp(),portletDraggerOnMouseUp(),dropdownOnMouseUp(a));window.NLCalendar_onMouseUp&&NLCalendar_onMouseUp(a);window.NLMachine_onMouseUp&&NLMachine_onMouseUp(a);window.OrderedListOnMouseUp!=null&&window.OrderedListOnMouseUp(a)};function addDivToClose(a){typeof window.divsToClose!="Array"&&(window.divsToClose=[]);window.divsToClose[window.divsToClose.length]=a} 9function handleHotKeys(a){if(getEventKeypress(a)==71&&getEventAltKey(a)){var b=NS.jQuery("#_searchstring");b!=null&&(a={key:getEventKeypress(a),alt:getEventAltKey(a),shift:getEventShiftKey(a)},b.trigger("focus",[{eventKeys:a}]),b.trigger("select"))}}function getMouseX(a){return getEvent(a).clientX}function getMouseY(a){return getEvent(a).clientY} 10function moveToolTip(a,b){var c=getToolTip(),d=parseInt(c.offsetWidth),e=document.body.clientWidth,f=getWindowPageXOffset();d=e-d;a-=9;a>d&&(a=d);a<0&&(a=0);c.style.left=f+a+"px";c.style.top=b+5+"px"} 11function showToolTip(a,b,c){if(!isValEmpty(a)||!isValEmpty(b)){if(NS.UI.Util.isRedwood){var d=['<div class="uir-legacy-tooltip">'];a&&(d.push('<div class="uir-legacy-tooltip-title">'),d.push(a),d.push("</div>"));b&&(d.push('<div class="uir-legacy-tooltip-content">'),d.push(b),d.push("</div>"));d.push("</div>");d=d.join("")}else d='<table border="0" width="250" cellspacing="0" cellpadding="0" bgcolor="#999999" role="presentation"><tr><td width="100%"><table border="0" width="100%" cellspacing="1" cellpadding="2" align="center" role="presentation">', 12isValEmpty(a)||(d+='<tr>
12<td width="100%" class="bglt"><font class="smalltextb">'+a+"</font></td></tr>"),isValEmpty(b)||(d+='<tr><td width="100%" bgcolor="#FFFFFF"><font class="smalltext">'+b+"</font></td></tr>"),d+="</table></td></tr></table>";var e=getToolTip();e.movetooltip=c||isValEmpty(e.tooltipcontent)||e.tooltipcontent!=d;e.tooltipcontent=d;e.hidetooltiptimer!=null&&clearTimeout(e.hidetooltiptimer);e.showtooltiptimer=setTimeout(function(){e.movetooltip&&moveToolTip(lastX+20,lastY);e.innerHTML= 13e.tooltipcontent;e.style.visibility="visible"},500)}}function stopToolTipHide(){var a=getToolTip();a.hidetooltiptimer!=null&&clearTimeout(a.hidetooltiptimer)}function hideToolTip(){var a=getToolTip();a.showtooltiptimer!=null&&clearTimeout(a.showtooltiptimer);a.tooltipcontent="";a.hidetooltiptimer=setTimeout(function(){a.tooltipcontent=null;a.style.visibility="hidden"},1E3)} 14function getToolTip(){var a=document.getElementById("NLToolTip");a==null&&(a=document.createElement("DIV"),a.id="NLToolTip",a.classList.add("uir-legacy-tooltip"),a.style.position="absolute",a.style.width="250px",a.style.top="0px",a.style.left="0px",a.style.zIndex=4,a.style.visibility="hidden",document.body.appendChild(a));return a} 15function netsuiteNextFieldPassEvent(a,b){a.style.pointerEvents="none";var c=document.elementFromPoint(b.clientX,b.clientY);if(c){let d=new MouseEvent(b.type,{bubbles:!0,cancelable:!0,clientX:b.clientX,clientY:b.clientY});c.dispatchEvent(d);b.type==="click"&&c.focus()}a.style.pointerEvents=""}window.menusAreOpen=!1;window.rolloverDelay=0;var m_multiButtons=[];function getNLMultiButtonByName(a){return m_multiButtons[a]} 16function NLMultiButton(a,b,c,d,e,f,g,h,k,l){l=l==="redwood";var m=[],n=[];k=k||"";this.sName=a;m_multiButtons[a]=this;this.sTaskId=d;this.sPrimaryButtonName=e;this.bSecondary=f;this.bYellowBg=g;this.bBlueBg=!!h;this.bEnabled=!0;for(d=e=0;d<b.length;d++)b[d][0]==c?this.nDefault=d:(m.push(b[d][0]),n[e]=[b[d][0],"javascript:NLMultiButton_doAction('"+a+"', '"+b[d][1]+"');return false;",""],e++);this.sParams=n;this.pValues=b;this.nButtons=b.length;b=g?"pgBntY":"pgBntG";h&&(b+=" pgBntB");b+=" "+k;k=h=""; 17a.includes("secondary")||(h='data-nsps-type="multibutton" data-nsps-label="'+c+'"',k='data-nsps-type="multibutton" data-nsps-label="'+c+'" data-nsps-childs="'+m.join(";")+'"');this.sHTML=l?'<div class="uir-multibutton" id="spn_'+a+'"><button aria-expanded="false" '+h+' id="btn_'+a+'" class="uir-multibutton-button '+(f?"uir-multibutton-button--default":"uir-multibutton-button--primary")+'" onBlur="NLMultiButton_clearMultiButtonMenus()" onKeyDown="return getNLMultiButtonByName(\''+a+"').onKeyPress(event);\" onClick=\"getNLMultiButtonByName('"+ 18a+'\').onMainButtonClick(this);return false;" onKeyPress="setEventCancelBubble(event);" >'+c+'</button><div id="child_'+a+'"class="uir-multibutton-arrow '+(f?"uir-multibutton-arrow--default":"uir-multibutton-arrow--primary")+'" onClick="getNLMultiButtonByName(\''+a+"').onDropDownClick(this, event);\" onMouseOver=\"NLMultiButton_onArrowMouseOver('"+a+"')\" onMouseOut=\"NLMultiButton_onArrowMouseOut('"+a+"')\" "+k+'><svg role="img" class="uir-multibutton-arrow-icon"><title>'+HEADING_MORE_OPTIONS+'</title><use href="/uiredwood/img/form/FormIcon.svg#DROPDOWN" /></svg></div></div>': 19'<table cellpadding=0 cellspacing=0 border=0 class="uir-multibutton" style="cursor:hand;margin-right:6px;" role="presentation"><tr class="'+b+'"><td><img src="/images/nav/ns_x.gif" class="bntLT" border=0 height="50%" width=3 alt=""><img src="/images/nav/ns_x.gif" class="bntLB" border=0 height="50%" width=3 alt=""></td><TD id="spn_'+a+'" nowrap class="bntBgB" valign="top" height=20><input aria-expanded="false" role="button" '+h+'onBlur="NLMultiButton_clearMultiButtonMenus();" onKeyDown="return getNLMultiButtonByName(\''+ 20a+"').onKeyPress(event);\" onClick=\"getNLMultiButtonByName('"+a+'\').onMainButtonClick(this);return false;" id="btn_'+a+'" type="submit" class="rndbuttoninpt bntBgT'+(f?"small":"")+'" style="vertical-align:middle;" value="'+c+"\" onKeyPress=\"setEventCancelBubble(event);\" onmousedown=\"this.setAttribute('_mousedown','T'); setButtonDown(true, "+(f?"true":"false")+", this);\" onmouseup=\"this.setAttribute('_mousedown','F'); setButtonDown(false, "+(f?"true":"false")+", this);\" onmouseout=\"if(this.getAttribute('_mousedown')=='T') setButtonDown(false, "+ 21(f?"true":"false")+", this);\" onmouseover=\"if(this.getAttribute('_mousedown')=='T') setButtonDown(true, "+(f?"true":"false")+', this);"></td><td id="child_'+a+'" nowrap '+k+' class="bntBgB multiBnt" onMouseOut="NLMultiButton_onArrowMouseOut(\''+a+"')\" onMouseOver=\"NLMultiButton_onArrowMouseOver('"+a+"')\" onClick=\"getNLMultiButtonByName('"+a+'\').onDropDownClick(this, event);"><div class="bntBgT"><div class="multiBntTri" alt="'+HEADING_MORE_OPTIONS+'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
21<path fill-rule="evenodd" d="M8 10h8v2l-4 3-4-3v-2z"/></svg></div></div></td><td><img src="/images/nav/ns_x.gif" height="50%" class="bntRT" border=0 width=3 alt=""><img src="/images/nav/ns_x.gif" height="50%" class="bntRB" border=0 width=3 alt=""></td></tr></table>'} 22NLMultiButton.prototype.toString=function(){return this.sHTML};NLMultiButton.prototype.render=function(){return NS.jQuery(this.sHTML)[0]};function NLMultiButton_clearMultiButtonMenus(){for(var a in menus)menus[a].tabName!=null&&menus[a].tabName.indexOf("mulitibutton")>=0&&menus[a].close()}NLMultiButton.prototype.onMainButtonClick=function(a){NLMultiButton_doAction(this.sName,this.pValues[this.nDefault][1])}; 23NLMultiButton.prototype.setState=function(a){this.bEnabled!=a&&(this.bEnabled=a,document.getElementById("btn_"+this.sName).disabled=!a)};function NLMultiButton_doAction(a,b){var c=document.forms.main_form;var d=c&&c.elements[b]!=null?c.elements[b]:document.getElementById(b);d.type=="submit"&&a&&(a=getNLMultiButtonByName(a),a.sTaskId&&a.sPrimaryButtonName&&a.pValues[a.nDefault][1]!=b&&(c.elements._multibtnstate_.value=a.sTaskId+":"+a.sPrimaryButtonName+":"+d.name));d.click()} 24function NLMultiButton_openMenu(a){clearAllMenusExcept(a);a=getNLMultiButtonByName(a);a.bEnabled&&(a=a.getMenu(),a.setOpenMenuUpwardIfNotBelow(!0),a.setAllowArbitraryHtmlInMenuEntries(!0),a.showHide(!0))}function NLMultiButton_onArrowMouseOut(a){clearTimeout(window.rolloverDelay)}function NLMultiButton_onArrowMouseOver(a){window.rolloverDelay=setTimeout("NLMultiButton_openMenu('"+a+"')",100)} 25NLMultiButton.prototype.onKeyPress=function(a){var b=getEventKeypress(a),c=this.getMenu();c.isOpen||b!=KC_DOWN||(c.open(null,!1),c.div.focus(),setTimeout(function(){c.setCurrentCellInMenu(c.getCellInMenuAt(0))},0),setEventPreventDefault(a));return!0};NLMultiButton.prototype.onDropDownClick=function(a,b){if(!this.bEnabled)return!0;setEventCancelBubble(b);this.getMenu().showHide(!0);return!1}; 26NLMultiButton.prototype.onMenuClose=function(){this.btnMain&&(this.btnMain.removeAttribute("aria-owns"),this.btnMain.setAttribute("aria-expanded","false"),this.btnMain.setAttribute("aria-haspopup","false"))}; 27NLMultiButton.prototype.onAfterMenuOpen=function(){for(var a=this.getMenu(),b=this.pValues,c=0,d=0;d<b.length;d++)if(d!=this.nDefault){var e=document.getElementById(b[c][1]);a.getCellInMenuAt(c).firstChild.className=e.disabled?MENU_ANCHOR_DISABLED:MENU_ANCHOR;c++}this.btnMain&&(this.btnMain.setAttribute("aria-expanded","true"),this.btnMain.setAttribute("aria-owns",a.div.id),this.btnMain.setAttribute("aria-haspopup","true"))}; 28function NLDoMainFormButtonAction(a,b){var c=getNLMultiButtonByName("multibutton_"+a);if(c)b&&document.forms.main_form.elements["btn_"+c.sName].focus(),c.onMainButtonClick();else if(a=document.forms.main_form.elements[a])b&&a.focus(),a.click()}function makeMenu(a,b,c,d){window.menuData==null&&(window.menuData={});window.menuLevel==null&&(window.menuLevel={});window.menuParent==null&&(window.menuParent={});window.menuData[a]=b;window.menuLevel[a]=c;window.menuParent[a]=d} 29function ddmOnMouseMove(a){if(window.currentMenu!=null)return window.currentMenu.handleMouseMove(a)}function ddmOnClick(a){a=getEventTarget(a);findClassUp(a,MENU_SPAN_CLASS)==null&&findClassUp(a,MENU_CONTAINER_DIV)==null&&clearAllMenusExcept("ALL_MENUS_PLEASE")}var zoomPercent=["75","90","","125","150"],iZoomDefault=2,iZoomIndex=iZoomDefault;function getZoomFile(a){var b=a.lastIndexOf(".");return a.substr(0,b)+zoomPercent[iZoomIndex]+a.substr(b)} 30function setMenuZoomFactor(a){a!=void 0&&(iZoomIndex=a<.9?0:a<1?1:a>1.25?4:a>1?3:2)}var tdCounter=0,NLMENU_STYLE_PAGE=1,NLMENU_STYLE_ACTION=2,NLMENU_STYLE_PORTLET=3,NLMENU_STYLE_CUSTOMIZE=4; 31function NLMenu(a,b,c,d,e,f){this.tabName=a.substring(0,a.indexOf("_"));this.currentCell=this.tableDiv=this.div=null;this.isOpen=!1;this.level=c;this.parentMenu=d;this.name=a;this.values=b;this.span=document.getElementById("spn_"+this.name);this.overrideX=0;this.rightjustify=!1;this.overrideY=0;this.onOpenAction=this.onCloseAction=null;this.bHasImageTd=!1;this.sHelperText=null;this.nMenuStyle=e?e:NLMENU_STYLE_PAGE;this.onHandleKeyDown=f||function(){return!0}} 32var menus={},menuTimers={},friendlyDelay=0;function resetNavMenuTimer(a){clearTimeout(menuTimers[a])}function startTimer(a){menuTimers[a]=setTimeout(function(){clearAllMenus(-100,a)},MOUSEOUTDELAY_TIME_MS)}function clearAllMenus(a,b){clearTimeout(friendlyDelay);for(var c in menus)menus[c].tabName==b&&menus[c].level>a&&menus[c].close()} 33function clearAllMenusExcept(a){for(var b in menus)if(menus[b].tabName!=a){var c=document.getElementById(menus[b].tabName+"_nav_arrow");c!=null&&(c.className="menu_tri");menus[b].close()}}var lastMenuRequested=null,lastMenuRequestedParent=null;function getAndOpenMenu(a,b,c){lastMenuRequestedParent=b;if(a=getMenu(a))lastMenuRequestedParent=null,a.open(b,c)}NLMenu.prototype.setXandYoverride=function(a,b){this.overrideX=a;this.overrideY=b}; 34NLMenu.prototype.setHelperText=function(a){this.sHelperText=a};NLMenu.prototype.setCloseAction=function(a){this.onCloseAction=new Function(a)};NLMenu.prototype.setOpenAction=function(a){this.onOpenAction=new Function(a)};NLMenu.prototype.setAfterOpenAction=function(a){this.onAfterOpen=new Function(a)};NLMenu.prototype.setRightJustify=function(a){this.rightjustify=a};NLMenu.prototype.setScaleToLauncher=function(a){this.scaletolauncher=a};
35NLMenu.prototype.setMenuBackgroundColor=function(a){this.sMenuBackgroundColor=a};NLMenu.prototype.setMenuCSSClass=function(a){this.sOverrideClass=a};NLMenu.prototype.setAllowArbitraryHtmlInMenuEntries=function(a){this.bUseSpanForMenuEntry=a};NLMenu.prototype.setOpenMenuUpwardIfNotBelow=function(a){this.bOpenMenuUpwardsIfNotBelow=a}; 36function NLMenu_addHelperTextRows(a,b,c){var d=document.createElement("TR"),e=document.createElement("TD");a.appendChild(d);d.appendChild(e);e.className="text";e.innerHTML=b;c&&(e.colSpan=2)} 37NLMenu.prototype.positionActionDiv=function(a,b){if(a&&b){var c=!0;this.span&&this.span.id&&this.span.id.indexOf("secondary")>0&&(c=!1);var d=getWindowPageYOffset();findAbsolutePosY(a)-d+a.offsetHeight+b.offsetHeight>getVisibleWindowHeight()&&!c?(b.style.top="auto",b.style.bottom=getHeight(this.span)-5+"px",a.classList.add("ac_container_bot")):(b.style.top="-1px",b.style.bottom="auto",this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?a.className+="_hover":a.classList.add("ac_container"))}}; 38NLMenu.prototype.openActionMenu=function(a,b){if(this.isOpen!=1&&!(this.level>0&&typeof a!="undefined"&&document.getElementById(a)==null)){this.span||(this.span=document.getElementById("spn_"+this.name));clearTimeout(friendlyDelay);if(this.onOpenAction!=null)this.onOpenAction();this.div=document.getElementById("div_"+this.name);if(this.div.firstChild)this.nMenuStyle!=NLMENU_STYLE_ACTION&&this.nMenuStyle!=NLMENU_STYLE_CUSTOMIZE||this.positionActionDiv(this.span,this.div),this.div.style.visibility= 39"visible",this.level==0&&(window.menusAreOpen=!0),this.div.style.zIndex=50;else{this.div.onmouseover=new Function("resetNavMenuTimer('"+this.tabName+"');");b&&(this.div.onmouseout=new Function("startTimer('"+this.tabName+"');"));b=document.createElement("table");b.setAttribute("role","presentation");b.cellSpacing=0;b.cellPadding=0;b.border=0;var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td"),f=document.createElement("img");f.border=0;f.alt="";f.src= 40"/images/nav/ns_x.gif";f.style.height="4px";f.style.width="1px";f.style.display="block";a=document.createElement("table");a.setAttribute("role","presentation");a.className="ac_table";this.div.appendChild(b);b.appendChild(c);c.appendChild(d);d.appendChild(e);e.appendChild(a);e=document.createElement("td");e.className="acSideShadow";e.appendChild(f);d.appendChild(e);f=document.createElement("img");f.alt="";f.border=0;f.src="/images/nav/ns_x.gif";f.style.height="4px";f.style.width="1px";f.style.display= 41"block";d=document.createElement("tr");c.appendChild(d);e=document.createElement("td");e.className="acLBotShadow";d.appendChild(e);e.appendChild(f);e=document.createElement("td");e.className="acRBotShadow";d.appendChild(e);e.appendChild(f);b=document.createElement("tbody");a.appendChild(b);a.cellSpacing=2;a.cellPadding=0;for(c=0;c<this.values.length;c++){var g=this.values[c][0];var h=this.values[c][1];var k=this.values[c][3];var l=this.values[c][4];var m=this.values[c][5]||!1;this.bHasImageTd=k!= 42null&&k.length>0?!0:!1;var n=g==MENU_SEPERATOR,p=h==ADMI_HEADING;d=document.createElement("tr");b.appendChild(d);e=document.createElement("td");e.id="nl"+ ++tdCounter;f=document.createElement("a");f.className=m?MENU_ANCHOR_DISABLED:MENU_ANCHOR;this.nMenuStyle!=NLMENU_STYLE_CUSTOMIZE&&(f.onclick=new Function("return false;"));e.className=p?"ac_text_heading":"ac_text";e.onmouseover=new Function("clearTimeout(friendlyDelay); clearAllMenus("+this.level+", '"+this.tabName+"');");h.length>0&&!n&&!p&&(m= 43h=this.values[c][1],f.href=h,this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?f.href=m:(m=this.values[c][4],h.substring(0,h.indexOf(":")).toLowerCase()=="javascript"?(h=h.substring(h.indexOf(":")+1),h.charAt(0)=="/"&&(f.href=h,h=f.onclick="",f.style.display="block")):h="try { "+(m?"window.open(":"window.location = ")+"'"+h+"'"+(m?")":"")+"; } catch (e) { if(console) console.log(e.message); }",e.onclick=new Function("clearAllMenusExcept('clear all'); "+h)));h=document.createElement("span");h.className=l&&l.length> 440?l:"ac_text_pad";h.innerHTML=g;n?n&&(e=document.createElement("tr"),b.appendChild(e),d=document.createElement("td"),e.appendChild(d),d.style.height="4px",e=document.createElement("div"),e.className="ac_separator",d.appendChild(e),d=document.createElement("img"),d.alt="",d.src="/images/nav/stretch.gif",d.style.height="3px",e.appendChild(d)):(e.appendChild(f),this.bHasImageTd&&(k.
44charAt(0)=="<"?f.innerHTML=k:(g=document.createElement("img"),g.border=0,g.src=k,g.height=14,g.width=18,f.appendChild(g), 45g.style.verticalAlign="bottom")),p&&(h.className="ac_heading_pad",f.style.fontWeight="bold",f.style.color="#666666"),f.appendChild(h),d.appendChild(e))}if(this.nMenuStyle==NLMENU_STYLE_ACTION||this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE)b=parseInt(getRuntimeStyle(a,"width")),a.style.width=b<120?"130px":b+30+"px";isIE&&(this.nMenuStyle==NLMENU_STYLE_PORTLET?(this.div.style.left="-16px",this.div.style.top=0):this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE&&(this.div.style.top="3px"));this.level==0&&(window.menusAreOpen= 46!0);this.div.style.zIndex=50;this.nMenuStyle!=NLMENU_STYLE_ACTION&&this.nMenuStyle!=NLMENU_STYLE_CUSTOMIZE||this.positionActionDiv(this.span,this.div)}this.isOpen=!0;if(this.onAfterOpen)this.onAfterOpen()}}; 47NLMenu.prototype.open=function(a,b){if(this.isOpen!=1&&!(this.level>0&&typeof a!="undefined"&&document.getElementById(a)==null)){this.span||(this.span=document.getElementById("spn_"+this.name));clearTimeout(friendlyDelay);if(this.onOpenAction!=null)this.onOpenAction();var c=!1;this.level>0&&(c=!0,clearAllMenus(this.level-1,this.tabName));if(!document.getElementById("div_"+this.name)){this.div=document.createElement("div");this.div.setAttribute("tabindex","0");this.div.classList.add("uir-menu");var d= 48this;this.div.onkeydown=function(z){d.handleKeyDown(z)};if(this.sOverrideClass)this.div.classList.add(this.sOverrideClass);else{this.div.classList.add(MENU_CONTAINER_DIV);var e=document.createElement("div");e.className=MENU_LEFT_DIV;c&&(e.style.background="",e.style.paddingLeft=0);var f=document.createElement("div");f.className=MENU_RIGHT_DIV;var g=document.createElement("div");g.className=MENU_BOTTOM_DIV;var h=document.createElement("div");h.className=MENU_TABLE_DIV;this.tableDiv=h;e.appendChild(f); 49f.appendChild(g);g.appendChild(h);this.div.appendChild(e)}this.div.id="div_"+this.name;this.div.onmouseover=new Function("resetNavMenuTimer('"+this.tabName+"');");this.div.setAttribute("role","menu");b&&(this.div.onmouseout=new Function("startTimer('"+this.tabName+"');"));e=document.createElement("table");e.className=MENU_TABLE;e.setAttribute("role","presentation");this.tableDiv?this.tableDiv.appendChild(e):this.div.appendChild(e);var k=document.createElement("tbody");e.appendChild(k);e.cellSpacing= 501;e.cellPadding=4;this.sMenuBackgroundColor&&(e.style.backgroundColor=this.sMenuBackgroundColor);f=[];g=0;var l,m=h=!1;for(l=0;l<this.values.length;l++){var n=this.values[l][0];var p=this.values[l][1];var x=this.values[l][2];var v=this.values[l][3];x.length>0&&(h=!0);v!=null&&v.length>0&&(this.bHasImageTd=!0);var r=n==MENU_SEPERATOR,t=p==ADMI_HEADING;t&&(m=!0);var y=document.createElement("tr");k.appendChild(y);var w=document.createElement("td");m&&!t&&(w.style.paddingLeft="20px");w.id="nl"+ ++tdCounter; 51w.setAttribute("role","menuitem");var q=document.createElement("a");q.className=MENU_ANCHOR;q.onclick=new Function("return false;");x.length>0?(w.className=MENU_NOT_SELECTED_CLASS_HAS_CHILD,w.onmouseover=new Function("clearTimeout(friendlyDelay); var timeout = "+(this.level==0?FRIENDLYDELAY_TIME_MS:0)+"; friendlyDelay = setTimeout(\"getAndOpenMenu('"+x+"','"+w.id+"',"+(b?"true":"false")+')",timeout)')):(w.className=MENU_NOT_SELECTED_CLASS,w.onmouseover=new Function("clearTimeout(friendlyDelay); clearAllMenus("+ 52this.level+", '"+this.tabName+"');"));if(p.length>0&&!r&&!t){p=this.values[l][1];q.href=p;var u=this.values[l][4];p=p.substring(0,p.indexOf(":")).toLowerCase()=="javascript"?p.substring(p.indexOf(":")+1):"try { "+(u?"window.open(":"window.location = ")+"'"+p+"'"+(u?")":"")+"; } catch (e) { if(console) console.log(e.message); }";w.onclick=new Function("clearAllMenusExcept('clear all'); "+p)}u=null;this.bUseSpanForMenuEntry?(u=document.createElement("span"),u.innerHTML=n):u=document.createTextNode(n); 53(p==null||p.length<1)&&x.length>0&&(e.style.width="165px",f[g]=document.createElement("span"),f[g].className=MENU_ICON_ARROW,f[g].id=this.tabName+"_arrow_"+l,w.appendChild(f[g]),g++,q.style.paddingRight="10px");r||(w.appendChild(q),this.bHasImageTd&&(v.charAt(0)=="<"?q.innerHTML=v:(n=document.createElement("img"),n.border=0,n.src=v,n.height=14,n.width=18,n.style.marginRight="5px",q.appendChild(n))),q.appendChild(u),t&&(q.style.fontWeight="bold",q.style.color="#666666"),y.appendChild(w));if(r||t)w= 54document.createElement("tr"),k.appendChild(w),y=document.createElement("td"),y.style.padding="0",y.style.margin="0",w.appendChild(y),y.style.height="3px",this.bHasImageTd&&(y.colSpan=2),w=document.createElement("div"),w.className=MENU_DIVIDER,y.appendChild(w);this.sHelperText!=null&&l==this.values.length-1&&NLMenu_addHelperTextRows(k,this.sHelperText,this.bHasImageTd)}k=0;b=l=this.span;document.body.appendChild(this.div);c&&(l=this.div,a!=null&&(b=document.getElementById(a)),this.level>0&&(a=getMenu(this.tabName+ 55"_d1"),a!=null&&a.isOpen&&a.div!=null&&(k+=a.div.offsetWidth+a.div.offsetLeft)),this.level>1&&this.parentMenu!=null&&(a=getMenu(this.parentMenu),a!=null&&a.isOpen&&a.div!=null&&(k+=a.div.offsetWidth)),k-=this.level*4);a=parseInt(getRuntimeStyle(e,"width"));g>0&&h&&(e.style.width=a+5+"px");l=h=l?l.getBoundingClientRect().left:event.x;m=document.body.scrollLeft;isIPHONE&&(m=getWindowPageXOffset());this.rightjustify&&(h+=this.span.offsetWidth-this.div.offsetWidth);h=c?k+1:h-10;this.rightjustify&&h<l? 56this.div.style.left=l+"px":h+this.div.offsetWidth<getDocumentWidth()+m?this.div.style.left=h+this.overrideX+"px":(k=h+this.div.offsetWidth-(getDocumentWidth()+m),this.div.style.left=h-k+"px");k=findClassUp(this.span,BODY_SCROLL_DIV_CLASS);h=0;k!=null&&(h=k.scrollTop);k=b?findAbsolutePosY(b):event.y;b&&(l=getWindowPageYOffset(),k=k+b.offsetHeight+this.div.offsetHeight>getDocumentHeight()+h+l?this.bOpenMenuUpwardsIfNotBelow?findAbsolutePosY(b)-this.div.offsetHeight+3:getDocumentHeight()-this.div.offsetHeight+ 575+h+l:k+b.offsetHeight);c&&(k-=isSAFARI?28:isMAC?21:22);k=k+5+this.overrideY-h;this.div.offsetHeight>getDocumentClientHeight()-20&&(k=5);this.div.style.top=k+"px";this.level==0&&(window.menusAreOpen=!0);this.div.style.zIndex=1500;c=isIE?3:2;h=isIE?19:17;if(g>0&&this.level==0)for(g=0;g<f.length;g++)f[g].style.left=a-h+"px",isSAFARI||(f[g].style.top=f[g].offsetTop-c+"px");this.scaletolauncher&&this.div.offsetWidth<this.span.offsetWidth&&(this.div.style.width=this.span.offsetWidth+"px",e.style.width= 58"100%");this.isOpen=!0;if(this.onAfterOpen)this.onAfterOpen()}}}; 59NLMenu.prototype.handleKeyDown=function(a){var b=getEventKeypress(a),c=this.values.length-1,d=this.getCellIndex(this.getCurrentCellInMenu());switch(b){case KC_DOWN:var e=Math.min(d+1,c);this.onHandleKeyDown({maxIndex:c,currentIndex:d,newIndex:e,keyCode:b})&&e!==d&&this.setCurrentCellInMenu(this.getCellInMenuAt(e));setEventPreventDefault(a);break;case KC_UP:e=Math.max(d-1,0);this.onHandleKeyDown({maxIndex:c,currentIndex:d,newIndex:e,keyCode:b})&&e!==d&&this.setCurrentCellInMenu(this.getCellInMenuAt(e)); 60setEventPreventDefault(a);break;case KC_ESC:this.onHandleKeyDown({keyCode:b})&&this.close();setEventPreventDefault(a);break;case KC_ENTER:if(this.onHandleKeyDown({currentIndex:d,keyCode:b})&&(b=this.getCurrentCellInMenu()))b.onclick();setEventPreventDefault(a)}};
60NLMenu.prototype.getCellIndex=function(a){if(a){var b=a.parentElement;if(b&&(b=b.parentElement)){for(var c=0;c<this.values.length&&b.children[c].children[0]!=a;c++);return c}}return 0}; 61NLMenu.prototype.close=function(){if(this.isOpen)if(this.level==0&&(window.menusAreOpen=!1),this.nMenuStyle==NLMENU_STYLE_ACTION||this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE)this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?this.span.className=this.span.className.replace("_hover",""):this.span.classList.remove("ac_container"),this.div.style.visibility="hidden",this.isOpen=!1,this.currentCell!=null&&this.currentCell.className!=MENU_TEXT_SEPERATOR&&this.currentCell.className!=MENU_TEXT_HEADING&&(this.currentCell.className= 62"ac_text");else if(this.nMenuStyle==NLMENU_STYLE_PORTLET?(this.div.style.visibility="hidden",this.isOpen=!1,this.currentCell!=null&&this.currentCell.className!=MENU_TEXT_SEPERATOR&&this.currentCell.className!=MENU_TEXT_HEADING&&(this.currentCell.className="ac_text")):(document.body.removeChild(this.div),this.div=this.currentCell=null,this.isOpen=!1),this.onCloseAction!=null)this.onCloseAction()};NLMenu.prototype.getCellInMenuAt=function(a){return this.div.firstChild.rows[a].cells[0]}; 63NLMenu.prototype.getCurrentCellInMenu=function(){return this.currentCell}; 64NLMenu.prototype.setCurrentCellInMenu=function(a){this.isOpen&&(this.currentCell!=null&&this.currentCell.className!=MENU_TEXT_SEPERATOR&&this.currentCell.className!=MENU_TEXT_HEADING&&(this.currentCell.className=this.nMenuStyle==NLMENU_STYLE_ACTION||this.nMenuStyle==NLMENU_STYLE_PORTLET||this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?"ac_text":MENU_NOT_SELECTED_CLASS),a!=null&&a.className!=MENU_TEXT_SEPERATOR&&a.className!=MENU_TEXT_HEADING&&(a.className=this.nMenuStyle==NLMENU_STYLE_ACTION||this.nMenuStyle== 65NLMENU_STYLE_PORTLET||this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?"ac_text_sel":MENU_SELECTED_CLASS),this.currentCell=a==null?this.div.firstChild.rows[0].cells[0]:a,this.div.setAttribute("aria-activedescendant",a.id))};NLMenu.prototype.getIndex=function(a){for(var b=0;b<this.values.length;b+=2)if(this.values[b]==a)return b/2;return 0}; 66NLMenu.prototype.showHide=function(a){clearAllMenusExcept(this.tabName);this.becomeCurrent();this.nMenuStyle==NLMENU_STYLE_ACTION||this.nMenuStyle==NLMENU_STYLE_PORTLET||this.nMenuStyle==NLMENU_STYLE_CUSTOMIZE?this.openActionMenu(null,a):this.open(null,a);return!0}; 67NLMenu.prototype.handleMouseMove=function(a){if(this.isOpen)for(a=getEventTarget(a);a!=null;){if(a.className!=null&&(a.className==MENU_NOT_SELECTED_CLASS||a.className==MENU_NOT_SELECTED_CLASS_HAS_CHILD||a.className==MENU_TEXT_SEPERATOR||a.className==MENU_TEXT_HEADING||a.className=="ac_text")){this.setCurrentCellInMenu(a);break}a=a.parentNode}};NLMenu.prototype.becomeCurrent=function(){window.currentMenu!=this&&(window.currentMenu=this)}; 68function loadDelayedNMD(a,b){lastMenuRequested=b;var c=document.createElement("script");c.setAttribute("type","text/javascript");b.indexOf("_recentreports")>0?(a=b.indexOf("neg")==1?"-":"",b=b.substring(a=="-"?4:1,b.indexOf("_")),b="/core/elements/compound/NLRecentReports.nl?t="+getStickyTag(RECENTREPORTS)+"§ions="+a+b,a="nmdscriptcneg9_recentreports"):(b="/app/center/NLNavMenuData.nl?t="+getStickyTag(NAVMENUS)+"§ions="+a,a="nmdscript"+a);c.setAttribute("src",b);c.setAttribute("id",a);document.getElementsByTagName("head")[0].appendChild(c); 69return!0}function getMenu(a,b){var c=menus[a];if(c==null){if(!menuDataExists(a))return loadDelayedNMD(a,a),null;c=new NLMenu(a,window.menuData[a],window.menuLevel[a],window.menuParent[a],b);menus[a]=c;c.level==0&&(menuTimers[c.tabName]=0)}return c}function menuDataExists(a){return!(window.menuData==null||window.menuData[a]==null||window.menuData[a].length<1)}function deleteMenu(a){menus[a]!=null&&(menus[a]=null)} 70function setNLMenuBackground(a,b){var c=document.getElementById(a);if(c!=null){a=c.parentNode;var d=c.parentNode.previousSibling;c=c.parentNode.nextSibling;b?(a.className=a.className.replace("bgofftab","bghovertab"),d&&d.className&&(d.className=d.className.replace("bgofftab","bghovertab"),d.className=d.className.replace("bgtabrborder","bgtabrborder_s")),c&&c.className&&(c.className=c.className.replace("bgtabrborder","bgtabrborder_s"))):(a.className=a.className.replace("bghovertab","bgofftab"),d&& 71d.className&&(d.className=d.className.replace("bghovertab","bgofftab"),d.className=d.className.replace("bgtabrborder_s","bgtabrborder")),c&&c.className&&(c.className=c.className.replace("bgtabrborder_s","bgtabrborder")))}}
71function setPortletMenuBackground(a,b){a=document.getElementById(a);a!=null&&(a.firstChild.className=b?a.firstChild.className.replace("portletIconMenu","portletIconMenuSel"):a.firstChild.className.replace("portletIconMenuSel","portletIconMenu"))} 72var currentDropdown=null,dropdownCounter=0;window.dropdownloadtime=0; 73function initializeDropdown(a){var b=new Date,c=a.data("name"),d=a.data("options"),e=a.data("favorites"),f=a.data("favorites-enabled")=="T",g=a.data("default-option"),h=a.data("settings"),k=a.data("machine-name"),l=["",""],m="",n=["","",""];dropdownCounter++;var p=c+"_"+dropdownCounter;var x="inpt_"+p;var v=a.parent();v.find(".dropdownInput").attr("id",x);v.find(".nldropdown").attr("id","hddn_"+p);v.find(".nldropdown-idx").attr("id","indx_"+p);v.find(".uir-field-dropdown-arrow").attr("data-input-id", 74x);if(d.length>0){l=[];for(x=0;x<d.length;x++){v=d[x];var r=unEscapeWhenHtml(v.text);l.push(r);l.push(v.value);!NS.UI.Util.isNetsuiteNext&&r.length>=n[0].length&&(n[0]=r,n.sort(function(t,y){return t.length==y.length?0:t.length>y.length?1:-1}))}NS.UI.Util.isNetsuiteNext||(m=getLongestRenderedString(n))}c=new NLDropdown(c,p,l,g,e,a.get(0).ownerDocument,h.flags,h.width,h.minWidth,m,f,k);h.mandatory&&c.setRequired(!0);a.attr("data-initialized","T");window.dropdownloadtime+=(new Date).getTime()-b.getTime(); 75return c}function getLongestRenderedString(a){for(var b=0,c="",d=0;d<a.length;d++){var e=getTextWidth(a[d]);e>b&&(b=e,c=a[d])}return c} 76function initializeMultiDropdown(a){var b=a.data("name"),c=a.data("options"),d=a.data("selected"),e=a.data("settings"),f=a.data("displaySize"),g=a.next("input"),h=["",""],k=[];dropdownCounter++;var l=b+"_"+dropdownCounter;f=NS.UI.Util.isRedwood?f:e.width;g.attr("id","hddn_"+l).attr("nlmultidropdown",l);if(c.length>0)for(h=[],g=0;g<c.length;g++){var m=c[g];h.push(unEscapeWhenHtml(m.text));h.push(m.value)}for(g=0;g<d.length;g++)k.push(c[d[g]].value);c=k.join(String.fromCharCode(5));b=new NLMultiDropdown(b, 77l,h,c,e.flags,f,e.height,a.get(0).ownerDocument);e.mandatory&&b.setRequired(!0);a.attr("data-initialized","T");return b}function initializeDropdowns(a){a.find(".ns-dropdown[data-initialized='F']").each(function(){initializeDropdown(NS.jQuery(this))});a.find(".ns-multi-dropdown[data-initialized='F'][data-lazy='F']").each(function(){initializeMultiDropdown(NS.jQuery(this))})} 78function dropdownOnMouseClick(a){if(!window.loadcomplete||!NS.form.isValid())return!0;var b=getEventTarget(a),c=isNLMultiDropDown(b),d=null,e=b&&b.nodeType===Node.ELEMENT_NODE?b.closest("."+DROPDOWN_ARROW_CLASS):null;e&&(d=document.getElementById(e.getAttribute("data-input-id")));d==null&&(d=findClassUp(b,DROPDOWN_INPUT_CLASS));d==null||c||getDropdown(d).handleMouseClick(a)} 79function dropdownOnMouseDown(a){if(!window.loadcomplete||!NS.form.isValid())return!0;var b=getEventTarget(a);if(isNLMultiDropDown(b)){var c=b.getAttribute("nlmultidropdown");getMultiDropdownFromNameC(c).handleMouseDown(a)}var d=null;c=!1;var e=b&&b.nodeType===Node.ELEMENT_NODE?b.closest("."+DROPDOWN_ARROW_CLASS):null;e&&(d=document.getElementById(e.getAttribute("data-input-id")),c=!0);d==null&&(d=findClassUp(b,DROPDOWN_INPUT_CLASS));if(d!=null)return c&&(setTimeout(function(){getDropdown(d).inpt.focus(); 80getDropdown(d).inpt.select()},1),getDropdown(d).inpt.focus()),getDropdown(d).handleMouseDown(a)}var currentMultiDropdown=null; 81function dropdownOnMouseUp(a){a=getEventTarget(a);if(a.tagName==null||a.tagName.toLowerCase()!=(isIE10?"html":"scrollbar"))currentMultiDropdown!=null&¤tMultiDropdown.onMouseMoveIdx!=-1?(currentMultiDropdown.onMouseMoveIdx=-1,currentMultiDropdown=null):currentDropdown!=null&&(currentDropdown&¤tDropdown.justOpenedByMouse?currentDropdown.justOpenedByMouse=!1:findClassUp(a,DROPDOWN_INPUT_CLASS)==null&&a.className!=DROPDOWN_DIV_CLASS&¤tDropdown&&(a=findClassUp(a,DROPDOWN_NOT_SELECTED_CLASS), 82a!=null&¤tDropdown.setAndClose(a.nlrow),currentDropdown&¤tDropdown.close({reason:MOUSE_UP_EVENT}),currentDropdown=null))}var lastX=0,lastY=0;function dropdownOnMouseMove(a){isIE&&(a=event);var b=a.pageY||a.clientY+getWindowPageYOffset();if(a.clientX!=lastX||b!=lastY)lastX=a.clientX,lastY=b,currentMultiDropdown!=null&¤tMultiDropdown.handleMouseMove(a)} 83function dropdownOnKeyDown(a){var b=getEventTarget(a);return isNLMultiDropDown(b)?(b=b.getAttribute("nlmultidropdown"),getMultiDropdownFromNameC(b).handleKeydown(a)):!0}function getButtonId(a){return isIE?event.button:isNS?a.button:null}
83NLDropdown.prototype.handleOnFocus=function(a){if(this.hddn.onfocus)this.hddn.onfocus(a);this.inpt.select();this.doOnChangeWhenBlur=!1}; 84NLDropdown.prototype.handleOnBlur=function(a){if(this.hddn.onblur)this.hddn.onblur(a);this.doOnChangeWhenBlur&&this.hddn.onchange&&(this.doOnChangeWhenBlur=!1,this.hddn.onchange()===!1&&(this.doOnChangeWhenBlur=!0,this.cancelEventOnEnterKey||(setEventCancelBubble(a),setEventPreventDefault(a))))};NLDropdown.prototype.setMandatoryBackgroundColor=function(a){this.sMandatoryBgColor=a};NLDropdown.prototype.hasAttribute=function(a){return(this.flags&a)!=0}; 85function NLDropdown(a,b,c,d,e,f,g,h,k,l,m,n){if(a==null)throw"cannot create dropdown with null name";if(c==null)throw"cannot create dropdown with null values";this.name=a;this.nameC=b;this.machineName=n;this.textArray=Array(c.length/2);this.valueArray=Array(c.length/2);this.favorites=e;this.valueToIndexMap={};this.indexAtRenderTime=this.defaultIndex=d;this.favoritesEnabled=m;this.uifPicker=null;this.disabled=this.divWidthHasBeenSet=this.isOpen=!1;this.currentCell=this.div=null;this.searchString=""; 86this.cancelEventOnEnterKey=this.typeAhead=!1;this.width=null;this.minimumWidth=k||0;this.flags=0;this.sMandatoryBgColor="#FFFFFF";this.bRequired=!1;this.divArray=[];this.justOpenedByMouse=!1;this.initializeElements(f);this.bInitialize=!0;for(e=a=0;a<c.length;a+=2,e++)f=c[a+1],this.textArray[e]=c[a],this.valueArray[e]=f,this.valueToIndexMap[String(f)]=e;this.setIndex(d,!0);window.dropdowns[b]==null&&(window.dropdowns[b]=this);NS.UI.Util.isNetsuiteNext?this.setText(null,!0):this.setWidth(h==-1?null: 87h,k==-1?null:k,l);this.flags=g;this.bRequired=this.hasAttribute(NLField_MANDATORY);this.disabled=this.hasAttribute(NLFieldConstants_DISABLED);this.typeAhead=this.hasAttribute(NLFieldConstants_TYPEAHEAD);this.hasAttribute(NLFieldConstants_DISABLED)&&this.setDisabled(!0);this.hasAttribute(NLFieldConstants_NOARROW)&&this.setArrowImage("")} 88NLDropdown.prototype.initializeElements=function(a){a==null&&(window.parentAccesible&&typeof parent!="undefined"&&parent.NS.Window.getActive()&&(a=parent.NS.Window.getActive().content.contentDocument),a=a?a:document);this.ddbtn=this.inpt=a.getElementById("inpt_"+this.nameC);this.hddn=a.getElementById("hddn_"+this.nameC);this.indx=a.getElementById("indx_"+this.nameC);for(this.span=this.inpt.parentNode;"span"!==this.span.nodeName.toLocaleLowerCase();)this.span=this.span.parentNode;this.isSelectable()|| 89(this.inpt.unselectable="on");this.elementsAreInitialized=!0;this.bInitialize=!1};function getDropdownArrowSpacing(){return NS.UI.Util.isRedwood?24:33}function getDropdownArrowPadding(){return NS.UI.Util.isRedwood?0:10} 90NLDropdown.prototype.setWidth=function(a,b,c){a!=null?b=this.width=a:c!=null?(a=getTextWidth(c),b=Math.max(a+getDropdownArrowSpacing(),b==null?0:b),b+=getDropdownArrowPadding()):(this.div==null?(a=this.createDiv(),document.body.insertBefore(a,document.body.firstChild)):a=this.div,a.offsetHeight<200?(b=this.div==null?a.offsetWidth+5+getDropdownArrowSpacing():a.offsetWidth,b<40&&(b=40)):b=this.div==null?a.offsetWidth+15+getDropdownArrowSpacing():a.offsetWidth+15,this.div==null&&document.body.removeChild(a)); 91if(this.inptWidth!==b||this.inptText!==this.getText())this.setWidthDirect(b),this.setText(null,!0)};NLDropdown.prototype.scheduleSetWidth=function(){if(this.width==null&&!this.dirty){this.dirty=!0;var a=this;setTimeout(function(){a.setWidth();a.dirty=!1},0)}};NLDropdown.prototype.setWidthDirect=function(a){a=Math.max(this.minimumWidth,Math.min(a,DROPDOWN_INPUT_MAX_SIZE_PIXELS));this.inpt.style.width=a+"px";this.inptWidth=a}; 92NLDropdown.prototype.createUIFPicker=function(){var a,b=this.createItems().map(g=>({id:this.getValueAtIndex(g.nlrow),name:unEscapeHtml(g.name)})),c=(this.favorites||[]).map(g=>({value:g.value,text:unEscapeHtml(g.text)})),d=g=>
92{this.setAndClose(this.getIndexForValue(g.id))},e=g=>{g=Array.isArray(g.favoriteItems)?g.favoriteItems:[];this.setFavorites(g.map(h=>({value:h.id,text:h.name})))},f=g=>{g&&(this.indexOnDeck=g=this.getIndexForValue(g.id),this.setText(this.textArray[g]))};NS.UIF.run(async()=>{var {LegacyDropdownPicker:g}= 93await import("@nsn-ui/ui-apps-component");a=new g({owner:this.inpt,optionData:b,favoritesData:c,onClose:this.close.bind(this),onSelectionChanged:d.bind(this),onFavoriteItemsChanged:e.bind(this),selectedValues:this.getValue(),fieldId:this.name,sublistId:this.machineName,onCursorMoved:f.bind(this)});a.open({target:this.inpt.parentElement})});return{close:g=>{a&&a.close(g)},moveCursor:g=>{a&&a.moveCursor(g)},setSelectedValue:g=>{a&&a.selectValue(g)}}}; 94NLDropdown.prototype.createItems=function(){var a=Array(this.textArray.length);for(i=0;i<this.textArray.length;i++){var b=this.textArray[i];b=b==null||b.length===0?"":b.escapeHTML();a[i]={id:"nl"+ ++tdCounter,nlrow:i,name:b}}return a}; 95NLDropdown.prototype.createDiv=function(){var a=document.createElement("div");a.className=DROPDOWN_DIV_CLASS;a.unselectable=this.inpt.unselectable;a.style.zIndex=1001;this.divWidthHasBeenSet=!1;var b=this.createItems(),c=Array(b.length);this.divArray=c;var d;for(d=0;d<b.length;d++){var e=document.createElement("div");c[d]=e;e.innerHTML=b[d].name.length===0?" ":b[d].name;e.id=b[d].id;e.nlrow=b[d].nlrow;e.unselectable=a.unselectable;e.className=DROPDOWN_NOT_SELECTED_CLASS;a.appendChild(e)}return a}; 96NLDropdown.prototype.buildDiv=function(){this.div=this.createDiv();var a=this;this.div.onkeydown=function(b){a.handleKeyDown(b)};this.div.onkeypress=function(b){a.handleKeypress(b)};this.div.onmousedown=function(){return!1}};NLDropdown.prototype.adjustDivForScrollbar=function(a,b){isIE?a.style.width=a.offsetWidth+18+"px":isNS&&(a.style.width=a.offsetWidth-12+"px")}; 97NLDropdown.prototype.sizeDiv=function(){var a=this.div,b=NS.UI.Util.isRedwood?this.inpt.parentNode:this.inpt;NS.UI.Util.isNetsuiteNext&&(b=this.inpt.closest(".uir-field-wrapper")||b);if(!this.divWidthHasBeenSet){var c=a.offsetWidth,d=b.offsetWidth;var e=d-c;a.style.overflow="hidden";a.style.width=(c<d?d:c+4)+"px"}d=findPosY(b);c=d-document.body.scrollTop;b=getDocumentHeight()-(d-document.body.scrollTop+b.offsetHeight);b=Math.max(c,b);a.offsetHeight<Math.min(200,b)?isNS&&(e=a.offsetHeight,a.style.height= 98e+"px",a.offsetHeight>e&&(a.style.height=(e*2<a.offsetHeight?0:e*2-a.offsetHeight)+"px")):(a.style.height=Math.min(b,200)-2+"px",a.style.overflow="auto",this.divWidthHasBeenSet||this.adjustDivForScrollbar(a,b,e));this.divWidthHasBeenSet=!0};NLDropdown.prototype.getForm=function(){var a=null;try{a=this.elementsAreInitialized?this.hddn.form:null}catch(b){this.elementsAreInitialized=!1,this.bInitialize=!0}return a}; 99NLDropdown.prototype.openUIFPicker=function(){this.favoritesEnabled&&!this.isOpen&&(this.bInitialize&&this.initializeElements(),this.disabled||this.textArray.length==0||(this.isOpen=!0,this.uifPicker=this.createUIFPicker()))}; 100NLDropdown.prototype.open=function(){this.bInitialize&&this.initializeElements();if(!this.disabled&&this.textArray.length!=0)if(this.favoritesEnabled)this.openUIFPicker();else{this.div==null&&this.buildDiv();this.div.style.visibility="hidden";var a=window.parentAccesible&&parent?parent.NS.Window.getActive():null,b=a&&a.content.contentDocument?a.content:null,c=!1;a&&!b&&a.content.id.indexOf("popup")>0?(c=!0,this.inpt.parentNode.insertBefore(this.div,this.inpt.nextSibling)):(a=b?b.contentDocument:document, 101a.body.insertBefore(this.div,a.body.firstChild));this.sizeDiv();this.hasAttribute(NLFieldConstants_EXTREME)?this.positionRelativeDiv():c||(c=NS.UI.Util.isRedwood?this.inpt.parentNode:this.inpt,NS.UI.Util.isNetsuiteNext&&(c=this.inpt.closest(".uir-field-wrapper")||c),this.positionDiv(c,this.div));this.isOpen=!0;this.setCurrentCellInMenu(null);isIE&&this.currentCell!=null&&this.scrollTop();this.div.style.visibility="visible"}}; 102NLDropdown.prototype.positionRelativeDiv=function(){this.span.style.zIndex=1;this.span.insertBefore(this.div,this.span.firstChild);findPosX(this.span);var a=findPosY(this.span);this.div.style.left=0;a+this.inpt.offsetHeight+this.div.offsetHeight-document.body.scrollTop>getDocumentHeight()?this.div.style.top=3-this.div.offsetHeight+"px":this.div.style.top=this.inpt.offsetHeight-1+"px"}; 103NLDropdown.prototype.positionDiv=function(a,b){var c=getWindowPageXOffset(),d=getWindowPageYOffset(),e=findAbsolutePosX(a),f=b.offsetWidth,g=document.body.scrollLeft,h=getDocumentClientWidth();b.style.left=e-c+f-g<=h?e+"px":h-f+g+"px";c=findAbsolutePosY(a);e=b.offsetHeight;a=a.offsetHeight;f=getDocumentClientHeight();c-d+a+e>f?b.style.top=Math.max(c-e,0)+"px":isIE?b.style.top=c+a-1+"px":isNS&&(b.style.top=c+a-2+"px")}; 104NLDropdown.prototype.closeUIFPopup=function(){this.isOpen&&this.favoritesEnabled&&this.uifPicker&&this.uifPicker.close()}; 105NLDropdown.prototype.close=function(a){a=a&&a.reason;this.favoritesEnabled&&a===MOUSE_UP_EVENT||!this.isOpen||(this.closeUIFPopup(),this.indexOnDeck!=null&&(this.setIndex(this.indexOnDeck),this.indexOnDeck=null),this.currentCell!=null&&(this.currentCell.className=DROPDOWN_NOT_SELECTED_CLASS,this.currentCell=null),this.span.style.zIndex="",this.div&&this.div.parentNode.removeChild(this.div),this.isOpen=!1)};NLDropdown.prototype.isSelectable=function(){return this.span.unselectable=="on"?!1:!0}; 106NLDropdown.prototype.setFocus=function(){try{this.inpt.focus(),this.isSelectable()&&this.inpt.select()}catch(a){console&&console.log(a.message)}}; 107NLDropdown.prototype.setText=function(a,b){a==null&&(a=this.getText());this.inptText=a;this.inpt.title=a;if(a==null||a=="")a=" ";
107isCustomerFacingEnvironment||this.inpt.setAttribute("data-value",a);var c=this.inptWidth-getDropdownArrowSpacing()+1;NS.UI.Util.isClassicRedwood?c=238:NS.UI.Util.isNextRedwood&&(c=getComputedStyle(this.inpt),c=this.inpt.clientWidth-parseFloat(c.paddingLeft)-parseFloat(c.paddingRight));this.inpt.value=elideTxt(a,c);if(!b||this==currentDropdown)try{this.inpt.focus(),!this.isOpen&& 108this.isSelectable()&&this.inpt.select()}catch(d){console&&console.log(d.message)}};NLDropdown.prototype.getText=function(a){a==null&&(a=this.getIndex());return a==null||a<0||a>this.textArray.length?"":this.textArray[a]};NLDropdown.prototype.getValue=function(){return this.hddn.value};NLDropdown.prototype.getTexts=function(){return this.textArray};NLDropdown.prototype.getValues=function(){return this.valueArray};NLDropdown.prototype.setAndClose=function(a){this.indexOnDeck=null;this.close();this.setIndex(a)}; 109function getNext(a){var b=a.firstChild;b==null&&(b=a.nextSibling,b==null&&b.parentNode!=null&&(b=a.parentNode.nextSibling));return b}NLDropdown.prototype.getCellAtIndex=function(a){return this.divArray&&a<this.divArray.length?this.divArray[a]:null};NLDropdown.prototype.setCurrentCellInMenuOnIndex=function(a){this.isOpen&&(this.favoritesEnabled?this.uifPicker&&this.uifPicker.setSelectedValue(this.getValueAtIndex(a)):this.setCurrentCellInMenu(this.getCellAtIndex(a)))}; 110NLDropdown.prototype.setCurrentCellInMenu=function(a){if(this.isOpen){if(a==null){a=this.getIndex();if(a<0||a>this.divArray.length||a===void 0)a=0;a=this.divArray[a]}this.currentCell!=null&&(this.currentCell.className=DROPDOWN_NOT_SELECTED_CLASS);a!=null&&(a.className=DROPDOWN_SELECTED_CLASS);this.currentCell=a}};NLDropdown.prototype.getIndex=function(){return Number(this.indx.value)}; 111NLDropdown.prototype.setIndex=function(a,b){if(a!=null&&(a=Number(a),!(a<0||a>=this.valueArray.length))){var c=this.getIndex();this.indx.value=a;this.hddn.value=this.valueArray[a];this.setText(this.textArray[a],b);c==a||b||this.hddn.onchange==null||this.hddn.onchange()!=0||(this.indx.value=c,this.hddn.value=this.valueArray[c],this.setText(this.textArray[c],b))}};
111NLDropdown.prototype.setValue=function(a,b){a=this.getIndexForValue(a);a!=null&&this.setIndex(a,b)}; 112NLDropdown.prototype.getValueAtIndex=function(a){return this.valueArray[a]};NLDropdown.prototype.getTextAtIndex=function(a){return this.textArray[a]}; 113NLDropdown.prototype.respondToArrow=function(a){var b=this.currentCell==null?this.getIndex():this.currentCell.nlrow;b+=a;b<0&&(b=0);b>=this.valueArray.length&&(b=this.valueArray.length-1);if(this.isOpen)if(this.favoritesEnabled)this.uifPicker.moveCursor({direction:a});else{this.setText(this.textArray[b]);this.setCurrentCellInMenuOnIndex(b);a=this.currentCell.parentNode.scrollTop;var c=this.currentCell.offsetTop,d=getElementContentHeight(this.currentCell.parentNode),e=this.currentCell.offsetHeight; 114a>c?this.currentCell.scrollIntoView(!0):a+d<c+e&&this.currentCell.scrollIntoView(!1);this.indexOnDeck=b}else this.valueArray[b]==-1&&a>0?b+1<this.valueArray.length&&this.respondToArrow(a+1):(this.doOnChangeWhenBlur=!0,this.setIndex(b,!0))}; 115NLDropdown.prototype.gotoNext=function(a){this.searchStringTimeout!=null&&(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=null);var b=this.getIndex();this.currentCell!=null&&(b=this.currentCell.nlrow);var c=this.textArray.length;this.searchString+=String.fromCharCode(a).toUpperCase();this.searchString.length==1&&++b;a=!1;for(var d=0;d<c;d++){var e=b%c;if(this.textArray[e].substr(getTypeAheadStartIndex(this.textArray[e]),this.searchString.length).toUpperCase()==this.searchString){a= 116!0;break}++b}a&&(this.isOpen?(this.setText(this.textArray[e]),this.setCurrentCellInMenuOnIndex(e),this.scrollTop(),this.indexOnDeck=e):(this.doOnChangeWhenBlur=!0,this.setIndex(e,!0)));if(this.typeAhead==1){var f=this;this.searchStringTimeout=setTimeout(function(){f.searchString=""},2E3)}else this.searchString=""};NLDropdown.prototype.scrollTop=function(){this.div!=null&&this.currentCell!=null&&(this.div.scrollTop=this.currentCell.offsetTop)}; 117function getTypeAheadStartIndex(a){for(var b=0;b<a.length;b++)if(a.charCodeAt(b)!=32&&a.charCodeAt(b)!=160)return b;return 0}NLDropdown.prototype.getTextForValue=function(a){a=this.getIndexForV
117alue(a);return a!=null?this.textArray[a]:""};NLDropdown.prototype.getIndexForText=function(a){for(var b=0;b<this.textArray.length;b++)if(trim(this.textArray[b])==trim(a))return b;return-1};NLDropdown.prototype.getIndexForValue=function(a){return this.valueToIndexMap[String(a)]}; 118NLDropdown.prototype.restoreToOriginalValue=function(){this.setIndex(this.indexAtRenderTime,!0)};NLDropdown.prototype.gotoDefault=function(){this.setIndex(this.defaultIndex,!0)};NLDropdown.prototype.resetDropDown=function(){this.gotoDefault()};NLDropdown.prototype.setDefaultIndex=function(a){a!=null&&(this.bInitialize&&this.initializeElements(),this.defaultIndex=Number(a))}; 119NLDropdown.prototype.handleMouseDown=function(a){this.favoritesEnabled||(this.becomeCurrent(),this.isOpen?this.close():(this.open(),this.justOpenedByMouse=!0))};NLDropdown.prototype.handleMouseClick=function(a){this.favoritesEnabled&&(this.becomeCurrent(),this.isOpen?this.close():this.openUIFPicker())}; 120NLDropdown.prototype.handleKeydown=function(a){if(this.disabled)return!0;this.bInitialize&&this.initializeElements();var b=getEventKeypress(a);switch(b){case 8:case 16:case 17:case 18:case 20:case 46:case 93:return}this.becomeCurrent();switch(b){case 9:this.handleOnBlur(a);this.close();currentDropdown=null;break;case 13:this.currentCell!=null?this.setIndex(this.currentCell.nlrow):this.indexOnDeck!=null&&this.favoritesEnabled?this.setIndex(this.indexOnDeck):this.handleOnBlur(a);this.isOpen&&(this.indexOnDeck= 121null,this.close(),currentDropdown=null,this.cancelEventOnEnterKey||(setEventCancelBubble(a),setEventPreventDefault(a)));break;case 38:getEventAltKey(a)?this.isOpen&&this.close():(this.respondToArrow(-1),setEventCancelBubble(a),setEventPreventDefault(a));break;case 40:getEventAltKey(a)?this.isOpen||this.open():(this.respondToArrow(1),setEventCancelBubble(a),setEventPreventDefault(a));break;case 37:case 39:return!0;case 33:this.respondToArrow(-14);this.isOpen&&this.scrollTop();setEventCancelBubble(a); 122setEventPreventDefault(a);break;case 34:this.respondToArrow(14);this.isOpen&&this.scrollTop();setEventCancelBubble(a);setEventPreventDefault(a);break;case 35:this.respondToArrow(this.valueArray.length);this.isOpen&&this.scrollTop();setEventCancelBubble(a);setEventPreventDefault(a);break;case 36:this.respondToArrow(-this.valueArray.length),this.isOpen&&this.scrollTop(),setEventCancelBubble(a),setEventPreventDefault(a)}}; 123NLDropdown.prototype.handleKeypress=function(a){if(this.disabled)return!0;this.bInitialize&&this.initializeElements();this.becomeCurrent();var b=getEventKeypress(a);switch(b){case 9:case 38:case 40:case 37:case 39:case 33:case 34:case 35:case 36:break;case 13:this.isOpen&&(setEventCancelBubble(a),setEventPreventDefault(a));break;default:this.gotoNext(b),setEventPreventDefault(a)}}; 124NLDropdown.prototype.becomeCurrent=function(){currentDropdown!=null&¤tDropdown!=this&¤tDropdown.close();currentDropdown!=this&&(currentDropdown=this,this.indexOnDeck=null)}; 125NLDropdown.prototype.setDisabled=function(a){this.disabled=a;this.inpt.disabled=a;this.hddn.disabled=a;this.disabled?(this.close(),this.span.className&&this.span.className.indexOf("effectDisabled")<0&&(this.span.className+=" effectDisabled")):this.span.className&&this.span.className.indexOf("effectStatic")<0?this.span.className=this.span.className.replace(" effectDisabled"," effectStatic"):this.span.className=this.span.className.replace(" effectDisabled","")}; 126NLDropdown.prototype.setHidden=function(a){this.span.style.display=a?"none":""};NLDropdown.prototype.setFavorites=function(a){this.favorites=a&&a.length>0?a:[]}; 127NLDropdown.prototype.addOption=function(a,b,c){if(b==null)throw"cannot create an option with null value";if(a==null)throw"cannot create an option with null text";var d=this.textArray.length==0;a=unEscapeWhenHtml(a);b=String(b);if(typeof c==="undefined"||c>this.valueArray.length)c=this.valueArray.length;for(var e=c;e<this.valueArray.length;++e)this.valueToIndexMap[this.valueArray[e]]=e+1;this.valueToIndexMap[b]=c;this.textArray.splice(c,0,a);this.valueArray.splice(c,0,b);this.defaultIndex>=c&&++this.defaultIndex; 128this.getIndex()>=c&&this.setIndex(this.getIndex()+1,!0);this.div=null;d&&(this.defaultIndex=0,this.setIndex(0,!0));this.scheduleSetWidth()};NLDropdown.prototype.cloneDropdownValues=function(a){a!=null&&(this.textArray=a.textArray,this.valueArray=a.valueArray,this.valueToIndexMap=a.valueToIndexMap,this.inpt.style.width=a.inpt.style.width,this.inptWidth=a.inptWidth,this.setText(null,!0))}; 129NLDropdown.prototype.deleteAllOptions=function(){this.close();this.valueArray.length=0;this.textArray.length=0;this.valueToIndexMap={};this.div=null;this.defaultIndex=0;this.setText("",!0);this.hddn.value="";this.indx.value="-1"}; 130NLDropdown.prototype.deleteOneOption=function(a,b){a=String(a);var c=this.valueToIndexMap[a];if(c!=null){this.close();for(var d=c+1;d<this.valueArray.length;++d)this.valueToIndexMap[this.valueArray[d]]=d-1;delete this.valueToIndexMap[a];this.valueArray.splice(c,1);this.textArray.splice(c,1);this.div=null;b||this.scheduleSetWidth();c==this.defaultIndex?this.defaultIndex=0:this.defaultIndex>c&&--this.defaultIndex;this.getIndex()>c&&this.setIndex(this.getIndex()-1,!0);a==this.getValue()&&this.gotoDefault()}}; 131NLDropdown.prototype.setOptionText=function(a,b){a=String(a);var c=this.valueToIndexMap[a];c!=null&&(this.close(),this.textArray[c]=b,a==this.getValue()&&this.setText(b,!0),this.div=null,this.scheduleSetWidth())};
131NLDropdown.prototype.setArrowImage=function(a){if(!this.overrideImage){if(a==DROPDOWN_ARROW_DEFAULT||a==DROPDOWN_ARROW_PRESS||a==DROPDOWN_ARROW_DISABLED)a=getZoomFile(a);this.ddbtn.style.backgroundImage=a?"url("+a+")":""}}; 132NLDropdown.prototype.overrideArrowImage=function(a){this.ddbtn.style.backgroundImage="url("+a+")";this.overrideImage=!0};NLDropdown.prototype.setBackgroundColor=function(a){this.inpt.style.backgroundColor=a};NLDropdown.prototype.setRequired=function(a){(this.bRequired=a)?this.setBackgroundColor(this.sMandatoryBgColor):this.setBackgroundColor("");setFieldLabelRequired(this.name,a,this.getForm())}; 133NLDropdown.prototype.setDefaultOrNotRequired=function(a){this.setRequired(a?this.hasAttribute(NLField_MANDATORY):!1)};NLDropdown.prototype.getRequired=function(a){return this.bRequired};NLDropdown.prototype.getInput=function(){return this.inpt};NLDropdown.prototype.getHiddenInput=function(){return this.hddn};NLDropdown.prototype.getContainer=function(){return this.span};var dropdowns={}; 134function getDropdownFromNameC(a,b){if(typeof b=="undefined"||b==null)b=window;var c=b.dropdowns[a];c==null&&b.parent!=null&&b.parent.dropdowns!=null&&(c=b.parent.dropdowns[a]);return c}function getDropdown(a,b){if(a.tagName=="SPAN")for(var c=a.getElementsByTagName("INPUT"),d=0;d<c.length;d++)if(c[d].type=="hidden"&&c[d].id!=null&&c[d].id.indexOf("hddn_")==0){a=c[d];break}if(a.id)return getDropdownFromNameC(a.id.substring(5),b)} 135function getTextWidthDiv(){var a=document.createElement("div");a.style.position="absolute";a.style.padding="0";a.style.margin="0";a.style.border="0";a.style.fontSize="13px";a.style.top="-1000px";a.style.visibility="hidden";a.innerHTML=" ";return a}var txtWidthCache={}; 136(function(){function a(){var c=null,d=document.createElement("canvas"),e=d.getContext&&d.getContext("2d"),f=RegExp("^[ \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000]+"),g=RegExp("[ \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000]+$"),h=RegExp("[ \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000]+","g");d=null;try{d=window.getComputedStyle(document.body).getPropertyValue("font-family")}catch(m){d="Open Sans"}if(e)try{e.font=(NS.UI.Util.isRedwood?"14px ":"13px ")+ 137d,c=function(m){if(txtWidthCache[m])return txtWidthCache[m];var n=m.replace(f,"").replace(g,"").replace(h," ")||" ";return txtWidthCache[m]=e.measureText(n).width}}catch(m){e=null}if(!e){var k={},l=getTextWidthDiv();l.style.fontFamily=d;document.body.appendChild(l);k[" "]=k[""]=l.offsetWidth;c=function(m){if(txtWidthCache[m])return txtWidthCache[m];for(var n=m.replace(f,"").replace(g,"").replace(h," ")||" ",p=0,x=0,v=n.length;p<v;p++){var r=n[p];k[r]||(l.innerHTML=r,k[r]=l.offsetWidth);x+=k[r]}return txtWidthCache[m]= 138x}}return c}var b=null;getTextWidth=function(c){b||=a();return b(c)}})(); 139function elideTxt(a,b){if(b<=0||getTextWidth(a)<b)return a;a=a.replace(/^(\s|\u00A0)*/,"").replace(/(\s|\u00A0)*$/,"");if(getTextWidth(a)<b)return a;var c=getTextWidth("...");if(c>=b)return"...";for(var d=0,e=a.length,f=Math.round((d+e)/2),g=a.substr(0,Math.round(f/2)),h=a.substr(a.length-Math.floor(f/2));d!==e;)g=getTextWidth(g+h)+c,g<=b?d=f:e=f-1,f=Math.round((d+e)/2),g=a.substr(0,Math.round(f/2)),h=a.substr(a.length-Math.floor(f/2));return g+"..."+h}var multidropdowns={}; 140function getMultiDropdownFromNameC(a,b){b==null&&(b=window);var c=b.multidropdowns[a];c==null&&b.parent!=null&&b.parent.multidropdowns!=null&&(c=b.parent.multidropdowns[a]);return c} 141function getMultiDropdown(a,b){if(a.tagName=="SPAN"&&isValEmpty(a.getAttribute("nlmultidropdown")))for(var c=a.getElementsByTagName("INPUT"),d=0;d<c.length;d++)if(!isValEmpty(c[d].getAttribute("nlmultidropdown")))return getMultiDropdownFromNameC(c[d].getAttribute("nlmultidropdown"),b);return getMultiDropdownFromNameC(a.getAttribute("nlmultidropdown"),b)}NLMultiDropdown.prototype.setMandatoryBackgroundColor=function(a){this.sMandatoryBgColor=a}; 142NLMultiDropdown.prototype.setRequired=function(a){(this.bRequired=a)?this.setBackgroundColor(this.sMandatoryBgColor):this.setBackgroundColor("");setFieldLabelRequired(this.name,a,this.getForm())};NLMultiDropdown.prototype.getRequired=function(){return this.bRequired};NLMultiDropdown.prototype.hasAttribute=function(a){return(this.flags&a)!=0};NLMultiDropdown.prototype.getForm=function(){var a=null;try{a=this.hiddenField.form}catch(b){}return a}; 143function NLMultiDropdown(a,b,c,d,e,f,g,h){if(a==null)throw"cannot create multi-select dropdown with
143null name";if(c==null)throw"cannot create multi-select dropdown with null values";this.renderDocument=h;this.name=a;this.nameC=b;this.textArray=Array(c.length/2);this.valueArray=Array(c.length/2);this.valueToIndexMap={};this.defaultValues=d;this.selectedVals=isValEmpty(this.defaultValues)?[]:this.defaultValues.split(String.fromCharCode(5));this.sMandatoryBgColor="#FFFFFF";this.bRequired=!1;this.staticWidth= 144f;this.numRows=parseInt(g)+(isIE?0:1);this.disabled=!1;this.width=this.table=this.span=null;this.flags=0;this.hiddenField=h.getElementById("hddn_"+this.nameC);this.parentSpan=this.getParentSpan();this.parentSpan.setAttribute("nlmultidropdown",this.nameC);isNetscape?(this.parentSpan.onmousedown=function(){return!1},this.parentSpan.onmousemove=function(){return!1}):this.parentSpan.onselectstart=function(){return!1};this.onMouseMoveIdx=this.previousIdx=this.currentIdx=-1;for(d=a=0;a<c.length;a+=2,d++)f= 145c[a+1],this.textArray[d]=c[a],this.valueArray[d]=f,this.valueToIndexMap[String(f)]=d;this.setWidth();this.defaultBorderColor=this.table.style.borderColor;attachEventHandler("mouseup",document,function(k){this.handleMouseUp(k)}.bind(this));window.multidropdowns[b]==null&&(window.multidropdowns[b]=this);this.flags=e;this.hasAttribute(NLFieldConstants_DISABLED)&&this.setDisabled(!0)} 146NLMultiDropdown.prototype.getParentSpan=function(){for(var a=this.hiddenField.parentNode;a!=null&&(a.tagName!="SPAN"||a.id==null||a.id.indexOf(this.name)==-1);)a=a.parentNode;return a}; 147NLMultiDropdown.prototype.buildSpan=function(){this.span=this.renderDocument.createElement(isIE?"span":"div");this.span.setAttribute("tabindex","0");this.span.setAttribute("role","listbox");this.span.setAttribute("aria-labelledby",this.name+"_fs_lbl");this.parentSpan.insertBefore(this.span,this.hiddenField);this.span.className=DROPDOWN_DIV_CLASS;this.span.style.position="relative";this.span.style.display="inline-block";this.span.style.height=(parseInt(this.numRows)*15).toString()+"px";isIE||(this.span.style.width= 148"100%");this.span.style.overflow="auto";this.span.setAttribute("nlmultidropdown",this.nameC);this.table=this.renderDocument.createElement("table");this.span.appendChild(this.table);NS.UI.Util.isRedwood||(this.table.width="100%",this.table.style.borderCollapse="collapse",this.table.style.textAlign="left");this.table.setAttribute("nlmultidropdown",this.nameC);this.table.cellSpacing=0;this.table.cellPadding=0;var a=this.renderDocument.createElement("tbody"),b=this.textArray.length,c=this,d=NS.jQuery(this.span); 149this.span.addEventListener("focus",function(){d.addClass("uir-field-active");d.parent().addClass("uir-field-parent-active")});this.span.addEventListener("blur",function(){d.removeClass("uir-field-active");d.parent().removeClass("uir-field-parent-active")});for(var e=0;e<b;e++){var f=this.renderDocument.createElement("td");this.contains(e)?(f.className=DROPDOWN_SELECTED_CLASS,this.currentIdx===-1&&(this.currentIdx=e)):f.className=DROPDOWN_NOT_SELECTED_CLASS;f.style.whiteSpace="nowrap";NS.UI.Util.isRedwood|| 150(f.style.borderWidth="0px",f.style.borderStyle="solid",f.style.borderColor="#FFFFFF");f.nlrow=e;f.setAttribute("id","row_"+this.nameC+"_"+e);f.setAttribute("aria-selected","false");f.setAttribute("role","option");f.setAttribute("nlmultidropdown",this.nameC);f.onclick=function(){c.setFocus()};var g=this.textArray[e];isValEmpty(g)&&(g="\u00a0");var h=this.renderDocument.createElement("span");h.className="uir-multiselect-option";h.innerText=g;h.nlrow=e;h.setAttribute("nlmultidropdown",this.nameC);f.appendChild(h); 151f.onkeypress=function(k){c.handleKeypress(k)};g=this.renderDocument.createElement("tr");a.appendChild(g);g.appendChild(f)}this.table.appendChild(a);this.span.onkeypress=function(k){c.handleKeypress(k)};if(NS.UI&&NS.UI.Helpers&&NS.UI.Helpers.uir_dropdownHelper)NS.UI.Helpers.uir_dropdownHelper.onSpanBuilt(this)}; 152NLMultiDropdown.prototype.positionHelperIconsForNonIE=function(){try{if(!isIE){var a=document.getElementById(this.name+"_helperwidgets");if(a){var b=parseInt(Math.floor(this.span.offsetHeight/2))-parseInt(Math.floor(a.offsetHeight/2))+4,c=parseInt(this.span.offsetWidth)+10;a.style.position="relative";a.style.left=c+"px";a.style.top=b+"px"}}}catch(d){console&&console.log(d.message)}}; 153function getFocusElement(a){if(!a)return null;if(a.focus)return a;var b=a.firstChild;for(a=null;b&&!a;)a=getFocusElement(b),b=b.nextSibling;return a}NLMultiDropdown.prototype.setFocus=function(){var a=getFocusElement(this.span);try{a.focus(),this.selectedVals.length==0&&this.highLightBorder(0)}catch(b){console&&console.log(b.message)}}; 154NLMultiDropdown.prototype.setWidth=function(){this.span==null&&this.buildSpan();if(this.staticWidth!=null)typeof this.staticWidth==="string"?(this.span.style.width="",this.span.classList.add(this.staticWidth)):this.span.style.width=this.staticWidth+"px";else{var a=this.table.offsetWidth;a<40&&(a=40);
154a=Math.min(a,DROPDOWN_INPUT_MAX_SIZE_PIXELS);this.table.style.width=a+"px";this.span.style.width=(a+21).toString()+"px";this.width=a}this.positionHelperIconsForNonIE()}; 155NLMultiDropdown.prototype.becomeCurrent=function(){currentMultiDropdown!=this&&(currentMultiDropdown=this)};NLMultiDropdown.prototype.resetDropDown=function(){this.removeAll();this.currentIdx=this.previousIdx=-1;this.selectedVals=isValEmpty(this.defaultValues)?[]:this.defaultValues.split(String.fromCharCode(5));for(var a=this.selectedVals.length,b=0;b<a;)this.add(this.valueToIndexMap[this.selectedVals[b++]],!0);this.width==null&&this.setWidth();this.setHiddenField()}; 156NLMultiDropdown.prototype.getTextForValue=function(a){a=this.getIndexForValue(a);return a!=null?this.textArray[a]:""};NLMultiDropdown.prototype.getIndexForValue=function(a){return this.valueToIndexMap[String(a)]};NLMultiDropdown.prototype.setValue=function(a){this.setIndex(valueToIndexMap[a])}; 157NLMultiDropdown.prototype.setIndex=function(a,b){this.disabled||(getEventShiftKey(b)?this.handleShiftKey(Math.min(this.currentIdx,a),Math.max(this.currentIdx,a)):getEventCtrlKey(b)||getEventMacCommandKey(b)?this.contains(a)?this.remove(a,!0):this.add(a,!0):(this.removeAll(),this.add(a,!0)),this.highLightBorder(a),this.previousIdx=a)};NLMultiDropdown.prototype.addIndex=function(a){this.disabled||(this.add(a,!0),this.highLightBorder(a),this.previousIdx=a,this.setHiddenField(!0))}; 158NLMultiDropdown.prototype.setValues=function(a,b){this.removeAll();this.previousIdx=-1;a=a.split(String.fromCharCode(5));var c;for(c=0;c<a.length;
158c++)this.add(this.getIndexForValue(a[c]),!0);this.setHiddenField(!b)};NLMultiDropdown.prototype.getValues=function(){return this.valueArray}; 159NLMultiDropdown.prototype.highLightBorder=function(a){NS.UI.Util.isRedwood||(this.previousIdx!=-1&&(this.getCell(this.previousIdx).style.borderStyle="solid",this.getCell(this.previousIdx).style.borderColor="#FFFFFF"),this.getCell(a).style.borderStyle="dotted",this.getCell(a).style.borderColor=this.defaultBorderColor)}; 160NLMultiDropdown.prototype.handleScrolling=function(a){if(this.span!=null){var b=this.getCell(a);a=b.offsetHeight;b=b.offsetTop;var c=this.span.scrollTop,d=c+a*Math.max(1,this.numRows-1),e=b%a;e=b+(e>0?a-e:0);e>=d+a||b<c-a?this.span.scrollTop=b:e>=d?this.span.scrollTop+=a:e<c&&(this.span.scrollTop-=a)}};NLMultiDropdown.prototype.getSelectedValues=function(){return this.selectedVals.join(String.fromCharCode(5))}; 161NLMultiDropdown.prototype.getSelectedText=function(a){var b="";isValEmpty(a)&&(a=",");if(this.selectedVals.length>0)for(var c=0;c<this.selectedVals.length;c++)b+=(c==0?"":a)+this.getText(this.valueToIndexMap[this.selectedVals[c]]);return b};NLMultiDropdown.prototype.getSelectedTextFromValues=function(a,b){var c="";isValEmpty(b)&&(b=",");if(!isValEmpty(a)){a=a.split(String.fromCharCode(5));for(var d=0;d<a.length;d++)c+=(d==0?"":b)+this.getText(this.valueToIndexMap[a[d]])}return c}; 162NLMultiDropdown.prototype.setHiddenField=function(a){this.hiddenField.value=this.getSelectedValues();if(a)this.hiddenField.onchange()};NLMultiDropdown.prototype.removeAll=function(){for(var a=this.selectedVals,b=0;b<a.length;b++){var c=this.valueToIndexMap[a[b]];this.remove(c,!0);NS.UI.Util.isRedwood||(this.getCell(c).style.borderStyle="solid",this.getCell(c).style.borderColor="#FFFFFF")}}; 163NLMultiDropdown.prototype.add=function(a,b){a!=null&&(this.currentIdx=a,arrayAdd(this.selectedVals,this.getValue(a)),b&&(a=this.getCell(a),a.className=DROPDOWN_SELECTED_CLASS,a.setAttribute("aria-selected","true"),this.span.setAttribute("aria-activedescendant",a.id)))}; 164NLMultiDropdown.prototype.remove=function(a,b){a!=null&&this.selectedVals.indexOf(this.getValue(a))!==-1&&(this.selectedVals=arrayRemove(this.selectedVals,this.getValue(a)),b&&(a=this.getCell(a),a.className=DROPDOWN_NOT_SELECTED_CLASS,a.setAttribute("aria-selected","false"),this.span.removeAttribute("aria-activedescendant")))};NLMultiDropdown.prototype.contains=function(a){return arrayContains(this.selectedVals,this.valueArray[a])};NLMultiDropdown.prototype.getCell=function(a){return this.table.rows[a].cells[0]}; 165NLMultiDropdown.prototype.getValue=function(a){return this.valueArray[a]};NLMultiDropdown.prototype.getText=function(a){return this.textArray[a]};NLMultiDropdown.prototype.setBackgroundColor=function(a){this.defaultBorderColor=a;this.table.style.backgroundColor=a;this.span.style.backgroundColor=a};NLMultiDropdown.prototype.handleShiftKey=function(a,b){if(!(a>b||a<0||b>=this.valueArray.length))for(var c=0;c<this.valueArray.length;)c>=a&&c<=b?this.add(c,!0):this.remove(c,!0),c++}; 166NLMultiDropdown.prototype.handleMoveSelection=function(a,b){var c=this.currentIdx;c=Math.min(c+b,this.valueArray.length-1);c=Math.max(c,0);getEventShiftKey(a)?this.handleShiftKey(Math.min(this.previousIdx,c),Math.max(this.previousIdx,c)):this.removeAll();this.add(c,!0);this.highLightBorder(c);getEventShiftKey(a)||(this.previousIdx=c);this.handleScrolling(c);this.setHiddenField(!0)}; 167NLMultiDropdown.prototype.handleTypeAhead=function(a){var b=Math.max(this.currentIdx,0)+1,c=this.textArray.length;a=String.fromCharCode(a).toUpperCase();for(var d=!1,e=0;e<c;e++){var f=b%c;if(this.textArray[f].substr(0,a.length).toUpperCase()==a){d=!0;break}++b}d&&(this.removeAll(),this.add(f,!0),this.highLightBorder(f),this.previousIdx=f,this.handleScrolling(f),this.setHiddenField(!0))}; 168NLMultiDropdown.prototype.handleMouseMove=function(a){if(!this.disabled&&this.onMouseMoveIdx!=-1)for(a=getEventTarget(a);a!=null;){if(a.className!=null&&!isNaN(a.nlrow)&&a.nlrow!="undefined"&&a.getAttribute("nlmultidropdown")==this.nameC){a=a.nlrow;if(this.onMouseMoveIdx!=this.previousIdx&&this.contains(this.onMouseMoveIdx)&&Math.abs(this.previousIdx-this.onMouseMoveIdx)>Math.abs(this.previousIdx-a))this.remove(this.onMouseMoveIdx,!0);else for(var b=Math.max(this.previousIdx,a),c=Math.min(this.previousIdx, 169a);c<=b;c++)this.contains(c)||this.add(c,!0);this.handleScrolling(a);this.onMouseMoveIdx=a;break}a=a.parentNode}};
169NLMultiDropdown.prototype.handleMouseDown=function(a){if(!this.disabled){this.becomeCurrent();var b=getEventTarget(a);b==null||isNaN(b.nlrow)||b.nlrow=="undefined"||(this.onMouseMoveIdx=b.nlrow,this.setIndex(b.nlrow,a),this.handleScrolling(b.nlrow),this.dragBegan=!0)}}; 170NLMultiDropdown.prototype.handleMouseUp=function(a){this.dragBegan&&!this.disabled&&(this.dragBegan=!1,this.becomeCurrent(),this.setHiddenField(!0))}; 171NLMultiDropdown.prototype.handleKeydown=function(a){if(!this.disabled){this.becomeCurrent();var b=!1;switch(getEventKeypress(a)){case 33:this.handleMoveSelection(a,-this.numRows);setEventPreventDefault(a);break;case 34:this.handleMoveSelection(a,+this.numRows);setEventPreventDefault(a);break;case 35:this.handleMoveSelection(a,this.valueArray.length-this.currentIdx);setEventPreventDefault(a);break;case 36:this.handleMoveSelection(a,-this.currentIdx);setEventPreventDefault(a);break;case 38:this.handleMoveSelection(a, 172-1);setEventPreventDefault(a);break;case 40:this.handleMoveSelection(a,1);setEventPreventDefault(a);break;default:b=!0}return b}};NLMultiDropdown.prototype.handleKeypress=function(a){if(this.disabled)return!0;this.becomeCurrent();a=getEventKeypress(a);this.handleTypeAhead(a)}; 173NLMultiDropdown.prototype.setDisabled=function(a){this.disabled=a;this.hiddenField.disabled=a;if(NS.UI.Util.isNetsuiteNext){var b=document.getElementById(`${this.hiddenField.name}_fs`);b&&b.classList.toggle("uir-disabled",a)}if(this.table!=null&&(this.table.disabled=a,!NS.UI.Util.isNetsuiteNext)){b=this.table.querySelectorAll(".uir-multiselect-option");for(var c=0;c<b.length;c++)b[c].style.color=a?"#AAAAAA":""}this.disabled||this.span!=null||this.width!=null||(this.setWidth(),NS.UI.Util.isNetsuiteNext|| 174this.setBackgroundColor(this.defaultBorderColor))};NLMultiDropdown.prototype.setHidden=function(a){this.span!=null&&(this.span.style.display=a?"none":"")}; 175NLMultiDropdown.prototype.addOption=function(a,b,c,d){if(b==null)throw"cannot create an option with null value";if(a==null)throw"cannot create an option with null text";a=String(a);b=String(b);typeof d=="undefined"&&(d=this.valueArray.length);this.textArray.splice(d,0,a);this.valueArray.splice(d,0,b);this.valueToIndexMap[b]=d;c&&this.add(d,!1);this.span!=null&&this.parentSpan.removeChild(this.span);this.width=this.span=null;this.setWidth();this.setBackgroundColor(this.defaultBorderColor);this.setHiddenField(); 176this.disabled||this.handleScrolling(d)};NLMultiDropdown.prototype.deleteAllOptions=function(){this.valueArray.length=0;this.textArray.length=0;this.valueToIndexMap={};this.currentIdx=this.previousIdx=-1;this.selectedVals=[];this.span!=null&&this.parentSpan.removeChild(this.span);this.width=this.span=null;this.setWidth();this.setBackgroundColor(this.defaultBorderColor);this.setHiddenField()}; 177NLMultiDropdown.prototype.deleteOneOption=function(a){a=String(a);var b=this.valueToIndexMap[a];b!=null&&(this.valueArray.splice(b,1),this.textArray.splice(b,1),delete this.valueToIndexMap[a],this.selectedVals=arrayRemove(this.selectedVals,a),this.span!=null&&this.parentSpan.removeChild(this.span),this.width=this.span=null,this.setWidth(),this.setBackgroundColor(this.defaultBorderColor),this.setHiddenField())};NLMultiDropdown.prototype.getContainer=function(){return this.span}; 178function resetNLDropDowns(a){if(window.dropdowns!=null)for(var b in window.dropdowns){var c=window.dropdowns[String(b)];!c.elementsAreInitialized||a!=null&&c.getForm()!=a||c.resetDropDown()}if(window.multidropdowns!=null)for(b in window.multidropdowns)c=window.multidropdowns[String(b)],a!=null&&c.hiddenField.form!=a||c.resetDropDown()} 179function resetNLPopupSelects(a){NS.jQuery(a).find("[data-fieldtype=popupselect] input[type=text]").each(function(){var b=this.name.replace(/_display$/,"");b in a.elements&&(a.elements[b].value="")})}function getStyleForClass(a,b){for(var c=document.styleSheets,d=0;d<c.length;d++)for(var e=c[d].rules?c[d].rules:c[d].cssRules,f=0;f<e.length;f++){var g=e[f];if(g.hasOwnProperty("style")){var h=g.style;g=g.selectorText;if(!isValEmpty(h[b])&&g!=null&&g.replace(".","")==a)return h[b]}}return null} 180var dragger=null,mouseX=0,mouseY=0,currentPortlet=null,bar=null,EVENT_PORTLET_MAX=0,EVENT_PORTLET_MIN=1,EVENT_PORTLET_MOVE=2,EVENT_PORTLET_DROP=3,EVENT_PORTLET_DRAG=4;function NLPortletDragger(){this.portletID=this.widthPlaceHolder=this.originalContainer=this.originalNext=this.originalColumn=this.width=this.headerTR=this.divContainer=this.trToBeMoved=null}function movedToDifferentWidthColumn(a,b){return(a==1||a==3)&&b==2||(b==1||b==3)&&a==2} 181NLPortletDragger.prototype.putDownPortlet=function(){bar&&bar.parentNode&&bar.parentNode.removeChild(bar);var a=currentPortlet;isNS||this.divContainer.parentNode.removeChild(this.divContainer);if(a!=null){var b=getCellIndex(a.parentNode.parentNode.parentNode)+1,c=NLHighCh
181artManager_Instance.getChartObject("portletHC_child_portlet_"+this.portletID);typeof c!="undefined"&&movedToDifferentWidthColumn(this.originalColumn,b)&&c.setSize(0,0);a.parentNode.insertBefore(this.trToBeMoved,a);typeof this.updateLayoutInDatabase!= 182"undefined"?this.updateLayoutInDatabase(this.portletID,a.portletID,b,this.originalColumn,this.trToBeMoved.id):updateLayoutInDatabase(this.portletID,a.portletID,b,this.originalColumn);movedToDifferentWidthColumn(this.originalColumn,b)==1&&this.headerTR.setAttribute("ptlt_hasdisplayed","F")}else this.widthPlaceHolder&&this.originalContainer.insertBefore(this.trToBeMoved,this.originalNext);this.widthPlaceHolder&&this.originalContainer.removeChild(this.widthPlaceHolder);clearTimeout(chartResizingTimeout); 183chartResizingTimeout=setTimeout(reflowAllCharts,300);currentPortlet=null}; 184NLPortletDragger.prototype.putDownRow=function(){bar&&bar.parentNode&&bar.parentNode.removeChild(bar);var a=currentPortlet;this.divContainer!=null&&(this.divContainer.parentNode.removeChild(this.divContainer),this.originalContainer.insertBefore(this.trToBeMoved,this.originalNext));if(a!=null){OrderedListMarkRowNavigation&&OrderedListMarkRowNavigation(a,!1);if(a.isOrderedList&&OrderedListMoveLineTo)OrderedListMoveLineTo(a.machineName,a.rowIndex);else if(a.machineName!=null){var b=a.rowIndex,c=eval(a.machineName+ 185"_machine.getMachineIndex()"),d=eval(a.machineName+"_machine.isinline"),e=getMachineByName(a.machineName);d&&c<a.rowIndex&&e.moveButtons&&b--;eval(a.machineName+"_machine.movelineto("+b+")")}currentPortlet=null}};function getCellIndex(a){if(isSafari){for(var b=a.parentNode,c=0;c<b.cells.length;c++)if(b.cells[c]==a)return c;return 0}return a.cellIndex} 186function movePortlet(a,b){try{var c=getEventTarget(b);if(c.nodeName=="A"||c.nodeName=="SPAN")return!0;var d=findClassUp(a,PORTLET_HANDLE_CLASS);dragger=new NLPortletDragger;dragger.portletID=getPortletId(a.id);dragger.headerTR=a;dragger.trToBeMoved=d;dragger.originalColumn=getCellIndex(d.parentNode.parentNode.parentNode)+1;dragger.originalContainer=d.parentNode;dragger.originalNext=d.nextSibling;dragger.width=d.offsetWidth;dragger.divContainer=document.createElement("div");dragger.divContainer.style.position= 187"absolute";dragger.divContainer.style.width=dragger.width;dragger.divContainer.style.background=document.body.bgColor;isIE?dragger.divContainer.style.filter="alpha(opacity=92)":(dragger.divContainer.style.opacity=.92,dragger.divContainer.style.MozOpacity=.92);dragger.widthPlaceHolder=document.createElement("tr");var e=document.createElement("td"),f=document.createElement("img");e.appendChild(f);dragger.widthPlaceHolder.appendChild(e);f.src="/images/nav/stretch.gif";f.width=dragger.width;f.height= 188"0";dragger.widthPlaceHolder&&dragger.originalContainer.appendChild(dragger.widthPlaceHolder);dragger.originalContainer.removeChild(d);var g=document.createElement("table");g.style.borderWidth=0;g.width="100%";var h=document.createElement("tbody");g.appendChild(h);h.appendChild(d);dragger.divContainer.appendChild(g);isNS||(document.body.appendChild(dragger.divContainer),positionFloatingPortlet(dragger.divContainer,4))}catch(k){dragger=null}} 189function portletDraggerOnMouseMove(a){updateMousePosition(a);dragger&&(document.body.scrollHeight>getDocumentHeight()&&getDocumentHeight()-mouseY<10?document.body.scrollTop=document.body.scrollHeight-getDocumentHeight():mouseY<15&&document.body.scrollTop>0&&(document.body.scrollTop=0),isNS||positionFloatingPortlet(dragger.divContainer,4),a=getEventTarget(a),a=findClassUp(a,PORTLET_HANDLE_CLASS),a!=null&&a!=currentPortlet&&a!=dragger.trToBeMoved&&(currentPortlet=a,bar!=null&&bar.parentNode!=null&& 190bar.parentNode.removeChild(bar),bar=getPositionUpdateBar(),currentPortlet.portletID=getPortletId(currentPortlet.id),currentPortlet.parentNode.insertBefore(bar,currentPortlet)),notifyPortlet(dragger.portletID,EVENT_PORTLET_MOVE))}function updateMousePosition(a){mouseX=getMouseX(a);mouseY=getMouseY(a)} 191function getPositionUpdateBar(a){var b=document.createElement("tr"),c=document.createElement("td");b.appendChild(c);var d=document.createElement("hr");d.style.width="100%";d.className=PORTLET_DRAG_DROP_BAR_CLASS;c.appendChild(d);a&&a.cells.length>0&&(c.colSpan=a.cells.length,d.style.width="95%");return b} 192function positionFloatingPortlet(a,b){var c=getDocumentClientWidth();a.style.left=mouseX<15?"8px":mouseX+a.offsetWidth>c-10?c-10-a.offsetWidth+"px":mouseX-10+"px";mouseY<getDocumentHeight()&&(b=mouseY+document.body.scrollTop+b,mouseY+a.offsetHeight<getDocumentHeight()||(b=b-a.offsetHeight-15),a.style.top=(b>0&&b||0)+"px")} 193function portletDraggerOnMouseDown(a){if(!(dragger||getButtonId(a)>1)){var b=getEventTarget(a);b=findClassUp(b,PORTLET_DRAG_DROP_CLASS);b!=null&&b.id!=null&&(movePortlet(b,a),a=getPortletId(b.id),notifyPortlet(a,EVENT_PORTLET_DRAG))}}function portletDraggerOnMouseUp(){if(dragger)return dragger.putDownPortlet(),notifyPortlet(dragger.portletID,EVENT_PORTLET_DROP),dragger=null,!1}function getPortletId(a){return a==null?-1:a.substring(a.lastIndexOf("_")+1,a.length)} 194function updateLayoutInDatabase(a,b,c,d){a=typeof NLHighChartManager_Instance.getChartObject("portletHC_child_portlet_"+a)=="undefined"||isIE?"/app/center/portletlayout.nl?movedid="+a+"&replacedid="+b+"§ionid=-29&newcolumn="+c+"&oldcolumn="+d+"&chartMoved=false":"/app/center/portletlayout.nl?movedid="+a+"&replacedid="+b+"§ionid=-29&newcolumn="+c+"&oldcolumn="+d+"&chartMoved=true";b=getParameter("entityid",document);b!=null&&(a+="&entityid="+b);(b=getParameter("project",document))&&(a+="&project="+ 195b);sendRequestToFrame(a,"server_commands")}function hidePortlet(a,b,c){var d=document.getElementById(c);d=findClassUp(d,PORTLET_HANDLE_CLASS);d!=null&&(a="/app/center/setup/dashboard.nl?portletid="+b+"§ionid="+a+"&dynamic=T&elementid="+c+"&method=hideportlet",window.editDashboard&&(a+="&e=T"),sendRequestToFrame(a,"server_commands"));clearTimeout(chartResizingTimeout);chartResizingTimeout=setTimeout(reflowAllCharts,300)} 196function doHidePortlet(a){a=document.getElementById(a);a=findClassUp(a,PORTLET_HANDLE_CLASS);a!=null&&a.parentNode.removeChild(a);clearTimeout(chartResizingTimeout);chartResizingTimeout=setTimeout(reflowAllCharts,300)} 197function minimizePortlet(a,b,c,d,e,f){var g=document.getElementById(c);if(g!=null&&g.nodeName=="TR"){var h=g.getAttribute("ptlt_hasdisplayed")=="T",k=document.getElementById(c+"_content"),l=k.style.display=="none",m=l?"":"none";if(!l||h||!f){var n=document.getElementById("table_"+c);for(k=k.rowIndex;k<n.rows.length;k++)n.rows[k].style.display=m;c=document.getElementById(c+"_maxmin");c.className=l?c.className.replace("portletIconMaximize","portletIconMinimize"):c.className.replace("portletIconMinimize", 198"portletIconMaximize")}g.setAttribute("ptlt_hasdisplayed","T");a=addParamToURL("/app/center/setup/minimizeportlet.nl?portletid="+b+"§ionid="+a,"elemid",d);a=addParamToURL(a,"sticky",e);a=addParamToURL(a,"_minimize",l?"F":"T");a=addParamToURL(a,"_reload",l&&!h&&f?"T":"F");sendRequestToFrame(a,"server_commands");notifyPortlet(b,l?EVENT_PORTLET_MAX:EVENT_PORTLET_MIN);clearTimeout(chartResizingTimeout);chartResizingTimeout=setTimeout(reflowAllCharts,300)}} 199function minimizeProjectDashboardPortlet(a,b,c,d,e,f,g){var h=document.getElementById(c);if(h!=null&&h.nodeName=="TR"){var k=h.getAttribute("ptlt_hasdisplayed")=="T",l=document.getElementById(c+"_content"),m=l.style.display=="none",n=m?"":"none";if(!m||k||!f){var p=document.getElementById("table_"+c);for(l=l.rowIndex;l<p.rows.length;l++)p.rows[l].style.display=n;c=document.getElementById(c+"_maxmin");c.className=m?c.className.replace("portletIconMaximize","portletIconMinimize"):c.className.replace("portletIconMinimize", 200"portletIconMaximize")}h.setAttribute("ptlt_hasdisplayed","T");a=addParamToURL("/app/accounting/project/minimizeprojectdashboardportlet.nl?portletid="+b+"§ionid="+a,"elemid",d);a=addParamToURL(a,"sticky",e);a=addParamToURL(a,"_minimize",m?"F":"T");a=addParamToURL(a,"_reload",m&&!k&&f?"T":"F");a=addParamToURL(a,"project",g);sendRequestToFrame(a,"server_commands");notifyPortlet(b,m?EVENT_PORTLET_MAX:EVENT_PORTLET_MIN);clearTimeout(chartResizingTimeout);chartResizingTimeout=setTimeout(reflowAllCharts, 201300)}} 202function refreshPortlet(a,b,c,d,e,f,g,h,k,l){if(NS.Dashboard)return refreshPortletCompat(a,c,e,h,k,l);setPortletToUpdating(a);a="/app/center/setup/portletrefresher.nl?elemid="+a+"&sticky="+b;c!=null&&(a+="&noreload="+(c?"T":"F"));d!=null&&(a+="&sc="+d);e!=null&&(a+="&portletid="+e);f!=null&&(a+="&entityid="+f+"&haschild="+(g?"T":"F"));h!=null&&(a+="&searchid="+h);l!=null&&(a+="&lineid="+l);
202if(isNetscape||isSafari)a+="&nsts="+(new Date).getTime();k!=null&&k.length>0&&(k.charAt(0)=="?"&&(k=k.substring(1)),a+= 203"&addparams="+encodeURIComponent(k));NS.submitMutationAction(a,null,"server_commands")}function refreshPortletCompat(a,b,c,d,e,f){b={noreload:b?"T":"F",searchid:d,lineid:f};for(d=/([\w]+)=([^&]*)/g;(f=d.exec(e))!==null;)b[f[1]]=f[2];!c&&a&&(c=/[0-9]+/.exec(a),c=/neg/.test(a)?-c[0]:c[0]);a=decodeURIComponent(NS.jQuery.param(b));NS.Dashboard.getInstance().getPortlet(c).reload("refresh",a)} 204function refreshProjectPortlet(a,b,c,d,e,f,g,h,k,l,m){setPortletToUpdating(a);a="/app/center/setup/portletrefresher.nl?elemid="+a+"&sticky="+b;c&&(a+="&noreload="+(c?"T":"F"));d&&(a+="&sc="+d);f&&(a+="&portletid="+f);g&&(a+="&entityid="+g+"&haschild="+(h?"T":"F"));k&&(a+="&searchid="+k);m&&(a+="&lineid="+m);e&&(a+="&project="+e);if(isNetscape||isSafari)a+="&nsts="+(new Date).getTime();l!=null&&l.length>0&&(l.charAt(0)=="?"&&(l=l.substring(1)),a+="&addparams="+encodeURIComponent(l));NS.submitMutationAction(a, 205null,"server_commands")}function disablePortletLinks(a){for(var b=0;;b++){var c=document.getElementById(a+b);if(c==null)break;c.disabled=!0}return!0}var quickAddDragger=null;function quickaddDraggerOnMouseDown(a){quickAddDragger||getButtonId(a)>1||(a=getEventTarget(a),a=findClassUp(a,QUICKADD_DRAG_DROP_CLASS),a!=null&&a.id!=null&&(quickAddDragger=findClassUp(a,"quickadddragger")))}function quickaddDraggerOnMouseMove(a){quickAddDragger!=null&&positionFloatingPortlet(quickAddDragger,0)} 206function quickaddDraggerOnMouseUp(){quickAddDragger=null;return!1} 207function setPortletToUpdating(a){var b=document.getElementById("rfsh_"+a);if(b!=null){a=b.parentNode.previousSibling!=null?b.parentNode.previousSibling.firstChild:null;a!=null&&a.nodeName=="IMG"&&(a.src="/images/nav/dingbats/btn_cl_refresh.gif");for(;b.firstChild!=null;)b.removeChild(b.firstChild);a=document.createElement("font");a.color="#999999";var c=document.createTextNode(PAGE_REFRESHING);a.appendChild(c);b.appendChild(a);a=document.createElement("img");a.src="/images/setup/updating.gif";a.border= 2080;b.appendChild(a)}else(b=document.getElementById(a+"_refresh"))&&b.className.indexOf("portletIconRefreshing")<0&&(b.className=b.className.replace("portletIconRefresh","portletIconRefreshing"))}function insertHtmlValue(a,b){var c=getHtmlEditor(a);if(c!=null)c.insertValue(b,!1);else if(a=document.getElementById(a)){c=a.textLength;var d=a.selectionStart,e=a.selectionEnd;if(e==1||e==2)e=c;a.value=a.value.substring(0,d)+b+a.value.substr(e,c)}} 209function setHtmlFieldValue(a,b,c){a!=null&&(c==null&&(c=window),c=void 0===c.getHtmlEditor?null:c.getHtmlEditor(a.name),c!=null?c.setValue(b,!0,!0):a.value=b)}function disableHtmlField(a,b){if(b!=null){var c=getHtmlEditor(b.name);c!=null?c.setDisabled(a):b.disabled=a}}function resetHtmlEditors(a){typeof NetSuite=="object"&&typeof NetSuite.RTEManager=="object"&&NetSuite.RTEManager.forEach(function(b){if(a==null||b.hddn.form==a)b.reset(),b.lastEditMadeInSourceMode=b.defaultTextMode})} 210function getHtmlEditor(a){if(typeof NetSuite!="object"||typeof a=="undefined"||a==null)return null;a.indexOf("html-editor-")!=0&&(a="html-editor-"+a);return NetSuite.RTEManager.getInstance(a)}function getSelectedElement(a){var b=null;if(a.document.selection){var c=a.document.selection,d=c.createRange();try{b=d.parentElement()}catch(e){return null}}else{try{c=a.getSelection(),d=c.getRangeAt(0)}catch(e){return null}b=d.commonAncestorContainer}return b} 211function updateQuickDateSelector(a){var b=document.getElementById("quickdateselector");if(b!=null){var c=b.onchange;b.onchange=null;var d=getDropdown(b);
211d!=null&&(a=d.getIndexForValue(a),d.setIndex(a));b.onchange=c}}function statusMessage(a,b){a==null&&(a=2E3);window.status=b;setTimeout("window.status = ''",a)}function NLAccelMenu_cancelCurrentTimer(){var a=window.accelMenuDiv;a&&a.nTimerId&&(clearTimeout(a.nTimerId),a.nTimerId=0)} 212function NLAccelMenu_closeCurrentMenu(){var a=window.accelMenuDiv;if(a){var b=a.getAttribute("bMachine")=="T";NLAccelMenu_cancelCurrentTimer();isIE&&(a=a.parentNode.removeChild(a),a.origParent.appendChild(a),a.style.position="relative",a.style.top=a.style.origTop,a.style.left=a.style.origLeft,a.style.zIndex="");a.style.display="none";a.img.src="/images/nav/popupselectup"+(b?"":"2")+".gif";a.img.className=a.img.className.replace("_focus","")}window.accelMenuDiv=null} 213function NLAccelMenu_onMouseOut(a){if(a=window.accelMenuDiv)a.nTimerId=setTimeout(function(){NLAccelMenu_closeCurrentMenu()},200)}function NLAccelMenu_onMouseOver(a){NLAccelMenu_cancelCurrentTimer()} 214function NLAccelMenu_onButtonClick(a,b,c,d){a=document.getElementById(b);a.setAttribute("bMachine",c?"T":"F");d.src="/images/nav/popupselectdown"+(c?"":"2")+".gif";a.img=d;d!=null&&(d.className+="_focus");NLAccelMenu_closeCurrentMenu();window.accelMenuDiv=a;a.parentNode.style.display="inline";a.style.display="";c=a.firstChild.offsetWidth;c!=void 0&&(a.style.width=c);a.style.display="block";a.parentNode.style.zIndex="9000";NLAccelMenu_positionDIV(a);isIE&&(a.style.zIndex=a.parentNode.style.zIndex, 215a.origParent=a.parentNode,a.style.origLeft=a.style.left,a.style.origTop=a.style.top,c=findPosY(a),d=findPosX(a),a.style.position="absolute",a=a.parentNode.removeChild(a),document.body.insertBefore(a,document.body.firstChild),a.style.left=d+"px",a.style.top=c+"px",a.firstChild.firstChild&&(a.firstChild.firstChild.style.borderWidth="0px"))}function NLAccelMenu_positionDIV(a){var b=findPosY(a.img);b+=22;var c=getDocumentHeight(),d=parseInt(a.offsetHeight);a.style.top=(b+d>c?-d:22)+"px"} 216function NLAccelMenuButton_onMouseDown(a){a.firstChild.onclick()}function NLAccelMenuButton_onMouseOver(a){a.className="dropdownSelected"}function NLAccelMenuButton_onMouseOut(a){a.className="dropdownNotSelected"}var burstTimer=0,bursting=-1,newBGImageMap=["/images/icons/dashboard/top_bkg.gif","/images/icons/dashboard/left_edge_bkg.gif","/images/icons/dashboard/right_edge_bkg.gif","/images/icons/dashboard/bottom_edge_bkg.gif"]; 217function showBurstRollover(a,b,c,d){try{if(clearTimeout(burstTimer),bursting!=c+"_"+d&&a!=null&&b!=null&&b.length>0){var e=findPosY(a),f=findPosX(a),g=document.getElementById("rptsnap"+d);g!=null&&(e-=g.scrollTop);var h=document.getElementById("burst_div_"+d);if(h!=null){if(h.getAttribute("_setBG")!="T"){var k=h.firstChild.getElementsByTagName("TD");for(a=0;a<k.length;a++)if(k[a].getAttribute("_resbg")!=null){var l=Number(k[a].getAttribute("_resbg"));k[a].style.backgroundImage="url("+newBGImageMap[l]+ 218")"}h.setAttribute("_setBG","T")}var m=document.getElementById("date_span_"+d);m.removeChild(m.firstChild);var n=document.createTextNode(b);m.appendChild(n);h.style.display="block";h.style.position="absolute";h.style.top=e+8+"px";h.style.left=f-32+"px";bursting=c+"_"+d}}}catch(p){console&&console.log(p.message)}}function removeBurst(a){burstTimer=setTimeout(new Function("removeBurstNow('"+a+"');"),200)} 219function removeBurstNow(a){a=document.getElementById("burst_div_"+a);a!=null&&(a.style.display="none",bursting=-1)} 220function expandCollapseNode(a,b){var c=document.getElementById(a+"_top");a=document.getElementById(a+"_total");if(c!=null&&a!=null){var d=findClassUp(c,"enhtable"),e=c.getAttribute("_nototals")=="T",f=d.rows[c.rowIndex+1];f=f.style.display==""||f.style.display=="block"?"none":"";setHrefToggleLabel(f,b);e||(f!="none"?expandNodeRestoreData(c):collapseNodeCopyData(c,a));b=0;for(var g=c.rowIndex+1;g<=a.rowIndex;g++)if(c=d.rows[g],!(b>0&&c.id==null)){var h=b;if(f!="none"&&c.id!=null&&(c.id.substring(c.id.length- 2214)=="_top"&&c.firstChild.firstChild.getAttribute("_state")=="plus"?b++:c.id.substring(c.id.length-6)=="_total"&&document.getElementById(c.id.substring(0,c.id.length-6)+"_top").firstChild.firstChild.getAttribute("_state")=="plus"&&(b=Math.max(b-1,0)),h>0))continue;f!="none"&&e&&c.id.substring(c.id.length-6)=="_total"||(c.style.display=f)}}} 222function setHrefToggleLabel(a,b){a!="none"?(b.firstChild.src="/images/nav/reporting/tree_minus.gif",b.setAttribute("_state","minus")):(b.firstChild.src="/images/nav/reporting/tree_plus.gif",b.setAttribute("_state","plus"))}
223function expandNodeRestoreData(a){if(a!=null)for(var b=1;b<a.cells.length;b++)a.cells[b].getAttribute("_orightml")!=null&&a.cells[b].getAttribute("_orightml").length>1?(a.cells[b].innerHTML=a.cells[b].getAttribute("_orightml"),a.cells[b].className=a.cells[b].getAttribute("_origclass"),a.cells[b].align=a.cells[b].getAttribute("_origalign")):a.cells[b].innerHTML=" "} 224function collapseNodeCopyData(a,b){if(b!=null&&a!=null)for(var c=1;c<b.cells.length;c++)a.cells[c].setAttribute("_orightml",a.cells[c].innerHTML),a.cells[c].setAttribute("_origclass",a.cells[c].className),a.cells[c].setAttribute("_origalign",a.cells[c].align),a.cells[c].align=b.cells[c].align,a.cells[c].className=b.cells[c].className,a.cells[c].innerHTML=b.cells[c].innerHTML} 225function resetLabelRowCellSizes(a,b,c){if(a!=null&&b!=null){clearAllWidths(b);var d=b.rows[0];d.style.display="";var e=b.rows[1];if(!(e==null||e.cells.length<=1)){for(var f=b.offsetWidth-(c?17:0),g=a.parentNode.parentNode.offsetWidth,h=[],k=0;k<e.cells.length;k++)h[k]=e.cells[k].offsetWidth;for(e=a.cells.length-1;e>=0;e--){var l=e==a.cells.length-1;k=a.cells.length<=2||e>1;l&&(a.cells[e].style.paddingRight=c?"16px":"");var m=(h[e]+(l&&c?17:0))/g*100,n=h[e]/f*100;a.cells[e].style.width=k?m+"%":h[e]+ 226(l&&c?17:0)+"px";for(m=0;m<b.rows.length;m++)l=b.rows[m],l.cells[e]!=null&&l.id!="_totallinerow"&&(l.cells[e].style.width=k?n+"%":h[e]+"px")}}d.style.display="none"}}function clearAllWidths(a){for(var b=0;b<a.rows.length;b++)for(var c=0;c<a.rows[b].cells.length;c++)a.rows[b].cells[c].style.width=""} 227if(isIE){var menuCtx=null,menuCtxTarget=null;document.oncontextmenu=function(a){return menuCtx&&NS.form.isInited()?(menuCtxTarget=getEventTarget(a),menuCtx.menu.showHide(!0),!1):!0};var NLContextMenu=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=[a[c][0],"javascript:"+a[c][1]+"; return false;",""];this.sParams=b;a=this.menu=new NLMenu("contextmenu",b,0,null);menus.contextmenu=a;menuTimers.contextmenu=0;a.setBackgroundColor(BGBUTTON);menuCtx=this}} 228var popupsuggesttimer=0,hidesuggesttimer=0,loadingimagetimer=0,hideloadingimagetimer=0,popupAutoSuggest=null,autoSuggestSeqNum=0,highestSeqNumReturned=0,previousValueAttrName="previousvalue"; 229function NLPopupAutoSuggest(){this.inputfield;this.mapkey;this.uniqueuserkey;this.asheep;this.initialLastUserVal;this.fieldname;this.fieldname_hidden;this.fieldvalue;this.optionmasterfield;this.xPos;this.yPos;this.suggestiondiv;this.visible=!1;this.currentcell;this.bmultiselect=this.bUbersearch=!1;this.bautoselectsingleresult=!0;this.bOnlyOneResult=!1} 230NLPopupAutoSuggest.prototype.setAttributes=function(a,b,c,d){this.inputfield=a;this.mapkey=b;this.fieldname=a.name;var e=this.fieldname.lastIndexOf("_display");this.fieldname_hidden=e>0?this.fieldname.substring(0,e):this.fieldname;this.fieldvalue=a.value;this.optionmasterfields=d;this.bautoselectsingleresult=c;this.xPos=findPosX(a);this.yPos=findPosY(a);this.currentcell=-1;this.bUbersearch=b=="uberautosuggest";this.bmultiselect=NLPopupAutoSuggest_isMultiSelect(a);isValEmpty(this.uniqueuserkey)&&(this.asheep= 231a.getAttribute("asheep"),this.uniqueuserkey=a.getAttribute("asuuk"),this.initialLastUserVal=GetCookie("lastUser")+"_"+GetCookie("JSESSIONID"))}; 232function constructSuggestionBoxFromResponse(a){if(popupAutoSuggest!=null){hideAutoSuggestLoadingImage();try{var b=eval("("+a.getBody()+")");var c=parseInt(b.circid);if(highestSeqNumReturned>c)return;highestSeqNumReturned=c;var d=b.autofill}catch(e){return}if(d.length>0){b=new StringBuffer;b.append("<table cellpadding=0 cellspacing=0 border=0 role='presentation'><tbody>");for(a=0;a<d.length;a++)c=d[a],c.sname=isValEmpty(c.sname)?c.sname:escapeHTML(c.sname),c.descr=isValEmpty(c.descr)?c.descr:escapeHTML(c.descr), 233b.append("<tr>"),popupAutoSuggest.constructCell(b,c,popupAutoSuggest.fieldname_hidden),b.append("</tr>");a==iMAX_SUGGESTIONS&&(b.append("<tr>"),popupAutoSuggest.constructMoreCell(b,popupAutoSuggest.fieldname_hidden,popupAutoSuggest.fieldvalue),b.append("</tr>"));b.append("</tbody></table>");popupAutoSuggest.showSuggestionBox(b.toString());popupAutoSuggest.bautoselectsingleresult&&a==1&&(popupAutoSuggest.selectNextCell(),popupAutoSuggest.bOnlyOneResult=!0)}else popupAutoSuggest.showSuggestionBox(getAutoSuggestMessageHTML(NLHEADING_NO_RESULTS_FOUND)), 234hidesuggesttimer=setTimeout("popupAutoSuggest.hideSuggestionBox()",2E3)}}function logAutoSuggestSessionError(a,b){a=a.uniqueuserkey+"%20|%20"+a.initialLastUserVal;b=b+"%20|%20"+GetCookie("lastUser")+"_"+GetCookie("JSESSIONID");parent.document.location="/core/pages/logAutoSuggestSessionError.nl?olduserkey="+a+"&PARAM_NEW_USER_KEY="+b} 235function getAutoSuggestMessageHTML(a){var b=new StringBuffer;b.append("<table cellpadding=0 cellspacing=0 border=0 role='presentation'><tbody>");b.append("<tr><td style='padding:2px' class=tinygraytext>"+a+"</td></tr>");b.append("</tbody></table>");return b.toString()}function hideAutoSuggestLoadingImage(){clearTimeout(loadingimagetimer);clearTimeout(hideloadingimagetimer);popupAutoSuggest!=null&&(popupAutoSuggest.inputfield.style.backgroundImage="")} 236function showAutoSuggestRefineSearchMessage(){popupAutoSuggest!=null&&(popupAutoSuggest.showSuggestionBox(getAutoSuggestMessageHTML(HEADING_PLEASE_ENTER_MORE_CHARACTERS_OR_CLICK_GO)),hidesuggesttimer=setTimeout("popupAutoSuggest.hideSuggestionBox()",4E3))} 237function showAutoSuggestLoadingImage(){clearTimeout(hideloadingimagetimer);popupAutoSuggest!=null&&(popupAutoSuggest.inputfield.style.backgroundImage="url(/images/help/animated_loading.gif)",popupAutoSuggest.inputfield.style.backgroundRepeat="no-repeat",popupAutoSuggest.inputfield.style.backgroundPosition="100% 1px",hideloadingimagetimer=setTimeout("hideAutoSuggestLoadingImage(); showAutoSuggestRefineSearchMessage();",1E4))} 238NLPopupAutoSuggest.prototype.constructSuggestionBox=function(){if(this.fieldvalue!=null&&trim(this.fieldvalue).length>0)try{var a="cur_val="+encodeURIComponent(this.bmultiselect?getCurrentMultiSelectUserInputValue(this.inputfield):this.fieldvalue);if(this.optionmasterfields!=null)for(var b in this.optionmasterfields)a+="&si_"+b+"="+encodeURIComponent(getSelectValue(this.optionmasterfields[b]));var c="/app/common/autosuggest.nl?mapkey="+this.mapkey+"&circid="+ ++autoSuggestSeqNum+"&"+a;loadingimagetimer= 239setTimeout("showAutoSuggestLoadingImage()",1E3);
239nlXMLRequestURL(c,null,null,new Function("response","constructSuggestionBoxFromResponse(response);"),!0)}catch(d){}}; 240NLPopupAutoSuggest.prototype.constructCell=function(a,b,c){this.bUbersearch?(c=b.bedit=="T",a.append("<td nowrap class='"+AUTO_SUGGEST_UBER_CLASS+"'>"),a.append("<table cellpadding=0 cellspacing=0 border=0 width='100%' role='presentation'><tr>"),a.append("<td nowrap>"),a.append('<a class=smalltextnolink href="'+b.key+"\" onclick='popupAutoSuggest.hideSuggestionBox(true); return true;'>"),isValEmpty(b.descr)?a.append(b.sname):a.append("<span></span><span style='color:#666666'><i>"+b.descr+": </i></span><span>"+ 241b.sname+"</span>"),a.append("</a>"),a.append("</td>"),a.append("<td style='padding-left:7px; padding-right:2px' class=text align=right valign=bottom>"),a.append("<span style='visibility:hidden'>"),isValEmpty(b.dashurl)||(a.append("<a"+(c?" style='position:relative; top:2'":"")+" href='"+b.dashurl+"' onclick='popupAutoSuggest.hideSuggestionBox(true); return true;' class=text title='"+BUTTON_VIEW_DASHBOARD+"'>"),a.append("<img class='i_dashboard_white' border=0 src='/images/nav/ns_x.gif' width=14 height=12 alt=''>"), 242a.append("</a>"),c&&a.append(" ")),a.append('<a href="'+b.key+"&e=T\" onclick='popupAutoSuggest.hideSuggestionBox(true); return true;' class=textwhite"+(c?"":" style='display:none'")+">"+PAGE_EDIT+"</a>"),a.append("</span>"),a.append("</td>"),a.append("</tr>"),a.append("</table>")):(a.append("<td nowrap style='padding:1 3 2 3; cursor:hand;' class='"+AUTO_SUGGEST_UBER_CLASS+"'"),a.append(" onmousedown='popupAutoSuggest.setValueFromSuggestion(\""+c+'", "'+b.key+"\", this, event); return false;'>"), 243a.append(b.sname));a.append("</td>")}; 244NLPopupAutoSuggest.prototype.constructMoreCell=function(a,b,c){a.append("<td nowrap style='cursor:pointer; padding:1 3 2 3; font-style:italic;' class='"+AUTO_SUGGEST_UBER_CLASS+"'");a.append(' onmousedown="NLPopupAutoSuggest_hidePopupSuggestion(); ');this.bUbersearch?a.append("popupAutoSuggest.runMoreUbersearch();"):(c=c.replace(/'/g,"\\'").replace(/"/g,"\\\\""),a.append("NLPopupSelect_runMoreSearch('"+b+"', '"+c+"');"));a.append(' return false;">');a.append(PAGE_MORE);a.append("</td>")}; 245NLPopupAutoSuggest.prototype.runMoreUbersearch=function(){document.getElementById("_searchSubmitter").onclick()};NLPopupAutoSuggest.prototype.selectCell=function(a){a!=null&&(this.unSelectCurrentCell(),a.className="dropdownSelected",this.bUbersearch&&a.firstChild&&a.firstChild.rows?setAutoSuggestCellProperties(a,!0):a.childNodes.length>1&&(a.childNodes[1].style.color="#EEEEEE"),this.currentcell=Number(a.parentNode.rowIndex))}; 246NLPopupAutoSuggest.prototype.unSelectCell=function(a){a!=null&&(a.className=AUTO_SUGGEST_UBER_CLASS,this.bUbersearch&&a.firstChild&&a.firstChild.rows?setAutoSuggestCellProperties(a,!1):a.childNodes.length>1&&(a.childNodes[1].style.color="#666666"),this.currentcell=-1)}; 247function setAutoSuggestCellProperties(a,b){var c=a.firstChild.rows[0].cells[0];a=a.firstChild.rows[0].cells[1];c.firstChild.className=b?"textwhitenolink":"smalltextnolink";c.firstChild.childNodes.length>1&&(c.firstChild.childNodes[1].style.color=b?"#EEEEEE":"#666666");a.firstChild.style.visibility=b?"visible":"hidden"}NLPopupAutoSuggest.prototype.selectCellByIndex=function(a){a=this.getCell(a);this.selectCell(a)}; 248NLPopupAutoSuggest.prototype.unSelectCurrentCell=function(){if(this.currentcell>=0){var a=this.getCell(this.currentcell);this.unSelectCell(a)}}; 249NLPopupAutoSuggest.prototype.doUberSearchClick=function(){var a=this.getCell(this.currentcell);if(a!=null&&a.firstChild&&a.firstChild.rows)if(a=a.firstChild.rows[0].cells[0],a.firstChild.onclick(),a=a.firstChild.href,this.bOnlyOneResult&&!isValEmpty(this.fieldvalue)){if(this.fieldvalue.toUpperCase().indexOf("E ")==0||isUpperCase(this.fieldvalue.charAt(0)))a=addParamToURL(a,"e","T",!0);this.fieldvalue.indexOf("::")>0||this.fieldvalue.indexOf("^")>0?nlOpenWindow(a,"uberres2"):document.location=a}else document.location= 250a;else a.onmousedown()};NLPopupAutoSuggest.prototype.getTableRows=function(){return this.suggestiondiv.firstChild.firstChild.childNodes};NLPopupAutoSuggest.prototype.getCell=function(a){return a>=0&&a<this.getTableRows().length?this.getTableRows()[a].firstChild:null};NLPopupAutoSuggest.prototype.selectNextCell=function(){var a=this.currentcell;
250this.unSelectCurrentCell();a>=0?(++a>this.getTableRows().length-1&&(a=0),this.selectCellByIndex(a)):this.selectCellByIndex(0)}; 251NLPopupAutoSuggest.prototype.selectPreviousCell=function(){var a=this.currentcell;this.unSelectCurrentCell();a>=1?this.selectCellByIndex(a-1):this.selectCellByIndex(this.getTableRows().length-1)}; 252NLPopupAutoSuggest.prototype.getSuggestionBoxDiv=function(){this.suggestiondiv==null&&(this.suggestiondiv=document.createElement("DIV"),this.suggestiondiv.style.position="absolute",this.suggestiondiv.className="popupsuggest",this.suggestiondiv.style.backgroundColor="#FFFFFF",this.suggestiondiv.style.borderColor="#999999",this.suggestiondiv.style.borderStyle="solid",this.suggestiondiv.style.borderWidth="1px 1px 1px 1px",this.suggestiondiv.style.display="none",this.suggestiondiv.style.zIndex="20",document.body.appendChild(this.suggestiondiv)); 253return this.suggestiondiv};NLPopupAutoSuggest.prototype.showSuggestionBox=function(a){clearTimeout(hidesuggesttimer);var b=this.getSuggestionBoxDiv();b.innerHTML=a;b.style.display="";this.visible=!0;this.positionSuggestionBox()}; 254NLPopupAutoSuggest.prototype.positionSuggestionBox=function(){var a=this.getSuggestionBoxDiv();a.style.overflow="";a.style.width="";a.firstChild.style.width="";var b=a.firstChild.offsetWidth;b>400&&(getDocumentClientWidth()-100<a.firstChild.offsetWidth&&(a.style.overflow="hidden"),b=Math.min(getDocumentClientWidth()-100,a.firstChild.offsetWidth),a.style.width=b);var c=this.xPos+(this.bmultiselect?1:0),d=this.yPos+this.inputfield.offsetHeight-1;isSafari&&(d+=0);a.offsetWidth<this.inputfield.offsetWidth&& 255(a.firstChild.style.width=this.inputfield.offsetWidth-2+"px");this.yPos+this.inputfield.offsetHeight-1+a.offsetHeight>getDocumentHeight()&&this.yPos>getDocumentHeight()-this.yPos&&(d=this.yPos-a.offsetHeight+(this.bmultiselect?1:0));this.xPos+b+10>getDocumentWidth()&&(c=this.xPos-(b-this.inputfield.offsetWidth));a.style.top=d+"px";a.style.left=c+"px"}; 256NLPopupAutoSuggest.prototype.hideSuggestionBox=function(a){this.visible&&(clearTimeout(popupsuggesttimer),this.suggestiondiv.style.display="none",this.suggestiondiv.style.width="",this.suggestiondiv.style.overflow="",this.visible=!1,a&&(this.inputfield.value=""),this.suggestiondiv=null)}; 257NLPopupAutoSuggest.prototype.addMultipleSelectValue=function(a,b){var c=getFormElement(this.inputfield.form,this.fieldname),d=getFormElement(this.inputfield.form,this.fieldname_hidden);addMultiSelectValue(d,a,b);c.value+="\n";setSelectionRange(c,c.value.length,c.value.length)}; 258NLPopupAutoSuggest.prototype.setValueFromSuggestion=function(a,b,c,d){setEventPreventDefault(d);setEventCancelBubble(d);NLPopupAutoSuggest_hidePopupSuggestion();if(this.bUbersearch)this.fieldvalue.indexOf("::")>0||this.fieldvalue.indexOf("^")>0?nlOpenWindow(b,"uberres2"):(document.location=b,this.inputfield.value="");else if(a=getFormElement(this.inputfield.form,this.fieldname),a!=null){d=c.innerHTML.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");c=getFormElement(this.inputfield.form, 259this.fieldname_hidden);if(this.bmultiselect){this.addMultipleSelectValue(b,d);a.haschanged=!0;a.isvalid=!0;if(c.onchange)c.onchange();a.setAttribute(previousValueAttrName,a.value)}else{if(isFirefox||isChrome){var e=a.onchange;a.onchange=null}a.value=d;d=c.value;c.value=b;c.onchange&&(c.onchange()==0?(c.value=d,a.value=a.getAttribute(previousValueAttrName)):(a.haschanged=!0,a.isvalid=!0,a.setAttribute(previousValueAttrName,a.value),NS&&NS.form&&NS.form.setValid(!0)));if(isFirefox||isChrome)a.onchange= 260e}NLPopupSelect_removeLoadingMessage()}};function NLPopupAutoSuggest_makePopupSuggestion(a,b,c,d){popupAutoSuggest==null&&(popupAutoSuggest=new NLPopupAutoSuggest);popupAutoSuggest.setAttributes(a,b,c,d);clearTimeout(popupsuggesttimer);popupsuggesttimer=setTimeout("popupAutoSuggest.constructSuggestionBox()",popupAutoSuggest.bUbersearch?250:200)} 261function autoSuggestOnMouseMove(a){popupAutoSuggest!=null&&(a=findClassUp(getEventTarget(a),AUTO_SUGGEST_UBER_CLASS),a!=null&&popupAutoSuggest.selectCell(a))}function NLPopupAutoSuggest_onMouseDown(a){popupAutoSuggest!=null&&(clearTimeout(popupsuggesttimer),popupAutoSuggest.visible&&findClassUp(getEventTarget(a),"popupsuggest")==null&&popupAutoSuggest.hideSuggestionBox())} 262function NLPopupAutoSuggest_onKeyDown(a){try{if(popupAutoSuggest!=null&&popupAutoSuggest.visible){var b=getEventKeypress(a);if(b==KC_DOWN)popupAutoSuggest.selectNextCell();else if(b==KC_UP)popupAutoSuggest.selectPreviousCell();else if((b==KC_ENTER||b==KC_TAB)&&popupAutoSuggest.currentcell>=0)if(popupAutoSuggest.bUbersearch)popupAutoSuggest.doUberSearchClick();else popupAutoSuggest.getCell(popupAutoSuggest.currentcell).onmousedown()}}catch(c){console&&console.log(c.message)}} 263function NLPopupAutoSuggest_ignoreKeyStrokes(a){return popupAutoSuggest!=null&&popupAutoSuggest.visible&&(a=getEventKeypress(a),a==KC_DOWN||a==KC_UP||popupAutoSuggest.currentcell>=0&&(a==KC_ENTER||a==KC_TAB))?!0:!1}function NLPopupAutoSuggest_isMultiSelect(a){return a.getAttribute("bmultiautosuggest")=="T"} 264function NLPopupAutoSuggest_handleKeyStroke(a,b,c,d,e){var f=NLPopupAutoSuggest_isMultiSelect(a)?getCurrentMultiSelectUserInputValue(a):a.value;c=getEventKeypress(c);
264if(c==KC_LEFT||c==KC_RIGHT||c==KC_SHIFT||c==KC_ESC)return!1;var g=trim(f),h=g.length,k=b=="uberautosuggest";if(k){var l=g.indexOf(":");l>0&&(h-=l+1)}h<=2&&g.charCodeAt(0)<2048&&(f!="%"||k)||c==KC_ENTER||c==KC_TAB?NLPopupAutoSuggest_hidePopupSuggestion():NLPopupAutoSuggest_makePopupSuggestion(a,b,d,e)} 265function NLPopupAutoSuggest_hidePopupSuggestion(){clearTimeout(popupsuggesttimer);popupAutoSuggest!=null&&popupAutoSuggest.hideSuggestionBox()}function NLPopupSelect_runMoreSearch(a,b){eval("Search"+a+'("'+b+'")')} 266function NLPopupSelect_positionDIV(){var a=window.popupDIV,b=a.getAttribute("bListOnly")=="T",c=a.getAttribute("bMultiselect")=="T"&&!b,d=a.getAttribute("bIsMultiButton")=="T";b=a.getAttribute("displayField")!=null?NLPopupSelect_getDisplayField(a.getAttribute("displayField")):NLPopupSelect_getLaunchButton(a.getAttribute("launchbutton"),d,b);if(a.getAttribute("bPositionWithMachine")=="T"&&a.getAttribute("machineName")!=null)try{for(var e=eval(a.getAttribute("machineName")+"_machine.tableobj;"),f=e.machine, 267g=0,h=0;h<f.countFormElements();h++){var k=f.getFormElement(h);if(k!=null&&(k.name==window.popupDIV.getAttribute("fieldName")||k.name==window.popupDIV.getAttribute("fieldName")+"_display"))break;k.type!="hidden"&&f.getFormElementLabel(h)!=null&&g++}var l=e.rows[f.currentRowNum].cells[g];var m=findAbsolutePosX(l);var n=findAbsolutePosY(l)+5}catch(p){m=b==null?Math.max(lastX,10):findAbsolutePosX(b)+(d?1:0),n=b==null?Math.max(lastY,10):findAbsolutePosY(b)+(d?1:0)}else m=b==null?Math.max(lastX,10):findAbsolutePosX(b)+ 268(d?1:0),n=b==null?Math.max(lastY,10):findAbsolutePosY(b)+(d?1:0);e=d=0;b!=null&&(b=findClassUp(b,BODY_SCROLL_DIV_CLASS),b!=null&&(d=b.scrollTop,e=b.scrollLeft));m-=e;b=n+15-d;e=getDocumentHeight();f=getDocumentWidth()-75;window.opener&&(e<=250||f<=510)&&(window.resizeTo(Math.max(600,f),Math.max(350,e)),e=getDocumentHeight(),f=getDocumentWidth()-75);k=document.getElementById("inner_popup_div");l=document.getElementById("popup_select_list");h=k.firstChild;g=parseInt(a.offsetHeight);if(g>325||g>=e)g= 269Math.min(350,Math.abs(e-(g-k.offsetHeight+25))),k.style.height=g+"px",c&&(l.style.height=g+"px");g=parseInt(a.offsetHeight);h.rows[0].cells.length>2?c?(c=600,h=250,f<c+h&&(h=Math.floor(f/3),c=2*h),NS.UI.Util.isRedwood||(document.getElementById("lower_header_label").style.width=c+"px"),k.style.width=c+"px",l.style.width=h+"px"):k.style.width=Math.min(650,f)+"px":c?(c=Math.floor(Math.min(600,Math.floor(f))/2),k.style.width=c+"px",l.style.width=c+"px"):a.style.width=Math.min(350,f)+"px";c=parseInt(a.offsetWidth); 270b+g>e&&(b=n-d-document.body.scrollTop-g>0?n-d-g+1:parseInt((e-g)/2)+document.body.scrollTop,a.getAttribute("bPositionWithMachine")=="T"&&(b-=5));m+c>f&&(m=getDocumentWidth()-c);m+c>f&&(m=getDocumentWidth()-c-40);m<document.body.scrollLeft&&(m=document.body.scrollLeft);NLPopupSelect_removeLoadingMessage();a.style.left=m+"px";a.style.top=b+"px"} 271function NLPopupSelect_isLoadingOrSearching(){return window.popupDIV!=null||window.popupDivLoadingMessage!=null&&document.getElementById(window.popupDivLoadingMessage.id)!=null}function NLPopupSelect_removeLoadingMessage(){window.popupDivLoadingMessage!=null&&document.getElementById(window.popupDivLoadingMessage.id)!=null&&document.body.removeChild(window.popupDivLoadingMessage);NLPopupAutoSuggest_hidePopupSuggestion()} 272function NLPopupSelect_init(a,b,c,d,e){NLPopupSelect_close();var f=document.createElement("DIV");f.style.zIndex=1E3;f.id="popup_outerdiv";f.className="popupouter";f.setAttribute("bIsMultiButton",b?"T":"F");f.setAttribute("bListOnly",c?"T":"F");f.setAttribute("bMultiselect",a?"T":"F");f.setAttribute("bPositionWithMachine",d?"T":"F");f.setAttribute("bShowQuantities",e?"T":"F");document.body.appendChild(f);window.popupDIV=f} 273function NLPopupSelect_reposition(){window.popupDIV!=null&&NLPopupSelect_positionDIV()} 274function NLPopupSelect_open(a,b){if(window.popupDIV!=null){var c=window.popupDIV.getAttribute("bIsMultiButton")=="T",d=window.popupDIV.getAttribute("bListOnly")=="T",e=window.popupDIV.getAttribute("bMultiselect")=="T";window.popupDIV.setAttribute("fieldName",a);b!=null&&window.popupDIV.setAttribute("machineName",b);b=a+(d?"_popup_listonly":c?"_popup_multi":"_popup_list");c=NLPopupSelect_getLaunchButton(b,c,d);c!=null&&c.nodeName=="IMG"&&window.popupDIV.setAttribute("launchbutton",b);e&&typeof top.popupAnchorId!= 275"undefined"&&top.popupAnchorId!=null&&document.getElementById(top.popupAnchorId)!=null&&window.popupDIV.setAttribute("displayField",top.popupAnchorId);e||document.getElementById(a+"_display")==null||window.popupDIV.setAttribute("displayField",a+"_display");NLPopupSelect_positionDIV();window.popup_onClickHandler=NLPopupSelect_onClick}} 276function NLPopupSelect_openFavoriteOptionsList(a,b,c,d,e,f,g,h,k){function l(q){q=(q||[]).map(u=>u.id+(u.quantity&&u.quantity!=""?"("+u.quantity+")":""));parent.InsertItems(q.join(String.fromCharCode(5)))}function m(q){alert(NO_MATCH_FOR+q);NS.form.setValid(!1);e&&(e.isvalid=!1,v(e))}function n(){e&&k&&k.length>0&&t!=e.value&&(e.value=t);window.popupFavoritePicker=null}function p(q){if(f)l(q);else{var u=q.newValue,z=q.newText;t=z;e.style.color="#000000";NS.form.setInited(!0);if(q.noItemMatch)m(z); 277else{q=e.value;e.value=z;var A=d.value;d.value=u;d.onchange()==0?(e.value=q,d.value=A):e.setAttribute("previousvalue",z)}}}function x(q){NS.form.setInited(!0)}function v(){return new Promise(q=>{if(b&&b!="null"){let u=getMachine(b);u&&u.gotoFieldWithName(a)}else setFieldFocus(e);setTimeout(q,100)})}var r,t,y=window.popupFavoritePicker,w=q=>{var u=getDropdown(d);u&&(q=Array.isArray(q.favoriteItems)?q.favoriteItems:[],u.setFavorites(q.map(z=>({value:z.id,text:z.name}))))};if(y!=null){if(y.searchValue=== 278k)return;y.close()}e&&(t=e.getAttribute("previousvalue"));NS.UIF.run(async({host:q})=>{var {LegacyPopupPicker:u}=await import("@nsn-ui/ui-apps-component");({context:q}=q);r=new u({owner:f?document.body:e,fieldId:a,sublistId:b,onSelectionChanged:p.bind(this),noItemMatch:m.bind(this),columnsDescription:h,addMultiple:f,label:c,i18n:q.i18n,onF
278avoriteItemsChanged:w.bind(this),onDataLoaded:x.bind(this),onClose:n.bind(this),searchValue:k,queryParams:g});v().then(()=>{r.open({target:e.parentElement})});window.popupFavoritePicker= 279r})}function NLPopupSelect_getLaunchButton(a,b,c){a=document.getElementById(a);a==null||b||c||(a=a.firstChild);return a}function NLPopupSelect_getDisplayField(a,b){return(b?b:document).getElementById(a)}function NLPopupSelect_getDisplayFieldByValueInput(a){var b=a.name+"_display",c=getFormElement(a.form,b);c||=NLPopupSelect_getDisplayField(b,a.ownerDocument);return c} 280function NLPopupSelect_displayLoadingDiv(a,b,c){if(window.popupDivLoadingMessage==null){var d=document.createElement("DIV");d.id="popup_load_message";window.popupDivLoadingMessage=d}c=c==null?PAGE_LOADING:c;window.popupDivLoadingMessage.innerHTML=NS.UI.Util.isRedwood?`<div class='popup-load-title'>${c}</div>`:"<table width='100%' role='presentation'><tr><td valign='middle' class='texttablectr'>"+c+"</td></tr></table>";document.body.appendChild(window.popupDivLoadingMessage);a=((c=document.getElementById(a+ 281"_display"))?c.closest(".uir-select-input-container"):null)||c;d=findClassUp(c,BODY_SCROLL_DIV_CLASS);var e=0;c=0;d!=null&&(e=d.scrollTop,c=d.scrollLeft);a==null||b?(b=Math.max(lastY,10)+document.body.scrollTop,c=Math.max(lastX,10)+document.body.scrollLeft):(b=findAbsolutePosY(a)+a.offsetHeight-1-e,c=findAbsolutePosX(a)-c,window.popupDivLoadingMessage.style.width=Math.max(75,a.offsetWidth)+"px");b+30>getDocumentHeight()+document.body.scrollTop-10&&(b=getDocumentHeight()+document.body.scrollTop-30); 282c+150>getDocumentWidth()+document.body.scrollLeft-10&&(c=getDocumentWidth()+document.body.scrollLeft-175);window.popupDivLoadingMessage.style.left=c+"px";window.popupDivLoadingMessage.style.top=b+"px";window.popupDivLoadingMessage.style.zIndex=10}function NLPopupSelect_onClick(a){if(!isSafari){var b=window.popupDIV;if(b!=null){a=getEventTarget(a);var c=findClassUp(a,"popupouter");c!=null&&c==b&&a.title!="Close"||NLPopupSelect_close()}}} 283function NLPopupSelect_close(a){for(var b=window;(b.popupDIV==null||typeof b.popupDIV=="undefined")&&b!=window.parent;)b=window.parent;var c=b.popupDIV;b.popupDIV!=null&&typeof b.popupDIV!="undefined"&&(c.getAttribute("launchbutton")!=null&&c.getAttribute("bIsMultiButton")=="F"&&NLPopupSelect_getLaunchButton(c.getAttribute("launchbutton"),c.getAttribute("bIsMultiButton")=="T",c.getAttribute("bListOnly")=="T"),NS.jQuery("#"+c.id).remove(),a&&(a=b.document.getElementById(c.getAttribute("fieldName")+ 284"_display"),a!=null&&NLPopupSelect_focusNextInputField(a.name,a.form,!0)),b.popupDIV=null)}function NLPopupSelect_getElementOrFromParent(a){var b=document.getElementById(a);b==null&&(b=parent.document.getElementById(a));return b}function NLPopupSelect_addSelection(a,b){var c=NLPopupSelect_getElementOrFromParent("popup_select_list");NLPopupSelect_addSelectionRow(a,b,c.firstChild,c)} 285function NLPopupSelect_addSelectionRow(a,b,c,d){var e=window.popupDIV.getAttribute("bShowQuantities")=="T",f=document.createElement("tr");f.className="multiselecttr";var g=document.createElement("td");g.className="text";g.style.width="14px";g.style.whitespace="nowrap";g.style.verticalAlign=e?"top":"middle";g.style.align="right";var h=document.createElement("a");h.href="javascript:void(0)";a=a.replace(/'/g,"\\'");h.onclick=new Function("NLPopupSelect_updateSelection('"+a+"','', false, this); return false;"); 286var k=document.createElement("img");k.className="uir-popup-x-icon";k.border="0";k.height=13;k.width=13;k.src="/images/x.gif";h.appendChild(k);g.appendChild(h);f.appendChild(g);g=document.createElement("td");g.className="text";e&&(g.style.verticalAlign="top");h=null;window.popupDIV.getAttribute("bShowQuantities")=="T"&&(k=NLPopupSelect_getQuantityArray(b),k!=null&&(b=k[0],h=k[1]));g.textContent=b;f.appendChild(g);window.popupDIV.getAttribute("bShowQuantities")=="T"&&(b=document.createElement("td"), 287b.className="text",b.style.whitespace="nowrap",b.style.verticalAlign="top",b.style.align="right",b.innerHTML="<input class=input type=text name='quantity_"+a+"' size=4 value='"+(h!=null?h:"")+"' onChange='NLPopupSelect_updateQuantity(\""+a+"\",this.value)'>",f.appendChild(b));c.rows.length==(e?2:1)&&c.rows[e?1:0].className=="noselections"&&c.deleteRow(e?1:0);c.firstChild.appendChild(f);d!=null&&d.scrollHeight>d.offsetHeight&&(d.scrollTop=d.scrollHeight-d.offsetHeight);return f} 288function NLPopupSelect_getQuantityArray(a){var b=RegExp("^\\s*(\\S+)\\s*\\(\\s*(-?\\d+\\.?\\d*)\\s*\\)\\s*$").exec(a);return b!=null?[b[1],b[2]]:[a,""]}function NLPopupSelect_getQuantityText(a,b){b=NLStringToNumber(b);return isNaN(b)||isValEmpty(b)?a:a+"("+b+")"} 289function NLPopupSelect_updateQuantity(a,b){var c=NLPopupSelect_getElementOrFromParent("multisel_complete"),d=c.elements[FIELD_DATA];c=c.elements[FIELD_LABEL];var e=trim(d.value),f=trim(c.value);e=e.split(String.fromCharCode(5));f=f.split(String.fromCharCode(5));for(var g=!1,h=0;h<e.length;h++)NLPopupSelect_getQuantityArray(e[h])[0]==a&&(g=!0,e[h]=NLPopupSelect_getQuantityText(a,b),f[h]=e[h]);g&&(d.value=e.join(String.fromCharCode(5)),c.value=f.join(String.fromCharCode(5)))} 290var nlpopupselect_removerow=null;function NLPopupSelect_removeSelection(a,b){NLPopupSelect_getElementOrFromParent("popup_select_list");nlpopupselect_removerow=findClassUp(b,"multiselecttr");setTimeout("NLPopupSelect_removeRowAfterTimeout()",1)}function NLPopupSelect_removeRowAfterTimeout(){var a=nlpopupselect_removerow.parentNode.parentNode;nlpopupselect_removerow.parentNode.deleteRow(nlpopupselect_removerow.rowIndex);NLPopupSelect_insertNoSelectionRow(a.firstChild);nlpopupselect_removerow=null} 291function NLPopupSelect_insertNoSelectionRow(a){var b=window.popupDIV.getAttribute("bShowQuantities")=="T";if(a.rows.length==(b?1:0)){var c=document.createElement("tr"),d=document.createElement("td");c.className="noselections";d.className="textctr";d.innerHTML=PAGE_NO_SELECTIONS_MADE;b&&(d.colSpan=3);c.appendChild(d);a.appendChild(c);a=NLPopupSelect_getElementOrFromParent("multisel_complete");a.elements[FIELD_DATA].value="";a.elements[FIELD_LABEL].value=""}} 292function NLPopupSelect_updateSelection(a,b,c,d){var e=NLPopupSelect_getElementOrFromParent("multisel_complete"),f=e.elements[FIELD_DATA];e=e.elements[FIELD_LABEL];var g=trim(f.value),h=trim(e.value);if(isValEmpty(g)){var k=[];h=[]}else k=g.split(String.fromCharCode(5)),h=h.split(String.fromCharCode(5));if(c){d=!0;for(c=0;c<k.length;c++)if(h=k[c].indexOf("("),(h>0?k[c].substring(0,h):k[c])==a){d=!1;break}k=typeof NLPopupSelect_canAddSelection=="undefined"||NLPopupSelect_canAddSelection==null?!0:NLPopupSelect_canAddSelection(a, 293b,k);d&&k&&(g==""?(e.value=b,f.value=a):(f.value+=String.fromCharCode(5)+a,e.value+=String.fromCharCode(5)+b),NLPopupSelect_addSelection(a,b))}else for(b=window.popupDIV.getAttribute("bShowQuantities")=="T",g=0,f.value="",e.value="",c=0;c<k.length;c++)k[c]==a||b&&NLPopupSelect_getQuantityArray(k[c])[0]==a?NLPopupSelect_removeSelection(a,d):(f.value+=(g==0?"":String.fromCharCode(5))+k[c],e.value+=(g==0?"":String.fromCharCode(5))+h[c],g++)} 294function NLPopupSelect_focusNextInputField(a,b,c){try{if(a!=null&&b!=null)for(var d=!1,e=0;e<b.elements.length;e++)if(d){var f=b.elements[e];if(isFocusable(f)){isNLDropDown(f)?setSelectFocus(f):f.focus&&f.focus();c&&f.select&&f.select();break}}else b.elements[e].name==a&&(d=!0)}catch(g){}}
294function setButtonDown(a,b,c){b=c.parentNode.parentNode;a?b.className.indexOf("_sel")==-1&&(b.className=b.className.split(" ").join("_sel ")+"_sel"):b.className=b.className.replace(/_sel/g,"")} 295function onTristateClick(a){setTristate(a,a.nextSibling.value+1)}function onTristateHighlight(a,b){a.src="/images/icons/controls/checkbox_"+(a.nextSibling.value&3)+(b?"_hl.gif":".gif");return!0}function setTristate(a,b){var c=a.nextSibling;c.value=4|b%3;a.src="/images/icons/controls/checkbox_"+(c.value&3)+".gif";return!0}function disableLineRefresh(a){a.disabled=!0;a.firstChild.src="/images/icons/dashboard/refresh_line_disabled.gif"} 296function doNewbarAction(a){a=document.getElementById(a);if(a!=null&&a.onclick)a.onclick()}function nlQuickLooksPopup(a){window.open("/images/guide/quicklooks.html?"+a,"popupguide","toolbar=no,statusbar=no,menubar=no,resizable=no,left=1,top=1,height=700,width=300").focus()}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};NLProgressBar=Class.create(); 297NLProgressBar.prototype={initialize:function(a){this.hndDialogDiv=null;this.sId=a||"NLProgressBar"},show:function(a){var b=NS.jQuery(document).width()/2,c=NS.jQuery(document).height()/2;this.hndDialogDiv||(this.hndDialogDiv=document.createElement("div"),this.hndDialogDiv.innerHTML='<table style="font-size:70%;" cellpadding=0 cellspacing=0 border=0 width=350 role="presentation"> <tr> <td colspan=3><IMG SRC="/images/icons/progress/progress_waitBar_top.gif" ALT="" WIDTH=350 HEIGHT=10 BORDER=0></td> </tr> <tr> <td background="/images/icons/progress/progress_waitBar_l.gif"><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=4 HEIGHT=1 BORDER=0></td> <td bgcolor="#F1F1F1" align=center> <IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=342 HEIGHT=4 BORDER=0><br> <table cellpadding=0 cellspacing=0 border=0 role="presentation"> <tr><td colspan=2 style="font-size:70%;">'+ 298a+'</td></tr> <tr><td colspan=2><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=1 HEIGHT=3 BORDER=0></td></tr> <tr> <td align=center><IMG SRC="/images/icons/progress/progress_waitBar.gif" ALT="" WIDTH=249 HEIGHT=20 BORDER=0></td> <td> </td> </tr> <tr><td colspan=2><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=1 HEIGHT=10 BORDER=0></td></tr> </table> </td> <td background="/images/icons/progress/progress_waitBar_r.gif"><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=4 HEIGHT=1 BORDER=0></td> </tr> <tr> <td background="/images/icons/progress/progress_waitBar_l.gif"><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=4 HEIGHT=1 BORDER=0></td> <td bgcolor="#F1F1F1" align=center> <IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=342 HEIGHT=10 BORDER=0><br> </td> <td background="/images/icons/progress/progress_waitBar_r.gif"><IMG SRC="/images/icons/progress/progress_x.gif" ALT="" WIDTH=4 HEIGHT=1 BORDER=0></td> </tr> <tr> <td colspan=3><IMG SRC="/images/icons/progress/progress_waitBar_bot.gif" ALT="" WIDTH=350 HEIGHT=10 BORDER=0></td> </tr></table>', 299this.hndDialogDiv.style.display="none",this.hndDialogDiv.style.zIndex="1000",this.hndDialogDiv.style.position="absolute",document.body.appendChild(this.hndDialogDiv));this.hndDialogDiv.style.display!="block"&&(this.hndDialogDiv.style.display="block",this.hndDialogDiv.style.top=c-this.hndDialogDiv.clientHeight/2+"px",this.hndDialogDiv.style.left=b-this.hndDialogDiv.clientWidth/2+"px")},hide:function(){this.hndDialogDiv!=null&&(this.hndDialogDiv.style.display="none")}}; 300function getIFrameDocument(a){return document.getElementById(a).contentDocument?document.getElementById(a).contentDocument:document.frames[a].document}function getIFrameWindow(a){return document.getElementById(a).contentWindow?document.getElementById(a).contentWindow:document.frames[a].window} 301function notifyPortlet(a,b){a=="-10018"&&window.schedulersef!="undefiined"&&window.schedulersef!=null&&(b==EVENT_PORTLET_MIN?window.schedulersef.handlePortletMin():b==EVENT_PORTLET_MAX?window.schedulersef.handlePortletMax():b==EVENT_PORTLET_MOVE?window.schedulersef.handlePortletMove():b==EVENT_PORTLET_DROP?window.schedulersef.handlePortletDrop():b==EVENT_PORTLET_DRAG&&window.schedulersef.handlePortletDrag())} 302function setImageButtonState(a,b,c,d){var e=document;typeof d!="undefined"&&d!=null&&(e=d.document);a=e.getElementById(a);a!=null&&(a.disabled=!b,a.classList.toggle("uir-disabled",!b),typeof c!="undefined"||c!=null)&&(a=a.getElementsByTagName("img")[0])&&(a.src=c)}function setMultiButtonState(a,b){a=getNLMultiButtonByName(a);a!=null&&a.setState(b)}function setLabelState(a,b,c){var d=document;typeof c!="undefined"&&c!=null&&(d=c.document);a=d.getElementById(a);a!=null&&(a.className=b)} 303function setNewbarGif(a){var b=document.getElementById("img_newbar_more");b!=null&&(b.className=a?"ri_personalize":"ri_personalize_hover")}var NLSpinner=Class.create(); 304NLSpinner.prototype={initialize:function(a,b,c,d,e){this.sTagName=a;this.currentValue=b;this.step=c;this.lowerBound=parseFloat(d);
304this.upperBound=parseFloat(e);this.interval=500;this.repeatInterval=200;this.timer=null;this.direction=1},_step:function(){var a=this.direction>=0?parseFloat(parseFloat(document.getElementById(this.sTagName).value)+parseFloat(this.step)):parseFloat(parseFloat(document.getElementById(this.sTagName).value)-parseFloat(this.step));a>this.upperBound?a=this.upperBound:a<this.lowerBound&& 305(a=this.lowerBound);document.getElementById(this.sTagName).value=parseFloat(a)},_mousedown:function(a){this._step();var b=this._mousedown.bind(this,"F");this.timer=setTimeout(b,a=="T"?this.interval:this.repeatInterval)},_releasemouse:function(){this.timer&&(clearTimeout(this.timer),this.timer=null,document.getElementById(this.sTagName).onchange());this.direction>=0?document.getElementById(this.sTagName+"_rarrow").setAttribute("src",RIGHT_ARROW_DEFAULT):document.getElementById(this.sTagName+"_larrow").setAttribute("src", 306LEFT_ARROW_DEFAULT)},_scrollUp:function(){this.direction=1;document.getElementById(this.sTagName+"_rarrow").setAttribute("src",RIGHT_ARROW_PRESS);this._mousedown("T")},_scrollDown:function(){this.direction=-1;document.getElementById(this.sTagName+"_larrow").setAttribute("src",LEFT_ARROW_PRESS);this._mousedown("T")}}; 307function NLDragDrop(a,b,c){this.doc=c?c:document;this.sourceElem=a;this.listener=b;this.eventSource=null;this.bInitDrag=!0;window.loadcomplete?this.attachEventHandlers(a):attachEventHandler("load",window,function(d){this.attachEventHandlers()}.bind(this))} 308NLDragDrop.prototype.attachEventHandlers=function(){typeof this.sourceElem=="string"&&(this.sourceElem=doc.getElementById(sourceElem));this.sourceElem&&(attachEventHandler("mousedown",this.sourceElem,function(a){this.handleMouseDown(a)}.bind(this)),attachEventHandler("mousemove",this.doc,function(a){this.handleMouseMove(a)}.bind(this)),attachEventHandler("mouseup",this.doc,function(a){this.handleMouseUp(a)}.bind(this)))}; 309NLDragDrop.prototype.handleMouseDown=function(a){a=getEvent(a);this.eventSource=getEvent(a);if(!this.onMouseDown(a))return!0;getEvent(a);return this.mouseDown=!0};NLDragDrop.prototype.handleMouseMove=function(a){if(!this.mouseDown)return!0;a=getEvent(a);var b=!0;this.bInitDrag&&(b=this.onInitMouseMove(a));if(b)this.bInitDrag=!1;else return this.clear(),a.cancelBubble=!0,a.returnValue=!1;this.onMouseMove(a);a.cancelBubble=!0;return a.returnValue=!1}; 310NLDragDrop.prototype.handleMouseUp=function(a){if(!this.mouseDown)return!0;a=getEvent(a);this.onMouseUp(a);this.clear();a.cancelBubble=!0;return a.returnValue=!1};NLDragDrop.prototype.clear=function(){this.mouseDown=!1;this.eventSource=null;this.bInitDrag=!0};NLDragDrop.prototype.onMouseDown=function(a){return this.listener&&this.listener.onMouseDown?this.listener.onMouseDown(a):!0}; 311NLDragDrop.prototype.onInitMouseMove=function(a){return this.listener&&this.listener.onInitMouseMove?this.listener.onInitMouseMove(a):!0};NLDragDrop.prototype.onMouseMove=function(a){return this.listener&&this.listener.onMouseMove?this.listener.onMouseMove(a):!0};NLDragDrop.prototype.onMouseUp=function(a){return this.listener&&this.listener.onMouseUp?this.listener.onMouseUp(a):!0};var NLDRAG_LEFT=1,NLDRAG_RIGHT=2,NLDRAG_LEFT_RIGHT=3,NLDRAG_UP=4,NLDRAG_DOWN=8,NLDRAG_UP_DOWN=12; 312function NLAttachSimpleColumnResizer(a,b,c,d,e,f,g){return new NLSimpleColumnResizer(a,b,c,d,e,f,g)} 313function NLSimpleColumnResizer(a,b,c,d,e,f,g){g=g?g:document;this.triggerElem=typeof a=="string"?g.getElementById(a):a;this.targetElem=typeof b=="string"?g.getElementById(b):b;new NLDragDrop(this.triggerElem,this,g);this.direction=c==NLDRAG_UP_DOWN?NLDRAG_UP_DOWN:NLDRAG_LEFT_RIGHT;this.min=d>=0?d:0;this.max=e>=0&&e>d?e:Number.MAX_VALUE;this.listener=f;this.initVal=null;this.sCursor=this.direction==NLDRAG_UP_DOWN?"n-resize":"w-resize";this.setCursor(this.sCursor,this.triggerElem)} 314NLSimpleColumnResizer.prototype.getValue=function(a){return this.direction==NLDRAG_LEFT_RIGHT?getMouseX(a):this.direction==NLDRAG_UP_DOWN?getMouseY(a):null};NLSimpleColumnResizer.prototype.onMouseDown=function(a){var b=getEventTarget(a);if(!contains(this.triggerElem,b))return!1;this.initVal=this.getValue(a);return this.canResize(a)?!0:!1}; 315NLSimpleColumnResizer.prototype.onInitMouseMove=function(a){a=getEvent(a);this.listener&&this.listener.onStartResize?this.dragDiv=this.listener.onStartResize(a,this):this.startResize(a,this);return!0};NLSimpleColumnResizer.prototype.onMouseMove=function(a){a=getEvent(a);if(!this.canResize(a))return!1;if(this.listener&&this.listener.onResize)this.listener.onResize(a,this);else this.resize(a);return!0}; 316NLSimpleColumnResizer.prototype.onMouseUp=function(a){a=getEvent(a);if(this.listener&&this.listener.onEndResize)this.listener.onEndResize(a,this);else this.endResize(a);this.resetCursor()};
317NLSimpleColumnResizer.prototype.canResize=function(a){if(this.listener&&this.listener.onCanResize)return this.listener.onCanResize(a,this);a=this.getValue(a)-this.initVal;var b=(this.direction==NLDRAG_LEFT_RIGHT?this.targetElem.offsetWidth:this.targetElem.offsetHeight)+a;return b>=this.min&&b<=this.max||b<this.min&&a>0||b>this.max&&a<0};NLSimpleColumnResizer.prototype.startResize=function(a){this.setCursor(this.sCursor);this.showDragDiv(a)};NLSimpleColumnResizer.prototype.resize=function(a){this.positionDragDiv(a)}; 318NLSimpleColumnResizer.prototype.endResize=function(a){a=this.direction==NLDRAG_LEFT_RIGHT?this.targetElem.offsetWidth+this.getValue(a)-this.initVal:this.targetElem.offsetHeight+this.getValue(a)-this.initVal;a>this.max?a=this.max:a<this.min&&(a=this.min);this.direction==NLDRAG_LEFT_RIGHT?this.targetElem.style.width=a+"px":this.targetElem.style.height=a+"px";this.cleanUp()}; 319NLSimpleColumnResizer.prototype.showDragDiv=function(a){if(this.dragDiv==null){this.dragDiv=document.createElement("div");this.dragDiv.style.position="absolute";var b=document.createElement("img");b.src="/images/nav/stretch.gif";b.width="3";this.dragDiv.appendChild(b);this.dragDiv.style.backgroundColor="#999999";setObjectOpacity(80,this.dragDiv);document.body.appendChild(this.dragDiv)}this.direction==NLDRAG_LEFT_RIGHT?(this.dragDiv.style.top=findPosY(this.targetElem)+"px",this.dragDiv.firstChild.height= 320this.targetElem.offsetHeight):(this.dragDiv.style.left=findPosX(this.targetElem)+"px",this.dragDiv.firstChild.width=this.targetElem.offsetWidth);this.dragDiv.style.display="";this.positionDragDiv(a)};NLSimpleColumnResizer.prototype.cleanUp=function(){this.hideDragDiv();this.initVal=null};NLSimpleColumnResizer.prototype.hideDragDiv=function(){this.dragDiv.style.display="none"}; 321NLSimpleColumnResizer.prototype.positionDragDiv=function(a){a=this.getValue(a);this.direction==NLDRAG_LEFT_RIGHT?this.dragDiv.style.left=a+"px":this.dragDiv.style.top=a+"px"};NLSimpleColumnResizer.prototype.setCursor=function(a,b){b||(b=document.body);b.origCursor||(b.origCursor=b.style.cursor);b.style.cursor=a};NLSimpleColumnResizer.prototype.resetCursor=function(a){a||(a=document.body);a.origCursor&&a.origCursor.length>0?(a.style.cursor="default",a.origCursor=null):a.style.cursor="default"}; 322function closeBanner(a){if(a=document.getElementById(a))a.parentNode.removeChild(a),sendRequestToFrame("/core/pages/uibannerpref.nl?prefValue=F&prefName=SHOWCHILESUEBANNER","server_commands")} 323function showMenu(a,b,c,d,e){try{if(!window.loadcomplete)return isNaN(d)&&(d=0),d++,setTimeout(function(){showMenu(a,b,c,d,e)},1E3*d+1),!1;var f=document.getElementById(a);if(f!=null){var g=f.id.substring(4,f.id.length);if((!window.menuData||window.menuData[g]==null)&&c!=null)return loadDelayedNMD(c,g);if(!menuDataExists(g))return!1;lastMenuRequested=null;return getMenu(g,e).showHide(b)}}catch(h){console&&console.log(h.message)}} 324function openLastMenuRequested(){try{var a=lastMenuRequested;lastMenuRequested=null;if(a==null||!menuDataExists(a))return!1;var b=lastMenuRequestedParent;if(b!=null){if(lastMenuRequestedParent=null,document.getElementById(b)!=null)return getMenu(a).open(b,!1)}else return getMenu(a).showHide(!0)}catch(c){console&&console.log(c.message)}} 325NLMultiButton.prototype.getMenu=function(){function a(e){switch(e.keyCode){case KC_UP:if(e.currentIndex===0)return d.focus(),b.close(),!1;break;case KC_ESC:d.focus()}return!0}var b=this.menu;if(!b){var c=this.sName;b=this.menu=new NLMenu(c,this.sParams,0,null,null,a);menus[c]=b;menuTimers[b.tabName]=0;b.setScaleToLauncher(!0);isSafari&&!isChrome?(b.setMenuCSSClass("ddmDivButtonSec"),b.setXandYoverride(8,-1)):(b.setMenuCSSClass(this.bSecondary?"ddmDivButtonSec":this.bYellowBg?"ddmDivButtonY":"ddmDivButtonG"), 326b.setXandYoverride(4,-4));b.setCloseAction("getNLMultiButtonByName('"+c+"').onMenuClose();");b.setAfterOpenAction("getNLMultiButtonByName('"+c+"').onAfterMenuOpen();");this.imgbtn=document.getElementById("multibtnimg_"+c);this.btnMain=document.getElementById("btn_"+c)}var d=this.btnMain;return b};setMenuZoomFactor(ZOOM_FACTOR); 327function manageScrollDiv(a,b){var c=document.getElementById(a);if(c!=null&&!(c.className=="scrollarea"&&c.scrollHeight>MAX_SCROLLABLE_PORTLET_HEIGTH)){var d=!1;c.offsetHeight>MAX_SCROLLABLE_PORTLET_HEIGTH?(c.className="scrollarea",c.style.height=MAX_SCROLLABLE_PORTLET_HEIGTH+"px",document.getElementById("scrl_line_"+a).style.display="",d=!0):(c.className="",c.style.height="",document.getElementById("scrl_line_"+a).style.display="none");b!=null&&b!=-1&&resetLabelRowCellSizes(document.getElementById("enhlabel"+ 328b),c.firstChild,d)}} 329function renderRedwoodThemeSwitch(a,b,c){a.closest(".uir-tab-fields").style.display="flex";NS.UIF.run(async({host:d,Core:e})=>{var {RedwoodThemeSwitch:f,RedwoodThemeFeedback:g}=await import("@nsn-ui/ui-apps-component");await e.Html.waitDocumentReady();f.render({host:d,target:a,initialValue:nlapiGetFieldValue(b)==="T",onToggle:function({value:h}){var k=nlapiGetFieldValue("COLORTHEME"),l=nlapiGetFieldValue("COLORTHEME_REDWOOD");nlapiSetFieldValue(b,h?"T":"F");nlapiSetFieldDisplay("COLORTHEME",!h);nlapiSetFieldDisplay("ACCESSIBILITY_HIGH_CONTRAST", 330!h);nlapiSetFieldDisplay("COLORTHEME_REDWOOD",h);nlapiDisableField("FONT",h);nlapiDisableField("SYSTEMLARGEFONTS",h);nlapiDisableField("MSIE_ZOOM_FACTOR",h);nlapiDisableField("CHART_THEME",h);nlapiDisableField("CHART_BACKGROUND",h);nlapiDisableField("EDITORFONT",h);nlapiDisableField("EDITORFONTSIZE",h);h&&l==="-2"&&typeof c==="function"&&(k=c(k),nlapiSetFieldValue("COLORTHEME_REDWOOD",k||"-5"));!h&&NS.UI.Util.isRedwood&&g.showModal(d,a)}})})} 331function attachTextareaResizer(a,b){function c(t){t.preventDefault();k=!0;l=t.clientX;m=t.clientY;n=g.clientWidth;p=g.clientHeight;t=g.getBoundingClientRect();r=document.createElement("div");r.className="uir-resizable-element-placeholder";r.style.left=t.left+window.scrollX+"px";r.style.top=t.top+window.scrollY+"px";r.style.width=n+"px";r.style.height=p+"px";document.body.appendChild(r);document.addEventListener("mousemove",d);document.addEventListener("mouseup",e)}function d(t){t.buttons===0&&e(); 332if(k){var y=h==="horizontal"?0:t.clientY-m;r.style.width=Math.max(x,n+(h==="vertical"?0:t.clientX-l))+"px";r.style.height=Math.max(v,p+y)+"px"}}function e(){k=!1;g.dataset.resized="true";h!=="vertical"&&(g.style.width=r.style.width);
332h!=="horizontal"&&(g.style.height=r.style.height);document.body.removeChild(r);r=null;document.removeEventListener("mousemove",d);document.removeEventListener("mouseup",e)}b=b||{};var f=a.target,g=f&&f.closest(b.target),h=f.dataset.resize??"both",k=!1,l,m,n,p,x=b.minWidth|| 333100,v=b.minHeight||50,r=null;g&&c(a)}; 334//# sourceMappingURL=/assets/legacy_widgets/1736673526.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.