Shuo/client/js/libs.min.js

11 lines
317 KiB
JavaScript
Raw Normal View History

(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,p,q;o={};o.ff=typeof InstallTrigger!="undefined";o.chrome=!!window.chrome;o.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0;o.ie=false;o.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0;o.supported=o.chrome||o.ff||o.opera;var r=[];m=function(){};j=n=false;var s=function(){c=D(b,a);c.bgColor=C(c.bgColor);c.textColor=C(c.textColor);c.position=c.position.toLowerCase();c.animation=F.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<F.types[""+c.animation].length;l++){var m=F.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)}}F.types[""+c.animation][l]=m}}c.type=u[""+c.type]?c.type:b.type;try{d=B.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");t.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");t.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var t={};t.ready=function(){j=true;t.reset();m()};t.reset=function(){if(!j){return}r=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);B.setIcon(g);window.clearTimeout(p);window.clearTimeout(q)};t.start=function(){if(!j||l){return}var a=function(){k=r[0];l=false;if(r.length>0){r.shift();t.start()}else{}};if(r.length>0){l=true;var b=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(a){if(a in r[0].options){c[a]=r[0].options[a]}});F.run(r[0].options,function(){a()},false)};if(k){F.run(k.options,function(){b()},true)}else{b()}}};var u={};var v=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};u.circle=function(a){a=v(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()};u.rectangle=function(a){a=v(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?.9:1))+"px "+c.fontFamily;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.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()};var w=function(a,b){b=(typeof b==="string"?{animation:b
2015-03-29 20:52:15 +00:00
};return e};fa.matches=function(a,b){return fa(a,null,null,b)};fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n){m(a)}b=b.replace(U,"='$1']");if(c.matchesSelector&&p&&(!r||!r.test(b))&&(!q||!q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&a.document.nodeType!==11){return d}}catch(e){}}return fa(b,n,null,[a]).length>0};fa.contains=function(a,b){if((a.ownerDocument||a)!==n){m(a)}return t(a,b)};fa.attr=function(a,b){if((a.ownerDocument||a)!==n){m(a)}var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):undefined;return f!==undefined?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null};fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};fa.uniqueSort=function(a){var b,d=[],e=0,f=0;l=!c.detectDuplicates;k=!c.sortStable&&a.slice(0);a.sort(B);if(l){while(b=a[f++]){if(b===a[f]){e=d.push(f)}}while(e--){a.splice(d[e],1)}}k=null;return a};e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(!f){while(b=a[d++]){c+=e(b)}}else if(f===1||f===9||f===11){if(typeof a.textContent==="string"){return a.textContent}else{for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}}else if(f===3||f===4){return a.nodeValue}return c};d=fa.selectors={cacheLength:50,createPseudo:ha,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(ca,da);a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da);if(a[2]==="~="){a[3]=" "+a[3]+" "}return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){if(!a[3]){fa.error(a[0])}a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3]==="odd")}else if(a[3]){fa.error(a[0])}return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(X["CHILD"].test(a[0])){return null}if(a[3]){a[2]=a[4]||a[5]||""}else if(c&&V.test(c)&&(b=g(c,true))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice(0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return a==="*"?function(){return true}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test(typeof a.className==="string"&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);if(e==null){return b==="!="}if(!b){return true}e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":false}},CHILD:function(a,b,c,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",h=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:l.nodeType===1){return false}}o=p=a==="only"&&!o&&"nextSibling"}return true}o=[g?q.firstChild:q.lastChild];if(g&&s){k=q[u]||(q[u]={});j=k[a]||[];n=j[0]===w&&j[1];m=j[0]===w&&j[2];l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(l.nodeType===1&&++m&&l===b){k[a]=[w,n,m];break}}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:l.nodeType===1)&&++m){if(s){(l[u]||(l[u]={}))[a]=[w,m]}if(l===b){break}}}}m-=e;return m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);if(e[u]){return e(b)}if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return
}L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;if(!e){d.removeEventListener(a,c,true);L.remove(d,b)}else{L.access(d,b,e)}}}})}n.fn.extend({on:function(a,b,c,d,e){var f,g;if(typeof a==="object"){if(typeof b!=="string"){c=c||b;b=undefined}for(g in a){this.on(g,b,c,a[g],e)}return this}if(c==null&&d==null){d=b;c=b=undefined}else if(d==null){if(typeof b==="string"){d=c;c=undefined}else{d=c;c=b;b=undefined}}if(d===false){d=$}else if(!d){return this}if(e===1){f=d;d=function(a){n().off(a);return f.apply(this,arguments)};d.guid=f.guid||(f.guid=n.guid++)}return this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj){d=a.handleObj;n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler);return this}if(typeof a==="object"){for(e in a){this.off(e,b,a[e])}return this}if(b===false||typeof b==="function"){c=b;b=undefined}if(c===false){c=$}return this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c){return n.event.trigger(a,b,c,true)}}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option;ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead;ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(b.nodeType!==11?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){a.type=(a.getAttribute("type")!==null)+"/"+a.type;return a}function la(a){var b=ga.exec(a.type);if(b){a.type=b[1]}else{a.removeAttribute("type")}return a}function ma(a,b){var c=0,d=a.length;for(;c<d;c++){L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}}function na(a,b){var c,d,e,f,g,h,i,j;if(b.nodeType!==1){return}if(L.hasData(a)){f=L.access(a);g=L.set(b,f);j=f.events;if(j){delete g.handle;g.events={};for(e in j){for(c=0,d=j[e].length;c<d;c++){n.event.add(b,e,j[e][c])}}}}if(M.hasData(a)){h=M.access(a);i=n.extend({},h);M.set(b,i)}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return b===undefined||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();if(c==="input"&&T.test(a.type)){b.checked=a.checked}else if(c==="input"||c==="textarea"){b.defaultValue=a.defaultValue}}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(true),i=n.contains(a.ownerDocument,a);if(!k.noCloneChecked&&(a.nodeType===1||a.nodeType===11)&&!n.isXMLDoc(a)){g=oa(h);f=oa(a);for(d=0,e=f.length;d<e;d++){pa(f[d],g[d])}}if(b){if(c){f=f||oa(a);g=g||oa(h);for(d=0,e=f.length;d<e;d++){na(f[d],g[d])}}else{na(a,h)}}g=oa(h,"script");if(g.length>0){ma(g,!i&&oa(a,"script"))}return h},buildFragment:function(a,b,c,d){var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;for(;m<o;m++){e=a[m];if(e||e===0){if(n.type(e)==="object"){n.merge(l,e.nodeType?[e]:e)}else if(!ca.test(e)){l.push(b.createTextNode(e))}else{f=f||k.appendChild(b.createElement("div"));g=(ba.exec(e)||["",""])[1].toLowerCase();h=ia[g]||ia._default;f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2];j=h[0];while(j--){f=f.lastChild}n.merge(l,f.childNodes);f=k.firstChild;f.textContent=""}}}k.textContent="";m=0;while(e=l[m++]){if(d&&n.inArray(e,d)!==-1){continue}i=n.contains(e.ownerDocument,e);f=oa(k.appendChild(e),"script");if(i){ma(f)}if(c){j=0;while(e=f[j++]){if(fa.test(e.type||"")){c.push(e)}}}}return k},cleanData:function(a){var b,c,d,e,f=n.event.s
v.success=v.done;v.error=v.fail;k.url=((a||k.url||fb)+"").replace(gb,"").replace(lb,eb[1]+"//");k.type=b.method||b.type||k.method||k.type;k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""];if(k.crossDomain==null){h=mb.exec(k.url.toLowerCase());k.crossDomain=!!(h&&(h[1]!==eb[1]||h[2]!==eb[2]||(h[3]||(h[1]==="http:"?"80":"443"))!==(eb[3]||(eb[1]==="http:"?"80":"443"))))}if(k.data&&k.processData&&typeof k.data!=="string"){k.data=n.param(k.data,k.traditional)}sb(nb,k,b,v);if(t===2){return v}i=k.global;if(i&&n.active++===0){n.event.trigger("ajaxStart")}k.type=k.type.toUpperCase();k.hasContent=!kb.test(k.type);d=k.url;if(!k.hasContent){if(k.data){d=k.url+=(db.test(d)?"&":"?")+k.data;delete k.data}if(k.cache===false){k.url=hb.test(d)?d.replace(hb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++}}if(k.ifModified){if(n.lastModified[d]){v.setRequestHeader("If-Modified-Since",n.lastModified[d])}if(n.etag[d]){v.setRequestHeader("If-None-Match",n.etag[d])}}if(k.data&&k.hasContent&&k.contentType!==false||b.contentType){v.setRequestHeader("Content-Type",k.contentType)}v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+(k.dataTypes[0]!=="*"?", "+pb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers){v.setRequestHeader(j,k.headers[j])}if(k.beforeSend&&(k.beforeSend.call(l,v,k)===false||t===2)){return v.abort()}u="abort";for(j in{success:1,error:1,complete:1}){v[j](k[j])}c=sb(ob,k,b,v);if(!c){x(-1,"No Transport")}else{v.readyState=1;if(i){m.trigger("ajaxSend",[v,k])}if(k.async&&k.timeout>0){g=setTimeout(function(){v.abort("timeout")},k.timeout)}try{t=1;c.send(r,x)}catch(w){if(t<2){x(-1,w)}else{throw w}}}function x(a,b,f,h){var j,r,s,u,w,x=b;if(t===2){return}t=2;if(g){clearTimeout(g)}c=undefined;e=h||"";v.readyState=a>0?4:0;j=a>=200&&a<300||a===304;if(f){u=ub(k,v,f)}u=vb(k,u,v,j);if(j){if(k.ifModified){w=v.getResponseHeader("Last-Modified");if(w){n.lastModified[d]=w}w=v.getResponseHeader("etag");if(w){n.etag[d]=w}}if(a===204||k.type==="HEAD"){x="nocontent"}else if(a===304){x="notmodified"}else{x=u.state;r=u.data;s=u.error;j=!s}}else{s=x;if(a||!x){x="error";if(a<0){a=0}}}v.status=a;v.statusText=(b||x)+"";if(j){o.resolveWith(l,[r,x,v])}else{o.rejectWith(l,[v,x,s])}v.statusCode(q);q=undefined;if(i){m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s])}p.fireWith(l,[v,x]);if(i){m.trigger("ajaxComplete",[v,k]);if(!--n.active){n.event.trigger("ajaxStop")}}}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,undefined,b,"script")}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:false,global:false,"throws":true})};n.fn.extend({wrapAll:function(a){var b;if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){b=n(a,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var a=this;while(a.firstElementChild){a=a.firstElementChild}return a}).append(this)}return this},wrapInner:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapInner(a.call(this,b))})}return this.each(function(){var b=n(this),c=b.contents();if(c.length){c.wrapAll(a)}else{b.append(a)}})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){if(!n.nodeName(this,"body")){n(this).replaceWith(this.childNodes)}}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wb=/%20/g,xb=/\[\]$/,yb=/\r?\n/g,zb=/^(?:submit|button|image|reset|file)$/i,Ab=/^(?:input|select|textarea|keygen)/i;function Bb(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e
this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{};c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();c.target=this.element[0];f=c.originalEvent;if(f){for(e in f){if(!(e in c)){c[e]=f[e]}}}this.element.trigger(c,d);return!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===false||c.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){if(typeof e==="string"){e={effect:e}}var g,h=!e?b:e===true||typeof e==="number"?c:e.effect||c;e=e||{};if(typeof e==="number"){e={duration:e}}g=!a.isEmptyObject(e);e.complete=f;if(e.delay){d.delay(e.delay)}if(g&&a.effects&&a.effects.effect[h]){d[b](e)}else if(h!==b&&d[h]){d[h](e.duration,e.easing,f)}else{d.queue(function(c){a(this)[b]();if(f){f.call(d[0])}c()})}}});var f=a.widget;var g=false;a(document).mouseup(function(){g=false});var h=a.widget("ui.mouse",{version:"1.11.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(true===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(b){if(g){return}this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var c=this,d=b.which===1,e=typeof this.options.cancel==="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:false;if(!d||e||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}if(true===a.data(b.target,this.widgetName+".preventClickEvent")){a.removeData(b.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();g=true;return true},_mouseMove:function(b){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button){return this._mouseUp(b)}else if(!b.which){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false;this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)}return!this._mouseStarted},_mouseUp:function(b){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(b.target===this._mouseDownEvent.target){a.data(b.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(b)}g=false;return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});a.widget("ui.draggable",a.ui.mouse,{version:"1.11.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,op
a.top=null}else if(!a.width&&!a.height&&!a.top&&a.left){a.left=null}return a},_getPaddingPlusBorderDimensions:function(a){var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];for(;b<4;b++){c[b]=parseInt(d[b],10)||0;c[b]+=parseInt(e[b],10)||0}return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var a,b=0,c=this.helper||this.element;for(;b<this._proportionallyResizeElements.length;b++){a=this._proportionallyResizeElements[b];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(a)}a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a("<div style='overflow:hidden;'></div>");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);b!=="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};if(e&&e.length){a(e[0]).css({width:d.width,height:d.height})}c._updateCache(d);c._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;if(!m){return}i.containerElement=a(m);if(/document/.test(l)||l===document){i.containerOffset={left:0,top:0};i.containerPosition={left:0,top:0};i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{b=a(m);c=[];a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))});i.containerOffset=b.offset();i.containerPosition=b.position();i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]};d=i.containerOffset;e=i.containerSize.height;f=i.containerSize.wi
d.push(function(a){this._trigger("update",a,this._uiHash())})}if(this!==this.currentContainer){if(!b){d.push(function(a){this._trigger("remove",a,this._uiHash())});d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer));d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer))}}function e(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}for(c=this.containers.length-1;c>=0;c--){if(!b){d.push(e("deactivate",this,this.containers[c]))}if(this.containers[c].containerCache.over){d.push(e("out",this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(c=0;c<d.length;c++){d[c].call(this,a)}this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return false}if(!b){this._trigger("beforeStop",a,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!==this.currentItem[0]){this.helper.remove()}this.helper=null;if(!b){for(c=0;c<d.length;c++){d[c].call(this,a)}this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})});(function(a,b,c){var d={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},e={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},f={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},g={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h,i={},j={},k={},l,m=false,n=false,o=false;for(var p=1;p<20;++p){d[111+p]="f"+p}for(p=0;p<=9;++p){d[p+96]=p}function q(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return}a.attachEvent("on"+b,c)}function r(a){if(a.type=="keypress"){var b=String.fromCharCode(a.which);if(!a.shiftKey){b=b.toLowerCase()}return b}if(d[a.which]){return d[a.which]}if(e[a.which]){return e[a.which]}return String.fromCharCode(a.which).toLowerCase()}function s(a,b){return a.sort().join(",")===b.sort().join(",")}function t(a){a=a||{};var b=false,c;for(c in k){if(a[c]){b=true;continue}k[c]=0}if(!b){o=false}}function u(a,b,c,d,e,f){var g,h,j=[],l=c.type;if(!i[a]){return[]}if(l=="keyup"&&B(a)){b=[a]}for(g=0;g<i[a].length;++g){h=i[a][g];if(!d&&h.seq&&k[h.seq]!=h.level){continue}if(l!=h.action){continue}if(l=="keypress"&&!c.metaKey&&!c.ctrlKey||s(b,h.modifiers)){var m=!d&&h.combo==e;var n=d&&h.seq==d&&h.level==f;if(m||n){i[a].splice(g,1)}j.push(h)}}return j}function v(a){var b=[];if(a.shiftKey){b.push("shift")}if(a.altKey){b.push("alt")}if(a.ctrlKey){b.push("ctrl")}if(a.metaKey){b.push("meta")}return b}function w(a){if(a.preventDefault){a.preventDefault();return}a.returnValue=false}function x(a){if(a.stopPropagation){a.stopPropagation();return}a.cancelBubble=true}function y(a,b,c,d){if(K.stopCallback(b,b.target||b.srcElement,c,d)){return}if(a(b,c)===false){w(b);x(b)}}function z(a,b,c){var d=u(a,b,c),e,f={},g=0,h=false;for(e=0;e<d.length;++e){if(d[e].seq){g=Math.max(g,d[e].level)}}for(e=0;e<d.length;++e){if(d[e].seq){if(d[e].level!=g){continue}h=true;f[d[e].seq]=1;y(d[e].callback,c,d[e].combo,d[e].s
b.updateOffset=function(){};b.relativeTimeThreshold=function(b,c){if(W[b]===a){return false}W[b]=c;return true};b.lang=function(a,c){var d;if(!a){return b.fn._lang._abbr}if(c){Ba(za(a),c)}else if(c===null){Ca(a);a="en"}else if(!o[a]){Da(a)}d=b.duration.fn._lang=b.fn._lang=Da(a);return d._abbr};b.langData=function(a){if(a&&a._lang&&a._lang._abbr){a=a._lang._abbr}return Da(a)};b.isMoment=function(a){return a instanceof fa||a!=null&&a.hasOwnProperty("_isAMomentObject")};b.isDuration=function(a){return a instanceof ga};for(g=$.length-1;g>=0;--g){ra($[g])}b.normalizeUnits=function(a){return pa(a)};b.invalid=function(a){var c=b.utc(NaN);if(a!=null){ha(c._pf,a)}else{c._pf.userInvalidated=true}return c};b.parseZone=function(){return b.apply(null,arguments).parseZone()};b.parseTwoDigitYear=function(a){return sa(a)+(sa(a)>68?1900:2e3)};ha(b.fn=fa.prototype,{clone:function(){return b(this)},valueOf:function(){return+this._d+(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=b(this).utc();if(0<a.year()&&a.year()<=9999){return Ga(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}else{return Ga(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return ya(this)},isDSTShifted:function(){if(this._a){return this.isValid()&&oa(this._a,(this._isUTC?b.utc(this._a):b(this._a)).toArray())>0}return false},parsingFlags:function(){return ha({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){this.zone(0);this._isUTC=false;return this},format:function(a){var c=Ga(this,a||b.defaultFormat);return this.lang().postformat(c)},add:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}la(this,d,1);return this},subtract:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}la(this,d,-1);return this},diff:function(a,c,d){var e=Aa(a,this),f=(this.zone()-e.zone())*6e4,g,h;c=pa(c);if(c==="year"||c==="month"){g=(this.daysInMonth()+e.daysInMonth())*432e5;h=(this.year()-e.year())*12+(this.month()-e.month());h+=(this-b(this).startOf("month")-(e-b(e).startOf("month")))/g;h-=(this.zone()-b(this).startOf("month").zone()-(e.zone()-b(e).startOf("month").zone()))*6e4/g;if(c==="year"){h=h/12}}else{g=this-e;h=c==="second"?g/1e3:c==="minute"?g/6e4:c==="hour"?g/36e5:c==="day"?(g-f)/864e5:c==="week"?(g-f)/6048e5:g}return d?h:ja(h)},from:function(a,c){return b.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!c)},fromNow:function(a){return this.from(b(),a)},calendar:function(a){var c=a||b(),d=Aa(c,this).startOf("day"),e=this.diff(d,"days",true),f=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(f,this))},isLeapYear:function(){return wa(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(a!=null){a=Ya(a,this.lang());return this.add({d:a-b})}else{return b}},month:gb("Month",true),startOf:function(a){a=pa(a);switch(a){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}if(a==="week"){this.weekday(0)}else if(a==="isoWeek"){this.isoWeekday(1)}if(a==="quarter"){this.month(Math.floor(this.month()/3)*3)}return this},endOf:function(a){a=pa(a);return this.startOf(a).add(a==="isoWeek"?"week":a,1).subtract("ms",1)},isAfter:function(a,c){c=typeof c!=="undefined"?c:"millisecond";return+t
this.emit("error",b);break;case"message":this.emit("data",a.data);this.emit("message",a.data);break}}else{g('packet received with socket readyState "%s"',this.readyState)}};n.prototype.onHandshake=function(a){this.emit("handshake",a);this.id=a.sid;this.transport.query.sid=a.sid;this.upgrades=this.filterUpgrades(a.upgrades);this.pingInterval=a.pingInterval;this.pingTimeout=a.pingTimeout;this.onOpen();if("closed"==this.readyState)return;this.setPing();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)};n.prototype.onHeartbeat=function(a){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){if("closed"==b.readyState)return;b.onClose("ping timeout")},a||b.pingInterval+b.pingTimeout)};n.prototype.setPing=function(){var a=this;clearTimeout(a.pingIntervalTimer);a.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",a.pingTimeout);a.ping();a.onHeartbeat(a.pingTimeout)},a.pingInterval)};n.prototype.ping=function(){this.sendPacket("ping")};n.prototype.onDrain=function(){for(var a=0;a<this.prevBufferLen;a++){if(this.callbackBuffer[a]){this.callbackBuffer[a]()}}this.writeBuffer.splice(0,this.prevBufferLen);this.callbackBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;if(this.writeBuffer.length==0){this.emit("drain")}else{this.flush()}};n.prototype.flush=function(){if("closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){g("flushing %d packets in socket",this.writeBuffer.length);this.transport.send(this.writeBuffer);this.prevBufferLen=this.writeBuffer.length;this.emit("flush")}};n.prototype.write=n.prototype.send=function(a,b){this.sendPacket("message",a,b);return this};n.prototype.sendPacket=function(a,b,c){var d={type:a,data:b};this.emit("packetCreate",d);this.writeBuffer.push(d);this.callbackBuffer.push(c);this.flush()};n.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.onClose("forced close");g("socket closing - telling transport to close");this.transport.close()}return this};n.prototype.onError=function(a){g("socket error %j",a);n.priorWebsocketSuccess=false;this.emit("error",a);this.onClose("transport error",a)};n.prototype.onClose=function(a,b){if("opening"==this.readyState||"open"==this.readyState){g('socket close with reason: "%s"',a);var c=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);setTimeout(function(){c.writeBuffer=[];c.callbackBuffer=[];c.prevBufferLen=0},0);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",a,b)}};n.prototype.filterUpgrades=function(a){var b=[];for(var c=0,d=a.length;c<d;c++){if(~h(this.transports,a[c]))b.push(a[c])}return b}},{"./transport":14,"./transports":15,"component-emitter":8,debug:9,"engine.io-parser":22,indexof:36,parsejson:29,parseqs:30,parseuri:38}],14:[function(a,b,c){var d=a("engine.io-parser");var e=a("component-emitter");b.exports=f;function f(a){this.path=a.path;this.hostname=a.hostname;this.port=a.port;this.secure=a.secure;this.query=a.query;this.timestampParam=a.timestampParam;this.timestampRequests=a.timestampRequests;this.readyState="";this.agent=a.agent||false;this.socket=a.socket}e(f.prototype);f.timestamps=0;f.prototype.onError=function(a,b){var c=new Error(a);c.type="TransportError";c.description=b;this.emit("error",c);return this};f.prototype.open=function(){if("closed"==this.readyState||""==this.readyState){this.readyState="opening";this.doOpen()}return this};f.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.doClose();this.onClose()}return this};f.prototype.send=function(a){if("open"==this.readyState){this.write(a)}else{throw new Error("Transport not open")}};f.prototype.onOpen=function(){this.readyState="open";this.writable=true;this.emit("open")};f.prototype.onData=function(a){try{var b=d.decodePacket(a,this.socket.binaryType);this.onPacket(b)}catch(c){c.data=a;this.onError("parser decode error",c)}}
if(a=="json-stringify"){var f=j.stringify,h=typeof f=="function"&&k;if(h){(d=function(){return 1}).toJSON=d;try{h=f(0)==="0"&&f(new Number)==="0"&&f(new String)=='""'&&f(c)===g&&f(g)===g&&f()===g&&f(d)==="1"&&f([d])=="[1]"&&f([g])=="[null]"&&f(null)=="null"&&f([g,c,null])=="[null,null,null]"&&f({a:[d,true,false,null,"\x00\b\n\f\r "]})==e&&f(null,d)==="1"&&f([1,2],null,1)=="[\n 1,\n 2\n]"&&f(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&f(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&f(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&f(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(i){h=false}}b=h}if(a=="json-parse"){var l=j.parse;if(typeof l=="function"){try{if(l("0")===0&&!l(false)){d=l(e);var n=d["a"].length==5&&d["a"][0]===1;if(n){try{n=!l('" "')}catch(i){}if(n){try{n=l("01")!==1}catch(i){}}if(n){try{n=l("1.")!==1}catch(i){}}}}}catch(i){n=false}}b=n}}return m[a]=!!b}if(!m("json")){var n="[object Function]";var o="[object Date]";var p="[object Number]";var q="[object String]";var r="[object Array]";var s="[object Boolean]";var t=m("bug-string-char-index");if(!k){var u=Math.floor;var v=[0,31,59,90,120,151,181,212,243,273,304,334];var w=function(a,b){return v[b]+365*(a-1970)+u((a-1969+(b=+(b>1)))/4)-u((a-1901+b)/100)+u((a-1601+b)/400)}}if(!(e={}.hasOwnProperty)){e=function(a){var b={},d;if((b.__proto__=null,b.__proto__={toString:1},b).toString!=c){e=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);this.__proto__=b;return c}}else{d=b.constructor;e=function(a){var b=(this.constructor||d).prototype;return a in this&&!(a in b&&this[a]===b[a])}}b=null;return e.call(this,a)}}var x={"boolean":1,number:1,string:1,undefined:1};var y=function(a,b){var c=typeof a[b];return c=="object"?!!a[b]:!x[c]};f=function(a,b){var d=0,g,h,i;(g=function(){this.valueOf=0}).prototype.valueOf=0;h=new g;for(i in h){if(e.call(h,i)){d++}}g=h=null;if(!d){h=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];f=function(a,b){var d=c.call(a)==n,f,g;var i=!d&&typeof a.constructor!="function"&&y(a,"hasOwnProperty")?a.hasOwnProperty:e;for(f in a){if(!(d&&f=="prototype")&&i.call(a,f)){b(f)}}for(g=h.length;f=h[--g];i.call(a,f)&&b(f));}}else if(d==2){f=function(a,b){var d={},f=c.call(a)==n,g;for(g in a){if(!(f&&g=="prototype")&&!e.call(d,g)&&(d[g]=1)&&e.call(a,g)){b(g)}}}}else{f=function(a,b){var d=c.call(a)==n,f,g;for(f in a){if(!(d&&f=="prototype")&&e.call(a,f)&&!(g=f==="constructor")){b(f)}}if(g||e.call(a,f="constructor")){b(f)}}}return f(a,b)};if(!m("json-stringify")){var z={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var A="000000";var B=function(a,b){return(A+(b||0)).slice(-a)};var C="\\u00";var D=function(a){var b='"',c=0,d=a.length,e=d>10&&t,f;if(e){f=a.split("")}for(;c<d;c++){var g=a.charCodeAt(c);switch(g){case 8:case 9:case 10:case 12:case 13:case 34:case 92:b+=z[g];break;default:if(g<32){b+=C+B(2,g.toString(16));break}b+=e?f[c]:t?a.charAt(c):a[c]}}return b+'"'};var E=function(a,b,d,h,i,j,k){var l,m,n,t,v,x,y,z,A,C,F,G,H,I,J,K;try{l=b[a]}catch(L){}if(typeof l=="object"&&l){m=c.call(l);if(m==o&&!e.call(l,"toJSON")){if(l>-1/0&&l<1/0){if(w){v=u(l/864e5);for(n=u(v/365.2425)+1970-1;w(n+1,0)<=v;n++);for(t=u((v-w(n,0))/30.42);w(n,t+1)<=v;t++);v=1+v-w(n,t);x=(l%864e5+864e5)%864e5;y=u(x/36e5)%24;z=u(x/6e4)%60;A=u(x/1e3)%60;C=x%1e3}else{n=l.getUTCFullYear();t=l.getUTCMonth();v=l.getUTCDate();y=l.getUTCHours();z=l.getUTCMinutes();A=l.getUTCSeconds();C=l.getUTCMilliseconds()}l=(n<=0||n>=1e4?(n<0?"-":"+")+B(6,n<0?-n:n):B(4,n))+"-"+B(2,t+1)+"-"+B(2,v)+"T"+B(2,y)+":"+B(2,z)+":"+B(2,A)+"."+B(3,C)+"Z"}else{l=null}}else if(typeof l.toJSON=="function"&&(m!=p&&m!=q&&m!=r||e.call(l,"toJSON"))){l=l.toJSON(a)}}if(d){l=d.call(b,a,l)}if(l===null){return"null"}m=c.call(l);if(m==s){return""+l}else if(m==p){return l>-1/0&&l<1/0?""+l:"null"}else if(m==q){return D(""+l)}if(typeof l=="object"){for(I=k.length;I--;){if(k[I]===l){throw TypeError()}}k.push(l);F=[];J=j;j+=i;if(m==r){for(H=0,I=l.length;H<I;H++){G=E(H,l,d,h,i,j,k);F.push(G===g?"null":G)}K=F.length?i?"[\
if(b){d=c.substring(1).match(/^(\.\.\/)+/)||"";if(d){d=d[0]}}while(true){e=c.indexOf("/..");if(e===-1){break}else if(e===0){c=c.substring(3);continue}g=c.substring(0,e).lastIndexOf("/");if(g===-1){g=e}c=c.substring(0,g)+c.substring(e+3)}if(b&&this.is("relative")){c=d+c.substring(1)}c=f.recodePath(c);this._parts.path=c;this.build(!a);return this};g.normalizePathname=g.normalizePath;g.normalizeQuery=function(a){if(typeof this._parts.query==="string"){if(!this._parts.query.length){this._parts.query=null}else{this.query(f.parseQuery(this._parts.query,this._parts.escapeQuerySpace))}this.build(!a)}return this};g.normalizeFragment=function(a){if(!this._parts.fragment){this._parts.fragment=null;this.build(!a)}return this};g.normalizeSearch=g.normalizeQuery;g.normalizeHash=g.normalizeFragment;g.iso8859=function(){var a=f.encode;var b=f.decode;f.encode=escape;f.decode=decodeURIComponent;this.normalize();f.encode=a;f.decode=b;return this};g.unicode=function(){var a=f.encode;var b=f.decode;f.encode=p;f.decode=unescape;this.normalize();f.encode=a;f.decode=b;return this};g.readable=function(){var b=this.clone();b.username("").password("").normalize();var c="";if(b._parts.protocol){c+=b._parts.protocol+"://"}if(b._parts.hostname){if(b.is("punycode")&&a){c+=a.toUnicode(b._parts.hostname);if(b._parts.port){c+=":"+b._parts.port}}else{c+=b.host()}}if(b._parts.hostname&&b._parts.path&&b._parts.path.charAt(0)!=="/"){c+="/"}c+=b.path(true);if(b._parts.query){var d="";for(var e=0,g=b._parts.query.split("&"),h=g.length;e<h;e++){var i=(g[e]||"").split("=");d+="&"+f.decodeQuery(i[0],this._parts.escapeQuerySpace).replace(/&/g,"%26");if(i[1]!==undefined){d+="="+f.decodeQuery(i[1],this._parts.escapeQuerySpace).replace(/&/g,"%26")}}c+="?"+d.substring(1)}c+=f.decodeQuery(b.hash(),true);return c};g.absoluteTo=function(a){var b=this.clone();var c=["protocol","username","password","hostname","port"];var d,e,g;if(this._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}if(!(a instanceof f)){a=new f(a)}if(!b._parts.protocol){b._parts.protocol=a._parts.protocol}if(this._parts.hostname){return b}for(e=0;g=c[e];e++){b._parts[g]=a._parts[g]}if(!b._parts.path){b._parts.path=a._parts.path;if(!b._parts.query){b._parts.query=a._parts.query}}else if(b._parts.path.substring(-2)===".."){b._parts.path+="/"}if(b.path().charAt(0)!=="/"){d=a.directory();b._parts.path=(d?d+"/":"")+b._parts.path;b.normalizePath()}b.build();return b};g.relativeTo=function(a){var b=this.clone().normalize();var c,d,e,g,h;if(b._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}a=new f(a).normalize();c=b._parts;d=a._parts;g=b.path();h=a.path();if(g.charAt(0)!=="/"){throw new Error("URI is already relative")}if(h.charAt(0)!=="/"){throw new Error("Cannot calculate a URI relative to another relative URI")}if(c.protocol===d.protocol){c.protocol=null}if(c.username!==d.username||c.password!==d.password){return b.build()}if(c.protocol!==null||c.username!==null||c.password!==null){return b.build()}if(c.hostname===d.hostname&&c.port===d.port){c.hostname=null;c.port=null}else{return b.build()}if(g===h){c.path="";return b.build()}e=f.commonPath(b.path(),a.path());if(!e){return b.build()}var i=d.path.substring(e.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=i+c.path.substring(e.length);return b.build()};g.equals=function(a){var b=this.clone();var c=new f(a);var d={};var e={};var g={};var i,j,l;b.normalize();c.normalize();if(b.toString()===c.toString()){return true}i=b.query();j=c.query();b.query("");c.query("");if(b.toString()!==c.toString()){return false}if(i.length!==j.length){return false}d=f.parseQuery(i,this._parts.escapeQuerySpace);e=f.parseQuery(j,this._parts.escapeQuerySpace);for(l in d){if(h.call(d,l)){if(!k(d[l])){if(d[l]!==e[l]){return false}}else if(!n(d[l],e[l])){return false}g[l]=true}}for(l in e){if(h.call(e,l)){if(!g[l]){return false}}}return true};g.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};g.escapeQuerySpace=function(a){this._parts.escapeQue