var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",utoa:function(r){return window.btoa(unescape(encodeURIComponent(r)))},atou:function(r){return decodeURIComponent(escape(window.atob(r)))},encode:function(r){if(window.btoa)return this.utoa(r);var t,e,o,n,a,c,h,d="",i=0;for(r=Base64._utf8_encode(r);i<r.length;)t=r.charCodeAt(i++),e=r.charCodeAt(i++),o=r.charCodeAt(i++),n=t>>2,a=(3&t)<<4|e>>4,c=(15&e)<<2|o>>6,h=63&o,isNaN(e)?c=h=64:isNaN(o)&&(h=64),d=d+this._keyStr.charAt(n)+this._keyStr.charAt(a)+this._keyStr.charAt(c)+this._keyStr.charAt(h);return d},decode:function(r){if(window.btoa)return this.atou(r);var t,e,o,n,a,c,h,d="",i=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<r.length;)n=this._keyStr.indexOf(r.charAt(i++)),a=this._keyStr.indexOf(r.charAt(i++)),c=this._keyStr.indexOf(r.charAt(i++)),h=this._keyStr.indexOf(r.charAt(i++)),t=n<<2|a>>4,e=(15&a)<<4|c>>2,o=(3&c)<<6|h,d+=String.fromCharCode(t),64!=c&&(d+=String.fromCharCode(e)),64!=h&&(d+=String.fromCharCode(o));return d=Base64._utf8_decode(d)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var t="",e=0;e<r.length;e++){var o=r.charCodeAt(e);128>o?t+=String.fromCharCode(o):o>127&&2048>o?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(r){for(var t="",e=0,o=c1=c2=0;e<r.length;)o=r.charCodeAt(e),128>o?(t+=String.fromCharCode(o),e++):o>191&&224>o?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return t}};