www-thermferm/jqwidgets/jqxresponse.js

changeset 511
2d1d43c3a2c2
parent 373
f6850e0b5d35
child 617
b216f9d4b917
equal deleted inserted replaced
510:2da3d3340403 511:2d1d43c3a2c2
1 /* 1 !function(a){a.jqx.response=function(){this.defineInstance()},a.jqx.response.prototype={defineInstance:function(){this._handlers=new Array,this.refresh();var b=this;this.layouts=[],this.addHandler(a(document),"scroll.jqxresponse",function(){b.scroll=b.getScroll()})},refresh:function(){this.os=this.getOS(),this.browser=this.getBrowser(),this.device=this.getDevice(),this.viewPort=this.getViewPort(),this.document=this.getDocument(),this.scroll=this.getScroll(),this.media=window.matchMedia||window.msMatchMedia||function(){return{}}},refreshSize:function(){this.viewPort=this.getViewPort(),this.document=this.getDocument()},addHandler:function(a,b,c,d){switch(b){case"mousemove":if(window.addEventListener&&!d)return a[0].addEventListener("mousemove",c,!1),!1}a.on?a.on(b,c):a.bind(b,c)},removeHandler:function(a,b,c){return void 0==b?void(a.off?a.off():a.unbind()):void(void 0==c?a.off?a.off(b):a.unbind(b):a.off?a.off(b,c):a.unbind(b,c))},responsive:function(b){this._counter||(this._counter=0);for(var c=this.getDevice().type,d=a(b.container),e=0;e<d.length;e++){var f=d[e];f.style.position="relative",f.style.clear="both";for(var g=(a(f).width(),a(f).children()),h=0;h<g.length;h++){var i=g[h];i.className;i.style.position="relative",i.style.top="0px",a(i).css("float","left"),i._className=i.className,b.colClass&&a(i).addClass(b.colClass)}}var j=function(){for(var e=0;e<d.length;e++){var f=d[e],h=a(f).width(),i=function(d){for(var e=a(f).children(),g=b.margin,h=b.padding,i=b.colOffsets,j=0,k=0;k<e.length;k++){var l=e[k];l.className=l._className;var m=l._className;b.colClass&&(""!=m?m+=" "+b.colClass:m=b.colClass);var n=d/e.length;if(n=b.colWidths[k]?d*b.colWidths[k]:d/e.length,!b.deviceTypes||b.deviceTypes&&b.deviceTypes.indexOf(c)>=0)for(var o=0;o<b.breakpoints.length;o++){var p=b.breakpoints[o-1],q=b.breakpoints[o];o>0&&p.width>=d&&q.width<d?p.colWidths[k]&&(n=d*p.colWidths[k],p.colClass&&(m=""!=l._className?l._className+" "+p.colClass:p.colClass,l.className=m),p.margin?g=p.margin:(p.margin={left:0,right:0,top:0,bottom:0},g=p.margin),p.padding?h=p.padding:(p.padding={left:0,right:0,top:0,bottom:0},h=p.padding),p.colOffsets?i=p.colOffsets:(p.colOffsets=new Array(e.length),i=p.colOffsets)):d<=q.width&&q.colWidths[k]&&(n=d*q.colWidths[k],q.colClass&&(m=""!=l._className?l._className+" "+q.colClass:q.colClass,l.className=m),q.margin?g=q.margin:(q.margin={left:0,right:0,top:0,bottom:0},g=q.margin),q.padding?h=q.padding:(q.padding={left:0,right:0,top:0,bottom:0},h=q.padding),q.colOffsets?i=q.colOffsets:(q.colOffsets=new Array(e.length),i=q.colOffsets))}l.className=m;var r=n;h&&(void 0==h.left&&(h.left=0),void 0==h.top&&(h.top=0),void 0==h.bottom&&(h.bottom=0),void 0==h.right&&(h.right=0),r-=h.left,r-=h.right,l.style.paddingLeft=h.left+"px",l.style.paddingRight=h.right+"px",l.style.paddingTop=h.top+"px",l.style.paddingBottom=h.bottom+"px"),l.style.marginLeft="0px",l.style.marginRight="0px",l.style.marginTop="0px",l.style.marginBottom="0px",g&&(void 0==g.left&&(g.left=0),void 0==g.top&&(g.top=0),void 0==g.bottom&&(g.bottom=0),void 0==g.right&&(g.right=0),r-=g.left,r-=g.right,l.style.marginRight=g.right+"px",l.style.marginLeft=g.left+"px",l.style.marginTop=g.top+"px",l.style.marginBottom=g.bottom+"px"),j+=r,j>=d-1&&j-d<=5&&(r--,j=0),i&&void 0!=i[k]&&(l.style.marginLeft=parseInt(l.style.marginLeft)+i[k]*d+"px"),l.style.width=r+"px"}},j=g.css("visibility");g.css("visibility","hidden"),i(h);var k=a(f).width();h!=k&&(i(k),a(window).trigger("resize")),g.css("visibility",j)}};if(this.layouts.push({object:b,resize:j}),1==this.layouts.length){var k=this;a(window).on("resize.response"+this._counter,function(){for(var a=0;a<k.layouts.length;a++)k.layouts[a].resize()}),a(window).on("orientationchange.response"+this._counter,function(){for(var a=0;a<k.layouts.length;a++)k.layouts[a].resize()}),a(window).on("orientationchanged.response"+this._counter,function(){for(var a=0;a<k.layouts.length;a++)k.layouts[a].resize()})}for(var e=0;e<this.layouts.length;e++)this.layouts[e].resize()},destroy:function(){if(this.removeHandler(a(window),"resize.jqxresponse"),this.removeHandler(a(document),"scroll.jqxresponse"),this._counter>0)for(var b=0;b<this._counter;b++)a(window).off("resize.response"+b),a(window).off("orientationchange.response"+b),a(window).off("orientationchanged.response"+b);for(var b=0;b<this._handlers.length;b++){var c=this._handlers[b];this.removeHandler(a(c),"mousedown.response"+c[0].id),this.removeHandler(a(c),"touchstart.response"+c[0].id),this.removeHandler(a(c),"mousemove.response"+c[0].id),this.removeHandler(a(c),"touchmove.response"+c[0].id),this.removeHandler(a(c),"mouseup.response"+c[0].id),this.removeHandler(a(c),"touchend.response"+c[0].id)}},resize:function(b){var c=this;this.removeHandler(a(window),"resize.jqxresponse"),this.addHandler(a(window),"resize.jqxresponse",function(d){if(b)if(a.isArray(b))for(var e=0;e<b.length;e++)b[e]();else b();c.refreshSize()}),null==b&&this.removeHandler(a(window),"resize.jqxresponse")},pointerDown:function(b,c){if(b&&c){var d=a.jqx.mobile.isTouchDevice(),e=!0;if(d){var f=a.jqx.mobile.getTouchEventName("touchstart")+".response"+b[0].id;null!=c?this.addHandler(a(b),f,function(b){var d=a.jqx.position(b),f=c(b,d,"touch");return e=!1,setTimeout(function(){e=!0},500),f}):this.removeHandler(a(b),f)}null!=c?this.addHandler(a(b),"mousedown.response"+b[0].id,function(b){var d=a.jqx.position(b);if(e)return c(b,d,"mouse")}):this.removeHandler(a(b),"mousedown.response"+b[0].id),this._handlers.push(b)}},pointerUp:function(b,c){if(b){var d=a.jqx.mobile.isTouchDevice(),e=!0;if(d){var f=a.jqx.mobile.getTouchEventName("touchend")+".response"+b[0].id;null!=c?this.addHandler(a(b),f,function(b){var d=a.jqx.position(b),f=c(b,d,"touch");return e=!1,setTimeout(function(){e=!0},500),f}):this.removeHandler(a(b),f)}null!=c?this.addHandler(a(b),"mouseup.response"+b[0].id,function(b){var d=a.jqx.position(b);if(e)return c(b,d,"mouse")}):this.removeHandler(a(b),"mouseup.response"+b[0].id),this._handlers.push(b)}},pointerMove:function(b,c){if(b){var d=a.jqx.mobile.isTouchDevice();if(d){var e=a.jqx.mobile.getTouchEventName("touchmove")+".response"+b[0].id;null!=c?this.addHandler(a(b),e,function(b){var d=a.jqx.mobile.getTouches(b);if(1==d.length){var e=a.jqx.position(b);return c(b,e,"touch")}}):this.removeHandler(a(b),e)}else null!=c?this.addHandler(a(b),"mousemove.response"+b[0].id,function(b){var d=a.jqx.position(b);return c(b,d,"mouse")}):this.removeHandler(a(b),"mousemove.response"+b[0].id);this._handlers.push(b)}},isHidden:function(b){return a.jqx.isHidden(a(b))},inViewPort:function(a){var b=this.viewPort;if(a.getBoundingClientRect){var c=a.getBoundingClientRect?a.getBoundingClientRect():{};return c&&c.bottom>=0&&c.top<=b.height&&c.right>=0&&c.left<=b.width}return!1},getScroll:function(){var a={left:window.pageXOffset||document.scrollLeft,top:window.pageYOffset||document.scrollTop};return void 0==a.left&&(a.left=0),void 0==a.top&&(a.top=0),a},getDocument:function(){return{width:a(document).width(),height:a(document).height()}},getViewPort:function(){return{width:a(window).width(),height:a(window).height()}},getTouch:function(){var b="ontouchstart",c=b in window;if(c)return!0;var b="MSPointerDown",c=b in window;return!!c||!!a.jqx.mobile.isWindowsPhone()},getDevice:function(){var a=this.os.name,b=window.location.search.match(/deviceType=(Tablet|Phone)/),c=window.deviceType,d="";return b&&b[1]?d=b[1]:"iPhone"===c?d="Phone":"iPad"===c?d="Tablet":"Android"!=a&&"iOS"!=a&&/Windows|Linux|MacOS|Mac OS|Mac OS X/.test(a)?d="Desktop":"iOS"==a&&navigator.userAgent.toLowerCase().indexOf("ipad")>=0?d="Tablet":"RIMTablet"==a?d="Tablet":"Android"==a?(d=this.os.version&&this.os.version.substring(0,1).indexOf("3")>=0?"Tablet":this.os.version&&this.os.version.substring(0,1).indexOf("4")>=0&&navigator.userAgent.search(/mobile/i)==-1?"Tablet":"Phone",navigator.userAgent.toLowerCase().indexOf("kindle fire")>=0&&(d="Tablet")):d="Phone",/Windows/.test(a)&&(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0?d="Phone":navigator.userAgent.indexOf("Touch")>=0&&(d="Tablet",this.getTouch()||(d="Desktop"))),{type:d,touch:this.getTouch(),width:window.screen.width,height:window.screen.height,availWidth:window.screen.availWidth,availHeight:window.screen.availHeight}},canvas:function(){var a=!1,b=document.createElement("canvas");return b&&b.getContext&&b.getContext("2d")&&(a=!0),a},vml:function(){if(void 0==this._vmlSupport){var a=document.body.appendChild(document.createElement("div"));a.innerHTML='<v:shape id="vml_flag1" adj="1" />';var b=a.firstChild;b.style.behavior="url(#default#VML)",this._vmlSupport=!b||"object"==typeof b.adj,a.parentNode.removeChild(a)}return this._vmlSupport},svg:function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")},getBrowser:function(){var b=navigator.userAgent.toLowerCase(),c="",d=null;if(browserNames={msie:{name:"Internet Explorer",eval:/(msie) ([\w.]+)/.exec(b)},webkit:{name:"Webkit",eval:/(webkit)[ \/]([\w.]+)/.exec(b)},chrome:{name:"Chrome",eval:/(chrome)[ \/]([\w.]+)/.exec(b)},safari:{name:"Safari",eval:/(safari)[ \/]([\w.]+)/.exec(b)},edge:{name:"Edge",eval:/Edge/i.exec(b)},opera:{name:"Opera",eval:/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)},operamobile:{name:"Opera Mobile",eval:/(opera mobi)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(opera tablet)(?:.*version|)[ \/]([\w.]+)/.exec(b)},dolphin:{name:"Dolphin",eval:/(dolphin)[ \/]([\w.]+)/.exec(b)},webosbrowser:{name:"webOSBrowser",eval:/(wosbrowser)(?:.*version|)[ \/]([\w.]+)/.exec(b)},chromemobile:{name:"Chrome Mobile",eval:/(crmo)[ \/]([\w.]+)/.exec(b)},silk:{name:"Silk",eval:/(silk)[ \/]([\w.]+)/.exec(b)},firefox:{name:"Firefox",eval:/(firefox)[ \/]([\w.]+)/.exec(b)},msie11:{name:"Internet Explorer 11",eval:b.indexOf("rv:11.0")>=0&&b.indexOf(".net4.0c")>=0},winphone:{name:"Internet Explorer Mobile",eval:b.indexOf("windows phone 8.1")>=0},other:{name:"Other",eval:b.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)}},a.each(browserNames,function(a,e){if(this.eval)if("Other"==this.name)d||(d=this.eval,c=this.name);else if("Internet Explorer 11"==this.name)d||(d=["","msie",11],c="Internet Explorer");else if("Edge"==this.name)d=["","edge",b.substring(b.indexOf("edge")+5)],c=this.name;else if("Internet Explorer Mobile"==this.name)d||(d=["","msie",11],c="Internet Explorer");else{if("Chrome"==c&&"Safari"==this.name)return!0;d=this.eval,c=this.name}}),d){var e={name:c,accessName:d[1]||"",version:d[2]||"0",canvas:this.canvas(),svg:this.svg(),vml:this.vml()};e[d[1]]=d[1]}else e={name:"Other",browser:"other",version:""};return e},getOS:function(){var b=null,c="",d=navigator.userAgent,e="Other",f={ios:{name:"iOS",regex:new RegExp("(?:i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS )([^\\s;]+)")},android:{name:"Android",regex:new RegExp("(?:(Android |HTC_|Silk/))([^\\s;]+)")},webos:{name:"webOS",regex:new RegExp("(?:(?:webOS|hpwOS)/)([^\\s;]+)")},blackberry:{name:"BlackBerry",regex:new RegExp("(?:BlackBerry(?:.*)Version/)([^\\s;]+)")},rimTablet:{name:"RIMTablet",regex:new RegExp("(?:RIM Tablet OS )([^\\s;]+)")},chrome:{name:"Chrome OS",regex:new RegExp("CrOS")},mac:{name:"MacOS",regex:new RegExp("mac")},win:{name:"Windows",regex:new RegExp("win")},linux:{name:"Linux",regex:new RegExp("linux")},bada:{name:"Bada",regex:new RegExp("(?:Bada/)([^\\s;]+)")},other:{name:"Other"}},g="",h=[{s:"Windows 3.11",r:/Win16/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 10",r:/(Windows 10|Windows NT 10)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows ME",r:/Windows ME/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"BB10",r:/BB10/},{s:"MeeGo",r:/MeeGo/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var i in h){var j=h[i];if(j.r.test(d)){g=j.s;break}}var k="";switch(/Windows/.test(g)&&(k=/Windows (.*)/.exec(g)[1],g="Windows"),/BB10/.test(g)&&(k="10",g="BlackBerry"),e){case"Mac OS X":k=/Mac OS X (10[\.\_\d]+)/.exec(d)[1];break;case"Android":k=/Android ([\.\_\d]+)/.exec(d)[1];break;case"iOS":k=/OS (\d+)_(\d+)_?(\d+)?/.exec(nVer),k=k[1]+"."+k[2]+"."+(0|k[3])}return""!=k&&(c=k),a.each(f,function(a,f){if(b=d.match(this.regex)||d.toLowerCase().match(this.regex))return this.name.match(/Windows|Linux|MacOS/)||(c=!b[1]||"HTC_"!=b[1]&&"Silk/"!=b[1]?b[b.length-1]:"2.3"),e={name:this.name,version:c,platform:navigator.platform},!1}),e&&"Other"==e.name&&(e.name=g),e&&""!=e.name&&""!=g&&(e.name=g),e&&""==e.version&&""!=k&&(e.version=k),e}}}(jqxBaseFramework);
2 jQWidgets v3.8.0 (2015-Apr)
3 Copyright (c) 2011-2015 jQWidgets.
4 License: http://jqwidgets.com/license/
5 */
6
7 (function($){$.jqx.response=function(){this.defineInstance()};$.jqx.response.prototype={defineInstance:function(){this._handlers=new Array();this.refresh();var that=this;this.addHandler($(document),"scroll.jqxresponse",function(){that.scroll=that.getScroll()})},refresh:function(){this.os=this.getOS();this.browser=this.getBrowser();this.device=this.getDevice();this.viewPort=this.getViewPort();this.document=this.getDocument();this.scroll=this.getScroll();this.media=window.matchMedia||window.msMatchMedia||function(){return{}}},refreshSize:function(){this.viewPort=this.getViewPort();this.document=this.getDocument()},addHandler:function(source,event,func,data){switch(event){case"mousemove":if(window.addEventListener&&!data){source[0].addEventListener("mousemove",func,false);return false}break}if(source.on){source.on(event,func)}else{source.bind(event,func)}},removeHandler:function(source,event,func){if(event==undefined){if(source.off){source.off()}else{source.unbind()}return}if(func==undefined){if(source.off){source.off(event)}else{source.unbind(event)}}else{if(source.off){source.off(event,func)}else{source.unbind(event,func)}}},destroy:function(){this.removeHandler($(window),"resize.jqxresponse");this.removeHandler($(document),"scroll.jqxresponse");for(var i=0;i<this._handlers.length;i++){var element=this._handlers[i];this.removeHandler($(element),"mousedown.response"+element[0].id);this.removeHandler($(element),"touchstart.response"+element[0].id);this.removeHandler($(element),"mousemove.response"+element[0].id);this.removeHandler($(element),"touchmove.response"+element[0].id);this.removeHandler($(element),"mouseup.response"+element[0].id);this.removeHandler($(element),"touchend.response"+element[0].id)}},resize:function(resizeFuncs){var that=this;this.removeHandler($(window),"resize.jqxresponse");this.addHandler($(window),"resize.jqxresponse",function(event){if(resizeFuncs){if($.isArray(resizeFuncs)){for(var i=0;i<resizeFuncs.length;i++){resizeFuncs[i]()}}else{resizeFuncs()}}that.refreshSize()});if(resizeFuncs==null){this.removeHandler($(window),"resize.jqxresponse")}},pointerDown:function(element,func){if(element&&func){var touchDevice=$.jqx.mobile.isTouchDevice();var that=this;var canCallFunc=true;if(touchDevice){var touchstart=$.jqx.mobile.getTouchEventName("touchstart")+".response"+element[0].id;if(func!=null){this.addHandler($(element),touchstart,function(event){var position=$.jqx.position(event);var result=func(event,position,"touch");canCallFunc=false;setTimeout(function(){canCallFunc=true},500);return result})}else{this.removeHandler($(element),touchstart)}}if(func!=null){this.addHandler($(element),"mousedown.response"+element[0].id,function(event){var position=$.jqx.position(event);if(canCallFunc){return func(event,position,"mouse")}})}else{this.removeHandler($(element),"mousedown.response"+element[0].id)}this._handlers.push(element)}},pointerUp:function(element,func){if(element){var touchDevice=$.jqx.mobile.isTouchDevice();var that=this;var canCallFunc=true;if(touchDevice){var touchend=$.jqx.mobile.getTouchEventName("touchend")+".response"+element[0].id;if(func!=null){this.addHandler($(element),touchend,function(event){var position=$.jqx.position(event);var result=func(event,position,"touch");canCallFunc=false;setTimeout(function(){canCallFunc=true},500);return result})}else{this.removeHandler($(element),touchend)}}if(func!=null){this.addHandler($(element),"mouseup.response"+element[0].id,function(event){var position=$.jqx.position(event);if(canCallFunc){return func(event,position,"mouse")}})}else{this.removeHandler($(element),"mouseup.response"+element[0].id)}this._handlers.push(element)}},pointerMove:function(element,func){if(element){var touchDevice=$.jqx.mobile.isTouchDevice();if(touchDevice){var touchmove=$.jqx.mobile.getTouchEventName("touchmove")+".response"+element[0].id;if(func!=null){this.addHandler($(element),touchmove,function(event){var touches=$.jqx.mobile.getTouches(event);if(touches.length==1){var position=$.jqx.position(event);return func(event,position,"touch")}})}else{this.removeHandler($(element),touchmove)}}else{if(func!=null){this.addHandler($(element),"mousemove.response"+element[0].id,function(event){var position=$.jqx.position(event);return func(event,position,"mouse")})}else{this.removeHandler($(element),"mousemove.response"+element[0].id)}}this._handlers.push(element)}},isHidden:function(element){return $.jqx.isHidden($(element))},inViewPort:function(element){var viewPort=this.viewPort;if(element.getBoundingClientRect){var r=element.getBoundingClientRect?element.getBoundingClientRect():{};return r&&(r.bottom>=0&&r.top<=viewPort.height&&r.right>=0&&r.left<=viewPort.width)}return false},getScroll:function(){var obj={left:window.pageXOffset||document.scrollLeft,top:window.pageYOffset||document.scrollTop};if(obj.left==undefined){obj.left=0}if(obj.top==undefined){obj.top=0}return obj},getDocument:function(){return{width:$(document).width(),height:$(document).height()}},getViewPort:function(){return{width:$(window).width(),height:$(window).height()}},getTouch:function(){var eventName="ontouchstart";var supported=(eventName in window);if(supported){return true}else{var eventName="MSPointerDown";var supported=(eventName in window);if(supported){return true}}if($.jqx.mobile.isWindowsPhone()){return true}return false},getDevice:function(){var osName=this.os.name;var match=window.location.search.match(/deviceType=(Tablet|Phone)/),nativeDeviceType=window.deviceType;var deviceType="";if(match&&match[1]){deviceType=match[1]}else{if(nativeDeviceType==="iPhone"){deviceType="Phone"}else{if(nativeDeviceType==="iPad"){deviceType="Tablet"}else{if(osName!="Android"&&osName!="iOS"&&/Windows|Linux|MacOS|Mac OS|Mac OS X/.test(osName)){deviceType="Desktop"}else{if(osName=="iOS"&&navigator.userAgent.toLowerCase().indexOf("ipad")>=0){deviceType="Tablet"}else{if(osName=="RIMTablet"){deviceType="Tablet"}else{if(osName=="Android"){if(this.os.version&&this.os.version.substring(0,1).indexOf("3")>=0){deviceType="Tablet"}else{if(this.os.version&&this.os.version.substring(0,1).indexOf("4")>=0&&navigator.userAgent.search(/mobile/i)==-1){deviceType="Tablet"}else{deviceType="Phone"}}if(navigator.userAgent.toLowerCase().indexOf("kindle fire")>=0){deviceType="Tablet"}}else{deviceType="Phone"}}}}}}}if(/Windows/.test(osName)){if(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0){deviceType="Phone"}else{if(navigator.userAgent.indexOf("Touch")>=0){deviceType="Tablet";if(!this.getTouch()){deviceType="Desktop"}}}}return{type:deviceType,touch:this.getTouch(),width:window.screen.width,height:window.screen.height,availWidth:window.screen.availWidth,availHeight:window.screen.availHeight}},canvas:function(){var canvasSupport=false;var canvas=document.createElement("canvas");if(canvas&&canvas.getContext&&canvas.getContext("2d")){canvasSupport=true}return canvasSupport},vml:function(){if(this._vmlSupport==undefined){var a=document.body.appendChild(document.createElement("div"));a.innerHTML='<v:shape id="vml_flag1" adj="1" />';var b=a.firstChild;b.style.behavior="url(#default#VML)";this._vmlSupport=b?typeof b.adj=="object":true;a.parentNode.removeChild(a)}return this._vmlSupport},svg:function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")},getBrowser:function(){var ua=navigator.userAgent.toLowerCase();var name="";var match=null;var that=this;browserNames={msie:{name:"Internet Explorer",eval:/(msie) ([\w.]+)/.exec(ua)},webkit:{name:"Webkit",eval:/(webkit)[ \/]([\w.]+)/.exec(ua)},chrome:{name:"Chrome",eval:/(chrome)[ \/]([\w.]+)/.exec(ua)},safari:{name:"Safari",eval:/(safari)[ \/]([\w.]+)/.exec(ua)},opera:{name:"Opera",eval:/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)},operamobile:{name:"Opera Mobile",eval:/(opera mobi)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(opera tablet)(?:.*version|)[ \/]([\w.]+)/.exec(ua)},dolphin:{name:"Dolphin",eval:/(dolphin)[ \/]([\w.]+)/.exec(ua)},webosbrowser:{name:"webOSBrowser",eval:/(wosbrowser)(?:.*version|)[ \/]([\w.]+)/.exec(ua)},chromemobile:{name:"Chrome Mobile",eval:/(crmo)[ \/]([\w.]+)/.exec(ua)},silk:{name:"Silk",eval:/(silk)[ \/]([\w.]+)/.exec(ua)},firefox:{name:"Firefox",eval:/(firefox)[ \/]([\w.]+)/.exec(ua)},msie11:{name:"Internet Explorer 11",eval:ua.indexOf("rv:11.0")>=0&&ua.indexOf(".net4.0c")>=0},winphone:{name:"Internet Explorer Mobile",eval:ua.indexOf("windows phone 8.1")>=0},other:{name:"Other",eval:ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)}};$.each(browserNames,function(index,value){if(this.eval){if(this.name=="Other"){if(!match){match=this.eval;name=this.name}}else{if(this.name=="Internet Explorer 11"){if(!match){match=["","msie",11];name="Internet Explorer"}}else{if(this.name=="Internet Explorer Mobile"){if(!match){match=["","msie",11];name="Internet Explorer"}}else{if(name=="Chrome"&&this.name=="Safari"){return true}match=this.eval;name=this.name}}}}});if(match){var browser={name:name,accessName:match[1]||"",version:match[2]||"0",canvas:this.canvas(),svg:this.svg(),vml:this.vml()};browser[match[1]]=match[1]}else{browser={name:"Other",browser:"other",version:""}}return browser},getOS:function(){var match=null;var version="";var userAgent=navigator.userAgent;var os="Other";var osTypes={ios:{name:"iOS",regex:new RegExp("(?:i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS )([^\\s;]+)")},android:{name:"Android",regex:new RegExp("(?:(Android |HTC_|Silk/))([^\\s;]+)")},webos:{name:"webOS",regex:new RegExp("(?:(?:webOS|hpwOS)/)([^\\s;]+)")},blackberry:{name:"BlackBerry",regex:new RegExp("(?:BlackBerry(?:.*)Version/)([^\\s;]+)")},rimTablet:{name:"RIMTablet",regex:new RegExp("(?:RIM Tablet OS )([^\\s;]+)")},chrome:{name:"Chrome OS",regex:new RegExp("CrOS")},mac:{name:"MacOS",regex:new RegExp("mac")},win:{name:"Windows",regex:new RegExp("win")},linux:{name:"Linux",regex:new RegExp("linux")},bada:{name:"Bada",regex:new RegExp("(?:Bada/)([^\\s;]+)")},other:{name:"Other"}};var osys="";var clientStrings=[{s:"Windows 3.11",r:/Win16/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows ME",r:/Windows ME/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"BB10",r:/BB10/},{s:"MeeGo",r:/MeeGo/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var id in clientStrings){var cs=clientStrings[id];if(cs.r.test(userAgent)){osys=cs.s;break}}var osVersion="";if(/Windows/.test(osys)){osVersion=/Windows (.*)/.exec(osys)[1];osys="Windows"}if(/BB10/.test(osys)){osVersion="10";osys="BlackBerry"}switch(os){case"Mac OS X":osVersion=/Mac OS X (10[\.\_\d]+)/.exec(userAgent)[1];break;case"Android":osVersion=/Android ([\.\_\d]+)/.exec(userAgent)[1];break;case"iOS":osVersion=/OS (\d+)_(\d+)_?(\d+)?/.exec(nVer);osVersion=osVersion[1]+"."+osVersion[2]+"."+(osVersion[3]|0);break}if(osVersion!=""){version=osVersion}$.each(osTypes,function(index,value){match=userAgent.match(this.regex)||userAgent.toLowerCase().match(this.regex);if(match){if(!this.name.match(/Windows|Linux|MacOS/)){if(match[1]&&(match[1]=="HTC_"||match[1]=="Silk/")){version="2.3"}else{version=match[match.length-1]}}os={name:this.name,version:version,platform:navigator.platform};return false}});if(os&&os.name=="Other"){os.name=osys}if(os&&os.name!=""&&osys!=""){os.name=osys}if(os&&os.version==""&&osVersion!=""){os.version=osVersion}return os}}})(jqxBaseFramework);

mercurial