Shuo/client/js/libs.min.js

8 lines
241 KiB
JavaScript
Raw Normal View History

2014-07-09 01:38:38 +00:00
(function(){var a=function(a){"use strict";a=a?a:{};var b={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false};var c,d,e,f,g,h,i,j,k,l,m,n,o;o={};o.ff=/firefox/i.test(navigator.userAgent.toLowerCase());o.chrome=/chrome/i.test(navigator.userAgent.toLowerCase());o.opera=/opera/i.test(navigator.userAgent.toLowerCase());o.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase());o.supported=o.chrome||o.ff||o.opera;var p=[];m=function(){};j=n=false;var q=function(){c=B(b,a);c.bgColor=A(c.bgColor);c.textColor=A(c.textColor);c.position=c.position.toLowerCase();c.animation=D.types[""+c.animation]?c.animation:b.animation;var j=c.position.indexOf("up")>-1;var k=c.position.indexOf("left")>-1;if(j||k){for(var l=0;l<D.types[""+c.animation].length;l++){var m=D.types[""+c.animation][l];if(j){if(m.y<.6){m.y=m.y-.4}else{m.y=m.y-2*m.y+(1-m.w)}}if(k){if(m.x<.6){m.x=m.x-.4}else{m.x=m.x-2*m.x+(1-m.h)}}D.types[""+c.animation][l]=m}}c.type=s[""+c.type]?c.type:b.type;try{d=z.getIcon();g=document.createElement("canvas");i=document.createElement("img");if(d.hasAttribute("href")){i.setAttribute("src",d.getAttribute("href"));i.onload=function(){e=i.height>0?i.height:32;f=i.width>0?i.width:32;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}else{i.setAttribute("src","");e=32;f=32;i.height=e;i.width=f;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var r={};r.ready=function(){j=true;r.reset();m()};r.reset=function(){p=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);z.setIcon(g)};r.start=function(){if(!j||l){return}var a=function(){k=p[0];l=false;if(p.length>0){p.shift();r.start()}else{}};if(p.length>0){l=true;if(k){D.run(k.options,function(){D.run(p[0].options,function(){a()},false)},true)}else{D.run(p[0].options,function(){a()},false)}}};var s={};var t=function(a){a.n=typeof a.n==="number"?Math.abs(a.n|0):a.n;a.x=f*a.x;a.y=e*a.y;a.w=f*a.w;a.h=e*a.h;a.len=(""+a.n).length;return a};s.circle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font=c.fontStyle+" "+Math.floor(a.h*(a.n>99?.85:1))+"px "+c.fontFamily;h.textAlign="center";if(b){h.moveTo(a.x+a.w/2,a.y);h.lineTo(a.x+a.w-a.h/2,a.y);h.quadraticCurveTo(a.x+a.w,a.y,a.x+a.w,a.y+a.h/2);h.lineTo(a.x+a.w,a.y+a.h-a.h/2);h.quadraticCurveTo(a.x+a.w,a.y+a.h,a.x+a.w-a.h/2,a.y+a.h);h.lineTo(a.x+a.h/2,a.y+a.h);h.quadraticCurveTo(a.x,a.y+a.h,a.x,a.y+a.h-a.h/2);h.lineTo(a.x,a.y+a.h/2);h.quadraticCurveTo(a.x,a.y,a.x+a.h/2,a.y)}else{h.arc(a.x+a.w/2,a.y+a.h/2,a.h/2,0,2*Math.PI)}h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fill();h.closePath();h.beginPath();h.stroke();h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.n>999){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};s.rectangle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font="bold "+Math.floor(a.h*(a.n>99?.9:1))+"px sans-serif";h.textAlign="center";h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fillRect(a.x,a.y,a.w,a.h);h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.len>3){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};var u=function(a,b){m=function(){try{if(typeof a==="number"?a>0:a!==""){if(D.types[""+b]){c.animation=b}p.push({type:"badge",options:{n:a}});if(p.length>100){throw"Too many badges requests in queu
2014-07-20 19:49:44 +00:00
this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.offset++;this.match+=a;this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);if(b){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return a},unput:function(a){var b=a.length;var c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-b-1);this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(c.length-1)this.yylineno-=c.length-1;var e=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b};if(this.options.ranges){this.yylloc.range=[e[0],e[0]+this.yyleng-b]}return this},more:function(){this._more=true;return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;if(a.length<20){a+=this._input.substr(0,20-a.length)}return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput();var b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var a,b,c,d,e,f;if(!this._more){this.yytext="";this.match=""}var g=this._currentRules();for(var h=0;h<g.length;h++){c=this._input.match(this.rules[g[h]]);if(c&&(!b||c[0].length>b[0].length)){b=c;d=h;if(!this.options.flex)break}}if(b){f=b[0].match(/(?:\r\n?|\n).*/g);if(f)this.yylineno+=f.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length};this.yytext+=b[0];this.match+=b[0];this.matches=b;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(b[0].length);this.matched+=b[0];a=this.performAction.call(this,this.yy,this,g[d],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(a)return a;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function c(){var a=this.next();if(typeof a!=="undefined"){return a}else{return this.lex()}},begin:function d(a){this.conditionStack.push(a)},popState:function e(){return this.conditionStack.pop()},_currentRules:function f(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function g(a){this.begin(a)}};a.options={};a.performAction=function h(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}var f=d;switch(c){case 0:if(b.yytext.slice(-2)==="\\\\"){e(0,1);this.begin("mu")}else if(b.yytext.slice(-1)==="\\"){e(0,1);this.begin("emu")}else{this.begin("mu")}if(b.yytext)return 10;break;case 1:return 10;break;case 2:this.popState();return 10;break;case 3:b.yytext=b.yytext.substr(5,b.yyleng-9);this.popState();return 11;break;case 4:return 10;break;case 5:e(0,4);this.popState();return 17;break;case 6:return 40;break;case 7:return 41;break;case 8:return 18;break;case 9:this.popState();this.begin("raw");return 20;break;case 10:b.yytext=b.yytext.substr(4,b.yyleng-8);this.popState();return"RAW_BLOCK";break;case 11:return 29;break;case 12
F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n){m(b)}b=b||n;d=d||[];if(!a||typeof a!=="string"){return d}if((k=b.nodeType)!==1&&k!==9){return[]}if(p&&!e){if(f=_.exec(a)){if(j=f[1]){if(k===9){h=b.getElementById(j);if(h&&h.parentNode){if(h.id===j){d.push(h);return d}}else{return d}}else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j){d.push(h);return d}}}else if(f[2]){I.apply(d,b.getElementsByTagName(a));return d}else if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){I.apply(d,b.getElementsByClassName(j));return d}}if(c.qsa&&(!q||!q.test(a))){s=r=u;w=b;x=k===9&&a;if(k===1&&b.nodeName.toLowerCase()!=="object"){o=g(a);if(r=b.getAttribute("id")){s=r.replace(bb,"\\$&")}else{b.setAttribute("id",s)}s="[id='"+s+"'] ";l=o.length;while(l--){o[l]=s+qb(o[l])}w=ab.test(a)&&ob(b.parentNode)||b;x=o.join(",")}if(x){try{I.apply(d,w.querySelectorAll(x));return d}catch(y){}finally{if(!r){b.removeAttribute("id")}}}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){if(a.push(c+" ")>d.cacheLength){delete b[a.shift()]}return b[c+" "]=e}return b}function hb(a){a[u]=true;return a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return false}finally{if(b.parentNode){b.parentNode.removeChild(b)}b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function kb(a,b){var c=b&&a,d=c&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return-1}}}return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function nb(a){return hb(function(b){b=+b;return hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){if(c[e=f[g]]){c[e]=!(d[e]=c[e])}}})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={};f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":false};m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;if(e===n||e.nodeType!==9||!e.documentElement){return n}n=e;o=e.documentElement;p=!f(e);if(g&&g!==g.top){if(g.addEventListener){g.addEventListener("unload",function(){m()},false)}else if(g.attachEvent){g.attachEvent("onunload",function(){m()})}}c.attributes=ib(function(a){a.className="i";return!a.getAttribute("className")});c.getElementsByTagName=ib(function(a){a.appendChild(e.createComment(""));return!a.getElementsByTagName("*").length});c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){a.innerHTML="<div class='a'></div><div class='a i'></div>";a.firstChild.className="i";return a.getElementsByClassName("i").length===2});c.getById=ib(function(a){o.appendChild(a).id=u;return!e.getElementsByName||!e.getElementsByName(u).length});if(c.getById){d.find["ID"]=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}};d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}}else{delete d.find["ID"];d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}}d.find["TAG"]=c.getElementsByTagName?function(a,b){if(typeof b.getElementsByTagName!==C){return b.getElementsByTagName(a)}}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(a==="*"){while(c=f[e++]){if(c.nodeType===1){d.push(c)}}return d}return f};d.find["CLASS"]=c.getElementsByClassName&&function(a,b){if(typeof b.getElementsByClassName!==C&&p){return b.getElementsByClassName(a)}};r=[];q=[];if(c.qsa=$.test(e.querySelectorAll)){ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>";if(a.querySelectorAll("[
g=h=d=d||l;if(d.nodeType===3||d.nodeType===8){return}if(X.test(q+n.event.triggered)){return}if(q.indexOf(".")>=0){r=q.split(".");q=r.shift();r.sort()}k=q.indexOf(":")<0&&"on"+q;b=b[n.expando]?b:new n.Event(q,typeof b==="object"&&b);b.isTrigger=e?2:3;b.namespace=r.join(".");b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b.result=undefined;if(!b.target){b.target=d}c=c==null?[b]:n.makeArray(c,[b]);o=n.event.special[q]||{};if(!e&&o.trigger&&o.trigger.apply(d,c)===false){return}if(!e&&!o.noBubble&&!n.isWindow(d)){i=o.delegateType||q;if(!X.test(i+q)){g=g.parentNode}for(;g;g=g.parentNode){p.push(g);h=g}if(h===(d.ownerDocument||l)){p.push(h.defaultView||h.parentWindow||a)}}f=0;while((g=p[f++])&&!b.isPropagationStopped()){b.type=f>1?i:o.bindType||q;m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle");if(m){m.apply(g,c)}m=k&&g[k];if(m&&m.apply&&n.acceptData(g)){b.result=m.apply(g,c);if(b.result===false){b.preventDefault()}}}b.type=q;if(!e&&!b.isDefaultPrevented()){if((!o._default||o._default.apply(p.pop(),c)===false)&&n.acceptData(d)){if(k&&n.isFunction(d[q])&&!n.isWindow(d)){h=d[k];if(h){d[k]=null}n.event.triggered=q;d[q]();n.event.triggered=undefined;if(h){d[k]=h}}}}return b.result},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};i[0]=a;a.delegateTarget=this;if(k.preDispatch&&k.preDispatch.call(this,a)===false){return}h=n.event.handlers.call(this,a,j);b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem;c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped()){if(!a.namespace_re||a.namespace_re.test(g.namespace)){a.handleObj=g;a.data=g.data;e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i);if(e!==undefined){if((a.result=e)===false){a.preventDefault();a.stopPropagation()}}}}}if(k.postDispatch){k.postDispatch.call(this,a)}return a.result},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||a.type!=="click")){for(;i!==this;i=i.parentNode||this){if(i.disabled!==true||a.type!=="click"){d=[];for(c=0;c<h;c++){f=b[c];e=f.selector+" ";if(d[e]===undefined){d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length}if(d[e]){d.push(f)}}if(d.length){g.push({elem:i,handlers:d})}}}}if(h<b.length){g.push({elem:this,handlers:b.slice(h)})}return g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){if(a.which==null){a.which=b.charCode!=null?b.charCode:b.keyCode}return a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;if(a.pageX==null&&b.clientX!=null){c=a.target.ownerDocument||l;d=c.documentElement;e=c.body;a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0);a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)}if(!a.which&&f!==undefined){a.which=f&1?1:f&2?3:f&4?2:0}return a}},fix:function(a){if(a[n.expando]){return a}var b,c,d,e=a.type,f=a,g=this.fixHooks[e];if(!g){this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}}d=g.props?this.props.concat(g.props):this.props;a=new n.Event(f);b=d.length;while(b--){c=d[b];a[c]=f[c]}if(!a.target){a.target=l}if(a.target.nodeType===3){a.target=a.target.parentNode}return g.filter?g.filter(a,f):a},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==_()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===_()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&n.nodeName(this,"input")){this.click();return false}},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){if(a.result!==undefined&&a.originalEvent){a.origin
}c=e.value;return typeof c==="string"?c.replace(bc,""):c==null?"":c}return}d=n.isFunction(a);return this.each(function(c){var e;if(this.nodeType!==1){return}if(d){e=a.call(this,c,n(this).val())}else{e=a}if(e==null){e=""}else if(typeof e==="number"){e+=""}else if(n.isArray(e)){e=n.map(e,function(a){return a==null?"":a+""})}b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()];if(!b||!("set"in b)||b.set(this,e,"value")===undefined){this.value=e}})}});n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return b!=null?b:n.trim(n.text(a))}},select:{get:function(a){var b,c,d=a.options,e=a.selectedIndex,f=a.type==="select-one"||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;for(;i<h;i++){c=d[i];if((c.selected||i===e)&&(k.optDisabled?!c.disabled:c.getAttribute("disabled")===null)&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){b=n(c).val();if(f){return b}g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--){d=e[g];if(d.selected=n.inArray(d.value,f)>=0){c=true}}if(!c){a.selectedIndex=-1}return f}}}});n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){if(n.isArray(b)){return a.checked=n.inArray(n(a).val(),b)>=0}}};if(!k.checkOn){n.valHooks[this].get=function(a){return a.getAttribute("value")===null?"on":a.value}}});n.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}});n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now();var dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")};n.parseXML=function(a){var b,c;if(!a||typeof a!=="string"){return null}try{c=new DOMParser;b=c.parseFromString(a,"text/xml")}catch(d){b=undefined}if(!b||b.getElementsByTagName("parsererror").length){n.error("Invalid XML: "+a)}return b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a");fc.href="";fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){if(typeof b!=="string"){c=b;b="*"}var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c)){while(d=f[e++]){if(d[0]==="+"){d=d.slice(1)||"*";(a[d]=a[d]||[]).unshift(c)}else{(a[d]=a[d]||[]).push(c)}}}}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;e[h]=true;n.each(a[h]||[],function(a,h){var j=h(b,c,d);if(typeof j==="string"&&!f&&!e[j]){b.dataTypes.unshift(j);g(j);return false}else if(f){return!(i=j)}});return i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b){if(b[c]!==undefined){(e[c]?a:d||(d={}))[c]=b[c]}}if(d){n.extend(true,a,d)}return a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while(i[0]==="*"){i.shift();if(d===undefined){d=a.mimeType||b.getResponseHeader("Content-Type")}}if(d){for(e in h){if(h[e]&&h[e].test(d)){i.unshift(e);break}}}if(i[0]in c){f=i[0]}else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}if(!g){g=e}}f=f||g}if(f){if(f!==i[0]){i.unshift(f)}return c[f]}}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1]){for(g in a.converters){j[g.toLowerCase()]=a.converters[g]}}f=k.shift();while(f){if(a.responseFields[f]){c[a.responseFields[f]]=b}if(!i&&d&&a.dataFilter){b=a.dataFilter(b,a.dataType)}i=f;f=k.shift();if(f){if(f==="*"){f=i}else if(i!=="*"&&i!==f){g=j[i+" "+f]||j["* "+f];if(!g){for(e in j){h=e.split(" ");if(h[1]===f){g=j[i+"
var e=a("socket.io-parser");var f=a("./manager");var g=a("debug")("socket.io-client");b.exports=c=i;var h=c.managers={};function i(a,b){if(typeof a=="object"){b=a;a=undefined}b=b||{};var c=d(a);var e=c.source;var i=c.id;var j;if(b.forceNew||b["force new connection"]||false===b.multiplex){g("ignoring socket cache for %s",e);j=f(e,b)}else{if(!h[i]){g("new io instance for %s",e);h[i]=f(e,b)}j=h[i]}return j.socket(c.path)}c.protocol=e.protocol;c.connect=i;c.Manager=a("./manager");c.Socket=a("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:9,"socket.io-parser":40}],3:[function(a,b,c){var d=a("./url");var e=a("engine.io-client");var f=a("./socket");var g=a("component-emitter");var h=a("socket.io-parser");var i=a("./on");var j=a("component-bind");var k=a("object-component");var l=a("debug")("socket.io-client:manager");b.exports=m;function m(a,b){if(!(this instanceof m))return new m(a,b);if(a&&"object"==typeof a){b=a;a=undefined}b=b||{};b.path=b.path||"/socket.io";this.nsps={};this.subs=[];this.opts=b;this.reconnection(b.reconnection!==false);this.reconnectionAttempts(b.reconnectionAttempts||Infinity);this.reconnectionDelay(b.reconnectionDelay||1e3);this.reconnectionDelayMax(b.reconnectionDelayMax||5e3);this.timeout(null==b.timeout?2e4:b.timeout);this.readyState="closed";this.uri=a;this.connected=0;this.attempts=0;this.encoding=false;this.packetBuffer=[];this.encoder=new h.Encoder;this.decoder=new h.Decoder;this.open()}m.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var a in this.nsps){this.nsps[a].emit.apply(this.nsps[a],arguments)}};g(m.prototype);m.prototype.reconnection=function(a){if(!arguments.length)return this._reconnection;this._reconnection=!!a;return this};m.prototype.reconnectionAttempts=function(a){if(!arguments.length)return this._reconnectionAttempts;this._reconnectionAttempts=a;return this};m.prototype.reconnectionDelay=function(a){if(!arguments.length)return this._reconnectionDelay;this._reconnectionDelay=a;return this};m.prototype.reconnectionDelayMax=function(a){if(!arguments.length)return this._reconnectionDelayMax;this._reconnectionDelayMax=a;return this};m.prototype.timeout=function(a){if(!arguments.length)return this._timeout;this._timeout=a;return this};m.prototype.maybeReconnectOnOpen=function(){if(!this.openReconnect&&!this.reconnecting&&this._reconnection){this.openReconnect=true;this.reconnect()}};m.prototype.open=m.prototype.connect=function(a){l("readyState %s",this.readyState);if(~this.readyState.indexOf("open"))return this;l("opening %s",this.uri);this.engine=e(this.uri,this.opts);var b=this.engine;var c=this;this.readyState="opening";var d=i(b,"open",function(){c.onopen();a&&a()});var f=i(b,"error",function(b){l("connect_error");c.cleanup();c.readyState="closed";c.emitAll("connect_error",b);if(a){var d=new Error("Connection error");d.data=b;a(d)}c.maybeReconnectOnOpen()});if(false!==this._timeout){var g=this._timeout;l("connect attempt will timeout after %d",g);var h=setTimeout(function(){l("connect attempt timed out after %d",g);d.destroy();b.close();b.emit("error","timeout");c.emitAll("connect_timeout",g)},g);this.subs.push({destroy:function(){clearTimeout(h)}})}this.subs.push(d);this.subs.push(f);return this};m.prototype.onopen=function(){l("open");this.cleanup();this.readyState="open";this.emit("open");var a=this.engine;this.subs.push(i(a,"data",j(this,"ondata")));this.subs.push(i(this.decoder,"decoded",j(this,"ondecoded")));this.subs.push(i(a,"error",j(this,"onerror")));this.subs.push(i(a,"close",j(this,"onclose")))};m.prototype.ondata=function(a){this.decoder.add(a)};m.prototype.ondecoded=function(a){this.emit("packet",a)};m.prototype.onerror=function(a){l("error",a);this.emitAll("error",a)};m.prototype.socket=function(a){var b=this.nsps[a];if(!b){b=new f(this,a);this.nsps[a]=b;var c=this;b.on("connect",function(){c.connected++})}return b};m.prototype.destroy=function(a){--this.connected||this.close()};m.prototype.packet=function(a){l("writing packet %j",a);var b=this;if(!b.encoding){b.encoding=true;this.encoder.encode(a,function(a){for(var c=0;c<a.length;c++){b.
}d.call(this,a)}g(j,d);j.prototype.name="websocket";j.prototype.supportsBinary=true;j.prototype.doOpen=function(){if(!this.check()){return}var a=this;var b=this.uri();var c=void 0;var d={agent:this.agent};this.ws=new i(b,c,d);if(this.ws.binaryType===undefined){this.supportsBinary=false}this.ws.binaryType="arraybuffer";this.addEventListeners()};j.prototype.addEventListeners=function(){var a=this;this.ws.onopen=function(){a.onOpen()};this.ws.onclose=function(){a.onClose()};this.ws.onmessage=function(b){a.onData(b.data)};this.ws.onerror=function(b){a.onError("websocket error",b)}};if("undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)){j.prototype.onData=function(a){var b=this;setTimeout(function(){d.prototype.onData.call(b,a)},0)}}j.prototype.write=function(a){var b=this;this.writable=false;for(var c=0,d=a.length;c<d;c++){e.encodePacket(a[c],this.supportsBinary,function(a){try{b.ws.send(a)}catch(c){h("websocket closed before onclose event")}})}function f(){b.writable=true;b.emit("drain")}setTimeout(f,0)};j.prototype.onClose=function(){d.prototype.onClose.call(this)};j.prototype.doClose=function(){if(typeof this.ws!=="undefined"){this.ws.close()}};j.prototype.uri=function(){var a=this.query||{};var b=this.secure?"wss":"ws";var c="";if(this.port&&("wss"==b&&this.port!=443||"ws"==b&&this.port!=80)){c=":"+this.port}if(this.timestampRequests){a[this.timestampParam]=+new Date}if(!this.supportsBinary){a.b64=1}a=f.encode(a);if(a.length){a="?"+a}return b+"://"+this.hostname+c+this.path+a};j.prototype.check=function(){return!!i&&!("__initialize"in i&&this.name===j.prototype.name)}},{"../transport":14,"component-inherit":21,debug:9,"engine.io-parser":22,parseqs:30,ws:31}],20:[function(a,b,c){var d=a("has-cors");b.exports=function(a){var b=a.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!b||d)){return new XMLHttpRequest}}catch(c){}if(!b){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}},{"has-cors":34}],21:[function(a,b,c){b.exports=function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a}},{}],22:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("./keys");var f=a("arraybuffer.slice");var g=a("base64-arraybuffer");var h=a("after");var i=a("utf8");var j=navigator.userAgent.match(/Android/i);c.protocol=2;var k=c.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var l=e(k);var m={type:"error",data:"parser error"};var n=a("blob");c.encodePacket=function(a,b,c){if(typeof b=="function"){c=b;b=false}var e=a.data===undefined?undefined:a.data.buffer||a.data;if(d.ArrayBuffer&&e instanceof ArrayBuffer){return o(a,b,c)}else if(n&&e instanceof d.Blob){return q(a,b,c)}var f=k[a.type];if(undefined!==a.data){f+=i.encode(String(a.data))}return c(""+f)};function o(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}var e=a.data;var f=new Uint8Array(e);var g=new Uint8Array(1+e.byteLength);g[0]=k[a.type];for(var h=0;h<f.length;h++){g[h+1]=f[h]}return d(g.buffer)}function p(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}var e=new FileReader;e.onload=function(){a.data=e.result;c.encodePacket(a,b,d)};return e.readAsArrayBuffer(a.data)}function q(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}if(j){return p(a,b,d)}var e=new Uint8Array(1);e[0]=k[a.type];var f=new n([e.buffer,a.data]);return d(f)}c.encodeBase64Packet=function(a,b){var e="b"+c.packets[a.type];if(n&&a.data instanceof n){var f=new FileReader;f.onload=function(){var a=f.result.split(",")[1];b(e+a)};return f.readAsDataURL(a.data)}var g;try{g=String.fromCharCode.apply(null,new Uint8Array(a.data))}catch(h){var i=new Uint8Array(a.data);var j=new Array(i.length);for(var k=0;k<i.length;k++){j[k]=i[k]}g=String.fromCharCode.apply(null,j)}e+=d.btoa(g);return b(e)};c.decodePacket=function(a,b){if(typeof a=="string"||a===undefined){if(a.charAt(0)=="b"){return c.decodeBase64Packet(a.substr(1),b)}a=i.decode(a);var d=a.charAt(0);if(Number(d)!=d||!l[d]){return m}if(a.length>1){return{type:l[d],data:a.substring(1)}}else{return{type:l[d]}}}var e=new Uint8Array(a);va
if(c>-1){b.fragment=a.substring(c+1)||null;a=a.substring(0,c)}c=a.indexOf("?");if(c>-1){b.query=a.substring(c+1)||null;a=a.substring(0,c)}if(a.substring(0,2)==="//"){b.protocol=null;a=a.substring(2);a=f.parseAuthority(a,b)}else{c=a.indexOf(":");if(c>-1){b.protocol=a.substring(0,c)||null;if(b.protocol&&!b.protocol.match(f.protocol_expression)){b.protocol=undefined}else if(b.protocol==="file"){a=a.substring(c+3)}else if(a.substring(c+1,c+3)==="//"){a=a.substring(c+3);a=f.parseAuthority(a,b)}else{a=a.substring(c+1);b.urn=true}}}b.path=a;return b};f.parseHost=function(a,b){var c=a.indexOf("/");var d;var e;if(c===-1){c=a.length}if(a.charAt(0)==="["){d=a.indexOf("]");b.hostname=a.substring(1,d)||null;b.port=a.substring(d+2,c)||null;if(b.port==="/"){b.port=null}}else if(a.indexOf(":")!==a.lastIndexOf(":")){b.hostname=a.substring(0,c)||null;b.port=null}else{e=a.substring(0,c).split(":");b.hostname=e[0]||null;b.port=e[1]||null}if(b.hostname&&a.substring(c).charAt(0)!=="/"){c++;a="/"+a}return a.substring(c)||"/"};f.parseAuthority=function(a,b){a=f.parseUserinfo(a,b);return f.parseHost(a,b)};f.parseUserinfo=function(a,b){var c=a.indexOf("/");var d=c>-1?a.lastIndexOf("@",c):a.indexOf("@");var e;if(d>-1&&(c===-1||d<c)){e=a.substring(0,d).split(":");b.username=e[0]?f.decode(e[0]):null;e.shift();b.password=e[0]?f.decode(e.join(":")):null;a=a.substring(d+1)}else{b.username=null;b.password=null}return a};f.parseQuery=function(a,b){if(!a){return{}}a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a){return{}}var c={};var d=a.split("&");var e=d.length;var g,h,i;for(var j=0;j<e;j++){g=d[j].split("=");h=f.decodeQuery(g.shift(),b);i=g.length?f.decodeQuery(g.join("="),b):null;if(c[h]){if(typeof c[h]==="string"){c[h]=[c[h]]}c[h].push(i)}else{c[h]=i}}return c};f.build=function(a){var b="";if(a.protocol){b+=a.protocol+":"}if(!a.urn&&(b||a.hostname)){b+="//"}b+=f.buildAuthority(a)||"";if(typeof a.path==="string"){if(a.path.charAt(0)!=="/"&&typeof a.hostname==="string"){b+="/"}b+=a.path}if(typeof a.query==="string"&&a.query){b+="?"+a.query}if(typeof a.fragment==="string"&&a.fragment){b+="#"+a.fragment}return b};f.buildHost=function(a){var b="";if(!a.hostname){return""}else if(f.ip6_expression.test(a.hostname)){b+="["+a.hostname+"]"}else{b+=a.hostname}if(a.port){b+=":"+a.port}return b};f.buildAuthority=function(a){return f.buildUserinfo(a)+f.buildHost(a)};f.buildUserinfo=function(a){var b="";if(a.username){b+=f.encode(a.username);if(a.password){b+=":"+f.encode(a.password)}b+="@"}return b};f.buildQuery=function(a,b,c){var d="";var e,g,i,j;for(g in a){if(h.call(a,g)&&g){if(k(a[g])){e={};for(i=0,j=a[g].length;i<j;i++){if(a[g][i]!==undefined&&e[a[g][i]+""]===undefined){d+="&"+f.buildQueryParameter(g,a[g][i],c);if(b!==true){e[a[g][i]+""]=true}}}}else if(a[g]!==undefined){d+="&"+f.buildQueryParameter(g,a[g],c)}}}return d.substring(1)};f.buildQueryParameter=function(a,b,c){return f.encodeQuery(a,c)+(b!==null?"="+f.encodeQuery(b,c):"")};f.addQuery=function(a,b,c){if(typeof b==="object"){for(var d in b){if(h.call(b,d)){f.addQuery(a,d,b[d])}}}else if(typeof b==="string"){if(a[b]===undefined){a[b]=c;return}else if(typeof a[b]==="string"){a[b]=[a[b]]}if(!k(c)){c=[c]}a[b]=a[b].concat(c)}else{throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")}};f.removeQuery=function(a,b,c){var d,e,g;if(k(b)){for(d=0,e=b.length;d<e;d++){a[b[d]]=undefined}}else if(typeof b==="object"){for(g in b){if(h.call(b,g)){f.removeQuery(a,g,b[g])}}}else if(typeof b==="string"){if(c!==undefined){if(a[b]===c){a[b]=undefined}else if(k(a[b])){a[b]=l(a[b],c)}}else{a[b]=undefined}}else{throw new TypeError("URI.addQuery() accepts an object, string as the first parameter")}};f.hasQuery=function(a,b,c,d){if(typeof b==="object"){for(var e in b){if(h.call(b,e)){if(!f.hasQuery(a,e,b[e])){return false}}}return true}else if(typeof b!=="string"){throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter")}switch(j(c)){case"Undefined":return b in a;case"Boolean":var g=Boolean(k(a[b])?a[b].length:a[b]);return c===g;case"Function":return!!c(a[b],