← Back
Editing: index-legacy184.js
!function(){function t(e){return t="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},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof x?e:x,a=Object.create(o.prototype),c=new P(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",m="suspendedYield",y="executing",d="completed",g={};function x(){}function w(){}function b(){}var L={};f(L,u,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(T([])));_&&_!==o&&a.call(_,u)&&(L=_);var j=b.prototype=x.prototype=Object.create(L);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(o,i,c,u){var l=p(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function S(t,e,n){var o=v;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=D(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=p(t,e,n);if("normal"===l.type){if(o=n.done?d:m,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function D(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,D(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function F(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=b,i(j,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},k(O.prototype),f(O.prototype,l,(function(){return this})),n.AsyncIterator=O,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new O(h(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),f(j,s,"Generator"),f(j,u,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}System.register(["./index-legacy116.js?v=VERSION_NUMBER","./database-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,a,i,c,u,l,s,f,h,p,v,m,y,d,g;return{setters:[function(t){o=t._},function(t){a=t.getBackupSize,i=t.getImportSize},function(t){c=t.M},function(t){u=t.c,l=t.r,s=t.p,f=t.aD,h=t.q,p=t.v,v=t.y,m=t.z,y=t.x,d=t.e,g=t.C},null],execute:function(){var n={class:"relative w-full text-[1.6rem] flex items-center mb-2rem"},x={class:"flex flex-col ml-1rem leading-2rem"},w={class:"text-[1.2rem] mt-[8px]"},b={class:"grid grid-cols-3 leading-3rem py-1rem text-[1.4rem]"},L={class:"flex items-center mr-1rem"},E={class:"truncate flex-1"},_={class:"flex items-center mr-1rem"},j={class:"truncate flex-1"},k={class:"flex items-center"},O={class:"truncate flex-1"},S={key:0,class:"pl-2rem mt-2re leading-8 text-[1.2rem] list-disc"};t("default",u({__name:"index",props:{compData:{default:function(){return{type:"",refreshFn:function(){},successFlag:!1,config:{id:"",name:"",path:""}}}}},emits:["close","onCancel"],setup:function(t,u){var D=u.expose,F=u.emit,N=t,P=F,T=N.compData.config,G=T.id,C=T.name,I=(T.path,l("")),z=l(""),A=l("获取中...\t"),Y=l(!0),q=l(null),B=l("import"===N.compData.type?"导入":"recover"===N.compData.type?"恢复":"压缩"),H=l(),M=function(){var t,n=(t=e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,"backup"!==N.compData.type){t.next=7;break}return t.next=4,a({id:Number(G)});case 4:t.t0=t.sent,t.next=10;break;case 7:return t.next=9,i({name:C});case 9:t.t0=t.sent;case 10:if(r=t.t0,n=r.data,H.value&&(Y.value=!0),n.status){t.next=20;break}return K(),Y.value=!1,A.value=n.msg,t.abrupt("return");case 20:A.value!==n.msg&&(A.value=n.msg),null!=n&&n.total&&(I.value=n.total,z.value=n.speed);case 22:if(!(o=(-1!==n.msg.indexOf("成功!")||-1!==n.msg.indexOf("successful"))&&n.status)){t.next=26;break}return J(),t.abrupt("return");case 26:null!=n&&n.speed&&Y.value&&!o&&(q.value=setTimeout((function(){M()}),1e3)),t.next=33;break;case 29:t.prev=29,t.t1=t.catch(0),K();case 33:case"end":return t.stop()}}),t,null,[[0,29]])})),function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,u,"next",t)}function u(t){r(i,o,a,c,u,"throw",t)}c(void 0)}))});return function(){return n.apply(this,arguments)}}(),J=function(){Y.value=!1,"repair"===N.compData.type&&(c.success("修复完成,请按 Ctrl+F5 刷新缓存,或等待2s自动刷新!"),setTimeout((function(){localStorage.clear(),sessionStorage.clear(),window.location.reload()}),2e3)),P("close"),K(),N.compData.refreshFn&&N.compData.refreshFn()},K=function(){q.value=null,clearTimeout(q.value),Y.value=!1};return s(M),f(K),D({onCancel:K}),function(t,e){var r=o;return h(),p("div",{class:"p-2rem flex-wrap",ref_key:"progressDialog",ref:H},[v("div",n,[e[0]||(e[0]=v("i",{class:"svgtofont-el-loading text-3rem animate-spin"},null,-1)),v("div",x,[v("span",null,"正在"+m(y(B))+"数据库文件,请稍后...",1),v("span",w,"当前"+m(y(B))+"任务为后台"+m(y(B))+",可关闭此页面进行其他操作",1)])]),e[2]||(e[2]=v("hr",{class:"!border-[#dedede]"},null,-1)),v("div",b,[v("div",L,[v("span",null,m(y(B))+"数据库:",1),v("div",E,m(t.compData.config.name),1)]),v("div",_,[v("div",null,m(y(B))+"大小:",1),v("div",j,m(y(I)||"--"),1)]),v("div",k,[v("div",null,m(y(B))+"速度:",1),v("div",O,m(y(z)||"--"),1)])]),d(r,{class:"h-[30rem]",content:y(A)},null,8,["content"]),"import"===t.compData.type?(h(),p("ul",S,e[1]||(e[1]=[v("li",null,"导入完成后,可到导入->导入日志查看导入结果",-1)]))):g("",!0)],512)}}}))}}}))}();
Save File
Cancel