;(function(){
  window._define = window.define;
  window.define=null;
  delete window.define;
  window._require = window.require;
  window.require=null;
  delete window.require;
})(window);
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.qevents=e():t.qevents=e()}(this,function(){return r={"./shared/Class.js":function(t,e){function r(o,a){function t(){var t;if(!s){o.call(u);var e,r=h,i=a,n=c;for(e in i)i.hasOwnProperty(e)&&(r[e]=n?function(e,t,r){var i=t[e],t=r[e];return"function"==typeof i&&"function"==typeof t&&i!==t&&l.test(i)?function(){var t=this._super;this._super=r[e];try{return i.apply(this,arguments)}finally{this._super=t}}:i}(e,i,n):i[e]);s=!0,a=null}this!==u&&(t=this.__init__)&&t.apply(this,arguments)}var s,c=n.prototype=o.prototype,h=new n;return t.prototype=h,t.extend=i,h.constructor=t}function i(t){return r(this,t)}var l=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/,n=function(){},u={};e.Class=i.call(function(){},{})},"./shared/email_normalizer.js":function(t,e){e.normalizeEmail=function(t){var e="@gmail.com".length;return t=(t=-1!=(t=t.toLowerCase()).indexOf("+")&&-1==t.search(/@(.*mail\.facebook\.com|quora\.com)/)?t.replace(/\+.*?@/,"@"):t).endsWith("@gmail.com")?t.slice(0,-e).replace(/\./g,"")+"@gmail.com":t}},"./shared/hash_email.js":function(t,e,r){var i=r("./third_party/sjcl.js");e.validateEmail=function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},e.validateSHA256=function(t){return/^[a-z0-9]{64}$/i.test(t)},e.sha256HexDigest=function(t){t=i.hash.sha256.hash(t);return i.codec.hex.fromBits(t)}},"./shared/polyfills/array.js":function(t,e){function r(t,e,r){"function"==typeof Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,value:r,writable:!0,enumerable:!1}):t[e]=r}Array.prototype.every||r(Array.prototype,"every",function(t,e){"use strict";var r,i;if(null===this)throw new TypeError("this is null or not defined");var n,o=Object(this),a=o.length>>>0;if("function"!=typeof t)throw new TypeError;for(1<arguments.length&&(r=e),i=0;i<a;){if(i in o&&(n=o[i],!t.call(r,n,i,o)))return!1;i++}return!0}),Array.prototype.some||r(Array.prototype,"some",function(t){"use strict";if(null===this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;for(var e=Object(this),r=e.length>>>0,i=2<=arguments.length?arguments[1]:void 0,n=0;n<r;n++)if(n in e&&t.call(i,e[n],n,e))return!0;return!1}),Array.prototype.indexOf||r(Array.prototype,"indexOf",function(t,e){var r;if(null===this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0!=n){e=+e||0;if(!(n<=(e=Math.abs(e)===1/0?0:e)))for(r=Math.max(0<=e?e:n-Math.abs(e),0);r<n;){if(r in i&&i[r]===t)return r;r++}}return-1}),Array.prototype.forEach||r(Array.prototype,"forEach",function(t,e){var r,i;if(null===this)throw new TypeError(" this is null or not defined");var n,o=Object(this),a=o.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(r=e),i=0;i<a;)i in o&&(n=o[i],t.call(r,n,i,o)),i++}),Array.prototype.map||r(Array.prototype,"map",function(t,e){var r,i,n;if(null===this)throw new TypeError(" this is null or not defined");var o,a=Object(this),s=a.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(r=e),i=new Array(s),n=0;n<s;)n in a&&(o=a[n],o=t.call(r,o,n,a),i[n]=o),n++;return i}),Array.prototype.filter||r(Array.prototype,"filter",function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i,n=[],o=2<=arguments.length?arguments[1]:void 0,a=0;a<r;a++)a in e&&(i=e[a],t.call(o,i,a,e)&&n.push(i));return n}),Array.prototype.reduce||r(Array.prototype,"reduce",function(t){"use strict";if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var e,r=Object(this),i=r.length>>>0,n=0;if(2==arguments.length)e=arguments[1];else{for(;n<i&&!(n in r);)n++;if(i<=n)throw new TypeError("Reduce of empty array with no initial value");e=r[n++]}for(;n<i;n++)n in r&&(e=t(e,r[n],n,r));return e}),Array.prototype.lastIndexOf||r(Array.prototype,"lastIndexOf",function(t){"use strict";if(null==this)throw new TypeError;var e,r,i=Object(this),n=i.length>>>0;if(0!=n)for(e=n-1,1<arguments.length&&((e=Number(arguments[1]))!=e?e=0:0!==e&&e!=1/0&&e!=-1/0&&(e=(0<e||-1)*Math.floor(Math.abs(e)))),r=0<=e?Math.min(e,n-1):n-Math.abs(e);0<=r;r--)if(r in i&&i[r]===t)return r;return-1}),Array.prototype.includes||r(Array.prototype,"includes",function(t){"use strict";if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var e=Object(this),r=parseInt(e.length,10)||0;if(0!==r){var i,n,o=parseInt(arguments[1],10)||0;for(0<=o?i=o:(i=r+o)<0&&(i=0);i<r;){if(t===(n=e[i])||t!=t&&n!=n)return!0;i++}}return!1})},"./shared/polyfills/date.js":function(t,e){Date.now||(Date.now=function(){return(new Date).getTime()})},"./shared/polyfills/function.js":function(t,e){Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");function e(){return i.apply(this instanceof n?this:t,r.concat(Array.prototype.slice.call(arguments)))}var r=Array.prototype.slice.call(arguments,1),i=this,n=function(){};return this.prototype&&(n.prototype=this.prototype),e.prototype=new n,e})},"./shared/polyfills/object.js":function(t,e){Object.keys||(Object.keys=function(){"use strict";var n=Object.prototype.hasOwnProperty,o=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=a.length;return function(t){if("object"!=typeof t&&("function"!=typeof t||null===t))throw new TypeError("Object.keys called on non-object");var e,r,i=[];for(e in t)n.call(t,e)&&i.push(e);if(o)for(r=0;r<s;r++)n.call(t,a[r])&&i.push(a[r]);return i}}()),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},writable:!0,configurable:!0}),Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),r=e.length,i=new Array(r);r--;)i[r]=[e[r],t[e[r]]];return i})},"./shared/polyfills/string.js":function(t,e){String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var r=this.toString(),r=(("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>r.length)&&(e=r.length),e-=t.length,r.indexOf(t,e));return-1!==r&&r===e}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(e=e||0,t.length)===t}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=function(t,e){"use strict";return!((e="number"!=typeof e?0:e)+t.length>this.length)&&-1!==this.indexOf(t,e)})},"./shared/qevents/main.js":function(t,e,r){r("./shared/polyfills/string.js"),r("./shared/polyfills/array.js"),r("./shared/polyfills/function.js"),r("./shared/polyfills/object.js"),r("./shared/polyfills/date.js"),r("./shared/qevents/pixel.js").init(),r("./shared/qevents/queue.js").flush()},"./shared/qevents/pixel.js":function(t,n,e){function r(){try{if(e="ia_share_url",r=null,i=[],window.location.search.substr(1).split("&").forEach(function(t){(i=t.split("="))[0]===e&&(r=decodeURIComponent(i[1]))}),null!==r)return r}catch(t){}var e,r,i;try{return void 0!==ia_document&&ia_document.shareURL}catch(t){}}function i(t){var e,r,i,n=[];for(r in t)e=t[r],"string"!=typeof r||(i=e,"string"!=typeof i&&isNaN(Number(i)))||n.push(r+"="+encodeURIComponent(e));return n.join("&")}function o(){!0!==window.qp.disablePushState&&n.quoraPixelHelper("track","ViewContent")}var a,s=e("./shared/Class.js").Class,c=e("./shared/email_normalizer.js"),h=e("./shared/hash_email.js"),l=e("./shared/qevents/timer.js").PixelTimer,u=s.extend({__init__:function(t,e){if("string"!=typeof t)throw new Error("Quora Pixel Error: The second argument passed to qp is invalid.");this.uuid=t,this.email=this._getEmailFromPassback(e),this.lastViewContentUrl=""},track:function(t,e){if("string"!=typeof t)throw new Error("Quora Pixel Error: The second argument passed to qp is invalid.");var r=this._getIsFBIAUrl(),e=this._getValueFromPassback(e),i=this._getUrl();this._shouldTrack(t,i)&&(t=this._getMetadata(t,i,r,e),i=this._getPixelUrl(t),n.firePixel(i))},trackDwellTime:function(t){if("number"!=typeof t)throw new Error("Quora Pixel Error: Invalid dwell time.");var e=this._getUrl(),e=this._getMetadata("DwellTime",e,void 0,void 0,t),t=this._getPixelUrl(e);n.firePixel(t)},_shouldTrack:function(t,e){return("ViewContent"!=t||e!=this.lastViewContentUrl)&&"DwellTime"!=t&&("ViewContent"==t&&(this.lastViewContentUrl=e),!0)},_getMetadata:function(t,e,r,i,n){e={j:1,u:e,tag:t,ts:(new Date).getTime()};return r&&(e.fbia=1),void 0!==i&&(e.v=i),void 0!==this.email&&(e.em=this.email),"DwellTime"===t&&void 0!==n&&(e.dwt=n),e},_getValueFromPassback:function(t){var e;if(null!=t&&void 0!==t.value&&"number"!=typeof(e=t.value)&&"string"!=typeof e)throw new Error("Quora Pixel Error: The third argument passed to qp is invalid.");return e},_getEmailFromPassback:function(t){var e;if(null!=t)if(void 0!==t.email){if("string"!=typeof(e=c.normalizeEmail(t.email))||!h.validateEmail(e))throw new Error("Quora Pixel Error: The third argument passed to qp is invalid.");e=h.sha256HexDigest(e)}else if(void 0!==t.hashed_email&&("string"!=typeof(e=t.hashed_email)||!h.validateSHA256(e)))throw new Error("Quora Pixel Error: The third argument passed to qp is invalid.");return e},_getUrl:function(){return r()||window.location.href},_getIsFBIAUrl:function(){return Boolean(r())},_getPixelUrl:function(t){return this._getBasePixelUrl()+this.uuid+"/pixel?"+i(t)},_getBasePixelUrl:function(){return"https://q.quora.com/_/ad/"}}),f=s.extend({__init__:function(){this.uuidToPixel={}},installPixel:function(t,e){void 0===this.uuidToPixel[t]&&(e=new u(t,e),this.uuidToPixel[t]=e)},track:function(t,e){var r=Object.keys(this.uuidToPixel);if(!r.length)throw new Error("Quora Pixel Error: Base pixel code is not installed properly.");for(var i=0;i<r.length;i++){var n=r[i];this.uuidToPixel[n].track(t,e)}},trackDwellTime:function(t){var e=Object.keys(this.uuidToPixel);if(!e.length)throw new Error("Quora Pixel Error: Base pixel code is not installed properly.");for(var r=0;r<e.length;r++){var i=e[r];this.uuidToPixel[i].trackDwellTime(t)}}});n.quoraPixelHelper=function(t,e,r){if("string"!=typeof t)throw new Error("Quora Pixel Error: The first argument passed to qp is invalid.");"init"==t?a.installPixel(e,r):"track"==t&&a.track(e,r)},n.firePixel=function(t){(new Image).src=t},n.init=function(){if(!window.qp)throw new Error("Quora Pixel Error: Base pixel code is not installed properly.");function t(t,e){var r=window.history[t];window.history[t]=function(){var t=r.apply(this,arguments);return e.apply(this,arguments),t}}window.qp.qp=n.quoraPixelHelper,window.history.pushState&&window.history.replaceState&&(t("pushState",o),t("replaceState",o),window.addEventListener("popstate",o,!1)),a=new f,this.pixelTimer=new l(function(t){a.trackDwellTime(t)})},n.initializeStates=function(){a=new f}},"./shared/qevents/queue.js":function(t,e){e.flush=function(){var t,e=window.qp;for(e.queue||(e.queue=[]);e.queue.length;)t=e.queue.shift(),e.apply(e,t)}},"./shared/qevents/timer.js":function(t,e,r){function i(){void 0===o&&(o=new Date)}function n(t){var e;void 0!==o&&(0<(e=new Date-o)&&t(e),o=void 0)}var o,a,s,r=r("./shared/Class.js").Class;e.PixelTimer=r.extend({__init__:function(e){s=void 0!==document.msHidden?(a="msHidden","msvisibilitychange"):void 0!==document.webkitHidden?(a="webkitHidden","webkitvisibilitychange"):void 0!==document.mozHidden?(a="mozHidden","mozvisibilitychange"):(a="hidden","visibilitychange"),document.addEventListener(s,function(){"visible"===document[a]?i():"hidden"===document[a]&&n(e)}),window.addEventListener("pageshow",function(t){i()}),window.addEventListener("pagehide",function(t){n(e)}),window.addEventListener("blur",function(){n(e)}),window.addEventListener("focus",function(){i()})}})},"./third_party/sjcl.js":function(t,e){"use strict";function r(t,e,r){if(4!==e.length)throw new w.exception.invalid("invalid aes block size");var i=t.b[r],n=e[0]^i[0],o=e[r?3:1]^i[1],a=e[2]^i[2];e=e[r?1:3]^i[3];for(var s,c,h=i.length/4-2,l=4,u=[0,0,0,0],f=t.s[r],d=(t=f[0],f[1]),p=f[2],y=f[3],m=f[4],g=0;g<h;g++)f=t[n>>>24]^d[o>>16&255]^p[a>>8&255]^y[255&e]^i[l],s=t[o>>>24]^d[a>>16&255]^p[e>>8&255]^y[255&n]^i[l+1],c=t[a>>>24]^d[e>>16&255]^p[n>>8&255]^y[255&o]^i[l+2],e=t[e>>>24]^d[n>>16&255]^p[o>>8&255]^y[255&a]^i[l+3],l+=4,n=f,o=s,a=c;for(g=0;g<4;g++)u[r?3&-g:g]=m[n>>>24]<<24^m[o>>16&255]<<16^m[a>>8&255]<<8^m[255&e]^i[l++],f=n,n=o,o=a,a=e,e=f;return u}function o(t,e){for(var r,i,n=t.F,o=t.b,a=n[0],s=n[1],c=n[2],h=n[3],l=n[4],u=n[5],f=n[6],d=n[7],p=0;p<64;p++)r=(r=p<16?e[p]:(r=e[p+1&15],i=e[p+14&15],e[15&p]=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&p]+e[p+9&15]|0))+d+(l>>>6^l>>>11^l>>>25^l<<26^l<<21^l<<7)+(f^l&(u^f))+o[p],d=f,f=u,u=l,l=h+r|0,h=c,c=s,a=r+((s=a)&c^h&(s^c))+(s>>>2^s>>>13^s>>>22^s<<30^s<<19^s<<10)|0;n[0]=n[0]+a|0,n[1]=n[1]+s|0,n[2]=n[2]+c|0,n[3]=n[3]+h|0,n[4]=n[4]+l|0,n[5]=n[5]+u|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0}function h(t,e){var r,i=w.random.K[t],n=[];for(r in i)i.hasOwnProperty(r)&&n.push(i[r]);for(r=0;r<n.length;r++)n[r](e)}function i(t,e){"undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?t.addEntropy(window.performance.now(),e,"loadtime"):t.addEntropy((new Date).valueOf(),e,"loadtime")}function s(t){t.b=c(t).concat(c(t)),t.L=new w.cipher.aes(t.b)}function c(t){for(var e=0;e<4&&(t.h[e]=t.h[e]+1|0,!t.h[e]);e++);return t.L.encrypt(t.h)}function n(t,e){return function(){e.apply(t,arguments)}}var a,l,u,f,d,w={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};w.cipher.aes=function(t){this.s[0][0][0]||this.O();var e,r,i,n=this.s[0][4],o=this.s[1],a=t.length,s=1;if(4!==a&&6!==a&&8!==a)throw new w.exception.invalid("invalid aes key size");for(this.b=[r=t.slice(0),i=[]],t=a;t<4*a+28;t++)e=r[t-1],(0==t%a||8===a&&4==t%a)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],0==t%a&&(e=e<<8^e>>>24^s<<24,s=s<<1^283*(s>>7))),r[t]=r[t-a]^e;for(a=0;t;a++,t--)e=r[3&a?t:t-4],i[a]=t<=4||a<4?e:o[0][n[e>>>24]]^o[1][n[e>>16&255]]^o[2][n[e>>8&255]]^o[3][n[255&e]]},w.cipher.aes.prototype={encrypt:function(t){return r(this,t,0)},decrypt:function(t){return r(this,t,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){for(var t,e,r,i,n,o,a=this.s[0],s=this.s[1],c=a[4],h=s[4],l=[],u=[],f=0;f<256;f++)u[(l[f]=f<<1^283*(f>>7))^f]=f;for(t=e=0;!c[t];t^=r||1,e=u[e]||1)for(o=16843009*(i=l[f=l[r=l[h[c[t]=n=(n=e^e<<1^e<<2^e<<3^e<<4)>>8^255&n^99]=t]]])^65537*f^257*r^16843008*t,i=257*l[n]^16843008*n,f=0;f<4;f++)a[f][t]=i=i<<24^i>>>8,s[f][n]=o=o<<24^o>>>8;for(f=0;f<5;f++)a[f]=a[f].slice(0),s[f]=s[f].slice(0)}},w.bitArray={bitSlice:function(t,e,r){return t=w.bitArray.$(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:w.bitArray.clamp(t,r-e)},extract:function(t,e,r){var i=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-i^t[e/32+1|0]>>>i:t[e/32|0]>>>i)&(1<<r)-1},concat:function(t,e){var r,i;return 0===t.length||0===e.length||(r=t[t.length-1],32===(i=w.bitArray.getPartial(r)))?t.concat(e):w.bitArray.$(e,i,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e=t.length;return 0===e?0:32*(e-1)+w.bitArray.getPartial(t[e-1])},clamp:function(t,e){var r;return 32*t.length<e||(r=(t=t.slice(0,Math.ceil(e/32))).length,e&=31,0<r&&e&&(t[r-1]=w.bitArray.partial(e,t[r-1]&2147483648>>e-1,1))),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(w.bitArray.bitLength(t)!==w.bitArray.bitLength(e))return!1;for(var r=0,i=0;i<t.length;i++)r|=t[i]^e[i];return 0===r},$:function(t,e,r,i){var n=0;for(void 0===i&&(i=[]);32<=e;e-=32)i.push(r),r=0;if(0===e)return i.concat(t);for(n=0;n<t.length;n++)i.push(r|t[n]>>>e),r=t[n]<<32-e;return n=t.length?t[t.length-1]:0,t=w.bitArray.getPartial(n),i.push(w.bitArray.partial(e+t&31,32<e+t?r:i.pop(),1)),i},i:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){for(var e,r=0;r<t.length;++r)e=t[r],t[r]=e>>>24|e>>>8&65280|(65280&e)<<8|e<<24;return t}},w.codec.utf8String={fromBits:function(t){for(var e,r="",i=w.bitArray.bitLength(t),n=0;n<i/8;n++)0==(3&n)&&(e=t[n/4]),r+=String.fromCharCode(e>>>8>>>8>>>8),e<<=8;return decodeURIComponent(escape(r))},toBits:function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0,i=0;i<t.length;i++)r=r<<8|t.charCodeAt(i),3==(3&i)&&(e.push(r),r=0);return 3&i&&e.push(w.bitArray.partial(8*(3&i),r)),e}},w.codec.hex={fromBits:function(t){for(var e="",r=0;r<t.length;r++)e+=(0xf00000000000+(0|t[r])).toString(16).substr(4);return e.substr(0,w.bitArray.bitLength(t)/4)},toBits:function(t){var e,r=[],i=(t=t.replace(/\s|0x/g,"")).length;for(t+="00000000",e=0;e<t.length;e+=8)r.push(0^parseInt(t.substr(e,8),16));return w.bitArray.clamp(r,4*i)}},w.codec.base32={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",X:"0123456789ABCDEFGHIJKLMNOPQRSTUV",BITS:32,BASE:5,REMAINING:27,fromBits:function(t,e,r){var i=w.codec.base32.BASE,n=w.codec.base32.REMAINING,o="",a=0,s=w.codec.base32.B,c=0,h=w.bitArray.bitLength(t);for(r&&(s=w.codec.base32.X),r=0;o.length*i<h;)o+=s.charAt((c^t[r]>>>a)>>>n),a<i?(c=t[r]<<i-a,a+=n,r++):(c<<=i,a-=i);for(;7&o.length&&!e;)o+="=";return o},toBits:function(t,e){t=t.replace(/\s|=/g,"").toUpperCase();var r,i,n=w.codec.base32.BITS,o=w.codec.base32.BASE,a=w.codec.base32.REMAINING,s=[],c=0,h=w.codec.base32.B,l=0,u="base32";for(e&&(h=w.codec.base32.X,u="base32hex"),r=0;r<t.length;r++){if((i=h.indexOf(t.charAt(r)))<0){if(!e)try{return w.codec.base32hex.toBits(t)}catch(t){}throw new w.exception.invalid("this isn't "+u+"!")}a<c?(c-=a,s.push(l^i>>>c),l=i<<n-c):l^=i<<n-(c+=o)}return 56&c&&s.push(w.bitArray.partial(56&c,l,1)),s}},w.codec.base32hex={fromBits:function(t,e){return w.codec.base32.fromBits(t,e,1)},toBits:function(t){return w.codec.base32.toBits(t,1)}},w.codec.base64={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(t,e,r){var i="",n=0,o=w.codec.base64.B,a=0,s=w.bitArray.bitLength(t);for(r&&(o=o.substr(0,62)+"-_"),r=0;6*i.length<s;)i+=o.charAt((a^t[r]>>>n)>>>26),n<6?(a=t[r]<<6-n,n+=26,r++):(a<<=6,n-=6);for(;3&i.length&&!e;)i+="=";return i},toBits:function(t,e){t=t.replace(/\s|=/g,"");var r,i,n=[],o=0,a=w.codec.base64.B,s=0;for(e&&(a=a.substr(0,62)+"-_"),r=0;r<t.length;r++){if((i=a.indexOf(t.charAt(r)))<0)throw new w.exception.invalid("this isn't base64!");26<o?(o-=26,n.push(s^i>>>o),s=i<<32-o):s^=i<<32-(o+=6)}return 56&o&&n.push(w.bitArray.partial(56&o,s,1)),n}},w.codec.base64url={fromBits:function(t){return w.codec.base64.fromBits(t,1,1)},toBits:function(t){return w.codec.base64.toBits(t,1)}},w.hash.sha256=function(t){this.b[0]||this.O(),t?(this.F=t.F.slice(0),this.A=t.A.slice(0),this.l=t.l):this.reset()},w.hash.sha256.hash=function(t){return(new w.hash.sha256).update(t).finalize()},w.hash.sha256.prototype={blockSize:512,reset:function(){return this.F=this.Y.slice(0),this.A=[],this.l=0,this},update:function(t){"string"==typeof t&&(t=w.codec.utf8String.toBits(t));var e=this.A=w.bitArray.concat(this.A,t);if(n=this.l,9007199254740991<(t=this.l=n+w.bitArray.bitLength(t)))throw new w.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){for(var r=new Uint32Array(e),i=0,n=512+n-(512+n&511);n<=t;n+=512)o(this,r.subarray(16*i,16*(i+1))),i+=1;e.splice(0,16*i)}else for(n=512+n-(512+n&511);n<=t;n+=512)o(this,e.splice(0,16));return this},finalize:function(){for(var t=this.A,e=this.F,r=(t=w.bitArray.concat(t,[w.bitArray.partial(1,1)])).length+2;15&r;r++)t.push(0);for(t.push(Math.floor(this.l/4294967296)),t.push(0|this.l);t.length;)o(this,t.splice(0,16));return this.reset(),e},Y:[],b:[],O:function(){function t(t){return 4294967296*(t-Math.floor(t))|0}for(var e,r,i=0,n=2;i<64;n++){for(r=!0,e=2;e*e<=n;e++)if(0==n%e){r=!1;break}r&&(i<8&&(this.Y[i]=t(Math.pow(n,.5))),this.b[i]=t(Math.pow(n,1/3)),i++)}}},w.mode.ccm={name:"ccm",G:[],listenProgress:function(t){w.mode.ccm.G.push(t)},unListenProgress:function(t){-1<(t=w.mode.ccm.G.indexOf(t))&&w.mode.ccm.G.splice(t,1)},fa:function(t){for(var e=w.mode.ccm.G.slice(),r=0;r<e.length;r+=1)e[r](t)},encrypt:function(t,e,r,i,n){var o,a=e.slice(0),s=w.bitArray,c=s.bitLength(r)/8,h=s.bitLength(a)/8;if(n=n||64,i=i||[],c<7)throw new w.exception.invalid("ccm: iv must be at least 7 bytes");for(o=2;o<4&&h>>>8*o;o++);return r=s.clamp(r,8*(15-(o=o<15-c?15-c:o))),e=w.mode.ccm.V(t,e,r,i,n,o),a=w.mode.ccm.C(t,a,r,e,n,o),s.concat(a.data,a.tag)},decrypt:function(t,e,r,i,n){n=n||64,i=i||[];var o=w.bitArray,a=o.bitLength(r)/8,s=o.bitLength(e),c=o.clamp(e,s-n),h=o.bitSlice(e,s-n),s=(s-n)/8;if(a<7)throw new w.exception.invalid("ccm: iv must be at least 7 bytes");for(e=2;e<4&&s>>>8*e;e++);if(r=o.clamp(r,8*(15-(e=e<15-a?15-a:e))),c=w.mode.ccm.C(t,c,r,h,n,e),t=w.mode.ccm.V(t,c.data,r,i,n,e),o.equal(c.tag,t))return c.data;throw new w.exception.corrupt("ccm: tag doesn't match")},na:function(t,e,r,i,n,o){var a=[],s=w.bitArray,c=s.i;if(i=[s.partial(8,(e.length?64:0)|i-2<<2|o-1)],(i=s.concat(i,r))[3]|=n,i=t.encrypt(i),e.length)for((r=s.bitLength(e)/8)<=65279?a=[s.partial(16,r)]:r<=4294967295&&(a=s.concat([s.partial(16,65534)],[r])),a=s.concat(a,e),e=0;e<a.length;e+=4)i=t.encrypt(c(i,a.slice(e,e+4).concat([0,0,0])));return i},V:function(t,e,r,i,n,o){var a=w.bitArray,s=a.i;if((n/=8)%2||n<4||16<n)throw new w.exception.invalid("ccm: invalid tag length");if(4294967295<i.length||4294967295<e.length)throw new w.exception.bug("ccm: can't deal with 4GiB or more data");for(r=w.mode.ccm.na(t,i,r,n,a.bitLength(e)/8,o),i=0;i<e.length;i+=4)r=t.encrypt(s(r,e.slice(i,i+4).concat([0,0,0])));return a.clamp(r,8*n)},C:function(t,e,r,i,n,o){var a=w.bitArray,s=a.i,c=e.length,h=a.bitLength(e),l=c/50,u=l;if(r=a.concat([a.partial(8,o-1)],r).concat([0,0,0]).slice(0,4),i=a.bitSlice(s(i,t.encrypt(r)),0,n),!c)return{tag:i,data:[]};for(s=0;s<c;s+=4)l<s&&(w.mode.ccm.fa(s/c),l+=u),r[3]++,n=t.encrypt(r),e[s]^=n[0],e[s+1]^=n[1],e[s+2]^=n[2],e[s+3]^=n[3];return{tag:i,data:a.clamp(e,h)}}},w.mode.ocb2={name:"ocb2",encrypt:function(t,e,r,i,n,o){if(128!==w.bitArray.bitLength(r))throw new w.exception.invalid("ocb iv must be 128 bits");var a,s=w.mode.ocb2.S,c=w.bitArray,h=c.i,l=[0,0,0,0];r=s(t.encrypt(r));var u,f=[];for(i=i||[],n=n||64,a=0;a+4<e.length;a+=4)l=h(l,u=e.slice(a,a+4)),f=f.concat(h(r,t.encrypt(h(r,u)))),r=s(r);return u=e.slice(a),e=c.bitLength(u),a=t.encrypt(h(r,[0,0,0,e])),u=c.clamp(h(u.concat([0,0,0]),a),e),l=h(l,h(u.concat([0,0,0]),a)),l=t.encrypt(h(l,h(r,s(r)))),i.length&&(l=h(l,o?i:w.mode.ocb2.pmac(t,i))),f.concat(c.concat(u,c.clamp(l,n)))},decrypt:function(t,e,r,i,n,o){if(128!==w.bitArray.bitLength(r))throw new w.exception.invalid("ocb iv must be 128 bits");n=n||64;var a,s,c=w.mode.ocb2.S,h=w.bitArray,l=h.i,u=[0,0,0,0],f=c(t.encrypt(r)),d=w.bitArray.bitLength(e)-n,p=[];for(i=i||[],r=0;r+4<d/32;r+=4)a=l(f,t.decrypt(l(f,e.slice(r,r+4)))),u=l(u,a),p=p.concat(a),f=c(f);if(a=t.encrypt(l(f,[0,0,0,s=d-32*r])),a=l(a,h.clamp(e.slice(r),s).concat([0,0,0])),u=l(u,a),u=t.encrypt(l(u,l(f,c(f)))),i.length&&(u=l(u,o?i:w.mode.ocb2.pmac(t,i))),h.equal(h.clamp(u,n),h.bitSlice(e,d)))return p.concat(h.clamp(a,s));throw new w.exception.corrupt("ocb: tag doesn't match")},pmac:function(t,e){for(var r=w.mode.ocb2.S,i=w.bitArray,n=i.i,o=[0,0,0,0],a=n(a=t.encrypt([0,0,0,0]),r(r(a))),s=0;s+4<e.length;s+=4)a=r(a),o=n(o,t.encrypt(n(a,e.slice(s,s+4))));return s=e.slice(s),i.bitLength(s)<128&&(a=n(a,r(a)),s=i.concat(s,[-2147483648,0,0,0])),o=n(o,s),t.encrypt(n(r(n(a,r(a))),o))},S:function(t){return[t[0]<<1^t[1]>>>31,t[1]<<1^t[2]>>>31,t[2]<<1^t[3]>>>31,t[3]<<1^135*(t[0]>>>31)]}},w.mode.gcm={name:"gcm",encrypt:function(t,e,r,i,n){var o=e.slice(0);return e=w.bitArray,t=w.mode.gcm.C(!0,t,o,i=i||[],r,n||128),e.concat(t.data,t.tag)},decrypt:function(t,e,r,i,n){var o=e.slice(0),a=w.bitArray,s=a.bitLength(o);if(i=i||[],o=(n=n||128)<=s?(e=a.bitSlice(o,s-n),a.bitSlice(o,0,s-n)):(e=o,[]),t=w.mode.gcm.C(!1,t,o,i,r,n),a.equal(t.tag,e))return t.data;throw new w.exception.corrupt("gcm: tag doesn't match")},ka:function(t,e){for(var r,i,n=w.bitArray.i,o=[0,0,0,0],a=e.slice(0),s=0;s<128;s++){for((r=0!=(t[Math.floor(s/32)]&1<<31-s%32))&&(o=n(o,a)),i=0!=(1&a[3]),r=3;0<r;r--)a[r]=a[r]>>>1|(1&a[r-1])<<31;a[0]>>>=1,i&&(a[0]^=-520093696)}return o},j:function(t,e,r){var i,n=r.length;for(e=e.slice(0),i=0;i<n;i+=4)e[0]^=4294967295&r[i],e[1]^=4294967295&r[i+1],e[2]^=4294967295&r[i+2],e[3]^=4294967295&r[i+3],e=w.mode.gcm.ka(e,t);return e},C:function(t,e,r,i,n,o){var a,s,c,h=w.bitArray,l=r.length,u=h.bitLength(r),f=h.bitLength(i),d=h.bitLength(n),p=e.encrypt([0,0,0,0]);for(n=96===d?(n=n.slice(0),h.concat(n,[1])):(n=w.mode.gcm.j(p,[0,0,0,0],n),w.mode.gcm.j(p,n,[0,0,Math.floor(d/4294967296),4294967295&d])),d=w.mode.gcm.j(p,[0,0,0,0],i),c=n.slice(0),i=d.slice(0),t||(i=w.mode.gcm.j(p,d,r)),s=0;s<l;s+=4)c[3]++,a=e.encrypt(c),r[s]^=a[0],r[s+1]^=a[1],r[s+2]^=a[2],r[s+3]^=a[3];return r=h.clamp(r,u),t&&(i=w.mode.gcm.j(p,d,r)),t=[Math.floor(f/4294967296),4294967295&f,Math.floor(u/4294967296),4294967295&u],i=w.mode.gcm.j(p,i,t),a=e.encrypt(n),i[0]^=a[0],i[1]^=a[1],i[2]^=a[2],i[3]^=a[3],{tag:h.bitSlice(i,0,o),data:r}}},w.misc.hmac=function(t,e){this.W=e=e||w.hash.sha256;var r,i=[[],[]],n=e.prototype.blockSize/32;for(this.w=[new e,new e],t.length>n&&(t=e.hash(t)),r=0;r<n;r++)i[0][r]=909522486^t[r],i[1][r]=1549556828^t[r];this.w[0].update(i[0]),this.w[1].update(i[1]),this.R=new e(this.w[0])},w.misc.hmac.prototype.encrypt=w.misc.hmac.prototype.mac=function(t){if(this.aa)throw new w.exception.invalid("encrypt on already updated hmac called!");return this.update(t),this.digest(t)},w.misc.hmac.prototype.reset=function(){this.R=new this.W(this.w[0]),this.aa=!1},w.misc.hmac.prototype.update=function(t){this.aa=!0,this.R.update(t)},w.misc.hmac.prototype.digest=function(){var t=this.R.finalize(),t=new this.W(this.w[1]).update(t).finalize();return this.reset(),t},w.misc.pbkdf2=function(t,e,r,i,n){if(r=r||1e4,i<0||r<0)throw new w.exception.invalid("invalid params to pbkdf2");"string"==typeof t&&(t=w.codec.utf8String.toBits(t)),"string"==typeof e&&(e=w.codec.utf8String.toBits(e)),t=new(n=n||w.misc.hmac)(t);for(var o,a,s,c=[],h=w.bitArray,l=1;32*c.length<(i||1);l++){for(n=o=t.encrypt(h.concat(e,[l])),a=1;a<r;a++)for(o=t.encrypt(o),s=0;s<o.length;s++)n[s]^=o[s];c=c.concat(n)}return c=i?h.clamp(c,i):c},w.prng=function(t){this.c=[new w.hash.sha256],this.m=[0],this.P=0,this.H={},this.N=0,this.U={},this.Z=this.f=this.o=this.ha=0,this.b=[0,0,0,0,0,0,0,0],this.h=[0,0,0,0],this.L=void 0,this.M=t,this.D=!1,this.K={progress:{},seeded:{}},this.u=this.ga=0,this.I=1,this.J=2,this.ca=65536,this.T=[0,48,64,96,128,192,256,384,512,768,1024],this.da=3e4,this.ba=80},w.prng.prototype={randomWords:function(t,e){var r=[];if((n=this.isReady(e))===this.u)throw new w.exception.notReady("generator isn't seeded");if(n&this.J){var i,n=!(n&this.I),o=[],a=0;for(this.Z=o[0]=(new Date).valueOf()+this.da,i=0;i<16;i++)o.push(4294967296*Math.random()|0);for(i=0;i<this.c.length&&(o=o.concat(this.c[i].finalize()),a+=this.m[i],this.m[i]=0,n||!(this.P&1<<i));i++);for(this.P>=1<<this.c.length&&(this.c.push(new w.hash.sha256),this.m.push(0)),this.f-=a,a>this.o&&(this.o=a),this.P++,this.b=w.hash.sha256.hash(this.b.concat(o)),this.L=new w.cipher.aes(this.b),n=0;n<4&&(this.h[n]=this.h[n]+1|0,!this.h[n]);n++);}for(n=0;n<t;n+=4)0==(n+1)%this.ca&&s(this),o=c(this),r.push(o[0],o[1],o[2],o[3]);return s(this),r.slice(0,t)},setDefaultParanoia:function(t,e){if(0===t&&"Setting paranoia=0 will ruin your security; use it only for testing"!==e)throw new w.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");this.M=t},addEntropy:function(t,e,r){r=r||"user";var i,n=(new Date).valueOf(),o=this.H[r],a=this.isReady(),s=0,c=this.U[r];switch(void 0===c&&(c=this.U[r]=this.ha++),void 0===o&&(o=this.H[r]=0),this.H[r]=(this.H[r]+1)%this.c.length,typeof t){case"number":void 0===e&&(e=1),this.c[o].update([c,this.N++,1,e,n,1,0|t]);break;case"object":if("[object Uint32Array]"===(r=Object.prototype.toString.call(t))){for(i=[],r=0;r<t.length;r++)i.push(t[r]);t=i}else for("[object Array]"!==r&&(s=1),r=0;r<t.length&&!s;r++)"number"!=typeof t[r]&&(s=1);if(!s){if(void 0===e)for(r=e=0;r<t.length;r++)for(i=t[r];0<i;)e++,i>>>=1;this.c[o].update([c,this.N++,2,e,n,t.length].concat(t))}break;case"string":void 0===e&&(e=t.length),this.c[o].update([c,this.N++,3,e,n,t.length]),this.c[o].update(t);break;default:s=1}if(s)throw new w.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[o]+=e,this.f+=e,a===this.u&&(this.isReady()!==this.u&&h("seeded",Math.max(this.o,this.f)),h("progress",this.getProgress()))},isReady:function(t){return t=this.T[void 0!==t?t:this.M],this.o&&this.o>=t?this.m[0]>this.ba&&(new Date).valueOf()>this.Z?this.J|this.I:this.I:this.f>=t?this.J|this.u:this.u},getProgress:function(t){return t=this.T[t||this.M],this.o>=t||this.f>t?1:this.f/t},startCollectors:function(){if(!this.D){if(this.a={loadTimeCollector:n(this,this.ma),mouseCollector:n(this,this.oa),keyboardCollector:n(this,this.la),accelerometerCollector:n(this,this.ea),touchCollector:n(this,this.qa)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else{if(!document.attachEvent)throw new w.exception.bug("can't attach event");document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector)}this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(t,e){this.K[t][this.ga++]=e},removeEventListener:function(t,e){var r,i,n=this.K[t],o=[];for(i in n)n.hasOwnProperty(i)&&n[i]===e&&o.push(i);for(r=0;r<o.length;r++)delete n[i=o[r]]},la:function(){i(this,1)},oa:function(t){var e,r;try{e=t.x||t.clientX||t.offsetX||0,r=t.y||t.clientY||t.offsetY||0}catch(t){r=e=0}0!=e&&0!=r&&this.addEntropy([e,r],2,"mouse"),i(this,0)},qa:function(t){t=t.touches[0]||t.changedTouches[0],this.addEntropy([t.pageX||t.clientX,t.pageY||t.clientY],1,"touch"),i(this,0)},ma:function(){i(this,2)},ea:function(t){var e;t=t.accelerationIncludingGravity.x||t.accelerationIncludingGravity.y||t.accelerationIncludingGravity.z,window.orientation&&"number"==typeof(e=window.orientation)&&this.addEntropy(e,1,"accelerometer"),t&&this.addEntropy(t,2,"accelerometer"),i(this,0)}},w.random=new w.prng(6);t:try{if(f=void 0!==t&&t.exports){try{d=require("crypto")}catch(t){d=null}f=l=d}if(f&&l.randomBytes)a=l.randomBytes(128),a=new Uint32Array(new Uint8Array(a).buffer),w.random.addEntropy(a,1024,"crypto['randomBytes']");else if("undefined"!=typeof window&&"undefined"!=typeof Uint32Array){if(u=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(u);else{if(!window.msCrypto||!window.msCrypto.getRandomValues)break t;window.msCrypto.getRandomValues(u)}w.random.addEntropy(u,1024,"crypto['getRandomValues']")}}catch(t){"undefined"!=typeof window&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(t))}w.json={defaults:{v:1,iter:1e4,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},ja:function(t,e,r,i){r=r||{},i=i||{};var n,o=w.json,a=o.g({iv:w.random.randomWords(4,0)},o.defaults);if(o.g(a,r),r=a.adata,"string"==typeof a.salt&&(a.salt=w.codec.base64.toBits(a.salt)),"string"==typeof a.iv&&(a.iv=w.codec.base64.toBits(a.iv)),!w.mode[a.mode]||!w.cipher[a.cipher]||"string"==typeof t&&a.iter<=100||64!==a.ts&&96!==a.ts&&128!==a.ts||128!==a.ks&&192!==a.ks&&256!==a.ks||a.iv.length<2||4<a.iv.length)throw new w.exception.invalid("json encrypt: invalid parameters");return"string"==typeof t?(t=(n=w.misc.cachedPbkdf2(t,a)).key.slice(0,a.ks/32),a.salt=n.salt):w.ecc&&t instanceof w.ecc.elGamal.publicKey&&(n=t.kem(),a.kemtag=n.tag,t=n.key.slice(0,a.ks/32)),"string"==typeof e&&(e=w.codec.utf8String.toBits(e)),"string"==typeof r&&(a.adata=r=w.codec.utf8String.toBits(r)),n=new w.cipher[a.cipher](t),o.g(i,a),i.key=t,a.ct=("ccm"===a.mode&&w.arrayBuffer&&w.arrayBuffer.ccm&&e instanceof ArrayBuffer?w.arrayBuffer.ccm:w.mode[a.mode]).encrypt(n,e,a.iv,r,a.ts),a},encrypt:function(t,e,r,i){var n=w.json,o=n.ja.apply(n,arguments);return n.encode(o)},ia:function(t,e,r,i){r=r||{},i=i||{};var n,o=w.json,a=(e=o.g(o.g(o.g({},o.defaults),e),r,!0)).adata;if("string"==typeof e.salt&&(e.salt=w.codec.base64.toBits(e.salt)),"string"==typeof e.iv&&(e.iv=w.codec.base64.toBits(e.iv)),!w.mode[e.mode]||!w.cipher[e.cipher]||"string"==typeof t&&e.iter<=100||64!==e.ts&&96!==e.ts&&128!==e.ts||128!==e.ks&&192!==e.ks&&256!==e.ks||!e.iv||e.iv.length<2||4<e.iv.length)throw new w.exception.invalid("json decrypt: invalid parameters");return"string"==typeof t?(t=(n=w.misc.cachedPbkdf2(t,e)).key.slice(0,e.ks/32),e.salt=n.salt):w.ecc&&t instanceof w.ecc.elGamal.secretKey&&(t=t.unkem(w.codec.base64.toBits(e.kemtag)).slice(0,e.ks/32)),"string"==typeof a&&(a=w.codec.utf8String.toBits(a)),n=new w.cipher[e.cipher](t),a="ccm"===e.mode&&w.arrayBuffer&&w.arrayBuffer.ccm&&e.ct instanceof ArrayBuffer?w.arrayBuffer.ccm.decrypt(n,e.ct,e.iv,e.tag,a,e.ts):w.mode[e.mode].decrypt(n,e.ct,e.iv,a,e.ts),o.g(i,e),i.key=t,1===r.raw?a:w.codec.utf8String.fromBits(a)},decrypt:function(t,e,r,i){var n=w.json;return n.ia(t,n.decode(e),r,i)},encode:function(t){var e,r="{",i="";for(e in t)if(t.hasOwnProperty(e)){if(!e.match(/^[a-z0-9]+$/i))throw new w.exception.invalid("json encode: invalid property name");switch(r+=i+'"'+e+'":',i=",",typeof t[e]){case"number":case"boolean":r+=t[e];break;case"string":r+='"'+escape(t[e])+'"';break;case"object":r+='"'+w.codec.base64.fromBits(t[e],0)+'"';break;default:throw new w.exception.bug("json encode: unsupported type")}}return r+"}"},decode:function(t){if(!(t=t.replace(/\s/g,"")).match(/^\{.*\}$/))throw new w.exception.invalid("json decode: this isn't json!");t=t.replace(/^\{|\}$/g,"").split(/,/);for(var e,r={},i=0;i<t.length;i++){if(!(e=t[i].match(/^\s*(?:(["']?)([a-z][a-z0-9]*)\1)\s*:\s*(?:(-?\d+)|"([a-z0-9+\/%*_.@=\-]*)"|(true|false))$/i)))throw new w.exception.invalid("json decode: this isn't json!");null!=e[3]?r[e[2]]=parseInt(e[3],10):null!=e[4]?r[e[2]]=e[2].match(/^(ct|adata|salt|iv)$/)?w.codec.base64.toBits(e[4]):unescape(e[4]):null!=e[5]&&(r[e[2]]="true"===e[5])}return r},g:function(t,e,r){if(void 0===t&&(t={}),void 0!==e)for(var i in e)if(e.hasOwnProperty(i)){if(r&&void 0!==t[i]&&t[i]!==e[i])throw new w.exception.invalid("required parameter overridden");t[i]=e[i]}return t},sa:function(t,e){var r,i={};for(r in t)t.hasOwnProperty(r)&&t[r]!==e[r]&&(i[r]=t[r]);return i},ra:function(t,e){for(var r={},i=0;i<e.length;i++)void 0!==t[e[i]]&&(r[e[i]]=t[e[i]]);return r}},w.encrypt=w.json.encrypt,w.decrypt=w.json.decrypt,w.misc.pa={},w.misc.cachedPbkdf2=function(t,e){var r=w.misc.pa,i=(e=e||{}).iter||1e3;return(i=(r=r[t]=r[t]||{})[i]=r[i]||{firstSalt:e.salt&&e.salt.length?e.salt.slice(0):w.random.randomWords(2,0)})[r=void 0===e.salt?i.firstSalt:e.salt]=i[r]||w.misc.pbkdf2(t,r,e.iter),{key:i[r].slice(0),salt:r.slice(0)}},void 0!==t&&t.exports&&(t.exports=w),"function"==typeof define&&define([],function(){return w})}},n={},i.m=r,i.c=n,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="./shared/qevents/main.js");function i(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},r[t].call(e.exports,e,e.exports,i),e.l=!0,e)).exports}var r,n});;(function(){
  window.define = window._define;
  window.require = window._require;
})(window);
