vendor/assets/javascripts/webshims/minified/shims/combos/18.js in webshims-rails-0.3 vs vendor/assets/javascripts/webshims/minified/shims/combos/18.js in webshims-rails-0.4

- old
+ new

@@ -1,59 +1,60 @@ -jQuery.webshims.register("form-datalist",function(a,b,m,l,s){b.propTypes.element=function(k){b.createPropDefault(k,"attr");if(!k.prop)k.prop={get:function(){var b=k.attr.get.call(this);b&&(b=a("#"+b)[0])&&k.propNodeName&&!a.nodeName(b,k.propNodeName)&&(b=null);return b||null},writeable:!1}};(function(){var k=a.webshims.cfg.forms,g=Modernizr.input.list;if(!g||k.customDatalist){var t=0,p={submit:1,button:1,reset:1,hidden:1,range:1,date:1},n=a.browser.msie&&7>parseInt(a.browser.version,10),v={},q=function(a){if(!a)return[]; -if(v[a])return v[a];var b;try{b=JSON.parse(localStorage.getItem("storedDatalistOptions"+a))}catch(c){}v[a]=b||[];return b||[]},j={_create:function(f){if(!p[a.prop(f.input,"type")]){var b=f.datalist,c=a.data(f.input,"datalistWidget");if(b&&c&&c.datalist!==b)c.datalist=b,c.id=f.id,c.shadowList.prop("className","datalist-polyfill "+(c.datalist.className||"")+" "+c.datalist.id+"-shadowdom"),k.positionDatalist?c.shadowList.insertAfter(f.input):c.shadowList.appendTo("body"),a(c.datalist).unbind("updateDatalist.datalistWidget").bind("updateDatalist.datalistWidget", -a.proxy(c,"_resetListCached")),c._resetListCached();else if(b){if(!(c&&c.datalist===b)){t++;var d=this;this.hideList=a.proxy(d,"hideList");this.timedHide=function(){clearTimeout(d.hideTimer);d.hideTimer=setTimeout(d.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" />');k.positionDatalist? -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 h=a("li:not(.hidden-item)",d.shadowList),c="mousedown"==e.type||"click"==e.type;d.markItem(h.index(e.currentTarget),c,h);"click"==e.type&&(d.hideList(),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(!d.triggeredByDatalist)d.changedValue=!1,d.showHideOptions()}).bind("keydown.datalistWidget",function(e){var h=e.keyCode,c;if(40==h&&!d.showList())return d.markItem(d.index+1,!0),!1;if(d.isListVisible){if(38==h)return d.markItem(d.index-1,!0),!1;if(!e.shiftKey&&(33==h||36==h))return d.markItem(0,!0),!1;if(!e.shiftKey&&(34==h||35==h))return e=a("li:not(.hidden-item)",d.shadowList),d.markItem(e.length-1,!0,e), -!1;if(13==h||27==h)return 13==h&&(c=a("li.active-item:not(.hidden-item)",d.shadowList),d.changeValue(a("li.active-item:not(.hidden-item)",d.shadowList))),d.hideList(),c&&c[0]&&a(f.input).trigger("datalistselect"),!1}}).bind("focus.datalistWidget",function(){a(this).hasClass("list-focus")&&d.showList()}).bind("mousedown.datalistWidget",function(){a(this).is(":focus")&&d.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")){var c=a.prop(f.input,"value"),h=(f.input.name||f.input.id)+a.prop(f.input,"type");if(!d.storedOptions)d.storedOptions=q(h);if(c&&-1==d.storedOptions.indexOf(c)&&(d.storedOptions.push(c),c=d.storedOptions,h)){c=c||[];try{localStorage.setItem("storedDatalistOptions"+h,JSON.stringify(c))}catch(o){}}}}); -a(m).bind("unload.datalist"+this.id+" beforeunload.datalist"+this.id,function(){d.destroy()})}}else c&&c.destroy()}},destroy:function(){var f=a.attr(this.input,"autocomplete");a(this.input).unbind(".datalistWidget").removeData("datalistWidget");this.shadowList.remove();a(l).unbind(".datalist"+this.id);a(m).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");f===s?this.input.removeAttribute("autocomplete"): -a(this.input).attr("autocomplete",f)},_resetListCached:function(a){var i=this,c;this.needsUpdate=!0;this.lastUpdatedValue=!1;this.lastUnfoundValue="";this.updateTimer||(m.QUnit||(c=a&&l.activeElement==i.input)?i.updateListOptions(c):b.ready("WINDOWLOAD",function(){i.updateTimer=setTimeout(function(){i.updateListOptions();i=null;t=1},200+100*t)}))},updateListOptions:function(f){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=a(this.input).hasClass("search-start");var b=[],c=[],d=[],e,h,o,w;for(h=a.prop(this.datalist,"options"),o=0,w=h.length;o<w;o++){e=h[o];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;c[o]=e.value;d[o]=e}if(!this.storedOptions)this.storedOptions= -a(this.input).hasClass("no-datalist-cache")?[]:q((this.input.name||this.input.id)+a.prop(this.input,"type"));this.storedOptions.forEach(function(a){-1==c.indexOf(a)&&d.push({value:a,text:a,className:"stored-suggest",style:""})});for(o=0,w=d.length;o<w;o++)h=d[o],b[o]='<li class="'+h.className+'" style="'+h.style+'" tabindex="-1" role="listitem"><span class="option-label">'+h.text+'</span> <span class="option-value">'+h.value+"</span></li>";this.arrayOptions=d;this.shadowList.html('<div class="datalist-outer-box"><div class="datalist-box"><ul role="list">'+ -b.join("\n")+"</ul></div></div>");a.fn.bgIframe&&n&&this.shadowList.bgIframe();(f||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 c=!1,d=this.searchStart,e=a("li",this.shadowList);i?this.arrayOptions.forEach(function(h,o){var b;if(!("lowerText"in h))h.lowerText=h.text!=h.value?h.text.toLowerCase()+h.value.toLowerCase(): -h.text.toLowerCase();b=h.lowerText.indexOf(i);(b=d?!b:-1!==b)?(a(e[o]).removeClass("hidden-item"),c=!0):a(e[o]).addClass("hidden-item")}):e.length&&(e.removeClass("hidden-item"),c=!0);this.hasViewableData=c;!b&&c&&this.showList();if(!c)this.lastUnfoundValue=i,this.hideList()}},setPos:function(){this.shadowList.css({marginTop:0,marginLeft:0,marginRight:0,marginBottom:0});var f=k.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,i;b.setPos();b.shadowList.addClass("datalist-visible").find("li.active-item").removeClass("active-item"); -a(l).unbind(".datalist"+b.id).bind("mousedown.datalist"+b.id+" focusin.datalist"+b.id,function(c){c.target===b.input||b.shadowList[0]===c.target||a.contains(b.shadowList[0],c.target)?(clearTimeout(b.hideTimer),setTimeout(function(){clearTimeout(b.hideTimer)},9)):b.timedHide()});a(m).unbind(".datalist"+b.id).bind("resize.datalist"+b.id+" orientationchange.datalist "+b.id+" emchange.datalist"+b.id,function(){clearTimeout(i);i=setTimeout(function(){b.setPos()},9)});clearTimeout(i);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(l).unbind(".datalist"+f.id);a(m).unbind(".datalist"+f.id).bind("resize.datalist"+f.id+" orientationchange.datalist "+f.id+" emchange.datalist"+ -f.id,function(){f.shadowList.css({top:0,left:0});a(m).unbind(".datalist"+f.id)});return!0},scrollIntoView:function(b){var i=a("ul",this.shadowList),c=a("div.datalist-box",this.shadowList),d=b.position();d.top-=(parseInt(i.css("paddingTop"),10)||0)+(parseInt(i.css("marginTop"),10)||0)+(parseInt(i.css("borderTopWidth"),10)||0);0>d.top?c.scrollTop(c.scrollTop()+d.top-2):(d.top+=b.outerHeight(),b=c.height(),d.top>b&&c.scrollTop(c.scrollTop()+(d.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,c){c=c||a("li:not(.hidden-item)",this.shadowList);if(c.length)0>b?b=c.length-1:b>=c.length&&(b=0),c.removeClass("active-item"),this.shadowList.addClass("list-item-active"),c=c.filter(":eq("+b+")").addClass("active-item"),i&&(this.changeValue(c),this.scrollIntoView(c)),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 you 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 c=a.data(this,"datalistWidget");c?(c._autocomplete=b,"off"==b&&c.hideList()): -"autocomplete"in this?this.autocomplete=b:this.setAttribute("autocomplete",b)}}}};if(!g||!1 in a("<input />")[0])f.selectedOption={prop:{writeable:!1,get:function(){var b=a.prop(this,"list"),c=null,d;if(!b)return c;d=a.attr(this,"value");if(!d)return c;b=a.prop(b,"options");if(!b.length)return c;a.each(b,function(b,h){if(d==a.prop(h,"value"))return c=h,!1});return c}}};f.list=g?{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(j,s,{input:this,id:f,datalist:a.prop(this,"list")})}},initAttr:!0,reflect:!0,propType:"element",propNodeName:"datalist"}:{attr:{get:function(){var a=b.contentAttr(this,"list");return null==a?s:a},set:function(f){b.contentAttr(this,"list",f);b.objectCreate(j,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,c){c.filter("datalist > select, datalist, datalist > option, datalist > select > option").closest("datalist").triggerHandler("updateDatalist")})})()}})()}); -jQuery.webshims.register("form-extend",function(a,b,m,l,s,k){m=m.Modernizr;s=m.inputtypes;if(m.formvalidation&&!b.bugs.bustedValidity){var g=b.inputTypes,t={};b.addInputType=function(a,c){g[a]=c};b.addValidityRule=function(a,c){t[a]=c};b.addValidityRule("typeMismatch",function(a,c,b,e){if(""===c)return!1;e=e.typeMismatch;if(!("type"in b))b.type=(a[0].getAttribute("type")||"").toLowerCase();g[b.type]&&g[b.type].mismatch&&(e=g[b.type].mismatch(c,a));return e});var p=k.overrideMessages,n=!s.number|| -!s.time||!s.range||p,v="customError,typeMismatch,rangeUnderflow,rangeOverflow,stepMismatch,tooLong,patternMismatch,valueMissing,valid".split(","),k=p?["value","checked"]:["value"],q=[],j=function(c,b){if(c){var e=(c.getAttribute&&c.getAttribute("type")||c.type||"").toLowerCase();if(p||g[e])p&&!b&&"radio"==e&&c.name?a(l.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);n&&(b.data(f,"hasCustomError",!!d),j(f))}}});f[c]=e.prop._supvalue});if(n||p)k.push("min"),k.push("max"),k.push("step"),q.push("input");p&&(k.push("required"),k.push("pattern"),q.push("select"),q.push("textarea"));if(n){var i;q.forEach(function(c){var e=b.defineNodeNameProperty(c,"validity",{prop:{get:function(){if(!i){var d= -"input"==c?a(this).getNativeElement()[0]:this,k=e.prop._supget.call(d);if(!k)return k;var r={};v.forEach(function(a){r[a]=k[a]});if(!a.prop(d,"willValidate"))return r;i=!0;var j=a(d),u={type:(d.getAttribute&&d.getAttribute("type")||"").toLowerCase(),nodeName:(d.nodeName||"").toLowerCase()},y=j.val(),x=!!b.data(d,"hasCustomError"),m;i=!1;r.customError=x;if(r.valid&&r.customError)r.valid=!1;else if(!r.valid){var l=!0;a.each(r,function(a,c){if(c)return l=!1});if(l)r.valid=!0}a.each(t,function(a,e){r[a]= -e(j,y,u,r);if(r[a]&&(r.valid||!m)&&(p||g[u.type]&&g[u.type].mismatch))f[c].call(d,b.createValidationMessage(d,a)),r.valid=!1,m=!0});r.valid?(f[c].call(d,""),b.data(d,"hasCustomError",!1)):p&&!m&&!x&&a.each(r,function(a,e){if("valid"!==a&&e)return f[c].call(d,b.createValidationMessage(d,a)),!1});return r}},writeable:!1}})});k.forEach(function(a){b.onNodeNamesPropertyModify(q,a,function(){j(this)})});if(l.addEventListener){var c,d=function(e){if("form"in e.target){var b=e.target.form;clearTimeout(c); -j(e.target);b&&p&&a("input",b).each(function(){"password"==this.type&&j(this)})}};l.addEventListener("change",d,!0);p&&(l.addEventListener("blur",d,!0),l.addEventListener("keydown",function(a){13==a.keyCode&&d(a)},!0));l.addEventListener("input",function(a){clearTimeout(c);c=setTimeout(function(){j(a.target)},290)},!0)}var e=q.join(",");b.addReady(function(c,b){a(e,c).add(b.filter(e)).each(function(){a.prop(this,"validity")})});p&&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}}});m.input.list&&!(a("<datalist><select><option></option></select></datalist>").prop("options")|| -[]).length&&b.defineNodeNameProperty("datalist","options",{prop:{writeable:!1,get:function(){var c=this.options||[];if(!c.length){var e=a("select",this);if(e[0]&&e[0].options&&e[0].options.length)c=e[0].options}return c}}})}}); -jQuery.webshims.register("form-number-date-api",function(a,b){var m,l,s;if(!b.getStep)b.getStep=function(c,b){var e=a.attr(c,"step");if("any"===e)return e;b=b||n(c);if(!g[b]||!g[b].step)return e;e=m.asNumber(e);return(!isNaN(e)&&0<e?e:g[b].step)*g[b].stepScaleFactor};if(!b.addMinMaxNumberToCache)b.addMinMaxNumberToCache=function(a,b,e){a+"AsNumber"in e||(e[a+"AsNumber"]=g[e.type].asNumber(b.attr(a)),isNaN(e[a+"AsNumber"])&&a+"Default"in g[e.type]&&(e[a+"AsNumber"]=g[e.type][a+"Default"]))};var k= -parseInt("NaN",10),g=b.inputTypes,t=function(a){return"number"==typeof a||a&&a==1*a},p=function(c){return a('<input type="'+c+'" />').prop("type")===c},n=function(a){return(a.getAttribute("type")||"").toLowerCase()},v=b.addMinMaxNumberToCache,q=function(a,b){for(var a=""+a,b=b-a.length,e=0;e<b;e++)a="0"+a;return a},j=b.bugs.valueAsNumberSet||b.bugs.bustedValidity;b.addValidityRule("stepMismatch",function(a,d,e,h){if(""===d)return!1;if(!("type"in e))e.type=n(a[0]);if("date"==e.type)return!1;h=(h|| -{}).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(d);if(isNaN(e.valueAsNumber))return!1;v("min",a,e);a=e.minAsNumber;isNaN(a)&&(a=g[e.type].stepBase||0);h=Math.abs((e.valueAsNumber-a)%e.step);h=!(1.0E-7>=h||1.0E-7>=Math.abs(h-e.step))}return h});[{name:"rangeOverflow",attr:"max",factor:1},{name:"rangeUnderflow",attr:"min",factor:-1}].forEach(function(a){b.addValidityRule(a.name, -function(b,e,h,o){o=(o||{})[a.name]||!1;if(""===e)return o;if(!("type"in h))h.type=n(b[0]);if(g[h.type]&&g[h.type].asNumber){if(!("valueAsNumber"in h))h.valueAsNumber=g[h.type].asNumber(e);if(isNaN(h.valueAsNumber))return!1;v(a.attr,b,h);if(isNaN(h[a.attr+"AsNumber"]))return o;o=h[a.attr+"AsNumber"]*a.factor<h.valueAsNumber*a.factor-1.0E-7}return o})});b.reflectProperties(["input"],["max","min","step"]);var f=b.defineNodeNameProperty("input","valueAsNumber",{prop:{get:function(){var b=n(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=k);return b},set:function(c){var d=n(this);g[d]&&g[d].numberToString?isNaN(c)?a.prop(this,"value",""):(d=g[d].numberToString(c),!1!==d?a.prop(this,"value",d):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=n(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(c){var d=n(this);if(g[d]&&g[d].dateToString&&!g[d].noAsDate){if(null===c)return a.prop(this,"value",""),"";d=g[d].dateToString(c);if(!1!==d)return a.prop(this,"value",d),d;b.warn("INVALID_STATE_ERR: DOM Exception 11")}else return i.prop._supset&&i.prop._supset.apply(this,arguments)||null}}});m={mismatch:function(a){return!t(a)},step:1,stepScaleFactor:1,asNumber:function(a){return t(a)?1*a:k},numberToString:function(a){return t(a)? -a:!1}};l={minDefault:0,maxDefault:100};s={mismatch:function(b){if(!b||!b.split||!/\d$/.test(b))return!0;var d=b.split(/\u002D/);if(3!==d.length)return!0;var e=!1;a.each(d,function(a,b){if(!(t(b)||b&&b=="0"+1*b))return e=!0,!1});if(e)return e;if(4!==d[0].length||2!=d[1].length||12<d[1]||2!=d[2].length||33<d[2])e=!0;return b!==this.dateToString(this.asDate(b,!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= -k;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 t(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}};if(j||!p("range")||!p("time"))l=a.extend({},m,l);(j||!p("number"))&&b.addInputType("number",m);(j||!p("range"))&&b.addInputType("range",l);(j||!p("date"))&&b.addInputType("date",s)}); -jQuery.webshims.register("form-number-date-ui",function(a,b,m,l,s,k){var g=b.triggerInlineForm,t=Modernizr.inputtypes,p=function(){var a={"padding-box":"innerWidth","border-box":"outerWidth","content-box":"width"},b=Modernizr.prefixed&&Modernizr.prefixed("boxSizing");return function(c,d){var f,g,k;g="width";b&&(g=a[c.css(b)]||g);f=c[g]();g="width"==g;if(f){var u=parseInt(d.css("marginLeft"),10)||0,i=d.outerWidth();(k=parseInt(c.css("marginRight"),10)||0)&&c.css("marginRight",0);u<=-1*i?(d.css("marginRight", -Math.floor(Math.abs(i+u)+k)),c.css("paddingRight",(parseInt(c.css("paddingRight"),10)||0)+Math.abs(u)),g&&c.css("width",Math.floor(f+u))):(d.css("marginRight",k),c.css("width",Math.floor(f-u-i)))}}}(),n={},v=a([]),q,j=function(e,c){a("input",e).add(c.filter("input")).each(function(){var e=a.prop(this,"type");if(j[e]&&!b.data(this,"shadowData"))j[e](a(this))})},f=function(b,c){if(k.lazyDate){var d=a.data(b[0],"setDateLazyTimer");d&&clearTimeout(d);a.data(b[0],"setDateLazyTimer",setTimeout(function(){b.datepicker("setDate", -c);a.removeData(b[0],"setDateLazyTimer");b=null},0))}else b.datepicker("setDate",c)};if(k.lazyDate===s)try{k.lazyDate=a.browser.msie&&9>b.browserVersion||500>a(m).width()&&500>a(m).height()}catch(i){}var c={tabindex:1,tabIndex:1,title:1,"aria-required":1,"aria-invalid":1};if(!k.copyAttrs)k.copyAttrs={};b.extendUNDEFProp(k.copyAttrs,c);j.common=function(e,h,d){Modernizr.formvalidation&&e.bind("firstinvalid",function(a){(b.fromSubmit||!q)&&e.unbind("invalid.replacedwidgetbubble").bind("invalid.replacedwidgetbubble", -function(c){!a.isInvalidUIPrevented()&&!c.isDefaultPrevented()&&(b.validityAlert.showFor(a.target),a.preventDefault(),c.preventDefault());e.unbind("invalid.replacedwidgetbubble")})});var f,g,i=a("input, span.ui-slider-handle",h),j=e[0].attributes;for(f in k.copyAttrs)if((g=j[f])&&g.specified)c[f]&&i[0]?i.attr(f,g.nodeValue):h[0].setAttribute(f,g.nodeValue);g=e.attr("id");f=k.calculateWidth?{css:{marginRight:e.css("marginRight"),marginLeft:e.css("marginLeft")},outerWidth:e.outerWidth()}:{};f.label= -g?a('label[for="'+g+'"]',e[0].form):v;g=b.getID(f.label);h.addClass(e[0].className);b.addShadowDom(e,h,{data:d||{},shadowFocusElement:a("input.input-datetime-local-date, span.ui-slider-handle",h)[0],shadowChilds:i});e.after(h).hide();e[0].form&&a(e[0].form).bind("reset",function(a){a.originalEvent&&!a.isDefaultPrevented()&&setTimeout(function(){e.prop("value",e.prop("value"))},0)});1==h.length&&!a("*",h)[0]&&(h.attr("aria-labelledby",g),f.label.bind("click",function(){h.focus();return!1}));return f}; -Modernizr.formvalidation&&["input","form"].forEach(function(a){var c=b.defineNodeNameProperty(a,"checkValidity",{prop:{value:function(){q=!0;var a=c.prop._supvalue.apply(this,arguments);q=!1;return a}}})});if(!t.date||k.replaceUI){var d=function(e,c,d,f){var g,i,j=function(){u.dpDiv.unbind("mousedown.webshimsmousedownhandler");i=g=!1},u=c.bind("focusin",function(){j();u.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&&c.not(":focus")?(j(),c.trigger("focusout"),c.triggerHandler("blur")):j()}},n,k.datepicker,e.data("datepicker"))).bind("change",d).data("datepicker");u.dpDiv.addClass("input-date-datepicker-control");f&&b.triggerDomUpdate(f[0]);["disabled","min","max","value","step"].forEach(function(a){var b=e.prop(a);""!==b&&("disabled"!=a||!b)&&e.prop(a,b)});return u};j.date=function(b){if(a.fn.datepicker){var c=a('<input class="input-date" type="text" />'), -f=this.common(b,c,j.date.attrs),i=d(b,c,function(d){j.date.blockAttr=!0;var f;if(k.lazyDate){var o=a.data(c[0],"setDateLazyTimer");o&&(clearTimeout(o),a.removeData(c[0],"setDateLazyTimer"))}try{f=(f=a.datepicker.parseDate(c.datepicker("option","dateFormat"),c.prop("value")))?a.datepicker.formatDate("yy-mm-dd",f):c.prop("value")}catch(i){f=c.prop("value")}b.prop("value",f);j.date.blockAttr=!1;d.stopImmediatePropagation();g(b[0],"input");g(b[0],"change")});f.css&&(c.css(f.css),f.outerWidth&&c.outerWidth(f.outerWidth), -i.trigger[0]&&p(c,i.trigger))}};j.date.attrs={disabled:function(b,c,d){a.prop(c,"disabled",!!d)},min:function(b,c,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){d=!1}d&&a(c).datepicker("option","minDate",d)},max:function(b,c,d){try{d=a.datepicker.parseDate("yy-mm-dd",d)}catch(f){d=!1}d&&a(c).datepicker("option","maxDate",d)},value:function(b,c,d){if(!j.date.blockAttr){try{var g=a.datepicker.parseDate("yy-mm-dd",d)}catch(i){g=!1}g?f(a(c),g):a.prop(c,"value",d)}}}}if(!t.range||k.replaceUI)j.range= -function(b){if(a.fn.slider){var c=a('<span class="input-range"><span class="ui-slider-handle" role="slider" tabindex="0" /></span>'),d=this.common(b,c,j.range.attrs);a("span",c).attr("aria-labelledby",d.label.attr("id"));d.label.bind("click",function(){a("span",c).focus();return!1});d.css&&(c.css(d.css),d.outerWidth&&c.outerWidth(d.outerWidth));c.slider(a.extend(!0,{},k.slider,b.data("slider"))).bind("slide",function(a,c){if(a.originalEvent)j.range.blockAttr=!0,b.prop("value",c.value),j.range.blockAttr= -!1,g(b[0],"input"),g(b[0],"change")});["disabled","min","max","step","value"].forEach(function(c){var d=b.attr(c),f;"value"==c&&!d&&(f=b.getShadowElement())&&(d=(a(f).slider("option","max")-a(f).slider("option","min"))/2);null!=d&&b.attr(c,d)})}},j.range.attrs={disabled:function(b,c,d){d=!!d;a(c).slider("option","disabled",d);a("span",c).attr({"aria-disabled":d+"",tabindex:d?"-1":"0"})},min:function(b,c,d){d=d?1*d||0:0;a(c).slider("option","min",d);a("span",c).attr({"aria-valuemin":d})},max:function(b, -c,d){d=d||0===d?1*d||100:100;a(c).slider("option","max",d);a("span",c).attr({"aria-valuemax":d})},value:function(b,c,d){d=a(b).prop("valueAsNumber");isNaN(d)||(j.range.blockAttr||a(c).slider("option","value",d),a("span",c).attr({"aria-valuenow":d,"aria-valuetext":d}))},step:function(b,c,d){d=d&&a.trim(d)?1*d||1:1;a(c).slider("option","step",d)}};if(!b.bugs.valueAsNumberSet&&(k.replaceUI||!Modernizr.inputtypes.date||!Modernizr.inputtypes.range))m=function(){b.data(this,"hasShadow")&&a.prop(this,"value", -a.prop(this,"value"))},b.onNodeNamesPropertyModify("input","valueAsNumber",m),b.onNodeNamesPropertyModify("input","valueAsDate",m);a.each(["disabled","min","max","value","step"],function(a,c){b.onNodeNamesPropertyModify("input",c,function(a){var d=b.data(this,"shadowData");if(d&&d.data&&d.data[c]&&d.nativeElement===this)d.data[c](this,d.shadowElement,a)})});if(!k.availabeLangs)k.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(" "); -m=function(){a.datepicker&&(b.activeLang({langObj:a.datepicker.regional,module:"form-number-date-ui",callback:function(b){b=a.extend({},n,b,k.datepicker);a.datepicker.setDefaults(b);b.dateFormat&&k.datepicker.dateFormat!=b.dateFormat&&a("input.hasDatepicker").filter(".input-date, .input-datetime-local-date").datepicker("option","dateFormat",b.dateFormat)}}),a(l).unbind("jquery-uiReady.langchange input-widgetsReady.langchange"))};a(l).bind("jquery-uiReady.langchange input-widgetsReady.langchange", -m);m();(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 d=b.cfg["forms-ext"],f=b.inputTypes,i=function(c,d,e){e=e||{};if(!("type"in e))e.type=a.prop(c,"type");if(!("step"in e))e.step=b.getStep(c,e.type);if(!("valueAsNumber"in e))e.valueAsNumber=f[e.type].asNumber(a.prop(c,"value"));var g="any"==e.step?f[e.type].step*f[e.type].stepScaleFactor:e.step;b.addMinMaxNumberToCache("min",a(c),e);b.addMinMaxNumberToCache("max", -a(c),e);if(isNaN(e.valueAsNumber))e.valueAsNumber=f[e.type].stepBase||0;if("any"!==e.step&&(c=Math.round(1E7*((e.valueAsNumber-(e.minAsnumber||0))%e.step))/1E7)&&Math.abs(c)!=e.step)e.valueAsNumber-=c;c=e.valueAsNumber+g*d;return c=!isNaN(e.minAsNumber)&&c<e.minAsNumber?e.valueAsNumber*d<e.minAsNumber?e.minAsNumber:isNaN(e.maxAsNumber)?e.valueAsNumber:e.maxAsNumber:!isNaN(e.maxAsNumber)&&c>e.maxAsNumber?e.valueAsNumber*d>e.maxAsNumber?e.maxAsNumber:isNaN(e.minAsNumber)?e.valueAsNumber:e.minAsNumber: -Math.round(1E7*c)/1E7};b.modules["form-number-date-ui"].getNextStep=i;var k=function(b,c,d){if(!b.disabled&&!b.readOnly&&!a(d).hasClass("step-controls")&&(a.prop(b,"value",f[c].numberToString(i(b,a(d).hasClass("step-up")?1:-1,{type:c}))),a(b).unbind("blur.stepeventshim"),g(b,"input"),l.activeElement)){if(l.activeElement!==b)try{b.focus()}catch(e){}setTimeout(function(){if(l.activeElement!==b)try{b.focus()}catch(c){}a(b).one("blur.stepeventshim",function(){g(b,"change")})},0)}};if(d.stepArrows){var j= -{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",j);b.onNodeNamesPropertyModify("input","readonly",a.extend({},j))}var m={38:1,40:-1};b.addReady(function(j,l){d.stepArrows&&a("input",j).add(l.filter("input")).each(function(){var j=a.prop(this,"type");if(f[j]&&f[j].asNumber&&d.stepArrows&&!(!0!==d.stepArrows&&!d.stepArrows[j]||c(j)||a(l).hasClass("has-step-controls"))){var l= -this,n=a('<span class="step-controls" unselectable="on"><span class="step-up" /><span class="step-down" /></span>').insertAfter(l).bind("selectstart dragstart",function(){return!1}).bind("mousedown mousepress",function(a){k(l,j,a.target);return!1}).bind("mousepressstart mousepressend",function(b){a(b.target)["mousepressstart"==b.type?"addClass":"removeClass"]("mousepress-ui")}),r=function(b,c){if(!l.disabled&&!l.readOnly)return a.prop(l,"value",f[j].numberToString(i(l,c,{type:j}))),g(l,"input"),!1}, -q=a(l).addClass("has-step-controls").attr({readonly:l.readOnly,disabled:l.disabled,autocomplete:"off",role:"spinbutton"}).bind(a.browser.msie?"keydown":"keypress",function(b){if(!l.disabled&&!l.readOnly&&m[b.keyCode])return a.prop(l,"value",f[j].numberToString(i(l,m[b.keyCode],{type:j}))),g(l,"input"),!1});a.fn.mwheelIntent?q.add(n).bind("mwheelIntent",r):q.bind("focus",function(){q.add(n).unbind(".mwhellwebshims").bind("mousewheel.mwhellwebshims",r)}).bind("blur",function(){a(l).add(n).unbind(".mwhellwebshims")}); -b.data(l,"step-controls",n);d.calculateWidth&&(p(q,n),n.css("marginTop",(q.outerHeight()-n.outerHeight())/2))}})})}})();b.addReady(function(c,d){a(l).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;j(c,d)}a.datepicker&&a.fn.slider?a(l).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(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')})})});