芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/static/js/1791.app.9da89b248e694d621e4a.min.js
/*! For license information please see 1791.app.9da89b248e694d621e4a.min.js.LICENSE.txt */ "use strict";(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[1791],{"0+zD":(t,r,e)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return r};var t,r={},e=Object.prototype,i=e.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function p(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{p({},"")}catch(t){p=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof O?r:O,i=Object.create(o.prototype),c=new T(n||[]);return a(i,"_invoke",{value:I(t,e,c)}),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var y="suspendedStart",E="suspendedYield",d="executing",w="completed",v={};function O(){}function g(){}function m(){}var N={};p(N,s,(function(){return this}));var P=Object.getPrototypeOf,R=P&&P(P(K([])));R&&R!==e&&i.call(R,s)&&(N=R);var C=m.prototype=O.prototype=Object.create(N);function b(t){["next","throw","return"].forEach((function(r){p(t,r,(function(t){return this._invoke(r,t)}))}))}function A(t,r){function e(o,a,c,s){var u=f(t[o],t,a);if("throw"!==u.type){var h=u.arg,p=h.value;return p&&"object"==n(p)&&i.call(p,"__await")?r.resolve(p.__await).then((function(t){e("next",t,c,s)}),(function(t){e("throw",t,c,s)})):r.resolve(p).then((function(t){h.value=t,c(h)}),(function(t){return e("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}})}function I(r,e,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===w){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=L(c,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=f(r,e,n);if("normal"===u.type){if(o=n.done?w:E,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=w,n.method="throw",n.arg=u.arg)}}}function L(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,L(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,v):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function K(r){if(r||""===r){var e=r[s];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o
=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(s&&u){if(this.prev
=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev
=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:K(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}function i(t,r,e,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void e(t)}c.done?r(s):Promise.resolve(s).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function c(t){i(a,n,o,c,s,"next",t)}function s(t){i(a,n,o,c,s,"throw",t)}c(void 0)}))}}var c=e("a7T2"),s=e("p09A"),u=e("H20a"),h=e("HCAJ"),p=e("skxT"),l=e("OfVV"),f=e("Zukw"),y=e("oUN1"),E=e("EHQ6"),d=e("yO4T");function w(){this.key=s.observable(),this.keyName=s.observable()}w.prototype.key=null,w.prototype.getKey=function(t,r,e,n){var o=this.loadKeyFromStorage(),i=new Promise(function(t,i){var a=c.bind((function(r){this.decryptKeyData(o,r).then(c.bind((function(r){this.generateKeyFromArray(r).then((function(r){t(r)})).catch((function(t){i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}))}),this)).catch((function(t){i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}))}),this);o?!this.key()||n?e?a(e):y.showPopup(E,[a,function(){c.isFunction(r)&&r()}]):t(this.key()):i(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/INFO_EMPTY_JSCRYPTO_KEY")))}.bind(this));this.loadKeyNameFromStorage(),i.then(c.bind((function(r){this.onKeyGenerateSuccess(r),c.isFunction(t)&&t(r)}),this)).catch(c.bind((function(t){c.isFunction(r)&&r(),this.onKeyGenerateError(t)}),this))},w.prototype.loadKeyNameFromStorage=function(){h.hasData(this.getStorageName())&&this.keyName(h.getData(this.getStorageName()).keyname)},w.prototype.loadKeyFromStorage=function(){var t="";return h.hasData(this.getStorageName())&&(t=h.getData(this.getStorageName()).keydata),t},w.prototype.generateKeyFromArray=function(t){return window.crypto.subtle.importKey("raw",t,{name:"AES-CBC"},!0,["encrypt","decrypt"])},w.prototype.onKeyGenerateSuccess=function(t){this.key(t)},w.prototype.onKeyGenerateError=function(t){t&&t.message&&p.showError(t.message)},w.prototype.generateKey=a(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,t.prev=1,t.next=4,window.crypto.subtle.generateKey({name:"AES-CBC",length:256},!0,["encrypt","decrypt"]);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_GENERATE_KEY"));case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),w.prototype.convertKeyToString=function(){var t=a(o().mark((function t(r){var e,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e="",!r){t.next=12;break}return t.prev=2,t.next=5,window.crypto.subtle.exportKey("raw",r);case 5:n=t.sent,e=f.Array2HexString(new Uint8Array(n)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_EXPORT_KEY"));case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(r){return t.apply(this,arguments)}}(),w.prototype.generateAndExportKey=function(){var t=a(o().mark((function t(r,e){var n,i,s=this;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.generateKey();case 2:return n=t.sent,t.next=5,this.convertKeyToString(n);case 5:i=t.sent,y.showPopup(d,[function(){var t=a(o().mark((function t(a){var l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.encryptKeyData(i,a);case 3:l=t.sent,h.setData(s.getStorageName(),{keyname:e,keydata:l}),s.loadKeyNameFromStorage(),s.onKeyGenerateSuccess(n),c.isFunction(r)&&r(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"));case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(r){return t.apply(this,arguments)}}(),function(){}]);case 7:case"end":return t.stop()}}),t,this)})));return function(r,e){return t.apply(this,arguments)}}(),w.prototype.getKeyFromString=function(){var t=a(o().mark((function t(r){var e,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=null,(n=f.HexString2Array(r)).length>0?n=new Uint8Array(n):p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")),t.prev=3,t.next=6,this.generateKeyFromArray(n);case 6:e=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"));case 12:return t.abrupt("return",e);case 13:case"end":return t.stop()}}),t,this,[[3,9]])})));return function(r){return t.apply(this,arguments)}}(),w.prototype.importKeyFromString=function(t,r,e,n){try{y.showPopup(d,[c.bind((function(o){this.encryptKeyData(r,o).then(c.bind((function(r){h.setData(this.getStorageName(),{keyname:t,keydata:r}),this.getKey(e,n,o)}),this)).catch((function(){p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")),c.isFunction(n)&&n()}))}),this),function(){c.isFunction(n)&&n()}])}catch(t){p.showError(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_IMPORT_KEY")),c.isFunction(n)&&n()}},w.prototype.exportKey=function(){return window.crypto.subtle.exportKey("raw",this.key())},w.prototype.deleteKey=function(){try{this.key(null),this.keyName(null),h.removeData(this.getStorageName())}catch(t){return{error:t}}return{status:"ok"}},w.prototype.decryptKeyData=function(t,r){var e=new Uint8Array(16);return new Promise(function(n,o){t?this.deriveKeyFromPasswordPromise(r,c.bind((function(r){crypto.subtle.decrypt({name:"AES-CBC",iv:e},r,new Uint8Array(f.HexString2Array(t))).then(c.bind((function(t){n(new Uint8Array(t))}),this)).catch((function(){o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}))}),this),(function(){o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))})):o(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}.bind(this))},w.prototype.encryptKeyData=function(t,r){var e=null,n=null,o=new Uint8Array(16);return new Promise(function(i,a){t?((e=f.HexString2Array(t)).length>0?e=new Uint8Array(e):a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY"))),this.deriveKeyFromPasswordPromise(r,c.bind((function(t){crypto.subtle.encrypt({name:"AES-CBC",iv:o},t,e).then(c.bind((function(t){n=f.Array2HexString(new Uint8Array(t)),i(n)}),this)).catch((function(){a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}))}),this),(function(){a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}))):a(new Error(u.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_LOAD_KEY")))}.bind(this))},w.prototype.deriveKeyFromPasswordPromise=function(t,r,e){var n=function(t){if(window.TextEncoder)return new TextEncoder("utf-8").encode(t);for(var r=unescape(encodeURIComponent(t)),e=new Uint8Array(r.length),n=0;n
{var n=e("a7T2"),o=e("p09A"),i=e("o1lX");function a(){i.call(this),this.keyPassword=o.observable(""),this.fOnPasswordEnterCallback=null,this.fOnCancellCallback=null}n.extendOwn(a.prototype,i.prototype),a.prototype.PopupTemplate="CoreParanoidEncryptionWebclientPlugin_DecryptKeyPasswordPopup",a.prototype.onOpen=function(t,r){this.fOnPasswordEnterCallback=t,this.fOnCancellCallback=r},a.prototype.decryptKey=function(){n.isFunction(this.fOnPasswordEnterCallback)&&this.fOnPasswordEnterCallback(this.keyPassword()),this.closePopup()},a.prototype.cancelPopup=function(){n.isFunction(this.fOnCancellCallback)&&this.fOnCancellCallback(),this.closePopup()},a.prototype.onShow=function(){this.keyPassword("")},t.exports=new a},yO4T:(t,r,e)=>{var n=e("M4cL"),o=e("a7T2"),i=e("p09A"),a=e("o1lX"),c=e("H20a"),s=e("skxT");function u(){a.call(this),this.keyPassword=i.observable(""),this.keyPasswordConfirm=i.observable(""),this.fOnPasswordEnterCallback=null,this.fOnWrongPasswordCallback=null,this.fOnCancellCallback=null}o.extendOwn(u.prototype,a.prototype),u.prototype.PopupTemplate="CoreParanoidEncryptionWebclientPlugin_EncryptKeyPasswordPopup",u.prototype.onOpen=function(t,r){this.fOnPasswordEnterCallback=t,this.fOnCancellCallback=r},u.prototype.encryptKey=function(){""===n.trim(this.keyPassword())?this.showError(c.i18n("COREPARANOIDENCRYPTIONWEBCLIENTPLUGIN/ERROR_PASSWORD_CANT_BE_BLANK")):n.trim(this.keyPassword())!==n.trim(this.keyPasswordConfirm())?this.showError(c.i18n("COREWEBCLIENT/ERROR_PASSWORDS_DO_NOT_MATCH")):(o.isFunction(this.fOnPasswordEnterCallback)&&this.fOnPasswordEnterCallback(n.trim(this.keyPassword())),this.closePopup())},u.prototype.cancelPopup=function(){o.isFunction(this.fOnCancellCallback)&&this.fOnCancellCallback(),this.closePopup()},u.prototype.onShow=function(){this.keyPassword(""),this.keyPasswordConfirm("")},u.prototype.showError=function(t){s.showError(t)},t.exports=new u},Zukw:(t,r,e)=>{var n=e("a7T2"),o={Array2HexString:function(t){var r="";return n.each(t,(function(t){var e=t.toString(16);r+=(1===e.length?"0":"")+e})),r},HexString2Array:function(t){var r=[];if(0===t.length||t.length%2!=0)return r;for(var e=0;e