(function(){function a(a,b){return"time"==a?g(b):"datetime"==a?d(b):e(b)}function b(a,b,d,e){"tap"==b?$(a).tap(function(a){null==a&&(a={});a.data=e;return d(a)},!1):$(a).bind(b,function(a){null==a&&(a={});a.data=e;return d(a)})}function d(a){return null==a.monthIndex?"":e(a)+" "+g(a)}function e(a){if(null==a.monthIndex)return"";var b=h(a);return b.slice(0,1).toUpperCase()+b.slice(1).toLowerCase()+" "+k(a)+", "+(null==a.year?"":a.year)}function g(a){return null==a.hour?"":(null==a.hour?"":a.hour)+
":"+m(a)+" "+(null==a.isPm?"":a.isPm?W:X)}function h(a){return null==a.monthIndex?"":V[a.monthIndex]}function k(a){return null==a.dayNumber?"":a.dayNumber}function m(a){if(null==a.min)return"";a=a.min;10>a&&(a="0"+a);return a}function n(a){return"function"===typeof a.toISOString&&!isNaN(a.getTime())}function o(a){var b=a.indexOf("T");if(-1<b&&b+1<a.length){var d=a.substring(b+1);6==d.length?d=d.substring(0,5)+":00.000Z":9==d.length&&(d=d.substring(0,8)+".000Z");a=a.substring(0,b+1)+d}return a}function q(a){var b=
a.year,a=a.monthIndex;dateObject=new Date(0,1,1);dateObject.setFullYear(b);dateObject.setMonth(a+1);dateObject.setDate(0);return dateObject.getDate()}function s(a,b,d){var e=b.chosen,h=b.last,b=b.present,k=document.getElementById(a+"_txt1"),n=document.getElementById(a+"_txt2"),o=document.getElementById(a+"_txt3"),a=document.getElementById(a+"_timeTxt");k.textContent=null==e.hour?"":e.hour;n.textContent=m(e);o.textContent=null==e.isPm?"":e.isPm?W:X;d&&(a.textContent=u(e)?u(h)?g(b):g(h):g(e))}function t(a,
b,d){var g=b.chosen,m=b.last,b=b.present,n=document.getElementById(a+"_txt1"),o=document.getElementById(a+"_txt2"),q=document.getElementById(a+"_txt3"),a=document.getElementById(a+"_dateTxt");n.textContent=h(g).toUpperCase();o.textContent=k(g);q.textContent=null==g.year?"":g.year;d&&(a.textContent=u(g)?u(m)?e(b):e(m):e(g))}function u(a){return null==a.year&&null==a.hour}function v(a,b){null==b?(a.year=null,a.monthIndex=null,a.dayNumber=null,a.hour=null,a.min=null,a.isPm=null):(a.year=b.year,a.monthIndex=
b.monthIndex,a.dayNumber=b.dayNumber,a.hour=b.hour,a.min=b.min,a.isPm=b.isPm)}function w(a){return{year:a.year,monthIndex:a.monthIndex,dayNumber:a.dayNumber,hour:a.hour,min:a.min,isPm:a.isPm}}function x(a){if(u(a))a=null;else{var b=a.year,d=a.monthIndex,e=a.dayNumber,g=a.min,h=a.hour;a.isPm?12!=h&&(h+=12):12==h&&(h=0);a=new Date(0,1,1);a.setFullYear(b);a.setMonth(d);a.setDate(e);a.setHours(h);a.setMinutes(g)}return a}function y(a){var b={year:null,monthIndex:null,dayNumber:null,hour:null,min:null,
isPm:null};if(null==a||null==a.getFullYear)return b;var d=a.getHours(),e=!1;0==d?d=12:12<d&&(e=!0,d-=12);b.year=a.getFullYear();b.monthIndex=a.getMonth();b.dayNumber=a.getDate();b.hour=d;b.min=a.getMinutes();b.isPm=e;return b}function z(a){var a=a.data,d=a.id,e=a.inputType,g=a.rawValue,h=a.presentRawValue,g=u(g)?w(h):w(g),k=w(g),h={chosen:g,last:k,present:h};a.rawValues=h;g=document.createElement("div");g.setAttribute("class","amx-inputDate-picker-wrapper");g.setAttribute("id",d+"_picker");k=document.createElement("div");
k.id=d+"_dateTab";k.setAttribute("role","button");k.setAttribute("tabindex","0");k.setAttribute("class","amx-inputDate-picker-dateTab-selected");var m=document.createElement("span");m.setAttribute("class","amx-inputDate-picker-dateTab-text");m.setAttribute("id",d+"_dateTxt");k.appendChild(m);m=document.createElement("div");m.id=d+"_timeTab";m.setAttribute("role","button");m.setAttribute("tabindex","0");m.setAttribute("class","amx-inputDate-picker-timeTab");var n=document.createElement("span");n.setAttribute("class",
"amx-inputDate-picker-timeTab-text");n.setAttribute("id",d+"_timeTxt");var o=document.createElement("div");o.setAttribute("class","amx-inputDate-picker-titleBarText");o.setAttribute("id",d+"_title");g.appendChild(o);m.appendChild(n);g.appendChild(k);g.appendChild(m);var q=document.createElement("table");q.setAttribute("class","amx-inputDate-datePicker-inner-container");n=q.insertRow(0);k=n.insertCell(0);k.id=d+"_inc1";k.setAttribute("class","amx-inputDate-datePicker-firstColumn-increment amx-inputDate-incrementButton amx-inputDate-datePicker-col");
m=n.insertCell(1);m.id=d+"_inc2";m.setAttribute("class","amx-inputDate-datePicker-secondColumn-increment amx-inputDate-incrementButton amx-inputDate-datePicker-col");n=n.insertCell(2);n.id=d+"_inc3";n.setAttribute("class","amx-inputDate-datePicker-thirdColumn-increment amx-inputDate-incrementButton amx-inputDate-datePicker-col amx-inputDate-datePicker-lastCol");var o=q.insertRow(1),v=o.insertCell(0);v.id=d+"_txt1";v.setAttribute("class","amx-inputDate-datePicker-month-text amx-inputDate-datePicker-col");
v=o.insertCell(1);v.id=d+"_txt2";v.setAttribute("class","amx-inputDate-datePicker-day-text amx-inputDate-datePicker-col");v=o.insertCell(2);v.id=d+"_txt3";v.setAttribute("class","amx-inputDate-datePicker-year-text amx-inputDate-datePicker-col amx-inputDate-datePicker-lastCol");v=o.insertCell(3);o=document.createElement("div");o.id=d+"_clear";o.setAttribute("role","button");o.setAttribute("tabindex","0");o.setAttribute("class","amx-inputDate-picker-clearButton");o.setAttribute("aria-label",adf.mf.resource.getInfoString("AMXInfoBundle",
"amx_inputDate_LABEL_CLEAR_BUTTON"));var x=document.createElement("div");x.className="amx-extendedTarget";o.appendChild(x);v.appendChild(o);var y=q.insertRow(2),v=y.insertCell(0);v.id=d+"_dec1";v.setAttribute("class","amx-inputDate-datePicker-firstColumn-decrement amx-inputDate-decrementButton amx-inputDate-datePicker-col");x=y.insertCell(1);x.id=d+"_dec2";x.setAttribute("class","amx-inputDate-datePicker-secondColumn-decrement amx-inputDate-decrementButton amx-inputDate-datePicker-col");y=y.insertCell(2);
y.id=d+"_dec3";y.setAttribute("class","amx-inputDate-datePicker-thirdColumn-decrement amx-inputDate-decrementButton amx-inputDate-datePicker-col amx-inputDate-datePicker-lastCol");g.appendChild(q);q=document.createElement("div");q.id=d+"_set";q.setAttribute("role","button");q.setAttribute("tabindex","0");q.setAttribute("class","amx-inputDate-picker-setButton");var z=document.createElement("span");z.setAttribute("class","amx-inputDate-picker-button-text");z.textContent=adf.mf.resource.getInfoString("AMXInfoBundle",
"amx_inputDate_LABEL_OK_BUTTON");q.appendChild(z);g.appendChild(q);z=document.createElement("div");z.id=d+"_cancel";z.setAttribute("role","button");z.setAttribute("tabindex","0");z.setAttribute("class","amx-inputDate-picker-cancelButton");var K=document.createElement("span");K.setAttribute("class","amx-inputDate-picker-button-text");K.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_CANCEL_BUTTON");z.appendChild(K);g.appendChild(z);K=document.createElement("div");K.id=
d+"_overlay";K.setAttribute("class","amx-inputDate-picker-modalOverlay");b(K,"tap",F,a);document.body.appendChild(K);document.body.appendChild(g);var g=document.getElementById(d+"_picker"),K=document.getElementById(d+"_title"),M=document.getElementById(d+"_dateTab"),O=document.getElementById(d+"_timeTab");"time"==e?(g.setAttribute("class","amx-inputDate-picker-wrapper amx-inputDate-picker-timeOnly"),O.className="amx-inputDate-picker-time-header",M.className="amx-inputDate-picker-time-header",M.style.display=
"none",K.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_SET_TIME"),s(d,h,!0)):"datetime"==e?(g.setAttribute("class","amx-inputDate-picker-wrapper"),s(d,h,!0),t(d,h,!0),O.style.display="block",g.setAttribute("class","amx-inputDate-picker-wrapper"),O.className="amx-inputDate-picker-timeTab",M.className="amx-inputDate-picker-dateTab-selected",b(O,"tap",E,a),b(M,"tap",I,a),K.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_SET_DATE_TIME")):
(g.setAttribute("class","amx-inputDate-picker-wrapper amx-inputDate-picker-dateOnly"),M.className="amx-inputDate-picker-date-header",O.className="amx-inputDate-picker-date-header",O.style.display="none",K.textContent=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_SET_DATE"),t(d,h,!0));b(q,"tap",A,a);b(z,"tap",F,a);b(o,"tap",C,a);b(k,R.start,G,a);b(k,R.end,N,k.id);b(m,R.start,L,a);b(m,R.end,N,m.id);b(n,R.start,B,a);b(n,R.end,N,n.id);b(v,R.start,D,a);b(v,R.end,P,v.id);b(x,R.start,
J,a);b(x,R.end,P,x.id);b(y,R.start,H,a);b(y,R.end,P,y.id)}function A(a){var b=a.data,a=b.id,h=b.inputType,k=b.rawValues,m=b.oldAndroidDateValue,n=document.getElementById(a),o=document.getElementById(a+"_triggerText"),k=k.chosen;u(k)?(androidDateObject={".null":!0},h="",o.textContent=""):"datetime"==h?(androidDateObject=x(k),h=androidDateObject.toISOString(),o.textContent=d(k)):"time"==h?(androidDateObject=x(k),h=androidDateObject.toISOString(),o.textContent=g(k)):(androidDateObject=x(k),h=androidDateObject.toISOString(),
o.textContent=e(k));m=new amx.ValueChangeEvent(m,h);amx.processAmxEvent($(n),"valueChange","value",h,m);b.oldAndroidDateValue=h;b.rawValue=k;b=document.getElementById(a+"_picker");a=document.getElementById(a+"_overlay");$(b).remove();$(a).remove()}function F(a){var b=a.data.id,a=document.getElementById(b+"_picker"),b=document.getElementById(b+"_overlay");$(a).remove();$(b).remove()}function C(a){var b=a.data,a=b.id,b=b.rawValues;v(b.chosen,null);s(a,b,!0)}function E(a){var b=a.data,a=b.id,b=b.rawValues,
d=b.chosen,e=b.last,g=document.getElementById(a+"_dateTab"),h=document.getElementById(a+"_timeTab");adf.mf.internal.amx.containsCSSClassName(h,"amx-inputDate-picker-timeTab-selected")?v(d,e):v(e,d);t(a,b,!0);s(a,b,!0);g.className="amx-inputDate-picker-dateTab";h.className="amx-inputDate-picker-timeTab-selected"}function I(a){var b=a.data,a=b.id,b=b.rawValues,d=b.chosen,e=b.last,g=document.getElementById(a+"_dateTab"),h=document.getElementById(a+"_timeTab");adf.mf.internal.amx.containsCSSClassName(g,
"amx-inputDate-picker-dateTab-selected")?v(d,e):v(e,d);s(a,b,!0);t(a,b,!0);g.className="amx-inputDate-picker-dateTab-selected";h.className="amx-inputDate-picker-timeTab"}function G(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+"_inc1");K(g);M(a,d,b);b?(11>e.monthIndex?e.monthIndex++:e.monthIndex=0,t(a,d,!1)):(12>e.hour?e.hour++:e.hour=1,s(a,d,!1))}function L(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+
"_inc2");K(g);M(a,d,b);b?(b=q(e),e.dayNumber<b?e.dayNumber++:e.dayNumber=1,t(a,d,!1)):(59>e.min?e.min++:e.min=0,s(a,d,!1))}function B(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+"_inc3");K(g);M(a,d,b);b?(e.year++,t(a,d,!1)):(e.isPm=!e.isPm,s(a,d,!1))}function D(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+"_dec1");O(g);M(a,d,b);b?(0<e.monthIndex?e.monthIndex--:e.monthIndex=11,t(a,d,!1)):(1<e.hour?
e.hour--:e.hour=12,s(a,d,!1))}function J(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+"_dec2");O(g);M(a,d,b);b?(b=q(e),1<e.dayNumber&&e.dayNumber<=b?e.dayNumber--:e.dayNumber=b,t(a,d,!1)):(0<e.min?e.min--:e.min=59,s(a,d,!1))}function H(a){var b=a.data,a=b.id,d=b.rawValues,e=d.chosen,b=Q(a,b.inputType),g=document.getElementById(a+"_dec3");O(g);M(a,d,b);b?(e.year--,t(a,d,!1)):(e.isPm=!e.isPm,s(a,d,!1))}function N(a){a=document.getElementById(a.data);
adf.mf.internal.amx.removeCSSClassName(a,"amx-inputDate-incrementButton-selected");adf.mf.internal.amx.addCSSClassName(a,"amx-inputDate-incrementButton")}function P(a){a=document.getElementById(a.data);adf.mf.internal.amx.removeCSSClassName(a,"amx-inputDate-decrementButton-selected");adf.mf.internal.amx.addCSSClassName(a,"amx-inputDate-decrementButton")}function K(a){adf.mf.internal.amx.removeCSSClassName(a,"amx-inputDate-incrementButton");adf.mf.internal.amx.addCSSClassName(a,"amx-inputDate-incrementButton-selected")}
function O(a){adf.mf.internal.amx.removeCSSClassName(a,"amx-inputDate-decrementButton");adf.mf.internal.amx.addCSSClassName(a,"amx-inputDate-decrementButton-selected")}function Q(a,b){var d=document.getElementById(a+"_dateTab");return adf.mf.internal.amx.containsCSSClassName(d,"amx-inputDate-picker-dateTab-selected")||"datetime"!=b&&"time"!=b}function M(a,b,d){var e=b.chosen,g=b.present;u(e)&&(v(e,g),d?(s(a,b,!0),t(a,b,!0)):(t(a,b,!0),s(a,b,!0)))}function T(a,b,d,e,g,h){var k=document.createElement("input");
k.setAttribute("class","amx-inputDate-content");k.setAttribute("type",g);d.fieldValue.appendChild(k);"datetime"==g?(k.setAttribute("type","datetime-local"),k.setAttribute("data-datetime-value",e),k.value=aa(e)):k.value=e;adf.mf.internal.amx._setNonPrimitiveElementData(k,"value",h);adf.mf.internal.amx.registerFocus(k);adf.mf.internal.amx.registerBlur(k,function(){var b=adf.mf.internal.amx._getNonPrimitiveElementData(k,"value"),d;""===k.value?d={".null":!0}:"time"===g?(d=n(b)?new Date(b.getTime()):
new Date,adf.mf.internal.amx.updateTime(d,k.value)):"date"===g?(d=n(b)?new Date(b.getTime()):new Date,adf.mf.internal.amx.updateDate(d,k.value)):(d=k.value,k.setAttribute("data-datetime-value",d),d=ba(o(d)),d=new Date(d),n(b)&&d.setMilliseconds(b.getMilliseconds()));if(!(!0==d[".null"]&&!0==b[".null"]||n(d)&&n(b)&&d.getTime()==b.getTime())){var e;e=n(d)?d.toISOString():d;b=n(b)?b.toISOString():b;b=new amx.ValueChangeEvent(b,e);amx.processAmxEvent($(a),"valueChange","value",e,b)}adf.mf.internal.amx._setNonPrimitiveElementData(k,
"value",d)});b=b.getAttribute("disabled");!0==b&&(k.setAttribute("disabled",b),k.setAttribute("aria-disabled",b))}function aa(a){try{if(null==a||""==a)return"";var b=new Date(a),d=b.getTimezoneOffset();b.setMinutes(b.getMinutes()-d);var e=b.toISOString().replace("Z","");return o(e)}catch(g){return""}}function ba(a){try{if(null==a||""==a)return"";var b=a.indexOf("T"),d=a.substring(b);-1==d.indexOf("-")&&-1==d.indexOf("+")&&(a+="+00:00");var e=new Date(a),g=e.getTimezoneOffset();e.setMinutes(e.getMinutes()+
g);var h=e.toISOString();return o(h)}catch(k){return""}}var S=!1;if(!adf.mf.environment.profile.dtMode&&("dev"==adf._bootstrapMode||"hosted"==adf._bootstrapMode)){var Z=adf.mf.api.getQueryString(),U=adf.mf.api.getQueryStringParamValue(Z,"amx_skin_folder_override"),Z=adf.mf.api.getQueryStringParamValue(Z,"amx_skin_override");null!=U&&-1!=U.indexOf("android")?S=!0:null!=Z&&-1!=Z.indexOf("android")&&(S=!0)}var V=null,X=null,W=null,R=null;amx.registerRenderers("amx",{inputDate:{createChildrenNodes:function(a){amx.registerInputValue(a,
"value");return!1},create:function(d,e){if(null==V){var g=Array(12);!1==adf.mf.environment.profile.dtMode?(g[0]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_JANUARY_ABBREVIATION"),g[1]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_FEBRUARY_ABBREVIATION"),g[2]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_MARCH_ABBREVIATION"),g[3]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_APRIL_ABBREVIATION"),g[4]=adf.mf.resource.getInfoString("AMXInfoBundle",
"amx_inputDate_LABEL_MAY_ABBREVIATION"),g[5]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_JUNE_ABBREVIATION"),g[6]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_JULY_ABBREVIATION"),g[7]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_AUGUST_ABBREVIATION"),g[8]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_SEPTEMBER_ABBREVIATION"),g[9]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_OCTOBER_ABBREVIATION"),
g[10]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_NOVEMBER_ABBREVIATION"),g[11]=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_DECEMBER_ABBREVIATION"),X=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_TIME_AM_ABBREVIATION"),W=adf.mf.resource.getInfoString("AMXInfoBundle","amx_inputDate_LABEL_TIME_PM_ABBREVIATION")):(g[0]="JAN",g[1]="FEB",g[2]="MAR",g[3]="APR",g[4]="MAY",g[5]="JUN",g[6]="JUL",g[7]="AUG",g[8]="SEP",g[9]="OCT",g[10]="NOV",
g[11]="DEC",X="AM",W="PM");V=g;R=amx.hasTouch()?{start:"touchstart",end:"touchend"}:{start:"mousedown",end:"mouseup"}}d.setConverter(null);var g=amx.createField(d),h=g.fieldRoot,k=null,m=d.getAttribute("value");if(null==m)k={".null":!0},m="";else{var n=adf.mf.internal.converters.dateParser.parse(m);isNaN(n)||(k=new Date(n))}null==k&&!adf.mf.environment.profile.dtMode&&(k={".null":!0},m="");n=d.getAttribute("inputType");!1==adf.mf.environment.profile.dtMode?"time"===n?null!=d.getAttribute("value")&&
null!=k.getHours&&(m=adf.mf.internal.amx.extractTimeFromDateObject(k)):"datetime"===n?m=d.getAttribute("value"):(n="date",null!=d.getAttribute("value")&&null!=k.getFullYear&&(m=adf.mf.internal.amx.extractDateFromDateObject(k))):"Android"==adf.mf.internal.amx.agent.type||S?"time"!==n&&"datetime"!==n&&(n="date"):n="text";var o=amx.isValueTrue(d.getAttribute("readOnly"));if(!0==o){m=document.createElement("span");g.fieldValue.appendChild(m);var q=y(k);m.textContent=a(n,q);m.setAttribute("readOnly",o);
m.setAttribute("aria-readonly",o);adf.mf.internal.amx._setNonPrimitiveElementData(m,"value",k)}else if("Android"==adf.mf.internal.amx.agent.type||S){k=m;o=document.createElement("div");o.id=e+"_trigger";o.setAttribute("role","button");o.setAttribute("tabindex","0");o.setAttribute("class","amx-inputDate-trigger-dateTime");m=document.createElement("span");m.setAttribute("class","amx-inputDate-text");m.setAttribute("id",e+"_triggerText");q=document.createElement("div");q.setAttribute("class","amx-inputDate-triggerIconStyleWrapper");
var s=document.createElement("div");s.setAttribute("class","amx-inputDate-triggerIconStyle");o.appendChild(m);o.appendChild(q);o.appendChild(s);g.fieldValue.appendChild(o);var q=amx.isValueTrue(d.getAttribute("disabled")),t=null,u=d.getAttribute("value"),s=null,v=y(null);"undefined"!==typeof u?(s=adf.mf.internal.converters.dateParser.parse(u),isNaN(s)||(t=new Date(s)),null==t&&(t=adf.mf.environment.profile.dtMode?new Date:{".null":!0}),v=y(t),s=null!=t.toISOString?t.toISOString():"",m.textContent=
a(n,v)):t={".null":!0};m=t;null==m.getDate&&(m=new Date);m=y(m);!1==q&&b(o,"tap",z,{amxNode:d,id:e,inputType:n,rawValue:v,presentRawValue:m,oldAndroidDateValue:s});!1!=adf.mf.environment.profile.dtMode&&($(o).remove(),n=document.createElement("span"),adf.mf.internal.amx.addCSSClassName(n,"amx-inputDate-readOnly"),n.textContent=k,g.fieldValue.appendChild(n))}else T(h,d,g,m,n,k);adf.mf.api.amx.applyRequiredMarker(d,g);return h}}})})();