vendor/assets/javascripts/webshims/minified/shims/combos/18.js in webshims-rails-0.4.2 vs vendor/assets/javascripts/webshims/minified/shims/combos/18.js in webshims-rails-0.4.3

- old
+ new

@@ -1,60 +1,63 @@ -jQuery.webshims.register("form-datalist",function(a,b,j,m,s){b.propTypes.element=function(h){b.createPropDefault(h,"attr");if(!h.prop)h.prop={get:function(){var b=h.attr.get.call(this);b&&(b=m.getElementById(b))&&h.propNodeName&&!a.nodeName(b,h.propNodeName)&&(b=null);return b||null},writeable:!1}};(function(){var h=a.webshims.cfg.forms,g=Modernizr.input.list;if(!g||h.customDatalist){var r=0,n={submit:1,button:1,reset:1,hidden:1,range:1,date:1},o=a.browser.msie&&7>parseInt(a.browser.version,10),u= -{},l=function(a){if(!a)return[];if(u[a])return u[a];var b;try{b=JSON.parse(localStorage.getItem("storedDatalistOptions"+a))}catch(d){}u[a]=b||[];return b||[]},p={_create:function(f){if(!n[a.prop(f.input,"type")]){var b=f.datalist,d=a.data(f.input,"datalistWidget");if(b&&d&&d.datalist!==b)d.datalist=b,d.id=f.id,d.shadowList.prop("className","datalist-polyfill "+(d.datalist.className||"")+" "+d.datalist.id+"-shadowdom"),h.positionDatalist?d.shadowList.insertAfter(f.input):d.shadowList.appendTo("body"), -a(d.datalist).unbind("updateDatalist.datalistWidget").bind("updateDatalist.datalistWidget",a.proxy(d,"_resetListCached")),d._resetListCached();else if(b){if(!(d&&d.datalist===b)){r++;var c=this;this.hideList=a.proxy(c,"hideList");this.timedHide=function(){clearTimeout(c.hideTimer);c.hideTimer=setTimeout(c.hideList,9)};this.datalist=b;this.id=f.id;this.hasViewableData=!0;this._autocomplete=a.attr(f.input,"autocomplete");a.data(f.input,"datalistWidget",this);this.shadowList=a('<div class="datalist-polyfill '+ -(this.datalist.className||"")+" "+this.datalist.id+'-shadowdom" />');h.positionDatalist||a(f.input).hasClass("position-datalist")?this.shadowList.insertAfter(f.input):this.shadowList.appendTo("body");this.index=-1;this.input=f.input;this.arrayOptions=[];this.shadowList.delegate("li","mouseenter.datalistWidget mousedown.datalistWidget click.datalistWidget",function(e){var k=a("li:not(.hidden-item)",c.shadowList),d="mousedown"==e.type||"click"==e.type;c.markItem(k.index(e.currentTarget),d,k);"click"== -e.type&&(c.hideList(),h.customDatalist&&a(f.input).trigger("datalistselect"));return"mousedown"!=e.type}).bind("focusout",this.timedHide);f.input.setAttribute("autocomplete","off");a(f.input).attr({"aria-haspopup":"true"}).bind("input.datalistWidget",function(){if(!c.triggeredByDatalist)c.changedValue=!1,c.showHideOptions()}).bind("keydown.datalistWidget",function(e){var k=e.keyCode,d;if(40==k&&!c.showList())return c.markItem(c.index+1,!0),!1;if(c.isListVisible){if(38==k)return c.markItem(c.index- -1,!0),!1;if(!e.shiftKey&&(33==k||36==k))return c.markItem(0,!0),!1;if(!e.shiftKey&&(34==k||35==k))return e=a("li:not(.hidden-item)",c.shadowList),c.markItem(e.length-1,!0,e),!1;if(13==k||27==k)return 13==k&&(d=a("li.active-item:not(.hidden-item)",c.shadowList),c.changeValue(a("li.active-item:not(.hidden-item)",c.shadowList))),c.hideList(),h.customDatalist&&d&&d[0]&&a(f.input).trigger("datalistselect"),!1}}).bind("focus.datalistWidget",function(){a(this).hasClass("list-focus")&&c.showList()}).bind("mousedown.datalistWidget", -function(){a(this).is(":focus")&&c.showList()}).bind("blur.datalistWidget",this.timedHide);a(this.datalist).unbind("updateDatalist.datalistWidget").bind("updateDatalist.datalistWidget",a.proxy(this,"_resetListCached"));this._resetListCached();f.input.form&&(f.input.name||f.input.id)&&a(f.input.form).bind("submit.datalistWidget"+f.input.id,function(){if(!a(f.input).hasClass("no-datalist-cache")&&"off"!=c._autocomplete){var e=a.prop(f.input,"value"),k=(f.input.name||f.input.id)+a.prop(f.input,"type"); -if(!c.storedOptions)c.storedOptions=l(k);if(e&&-1==c.storedOptions.indexOf(e)&&(c.storedOptions.push(e),e=c.storedOptions,k)){e=e||[];try{localStorage.setItem("storedDatalistOptions"+k,JSON.stringify(e))}catch(d){}}}});a(j).bind("unload.datalist"+this.id+" beforeunload.datalist"+this.id,function(){c.destroy()})}}else d&&d.destroy()}},destroy:function(){var b=a.attr(this.input,"autocomplete");a(this.input).unbind(".datalistWidget").removeData("datalistWidget");this.shadowList.remove();a(m).unbind(".datalist"+ -this.id);a(j).unbind(".datalist"+this.id);this.input.form&&this.input.id&&a(this.input.form).unbind("submit.datalistWidget"+this.input.id);this.input.removeAttribute("aria-haspopup");b===s?this.input.removeAttribute("autocomplete"):a(this.input).attr("autocomplete",b)},_resetListCached:function(a){var i=this,d;this.needsUpdate=!0;this.lastUpdatedValue=!1;this.lastUnfoundValue="";this.updateTimer||(j.QUnit||(d=a&&m.activeElement==i.input)?i.updateListOptions(d):b.ready("WINDOWLOAD",function(){i.updateTimer= -setTimeout(function(){i.updateListOptions();i=null;r=1},200+100*r)}))},updateListOptions:function(b){this.needsUpdate=!1;clearTimeout(this.updateTimer);this.updateTimer=!1;this.shadowList.css({fontSize:a.css(this.input,"fontSize"),fontFamily:a.css(this.input,"fontFamily")});this.searchStart=h.customDatalist&&a(this.input).hasClass("search-start");var i=[],d=[],c=[],e,k,v,w;for(k=a.prop(this.datalist,"options"),v=0,w=k.length;v<w;v++){e=k[v];if(e.disabled)return;e={value:a(e).val()||"",text:a.trim(a.attr(e, -"label")||e.textContent||e.innerText||a.text([e])||""),className:e.className||"",style:a.attr(e,"style")||""};e.text?e.text!=e.value&&(e.className+=" different-label-value"):e.text=e.value;d[v]=e.value;c[v]=e}if(!this.storedOptions)this.storedOptions=a(this.input).hasClass("no-datalist-cache")||"off"==this._autocomplete?[]:l((this.input.name||this.input.id)+a.prop(this.input,"type"));this.storedOptions.forEach(function(a){-1==d.indexOf(a)&&c.push({value:a,text:a,className:"stored-suggest",style:""})}); -for(v=0,w=c.length;v<w;v++)k=c[v],i[v]='<li class="'+k.className+'" style="'+k.style+'" tabindex="-1" role="listitem"><span class="option-label">'+k.text+'</span> <span class="option-value">'+k.value+"</span></li>";this.arrayOptions=c;this.shadowList.html('<div class="datalist-outer-box"><div class="datalist-box"><ul role="list">'+i.join("\n")+"</ul></div></div>");a.fn.bgIframe&&o&&this.shadowList.bgIframe();(b||this.isListVisible)&&this.showHideOptions()},showHideOptions:function(b){var i=a.prop(this.input, -"value").toLowerCase();if(!(i===this.lastUpdatedValue||this.lastUnfoundValue&&0===i.indexOf(this.lastUnfoundValue))){this.lastUpdatedValue=i;var d=!1,c=this.searchStart,e=a("li",this.shadowList);i?this.arrayOptions.forEach(function(k,b){var f;if(!("lowerText"in k))k.lowerText=k.text!=k.value?k.value.toLowerCase()+k.text.toLowerCase():k.text.toLowerCase();f=k.lowerText.indexOf(i);(f=c?!f:-1!==f)?(a(e[b]).removeClass("hidden-item"),d=!0):a(e[b]).addClass("hidden-item")}):e.length&&(e.removeClass("hidden-item"), -d=!0);this.hasViewableData=d;!b&&d&&this.showList();if(!d)this.lastUnfoundValue=i,this.hideList()}},setPos:function(){this.shadowList.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0});var f=h.positionDatalist?a(this.input).position():b.getRelOffset(this.shadowList,this.input);f.top+=a(this.input).outerHeight();f.width=a(this.input).outerWidth()-(parseInt(this.shadowList.css("borderLeftWidth"),10)||0)-(parseInt(this.shadowList.css("borderRightWidth"),10)||0);this.shadowList.css({marginTop:"", -marginLeft:"",marginRight:"",marginBottom:""}).css(f);return f},showList:function(){if(this.isListVisible)return!1;this.needsUpdate&&this.updateListOptions();this.showHideOptions(!0);if(!this.hasViewableData)return!1;this.isListVisible=!0;var b=this;b.setPos();b.shadowList.addClass("datalist-visible").find("li.active-item").removeClass("active-item");a(j).unbind(".datalist"+b.id);a(m).unbind(".datalist"+b.id).bind("mousedown.datalist"+b.id+" focusin.datalist"+b.id,function(i){i.target===b.input|| -b.shadowList[0]===i.target||a.contains(b.shadowList[0],i.target)?(clearTimeout(b.hideTimer),setTimeout(function(){clearTimeout(b.hideTimer)},9)):b.timedHide()}).bind("updateshadowdom.datalist"+b.id,function(){b.setPos()});return!0},hideList:function(){if(!this.isListVisible)return!1;var f=this,i=function(){f.changedValue&&a(f.input).trigger("change");f.changedValue=!1};f.shadowList.removeClass("datalist-visible list-item-active");f.index=-1;f.isListVisible=!1;if(f.changedValue){f.triggeredByDatalist= -!0;b.triggerInlineForm&&b.triggerInlineForm(f.input,"input");if(a(f.input).is(":focus"))a(f.input).one("blur",i);else i();f.triggeredByDatalist=!1}a(m).unbind(".datalist"+f.id);a(j).unbind(".datalist"+f.id).one("resize.datalist"+f.id,function(){f.shadowList.css({top:0,left:0})});return!0},scrollIntoView:function(b){var i=a("ul",this.shadowList),d=a("div.datalist-box",this.shadowList),c=b.position();c.top-=(parseInt(i.css("paddingTop"),10)||0)+(parseInt(i.css("marginTop"),10)||0)+(parseInt(i.css("borderTopWidth"), -10)||0);0>c.top?d.scrollTop(d.scrollTop()+c.top-2):(c.top+=b.outerHeight(),b=d.height(),c.top>b&&d.scrollTop(d.scrollTop()+(c.top-b)+2))},changeValue:function(b){if(b[0]){var b=a("span.option-value",b).text(),i=a.prop(this.input,"value");if(b!=i)a(this.input).prop("value",b).triggerHandler("updateInput"),this.changedValue=!0}},markItem:function(b,i,d){d=d||a("li:not(.hidden-item)",this.shadowList);if(d.length)0>b?b=d.length-1:b>=d.length&&(b=0),d.removeClass("active-item"),this.shadowList.addClass("list-item-active"), -d=d.filter(":eq("+b+")").addClass("active-item"),i&&(this.changeValue(d),this.scrollIntoView(d)),this.index=b}};(function(){g||b.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var i=a("select",this);i[0]?i=i[0].options:(i=a("option",this).get(),i.length&&b.warn("you should wrap your option-elements for a datalist in a select element to support IE and other old browsers."));return i}}});var f={autocomplete:{attr:{get:function(){var b=a.data(this,"datalistWidget");return b? -b._autocomplete:"autocomplete"in this?this.autocomplete:this.getAttribute("autocomplete")},set:function(b){var d=a.data(this,"datalistWidget");d?(d._autocomplete=b,"off"==b&&d.hideList()):"autocomplete"in this?this.autocomplete=b:this.setAttribute("autocomplete",b)}}}};g?((a("<datalist><select><option></option></select></datalist>").prop("options")||[]).length||b.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var b=this.options||[];if(!b.length){var d=a("select",this); -if(d[0]&&d[0].options&&d[0].options.length)b=d[0].options}return b}}}),f.list={attr:{get:function(){var f=b.contentAttr(this,"list");null!=f?this.removeAttribute("list"):f=a.data(this,"datalistListAttr");return null==f?s:f},set:function(f){a.data(this,"datalistListAttr",f);b.objectCreate(p,s,{input:this,id:f,datalist:a.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"}):f.list={attr:{get:function(){var a=b.contentAttr(this,"list");return null==a?s:a},set:function(f){b.contentAttr(this, -"list",f);b.objectCreate(p,s,{input:this,id:f,datalist:a.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"};b.defineNodeNameProperties("input",f);if(a.event.customEvent)a.event.customEvent.updateDatalist=!0,a.event.customEvent.updateInput=!0,a.event.customEvent.datalistselect=!0;b.addReady(function(a,d){d.filter("datalist > select, datalist, datalist > option, datalist > select > option").closest("datalist").triggerHandler("updateDatalist")})})()}})()}); -jQuery.webshims.register("form-extend",function(a,b,j,m,s,h){j=j.Modernizr;s=j.inputtypes;if(j.formvalidation&&!b.bugs.bustedValidity){var g=b.inputTypes,r={};b.addInputType=function(a,c){g[a]=c};b.addValidityRule=function(a,c){r[a]=c};b.addValidityRule("typeMismatch",function(a,c,e,d){if(""===c)return!1;d=d.typeMismatch;if(!("type"in e))e.type=(a[0].getAttribute("type")||"").toLowerCase();g[e.type]&&g[e.type].mismatch&&(d=g[e.type].mismatch(c,a));return d});var n=h.overrideMessages,o=!s.number|| -!s.time||!s.range||n,u="customError,typeMismatch,rangeUnderflow,rangeOverflow,stepMismatch,tooLong,patternMismatch,valueMissing,valid".split(","),h=n?["value","checked"]:["value"],l=[],p=function(c,e){if(c){var d=(c.getAttribute&&c.getAttribute("type")||c.type||"").toLowerCase();if(n||g[d])n&&!e&&"radio"==d&&c.name?a(m.getElementsByName(c.name)).each(function(){a.prop(this,"validity")}):a.prop(c,"validity")}},f={};["input","textarea","select"].forEach(function(c){var e=b.defineNodeNameProperty(c, -"setCustomValidity",{prop:{value:function(d){var d=d+"",f="input"==c?a(this).getNativeElement()[0]:this;e.prop._supvalue.call(f,d);b.bugs.validationMessage&&b.data(f,"customvalidationMessage",d);o&&(b.data(f,"hasCustomError",!!d),p(f))}}});f[c]=e.prop._supvalue});if(o||n)h.push("min"),h.push("max"),h.push("step"),l.push("input");n&&(h.push("required"),h.push("pattern"),l.push("select"),l.push("textarea"));if(o){var i;l.forEach(function(c){var e=b.defineNodeNameProperty(c,"validity",{prop:{get:function(){if(!i){var d= -"input"==c?a(this).getNativeElement()[0]:this,h=e.prop._supget.call(d);if(!h)return h;var q={};u.forEach(function(a){q[a]=h[a]});if(!a.prop(d,"willValidate"))return q;i=!0;var t=a(d),x={type:(d.getAttribute&&d.getAttribute("type")||"").toLowerCase(),nodeName:(d.nodeName||"").toLowerCase()},y=t.val(),l=!!b.data(d,"hasCustomError"),j;i=!1;q.customError=l;if(q.valid&&q.customError)q.valid=!1;else if(!q.valid){var m=!0;a.each(q,function(a,c){if(c)return m=!1});if(m)q.valid=!0}a.each(r,function(a,e){q[a]= -e(t,y,x,q);if(q[a]&&(q.valid||!j)&&(n||g[x.type]&&g[x.type].mismatch))f[c].call(d,b.createValidationMessage(d,a)),q.valid=!1,j=!0});q.valid?(f[c].call(d,""),b.data(d,"hasCustomError",!1)):n&&!j&&!l&&a.each(q,function(a,e){if("valid"!==a&&e)return f[c].call(d,b.createValidationMessage(d,a)),!1});return q}},writeable:!1}})});h.forEach(function(a){b.onNodeNamesPropertyModify(l,a,function(){p(this)})});if(m.addEventListener){var d,c=function(c){if("form"in c.target){var e=c.target.form;clearTimeout(d); -p(c.target);e&&n&&a("input",e).each(function(){"password"==this.type&&p(this)})}};m.addEventListener("change",c,!0);n&&(m.addEventListener("blur",c,!0),m.addEventListener("keydown",function(a){13==a.keyCode&&c(a)},!0));m.addEventListener("input",function(a){clearTimeout(d);d=setTimeout(function(){p(a.target)},290)},!0)}var e=l.join(",");b.addReady(function(c,d){a(e,c).add(d.filter(e)).each(function(){a.prop(this,"validity")})});n&&b.ready("DOM form-message",function(){b.activeLang({register:"form-core", -callback:function(){a("input, select, textarea").getNativeElement().each(function(){if(!b.data(this,"hasCustomError")){var c=this,e=a.prop(c,"validity")||{valid:!0},d;e.valid||(d=(c.nodeName||"").toLowerCase(),a.each(e,function(a,e){if("valid"!==a&&e)return f[d].call(c,b.createValidationMessage(c,a)),!1}))}})}})})}b.defineNodeNameProperty("input","type",{prop:{get:function(){var a=(this.getAttribute("type")||"").toLowerCase();return b.inputTypes[a]?a:this.type}}})}}); -jQuery.webshims.register("form-number-date-api",function(a,b){var j,m,s;if(!b.getStep)b.getStep=function(d,c){var e=a.attr(d,"step");if("any"===e)return e;c=c||o(d);if(!g[c]||!g[c].step)return e;e=j.asNumber(e);return(!isNaN(e)&&0<e?e:g[c].step)*g[c].stepScaleFactor};if(!b.addMinMaxNumberToCache)b.addMinMaxNumberToCache=function(a,c,e){a+"AsNumber"in e||(e[a+"AsNumber"]=g[e.type].asNumber(c.attr(a)),isNaN(e[a+"AsNumber"])&&a+"Default"in g[e.type]&&(e[a+"AsNumber"]=g[e.type][a+"Default"]))};var h= -parseInt("NaN",10),g=b.inputTypes,r=function(a){return"number"==typeof a||a&&a==1*a},n=function(d){return a('<input type="'+d+'" />').prop("type")===d},o=function(a){return(a.getAttribute("type")||"").toLowerCase()},u=b.addMinMaxNumberToCache,l=function(a,c){for(var a=""+a,c=c-a.length,e=0;e<c;e++)a="0"+a;return a},p=b.bugs.valueAsNumberSet||b.bugs.bustedValidity;b.addValidityRule("stepMismatch",function(a,c,e,k){if(""===c)return!1;if(!("type"in e))e.type=o(a[0]);if("date"==e.type)return!1;k=(k|| -{}).stepMismatch;if(g[e.type]&&g[e.type].step){if(!("step"in e))e.step=b.getStep(a[0],e.type);if("any"==e.step)return!1;if(!("valueAsNumber"in e))e.valueAsNumber=g[e.type].asNumber(c);if(isNaN(e.valueAsNumber))return!1;u("min",a,e);a=e.minAsNumber;isNaN(a)&&(a=g[e.type].stepBase||0);k=Math.abs((e.valueAsNumber-a)%e.step);k=!(1.0E-7>=k||1.0E-7>=Math.abs(k-e.step))}return k});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){b.addValidityRule(a.name, -function(c,e,b,f){f=(f||{})[a.name]||!1;if(""===e)return f;if(!("type"in b))b.type=o(c[0]);if(g[b.type]&&g[b.type].asNumber){if(!("valueAsNumber"in b))b.valueAsNumber=g[b.type].asNumber(e);if(isNaN(b.valueAsNumber))return!1;u(a.attr,c,b);if(isNaN(b[a.attr+"AsNumber"]))return f;f=b[a.attr+"AsNumber"]*a.factor<b.valueAsNumber*a.factor-1.0E-7}return f})});b.reflectProperties(["input"],["max","min","step"]);var f=b.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var b=o(this),b=g[b]&& -g[b].asNumber?g[b].asNumber(a.prop(this,"value")):f.prop._supget&&f.prop._supget.apply(this,arguments);null==b&&(b=h);return b},set:function(d){var c=o(this);g[c]&&g[c].numberToString?isNaN(d)?a.prop(this,"value",""):(c=g[c].numberToString(d),!1!==c?a.prop(this,"value",c):b.warn("INVALID_STATE_ERR: DOM Exception 11")):f.prop._supset&&f.prop._supset.apply(this,arguments)}}}),i=b.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var b=o(this);return g[b]&&g[b].asDate&&!g[b].noAsDate? -g[b].asDate(a.prop(this,"value")):i.prop._supget&&i.prop._supget.call(this)||null},set:function(d){var c=o(this);if(g[c]&&g[c].dateToString&&!g[c].noAsDate){if(null===d)return a.prop(this,"value",""),"";c=g[c].dateToString(d);if(!1!==c)return a.prop(this,"value",c),c;b.warn("INVALID_STATE_ERR: DOM Exception 11")}else return i.prop._supset&&i.prop._supset.apply(this,arguments)||null}}});j={mismatch:function(a){return!r(a)},step:1,stepScaleFactor:1,asNumber:function(a){return r(a)?1*a:h},numberToString:function(a){return r(a)? -a:!1}};m={minDefault:0,maxDefault:100};s={mismatch:function(b){if(!b||!b.split||!/\d$/.test(b))return!0;var c=b.split(/\u002D/);if(3!==c.length)return!0;var e=!1;a.each(c,function(a,c){if(!(r(c)||c&&c=="0"+1*c))return e=!0,!1});if(e)return e;if(4!==c[0].length||2!=c[1].length||12<c[1]||2!=c[2].length||33<c[2])e=!0;return b!==this.dateToString(this.asDate(b,!0))},step:1,stepScaleFactor:864E5,asDate:function(a,c){return!c&&this.mismatch(a)?null:new Date(this.asNumber(a,!0))},asNumber:function(a,c){var e= -h;if(c||!this.mismatch(a))a=a.split(/\u002D/),e=Date.UTC(a[0],a[1]-1,a[2]);return e},numberToString:function(a){return r(a)?this.dateToString(new Date(1*a)):!1},dateToString:function(a){return a&&a.getFullYear?a.getUTCFullYear()+"-"+l(a.getUTCMonth()+1,2)+"-"+l(a.getUTCDate(),2):!1}};if(p||!n("range")||!n("time"))m=a.extend({},j,m);(p||!n("number"))&&b.addInputType("number",j);(p||!n("range"))&&b.addInputType("range",m);(p||!n("date"))&&b.addInputType("date",s)}); -jQuery.webshims.register("form-number-date-ui",function(a,b,j,m,s,h){var g=b.triggerInlineForm,j=Modernizr.inputtypes,r=function(){var c={"padding-box":"innerWidth","border-box":"outerWidth","content-box":"width"},e=Modernizr.prefixed&&Modernizr.prefixed("boxSizing");a.browser.msie&&8>b.browserVersion&&(e=!1);return function(a,b){var d,f,g;f="width";e&&(f=c[a.css(e)]||f);d=a[f]();f="width"==f;if(d){var t=parseInt(b.css("marginLeft"),10)||0,i=b.outerWidth();(g=parseInt(a.css("marginRight"),10)||0)&& -a.css("marginRight",0);t<=-1*i?(b.css("marginRight",Math.floor(Math.abs(i+t-0.1)+g)),a.css("paddingRight",(parseInt(a.css("paddingRight"),10)||0)+Math.abs(t)),f&&a.css("width",Math.floor(d+t))):(b.css("marginRight",g),a.css("width",Math.floor(d-t-i-0.2)))}}}(),n={},o=a([]),u,l=function(c,e){a("input",c).add(e.filter("input")).each(function(){var c=a.prop(this,"type");if(l[c]&&!b.data(this,"shadowData"))l[c](a(this))})},p=function(c,e){if(h.lazyDate){var b=a.data(c[0],"setDateLazyTimer");b&&clearTimeout(b); -a.data(c[0],"setDateLazyTimer",setTimeout(function(){c.datepicker("setDate",e);a.removeData(c[0],"setDateLazyTimer");c=null},0))}else c.datepicker("setDate",e)},f={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!h.copyAttrs)h.copyAttrs={};b.extendUNDEFProp(h.copyAttrs,f);var i=function(a){return h.calculateWidth?{css:{marginRight:a.css("marginRight"),marginLeft:a.css("marginLeft")},outerWidth:a.outerWidth()}:{}};l.common=function(c,e,k){Modernizr.formvalidation&&c.bind("firstinvalid", -function(a){(b.fromSubmit||!u)&&c.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",function(e){!a.isInvalidUIPrevented()&&!e.isDefaultPrevented()&&(b.validityAlert.showFor(a.target),a.preventDefault(),e.preventDefault());c.unbind("invalid.replacedwidgetbubble")})});var d,g,i=a("input, span.ui-slider-handle",e),l=c[0].attributes;for(d in h.copyAttrs)if((g=l[d])&&g.specified)f[d]&&i[0]?i.attr(d,g.nodeValue):e[0].setAttribute(d,g.nodeValue);d=(d=c.attr("id"))?a('label[for="'+ -d+'"]',c[0].form):o;e.addClass(c[0].className);b.addShadowDom(c,e,{data:k||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",e)[0],shadowChilds:i});c.after(e);c[0].form&&a(c[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){c.prop("value",c.prop("value"))},0)});d[0]&&(e.getShadowFocusElement().attr("aria-labelledby",b.getID(d)),d.bind("click",function(){c.getShadowFocusElement().focus();return!1}))};Modernizr.formvalidation&& -["input","form"].forEach(function(a){var e=b.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){u=!0;var a=e.prop._supvalue.apply(this,arguments);u=!1;return a}}})});if(!j.date||h.replaceUI){var d=function(c,e,d,f){var g,i,l=function(){t.dpDiv.unbind("mousedown.webshimsmousedownhandler");i=g=!1},t=e.bind("focusin",function(){l();t.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){g=!0})}).bind("focusout blur",function(a){g&&(i=!0, -a.stopImmediatePropagation())}).datepicker(a.extend({onClose:function(){i&&e.not(":focus")?(l(),e.trigger("focusout"),e.triggerHandler("blur")):l()}},n,h.datepicker,c.data("datepicker"))).bind("change",d).data("datepicker");t.dpDiv.addClass("input-date-datepicker-control");f&&b.triggerDomUpdate(f[0]);"disabled,min,max,value,step,data-placeholder".split(",").forEach(function(a){var e=c.attr(a);e&&c.attr(a,e)});return t};l.date=function(c){if(a.fn.datepicker){var e=a('<input class="input-date" type="text" />'), -k;this.common(c,e,l.date.attrs);k=d(c,e,function(b){l.date.blockAttr=!0;var d;if(h.lazyDate){var k=a.data(e[0],"setDateLazyTimer");k&&(clearTimeout(k),a.removeData(e[0],"setDateLazyTimer"))}try{d=(d=a.datepicker.parseDate(e.datepicker("option","dateFormat"),e.prop("value")))?a.datepicker.formatDate("yy-mm-dd",d):e.prop("value")}catch(f){d=e.prop("value")}c.prop("value",d);l.date.blockAttr=!1;b.stopImmediatePropagation();g(c[0],"input");g(c[0],"change")});a(c).bind("updateshadowdom",function(){if(k.trigger[0]&& -(c.css({display:""}),c[0].offsetWidth||c[0].offsetHeight)){var a=i(c);a.css&&(e.css(a.css),a.outerWidth&&e.outerWidth(a.outerWidth),r(e,k.trigger))}c.css({display:"none"})}).triggerHandler("updateshadowdom");k.trigger[0]&&setTimeout(function(){b.ready("WINDOWLOAD",function(){a(c).triggerHandler("updateshadowdom")})},9)}};l.date.attrs={disabled:function(c,e,b){a.prop(e,"disabled",!!b)},min:function(c,b,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){d=!1}d&&a(b).datepicker("option","minDate", -d)},max:function(c,b,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){d=!1}d&&a(b).datepicker("option","maxDate",d)},"data-placeholder":function(c,b,d){c=(d||"").split("-");3==c.length&&(d=a(b).datepicker("option","dateFormat").replace("yy",c[0]).replace("mm",c[1]).replace("dd",c[2]));a.prop(b,"placeholder",d)},value:function(c,b,d){if(!l.date.blockAttr){try{var f=a.datepicker.parseDate("yy-mm-dd",d)}catch(g){f=!1}f?p(a(b),f):a.prop(b,"value",d)}}}}if(!j.range||h.replaceUI)l.range=function(c){if(a.fn.slider){var b= -a('<span class="input-range"><span class="ui-slider-handle" role="slider" tabindex="0" /></span>');this.common(c,b,l.range.attrs);c.bind("updateshadowdom",function(){c.css({display:""});if(c[0].offsetWidth||c[0].offsetHeight){var a=i(c);a.css&&(b.css(a.css),a.outerWidth&&b.outerWidth(a.outerWidth))}c.css({display:"none"})}).triggerHandler("updateshadowdom");b.slider(a.extend(!0,{},h.slider,c.data("slider"))).bind("slide",function(a,b){if(a.originalEvent)l.range.blockAttr=!0,c.prop("value",b.value), -l.range.blockAttr=!1,g(c[0],"input"),g(c[0],"change")});["disabled","min","max","step","value"].forEach(function(b){var e=c.prop(b),d;"value"==b&&!e&&(d=c.getShadowElement())&&(e=(a(d).slider("option","max")-a(d).slider("option","min"))/2);null!=e&&c.prop(b,e)})}},l.range.attrs={disabled:function(c,b,d){d=!!d;a(b).slider("option","disabled",d);a("span",b).attr({"aria-disabled":d+"",tabindex:d?"-1":"0"})},min:function(b,e,d){d=d?1*d||0:0;a(e).slider("option","min",d);a("span",e).attr({"aria-valuemin":d})}, -max:function(b,e,d){d=d||0===d?1*d||100:100;a(e).slider("option","max",d);a("span",e).attr({"aria-valuemax":d})},value:function(b,e,d){d=a(b).prop("valueAsNumber");isNaN(d)||(l.range.blockAttr||a(e).slider("option","value",d),a("span",e).attr({"aria-valuenow":d,"aria-valuetext":d}))},step:function(b,e,d){d=d&&a.trim(d)?1*d||1:1;a(e).slider("option","step",d)}};if(!b.bugs.valueAsNumberSet&&(h.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))j=function(){b.data(this,"hasShadow")&& -a.prop(this,"value",a.prop(this,"value"))},b.onNodeNamesPropertyModify("input","valueAsNumber",j),b.onNodeNamesPropertyModify("input","valueAsDate",j);a.each("disabled,min,max,value,step,data-placeholder".split(","),function(a,e){b.onNodeNamesPropertyModify("input",e,function(a){var c=b.data(this,"shadowData");if(c&&c.data&&c.data[e]&&c.nativeElement===this)c.data[e](this,c.shadowElement,a)})});if(!h.availabeLangs)h.availabeLangs="af ar ar-DZ az bg bs ca cs da de el en-AU en-GB en-NZ eo es et eu fa fi fo fr fr-CH gl he hr hu hy id is it ja ko kz lt lv ml ms nl no pl pt-BR rm ro ru sk sl sq sr sr-SR sv ta th tr uk vi zh-CN zh-HK zh-TW".split(" "); -j=function(){a.datepicker&&(b.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){b=a.extend({},n,b,h.datepicker);b.dateFormat&&h.datepicker.dateFormat!=b.dateFormat&&a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",b.dateFormat).getNativeElement().filter("[data-placeholder]").attr("data-placeholder",function(a,b){return b});a.datepicker.setDefaults(b)}}),a(m).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))}; -a(m).bind("jquery-uiReady.langchange input-widgetsReady.langchange",j);j();(function(){var c=function(){var b={};return function(c){return c in b?b[c]:b[c]=a('<input type="'+c+'" />')[0].type===c}}();if(!c("number")){var e=b.cfg["forms-ext"],d=b.inputTypes,f=function(c,e,f){f=f||{};if(!("type"in f))f.type=a.prop(c,"type");if(!("step"in f))f.step=b.getStep(c,f.type);if(!("valueAsNumber"in f))f.valueAsNumber=d[f.type].asNumber(a.prop(c,"value"));var g="any"==f.step?d[f.type].step*d[f.type].stepScaleFactor: -f.step;b.addMinMaxNumberToCache("min",a(c),f);b.addMinMaxNumberToCache("max",a(c),f);if(isNaN(f.valueAsNumber))f.valueAsNumber=d[f.type].stepBase||0;if("any"!==f.step&&(c=Math.round(1E7*((f.valueAsNumber-(f.minAsnumber||0))%f.step))/1E7)&&Math.abs(c)!=f.step)f.valueAsNumber-=c;c=f.valueAsNumber+g*e;return c=!isNaN(f.minAsNumber)&&c<f.minAsNumber?f.valueAsNumber*e<f.minAsNumber?f.minAsNumber:isNaN(f.maxAsNumber)?f.valueAsNumber:f.maxAsNumber:!isNaN(f.maxAsNumber)&&c>f.maxAsNumber?f.valueAsNumber*e> -f.maxAsNumber?f.maxAsNumber:isNaN(f.minAsNumber)?f.valueAsNumber:f.minAsNumber:Math.round(1E7*c)/1E7};b.modules["form-number-date-ui"].getNextStep=f;var i=function(b,c,e){if(!b.disabled&&!b.readOnly&&!a(e).hasClass("step-controls")&&(a.prop(b,"value",d[c].numberToString(f(b,a(e).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),g(b,"input"),m.activeElement)){if(m.activeElement!==b)try{b.focus()}catch(i){}setTimeout(function(){if(m.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim", -function(){g(b,"change")})},0)}};if(e.stepArrows){var h={set:function(){var a=b.data(this,"step-controls");if(a)a[this.disabled||this.readonly?"addClass":"removeClass"]("disabled-step-control")}};b.onNodeNamesPropertyModify("input","disabled",h);b.onNodeNamesPropertyModify("input","readonly",a.extend({},h))}var l={38:1,40:-1};b.addReady(function(h,j){e.stepArrows&&a("input",h).add(j.filter("input")).each(function(){var h=a.prop(this,"type");if(d[h]&&d[h].asNumber&&e.stepArrows&&!(!0!==e.stepArrows&& -!e.stepArrows[h]||c(h)||a(j).hasClass("has-step-controls"))){var j=this,m=a('<span class="step-controls" unselectable="on"><span class="step-up" /><span class="step-down" /></span>').insertAfter(j).bind("selectstart dragstart",function(){return!1}).bind("mousedown mousepress",function(a){i(j,h,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),n=function(b,c){if(!j.disabled&&!j.readOnly&&c)return a.prop(j, -"value",d[h].numberToString(f(j,c,{type:h}))),g(j,"input"),!1},o=a(j).addClass("has-step-controls").attr({readonly:j.readOnly,disabled:j.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",function(b){if(!j.disabled&&!j.readOnly&&l[b.keyCode])return a.prop(j,"value",d[h].numberToString(f(j,l[b.keyCode],{type:h}))),g(j,"input"),!1});"number"==h&&o.bind("keypress",function(){return function(a){var b=String.fromCharCode(null==a.charCode?a.keyCode:a.charCode);return a.ctrlKey|| -a.metaKey||" ">b||-1<"0123456789.".indexOf(b)}}());a.fn.mwheelIntent?o.add(m).bind("mwheelIntent",n):a.fn.mousewheel&&o.bind("focus",function(){o.add(m).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",n)}).bind("blur",function(){a(j).add(m).unbind(".mwhellwebshims")});b.data(j,"step-controls",m);if(e.calculateWidth){var p;o.bind("updateshadowdom",function(){if(!p&&(j.offsetWidth||j.offsetHeight))p=!0,r(o,m),m.css("marginTop",(o.outerHeight()-m.outerHeight())/2)}).triggerHandler("updateshadowdom")}}})})}})(); -b.addReady(function(c,d){a(m).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",function(){if(a.datepicker||a.fn.slider){if(a.datepicker&&!n.dateFormat)n.dateFormat=a.datepicker._defaults.dateFormat;l(c,d)}a.datepicker&&a.fn.slider?a(m).unbind(".initinputui"):b.modules["input-widgets"].src||b.warn('jQuery UI Widget factory is already included, but not datepicker or slider. configure src of $.webshims.modules["input-widgets"].src')})})}); +jQuery.webshims.register("form-datalist",function(b,c,l,m,t){c.propTypes.element=function(i){c.createPropDefault(i,"attr");if(!i.prop)i.prop={get:function(){var c=i.attr.get.call(this);c&&(c=m.getElementById(c))&&i.propNodeName&&!b.nodeName(c,i.propNodeName)&&(c=null);return c||null},writeable:!1}};(function(){var i=b.webshims.cfg.forms,n=Modernizr.input.list;if(!n||i.customDatalist){var j=0,p={submit:1,button:1,reset:1,hidden:1,range:1,date:1},u=b.browser.msie&&7>parseInt(b.browser.version,10),r= +{},k=function(b){if(!b)return[];if(r[b])return r[b];var c;try{c=JSON.parse(localStorage.getItem("storedDatalistOptions"+b))}catch(d){}r[b]=c||[];return c||[]},q={_create:function(g){if(!p[b.prop(g.input,"type")]){var c=g.datalist,d=b.data(g.input,"datalistWidget");if(c&&d&&d.datalist!==c)d.datalist=c,d.id=g.id,d.shadowList.prop("className","datalist-polyfill "+(d.datalist.className||"")+" "+d.datalist.id+"-shadowdom"),i.positionDatalist?d.shadowList.insertAfter(g.input):d.shadowList.appendTo("body"), +b(d.datalist).unbind("updateDatalist.datalistWidget").bind("updateDatalist.datalistWidget",b.proxy(d,"_resetListCached")),d._resetListCached();else if(c){if(!(d&&d.datalist===c)){j++;var a=this;this.hideList=b.proxy(a,"hideList");this.timedHide=function(){clearTimeout(a.hideTimer);a.hideTimer=setTimeout(a.hideList,9)};this.datalist=c;this.id=g.id;this.hasViewableData=!0;this._autocomplete=b.attr(g.input,"autocomplete");b.data(g.input,"datalistWidget",this);this.shadowList=b('<div class="datalist-polyfill '+ +(this.datalist.className||"")+" "+this.datalist.id+'-shadowdom" />');i.positionDatalist||b(g.input).hasClass("position-datalist")?this.shadowList.insertAfter(g.input):this.shadowList.appendTo("body");this.index=-1;this.input=g.input;this.arrayOptions=[];this.shadowList.delegate("li","mouseenter.datalistWidget mousedown.datalistWidget click.datalistWidget",function(f){var e=b("li:not(.hidden-item)",a.shadowList),o="mousedown"==f.type||"click"==f.type;a.markItem(e.index(f.currentTarget),o,e);"click"== +f.type&&(a.hideList(),i.customDatalist&&b(g.input).trigger("datalistselect"));return"mousedown"!=f.type}).bind("focusout",this.timedHide);g.input.setAttribute("autocomplete","off");b(g.input).attr({"aria-haspopup":"true"}).bind("input.datalistWidget",function(){if(!a.triggeredByDatalist)a.changedValue=!1,a.showHideOptions()}).bind("keydown.datalistWidget",function(f){var e=f.keyCode,o;if(40==e&&!a.showList())return a.markItem(a.index+1,!0),!1;if(a.isListVisible){if(38==e)return a.markItem(a.index- +1,!0),!1;if(!f.shiftKey&&(33==e||36==e))return a.markItem(0,!0),!1;if(!f.shiftKey&&(34==e||35==e))return f=b("li:not(.hidden-item)",a.shadowList),a.markItem(f.length-1,!0,f),!1;if(13==e||27==e)return 13==e&&(o=b("li.active-item:not(.hidden-item)",a.shadowList),a.changeValue(b("li.active-item:not(.hidden-item)",a.shadowList))),a.hideList(),i.customDatalist&&o&&o[0]&&b(g.input).trigger("datalistselect"),!1}}).bind("focus.datalistWidget",function(){b(this).hasClass("list-focus")&&a.showList()}).bind("mousedown.datalistWidget", +function(){b(this).is(":focus")&&a.showList()}).bind("blur.datalistWidget",this.timedHide);b(this.datalist).unbind("updateDatalist.datalistWidget").bind("updateDatalist.datalistWidget",b.proxy(this,"_resetListCached"));this._resetListCached();g.input.form&&(g.input.name||g.input.id)&&b(g.input.form).bind("submit.datalistWidget"+g.input.id,function(){if(!b(g.input).hasClass("no-datalist-cache")&&"off"!=a._autocomplete){var f=b.prop(g.input,"value"),e=(g.input.name||g.input.id)+b.prop(g.input,"type"); +if(!a.storedOptions)a.storedOptions=k(e);if(f&&-1==a.storedOptions.indexOf(f)&&(a.storedOptions.push(f),f=a.storedOptions,e)){f=f||[];try{localStorage.setItem("storedDatalistOptions"+e,JSON.stringify(f))}catch(o){}}}});b(l).bind("unload.datalist"+this.id+" beforeunload.datalist"+this.id,function(){a.destroy()})}}else d&&d.destroy()}},destroy:function(){var c=b.attr(this.input,"autocomplete");b(this.input).unbind(".datalistWidget").removeData("datalistWidget");this.shadowList.remove();b(m).unbind(".datalist"+ +this.id);b(l).unbind(".datalist"+this.id);this.input.form&&this.input.id&&b(this.input.form).unbind("submit.datalistWidget"+this.input.id);this.input.removeAttribute("aria-haspopup");c===t?this.input.removeAttribute("autocomplete"):b(this.input).attr("autocomplete",c)},_resetListCached:function(b){var h=this,d;this.needsUpdate=!0;this.lastUpdatedValue=!1;this.lastUnfoundValue="";this.updateTimer||(l.QUnit||(d=b&&m.activeElement==h.input)?h.updateListOptions(d):c.ready("WINDOWLOAD",function(){h.updateTimer= +setTimeout(function(){h.updateListOptions();h=null;j=1},200+100*j)}))},updateListOptions:function(c){this.needsUpdate=!1;clearTimeout(this.updateTimer);this.updateTimer=!1;this.shadowList.css({fontSize:b.css(this.input,"fontSize"),fontFamily:b.css(this.input,"fontFamily")});this.searchStart=i.customDatalist&&b(this.input).hasClass("search-start");var h=[],d=[],a=[],f,e,o,w;for(e=b.prop(this.datalist,"options"),o=0,w=e.length;o<w;o++){f=e[o];if(f.disabled)return;f={value:b(f).val()||"",text:b.trim(b.attr(f, +"label")||f.textContent||f.innerText||b.text([f])||""),className:f.className||"",style:b.attr(f,"style")||""};f.text?f.text!=f.value&&(f.className+=" different-label-value"):f.text=f.value;d[o]=f.value;a[o]=f}if(!this.storedOptions)this.storedOptions=b(this.input).hasClass("no-datalist-cache")||"off"==this._autocomplete?[]:k((this.input.name||this.input.id)+b.prop(this.input,"type"));this.storedOptions.forEach(function(e){-1==d.indexOf(e)&&a.push({value:e,text:e,className:"stored-suggest",style:""})}); +for(o=0,w=a.length;o<w;o++)e=a[o],h[o]='<li class="'+e.className+'" style="'+e.style+'" tabindex="-1" role="listitem"><span class="option-label">'+e.text+'</span> <span class="option-value">'+e.value+"</span></li>";this.arrayOptions=a;this.shadowList.html('<div class="datalist-outer-box"><div class="datalist-box"><ul role="list">'+h.join("\n")+"</ul></div></div>");b.fn.bgIframe&&u&&this.shadowList.bgIframe();(c||this.isListVisible)&&this.showHideOptions()},showHideOptions:function(c){var h=b.prop(this.input, +"value").toLowerCase();if(!(h===this.lastUpdatedValue||this.lastUnfoundValue&&0===h.indexOf(this.lastUnfoundValue))){this.lastUpdatedValue=h;var d=!1,a=this.searchStart,f=b("li",this.shadowList);h?this.arrayOptions.forEach(function(e,o){var c;if(!("lowerText"in e))e.lowerText=e.text!=e.value?e.value.toLowerCase()+e.text.toLowerCase():e.text.toLowerCase();c=e.lowerText.indexOf(h);(c=a?!c:-1!==c)?(b(f[o]).removeClass("hidden-item"),d=!0):b(f[o]).addClass("hidden-item")}):f.length&&(f.removeClass("hidden-item"), +d=!0);this.hasViewableData=d;!c&&d&&this.showList();if(!d)this.lastUnfoundValue=h,this.hideList()}},setPos:function(){this.shadowList.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0});var g=i.positionDatalist?b(this.input).position():c.getRelOffset(this.shadowList,this.input);g.top+=b(this.input).outerHeight();g.width=b(this.input).outerWidth()-(parseInt(this.shadowList.css("borderLeftWidth"),10)||0)-(parseInt(this.shadowList.css("borderRightWidth"),10)||0);this.shadowList.css({marginTop:"", +marginLeft:"",marginRight:"",marginBottom:""}).css(g);return g},showList:function(){if(this.isListVisible)return!1;this.needsUpdate&&this.updateListOptions();this.showHideOptions(!0);if(!this.hasViewableData)return!1;this.isListVisible=!0;var c=this;c.setPos();c.shadowList.addClass("datalist-visible").find("li.active-item").removeClass("active-item");b(l).unbind(".datalist"+c.id);b(m).unbind(".datalist"+c.id).bind("mousedown.datalist"+c.id+" focusin.datalist"+c.id,function(h){h.target===c.input|| +c.shadowList[0]===h.target||b.contains(c.shadowList[0],h.target)?(clearTimeout(c.hideTimer),setTimeout(function(){clearTimeout(c.hideTimer)},9)):c.timedHide()}).bind("updateshadowdom.datalist"+c.id,function(){c.setPos()});return!0},hideList:function(){if(!this.isListVisible)return!1;var g=this,h=function(){g.changedValue&&b(g.input).trigger("change");g.changedValue=!1};g.shadowList.removeClass("datalist-visible list-item-active");g.index=-1;g.isListVisible=!1;if(g.changedValue){g.triggeredByDatalist= +!0;c.triggerInlineForm&&c.triggerInlineForm(g.input,"input");if(b(g.input).is(":focus"))b(g.input).one("blur",h);else h();g.triggeredByDatalist=!1}b(m).unbind(".datalist"+g.id);b(l).unbind(".datalist"+g.id).one("resize.datalist"+g.id,function(){g.shadowList.css({top:0,left:0})});return!0},scrollIntoView:function(c){var h=b("ul",this.shadowList),d=b("div.datalist-box",this.shadowList),a=c.position();a.top-=(parseInt(h.css("paddingTop"),10)||0)+(parseInt(h.css("marginTop"),10)||0)+(parseInt(h.css("borderTopWidth"), +10)||0);0>a.top?d.scrollTop(d.scrollTop()+a.top-2):(a.top+=c.outerHeight(),c=d.height(),a.top>c&&d.scrollTop(d.scrollTop()+(a.top-c)+2))},changeValue:function(c){if(c[0]){var c=b("span.option-value",c).text(),h=b.prop(this.input,"value");if(c!=h)b(this.input).prop("value",c).triggerHandler("updateInput"),this.changedValue=!0}},markItem:function(c,h,d){d=d||b("li:not(.hidden-item)",this.shadowList);if(d.length)0>c?c=d.length-1:c>=d.length&&(c=0),d.removeClass("active-item"),this.shadowList.addClass("list-item-active"), +d=d.filter(":eq("+c+")").addClass("active-item"),h&&(this.changeValue(d),this.scrollIntoView(d)),this.index=c}};(function(){n||c.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var h=b("select",this);h[0]?h=h[0].options:(h=b("option",this).get(),h.length&&c.warn("you should wrap your option-elements for a datalist in a select element to support IE and other old browsers."));return h}}});var g={autocomplete:{attr:{get:function(){var c=b.data(this,"datalistWidget");return c? +c._autocomplete:"autocomplete"in this?this.autocomplete:this.getAttribute("autocomplete")},set:function(c){var d=b.data(this,"datalistWidget");d?(d._autocomplete=c,"off"==c&&d.hideList()):"autocomplete"in this?this.autocomplete=c:this.setAttribute("autocomplete",c)}}}};n?((b("<datalist><select><option></option></select></datalist>").prop("options")||[]).length||c.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var c=this.options||[];if(!c.length){var d=b("select",this); +if(d[0]&&d[0].options&&d[0].options.length)c=d[0].options}return c}}}),g.list={attr:{get:function(){var g=c.contentAttr(this,"list");null!=g?this.removeAttribute("list"):g=b.data(this,"datalistListAttr");return null==g?t:g},set:function(g){b.data(this,"datalistListAttr",g);c.objectCreate(q,t,{input:this,id:g,datalist:b.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"}):g.list={attr:{get:function(){var b=c.contentAttr(this,"list");return null==b?t:b},set:function(g){c.contentAttr(this, +"list",g);c.objectCreate(q,t,{input:this,id:g,datalist:b.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"};c.defineNodeNameProperties("input",g);if(b.event.customEvent)b.event.customEvent.updateDatalist=!0,b.event.customEvent.updateInput=!0,b.event.customEvent.datalistselect=!0;c.addReady(function(b,c){c.filter("datalist > select, datalist, datalist > option, datalist > select > option").closest("datalist").triggerHandler("updateDatalist")})})()}})()}); +jQuery.webshims.register("form-extend",function(b,c,l,m,t,i){l=l.Modernizr;t=l.inputtypes;if(l.formvalidation&&!c.bugs.bustedValidity){var n=c.inputTypes,j={};c.addInputType=function(a,b){n[a]=b};c.addValidityRule=function(a,b){j[a]=b};c.addValidityRule("typeMismatch",function(a,b,f,c){if(""===b)return!1;c=c.typeMismatch;if(!("type"in f))f.type=(a[0].getAttribute("type")||"").toLowerCase();n[f.type]&&n[f.type].mismatch&&(c=n[f.type].mismatch(b,a));return c});var p=i.overrideMessages,u=!t.number|| +!t.time||!t.range||p,r="customError,typeMismatch,rangeUnderflow,rangeOverflow,stepMismatch,tooLong,patternMismatch,valueMissing,valid".split(","),i=p?["value","checked"]:["value"],k=[],q=function(a,f){if(a){var c=(a.getAttribute&&a.getAttribute("type")||a.type||"").toLowerCase();if(p||n[c])p&&!f&&"radio"==c&&a.name?b(m.getElementsByName(a.name)).each(function(){b.prop(this,"validity")}):b.prop(a,"validity")}},g={};["input","textarea","select"].forEach(function(a){var f=c.defineNodeNameProperty(a, +"setCustomValidity",{prop:{value:function(g){var g=g+"",d="input"==a?b(this).getNativeElement()[0]:this;f.prop._supvalue.call(d,g);c.bugs.validationMessage&&c.data(d,"customvalidationMessage",g);u&&(c.data(d,"hasCustomError",!!g),q(d))}}});g[a]=f.prop._supvalue});if(u||p)i.push("min"),i.push("max"),i.push("step"),k.push("input");p&&(i.push("required"),i.push("pattern"),k.push("select"),k.push("textarea"));if(u){var h;k.forEach(function(a){var f=c.defineNodeNameProperty(a,"validity",{prop:{get:function(){if(!h){var d= +"input"==a?b(this).getNativeElement()[0]:this,i=f.prop._supget.call(d);if(!i)return i;var s={};r.forEach(function(a){s[a]=i[a]});if(!b.prop(d,"willValidate"))return s;h=!0;var k=b(d),v={type:(d.getAttribute&&d.getAttribute("type")||"").toLowerCase(),nodeName:(d.nodeName||"").toLowerCase()},l=k.val(),x=!!c.data(d,"hasCustomError"),m;h=!1;s.customError=x;if(s.valid&&s.customError)s.valid=!1;else if(!s.valid){var q=!0;b.each(s,function(a,e){if(e)return q=!1});if(q)s.valid=!0}b.each(j,function(b,f){s[b]= +f(k,l,v,s);if(s[b]&&(s.valid||!m)&&(p||n[v.type]&&n[v.type].mismatch))g[a].call(d,c.createValidationMessage(d,b)),s.valid=!1,m=!0});s.valid?(g[a].call(d,""),c.data(d,"hasCustomError",!1)):p&&!m&&!x&&b.each(s,function(b,f){if("valid"!==b&&f)return g[a].call(d,c.createValidationMessage(d,b)),!1});return s}},writeable:!1}})});i.forEach(function(a){c.onNodeNamesPropertyModify(k,a,function(){q(this)})});if(m.addEventListener){var d,a=function(a){if("form"in a.target){var f=a.target.form;clearTimeout(d); +q(a.target);f&&p&&b("input",f).each(function(){"password"==this.type&&q(this)})}};m.addEventListener("change",a,!0);p&&(m.addEventListener("blur",a,!0),m.addEventListener("keydown",function(b){13==b.keyCode&&a(b)},!0));m.addEventListener("input",function(a){clearTimeout(d);d=setTimeout(function(){q(a.target)},290)},!0)}var f=k.join(",");c.addReady(function(a,c){b(f,a).add(c.filter(f)).each(function(){b.prop(this,"validity")})});p&&c.ready("DOM form-message",function(){c.activeLang({register:"form-core", +callback:function(){b("input, select, textarea").getNativeElement().each(function(){if(!c.data(this,"hasCustomError")){var a=this,f=b.prop(a,"validity")||{valid:!0},d;f.valid||(d=(a.nodeName||"").toLowerCase(),b.each(f,function(b,f){if("valid"!==b&&f)return g[d].call(a,c.createValidationMessage(a,b)),!1}))}})}})})}c.defineNodeNameProperty("input","type",{prop:{get:function(){var a=(this.getAttribute("type")||"").toLowerCase();return c.inputTypes[a]?a:this.type}}})}}); +jQuery.webshims.register("form-number-date-api",function(b,c){var l,m,t,i;if(!c.getStep)c.getStep=function(a,f){var e=b.attr(a,"step");if("any"===e)return e;f=f||r(a);if(!j[f]||!j[f].step)return e;e=l.asNumber(e);return(!isNaN(e)&&0<e?e:j[f].step)*j[f].stepScaleFactor};if(!c.addMinMaxNumberToCache)c.addMinMaxNumberToCache=function(a,b,e){a+"AsNumber"in e||(e[a+"AsNumber"]=j[e.type].asNumber(b.attr(a)),isNaN(e[a+"AsNumber"])&&a+"Default"in j[e.type]&&(e[a+"AsNumber"]=j[e.type][a+"Default"]))};var n= +parseInt("NaN",10),j=c.inputTypes,p=function(a){return"number"==typeof a||a&&a==1*a},u=function(a){return b('<input type="'+a+'" />').prop("type")===a},r=function(a){return(a.getAttribute("type")||"").toLowerCase()},k=c.addMinMaxNumberToCache,q=function(a,b){for(var a=""+a,b=b-a.length,e=0;e<b;e++)a="0"+a;return a},g=c.bugs.valueAsNumberSet||c.bugs.bustedValidity;c.addValidityRule("stepMismatch",function(a,b,e,o){if(""===b)return!1;if(!("type"in e))e.type=r(a[0]);if("date"==e.type)return!1;o=(o|| +{}).stepMismatch;if(j[e.type]&&j[e.type].step){if(!("step"in e))e.step=c.getStep(a[0],e.type);if("any"==e.step)return!1;if(!("valueAsNumber"in e))e.valueAsNumber=j[e.type].asNumber(b);if(isNaN(e.valueAsNumber))return!1;k("min",a,e);a=e.minAsNumber;isNaN(a)&&(a=j[e.type].stepBase||0);o=Math.abs((e.valueAsNumber-a)%e.step);o=!(1.0E-7>=o||1.0E-7>=Math.abs(o-e.step))}return o});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){c.addValidityRule(a.name, +function(b,e,c,d){d=(d||{})[a.name]||!1;if(""===e)return d;if(!("type"in c))c.type=r(b[0]);if(j[c.type]&&j[c.type].asNumber){if(!("valueAsNumber"in c))c.valueAsNumber=j[c.type].asNumber(e);if(isNaN(c.valueAsNumber))return!1;k(a.attr,b,c);if(isNaN(c[a.attr+"AsNumber"]))return d;d=c[a.attr+"AsNumber"]*a.factor<c.valueAsNumber*a.factor-1.0E-7}return d})});c.reflectProperties(["input"],["max","min","step"]);var h=c.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var a=r(this),a=j[a]&& +j[a].asNumber?j[a].asNumber(b.prop(this,"value")):h.prop._supget&&h.prop._supget.apply(this,arguments);null==a&&(a=n);return a},set:function(a){var f=r(this);j[f]&&j[f].numberToString?isNaN(a)?b.prop(this,"value",""):(f=j[f].numberToString(a),!1!==f?b.prop(this,"value",f):c.warn("INVALID_STATE_ERR: DOM Exception 11")):h.prop._supset&&h.prop._supset.apply(this,arguments)}}}),d=c.defineNodeNameProperty("input","valueAsDate",{prop:{get:function(){var a=r(this);return j[a]&&j[a].asDate&&!j[a].noAsDate? +j[a].asDate(b.prop(this,"value")):d.prop._supget&&d.prop._supget.call(this)||null},set:function(a){var f=r(this);if(j[f]&&j[f].dateToString&&!j[f].noAsDate){if(null===a)return b.prop(this,"value",""),"";f=j[f].dateToString(a);if(!1!==f)return b.prop(this,"value",f),f;c.warn("INVALID_STATE_ERR: DOM Exception 11")}else return d.prop._supset&&d.prop._supset.apply(this,arguments)||null}}});l={mismatch:function(a){return!p(a)},step:1,stepScaleFactor:1,asNumber:function(a){return p(a)?1*a:n},numberToString:function(a){return p(a)? +a:!1}};m={minDefault:0,maxDefault:100};t={mismatch:function(a){if(!a||!a.split||!/\d$/.test(a))return!0;var f=a.split(/\u002D/);if(3!==f.length)return!0;var e=!1;b.each(f,function(a,b){if(!(p(b)||b&&b=="0"+1*b))return e=!0,!1});if(e)return e;if(4!==f[0].length||2!=f[1].length||12<f[1]||2!=f[2].length||33<f[2])e=!0;return a!==this.dateToString(this.asDate(a,!0))},step:1,stepScaleFactor:864E5,asDate:function(a,b){return!b&&this.mismatch(a)?null:new Date(this.asNumber(a,!0))},asNumber:function(a,b){var e= +n;if(b||!this.mismatch(a))a=a.split(/\u002D/),e=Date.UTC(a[0],a[1]-1,a[2]);return e},numberToString:function(a){return p(a)?this.dateToString(new Date(1*a)):!1},dateToString:function(a){return a&&a.getFullYear?a.getUTCFullYear()+"-"+q(a.getUTCMonth()+1,2)+"-"+q(a.getUTCDate(),2):!1}};i={mismatch:function(a,f){if(!a||!a.split||!/\d$/.test(a))return!0;a=a.split(/\u003A/);if(2>a.length||3<a.length)return!0;var e=!1,c;a[2]&&(a[2]=a[2].split(/\u002E/),c=parseInt(a[2][1],10),a[2]=a[2][0]);b.each(a,function(a, +b){if(!(p(b)||b&&b=="0"+1*b)||2!==b.length)return e=!0,!1});if(e||23<a[0]||0>a[0]||59<a[1]||0>a[1]||a[2]&&(59<a[2]||0>a[2])||c&&isNaN(c))return!0;c&&(100>c?c*=100:10>c&&(c*=10));return!0===f?[a,c]:!1},step:60,stepBase:0,stepScaleFactor:1E3,asDate:function(a){a=new Date(this.asNumber(a));return isNaN(a)?null:a},asNumber:function(a){var b=n,a=this.mismatch(a,!0);!0!==a&&(b=Date.UTC("1970",0,1,a[0][0],a[0][1],a[0][2]||0),a[1]&&(b+=a[1]));return b},dateToString:function(a){if(a&&a.getUTCHours){var b= +q(a.getUTCHours(),2)+":"+q(a.getUTCMinutes(),2),c=a.getSeconds();"0"!=c&&(b+=":"+q(c,2));c=a.getUTCMilliseconds();"0"!=c&&(b+="."+q(c,3));return b}return!1}};if(g||!u("range")||!u("time"))m=b.extend({},l,m),i=b.extend({},t,i);(g||!u("number"))&&c.addInputType("number",l);(g||!u("range"))&&c.addInputType("range",m);(g||!u("date"))&&c.addInputType("date",t);(g||!u("time"))&&c.addInputType("time",i)}); +jQuery.webshims.register("form-number-date-ui",function(b,c,l,m,t,i){var n=c.triggerInlineForm,l=Modernizr.inputtypes,j=function(){var a={"padding-box":"innerWidth","border-box":"outerWidth","content-box":"width"},f=Modernizr.prefixed&&Modernizr.prefixed("boxSizing");b.browser.msie&&8>c.browserVersion&&(f=!1);return function(b,c){var d,g,i;g="width";f&&(g=a[b.css(f)]||g);d=b[g]();g="width"==g;if(d){var h=parseInt(c.css("marginLeft"),10)||0,v=c.outerWidth();(i=parseInt(b.css("marginRight"),10)||0)&& +b.css("marginRight",0);h<=-1*v?(c.css("marginRight",Math.floor(Math.abs(v+h-0.1)+i)),b.css("paddingRight",(parseInt(b.css("paddingRight"),10)||0)+Math.abs(h)),g&&b.css("width",Math.floor(d+h))):(c.css("marginRight",i),b.css("width",Math.floor(d-h-v-0.2)))}}}(),p={},u=b([]),r,k=function(a,f){b("input",a).add(f.filter("input")).each(function(){var a=b.prop(this,"type");if(k[a]&&!c.data(this,"shadowData"))k[a](b(this))})},q=function(a,c){if(i.lazyDate){var e=b.data(a[0],"setDateLazyTimer");e&&clearTimeout(e); +b.data(a[0],"setDateLazyTimer",setTimeout(function(){a.datepicker("setDate",c);b.removeData(a[0],"setDateLazyTimer");a=null},0))}else a.datepicker("setDate",c)},g={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!i.copyAttrs)i.copyAttrs={};c.extendUNDEFProp(i.copyAttrs,g);var h=function(a){return i.calculateWidth?{css:{marginRight:a.css("marginRight"),marginLeft:a.css("marginLeft")},outerWidth:a.outerWidth()}:{}};k.common=function(a,f,e){Modernizr.formvalidation&&a.bind("firstinvalid", +function(b){(c.fromSubmit||!r)&&a.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble",function(e){!b.isInvalidUIPrevented()&&!e.isDefaultPrevented()&&(c.validityAlert.showFor(b.target),b.preventDefault(),e.preventDefault());a.unbind("invalid.replacedwidgetbubble")})});var d,h,j=b("input, span.ui-slider-handle",f),k=a[0].attributes;for(d in i.copyAttrs)if((h=k[d])&&h.specified)g[d]&&j[0]?j.attr(d,h.nodeValue):f[0].setAttribute(d,h.nodeValue);d=(d=a.attr("id"))?b('label[for="'+ +d+'"]',a[0].form):u;f.addClass(a[0].className);c.addShadowDom(a,f,{data:e||{},shadowFocusElement:b("input.input-datetime-local-date, span.ui-slider-handle",f)[0],shadowChilds:j});a.after(f);a[0].form&&b(a[0].form).bind("reset",function(b){b.originalEvent&&!b.isDefaultPrevented()&&setTimeout(function(){a.prop("value",a.prop("value"))},0)});d[0]&&(f.getShadowFocusElement().attr("aria-labelledby",c.getID(d)),d.bind("click",function(){a.getShadowFocusElement().focus();return!1}))};Modernizr.formvalidation&& +["input","form"].forEach(function(a){var b=c.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){r=!0;var a=b.prop._supvalue.apply(this,arguments);r=!1;return a}}})});if(!l.date||i.replaceUI){var d=function(a,f,e,d){var g,h,j=function(){k.dpDiv.unbind("mousedown.webshimsmousedownhandler");h=g=!1},k=f.bind("focusin",function(){j();k.dpDiv.unbind("mousedown.webshimsmousedownhandler").bind("mousedown.webshimsmousedownhandler",function(){g=!0})}).bind("focusout blur",function(a){g&&(h=!0, +a.stopImmediatePropagation())}).datepicker(b.extend({onClose:function(){h&&f.not(":focus")?(j(),f.trigger("focusout"),f.triggerHandler("blur")):j()}},p,i.datepicker,a.data("datepicker"))).bind("change",e).data("datepicker");k.dpDiv.addClass("input-date-datepicker-control");d&&c.triggerDomUpdate(d[0]);"disabled,min,max,value,step,data-placeholder".split(",").forEach(function(b){var c=a.attr(b);c&&a.attr(b,c)});return k};k.date=function(a){if(b.fn.datepicker){var f=b('<input class="input-date" type="text" />'), +e;this.common(a,f,k.date.attrs);e=d(a,f,function(c){k.date.blockAttr=!0;var e;if(i.lazyDate){var d=b.data(f[0],"setDateLazyTimer");d&&(clearTimeout(d),b.removeData(f[0],"setDateLazyTimer"))}try{e=(e=b.datepicker.parseDate(f.datepicker("option","dateFormat"),f.prop("value")))?b.datepicker.formatDate("yy-mm-dd",e):f.prop("value")}catch(g){e=f.prop("value")}a.prop("value",e);k.date.blockAttr=!1;c.stopImmediatePropagation();n(a[0],"input");n(a[0],"change")});b(a).bind("updateshadowdom",function(){if(e.trigger[0]&& +(a.css({display:""}),a[0].offsetWidth||a[0].offsetHeight)){var b=h(a);b.css&&(f.css(b.css),b.outerWidth&&f.outerWidth(b.outerWidth),j(f,e.trigger))}a.css({display:"none"})}).triggerHandler("updateshadowdom");e.trigger[0]&&setTimeout(function(){c.ready("WINDOWLOAD",function(){b(a).triggerHandler("updateshadowdom")})},9)}};k.date.attrs={disabled:function(a,c,e){b.prop(c,"disabled",!!e)},min:function(a,c,e){try{e=b.datepicker.parseDate("yy-mm-dd",e)}catch(d){e=!1}e&&b(c).datepicker("option","minDate", +e)},max:function(a,c,e){try{e=b.datepicker.parseDate("yy-mm-dd",e)}catch(d){e=!1}e&&b(c).datepicker("option","maxDate",e)},"data-placeholder":function(a,c,e){a=(e||"").split("-");3==a.length&&(e=b(c).datepicker("option","dateFormat").replace("yy",a[0]).replace("mm",a[1]).replace("dd",a[2]));b.prop(c,"placeholder",e)},value:function(a,c,e){if(!k.date.blockAttr){try{var d=b.datepicker.parseDate("yy-mm-dd",e)}catch(g){d=!1}d?q(b(c),d):b.prop(c,"value",e)}}}}if(!l.range||i.replaceUI)k.range=function(a){if(b.fn.slider){var c= +b('<span class="input-range"><span class="ui-slider-handle" role="slider" tabindex="0" /></span>');this.common(a,c,k.range.attrs);a.bind("updateshadowdom",function(){a.css({display:""});if(a[0].offsetWidth||a[0].offsetHeight){var b=h(a);b.css&&(c.css(b.css),b.outerWidth&&c.outerWidth(b.outerWidth))}a.css({display:"none"})}).triggerHandler("updateshadowdom");c.slider(b.extend(!0,{},i.slider,a.data("slider"))).bind("slide",function(b,c){if(b.originalEvent)k.range.blockAttr=!0,a.prop("value",c.value), +k.range.blockAttr=!1,n(a[0],"input")}).bind("slidechange",function(b){b.originalEvent&&n(a[0],"change")});["disabled","min","max","step","value"].forEach(function(c){var f=a.prop(c),d;"value"==c&&!f&&(d=a.getShadowElement())&&(f=(b(d).slider("option","max")-b(d).slider("option","min"))/2);null!=f&&a.prop(c,f)})}},k.range.attrs={disabled:function(a,c,e){e=!!e;b(c).slider("option","disabled",e);b("span",c).attr({"aria-disabled":e+"",tabindex:e?"-1":"0"})},min:function(a,c,e){e=e?1*e||0:0;b(c).slider("option", +"min",e);b("span",c).attr({"aria-valuemin":e})},max:function(a,c,e){e=e||0===e?1*e||100:100;b(c).slider("option","max",e);b("span",c).attr({"aria-valuemax":e})},value:function(a,c,e){e=b(a).prop("valueAsNumber");isNaN(e)||(k.range.blockAttr||b(c).slider("option","value",e),b("span",c).attr({"aria-valuenow":e,"aria-valuetext":e}))},step:function(a,c,e){e=e&&b.trim(e)?1*e||1:1;b(c).slider("option","step",e)}};if(!c.bugs.valueAsNumberSet&&(i.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))l= +function(){c.data(this,"hasShadow")&&b.prop(this,"value",b.prop(this,"value"))},c.onNodeNamesPropertyModify("input","valueAsNumber",l),c.onNodeNamesPropertyModify("input","valueAsDate",l);b.each("disabled,min,max,value,step,data-placeholder".split(","),function(a,b){c.onNodeNamesPropertyModify("input",b,function(a){var d=c.data(this,"shadowData");if(d&&d.data&&d.data[b]&&d.nativeElement===this)d.data[b](this,d.shadowElement,a)})});if(!i.availabeLangs)i.availabeLangs="af ar ar-DZ az bg bs ca cs da de el en-AU en-GB en-NZ eo es et eu fa fi fo fr fr-CH gl he hr hu hy id is it ja ko kz lt lv ml ms nl no pl pt-BR rm ro ru sk sl sq sr sr-SR sv ta th tr uk vi zh-CN zh-HK zh-TW".split(" "); +l=function(){b.datepicker&&(c.activeLang({langObj:b.datepicker.regional,module:"form-number-date-ui",callback:function(a){a=b.extend({},p,a,i.datepicker);a.dateFormat&&i.datepicker.dateFormat!=a.dateFormat&&b("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",a.dateFormat).getNativeElement().filter("[data-placeholder]").attr("data-placeholder",function(a,b){return b});b.datepicker.setDefaults(a)}}),b(m).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))}; +b(m).bind("jquery-uiReady.langchange input-widgetsReady.langchange",l);l();(function(){var a=function(){var a={};return function(c){return c in a?a[c]:a[c]=b('<input type="'+c+'" />')[0].type===c}}();if(!a("number")||!a("time")){var f=c.cfg["forms-ext"],e=c.inputTypes,d={number:"0123456789.",time:"0123456789:."},g=function(a,f,d){d=d||{};if(!("type"in d))d.type=b.prop(a,"type");if(!("step"in d))d.step=c.getStep(a,d.type);if(!("valueAsNumber"in d))d.valueAsNumber=e[d.type].asNumber(b.prop(a,"value")); +var g="any"==d.step?e[d.type].step*e[d.type].stepScaleFactor:d.step;c.addMinMaxNumberToCache("min",b(a),d);c.addMinMaxNumberToCache("max",b(a),d);if(isNaN(d.valueAsNumber))d.valueAsNumber=e[d.type].stepBase||0;if("any"!==d.step&&(a=Math.round(1E7*((d.valueAsNumber-(d.minAsnumber||0))%d.step))/1E7)&&Math.abs(a)!=d.step)d.valueAsNumber-=a;a=d.valueAsNumber+g*f;return a=!isNaN(d.minAsNumber)&&a<d.minAsNumber?d.valueAsNumber*f<d.minAsNumber?d.minAsNumber:isNaN(d.maxAsNumber)?d.valueAsNumber:d.maxAsNumber: +!isNaN(d.maxAsNumber)&&a>d.maxAsNumber?d.valueAsNumber*f>d.maxAsNumber?d.maxAsNumber:isNaN(d.minAsNumber)?d.valueAsNumber:d.minAsNumber:Math.round(1E7*a)/1E7};c.modules["form-number-date-ui"].getNextStep=g;if(f.stepArrows){var h={set:function(){var a=c.data(this,"step-controls");if(a)a[this.disabled||this.readonly?"addClass":"removeClass"]("disabled-step-control")}};c.onNodeNamesPropertyModify("input","disabled",h);c.onNodeNamesPropertyModify("input","readonly",b.extend({},h))}var i={38:1,40:-1}, +k=function(a,c){function d(){var c=b.prop(a,"value");c==h&&c!=i&&"string"==typeof c&&n(a,"change");i=c}var f=!1,h,i;(function(){i=b(a).bind({"change.stepcontrol focus.stepcontrol":function(c){if(!f||"focus"!=c.type)i=b.prop(a,"value")},"blur.stepcontrol":function(){f||setTimeout(function(){!f&&!b(a).is(":focus")&&d();h=!1},9)}}).prop("value")})();return{triggerChange:d,step:function(d){!b.prop(a,"disabled")&&!a.readOnly&&d&&(h=e[c].numberToString(g(a,d,{type:c})),b.prop(a,"value",h),n(a,"input"))}, +setFocus:function(){f=!0;setTimeout(function(){f=!1},18);setTimeout(function(){if(!b(a).is(":focus"))try{a.focus()}catch(c){}},1)}}};c.addReady(function(g,h){f.stepArrows&&b("input",g).add(h.filter("input")).each(function(){var g=b.prop(this,"type");if(e[g]&&e[g].asNumber&&f.stepArrows&&!(!0!==f.stepArrows&&!f.stepArrows[g]||a(g)||b(h).hasClass("has-step-controls"))){var h=this,l=k(h,g),m=b('<span class="step-controls" unselectable="on"><span class="step-up" /><span class="step-down" /></span>').insertAfter(h).bind("selectstart dragstart", +function(){return!1}).bind("mousedown mousepress",function(a){b(a.target).hasClass("step-controls")||l.step(b(a.target).hasClass("step-up")?1:-1);l.setFocus();return!1}).bind("mousepressstart mousepressend",function(a){"mousepressend"==a.type&&l.triggerChange();b(a.target)["mousepressstart"==a.type?"addClass":"removeClass"]("mousepress-ui")}),p=function(a,b){if(b)return l.step(b),!1},n=b(h).addClass("has-step-controls").attr({readonly:h.readOnly,disabled:h.disabled,autocomplete:"off",role:"spinbutton"}).bind("keyup", +function(a){(a=i[a.keyCode])&&l.triggerChange(a)}).bind(b.browser.msie?"keydown":"keypress",function(a){if(a=i[a.keyCode])return l.step(a),!1});d[g]&&n.bind("keypress",function(){var a=d[g];return function(b){var c=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||" ">c||-1<a.indexOf(c)}}());n.bind("focus",function(){n.add(m).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",p)}).bind("blur",function(){b(h).add(m).unbind(".mwhellwebshims")});c.data(h, +"step-controls",m);if(f.calculateWidth){var q;n.bind("updateshadowdom",function(){if(!q&&(h.offsetWidth||h.offsetHeight))q=!0,j(n,m),m.css("marginTop",(n.outerHeight()-m.outerHeight())/2)}).triggerHandler("updateshadowdom")}}})})}})();c.addReady(function(a,d){b(m).bind("jquery-uiReady.initinputui input-widgetsReady.initinputui",function(){if(b.datepicker||b.fn.slider){if(b.datepicker&&!p.dateFormat)p.dateFormat=b.datepicker._defaults.dateFormat;k(a,d)}b.datepicker&&b.fn.slider?b(m).unbind(".initinputui"): +c.modules["input-widgets"].src||c.warn('jQuery UI Widget factory is already included, but not datepicker or slider. configure src of $.webshims.modules["input-widgets"].src')})})});