← Back
Editing: index-legacy474.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={},a=Object.prototype,o=a.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.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 p(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,o=Object.create(a.prototype),u=new P(n||[]);return i(o,"_invoke",{value:O(t,r,u)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function b(){}function x(){}function w(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,j=k&&k(k(G([])));j&&j!==a&&o.call(j,c)&&(_=j);var L=w.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(a,i,u,c){var l=h(e[a],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,a){n(t,e,r,a)}))}return a=a?a.then(o,o):o()}})}function O(t,e,n){var a=v;return function(o,i){if(a===d)throw Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:r,done:!0}}for(n.method=o,n.arg=i;;){var u=n.delegate;if(u){var c=F(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===v)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var l=h(t,e,n);if("normal"===l.type){if(a=n.done?m:y,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=m,n.method="throw",n.arg=l.arg)}}}function F(t,e){var n=e.method,a=t.iterator[n];if(a===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,F(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(a,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,g;var i=o.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 C(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],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 x.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:x,configurable:!0}),x.displayName=f(w,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},n.awrap=function(t){return{__await:t}},E(S.prototype),f(S.prototype,l,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,a,o){void 0===o&&(o=Promise);var i=new S(p(t,e,r,a),o);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"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=G,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(A),!t)for(var e in this)"t"===e.charAt(0)&&o.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,a){return u.type="throw",u.arg=t,e.next=n,a&&(e.method="next",e.arg=r),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.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),A(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 a=n.arg;A(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e,r,n,a,o,i){try{var u=t[o](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,a)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy140.js?v=VERSION_NUMBER","./index.vue_vue_type_script_setup_true_lang-legacy5.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./ace-legacy.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var a,i,u,c,l,s,f,p,h,v,y,d,m,g,b,x,w,_,k,j,L,E,S,O,F,C,A,P,G,T,V,I,N,U,B,D;return{setters:[function(t){a=t.al,i=t.at,u=t.A,c=t.b,l=t.c},function(t){s=t.c,f=t.r,p=t.w,h=t.p,v=t.a4,y=t.G,d=t.H,m=t.x,g=t.q,b=t.v,x=t.y,w=t.C,_=t.M,k=t.A,j=t.F,L=t.a_,E=t.P,S=t.B,O=t.e,F=t.I,C=t.ai,A=t.aj,P=t.D,G=t.aA},function(t){T=t.B},function(t){V=t._},function(t){I=t.getJavaProjectConfigList,N=t.getFileBody,U=t.saveFileBody},function(t){B=t.u,D=t.S},null,null],execute:function(){var n={class:"h-full relative"},H={key:0,class:"bg-[#7F7F7F] flex items-center justify-center h-[72rem]"},M={key:0},q={class:"inline-block text-[#666] items-center flex"},Y={class:"max-w-[55rem] truncate leading-[1.3] inline-block"},z=["onClick"],J={class:"my-12px"},$={key:0,class:"flex"},K={key:1,class:"text-[#666]"},Q={key:1,class:"bg-[#7F7F7F] flex items-center justify-center h-full"},R={class:"bg-white px-48px py-16px text-[#333] flex items-center"};t("default",s({__name:"index",props:{compData:{default:function(){return{}}}},setup:function(t,s){var W=s.expose,X=B().siteInfo,Z=D().jumpTabEvent,tt=c(),et=f(!1),rt=f(""),nt=f(!1),at=f([]),ot=f(""),it=f(!1),ut=f(""),ct=f(!1),lt=[],st={},ft=f(""),pt=function(){var t=o(e().mark((function t(){var n,a,o,u,c;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,et.value=!0,t.next=4,I({project_name:X.value.name});case 4:if(n=t.sent,(a=n.data).status){t.next=9;break}return tt.error(a.msg),t.abrupt("return");case 9:lt=[],st={},o=a.data.filter((function(t){return"伪静态配置文件"!==t.name&&!t.type.includes("spring")})),u=a.data.filter((function(t){return"伪静态配置文件"!==t.name&&t.type.includes("spring")&&t.status})),at.value=[].concat(r(o),r(u.length?[{name:"Spring配置",path:"spring",type:"spring",options:u.map((function(t){return"local_spring"===t.type?lt.push(t.path):st[t.path]=t.data,{label:t.path,value:t.path,type:t.type}})),status:!0}]:[])),at.value.length>0&&((c=at.value.find((function(t){return!0===t.status})))&&(rt.value=c.path,u.length>0&&(ut.value=u[0].path)),ht(c)),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),i(t.t0);case 20:return t.prev=20,et.value=!1,t.finish(20);case 23:case"end":return t.stop()}}),t,null,[[0,17,20,23]])})));return function(){return t.apply(this,arguments)}}(),ht=function(){var t=o(e().mark((function t(r){var n,a,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(nt.value){t.next=2;break}return t.abrupt("return");case 2:if(t.prev=2,!r.data){t.next=5;break}return t.abrupt("return",ot.value=r.data);case 5:if(it.value=!0,n=r.path,"spring"!==r.type){t.next=13;break}if(n=ut.value,ct.value=lt.includes(n),!st[n]){t.next=13;break}return ot.value=st[n],t.abrupt("return");case 13:return t.next=15,N({path:n});case 15:a=t.sent,o=a.data,ot.value=o.data,it.value=!1,t.next=25;break;case 21:t.prev=21,t.t0=t.catch(2),i(t.t0),ot.value="";case 25:return t.prev=25,it.value=!1,t.finish(25);case 28:case"end":return t.stop()}}),t,null,[[2,21,25,28]])})));return function(e){return t.apply(this,arguments)}}(),vt=function(){var t=o(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ht(at.value.find((function(t){return t.path===r})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),yt=function(){var t=o(e().mark((function t(){var r,n,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=tt.load("正在保存内容,请稍候..."),t.prev=1,n=rt.value.includes("spring")?ut.value:at.value.find((function(t){return t.path===rt.value})).path,t.next=5,U({data:ot.value,encoding:"utf-8",path:n});case 5:a=t.sent,tt.msg({dangerouslyUseHTMLString:!0,message:"<div>".concat(a.msg,"</div>"),type:a.status?"success":"error",duration:a.status?2e3:0,showClose:!a.status,customClass:"!max-w-[70rem]"}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1);case 12:return t.prev=12,r.close(),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,9,12,15]])})));return function(){return t.apply(this,arguments)}}();p((function(){return X.value}),(function(t){var e;null!==(e=X.value.project_config)&&void 0!==e&&e.bind_extranet&&(nt.value=!!X.value.project_config.bind_extranet)}),{immediate:!0});var dt=function(){var t=o(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=X.value.project_type.toLowerCase(),ft.value=r,nt.value=!0,pt();case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return h(dt),W({init:dt}),v((function(){at.value=[]})),function(t,e){var r=C,o=A,i=T,c=P,s=l,f=G,p=a,h=y("bt-loading");return d((g(),b("div",n,[m(at).length?w("",!0):(g(),b("div",H,e[4]||(e[4]=[x("div",{class:"bg-white px-48px py-16px text-[#333]"},"暂无配置文件",-1)]))),m(at).length?(g(),_(p,{key:1,type:"card",modelValue:m(rt),"onUpdate:modelValue":e[3]||(e[3]=function(t){return E(rt)?rt.value=t:null}),onChange:vt},{default:k((function(){return[(g(!0),b(j,null,L(m(at),(function(t){return g(),b(j,null,[t.status?(g(),_(f,{key:t.path,label:t.name,lazy:!0,name:t.path},{default:k((function(){return[m(nt)?(g(),b("div",M,[x("span",q,[e[5]||(e[5]=S(" 文件位置: ")),d(x("div",Y,[O(V,{text:t.path},null,8,["text"])],512),[[F,"spring"!==t.type]]),d(O(o,{class:"!w-[26rem]",modelValue:m(ut),"onUpdate:modelValue":e[0]||(e[0]=function(t){return E(ut)?ut.value=t:null}),onChange:function(e){return ht(t)}},{default:k((function(){return[(g(!0),b(j,null,L(t.options,(function(t){return g(),_(r,{key:t.value,label:t.label,value:t.value},null,8,["label","value"])})),128))]})),_:2},1032,["modelValue","onChange"]),[[F,"spring"===t.type]]),x("span",{class:"ml-[2rem] svgtofont-el-document-copy cursor-pointer",onClick:function(e){return m(u)({value:"spring"===t.type?m(ut):t.path})}},null,8,z)]),x("div",J,[d(O(i,{class:"!h-[54rem] !w-[64rem] border border-[#DCDFE6] rounded-4px",modelValue:m(ot),"onUpdate:modelValue":e[1]||(e[1]=function(t){return E(ot)?ot.value=t:null}),request:!1,onSave:yt,editorOption:{readonly:"spring"===t.type}},null,8,["modelValue","editorOption"]),[[h,m(it)]])]),"spring"!==t.type||m(ct)?(g(),b("div",$,[O(c,{type:"primary",onClick:yt},{default:k((function(){return e[6]||(e[6]=[S("保存")])})),_:1})])):(g(),b("div",K," 此文件为jar内部文件,不允许编辑 "))])):(g(),b("div",Q,[x("div",R,[e[8]||(e[8]=S("请开启 ")),O(s,{onClick:e[2]||(e[2]=function(t){return m(Z)("mapping")})},{default:k((function(){return e[7]||(e[7]=[S("外网映射")])})),_:1}),e[9]||(e[9]=S(" 后查看配置信息"))])]))]})),_:2},1032,["label","name"])):w("",!0)],64)})),256))]})),_:1},8,["modelValue"])):w("",!0)])),[[h,m(et)],[h,"正在加载配置文件,请稍后...","title"]])}}}))}}}))}();
Save File
Cancel