").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
diff --git a/javascripts/libs/swfobject-dynamic.js b/.themes/classic/source/javascripts/libs/swfobject-dynamic.js
similarity index 100%
rename from javascripts/libs/swfobject-dynamic.js
rename to .themes/classic/source/javascripts/libs/swfobject-dynamic.js
diff --git a/.themes/classic/source/javascripts/modernizr-2.0.js b/.themes/classic/source/javascripts/modernizr-2.0.js
new file mode 100644
index 0000000..9dca7b0
--- /dev/null
+++ b/.themes/classic/source/javascripts/modernizr-2.0.js
@@ -0,0 +1,5 @@
+/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
+ * Build: http://modernizr.com/download/#-video-mq-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
+ */
+;window.Modernizr=function(a,b,c){function A(a){j.cssText=a}function B(a,b){return A(m.join(a+";")+(b||""))}function C(a,b){return typeof a===b}function D(a,b){return!!~(""+a).indexOf(b)}function E(a,b){for(var d in a){var e=a[d];if(!D(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function F(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:C(f,"function")?f.bind(d||b):f}return!1}function G(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return C(b,"string")||C(b,"undefined")?E(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),F(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return w("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},y={}.hasOwnProperty,z;!C(y,"undefined")&&!C(y.call,"undefined")?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c};for(var H in q)z(q,H)&&(v=H.toLowerCase(),e[v]=q[H](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},A(""),i=k=null,e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=x,e.testProp=function(a){return E([a])},e.testAllProps=G,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f
')
+ var mobileNav = $('fieldset.mobile-nav').append('');
+ mobileNav.find('select').append('Navigate… ');
+ var addOption = function(i, option) {
+ mobileNav.find('select').append('» ' + $(this).text() + ' ');
+ }
+ mainNav.find('a').each(addOption);
+ $('ul.subscription a').each(addOption);
+ mobileNav.find('select').bind('change', function(event) {
+ if (event.target.value) { window.location.href = event.target.value; }
+ });
+}
+
+function addSidebarToggler() {
+ if(!$('body').hasClass('sidebar-footer')) {
+ $('#content').append('');
+ $('.toggle-sidebar').bind('click', function(e) {
+ e.preventDefault();
+ if ($('body').hasClass('collapse-sidebar')) {
+ $('body').removeClass('collapse-sidebar');
+ } else {
+ $('body').addClass('collapse-sidebar');
+ }
+ });
+ }
+ var sections = $('aside.sidebar > section');
+ if (sections.length > 1) {
+ sections.each(function(index, section){
+ if ((sections.length >= 3) && index % 3 === 0) {
+ $(section).addClass("first");
+ }
+ var count = ((index +1) % 2) ? "odd" : "even";
+ $(section).addClass(count);
+ });
+ }
+ if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); }
+}
+
+function testFeatures() {
+ var features = ['maskImage'];
+ $(features).map(function(i, feature) {
+ if (Modernizr.testAllProps(feature)) {
+ $('html').addClass(feature);
+ } else {
+ $('html').addClass('no-'+feature);
+ }
+ });
+ if ("placeholder" in document.createElement("input")) {
+ $('html').addClass('placeholder');
+ } else {
+ $('html').addClass('no-placeholder');
+ }
+}
+
+function addCodeLineNumbers() {
+ if (navigator.appName === 'Microsoft Internet Explorer') { return; }
+ $('div.gist-highlight').each(function(code) {
+ var tableStart = '',
+ lineNumbers = '',
+ tableMiddle = ' ',
+ tableEnd = '
',
+ count = $('.line', code).length;
+ for (var i=1;i<=count; i++) {
+ lineNumbers += ''+i+' \n';
+ }
+ var table = tableStart + lineNumbers + tableMiddle + ''+$('pre', code).html()+' ' + tableEnd;
+ $(code).html(table);
+ });
+}
+
+function flashVideoFallback(){
+ var flashplayerlocation = "/assets/jwplayer/player.swf",
+ flashplayerskin = "/assets/jwplayer/glow/glow.xml";
+ $('video').each(function(i, video){
+ video = $(video);
+ if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
+ video.children('source[src$=mp4]').first().map(i, function(source){
+ var src = $(source).attr('src'),
+ id = 'video_'+Math.round(1 + Math.random()*(100000)),
+ width = video.attr('width'),
+ height = parseInt(video.attr('height'), 10) + 30;
+ video.after('');
+ swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0",
+ { file : src, image : video.attr('poster'), skin : flashplayerskin } ,
+ { movie : src, wmode : "opaque", allowfullscreen : "true" }
+ );
+ });
+ video.remove();
+ }
+ });
+}
+
+function wrapFlashVideos() {
+ $('object').each(function(i, object) {
+ if( $(object).find('param[name=movie]').length ){
+ $(object).wrap('
')
+ }
+ });
+ $('iframe[src*=vimeo],iframe[src*=youtube]').wrap('
')
+}
+
+function renderDeliciousLinks(items) {
+ var output = "
";
+ $('#delicious').html(output);
+}
+
+$('document').ready(function() {
+ testFeatures();
+ wrapFlashVideos();
+ flashVideoFallback();
+ addCodeLineNumbers();
+ getNav();
+ addSidebarToggler();
+});
+
+// iOS scaling bug fix
+// Rewritten version
+// By @mathias, @cheeaun and @jdalton
+// Source url: https://gist.github.com/901295
+(function(doc) {
+ var addEvent = 'addEventListener',
+ type = 'gesturestart',
+ qsa = 'querySelectorAll',
+ scales = [1, 1],
+ meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
+ function fix() {
+ meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
+ doc.removeEventListener(type, fix, true);
+ }
+ if ((meta = meta[meta.length - 1]) && addEvent in doc) {
+ fix();
+ scales = [0.25, 1.6];
+ doc[addEvent](type, fix, true);
+ }
+}(document));
+
+/*! SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
+ * Uncompressed source in javascripts/libs/swfobject-dynamic.js
+ *
+ released under the MIT License
+*/
+var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+=' ');k.outerHTML='"+c+
+" ";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b}
+function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l,
+b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),
+10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
+a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
+i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return u(b);for(var b=b.split("&"),d=0;d');
+ (function(){
+ var pinboardLinkroll = document.createElement('script');
+ pinboardLinkroll.type = 'text/javascript';
+ pinboardLinkroll.async = true;
+ pinboardLinkroll.src = url;
+ document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
+ })();
+}
+
+function pinboardNS_show_bmarks(r) {
+ var lr = new Pinboard_Linkroll();
+ lr.set_items(r);
+ lr.show_bmarks();
+}
+
+function Pinboard_Linkroll() {
+ var items;
+
+ this.set_items = function(i) {
+ this.items = i;
+ }
+ this.show_bmarks = function() {
+ var lines = [];
+ for (var i = 0; i < this.items.length; i++) {
+ var item = this.items[i];
+ var str = this.format_item(item);
+ lines.push(str);
+ }
+ document.getElementById(linkroll).innerHTML = lines.join("\n");
+ }
+ this.cook = function(v) {
+ return v.replace('<', '<').replace('>', '>>');
+ }
+
+ this.format_item = function(it) {
+ var str = "";
+ if (!it.d) { return; }
+ str += "" + this.cook(it.d) + " ";
+ if (it.n) {
+ str += "" + this.cook(it.n) + " \n";
+ }
+ if (it.t.length > 0) {
+ for (var i = 0; i < it.t.length; i++) {
+ var tag = it.t[i];
+ str += " " + this.cook(tag).replace(/^\s+|\s+$/g, '') + " ";
+ }
+ }
+ str += "
\n";
+ return str;
+ }
+}
+Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
+pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
+
diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js
new file mode 100644
index 0000000..3e2dd0d
--- /dev/null
+++ b/.themes/classic/source/javascripts/twitter.js
@@ -0,0 +1,78 @@
+// JSON-P Twitter fetcher for Octopress
+// (c) Brandon Mathis // MIT License
+
+/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
+function prettyDate(time) {
+ if (navigator.appName === 'Microsoft Internet Explorer') {
+ return "∞ "; // because IE date parsing isn't fun.
+ }
+ var say = {
+ just_now: " now",
+ minute_ago: "1m",
+ minutes_ago: "m",
+ hour_ago: "1h",
+ hours_ago: "h",
+ yesterday: "1d",
+ days_ago: "d",
+ last_week: "1w",
+ weeks_ago: "w"
+ };
+
+ var current_date = new Date(),
+ current_date_time = current_date.getTime(),
+ current_date_full = current_date_time + (1 * 60000),
+ date = new Date(time),
+ diff = ((current_date_full - date.getTime()) / 1000),
+ day_diff = Math.floor(diff / 86400);
+
+ if (isNaN(day_diff) || day_diff < 0) { return "∞ "; }
+
+ return day_diff === 0 && (
+ diff < 60 && say.just_now ||
+ diff < 120 && say.minute_ago ||
+ diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
+ diff < 7200 && say.hour_ago ||
+ diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
+ day_diff === 1 && say.yesterday ||
+ day_diff < 7 && day_diff + say.days_ago ||
+ day_diff === 7 && say.last_week ||
+ day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
+}
+
+function linkifyTweet(text, url) {
+ // Linkify urls, usernames, hashtags
+ text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2 ')
+ .replace(/(^|\W)@(\w+)/g, '$1@$2 ')
+ .replace(/(^|\W)#(\w+)/g, '$1#$2 ');
+
+ // Use twitter's api to replace t.co shortened urls with expanded ones.
+ for (var u in url) {
+ if(url[u].expanded_url != null){
+ var shortUrl = new RegExp(url[u].url, 'g');
+ text = text.replace(shortUrl, url[u].expanded_url);
+ var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
+ text = text.replace(shortUrl, ">"+url[u].display_url);
+ }
+ }
+ return text
+}
+
+function showTwitterFeed(tweets, twitter_user) {
+ var timeline = document.getElementById('tweets'),
+ content = '';
+
+ for (var t in tweets) {
+ content += ''+''+''+prettyDate(tweets[t].created_at)+' '+linkifyTweet(tweets[t].text.replace(/\n/g, ' '), tweets[t].entities.urls)+'
'+' ';
+ }
+ timeline.innerHTML = content;
+}
+
+function getTwitterFeed(user, count, replies) {
+ count = parseInt(count, 10);
+ $.ajax({
+ url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
+ , type: 'jsonp'
+ , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
+ , success: function(data) { showTwitterFeed(data.slice(0, count), user); }
+ })
+}
diff --git a/.themes/classic/source/robots.txt b/.themes/classic/source/robots.txt
new file mode 100644
index 0000000..b18d5dc
--- /dev/null
+++ b/.themes/classic/source/robots.txt
@@ -0,0 +1,7 @@
+---
+layout: nil
+---
+User-agent: *
+Disallow:
+
+Sitemap: {{ site.url }}/sitemap.xml
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b202491
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,5 @@
+language: ruby
+rvm:
+ - 2.0.0
+ - 1.9.3
+script: bundle exec rake install; bundle exec rake generate
diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
new file mode 100644
index 0000000..0da6ecb
--- /dev/null
+++ b/CHANGELOG.markdown
@@ -0,0 +1,29 @@
+# Octopress Changelog
+
+## 2.0
+
+- Now based on [mojombo/jekyll](http://github.com/mojombo/jekyll)
+- Sports a semantic HTML5 template
+- Easy theming with Compass and Sass
+- A Mobile friendly responsive (320 and up) layout
+- Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics
+- Deploy to Github pages or use Rsync
+- Built in support for POW and Rack servers
+- Beautiful [Solarized](http://ethanschoonover.com/solarized) syntax highlighting
+- Super easy setup and configuration
+
+**New Plugins, Filters, & Generators**
+
+- **Gist Tag** for easily embedding gists in your posts
+- **Pygments Cache** makes subsequent compiling much faster
+- **Include Code Tag** lets you embed external code snippets from your file system and adds a download link
+- **Pullquote Tag** Generate beautiful semantic pullquotes (no double data) based on Maykel Loomans's [technique](http://miekd.com/articles/pull-quotes-with-html5-and-css/)
+- **Blockquote Tag** makes it easy to semantically format blockquotes
+- **Category Generator** gives you archive pages for each category
+- **Sitemap.xml Generator** for search engines
+
+## 1.0
+
+- **No longer supported.**
+- Jekyll Matured, but Henrik's Jekyll fork did not.
+- Thanks for all your pull requests, I learned a lot.
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..cd8ce57
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,20 @@
+source "https://rubygems.org"
+
+group :development do
+ gem 'rake', '~> 0.9'
+ gem 'jekyll', '~> 0.12'
+ gem 'rdiscount', '~> 2.0.7'
+ gem 'pygments.rb', '~> 0.3.4'
+ gem 'RedCloth', '~> 4.2.9'
+ gem 'haml', '~> 3.1.7'
+ gem 'compass', '~> 0.12.2'
+ gem 'sass', '~> 3.2'
+ gem 'sass-globbing', '~> 1.0.0'
+ gem 'rubypants', '~> 0.2.0'
+ gem 'rb-fsevent', '~> 0.9'
+ gem 'stringex', '~> 1.4.0'
+ gem 'liquid', '~> 2.3.0'
+ gem 'directory_watcher', '1.4.1'
+end
+
+gem 'sinatra', '~> 1.4.2'
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..182c30b
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,68 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ RedCloth (4.2.9)
+ chunky_png (1.2.5)
+ classifier (1.3.3)
+ fast-stemmer (>= 1.0.0)
+ compass (0.12.2)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ directory_watcher (1.4.1)
+ fast-stemmer (1.0.1)
+ fssm (0.2.9)
+ haml (3.1.7)
+ jekyll (0.12.0)
+ classifier (~> 1.3)
+ directory_watcher (~> 1.1)
+ kramdown (~> 0.13.4)
+ liquid (~> 2.3)
+ maruku (~> 0.5)
+ pygments.rb (~> 0.3.2)
+ kramdown (0.13.8)
+ liquid (2.3.0)
+ maruku (0.6.1)
+ syntax (>= 1.0.0)
+ posix-spawn (0.3.6)
+ pygments.rb (0.3.4)
+ posix-spawn (~> 0.3.6)
+ yajl-ruby (~> 1.1.0)
+ rack (1.5.2)
+ rack-protection (1.5.0)
+ rack
+ rake (0.9.2.2)
+ rb-fsevent (0.9.1)
+ rdiscount (2.0.7.3)
+ rubypants (0.2.0)
+ sass (3.2.9)
+ sass-globbing (1.0.0)
+ sass (>= 3.1)
+ sinatra (1.4.2)
+ rack (~> 1.5, >= 1.5.2)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
+ stringex (1.4.0)
+ syntax (1.0.0)
+ tilt (1.3.7)
+ yajl-ruby (1.1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ RedCloth (~> 4.2.9)
+ compass (~> 0.12.2)
+ directory_watcher (= 1.4.1)
+ haml (~> 3.1.7)
+ jekyll (~> 0.12)
+ liquid (~> 2.3.0)
+ pygments.rb (~> 0.3.4)
+ rake (~> 0.9)
+ rb-fsevent (~> 0.9)
+ rdiscount (~> 2.0.7)
+ rubypants (~> 0.2.0)
+ sass (~> 3.2)
+ sass-globbing (~> 1.0.0)
+ sinatra (~> 1.4.2)
+ stringex (~> 1.4.0)
diff --git a/Guardfile b/Guardfile
new file mode 100644
index 0000000..188799a
--- /dev/null
+++ b/Guardfile
@@ -0,0 +1,6 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'livereload' do
+ watch(%r{public/.+\.(css|js|html)})
+end
diff --git a/README.markdown b/README.markdown
new file mode 100644
index 0000000..eea8624
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,39 @@
+## What is Octopress?
+
+Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest.
+
+1. **Octopress sports a clean responsive theme** written in semantic HTML5, focused on readability and friendliness toward mobile devices.
+2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists, jsFiddle or from your filesystem.
+3. **Third party integration is simple** with built-in support for Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics.
+4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch.
+5. **Ships with great plug-ins** some original and others from the Jekyll community — tested and improved.
+
+**Note**: Octopress requires a minimum Ruby version of `1.9.3-p0`.
+
+## Documentation
+
+Check out [Octopress.org](http://octopress.org/docs) for guides and documentation.
+
+
+## Contributing
+
+[](https://travis-ci.org/imathis/octopress)
+
+We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plugins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases.
+
+
+## License
+(The MIT License)
+
+Copyright © 2009-2013 Brandon Mathis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+#### If you want to be awesome.
+- Proudly display the 'Powered by Octopress' credit in the footer.
+- Add your site to the Wiki so we can watch the community grow.
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..6732a9b
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,413 @@
+require "rubygems"
+require "bundler/setup"
+require "stringex"
+
+## -- Rsync Deploy config -- ##
+# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
+ssh_user = "user@domain.com"
+ssh_port = "22"
+document_root = "~/website.com/"
+rsync_delete = false
+rsync_args = "" # Any extra arguments to pass to rsync
+deploy_default = "push"
+
+# This will be configured for you when you run config_deploy
+deploy_branch = "master"
+
+## -- Misc Configs -- ##
+
+public_dir = "public" # compiled site directory
+source_dir = "source" # source file directory
+blog_index_dir = 'source/blog'# directory for your blog's index page (if you put your index in source/blog/index.html, set this to 'source/blog')
+deploy_dir = "_deploy" # deploy directory (for Github pages deployment)
+stash_dir = "_stash" # directory to stash posts for speedy generation
+posts_dir = "_posts" # directory for blog files
+themes_dir = ".themes" # directory for blog files
+new_post_ext = "markdown" # default new post file extension when using the new_post task
+new_page_ext = "markdown" # default new page file extension when using the new_page task
+server_port = "4000" # port for preview server eg. localhost:4000
+
+
+desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
+task :install, :theme do |t, args|
+ if File.directory?(source_dir) || File.directory?("sass")
+ abort("rake aborted!") if ask("A theme is already installed, proceeding will overwrite existing files. Are you sure?", ['y', 'n']) == 'n'
+ end
+ # copy theme into working Jekyll directories
+ theme = args.theme || 'classic'
+ puts "## Copying "+theme+" theme into ./#{source_dir} and ./sass"
+ mkdir_p source_dir
+ cp_r "#{themes_dir}/#{theme}/source/.", source_dir
+ mkdir_p "sass"
+ cp_r "#{themes_dir}/#{theme}/sass/.", "sass"
+ mkdir_p "#{source_dir}/#{posts_dir}"
+ mkdir_p public_dir
+end
+
+#######################
+# Working with Jekyll #
+#######################
+
+desc "Generate jekyll site"
+task :generate do
+ raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
+ puts "## Generating Site with Jekyll"
+ system "compass compile --css-dir #{source_dir}/stylesheets"
+ system "jekyll"
+
+ # Adding duckjs resources
+ system "rm -Rf public/docs"
+ system "cp -r vendor/debuggify_js/docs public/docs/"
+ # system "rm -Rf public/docs/output"
+
+ # Update favicon
+ system "rm public/docs/favicon.ico public/docs/resources/images/logo.png"
+ system "cp public/favicon.ico public/docs/favicon.ico"
+ system "cp public/favicon.png public/docs/resources/images/logo.png"
+
+
+
+end
+
+desc "Watch the site and regenerate when it changes"
+task :watch do
+ raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
+ puts "Starting to watch source with Jekyll and Compass."
+ system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
+ jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
+ compassPid = Process.spawn("compass watch")
+
+ trap("INT") {
+ [jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
+ exit 0
+ }
+
+ [jekyllPid, compassPid].each { |pid| Process.wait(pid) }
+end
+
+desc "preview the site in a web browser"
+task :preview do
+ raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
+ puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
+ system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
+ jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
+ compassPid = Process.spawn("compass watch")
+ rackupPid = Process.spawn("rackup --port #{server_port}")
+
+ trap("INT") {
+ [jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
+ exit 0
+ }
+
+ [jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) }
+end
+
+# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
+desc "Begin a new post in #{source_dir}/#{posts_dir}"
+task :new_post, :title do |t, args|
+ if args.title
+ title = args.title
+ else
+ title = get_stdin("Enter a title for your post: ")
+ end
+ raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
+ mkdir_p "#{source_dir}/#{posts_dir}"
+ filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
+ if File.exist?(filename)
+ abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+ puts "Creating new post: #{filename}"
+ open(filename, 'w') do |post|
+ post.puts "---"
+ post.puts "layout: post"
+ post.puts "title: \"#{title.gsub(/&/,'&')}\""
+ post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
+ post.puts "comments: true"
+ post.puts "categories: "
+ post.puts "---"
+ end
+end
+
+# usage rake new_page[my-new-page] or rake new_page[my-new-page.html] or rake new_page (defaults to "new-page.markdown")
+desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}"
+task :new_page, :filename do |t, args|
+ raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
+ args.with_defaults(:filename => 'new-page')
+ page_dir = [source_dir]
+ if args.filename.downcase =~ /(^.+\/)?(.+)/
+ filename, dot, extension = $2.rpartition('.').reject(&:empty?) # Get filename and extension
+ title = filename
+ page_dir.concat($1.downcase.sub(/^\//, '').split('/')) unless $1.nil? # Add path to page_dir Array
+ if extension.nil?
+ page_dir << filename
+ filename = "index"
+ end
+ extension ||= new_page_ext
+ page_dir = page_dir.map! { |d| d = d.to_url }.join('/') # Sanitize path
+ filename = filename.downcase.to_url
+
+ mkdir_p page_dir
+ file = "#{page_dir}/#{filename}.#{extension}"
+ if File.exist?(file)
+ abort("rake aborted!") if ask("#{file} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+ puts "Creating new page: #{file}"
+ open(file, 'w') do |page|
+ page.puts "---"
+ page.puts "layout: page"
+ page.puts "title: \"#{title}\""
+ page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
+ page.puts "comments: true"
+ page.puts "sharing: true"
+ page.puts "footer: true"
+ page.puts "---"
+ end
+ else
+ puts "Syntax error: #{args.filename} contains unsupported characters"
+ end
+end
+
+# usage rake isolate[my-post]
+desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much more quickly."
+task :isolate, :filename do |t, args|
+ stash_dir = "#{source_dir}/#{stash_dir}"
+ FileUtils.mkdir(stash_dir) unless File.exist?(stash_dir)
+ Dir.glob("#{source_dir}/#{posts_dir}/*.*") do |post|
+ FileUtils.mv post, stash_dir unless post.include?(args.filename)
+ end
+end
+
+desc "Move all stashed posts back into the posts directory, ready for site generation."
+task :integrate do
+ FileUtils.mv Dir.glob("#{source_dir}/#{stash_dir}/*.*"), "#{source_dir}/#{posts_dir}/"
+end
+
+desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache"
+task :clean do
+ rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"]
+end
+
+desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
+task :update_style, :theme do |t, args|
+ theme = args.theme || 'classic'
+ if File.directory?("sass.old")
+ puts "removed existing sass.old directory"
+ rm_r "sass.old", :secure=>true
+ end
+ mv "sass", "sass.old"
+ puts "## Moved styles into sass.old/"
+ cp_r "#{themes_dir}/"+theme+"/sass/", "sass"
+ cp_r "sass.old/custom/.", "sass/custom"
+ puts "## Updated Sass ##"
+end
+
+desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
+task :update_source, :theme do |t, args|
+ theme = args.theme || 'classic'
+ if File.directory?("#{source_dir}.old")
+ puts "## Removed existing #{source_dir}.old directory"
+ rm_r "#{source_dir}.old", :secure=>true
+ end
+ mkdir "#{source_dir}.old"
+ cp_r "#{source_dir}/.", "#{source_dir}.old"
+ puts "## Copied #{source_dir} into #{source_dir}.old/"
+ cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true
+ cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true
+ cp "#{source_dir}.old/favicon.png", source_dir
+ mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir
+ cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html")
+ puts "## Updated #{source_dir} ##"
+end
+
+##############
+# Deploying #
+##############
+
+desc "Default deploy task"
+task :deploy do
+ # Check if preview posts exist, which should not be published
+ if File.exists?(".preview-mode")
+ puts "## Found posts in preview mode, regenerating files ..."
+ File.delete(".preview-mode")
+ Rake::Task[:generate].execute
+ end
+
+ Rake::Task[:copydot].invoke(source_dir, public_dir)
+ Rake::Task["#{deploy_default}"].execute
+end
+
+desc "Generate website and deploy"
+task :gen_deploy => [:integrate, :generate, :deploy] do
+end
+
+desc "copy dot files for deployment"
+task :copydot, :source, :dest do |t, args|
+ FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file|
+ cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file)
+ end
+end
+
+desc "Deploy website via rsync"
+task :rsync do
+ exclude = ""
+ if File.exists?('./rsync-exclude')
+ exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
+ end
+ puts "## Deploying website via Rsync"
+ ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
+end
+
+desc "deploy public directory to github pages"
+multitask :push do
+ puts "## Deploying branch to Github Pages "
+ puts "## Pulling any updates from Github Pages "
+ cd "#{deploy_dir}" do
+ system "git pull"
+ end
+ (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
+ Rake::Task[:copydot].invoke(public_dir, deploy_dir)
+ puts "\n## Copying #{public_dir} to #{deploy_dir}"
+ cp_r "#{public_dir}/.", deploy_dir
+ cd "#{deploy_dir}" do
+ system "git add -A"
+ puts "\n## Commiting: Site updated at #{Time.now.utc}"
+ message = "Site updated at #{Time.now.utc}"
+ system "git commit -m \"#{message}\""
+ puts "\n## Pushing generated #{deploy_dir} website"
+ system "git push origin #{deploy_branch}"
+ puts "\n## Github Pages deploy complete"
+ end
+end
+
+desc "Update configurations to support publishing to root or sub directory"
+task :set_root_dir, :dir do |t, args|
+ puts ">>> !! Please provide a directory, eg. rake config_dir[publishing/subdirectory]" unless args.dir
+ if args.dir
+ if args.dir == "/"
+ dir = ""
+ else
+ dir = "/" + args.dir.sub(/(\/*)(.+)/, "\\2").sub(/\/$/, '');
+ end
+ rakefile = IO.read(__FILE__)
+ rakefile.sub!(/public_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "public_dir\\1=\\2\\3public#{dir}\\3")
+ File.open(__FILE__, 'w') do |f|
+ f.write rakefile
+ end
+ compass_config = IO.read('config.rb')
+ compass_config.sub!(/http_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_path\\1=\\2\\3#{dir}/\\3")
+ compass_config.sub!(/http_images_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_images_path\\1=\\2\\3#{dir}/images\\3")
+ compass_config.sub!(/http_fonts_path(\s*)=(\s*)(["'])[\w\-\/]*["']/, "http_fonts_path\\1=\\2\\3#{dir}/fonts\\3")
+ compass_config.sub!(/css_dir(\s*)=(\s*)(["'])[\w\-\/]*["']/, "css_dir\\1=\\2\\3public#{dir}/stylesheets\\3")
+ File.open('config.rb', 'w') do |f|
+ f.write compass_config
+ end
+ jekyll_config = IO.read('_config.yml')
+ jekyll_config.sub!(/^destination:.+$/, "destination: public#{dir}")
+ jekyll_config.sub!(/^subscribe_rss:\s*\/.+$/, "subscribe_rss: #{dir}/atom.xml")
+ jekyll_config.sub!(/^root:.*$/, "root: /#{dir.sub(/^\//, '')}")
+ File.open('_config.yml', 'w') do |f|
+ f.write jekyll_config
+ end
+ rm_rf public_dir
+ mkdir_p "#{public_dir}#{dir}"
+ puts "## Site's root directory is now '/#{dir.sub(/^\//, '')}' ##"
+ end
+end
+
+desc "Set up _deploy folder and deploy branch for Github Pages deployment"
+task :setup_github_pages, :repo do |t, args|
+ if args.repo
+ repo_url = args.repo
+ else
+ puts "Enter the read/write url for your repository"
+ puts "(For example, 'git@github.com:your_username/your_username.github.io.git)"
+ puts " or 'https://github.com/your_username/your_username.github.io')"
+ repo_url = get_stdin("Repository url: ")
+ end
+ protocol = (repo_url.match(/(^git)@/).nil?) ? 'https' : 'git'
+ if protocol == 'git'
+ user = repo_url.match(/:([^\/]+)/)[1]
+ else
+ user = repo_url.match(/github\.com\/([^\/]+)/)[1]
+ end
+ branch = (repo_url.match(/\/[\w-]+\.github\.(?:io|com)/).nil?) ? 'gh-pages' : 'master'
+ project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
+ unless (`git remote -v` =~ /origin.+?octopress(?:\.git)?/).nil?
+ # If octopress is still the origin remote (from cloning) rename it to octopress
+ system "git remote rename origin octopress"
+ if branch == 'master'
+ # If this is a user/organization pages repository, add the correct origin remote
+ # and checkout the source branch for committing changes to the blog source.
+ system "git remote add origin #{repo_url}"
+ puts "Added remote #{repo_url} as origin"
+ system "git config branch.master.remote origin"
+ puts "Set origin as default remote"
+ system "git branch -m master source"
+ puts "Master branch renamed to 'source' for committing your blog source files"
+ else
+ unless !public_dir.match("#{project}").nil?
+ system "rake set_root_dir[#{project}]"
+ end
+ end
+ end
+ jekyll_config = IO.read('_config.yml')
+ jekyll_config.sub!(/^url:.*$/, "url: #{blog_url(user, project)}")
+ File.open('_config.yml', 'w') do |f|
+ f.write jekyll_config
+ end
+ rm_rf deploy_dir
+ mkdir deploy_dir
+ cd "#{deploy_dir}" do
+ system "git init"
+ system "echo 'My Octopress Page is coming soon …' > index.html"
+ system "git add ."
+ system "git commit -m \"Octopress init\""
+ system "git branch -m gh-pages" unless branch == 'master'
+ system "git remote add origin #{repo_url}"
+ rakefile = IO.read(__FILE__)
+ rakefile.sub!(/deploy_branch(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_branch\\1=\\2\\3#{branch}\\3")
+ rakefile.sub!(/deploy_default(\s*)=(\s*)(["'])[\w-]*["']/, "deploy_default\\1=\\2\\3push\\3")
+ File.open(__FILE__, 'w') do |f|
+ f.write rakefile
+ end
+ end
+ puts "\n---\n## Now you can deploy to #{repo_url} with `rake deploy` ##"
+end
+
+def ok_failed(condition)
+ if (condition)
+ puts "OK"
+ else
+ puts "FAILED"
+ end
+end
+
+def get_stdin(message)
+ print message
+ STDIN.gets.chomp
+end
+
+def ask(message, valid_options)
+ if valid_options
+ answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
+ else
+ answer = get_stdin(message)
+ end
+ answer
+end
+
+def blog_url(user, project)
+ url = if File.exists?('source/CNAME')
+ "http://#{IO.read('source/CNAME').strip}"
+ else
+ "http://#{user}.github.io"
+ end
+ url += "/#{project}" unless project == ''
+ url
+end
+
+desc "list tasks"
+task :list do
+ puts "Tasks: #{(Rake::Task.tasks - [Rake::Task[:list]]).join(', ')}"
+ puts "(type rake -T for more detail)\n\n"
+end
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..f6861b9
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1,105 @@
+# ----------------------- #
+# Main Configs #
+# ----------------------- #
+
+url: http://developers.debuggify.net
+title: DEBUGGIFY
+logo_title: debuggify
+subtitle: Debug the web
+author: Debuggify
+copywrite: Debuggify Solutions Private Limited
+simple_search: http://google.com/search
+description:
+
+# Default date format is "ordinal" (resulting in "July 22nd 2007")
+# You can customize the format as defined in
+# http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-strftime
+# Additionally, %o will give you the ordinal representation of the day
+date_format: "ordinal"
+
+# RSS / Email (optional) subscription links (change if using something like Feedburner)
+subscribe_rss: /atom.xml
+subscribe_email:
+# RSS feeds can list your email address if you like
+email:
+
+# ----------------------- #
+# Jekyll & Plugins #
+# ----------------------- #
+
+# If publishing to a subdirectory as in http://site.com/project set 'root: /project'
+root: /
+permalink: /blog/:year/:month/:day/:title/
+source: source
+destination: public
+plugins: plugins
+code_dir: downloads/code
+category_dir: blog/categories
+markdown: rdiscount
+rdiscount:
+ extensions:
+ - autolink
+ - footnotes
+ - smart
+pygments: false # default python pygments have been replaced by pygments.rb
+
+paginate: 10 # Posts per page on the blog index
+pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
+recent_posts: 5 # Posts in the sidebar Recent Posts section
+excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
+
+titlecase: true # Converts page and post titles to titlecase
+
+# list each of the sidebar modules you want to include, in the order you want them to appear.
+# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
+default_asides: [custom/asides/about.html, asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html]
+
+# Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below
+# and add an array with the asides you want to use.
+# blog_index_asides:
+# post_asides:
+# page_asides:
+
+# ----------------------- #
+# 3rd Party Settings #
+# ----------------------- #
+
+# Github repositories
+github_user: debuggify
+github_repo_count: 4
+github_show_profile_link: true
+github_skip_forks: true
+
+# Twitter
+twitter_user: d3buggify
+twitter_tweet_button: true
+
+# Google +1
+google_plus_one: true
+google_plus_one_size: medium
+
+# Google Plus Profile
+# Hidden: No visible button, just add author information to search results
+googleplus_user:
+googleplus_hidden: false
+
+# Pinboard
+pinboard_user:
+pinboard_count: 3
+
+# Delicious
+delicious_user:
+delicious_count: 3
+
+# Disqus Comments
+disqus_short_name: debuggify
+disqus_show_comment_count: true
+
+# Google Analytics
+google_analytics_tracking_id: UA-33559087-1
+
+# Facebook Like
+facebook_like: true
+
+# Contact Us
+contact_us: true
diff --git a/about/index.html b/about/index.html
deleted file mode 100644
index 41bf30f..0000000
--- a/about/index.html
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-
-
-
-
- About - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Debuggify is a simple cloud based full-stack debugging service which enhances the modern web development experience.
-
-The Mission
-
-Debugging software is hard and also time consuming process. Its involves a lot of advance technologies, techniques and tools. As the web is evolving faster than ever and so are the technologies involved in developing a website.
-
-The websites have moved from static pages to complex web applications which depends on the following
-
-
-Third party APIs like twitter, facebook, google etc
-Third party libs/gems/npm/modules both in client side and server side
-Third party Frameworks
-
-
-
-With HTML5, CSS3, & ES6 the browsers are upgrading continuously. There is big diversity in the browser vendors. Even the different versions of same vendors doesn’t have similar behavior for same api.
-
-Due to high dependency on third party and bleeding edge browser environment, makes web application development even more complex process.
-
-We are dedicated to build easy to use tools and technologies which helps developers not only build great and robust applications but also boost their productivity.
-
-Team
-
-Ankur Agarwal: Twitter | Github
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/atom.xml b/atom.xml
deleted file mode 100644
index 4a9b63c..0000000
--- a/atom.xml
+++ /dev/null
@@ -1,469 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
-
-
- 2013-07-24T04:24:00+05:30
- http://developers.debuggify.net/blog/2013/07/24/new-apis-to-add-custom-data-points
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-The Alias API
-
-Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-debuggify.alias('foo@example.com');
-
-
-Its pretty straight forward to use the above api.
-
-Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-The Metadata API
-
-To attach custom data along with every message
-
-debuggify.metadata({'login': true});
-
-
-The Attach API
-
-To attach custom data along with a single message. This api need to be called on the logger object
-
-var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-We soon be adding use cases on how to use this APIs more powerfully.
-]]>
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
-
-
- 2013-03-31T17:39:00+05:30
- http://developers.debuggify.net/blog/2013/03/31/debug-javascript-in-production
- Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-Here is the presentation
-
-
-
-
-
-
-
-
-
-I will be explaining each point in details in the future posts.
-
-I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-Happy Debugging !!
-]]>
-
-
-
-
-
- 2012-11-26T13:18:00+05:30
- http://developers.debuggify.net/blog/2012/11/26/window-dot-onerror-is-not-enough
- Scott Hanselman blogged about JavaScript the assembly language for the web . There a plenty of languages that compiles to javascript . With the addition of Dart from Google and Typescript from Microsoft a war has broke out for better.
-
-With the rise of compiled to javascript languages it hard to traceback the errors to original source. Almost all modern provides the window.onerror api to catch all uncaught exceptions on a page. This api provides very limited information (error message, filename and line number only) which is the root cause of many problems.
-
-With modern web development practices the amount of javascript code per page is growing rapidly. Also this code is minified by the minification tools(like Google Closure Compiler , UglifyJS2 etc) to reduce the code size. After minification whole code ends in one single line. Here is where most problem starts. I am listing some really annoying issues related to window.onerror below
-
-
-Missing Char No: The char no is very important for the minified code to point at the exact statement as there is only one line in minified code. Even source maps cannot be helpful in tracking back to original line.
-No Call Stack: The call stack is completely hidden from the developer so its hard to identify the functions flow. However there is a trick to extract stack in IE9 only.
-Cross Origin Errors: These types are thown when some cross origin permission is broken. They are very common on pages with facebook like and google plus widget installed. For such errors window.error message throw a single message “Script Error”. As per stackoverflow post this behavior is intentional to avoid some security risks but its at expense of useful debugging information.
-
-
-
-Most of above mentioned problems are roadblock in debugging production websites / applications. There is a need for better tools and libraries for the job.
-
-I will soon be writing a post on Best Debugging Practices For Javascript In Production Environment
-]]>
-
-
-
-
-
- 2012-08-07T12:10:00+05:30
- http://developers.debuggify.net/blog/2012/08/07/why-debuggify
- Who am I?
-
-I was born 6 years back when I bought my first computer and a internet connection. To be frank, Internet is a second home to me. For most of people out there who feel same, are continuously trying to make Internet a better place .
-
-I am also a computer science engineering grad, so I am surrounded by technology. In order to feed my engineering inquisitiveness I have explored the black, white and gray sections of the internet.
-
-Where it all started?
-
-I am a full stack web developer by profession and have authored / co-authored many 3rd party social plugins for Shareaholic Inc which runs on thousands of different blogs and websites driving 1+ billion pageviews per month. These plugins can be installed on different CMS/blogging platform like Wordpress, Drupal, Tumblr, Blogger etc. While working on these plugins I closely interact with the different elements of the modern internet ecosystem.
-
-What’s my use case of 3rd party plugin ?
-
-A 3rd party plugin has to be robust enough to work in 3rd party environments while interacting with 3rd party apis and support every major browser vendor out there
-
-Elaborating the above quote
-
-
-As plugins runs on 3rd party websites, it has to be robust so it doesn't break itself and neither the website
-It has to be fast enough to deliver good page load time
-It should not conflict with other existing plugins
-It should support major browser vendors including internet explorer
-It should also support legacy browser versions like ie6 ie7 etc.
-As plugins interact with over 200+ 3rd party apis, it’s hard to keep track when something break
-It should be easy to setup with multiple cms/blogging environments for better distribution
-
-
-
-Technical challenges faced ?
-
-
-In 3rd party environment, developers have limited or no control over things, so it’s hard to debug and reproduce bugs / issues
-If some plugin feature is not working its hard to know whether
-
-
-it’s not working for a particular website,
-or not working for a set of URLs
-or for a particular CMS/Blogging environment
-or for a particular screen resolution
-or for a particular browser vendor
-or even for a particular version of a browser vendor
-or for all cases
-
-
-Its hard to judge the impact of every release, whether it fixed the problem or introduced some new side effects
-The 3rd party API’s are continuously changing, upgrading & depreciating. Companies like Facebook, Google, Twitter are continuously bashing developers with bleeding edges of their API’s
-With HTML5, ES Harmony and CSS3, browsers are evolving faster than ever, so they are also releasing bleeding edge features and API’s
-
-
-
-Who else is facing problems?
-
-As all wise developers know
-
- Zero Bugs is a Myth
-
-I have talked to a few friends about the problems. All are encountering similar set of problems on the daily basic. A majority their development time is spend in debugging and fixing bugs. The debugging is also becoming hard due to the evolving nature of the web.
-
-What to do about it?
-
-So I finally decided to go on a quest to make Internet a better place for developers .
-
-Why Developers ?
-
-Developers are the keepers of the modern internet.
-
-The web is evolving because of the developers. There are around 1+ million developers on the planet. I can build something that make developers more productive and can save up to 1hr/day of their time, it’s going to be revolutionary. Developers can reinvest this time in open source projects, new innovations or anything that eventually make Internet a better place
-
-So that is Debuggify is all about. Contact me if you want to join me on my quest.
-]]>
-
-
-
diff --git a/blog/2012/08/07/why-debuggify/index.html b/blog/2012/08/07/why-debuggify/index.html
deleted file mode 100644
index 59d55dd..0000000
--- a/blog/2012/08/07/why-debuggify/index.html
+++ /dev/null
@@ -1,385 +0,0 @@
-
-
-
-
-
-
-
- Why Debuggify? - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Who am I?
-
-
I was born 6 years back when I bought my first computer and a internet connection. To be frank, Internet is a second home to me. For most of people out there who feel same, are continuously trying to make Internet a better place .
-
-
I am also a computer science engineering grad, so I am surrounded by technology. In order to feed my engineering inquisitiveness I have explored the black, white and gray sections of the internet.
-
-
Where it all started?
-
-
I am a full stack web developer by profession and have authored / co-authored many 3rd party social plugins for Shareaholic Inc which runs on thousands of different blogs and websites driving 1+ billion pageviews per month. These plugins can be installed on different CMS/blogging platform like Wordpress, Drupal, Tumblr, Blogger etc. While working on these plugins I closely interact with the different elements of the modern internet ecosystem.
-
-
What’s my use case of 3rd party plugin ?
-
-
A 3rd party plugin has to be robust enough to work in 3rd party environments while interacting with 3rd party apis and support every major browser vendor out there
-
-
Elaborating the above quote
-
-
-As plugins runs on 3rd party websites, it has to be robust so it doesn't break itself and neither the website
-It has to be fast enough to deliver good page load time
-It should not conflict with other existing plugins
-It should support major browser vendors including internet explorer
-It should also support legacy browser versions like ie6 ie7 etc.
-As plugins interact with over 200+ 3rd party apis, it’s hard to keep track when something break
-It should be easy to setup with multiple cms/blogging environments for better distribution
-
-
-
-
Technical challenges faced ?
-
-
-In 3rd party environment, developers have limited or no control over things, so it’s hard to debug and reproduce bugs / issues
-If some plugin feature is not working its hard to know whether
-
-
-it’s not working for a particular website,
-or not working for a set of URLs
-or for a particular CMS/Blogging environment
-or for a particular screen resolution
-or for a particular browser vendor
-or even for a particular version of a browser vendor
-or for all cases
-
-
-Its hard to judge the impact of every release, whether it fixed the problem or introduced some new side effects
-The 3rd party API’s are continuously changing, upgrading & depreciating. Companies like Facebook, Google, Twitter are continuously bashing developers with bleeding edges of their API’s
-With HTML5, ES Harmony and CSS3, browsers are evolving faster than ever, so they are also releasing bleeding edge features and API’s
-
-
-
-
Who else is facing problems?
-
-
As all wise developers know
-
-
Zero Bugs is a Myth
-
-
I have talked to a few friends about the problems. All are encountering similar set of problems on the daily basic. A majority their development time is spend in debugging and fixing bugs. The debugging is also becoming hard due to the evolving nature of the web.
-
-
What to do about it?
-
-
So I finally decided to go on a quest to make Internet a better place for developers .
-
-
Why Developers ?
-
-
Developers are the keepers of the modern internet.
-
-
The web is evolving because of the developers. There are around 1+ million developers on the planet. I can build something that make developers more productive and can save up to 1hr/day of their time, it’s going to be revolutionary. Developers can reinvest this time in open source projects, new innovations or anything that eventually make Internet a better place
-
-
So that is Debuggify is all about. Contact me if you want to join me on my quest.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2012/11/26/window-dot-onerror-is-not-enough/index.html b/blog/2012/11/26/window-dot-onerror-is-not-enough/index.html
deleted file mode 100644
index 40be137..0000000
--- a/blog/2012/11/26/window-dot-onerror-is-not-enough/index.html
+++ /dev/null
@@ -1,335 +0,0 @@
-
-
-
-
-
-
-
- Window.onerror is not enough - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Scott Hanselman blogged about JavaScript the assembly language for the web . There a plenty of languages that compiles to javascript . With the addition of Dart from Google and Typescript from Microsoft a war has broke out for better.
-
-
With the rise of compiled to javascript languages it hard to traceback the errors to original source. Almost all modern provides the window.onerror api to catch all uncaught exceptions on a page. This api provides very limited information (error message, filename and line number only) which is the root cause of many problems.
-
-
With modern web development practices the amount of javascript code per page is growing rapidly. Also this code is minified by the minification tools(like Google Closure Compiler , UglifyJS2 etc) to reduce the code size. After minification whole code ends in one single line. Here is where most problem starts. I am listing some really annoying issues related to window.onerror below
-
-
-Missing Char No: The char no is very important for the minified code to point at the exact statement as there is only one line in minified code. Even source maps cannot be helpful in tracking back to original line.
-No Call Stack: The call stack is completely hidden from the developer so its hard to identify the functions flow. However there is a trick to extract stack in IE9 only.
-Cross Origin Errors: These types are thown when some cross origin permission is broken. They are very common on pages with facebook like and google plus widget installed. For such errors window.error message throw a single message “Script Error”. As per stackoverflow post this behavior is intentional to avoid some security risks but its at expense of useful debugging information.
-
-
-
-
Most of above mentioned problems are roadblock in debugging production websites / applications. There is a need for better tools and libraries for the job.
-
-
I will soon be writing a post on Best Debugging Practices For Javascript In Production Environment
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2013/03/31/debug-javascript-in-production/index.html b/blog/2013/03/31/debug-javascript-in-production/index.html
deleted file mode 100644
index ce46df0..0000000
--- a/blog/2013/03/31/debug-javascript-in-production/index.html
+++ /dev/null
@@ -1,342 +0,0 @@
-
-
-
-
-
-
-
- Debug Javscript In Production - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-
Here is the presentation
-
-
-
-
-
-
-
-
-
-
I will be explaining each point in details in the future posts.
-
-
I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-
Happy Debugging !!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2013/06/22/error-in-javascript-comments/index.html b/blog/2013/06/22/error-in-javascript-comments/index.html
deleted file mode 100644
index a244eab..0000000
--- a/blog/2013/06/22/error-in-javascript-comments/index.html
+++ /dev/null
@@ -1,368 +0,0 @@
-
-
-
-
-
-
-
- Error in Javascript Comments - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-
Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-
I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-
<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-
To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-
Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-
Finally all I have to say is God Bless IE Developers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts/index.html b/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts/index.html
deleted file mode 100644
index f7685d6..0000000
--- a/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts/index.html
+++ /dev/null
@@ -1,431 +0,0 @@
-
-
-
-
-
-
-
- Install phpmyadmin behind nginx on ubuntu 12.04 LTS - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Setup dependencies
-
-
Setup Php, mysql & phpmyadmin:
-
-
sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-
Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-
Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-
sudo vim /etc/php5/fpm/php.ini
-
-
-
Add the following line and save
-
-
extension=mysql.so
-
-
-
Restart to use new config
-
-
sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-
Setup Nginx config:
-
-
Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-
sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-
And add the following:
-
-
server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-
To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-
cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-
Reload nginx for the new configuration to take effect:
-
-
sudo /etc/init.d/nginx reload
-
-
-
Open the link in the browser http://admin.lvh.me/phpmyadmin
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2013/07/24/new-apis-to-add-custom-data-points/index.html b/blog/2013/07/24/new-apis-to-add-custom-data-points/index.html
deleted file mode 100644
index 98db4b7..0000000
--- a/blog/2013/07/24/new-apis-to-add-custom-data-points/index.html
+++ /dev/null
@@ -1,366 +0,0 @@
-
-
-
-
-
-
-
- New API's to add custom data points - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-In the past we have received many requests related to attach some custom data along with every messages collected.
-
-
We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-
The Alias API
-
-
Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-
debuggify.alias('foo@example.com');
-
-
-
Its pretty straight forward to use the above api.
-
-
Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-
The Metadata API
-
-
To attach custom data along with every message
-
-
debuggify.metadata({'login': true});
-
-
-
The Attach API
-
-
To attach custom data along with a single message. This api need to be called on the logger object
-
-
var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-
After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-
Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-
We soon be adding use cases on how to use this APIs more powerfully.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions/index.html b/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions/index.html
deleted file mode 100644
index c47211a..0000000
--- a/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions/index.html
+++ /dev/null
@@ -1,429 +0,0 @@
-
-
-
-
-
-
-
- Tracking jquery ajax errors and exceptions - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-
Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-
The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-
Same Origin
-
-
In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-
$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-
One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-
Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-
Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-
$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-
Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-
Cross Origin
-
-
The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-
There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-
First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
-
header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-
Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-
$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-
This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-
Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/archives/index.html b/blog/archives/index.html
deleted file mode 100644
index a50c5e2..0000000
--- a/blog/archives/index.html
+++ /dev/null
@@ -1,340 +0,0 @@
-
-
-
-
-
-
-
- Blog Archive - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-Jul 24 2013
-
-
-
-
-
-
-
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-Mar 31 2013
-
-
-
-
-
-
-
-
-
-
2012
-
-
-
-
-Nov 26 2012
-
-
-
-
-
-
-
-
-
-Aug 07 2012
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/12-dot-04/atom.xml b/blog/categories/12-dot-04/atom.xml
deleted file mode 100644
index a2d8e67..0000000
--- a/blog/categories/12-dot-04/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/12-dot-04/index.html b/blog/categories/12-dot-04/index.html
deleted file mode 100644
index 56152de..0000000
--- a/blog/categories/12-dot-04/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: 12.04 - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ajax/atom.xml b/blog/categories/ajax/atom.xml
deleted file mode 100644
index d25555c..0000000
--- a/blog/categories/ajax/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/ajax/index.html b/blog/categories/ajax/index.html
deleted file mode 100644
index cbe9174..0000000
--- a/blog/categories/ajax/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: ajax - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/catch/atom.xml b/blog/categories/catch/atom.xml
deleted file mode 100644
index 8044dd7..0000000
--- a/blog/categories/catch/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/catch/index.html b/blog/categories/catch/index.html
deleted file mode 100644
index 65149d8..0000000
--- a/blog/categories/catch/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: catch - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/comments/atom.xml b/blog/categories/comments/atom.xml
deleted file mode 100644
index c3d3d31..0000000
--- a/blog/categories/comments/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/comments/index.html b/blog/categories/comments/index.html
deleted file mode 100644
index 93b5e36..0000000
--- a/blog/categories/comments/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: comments - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/cross-origin/atom.xml b/blog/categories/cross-origin/atom.xml
deleted file mode 100644
index aa96164..0000000
--- a/blog/categories/cross-origin/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/cross-origin/index.html b/blog/categories/cross-origin/index.html
deleted file mode 100644
index fff27da..0000000
--- a/blog/categories/cross-origin/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: cross-origin - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Cross-origin
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/custom-data/atom.xml b/blog/categories/custom-data/atom.xml
deleted file mode 100644
index 4f2e740..0000000
--- a/blog/categories/custom-data/atom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-24T04:24:00+05:30
- http://developers.debuggify.net/blog/2013/07/24/new-apis-to-add-custom-data-points
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-The Alias API
-
-Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-debuggify.alias('foo@example.com');
-
-
-Its pretty straight forward to use the above api.
-
-Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-The Metadata API
-
-To attach custom data along with every message
-
-debuggify.metadata({'login': true});
-
-
-The Attach API
-
-To attach custom data along with a single message. This api need to be called on the logger object
-
-var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-We soon be adding use cases on how to use this APIs more powerfully.
-]]>
-
-
-
diff --git a/blog/categories/custom-data/index.html b/blog/categories/custom-data/index.html
deleted file mode 100644
index 2374c35..0000000
--- a/blog/categories/custom-data/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: custom-data - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Custom-data
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 24 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/debug/atom.xml b/blog/categories/debug/atom.xml
deleted file mode 100644
index 4e4fa89..0000000
--- a/blog/categories/debug/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/debug/index.html b/blog/categories/debug/index.html
deleted file mode 100644
index 863e00a..0000000
--- a/blog/categories/debug/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: debug - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/debugging/atom.xml b/blog/categories/debugging/atom.xml
deleted file mode 100644
index 4c63fee..0000000
--- a/blog/categories/debugging/atom.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-24T04:24:00+05:30
- http://developers.debuggify.net/blog/2013/07/24/new-apis-to-add-custom-data-points
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-The Alias API
-
-Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-debuggify.alias('foo@example.com');
-
-
-Its pretty straight forward to use the above api.
-
-Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-The Metadata API
-
-To attach custom data along with every message
-
-debuggify.metadata({'login': true});
-
-
-The Attach API
-
-To attach custom data along with a single message. This api need to be called on the logger object
-
-var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-We soon be adding use cases on how to use this APIs more powerfully.
-]]>
-
-
-
-
-
- 2013-03-31T17:39:00+05:30
- http://developers.debuggify.net/blog/2013/03/31/debug-javascript-in-production
- Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-Here is the presentation
-
-
-
-
-
-
-
-
-
-I will be explaining each point in details in the future posts.
-
-I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-Happy Debugging !!
-]]>
-
-
-
diff --git a/blog/categories/debugging/index.html b/blog/categories/debugging/index.html
deleted file mode 100644
index a172645..0000000
--- a/blog/categories/debugging/index.html
+++ /dev/null
@@ -1,274 +0,0 @@
-
-
-
-
-
-
-
- Category: debugging - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Debugging
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 24 2013
-
-
-
-
-
-
-
-
-
-
-
-Mar 31 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/error/atom.xml b/blog/categories/error/atom.xml
deleted file mode 100644
index 833755e..0000000
--- a/blog/categories/error/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/error/index.html b/blog/categories/error/index.html
deleted file mode 100644
index 4468cac..0000000
--- a/blog/categories/error/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: error - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/errors/atom.xml b/blog/categories/errors/atom.xml
deleted file mode 100644
index 4e5139b..0000000
--- a/blog/categories/errors/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/errors/index.html b/blog/categories/errors/index.html
deleted file mode 100644
index 6cbc403..0000000
--- a/blog/categories/errors/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: errors - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/exceptions/atom.xml b/blog/categories/exceptions/atom.xml
deleted file mode 100644
index 21c386c..0000000
--- a/blog/categories/exceptions/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/exceptions/index.html b/blog/categories/exceptions/index.html
deleted file mode 100644
index d75a8a4..0000000
--- a/blog/categories/exceptions/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: exceptions - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Exceptions
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/fastcgi/atom.xml b/blog/categories/fastcgi/atom.xml
deleted file mode 100644
index 82fde02..0000000
--- a/blog/categories/fastcgi/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/fastcgi/index.html b/blog/categories/fastcgi/index.html
deleted file mode 100644
index 1755959..0000000
--- a/blog/categories/fastcgi/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: fastcgi - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ie6/atom.xml b/blog/categories/ie6/atom.xml
deleted file mode 100644
index 9a85984..0000000
--- a/blog/categories/ie6/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/ie6/index.html b/blog/categories/ie6/index.html
deleted file mode 100644
index f88de4a..0000000
--- a/blog/categories/ie6/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: IE6 - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ie7/atom.xml b/blog/categories/ie7/atom.xml
deleted file mode 100644
index e2cd8a1..0000000
--- a/blog/categories/ie7/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/ie7/index.html b/blog/categories/ie7/index.html
deleted file mode 100644
index 52dc485..0000000
--- a/blog/categories/ie7/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: IE7 - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ie8/atom.xml b/blog/categories/ie8/atom.xml
deleted file mode 100644
index 7886c9d..0000000
--- a/blog/categories/ie8/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/ie8/index.html b/blog/categories/ie8/index.html
deleted file mode 100644
index 6ea5e53..0000000
--- a/blog/categories/ie8/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: IE8 - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ie9/atom.xml b/blog/categories/ie9/atom.xml
deleted file mode 100644
index 9895a7a..0000000
--- a/blog/categories/ie9/atom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
diff --git a/blog/categories/ie9/index.html b/blog/categories/ie9/index.html
deleted file mode 100644
index e6e1356..0000000
--- a/blog/categories/ie9/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: IE9 - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/javascript/atom.xml b/blog/categories/javascript/atom.xml
deleted file mode 100644
index 74cab60..0000000
--- a/blog/categories/javascript/atom.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-24T04:24:00+05:30
- http://developers.debuggify.net/blog/2013/07/24/new-apis-to-add-custom-data-points
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-The Alias API
-
-Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-debuggify.alias('foo@example.com');
-
-
-Its pretty straight forward to use the above api.
-
-Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-The Metadata API
-
-To attach custom data along with every message
-
-debuggify.metadata({'login': true});
-
-
-The Attach API
-
-To attach custom data along with a single message. This api need to be called on the logger object
-
-var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-We soon be adding use cases on how to use this APIs more powerfully.
-]]>
-
-
-
-
-
- 2013-06-22T08:12:00+05:30
- http://developers.debuggify.net/blog/2013/06/22/error-in-javascript-comments
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-Finally all I have to say is God Bless IE Developers
-]]>
-
-
-
-
-
- 2013-03-31T17:39:00+05:30
- http://developers.debuggify.net/blog/2013/03/31/debug-javascript-in-production
- Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-Here is the presentation
-
-
-
-
-
-
-
-
-
-I will be explaining each point in details in the future posts.
-
-I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-Happy Debugging !!
-]]>
-
-
-
diff --git a/blog/categories/javascript/index.html b/blog/categories/javascript/index.html
deleted file mode 100644
index 5f5c37b..0000000
--- a/blog/categories/javascript/index.html
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-
-
-
-
- Category: javascript - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Javascript
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 24 2013
-
-
-
-
-
-
-
-
-
-
-
-Jun 22 2013
-
-
-
-
-
-
-
-
-
-
-
-Mar 31 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/lts/atom.xml b/blog/categories/lts/atom.xml
deleted file mode 100644
index 799459c..0000000
--- a/blog/categories/lts/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/lts/index.html b/blog/categories/lts/index.html
deleted file mode 100644
index df39281..0000000
--- a/blog/categories/lts/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: lts - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/metadata/atom.xml b/blog/categories/metadata/atom.xml
deleted file mode 100644
index 8216654..0000000
--- a/blog/categories/metadata/atom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-24T04:24:00+05:30
- http://developers.debuggify.net/blog/2013/07/24/new-apis-to-add-custom-data-points
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-The Alias API
-
-Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-debuggify.alias('foo@example.com');
-
-
-Its pretty straight forward to use the above api.
-
-Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-The Metadata API
-
-To attach custom data along with every message
-
-debuggify.metadata({'login': true});
-
-
-The Attach API
-
-To attach custom data along with a single message. This api need to be called on the logger object
-
-var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-We soon be adding use cases on how to use this APIs more powerfully.
-]]>
-
-
-
diff --git a/blog/categories/metadata/index.html b/blog/categories/metadata/index.html
deleted file mode 100644
index 4f0267b..0000000
--- a/blog/categories/metadata/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: metadata - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 24 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/mysql/atom.xml b/blog/categories/mysql/atom.xml
deleted file mode 100644
index 82e2f81..0000000
--- a/blog/categories/mysql/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/mysql/index.html b/blog/categories/mysql/index.html
deleted file mode 100644
index 0833320..0000000
--- a/blog/categories/mysql/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: mysql - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/nginx/atom.xml b/blog/categories/nginx/atom.xml
deleted file mode 100644
index 75efa08..0000000
--- a/blog/categories/nginx/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/nginx/index.html b/blog/categories/nginx/index.html
deleted file mode 100644
index cc7483a..0000000
--- a/blog/categories/nginx/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: nginx - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/phpmyadmin/atom.xml b/blog/categories/phpmyadmin/atom.xml
deleted file mode 100644
index 21c01ed..0000000
--- a/blog/categories/phpmyadmin/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/phpmyadmin/index.html b/blog/categories/phpmyadmin/index.html
deleted file mode 100644
index 4f7e7bc..0000000
--- a/blog/categories/phpmyadmin/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: phpmyadmin - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Phpmyadmin
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/precise/atom.xml b/blog/categories/precise/atom.xml
deleted file mode 100644
index be41d7e..0000000
--- a/blog/categories/precise/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/precise/index.html b/blog/categories/precise/index.html
deleted file mode 100644
index 813e538..0000000
--- a/blog/categories/precise/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: precise - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/production/atom.xml b/blog/categories/production/atom.xml
deleted file mode 100644
index 425ecda..0000000
--- a/blog/categories/production/atom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-03-31T17:39:00+05:30
- http://developers.debuggify.net/blog/2013/03/31/debug-javascript-in-production
- Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-Here is the presentation
-
-
-
-
-
-
-
-
-
-I will be explaining each point in details in the future posts.
-
-I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-Happy Debugging !!
-]]>
-
-
-
diff --git a/blog/categories/production/index.html b/blog/categories/production/index.html
deleted file mode 100644
index 74b3977..0000000
--- a/blog/categories/production/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: production - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Production
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Mar 31 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/same-origin/atom.xml b/blog/categories/same-origin/atom.xml
deleted file mode 100644
index 72116c2..0000000
--- a/blog/categories/same-origin/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/same-origin/index.html b/blog/categories/same-origin/index.html
deleted file mode 100644
index 9300688..0000000
--- a/blog/categories/same-origin/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: same-origin - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Category: Same-origin
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/track/atom.xml b/blog/categories/track/atom.xml
deleted file mode 100644
index 08426a3..0000000
--- a/blog/categories/track/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-07-25T04:44:00+05:30
- http://developers.debuggify.net/blog/2013/07/25/tracking-jquery-ajax-errors-and-exceptions
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-Same Origin
-
-In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-Cross Origin
-
-The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
- header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-]]>
-
-
-
diff --git a/blog/categories/track/index.html b/blog/categories/track/index.html
deleted file mode 100644
index d81dc15..0000000
--- a/blog/categories/track/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: track - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jul 25 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/categories/ubuntu/atom.xml b/blog/categories/ubuntu/atom.xml
deleted file mode 100644
index 072e367..0000000
--- a/blog/categories/ubuntu/atom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
- 2013-09-23T10:08:01+05:30
- http://developers.debuggify.net/
-
-
-
-
- Octopress
-
-
-
-
-
- 2013-06-30T12:40:00+05:30
- http://developers.debuggify.net/blog/2013/06/30/install-phpmyadmin-behind-nginx-on-ubuntu-12-dot-04-lts
- Setup dependencies
-
-Setup Php, mysql & phpmyadmin:
-
- sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-sudo vim /etc/php5/fpm/php.ini
-
-
-Add the following line and save
-
-extension=mysql.so
-
-
-Restart to use new config
-
- sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-Setup Nginx config:
-
-Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-And add the following:
-
-server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-Reload nginx for the new configuration to take effect:
-
-sudo /etc/init.d/nginx reload
-
-
-Open the link in the browser http://admin.lvh.me/phpmyadmin
-]]>
-
-
-
diff --git a/blog/categories/ubuntu/index.html b/blog/categories/ubuntu/index.html
deleted file mode 100644
index 5056423..0000000
--- a/blog/categories/ubuntu/index.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
- Category: ubuntu - DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2013
-
-
-
-
-Jun 30 2013
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/blog/index.html b/blog/index.html
deleted file mode 100644
index 343854c..0000000
--- a/blog/index.html
+++ /dev/null
@@ -1,890 +0,0 @@
-
-
-
-
-
-
-
- DEBUGGIFY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The web had already shifted from static web pages to ajax driven websites for good. This shift have made the web awesome and faster but have introduced some new problems which need to taken care of . One of these is failed ajax requests. There are many reasons for a ajax request to fail, some of them are
-
-
-Api End points are down or unreachable
-Unauthorized / Invalid data requested
-Some error happened at the API back-end
-Edge cases are not handed properly in the code
-
-
-
-
Normally the ajax pull data from self hosted as well 3rd party hosted APIs. In both cases, the failure of ajax request has to handled at both ends, but front end is more important because of its high impact on the user experience. In case of 3rd party APIs, there is any way no possibility to have control over back-end, so front-end is the default choice.
-
-
The browser behaves differently when it comes to make a ajax calls for same origin and ajax call for cross origin, and therefore exceptional handling also have to different.
-
-
Same Origin
-
-
In jQuery, the simplest way to catch all the ajax errors and exceptions on a web page
-
-
$(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) {
-
- // This is the default error handler for ajax request.
-
- // Extract all the information required to understand.
- var requestResponse = {
- url: ajaxSettings.url,
- method: ajaxSettings.type,
- data: ajaxSettings.data,
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- data: ajaxSettings.data
- };
-
- console.error(requestResponse)
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
-});
-
-
-
One important thing to note here is this handler is not called for cross-domain scripts and cross-domain JSONP requests which made its easy to avoid any ajax errors happening in application other than your native javascript code.
-
-
Note If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxError() method will not fire.
-
-
Apart from this generic handler, it is possible to have a dedicated error handler for each type of request.
-
-
$.ajax({
-
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- error: function(jqXHR, textStatus,errorThrown) {
- var requestResponse = {
- httpStatus: jqXHR.status,
- error: thrownError || jqXHR.statusText,
- };
-
- console.log(requestResponse);
-
- // Notify the user so he might not wonder.
- alert('Something went wrong, Please try again');
-
-
- // Report it back for fixing it
- // Only for debuggify users
- var ajaxErrors = debuggify.Logger.get('ajax_errors');
- ajaxErrors.attach(requestResponse);
- ajaxErrors.error('Caught ajax error');
-
- }
-});
-
-
-
Event this dedicated handler is not called for cross-domain script and cross-domain JSONP requests.
-
-
Cross Origin
-
-
The limitation for ajax exception handlers is not just a jQuery limitation, but it is a javascript limitation. The reason behind this limitation is that most browser are not giving permissions to access error messages for cross domain scripts due to security reasons.
-
-
There are some solutions (or workarounds) for this. (Reference stackoverflow )
-
-
First one, if backend is accessible, set (in my example PHP) headers to allow a cross domain call. When you do this, then JavaScript accepts the call, and no crossdomain tricks are needed.
-
-
header('Access-Control-Allow-Origin: http://domain1.com, http://domain2.com'); //whitelist
-
-
-
Secondly if there is no access to backend, a timeout based workaround can be used to get a error callback
-
-
$.ajax({
- type: "POST",
- url: "https://api.twitter.com/1.1/statuses/user_timeline.json",
- success: start_map,
- timeout: 2000, // 2 seconds timeout before error function will be called
- dataType: 'script',
- crossDomain: true
-});
-
-
-
This is a nasty trick to solve the problem as it can definitely screw up things for slow internet connection.
-
-
Another alternative option is using the jQuery plugin jquery-jsonp . This plugin is using script onload / onerror method along with timeout to get the error callback.
-
-
-
-
-
-
-
-
-
-
-
-
-
- In the past we have received many requests related to attach some custom data along with every messages collected.
-
-
We have added this functionality, and to simplify it, we have come with 3 new APIs
-
-
The Alias API
-
-
Using this api, its possible to set an alias to the unique user identification used by the debuggify. This make it easy to map a debuggify user identifier to your site username or email id. Remember the old data will not have alias.
-
-
debuggify.alias('foo@example.com');
-
-
-
Its pretty straight forward to use the above api.
-
-
Note Make sure every unique user should be given the one alias to avoid any data inconsistency.
-
-
The Metadata API
-
-
To attach custom data along with every message
-
-
debuggify.metadata({'login': true});
-
-
-
The Attach API
-
-
To attach custom data along with a single message. This api need to be called on the logger object
-
-
var ajaxErrors = debuggify.Logger.get('ajax_errors');
-
-ajaxErrors.attach({
- type: 'POST',
- url: '/api/notification'
-});
-
-ajaxErrors.error('Error in Notification Api');
-
-
-
After calling attach, it must be followed by the one of the logging Apis like .log, .error, .warn, .debug or .message to push that data to the server.
-
-
Note : The attached data will expire after its once used by logging Api’s. To send data with every request use .metadata api
-
-
We soon be adding use cases on how to use this APIs more powerfully.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Setup dependencies
-
-
Setup Php, mysql & phpmyadmin:
-
-
sudo apt-get install php5-fpm php-apc mysql-server mysql-client phpmyadmin nginx
-
-
-
Enter your MySQL password and phpmyadmin webinterface password when prompted
-
-
Enable mysql extension by editing /etc/php5/fpm/php.ini
-
-
sudo vim /etc/php5/fpm/php.ini
-
-
-
Add the following line and save
-
-
extension=mysql.so
-
-
-
Restart to use new config
-
-
sudo /etc/init.d/php5-fpm restart
- sudo /etc/init.d/nginx restart
-
-
-
Setup Nginx config:
-
-
Next create a basic nginx vhost configuration in /etc/nginx/sites-available/ directory as follows:
-
-
sudo vim /etc/nginx/sites-available/phpmyadmin
-
-
-
And add the following:
-
-
server {
-
- listen 80;
- server_name admin.lvh.me lvh.me;
- root /var/www/phpmyadmin;
- if ($http_host != "admin.lvh.me") {
- rewrite ^ http://admin.lvh.me$request_uri permanent;
- }
- index index.php index.html;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
- location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
- deny all;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- try_files $uri =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
-
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
-}
-
-
-
To enable that vhost, we create a symlink to it from the /etc/nginx/sites-enabled/ directory:
-
-
cd /etc/nginx/sites-enabled/
-sudo ln -s /etc/nginx/sites-available/phpmyadmin phpmyadmin
-
-
-
Reload nginx for the new configuration to take effect:
-
-
sudo /etc/init.d/nginx reload
-
-
-
Open the link in the browser http://admin.lvh.me/phpmyadmin
-
-
-
-
-
-
-
-
-
-
-
-
-
- Last week, I was writing code in javascript when I found something that completly blew off my mind. This is what I found
-
-
-
-
Yeah, IE thowing error in javascript comment. For some time I didnot believe what I am seeing, but gradually I came to my senses. Like most developers, first thing I did was started cursing IE on twitter, but later reality struct me and that is to find a solution to this mess.
-
-
I dig in a lot of wrong places until I found conditional comments in IE. A sample of how the conditional logic works is below
-
-
<script>
-/*@cc_on
-
- @if (@_jscript_version == 10)
- document.write("You are using IE10");
-
- @elif (@_jscript_version == 9)
- document.write("You are using IE9");
-
- @elif (@_jscript_version == 5.8)
- document.write("You are using IE8");
-
- @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
- document.write("You are using IE7");
-
- @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
- document.write("You are using IE6");
-
- @elif (@_jscript_version == 5.5)
- document.write("You are using IE5.5");
-
- @else
- document.write("You are using IE5 or older");
-
- @end
-
-@*/
-</script>
-
-
-
To fix this all I need to do is to remove the whole comment. This comment is anyways useful for sourcemaps supported browsers which is long way to go for IE.
-
-
Anyways this is just a hack for the time being. The sourcemap specs has been updated due to this problem. To know more check the uglifyjs issue on github
-
-
Finally all I have to say is God Bless IE Developers
-
-
-
-
-
-
-
-
-
-
-
-
-
- Today I had great time sharing my experience on javascript debugging with the javascript ninja community at Bangalore
-
-
Here is the presentation
-
-
-
-
-
-
-
-
-
-
I will be explaining each point in details in the future posts.
-
-
I know I have abandoned the blog for long time but not any more. Stay connected for more.
-
-
Happy Debugging !!
-
-
-
-
-
-
-
-
-
-
-
-
-
- Scott Hanselman blogged about JavaScript the assembly language for the web . There a plenty of languages that compiles to javascript . With the addition of Dart from Google and Typescript from Microsoft a war has broke out for better.
-
-
With the rise of compiled to javascript languages it hard to traceback the errors to original source. Almost all modern provides the window.onerror api to catch all uncaught exceptions on a page. This api provides very limited information (error message, filename and line number only) which is the root cause of many problems.
-
-
With modern web development practices the amount of javascript code per page is growing rapidly. Also this code is minified by the minification tools(like Google Closure Compiler , UglifyJS2 etc) to reduce the code size. After minification whole code ends in one single line. Here is where most problem starts. I am listing some really annoying issues related to window.onerror below
-
-
-Missing Char No: The char no is very important for the minified code to point at the exact statement as there is only one line in minified code. Even source maps cannot be helpful in tracking back to original line.
-No Call Stack: The call stack is completely hidden from the developer so its hard to identify the functions flow. However there is a trick to extract stack in IE9 only.
-Cross Origin Errors: These types are thown when some cross origin permission is broken. They are very common on pages with facebook like and google plus widget installed. For such errors window.error message throw a single message “Script Error”. As per stackoverflow post this behavior is intentional to avoid some security risks but its at expense of useful debugging information.
-
-
-
-
Most of above mentioned problems are roadblock in debugging production websites / applications. There is a need for better tools and libraries for the job.
-
-
I will soon be writing a post on Best Debugging Practices For Javascript In Production Environment
-
-
-
-
-
-
-
-
-
-
-
-
-
- Who am I?
-
-
I was born 6 years back when I bought my first computer and a internet connection. To be frank, Internet is a second home to me. For most of people out there who feel same, are continuously trying to make Internet a better place .
-
-
I am also a computer science engineering grad, so I am surrounded by technology. In order to feed my engineering inquisitiveness I have explored the black, white and gray sections of the internet.
-
-
Where it all started?
-
-
I am a full stack web developer by profession and have authored / co-authored many 3rd party social plugins for Shareaholic Inc which runs on thousands of different blogs and websites driving 1+ billion pageviews per month. These plugins can be installed on different CMS/blogging platform like Wordpress, Drupal, Tumblr, Blogger etc. While working on these plugins I closely interact with the different elements of the modern internet ecosystem.
-
-
What’s my use case of 3rd party plugin ?
-
-
A 3rd party plugin has to be robust enough to work in 3rd party environments while interacting with 3rd party apis and support every major browser vendor out there
-
-
Elaborating the above quote
-
-
-As plugins runs on 3rd party websites, it has to be robust so it doesn't break itself and neither the website
-It has to be fast enough to deliver good page load time
-It should not conflict with other existing plugins
-It should support major browser vendors including internet explorer
-It should also support legacy browser versions like ie6 ie7 etc.
-As plugins interact with over 200+ 3rd party apis, it’s hard to keep track when something break
-It should be easy to setup with multiple cms/blogging environments for better distribution
-
-
-
-
Technical challenges faced ?
-
-
-In 3rd party environment, developers have limited or no control over things, so it’s hard to debug and reproduce bugs / issues
-If some plugin feature is not working its hard to know whether
-
-
-it’s not working for a particular website,
-or not working for a set of URLs
-or for a particular CMS/Blogging environment
-or for a particular screen resolution
-or for a particular browser vendor
-or even for a particular version of a browser vendor
-or for all cases
-
-
-Its hard to judge the impact of every release, whether it fixed the problem or introduced some new side effects
-The 3rd party API’s are continuously changing, upgrading & depreciating. Companies like Facebook, Google, Twitter are continuously bashing developers with bleeding edges of their API’s
-With HTML5, ES Harmony and CSS3, browsers are evolving faster than ever, so they are also releasing bleeding edge features and API’s
-
-
-
-
Who else is facing problems?
-
-
As all wise developers know
-
-
Zero Bugs is a Myth
-
-
I have talked to a few friends about the problems. All are encountering similar set of problems on the daily basic. A majority their development time is spend in debugging and fixing bugs. The debugging is also becoming hard due to the evolving nature of the web.
-
-
What to do about it?
-
-
So I finally decided to go on a quest to make Internet a better place for developers .
-
-
Why Developers ?
-
-
Developers are the keepers of the modern internet.
-
-
The web is evolving because of the developers. There are around 1+ million developers on the planet. I can build something that make developers more productive and can save up to 1hr/day of their time, it’s going to be revolutionary. Developers can reinvest this time in open source projects, new innovations or anything that eventually make Internet a better place
-
-
So that is Debuggify is all about. Contact me if you want to join me on my quest.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config.rb b/config.rb
new file mode 100644
index 0000000..408aeca
--- /dev/null
+++ b/config.rb
@@ -0,0 +1,19 @@
+require 'sass-globbing'
+
+# Require any additional compass plugins here.
+project_type = :stand_alone
+
+# Publishing paths
+http_path = "/"
+http_images_path = "/images"
+http_generated_images_path = "/images"
+http_fonts_path = "/fonts"
+css_dir = "public/stylesheets"
+
+# Local development paths
+sass_dir = "sass"
+images_dir = "source/images"
+fonts_dir = "source/fonts"
+
+line_comments = false
+output_style = :compressed
diff --git a/config.ru b/config.ru
new file mode 100644
index 0000000..8e3dc08
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,25 @@
+require 'bundler/setup'
+require 'sinatra/base'
+
+# The project root directory
+$root = ::File.dirname(__FILE__)
+
+class SinatraStaticServer < Sinatra::Base
+
+ get(/.+/) do
+ send_sinatra_file(request.path) {404}
+ end
+
+ not_found do
+ send_file(File.join(File.dirname(__FILE__), 'public', '404.html'), {:status => 404})
+ end
+
+ def send_sinatra_file(path, &missing_file_block)
+ file_path = File.join(File.dirname(__FILE__), 'public', path)
+ file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i
+ File.exist?(file_path) ? send_file(file_path) : missing_file_block.call
+ end
+
+end
+
+run SinatraStaticServer
diff --git a/docs/app-20ea5717ade2476617d0305b69058533.js b/docs/app-20ea5717ade2476617d0305b69058533.js
deleted file mode 100644
index 32fc015..0000000
--- a/docs/app-20ea5717ade2476617d0305b69058533.js
+++ /dev/null
@@ -1 +0,0 @@
-var CodeMirror=(function(){function v(aN,aK){var b2={},bk=v.defaults;for(var aA in bk){if(bk.hasOwnProperty(aA)){b2[aA]=(aK&&aK.hasOwnProperty(aA)?aK:bk)[aA]}}var aE=document.createElement("div");aE.className="CodeMirror"+(b2.lineWrapping?" CodeMirror-wrap":"");aE.innerHTML='
';if(aN.appendChild){aN.appendChild(aE)}else{aN(aE)}var bY=aE.firstChild,bn=bY.firstChild,bl=aE.lastChild,bN=bl.firstChild,ch=bN.firstChild,aI=ch.firstChild,aZ=aI.firstChild,bv=aI.nextSibling.firstChild,aw=bv.firstChild,bd=aw.nextSibling,bh=bd.nextSibling,ar=bh.nextSibling;cE();if(t){bn.style.width="0px"}if(!f){bv.draggable=true}bv.style.outline="none";if(b2.tabindex!=null){bn.tabIndex=b2.tabindex}if(b2.autofocus){bA()}if(!b2.gutter&&!b2.lineNumbers){aI.style.display="none"}if(m){bY.style.height="1px",bY.style.position="absolute"}try{cu("x")}catch(b9){if(b9.message.match(/runtime/i)){b9=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")}throw b9}var b8=new A(),ax=new A(),cQ;var cc,cz=new i([new ai([new e("")])]),ci,ck;bU();var cX={from:{line:0,ch:0},to:{line:0,ch:0},inverted:false};var cj,br,a0,bG=0,bc,co=false,ct=false;var cq,b7,aC,cO,aQ,bg,aT,cB;var be=0,cR=0,bM=0,bO=0;var b5;var bE="",aG;var aq={};at(function(){aX(b2.value||"");cq=false})();var a9=new k();s(bl,"mousedown",at(cl));s(bl,"dblclick",at(bX));s(bv,"selectstart",U);if(!O){s(bl,"contextmenu",a2)}s(bl,"scroll",function(){bG=bl.scrollTop;ce([]);if(b2.fixedGutter){aI.style.left=bl.scrollLeft+"px"}if(b2.onScroll){b2.onScroll(ca)}});s(window,"resize",function(){ce(true)});s(bn,"keyup",at(cm));s(bn,"input",aR);s(bn,"keydown",at(cd));s(bn,"keypress",at(bo));s(bn,"focus",cV);s(bn,"blur",aF);if(b2.dragDrop){s(bv,"dragstart",aJ);function bD(c0){if(b2.onDragEvent&&b2.onDragEvent(ca,P(c0))){return}x(c0)}s(bl,"dragenter",bD);s(bl,"dragover",bD);s(bl,"drop",at(ao))}s(bl,"paste",function(){bA();aR()});s(bn,"paste",aR);s(bn,"cut",at(function(){if(!b2.readOnly){bt("")}}));if(m){s(bN,"mouseup",function(){if(document.activeElement==bn){bn.blur()}bA()})}var cx;try{cx=(document.activeElement==bn)}catch(b9){}if(cx||b2.autofocus){setTimeout(cV,20)}else{aF()}function bs(c0){return c0>=0&&c0c0&&c4.y>c2.offsetHeight){c5=c4.y-c2.offsetHeight}if(c1+c2.offsetWidth>c7){c1=c7-c2.offsetWidth}}}c2.style.top=(c5+cs())+"px";c2.style.left=c2.style.right="";if(c8=="right"){c1=bN.clientWidth-c2.offsetWidth;c2.style.right="0px"}else{if(c8=="left"){c1=0}else{if(c8=="middle"){c1=(bN.clientWidth-c2.offsetWidth)/2}}c2.style.left=(c1+a6())+"px"}if(c6){aB(c1,c5,c1+c2.offsetWidth,c5+c2.offsetHeight)}},lineCount:function(){return cz.size},clipPos:aU,getCursor:function(c0){if(c0==null){c0=cX.inverted}return ab(c0?cX.from:cX.to)},somethingSelected:function(){return !ae(cX.from,cX.to)},setCursor:at(function(c0,c2,c1){if(c2==null&&typeof c0.line=="number"){a7(c0.line,c0.ch,c1)}else{a7(c0,c2,c1)}}),setSelection:at(function(c2,c1,c0){(c0?by:bx)(aU(c2),aU(c1||c2))}),getLine:function(c0){if(bs(c0)){return cG(c0).text}},getLineHandle:function(c0){if(bs(c0)){return cG(c0)}},setLine:at(function(c0,c1){if(bs(c0)){bR(c1,{line:c0,ch:0},{line:c0,ch:cG(c0).text.length})}}),removeLine:at(function(c0){if(bs(c0)){bR("",{line:c0,ch:0},aU({line:c0+1,ch:0}))}}),replaceRange:at(bR),getRange:function(c1,c0){return cP(aU(c1),aU(c0))},triggerOnKeyDown:at(cd),execCommand:function(c0){return M[c0](ca)},moveH:at(cF),deleteH:at(cn),moveV:at(cy),toggleOverwrite:function(){if(co){co=false;bd.className=bd.className.replace(" CodeMirror-overwrite","")}else{co=true;bd.className+=" CodeMirror-overwrite"}},posFromIndex:function(c1){var c2=0,c0;cz.iter(0,cz.size,function(c3){var c4=c3.text.length+1;if(c4>c1){c0=c1;return true}c1-=c4;++c2});return aU({line:c2,ch:c0})},indexFromPos:function(c1){if(c1.line<0||c1.ch<0){return 0}var c0=c1.ch;cz.iter(0,c1.line,function(c2){c0+=c2.text.length+1});return c0},scrollTo:function(c0,c1){if(c0!=null){bl.scrollLeft=c0}if(c1!=null){bl.scrollTop=c1}ce([])},operation:function(c0){return at(c0)()},compoundChange:function(c0){return bP(c0)},refresh:function(){ce(true);if(bl.scrollHeight>bG){bl.scrollTop=bG}},getInputField:function(){return bn},getWrapperElement:function(){return aE},getScrollerElement:function(){return bl},getGutterElement:function(){return aI}};function cG(c0){return D(cz,c0)}function a4(c1,c0){aT=true;var c2=c0-c1.height;for(var c3=c1;c3;c3=c3.parent){c3.height+=c2}}function aX(c0){var c1={line:0,ch:0};aP(c1,{line:cz.size-1,ch:cG(cz.size-1).text.length},B(c0),c1,c1);cq=true}function b3(){var c0=[];cz.iter(0,cz.size,function(c1){c0.push(c1.text)});return c0.join("\n")}function cl(c9){a5(z(c9,"shiftKey"));for(var c4=j(c9);c4!=aE;c4=c4.parentNode){if(c4.parentNode==bN&&c4!=ch){return}}for(var c4=j(c9);c4!=aE;c4=c4.parentNode){if(c4.parentNode==aZ){if(b2.onGutterClick){b2.onGutterClick(ca,r(aZ.childNodes,c4)+cR,c9)}return U(c9)}}var c0=a3(c9);switch(y(c9)){case 3:if(O&&!N){a2(c9)}return;case 2:if(c0){a7(c0.line,c0.ch,true)}return}if(!c0){if(j(c9)==bl){U(c9)}return}if(!ck){cV()}var c1=+new Date;if(a0&&a0.time>c1-400&&ae(a0.pos,c0)){U(c9);setTimeout(bA,20);return aL(c0.line)}else{if(br&&br.time>c1-400&&ae(br.pos,c0)){a0={time:c1,pos:c0};U(c9);return bJ(c0)}else{br={time:c1,pos:c0}}}var db=c0,c2;if(b2.dragDrop&&G&&!b2.readOnly&&!ae(cX.from,cX.to)&&!aa(c0,cX.from)&&!aa(cX.to,c0)){if(f){bv.draggable=true}function c5(dc){if(f){bv.draggable=false}bc=false;c8();c3();if(Math.abs(c9.clientX-dc.clientX)+Math.abs(c9.clientY-dc.clientY)<10){U(dc);a7(c0.line,c0.ch,true);bA()}}var c8=s(document,"mouseup",at(c5),true);var c3=s(bl,"drop",at(c5),true);bc=true;if(bv.dragDrop){bv.dragDrop()}return}U(c9);a7(c0.line,c0.ch,true);function da(dc){var de=a3(dc,true);if(de&&!ae(de,db)){if(!ck){cV()}db=de;by(c0,de);cq=false;var dd=bB();if(de.line>=dd.to||de.line-1){setTimeout(at(function(){bz(cX.to.line,"smart")}),75)}}if(bZ(c3,c1)){return}aR()}function cm(c0){if(b2.onKeyEvent&&b2.onKeyEvent(ca,P(c0))){return}if(z(c0,"keyCode")==16){cj=null}}function cV(){if(b2.readOnly=="nocursor"){return}if(!ck){if(b2.onFocus){b2.onFocus(ca)}ck=true;if(aE.className.search(/\bCodeMirror-focused\b/)==-1){aE.className+=" CodeMirror-focused"}if(!bg){cD(true)}}an();cN()}function aF(){if(ck){if(b2.onBlur){b2.onBlur(ca)}ck=false;if(b5){at(function(){if(b5){b5();b5=null}})()}aE.className=aE.className.replace(" CodeMirror-focused","")}clearInterval(cQ);setTimeout(function(){if(!ck){cj=null}},150)}function aP(c5,c4,c3,c1,c0){if(ct){return}if(a9){var c2=[];cz.iter(c5.line,c4.line+1,function(c6){c2.push(c6.text)});a9.addChange(c5.line,c3.length,c2);while(a9.done.length>b2.undoDepth){a9.done.shift()}}au(c5,c4,c3,c1,c0)}function cb(c5,c6){if(!c5.length){return}var c7=c5.pop(),c1=[];for(var c2=c7.length-1;c2>=0;c2-=1){var c4=c7[c2];var c8=[],c0=c4.start+c4.added;cz.iter(c4.start,c0,function(c9){c8.push(c9.text)});c1.push({start:c4.start,added:c4.old.length,old:c8});var c3=aU({line:c4.start+c4.old.length-1,ch:X(c8[c8.length-1],c4.old[c4.old.length-1])});au({line:c4.start,ch:0},{line:c0-1,ch:cG(c0-1).text.length},c4.old,c3,c3)}cq=true;c6.push(c1)}function cU(){cb(a9.done,a9.undone)}function cK(){cb(a9.undone,a9.done)}function au(df,c4,dl,c0,dm){if(ct){return}var dk=false,c3=bE.length;if(!b2.lineWrapping){cz.iter(df.line,c4.line+1,function(dn){if(dn.text.length==c3){dk=true;return true}})}if(df.line!=c4.line||dl.length>1){aT=true}var dc=c4.line-df.line,db=cG(df.line),c1=cG(c4.line);if(df.ch==0&&c4.ch==0&&dl[dl.length-1]==""){var c9=[],da=null;if(df.line){da=cG(df.line-1);da.fixMarkEnds(c1)}else{c1.fixMarkStarts()}for(var dh=0,dj=dl.length-1;dh1){cz.remove(df.line+1,dc-1,cB)}cz.insert(df.line+1,c9)}}}if(b2.lineWrapping){var c6=Math.max(5,bl.clientWidth/bi()-3);cz.iter(df.line,df.line+dl.length,function(dn){if(dn.hidden){return}var dp=Math.ceil(dn.text.length/c6)||1;if(dp!=dn.height){a4(dn,dp)}})}else{cz.iter(df.line,df.line+dl.length,function(dp){var dn=dp.text;if(dn.length>c3){bE=dn;c3=dn.length;aG=null;dk=false}});if(dk){c3=0;bE="";aG=null;cz.iter(0,cz.size,function(dp){var dn=dp.text;if(dn.length>c3){c3=dn.length;bE=dn}})}}var c2=[],c8=dl.length-dc-1;for(var dh=0,de=ci.length;dhc4.line){c2.push(di+c8)}}}var dg=df.line+Math.min(dl.length,500);cI(df.line,dg);c2.push(dg);ci=c2;bH(100);aC.push({from:df.line,to:c4.line+1,diff:c8});var c7={from:df,to:c4,text:dl};if(cO){for(var c5=cO;c5.next;c5=c5.next){}c5.next=c7}else{cO=c7}function dd(dn){return dn<=Math.min(c4.line,c4.line+c8)?dn:dn+c8}bx(c0,dm,dd(cX.from.line),dd(cX.to.line));if(bl.clientHeight){bN.style.height=(cz.height*bQ()+2*cs())+"px"}}function bR(c1,c4,c3){c4=aU(c4);if(!c3){c3=c4}else{c3=aU(c3)}c1=B(c1);function c2(c7){if(aa(c7,c4)){return c7}if(!aa(c3,c7)){return c0}var c5=c7.line+c1.length-(c3.line-c4.line)-1;var c6=c7.ch;if(c7.line==c3.line){c6+=c1[c1.length-1].length-(c3.ch-(c3.line==c4.line?c4.ch:0))}return{line:c5,ch:c6}}var c0;aD(c1,c4,c3,function(c5){c0=c5;return{from:c2(cX.from),to:c2(cX.to)}});return c0}function bt(c0,c1){aD(B(c0),cX.from,cX.to,function(c2){if(c1=="end"){return{from:c2,to:c2}}else{if(c1=="start"){return{from:cX.from,to:cX.from}}else{return{from:cX.from,to:c2}}}})}function aD(c3,c5,c4,c0){var c2=c3.length==1?c3[0].length+c5.ch:c3[c3.length-1].length;var c1=c0({line:c5.line+c3.length-1,ch:c2});aP(c5,c4,c3,c1.from,c1.to)}function cP(c4,c3){var c1=c4.line,c0=c3.line;if(c1==c0){return cG(c1).text.slice(c4.ch,c3.ch)}var c2=[cG(c1).text.slice(c4.ch)];cz.iter(c1+1,c0,function(c5){c2.push(c5.text)});c2.push(cG(c0).text.slice(0,c3.ch));return c2.join("\n")}function b4(){return cP(cX.from,cX.to)}var bu=false;function an(){if(bu){return}b8.set(b2.pollInterval,function(){aO();bL();if(ck){an()}az()})}function aR(){var c0=false;bu=true;function c1(){aO();var c2=bL();if(!c2&&!c0){c0=true;b8.set(60,c1)}else{bu=false;an()}az()}b8.set(20,c1)}var bb="";function bL(){if(bg||!ck||af(bn)||b2.readOnly){return false}var c1=bn.value;if(c1==bb){return false}cj=null;var c2=0,c0=Math.min(bb.length,c1.length);while(c2c1){bd.scrollIntoView()}}function cg(){var c1=cS(cX.inverted?cX.from:cX.to);var c0=b2.lineWrapping?Math.min(c1.x,bv.offsetWidth):c1.x;return aB(c0,c1.y,c0,c1.yBot)}function aB(c2,c8,c0,c7){var c5=a6(),dd=cs();c8+=dd;c7+=dd;c2+=c5;c0+=c5;var da=bl.clientHeight,c3=bl.scrollTop,c1=false,dc=true;if(c8c3+da){bl.scrollTop=c7-da;c1=true}}var c9=bl.clientWidth,db=bl.scrollLeft;var c6=b2.fixedGutter?aI.clientWidth:0;var c4=c2c9+db-3){bl.scrollLeft=c0+10-c9;c1=true;if(c0>bN.clientWidth){dc=false}}}if(c1&&b2.onScroll){b2.onScroll(ca)}return dc}function bB(){var c0=bQ(),c3=bl.scrollTop-cs();var c2=Math.max(0,Math.floor(c3/c0));var c1=Math.ceil((c3+bl.clientHeight)/c0);return{from:Y(cz,c2),to:Y(cz,c1)}}function ce(c8,c4){if(!bl.clientWidth){cR=bM=be=0;return}var c3=bB();if(c8!==true&&c8.length==0&&c3.from>cR&&c3.toda&&bM-da<20){da=Math.min(cz.size,bM)}var dc=c8===true?[]:b1([{from:cR,to:bM,domStart:0}],c8);var c7=0;for(var c5=0;c5da){c6.to=da}if(c6.from>=c6.to){dc.splice(c5--,1)}else{c7+=c6.to-c6.from}}if(c7==da-c9&&c9==cR&&da==bM){return}dc.sort(function(de,dd){return de.domStart-dd.domStart});var c2=bQ(),c0=aI.style.display;ar.style.display="none";aS(c9,da,dc);ar.style.display=aI.style.display="";var c1=c9!=cR||da!=bM||bO!=bl.clientHeight+c2;if(c1){bO=bl.clientHeight+c2}cR=c9;bM=da;be=g(cz,c9);ch.style.top=(be*c2)+"px";if(bl.clientHeight){bN.style.height=(cz.height*c2+2*cs())+"px"}if(ar.childNodes.length!=bM-cR){throw new Error("BAD PATCH! "+JSON.stringify(dc)+" size="+(bM-cR)+" nodes="+ar.childNodes.length)}function db(){aG=bl.clientWidth;var de=ar.firstChild,dd=false;cz.iter(cR,bM,function(dg){if(!dg.hidden){var df=Math.round(de.offsetHeight/c2)||1;if(dg.height!=df){a4(dg,df);aT=dd=true}}de=de.nextSibling});if(dd){bN.style.height=(cz.height*c2+2*cs())+"px"}return dd}if(b2.lineWrapping){db()}else{if(aG==null){aG=cu(bE)}if(aG>bl.clientWidth){bv.style.width=aG+"px";bN.style.width="";bN.style.width=bl.scrollWidth+"px"}else{bv.style.width=bN.style.width=""}}aI.style.display=c0;if(c1||aT){aM()&&b2.lineWrapping&&db()&&aM()}cW();if(!c4&&b2.onUpdate){b2.onUpdate(ca)}return true}function b1(c9,c7){for(var c4=0,c2=c7.length||0;c4=c5.to){c0.push(c5)}else{if(c6.from>c5.from){c0.push({from:c5.from,to:c6.from,domStart:c5.domStart})}if(c6.toc4){c2=c0(c2);c4++}for(var c3=0,c7=db.to-db.from;c3c3){if(dd.hidden){var de=c8.innerHTML=" "}else{var de=""+dd.getHTML(ba)+" ";if(dd.bgClassName){de='"}}c8.innerHTML=de;ar.insertBefore(c8.firstChild,c2)}else{c2=c2.nextSibling}++c3})}function aM(){if(!b2.gutter&&!b2.lineNumbers){return}var c1=ch.offsetHeight,c9=bl.clientHeight;aI.style.height=(c1-c9<2?c9:c1)+"px";var c7=[],c5=cR,c8;cz.iter(cR,Math.max(bM,cR+1),function(db){if(db.hidden){c7.push(" ")}else{var da=db.gutterMarker;var dd=b2.lineNumbers?c5+b2.firstLineNumber:null;if(da&&da.text){dd=da.text.replace("%N%",dd!=null?dd:"")}else{if(dd==null){dd="\u00a0"}}c7.push((da&&da.style?'':""),dd);for(var dc=1;dc ")}c7.push(" ");if(!da){c8=c5}}++c5});aI.style.display="none";aZ.innerHTML=c7.join("");if(c8!=null){var c3=aZ.childNodes[c8-cR];var c4=String(cz.size).length,c0=I(c3),c2="";while(c0.length+c2.length2;bv.style.marginLeft=aI.offsetWidth+"px";aT=false;return c6}function cW(){var c3=ae(cX.from,cX.to);var de=cS(cX.from,true);var c9=c3?de:cS(cX.to,true);var c7=cX.inverted?de:c9,c1=bQ();var c0=al(aE),c2=al(ar);bY.style.top=Math.max(0,Math.min(bl.offsetHeight,c7.y+c2.top-c0.top))+"px";bY.style.left=Math.max(0,Math.min(bl.offsetWidth,c7.x+c2.left-c0.left))+"px";if(c3){bd.style.top=c7.y+"px";bd.style.left=(b2.lineWrapping?Math.min(c7.x,bv.offsetWidth):c7.x)+"px";bd.style.display="";bh.style.display="none"}else{var dc=de.y==c9.y,c5="";var da=bv.clientWidth||bv.offsetWidth;var c6=bv.clientHeight||bv.offsetHeight;function dd(dj,di,dh,df){var dg=F?"width: "+(!dh?da:da-dh-dj)+"px":"right: "+dh+"px";c5+='
'}if(cX.from.ch&&de.y>=0){var db=dc?da-c9.x:0;dd(de.x,de.y,db,c1)}var c4=Math.max(0,de.y+(cX.from.ch?c1:0));var c8=Math.min(c9.y,c6)-c4;if(c8>0.2*c1){dd(0,c4,0,c8)}if((!dc||!cX.from.ch)&&c9.yc2||c9>c6.text.length){c9=c6.text.length}return{line:da,ch:c9}}da+=c8}}var c0=cG(c5.line);var c3=c5.ch==c0.text.length&&c5.ch!=c2;if(!c0.hidden){return c5}if(c5.line>=c1){return c4(1)||c4(-1)}else{return c4(-1)||c4(1)}}function a7(c0,c2,c1){var c3=aU({line:c0,ch:c2||0});(c1?by:bx)(c3,c3)}function b0(c0){return Math.max(0,Math.min(c0,cz.size-1))}function aU(c2){if(c2.line<0){return{line:0,ch:0}}if(c2.line>=cz.size){return{line:cz.size-1,ch:cG(cz.size-1).text.length}}var c0=c2.ch,c1=cG(c2.line).text.length;if(c0==null||c0>c1){return{line:c2.line,ch:c1}}else{if(c0<0){return{line:c2.line,ch:0}}else{return c2}}}function cp(c3,c7){var c4=cX.inverted?cX.from:cX.to,c8=c4.line,c0=c4.ch;var c6=cG(c8);function c1(){for(var c9=c8+c3,db=c3<0?-1:cz.size;c9!=db;c9+=c3){var da=cG(c9);if(!da.hidden){c8=c9;c6=da;return true}}}function c5(c9){if(c0==(c3<0?0:c6.text.length)){if(!c9&&c1()){c0=c3<0?c6.text.length:0}else{return false}}else{c0+=c3}return true}if(c7=="char"){c5()}else{if(c7=="column"){c5(true)}else{if(c7=="word"){var c2=false;for(;;){if(c3<0){if(!c5()){break}}if(ah(c6.text.charAt(c0))){c2=true}else{if(c2){if(c3<0){c3=1;c5()}break}}if(c3>0){if(!c5()){break}}}}}}return{line:c8,ch:c0}}function cF(c0,c1){var c2=c0<0?cX.from:cX.to;if(cj||ae(cX.from,cX.to)){c2=cp(c0,c1)}a7(c2.line,c2.ch,true)}function cn(c0,c1){if(!ae(cX.from,cX.to)){bR("",cX.from,cX.to)}else{if(c0<0){bR("",cp(c0,c1),cX.to)}else{bR("",cX.from,cp(c0,c1))}}b7=true}var cw=null;function cy(c0,c1){var c3=0,c4=cS(cX.inverted?cX.from:cX.to,true);if(cw!=null){c4.x=cw}if(c1=="page"){c3=Math.min(bl.clientHeight,window.innerHeight||document.documentElement.clientHeight)}else{if(c1=="line"){c3=bQ()}}var c2=bI(c4.x,c4.y+c3*c0+2);if(c1=="page"){bl.scrollTop+=cS(c2,true).y-c4.y}a7(c2.line,c2.ch,true);cw=c4.x}function bJ(c3){var c1=cG(c3.line).text;var c2=c3.ch,c0=c3.ch;while(c2>0&&ah(c1.charAt(c2-1))){--c2}while(c0bE.length){bE=c3.text}})}aC.push({from:0,to:cz.size})}function ba(c1){var c0=b2.tabSize-c1%b2.tabSize,c3=aq[c0];if(c3){return c3}for(var c4='',c2=0;c2",width:c0})}function cE(){bl.className=bl.className.replace(/\s*cm-s-\S+/g,"")+b2.theme.replace(/(^|\s)\s*/g," cm-s-")}function cY(){this.set=[]}cY.prototype.clear=at(function(){var c5=Infinity,c1=-Infinity;for(var c4=0,c7=this.set.length;c4=c5.ch)){c4.push(c0.marker||c0)}}return c4}function bW(c0,c2,c1){if(typeof c0=="number"){c0=cG(b0(c0))}c0.gutterMarker={text:c2,style:c1};aT=true;return c0}function av(c0){if(typeof c0=="number"){c0=cG(b0(c0))}c0.gutterMarker=null;aT=true}function aY(c1,c3){var c2=c1,c0=c1;if(typeof c1=="number"){c0=cG(b0(c1))}else{c2=Z(c1)}if(c2==null){return null}if(c3(c0,c2)){aC.push({from:c2,to:c2+1})}else{return null}return c0}function bm(c1,c0,c2){return aY(c1,function(c3){if(c3.className!=c0||c3.bgClassName!=c2){c3.className=c0;c3.bgClassName=c2;return true}})}function cL(c1,c0){return aY(c1,function(c2,c5){if(c2.hidden!=c0){c2.hidden=c0;a4(c2,c0?0:1);var c4=cX.from.line,c3=cX.to.line;if(c0&&(c4==c5||c3==c5)){var c7=c4==c5?bS({line:c4,ch:0},c4,0):cX.from;var c6=c3==c5?bS({line:c3,ch:0},c3,0):cX.to;if(!c6){return}bx(c7,c6)}return(aT=true)}})}function aW(c1){if(typeof c1=="number"){if(!bs(c1)){return null}var c2=c1;c1=cG(c1);if(!c1){return null}}else{var c2=Z(c1);if(c2==null){return null}}var c0=c1.gutterMarker;return{line:c2,handle:c1,text:c1.text,markerText:c0&&c0.text,markerClass:c0&&c0.style,lineClass:c1.className,bgClass:c1.bgClassName}}function cu(c0){aw.innerHTML="x ";aw.firstChild.firstChild.firstChild.nodeValue=c0;return aw.firstChild.firstChild.offsetWidth||10}function aH(dc,c6){if(c6<=0){return 0}var c3=cG(dc),c9=c3.text;function da(dd){return b6(c3,dd).left}var c7=0,c5=0,c8=c9.length,c4;var c1=Math.min(c8,Math.ceil(c6/bi()));for(;;){var c2=da(c1);if(c2<=c6&&c1c4){return c8}c1=Math.floor(c8*0.8);c2=da(c1);if(c2c6-c5)?c7:c8}var db=Math.ceil((c7+c8)/2),c0=da(db);if(c0>c6){c8=db;c4=c0}else{c7=db;c5=c0}}}var cA="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16);function b6(c1,c4){if(c4==0){return{top:0,left:0}}var c0=b2.lineWrapping&&c4"+c1.getHTML(ba,c4,cA,c0)+" ";var c3=document.getElementById(cA);var c6=c3.offsetTop,c5=c3.offsetLeft;if(J&&c6==0&&c5==0){var c2=document.createElement("span");c2.innerHTML="x";c3.parentNode.insertBefore(c2,c3.nextSibling);c6=c2.offsetTop}return{top:c6,left:c5}}function cS(c5,c3){var c0,c1=bQ(),c4=c1*(g(cz,c5.line)-(c3?be:0));if(c5.ch==0){c0=0}else{var c2=b6(cG(c5.line),c5.ch);c0=c2.left;if(b2.lineWrapping){c4+=Math.max(0,c2.top)}}return{x:c0,y:c4,yBot:c4+c1}}function bI(c9,c8){if(c8<0){c8=0}var c6=bQ(),c4=bi(),df=be+Math.floor(c8/c6);var da=Y(cz,df);if(da>=cz.size){return{line:cz.size-1,ch:cG(cz.size-1).text.length}}var c1=cG(da),dc=c1.text;var dh=b2.lineWrapping,c7=dh?df-g(cz,da):0;if(c9<=0&&c7==0){return{line:da,ch:0}}function dg(dj){var dk=b6(c1,dj);if(dh){var dl=Math.round(dk.top/c6);return Math.max(0,dk.left+(dl-c7)*bl.clientWidth)}return dk.left}var de=0,dd=0,c2=dc.length,c0;var db=Math.min(c2,Math.ceil((c9+c7*bl.clientWidth*0.9)/c4));for(;;){var c5=dg(db);if(c5<=c9&&dbc0){return{line:da,ch:c2}}db=Math.floor(c2*0.8);c5=dg(db);if(c5c9-dd)?de:c2}}var di=Math.ceil((de+c2)/2),c3=dg(di);if(c3>c9){c2=di;c0=c3}else{de=di;dd=c3}}}function ap(c2){var c0=cS(c2,true),c1=al(bv);return{x:c1.left+c0.x,y:c1.top+c0.y,yBot:c1.top+c0.yBot}}var a1,ay,bV;function bQ(){if(bV==null){bV="";for(var c1=0;c1<49;++c1){bV+="x "}bV+="x "}var c0=ar.clientHeight;if(c0==ay){return a1}ay=c0;aw.innerHTML=bV;a1=aw.firstChild.offsetHeight/50||1;aw.innerHTML="";return a1}var cT,bw=0;function bi(){if(bl.clientWidth==bw){return cT}bw=bl.clientWidth;return(cT=cu("x"))}function cs(){return bv.offsetTop}function a6(){return bv.offsetLeft}function a3(c4,c3){var c2=al(bl,true),c0,c5;try{c0=c4.clientX;c5=c4.clientY}catch(c4){return null}if(!c3&&(c0-c2.left>bl.clientWidth||c5-c2.top>bl.clientHeight)){return null}var c1=al(bv,true);return bI(c0-c1.left,c5-c1.top)}function a2(c1){var c6=a3(c1),c5=bl.scrollTop;if(!c6||window.opera){return}if(ae(cX.from,cX.to)||aa(c6,cX.from)||!aa(c6,cX.to)){at(a7)(c6.line,c6.ch)}var c4=bn.style.cssText;bY.style.position="absolute";bn.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c1.clientY-5)+"px; left: "+(c1.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";bg=true;var c3=bn.value=b4();bA();a(bn);function c0(){var c7=B(bn.value).join("\n");if(c7!=c3){at(bt)(c7,"end")}bY.style.position="relative";bn.style.cssText=c4;if(C){bl.scrollTop=c5}bg=false;cD(true);an()}if(O){x(c1);var c2=s(window,"mouseup",function(){c2();setTimeout(c0,20)},true)}else{setTimeout(c0,50)}}function cN(){clearInterval(cQ);var c0=true;bd.style.visibility="";cQ=setInterval(function(){bd.style.visibility=(c0=!c0)?"":"hidden"},650)}var bq={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function cf(c6){var c0=cX.inverted?cX.from:cX.to,c8=cG(c0.line),c1=c0.ch-1;var c5=(c1>=0&&bq[c8.text.charAt(c1)])||bq[c8.text.charAt(++c1)];if(!c5){return}var c9=c5.charAt(0),c7=c5.charAt(1)==">",dj=c7?1:-1,de=c8.styles;for(var dk=c1+1,dg=0,di=de.length;dg=ds&&dr"==c7){c3.push(du)}else{if(c3.pop()!=dp.charAt(0)){return{pos:dr,match:false}}else{if(!c3.length){return{pos:dr,match:true}}}}}}}}for(var dg=c0.line,di=c7?Math.min(dg+100,cz.size):Math.max(-1,dg-100);dg!=di;dg+=dj){var c8=cG(dg),c4=dg==c0.line;var da=db(c8,c4&&c7?c1+1:0,c4&&!c7?c1:c8.text.length);if(da){break}}if(!da){da={pos:null,match:false}}var dh=da.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var df=bF({line:c0.line,ch:c1},{line:c0.line,ch:c1+1},dh),c2=da.pos!=null&&bF({line:dg,ch:da.pos},{line:dg,ch:da.pos+1},dh);var dc=at(function(){df.clear();c2&&c2.clear()});if(c6){setTimeout(dc,800)}else{b5=dc}}function a8(c6){var c5,c2;for(var c1=c6,c3=c6-40;c1>c3;--c1){if(c1==0){return 0}var c0=cG(c1-1);if(c0.stateAfter){return c1}var c4=c0.indentation(b2.tabSize);if(c2==null||c5>c4){c2=c1-1;c5=c4}}return c2}function cv(c2){var c1=a8(c2),c0=c1&&cG(c1-1).stateAfter;if(!c0){c0=W(cc)}else{c0=p(cc,c0)}cz.iter(c1,c2,function(c3){c3.highlight(cc,c0,b2.tabSize);c3.stateAfter=p(cc,c0)});if(c1=cz.size){continue}var c1=a8(c3),c0=c1&&cG(c1-1).stateAfter;if(c0){c0=p(cc,c0)}else{c0=W(cc)}var c5=0,c2=cc.compareStates,c8=false,c7=c1,c4=false;cz.iter(c7,cz.size,function(db){var dc=db.stateAfter;if(+new Date>c6){ci.push(c7);bH(b2.workDelay);if(c8){aC.push({from:c3,to:c7+1})}return(c4=true)}var dd=db.highlight(cc,c0,b2.tabSize);if(dd){c8=true}db.stateAfter=p(cc,c0);var da=null;if(c2){var de=dc&&c2(dc,c0);if(de!=ac){da=!!de}}if(da==null){if(dd!==false||!dc){c5=0}else{if(++c5>3&&(!cc.indent||cc.indent(dc,"")==cc.indent(c0,""))){da=true}}}if(da){return true}++c7});if(c4){return}if(c8){aC.push({from:c3,to:c7+1})}}if(c9&&b2.onHighlightComplete){b2.onHighlightComplete(ca)}}function bH(c0){if(!ci.length){return}ax.set(c0,at(bT))}function aO(){cq=b7=cO=null;aC=[];aQ=false;cB=[]}function az(){var c4=false,c1;if(aQ){c4=!cg()}if(aC.length){c1=ce(aC,true)}else{if(aQ){cW()}if(aT){aM()}}if(c4){cg()}if(aQ){cZ();cN()}if(ck&&!bg&&(cq===true||(cq!==false&&aQ))){cD(b7)}if(aQ&&b2.matchBrackets){setTimeout(at(function(){if(b5){b5();b5=null}if(ae(cX.from,cX.to)){cf(false)}}),20)}var c0=cO,c2=cB;if(aQ&&b2.onCursorActivity){b2.onCursorActivity(ca)}if(c0&&b2.onChange&&ca){b2.onChange(ca,c0)}for(var c3=0;c32){ap.dependencies=[];for(var ao=2;ao0&&ap.ch=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.posao},eatSpace:function(){var an=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>an},skipToEnd:function(){this.pos=this.string.length},skipTo:function(an){var ao=this.string.indexOf(an,this.pos);if(ao>-1){this.pos=ao;return true}},backUp:function(an){this.pos-=an},column:function(){return n(this.string,this.start,this.tabSize)},indentation:function(){return n(this.string,null,this.tabSize)},match:function(aq,ao,an){if(typeof aq=="string"){function ar(at){return an?at.toLowerCase():at}if(ar(this.string).indexOf(ar(aq),this.pos)==this.pos){if(ao!==false){this.pos+=aq.length}return true}}else{var ap=this.string.slice(this.pos).match(aq);if(ap&&ao!==false){this.pos+=ap[0].length}return ap}},current:function(){return this.string.slice(this.start,this.pos)}};v.StringStream=b;function L(aq,ap,ao,an){this.from=aq;this.to=ap;this.style=ao;this.marker=an}L.prototype={attach:function(an){this.marker.set.push(an)},detach:function(ao){var an=r(this.marker.set,ao);if(an>-1){this.marker.set.splice(an,1)}},split:function(aq,an){if(this.to<=aq&&this.to!=null){return null}var ap=this.fromthis.from&&(aq=ar){this.from=Math.max(aq,this.from)+ap}}if(an&&(arthis.from||this.from==null)){this.to=null}else{if(this.to!=null&&this.to>ar){this.to=aq=this.to},sameSet:function(an){return this.marker==an.marker}};function H(an){this.from=an;this.to=an;this.line=null}H.prototype={attach:function(an){this.line=an},detach:function(an){if(this.line==an){this.line=null}},split:function(ao,an){if(aothis.to},clipTo:function(ao,ar,an,aq,ap){if((ao||arthis.to)){this.from=0;this.to=-1}else{if(this.from>ar){this.from=this.to=Math.max(aq,this.from)+ap}}},sameSet:function(an){return false},find:function(){if(!this.line||!this.line.parent){return null}return{line:Z(this.line),ch:this.from}},clear:function(){if(this.line){var an=r(this.line.marked,this);if(an!=-1){this.line.marked.splice(an,1)}this.line=null}}};function e(ao,an){this.styles=an||[ao,null];this.text=ao;this.height=1;this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null;this.stateAfter=this.parent=this.hidden=null}e.inheritMarks=function(ar,av){var aq=new e(ar),an=av&&av.marked;if(an){for(var ap=0;ap5000){ay[av++]=this.text.slice(ax.pos);ay[av++]=null;break}}if(ay.length!=av){ay.length=av;ar=true}if(av&&ay[av-2]!=aw){ar=true}return ar||(ay.length<5&&this.text.length<10?null:false)},getTokenAt:function(at,aq,ap){var an=this.text,ar=new b(an);while(ar.pos',aY,"")}else{ay.push(aY)}}var aM=aJ;if(an!=null){var aH=0,aC='';aM=function(aX,aW){var aV=aX.length;if(an>=aH&&anaH){aJ(aX.slice(0,an-aH),aW);if(ar){ay.push("")}}ay.push(aC);aJ(aX.slice(an-aH),aW);ay.push(" ");an--;aH+=aV}else{aH+=aV;aJ(aX,aW);if(aH==an&&aH==aR){ay.push(aC+"")}else{if(aH>an+10&&/\s/.test(aX)){aM=function(){}}}}}}var aG=this.styles,ax=this.text,aD=this.marked;var aR=ax.length;function at(aV){if(!aV){return null}return"cm-"+aV.replace(/ +/g," cm-")}if(!ax&&an==null){aM(" ")}else{if(!aD||!aD.length){for(var aO=0,az=0;azaR){aF=aF.slice(0,aR-az)}az+=aI;aM(aF,at(aQ))}}else{var av=0,aO=0,aB="",aQ,aU=0;var aT=aD[0].from||0,aL=[],aS=0;function aP(){var aV;while(aSaA?aB.slice(0,aA-av):aB,ao);if(aq>=aA){aB=aB.slice(aA-av);av=aA;break}av=aq}aB=aG[aO++];aQ=at(aG[aO++])}}}}return ay.join("")},cleanUp:function(){this.parent=null;if(this.marked){for(var an=0,ao=this.marked.length;anau){aw.push(ap.slice(au-at,Math.min(ap.length,av-at)),an[ar+1])}if(aq>=au){ao=1}}else{if(ao==1){if(aq>av){aw.push(ap.slice(0,av-at),an[ar+1])}else{aw.push(ap,an[ar+1])}}}at=aq}}function ai(ao){this.lines=ao;this.parent=null;for(var ap=0,aq=ao.length,an=0;ap50){while(an.lines.length>50){var aq=an.lines.splice(an.lines.length-25,25);var av=new ai(aq);an.height-=av.height;this.children.splice(ap+1,0,av);av.parent=this}this.maybeSpill()}break}ao-=au}},maybeSpill:function(){if(this.children.length<=10){return}var aq=this;do{var ao=aq.children.splice(aq.children.length-5,5);var ap=new i(ao);if(!aq.parent){var ar=new i(aq.children);ar.parent=aq;aq.children=[ar,ap];aq=ar}else{aq.size-=ap.size;aq.height-=ap.height;var an=r(aq.parent.children,aq);aq.parent.children.splice(an+1,0,ap)}ap.parent=aq.parent}while(aq.children.length>10);aq.parent.maybeSpill()},iter:function(ap,ao,an){this.iterN(ap,ao-ap,an)},iterN:function(an,aw,av){for(var ao=0,ar=this.children.length;ao400||!aw||this.closed||aw.start>an+ao.length||aw.start+aw.added0;--aq){aw.old.unshift(ao[aq-1])}for(var aq=ax;aq>0;--aq){aw.old.push(ao[ao.length-aq])}if(au){aw.start=an}aw.added+=at-(ao.length-au-ax)}}this.time=ap},startCompound:function(){if(!this.compound++){this.closed=true}},endCompound:function(){if(!--this.compound){this.closed=true}}};function K(){x(this)}function P(an){if(!an.stop){an.stop=K}return an}function U(an){if(an.preventDefault){an.preventDefault()}else{an.returnValue=false}}function E(an){if(an.stopPropagation){an.stopPropagation()}else{an.cancelBubble=true}}function x(an){U(an);E(an)}v.e_stop=x;v.e_preventDefault=U;v.e_stopPropagation=E;function j(an){return an.target||an.srcElement}function y(an){if(an.which){return an.which}else{if(an.button&1){return 1}else{if(an.button&2){return 3}else{if(an.button&4){return 2}}}}}function z(ao,ap){var an=ao.override&&ao.override.hasOwnProperty(ap);return an?ao.override[ap]:ao[ap]}function s(aq,ap,ao,an){if(typeof aq.addEventListener=="function"){aq.addEventListener(ap,ao,false);if(an){return function(){aq.removeEventListener(ap,ao,false)}}}else{var ar=function(at){ao(at||window.event)};aq.attachEvent("on"+ap,ar);if(an){return function(){aq.detachEvent("on"+ap,ar)}}}}v.connect=s;function A(){this.id=null}A.prototype={set:function(an,ao){clearTimeout(this.id);this.id=setTimeout(ao,an)}};var ac=v.Pass={toString:function(){return"CodeMirror.Pass"}};var O=/gecko\/\d{7}/i.test(navigator.userAgent);var J=/MSIE \d/.test(navigator.userAgent);var C=/MSIE [1-8]\b/.test(navigator.userAgent);var F=J&&document.documentMode==5;var f=/WebKit\//.test(navigator.userAgent);var ag=/Chrome\//.test(navigator.userAgent);var h=/Apple Computer/.test(navigator.vendor);var m=/KHTML\//.test(navigator.userAgent);var G=function(){if(C){return false}var an=document.createElement("div");return"draggable" in an||"dragDrop" in an}();var d=function(){var an=document.createElement("textarea");an.value="foo\nbar";if(an.value.indexOf("\r")>-1){return"\r\n"}return"\n"}();var o=/^$/;if(O){o=/$'/}else{if(h){o=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/}else{if(ag){o=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/}}}function n(ao,an,aq){if(an==null){an=ao.search(/[^\s\u00a0]/);if(an==-1){an=ao.length}}for(var ap=0,ar=0;ap=0&&an>=0;--ao,--an){if(aq.charAt(ao)!=ap.charAt(an)){break}}return an+1}function r(aq,an){if(aq.indexOf){return aq.indexOf(an)}for(var ao=0,ap=aq.length;ao-1){an.push(ap.slice(aq,ap.charAt(ao-1)=="\r"?ao-1:ao));aq=ao+1}an.push(ap.slice(aq));return an}:function(an){return an.split(/\r?\n/)};v.splitLines=B;var af=window.getSelection?function(ao){try{return ao.selectionStart!=ao.selectionEnd}catch(an){return false}}:function(ap){try{var an=ap.ownerDocument.selection.createRange()}catch(ao){}if(!an||an.parentElement()!=ap){return false}return an.compareEndPoints("StartToEnd",an)!=0};v.defineMode("null",function(){return{token:function(an){an.skipToEnd()}}});v.defineMIME("text/plain","null");var S={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};v.keyNames=S;(function(){for(var an=0;an<10;an++){S[an+48]=String(an)}for(var an=65;an<=90;an++){S[an]=String.fromCharCode(an)}for(var an=1;an<=12;an++){S[an+111]=S[an+63235]="F"+an}})();return v})();CodeMirror.defineMode("javascript",function(J,N){var w=J.indentUnit;var R=N.json;var b=function(){function X(aa){return{type:aa,style:"keyword"}}var U=X("keyword a"),Z=X("keyword b"),Y=X("keyword c");var V=X("operator"),W={type:"atom",style:"atom"};return{"if":U,"while":U,"with":U,"else":Z,"do":Z,"try":Z,"finally":Z,"return":Y,"break":Y,"continue":Y,"new":Y,"delete":Y,"throw":Y,"var":X("var"),"const":X("var"),let:X("var"),"function":X("function"),"catch":X("catch"),"for":X("for"),"switch":X("switch"),"case":X("case"),"default":X("default"),"in":V,"typeof":V,"instanceof":V,"true":W,"false":W,"null":W,"undefined":W,"NaN":W,"Infinity":W}}();var O=/[+\-*&%=<>!?|]/;function S(W,V,U){V.tokenize=U;return U(W,V)}function h(X,U){var W=false,V;while((V=X.next())!=null){if(V==U&&!W){return false}W=!W&&V=="\\"}return W}var T,p;function C(W,V,U){T=W;p=U;return V}function l(Y,W){var U=Y.next();if(U=='"'||U=="'"){return S(Y,W,A(U))}else{if(/[\[\]{}\(\),;\:\.]/.test(U)){return C(U)}else{if(U=="0"&&Y.eat(/x/i)){Y.eatWhile(/[\da-f]/i);return C("number","number")}else{if(/\d/.test(U)){Y.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return C("number","number")}else{if(U=="/"){if(Y.eat("*")){return S(Y,W,f)}else{if(Y.eat("/")){Y.skipToEnd();return C("comment","comment")}else{if(W.reAllowed){h(Y,"/");Y.eatWhile(/[gimy]/);return C("regexp","string-2")}else{Y.eatWhile(O);return C("operator",null,Y.current())}}}}else{if(U=="#"){Y.skipToEnd();return C("error","error")}else{if(O.test(U)){Y.eatWhile(O);return C("operator",null,Y.current())}else{Y.eatWhile(/[\w\$_]/);var X=Y.current(),V=b.propertyIsEnumerable(X)&&b[X];return(V&&W.kwAllowed)?C(V.type,V.style,X):C("variable","variable",X)}}}}}}}}function A(U){return function(W,V){if(!h(W,U)){V.tokenize=l}return C("string","string")}}function f(X,W){var U=false,V;while(V=X.next()){if(V=="/"&&U){W.tokenize=l;break}U=(V=="*")}return C("comment","comment")}var k={atom:true,number:true,variable:true,string:true,regexp:true};function u(Z,V,U,Y,W,X){this.indented=Z;this.column=V;this.type=U;this.prev=W;this.info=X;if(Y!=null){this.align=Y}}function x(W,V){for(var U=W.localVars;U;U=U.next){if(U.name==V){return true}}}function F(Y,V,U,X,Z){var aa=Y.cc;v.state=Y;v.stream=Z;v.marked=null,v.cc=aa;if(!Y.lexical.hasOwnProperty("align")){Y.lexical.align=true}while(true){var W=aa.length?aa.pop():R?y:z;if(W(U,X)){while(aa.length&&aa[aa.length-1].lex){aa.pop()()}if(v.marked){return v.marked}if(U=="variable"&&x(Y,X)){return"variable-2"}return V}}}var v={state:null,column:null,marked:null,cc:null};function a(){for(var U=arguments.length-1;U>=0;U--){v.cc.push(arguments[U])}}function H(){a.apply(null,arguments);return true}function m(V){var W=v.state;if(W.context){v.marked="def";for(var U=W.localVars;U;U=U.next){if(U.name==V){return}}W.localVars={name:V,next:W.localVars}}}var E={name:"this",next:{name:"arguments"}};function t(){if(!v.state.context){v.state.localVars=E}v.state.context={prev:v.state.context,vars:v.state.localVars}}function s(){v.state.localVars=v.state.context.vars;v.state.context=v.state.context.prev}function j(V,W){var U=function(){var X=v.state;X.lexical=new u(X.indented,v.stream.column(),V,null,X.lexical,W)};U.lex=true;return U}function G(){var U=v.state;if(U.lexical.prev){if(U.lexical.type==")"){U.indented=U.lexical.indented}U.lexical=U.lexical.prev}}G.lex=true;function c(V){return function U(W){if(W==V){return H()}else{if(V==";"){return a()}else{return H(arguments.callee)}}}}function z(U){if(U=="var"){return H(j("vardef"),K,c(";"),G)}if(U=="keyword a"){return H(j("form"),y,z,G)}if(U=="keyword b"){return H(j("form"),z,G)}if(U=="{"){return H(j("}"),n,G)}if(U==";"){return H()}if(U=="function"){return H(i)}if(U=="for"){return H(j("form"),c("("),j(")"),g,c(")"),G,z,G)}if(U=="variable"){return H(j("stat"),D)}if(U=="switch"){return H(j("form"),y,j("}","switch"),c("{"),n,G,G)}if(U=="case"){return H(y,c(":"))}if(U=="default"){return H(c(":"))}if(U=="catch"){return H(j("form"),t,c("("),r,c(")"),z,G,s)}return a(j("stat"),y,c(";"),G)}function y(U){if(k.hasOwnProperty(U)){return H(M)}if(U=="function"){return H(i)}if(U=="keyword c"){return H(B)}if(U=="("){return H(j(")"),B,c(")"),G,M)}if(U=="operator"){return H(y)}if(U=="["){return H(j("]"),P(y,"]"),G,M)}if(U=="{"){return H(j("}"),P(o,"}"),G,M)}return H()}function B(U){if(U.match(/[;\}\)\],]/)){return a()}return a(y)}function M(U,V){if(U=="operator"&&/\+\+|--/.test(V)){return H(M)}if(U=="operator"||U==":"){return H(y)}if(U==";"){return}if(U=="("){return H(j(")"),P(y,")"),G,M)}if(U=="."){return H(Q,M)}if(U=="["){return H(j("]"),y,c("]"),G,M)}}function D(U){if(U==":"){return H(G,z)}return a(M,c(";"),G)}function Q(U){if(U=="variable"){v.marked="property";return H()}}function o(U){if(U=="variable"){v.marked="property"}if(k.hasOwnProperty(U)){return H(c(":"),y)}}function P(W,U){function V(Y){if(Y==","){return H(W,V)}if(Y==U){return H()}return H(c(U))}return function X(Y){if(Y==U){return H()}else{return a(W,V)}}}function n(U){if(U=="}"){return H()}return a(z,n)}function K(U,V){if(U=="variable"){m(V);return H(I)}return H()}function I(U,V){if(V=="="){return H(y,I)}if(U==","){return H(K)}}function g(U){if(U=="var"){return H(K,e)}if(U==";"){return a(e)}if(U=="variable"){return H(L)}return a(e)}function L(U,V){if(V=="in"){return H(y)}return H(M,e)}function e(U,V){if(U==";"){return H(d)}if(V=="in"){return H(y)}return H(y,c(";"),d)}function d(U){if(U!=")"){H(y)}}function i(U,V){if(U=="variable"){m(V);return H(i)}if(U=="("){return H(j(")"),t,P(r,")"),G,z,s)}}function r(U,V){if(U=="variable"){m(V);return H()}}return{startState:function(U){return{tokenize:l,reAllowed:true,kwAllowed:true,cc:[],lexical:new u((U||0)-w,0,"block",false),localVars:N.localVars,context:N.localVars&&{vars:N.localVars},indented:0}},token:function(W,V){if(W.sol()){if(!V.lexical.hasOwnProperty("align")){V.lexical.align=false}V.indented=W.indentation()}if(W.eatSpace()){return null}var U=V.tokenize(W,V);if(T=="comment"){return U}V.reAllowed=!!(T=="operator"||T=="keyword c"||T.match(/^[\[{}\(,;:]$/));V.kwAllowed=T!=".";return F(V,U,T,p,W)},indent:function(Z,U){if(Z.tokenize!=l){return 0}var Y=U&&U.charAt(0),W=Z.lexical;if(W.type=="stat"&&Y=="}"){W=W.prev}var X=W.type,V=Y==X;if(X=="vardef"){return W.indented+4}else{if(X=="form"&&Y=="{"){return W.indented}else{if(X=="stat"||X=="form"){return W.indented+w}else{if(W.info=="switch"&&!V){return W.indented+(/^(?:case|default)\b/.test(U)?w:2*w)}else{if(W.align){return W.column+(V?0:1)}else{return W.indented+(V?0:w)}}}}}},electricChars:":{}"}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMode("xml",function(z,k){var s=z.indentUnit;var y=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:false}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=k.alignCDATA;var f,g;function o(F,E){function C(H){E.tokenize=H;return H(F,E)}var D=F.next();if(D=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return C(x("atom","]]>"))}else{return null}}else{if(F.match("--")){return C(x("comment","-->"))}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return C(A(1))}else{return null}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=x("meta","?>");return"meta"}else{g=F.eat("/")?"closeTag":"openTag";F.eatSpace();f="";var G;while((G=F.eat(/[^\s\u00a0=<>\"\'\/?]/))){f+=G}E.tokenize=n;return"tag"}}}else{if(D=="&"){var B;if(F.eat("#")){if(F.eat("x")){B=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";")}else{B=F.eatWhile(/[\d]/)&&F.eat(";")}}else{B=F.eatWhile(/[\w\.\-:]/)&&F.eat(";")}return B?"atom":"error"}else{F.eatWhile(/[^&<]/);return null}}}function n(D,C){var B=D.next();if(B==">"||(B=="/"&&D.eat(">"))){C.tokenize=o;g=B==">"?"endTag":"selfcloseTag";return"tag"}else{if(B=="="){g="equals";return null}else{if(/[\'\"]/.test(B)){C.tokenize=j(B);return C.tokenize(D,C)}else{D.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}}}}function j(B){return function(D,C){while(!D.eol()){if(D.next()==B){C.tokenize=n;break}}return"string"}}function x(C,B){return function(E,D){while(!E.eol()){if(E.match(B)){D.tokenize=o;break}E.next()}return C}}function A(B){return function(E,D){var C;while((C=E.next())!=null){if(C=="<"){D.tokenize=A(B+1);return D.tokenize(E,D)}else{if(C==">"){if(B==1){D.tokenize=o;break}else{D.tokenize=A(B-1);return D.tokenize(E,D)}}}}return"meta"}}var l,h;function b(){for(var B=arguments.length-1;B>=0;B--){l.cc.push(arguments[B])}}function e(){b.apply(null,arguments);return true}function i(B,D){var C=y.doNotIndent.hasOwnProperty(B)||(l.context&&l.context.noIndent);l.context={prev:l.context,tagName:B,indent:l.indented,startOfLine:D,noIndent:C}}function v(){if(l.context){l.context=l.context.prev}}function d(B){if(B=="openTag"){l.tagName=f;return e(m,c(l.startOfLine))}else{if(B=="closeTag"){var C=false;if(l.context){if(l.context.tagName!=f){if(y.implicitlyClosed.hasOwnProperty(l.context.tagName.toLowerCase())){v()}C=!l.context||l.context.tagName!=f}}else{C=true}if(C){h="error"}return e(t(C))}}return e()}function c(B){return function(C){if(C=="selfcloseTag"||(C=="endTag"&&y.autoSelfClosers.hasOwnProperty(l.tagName.toLowerCase()))){r(l.tagName.toLowerCase());return e()}if(C=="endTag"){r(l.tagName.toLowerCase());i(l.tagName,B);return e()}return e()}}function t(B){return function(C){if(B){h="error"}if(C=="endTag"){v();return e()}h="error";return e(arguments.callee)}}function r(C){var B;while(true){if(!l.context){return}B=l.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(B)||!y.contextGrabbers[B].hasOwnProperty(C)){return}v()}}function m(B){if(B=="word"){h="attribute";return e(p,m)}if(B=="endTag"||B=="selfcloseTag"){return b()}h="error";return e(m)}function p(B){if(B=="equals"){return e(w,m)}if(!y.allowMissing){h="error"}return(B=="endTag"||B=="selfcloseTag")?b():e()}function w(B){if(B=="string"){return e(u)}if(B=="word"&&y.allowUnquoted){h="string";return e()}h="error";return(B=="endTag"||B=="selfCloseTag")?b():e()}function u(B){if(B=="string"){return e(u)}else{return b()}}return{startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:true,tagName:null,context:null}},token:function(E,D){if(E.sol()){D.startOfLine=true;D.indented=E.indentation()}if(E.eatSpace()){return null}h=g=f=null;var C=D.tokenize(E,D);D.type=g;if((C||g)&&C!="comment"){l=D;while(true){var B=D.cc.pop()||d;if(B(g||C)){break}}}D.startOfLine=false;return h||C},indent:function(E,B,D){var C=E.context;if((E.tokenize!=n&&E.tokenize!=o)||C&&C.noIndent){return D?D.match(/^(\s*)/)[0].length:0}if(a&&/`]+/;function e(J,I,H){I.f=I.inline=H;return H(J,I)}function s(J,I,H){I.f=I.block=H;return H(J,I)}function o(H){H.em=false;H.strong=false;return null}function l(J,I){var H;if(I.indentationDiff>=4){I.indentation-=I.indentationDiff;J.skipToEnd();return d}else{if(J.eatSpace()){return null}else{if(J.peek()==="#"||J.match(n)){I.header=true}else{if(J.eat(">")){I.indentation++;I.quote=true}else{if(J.peek()==="["){return e(J,I,k)}else{if(J.match(G,true)){return F}else{if(H=J.match(p,true)||J.match(v,true)){I.indentation+=H[0].length;return A}}}}}}}return e(J,I,I.inline)}function y(J,I){var H=i.token(J,I.htmlState);if(H==="tag"&&I.htmlState.type!=="openTag"&&!I.htmlState.context){I.f=r;I.block=l}return H}function u(I){var H=[];if(I.strong){H.push(I.em?x:j)}else{if(I.em){H.push(g)}}if(I.header){H.push(z)}if(I.quote){H.push(B)}return H.length?H.join(" "):null}function b(I,H){if(I.match(f,true)){return u(H)}return undefined}function r(L,K){var J=K.text(L,K);if(typeof J!=="undefined"){return J}var I=L.next();if(I==="\\"){L.next();return u(K)}if(I==="`"){return e(L,K,w(d,"`"))}if(I==="["){return e(L,K,D)}if(I==="<"&&L.match(/^\w/,false)){L.backUp(1);return s(L,K,y)}var H=u(K);if(I==="*"||I==="_"){if(L.eat(I)){return(K.strong=!K.strong)?u(K):H}return(K.em=!K.em)?u(K):H}return u(K)}function D(J,I){while(!J.eol()){var H=J.next();if(H==="\\"){J.next()}if(H==="]"){I.inline=I.f=h;return t}}return t}function h(J,I){J.eatSpace();var H=J.next();if(H==="("||H==="["){return e(J,I,w(E,H==="("?")":"]"))}return"error"}function k(I,H){if(I.match(/^[^\]]*\]:/,true)){H.f=a;return t}return e(I,H,r)}function a(I,H){I.eatSpace();I.match(/^[^\s]+/,true);H.f=H.inline=r;return E}function c(H){if(!c[H]){c[H]=new RegExp("^(?:[^\\\\\\"+H+"]|\\\\.)*(?:\\"+H+"|$)")}return c[H]}function w(I,J,H){H=H||r;return function(L,K){L.match(c(J));K.inline=K.f=H;return I}}return{startState:function(){return{f:l,block:l,htmlState:i.startState(),indentation:0,inline:r,text:b,em:false,strong:false,header:false,quote:false}},copyState:function(H){return{f:H.f,block:H.block,htmlState:CodeMirror.copyState(i,H.htmlState),indentation:H.indentation,inline:H.inline,text:H.text,em:H.em,strong:H.strong,header:H.header,quote:H.quote}},token:function(J,I){if(J.sol()){if(J.match(/^\s*$/,true)){return o(I)}I.header=false;I.quote=false;I.f=I.block;var H=J.match(/^\s*/,true)[0].replace(/\t/g," ").length;I.indentationDiff=H-I.indentation;I.indentation=H;if(H>0){return null}}return I.f(J,I)},blankLine:o,getType:u}},"xml");CodeMirror.defineMIME("text/x-markdown","markdown");Ext.define("Docs.History",{singleton:true,init:function(){Ext.util.History.useTopWindow=false;Ext.util.History.init(function(){this.historyLoaded=true;this.initialNavigate()},this);Ext.util.History.on("change",function(b){this.navigate(b,true)},this)},notifyTabsLoaded:function(){this.tabsLoaded=true;this.initialNavigate()},initialNavigate:function(){if(this.tabsLoaded&&this.historyLoaded){this.navigate(Ext.util.History.getToken(),true)}},navigate:function(e,g){var f=this.parseToken(e);if(f.url=="#!/api"){Docs.App.getController("Classes").loadIndex(g)}else{if(f.type==="api"){Docs.App.getController("Classes").loadClass(f.url,g)}else{if(f.url==="#!/guide"){Docs.App.getController("Guides").loadIndex(g)}else{if(f.type==="guide"){Docs.App.getController("Guides").loadGuide(f.url,g)}else{if(f.url==="#!/video"){Docs.App.getController("Videos").loadIndex(g)}else{if(f.type==="video"){Docs.App.getController("Videos").loadVideo(f.url,g)}else{if(f.url==="#!/example"){Docs.App.getController("Examples").loadIndex()}else{if(f.type==="example"){Docs.App.getController("Examples").loadExample(f.url,g)}else{if(f.url==="#!/comment"){Docs.App.getController("Comments").loadIndex()}else{if(f.url==="#!/tests"){Docs.App.getController("Tests").loadIndex()}else{if(Docs.App.getController("Welcome").isActive()){Docs.App.getController("Welcome").loadIndex(g)}else{if(!this.noRepeatNav){this.noRepeatNav=true;var h=Ext.getCmp("doctabs").staticTabs[0];if(h){this.navigate(h.href,g)}}}}}}}}}}}}}},parseToken:function(d){var c=d&&d.match(/!?(\/(api|guide|example|video|comment|tests)(\/(.*))?)/);return c?{type:c[2],url:"#!"+c[1]}:{}},push:function(e,f){e=this.cleanUrl(e);if(!/^#!?/.test(e)){e="#!"+e}var d=Ext.util.History.getToken()||"";if("#"+d.replace(/^%21/,"!")!==e){Ext.util.History.add(e)}},cleanUrl:function(b){return b.replace(/^[^#]*#/,"#")}});Ext.define("Docs.view.examples.Container",{extend:"Ext.container.Container",alias:"widget.examplecontainer",layout:"fit",initComponent:function(){this.tpl=new Ext.XTemplate('');this.callParent(arguments)},load:function(b){this.update(this.tpl.apply(b))},clear:function(){this.update("")}});Ext.define("Docs.controller.Content",{extend:"Ext.app.Controller",MIDDLE:1,title:"",loadIndex:function(b){b||Docs.History.push(this.baseUrl);this.getViewport().setPageTitle(this.title);Ext.getCmp("doctabs").activateTab(this.baseUrl);Ext.getCmp("card-panel").layout.setActiveItem(this.getIndex());this.getIndex().restoreScrollState()},opensNewWindow:function(b){return b.button===this.MIDDLE||b.shiftKey||b.ctrlKey},getBaseUrl:function(){return document.location.href.replace(/\/?(index.html|template.html)?#.*/,"")}});Ext.define("Docs.CommentCounts",{constructor:function(b){this.counts={};Ext.Array.each(b,function(a){this.counts[a._id]=a.value},this)},get:function(b){return this.counts[b.join("__")]||0},change:function(c,d){delete this.totals;return this.counts[c.join("__")]=this.get(c)+d},getClassTotal:function(b){if(!this.totals){this.totals={};Ext.Object.each(this.counts,function(a,f){var e=a.split("__");if(e[0]==="class"){this.totals[e[1]]=(this.totals[e[1]]||0)+f}},this)}return this.totals[b]}});Ext.define("Docs.CommentSubscriptions",{constructor:function(b){this.subscriptions={};Ext.Array.each(b,function(a){this.subscriptions[a.join("__")]=true},this)},has:function(b){return this.subscriptions[b.join("__")]},set:function(c,d){this.subscriptions[c.join("__")]=d}});Ext.define("Docs.Auth",{singleton:true,requires:["Ext.Ajax","Ext.util.Cookies"],init:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/session",params:{sid:this.getSid()},method:"GET",cors:true,callback:function(g,a,h){if(h&&h.responseText){var b=Ext.JSON.decode(h.responseText);if(b&&b.sessionID){this.setSid(b.sessionID)}if(b&&b.userName){this.currentUser=b}c.call(d,true)}else{c.call(d,false)}},scope:this})},login:function(b){Ext.Ajax.request({url:Docs.data.commentsUrl+"/login",method:"POST",cors:true,params:{username:b.username,password:b.password},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(g.success){this.currentUser=g;this.setSid(g.sessionID,b.remember);b.success&&b.success.call(b.scope)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})},logout:function(c,d){Ext.Ajax.request({url:Docs.data.commentsUrl+"/logout?sid="+this.getSid(),method:"POST",cors:true,callback:function(){this.currentUser=undefined;c&&c.call(d)},scope:this})},setSid:function(d,f){this.sid=d;if(d){var e=null;if(f){e=new Date();e.setTime(e.getTime()+(60*60*24*30*1000))}Ext.util.Cookies.set("sid",d,e)}else{Ext.util.Cookies.clear("sid")}},getSid:function(){if(!this.sid){this.sid=Ext.util.Cookies.get("sid")}return this.sid},getUser:function(){return this.currentUser},isLoggedIn:function(){return !!this.getUser()},isModerator:function(){return this.getUser()&&this.getUser().mod},getRegistrationUrl:function(){return Docs.data.commentsUrl+"/register"}});Ext.define("Docs.view.TabMenu",{extend:"Ext.menu.Menu",plain:true,componentCls:"tab-menu",initComponent:function(){this.addEvents("tabItemClick","closeAllTabs");this.items=[{text:"Close other tabs",iconCls:"close",cls:"close-all",handler:function(){this.fireEvent("closeAllTabs")},scope:this}];this.callParent()},addTab:function(c,d){this.insert(this.items.length-1,{text:c.text,iconCls:c.iconCls,origIcon:c.iconCls,href:c.href,cls:d,handler:this.onTabItemClick,scope:this})},onTabItemClick:function(b){this.fireEvent("tabItemClick",b)},addTabCls:function(c,d){this.items.each(function(a){if(a.href===c.href){a.addCls(d)}})}});Ext.define("Docs.LocalStore",{storeName:"",init:function(){this.localStorage=!!window.localStorage;this.store=Ext.create(this.storeName);if(this.localStorage){this.cleanup();this.store.load();if(window.addEventListener){window.addEventListener("storage",Ext.Function.bind(this.onStorageChange,this),false)}else{window.attachEvent("onstorage",Ext.Function.bind(this.onStorageChange,this))}}},onStorageChange:function(b){b=b||window.event;if(b.key===this.store.getProxy().id){this.store.load()}},syncStore:function(){this.localStorage&&this.store.sync()},cleanup:function(){var f=/-settings/;for(var d=0;d$&");c.fullName=c.fullName.replace(d,"$& ");return c}});Ext.define("Docs.store.Search",{extend:"Ext.data.Store",fields:["name","fullName","icon","url","meta","sort"],proxy:{type:"memory",reader:{type:"json"}}});Ext.define("Docs.view.search.Dropdown",{extend:"Ext.view.View",alias:"widget.searchdropdown",floating:true,autoShow:false,autoRender:true,toFrontOnShow:true,focusOnToFront:false,store:"Search",id:"search-dropdown",overItemCls:"x-view-over",trackOver:true,itemSelector:"div.item",singleSelect:true,pageStart:0,pageSize:10,initComponent:function(){this.addEvents("changePage","footerClick");this.tpl=new Ext.XTemplate('','','
','
{[this.getMetaTags(values.meta)]}
','
{name}
','
{fullName}
',"
"," ",'",{getCls:function(b){return b["private"]?"private":(b.removed?"removed":"")},getMetaTags:function(b){return Ext.Array.map(Docs.data.signatures,function(a){return b[a.key]?''+(a["short"])+" ":""}).join(" ")},getTotal:Ext.bind(this.getTotal,this),getStart:Ext.bind(this.getStart,this),getEnd:Ext.bind(this.getEnd,this)});this.on("afterrender",function(){this.el.addListener("click",function(){this.fireEvent("changePage",this,-1)},this,{preventDefault:true,delegate:".prev"});this.el.addListener("click",function(){this.fireEvent("changePage",this,+1)},this,{preventDefault:true,delegate:".next"});this.el.addListener("click",function(){this.fireEvent("footerClick",this)},this,{delegate:".footer"})},this);this.callParent(arguments)},setTotal:function(b){this.total=b},getTotal:function(){return this.total},setStart:function(b){this.pageStart=b},getStart:function(b){return this.pageStart},getEnd:function(c){var d=this.pageStart+this.pageSize;return d>this.total?this.total:d}});Ext.define("Docs.Syntax",{singleton:true,highlight:function(b){Ext.Array.forEach(Ext.query("pre",b.dom||b),function(a){a=Ext.get(a);if(a.child("code")){if(!(a.hasCls("inline-example")&&a.hasCls("preview"))){a.addCls("prettyprint")}}else{if(!a.parent(".CodeMirror")&&!a.hasCls("hierarchy")){a.addCls("notpretty")}}});prettyPrint()}});Ext.define("Docs.view.cls.Header",{extend:"Ext.container.Container",padding:"10 0 17 0",height:55,alias:"widget.classheader",cls:"classheader",initComponent:function(){this.tpl=Ext.create("Ext.XTemplate",'','','{name}','View source... '," ","",'{name} '," ",'',"singleton "," ","",'enum of {[values["enum"].type]} '," ","{[this.renderAliases(values.aliases)]}","{[this.renderMetaTags(values.meta)]}"," ",'','Print '," ",{getClass:function(b){if(b.singleton){return"singleton"}else{if(b.component){return"component"}else{return"class"}}},renderAliases:function(e){var f={widget:"xtype",plugin:"ptype",feature:"ftype"};var d=[];e&&Ext.Object.each(e,function(a,b){d.push((f[a]||a)+": "+b.join(", "))});if(d.length>0){return""+d.join(", ")+" "}else{return""}},renderMetaTags:function(b){return" "+Ext.Array.map(Docs.data.signatures,function(a){return b[a.key]?''+(a["long"])+" ":""}).join(" ")}});if(Docs.data.source){this.on("render",this.initSourceLink,this)}this.callParent()},initSourceLink:function(){this.classLinkEvent("click",function(){var d=this.loadedCls.files;if(d.length===1){window.open("source/"+d[0].href)}else{var c=this.createFileMenu(d);c.showBy(this,undefined,[58,-20])}},this);this.classLinkEvent("mouseover",function(){this.el.down(".class-source-tip").addCls("hover")},this);this.classLinkEvent("mouseout",function(){this.el.down(".class-source-tip").removeCls("hover")},this)},classLinkEvent:function(d,e,f){this.el.on(d,e,f,{preventDefault:true,delegate:"a.class-source-link"})},createFileMenu:function(b){return new Ext.menu.Menu({items:Ext.Array.map(b,function(a){return{text:a.filename,handler:function(){window.open("source/"+a.href)}}},this)})},load:function(b){this.loadedCls=b;this.update(this.tpl.apply(b))}});Ext.define("Docs.view.Scrolling",{onClassMixedIn:function(b){Ext.Function.interceptBefore(b.prototype,"initComponent",this.prototype.initScrolling)},initScrolling:function(){this.scrollContext="index";this.scrollState={};this.on("afterrender",function(){this.getScrollEl().addListener("scroll",this.saveScrollState,this)},this)},setScrollContext:function(b){this.scrollContext=b},eraseScrollContext:function(b){delete this.scrollState[b]},saveScrollState:function(){this.scrollState[this.scrollContext]=this.getScrollTop()},restoreScrollState:function(){this.setScrollTop(this.scrollState[this.scrollContext]||0)},scrollToView:function(d,c){d=Ext.get(d);c=c||{};if(d){this.setScrollTop(this.getScrollTop()+d.getY()+(c.offset||0));c.highlight&&d.highlight()}},getScrollTop:function(){return this.getScrollEl().getScroll()["top"]},setScrollTop:function(b){return this.getScrollEl().scrollTo("top",b)},scrollToTop:function(){this.getScrollEl().scrollTo("top")},getScrollEl:function(){return this.body||this.el}});Ext.define("Docs.ContentGrabber",{singleton:true,get:function(f){var e;var d=Ext.get(f);if(d){e=d.dom.innerHTML;d.remove()}return e}});Ext.define("Docs.view.comments.HeaderMenu",{extend:"Ext.container.Container",alias:"widget.commentsHeaderMenu",componentCls:"comments-header-menu",html:[""].join(""),afterRender:function(){this.callParent(arguments);Ext.Array.forEach(["users","targets","tags"],function(d){var c=this.getEl().down("a."+d);c.on("click",function(b,a){this.getEl().select("a",true).removeCls("selected");c.addCls("selected");this.fireEvent("select",d)},this,{preventDefault:true})},this)}});Ext.define("Docs.view.examples.Device",{config:{url:"",id:undefined,device:"phone",orientation:"landscape"},constructor:function(b){this.initConfig(b);Ext.apply(this,this.getIframeSize());this.id=this.id||Ext.id();this.tpl=new Ext.XTemplate('','',"
",{deviceUrl:function(a){return a.url+"?deviceType="+(a.device==="tablet"?"Tablet":"Phone")}})},toHtml:function(){return this.tpl.apply(this)},setDevice:function(b){this.device=b;Ext.apply(this,this.getIframeSize())},setOrientation:function(b){this.orientation=b;Ext.apply(this,this.getIframeSize())},getIframeSize:function(){var b={phone:{width:"481px",height:"320px"},miniphone:{width:"320px",height:"219px"},tablet:{width:"717px",height:"538px"}}[this.device];if(this.orientation==="landscape"){return b}else{return{width:b.height,height:b.width}}}});Ext.define("Docs.model.Test",{extend:"Ext.data.Model",fields:["id","name","href","code","options",{name:"status",defaultValue:"ready"},"message"]});Ext.define("Docs.model.Setting",{fields:["id","key","value"],extend:"Ext.data.Model",requires:["Ext.data.proxy.LocalStorage"],proxy:{type:window.localStorage?"localstorage":"memory",id:Docs.data.localStorageDb+"-settings"}});Ext.define("Docs.view.DocTree",{extend:"Ext.tree.Panel",alias:"widget.doctree",cls:"doc-tree iScroll",useArrows:true,rootVisible:false,border:false,bodyBorder:false,initComponent:function(){this.addEvents("urlclick");this.root.expanded=true;this.on("itemclick",this.onItemClick,this);this.on("beforeitemcollapse",this.handleBeforeExpandCollapse,this);this.on("beforeitemexpand",this.handleBeforeExpandCollapse,this);this.callParent();this.nodeTpl=new Ext.XTemplate('{text} ');this.initNodeLinks()},initNodeLinks:function(){this.getRootNode().cascadeBy(this.applyNodeTpl,this)},applyNodeTpl:function(b){if(b.get("leaf")){b.set("text",this.nodeTpl.apply({text:b.get("text"),url:b.raw.url}));b.commit()}},onItemClick:function(h,j,k,l,i){var e=j.raw?j.raw.url:j.data.url;if(e){this.fireEvent("urlclick",e,i)}else{if(!j.isLeaf()){if(j.isExpanded()){j.collapse(false)}else{j.expand(false)}}}},selectUrl:function(d){var c=this.findNodeByUrl(d);if(c){c.bubble(function(a){a.expand()});this.getSelectionModel().select(c)}else{this.getSelectionModel().deselectAll()}},findNodeByUrl:function(b){return this.getRootNode().findChildBy(function(a){return b===a.raw.url},this,true)},findRecordByUrl:function(d){var c=this.findNodeByUrl(d);return c?c.raw:undefined},handleBeforeExpandCollapse:function(b){if(this.getView().isAnimating(b)){return false}}});Ext.define("Docs.view.cls.MemberWrap",{constructor:function(b){Ext.apply(this,b);this.el=Ext.get(b.el)},setExpanded:function(b){if(b){if(!this.isExpanded()){this.el.addCls("open")}}else{this.el.removeCls("open")}},isExpanded:function(){return this.el.hasCls("open")},getDefinedIn:function(){return this.el.down(".meta .defined-in").getAttribute("rel")},getMemberId:function(){return this.el.getAttribute("id")}});Ext.define("Docs.view.comments.Pager",{extend:"Ext.Component",alias:"widget.commentsPager",componentCls:"recent-comments-pager",afterRender:function(){this.callParent(arguments);this.getEl().on("click",function(){this.fireEvent("loadMore",this.offset+this.limit)},this,{preventDefault:true,delegate:"a.fetchMoreComments"})},configure:function(b){Ext.apply(this,b);this.update(this.getPagerHtml())},reset:function(){this.update(" No comments found.")},getPagerHtml:function(){var d=this.total_rows||0;var e=this.offset+this.limit;var f=Math.min(this.limit,d-e);if(d>e){return[" ",'"].join("")}else{return" That's all. Total "+d+" comments."}}});Ext.define("Docs.view.comments.FilterField",{extend:"Ext.form.field.Trigger",alias:"widget.commentsFilterField",triggerCls:"reset",componentCls:"comments-filter-field",hideTrigger:true,enableKeyEvents:true,initComponent:function(){this.callParent(arguments);this.on({keyup:this.onKeyUp,specialkey:this.onSpecialKey,scope:this})},onKeyUp:function(){this.fireEvent("filter",this.getValue());this.setHideTrigger(this.getValue().length===0)},onSpecialKey:function(c,d){if(d.keyCode===Ext.EventObject.ESC){this.reset();this.fireEvent("filter","")}},onTriggerClick:function(){this.reset();this.focus();this.fireEvent("filter","");this.setHideTrigger(true)}});Ext.define("Docs.Tip",{singleton:true,show:function(g,e,f){f=f||"right";this.tips=this.tips||{};if(this.tips[f]){var h=this.tips[f];h.update(g);h.setTarget(e);h.show()}else{var h=this.tips[f]=Ext.create("Ext.tip.ToolTip",{anchor:f,target:e,html:g});h.show()}}});Ext.define("Docs.view.examples.InlineToolbar",{extend:"Ext.toolbar.Toolbar",componentCls:"inline-example-tb",height:30,initComponent:function(){this.addEvents("buttonclick");this.items=[{iconCls:"code",padding:"0 2 0 0",margin:"0 3 0 0",text:"Code Editor",handler:this.createEventFirerer("code")},{padding:0,margin:"0 3 0 0",iconCls:"preview",text:"Live Preview",handler:this.createEventFirerer("preview")},"->",{padding:0,margin:0,iconCls:"copy",text:"Select Code",handler:this.createEventFirerer("copy")}];this.callParent(arguments)},createEventFirerer:function(b){return Ext.Function.bind(function(){this.fireEvent("buttonclick",b)},this)},activateButton:function(b){Ext.Array.each(this.query("button"),function(a){a.removeCls("active")});Ext.Array.each(this.query("button[iconCls="+b+"]"),function(a){a.addCls("active")})}});Ext.define("Docs.view.Header",{extend:"Ext.container.Container",alias:"widget.docheader",contentEl:"header-content",initComponent:function(){if(Docs.otherProducts){this.style="cursor: pointer;",this.cls="dropdown";this.menu=Ext.create("Ext.menu.Menu",{renderTo:Ext.getBody(),plain:true,items:Docs.otherProducts})}this.callParent()},listeners:{afterrender:function(b){if(this.menu){b.el.addListener("click",function(d,a){this.menu.showBy(this.el,"bl",[120,0])},this)}}}});Ext.define("Docs.view.examples.InlineEditor",{extend:"Ext.Panel",bodyPadding:2,autoScroll:true,componentCls:"inline-example-editor",initComponent:function(){this.addEvents("init","change");this.on("afterlayout",this.initCodeMirror,this);this.callParent(arguments)},initCodeMirror:function(b){if(!this.codemirror){this.codemirror=CodeMirror(this.body,{mode:"javascript",indentUnit:4,value:this.value,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onChange:Ext.Function.bind(function(a){this.fireEvent("change")},this)});this.fireEvent("init")}},refresh:function(){this.codemirror.refresh()},getValue:function(){return this.codemirror?this.codemirror.getValue():this.value},getHeight:function(){var b=this.el.down(".CodeMirror-lines");return b?b.getHeight():undefined},selectAll:function(){var d=this.codemirror.lineCount()-1;var c=this.codemirror.getLine(d).length;this.codemirror.setSelection({line:0,ch:0},{line:d,ch:c})}});Ext.define("Docs.view.comments.Form",{extend:"Ext.Component",alias:"widget.commentsForm",requires:["Docs.Tip"],tpl:['"],initComponent:function(){this.data={title:this.title,updateComment:(this.content!==undefined),content:this.content,userSubscribed:this.userSubscribed,user:this.user};this.callParent(arguments)},setValue:function(b){this.codeMirror.setValue(b)},afterRender:function(){this.callParent(arguments);this.makeCodeMirror(this.getEl().down("textarea").dom);this.bindEvents()},makeCodeMirror:function(d){var c=true;this.codeMirror=CodeMirror.fromTextArea(d,{mode:"markdown",lineWrapping:true,indentUnit:4,extraKeys:{Tab:"indentMore","Shift-Tab":"indentLess"},onFocus:Ext.Function.bind(function(){if(c&&this.codeMirror.getValue()===""){this.toggleGuide(true)}c=false},this)})},bindEvents:function(){this.getEl().on("click",function(){this.toggleGuide()},this,{preventDefault:true,delegate:"a.toggleCommentGuide"});this.getEl().on("click",function(){this.fireEvent("cancel")},this,{preventDefault:true,delegate:"a.cancelUpdateComment"});this.getEl().on("click",function(){this.fireEvent("submit",this.codeMirror.getValue())},this,{preventDefault:true,delegate:"input.submitComment"});this.getEl().on("click",function(c,d){this.fireEvent("subscriptionChange",Ext.get(d).dom.checked)},this,{delegate:"input.subscriptionCheckbox"})},toggleGuide:function(f){var d=this.getEl().down(".commentGuideTxt");d.setVisibilityMode(Ext.dom.Element.DISPLAY);var e=this.getEl().down(".toggleCommentGuide");if(!d.isVisible()||f===true){d.show(true);e.update("Hide help ↑")}else{d.hide(true);e.update("Show help ↓")}},showSubscriptionMessage:function(d){var e=this.getEl().down("input.subscriptionCheckbox");var f=d?"Updates to this thread will be e-mailed to you":"You have unsubscribed from this thread";Docs.Tip.show(f,e,"bottom")}});Ext.define("Docs.view.SimpleSelectBehavior",{mixins:{observable:"Ext.util.Observable"},constructor:function(c,d){this.mixins.observable.constructor.call(this,{listeners:d});c.on({select:this.onSelect,deselect:this.onDeselect,scope:this})},onSelect:function(c,d){this.selectedItem=d;this.fireEvent("select",d)},onDeselect:function(c,d){this.selectedItem=undefined;Ext.Function.defer(function(){if(!this.selectedItem){this.fireEvent("deselect",d)}},10,this)}});Ext.define("Docs.view.examples.InlinePreview",{extend:"Ext.Panel",requires:["Docs.view.examples.Device"],bodyPadding:"0 10",statics:{iframeCounter:0,getNextIframeId:function(){this.iframeCounter++;return this.iframeCounter.toString()}},options:{},constructor:function(b){b=b||{};b.iframeId=this.self.getNextIframeId();b.id="inline-preview-"+b.iframeId;this.callParent([b]);this.addEvents(["previewsuccess","previewfailure"])},initComponent:function(){this.html=this.getHtml();this.callParent(arguments)},getHtml:function(){if(Docs.data.touchExamplesUi){return Ext.create("Docs.view.examples.Device",{url:"eg-iframe.html",id:this.iframeId,device:this.options.device,orientation:this.options.orientation}).toHtml()}else{var b=new Ext.XTemplate('');return b.apply({id:this.iframeId})}},update:function(h){var f=this.options;var e=Ext.get(this.iframeId);var g=Ext.Function.bind(this.iframeCallback,this);if(e){e.on("load",function(){Ext.Function.defer(function(){e.dom.contentWindow.loadInlineExample(h+"\n",f,g)},100)},this,{single:true});e.dom.src="eg-iframe.html"}},iframeCallback:function(c,d){if(c){this.fireEvent("previewsuccess",this)}else{this.fireEvent("previewfailure",this,d)}},getHeight:function(){return document.getElementById(this.iframeId).parentNode.clientHeight}});Ext.define("Docs.view.cls.Logic",{showPrivateClasses:false,constructor:function(b){Ext.apply(this,b)}});Ext.define("Docs.view.comments.TopLevelDropZone",{extend:"Ext.dd.DropZone",getTargetFromEvent:function(b){return b.getTarget("a.side.toggleComments",10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(b){return !!b.comment.get("parentId")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(e)){this.onValidDrop(e.comment,undefined);return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.view.comments.DragZone",{extend:"Ext.dd.DragZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getDragData:function(f){var d=f.getTarget("img.drag-handle",10);if(d){var e=Ext.fly(d).up(this.view.itemSelector).dom;return{sourceEl:e,repairXY:Ext.fly(e).getXY(),ddel:this.cloneCommentEl(e),comment:this.view.getRecord(e)}}return false},cloneCommentEl:function(e){var f=e.cloneNode(true);var d=Ext.fly(f).down(".comments-list-with-form");d&&d.remove();f.id=Ext.id();return f},getRepairXY:function(){return this.dragData.repairXY}});Ext.define("Docs.view.comments.DropZone",{extend:"Ext.dd.DropZone",constructor:function(d,c){this.view=d;this.callParent([d.getEl(),c])},getTargetFromEvent:function(b){return b.getTarget(this.view.itemSelector,10)},onNodeEnter:function(g,f,h,e){if(this.isValidDropTarget(g,e)){Ext.fly(g).addCls("drop-target-hover")}},onNodeOut:function(g,f,h,e){Ext.fly(g).removeCls("drop-target-hover")},onNodeOver:function(g,f,h,e){if(this.isValidDropTarget(g,e)){return this.dropAllowed}else{return false}},isValidDropTarget:function(d,e){var f=this.view.getRecord(d);return f&&f.get("id")!==e.comment.get("id")},onNodeDrop:function(g,f,h,e){if(this.isValidDropTarget(g,e)){this.onValidDrop(e.comment,this.view.getRecord(g));return true}return false},onValidDrop:Ext.emptyFn});Ext.define("Docs.controller.Welcome",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#welcomeindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.Comments",{extend:"Ext.util.Observable",singleton:true,requires:["Docs.Auth","Docs.CommentCounts","Docs.CommentSubscriptions","Ext.data.JsonP","Ext.Ajax"],init:function(c,d){if(!(Docs.data.commentsUrl&&Docs.data.commentsDomain&&this.isBrowserSupported())){c.call(d);return}Docs.Auth.init(function(a){if(a){this.enabled=true;this.fetchCountsAndSubscriptions(function(f,b){this.counts=new Docs.CommentCounts(f);this.subscriptions=new Docs.CommentSubscriptions(b);c.call(d)},this)}else{c.call(d)}},this)},isBrowserSupported:function(){return("withCredentials" in new XMLHttpRequest())||(Ext.ieVersion>=8)},fetchCountsAndSubscriptions:function(c,d){this.request("jsonp",{url:"/comments_meta",method:"GET",success:function(a){c.call(d,a.comments,a.subscriptions)},scope:this})},loadSubscriptions:function(c,d){this.fetchSubscriptions(function(a){this.subscriptions=new Docs.CommentSubscriptions(a);c.call(d)},this)},clearSubscriptions:function(){this.subscriptions=new Docs.CommentSubscriptions([])},fetchSubscriptions:function(c,d){this.request("jsonp",{url:"/subscriptions",method:"GET",success:function(a){c.call(d,a.subscriptions)},scope:this})},isEnabled:function(){return this.enabled},getCount:function(b){return this.enabled?this.counts.get(b):0},changeCount:function(f,e){var d=this.counts.change(f,e);this.fireEvent("countChange",f,d)},hasSubscription:function(b){return this.subscriptions.has(b)},getClassTotalCount:function(b){return this.counts.getClassTotal(b)},load:function(d,f,e){this.request("jsonp",{url:"/comments",method:"GET",params:{startkey:Ext.JSON.encode(d)},success:f,scope:e})},loadReplies:function(f,d,e){this.request("jsonp",{url:"/replies",method:"GET",params:{parentId:f},success:d,scope:e})},post:function(b){this.request("ajax",{url:"/comments",method:"POST",params:{target:Ext.JSON.encode(b.target),parentId:b.parentId,comment:b.content,url:this.buildPostUrl(b.target)},callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){this.changeCount(b.target,+1);b.callback&&b.callback.call(b.scope,g.comment)}},scope:this})},buildPostUrl:function(i){var f=i[0];var g=i[1];var h=i[2];if(f=="video"){var j="#!/video/"+g}else{if(f=="guide"){var j="#!/guide/"+g}else{var j="#!/api/"+g+(h?"-"+h:"")}}return"http://"+window.location.host+window.location.pathname+j},subscribe:function(h,e,g,f){this.request("ajax",{url:"/subscribe",method:"POST",params:{target:Ext.JSON.encode(h),subscribed:e},callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(a&&b.success){this.subscriptions.set(h,e);g&&g.call(f)}},scope:this})},request:function(c,d){d.url=this.buildRequestUrl(d.url);if(c==="jsonp"){Ext.data.JsonP.request(d)}else{d.cors=true;Ext.Ajax.request(d)}},buildRequestUrl:function(b){b=Docs.data.commentsUrl+"/"+Docs.data.commentsDomain+b;return b+(b.match(/\?/)?"&":"?")+"sid="+Docs.Auth.getSid()},avatar:function(c,d){return' '},counterHtml:function(b){return b>0?'":""}});Ext.define("Docs.controller.Auth",{extend:"Ext.app.Controller",requires:["Docs.Auth","Docs.Comments"],refs:[{ref:"authHeaderForm",selector:"authHeaderForm"}],init:function(){this.control({"authHeaderForm, authForm":{login:this.login,logout:this.logout}});var b=this.getController("Tabs");b.onLaunch=Ext.Function.createSequence(b.onLaunch,this.afterTabsLaunch,this)},afterTabsLaunch:function(){if(Docs.Comments.isEnabled()){if(Docs.Auth.isLoggedIn()){this.setLoggedIn()}else{this.setLoggedOut()}}},login:function(e,g,f,h){Docs.Auth.login({username:g,password:f,remember:h,success:this.setLoggedIn,failure:function(a){e.showMessage(a)},scope:this})},logout:function(b){Docs.Auth.logout(this.setLoggedOut,this)},setLoggedIn:function(){Docs.Comments.loadSubscriptions(function(){this.getAuthHeaderForm().showLoggedIn(Docs.Auth.getUser());this.eachCmp("commentsListWithForm",function(b){b.showCommentingForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").showCommentsTab()},this)},setLoggedOut:function(){Docs.Comments.clearSubscriptions();this.getAuthHeaderForm().showLoggedOut();this.eachCmp("commentsListWithForm",function(b){b.showAuthForm()});this.eachCmp("commentsList",function(b){b.refresh()});this.getController("Tabs").hideCommentsTab()},eachCmp:function(e,f,d){Ext.Array.forEach(Ext.ComponentQuery.query(e),f,d)}});Ext.define("Docs.controller.Failure",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#failure"}],show404:function(c){var d=new Ext.XTemplate("Oops... ","{msg}
","Maybe it was renamed to something else? Or maybe your internet connection has failed? ","This would be sad. Hopefully it's just a bug on our side.
","Most likely you just followed a broken link inside this very documentation. ","Go and report it to the authors of the docs.
","But if you think it's a bug in JSDuck documentation-generator itself, feel free to open ","an issue at the JSDuck issue tracker .
","Sorry for all this :(
");Ext.getCmp("failure").update(d.apply({msg:c}));Ext.getCmp("card-panel").layout.setActiveItem("failure")}});Ext.define("Docs.controller.Search",{extend:"Ext.app.Controller",requires:["Docs.ClassRegistry","Docs.store.Search","Docs.History"],stores:["Search"],refs:[{ref:"field",selector:"#search-field"}],pageIndex:0,pageSize:10,init:function(){this.control({"#search-dropdown":{itemclick:function(c,d){this.loadRecord(d)},changePage:function(c,d){this.pageIndex+=d;this.search(this.getField().getValue());this.keepDropdown()},footerClick:function(b){this.keepDropdown()}},"#search-field":{keyup:function(m,l){var j=this.getDropdown();m.setHideTrigger(m.getValue().length===0);if(l.keyCode===Ext.EventObject.ESC||!m.value){j.hide();m.setValue("");return}else{j.show()}var h=j.getSelectionModel();var i=h.getLastSelected();var n=j.store.indexOf(i);var k=j.store.getCount()-1;if(l.keyCode===Ext.EventObject.UP){if(n===undefined){h.select(0)}else{h.select(n===0?k:(n-1))}}else{if(l.keyCode===Ext.EventObject.DOWN){if(n===undefined){h.select(0)}else{h.select(n===k?0:n+1)}}else{if(l.keyCode===Ext.EventObject.ENTER){l.preventDefault();i&&this.loadRecord(i)}else{this.pageIndex=0;clearTimeout(this.searchTimeout);this.searchTimeout=Ext.Function.defer(function(){this.search(m.value)},50,this)}}}},focus:function(b){if(b.value&&this.getDropdown().store.getCount()>0){this.getDropdown().show()}},blur:function(){var b=this.getDropdown();this.hideTimeout=Ext.Function.defer(b.hide,500,b)}}})},getDropdown:function(){return this.dropdown||(this.dropdown=Ext.getCmp("search-dropdown"))},keepDropdown:function(){clearTimeout(this.hideTimeout);this.getField().focus()},loadRecord:function(b){Docs.History.navigate(b.get("url"));this.getDropdown().hide()},search:function(h){var e=Docs.ClassRegistry.search(h);if(this.pageIndex<0){this.pageIndex=0}else{if(this.pageIndex>Math.floor(e.length/this.pageSize)){this.pageIndex=Math.floor(e.length/this.pageSize)}}var g=this.pageIndex*this.pageSize;var f=g+this.pageSize;this.getDropdown().setTotal(e.length);this.getDropdown().setStart(g);this.getDropdown().getStore().loadData(e.slice(g,f));this.getDropdown().alignTo("search-field","bl",[-12,-2]);if(e.length>0){this.getDropdown().getSelectionModel().select(0)}}});Ext.define("Docs.controller.CommentCounts",{extend:"Ext.app.Controller",requires:["Docs.Comments"],refs:[{ref:"class",selector:"classoverview"},{ref:"classIndex",selector:"#classindex"},{ref:"guide",selector:"#guide"},{ref:"guideIndex",selector:"#guideindex"},{ref:"video",selector:"#video"},{ref:"videoIndex",selector:"#videoindex"}],init:function(){Docs.Comments.on("countChange",this.updateCounts,this)},updateCounts:function(c,d){this.getClass().updateCommentCounts();this.getClassIndex().updateCommentCounts();this.getGuide().updateCommentCounts();this.getGuideIndex().updateCommentCounts();this.getVideo().updateCommentCounts();this.getVideoIndex().updateCommentCounts()}});Ext.define("Docs.controller.Videos",{extend:"Docs.controller.Content",baseUrl:"#!/video",title:"Videos",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#videoindex"},{ref:"tree",selector:"#videotree"}],init:function(){this.addEvents("showVideo");this.control({"#videotree":{urlclick:function(b){this.loadVideo(b)}},"videoindex > thumblist":{urlclick:function(b){this.loadVideo(b)}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("videotree");this.callParent()},loadVideo:function(j,h){var f=false;Ext.getCmp("card-panel").layout.setActiveItem("video");Ext.getCmp("treecontainer").showTree("videotree");var g=j.match(/^#!\/video\/(.*)$/)[1];var i=this.getVideo(g);if(!i){this.getController("Failure").show404("Video "+g+" was not found.");return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("video").load(i);f=true}h||Docs.History.push(j);this.fireEvent("showVideo",g,{reRendered:f});this.getTree().selectUrl(j);this.activeUrl=j},getVideo:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.videos,function(a){Ext.Array.forEach(a.items,function(d){this.map[d.name]=d},this)},this)}return this.map[b]}});Ext.define("Docs.controller.Guides",{extend:"Docs.controller.Content",baseUrl:"#!/guide",title:"Guides",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#guideindex"},{ref:"tree",selector:"#guidetree"},{ref:"guide",selector:"#guide"}],cache:{},init:function(){this.addEvents("showGuide");this.control({"#guidetree":{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},"guideindex > thumblist":{urlclick:function(b){this.loadGuide(b)}},indexcontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.handleUrlClick(a.href,d)},this,{preventDefault:true,delegate:".guide"})}},doctabs:{tabClose:function(b){this.getGuide().eraseScrollContext(b)}}})},handleUrlClick:function(d,f,e){d=d.replace(/.*#!?/,"#!");if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.activeUrl?this.activeUrl:"")}else{this.loadGuide(d)}},loadIndex:function(){Ext.getCmp("treecontainer").showTree("guidetree");this.callParent()},loadGuide:function(j,h){Ext.getCmp("card-panel").layout.setActiveItem("guide");Ext.getCmp("treecontainer").showTree("guidetree");var g=j.match(/^#!\/guide\/(.*?)(-section-[0-9]+)?$/);var f=g[1];var i=g[2];j="#!/guide/"+f;h||Docs.History.push(j);if(this.cache[f]){this.showGuide(this.cache[f],j,f,i)}else{this.cache[f]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/guides/"+f+"/README.js",callbackName:f,success:function(a){this.cache[f]=a;this.showGuide(a,j,f,i)},failure:function(b,a){this.cache[f]=false;this.getController("Failure").show404("Guide "+f+" was not found.")},scope:this})}},showGuide:function(i,j,f,h){var g=false;if(i==="in-progress"){return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("guide").load({name:f,content:i.guide});g=true}this.activeUrl=j;this.getGuide().setScrollContext(this.activeUrl);if(h){this.getGuide().scrollToEl(f+h)}else{this.getGuide().restoreScrollState()}this.fireEvent("showGuide",f,{reRendered:g});this.getTree().selectUrl(j)}});Ext.define("Docs.view.search.Container",{extend:"Ext.container.Container",alias:"widget.searchcontainer",requires:"Docs.view.search.Dropdown",initComponent:function(){if(Docs.data.search.length){this.cls="search";this.items=[{xtype:"triggerfield",triggerCls:"reset",emptyText:"Search",width:170,id:"search-field",enableKeyEvents:true,hideTrigger:true,onTriggerClick:function(){this.reset();this.focus();this.setHideTrigger(true);Ext.getCmp("search-dropdown").hide()}},{xtype:"searchdropdown"}]}this.callParent()}});Ext.define("Docs.controller.Examples",{extend:"Docs.controller.Content",baseUrl:"#!/example",title:"Examples",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#exampleindex"},{ref:"tree",selector:"#exampletree"},{ref:"page",selector:"#example"}],init:function(){this.addEvents("showExample");this.control({"#exampletree":{urlclick:function(d,c){this.loadExample(d)}},"exampleindex > thumblist":{urlclick:function(b){this.loadExample(b)}},touchexamplecontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.changeDevice("tablet")},this,{delegate:"button.tablet"});b.el.addListener("click",function(d,a){this.changeDevice("phone")},this,{delegate:"button.phone"});b.el.addListener("click",function(d,a){this.changeOrientation("portrait")},this,{delegate:"button.portrait"});b.el.addListener("click",function(d,a){this.changeOrientation("landscape")},this,{delegate:"button.landscape"});b.el.addListener("click",function(d,a){this.openInNewWindow()},this,{delegate:"button.new-window"})}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("exampletree");this.callParent()},loadExample:function(d,f){var e=this.getExample(d);if(!e){this.getController("Failure").show404("Example "+d+" was not found.");return}this.getViewport().setPageTitle(e.text);if(this.activeUrl!==d){this.getPage().clear();this.activateExampleCard();this.getPage().load(e)}else{this.activateExampleCard()}f||Docs.History.push(d);this.fireEvent("showExample",d);this.getTree().selectUrl(d);this.activeUrl=d},activateExampleCard:function(){Ext.getCmp("card-panel").layout.setActiveItem("example");Ext.getCmp("treecontainer").showTree("exampletree")},getExample:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.examples,function(a){Ext.Array.forEach(a.items,function(d){this.map["#!/example/"+d.name]=d},this)},this)}return this.map[b]},changeOrientation:function(b){this.getPage().setOrientation(b)},changeDevice:function(b){this.getPage().setDevice(b)},openInNewWindow:function(){window.open(this.getExample(this.activeUrl).url)}});Ext.define("Docs.view.Tabs",{extend:"Ext.container.Container",alias:"widget.doctabs",id:"doctabs",componentCls:"doctabs",requires:["Docs.History","Docs.view.TabMenu"],minTabWidth:80,maxTabWidth:160,animDuration:150,tabs:[],tabsInBar:[],tabCache:{},staticTabs:[],initComponent:function(){this.addEvents("tabActivate","tabClose");this.tpl=Ext.create("Ext.XTemplate",'','"," ",'
','
');this.html=this.tpl.applyTemplate(this.staticTabs);this.tabTpl=Ext.create("Ext.XTemplate",'");this.on("afterrender",this.initListeners,this);this.on("resize",this.refresh,this);this.callParent()},initListeners:function(){this.el.on("mouseover",function(c,d){Ext.get(d).addCls("ovr")},this,{delegate:".close"});this.el.on("mouseout",function(c,d){Ext.get(d).removeCls("ovr")},this,{delegate:".close"});this.el.on("click",function(f,d){var e=Ext.get(d).up(".doctab").down(".tabUrl").getAttribute("href");e=Docs.History.cleanUrl(e);this.removeTab(e);this.fireEvent("tabClose",e)},this,{delegate:".close",preventDefault:true});this.el.on("click",function(f,d){if(Ext.fly(f.getTarget()).hasCls("close")){return}var e=Ext.get(d).down(".tabUrl").getAttribute("href");this.fireEvent("tabActivate",e,{navigate:true})},this,{delegate:".doctab"});this.el.on("contextmenu",function(c,d){if(!Ext.get(d).hasCls("overview")){this.createMenu().showBy(d)}},this,{delegate:".doctab",preventDefault:true});this.el.on("click",Ext.emptyFn,this,{delegate:".tabUrl",preventDefault:true});this.el.on("mouseleave",function(){if(this.shouldResize){this.resizeTabs({animate:true})}},this)},setStaticTabs:function(b){this.staticTabs=b;this.refresh()},getStaticTabs:function(b){return this.staticTabs},addTab:function(d,c){this.tabCache[d.href]=d;if(!this.hasTab(d.href)){this.tabs.push(d.href);if(this.roomForNewTab()){this.addTabToBar(d,c)}this.addTabToMenu(this.overflowButton.menu,d)}if(c.activate){this.activateTab(d.href)}this.saveTabs()},removeTab:function(d){if(!this.hasTab(d)){return}this.removeFromArray(this.tabs,d);var e=this.removeFromArray(this.tabsInBar,d);var f=this.tabs[this.tabsInBar.length];if(f){this.tabsInBar.push(f)}if(this.activeTab===d){if(this.tabs.length===0){Docs.App.getController(this.getControllerName(d)).loadIndex()}else{if(e===this.tabs.length){e-=1}this.activateTab(this.tabs[e]);this.fireEvent("tabActivate",this.tabs[e])}}if(this.tabs.length>=this.maxTabsInBar()){this.refresh()}else{this.removeTabFromBar(d)}this.saveTabs()},removeFromArray:function(f,d){var e=Ext.Array.indexOf(f,d);if(e!==-1){Ext.Array.erase(f,e,1)}return e},activateTab:function(d){this.activeTab=d;if(!this.inTabs(d)){this.swapLastTabWith(d)}Ext.Array.each(Ext.query(".doctab a.tabUrl"),function(a){Ext.get(a).up(".doctab").removeCls(["active","highlight"])});var e=Ext.query('.doctab a[href="'+d+'"]')[0];if(e){var f=Ext.get(e).up(".doctab");f.addCls("active")}this.highlightOverviewTab(d)},refresh:function(){var i=this.tpl.applyTemplate(this.staticTabs);var f=this.maxTabsInBar()this.maxTabWidth){return this.maxTabWidth}else{if(bthis.tabsInBar.length&&f===this.maxTabsInBar()){g.addTabCls(h,"overflow")}var e=this.inTabBar(h.href);g.addTab(h,e?"":"overflow")},addToolTips:function(){Ext.Array.each(this.staticTabs,function(c){var d=Ext.get(Ext.query(".doctab."+c.cls)[0]);if(d){Ext.create("Ext.tip.ToolTip",{target:d,html:c.tooltip})}})},saveTabs:function(){Docs.Settings.set("tabs",this.tabs)},getControllerName:function(b){if(/#!?\/api/.test(b)){return"Classes"}else{if(/#!?\/guide/.test(b)){return"Guides"}else{if(/#!?\/video/.test(b)){return"Videos"}else{if(/#!?\/example/.test(b)){return"Examples"}else{if(/#!?\/tests/.test(b)){return"Tests"}else{if(/#!?\/comment/.test(b)){return"Comments"}else{return"Index"}}}}}}}});Ext.define("Docs.controller.Tests",{extend:"Docs.controller.Content",baseUrl:"#!/tests",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#testsindex"}],init:function(){this.addEvents("loadIndex");this.control({"#testsgrid":{afterrender:this.loadExamples}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()},loadExamples:function(){this.getIndex().disable();Ext.data.JsonP.request({url:this.getBaseUrl()+"/inline-examples.js",callbackName:"__inline_examples__",success:function(b){this.getIndex().addExamples(b);this.getIndex().enable()},scope:this})}});Ext.define("Docs.controller.Classes",{extend:"Docs.controller.Content",baseUrl:"#!/api",title:"API Documentation",requires:["Docs.History","Docs.Syntax","Docs.ClassRegistry"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#classindex"},{ref:"header",selector:"classheader"},{ref:"overview",selector:"classoverview"},{ref:"tabPanel",selector:"classtabpanel"},{ref:"tree",selector:"#classtree"},{ref:"favoritesGrid",selector:"#favorites-grid"}],cache:{},init:function(){this.addEvents("showIndex","showClass","showMember");Ext.getBody().addListener("click",function(c,d){this.handleUrlClick(decodeURI(d.href),c)},this,{preventDefault:true,delegate:".docClass"});this.control({classtree:{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},toolbar:{toggleExpanded:function(b){this.getOverview().setAllMembersExpanded(b)}},classoverview:{afterrender:function(b){b.el.addListener("click",function(i,k){var h=Ext.get(k).up(".member"),l=h.down(".meta .defined-in"),j=l.getAttribute("rel"),a=h.getAttribute("id");if(this.getOverview().isMemberExpanded(a)){this.setExpanded(a,false)}else{this.setExpanded(a,true);this.fireEvent("showMember",j,a)}},this,{preventDefault:true,delegate:".expandable"});b.el.addListener("click",Ext.emptyFn,this,{preventDefault:true,delegate:".not-expandable"})}},treecontainer:{afterrender:function(b){b.el.addListener("dblclick",function(){if(b.getWidth()<30){b.setWidth(b.expandedWidth)}else{b.expandedWidth=b.getWidth();b.setWidth(20)}},this,{delegate:".x-resizable-handle"})}},doctabs:{tabClose:function(b){this.getOverview().eraseScrollContext(b)}}})},setExpanded:function(f,d){var e=this.currentCls;if(!e.expanded){e.expanded={}}this.getOverview().setMemberExpanded(f,d);if(d){e.expanded[f]=d}else{delete e.expanded[f]}},applyExpanded:function(b){Ext.Object.each(b.expanded||{},function(a){Ext.get(a).addCls("open")},this)},handleUrlClick:function(d,f,e){d=Docs.History.cleanUrl(d);if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.currentCls?"#!/api/"+this.currentCls.name:"")}else{this.loadClass(d)}},loadIndex:function(b){Ext.getCmp("treecontainer").showTree("classtree");this.callParent(arguments);this.fireEvent("showIndex")},loadClass:function(f,i){Ext.getCmp("card-panel").layout.setActiveItem("classcontainer");Ext.getCmp("treecontainer").showTree("classtree");i||Docs.History.push(f);var j=f.match(/^#!\/api\/(.*?)(?:-(.*))?$/);var g=Docs.ClassRegistry.canonicalName(j[1]);var h=j[2];if(this.getOverview()){this.getOverview().setLoading(true)}if(this.cache[g]){this.showClass(this.cache[g],h)}else{this.cache[g]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/output/"+g+".js",callbackName:g.replace(/\./g,"_"),success:function(b,a){this.cache[g]=b;this.showClass(b,h)},failure:function(b,a){this.cache[g]=false;this.getOverview().setLoading(false);this.getController("Failure").show404("Class "+g+" was not found.")},scope:this})}},showClass:function(e,f){var d=false;if(e==="in-progress"){return}this.getOverview().setLoading(false);this.getViewport().setPageTitle(e.name);if(this.currentCls!==e){this.currentCls=e;this.getHeader().load(e);this.getOverview().load(e);this.applyExpanded(e);d=true}this.currentCls=e;this.getOverview().setScrollContext("#!/api/"+e.name);if(f){this.getOverview().scrollToEl("#"+f);this.fireEvent("showMember",e.name,f)}else{this.getOverview().restoreScrollState()}this.getTree().selectUrl("#!/api/"+e.name);this.fireEvent("showClass",e.name,{reRendered:d})}});Ext.define("Docs.view.welcome.Index",{extend:"Ext.container.Container",alias:"widget.welcomeindex",mixins:["Docs.view.Scrolling"],requires:["Docs.ContentGrabber"],cls:"welcome iScroll",initComponent:function(){this.html=Docs.ContentGrabber.get("welcome-content");this.hasContent=!!this.html;this.callParent(arguments)},getTab:function(){return this.hasContent?{cls:"index",href:"#",tooltip:"Home"}:false}});Ext.define("Docs.view.cls.Index",{extend:"Ext.container.Container",alias:"widget.classindex",requires:["Docs.ContentGrabber","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-categories iScroll",margin:"15 10",autoScroll:true,initComponent:function(){this.tpl=new Ext.XTemplate('API Documentation ','','{notice}
'," ","{categories}");this.data={notice:Docs.ContentGrabber.get("notice-text"),categories:Docs.ContentGrabber.get("categories-content")};this.callParent(arguments)},afterRender:function(){this.callParent(arguments);if(!Docs.Comments.isEnabled()){return}this.initComments()},initComments:function(){this.getEl().select("a.docClass").each(function(a){var f=a.getHTML();var e=Docs.Comments.getClassTotalCount(f);if(e){Ext.DomHelper.append(a,Docs.Comments.counterHtml(e))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},getTab:function(){var b=(Docs.data.classes||[]).length>0;return b?{cls:"classes",href:"#!/api",tooltip:"API Documentation"}:false}});Ext.define("Docs.view.examples.TouchContainer",{extend:"Ext.panel.Panel",alias:"widget.touchexamplecontainer",requires:["Docs.view.examples.Device"],layout:"fit",cls:"example-container iScroll",autoScroll:true,bodyPadding:"10 0 5 0",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['Example ','"].join("")}];this.callParent(arguments)},load:function(b){this.title=b.title+" Example";this.device=Ext.create("Docs.view.examples.Device",{url:b.url,device:b.device||"phone",orientation:b.orientation||"landscape"});this.refresh()},refresh:function(){this.update(this.device.toHtml());this.updateScale();this.updateTitle();this.updateButtons()},setDevice:function(b){this.device.setDevice(b);this.refresh()},setOrientation:function(b){this.device.setOrientation(b);this.refresh()},updateScale:function(){var b=Ext.query("iframe",this.el.dom)[0];if(b){b.onload=Ext.Function.bind(function(){var d=document.createElement("style");var a="html { overflow: hidden }";if(this.device.getDevice()==="tablet"){a+="body { font-size: 79.8% !important; }"}d.innerHTML=a;b.contentWindow.document.body.appendChild(d)},this)}},updateTitle:function(){Ext.get(Ext.query(".example-title")).update(this.title)},updateButtons:function(){Ext.Array.each(Ext.query(".example-toolbar .orientations button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .orientations button."+this.device.getOrientation())).addCls("selected");Ext.Array.each(Ext.query(".example-toolbar .devices button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .devices button."+this.device.getDevice())).addCls("selected")},clear:function(){this.update("")}});Ext.define("Docs.store.Settings",{extend:"Ext.data.Store",requires:["Docs.model.Setting"],model:"Docs.model.Setting"});Ext.define("Docs.Settings",{extend:"Docs.LocalStore",singleton:true,requires:"Docs.store.Settings",storeName:"Docs.store.Settings",defaults:{show:{"public":true,"protected":false,"private":false,deprecated:false,removed:false,inherited:true,accessor:true},comments:{hideRead:false},showPrivateClasses:false,classTreeLogic:"PackageLogic"},set:function(d,f){var e=this.store.findExact("key",d);if(e>-1){this.store.removeAt(e)}this.store.add({key:d,value:f});this.syncStore()},get:function(c){var d=this.store.findExact("key",c);return d>-1?this.store.getAt(d).get("value"):this.defaults[c]}});Ext.define("Docs.controller.Tabs",{extend:"Ext.app.Controller",requires:["Docs.History","Docs.Settings"],refs:[{ref:"welcomeIndex",selector:"#welcomeindex"},{ref:"classIndex",selector:"#classindex"},{ref:"guideIndex",selector:"#guideindex"},{ref:"videoIndex",selector:"#videoindex"},{ref:"exampleIndex",selector:"#exampleindex"},{ref:"testsIndex",selector:"#testsindex"},{ref:"commentIndex",selector:"#commentindex"},{ref:"classTree",selector:"#classtree"},{ref:"guideTree",selector:"#guidetree"},{ref:"exampleTree",selector:"#exampletree"},{ref:"videoTree",selector:"#videotree"},{ref:"doctabs",selector:"#doctabs"}],init:function(){this.getController("Classes").addListener({showClass:function(b){this.addTabFromTree("#!/api/"+b)},scope:this});this.getController("Guides").addListener({showGuide:function(b){this.addTabFromTree("#!/guide/"+b)},scope:this});this.getController("Examples").addListener({showExample:function(b){this.addTabFromTree(b)},scope:this});this.getController("Videos").addListener({showVideo:function(b){this.addTabFromTree("#!/video/"+b)},scope:this});this.control({"[componentCls=doctabs]":{tabActivate:function(d,c){Docs.History.push(d,c)},scope:this}})},onLaunch:function(){this.getDoctabs().setStaticTabs(Ext.Array.filter([this.getWelcomeIndex().getTab(),this.getClassIndex().getTab(),this.getGuideIndex().getTab(),this.getVideoIndex().getTab(),this.getExampleIndex().getTab(),this.getTestsIndex().getTab()],function(a){return a}));this.commentsTab=this.getCommentIndex().getTab();var b=Docs.Settings.get("tabs");if(b){Ext.Array.forEach(b,function(a){this.addTabFromTree(a,{animate:false})},this)}Docs.History.notifyTabsLoaded()},showCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(b.concat(this.commentsTab))},hideCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(Ext.Array.remove(b,this.commentsTab))},addTabFromTree:function(h,g){var e=this.getTree(h);var f=e.findRecordByUrl(h);if(f){this.addTab(f,g)}},addTab:function(d,c){c=c||{animate:true,activate:true};this.getDoctabs().addTab({href:d.url,text:d.text,iconCls:d.iconCls},c)},getTree:function(b){if(/#!?\/api/.test(b)){return this.getClassTree()}else{if(/#!?\/guide/.test(b)){return this.getGuideTree()}else{if(/#!?\/video/.test(b)){return this.getVideoTree()}else{if(/#!?\/example/.test(b)){return this.getExampleTree()}else{return this.getClassTree()}}}}}});Ext.define("Docs.controller.Comments",{extend:"Docs.controller.Content",baseUrl:"#!/comment",title:"Comments",requires:["Docs.Settings","Docs.Comments"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#commentindex"},{ref:"commentsFullList",selector:"commentsFullList"}],recentCommentsSettings:{},init:function(){this.control({commentsFullList:{hideReadChange:function(){this.fetchRecentComments()},sortOrderChange:function(b){this.recentCommentsSettings.sortByScore=(b==="votes");this.fetchRecentComments()}},commentsPager:{loadMore:function(b){this.fetchRecentComments(b)}},commentsUsers:{select:function(b){this.recentCommentsSettings.username=b;this.fetchRecentComments()}},commentsTargets:{select:function(b){this.recentCommentsSettings.targetId=b&&b.get("id");this.fetchRecentComments()}},commentsTags:{select:function(b){this.recentCommentsSettings.tagname=b&&b.get("tagname");this.fetchRecentComments()}}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();if(!this.recentComments){this.fetchRecentComments();this.recentComments=true}this.callParent([true])},fetchRecentComments:function(f){var e=Docs.Settings.get("comments");var d={offset:f||0,limit:100,hideRead:e.hideRead?1:undefined,sortByScore:this.recentCommentsSettings.sortByScore?1:undefined,username:this.recentCommentsSettings.username,targetId:this.recentCommentsSettings.targetId,tagname:this.recentCommentsSettings.tagname};this.getCommentsFullList().setMasked(true);Docs.Comments.request("jsonp",{url:"/comments_recent",method:"GET",params:d,success:function(a){this.getCommentsFullList().setMasked(false);var b=f>0;this.getCommentsFullList().load(a,b)},scope:this})}});Ext.define("Docs.view.GroupTree",{extend:"Docs.view.DocTree",alias:"widget.grouptree",initComponent:function(){this.root={text:"Root",children:this.buildTree(this.data)};this.callParent()},buildTree:function(b){return Ext.Array.map(b,function(a){if(a.items){return{text:a.title,expanded:true,iconCls:"icon-pkg",children:this.buildTree(a.items)}}else{return this.convert(a)}},this)}});Ext.define("Docs.view.auth.BaseForm",{extend:"Ext.Component",requires:["Docs.Tip","Docs.Auth"],createLoginFormHtml:function(){return['"].join("")},bindFormSubmitEvent:function(){this.getEl().down("form").on("submit",this.submitLogin,this,{preventDefault:true})},submitLogin:function(m,h){var n=Ext.get(h);var j=n.down("input[name=username]").getValue();var i=n.down("input[name=password]").getValue();var l=n.down("input[name=remember]");var k=l?!!(l.getAttribute("checked")):false;this.fireEvent("login",this,j,i,k)},showMessage:function(c){var d=this.getEl().down("input[type=submit]");Docs.Tip.show(c,d,"bottom")}});Ext.define("Docs.view.auth.HeaderForm",{extend:"Docs.view.auth.BaseForm",alias:"widget.authHeaderForm",requires:["Docs.Comments"],afterRender:function(){this.callParent(arguments);this.getEl().addListener("click",this.showLoginForm,this,{preventDefault:true,delegate:".login"});this.getEl().addListener("click",function(){this.fireEvent("logout",this)},this,{preventDefault:true,delegate:".logout"})},showLoginForm:function(){this.update(this.createLoginFormHtml());this.bindFormSubmitEvent()},showLoggedIn:function(d){var c=Docs.Comments.avatar(d.emailHash);this.update(c+"')},showLoggedOut:function(){this.update('Sign in / Register ')}});Ext.define("Docs.view.ThumbList",{extend:"Ext.view.View",alias:"widget.thumblist",requires:["Docs.Comments"],cls:"thumb-list",itemSelector:"dl",urlField:"url",commentType:"",itemTpl:[],initComponent:function(){this.addEvents("urlclick");Ext.Array.forEach(this.data,function(c,d){c.id="sample-"+d});this.store=Ext.create("Ext.data.JsonStore",{fields:["id","title","items"]});this.store.loadData(this.flattenSubgroups(this.data));this.tpl=new Ext.XTemplate(Ext.Array.flatten(["",'
','{title}
',"
",'',this.itemTpl," ",'
'," ","
"]));this.itemTpl=undefined;this.data=undefined;this.on("viewready",function(){this.initHover();if(Docs.Comments.isEnabled()){this.initComments()}},this);this.callParent(arguments)},initHover:function(){this.getEl().on("mouseover",function(c,d){Ext.get(d).addCls("over")},this,{delegate:"dd"});this.getEl().on("mouseout",function(c,d){Ext.get(d).removeCls("over")},this,{delegate:"dd"})},initComments:function(){this.getEl().select("dd").each(function(e){var d=e.getAttributeNS("ext",this.urlField).replace(/^.*\//,"");var f=Docs.Comments.getCount([this.commentType,d,""]);if(f){Ext.DomHelper.append(e.down("p"),Docs.Comments.counterHtml(f))}},this)},updateCommentCounts:function(){if(!this.getEl()){return}this.getEl().select(".comment-counter-small").remove();this.initComments()},flattenSubgroups:function(c){function d(a){if(a.items){return Ext.Array.map(a.items,d)}else{return a}}return Ext.Array.map(c,function(a){return{id:a.id,title:a.title,items:Ext.Array.map(a.items,function(b){if(b.items){var f=Ext.apply({},d(b)[0]);f.title=b.title;return f}else{return b}})}})},onContainerClick:function(c){var d=c.getTarget("h2",3,true);if(d){d.up("div").toggleCls("collapsed")}},onItemClick:function(h,j,l,i){var k=i.getTarget("dd",5,true);if(k&&!i.getTarget("a",2)){var e=k.getAttributeNS("ext",this.urlField);this.fireEvent("urlclick",e)}return this.callParent(arguments)}});Ext.define("Docs.view.guides.Index",{extend:"Ext.container.Container",alias:"widget.guideindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'Guides '},Ext.create("Docs.view.ThumbList",{commentType:"guide",itemTpl:['',""," "],data:Docs.data.guides})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.guides||[]).length>0;return b?{cls:"guides",href:"#!/guide",tooltip:"Guides"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.videos.Index",{extend:"Ext.container.Container",alias:"widget.videoindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'Videos '},Ext.create("Docs.view.ThumbList",{commentType:"video",itemTpl:['',"{title}"," {[values.description.substr(0,80)]}...
"," "],data:Docs.data.videos})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.videos||[]).length>0;return b?{cls:"videos",href:"#!/video",tooltip:"Videos"}:false},updateCommentCounts:function(){this.down("thumblist").updateCommentCounts()}});Ext.define("Docs.view.examples.Index",{extend:"Ext.container.Container",alias:"widget.exampleindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.cls+=Docs.data.touchExamplesUi?" touch-examples-ui":"";this.items=[{xtype:"container",html:'Examples '},Ext.create("Docs.view.ThumbList",{itemTpl:['','',"{title}","",' (New) '," ","",' (Updated) '," ","",' (Experimental) '," "," {description}
"," "],data:Docs.data.examples})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.examples||[]).length>0;return b?{cls:"examples",href:"#!/example",tooltip:"Examples"}:false}});Ext.define("Docs.view.comments.Users",{alias:"widget.commentsUsers",extend:"Ext.panel.Panel",componentCls:"comments-users",requires:["Docs.Comments","Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"Votes"},{title:"Comments"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:"Filter users by name...",width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}],listeners:{tabchange:this.onTabChange,scope:this}}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll users-list",autoScroll:true,store:Ext.create("Ext.data.Store",{fields:["userName","score","emailHash","mod"]}),allowDeselect:true,tpl:["",'',"",'{score} ',"{[Docs.Comments.avatar(values.emailHash)]}",'moderator ">{userName}',"",""," "],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.fetchUsers("votes")},onTabChange:function(d,c){if(c.title==="Votes"){this.fetchUsers("votes")}else{this.fetchUsers("comments")}},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:"userName",value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.selectedUser=b;this.fireEvent("select",b.get("userName"))},onDeselect:function(){this.selectedUser=undefined;this.fireEvent("select",undefined)},fetchUsers:function(b){Docs.Comments.request("jsonp",{url:"/users",method:"GET",params:{sortBy:b},success:this.loadUsers,scope:this})},loadUsers:function(c){this.list.getStore().loadData(c.data);if(this.selectedUser){var d=this.list.getStore().findExact("userName",this.selectedUser.get("userName"));this.list.getSelectionModel().select(d,false,true)}}});Ext.define("Docs.view.examples.Inline",{extend:"Ext.Panel",alias:"widget.inlineexample",requires:["Docs.view.examples.InlineEditor","Docs.view.examples.InlinePreview"],componentCls:"inline-example-cmp",layout:"card",border:0,resizable:{transparent:true,handles:"s",constrainTo:false},maxCodeHeight:400,options:{},constructor:function(){this.callParent(arguments);this.addEvents("previewsuccess","previewfailure")},initComponent:function(){this.options=Ext.apply({device:"phone",orientation:"landscape"},this.options);this.items=[this.editor=Ext.create("Docs.view.examples.InlineEditor",{cmpName:"code",value:this.value,listeners:{init:this.updateHeight,change:this.updateHeight,scope:this}}),this.preview=Ext.create("Docs.view.examples.InlinePreview",{cmpName:"preview",options:this.options})];this.relayEvents(this.preview,["previewsuccess","previewfailure"]);if(this.options.preview){this.activeItem=1;if(this.toolbar){this.toolbar.activateButton("preview")}}else{this.activeItem=0;if(this.toolbar){this.toolbar.activateButton("code")}}this.on("afterrender",this.init,this);this.callParent(arguments)},init:function(){var b=this.layout.getActiveItem();if(b.cmpName==="preview"){this.showPreview()}this.updateHeight();if(this.toolbar){this.initToolbarEvents()}},initToolbarEvents:function(){this.toolbar.on("buttonclick",function(b){if(b==="code"){this.showCode()}else{if(b==="preview"){this.showPreview()}else{if(b==="copy"){this.showCode();this.editor.selectAll()}}}},this)},showCode:function(){this.layout.setActiveItem(0);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("code")}},showPreview:function(){this.preview.update(this.editor.getValue());this.layout.setActiveItem(1);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("preview")}},updateHeight:function(){var d=this.preview.getHeight();var e=this.editor.getHeight();var f=30;if(Docs.data.touchExamplesUi&&d>0){this.setHeight(d+f)}else{if(e>0){this.setHeight(Ext.Number.constrain(e+f,0,this.maxCodeHeight))}}}});Ext.define("Docs.view.examples.InlineWrap",{requires:["Docs.view.examples.Inline","Docs.view.examples.InlineToolbar"],constructor:function(c){this.pre=c;var d=this.parseOptions(c.className);this.initToolbar();if(d.preview){this.replacePre(d)}else{this.tb.on("buttonclick",function(a){d.preview=(a==="preview");this.replacePre(d)},this,{single:true})}},parseOptions:function(c){var d={};Ext.Array.forEach(c.split(/ +/),function(a){if(a==="phone"||a==="miniphone"||a==="tablet"){d.device=a}else{if(a==="ladscape"||a==="portrait"){d.orientation=a}else{d[a]=true}}});return d},initToolbar:function(){var b=document.createElement("div");this.pre.parentNode.insertBefore(b,this.pre);this.tb=Ext.create("Docs.view.examples.InlineToolbar",{renderTo:b})},replacePre:function(d){var c=document.createElement("div");this.pre.parentNode.replaceChild(c,this.pre);Ext.create("Docs.view.examples.Inline",{height:200,renderTo:c,value:Ext.String.htmlDecode(Ext.util.Format.stripTags(this.pre.innerHTML)),options:d,toolbar:this.tb})}});Ext.define("Docs.controller.InlineExamples",{extend:"Ext.app.Controller",requires:["Docs.view.examples.InlineWrap"],init:function(){this.control({classoverview:{resize:this.createResizer(".class-overview"),afterload:this.replaceExampleDivs},guidecontainer:{resize:this.createResizer(".guide-container"),afterload:this.replaceExampleDivs}})},createResizer:function(b){return function(){Ext.Array.each(Ext.ComponentQuery.query(b+" .inlineexample"),function(a){if(a.editor&&a.isVisible()){a.doLayout()}})}},replaceExampleDivs:function(){Ext.Array.each(Ext.query(".inline-example"),function(b){Ext.create("Docs.view.examples.InlineWrap",b)},this)}});Ext.define("Docs.view.tests.BatchRunner",{extend:"Ext.container.Container",requires:["Docs.view.examples.Inline"],initComponent:function(){this.addEvents("start","finish","statuschange");this.callParent(arguments)},run:function(b){this.fireEvent("start");this.runNext({pass:0,fail:0,total:b.length,remaining:b})},runNext:function(h){this.fireEvent("statuschange",h);if(!h.remaining||h.remaining.length<1){this.fireEvent("finish");return}var j=h.remaining.shift();var i=j.get("options");i.preview=false;var f="var alert = function(){};\n";var g=Ext.create("Docs.view.examples.Inline",{cls:"doc-test-preview",height:0,value:f+j.get("code"),options:i,listeners:{previewsuccess:function(a){this.onSuccess(j,h)},previewfailure:function(a,b){this.onFailure(j,h,b)},scope:this}});this.removeAll();this.add(g);g.showPreview()},onSuccess:function(d,c){d.set("status","success");d.commit();c.pass++;this.runNext(c)},onFailure:function(e,f,d){e.set("status","failure");e.set("message",d.toString());e.commit();f.fail++;this.runNext(f)}});Ext.define("Docs.view.tests.Index",{extend:"Ext.container.Container",requires:["Docs.model.Test","Docs.view.tests.BatchRunner"],mixins:["Docs.view.Scrolling"],alias:"widget.testsindex",layout:{type:"vbox",align:"stretch",shrinkToFit:true},padding:10,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Test",data:[]});this.grid=Ext.create("Ext.grid.Panel",{itemId:"testsgrid",padding:"5 0 5 0",autoScroll:true,flex:1,store:this.store,selModel:{mode:"MULTI"},columns:[{xtype:"templatecolumn",text:"Name",width:300,tpl:'{name} '},{xtype:"templatecolumn",text:"Status",width:80,tpl:'{status} '},{text:"Message",flex:1,dataIndex:"message"}],listeners:{itemdblclick:function(c,d){this.batchRunner.run([d])},scope:this}});this.batchRunner=Ext.create("Docs.view.tests.BatchRunner",{height:0,listeners:{start:this.disable,finish:this.enable,statuschange:this.updateTestStatus,scope:this}});this.items=[{html:"Inline examples test page ",height:30},{itemId:"testcontainer",layout:{type:"vbox",align:"stretch",shrinkToFit:true},flex:1,items:[{itemId:"testcontrols",layout:"hbox",items:[{html:"Double-click to run an example, or",margin:"5 5 5 0"},{xtype:"button",itemId:"run-selected-button",text:"Run Selected",margin:5,handler:function(){this.batchRunner.run(this.grid.getSelectionModel().getSelection())},scope:this},{html:"or",margin:5},{xtype:"button",itemId:"run-all-button",text:"Run All Examples",margin:5,handler:function(){this.batchRunner.run(this.store.getRange())},scope:this},{itemId:"testStatus",margin:"5 5 5 15"}]},this.grid]},this.batchRunner];this.callParent(arguments)},getTab:function(){return Docs.data.tests?{cls:"tests",href:"#!/tests",tooltip:"Tests",text:"Tests"}:false},addExamples:function(b){this.store.add(b);this.setStatus(true,this.store.getCount()+" examples loaded.")},updateTestStatus:function(d){var c=d.pass+d.fail;this.setStatus(d.fail===0,c+"/"+d.total+" examples tested, "+d.fail+" failures")},setStatus:function(d,f){var e=d?"doc-test-success":"doc-test-failure";this.down("#testStatus").update(''+f+" ")}});Ext.define("Docs.view.cls.InheritanceLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.privates=[];this.subclasses=this.buildLookupTable(this.classes);Ext.Array.forEach(this.classes,this.addClass,this);if(!this.showPrivateClasses){this.stripPrivateClasses(this.root)}this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(Ext.bind(this.compare,this));Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(ba?1:(b {2}',d,Docs.Settings.get("classTreeLogic")===d?"selected":"",c)},setupButtonClickHandler:function(){this.el.addListener("click",function(g,h){var f=Ext.get(h),e=Ext.get(Ext.query(".cls-grouping button.selected")[0]);if(e.dom===f.dom){return}e.removeCls("selected");f.addCls("selected");if(f.hasCls("PackageLogic")){this.setLogic("PackageLogic",Docs.Settings.get("showPrivateClasses"))}else{this.setLogic("InheritanceLogic",Docs.Settings.get("showPrivateClasses"))}},this,{delegate:"button"})},setLogic:function(i,f){Docs.Settings.set("classTreeLogic",i);Docs.Settings.set("showPrivateClasses",f);var g=new Docs.view.cls[i]({classes:this.data,showPrivateClasses:f});if(this.root){var h=this.getSelectionModel().getLastSelected();var j=g.create();this.expandLonelyNode(j.root);this.setRootNode(j.root);this.initNodeLinks();h&&this.selectUrl(h.raw.url)}else{var j=g.create();this.root=j.root;this.expandLonelyNode(this.root)}this.privates=j.privates},expandLonelyNode:function(d){var c=Ext.Array.filter(d.children,function(a){return a.children.length>0});if(c.length==1){c[0].expanded=true}},findRecordByUrl:function(b){return this.callParent([b])||this.findPrivateRecordByUrl(b)},findPrivateRecordByUrl:function(e){var f=this.privates;for(var d=0;d ','",{renderCount:this.renderCount});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"View 1 comment."}else{if(b>1){return"View "+b+" comments."}else{return"No comments. Click to add."}}},afterRender:function(){this.callParent(arguments);this.getEl().select(".toggleComments").each(function(b){b.on("click",this.toggle,this,{preventDefault:true})},this);new Docs.view.comments.TopLevelDropZone(this.getEl().down(".side.toggleComments"),{onValidDrop:Ext.Function.bind(this.setParent,this)})},setParent:function(c,d){c.setParent(d,this.reload,this)},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().addCls("open");this.getEl().down(".name").setStyle("display","none");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.getEl().removeCls("open");this.getEl().down(".name").setStyle("display","block");if(this.list){this.list.hide()}},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,newCommentTitle:this.newCommentTitle,renderTo:this.getEl(),listeners:{reorder:this.reload,scope:this}});this.reload()},reload:function(){Docs.Comments.load(this.target,function(b){this.list.load(b)},this)},setCount:function(b){this.getEl().down(".name").update(this.renderCount(b))}});Ext.define("Docs.view.comments.LargeExpander",{requires:["Docs.Comments","Docs.view.comments.Expander"],html:['"].join(""),type:"class",constructor:function(e){Ext.apply(this,e);this.el=Ext.get(e.el);var d=Ext.DomHelper.append(this.el,this.html,true).down("div");var f=[this.type,this.name,""];this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(f),target:f,renderTo:d,onCountUpdated:this.onCountUpdated})},getExpander:function(){return this.expander}});Ext.define("Docs.view.guides.Container",{extend:"Ext.panel.Panel",alias:"widget.guidecontainer",componentCls:"guide-container",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(b){this.scrollToView(b,{highlight:true,offset:-100})},load:function(b){this.guide=b;this.tpl=this.tpl||new Ext.XTemplate(Docs.data.showPrintButton?'Print ':"","{content}");this.update(this.tpl.apply(b));Docs.Syntax.highlight(this.getEl());if(Docs.Comments.isEnabled()){this.initComments()}this.fireEvent("afterload")},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"guide",name:this.guide.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["guide",this.guide.name,""]))}});Ext.define("Docs.view.videos.Container",{extend:"Ext.panel.Panel",alias:"widget.videocontainer",componentCls:"video-container",requires:["Docs.Comments","Docs.view.comments.LargeExpander"],initComponent:function(){this.callParent(arguments);this.on("hide",this.pauseVideo,this)},pauseVideo:function(){var b=document.getElementById("video_player");if(b&&b.api_pause){b.api_pause()}},load:function(b){this.video=b;this.tpl=this.tpl||new Ext.XTemplate('',' ',' ',' ',' ',' '," ","{title} ","{[this.linkify(values.description)]}
",{linkify:function(a){return a.replace(/(\bhttps?:\/\/\S+)/ig,"$1 ")}});this.update(this.tpl.apply(b));if(Docs.Comments.isEnabled()){this.initComments()}},initComments:function(){this.expander=new Docs.view.comments.LargeExpander({type:"video",name:this.video.name,el:this.getEl().down(".x-panel-body")})},updateCommentCounts:function(){if(!this.expander){return}this.expander.getExpander().setCount(Docs.Comments.getCount(["video",this.video.name,""]))}});Ext.define("Docs.view.comments.MemberWrap",{extend:"Docs.view.cls.MemberWrap",requires:["Docs.Comments","Docs.view.comments.Expander"],constructor:function(d){this.callParent([d]);var c=Docs.Comments.getCount(this.getTarget());if(c>0){this.updateSignatureCommentCount(c)}},getTarget:function(){if(!this.target){this.target=["class",this.getDefinedIn(),this.getMemberId()]}return this.target},getExpander:function(){if(!this.expander){var b=Ext.DomHelper.append(this.el.down(".long"),"
");this.expander=new Docs.view.comments.Expander({count:Docs.Comments.getCount(this.getTarget()),target:this.getTarget(),newCommentTitle:this.getNewCommentTitle(),renderTo:b})}return this.expander},setCount:function(b){this.getExpander().setCount(b);this.updateSignatureCommentCount(b)},updateSignatureCommentCount:function(g){var e=this.el.down(".title");var f=e.down(".comment-counter-small");if(g>0){if(f){f.update(""+g)}else{var h=Ext.DomHelper.append(e,Docs.Comments.counterHtml(g),true);h.on("click",function(){this.el.addCls("open");this.getExpander().expand();this.parent.scrollToEl(this.getExpander().getEl())},this)}}else{if(f){f.remove()}}},getNewCommentTitle:function(){if(this.getDefinedIn()!==this.className){return["Be aware. This comment will be posted to "+this.getDefinedIn()+" class, ","from where this member is inherited from."].join("")}else{return undefined}},setExpanded:function(b){this.callParent([b]);if(b){this.getExpander().show()}}});Ext.define("Docs.view.comments.TopList",{extend:"Ext.panel.Panel",componentCls:"comments-toplist",requires:["Docs.view.SimpleSelectBehavior","Docs.view.comments.FilterField"],layout:"border",displayField:"text",scoreField:"score",filterEmptyText:"Filter by name...",initComponent:function(){this.items=[this.tabpanel=Ext.widget("tabpanel",{plain:true,region:"north",height:50,items:[{title:"By comment count"}],dockedItems:[{dock:"bottom",items:[{xtype:"commentsFilterField",emptyText:this.filterEmptyText,width:320,height:20,listeners:{filter:this.onFilter,scope:this}}]}]}),this.list=Ext.widget("dataview",{region:"center",cls:"iScroll top-list",autoScroll:true,store:new Ext.data.Store({model:this.model}),allowDeselect:true,tpl:["",'',"",'{'+this.scoreField+"} ",'{'+this.displayField+"} "," "," "," "],itemSelector:"li"})];new Docs.view.SimpleSelectBehavior(this.list,{select:this.onSelect,deselect:this.onDeselect,scope:this});this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.list.getStore().load()},onFilter:function(b){this.list.getSelectionModel().deselectAll();this.list.getStore().clearFilter(true);this.list.getStore().filter({property:this.displayField,value:b,anyMatch:true})},deselectAll:function(){this.list.getSelectionModel().deselectAll()},onSelect:function(b){this.fireEvent("select",b)},onDeselect:function(){this.fireEvent("select",undefined)}});Ext.define("Docs.view.comments.Template",{extend:"Ext.XTemplate",requires:["Docs.Auth","Docs.Comments"],statics:{create:function(d){var c="tpl-"+Ext.JSON.encode(d);if(!this[c]){this[c]=new this();Ext.apply(this[c],d)}return this[c]}},constructor:function(){this.callParent(["",'','"," ","
",this])},avatar:function(b){return Docs.Comments.avatar(b,this.isMod()&&this.enableDragDrop?"drag-handle":"")},isTargetVisible:function(){return this.showTarget},dateStr:function(e){try{var h=Math.ceil(Number(new Date())/1000);var i=Math.ceil(Number(new Date(e))/1000);var k=h-i;if(k<60){return"just now"}else{if(k<60*60){var j=String(Math.round(k/(60)));return j+(j=="1"?" minute":" minutes")+" ago"}else{if(k<60*60*24){var j=String(Math.round(k/(60*60)));return j+(j=="1"?" hour":" hours")+" ago"}else{if(k<60*60*24*31){var j=String(Math.round(k/(60*60*24)));return j+(j=="1"?" day":" days")+" ago"}else{return Ext.Date.format(new Date(e),"jS M 'y")}}}}}catch(l){return""}},date:function(d){try{return Ext.Date.format(new Date(d),"jS F Y g:ia")}catch(c){return""}},isMod:function(){return Docs.Auth.isModerator()},isAuthor:function(b){return Docs.Auth.getUser().userName==b},target:function(h){var e=h[1],g=h[1],f="#!/api/";if(h[0]=="video"){g="Video "+g;f="#!/video/"}else{if(h[0]=="guide"){g="Guide "+g;f="#!/guide/"}else{if(h[2]!=""){e+="-"+h[2];if(h[0]=="class"){g+="#"+h[2].replace(/^.*-/,"")}else{g+=" "+h[2]}}}}return''+g+" "}});Ext.define("Docs.view.comments.RepliesExpander",{alias:"widget.commentsRepliesExpander",extend:"Ext.Component",requires:["Docs.Comments"],uses:["Docs.view.comments.ListWithForm"],componentCls:"comments-replies-expander",initComponent:function(){this.tpl=new Ext.XTemplate('',"{[this.renderCount(values.count)]}"," ",{renderCount:this.renderCount,getCountCls:this.getCountCls});this.data={count:this.count};this.callParent(arguments)},renderCount:function(b){if(b===1){return"1 reply..."}else{if(b>1){return b+" replies..."}else{return"Write reply..."}}},getCountCls:function(b){return(b>0)?"with-replies":""},afterRender:function(){this.callParent(arguments);this.getEl().down(".replies-button").on("click",this.toggle,this,{preventDefault:true})},toggle:function(){this.expanded?this.collapse():this.expand()},expand:function(){this.expanded=true;this.getEl().down(".replies-button").update("Hide replies.");if(this.list){this.list.show()}else{this.loadComments()}},collapse:function(){this.expanded=false;this.refreshRepliesButton();if(this.list){this.list.hide()}},refreshRepliesButton:function(){var b=this.getEl().down(".replies-button");b.update(this.renderCount(this.count));b.removeCls("with-replies");b.addCls(this.getCountCls(this.count))},loadComments:function(){this.list=new Docs.view.comments.ListWithForm({target:this.target,parentId:this.parentId,newCommentTitle:"Reply to comment ",renderTo:this.getEl(),listeners:{countChange:this.setCount,scope:this}});Docs.Comments.loadReplies(this.parentId,function(b){this.list.load(b)},this)},setCount:function(b){this.count=b;if(!this.expanded){this.refreshRepliesButton()}}});Ext.define("Docs.model.Comment",{extend:"Ext.data.Model",requires:["Docs.Comments"],fields:[{name:"id",mapping:"_id"},"author","emailHash","moderator","createdAt","target","score","upVote","downVote","contentHtml","read","tags","deleted","parentId","replyCount"],proxy:{type:"ajax",reader:"json"},vote:function(c,d){this.request({method:"POST",url:"/comments/"+this.get("id"),params:{vote:c},success:function(a){this.set("upVote",a.direction==="up");this.set("downVote",a.direction==="down");this.set("score",a.total);this.commit()},failure:Ext.Function.bind(d.failure,d.scope),scope:this})},loadContent:function(c,d){this.request({url:"/comments/"+this.get("id"),method:"GET",success:function(a){c.call(d,a.content)},scope:this})},saveContent:function(b){this.request({url:"/comments/"+this.get("id"),method:"POST",params:{content:b},success:function(a){this.set("contentHtml",a.content);this.commit()},scope:this})},setDeleted:function(b){this.request({url:"/comments/"+this.get("id")+(b?"/delete":"/undo_delete"),method:"POST",success:function(){this.set("deleted",b);this.commit();Docs.Comments.changeCount(this.get("target"),b?-1:+1)},scope:this})},markRead:function(){this.request({url:"/comments/"+this.get("id")+"/read",method:"POST",success:function(){this.set("read",true);this.commit()},scope:this})},setParent:function(d,f,e){this.request({url:"/comments/"+this.get("id")+"/set_parent",method:"POST",params:d?{parentId:d.get("id")}:undefined,success:f,scope:e})},addTag:function(b){this.changeTag("add_tag",b,function(){this.get("tags").push(b)},this)},removeTag:function(b){this.changeTag("remove_tag",b,function(){Ext.Array.remove(this.get("tags"),b)},this)},changeTag:function(h,e,g,f){this.request({url:"/comments/"+this.get("id")+"/"+h,method:"POST",params:{tagname:e},success:function(){g.call(f);this.commit()},scope:this})},request:function(b){Docs.Comments.request("ajax",{url:b.url,method:b.method,params:b.params,callback:function(h,f,a){var g=Ext.JSON.decode(a.responseText);if(f&&g.success){b.success&&b.success.call(b.scope,g)}else{b.failure&&b.failure.call(b.scope,g.reason)}},scope:this})}});Ext.define("Docs.CommentsProxy",{extend:"Ext.data.proxy.JsonP",alias:"proxy.comments",requires:["Docs.Comments"],constructor:function(b){b.url=Docs.Comments.buildRequestUrl(b.url);this.callParent([b])}});Ext.define("Docs.model.Tag",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["tagname","score"],proxy:{type:"comments",url:"/tags",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Tags",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTags",requires:["Docs.model.Tag"],model:"Docs.model.Tag",displayField:"tagname",filterEmptyText:"Filter tags by name..."});Ext.define("Docs.model.Target",{extend:"Ext.data.Model",requires:["Docs.CommentsProxy"],fields:["id","type","cls","member","score",{name:"text",convert:function(e,f){var d=f.data;if(d.type==="class"){return d.cls+(d.member?"#"+d.member.replace(/^.*-/,""):"")}else{return d.type+" "+d.cls}}}],proxy:{type:"comments",url:"/targets",reader:{type:"json",root:"data"}}});Ext.define("Docs.view.comments.Targets",{extend:"Docs.view.comments.TopList",alias:"widget.commentsTargets",requires:["Docs.model.Target"],model:"Docs.model.Target",displayField:"text",filterEmptyText:"Filter topics by name..."});Ext.define("Docs.view.comments.TagEditor",{extend:"Ext.container.Container",requires:["Docs.model.Tag"],floating:true,hidden:true,componentCls:"comments-tageditor",statics:{cachedStore:undefined,getStore:function(){if(!this.cachedStore){this.cachedStore=Ext.create("Ext.data.Store",{model:"Docs.model.Tag",listeners:{load:function(){this.cachedStore.sort("tagname","ASC")},scope:this}});this.cachedStore.load()}return this.cachedStore}},initComponent:function(){this.items=[{xtype:"combobox",listConfig:{cls:"comments-tageditor-boundlist"},store:this.statics().getStore(),queryMode:"local",displayField:"tagname",valueField:"tagname",enableKeyEvents:true,emptyText:"New tag name...",listeners:{select:this.handleSelect,blur:this.destroy,keyup:this.onKeyUp,scope:this}}];this.callParent(arguments)},popup:function(b){this.show();this.alignTo(b,"bl",[-12,-2]);this.down("combobox").focus(true,100)},onKeyUp:function(c,d){if(d.keyCode===Ext.EventObject.ENTER){this.handleSelect()}else{if(d.keyCode===Ext.EventObject.ESC){this.destroy()}}},handleSelect:function(){var c=Ext.String.trim(this.down("combobox").getValue()||"");if(c){var d=this.rememberNewTag(c);this.fireEvent("select",d)}this.destroy()},rememberNewTag:function(g){var f=this.statics().getStore();var e=new RegExp("^"+Ext.String.escapeRegex(g)+"$","i");var h=f.query("tagname",e);if(h.getCount()===0){f.add({tagname:g});f.sort("tagname","ASC");return g}else{return h.get(0).get("tagname")}}});Ext.define("Docs.view.comments.List",{extend:"Ext.view.View",alias:"widget.commentsList",requires:["Docs.Auth","Docs.Syntax","Docs.Comments","Docs.view.comments.Template","Docs.view.comments.Form","Docs.view.comments.TagEditor","Docs.view.comments.RepliesExpander","Docs.view.comments.DragZone","Docs.view.comments.DropZone","Docs.model.Comment","Docs.Tip"],componentCls:"comments-list",itemSelector:"div.comment",emptyText:'Loading...
',deferEmptyText:false,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Comment",listeners:{update:this.fireChangeEvent,scope:this}});this.tpl=Docs.view.comments.Template.create({showTarget:this.showTarget,enableDragDrop:this.enableDragDrop});this.callParent(arguments);this.on("refresh",function(){Docs.Syntax.highlight(this.getEl());this.renderExpanders(this.store.getRange())},this);this.on("itemupdate",function(f,e,d){Docs.Syntax.highlight(d);this.renderExpanders([f])},this)},renderExpanders:function(b){if(b[0]&&b[0].get("parentId")){return}Ext.Array.forEach(b,function(a){if(a.get("deleted")){return}new Docs.view.comments.RepliesExpander({count:a.get("replyCount"),target:a.get("target"),parentId:a.get("id"),renderTo:this.getNode(a)})},this)},afterRender:function(){this.callParent(arguments);this.mun(this.getTargetEl(),"keydown");this.delegateClick("a.voteCommentUp",function(d,c){this.vote(d,c,"up")},this);this.delegateClick("a.voteCommentDown",function(d,c){this.vote(d,c,"down")},this);this.delegateClick("a.editComment",function(d,c){this.edit(d,c)},this);this.delegateClick("a.deleteComment",function(d,c){this.setDeleted(d,c,true)},this);this.delegateClick("a.undoDeleteComment",function(d,c){this.setDeleted(d,c,false)},this);this.delegateClick("a.readComment",this.markRead,this);this.delegateClick("a.add-tag",this.addTag,this);this.delegateClick("a.remove-tag",this.removeTag,this);if(this.enableDragDrop){new Docs.view.comments.DragZone(this);new Docs.view.comments.DropZone(this,{onValidDrop:Ext.Function.bind(this.setParent,this)})}},delegateClick:function(e,f,d){this.getEl().on("click",function(b,c){var a=this.getRecord(this.findItemByChild(c));if(a){f.call(d,c,a)}},this,{preventDefault:true,delegate:e})},vote:function(e,f,d){if(!Docs.Auth.isLoggedIn()){Docs.Tip.show("Please login to vote on this comment",e);return}if(f.get("upVote")&&d==="up"||f.get("downVote")&&d==="down"){Docs.Tip.show("You have already voted on this comment",e);return}f.vote(d,{failure:function(a){Docs.Tip.show(a,e)}})},edit:function(d,c){c.loadContent(function(a){var b=Ext.get(d).up(".comment").down(".content");b.update("");new Docs.view.comments.Form({renderTo:b,title:"Edit comment ",user:Docs.Auth.getUser(),content:a,listeners:{submit:function(f){c.saveContent(f)},cancel:function(){this.refreshComment(c)},scope:this}})},this)},refreshComment:function(b){this.refreshNode(this.getStore().findExact("id",b.get("id")))},setDeleted:function(d,f,e){f.setDeleted(e)},markRead:function(d,c){c.markRead()},addTag:function(d,f){var e=new Docs.view.comments.TagEditor();e.on("select",f.addTag,f);e.popup(d)},removeTag:function(e,f){var d=Ext.get(e).up(".tag").down("b").getHTML();f.removeTag(d)},setParent:function(c,d){c.setParent(d,function(){this.fireEvent("reorder")},this)},load:function(f,e){if(f.length===0){this.emptyText=""}var d=this.store.getProxy().getReader().readRecords(f).records;this.store.loadData(d,e);this.fireChangeEvent()},fireChangeEvent:function(){var b=function(a){return !a.get("deleted")};this.fireEvent("countChange",this.getStore().queryBy(b).getCount())}});Ext.define("Docs.view.comments.FullList",{extend:"Ext.panel.Panel",alias:"widget.commentsFullList",requires:["Docs.Settings","Docs.Auth","Docs.Comments","Docs.view.comments.List","Docs.view.comments.Pager"],componentCls:"comments-full-list",dockedItems:[{xtype:"container",dock:"top",height:35,html:['Comments ','',' Hide read ',"
"].join(" ")}],layout:"border",items:[{xtype:"tabpanel",cls:"comments-tabpanel",plain:true,region:"north",height:25,items:[{title:"Recent"},{title:"Votes"}]},{region:"center",xtype:"container",autoScroll:true,cls:"iScroll",items:[{xtype:"commentsList",id:"recentcomments",showTarget:true},{xtype:"commentsPager"}]}],afterRender:function(){this.callParent(arguments);this.initCheckboxes();this.initTabs();this.setMasked(true)},load:function(f,e){this.down("commentsList").load(f,e);var d=f[f.length-1];if(d){this.down("commentsPager").configure(d)}else{this.down("commentsPager").reset()}},setMasked:function(c){var d=this.getEl();if(d){d[c?"mask":"unmask"]()}},initCheckboxes:function(){var f=Docs.Settings.get("comments");var e=Ext.get("hideRead");if(e){e.dom.checked=f.hideRead;e.on("change",function(){this.saveSetting("hideRead",e.dom.checked);this.fireEvent("hideReadChange")},this)}this.setHideReadVisibility();var d=Docs.App.getController("Auth");d.on("available",this.setHideReadVisibility,this);d.on("loggedIn",this.setHideReadVisibility,this);d.on("loggedOut",this.setHideReadVisibility,this)},setHideReadVisibility:function(){var b=Docs.Auth.isModerator();Ext.get("hideRead").up("label").setStyle("display",b?"inline":"none")},initTabs:function(){this.down("tabpanel[cls=comments-tabpanel]").on("tabchange",function(d,c){if(c.title==="Recent"){this.fireEvent("sortOrderChange","recent")}else{this.fireEvent("sortOrderChange","votes")}},this)},saveSetting:function(d,e){var f=Docs.Settings.get("comments");f[d]=e;Docs.Settings.set("comments",f)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.comments.Index",{extend:"Ext.panel.Panel",alias:"widget.commentindex",mixins:["Docs.view.Scrolling"],requires:["Docs.Comments","Docs.view.comments.FullList","Docs.view.comments.HeaderMenu","Docs.view.comments.Users","Docs.view.comments.Targets","Docs.view.comments.Tags"],componentCls:"comments-index",margin:"10 0 0 0",layout:"border",items:[{region:"center",xtype:"commentsFullList"},{region:"east",itemId:"cardPanel",layout:"border",width:300,margin:"0 0 0 20",layout:"card",dockedItems:[{xtype:"commentsHeaderMenu",dock:"top",height:35}],items:[{xtype:"commentsUsers"},{xtype:"commentsTargets"},{xtype:"commentsTags"}]}],initComponent:function(){this.callParent(arguments);var d=this.down("#cardPanel");var c={users:this.down("commentsUsers"),targets:this.down("commentsTargets"),tags:this.down("commentsTags")};this.down("commentsHeaderMenu").on("select",function(a){Ext.Object.each(c,function(b,f){if(b!==a){f.deselectAll()}});d.getLayout().setActiveItem(c[a])},this)},getTab:function(){return Docs.Comments.isEnabled()?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.HoverMenu",{extend:"Ext.view.View",requires:["Docs.Comments"],alias:"widget.hovermenu",componentCls:"hover-menu",itemSelector:"div.item",deferEmptyText:false,columnHeight:25,initComponent:function(){this.renderTo=Ext.getBody();this.tpl=new Ext.XTemplate("","","",'','',"{[this.renderLink(values)]}","
",''," ","",""," "," ","
",{columnHeight:this.columnHeight,renderLink:function(e){var d=Ext.Array.map(Docs.data.signatures,function(a){return e.meta[a.key]?''+(a["short"])+" ":""}).join(" ");var f=Docs.Comments.counterHtml(e.commentCount);return Ext.String.format('{1} {2} {3} ',e.url,e.label,d,f)}});this.callParent()}});Ext.define("Docs.view.HoverMenuButton",{extend:"Ext.toolbar.TextItem",alias:"widget.hovermenubutton",componentCls:"hover-menu-button",requires:["Docs.view.HoverMenu"],showCount:false,statics:{menus:[]},initComponent:function(){this.addEvents("click");if(this.showCount){this.initialText=this.text;this.text+=" "+this.store.getCount()+" ";this.store.on("datachanged",function(){this.setText(this.initialText+" "+this.store.getCount()+" ")},this)}this.callParent(arguments)},getColumnHeight:function(){var c=200;var d=18;return Math.floor((Ext.Element.getViewportHeight()-c)/d)},onRender:function(){this.callParent(arguments);this.getEl().on({click:function(){this.fireEvent("click")},mouseover:this.deferShowMenu,mouseout:this.deferHideMenu,scope:this})},onDestroy:function(){if(this.menu){this.menu.destroy();Ext.Array.remove(Docs.view.HoverMenuButton.menus,this.menu)}this.callParent(arguments)},renderMenu:function(){this.menu=Ext.create("Docs.view.HoverMenu",{store:this.store,columnHeight:this.getColumnHeight()});this.menu.getEl().on({click:function(b){this.menu.hide();b.preventDefault()},mouseover:function(){clearTimeout(this.hideTimeout)},mouseout:this.deferHideMenu,scope:this});Docs.view.HoverMenuButton.menus.push(this.menu)},deferHideMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);if(!this.menu){return}this.hideTimeout=Ext.Function.defer(function(){this.menu.hide()},200,this)},deferShowMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);Docs.view.HoverMenuButton.showTimeout=Ext.Function.defer(function(){if(!this.menu){this.renderMenu()}Ext.Array.forEach(Docs.view.HoverMenuButton.menus,function(a){if(a!==this.menu){a.hide()}},this);clearTimeout(this.hideTimeout);this.menu.show();var j=this.getEl().getXY(),n=Ext.ComponentQuery.query("classoverview toolbar")[0],k=j[0]-10,l=n.getEl().getXY(),i=n.getWidth(),m=this.menu.getEl().getWidth(),h=Ext.getCmp("doctabs").getWidth();if(m>h){k=0}else{if((k+m)>h){k=h-m-30}}if(kb.name?1:0)});if(f.length>0){var j=this.createMemberButton({text:h[i],type:i,members:f});this.memberButtons[i]=j;this.items.push(j)}}this.checkItems={"public":this.createCb("Public","public"),"protected":this.createCb("Protected","protected"),"private":this.createCb("Private","private"),inherited:this.createCb("Inherited","inherited"),accessor:this.createCb("Accessor","accessor"),deprecated:this.createCb("Deprecated","deprecated"),removed:this.createCb("Removed","removed")};var g=this;this.items=this.items.concat([{xtype:"tbfill"},this.filterField=Ext.widget("triggerfield",{triggerCls:"reset",cls:"member-filter",hideTrigger:true,emptyText:"Filter class members",enableKeyEvents:true,width:150,listeners:{keyup:function(a){this.fireEvent("filter",a.getValue(),this.getShowFlags());a.setHideTrigger(a.getValue().length===0)},specialkey:function(a,b){if(b.keyCode===Ext.EventObject.ESC){a.reset();this.fireEvent("filter","",this.getShowFlags())}},scope:this},onTriggerClick:function(){this.reset();this.focus();g.fireEvent("filter","",g.getShowFlags());this.setHideTrigger(true)}}),{xtype:"tbspacer",width:10},this.commentCount=this.createCommentCount(),{xtype:"button",text:"Show",menu:[this.checkItems["public"],this.checkItems["protected"],this.checkItems["private"],"-",this.checkItems.inherited,this.checkItems.accessor,this.checkItems.deprecated,this.checkItems.removed]},{xtype:"button",iconCls:"expand-all-members",tooltip:"Expand all",enableToggle:true,toggleHandler:function(b,a){b.setIconCls(a?"collapse-all-members":"expand-all-members");this.fireEvent("toggleExpanded",a)},scope:this}]);this.callParent(arguments)},getShowFlags:function(){var d={};for(var c in this.checkItems){d[c]=this.checkItems[c].checked}return d},createCb:function(c,d){return Ext.widget("menucheckitem",{text:c,checked:Docs.Settings.get("show")[d],listeners:{checkchange:function(){this.fireEvent("filter",this.filterField.getValue(),this.getShowFlags())},scope:this}})},createMemberButton:function(d){var c=Ext.Array.map(d.members,function(a){return this.createLinkRecord(this.docClass.name,a)},this);return Ext.create("Docs.view.HoverMenuButton",{text:d.text,cls:"icon-"+d.type,store:this.createStore(c),showCount:true,listeners:{click:function(){this.fireEvent("menubuttonclick",d.type)},scope:this}})},createStore:function(c){var d=Ext.create("Ext.data.Store",{fields:["id","url","label","inherited","accessor","meta","commentCount"]});d.add(c);return d},createLinkRecord:function(d,c){return{id:c.id,url:d+"-"+c.id,label:(c.tagname==="method"&&c.name==="constructor")?"new "+d:c.name,inherited:c.owner!==d,accessor:c.tagname==="method"&&this.accessors.hasOwnProperty(c.name),meta:c.meta,commentCount:Docs.Comments.getCount(["class",d,c.id])}},showMenuItems:function(d,e,f){Ext.Array.forEach(["cfg","property","method","event"],function(b){if(this.memberButtons[b]){var c=this.memberButtons[b].getStore();c.filterBy(function(h){return !(!d["public"]&&!(h.get("meta")["private"]||h.get("meta")["protected"])||!d["protected"]&&h.get("meta")["protected"]||!d["private"]&&h.get("meta")["private"]||!d.inherited&&h.get("inherited")||!d.accessor&&h.get("accessor")||!d.deprecated&&h.get("meta")["deprecated"]||!d.removed&&h.get("meta")["removed"]||e&&!f.test(h.get("label")))});var a=this.memberButtons[b].menu;if(a&&Ext.getVersion().version>="4.1.0"){a.show();a.hide()}}},this)},getFilterValue:function(){return this.filterField.getValue()},createCommentCount:function(){return Ext.create("Ext.container.Container",{width:24,margin:"0 4 0 0",cls:"comment-btn",html:"0",hidden:true,listeners:{afterrender:function(b){b.el.addListener("click",function(){this.fireEvent("commentcountclick")},this)},scope:this}})},showCommentCount:function(){this.commentCount.show()},setCommentCount:function(b){this.commentCount.update(""+(b||0));this.refreshMenuCommentCounts()},refreshMenuCommentCounts:function(){Ext.Object.each(this.memberButtons,function(c,d){d.getStore().each(function(a){a.set("commentCount",Docs.Comments.getCount(["class",this.docClass.name,a.get("id")]))},this)},this)}});Ext.define("Docs.view.cls.Overview",{extend:"Ext.panel.Panel",alias:"widget.classoverview",requires:["Docs.view.cls.Toolbar","Docs.view.examples.Inline","Docs.view.comments.LargeExpander","Docs.view.cls.MemberWrap","Docs.view.comments.MemberWrap","Docs.Syntax","Docs.Settings","Docs.Comments"],mixins:["Docs.view.Scrolling"],cls:"class-overview iScroll",autoScroll:true,border:false,bodyPadding:"20 8 20 5",initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(j,h){var g=(typeof j=="string")?Ext.get(Ext.query(j)[0]):j;if(g){var f=g.hasCls("member");g.show();if(!g.isVisible(true)){g.up(".subsection").show();g.up(".members-section").show()}if(f&&g.down(".expandable")){this.setMemberExpanded(j.replace(/#/,""),true)}var i=this.body.getBox().y;this.scrollToView(g,{highlight:true,offset:(h||0)-(f?i:i-10)})}},load:function(b){this.docClass=b;this.accessors=this.buildAccessorsMap();if(this.toolbar){this.removeDocked(this.toolbar,false);this.toolbar.destroy()}this.toolbar=Ext.create("Docs.view.cls.Toolbar",{docClass:this.docClass,accessors:this.accessors,listeners:{filter:function(d,a){this.filterMembers(d,a)},menubuttonclick:function(a){this.scrollToEl("h3.members-title.icon-"+a,-20)},commentcountclick:this.expandClassComments,scope:this}});this.addDocked(this.toolbar);this.update(b.html);Docs.Syntax.highlight(this.getEl());this.filterMembers("",Docs.Settings.get("show"));if(Docs.Comments.isEnabled()){this.initComments()}else{this.initBasicMemberWrappers()}this.fireEvent("afterload")},initComments:function(){this.toolbar.showCommentCount();this.toolbar.setCommentCount(Docs.Comments.getCount(["class",this.docClass.name,""]));this.clsExpander=new Docs.view.comments.LargeExpander({name:this.docClass.name,el:Ext.query(".doc-contents")[0]});this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.comments.MemberWrap({parent:this,className:this.docClass.name,el:c});this.memberWrappers[d.getMemberId()]=d},this)},initBasicMemberWrappers:function(){this.memberWrappers={};Ext.Array.forEach(Ext.query(".member"),function(c){var d=new Docs.view.cls.MemberWrap({el:c});this.memberWrappers[d.getMemberId()]=d},this)},updateCommentCounts:function(){if(!this.docClass){return}var b=Docs.Comments.getCount(["class",this.docClass.name,""]);this.toolbar.setCommentCount(b);this.clsExpander.getExpander().setCount(b);Ext.Object.each(this.memberWrappers,function(a,d){d.setCount(Docs.Comments.getCount(d.getTarget()))},this)},expandClassComments:function(){var b=this.clsExpander.getExpander();b.expand();this.scrollToEl(b.getEl(),-40)},setMemberExpanded:function(c,d){this.memberWrappers[c].setExpanded(d)},isMemberExpanded:function(b){return this.memberWrappers[b].isExpanded()},setAllMembersExpanded:function(b){if(Docs.Comments.isEnabled()){Ext.Object.each(this.memberWrappers,function(a,d){d.getExpander().show()},this)}Ext.Object.each(this.memberWrappers,function(a,d){d.setExpanded(b)},this)},filterMembers:function(h,e){Docs.Settings.set("show",e);var f=h.length>0;Ext.Array.forEach(Ext.query(".doc-contents, .hierarchy"),function(a){Ext.get(a).setStyle({display:f?"none":"block"})});var g=new RegExp(Ext.String.escapeRegex(h),"i");this.eachMember(function(c){var b=Ext.get(c.id);var a=!(!e["public"]&&!(c.meta["private"]||c.meta["protected"])||!e["protected"]&&c.meta["protected"]||!e["private"]&&c.meta["private"]||!e.inherited&&(c.owner!==this.docClass.name)||!e.accessor&&c.tagname==="method"&&this.accessors.hasOwnProperty(c.name)||!e.deprecated&&c.meta.deprecated||!e.removed&&c.meta.removed||f&&!g.test(c.name));if(a){b.setStyle({display:"block"})}else{b.setStyle({display:"none"})}},this);Ext.Array.forEach(Ext.query(".member.first-child"),function(a){Ext.get(a).removeCls("first-child")});Ext.Array.forEach(Ext.query(".members-section"),function(b){var a=this.getVisibleElements(".member",b);Ext.get(b).setStyle({display:a.length>0?"block":"none"});Ext.Array.forEach(Ext.query(".subsection",b),function(d){var c=this.getVisibleElements(".member",d);if(c.length>0){c[0].addCls("first-child");Ext.get(d).setStyle({display:"block"})}else{Ext.get(d).setStyle({display:"none"})}},this)},this);this.toolbar.showMenuItems(e,f,g)},buildAccessorsMap:function(c){var d={};Ext.Array.forEach(this.docClass.members.cfg,function(b){var a=Ext.String.capitalize(b.name);d["get"+a]=true;d["set"+a]=true});return d},getVisibleElements:function(e,d){var f=Ext.Array.map(Ext.query(e,d),function(a){return Ext.get(a)});return Ext.Array.filter(f,function(a){return a.isVisible()})},eachMember:function(c,d){Ext.Array.forEach(["members","statics"],function(a){Ext.Object.each(this.docClass[a],function(b,f){Ext.Array.forEach(f,c,d)},this)},this)}});Ext.define("Docs.view.cls.Container",{extend:"Ext.container.Container",alias:"widget.classcontainer",requires:["Docs.view.cls.Header","Docs.view.cls.Overview"],layout:"border",padding:"5 10 0 10",initComponent:function(){this.items=[Ext.create("Docs.view.cls.Header",{region:"north"}),Ext.create("Docs.view.cls.Overview",{region:"center"})];this.callParent(arguments)}});Ext.define("Docs.view.Viewport",{extend:"Ext.container.Viewport",requires:["Docs.view.search.Container","Docs.view.Header","Docs.view.Tabs","Docs.view.TreeContainer","Docs.view.welcome.Index","Docs.view.auth.HeaderForm","Docs.view.comments.Index","Docs.view.cls.Index","Docs.view.cls.Container","Docs.view.guides.Index","Docs.view.guides.Container","Docs.view.videos.Index","Docs.view.videos.Container","Docs.view.examples.Index","Docs.view.examples.Container","Docs.view.examples.TouchContainer","Docs.view.tests.Index"],id:"viewport",layout:"border",defaults:{xtype:"container"},initComponent:function(){this.items=[{region:"north",id:"north-region",height:65,layout:{type:"vbox",align:"stretch"},items:[{height:37,xtype:"container",layout:"hbox",items:[{xtype:"docheader"},{xtype:"container",flex:1},{id:"loginContainer",xtype:"authHeaderForm",padding:"10 20 0 0"},{xtype:"searchcontainer",id:"search-container",width:230,margin:"4 0 0 0"}]},{xtype:"doctabs"}]},{region:"center",layout:"border",items:[{region:"west",xtype:"treecontainer",id:"treecontainer",border:1,bodyPadding:"10 9 4 9",width:240},{region:"center",id:"center-container",layout:"fit",border:false,padding:"5 10",items:{id:"card-panel",cls:"card-panel",xtype:"container",layout:{type:"card",deferredRender:true},items:[{autoScroll:true,xtype:"welcomeindex",id:"welcomeindex"},{xtype:"container",id:"failure"},{autoScroll:true,xtype:"classindex",id:"classindex"},{xtype:"classcontainer",id:"classcontainer"},{autoScroll:true,xtype:"guideindex",id:"guideindex"},{autoScroll:true,xtype:"guidecontainer",id:"guide",cls:"iScroll"},{xtype:"videoindex",id:"videoindex"},{autoScroll:true,xtype:"videocontainer",id:"video",cls:"iScroll"},{xtype:"exampleindex",id:"exampleindex"},{xtype:Docs.data.touchExamplesUi?"touchexamplecontainer":"examplecontainer",id:"example"},{xtype:"testsindex",id:"testsindex"},{xtype:"commentindex",id:"commentindex"}]}}]},{region:"south",id:"footer",height:20,contentEl:"footer-content"}];this.callParent(arguments)},setPageTitle:function(b){b=Ext.util.Format.stripTags(b);if(!this.origTitle){this.origTitle=document.title}document.title=b?(b+" - "+this.origTitle):this.origTitle}});Ext.define("Docs.Application",{requires:["Ext.app.Application","Docs.History","Docs.Comments","Docs.Settings","Docs.view.Viewport","Docs.controller.Auth","Docs.controller.Welcome","Docs.controller.Failure","Docs.controller.Classes","Docs.controller.Search","Docs.controller.InlineExamples","Docs.controller.Examples","Docs.controller.Guides","Docs.controller.Videos","Docs.controller.Tabs","Docs.controller.Comments","Docs.controller.CommentCounts","Docs.controller.Tests"],constructor:function(){Docs.Comments.init(this.createApp,this)},createApp:function(){new Ext.app.Application({name:"Docs",controllers:["Auth","Welcome","Failure","Classes","Search","InlineExamples","Examples","Guides","Videos","Tabs","Comments","CommentCounts","Tests"],launch:this.launch})},launch:function(){Docs.App=this;Docs.Settings.init();Ext.create("Docs.view.Viewport");Docs.History.init();if(Docs.initEventTracking){Docs.initEventTracking()}Ext.get("loading").remove()}});Ext.define("Docs.view.auth.Form",{extend:"Docs.view.auth.BaseForm",alias:"widget.authForm",componentCls:"auth-form",initComponent:function(){this.html=['Sign in to post a comment: ',this.createLoginFormHtml()];this.callParent(arguments)},afterRender:function(){this.callParent(arguments);this.bindFormSubmitEvent()}});Ext.define("Docs.view.comments.ListWithForm",{extend:"Ext.container.Container",alias:"widget.commentsListWithForm",requires:["Docs.view.comments.List","Docs.view.comments.Form","Docs.view.auth.Form","Docs.Comments","Docs.Auth"],componentCls:"comments-list-with-form",initComponent:function(){this.items=[this.list=new Docs.view.comments.List({enableDragDrop:true})];this.relayEvents(this.list,["countChange","reorder"]);this.callParent(arguments)},load:function(c,d){this.list.load(c,d);if(Docs.Auth.isLoggedIn()){this.showCommentingForm()}else{this.showAuthForm()}},showAuthForm:function(){if(this.commentingForm){this.remove(this.commentingForm);delete this.commentingForm}if(!this.authForm){this.authForm=new Docs.view.auth.Form();this.add(this.authForm)}},showCommentingForm:function(){if(this.authForm){this.remove(this.authForm);delete this.authForm}if(!this.commentingForm){this.commentingForm=new Docs.view.comments.Form({title:this.newCommentTitle,user:Docs.Auth.getUser(),userSubscribed:Docs.Comments.hasSubscription(this.target),listeners:{submit:this.postComment,subscriptionChange:this.subscribe,scope:this}});this.add(this.commentingForm)}},postComment:function(b){Docs.Comments.post({target:this.target,parentId:this.parentId,content:b,callback:function(a){this.commentingForm.setValue("");this.list.load([a],true)},scope:this})},subscribe:function(b){Docs.Comments.subscribe(this.target,b,function(){this.commentingForm.showSubscriptionMessage(b)},this)}});Ext.ns("Docs");Ext.Loader.setConfig({enabled:true,paths:{Docs:"app"}});Ext.require("Ext.form.field.Trigger");Ext.require("Ext.tab.Panel");Ext.require("Ext.grid.column.Action");Ext.require("Ext.grid.plugin.DragDrop");Ext.require("Ext.layout.container.Border");Ext.require("Ext.data.TreeStore");Ext.require("Ext.toolbar.Spacer");Ext.require("Docs.Application");Ext.onReady(function(){Ext.create("Docs.Application")});var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;(function(){function d(F){function w(J){var K=J.charCodeAt(0);if(K!==92){return K}var I=J.charAt(1);return(K=k[I])?K:"0"<=I&&I<="7"?parseInt(J.substring(1),8):I==="u"||I==="x"?parseInt(J.substring(2),16):J.charCodeAt(1)}function C(I){if(I<32){return(I<16?"\\x0":"\\x")+I.toString(16)}I=String.fromCharCode(I);if(I==="\\"||I==="-"||I==="["||I==="]"){I="\\"+I}return I}function A(J){for(var M=J.substring(1,J.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),J=[],I=[],O=M[0]==="^",P=O?1:0,L=M.length;P122||(N<65||K>90||I.push([Math.max(65,K)|32,Math.min(N,90)|32]),N<97||K>122||I.push([Math.max(97,K)&-33,Math.min(N,122)&-33]))}}I.sort(function(Q,R){return Q[0]-R[0]||R[1]-Q[1]});M=[];K=[NaN,NaN];for(P=0;PL[0]&&(L[1]+1>L[0]&&I.push("-"),I.push(C(L[1])))}I.push("]");return I.join("")}function E(J){for(var M=J.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),I=M.length,N=[],O=0,L=0;O=2&&J==="["?M[O]=A(K):J!=="\\"&&(M[O]=K.replace(/[A-Za-z]/g,function(P){P=P.charCodeAt(0);return"["+String.fromCharCode(P&-33,P|32)+"]"}))}}return M.join("")}for(var G=0,H=!1,x=!1,u=0,D=F.length;u=5&&"lang-"===O.substring(0,5))&&!(D&&typeof D[1]==="string")){M=!1,O="src"}M||(B[K]=O)}I=L;L+=K.length;if(M){M=D[1];var H=K.indexOf(M),G=H+M.length;D[2]&&(G=K.length-D[2].length,H=G-M.length);O=O.substring(5);t(F+I,K.substring(0,H),x,C);t(F+I+H,M,s(O,M),C);t(F+I+G,K.substring(G),x,C)}else{C.push(F+I,O)}}P.e=C}var w={},A;(function(){for(var G=u.concat(k),B=[],F={},H=0,E=G.length;H=0;){w[I.charAt(C)]=D}}D=D[1];I=""+D;F.hasOwnProperty(I)||(B.push(D),F[I]=q)}B.push(/[\S\s]/);A=d(B)})();var v=k.length;return x}function o(u){var k=[],w=[];u.tripleQuotedStrings?k.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):u.multiLineStrings?k.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):k.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);u.verbatimStrings&&w.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var v=u.hashComments;v&&(u.cStyleComments?(v>1?k.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):k.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),w.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):k.push(["com",/^#[^\n\r]*/,q,"#"]));u.cStyleComments&&(w.push(["com",/^\/\/[^\n\r]*/,q]),w.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));u.regexLiterals&&w.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(v=u.types)&&w.push(["typ",v]);u=(""+u.keywords).replace(/^ | $/g,"");u.length&&w.push(["kwd",RegExp("^(?:"+u.replace(/[\s,]+/g,"|")+")\\b"),q]);k.push(["pln",/^\s+/,q," \r\n\t\xa0"]);w.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return h(k,w)}function r(H,x){function E(K){switch(K.nodeType){case 1:if(B.test(K.className)){break}if("BR"===K.nodeName){C(K),K.parentNode&&K.parentNode.removeChild(K)}else{for(K=K.firstChild;K;K=K.nextSibling){E(K)}}break;case 3:case 4:if(v){var k=K.nodeValue,L=k.match(I);if(L){var M=k.substring(0,L.index);K.nodeValue=M;(k=k.substring(L.index+L[0].length))&&K.parentNode.insertBefore(J.createTextNode(k),K.nextSibling);C(K);M||K.parentNode.removeChild(K)}}}}function C(K){function k(M,R){var Q=R?M.cloneNode(!1):M,P=M.parentNode;if(P){var P=k(P,1),O=M.nextSibling;P.appendChild(Q);for(var N=O;N;N=O){O=N.nextSibling,P.appendChild(N)}}return Q}for(;!K.nextSibling;){if(K=K.parentNode,!K){return}}for(var K=k(K.nextSibling,0),L;(L=K.parentNode)&&L.nodeType===1;){K=L}F.push(K)}var B=/(?:^|\s)nocode(?:\s|$)/,I=/\r\n?|\n/,J=H.ownerDocument,A;H.currentStyle?A=H.currentStyle.whiteSpace:window.getComputedStyle&&(A=J.defaultView.getComputedStyle(H,q).getPropertyValue("white-space"));var v=A&&"pre"===A.substring(0,3);for(A=J.createElement("LI");H.firstChild;){A.appendChild(H.firstChild)}for(var F=[A],D=0;D=0;){var v=k[w];y.hasOwnProperty(v)?window.console&&console.warn("cannot override language handler %s",v):y[v]=u}}function s(u,k){if(!u||!y.hasOwnProperty(u)){u=/^\s*=J&&(Q+=2);T>=V&&(X+=2)}}catch(C){"console" in window&&console.log(C&&C.stack?C.stack:C)}}var m=["break,continue,do,else,for,if,return,while"],j=[[m,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],n=[j,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],l=[j,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],i=[l,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],j=[j,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],g=[m,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],f=[m,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],m=[m,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,b=/\S/,a=o({keywords:[n,i,j,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+g,f,m],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),y={};z(a,["default-code"]);z(h([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
-
-
-
-
-
-
-
diff --git a/docs/extjs/ext-all.js b/docs/extjs/ext-all.js
deleted file mode 100644
index 46aeaa0..0000000
--- a/docs/extjs/ext-all.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Ext JS 4.1 - JavaScript Library
-Copyright (c) 2006-2012, Sencha Inc.
-All rights reserved.
-licensing@sencha.com
-
-http://www.sencha.com/license
-
-Open Source License
-------------------------------------------------------------------------------------------
-This version of Ext JS is licensed under the terms of the Open Source GPL 3.0 license.
-
-http://www.gnu.org/licenses/gpl.html
-
-There are several FLOSS exceptions available for use with this release for
-open source applications that are distributed under a license other than GPL.
-
-* Open Source License Exception for Applications
-
- http://www.sencha.com/products/floss-exception.php
-
-* Open Source License Exception for Development
-
- http://www.sencha.com/products/ux-exception.php
-
-
-Alternate Licensing
-------------------------------------------------------------------------------------------
-Commercial and OEM Licenses are available for an alternate download of Ext JS.
-This is the appropriate option if you are creating proprietary applications and you are
-not prepared to distribute and share the source code of your application under the
-GPL v3 license. Please visit http://www.sencha.com/license for more details.
-
---
-
-This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. See the GNU General Public License for more details.
-*/
-var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=h;for(c in g){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(o,n,q){if(q){Ext.apply(o,q)}if(o&&n&&typeof n==="object"){var p,m,l;for(p in n){o[p]=n[p]}if(b){for(m=b.length;m--;){l=b[m];if(n.hasOwnProperty(l)){o[l]=n[l]}}}}return o};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:e,emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(k,i){var l;if(k){for(l in i){if(k[l]===undefined){k[l]=i[l]}}}return k},iterate:function(i,l,k){if(Ext.isEmpty(i)){return}if(k===undefined){k=i}if(Ext.isIterable(i)){Ext.Array.each.call(Ext.Array,i,l,k)}else{Ext.Object.each.call(Ext.Object,i,l,k)}}});Ext.apply(Ext,{extend:(function(){var i=a.constructor,k=function(n){for(var l in n){if(!n.hasOwnProperty(l)){continue}this[l]=n[l]}};return function(l,q,o){if(Ext.isObject(q)){o=q;q=l;l=o.constructor!==i?o.constructor:function(){q.apply(this,arguments)}}var n=function(){},m,p=q.prototype;n.prototype=p;m=l.prototype=new n();m.constructor=l;l.superclass=p;if(p.constructor===i){p.constructor=q}l.override=function(r){Ext.override(l,r)};m.override=k;m.proto=m;l.override(o);l.extend=function(r){return Ext.extend(l,r)};return l}}()),override:function(m,n){if(m.$isClass){m.override(n)}else{if(typeof m=="function"){Ext.apply(m.prototype,n)}else{var i=m.self,k,l;if(i&&i.$isClass){for(k in n){if(n.hasOwnProperty(k)){l=n[k];if(typeof l=="function"){l.$name=k;l.$owner=i;l.$previous=m.hasOwnProperty(k)?m[k]:d}m[k]=l}}}else{Ext.apply(m,n)}}}return m}});Ext.apply(Ext,{valueFrom:function(l,i,k){return Ext.isEmpty(l,k)?i:l},typeOf:function(k){var i,l;if(k===null){return"null"}i=typeof k;if(i==="undefined"||i==="string"||i==="number"||i==="boolean"){return i}l=j.call(k);switch(l){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(i==="function"){return"function"}if(i==="object"){if(k.nodeType!==undefined){if(k.nodeType===3){return(/\S/).test(k.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(i,k){return(i===null)||(i===undefined)||(!k?i==="":false)||(Ext.isArray(i)&&i.length===0)},isArray:("isArray" in Array)?Array.isArray:function(i){return j.call(i)==="[object Array]"},isDate:function(i){return j.call(i)==="[object Date]"},isObject:(j.call(null)==="[object Object]")?function(i){return i!==null&&i!==undefined&&j.call(i)==="[object Object]"&&i.ownerDocument===undefined}:function(i){return j.call(i)==="[object Object]"},isSimpleObject:function(i){return i instanceof Object&&i.constructor===Object},isPrimitive:function(k){var i=typeof k;return i==="string"||i==="number"||i==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(i){return j.call(i)==="[object Function]"}:function(i){return typeof i==="function"},isNumber:function(i){return typeof i==="number"&&isFinite(i)},isNumeric:function(i){return !isNaN(parseFloat(i))&&isFinite(i)},isString:function(i){return typeof i==="string"},isBoolean:function(i){return typeof i==="boolean"},isElement:function(i){return i?i.nodeType===1:false},isTextNode:function(i){return i?i.nodeName==="#text":false},isDefined:function(i){return typeof i!=="undefined"},isIterable:function(k){var i=typeof k,l=false;if(k&&i!="string"){if(i=="function"){if(Ext.isSafari){l=k instanceof NodeList||k instanceof HTMLCollection}}else{l=true}}return l?k.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){var p,o,m,l,r,n;if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}p=j.call(q);if(p==="[object Date]"){return new Date(q.getTime())}if(p==="[object Array]"){o=q.length;r=[];while(o--){r[o]=Ext.clone(q[o])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(n in q){r[n]=Ext.clone(q[n])}if(b){for(m=b.length;m--;){l=b[m];r[l]=q[l]}}}}return r||q},getUniqueGlobalNamespace:function(){var l=this.uniqueGlobalNamespace,k;if(l===undefined){k=0;do{l="ExtBox"+(++k)}while(Ext.global[l]!==undefined);Ext.global[l]=Ext;this.uniqueGlobalNamespace=l}return l},functionFactoryCache:{},cacheableFunctionFactory:function(){var o=this,l=Array.prototype.slice.call(arguments),k=o.functionFactoryCache,i,m,n;if(Ext.isSandboxed){n=l.length;if(n>0){n--;l[n]="var Ext=window."+Ext.name+";"+l[n]}}i=l.join("");m=k[i];if(!m){m=Function.prototype.constructor.apply(Function.prototype,l);k[i]=m}return m},functionFactory:function(){var l=this,i=Array.prototype.slice.call(arguments),k;if(Ext.isSandboxed){k=i.length;if(k>0){k--;i[k]="var Ext=window."+Ext.name+";"+i[k]}}return Function.prototype.constructor.apply(Function.prototype,i)},Logger:{verbose:e,log:e,info:e,warn:e,error:function(i){throw new Error(i)},deprecate:e}});Ext.type=Ext.typeOf}());Ext.globalEval=Ext.global.execScript?function(a){execScript(a)}:function($$code){(function(){eval($$code)}())};(function(){var a="4.1.1.1",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)}());Ext.String=(function(){var i=/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,m=/('|\\)/g,h=/\{(\d+)\}/g,b=/([-.*+?\^${}()|\[\]\/\\])/g,n=/^\s+|\s+$/g,j=/\s+/,l=/(^[^a-z]*|[^\w])/gi,d,a,g,c,e=function(p,o){return d[o]},k=function(p,o){return(o in a)?a[o]:String.fromCharCode(parseInt(o.substr(2),10))};return{createVarName:function(o){return o.replace(l,"")},htmlEncode:function(o){return(!o)?o:String(o).replace(g,e)},htmlDecode:function(o){return(!o)?o:String(o).replace(c,k)},addCharacterEntities:function(p){var o=[],s=[],q,r;for(q in p){r=p[q];a[q]=r;d[r]=q;o.push(r);s.push(q)}g=new RegExp("("+o.join("|")+")","g");c=new RegExp("("+s.join("|")+"|[0-9]{1,5};)","g")},resetCharacterEntities:function(){d={};a={};this.addCharacterEntities({"&":"&",">":">","<":"<",""":'"',"'":"'"})},urlAppend:function(p,o){if(!Ext.isEmpty(o)){return p+(p.indexOf("?")===-1?"?":"&")+o}return p},trim:function(o){return o.replace(i,"")},capitalize:function(o){return o.charAt(0).toUpperCase()+o.substr(1)},uncapitalize:function(o){return o.charAt(0).toLowerCase()+o.substr(1)},ellipsis:function(q,o,r){if(q&&q.length>o){if(r){var s=q.substr(0,o-2),p=Math.max(s.lastIndexOf(" "),s.lastIndexOf("."),s.lastIndexOf("!"),s.lastIndexOf("?"));if(p!==-1&&p>=(o-15)){return s.substr(0,p)+"..."}}return q.substr(0,o-3)+"..."}return q},escapeRegex:function(o){return o.replace(b,"\\$1")},escape:function(o){return o.replace(m,"\\$1")},toggle:function(p,q,o){return p===q?o:q},leftPad:function(p,q,r){var o=String(p);r=r||" ";while(o.lengthe)?e:d)},snap:function(h,e,g,i){var d;if(h===undefined||h=e){h+=e}else{if(d*2<-e){h-=e}}}}return b.constrain(h,g,i)},snapInRange:function(h,d,g,i){var e;g=(g||0);if(h===undefined||h=d){h+=d}}if(i!==undefined){if(h>(i=b.snapInRange(i,d,g))){h=i}}return h},toFixed:c?function(g,d){d=d||0;var e=a.pow(10,d);return(a.round(g*e)/e).toFixed(d)}:function(e,d){return e.toFixed(d)},from:function(e,d){if(isFinite(e)){e=parseFloat(e)}return !isNaN(e)?e:d},randomInt:function(e,d){return a.floor(a.random()*(d-e+1)+e)}});Ext.num=function(){return b.from.apply(this,arguments)}};(function(){var g=Array.prototype,o=g.slice,q=(function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}()),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=(function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}()),k=true,a,w,t,v;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F),E,I,A,e,C,D;if(H===B){if(K){G.push.apply(G,J)}}else{E=Math.min(z,B-H);I=H+E;A=I+K-E;e=B-I;C=B-E;if(AI){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:j?function(A,z,e){return A.forEach(z,e)}:function(C,A,z){var e=0,B=C.length;for(;ee){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e0){return setTimeout(Ext.supports.TimeoutActualLateness?function(){e()}:e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||this,arguments)})}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=function(){},b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){var k,h,g,d,j;for(k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(o){var e=a.parseRegexes.length,p=1,g=[],n=[],l=false,d="",j=0,k=o.length,m=[],h;for(;j Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:true},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("H",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}],g,d;for(g=0,d=c.length;g0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.MONTH,i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),Ext.Date.YEAR,i)).getDate())}j.setDate(e);j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var d=window.Date,c,l,j=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],h=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"],i=j.length,e=h.length,g,k,m;for(m=0;m0){for(d=0;d0){if(x===w){return z[x]}y=z[x];w=w.substring(x.length+1)}if(y.length>0){y+="/"}return y.replace(c,"/")+w.replace(g,"/")+".js"},getPrefix:function(x){var z=j.config.paths,y,w="";if(z.hasOwnProperty(x)){return x}for(y in z){if(z.hasOwnProperty(y)&&y+"."===x.substring(0,y.length+1)){if(y.length>w.length){w=y}}}return w},isAClassNameWithAKnownPrefix:function(w){var x=j.getPrefix(w);return x!==""&&x!==w},require:function(y,x,w,z){if(x){x.call(w)}},syncRequire:function(){},exclude:function(w){return{require:function(z,y,x){return j.require(z,y,x,w)},syncRequire:function(z,y,x){return j.syncRequire(z,y,x,w)}}},onReady:function(z,y,A,w){var x;if(A!==false&&Ext.onDocumentReady){x=z;z=function(){Ext.onDocumentReady(x,y,w)}}z.call(y)}});var o=[],p={},s={},q={},n={},u=[],v=[],i={};Ext.apply(j,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:o,isClassFileLoaded:p,isFileLoaded:s,readyListeners:u,optionalRequires:v,requiresMap:i,numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:q,scriptsLoading:0,syncModeEnabled:false,scriptElements:n,refreshQueue:function(){var A=o.length,x,z,w,y;if(!A&&!j.scriptsLoading){return j.triggerReady()}for(x=0;xj.numLoadedFiles){continue}for(w=0;w=200&&A<300)||(A===304)){if(!Ext.isIE){B="\n//@ sourceURL="+x}Ext.globalEval(G.responseText+B);E.call(H)}else{}}G=null}},syncRequire:function(){var w=j.syncModeEnabled;if(!w){j.syncModeEnabled=true}j.require.apply(j,arguments);if(!w){j.syncModeEnabled=false}j.refreshQueue()},require:function(O,F,z,B){var H={},y={},E=[],Q=[],N=[],x=[],D,P,J,I,w,C,M,L,K,G,A;if(B){B=(typeof B==="string")?[B]:B;for(L=0,G=B.length;L0){E=b.getNamesByExpression(w);for(K=0,A=E.length;K0){D=function(){var S=[],R,T;for(R=0,T=x.length;R0){Q=b.getNamesByExpression(I);A=Q.length;for(K=0;K0){if(!j.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((N.length>1)?"es":"")+": "+N.join(", "))}}else{D.call(z);return j}P=j.syncModeEnabled;if(!P){o.push({requires:N.slice(),callback:D,scope:z})}G=N.length;for(L=0;Lwindow.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b]+>/gi,c=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:"ab".substr(-1)!="b"?function(i,k,h){var j=String(i);return(k<0)?j.substr(Math.max(j.length+k,0),h):j.substr(k,h)}:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l2){}else{if(h.length>1){y=Ext.Number.toFixed(y,h[1].length)}else{y=Ext.Number.toFixed(y,0)}}x=y.toString();h=x.split(".");if(k){w=h[0];p=[];t=w.length;o=Math.floor(t/3);l=w.length%3||3;for(u=0;u ")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){i=Ext.isEmpty(i)?"":i;if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})}());Ext.define("Ext.util.TaskRunner",{interval:10,timerId:null,constructor:function(a){var b=this;if(typeof a=="number"){b.interval=a}else{if(a){Ext.apply(b,a)}}b.tasks=[];b.timerFn=Ext.Function.bind(b.onTick,b)},newTask:function(b){var a=new Ext.util.TaskRunner.Task(b);a.manager=this;return a},start:function(a){var c=this,b=new Date().getTime();if(!a.pending){c.tasks.push(a);a.pending=true}a.stopped=false;a.taskStartTime=b;a.taskRunTime=a.fireOnStart!==false?0:a.taskStartTime;a.taskRunCount=0;if(!c.firing){if(a.fireOnStart!==false){c.startTimer(0,b)}else{c.startTimer(a.interval,b)}}return a},stop:function(a){if(!a.stopped){a.stopped=true;if(a.onStop){a.onStop.call(a.scope||a,a)}}return a},stopAll:function(){Ext.each(this.tasks,this.stop,this)},firing:false,nextExpires:1e+99,onTick:function(){var m=this,e=m.tasks,a=new Date().getTime(),n=1e+99,k=e.length,c,o,h,b,d,g;m.timerId=null;m.firing=true;for(h=0;hc){n=c}}}if(o){m.tasks=o}m.firing=false;if(m.tasks.length){m.startTimer(n-a,new Date().getTime())}},startTimer:function(e,c){var d=this,b=c+e,a=d.timerId;if(a&&d.nextExpires-b>d.interval){clearTimeout(a);a=null}if(!a){if(e',''," ({childCount} children)"," ",''," ({depth} deep)"," ",'',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")"," ",""].join(""),{time:function(n){return Math.round(n*100)/100}})}var m=this.getData(l);m.name=this.name;m.pure.type="Pure";m.total.type="Total";m.times=[m.pure,m.total];return d.apply(m)},getData:function(l){var m=this;return{count:m.count,childCount:m.childCount,depth:m.maxDepth,pure:g(m.count,m.childCount,l,m.pure),total:g(m.count,m.childCount,l,m.total)}},enter:function(){var l=this,m={accum:l,leave:e,childTime:0,parent:c};++l.depth;if(l.maxDepth','
'," ",'
",'
','
'].join("");e.body.appendChild(h)}while(i--){g=c[i];if(h||g.early){d[g.identity]=g.fn.call(d,e,h)}else{b.push(g)}}if(h){e.body.removeChild(h)}d.tests=b},PointerEvents:"pointerEvents" in document.documentElement.style,CSS3BoxShadow:"boxShadow" in document.documentElement.style||"WebkitBoxShadow" in document.documentElement.style||"MozBoxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),TimeoutActualLateness:(function(){setTimeout(function(){Ext.supports.TimeoutActualLateness=arguments.length!==0},0)}()),tests:[{identity:"Transitions",fn:function(h,k){var g=["webkit","Moz","o","ms","khtml"],j="TransitionEnd",b=[g[0]+j,"transitionend",g[2]+j,g[3]+j,g[4]+j],e=g.length,d=0,c=false;for(;d
";return(c.childNodes.length==2)}},{identity:"Float",fn:function(b,c){return !!c.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(b){return !!b.createElement("audio").canPlayType}},{identity:"History",fn:function(){var b=window.history;return !!(b&&b.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(h,j){var g="background-image:",d="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",i="linear-gradient(left top, black, white)",e="-moz-"+i,b="-o-"+i,c=[g+d,g+i,g+e,g+b];j.style.cssText=c.join(";");return(""+j.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(e,g){var c=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],d=false,b;for(b=0;b=534.16}},{identity:"TextAreaMaxLength",fn:function(){var b=document.createElement("textarea");return("maxlength" in b)}},{identity:"GetPositionPercentage",fn:function(b,c){return a(c.childNodes[2],"left")=="10%"}}]}}());Ext.supports.init();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){var b={};function d(h,i,j,g){return function(){if(j.target===arguments[0]){h.apply(g,arguments)}}}function c(h,i,j,g){i.task=new Ext.util.DelayedTask();return function(){i.task.delay(j.buffer,h,g,Ext.Array.toArray(arguments))}}function a(h,i,j,g){return function(){var k=new Ext.util.DelayedTask();if(!i.tasks){i.tasks=[]}i.tasks.push(k);k.delay(j.delay||10,h,g,Ext.Array.toArray(arguments))}}function e(h,i,j,g){return function(){var k=i.ev;if(k.removeListener(i.fn,g)&&k.observable){k.observable.hasListeners[k.name]--}return h.apply(g,arguments)}}return{isEvent:true,constructor:function(h,g){this.name=g;this.observable=h;this.listeners=[]},addListener:function(i,h,g){var j=this,k;h=h||j.observable;if(!j.isListening(i,h)){k=j.createListener(i,h,g);if(j.firing){j.listeners=j.listeners.slice(0)}j.listeners.push(k)}},createListener:function(j,i,g){g=g||b;i=i||this.observable;var k={fn:j,scope:i,o:g,ev:this},h=j;if(g.single){h=e(h,k,g,i)}if(g.target){h=d(h,k,g,i)}if(g.delay){h=a(h,k,g,i)}if(g.buffer){h=c(h,k,g,i)}k.fireFn=h;return k},findListener:function(l,k){var j=this.listeners,g=j.length,m,h;while(g--){m=j[g];if(m){h=m.scope;if(m.fn==l&&(h==(k||this.observable))){return g}}}return -1},isListening:function(h,g){return this.findListener(h,g)!==-1},removeListener:function(j,i){var l=this,h,m,g;h=l.findListener(j,i);if(h!=-1){m=l.listeners[h];if(l.firing){l.listeners=l.listeners.slice(0)}if(m.task){m.task.cancel();delete m.task}g=m.tasks&&m.tasks.length;if(g){while(g--){m.tasks[g].cancel()}delete m.tasks}Ext.Array.erase(l.listeners,h,1);return true}return false},clearListeners:function(){var h=this.listeners,g=h.length;while(g--){this.removeListener(h[g].fn,h[g].scope)}},fire:function(){var l=this,j=l.listeners,k=j.length,h,g,m;if(k>0){l.firing=true;for(h=0;h";for(;r\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(o){o=o||{};Ext.apply(this,o)},execute:function(p){var r=this.operations,s=0,t=r.length,q,o;if(!p){o=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(p)){o=p}else{if(p.isMixedCollection){o=p.items}}}for(;s1){for(r=0,s=t.length;r0){o.push(p[0])}return o},last:function(q){var o=q.length,p=[];if(o>0){p.push(q[o-1])}return p}},query:function(p,w){var x=p.split(","),o=x.length,q=0,r=[],y=[],v={},t,s,u;for(;q1){s=r.length;for(q=0;q111&&g.keyCode<124){g.keyCode=-1}}catch(h){}}},getRelatedTarget:function(e){e=e.browserEvent||e;var g=e.relatedTarget;if(!g){if(a.mouseLeaveRe.test(e.type)){g=e.toElement}else{if(a.mouseEnterRe.test(e.type)){g=e.fromElement}}}return a.resolveTextNode(g)},getPageX:function(e){return a.getPageXY(e)[0]},getPageY:function(e){return a.getPageXY(e)[1]},getPageXY:function(h){h=h.browserEvent||h;var g=h.pageX,j=h.pageY,i=d.documentElement,e=d.body;if(!g&&g!==0){g=h.clientX+(i&&i.scrollLeft||e&&e.scrollLeft||0)-(i&&i.clientLeft||e&&e.clientLeft||0);j=h.clientY+(i&&i.scrollTop||e&&e.scrollTop||0)-(i&&i.clientTop||e&&e.clientTop||0)}return[g,j]},getTarget:function(e){e=e.browserEvent||e;return a.resolveTextNode(e.target||e.srcElement)},resolveTextNode:Ext.isGecko?function(g){if(!g){return}var e=HTMLElement.prototype.toString.call(g);if(e=="[xpconnect wrapped native prototype]"||e=="[object XULElement]"){return}return g.nodeType==3?g.parentNode:g}:function(e){return e&&e.nodeType==3?e.parentNode:e},curWidth:0,curHeight:0,onWindowResize:function(i,h,g){var e=a.resizeEvent;if(!e){a.resizeEvent=e=new Ext.util.Event();a.on(c,"resize",a.fireResize,null,{buffer:100})}e.addListener(i,h,g)},fireResize:function(){var e=Ext.Element.getViewWidth(),g=Ext.Element.getViewHeight();if(a.curHeight!=g||a.curWidth!=e){a.curHeight=g;a.curWidth=e;a.resizeEvent.fire(e,g)}},removeResizeListener:function(h,g){var e=a.resizeEvent;if(e){e.removeListener(h,g)}},onWindowUnload:function(i,h,g){var e=a.unloadEvent;if(!e){a.unloadEvent=e=new Ext.util.Event();a.addListener(c,"unload",a.fireUnload)}if(i){e.addListener(i,h,g)}},fireUnload:function(){try{d=c=undefined;var m,h,k,j,g;a.unloadEvent.fire();if(Ext.isGecko3){m=Ext.ComponentQuery.query("gridview");h=0;k=m.length;for(;h=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return a.useKeyDown?"keydown":"keypress"}});if(!("addEventListener" in document)&&document.attachEvent){Ext.apply(a,{pollScroll:function(){var g=true;try{document.documentElement.doScroll("left")}catch(h){g=false}if(g&&document.body){a.onReadyEvent({type:"doScroll"})}else{a.scrollTimeout=setTimeout(a.pollScroll,20)}return g},scrollTimeout:null,readyStatesRe:/complete/i,checkReadyState:function(){var e=document.readyState;if(a.readyStatesRe.test(e)){a.onReadyEvent({type:e})}},bindReadyEvent:function(){var g=true;if(a.hasBoundOnReady){return}try{g=window.frameElement===undefined}catch(h){g=false}if(!g||!d.documentElement.doScroll){a.pollScroll=Ext.emptyFn}if(a.pollScroll()===true){return}if(d.readyState=="complete"){a.onReadyEvent({type:"already "+(d.readyState||"body")})}else{d.attachEvent("onreadystatechange",a.checkReadyState);window.attachEvent("onload",a.onReadyEvent);a.hasBoundOnReady=true}},onReadyEvent:function(g){if(g&&g.type){a.onReadyChain.push(g.type)}if(a.hasBoundOnReady){document.detachEvent("onreadystatechange",a.checkReadyState);window.detachEvent("onload",a.onReadyEvent)}if(Ext.isNumber(a.scrollTimeout)){clearTimeout(a.scrollTimeout);delete a.scrollTimeout}if(!Ext.isReady){a.fireDocReady()}},onReadyChain:[]})}Ext.onReady=function(h,g,e){Ext.Loader.onReady(h,g,true,e)};Ext.onDocumentReady=a.onDocumentReady;a.on=a.addListener;a.un=a.removeListener;Ext.onReady(b)};Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a}()),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:(function(){var d,e={},c;if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}())},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g ")}else{c.push(">");if((j=d.tpl)){j.applyOut(d.tplData,c)}if((j=d.html)){c.push(j)}if((j=d.cn||d.children)){h.generateMarkup(j,c)}g=h.closeTags;c.push(g[a]||(g[a]=""+a+">"))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(d,e){if(e){var b=0,a,c;d=Ext.fly(d);if(typeof e=="function"){e=e.call()}if(typeof e=="string"){e=Ext.util.Format.trim(e).split(/\s*(?::|;)\s*/);for(a=e.length;b "'+g+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});(function(){var a=window.document,b=/^\s+|\s+$/g,c=/\s/;if(!Ext.cache){Ext.cache={}}Ext.define("Ext.dom.AbstractElement",{inheritableStatics:{get:function(e){var g=this,h=Ext.dom.Element,d,j,i,k;if(!e){return null}if(typeof e=="string"){if(e==Ext.windowId){return h.get(window)}else{if(e==Ext.documentId){return h.get(a)}}d=Ext.cache[e];if(d&&d.skipGarbageCollection){j=d.el;return j}if(!(i=a.getElementById(e))){return null}if(d&&d.el){j=Ext.updateCacheEntry(d,i).el}else{j=new h(i,!!d)}return j}else{if(e.tagName){if(!(k=e.id)){k=Ext.id(e)}d=Ext.cache[k];if(d&&d.el){j=Ext.updateCacheEntry(d,e).el}else{j=new h(e,!!d)}return j}else{if(e instanceof g){if(e!=g.docEl&&e!=g.winEl){k=e.id;d=Ext.cache[k];if(d){Ext.updateCacheEntry(d,a.getElementById(k)||e.dom)}}return e}else{if(e.isComposite){return e}else{if(Ext.isArray(e)){return g.select(e)}else{if(e===a){if(!g.docEl){g.docEl=Ext.Object.chain(h.prototype);g.docEl.dom=a;g.docEl.id=Ext.id(a);g.addToCache(g.docEl)}return g.docEl}else{if(e===window){if(!g.winEl){g.winEl=Ext.Object.chain(h.prototype);g.winEl.dom=window;g.winEl.id=Ext.id(window);g.addToCache(g.winEl)}return g.winEl}}}}}}}return null},addToCache:function(d,e){if(d){Ext.addCacheEntry(e,d)}return d},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var n,m={},k,d,g,l,e,o=[],h=false;for(k=0,d=arguments.length;kwindow.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});(function(){var g=document,a=Ext.dom.AbstractElement,e=null,d=g.compatMode=="CSS1Compat",c,b=function(i){if(!c){c=new a.Fly()}c.attach(i);return c};if(!("activeElement" in g)&&g.addEventListener){g.addEventListener("focus",function(i){if(i&&i.target){e=(i.target==g)?null:i.target}},true)}function h(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}a.addInheritableStatics({getActiveElement:function(){return g.activeElement||e},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug,o,i,p,j;if(l||m){o=g.activeElement||e;i=o&&o.tagName;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&o.type=="text")){if(Ext.dom.Element.isAncestor(n,o)){p=o.selectionStart;j=o.selectionEnd;if(Ext.isNumber(p)&&Ext.isNumber(j)){return h(o,p,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(i){return i?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!d?g.body.scrollHeight:g.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!d?g.body.scrollWidth:g.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(i){return Ext.dom.Element.getXY(i)[1]},getX:function(i){return Ext.dom.Element.getXY(i)[0]},getXY:function(k){var n=g.body,j=g.documentElement,i=0,l=0,o=[0,0],r=Math.round,m,q;k=Ext.getDom(k);if(k!=g&&k!=n){if(Ext.isIE){try{m=k.getBoundingClientRect();l=j.clientTop||n.clientTop;i=j.clientLeft||n.clientLeft}catch(p){m={left:0,top:0}}}else{m=k.getBoundingClientRect()}q=b(document).getScroll();o=[r(m.left+q.left-i),r(m.top+q.top-l)]}return o},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){Ext.dom.Element.setXY(j,[i,false])},setY:function(i,j){Ext.dom.Element.setXY(i,[false,j])},serializeForm:function(k){var l=k.elements||(document.forms[k]||Ext.getDom(k)).elements,v=false,u=encodeURIComponent,p="",n=l.length,q,i,t,x,w,r,m,s,j;for(r=0;rn){m=q?h.left-r:n-r}if(m<0){m=q?h.right:0}if(l+p>u){l=o?h.top-p:u-p}if(l<0){l=o?h.bottom:0}}return[m,l]},getAnchor:function(){var b=(this.$cache||this.getCache()).data,a;if(!this.dom){return}a=b._anchor;if(!a){a=b._anchor={}}return a},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c}});Ext.dom.AbstractElement.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(b,g,j){var i=this,k=(g||"before").toLowerCase()=="after",d,a,c,h;if(Ext.isArray(b)){a=i;c=b.length;for(h=0;h1){g=[g,arguments[1]]}e=c.translatePoints(g);b=c.dom.style;for(d in e){if(!e.hasOwnProperty(d)){continue}if(!isNaN(e[d])){b[d]=e[d]+"px"}}return c},getLeft:function(b){return parseInt(this.getStyle("left"),10)||0},getRight:function(b){return parseInt(this.getStyle("right"),10)||0},getTop:function(b){return parseInt(this.getStyle("top"),10)||0},getBottom:function(b){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(b,i){i=isNaN(b[1])?i:b[1];b=isNaN(b[0])?b:b[0];var e=this,g=e.isStyle("position","relative"),h=e.getXY(),c=parseInt(e.getStyle("left"),10),d=parseInt(e.getStyle("top"),10);c=!isNaN(c)?c:(g?0:e.dom.offsetLeft);d=!isNaN(d)?d:(g?0:e.dom.offsetTop);return{left:(b-h[0]+c),top:(i-h[1]+d)}},setBox:function(e){var d=this,c=e.width,b=e.height,h=e.top,g=e.left;if(g!==undefined){d.setLeft(g)}if(h!==undefined){d.setTop(h)}if(c!==undefined){d.setWidth(c)}if(b!==undefined){d.setHeight(b)}return this},getBox:function(i,m){var j=this,g=j.dom,d=g.offsetWidth,n=g.offsetHeight,p,h,e,c,o,k;if(!m){p=j.getXY()}else{if(i){p=[0,0]}else{p=[parseInt(j.getStyle("left"),10)||0,parseInt(j.getStyle("top"),10)||0]}}if(!i){h={x:p[0],y:p[1],0:p[0],1:p[1],width:d,height:n}}else{e=j.getBorderWidth.call(j,"l")+j.getPadding.call(j,"l");c=j.getBorderWidth.call(j,"r")+j.getPadding.call(j,"r");o=j.getBorderWidth.call(j,"t")+j.getPadding.call(j,"t");k=j.getBorderWidth.call(j,"b")+j.getPadding.call(j,"b");h={x:p[0]+e,y:p[1]+o,0:p[0]+e,1:p[1]+o,width:d-(e+c),height:n-(o+k)}}h.left=h.x;h.top=h.y;h.right=h.x+h.width;h.bottom=h.y+h.height;return h},getPageBox:function(g){var j=this,d=j.dom,m=d.offsetWidth,i=d.offsetHeight,o=j.getXY(),n=o[1],c=o[0]+m,k=o[1]+i,e=o[0];if(!d){return new Ext.util.Region()}if(g){return new Ext.util.Region(n,c,k,e)}else{return{left:e,top:n,width:m,height:i,right:c,bottom:k}}}})}());(function(){var q=Ext.dom.AbstractElement,o=document.defaultView,n=Ext.Array,m=/^\s+|\s+$/g,b=/\w/g,p=/\s+/,t=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,h=Ext.supports.ClassList,e="padding",d="margin",s="border",k="-left",r="-right",l="-top",c="-bottom",i="-width",j={l:s+k+i,r:s+r+i,t:s+l+i,b:s+c+i},g={l:e+k,r:e+r,t:e+l,b:e+c},a={l:d+k,r:d+r,t:d+l,b:d+c};q.override({styleHooks:{},addStyles:function(B,A){var w=0,z=(B||"").match(b),y,u=z.length,x,v=[];if(u==1){w=Math.abs(parseFloat(this.getStyle(A[z[0]]))||0)}else{if(u){for(y=0;y0?u:0},getWidth:function(u){var w=this.dom,v=u?(w.clientWidth-this.getPadding("lr")):w.offsetWidth;return v>0?v:0},setWidth:function(u){var v=this;v.dom.style.width=q.addUnits(u);return v},setHeight:function(u){var v=this;v.dom.style.height=q.addUnits(u);return v},getBorderWidth:function(u){return this.addStyles(u,j)},getPadding:function(u){return this.addStyles(u,g)},margins:a,applyStyles:function(w){if(w){var v,u,x=this.dom;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){w=Ext.util.Format.trim(w).split(/\s*(?::|;)\s*/);for(v=0,u=w.length;v'+v+" "):""});C=A.getSize();x.mask=E;if(w===document.body){C.height=window.innerHeight;if(A.orientationHandler){Ext.EventManager.unOrientationChange(A.orientationHandler,A)}A.orientationHandler=function(){C=A.getSize();C.height=window.innerHeight;E.setSize(C)};Ext.EventManager.onOrientationChange(A.orientationHandler,A)}E.setSize(C);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var v=this,x=(v.$cache||v.getCache()).data,u=x.mask,w=Ext.baseCSSPrefix;if(u){u.remove();delete x.mask}v.removeCls([w+"masked",w+"masked-relative"]);if(v.dom===document.body){Ext.EventManager.unOrientationChange(v.orientationHandler,v);delete v.orientationHandler}}});q.populateStyleMap=function(B,u){var A=["margin-","padding-","border-width-"],z=["before","after"],w,y,v,x;for(w=A.length;w--;){for(x=2;x--;){y=A[w]+z[x];B[q.normalize(y)]=B[y]={name:q.normalize(A[w]+u[x])}}}};Ext.onReady(function(){var C=Ext.supports,u,A,y,v,B;function z(H,E,G,D){var F=D[this.name]||"";return t.test(F)?"transparent":F}function x(J,G,I,F){var D=F.marginRight,E,H;if(D!="0px"){E=J.style;H=E.display;E.display="inline-block";D=(I?F:J.ownerDocument.defaultView.getComputedStyle(J,null)).marginRight;E.display=H}return D}function w(K,H,J,G){var D=G.marginRight,F,E,I;if(D!="0px"){F=K.style;E=q.getRightMarginFixCleaner(K);I=F.display;F.display="inline-block";D=(J?G:K.ownerDocument.defaultView.getComputedStyle(K,"")).marginRight;F.display=I;E()}return D}u=q.prototype.styleHooks;q.populateStyleMap(u,["left","right"]);if(C.init){C.init()}if(!C.RightMargin){u.marginRight=u["margin-right"]={name:"marginRight",get:(C.DisplayChangeInputSelectionBug||C.DisplayChangeTextAreaSelectionBug)?w:x}}if(!C.TransparentColor){A=["background-color","border-color","color","outline-color"];for(y=A.length;y--;){v=A[y];B=q.normalize(v);u[v]=u[B]={name:B,get:z}}}})}());Ext.dom.AbstractElement.override({findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g
"+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});(function(){var b="afterbegin",i="afterend",a="beforebegin",o="beforeend",l="",c=l+"",n=" "+h,k=c+"",e=" "+n,p=document.createElement("div"),m=["BeforeBegin","previousSibling"],j=["AfterEnd","nextSibling"],d={beforebegin:m,afterend:j},g={beforebegin:m,afterend:j,afterbegin:["AfterBegin","firstChild"],beforeend:["BeforeEnd","lastChild"]};Ext.define("Ext.dom.Helper",{extend:"Ext.dom.AbstractHelper",requires:["Ext.dom.AbstractElement"],tableRe:/^table|tbody|tr|td$/i,tableElRe:/td|tr|tbody/i,useDom:false,createDom:function(q,w){var r,z=document,u,x,s,y,v,t;if(Ext.isArray(q)){r=z.createDocumentFragment();for(v=0,t=q.length;v+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*\\]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803,longHex=/\\([0-9a-fA-F]{6})/g,shortHex=/\\([0-9a-fA-F]{1,6})\s{0,1}/g,nonHex=/\\([^0-9a-fA-F]{1})/g,escapes=/\\/g,num,hasEscapes,longHexToChar=function($0,$1){return String.fromCharCode(parseInt($1,16))},shortToLongHex=function($0,$1){while($1.length<6){$1="0"+$1}return"\\"+$1},charToLongHex=function($0,$1){num=$1.charCodeAt(0).toString(16);if(num.length===1){num="0"+num}return"\\0000"+num},unescapeCssSelector=function(selector){return(hasEscapes)?selector.replace(longHex,longHexToChar):selector},setupEscapes=function(path){hasEscapes=(path.indexOf("\\")>-1);if(hasEscapes){path=path.replace(shortHex,shortToLongHex).replace(nonHex,charToLongHex).replace(escapes,"\\\\")}return path};eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){cls=unescapeCssSelector(cls);if(!cls){return nodeSet}var result=[],ri=-1,i,ci;for(i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs,i,ni,j,ci,cn,utag,n,cj;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){utag=tagName.toUpperCase();for(i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){utag=tagName.toUpperCase();for(i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.escapeId(Ext.id(root))+" "+path;root=root.parentNode}return Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}else{setupEscapes(path)}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}else{setupEscapes(ss)}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-\\]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w\-\\]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n,i,ci;for(i=0;(ci=n=c[i]);i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0,i,n,j,cn,pn;for(i=0;n=c[i];i++){pn=n.parentNode;if(batch!=pn._batch){j=0;for(cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1,i,ci,cns,j,cn,empty;for(i=0,ci;ci=c[i];i++){cns=ci.childNodes;j=0;empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if((ci.textContent||ci.innerText||ci.text||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s,i,ci,j;for(i=0;ci=c[i];i++){for(j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1,i,ci,n;for(i=0;ci=c[i];i++){n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}());Ext.query=Ext.DomQuery.select;(function(){var HIDDEN="hidden",DOC=document,VISIBILITY="visibility",DISPLAY="display",NONE="none",XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,visFly,noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},isScrolled=function(c){var r=[],ri=-1,i,ci;for(i=0;ci=c[i];i++){if(ci.scrollTop>0||ci.scrollLeft>0){r[++ri]=ci}}return r},Element=Ext.define("Ext.dom.Element",{extend:"Ext.dom.AbstractElement",alternateClassName:["Ext.Element","Ext.core.Element"],addUnits:function(){return this.self.addUnits.apply(this.self,arguments)},focus:function(defer,dom){var me=this,scrollTop,body;dom=dom||me.dom;body=(dom.ownerDocument||DOC).body||DOC.body;try{if(Number(defer)){Ext.defer(me.focus,defer,me,[null,dom])}else{if(dom.offsetHeight>Element.getViewHeight()){scrollTop=body.scrollTop}dom.focus();if(scrollTop!==undefined){body.scrollTop=scrollTop}}}catch(e){}return me},blur:function(){try{this.dom.blur()}catch(e){}return this},isBorderBox:function(){var box=Ext.isBorderBox;if(box){box=!((this.dom.tagName||"").toLowerCase() in noBoxAdjust)}return box},hover:function(overFn,outFn,scope,options){var me=this;me.on("mouseenter",overFn,scope||me.dom,options);me.on("mouseleave",outFn,scope||me.dom,options);return me},getAttributeNS:function(ns,name){return this.getAttribute(name,ns)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&DOC.documentMode===9))?function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]||null}return null}if(name==="for"){name="htmlFor"}return d[name]||null}:function(name,ns){var d=this.dom;if(ns){return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)}return d.getAttribute(name)||d[name]||null},cacheScrollValues:function(){var me=this,scrolledDescendants,el,i,scrollValues=[],result=function(){for(i=0;i]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!(Ext.isIE6||Ext.isIE7||Ext.isIE8);El.boxMarkup='';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThreadId)}else{var eid,d,o,t;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}d=o.dom;if(!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}El.collectorThreadId=setInterval(garbageCollect,30000);El.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this,e,eLen;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){eLen=eventName.length;for(e=0;e';interval=setInterval(function(){var hd,match,attrs,srcMatch,typeMatch,el,s;if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);hd=Ext.getHead().dom;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},getScopeParent:function(){var parent=this.dom.parentNode;if(Ext.scopeResetCSS){parent=parent.parentNode;if(!Ext.supports.CSS3LinearGradient||!Ext.supports.CSS3BorderRadius){parent=parent.parentNode}}return parent},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},focusable:function(){var dom=this.dom,nodeName=dom.nodeName,canFocus=false;if(!dom.disabled){if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=!isNaN(dom.tabIndex)}}return canFocus&&this.isVisible(true)}});if(Ext.isIE){El.prototype.getById=function(id,asDom){var dom=this.dom,cacheItem,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cacheItem=EC[id];if(cacheItem&&cacheItem.el){ret=Ext.updateCacheEntry(cacheItem,el).el}else{ret=new Element(el)}}return ret}}return asDom?Ext.getDom(id):El.get(id)}}El.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners"});El.Fly=AbstractElement.Fly=new Ext.Class({extend:El,constructor:function(dom){this.dom=dom},attach:AbstractElement.Fly.prototype.attach});if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}})}());Ext.dom.Element.override((function(){var d=document,c=window,a=/^([a-z]+)-([a-z]+)(\?)?$/,b=Math.round;return{getAnchorXY:function(j,o,h){j=(j||"tl").toLowerCase();h=h||{};var m=this,i=m.dom==d.body||m.dom==d,e=h.width||i?Ext.dom.Element.getViewWidth():m.getWidth(),g=h.height||i?Ext.dom.Element.getViewHeight():m.getHeight(),q,n=m.getXY(),p=m.getScroll(),l=i?p.left:!o?n[0]:0,k=i?p.top:!o?n[1]:0;switch(j){case"tl":q=[0,0];break;case"bl":q=[0,g];break;case"tr":q=[e,0];break;case"c":q=[b(e*0.5),b(g*0.5)];break;case"t":q=[b(e*0.5),0];break;case"l":q=[0,b(g*0.5)];break;case"r":q=[e,b(g*0.5)];break;case"b":q=[b(e*0.5),g];break;case"br":q=[e,g]}return[q[0]+l,q[1]+k]},getAlignToXY:function(m,G,j){m=Ext.get(m);if(!m||!m.dom){}j=j||[0,0];G=(!G||G=="?"?"tl-bl?":(!(/-/).test(G)&&G!==""?"tl-"+G:G||"tl-bl")).toLowerCase();var H=this,l,w,q,o,k,z,A,E=Ext.dom.Element.getViewWidth()-10,i=Ext.dom.Element.getViewHeight()-10,g,h,n,p,u,v,F=d.documentElement,s=d.body,D=(F.scrollLeft||s.scrollLeft||0),B=(F.scrollTop||s.scrollTop||0),C,t,r,e=G.match(a);t=e[1];r=e[2];C=!!e[3];l=H.getAnchorXY(t,true);w=m.getAnchorXY(r,false);q=w[0]-l[0]+j[0];o=w[1]-l[1]+j[1];if(C){k=H.getWidth();z=H.getHeight();A=m.getRegion();g=t.charAt(0);h=t.charAt(t.length-1);n=r.charAt(0);p=r.charAt(r.length-1);u=((g=="t"&&n=="b")||(g=="b"&&n=="t"));v=((h=="r"&&p=="l")||(h=="l"&&p=="r"));if(q+k>E+D){q=v?A.left-k:E+D-k}if(qi+B){o=u?A.top-z:i+B-z}if(oi.right){h=true;e[0]=(i.right-k.right)}if(k.left+e[0]i.bottom){h=true;e[1]=(i.bottom-k.bottom)}if(k.top+e[1]a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(e.scrollLeft+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(c,e,a){var g=/top/i.test(c),d=this,h=d.dom,b,i;if(!a||!d.anim){i="scroll"+(g?"Top":"Left");h[i]=e;h[i]=e}else{b={to:{}};b.to["scroll"+(g?"Top":"Left")]=e;if(Ext.isObject(a)){Ext.applyIf(b,a)}d.animate(b)}return d},scrollIntoView:function(b,g,c){b=Ext.getDom(b)||Ext.getBody().dom;var d=this.dom,i=this.getOffsetsTo(b),h=i[0]+b.scrollLeft,l=i[1]+b.scrollTop,a=l+d.offsetHeight,m=h+d.offsetWidth,p=b.clientHeight,o=parseInt(b.scrollTop,10),e=parseInt(b.scrollLeft,10),j=o+p,n=e+b.clientWidth,k;if(d.offsetHeight>p||lj){k=a-p}}if(k!=null){Ext.get(b).scrollTo("top",k,c)}if(g!==false){k=null;if(d.offsetWidth>b.clientWidth||hn){k=m-b.clientWidth}}if(k!=null){Ext.get(b).scrollTo("left",k,c)}}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}});(function(){var p=Ext.dom.Element,m=document.defaultView,n=/table-row|table-.*-group/,a="_internal",r="hidden",o="height",g="width",e="isClipped",i="overflow",l="overflow-x",j="overflow-y",s="originalClip",b=/#document|body/i,t,d,q,h,u;if(!m||!m.getComputedStyle){p.prototype.getStyle=function(z,y){var L=this,G=L.dom,J=typeof z!="string",k=L.styleHooks,w=z,x=w,F=1,B=y,K,C,v,A,E,H,D;if(J){v={};w=x[0];D=0;if(!(F=x.length)){return v}}if(!G||G.documentElement){return v||""}C=G.style;if(y){H=C}else{H=G.currentStyle;if(!H){B=true;H=C}}do{A=k[w];if(!A){k[w]=A={name:p.normalize(w)}}if(A.get){E=A.get(G,L,B,H)}else{K=A.name;if(A.canThrow){try{E=H[K]}catch(I){E=""}}else{E=H?H[K]:""}}if(!J){return E}v[w]=E;w=x[++D]}while(D0&&A<0.5){k++}}}if(x){k-=w.getBorderWidth("tb")+w.getPadding("tb")}return(k<0)?0:k},getWidth:function(k,z){var x=this,A=x.dom,y=x.isStyle("display","none"),w,v,B;if(y){return 0}if(Ext.supports.BoundingClientRect){w=A.getBoundingClientRect();v=w.right-w.left;v=z?v:Math.ceil(v)}else{v=A.offsetWidth}v=Math.max(v,A.clientWidth)||0;if(Ext.supports.Direct2DBug){B=x.adjustDirect2DDimension(g);if(z){v+=B}else{if(B>0&&B<0.5){v++}}}if(k){v-=x.getBorderWidth("lr")+x.getPadding("lr")}return(v<0)?0:v},setWidth:function(v,k){var w=this;v=w.adjustWidth(v);if(!k||!w.anim){w.dom.style.width=w.addUnits(v)}else{if(!Ext.isObject(k)){k={}}w.animate(Ext.applyIf({to:{width:v}},k))}return w},setHeight:function(k,v){var w=this;k=w.adjustHeight(k);if(!v||!w.anim){w.dom.style.height=w.addUnits(k)}else{if(!Ext.isObject(v)){v={}}w.animate(Ext.applyIf({to:{height:k}},v))}return w},applyStyles:function(k){Ext.DomHelper.applyStyles(this.dom,k);return this},setSize:function(w,k,v){var x=this;if(Ext.isObject(w)){v=k;k=w.height;w=w.width}w=x.adjustWidth(w);k=x.adjustHeight(k);if(!v||!x.anim){x.dom.style.width=x.addUnits(w);x.dom.style.height=x.addUnits(k)}else{if(v===true){v={}}x.animate(Ext.applyIf({to:{width:w,height:k}},v))}return x},getViewSize:function(){var w=this,x=w.dom,v=b.test(x.nodeName),k;if(v){k={width:p.getViewWidth(),height:p.getViewHeight()}}else{k={width:x.clientWidth,height:x.clientHeight}}return k},getSize:function(k){return{width:this.getWidth(k),height:this.getHeight(k)}},adjustWidth:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("lr")+v.getPadding("lr"))}return(w&&k<0)?0:k},adjustHeight:function(k){var v=this,w=(typeof k=="number");if(w&&v.autoBoxAdjust&&!v.isBorderBox()){k-=(v.getBorderWidth("tb")+v.getPadding("tb"))}return(w&&k<0)?0:k},getColor:function(w,x,C){var z=this.getStyle(w),y=C||C===""?C:"#",B,k,A=0;if(!z||(/transparent|inherit/.test(z))){return x}if(/^r/.test(z)){z=z.slice(4,z.length-1).split(",");k=z.length;for(;A5?y.toLowerCase():x)},setOpacity:function(v,k){var w=this;if(!w.dom){return w}if(!k||!w.anim){w.setStyle("opacity",v)}else{if(typeof k!="object"){k={duration:350,easing:"ease-in"}}w.animate(Ext.applyIf({to:{opacity:v}},k))}return w},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(w){var B=this,v=B.dom,z=B.getStyle("display"),y=v.style.display,C=v.style.position,A=w===g?0:1,k=v.currentStyle,x;if(z==="inline"){v.style.display="inline-block"}v.style.position=z.match(n)?"absolute":"static";x=(parseFloat(k[w])||parseFloat(k.msTransformOrigin.split(" ")[A])*2)%1;v.style.position=C;if(z==="inline"){v.style.display=y}return x},clip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(!w[e]){w[e]=true;k=v.getStyle([i,l,j]);w[s]={o:k[i],x:k[l],y:k[j]};v.setStyle(i,r);v.setStyle(l,r);v.setStyle(j,r)}return v},unclip:function(){var v=this,w=(v.$cache||v.getCache()).data,k;if(w[e]){w[e]=false;k=w[s];if(k.o){v.setStyle(i,k.o)}if(k.x){v.setStyle(l,k.x)}if(k.y){v.setStyle(j,k.y)}}return v},boxWrap:function(k){k=k||Ext.baseCSSPrefix+"box";var v=Ext.get(this.insertHtml("beforeBegin",""+Ext.String.format(p.boxMarkup,k)+"
"));Ext.DomQuery.selectNode("."+k+"-mc",v.dom).appendChild(this.dom);return v},getComputedHeight:function(){var v=this,k=Math.max(v.dom.offsetHeight,v.dom.clientHeight);if(!k){k=parseFloat(v.getStyle(o))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("tb")}}return k},getComputedWidth:function(){var v=this,k=Math.max(v.dom.offsetWidth,v.dom.clientWidth);if(!k){k=parseFloat(v.getStyle(g))||0;if(!v.isBorderBox()){k+=v.getFrameWidth("lr")}}return k},getFrameWidth:function(v,k){return(k&&this.isBorderBox())?0:(this.getPadding(v)+this.getBorderWidth(v))},addClsOnOver:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.hover(function(){if(k&&z.call(v||x,x)===false){return}Ext.fly(y,a).addCls(w)},function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnFocus:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("focus",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w)});x.on("blur",function(){Ext.fly(y,a).removeCls(w)});return x},addClsOnClick:function(w,z,v){var x=this,y=x.dom,k=Ext.isFunction(z);x.on("mousedown",function(){if(k&&z.call(v||x,x)===false){return false}Ext.fly(y,a).addCls(w);var B=Ext.getDoc(),A=function(){Ext.fly(y,a).removeCls(w);B.removeListener("mouseup",A)};B.on("mouseup",A)});return x},getStyleSize:function(){var z=this,A=this.dom,v=b.test(A.nodeName),y,k,x;if(v){return{width:p.getViewWidth(),height:p.getViewHeight()}}y=z.getStyle([o,g],true);if(y.width&&y.width!="auto"){k=parseFloat(y.width);if(z.isBorderBox()){k-=z.getFrameWidth("lr")}}if(y.height&&y.height!="auto"){x=parseFloat(y.height);if(z.isBorderBox()){x-=z.getFrameWidth("tb")}}return{width:k||z.getWidth(true),height:x||z.getHeight(true)}},selectable:function(){var k=this;k.dom.unselectable="off";k.on("selectstart",function(v){v.stopPropagation();return true});k.applyStyles("-moz-user-select: text; -khtml-user-select: text;");k.removeCls(Ext.baseCSSPrefix+"unselectable");return k},unselectable:function(){var k=this;k.dom.unselectable="on";k.swallowEvent("selectstart",true);k.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");k.addCls(Ext.baseCSSPrefix+"unselectable");return k}});p.prototype.styleHooks=t=Ext.dom.AbstractElement.prototype.styleHooks;if(Ext.isIE6||Ext.isIE7){t.fontSize=t["font-size"]={name:"fontSize",canThrow:true};t.fontStyle=t["font-style"]={name:"fontStyle",canThrow:true};t.fontFamily=t["font-family"]={name:"fontFamily",canThrow:true}}if(Ext.isIEQuirks||Ext.isIE&&Ext.ieVersion<=8){function c(x,v,w,k){if(k[this.styleName]=="none"){return"0px"}return k[this.name]}d=["Top","Right","Bottom","Left"];q=d.length;while(q--){h=d[q];u="border"+h+"Width";t["border-"+h.toLowerCase()+"-width"]=t[u]={name:u,styleName:"border"+h+"Style",get:c}}}}());Ext.onReady(function(){var c=/alpha\(opacity=(.*)\)/i,b=/^\s+|\s+$/g,a=Ext.dom.Element.prototype.styleHooks;a.opacity={name:"opacity",afterSet:function(g,e,d){if(d.isLayer){d.onOpacitySet(e)}}};if(!Ext.supports.Opacity&&Ext.isIE){Ext.apply(a.opacity,{get:function(h){var g=h.style.filter,e,d;if(g.match){e=g.match(c);if(e){d=parseFloat(e[1]);if(!isNaN(d)){return d?d/100:0}}}return 1},set:function(h,e){var d=h.style,g=d.filter.replace(c,"").replace(b,"");d.zoom=1;if(typeof(e)=="number"&&e>=0&&e<1){e*=100;d.filter=g+(g.length?" ":"")+"alpha(opacity="+e+")"}else{d.filter=g}}})}});Ext.dom.Element.override({select:function(a){return Ext.dom.Element.select(a,false,this.dom)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",requires:["Ext.dom.Element","Ext.dom.Query"],statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(d,b){if(!d){return this}if(typeof d=="string"){d=Ext.dom.Element.selectorFunction(d,b)}var c=this.elements,a=d.length,g;for(g=0;g',' {parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation">
','
','
',"",' {parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mc" role="presentation">',"{%this.applyRenderTpl(out, values)%}","
",'
','
','',' {parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation">
','
','
'," ","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}"," ",'',"",' {parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"> ',' {parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation"> ',' {parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"> '," "," ","",' {parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"> ',' {parent.baseCls}-{parent.ui}-{.}-mc" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}"," ",' {parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"> '," ",'',"",' {parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"> ',' {parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation"> ',' {parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"> '," "," ","
","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var b=this,c={},e=b.protoEl,d=b.getTargetEl(),a;b.finishRenderChildren();if(b.styleHtmlContent){d.addCls(b.styleHtmlCls)}e.writeTo(c);a=c.removed;if(a){d.removeCls(a)}a=c.cls;if(a.length){d.addCls(a)}a=c.style;if(c.style){d.setStyle(a)}b.protoEl=null;if(!b.ownerCt){b.updateLayout()}},afterFirstLayout:function(d,a){var e=this,c=Ext.isDefined(e.x),b=Ext.isDefined(e.y),h,g;if(e.floating&&(!c||!b)){if(e.floatParent){h=e.floatParent.getTargetEl().getViewRegion();g=e.el.getAlignToXY(e.floatParent.getTargetEl(),"c-c");h.left=g[0]-h.left;h.top=g[1]-h.top}else{g=e.el.getAlignToXY(e.container,"c-c");h=e.container.translatePoints(g[0],g[1])}e.x=c?e.x:h.left;e.y=b?e.y:h.top;c=b=true}if(c||b){e.setPosition(e.x,e.y)}e.onBoxReady(d,a);if(e.hasListeners.boxready){e.fireEvent("boxready",e,d,a)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var b=this,c=b.getTargetEl(),a=b.getComponentLayout();b.frame=b.frame||b.alwaysFramed;if(!a.initialized){a.initLayout()}if(c){c.setStyle(b.getOverflowStyle());b.overflowStyleSet=true}b.setUI(b.ui);if(b.disabled){b.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(a){var g=this,b,h,e,d,i,c;if(!g.el||g.$pid){if(g.container){d=g.container.getById(g.id,true)}else{d=Ext.getDom(g.id)}if(!g.el){g.wrapPrimaryEl(d)}else{delete g.$pid;if(!g.el.dom){g.wrapPrimaryEl(g.el)}d.parentNode.insertBefore(g.el.dom,d);Ext.removeNode(d)}}else{if(!g.rendering){b=g.initRenderTpl();if(b){h=g.initRenderData();b.insertFirst(g.getTargetEl(),h)}}}if(!g.container){g.container=Ext.get(g.el.dom.parentNode)}if(g.ctCls){g.container.addCls(g.ctCls)}g.onRender(g.container,a);if(!g.overflowStyleSet){g.getTargetEl().setStyle(g.getOverflowStyle())}g.el.setVisibilityMode(Ext.Element[g.hideMode.toUpperCase()]);if(g.overCls){g.el.hover(g.addOverCls,g.removeOverCls,g)}if(g.hasListeners.render){g.fireEvent("render",g)}if(g.contentEl){i=Ext.baseCSSPrefix;c=i+"hide-";e=Ext.get(g.contentEl);e.removeCls([i+"hidden",c+"display",c+"offsets",c+"nosize"]);g.getTargetEl().appendChild(e.dom)}g.afterRender();if(g.hasListeners.afterrender){g.fireEvent("afterrender",g)}g.initEvents();if(g.hidden){g.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var h=this,j=h.autoEl,e=h.getFrameInfo(),a={tag:"div",tpl:e?h.initFramingTpl(e.table):h.initRenderTpl()},b,d,g,k,c;h.initStyles(h.protoEl);h.protoEl.writeTo(a);h.protoEl.flush();if(Ext.isString(j)){a.tag=j}else{Ext.apply(a,j)}a.id=h.id;if(a.tpl){if(e){d=h.frameElNames;g=d.length;c=h.id+"-frame1";h.frameGenId=1;a.tplData=Ext.apply({},{$comp:h,fgid:c,ui:h.ui,uiCls:h.uiCls,frameCls:h.frameCls,baseCls:h.baseCls,frameWidth:e.maxWidth,top:!!e.top,left:!!e.left,right:!!e.right,bottom:!!e.bottom,renderData:h.initRenderData()},h.getFramePositions(e));for(b=0;b table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}if(c){c.remove()}}}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var g=this,i=g.frameInfoCache,a=g.el||g.protoEl,j=a.dom?a.dom.className:a.classList.join(" "),d=i[j],e,c,h,b;if(d==null){e=Ext.fly(g.getStyleProxy(j),"frame-style-el");c=e.getStyle("background-position-x");h=e.getStyle("background-position-y");if(!c&&!h){b=e.getStyle("background-position").split(" ");c=b[0];h=b[1]}d=g.calculateFrame(c,h);if(d){a.setStyle("background-image","none")}i[j]=d}g.frame=!!d;g.frameSize=d;return d},calculateFrame:function(h,g){if(!(parseInt(h,10)>=1000000&&parseInt(g,10)>=1000000)){return false}var a=Math.max,b=parseInt(h.substr(3,2),10),e=parseInt(h.substr(5,2),10),c=parseInt(g.substr(3,2),10),i=parseInt(g.substr(5,2),10),d={table:h.substr(0,3)=="110",vertical:g.substr(0,3)=="110",top:a(b,e),right:a(e,c),bottom:a(i,c),left:a(b,i)};d.maxWidth=a(d.top,d.right,d.bottom,d.left);d.width=d.left+d.right;d.height=d.top+d.bottom;return d},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.resetElement.createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFramePositions:function(e){var h=this,i=e.maxWidth,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var c=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,b=k.exec(unescape(g)),h,d,a,j,e,i;if(!b||!b[1]){return}d=b[1];g=b[2];switch(d){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":h=[];if(g!=""){j=g.split("^");e=j.length;for(i=0;ii){c=d;a=true}if(e&&p>j){n=p;a=true}if(a){m=!Ext.isNumber(k.width);l=!Ext.isNumber(k.height);k.setSize(n,c);k.el.setSize(j,i);if(m){delete k.width}if(l){delete k.height}}if(e){o.width=p}if(g){o.height=d}}return k.mixins.animate.animate.apply(k,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var e=this,c,b=[],d,a;if(e.plugins){c=Ext.isArray(e.plugins)?e.plugins:[e.plugins];for(d=0,a=c.length;d=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(b,d){var j=this,h=j.ownerCt,a,g,e,c;if(d&&j.is(b)){return j}if(h){for(g=h.items.items,e=Ext.Array.indexOf(g,j)-1;e>-1;e--){c=g[e];if(c.query){a=c.query(b);a=a[a.length-1];if(a){return a}}if(c.is(b)){return c}}return h.previousNode(b,true)}return null},nextNode:function(d,j){var b=this,c=b.ownerCt,k,e,h,g,a;if(j&&b.is(d)){return b}if(c){for(e=c.items.items,g=Ext.Array.indexOf(e,b)+1,h=e.length;g=8){b=new XDomainRequest()}else{b=this.getXhrInstance()}return b},openRequest:function(c,a,d,g,b){var e=this.newRequest(c);if(g){e.open(a.method,a.url,d,g,b)}else{e.open(a.method,a.url,d)}if(c.withCredentials||this.withCredentials){e.withCredentials=true}return e},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(b){var a=this;a.el=new Ext.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,shim:(a.shim===false)?false:undefined},a.floating),b);a.floating=true;a.registerWithOwnerCt()},registerWithOwnerCt:function(){var a=this;if(a.zIndexParent){a.zIndexParent.unregisterFloatingItem(a)}a.zIndexParent=a.up("[floating]");a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false&&a.isVisible()){a.hide();a.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingDescendants){a=Math.floor(b.floatingDescendants.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b),d;if(a){d=c.getPosition(!!c.floatParent);d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(a){var b=this;if(b.constrain||b.constrainHeader){a=a||(b.floatParent&&b.floatParent.getTargetEl())||b.container||b.el.getScopeParent();return(b.constrainHeader?b.header.el:b.el).getConstrainVector(a)}},alignTo:function(b,a,c){this.setPagePosition(this.el.getAlignToXY(b.el||b,a,c));return this},toFront:function(b){var a=this;if(a.zIndexParent&&a.bringParentToFront!==false){a.zIndexParent.toFront(true)}if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(b){a.preventFocusOnActivate=true}if(a.zIndexManager.bringToFront(a)){if(!b){a.focus(false,true)}}delete a.preventFocusOnActivate;return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(a.modal&&!a.preventFocusOnActivate){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this,b=c.floatParent,a=b?b.getTargetEl():c.container;c.setSize(a.getViewSize(false));c.setPosition.apply(c,b?[0,0]:a.getXY())}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",bubbleEvents:[],monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,defaultComponentLayoutType:"autocomponent",constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}},setAutoScroll:function(a){var b=this;b.autoScroll=!!a;if(b.rendered){b.getTargetEl().setStyle(b.getOverflowStyle())}b.updateLayout();return b},setOverflowXY:function(b,a){var c=this,d=arguments.length;if(d){c.overflowX=b||"";if(d>1){c.overflowY=a||""}}if(c.rendered){c.getTargetEl().setStyle(c.getOverflowStyle())}c.updateLayout();return c},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,a=(c.resizer&&c.resizer.el!==c.el)?c.resizerComponent=new Ext.Component({el:c.resizer.el,rendered:true,container:c.container}):c,b=Ext.applyIf({el:a.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){b.constrain=c.constrain;b.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(a,b)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a;if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=Ext.apply({},c)}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(b,a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender();c.hidden=true}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}else{d=c.el.translatePoints(a,g);a=d.left;g=d.top}c.setPosition(a,g,b)}else{d=c.el.translatePoints(a,g);c.setPosition(d.left,d.top,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(b){var c=b?this.getPosition(b):this.el.getXY(),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var c=this,b=c.el,e,d=c.isContainedFloater(),g;if((a===true)&&!d){return[b.getLocalX(),b.getLocalY()]}e=c.el.getXY();if((a===true)&&d){g=c.floatParent.getTargetEl().getViewRegion();e[0]-=g.left;e[1]-=g.top}return e},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this,e=c.rendered;if(e&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!e&&(c.autoRender||c.floating)){c.doAutoRender();e=c.rendered}if(e){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}else{c.onShowVeto()}}return c},onShowVeto:Ext.emptyFn,beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating){if(a.maximized){a.fitContainer()}else{if(a.constrain){a.doConstrain()}}}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments)}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(a,b||c);c.fireEvent("hide",c)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer,a.resizerComponent)}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c 1){for(;c]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+")!==undefined) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b ');c.scrollRangeFlags=e}}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();if(b.targetCls){b.getTarget().addCls(b.targetCls)}b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(c,h){var d=c.targetContext,g=d.getFrameInfo(),k=d.getPaddingInfo(),j=0,l=0,a=c.state.overflowAdjust,e,i,b,m;if(!c.widthModel.shrinkWrap){++l;b=h?d.getDomProp("width"):d.getProp("width");e=(typeof b=="number");if(e){++j;b-=g.width+k.width;if(a){b-=a.width}}}if(!c.heightModel.shrinkWrap){++l;m=h?d.getDomProp("height"):d.getProp("height");i=(typeof m=="number");if(i){++j;m-=g.height+k.height;if(a){m-=a.height}}}return{width:b,height:m,needed:l,got:j,gotAll:j==l,gotWidth:e,gotHeight:i}},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b
'],calculate:function(b){var a=this,c;if(!b.hasDomProp("containerChildrenDone")){a.done=false}else{c=a.getContainerSize(b);if(!c.gotAll){a.done=false}a.calculateContentSize(b)}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.generation++;d.length++;d.items.push(g);d.keys.push(c);if(d.hasListeners.add){d.fireEvent("add",d.length-1,g,c)}return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;if(d.hasListeners.replace){d.fireEvent("replace",c,a,e)}return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d
=d.length){return d.add(c,g)}d.generation++;d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);if(d.hasListeners.add){d.fireEvent("add",a,g,c)}return g},remove:function(a){this.generation++;return this.removeAt(this.indexOf(a))},removeAll:function(b){b=[].concat(b);var c,a=b.length;for(c=0;c =0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);if(c.hasListeners.remove){c.fireEvent("remove",d,b)}c.generation++;return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return typeof this.map[this.getKey(a)]!="undefined"},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.generation++;if(a.hasListeners.clear){a.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d =a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,o=b.length,j,m,l,k;for(j=0;je?1:(g>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;ce?1:(g=0&&a[d].hidden;--d){}if((b=a[d])){e._setActiveChild(b,c);if(b.modal){return}}for(;d>=0;--d){b=a[d];if(b.isVisible()&&b.modal){e._showModalMask(b);return}}e._hideModalMask()},_showModalMask:function(a){var c=this,e=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():a.container,d=b.getBox();if(b.dom===document.body){d.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());d.width=Math.max(document.body.scrollWidth,d.width)}if(!c.mask){c.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});c.mask.setVisibilityMode(Ext.Element.DISPLAY);c.mask.on("click",c._onMaskClick,c)}c.mask.maskTarget=b;b.addCls(Ext.baseCSSPrefix+"body-masked");c.mask.setStyle("zIndex",e);c.mask.show();c.mask.setBox(d)},_hideModalMask:function(){var a=this.mask;if(a&&a.isVisible()){a.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");a.maskTarget=undefined;a.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var a=this.mask,b,c;if(a&&a.isVisible()){a.hide();b=a.maskTarget;if(b.dom===document.body){c={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{c=b.getViewSize(true)}a.setSize(c);a.show()}},register:function(a){var b=this;if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=b;b.list[a.id]=a;b.zIndexStack.push(a);a.on("hide",b.onComponentHide,b)},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];a.un("hide",b.onComponentHide);Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return a.isComponent?a:this.list[a]},bringToFront:function(b){var c=this,a=false,d=c.zIndexStack;b=c.get(b);if(b!==c.front){Ext.Array.remove(d,b);if(b.preventBringToFront){d.unshift(b)}else{d.push(b)}c.assignZIndices();a=true;this.front=b}if(a&&b.modal){c._showModalMask(b)}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var g=this,c=g.mask,e=0,b=g.zIndexStack,a=b.length,d;g.tempHidden=g.tempHidden||[];for(;e0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var b=this,c=b.list,a,d;for(d in c){if(c.hasOwnProperty(d)){a=c[d];if(a.isComponent){a.destroy()}}}delete b.zIndexStack;delete b.list;delete b.container;delete b.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],defaultLayoutType:"auto",initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout();b.callParent();if(!a.initialized){a.initLayout()}},setupRenderTpl:function(b){var a=this.getLayout();this.callParent(arguments);a.setupRenderTpl(b)},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||"autocontainer"))}return a.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(b){var a=this;++a.layoutCounter;if(a.hasListeners.afterlayout){a.fireEvent("afterlayout",a,b)}},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var g=this,c=0,a=b.length,e;for(;c "+a)[0]||null},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){return this.query(a)[0]||null},enable:function(){this.callParent(arguments);var d=this.getChildItemsToDisable(),c=d.length,b,a;for(a=0;a=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(e,d){return this.nextFocus(e,d,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;ge.el.getZIndex()});return d.concat(b)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{o=o||m.up();if(o){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain,b;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(m,i){var k=this,p,a,d,h,o,b,l,e,g,c,n,j;if(k.fireEvent("beforecomponentfocus",k,m,k.previousFocusedCmp)===false){k.clearComponent(m);return}k.focusedCmp=m;if(k.shouldShowFocusFrame(m)){p="."+k.focusFrameCls+"-";a=k.focusFrame;h=i.getPageBox();o=h.top;b=h.left;l=h.width;e=h.height;g=a.child(p+"top");c=a.child(p+"bottom");n=a.child(p+"left");j=a.child(p+"right");g.setWidth(l).setLeftTop(b,o);c.setWidth(l).setLeftTop(b,o+e-2);n.setHeight(e-2).setLeftTop(b,o+2);j.setHeight(e-2).setLeftTop(b+l-2,o+2);a.show()}k.fireEvent("componentfocus",k,m,k.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{},e=c.getFocusEl(),d=Ext.getDom(e).tagName;if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var c=this,b=c.callParent(),a;if(c.autoEl=="img"){a=b}else{b.cn=[a={tag:"img",id:c.id+"-img"}]}if(c.imgCls){a.cls=(a.cls?a.cls+" ":"")+c.imgCls}a.src=c.src||Ext.BLANK_IMAGE_URL;if(c.alt){a.alt=c.alt}return b},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;b.imgEl=(b.autoEl=="img")?a:a.getById(b.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(c){var a=this,b=a.imgEl;a.src=c;if(b){b.dom.src=c||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}Ext.Element.addToCache(c);if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=new Ext.Shadow({offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a,d,c,o,m,g,k;if(!j.updating&&j.isVisible()&&(n||j.useShim)){d=j.getShim();c=j.getLocalX();o=j.getLocalY();m=j.dom.offsetWidth;g=j.dom.offsetHeight;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,o,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,o)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,o)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i ',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(a,b){var c=this;if(!a.isComponent){a=Ext.get(a);this.isElement=true}c.ownerCt=a;if(!this.isElement){c.bindComponent(a)}c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved},d=Ext.container.Container.hierarchyEventSource;if(a.floating){b.move=c.sizeMask;c.activeOwner=a}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}else{c.preventBringToFront=true}}c.mon(a,b);c.mon(d,{show:c.onContainerShow,hide:c.onContainerHide,expand:c.onContainerExpand,collapse:c.onContainerCollapse,scope:c})},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.sizeMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.sizeMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},onContainerExpand:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerCollapse:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(a){return this.isDescendantOf(a)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(!a.isVisible(true)){b.showNext=true}else{if(b.loading&&a.rendered){b.show()}}},getMaskEl:function(){var a=this;return a.maskEl||(a.maskEl=a.el.insertSibling({cls:a.maskCls,style:{zIndex:a.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(b){var c=this,a=c.activeOwner;if(a){b=parseInt(a.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",b-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;if(a.isElement){a.ownerCt.unmask()}Ext.destroy(a.maskEl);a.callParent()}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",isAssociation:true,initialConfig:null,statics:{AUTO_ID:1000,create:function(a){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}return a}},constructor:function(a){Ext.apply(this,a);var d=this,b=Ext.ModelManager.types,c=a.ownerModel,g=a.associatedModel,e=b[c],h=b[g];d.initialConfig=a;d.ownerModel=e;d.associatedModel=h;Ext.applyIf(d,{ownerName:c,associatedName:g});d.associationId="association"+(++d.statics().AUTO_ID)},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d','{text}
',"",'"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||" ",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},getText:function(){return this.text},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('
',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){var c=[].concat(this.shadows),b,a=c.length;for(b=0;b]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,constructor:function(b){var d=this,c=Ext.data.Types,a;if(Ext.isString(b)){b={name:b}}Ext.apply(d,b);a=d.sortType;if(d.type){if(Ext.isString(d.type)){d.type=c[d.type.toUpperCase()]||c.AUTO}}else{d.type=c.AUTO}if(Ext.isString(a)){d.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){d.sortType=d.type.sortType}}if(!b.hasOwnProperty("convert")){d.convert=d.type.convert}else{if(!d.convert&&d.type.convert&&!b.hasOwnProperty("defaultValue")){d.defaultValue=d.type.convert(d.defaultValue)}}if(b.convert){d.hasCustomConvert=true}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b1){if(h.action=="update"||a[0].clientIdProperty){j=new Ext.util.MixedCollection();j.addAll(k);for(g=a.length;g--;){b=a[g];c=j.findBy(h.matchClientRec,b);b.copyFrom(c)}}else{for(d=0,e=a.length;da)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],compareConvertFields:function(a,d){var c=a.convert&&a.type&&a.convert!==a.type.convert,b=d.convert&&d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,D){var C=this,E=Ext.getClassName(g),r=g.prototype,x=g.prototype.superclass,j=D.validations||[],t=D.fields||[],h,m=D.associations||[],e=function(G,I){var H=0,F,J;if(G){G=Ext.Array.from(G);for(F=G.length;H0;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(d&&a!==true){b.afterEdit(c)}}},getModifiedFieldNames:function(){var d=this,c=d.dataSave,e=d[d.persistenceProperty],a=[],b;for(b in e){if(e.hasOwnProperty(b)){if(!d.isEqual(e[b],c[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var c=this,a=c.fields.items,g=a.length,e,b,d;c.dirty=true;for(d=0;d0){b=p.data.items;h=b.length;for(r=0;ra.maxSize){i=j.constrainedMax;d=a.maxSize}else{d=m}}}if(b){m=h.size;if(mh.maxSize){g=j.constrainedMax;k=h.maxSize}else{if(!e.collapsedVert&&!this.owner.manageHeight){c=false;e.bodyContext.setProp("margin-bottom",h.dockedPixelsEnd)}k=m}}}if(i||g){if(i&&g&&i.constrainedMax&&g.constrainedMin){e.invalidate({widthModel:i});return false}if(!e.widthModel.calculatedFromShrinkWrap&&!e.heightModel.calculatedFromShrinkWrap){e.invalidate({widthModel:i,heightModel:g});return false}}if(l){e.setWidth(d);if(i){e.widthModel=i}}if(b){e.setHeight(k,c);if(g){e.heightModel=g}}return true},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7||Ext.isIE8);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(a){this.callParent(arguments);this.cacheTargetInfo(a)},beginLayoutCycle:function(e){var c=this,d="",a=c.owner,b=a.btnEl,i=a.btnInnerEl,g=a.text,h;c.callParent(arguments);i.setStyle("overflow",d);if(!e.widthModel.natural){a.el.setStyle("width",d)}h=e.heightModel.shrinkWrap&&g&&c.htmlRE.test(g);b.setStyle("width",d);b.setStyle("height",h?"auto":d);i.setStyle("width",d);i.setStyle("height",h?"auto":d);i.setStyle("line-height",h?"normal":d);i.setStyle("padding-top",d);a.btnIconEl.setStyle("width",d)},calculateOwnerHeightFromContentHeight:function(b,a){return a},calculateOwnerWidthFromContentWidth:function(b,a){return a},measureContentWidth:function(c){var i=this,b=i.owner,g=b.btnEl,d=b.btnInnerEl,l=b.text,m,j,h,a,k,e;if(b.text&&i.hackWidth&&g){m=i.btnFrameWidth;if(l.indexOf(">")===-1){l=l.replace(/ =0){h.setProp("line-height",e-b+"px")}if(l&&j.htmlRE.test(l)){h.setProp("line-height","normal");d.setStyle("line-height","normal");k=Ext.util.TextMetrics.measure(d,l).height;n=Math.floor(Math.max(e-b-k,0)/2);h.setProp("padding-top",j.btnFrameTop+n);h.setHeight(e-(j.heightIncludesPadding?n:0))}},publishInnerWidth:function(g,c){var e=this,h=Ext.isNumber,a=g.getEl("btnEl"),b=g.getEl("btnInnerEl"),d=h(c)?c-e.adjWidth:c;a.setWidth(d);b.setWidth(d)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(b){var g=this,a=g.owner,d=a.scale,i,e,j,c,h;if(!("adjWidth" in g)||g.lastScale!==d){if(g.lastScale){a.btnInnerEl.setStyle("line-height","")}g.lastScale=d;i=b.getPaddingInfo();e=b.getFrameInfo();j=b.getEl("btnWrap").getPaddingInfo();c=b.getEl("btnInnerEl");h=c.getPaddingInfo();Ext.apply(g,{adjWidth:j.width+e.width+i.width,adjHeight:j.height+e.height+i.height,btnFrameWidth:h.width,btnFrameHeight:h.height,btnFrameTop:h.top,minTextHeight:parseInt(c.getStyle("line-height"),10)})}g.callParent(arguments)},finishedLayout:function(){var a=this.owner;this.callParent(arguments);if(Ext.isWebKit){a.el.dom.offsetWidth}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var c=this.active,e,b,a,d;if(c&&c.length>0){e=c.clone();b=e.items;d=b.length;for(a=0;a50&&c.length>0&&!d.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll()}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b class="{splitCls}">','',' tabIndex="{tabIndex}" ',' disabled="disabled" ',' role="link">','',"{text}"," ",' style="background-image:url({iconUrl})"> '," ","",' tabIndex="{tabIndex}" ',' disabled="disabled" ',' role="button" autocomplete="off">','',"{text}"," ",' style="background-image:url({iconUrl})"> ',"","","",'',' '," "],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)&&a.toggleGroup!==""){a.enableToggle=true}if(a.html&&!a.text){a.text=a.html;delete a.html}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.useElForFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.useElForFocus=true;a.callParent(arguments);a.useElForFocus=false},onBlur:function(a){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},onDisable:function(){this.useElForFocus=true;this.callParent(arguments);this.useElForFocus=false},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs());if(a.scale){a.setScale(a.scale)}},onRender:function(){var c=this,d,a,b;c.doc=Ext.getDoc();c.callParent(arguments);if(c.split&&c.arrowTooltip){c.arrowEl.dom.setAttribute(c.getTipAttr(),c.arrowTooltip)}a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={scope:c}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap({target:c.el,key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{if(b[c.clickEvent]){d=true}else{b[c.clickEvent]=c.onClick}}c.mon(a,b);if(d){c.mon(a,c.clickEvent,c.onClick,c)}Ext.ButtonToggleManager.register(c)},getTemplateArgs:function(){var c=this,b=c.getPersistentPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),disabled:c.disabled,hrefTarget:c.hrefTarget,type:c.type,btnCls:c.getBtnCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,text:c.text||" ",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.rendered){a.btnInnerEl.update(b||" ");a.setComponentCls();if(Ext.isStrict&&Ext.isIE8){a.el.repaint()}a.updateLayout()}return a},setIcon:function(b){var c=this,a=c.btnIconEl,d=c.icon;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}return c},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+e.frameSize[b]}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=false}b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);if(b.btnEl){b.btnEl.dom.disabled=true}b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);if(b.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){b.btnInnerEl.repaint()}return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentPadding:function(){var g=this,e=Ext.scopeResetCSS,h=g.persistentPadding,b,a,d,i,c;if(!h){h=g.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){b=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});b.el=Ext.DomHelper.append(Ext.resetElement,b.getRenderTree(),true);b.applyChildEls(b.el);d=b.btnEl;i=b.btnInnerEl;d.setSize(null,null);a=i.getOffsetsTo(d);h[0]=a[1];h[1]=d.getWidth()-i.getWidth()-a[0];h[2]=d.getHeight()-i.getHeight()-a[1];h[3]=a[0];b.destroy();b.el.remove()}}return h}},function(){var a={},b=function(d,j){if(j){var h=a[d.toggleGroup],e=h.length,c;for(c=0;c(None) ',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+b.getNames().right;a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var c=this,b=c.layout,a=b.owner.id;c.menu=new Ext.menu.Menu({listeners:{scope:c,beforeshow:c.beforeMenuShow}});c.menuTrigger=new Ext.button.Button({id:a+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+c.triggerButtonCls,hidden:true,ownerCt:b.owner,ownerLayout:b,iconCls:Ext.baseCSSPrefix+c.getOwnerType(b.owner)+"-more-icon",ui:b.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:c.menu,getSplitCls:function(){return""}});return c.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(d){var c=this,b=c.layout,g=b.getNames(),e=d.state.boxPlan,a=[null,null];c.showTrigger(d);a[g.heightIndex]=(e.maxSize-c.menuTrigger[g.getHeight]())/2;c.menuTrigger.setPosition.apply(c.menuTrigger,a);return{reservedSpace:c.menuTrigger[g.getWidth]()}},captureChildElements:function(){var a=this.menuTrigger;if(a.rendering){a.finishRender()}},_asLayoutRoot:{isRoot:true},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner,j=g._asLayoutRoot;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;c