text: function wrap(t){return new Wrapper(document,null).wrap(t)}var Wrapper=function(){function t(t,n){this._scope=t,this._elements=n}return t.prototype.wrap=function(n){var e=new Array;if(n&&this._scope&&"#"===n.charAt(0)){var o=document.getElementById(n.substring(1));o&&e.push(o)}var s=e.length>0?e[0]:null;return new t(s,e)},t.prototype.first=function(){return this.any()?this._elements[0]:null},t.prototype.shiftProps=function(t,n,e){if(n&&t){for(var o=n.split("."),s=t;o.length>1;)s=s[o.shift()];if(null===e)return s[o.shift()];s[o.shift()]=e}return null},t.prototype.prop=function(t,n){var e=this;return null===n?this.shiftProps(this.first(),t,null):(this._elements.forEach(function(o){return e.shiftProps(o,t,n)}),null)},t.prototype.any=function(){return this._elements.length>0},t.prototype.hasClass=function(t){return this._elements.some(function(n){return n.classList.contains(t)})},t.prototype.addClass=function(t){this._elements.forEach(function(n){n.classList.contains(t)||n.classList.add(t)})},t.prototype.removeClass=function(t){this._elements.forEach(function(n){n.classList.remove(t)})},t.prototype.val=function(t){return void 0===t&&(t=null),this.prop("value",t)},t.prototype.html=function(t){return void 0===t&&(t=null),this.prop("innerHTML",t)},t.prototype.disabled=function(t){return void 0===t&&(t=null),this.prop("disabled",t)},t.prototype.on=function(t,n){this._elements.forEach(function(e){e.addEventListener(t,function(t){n(t,e)})})},t}(),Utils;!function(t){var n=function(){function t(t,n,e,o){void 0===e&&(e=null),void 0===o&&(o=null),this._data=null,this._aborted=!1,this._params=null;var s=this;this._onsuccess=e,this._onerror=o,this._xhr=new XMLHttpRequest,this._params=JSON.stringify(n),this._xhr.open("POST",t,!0),this._xhr.setRequestHeader("Content-Type","application/json"),this._xhr.onload=function(){s.onresponse()},this._xhr.onerror=function(){s.onresponse()}}return t.prototype.onresponse=function(){var t=200==this._xhr.status?this._onsuccess:this._onerror;t&&t(this.toObjectOrString(this._xhr.responseText))},t.prototype.toObjectOrString=function(t){if(t)try{return JSON.parse(t)}catch(n){}return t},t.prototype.isAborted=function(){return this._aborted&&4==this._xhr.readyState},t.prototype.abort=function(){4!=this._xhr.readyState&&(this._xhr.abort(),this._aborted=!0)},t.prototype.send=function(){this._xhr.send(this._params)},t}();t.AjaxRequest=n}(Utils||(Utils={}));var Base;!function(t){var n=function(){function t(){var t=this;this._button=wrap("#decodeButton"),this._encoded=wrap("#encoded"),this._decoded=wrap("#decoded"),this._button.on("click",function(){t.buttonClick()})}return t.prototype.buttonClick=function(){if(!this._button.hasClass("disabled")){var t=this;this._decoded.val(""),this._button.addClass("disabled"),this._encoded.disabled(!0),this._button.html("Please wait...");var n={Input:this._encoded.val()},e=function(n){t._decoded.val(n),t._button.html("Decode >"),t._button.removeClass("disabled"),t._encoded.disabled(!1)},o=new Utils.AjaxRequest("Home/Decode",n,e,e);o.send()}},t}();t.Decoder=n}(Base||(Base={})),new Base.Decoder;