UNPKG

jquery-mobile-babel-safe

Version:
2 lines 200 kB
!function(e,t,i){"function"==typeof define&&define.amd?define(["jquery"],function(n){return i(n,e,t),n.mobile}):i(e.jQuery,e,t)}(this||window,document,function(e,t,i){!function(e){e.mobile={}}(e),function(e,t){function n(t,i){var n,o,a,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,o=n.name,t.href&&o&&"map"===n.nodeName.toLowerCase()?(a=e("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var o=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"c0ab71056b936627e8a7821f03c044aec6280a40",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(this[0].ownerDocument||i):t},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++o)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var i=e.attr(t,"tabindex"),s=isNaN(i);return(s||i>=0)&&n(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(o,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],a=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(a,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in i.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var s,o,a=e(this[0]);a.length&&a[0]!==i;){if(s=a.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(o=parseInt(a.css("zIndex"),10),!isNaN(o)&&0!==o))return o;a=a.parent()}return 0}}),e.ui.plugin={add:function(t,i,n){var s,o=e.ui[t].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(e,t,i,n){var s,o=e.plugins[t];if(o&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)e.options[o[s][0]]&&o[s][1].apply(e.element,i)}}}(e),function(e,t){var n=function(t,i){var n=t.parent(),s=[],o=function(){var t=e(this),i=e.mobile.toolbar&&t.data("mobile-toolbar")?t.toolbar("option"):{position:t.attr("data-"+e.mobile.ns+"position"),updatePagePadding:t.attr("data-"+e.mobile.ns+"update-page-padding")!==!1};return!("fixed"===i.position&&i.updatePagePadding===!0)},a=n.children(":jqmData(role='header')").filter(o),r=t.children(":jqmData(role='header')"),l=n.children(":jqmData(role='footer')").filter(o),h=t.children(":jqmData(role='footer')");return 0===r.length&&a.length>0&&(s=s.concat(a.toArray())),0===h.length&&l.length>0&&(s=s.concat(l.toArray())),e.each(s,function(t,n){i-=e(n).outerHeight()}),Math.max(0,i)};e.extend(e.mobile,{window:e(t),document:e(i),keyCode:e.ui.keyCode,behaviors:{},silentScroll:function(i){"number"!==e.type(i)&&(i=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,i),e.mobile.document.trigger("silentscroll",{x:0,y:i})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},getClosestBaseUrl:function(t){var i=e(t).closest(".ui-page").jqmData("url"),n=e.mobile.path.documentBase.hrefNoHash;return e.mobile.dynamicBaseEnabled&&i&&e.mobile.path.isPath(i)||(i=n),e.mobile.path.makeUrlAbsolute(i,n)},removeActiveLinkClass:function(t){!e.mobile.activeClickedLink||e.mobile.activeClickedLink.closest("."+e.mobile.activePageClass).length&&!t||e.mobile.activeClickedLink.removeClass(e.mobile.activeBtnClass),e.mobile.activeClickedLink=null},getInheritedTheme:function(e,t){for(var i,n,s=e[0],o="",a=/ui-(bar|body|overlay)-([a-z])\b/;s&&(i=s.className||"",!(i&&(n=a.exec(i))&&(o=n[2])));)s=s.parentNode;return o||t||"a"},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,i){if(!e.mobile.ignoreContentEnabled)return t;var n,s,o,a,r,l=t.length,h=e();for(a=0;l>a;a++){for(s=t.eq(a),o=!1,n=t[a];n;){if(r=n.getAttribute?n.getAttribute("data-"+e.mobile.ns+i):"","false"===r){o=!0;break}n=n.parentNode}o||(h=h.add(s))}return h},getScreenHeight:function(){return t.innerHeight||e.mobile.window.height()},resetActivePageHeight:function(t){var i=e("."+e.mobile.activePageClass),s=i.height(),o=i.outerHeight(!0);t=n(i,"number"==typeof t?t:e.mobile.getScreenHeight()),i.css("min-height",""),i.height()<t&&i.css("min-height",t-(o-s))},loading:function(){var t=this.loading._widget||e(e.mobile.loader.prototype.defaultHtml).loader(),i=t.loader.apply(t,arguments);return this.loading._widget=t,i}}),e.addDependents=function(t,i){var n=e(t),s=n.jqmData("dependents")||e();n.jqmData("dependents",e(s).add(i))},e.fn.extend({removeWithDependents:function(){e.removeWithDependents(this)},enhanceWithin:function(){var t,i={},n=e.mobile.page.prototype.keepNativeSelector(),s=this;e.mobile.nojs&&e.mobile.nojs(this),e.mobile.links&&e.mobile.links(this),e.mobile.degradeInputsWithin&&e.mobile.degradeInputsWithin(this),e.fn.buttonMarkup&&this.find(e.fn.buttonMarkup.initSelector).not(n).jqmEnhanceable().buttonMarkup(),e.fn.fieldcontain&&this.find(":jqmData(role='fieldcontain')").not(n).jqmEnhanceable().fieldcontain(),e.each(e.mobile.widgets,function(t,o){if(o.initSelector){var a=e.mobile.enhanceable(s.find(o.initSelector));a.length>0&&(a=a.not(n)),a.length>0&&(i[o.prototype.widgetName]=a)}});for(t in i)i[t][t]();return this},addDependents:function(t){e.addDependents(this,t)},getEncodedText:function(){return e("<a>").text(this.text()).html()},jqmEnhanceable:function(){return e.mobile.enhanceable(this)},jqmHijackable:function(){return e.mobile.hijackable(this)}}),e.removeWithDependents=function(t){var i=e(t);(i.jqmData("dependents")||e()).remove(),i.remove()},e.addDependents=function(t,i){var n=e(t),s=n.jqmData("dependents")||e();n.jqmData("dependents",e(s).add(i))},e.find.matches=function(t,i){return e.find(t,null,null,i)},e.find.matchesSelector=function(t,i){return e.find(i,null,null,[t]).length>0}}(e,this||t),function(e){e.extend(e.mobile,{version:"1.4.5",subPageUrlKey:"ui-page",hideUrlBar:!0,keepNative:":jqmData(role='none'), :jqmData(role='nojs')",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:0,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"a",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,buttonMarkup:{hoverDelay:200},dynamicBaseEnabled:!0,pageContainer:e(),allowCrossDomainPages:!1,dialogHashKey:"&ui-state=dialog"})}(e,this||t),function(e,t){var i=0,n=Array.prototype.slice,s=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(o){}s(t)},e.widget=function(t,i,n){var s,o,a,r,l={},h=t.split(".")[0];return t=t.split(".")[1],s=h+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[h]=e[h]||{},o=e[h][t],a=e[h][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new a(e,t)},e.extend(a,o,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(n,function(t,n){return e.isFunction(n)?void(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},s=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,o=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=o,t}}()):void(l[t]=n)}),a.prototype=e.widget.extend(r,{widgetEventPrefix:o?r.widgetEventPrefix||t:t},l,{constructor:a,namespace:h,widgetName:t,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete o._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(i){for(var s,o,a=n.call(arguments,1),r=0,l=a.length;l>r;r++)for(s in a[r])o=a[r][s],a[r].hasOwnProperty(s)&&o!==t&&(i[s]=e.isPlainObject(o)?e.isPlainObject(i[s])?e.widget.extend({},i[s],o):e.widget.extend({},o):o);return i},e.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;e.fn[i]=function(a){var r="string"==typeof a,l=n.call(arguments,1),h=this;return a=!r&&l.length?e.widget.extend.apply(null,[a].concat(l)):a,this.each(r?function(){var n,s=e.data(this,o);return"instance"===a?(h=s,!1):s?e.isFunction(s[a])&&"_"!==a.charAt(0)?(n=s[a].apply(s,l),n!==s&&n!==t?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+a+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+a+"'")}:function(){var t=e.data(this,o);t?t.option(a||{})._init():e.data(this,o,new s(a,this))}),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var s,o,a,r=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(r={},s=i.split("."),i=s.shift(),s.length){for(o=r[i]=e.widget.extend({},this.options[i]),a=0;a<s.length-1;a++)o[s[a]]=o[s[a]]||{},o=o[s[a]];if(i=s.pop(),n===t)return o[i]===t?null:o[i];o[i]=n}else{if(n===t)return this.options[i]===t?null:this.options[i];r[i]=n}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,n){var s,o=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,a){function r(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),h=l[1]+o.eventNamespace,d=l[2];d?s.delegate(d,h,r):i.bind(h,r)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,o,a=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(e.isFunction(a)&&a.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,o){"string"==typeof s&&(s={effect:s});var a,r=s?s===!0||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),a=!e.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&e.effects&&e.effects.effect[r]?n[t](s):r!==t&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){e(this)[t](),o&&o.call(n[0]),i()})}})}(e),function(e,t,i){var n={},s=e.find,o=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,a=/:jqmData\(([^)]*)\)/g;e.extend(e.mobile,{ns:"",getAttribute:function(t,i){var n;t=t.jquery?t[0]:t,t&&t.getAttribute&&(n=t.getAttribute("data-"+e.mobile.ns+i));try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:o.test(n)?JSON.parse(n):n}catch(s){}return n},nsNormalizeDict:n,nsNormalize:function(t){return n[t]||(n[t]=e.camelCase(e.mobile.ns+t))},closestPageData:function(e){return e.closest(":jqmData(role='page'), :jqmData(role='dialog')").data("mobile-page")}}),e.fn.jqmData=function(t,n){var s;return"undefined"!=typeof t&&(t&&(t=e.mobile.nsNormalize(t)),s=arguments.length<2||n===i?this.data(t):this.data(t,n)),s},e.jqmData=function(t,i,n){var s;return"undefined"!=typeof i&&(s=e.data(t,i?e.mobile.nsNormalize(i):i,n)),s},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,i){return e.removeData(t,e.mobile.nsNormalize(i))},e.find=function(t,i,n,o){return t.indexOf(":jqmData")>-1&&(t=t.replace(a,"[data-"+(e.mobile.ns||"")+"$1]")),s.call(this,t,i,n,o)},e.extend(e.find,s)}(e,this||t),function(e){var t=/[A-Z]/g,i=function(e){return"-"+e.toLowerCase()};e.extend(e.Widget.prototype,{_getCreateOptions:function(){var n,s,o=this.element[0],a={};if(!e.mobile.getAttribute(o,"defaults"))for(n in this.options)s=e.mobile.getAttribute(o,n.replace(t,i)),null!=s&&(a[n]=s);return a}}),e.mobile.widget=e.Widget}(e),function(e){var t="ui-loader",i=e("html");e.widget("mobile.loader",{options:{theme:"a",textVisible:!1,html:"",text:"loading"},defaultHtml:"<div class='"+t+"'><span class='ui-icon-loading'></span><h1></h1></div>",fakeFixLoader:function(){var t=e("."+e.mobile.activeBtnClass).first();this.element.css({top:e.support.scrollTop&&this.window.scrollTop()+this.window.height()/2||t.length&&t.offset().top||100})},checkLoaderPosition:function(){var t=this.element.offset(),i=this.window.scrollTop(),n=e.mobile.getScreenHeight();(t.top<i||t.top-i>n)&&(this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),this.window.unbind("scroll",this.checkLoaderPosition).bind("scroll",e.proxy(this.fakeFixLoader,this)))},resetHtml:function(){this.element.html(e(this.defaultHtml).html())},show:function(n,s,o){var a,r,l;this.resetHtml(),"object"===e.type(n)?(l=e.extend({},this.options,n),n=l.theme):(l=this.options,n=n||l.theme),r=s||(l.text===!1?"":l.text),i.addClass("ui-loading"),a=l.textVisible,this.element.attr("class",t+" ui-corner-all ui-body-"+n+" ui-loader-"+(a||s||n.text?"verbose":"default")+(l.textonly||o?" ui-loader-textonly":"")),l.html?this.element.html(l.html):this.element.find("h1").text(r),this.element.appendTo(e(e.mobile.pagecontainer?":mobile-pagecontainer":"body")),this.checkLoaderPosition(),this.window.bind("scroll",e.proxy(this.checkLoaderPosition,this))},hide:function(){i.removeClass("ui-loading"),this.options.text&&this.element.removeClass("ui-loader-fakefix"),this.window.unbind("scroll",this.fakeFixLoader),this.window.unbind("scroll",this.checkLoaderPosition)}})}(e,this||t),function(e,t,n){"$:nomunge";function s(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var o,a="hashchange",r=i,l=e.event.special,h=r.documentMode,d="on"+a in t&&(h===n||h>7);e.fn[a]=function(e){return e?this.bind(a,e):this.trigger(a)},e.fn[a].delay=50,l[a]=e.extend(l[a],{setup:function(){return d?!1:void e(o.start)},teardown:function(){return d?!1:void e(o.stop)}}),o=function(){function i(){var n=s(),r=p(h);n!==h?(c(h=n,r),e(t).trigger(a)):r!==h&&(location.href=location.href.replace(/#.*/,"")+r),o=setTimeout(i,e.fn[a].delay)}var o,l={},h=s(),u=function(e){return e},c=u,p=u;return l.start=function(){o||i()},l.stop=function(){o&&clearTimeout(o),o=n},t.attachEvent&&!t.addEventListener&&!d&&function(){var t,n;l.start=function(){t||(n=e.fn[a].src,n=n&&n+s(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){n||c(s()),i()}).attr("src",n||"javascript:0").insertAfter("body")[0].contentWindow,r.onpropertychange=function(){try{"title"===event.propertyName&&(t.document.title=r.title)}catch(e){}})},l.stop=u,p=function(){return s(t.location.href)},c=function(i,n){var s=t.document,o=e.fn[a].domain;i!==n&&(s.title=r.title,s.open(),o&&s.write('<script>document.domain="'+o+'"</script>'),s.close(),t.location.hash=i)}}(),l}()}(e,this||t),function(e){t.matchMedia=t.matchMedia||function(e){var t,i=e.documentElement,n=i.firstElementChild||i.firstChild,s=e.createElement("body"),o=e.createElement("div");return o.id="mq-test-1",o.style.cssText="position:absolute;top:-100em",s.style.background="none",s.appendChild(o),function(e){return o.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',i.insertBefore(s,n),t=42===o.offsetWidth,i.removeChild(s),{matches:t,media:e}}}(i),e.mobile.media=function(e){return t.matchMedia(e).matches}}(e),function(e){var t={touch:"ontouchend"in i};e.mobile.support=e.mobile.support||{},e.extend(e.support,t),e.extend(e.mobile.support,t)}(e),function(e){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e,n){function s(e){var t,i=e.charAt(0).toUpperCase()+e.substr(1),s=(e+" "+m.join(i+" ")+i).split(" ");for(t in s)if(p[s[t]]!==n)return!0}function o(){var i=t,n=!(!i.document.createElementNS||!i.document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||i.opera&&-1===navigator.userAgent.indexOf("Chrome")),s=function(t){t&&n||e("html").addClass("ui-nosvg")},o=new i.Image;o.onerror=function(){s(!1)},o.onload=function(){s(1===o.width&&1===o.height)},o.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="}function a(){var s,o,a,r="transform-3d",l=e.mobile.media("(-"+m.join("-"+r+"),(-")+"-"+r+"),("+r+")");if(l)return!!l;s=i.createElement("div"),o={MozTransform:"-moz-transform",transform:"transform"},c.append(s);for(a in o)s.style[a]!==n&&(s.style[a]="translate3d( 100px, 1px, 1px )",l=t.getComputedStyle(s).getPropertyValue(o[a]));return!!l&&"none"!==l}function r(){var t,i,n=location.protocol+"//"+location.host+location.pathname+"ui-dir/",s=e("head base"),o=null,a="";return s.length?a=s.attr("href"):s=o=e("<base>",{href:n}).appendTo("head"),t=e("<a href='testurl' />").prependTo(c),i=t[0].href,s[0].href=a||location.pathname,o&&o.remove(),0===i.indexOf(n)}function l(){var e,n=i.createElement("x"),s=i.documentElement,o=t.getComputedStyle;return"pointerEvents"in n.style?(n.style.pointerEvents="auto",n.style.pointerEvents="x",s.appendChild(n),e=o&&"auto"===o(n,"").pointerEvents,s.removeChild(n),!!e):!1}function h(){var e=i.createElement("div");return"undefined"!=typeof e.getBoundingClientRect}function d(){var e=t,i=navigator.userAgent,n=navigator.platform,s=i.match(/AppleWebKit\/([0-9]+)/),o=!!s&&s[1],a=i.match(/Fennec\/([0-9]+)/),r=!!a&&a[1],l=i.match(/Opera Mobi\/([0-9]+)/),h=!!l&&l[1];return(n.indexOf("iPhone")>-1||n.indexOf("iPad")>-1||n.indexOf("iPod")>-1)&&o&&534>o||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||l&&7458>h||i.indexOf("Android")>-1&&o&&533>o||r&&6>r||"palmGetResource"in t&&o&&534>o||i.indexOf("MeeGo")>-1&&i.indexOf("NokiaBrowser/8.5.0")>-1?!1:!0}var u,c=e("<body>").prependTo("html"),p=c[0].style,m=["Webkit","Moz","O"],f="palmGetResource"in t,g=t.operamini&&"[object OperaMini]"==={}.toString.call(t.operamini),b=t.blackberry&&!s("-webkit-transform");e.extend(e.mobile,{browser:{}}),e.mobile.browser.oldIE=function(){var e=3,t=i.createElement("div"),n=t.all||[];do t.innerHTML="<!--[if gt IE "+ ++e+"]><br><![endif]-->";while(n[0]);return e>4?e:!e}(),e.extend(e.support,{pushState:"pushState"in history&&"replaceState"in history&&!(t.navigator.userAgent.indexOf("Firefox")>=0&&t.top!==t)&&-1===t.navigator.userAgent.search(/CriOS/),mediaquery:e.mobile.media("only all"),cssPseudoElement:!!s("content"),touchOverflow:!!s("overflowScrolling"),cssTransform3d:a(),boxShadow:!!s("boxShadow")&&!b,fixedPosition:d(),scrollTop:("pageXOffset"in t||"scrollTop"in i.documentElement||"scrollTop"in c[0])&&!f&&!g,dynamicBaseTag:r(),cssPointerEvents:l(),boundingRect:h(),inlineSVG:o}),c.remove(),u=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}(),e.mobile.gradeA=function(){return(e.support.mediaquery&&e.support.cssPseudoElement||e.mobile.browser.oldIE&&e.mobile.browser.oldIE>=8)&&(e.support.boundingRect||null!==e.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/))},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||g||u,u&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-noboxshadow")}(e),function(e,t){var i,n=e.mobile.window,s=function(){};e.event.special.beforenavigate={setup:function(){n.on("navigate",s)},teardown:function(){n.off("navigate",s)}},e.event.special.navigate=i={bound:!1,pushStateEnabled:!0,originalEventName:t,isPushStateEnabled:function(){return e.support.pushState&&e.mobile.pushStateEnabled===!0&&this.isHashChangeEnabled()},isHashChangeEnabled:function(){return e.mobile.hashListeningEnabled===!0},popstate:function(t){var i=new e.Event("navigate"),s=new e.Event("beforenavigate"),o=t.originalEvent.state||{};s.originalEvent=t,n.trigger(s),s.isDefaultPrevented()||(t.historyState&&e.extend(o,t.historyState),i.originalEvent=t,setTimeout(function(){n.trigger(i,{state:o})},0))},hashchange:function(t){var i=new e.Event("navigate"),s=new e.Event("beforenavigate");s.originalEvent=t,n.trigger(s),s.isDefaultPrevented()||(i.originalEvent=t,n.trigger(i,{state:t.hashchangeState||{}}))},setup:function(){i.bound||(i.bound=!0,i.isPushStateEnabled()?(i.originalEventName="popstate",n.bind("popstate.navigate",i.popstate)):i.isHashChangeEnabled()&&(i.originalEventName="hashchange",n.bind("hashchange.navigate",i.hashchange)))}}}(e),function(e,i){var n,s,o="&ui-state=dialog";e.mobile.path=n={uiStateKey:"&ui-state",urlParseRE:/^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,getLocation:function(e){var t=this.parseUrl(e||location.href),i=e?t:location,n=t.hash;return n="#"===n?"":n,i.protocol+t.doubleSlash+i.host+(""!==i.protocol&&"/"!==i.pathname.substring(0,1)?"/":"")+i.pathname+i.search+n},getDocumentUrl:function(t){return t?e.extend({},n.documentUrl):n.documentUrl.href},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(t){if("object"===e.type(t))return t;var i=n.urlParseRE.exec(t||"")||[];return{href:i[0]||"",hrefNoHash:i[1]||"",hrefNoSearch:i[2]||"",domain:i[3]||"",protocol:i[4]||"",doubleSlash:i[5]||"",authority:i[6]||"",username:i[8]||"",password:i[9]||"",host:i[10]||"",hostname:i[11]||"",port:i[12]||"",pathname:i[13]||"",directory:i[14]||"",filename:i[15]||"",search:i[16]||"",hash:i[17]||""}},makePathAbsolute:function(e,t){var i,n,s,o;if(e&&"/"===e.charAt(0))return e;for(e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"",i=t?t.split("/"):[],n=e.split("/"),s=0;s<n.length;s++)switch(o=n[s]){case".":break;case"..":i.length&&i.pop();break;default:i.push(o)}return"/"+i.join("/")},isSameDomain:function(e,t){return n.parseUrl(e).domain.toLowerCase()===n.parseUrl(t).domain.toLowerCase()},isRelativeUrl:function(e){return""===n.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==n.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!n.isRelativeUrl(e))return e;t===i&&(t=this.documentBase);var s=n.parseUrl(e),o=n.parseUrl(t),a=s.protocol||o.protocol,r=s.protocol?s.doubleSlash:s.doubleSlash||o.doubleSlash,l=s.authority||o.authority,h=""!==s.pathname,d=n.makePathAbsolute(s.pathname||o.filename,o.pathname),u=s.search||!h&&o.search||"",c=s.hash;return a+r+l+d+u+c},addSearchParams:function(t,i){var s=n.parseUrl(t),o="object"==typeof i?e.param(i):i,a=s.search||"?";return s.hrefNoSearch+a+("?"!==a.charAt(a.length-1)?"&":"")+o+(s.hash||"")},convertUrlToDataUrl:function(e){var i=e,s=n.parseUrl(e);return n.isEmbeddedPage(s)?i=s.hash.split(o)[0].replace(/^#/,"").replace(/\?.*$/,""):n.isSameDomain(s,this.documentBase)&&(i=s.hrefNoHash.replace(this.documentBase.domain,"").split(o)[0]),t.decodeURIComponent(i)},get:function(e){return e===i&&(e=n.parseLocation().hash),n.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(this.documentBase.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},stripQueryParams:function(e){return e.replace(/\?.*$/,"")},cleanHash:function(e){return n.stripHash(e.replace(/\?.*$/,"").replace(o,""))},isHashValid:function(e){return/^#[^#]+$/.test(e)},isExternal:function(e){var t=n.parseUrl(e);return!(!t.protocol||t.domain.toLowerCase()===this.documentUrl.domain.toLowerCase())},hasProtocol:function(e){return/^(:?\w+:)/.test(e)},isEmbeddedPage:function(e){var t=n.parseUrl(e);return""!==t.protocol?!this.isPath(t.hash)&&t.hash&&(t.hrefNoHash===this.documentUrl.hrefNoHash||this.documentBaseDiffers&&t.hrefNoHash===this.documentBase.hrefNoHash):/^#/.test(t.href)},squash:function(e,t){var i,s,o,a,r,l=this.isPath(e),h=this.parseUrl(e),d=h.hash,u="";return t||(l?t=n.getLocation():(r=n.getDocumentUrl(!0),t=n.isPath(r.hash)?n.squash(r.href):r.href)),s=l?n.stripHash(e):e,s=n.isPath(h.hash)?n.stripHash(h.hash):s,a=s.indexOf(this.uiStateKey),a>-1&&(u=s.slice(a),s=s.slice(0,a)),i=n.makeUrlAbsolute(s,t),o=this.parseUrl(i).search,l?((n.isPath(d)||0===d.replace("#","").indexOf(this.uiStateKey))&&(d=""),u&&-1===d.indexOf(this.uiStateKey)&&(d+=u),-1===d.indexOf("#")&&""!==d&&(d="#"+d),i=n.parseUrl(i),i=i.protocol+i.doubleSlash+i.host+i.pathname+o+d):i+=i.indexOf("#")>-1?u:"#"+u,i},isPreservableHash:function(e){return 0===e.replace("#","").indexOf(this.uiStateKey)},hashToSelector:function(e){var t="#"===e.substring(0,1);return t&&(e=e.substring(1)),(t?"#":"")+e.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")},getFilePath:function(e){return e&&e.split(o)[0]},isFirstPageUrl:function(t){var s=n.parseUrl(n.makeUrlAbsolute(t,this.documentBase)),o=s.hrefNoHash===this.documentUrl.hrefNoHash||this.documentBaseDiffers&&s.hrefNoHash===this.documentBase.hrefNoHash,a=e.mobile.firstPage,r=a&&a[0]?a[0].id:i;return o&&(!s.hash||"#"===s.hash||r&&s.hash.replace(/^#/,"")===r)},isPermittedCrossDomainRequest:function(t,i){return e.mobile.allowCrossDomainPages&&("file:"===t.protocol||"content:"===t.protocol)&&-1!==i.search(/^https?:/)}},n.documentUrl=n.parseLocation(),s=e("head").find("base"),n.documentBase=s.length?n.parseUrl(n.makeUrlAbsolute(s.attr("href"),n.documentUrl.href)):n.documentUrl,n.documentBaseDiffers=n.documentUrl.hrefNoHash!==n.documentBase.hrefNoHash,n.getDocumentBase=function(t){return t?e.extend({},n.documentBase):n.documentBase.href},e.extend(e.mobile,{getDocumentUrl:n.getDocumentUrl,getDocumentBase:n.getDocumentBase})}(e),function(e,t){e.mobile.History=function(e,t){this.stack=e||[],this.activeIndex=t||0},e.extend(e.mobile.History.prototype,{getActive:function(){return this.stack[this.activeIndex]},getLast:function(){return this.stack[this.previousIndex]},getNext:function(){return this.stack[this.activeIndex+1]},getPrev:function(){return this.stack[this.activeIndex-1]},add:function(e,t){t=t||{},this.getNext()&&this.clearForward(),t.hash&&-1===t.hash.indexOf("#")&&(t.hash="#"+t.hash),t.url=e,this.stack.push(t),this.activeIndex=this.stack.length-1},clearForward:function(){this.stack=this.stack.slice(0,this.activeIndex+1)},find:function(e,t,i){t=t||this.stack;var n,s,o,a=t.length;for(s=0;a>s;s++)if(n=t[s],(decodeURIComponent(e)===decodeURIComponent(n.url)||decodeURIComponent(e)===decodeURIComponent(n.hash))&&(o=s,i))return o;return o},closest:function(e){var i,n=this.activeIndex;return i=this.find(e,this.stack.slice(0,n)),i===t&&(i=this.find(e,this.stack.slice(n),!0),i=i===t?i:i+n),i},direct:function(i){var n=this.closest(i.url),s=this.activeIndex;n!==t&&(this.activeIndex=n,this.previousIndex=s),s>n?(i.present||i.back||e.noop)(this.getActive(),"back"):n>s?(i.present||i.forward||e.noop)(this.getActive(),"forward"):n===t&&i.missing&&i.missing(this.getActive())}})}(e),function(e){var n=e.mobile.path,s=location.href;e.mobile.Navigator=function(t){this.history=t,this.ignoreInitialHashChange=!0,e.mobile.window.bind({"popstate.history":e.proxy(this.popstate,this),"hashchange.history":e.proxy(this.hashchange,this)})},e.extend(e.mobile.Navigator.prototype,{squash:function(s,o){var a,r,l=n.isPath(s)?n.stripHash(s):s;return r=n.squash(s),a=e.extend({hash:l,url:r},o),t.history.replaceState(a,a.title||i.title,r),a},hash:function(e,t){var i,s,o,a;return i=n.parseUrl(e),s=n.parseLocation(),s.pathname+s.search===i.pathname+i.search?o=i.hash?i.hash:i.pathname+i.search:n.isPath(e)?(a=n.parseUrl(t),o=a.pathname+a.search+(n.isPreservableHash(a.hash)?a.hash.replace("#",""):"")):o=e,o},go:function(s,o,a){var r,l,h,d,u=e.event.special.navigate.isPushStateEnabled(); l=n.squash(s),h=this.hash(s,l),a&&h!==n.stripHash(n.parseLocation().hash)&&(this.preventNextHashChange=a),this.preventHashAssignPopState=!0,t.location.hash=h,this.preventHashAssignPopState=!1,r=e.extend({url:l,hash:h,title:i.title},o),u&&(d=new e.Event("popstate"),d.originalEvent={type:"popstate",state:null},this.squash(s,r),a||(this.ignorePopState=!0,e.mobile.window.trigger(d))),this.history.add(r.url,r)},popstate:function(t){var i,o;if(e.event.special.navigate.isPushStateEnabled())return this.preventHashAssignPopState?(this.preventHashAssignPopState=!1,void t.stopImmediatePropagation()):this.ignorePopState?void(this.ignorePopState=!1):!t.originalEvent.state&&1===this.history.stack.length&&this.ignoreInitialHashChange&&(this.ignoreInitialHashChange=!1,location.href===s)?void t.preventDefault():(i=n.parseLocation().hash,!t.originalEvent.state&&i?(o=this.squash(i),this.history.add(o.url,o),void(t.historyState=o)):void this.history.direct({url:(t.originalEvent.state||{}).url||i,present:function(i,n){t.historyState=e.extend({},i),t.historyState.direction=n}}))},hashchange:function(t){var s,o;if(e.event.special.navigate.isHashChangeEnabled()&&!e.event.special.navigate.isPushStateEnabled()){if(this.preventNextHashChange)return this.preventNextHashChange=!1,void t.stopImmediatePropagation();s=this.history,o=n.parseLocation().hash,this.history.direct({url:o,present:function(i,n){t.hashchangeState=e.extend({},i),t.hashchangeState.direction=n},missing:function(){s.add(o,{hash:o,title:i.title})}})}}})}(e),function(e){e.mobile.navigate=function(t,i,n){e.mobile.navigate.navigator.go(t,i,n)},e.mobile.navigate.history=new e.mobile.History,e.mobile.navigate.navigator=new e.mobile.Navigator(e.mobile.navigate.history);var t=e.mobile.path.parseLocation();e.mobile.navigate.history.add(t.href,{hash:t.hash})}(e),function(e,t){var n={animation:{},transition:{}},s=i.createElement("a"),o=["","webkit-","moz-","o-"];e.each(["animation","transition"],function(i,a){var r=0===i?a+"-name":a;e.each(o,function(i,o){return s.style[e.camelCase(o+r)]!==t?(n[a].prefix=o,!1):void 0}),n[a].duration=e.camelCase(n[a].prefix+a+"-duration"),n[a].event=e.camelCase(n[a].prefix+a+"-end"),""===n[a].prefix&&(n[a].event=n[a].event.toLowerCase())}),e.support.cssTransitions=n.transition.prefix!==t,e.support.cssAnimations=n.animation.prefix!==t,e(s).remove(),e.fn.animationComplete=function(s,o,a){var r,l,h=this,d=function(){clearTimeout(r),s.apply(this,arguments)},u=o&&"animation"!==o?"transition":"animation";return e.support.cssTransitions&&"transition"===u||e.support.cssAnimations&&"animation"===u?(a===t&&(e(this).context!==i&&(l=3e3*parseFloat(e(this).css(n[u].duration))),(0===l||l===t||isNaN(l))&&(l=e.fn.animationComplete.defaultDuration)),r=setTimeout(function(){e(h).off(n[u].event,d),s.apply(h)},l),e(this).one(n[u].event,d)):(setTimeout(e.proxy(s,this),0),e(this))},e.fn.animationComplete.defaultDuration=1e3}(e),function(e,t,i,n){function s(e){for(;e&&"undefined"!=typeof e.originalEvent;)e=e.originalEvent;return e}function o(t,i){var o,a,r,l,h,d,u,c,p,m=t.type;if(t=e.Event(t),t.type=i,o=t.originalEvent,a=e.event.props,m.search(/^(mouse|click)/)>-1&&(a=I),o)for(u=a.length,l;u;)l=a[--u],t[l]=o[l];if(m.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==m.search(/^touch/)&&(r=s(o),m=r.touches,h=r.changedTouches,d=m&&m.length?m[0]:h&&h.length?h[0]:n))for(c=0,p=E.length;p>c;c++)l=E[c],t[l]=d[l];return t}function a(t){for(var i,n,s={};t;){i=e.data(t,k);for(n in i)i[n]&&(s[n]=s.hasVirtualBinding=!0);t=t.parentNode}return s}function r(t,i){for(var n;t;){if(n=e.data(t,k),n&&(!i||n[i]))return t;t=t.parentNode}return null}function l(){L=!1}function h(){L=!0}function d(){R=0,q.length=0,H=!1,h()}function u(){l()}function c(){p(),B=setTimeout(function(){B=0,d()},e.vmouse.resetTimerDuration)}function p(){B&&(clearTimeout(B),B=0)}function m(t,i,n){var s;return(n&&n[t]||!n&&r(i.target,t))&&(s=o(i,t),e(i.target).trigger(s)),s}function f(t){var i,n=e.data(t.target,P);H||R&&R===n||(i=m("v"+t.type,t),i&&(i.isDefaultPrevented()&&t.preventDefault(),i.isPropagationStopped()&&t.stopPropagation(),i.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function g(t){var i,n,o,r=s(t).touches;r&&1===r.length&&(i=t.target,n=a(i),n.hasVirtualBinding&&(R=U++,e.data(i,P,R),p(),u(),N=!1,o=s(t).touches[0],O=o.pageX,F=o.pageY,m("vmouseover",t,n),m("vmousedown",t,n)))}function b(e){L||(N||m("vmousecancel",e,a(e.target)),N=!0,c())}function v(t){if(!L){var i=s(t).touches[0],n=N,o=e.vmouse.moveDistanceThreshold,r=a(t.target);N=N||Math.abs(i.pageX-O)>o||Math.abs(i.pageY-F)>o,N&&!n&&m("vmousecancel",t,r),m("vmousemove",t,r),c()}}function _(e){if(!L){h();var t,i,n=a(e.target);m("vmouseup",e,n),N||(t=m("vclick",e,n),t&&t.isDefaultPrevented()&&(i=s(e).changedTouches[0],q.push({touchID:R,x:i.clientX,y:i.clientY}),H=!0)),m("vmouseout",e,n),N=!1,c()}}function C(t){var i,n=e.data(t,k);if(n)for(i in n)if(n[i])return!0;return!1}function w(){}function y(t){var i=t.substr(1);return{setup:function(){C(this)||e.data(this,k,{});var n=e.data(this,k);n[t]=!0,A[t]=(A[t]||0)+1,1===A[t]&&M.bind(i,f),e(this).bind(i,w),j&&(A.touchstart=(A.touchstart||0)+1,1===A.touchstart&&M.bind("touchstart",g).bind("touchend",_).bind("touchmove",v).bind("scroll",b))},teardown:function(){--A[t],A[t]||M.unbind(i,f),j&&(--A.touchstart,A.touchstart||M.unbind("touchstart",g).unbind("touchmove",v).unbind("touchend",_).unbind("scroll",b));var n=e(this),s=e.data(this,k);s&&(s[t]=!1),n.unbind(i,w),C(this)||n.removeData(k)}}}var x,T,k="virtualMouseBindings",P="virtualTouchID",D="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),E="clientX clientY pageX pageY screenX screenY".split(" "),S=e.event.mouseHooks?e.event.mouseHooks.props:[],I=e.event.props.concat(S),A={},B=0,O=0,F=0,N=!1,q=[],H=!1,L=!1,j="addEventListener"in i,M=e(i),U=1,R=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},T=0;T<D.length;T++)e.event.special[D[T]]=y(D[T]);j&&i.addEventListener("click",function(t){var i,n,s,o,a,r,l=q.length,h=t.target;if(l)for(i=t.clientX,n=t.clientY,x=e.vmouse.clickDistanceThreshold,s=h;s;){for(o=0;l>o;o++)if(a=q[o],r=0,s===h&&Math.abs(a.x-i)<x&&Math.abs(a.y-n)<x||e.data(s,P)===a.touchID)return t.preventDefault(),void t.stopPropagation();s=s.parentNode}},!0)}(e,t,i),function(e,t,n){function s(t,i,s,o){var a=s.type;s.type=i,o?e.event.trigger(s,n,t):e.event.dispatch.call(t,s),s.type=a}var o=e(i),a=e.mobile.support.touch,r="touchmove scroll",l=a?"touchstart":"mousedown",h=a?"touchend":"mouseup",d=a?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,i){e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.attrFn&&(e.attrFn[i]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){i=t,s(o,i?"scrollstart":"scrollstop",e)}var i,n,o=this,a=e(o);a.bind(r,function(s){e.event.special.scrollstart.enabled&&(i||t(s,!0),clearTimeout(n),n=setTimeout(function(){t(s,!1)},50))})},teardown:function(){e(this).unbind(r)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,i=e(t),n=!1;i.bind("vmousedown",function(a){function r(){clearTimeout(d)}function l(){r(),i.unbind("vclick",h).unbind("vmouseup",r),o.unbind("vmousecancel",l)}function h(e){l(),n||u!==e.target?n&&e.preventDefault():s(t,"tap",e)}if(n=!1,a.which&&1!==a.which)return!1;var d,u=a.target;i.bind("vmouseup",r).bind("vclick",h),o.bind("vmousecancel",l),d=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(n=!0),s(t,"taphold",e.Event("taphold",{target:u}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),o.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var i=t.pageXOffset,n=t.pageYOffset,s=e.clientX,o=e.clientY;return 0===e.pageY&&Math.floor(o)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(s)>Math.floor(e.pageX)?(s-=i,o-=n):(o<e.pageY-n||s<e.pageX-i)&&(s=e.pageX-i,o=e.pageY-n),{x:s,y:o}},start:function(t){var i=t.originalEvent.touches?t.originalEvent.touches[0]:t,n=e.event.special.swipe.getLocation(i);return{time:(new Date).getTime(),coords:[n.x,n.y],origin:e(t.target)}},stop:function(t){var i=t.originalEvent.touches?t.originalEvent.touches[0]:t,n=e.event.special.swipe.getLocation(i);return{time:(new Date).getTime(),coords:[n.x,n.y]}},handleSwipe:function(t,i,n,o){if(i.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-i.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-i.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var a=t.coords[0]>i.coords[0]?"swipeleft":"swiperight";return s(n,"swipe",e.Event("swipe",{target:o,swipestart:t,swipestop:i}),!0),s(n,a,e.Event(a,{target:o,swipestart:t,swipestop:i}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,i=this,n=e(i),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var n,a=e.event.special.swipe.start(t),r=t.target,l=!1;s.move=function(t){a&&!t.isDefaultPrevented()&&(n=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(a,n,i,r),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(a.coords[0]-n.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,o.off(d,s.move),s.move=null},o.on(d,s.move).one(h,s.stop)}},n.on(l,s.start)},teardown:function(){var t,i;t=e.data(this,"mobile-events"),t&&(i=t.swipe,delete t.swipe,t.length--,0===t.length&&e.removeData(this,"mobile-events")),i&&(i.start&&e(this).off(l,i.start),i.move&&o.off(d,i.move),i.stop&&o.off(h,i.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,i){e.event.special[t]={setup:function(){e(this).bind(i,e.noop)},teardown:function(){e(this).unbind(i)}}})}(e,this||t),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",o)},teardown:function(){e(this).unbind("resize",o)}};var t,i,n,s=250,o=function(){i=(new Date).getTime(),n=i-a,n>=s?(a=i,e(this).trigger("throttledresize")):(t&&clearTimeout(t),t=setTimeout(o,s-n))},a=0}(e),function(e,t){function n(){var e=s();e!==o&&(o=e,u.trigger(c))}var s,o,a,r,l,h,d,u=e(t),c="orientationchange",p={0:!0,180:!0};e.support.orientation&&(l=t.innerWidth||u.width(),h=t.innerHeight||u.height(),d=50,a=l>h&&l-h>d,r=p[t.orientation],(a&&r||!a&&!r)&&(p={"-90":!0,90:!0})),e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){return e.support.orientation&&!e.event.special.orientationchange.disabled?!1:(o=s(),void u.bind("throttledresize",n))},teardown:function(){return e.support.orientation&&!e.event.special.orientationchange.disabled?!1:void u.unbind("throttledresize",n)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=s(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=s=function(){var n=!0,s=i.documentElement;return n=e.support.orientation?p[t.orientation]:s&&s.clientWidth/s.clientHeight<1.1,n?"portrait":"landscape"},e.fn[c]=function(e){return e?this.bind(c,e):this.trigger(c)},e.attrFn&&(e.attrFn[c]=!0)}(e,this||t),function(e){var t=e("head").children("base"),i={element:t.length?t:e("<base>",{href:e.mobile.path.documentBase.hrefNoHash}).prependTo(e("head")),linkSelector:"[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]",set:function(t){e.mobile.dynamicBaseEnabled&&e.support.dynamicBaseTag&&i.element.attr("href",e.mobile.path.makeUrlAbsolute(t,e.mobile.path.documentBase))},rewrite:function(t,n){var s=e.mobile.path.get(t);n.find(i.linkSelector).each(function(t,i){var n=e(i).is("[href]")?"href":e(i).is("[src]")?"src":"action",o=e.mobile.path.parseLocation(),a=e(i).attr(n);a=a.replace(o.protocol+o.doubleSlash+o.host+o.pathname,""),/^(\w+:|#|\/)/.test(a)||e(i).attr(n,s+a)})},reset:function(){i.element.attr("href",e.mobile.path.documentBase.hrefNoSearch)}};e.mobile.base=i}(e),function(e,t){e.mobile.widgets={};var i=e.widget,n=e.mobile.keepNative;e.widget=function(i){return function(){var n=i.apply(this,arguments),s=n.prototype.widgetName;return n.initSelector=n.prototype.initSelector!==t?n.prototype.initSelector:":jqmData(role='"+s+"')",e.mobile.widgets[s]=n,n}}(e.widget),e.extend(e.widget,i),e.mobile.document.on("create",function(t){e(t.target).enhanceWithin()}),e.widget("mobile.page",{options:{theme:"a",domCache:!1,keepNativeDefault:e.mobile.keepNative,contentTheme:null,enhanced:!1},_createWidget:function(){e.Widget.prototype._createWidget.apply(this,arguments),this._trigger("init")},_create:function(){return this._trigger("beforecreate")===!1?!1:(this.options.enhanced||this._enhance(),this._on(this.element,{pagebeforehide:"removeContainerBackground",pagebeforeshow:"_handlePageBeforeShow"}),this.element.enhanceWithin(),void("dialog"===e.mobile.getAttribute(this.element[0],"role")&&e.mobile.dialog&&this.element.dialog()))},_enhance:function(){var i="data-"+e.mobile.ns,n=this;this.options.role&&this.element.attr("data-"+e.mobile.ns+"role",this.options.role),this.element.attr("tabindex","0").addClass("ui-page ui-page-theme-"+this.options.theme),this.element.find("["+i+"role='content']").each(function(){var s=e(this),o=this.getAttribute(i+"theme")||t;n.options.contentTheme=o||n.options.contentTheme||n.options.dialog&&n.options.theme||"dialog"===n.element.jqmData("role")&&n.options.theme,s.addClass("ui-content"),n.options.contentTheme&&s.addClass("ui-body-"+n.options.contentTheme),s.attr("role","main").addClass("ui-content")})},bindRemove:function(t){var i=this.element;!i.data("mobile-page").options.domCache&&i.is(":jqmData(external-page='true')")&&i.bind("pagehide.remove",t||function(t,i){if(!i.samePage){var n=e(this),s=new e.Event("pageremove");n.trigger(s),s.isDefaultPrevented()||n.removeWithDependents()}})},_setOptions:function(i){i.theme!==t&&this.element.removeClass("ui-page-theme-"+this.options.theme).addClass("ui-page-theme-"+i.theme),i.contentTheme!==t&&this.element.find("[data-"+e.mobile.ns+"='content']").removeClass("ui-body-"+this.options.contentTheme).addClass("ui-body-"+i.contentTheme)},_handlePageBeforeShow:function(){this.setContainerBackground()},removeContainerBackground:function(){this.element.closest(":mobile-pagecontainer").pagecontainer({theme:"none"})},setContainerBackground:function(e){this.element.parent().pagecontainer({theme:e||this.options.theme})},keepNativeSelector:function(){var t=this.options,i=e.trim(t.keepNative||""),s=e.trim(e.mobile.keepNative),o=e.trim(t.keepNativeDefault),a=n===s?"":s,r=""===a?o:"";return(i?[i]:[]).concat(a?[a]:[]).concat(r?[r]:[]).join(", ")}})}(e),function(e,n){e.widget("mobile.pagecontainer",{options:{theme:"a"},initSelector:!1,_create:function(){this._trigger("beforecreate"),this.setLastScrollEnabled=!0,this._on(this.window,{navigate:"_disableRecordScroll",scrollstop:"_delayedRecordScroll"}),this._on(this.window,{navigate:"_filterNavigateEvents"}),this._on({pagechange:"_afterContentChange"}),this.window.one("navigate",e.proxy(function(){this.setLastScrollEnabled=!0},this))},_setOptions:function(e){e.theme!==n&&"none"!==e.theme?this.element.removeClass("ui-overlay-"+this.options.theme).addClass("ui-overlay-"+e.theme):e.theme!==n&&this.element.removeClass("ui-overlay-"+this.options.theme),this._super(e)},_disableRecordScroll:function(){this.setLastScrollEnabled=!1},_enableRecordScroll:function(){this.setLastScrollEnabled=!0},_afterContentChange:function(){this.setLastScrollEnabled=!0,this._off(this.window,"scrollstop"),this._on(this.window,{scrollstop:"_delayedRecordScroll"})},_recordScroll:function(){if(this.setLastScrollEnabled){var e,t,i,n=this._getActiveHistory();n&&(e=this._getScroll(),t=this._getMinScroll(),i=this._getDefaultScroll(),n.lastScroll=t>e?i:e)}},_delayedRecordScroll:function(){setTimeout(e.proxy(this,"_recordScroll"),100)},_getScroll:function(){return this.window.scrollTop()},_getMinScroll:function(){return e.mobile.minScrollBack},_getDefaultScroll:function(){return e.mobile.defaultHomeScroll},_filterNavigateEvents:function(t,i){var n;t.originalEvent&&t.originalEvent.isDefaultPrevented()||(n=t.originalEvent.type.indexOf("hashchange")>-1?i.state.hash:i.state.url,n||(n=this._getHash()),n&&"#"!==n&&0!==n.indexOf("#"+e.mobile.path.uiStateKey)||(n=location.href),this._handleNavigate(n,i.state))},_getHash:function(){return e.mobile.path.parseLocation().hash},getActivePage:function(){return this.activePage},_getInitialContent:function(){return e.mobile.firstPage},_getHistory:function(){return e.mobile.navigate.history},_getActiveHistory:function(){return this._getHistory().getActive()},_getDocumentBase:function(){return e.mobile.path.documentBase},back:function(){this.go(-1)},forward:function(){this.go(1)},go:function(i){if(e.mobile.hashListeningEnabled)t.history.go(i);else{var n=e.mobile.navigate.history.activeIndex,s=n+parseInt(i,10),o=e.mobile.navigate.history.stack[s].url,a=i>=1?"forward":"back";e.mobile.navigate.history.activeIndex=s,e.mobile.navigate.history.previousIndex=n,this.change(o,{direction:a,changeHash:!1,fromHashChange:!0})}},_handleDestination:function(t){var i;return"string"===e.type(t)&&(t=e.mobile.path.stripHash(t)),t&&(i=this._getHistory(),t=e.mobile.path.isPath(t)?t:e.mobile.path.makeUrlAbsolute("#"+t,this._getDocumentBase())),t||this._getInitialContent()},_transitionFromHistory:function(e,t){var i=this._getHistory(),n="back"===e?i.getLast():i.getActive();return n&&n.transition||t},_handleDialog:function(t,i){var n,s,o=this.getActivePage();return o&&!o.data("mobil