You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
9.4 KiB
2 lines
9.4 KiB
5 years ago
|
/*! For license information please see 2.js.LICENSE */
|
||
5 years ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1499:function(e,t,n){var r,a=a||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in r,o=/constructor/i.test(e.HTMLElement)||e.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},c=function(e){setTimeout((function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},l=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},u=function(t,u,p){p||(t=l(t));var d,h=this,f="application/octet-stream"===t.type,m=function(){!function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var a=e["on"+t[r]];if("function"==typeof a)try{a.call(e,n||e)}catch(e){s(e)}}}(h,"writestart progress write writeend".split(" "))};if(h.readyState=h.INIT,a)return d=n().createObjectURL(t),void setTimeout((function(){var e,t;r.href=d,r.download=u,e=r,t=new MouseEvent("click"),e.dispatchEvent(t),m(),c(d),h.readyState=h.DONE}));!function(){if((i||f&&o)&&e.FileReader){var r=new FileReader;return r.onloadend=function(){var t=i?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,h.readyState=h.DONE,m()},r.readAsDataURL(t),void(h.readyState=h.INIT)}(d||(d=n().createObjectURL(t)),f)?e.location.href=d:e.open(d,"_blank")||(e.location.href=d);h.readyState=h.DONE,m(),c(d)}()},p=u.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=l(e)),navigator.msSaveOrOpenBlob(e,t)}:(p.abort=function(){},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,function(e,t,n){return new u(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);e.exports?e.exports.saveAs=a:null!==n(1500)&&null!==n(1501)&&(void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r))},1500:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},1501:function(e,t){(function(t){e.exports=t}).call(this,{})},1502:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return p}));var r=n(352),a=n(1);let o=window.TextEncoder;o||(o=r.TextEncoder);let i=window.TextDecoder;i||(i=r.TextDecoder);const s=window.crypto.subtle||window.crypto.webkitSubtle;function c(e,t){const n=new Error(e);return n.friendlyText=t,n}function l(){return Object(a.a)("Your browser does not support the required cryptography extensions")}async function u(e,t){const n=function(e){const t=(new i).decode(new Uint8Array(e));let n=0;for(;;){const e=t.indexOf("\n",n);if(e<0)throw new Error("Header line not found");const r=t.slice(n,e).trim();if(n=e+1,r===h)break}const r=n;for(;;){const e=t.indexOf("\n",n);if("-----END MEGOLM SESSION DATA-----"===t.slice(n,e<0?void 0:e).trim())break;if(e<0)throw new Error("Trailer line not found");n=e+1}const a=n;return function(e){const t=window.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}(t.slice(r,a))}(e);if(n.length<1)throw c("Invalid file: too short",Object(a.a)("Not a valid Riot keyfile"));if(1!==n[0])throw c("Unsupported version",Object(a.a)("Not a valid Riot keyfile"));const r=n.length-69;if(r<0)throw c("Invalid file: too short",Object(a.a)("Not a valid Riot keyfile"));const o=n.subarray(1,17),u=n.subarray(17,33),p=n[33]<<24|n[34]<<16|n[35]<<8|n[36],f=n.subarray(37,37+r),m=n.subarray(-32),[y,w]=await d(o,p,t),b=n.subarray(0,-32);let E,v;try{E=await s.verify({name:"HMAC"},w,m,b)}catch(e){throw c("subtleCrypto.verify failed: "+e,l())}if(!E)throw c("hmac mismatch",Object(a.a)("Authentication check failed: incorrect password?"));try{v=await s.decrypt({name:"AES-CTR",counter:u,length:64},y,f)}catch(e){t
|