/*! * OutSystems Platform Server 11.23.0.40636 * Copyright OutSystems Inc. All rights reserved. */ function makeRequestsPararameters(a,b,c,d,e,f,g){return{origin:b,eventTarget:c,ajaxEvent:d,bucketIds:e,eventContext:OsBuildAjaxEventContext(a,b,f),callbackRequest:g}}function OsAjax(a,b,c,d,e,f,g){outsystems.internal.$(function(){try{clearTimeout(osAjaxDelayedTimeout),osQueue.push(makeRequestsPararameters(a,b,c,d,e,f,g)),1==osQueue.length&&OsCallQueue()}catch(h){window.OsHandleSystemException&&window.OsHandleSystemException(h,"OsAjax")}})}function OsAjaxDelayedTrigger(){try{clearTimeout(osAjaxDelayedTimeout);for(var a=0;a0&&osQueue.shift(),osQueue.length>0&&OsCallQueue()}function OsInitializeSpanDisplay(a){return"inline"==a.css("display")?a.add(a.children().filter(function(){return"block"==outsystems.internal.$(this).css("display")})):a}function OsRegisterEffectHighlight(){osCurrentAfterChange=function(a){return function(b){if(null!=a&&a(b),"none"!=b.css("display")){var c=OsInitializeSpanDisplay(b);b.hide(),c.effect("highlight",{color:osRegisterEffectHighlightColor},osRegisterEffectHighlightTime)}}}(osCurrentAfterChange)}function OsRegisterEffectListRemoveHighlight(){osCurrentBeforeChange=function(a){return function(b){null!=a&&a(b),"none"!=b.css("display")&&OsInitializeSpanDisplay(b).effect("highlight",{color:osRegisterEffectHighlightColor},osRegisterEffectListRemoveHighlightTime)}}(osCurrentBeforeChange)}function OsRegisterEffectFade(){osCurrentBeforeChange=function(a){return function(b){null!=a&&a(b),"none"!=b.css("display")&&OsInitializeSpanDisplay(b).customFadeTo(osRegisterEffectFadeOutTime,.01)}}(osCurrentBeforeChange),osCurrentAfterChange=function(a){return function(b){"none"!=b.data("display")&&(b.css("opacity","0.01"),OsInitializeSpanDisplay(b).customFadeTo(osRegisterEffectFadeInTime,1)),null!=a&&a(b)}}(osCurrentAfterChange)}function OsRegisterEffectVerticalSlide(){osCurrentBeforeChange=function(a){return function(b){null!=a&&a(b),"none"!=b.css("display")&&OsInitializeSpanDisplay(b).slideUp(osRegisterEffectVerticalSlideUpTime)}}(osCurrentBeforeChange),osCurrentAfterChange=function(a){return function(b){"none"!=b.data("display")&&(b.css("display","none"),OsInitializeSpanDisplay(b).slideDown(osRegisterEffectVerticalSlideDownTime)),null!=a&&a(b)}}(osCurrentAfterChange)}function OsSetInnerHTML(a,b){if(OsIsIE())switch(a.tagName.toLowerCase()){case"table":case"tbody":case"thead":case"tfoot":case"tr":var c;"table"==a.tagName.toLowerCase()?c=""+b+"
":"tr"==a.tagName.toLowerCase()&&(c=""+b+"
");var d=a.ownerDocument.createElement("div");d.innerHTML=c;var e;for("table"==a.tagName.toLowerCase()?e=d.firstChild:/tbody|thead|tfoot/.test(a.tagName.toLowerCase())?e=d.firstChild.firstChild:"tr"==a.tagName.toLowerCase()&&(e=d.firstChild.firstChild.firstChild);a.hasChildNodes();)a.removeChild(a.firstChild);for(;e.hasChildNodes();)a.appendChild(e.firstChild);break;case"span":var d=a.ownerDocument.createElement("div");for(d.innerHTML=b;a.hasChildNodes();)a.removeChild(a.childNodes[0]);for(;d.hasChildNodes();)a.appendChild(d.childNodes[0]);break;case"img":break;default:a.innerHTML=b}else{if("img"==a.tagName.toLowerCase())return;a.innerHTML=b}}function OsExtractScriptTags(a){var b=[],c="",d=a,e=/",this.PADDING=/^\s*()?\s*$/,this.XHR=null,this.HasDetectedErrorResponse=!1,this.LastProcessedResponseLength=0,this.LastProcessedScriptCloseIndex=0,this.ProcessPartialResponse=function(a){if(!this.HasDetectedErrorResponse){if(!window.OS_SkipInjectionValidation){var b=a.lastIndexOf(this.OPEN),c=a.indexOf(this.CLOSE,b);a=a.substring(a.indexOf(this.OPEN),c+this.CLOSE.length)}if(a.length>this.LastProcessedResponseLength){var d=a.lastIndexOf(this.CLOSE);if(-1==d||d+this.CLOSE.length<=this.LastProcessedScriptCloseIndex)return;for(;!this.HasDetectedErrorResponse&&this.LastProcessedScriptCloseIndex0||0=="yyyy-MM-dd".length)&&"yyyy-MM-dd"||"yyyy-MM-dd",_TIME_FORMAT="HH:mm:ss",_DATE_TIME_FORMAT=_DATE_FORMAT+" "+_TIME_FORMAT,ctDMY=0,ctYMD=1,ctDayIdx=0,ctMonthIdx=1,ctYearIdx=2,ctHM=0,ctHMS=1,ctTimYear=1900,ctTimMonth=1,ctTimDay=1,ctNbrThousandsSepDefault=" ",ctNbrDecimalPlacesDefault=-1,dtText=new OsDataType(ctTypeStr),dtInteger=new OsDataType(ctTypeNbr,!1,"",""),dtLongInteger=new OsDataType(ctTypeNbr,!1,"","",!0),dtDecimal=new OsDataType(ctTypeNbr,!0,".","",8),dtDate=new OsDataType(ctTypeDte,ctYMD,"-"),dtDateTime=new OsDataType(ctTypeDtm,ctYMD,"-"),dtTime=new OsDataType(ctTypeTim,ctHMS,":"),OsDisableSubmitOnEnterKey=!1,MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");if("function"!=typeof OsPrepareCheckboxesForSubmit)var OsPrepareCheckboxesForSubmit=function(){for(var a=[],b=document.getElementsByTagName("INPUT"),c=0;c0){var d=document.getElementById("__CheckBoxBag");if(null==d){d=document.createElement("div"),d.setAttribute("id","__CheckBoxBag"),d.style.display="none";var e=document.getElementById("__OSVSTATE");null!=e?e.parentNode.appendChild(d):document.getElementsByTagName("form")[0].appendChild(d)}else d.innerHTML="";for(var c=0;cj||j>1114111||c(j)!=j)throw RangeError("Invalid code point: "+j);65535>=j?f.push(j):(j-=65536,a=(j>>10)+55296,d=j%1024+56320,f.push(a,d)),(g+1==h||f.length>e)&&(i+=b.apply(null,f),f.length=0)}return i};a?a(String,"fromCodePoint",{value:d,configurable:!0,writable:!0}):String.fromCodePoint=d}(),/*! http://mths.be/codepointat v0.1.0 by @mathias */ String.prototype.codePointAt||function(){"use strict";var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b=function(a){if(null==this)throw TypeError();var b=String(this),c=b.length,d=a?Number(a):0;if(d!=d&&(d=0),0>d||d>=c)return void 0;var e,f=b.charCodeAt(d);return f>=55296&&56319>=f&&c>d+1&&(e=b.charCodeAt(d+1),e>=56320&&57343>=e)?1024*(f-55296)+e-56320+65536:f};a?a(String.prototype,"codePointAt",{value:b,configurable:!0,writable:!0}):String.prototype.codePointAt=b}(),String.prototype.scLength=function(){var a=String(this);if(0==a.length)return 0;for(var b=0,c=0;void 0!=c;b++,c=a.scNextChar(c));return b},String.prototype.scSubstr=function(a,b){var c=String(this);0>a&&(a=c.scLength()+a,0>a&&(a=0));var d=c.scCodePointToCodeUnit(a),e=d;if(void 0==b)e=c.length;else for(var f=0;b>f;f++,e=c.scNextChar(e));return c.substring(d,e)},String.prototype.scCodePointToCodeUnit=function(a){var b=String(this),c=0;if(0>a){c=b.length;for(var d=0;d>a;d--,c=b.scPrevChar(c));return c}if(a==b.scLength())return b.length;for(var d=0;a>d;d++,c=b.scNextChar(c));return c},String.prototype.scCodeUnitToCodePoint=function(a){var b=String(this);return 0==a?0:0>a?b.substr(a).scLength():b.substr(0,a).scLength()},String.prototype.scNextChar=function(a){var b=String(this);if(0>a||a>=b.length-1)return void 0;var c=b.charCodeAt(a);if(c>=55296&&56319>=c&&b.length>a+1){var d=b.charCodeAt(a+1);if(d>=56320&&57343>=d)return a==b.length-2?void 0:a+2}return a+1},String.prototype.scPrevChar=function(a){var b=String(this);if(0>=a||a>b.length)return void 0;var c=b.charCodeAt(a-1);if(c>=56320&&57343>=d&&a>1){var d=b.charCodeAt(a-2);if(d>=55296&&56319>=c)return a-2}return a-1},outsystems.internal.$(function(){function a(){try{if("function"===(typeof document.querySelector).toLowerCase()&&"function"===(typeof document.querySelectorAll).toLowerCase()&&"function"===(typeof Element.prototype.addEventListener).toLowerCase())return!0}catch(a){}return!1}function b(){var a=document.querySelector("form");a.addEventListener("keydown",function(b){if(13==b.keyCode&&getEventSrc(b)instanceof HTMLInputElement){for(var c=a.querySelectorAll('input[type="button"],input[type="submit"]'),d=0;d0&&d.length>0&&e.length>0&&"none"!=d.css("display")){e.css("display","");var f=c.boundingBox();e.css("top",f.top),e.css("left",f.right+3)}},hideValidationMessage:function(b){var c=a("#"+OSVALIDATION_ICON_PREFIX+b);c.length>0&&"none"!=c.css("display")&&a("#"+OSVALIDATION_MESSAGE_PREFIX+b).css("display","none")},addValidatorIcon:function(b){if(outsystems.validators.validatorIconRule){var c=OSVALIDATION_ICON_PREFIX+b;0==a("#"+c).length&&(a("#"+b).focus(function(){outsystems.validators.showValidationMessage(this.id)}).blur(function(){outsystems.validators.hideValidationMessage(this.id)}).after(""),a("#"+c).mouseout(function(){outsystems.validators.hideValidationMessage(a(this).data("inputToValidate"))}).mouseover(function(){outsystems.validators.showValidationMessage(a(this).data("inputToValidate"))}).data("inputToValidate",b))}},addMandatorySymbol:function(b){try{if(!outsystems.validators.mandatorySymbolRule)return;var c=OSMANDATORY_SYMBOL_PREFIX+b,d=outsystems.validators.mandatorySymbolRule.style,e=null==d||"none"!==d.display;if(0==a("#"+c).length&&e){var f=outsystems.validators.mandatorySymbolRule.style.content;f=f?f.substring(1,f.length-1):"*",a("#"+b+".Mandatory").after(""+f+"")}}catch(g){return}},updateInputs:function(b){if("undefined"!=typeof OsPage_Validators&&(outsystems.validators.validatorIconRule||outsystems.validators.mandatorySymbolRule||b)){var c=!1;for(i=0;i0&&(outsystems.validators.controlToFocusId=d.controltovalidate,c=!0)}}}}),outsystems.validators.validatorIconRule=outsystems.validators.getStyleRule("span","ValidationIcon"),outsystems.validators.mandatorySymbolRule=outsystems.validators.getStyleRule("span","InputMandatorySymbol"),a.fn.extend({boundingBox:function(){if(!this)return null;var a=this.position();return{top:a.top,bottom:a.top+this.outerHeight(),left:a.left,right:a.left+this.outerWidth()}}}),outsystems.validators.updateInputs(OsFocusInvalidInput),osAjaxBackend.BindAfterAjaxRequest(outsystems.validators.updateInputs)}),"undefined"==typeof window.outsystems&&(window.outsystems={}),"undefined"==typeof window.outsystems.internal&&(window.outsystems.internal={}),"undefined"==typeof window.outsystems.internal.$&&(window.outsystems.internal.$=function(){var a=function(){};return{ready:a,val:a,data:a,ajax:a}});