if(!Array.isArray){Array.isArray=function(a){return Object.prototype.toString.call(a)=="[object Array]"}}if(!Array.prototype.forEach){Array.prototype.forEach=function(d,a){var b=this.length>>>0;for(var c=0;c>>0;if(typeof d!="function"){throw new TypeError()}var a=new Array(c);var b=arguments[1];for(var e=0;e>>0;if(typeof b!="function"){throw new TypeError()}if(a==0&&arguments.length==1){throw new TypeError()}var c=0;if(arguments.length>=2){var d=arguments[1]}else{do{if(c in this){d=this[c++];break}if(++c>=a){throw new TypeError()}}while(true)}for(;c>>0;if(typeof b!="function"){throw new TypeError()}if(a==0&&arguments.length==1){throw new TypeError()}var c=a-1;if(arguments.length>=2){var d=arguments[1]}else{do{if(c in this){d=this[c--];break}if(--c<0){throw new TypeError()}}while(true)}for(;c>=0;c--){if(c in this){d=b.call(null,d,this[c],c,this)}}return d}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){var a=this.length;if(!a){return -1}var b=arguments[1]||0;if(b>=a){return -1}if(b<0){b+=a}for(;b=0;b--){if(!Object.prototype.hasOwnProperty.call(this,b)){continue}if(c===this[b]){return b}}return -1}}if(!Date.prototype.toISOString){Date.prototype.toISOString=function toISOString(){var b,a,c;if(!isFinite(this)){throw new RangeError}b=[this.getUTCFullYear(),this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];a=b.length;while(a--){c=b[a];if(c<10){b[a]="0"+c}}return b.slice(0,3).join("-")+"T"+b.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}}if(!Date.now){Date.now=function now(){return new Date().getTime()}}if(!Date.prototype.toJSON){Date.prototype.toJSON=function toJSON(a){if(typeof this.toISOString.call!="function"){throw new TypeError()}return this.toISOString.call(this)}}if(isNaN(Date.parse("2011-06-15T21:40:05+06:00"))){"use strict";Date=(function(c){var e=function(o,f,k,l,p,g,i){var j=arguments.length;if(this instanceof c){var n=j==1&&String(o)===o?new c(e.parse(o)):j>=7?new c(o,f,k,l,p,g,i):j>=6?new c(o,f,k,l,p,g):j>=5?new c(o,f,k,l,p):j>=4?new c(o,f,k,l):j>=3?new c(o,f,k):j>=2?new c(o,f):j>=1?new c(o):new c();n.constructor=e;return n}return c.apply(this,arguments)};var b=new RegExp("^(\\d{4})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");for(var d in c){e[d]=c[d]}e.now=c.now;e.UTC=c.UTC;e.prototype=c.prototype;e.prototype.constructor=e;e.parse=function a(m){var g=b.exec(m);if(g){g.shift();for(var k=1;k<7;k++){g[k]=+(g[k]||(k<3?1:0));if(k==1){g[k]--}}var h=+g.pop(),f=+g.pop(),j=g.pop();var l=0;if(j){if(f>23||h>59){return NaN}l=(f*60+h)*60000*(j=="+"?-1:1)}return c.UTC.apply(this,g)+l}return c.parse.apply(this,arguments)};return e})(Date)}if(!Function.prototype.bind){Function.prototype.bind=function(e){if(typeof this!=="function"){throw new TypeError()}var g=Array.prototype.slice,c=Array.prototype.concat,f=g.call(arguments,1),a=this,b=function(){return a.apply(this instanceof d?this:e,c.call(f,g.call(arguments,0)))},d=function(){};d.prototype=a.prototype;b.prototype=new d();return b}}if(!String.prototype.trim){var trimBeginRegexp=/^\s\s*/;var trimEndRegexp=/\s\s*$/;String.prototype.trim=function(){return String(this).replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i=0){(function(j,k){e[k]=function(){var l=Array.prototype.slice.call(arguments),i=l.join(", ");if(!g){if("status" in a){a.status=i}return}g.firebug?g[k].apply(window,l):g[k]?g[k](i):g.log(i)}})(h,f[h])}};b?e.enable():e.disable();return d}(window,sb||{},/(local|test)/.test(window.location.hostname)));sb.namespace("i18n").culture={lang:null,region:null,fromISOString:function(b){var a=b.split("-");this.lang=a[0].toLowerCase();this.region=(a.length>1)?a[1].toUpperCase():null;return this},toISOString:function(a){a=a||"-";return(this.region)?[this.lang,this.region].join(a):this.lang}};sb.i18n.culture.fromISOString(navigator.language||navigator.browserLanguage);sb.namespace("i18n").getText=(function(b,a){var c={},d=(function(){try{return !!sessionStorage.getItem}catch(f){return false}})();var e=function(f){return b.extend(f,{get:function(h,i){var g=this[h]||(h+"!NOTFOUND!");if(this.hasOwnProperty(h)&&sb.type.isFunction(i)){i(g)}return g}})};return function(j){var i=b.extend({url:document.location.pathname,actionUrl:"/resources/i18n/gettext",resourceNames:[]},j||{}),g={url:i.url},h=[],k,f,l;if("culture" in i){g.culture=i.culture;h.push(i.culture)}else{h.push(sb.i18n.culture.toISOString())}if(/https/.test(document.location.protocol)){h.push("secure")}h.push(i.url);if(i.resourceNames.length){g.includeNodes=i.resourceNames.sort().join(",");h.push(g.includeNodes)}k=h.join(":");if(!c[k]){f=(d)?sessionStorage.getItem(k):null;if(!f){l=new b.Deferred();b.getJSON(i.actionUrl,g).success(function(m){if(d){sessionStorage.setItem(k,JSON.stringify(m))}sb.console.info("text loaded from xhr for '"+k+"'");l.resolve(e(m))}).error(function(o,n,m){l.reject(m);sb.console.warn("getText xhr failed for '"+this.url+"'")})}else{l=new b.Deferred(function(m){sb.console.info("text loaded from sessionStorage for '"+k+"'");m.resolve(e(JSON.parse(f)))})}c[k]=l.promise()}return c[k]}}(jQuery));sb.namespace("i18n").getScript=function(c,e){var d=new $.Deferred(),b=c.replace("ISO",sb.i18n.culture.toISOString()),a=c.replace("ISO",sb.i18n.culture.lang);$.getScript(b).then([e,d.resolve],function(){$.getScript(a).then([e,d.resolve],d.reject)});return d.promise()};