aldehyde 0.2.258 → 0.2.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controls/tree-select/navigation-tree.d.ts.map +1 -1
- package/lib/controls/tree-select/navigation-tree.js +4 -3
- package/lib/controls/tree-select/navigation-tree.js.map +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +1 -1
- package/lib/table/query-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/tree-select/navigation-tree.tsx +5 -5
- package/src/aldehyde/table/query-table.tsx +0 -1
- package/src/aldehyde/tmpl/interface.tsx +1 -0
- package/dist/bundle.04a76d4f726f7257b62e.js +0 -2
- package/dist/bundle.04a76d4f726f7257b62e.js.LICENSE.txt +0 -5
- package/dist/bundle.04a76d4f726f7257b62e.js.gz +0 -0
- package/dist/bundle.0ba97fb9aed3256959a1.js +0 -75
- package/dist/bundle.0ba97fb9aed3256959a1.js.LICENSE.txt +0 -8
- package/dist/bundle.0ba97fb9aed3256959a1.js.gz +0 -0
- package/dist/bundle.0cdb895a99048cda0139.js +0 -1
- package/dist/bundle.0cdb895a99048cda0139.js.gz +0 -0
- package/dist/bundle.118048608e8ab47050ab.js +0 -1
- package/dist/bundle.118048608e8ab47050ab.js.gz +0 -0
- package/dist/bundle.22564bca4d0f6fbabf69.js +0 -1
- package/dist/bundle.22564bca4d0f6fbabf69.js.gz +0 -0
- package/dist/bundle.27227d2415dfad58bab4.js +0 -1
- package/dist/bundle.27227d2415dfad58bab4.js.gz +0 -0
- package/dist/bundle.334162ac2c2d6bf397cb.js +0 -2
- package/dist/bundle.334162ac2c2d6bf397cb.js.LICENSE.txt +0 -20
- package/dist/bundle.334162ac2c2d6bf397cb.js.gz +0 -0
- package/dist/bundle.3b6c5fe034cbb723c7f3.js +0 -1
- package/dist/bundle.3b6c5fe034cbb723c7f3.js.gz +0 -0
- package/dist/bundle.3f109b3f90f09c23e8d2.js +0 -2
- package/dist/bundle.3f109b3f90f09c23e8d2.js.LICENSE.txt +0 -1
- package/dist/bundle.3f109b3f90f09c23e8d2.js.gz +0 -0
- package/dist/bundle.420a3c4b880bec7c9395.js +0 -2
- package/dist/bundle.420a3c4b880bec7c9395.js.LICENSE.txt +0 -25
- package/dist/bundle.420a3c4b880bec7c9395.js.gz +0 -0
- package/dist/bundle.4b96ffe1f62e4f94c131.js +0 -1
- package/dist/bundle.4b96ffe1f62e4f94c131.js.gz +0 -0
- package/dist/bundle.4c54741832df8c763776.js +0 -1
- package/dist/bundle.4c54741832df8c763776.js.gz +0 -0
- package/dist/bundle.4e74b367562f2fcc557e.js +0 -2
- package/dist/bundle.4e74b367562f2fcc557e.js.LICENSE.txt +0 -1
- package/dist/bundle.4e74b367562f2fcc557e.js.gz +0 -0
- package/dist/bundle.51b107a74d3e9e38daaa.js +0 -2
- package/dist/bundle.51b107a74d3e9e38daaa.js.LICENSE.txt +0 -10
- package/dist/bundle.51b107a74d3e9e38daaa.js.gz +0 -0
- package/dist/bundle.548e656e773307824959.js +0 -1
- package/dist/bundle.548e656e773307824959.js.gz +0 -0
- package/dist/bundle.54b2a31d011f6c769e7c.js +0 -1
- package/dist/bundle.54b2a31d011f6c769e7c.js.gz +0 -0
- package/dist/bundle.593c12023e54a91e8a0b.js +0 -1
- package/dist/bundle.593c12023e54a91e8a0b.js.gz +0 -0
- package/dist/bundle.5ae6eceb7934e46e6d45.js +0 -13
- package/dist/bundle.5ae6eceb7934e46e6d45.js.gz +0 -0
- package/dist/bundle.5d22c4c1586e95424e26.js +0 -1
- package/dist/bundle.5d22c4c1586e95424e26.js.gz +0 -0
- package/dist/bundle.61f9eb72cb7b4666013c.js +0 -2
- package/dist/bundle.61f9eb72cb7b4666013c.js.LICENSE.txt +0 -16
- package/dist/bundle.61f9eb72cb7b4666013c.js.gz +0 -0
- package/dist/bundle.699d5561bf119bdb97fc.js +0 -1
- package/dist/bundle.699d5561bf119bdb97fc.js.gz +0 -0
- package/dist/bundle.6a7337d14083532e943d.js +0 -2
- package/dist/bundle.6a7337d14083532e943d.js.LICENSE.txt +0 -9
- package/dist/bundle.6a7337d14083532e943d.js.gz +0 -0
- package/dist/bundle.79831dc7a84e75f07975.js +0 -2
- package/dist/bundle.79831dc7a84e75f07975.js.LICENSE.txt +0 -14
- package/dist/bundle.79831dc7a84e75f07975.js.gz +0 -0
- package/dist/bundle.7dda8c43f58b4e01000d.js +0 -1
- package/dist/bundle.7dda8c43f58b4e01000d.js.gz +0 -0
- package/dist/bundle.84924d3443cdf0ef3a08.js +0 -2
- package/dist/bundle.84924d3443cdf0ef3a08.js.LICENSE.txt +0 -5
- package/dist/bundle.84924d3443cdf0ef3a08.js.gz +0 -0
- package/dist/bundle.866fb447979af51deaf0.js +0 -2
- package/dist/bundle.866fb447979af51deaf0.js.LICENSE.txt +0 -17
- package/dist/bundle.866fb447979af51deaf0.js.gz +0 -0
- package/dist/bundle.874b3f088098a51fe779.js +0 -1
- package/dist/bundle.874b3f088098a51fe779.js.gz +0 -0
- package/dist/bundle.8f008042855b35daf44f.js +0 -1
- package/dist/bundle.8f008042855b35daf44f.js.gz +0 -0
- package/dist/bundle.8fba396651ab9131e760.js +0 -2
- package/dist/bundle.8fba396651ab9131e760.js.LICENSE.txt +0 -22
- package/dist/bundle.8fba396651ab9131e760.js.gz +0 -0
- package/dist/bundle.a22410e1dd80ca8e1dad.js +0 -1
- package/dist/bundle.a22410e1dd80ca8e1dad.js.gz +0 -0
- package/dist/bundle.a26a56462550fc7dcb76.js +0 -2
- package/dist/bundle.a26a56462550fc7dcb76.js.LICENSE.txt +0 -5
- package/dist/bundle.a26a56462550fc7dcb76.js.gz +0 -0
- package/dist/bundle.b28c0f5f2d452df6637a.js +0 -1
- package/dist/bundle.b28c0f5f2d452df6637a.js.gz +0 -0
- package/dist/bundle.b59913b5eca7fc9cf658.js +0 -2
- package/dist/bundle.b59913b5eca7fc9cf658.js.LICENSE.txt +0 -50
- package/dist/bundle.b59913b5eca7fc9cf658.js.gz +0 -0
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js +0 -2
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js.LICENSE.txt +0 -8
- package/dist/bundle.b5d9f43fb90d9c6b39a9.js.gz +0 -0
- package/dist/bundle.c987651cbacb95e92e9a.js +0 -1
- package/dist/bundle.c987651cbacb95e92e9a.js.gz +0 -0
- package/dist/bundle.d67ab9f0b5662beefec1.js +0 -2
- package/dist/bundle.d67ab9f0b5662beefec1.js.LICENSE.txt +0 -9
- package/dist/bundle.d67ab9f0b5662beefec1.js.gz +0 -0
- package/dist/bundle.df15389f0df80bb5c1f8.js +0 -2
- package/dist/bundle.df15389f0df80bb5c1f8.js.LICENSE.txt +0 -8
- package/dist/bundle.df15389f0df80bb5c1f8.js.gz +0 -0
- package/dist/bundle.e9df92a889fa6911eb3a.js +0 -1
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js +0 -2
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js.LICENSE.txt +0 -7
- package/dist/bundle.ebe7ebdb4845f80a5dd4.js.gz +0 -0
- package/dist/bundle.f4c743816a267bced7bb.js +0 -1
- package/dist/bundle.f4c743816a267bced7bb.js.gz +0 -0
- package/dist/bundle.f6fe12d30504559f5f27.js +0 -2
- package/dist/bundle.f6fe12d30504559f5f27.js.LICENSE.txt +0 -6
- package/dist/bundle.f6fe12d30504559f5f27.js.gz +0 -0
- package/dist/css/chemstruc-graph-3996ceb0836a84cd2d4f.css +0 -12
- package/dist/css/chemstruc-graph-3996ceb0836a84cd2d4f.css.gz +0 -0
- package/dist/css/common-4fdc190a7145b69314ce.css +0 -56
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +0 -886
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
- package/dist/css/main-d4de6792432b484dddeb.css +0 -1169
- package/dist/css/main-d4de6792432b484dddeb.css.gz +0 -0
- package/dist/images/login-bg-027de94b.png +0 -0
- package/dist/images/welcome-8bf57aea.png +0 -0
- package/dist/index.html +0 -4
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see bundle.3f109b3f90f09c23e8d2.js.LICENSE.txt */
|
|
2
|
-
!function(){var t,e,r,n,o,a={1026:function(t,e,r){"use strict";r.d(e,{U:function(){return m},Y:function(){return b}});var n=r(42455),o=r(21745),a=r(50828),i=r(33227),c=r(17636),u=r(96540),l=r(94300),s=r(95424),f=r(92749),h=r(17437);function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(){v=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(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)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function g(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}var m=(0,u.createContext)({locale:void 0,availableLang:[],langPkg:{},changeLocale:function(){},siderCollapsed:!1,changeSiderCollapsed:function(){},t:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("")},translate:function(t){var e,r=[],n="",o="",a=!1,i=y(t);try{for(i.s();!(e=i.n()).done;){var c=e.value;if("$"===c)a=!0,r.push(n),n="";else{if(a&&"{"===c)continue;a&&"}"===c?(r.push(o),a=!1,o=""):a?o+=c:n+=c}}}catch(t){i.e(t)}finally{i.f()}return r.push(n),r.join("")}}),w=function(){var t=(0,c.A)(v().mark((function t(e,r){var n,o,a;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("zh"!==(n=(0,s.EV)(e))){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,f.A.getLocale(n,r);case 5:if(o=t.sent,a=o.value,"success"!==o.status){t.next=10;break}return t.abrupt("return",a);case 10:return t.abrupt("return",{});case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),b=function(t){var e=t.serverKey,r=void 0===e?"":e,n=t.children,a=(0,l.t)().navigatorLanguage,p=window.localStorage.getItem("locale"),g=JSON.parse(window.localStorage.getItem("langPkg")),b=(0,u.useState)(p||(0,s.oK)(a)),A=(0,i.A)(b,2),x=A[0],k=A[1],C=(0,u.useState)(!1),L=(0,i.A)(C,2),E=L[0],O=L[1],S=(0,u.useState)(g||{}),Y=(0,i.A)(S,2),j=Y[0],I=Y[1],P=(0,u.useState)([]),T=(0,i.A)(P,2),N=T[0],D=T[1],_=function(){var t=(0,c.A)(v().mark((function t(e){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),R=function(){var t=(0,c.A)(v().mark((function t(e){var r,n,o,a,i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=d({},j),n=y(e),t.prev=2,n.s();case 4:if((o=n.n()).done){t.next=19;break}if(a=o.value,i=void 0,""!==a){t.next=13;break}return t.next=10,w(x);case 10:i=t.sent,t.next=16;break;case 13:return t.next=15,w(x,a);case 15:i=t.sent;case 16:void 0!==r[x]?Object.assign(r[x],i):r[x]=i;case 17:t.next=4;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(2),n.e(t.t0);case 24:return t.prev=24,n.f(),t.finish(24);case 27:window.localStorage.setItem("locale",x),I(r);case 29:case"end":return t.stop()}}),t,null,[[2,21,24,27]])})));return function(e){return t.apply(this,arguments)}}();return(0,u.useEffect)((function(){Array.isArray(r)||(r=(0,o.A)(new Set(["",r]))),R((0,o.A)(new Set([""].concat((0,o.A)(r))))),f.A.getAllLang().then((function(t){"success"===t.status&&D(t.languages?t.languages.map((function(t){return(0,s.oK)(t)})):[])}))}),[x]),(0,u.useEffect)((function(){window.localStorage.setItem("langPkg",JSON.stringify(j))}),[j]),(0,h.Y)(m.Provider,{value:{locale:x,availableLang:N,langPkg:j,changeLocale:_,siderCollapsed:E,changeSiderCollapsed:function(){O(!E)},t:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if("zh"===x)return e.join("");for(var n="",o=!1,a=0,i=e;a<i.length;a++){var c=i[a],u=void 0===j[x]?void 0:j[x][c];if(void 0===u){o=!0;break}n+=u+" "}return o?e.join(""):n.slice(0,n.length-1)},translate:function(t){var e,r=[],n=[],o=!1,a="",i="",c=!1,u=y(t);try{for(u.s();!(e=u.n()).done;){var l=e.value;if("$"!==l||c){if(c&&"{"===l)continue;c&&"}"===l?(void 0===(void 0===j[x]?void 0:j[x][i])&&(o=!0),r.push(i),n.push(!0),c=!1,i=""):c?i+=l:a+=l}else c=!0,""!==a&&(r.push(a),a="",n.push(!1))}}catch(t){u.e(t)}finally{u.f()}if(""!==a&&(r.push(a),n.push(!1)),o)return r.join("");for(var s="",f=0;f<r.length;f++)n[f]?s+=(0!==f?" ":"")+j[x][r[f]]:s+=r[f];return s},getServiceLangStr:function(){return(0,s.EV)(x)}}},n)}},1157:function(t,e,r){"use strict";r.d(e,{A:function(){return k}});var n=r(42455),o=r(38452),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(69036),d=r(1849),v=r(54839),y=r(68144),g=r(92749),m=r(48287),w=r(17437),b=["placement","width","onCancel","open"];function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=b.prototype=m.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var c=arguments.length,s=new Array(c),h=0;h<c;h++)s[h]=arguments[h];return r=this,n=e,o=[].concat(s),n=(0,l.A)(n),t=(0,u.A)(r,x()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"state",{selectedAuths:[],loading:!0,role:void 0}),(0,f.A)(t,"loadData",(0,a.A)(A().mark((function e(){var r,n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props.roleCode){e.next=3;break}return e.abrupt("return");case 3:return t.setState({loading:!0}),e.next=6,g.A.requestRoleAuths(r);case 6:n=e.sent,t.setState({loading:!1,selectedAuths:null==n?void 0:n.auths,role:null==n?void 0:n.role});case 8:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"saveAuth",(0,a.A)(A().mark((function e(){var r,n,o;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.roleCode,o=r.onOk,e.next=3,g.A.postRoleAuths(n,t.state.selectedAuths);case 3:"success"==e.sent.status&&p.Ay.success((0,m.A)("${保存成功}!")),o&&o();case 6:case"end":return e.stop()}}),e)})))),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(A().mark((function t(e){var r,n;return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props.roleCode,(n=e.roleCode)&&n==r){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.placement,n=e.width,a=e.onCancel,i=e.open,c=((0,o.A)(e,b),this.state),u=c.loading,l=c.role;return(0,w.Y)(d.A,{loading:u,title:null==l?void 0:l.name,placement:r,closable:!0,mask:!1,onClose:a,open:i,width:n,extra:[(0,w.Y)(v.Ay,{type:"primary",onClick:this.saveAuth},"保存")],style:{maxWidth:"92vw"}},(0,w.Y)(y.A,{checks:this.state.selectedAuths,onChange:function(e){t.setState({selectedAuths:e})}}))}}]);var r,n}(h.PureComponent);(0,f.A)(k,"defaultProps",{showConfirm:!0,width:"500",forceRender:!0,style:{maxWidth:"92vw",maxHeight:"92vh"},placement:"left",roleCode:void 0})},1490:function(t,e,r){"use strict";var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(54839),p=r(1849),d=r(28392),v=r(46935),y=r(40261),g=r(8130),m=r(46675),w=r(1026),b=r(17437),A=["cQueryConfig","mainCode","type","pageType","serverKey"];function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k={EditOutlined:(0,b.Y)(y.A,null)},C=function(t){function e(){var t,r,n,o;(0,a.A)(this,e);for(var i=arguments.length,l=new Array(i),f=0;f<i;f++)l[f]=arguments[f];return r=this,n=e,o=[].concat(l),n=(0,u.A)(n),t=(0,c.A)(r,x()?Reflect.construct(n,o||[],(0,u.A)(r).constructor):n.apply(r,o)),(0,s.A)(t,"state",{showDraw:!1}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"showDraw",(function(e){t.setState({showDraw:!0})})),(0,s.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this,e=this.props,r=e.cQueryConfig,a=e.mainCode,i=e.type,c=e.pageType,u=e.serverKey,l=(0,o.A)(e,A),s=this.state.showDraw,y=this.context.translate,w=a&&a.indexOf("@R@")>0?a.split("@R@")[0]:a;return(0,b.Y)(f.Fragment,null,"text"==i?(0,b.Y)("span",{className:"cquickTextButton",onClick:function(){t.setState({showDraw:!s})}},r.title):(0,b.Y)(h.Ay,(0,n.A)({},l,{onClick:function(){t.setState({showDraw:!s})}}),k[r.title]?k[r.title]:r.title),s?"edit"==r.type?(0,b.Y)(m.A,{serverKey:u,pageType:c,open:s,onCancel:function(){t.setState({showDraw:!1})},sourceId:r.id,code:w,onOk:this.closeDrawer}):(0,b.Y)(p.A,{placement:"left",title:y("${关联查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:s,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,b.Y)(d.A,null,(0,b.Y)(h.Ay,{onClick:this.closeDrawer},y("${关闭}")))},r.path?f.createElement(g.A.getCustomPage(r.path)):(0,b.Y)(v.A,{serverKey:u,sourceId:r.id,mainCode:w})):null)}}])}(f.PureComponent);(0,s.A)(C,"contextType",w.U),(0,s.A)(C,"defaultProps",{pageType:"modal"}),e.A=C},4283:function(t,e,r){"use strict";var n=r(38452),o=(r(96540),r(53515)),a=r(36492),i=r(46704),c=r(94300),u=r(17437),l=["viewOrEdit"];e.A=function(t){var e,r=t.viewOrEdit,s=void 0===r?"view":r,f=(0,n.A)(t,l),h=f.value,p=f.fieldConfig,d=f.onChange,v=f.options,y=(0,c.Y)().translate,g=i.A.getEnums(p.mstrucId);void 0===g&&console.error("".concat(p.mstrucId," 枚举未找到"));var m=void 0;for(var w in g)h==g[w].value&&(m=parseInt(w));var b=[];return Array.isArray(g)&&g.map((function(t){return b.push({title:t.title})})),e=p.disabled||"view"==s?(0,u.Y)(o.A,{items:b,current:m,size:"small"}):(0,u.Y)(a.A,{placeholder:y("${请选择}${"+p.title+"}"),notFoundContent:y("${暂无选项}"),allowClear:!0,showSearch:!0,value:h,onChange:function(t){d&&d(t)},options:v}),e}},8130:function(t,e,r){"use strict";var n=r(42455),o=r(21745),a=r(74353),i=r.n(a),c=r(78229),u=r(54774),l=r(54763);function s(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}var f=void 0,h={},p={},d={},v={},y={},g={},m={},w={},b={},A=void 0;e.A={setAntdUseToken:function(t){A=t},getAntdUseToken:function(){return A},setAppDtmplConfigFunc:function(t,e){g[t]=e},setMenuIconMap:function(t){d=t},mapMenuIcon:function(t){return d[t]},setMenuMap:function(t){p=t},mapMenu:function(t){return"home"==t?"首页":p[t]},getAppDtmplConfig:function(t,e,r){return t?g[t.id]?g[t.id](t,e,r):c.A.buildInDtmplConfig(t,e,r):t},setCustomButtonConfig:function(t,e){v[t]=e},getCustomButtonConfig:function(t){return v[t]},setAppCtmplConfigFunc:function(t,e){m[t]=e},getAppCtmplConfig:function(t,e,r){return t&&m[t.id]?m[t.id](t,e,r):t},isDynamicDtmplConfig:function(t){return!(!t||!g[t.id])},setCustomPage:function(t,e){var r=t;r&&(r.startsWith("/")||(r="/"+r),h[r]=e)},setCustomControl:function(t,e,r){var n=t;n.startsWith("/")||(n="/"+n),y[n]=e,w[n]=r},getCustomViewControl:function(t){return t?t.startsWith("/")?y[t]:y["/"+t]:null},getCustomEditControl:function(t){return t?t.startsWith("/")?w[t]:w["/"+t]:null},getCustomPage:function(t){return t?t.startsWith("/")?h[t]:h["/"+t]:null},setProgramCode:function(t,e){t&&(e?window.localStorage.setItem(e+"programCode",t):(window.localStorage.setItem("programCode",t),window.sessionStorage.setItem("programCode",t)))},setSessionProgramCode:function(t){t&&window.sessionStorage.setItem("programCode",t)},programCode:function(t){var e=null;return(e=t?window.localStorage.getItem(t+"programCode"):window.sessionStorage.getItem("programCode"))||(e=window.localStorage.getItem("programCode"),this.setSessionProgramCode(e)),e},setHydrocarbonServer:function(t,e){e?window.localStorage.setItem(e+"hydrocarbonServer",t):this.programCode()?window.localStorage.setItem(this.programCode()+"hydrocarbonServer",t):window.localStorage.setItem("hydrocarbonServer",t)},setProgramName_Logo:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_Logo",t):window.localStorage.setItem("programName_Logo",t)},api:function(t){var e=null;if((e=t?window.localStorage.getItem(t+"hydrocarbonServer"):window.localStorage.getItem(this.programCode()+"hydrocarbonServer"))||(e=window.localStorage.getItem("hydrocarbonServer")),e)if("/"==e){var r=new URL(window.location.href),n=r.pathname.split("/kuangkie")[0];e=this.joinPath(r.origin,n)}else e.startsWith("http")||(e=this.joinPath(new URL(window.location.href).origin,e));else{var o=new URL(window.location.href),a=null;o.pathname.indexOf("/kuangkie")>0&&(a=o.pathname.split("/kuangkie")[0]),e=this.joinPath(o.origin,a)}return e},hydrocarbonToken:function(t){var e=t||this.programCode(),r=window.sessionStorage.getItem(e+"hydrocarbonToken");return r||(r=window.sessionStorage.getItem("hydrocarbonToken")),r||((r=window.localStorage.getItem(e+"hydrocarbonToken"))||(r=window.localStorage.getItem("hydrocarbonToken")),r&&this.setSessionHydrocarbonToken(r,e)),r},setServerHydrocarbonToken:function(t,e){t&&e&&window.sessionStorage.setItem(t+"hydrocarbonToken",e),this.setHydrocarbonToken(e,t)},serverHydrocarbonToken:function(t){var e=window.sessionStorage.getItem(t+"hydrocarbonToken");return e||(e=window.localStorage.getItem(t+"hydrocarbonToken")),e||(e=this.hydrocarbonToken()),e},putExtendServers:function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(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)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;b[n.key]=n,n.key&&n.hydrocarbonServer&&(u.vr.setProgramCode(n.programCode,n.key),u.vr.setHydrocarbonServer(n.hydrocarbonServer,n.key))}}catch(t){r.e(t)}finally{r.f()}},getExtendServers:function(t){return b[t]},setHydrocarbonToken:function(t,e){var r=this.programCode(e);this.setLocalHydrocarbonToken(t,r),this.setSessionHydrocarbonToken(t,r)},setLocalHydrocarbonToken:function(t,e){e||window.localStorage.setItem("hydrocarbonToken",t);var r=e||this.programCode();r&&(window.localStorage.setItem(r+"hydrocarbonToken",t),window.localStorage.getItem("hydrocarbonToken")||window.localStorage.setItem("hydrocarbonToken",t))},setSessionHydrocarbonToken:function(t,e){e||window.sessionStorage.setItem("hydrocarbonToken",t);var r=e||this.programCode();r&&(window.sessionStorage.setItem(r+"hydrocarbonToken",t),window.sessionStorage.getItem("hydrocarbonToken")||window.sessionStorage.setItem("hydrocarbonToken",t))},setProgramName:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName",t):window.localStorage.setItem("programName",t)},programName:function(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName"):window.localStorage.getItem("programName")},setProgramName_sub:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_sub",t):window.localStorage.setItem("programName_sub",t)},programName_sub:function(){return this.programCode()?window.localStorage.getItem(this.programCode()+"programName_sub"):window.localStorage.getItem("programName_sub")},setProgramName_NavLeft:function(t){this.programCode()?window.localStorage.setItem(this.programCode()+"programName_NavLeft",t):window.localStorage.setItem("programName_NavLeft",t)},programName_NavLeft:function(){var t;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_NavLeft")),t||(t=window.localStorage.getItem("programName_NavLeft")),t||"管理平台"},programName_Logo:function(){var t=null;return this.programCode()&&(t=window.localStorage.getItem(this.programCode()+"programName_Logo")),t||(t=window.localStorage.getItem("programName_Logo")),t&&"undefined"==t?null:t},formateDate:function(t){return t?i()(new Date(t)).format("YYYY-MM-DD HH:mm:ss"):""},dateToString:function(t){var e=t.getFullYear(),r=(t.getMonth()+1).toString(),n=t.getDate().toString();return 1===r.length&&(r="0"+r),1===n.length&&(n="0"+n),e+"-"+r+"-"+n},pagination:function(t,e){return{onchange:function(t){e(t)},current:t.pageInfo.pageNo,pageSize:t.pageInfo.pageSize,total:t.pageInfo.count,showTotal:function(){return"共".concat(t.pageInfo.count,"条")},showQuickIumper:!0}},openFile:function(t,e,r){try{var n=document.createElement("a");n.href=t+r,n.target="_blank",document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(t){console.log(t)}},toLogin:function(){var t=this.programCode(),e=localStorage.getItem("version");window.location.hash=t&&"null"!=t&&"undefined"!=t?"v2"===e?"#/login2/"+t:"#/login/"+t:"v2"===e?"#/login2/":"#/login/"},downloadFile:function(t,e){try{var r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}catch(t){console.log(t)}},downloadFile_old:function(t){try{var e=document.createElement("form");e.action=t,document.body.appendChild(e),e.submit(),document.body.removeChild(e)}catch(t){console.log(t)}},getRandomNum:function(t){var e="",r=Math.floor(10*Math.random());e+=0==r?"1":r+"";for(var n=1;n<t;n++)e+=Math.floor(10*Math.random());return e},getStorageKeyPrefix:function(){return void 0===f&&(f=window.location.pathname||""),f},getLongTextStyle:function(t){if(!t)return{};var e={minWidth:"normal",maxWidth:"1000px",display:"block",whiteSpace:"normal",lineHeight:"20px"},r=t.length>200?"350px":t.length>150?"300px":t.length>100?"250px":t.length>50?"200px":t.length>=20?"160px":"80px";return e.minWidth=r,e},setLocalStorge:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;if(t&&(t=this.getStorageKeyPrefix()+t),e){var n=r||60,o=new Date,a=60*n*1e3;localStorage.setItem(t,JSON.stringify({value:e,expireAddTime:a,expires:o.getTime()+a}))}else localStorage.removeItem(t)},getLocalStorge:function(t){t&&(t=this.getStorageKeyPrefix()+t);try{var e=JSON.parse(localStorage[t]);return!e||e.expires<Date.now()?null:(e.expires=Date.now()+e.expireAddTime,localStorage.setItem(t,JSON.stringify(e)),e.value)}catch(e){return localStorage[t]}},getAnoHydrocarbonToken:function(){var t=this.getLocalStorge("anoHydrocarbonToken");return t||(t="tmpl"+this.getRandomNum(6),this.setLocalStorge("anoHydrocarbonToken",t)),t},transQueryParamsToStr:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"?":"",n=[],o=[];for(var a in t)if(!(e.indexOf(a)>=0)){var i=t[a];[void 0,null].includes(i)?i="":o.push(a)}o.sort();for(var c=function(){var e=l[u],r=t[e],o=encodeURIComponent(e);r&&("sortColIds"===e||r&&r.constructor===Array?r.forEach((function(t){n.push(o+"[]="+encodeURIComponent(t))})):n.push(o+"="+encodeURIComponent(r)))},u=0,l=o;u<l.length;u++)c();return n.length?r+n.join("&"):""},getItemType:function(t,e,r){var n=t;if(!e||!r)return null;n.startsWith("c_")&&(n=n.substring(2));var a=[];r.criterias&&a.push.apply(a,(0,o.A)(r.criterias)),r.updrillButtonConfigs&&a.push.apply(a,(0,o.A)(r.updrillButtonConfigs)),r.innerParams&&a.push.apply(a,(0,o.A)(r.innerParams)),r.drillingParams&&a.push.apply(a,(0,o.A)(r.drillingParams));for(var i=0,c=a;i<c.length;i++){var u=c[i];if(u.id==n)return l.A.getControlType(u,e)}return null},transQueryStrToParams:function(t,e){var r={},n=t.split("?");if(n&&2==n.length)for(var o=n[1].split("&"),a=0;a<o.length;a++)if(o[a].indexOf("[]=")>0){var i=o[a].split("[]="),c=i[0];r[c]||(r[c]=[]);var u=decodeURIComponent(i[1]);r[c].push(this.configParamTrans(u,this.getItemType(c,u,e)))}else{var l=o[a].split("="),s=l[0];if(s){var f=decodeURIComponent(l[1]);r[s]=this.configParamTrans(f,this.getItemType(s,f,e))}}return r},isConfigDefaultValue:function(t){return!!t&&t.startsWith("$$current")},configParamTrans:function(t,e){return t&&t.startsWith&&t.startsWith("$$current")?c.A.current(t,this.getDayjsFormat(e)):t},uniq:function(t,e){var r=[];return t.map((function(t){var n=!0;return r.map((function(r){return t[e]===r[e]&&(n=!1),!1})),n&&r.push(t),!1})),r},deepCopy:function(t){var e=Array.isArray(t)?[]:{};for(var r in t)t.hasOwnProperty(r)&&("object"===(0,n.A)(t[r])?e[r]=this.deepCopy(t[r]):e[r]=t[r]);return e},getFileUrl:function(t){return t?t.constructor===String?t:t.constructor===Object?t.props.children.props?t.props.children.props.href:t.props.owlner?t.props.owlner:t:t:t},getOptionColor:function(t,e){return e?(t&&t.forEach((function(t){t.value!==e||t.color&&(r=t.color)})),r):null;var r},getFieldItemType:function(t){return t.extType?t.extType:t.msExtType?t.msExtType:t.msType?t.msType:t.type},isEmpty:function(t){if(!t)return!0;for(var e in t)return!1;return!0},getDayjsFormat:function(t){var e="YYYY-MM-DD HH:mm:ss";switch(t){case"daterange-YY":case"date-YY":e="YYYY";break;case"date-M1":case"daterange-M1":e="YYYY-MM";break;case"date":case"daterange":e="YYYY-MM-DD";break;case"datetime-HH":case"datetimerange-HH":e="YYYY-MM-DD HH";break;case"datetime-mm":case"datetimerange-mm":e="YYYY-MM-DD HH:mm";break;case"datetime":case"datetimerange":e="YYYY-MM-DD HH:mm:ss";break;case"timestamp":e="YYYY-MM-DD HH:mm:ss SSS";break;case"time-HH":case"timerange-HH":case"timerange-HH-unorder":e="HH";break;case"time-mm":case"timerange-mm":case"timerange-mm-unorder":e="HH:mm";break;case"time":case"timerange":case"timerange-unorder":e="HH:mm:ss"}return e},getDateTimeFormat:function(t){switch(t){case"time-HH":case"timerange-HH":case"datetime-HH":case"datetimerange-HH":return"HH";case"time-mm":case"timerange-mm":case"datetime-mm":case"datetimerange-mm":return"HH:mm";case"timestamp":case"time":case"timerange":case"datetime":case"datetimerange":return"HH:mm:ss";default:return""}return""},concatValue:function(t,e){var r=void 0;return r=t?t+"~":"~",e&&(r+=e),r},splitValue:function(t){var e,r;if(t)if(t.toString().indexOf("~")>=0){var n=t.split("~");e=n[0]?n[0]:void 0,r=n[1]?n[1]:void 0}else e=t;return{valueBegin:e,valueEnd:r}},str2UTF8:function(t){var e,r,n=new Array;e=t.length;for(var o=0;o<e;o++)(r=t.charCodeAt(o))>=65536&&r<=1114111?(n.push(r>>18&7|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(63&r|128)):r>=2048&&r<=65535?(n.push(r>>12&15|224),n.push(r>>6&63|128),n.push(63&r|128)):r>=128&&r<=2047?(n.push(r>>6&31|192),n.push(63&r|128)):n.push(255&r);return n},joinPath:function(t,e){var r=t;return r.endsWith("/")||r.endsWith("\\")||(r+="/"),e&&(e.startsWith("/")||r.startsWith("\\")?r+=e.slice(1):r+=e),r},setProgramCode4RoutePath:function(t){var e=t.programCode;this.setProgramCode(e)},setSessionProgramCode4RoutePath:function(t){var e=t.programCode;this.setSessionProgramCode(e)},getReactKey:function(){return(new Date).getTime().toString()}}},8835:function(t,e,r){"use strict";var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(16044),d=r(37977),v=r(54839),y=r(67034),g=r(28073),m=r(28392),w=r(47152),b=r(16370),A=r(677),x=r(17355),k=r(87937),C=r(93598),L=r(40261),E=r(11058),O=r(55140),S=r(49237),Y=r(1005),j=r(80581),I=r(35880),P=r(54774),T=r(77053),N=r(1026),D=r(17437);function _(){_=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function G(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(G=function(){return!!t})()}var M=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,w=new Array(s),b=0;b<s;b++)w[b]=arguments[b];return r=this,n=e,c=[].concat(w),n=(0,l.A)(n),t=(0,u.A)(r,G()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{data:[],expandedKeys:[],loadedKeys:[],loading:!1,parentNodeData:void 0,currentNodeData:void 0,rootAddable:!1,searchValue:void 0,checkedKeys:void 0,nodeClickLoading:!1}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"reloadData",function(){var e=(0,a.A)(_().mark((function e(r){var n,o,a,i,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.ttmplNodeConfig,o=t.state,a=o.data,i=o.expandedKeys,e.next=4,T.A.reloadData(r,n,a,i);case 4:c=e.sent,t.setState(F({},c));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"doDelete",function(){var e=(0,a.A)(_().mark((function e(r){var n,o,a,i,c,u,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props.ttmplNodeConfig,o=t.state,a=o.data,i=o.expandedKeys,c=r.isLeaf?n.leafRatmplId:n.branchRatmplId?n.branchRatmplId:n.rootLTmplConfig,e.next=5,P.Fj.deleteByCode(null,c,[r.code]);case 5:if(e.sent,!r.parent){e.next=13;break}return e.next=9,T.A.reloadData(r.parent.code,n,a,i);case 9:u=e.sent,t.setState(F({},u)),e.next=17;break;case 13:return e.next=15,T.A.reloadData(null,n,a,i);case 15:l=e.sent,t.setState(F({},l));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"onExpand",function(){var e=(0,a.A)(_().mark((function e(r,n){var a,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props.ttmplNodeConfig,i=t.state.data,!n.expanded){e.next=5;break}return e.next=5,T.A.pushSameCodeNodeData([n.node],a);case 5:t.setState({data:(0,o.A)(i),expandedKeys:r});case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"serial_number",(new Date).getTime()),(0,f.A)(t,"onClickNode",(function(e){var r,n,o=t.props,a=o.doEditRoot,i=o.doViewRoot,c=o.doViewSub,u=o.doEditSub,l=o.ttmplNodeConfig,s=o.onClickNode,f=(new Date).getTime();f-t.serial_number>1500&&(t.serial_number=f,t.setState({currentNodeData:e,nodeClickLoading:!0}),setTimeout((function(){t.setState({nodeClickLoading:!1})}),1500),s?s(e):e.parent?e.isLeaf?l.leafLTmplConfig.buttons.indexOf("dtmplEdit")>0&&u?u(l.leafTitle,l.leafRatmplId,e.parent.code,e.code):l.leafLTmplConfig.buttons.indexOf("detail")>0&&c&&c(l.leafTitle,l.leafRatmplId,e.parent.code,e.code):l.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0&&u?u(l.branchTitle,l.branchRatmplId,e.parent.code,e.code):l.branchLTmplConfig.buttons.indexOf("detail")>0&&c&&c(l.branchTitle,l.branchRatmplId,e.parent.code,e.code):(null===(r=l.rootLTmplConfig)||void 0===r?void 0:r.buttons.indexOf("dtmplEdit"))>0&&u?a(l.branchTitle,e.code):(null===(n=l.rootLTmplConfig)||void 0===n?void 0:n.buttons.indexOf("detail"))>0&&i&&i(l.branchTitle,e.code))})),(0,f.A)(t,"stopPropagation",(function(t){t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0})),(0,f.A)(t,"getDeleteButton",(function(e,r){var n=t.props,o=n.doDelete,i=n.ttmplNodeConfig,c=t.context.translate;return(0,D.Y)("div",{onClick:function(e){t.stopPropagation(e)}},(0,D.Y)(p.A,{placement:"topLeft",title:c("${确定要删除吗}?"),onConfirm:(0,a.A)(_().mark((function n(){var a,c,u,l,s,f,h,p;return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.state,c=a.data,u=a.expandedKeys,n.next=3,o(e,r.code);case 3:if(!r.parent){n.next=10;break}return n.next=6,T.A.reloadData(r.parent.code,i,c,u);case 6:l=n.sent,t.setState(F({},l)),n.next=15;break;case 10:return s=t.state,f=s.data,h=s.expandedKeys,n.next=13,T.A.reloadData(null,i,f,h);case 13:p=n.sent,t.setState(F({},p));case 15:case"end":return n.stop()}}),n)}))),okText:c("${确定}"),cancelText:c("${取消}")},(0,D.Y)(d.A,null,(0,D.Y)(v.Ay,{size:"small",danger:!0},(0,D.Y)(C.A,null)))))})),(0,f.A)(t,"getAddButton",(function(e,r,n,o){var a=t.context.translate,i=t.props.doAddSub;return(0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),i(e,n,o,null)},size:"small"},r,a("${"+e+"}"))})),(0,f.A)(t,"onCheck",(function(e,r){if(console.log(e),console.log(r),t.props.onChangeCheck){var n=[];r.checkedNodes&&r.checkedNodes.forEach((function(t){n.push(t.code+"@R@"+t.title)})),t.props.onChangeCheck(n)}t.setState({checkedKeys:e})})),(0,f.A)(t,"packageTitle",(function(e){var r,n,o,a,i,c,u,l,s=t.props,f=s.doEditRoot,p=s.doViewRoot,d=s.doViewSub,w=s.doEditSub,b=s.doDelete,A=s.doAddSub,x=s.ttmplNodeConfig,k=(s.currentId,t.context.translate),C=t.state,j=C.currentNodeData,I=C.nodeClickLoading,P=[];if(e.parent){if(e.isLeaf)(null===(r=x.leafLTmplConfig)||void 0===r?void 0:r.buttons.indexOf("dtmplEdit"))>0&&w&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),w(x.leafTitle,x.leafRatmplId,e.parent.code,e.code)},size:"small"},(0,D.Y)(L.A,null),k("${编辑}"))),(null===(n=x.leafLTmplConfig)||void 0===n?void 0:n.buttons.indexOf("detail"))>0&&d&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),d(x.leafTitle,x.leafRatmplId,e.parent.code,e.code)},size:"small"},(0,D.Y)(E.A,null),k("${查看}"))),(null===(o=x.leafLTmplConfig)||void 0===o?void 0:o.buttons.indexOf("singleDelete"))>0&&b&&P.push(t.getDeleteButton(x.leafRatmplId,e));else if(x.branchLTmplConfig){var T,N,_,R;x.branchLTmplConfig.buttons.indexOf("dtmplEdit")>0&&w&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),w(x.branchTitle,x.branchRatmplId,e.parent.code,e.code)},size:"small"},(0,D.Y)(L.A,null),k("${编辑}"))),(null===(T=x.branchLTmplConfig)||void 0===T?void 0:T.buttons.indexOf("detail"))>0&&d&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),d(x.branchTitle,x.branchRatmplId,e.parent.code,e.code)},size:"small"},(0,D.Y)(E.A,null),k("${查看}"))),(null===(N=x.branchLTmplConfig)||void 0===N?void 0:N.buttons.indexOf("dtmplAdd"))>0&&A&&P.push(t.getAddButton(x.branchTitle,(0,D.Y)(O.A,null),x.branchRatmplId,e.code)),(null===(_=x.leafLTmplConfig)||void 0===_?void 0:_.buttons.indexOf("dtmplAdd"))>0&&A&&P.push(t.getAddButton(x.leafTitle,(0,D.Y)(S.A,null),x.leafRatmplId,e.code)),(null===(R=x.branchLTmplConfig)||void 0===R?void 0:R.buttons.indexOf("singleDelete"))>0&&b&&P.push(t.getDeleteButton(x.branchRatmplId,e))}}else(null===(a=x.rootLTmplConfig)||void 0===a?void 0:a.buttons.indexOf("dtmplEdit"))>0&&f&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),f(x.branchTitle,e.code)},size:"small"},(0,D.Y)(L.A,{style:{color:"blue"}}),k("${编辑}"))),(null===(i=x.rootLTmplConfig)||void 0===i?void 0:i.buttons.indexOf("detail"))>0&&p&&P.push((0,D.Y)(v.Ay,{onClick:function(r){t.stopPropagation(r),p(x.branchTitle,e.code)},size:"small"},(0,D.Y)(E.A,null),k("${查看}"))),x.branchLTmplConfig&&(null===(l=x.rootLTmplConfig)||void 0===l?void 0:l.buttons.indexOf("dtmplAdd"))>0&&A&&P.push(t.getAddButton(x.branchTitle,(0,D.Y)(O.A,null),x.branchRatmplId,e.code)),(null===(c=x.leafLTmplConfig)||void 0===c?void 0:c.buttons.indexOf("dtmplAdd"))>0&&A&&P.push(t.getAddButton(x.leafTitle,(0,D.Y)(S.A,null),x.leafRatmplId,e.code)),(null===(u=x.rootLTmplConfig)||void 0===u?void 0:u.buttons.indexOf("singleDelete"))>0&&b&&P.push(t.getDeleteButton(x.branchRatmplId?x.branchRatmplId:x.rootGtmplId,e));var F=(0,D.Y)(y.A,{icon:I&&e.key==(null==j?void 0:j.key)?(0,D.Y)(Y.A,{spin:!0}):null,style:{fontSize:"14px"},bordered:!1,color:e.key==(null==j?void 0:j.key)?"processing":void 0},e.title);return 0==P.length?F:(0,D.Y)(g.A,{zIndex:100,content:(0,D.Y)(h.Fragment,null,(0,D.Y)(m.A,null,P)),arrow:!1},F)})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(R=(0,a.A)(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refresh();case 2:case"end":return t.stop()}}),t,this)}))),function(){return R.apply(this,arguments)})},{key:"componentDidUpdate",value:(N=(0,a.A)(_().mark((function t(e){var r,n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.ttmplNodeConfig,(n=this.props.ttmplNodeConfig)&&(!r||n.id!=r.id)){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this.refresh();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return N.apply(this,arguments)})},{key:"refresh",value:(n=(0,a.A)(_().mark((function t(){var e,r,n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props.ttmplNodeConfig){t.next=3;break}return t.abrupt("return");case 3:return this.setState({loading:!0}),t.next=6,T.A.loadRootNodeData(r);case 6:n=t.sent,this.setState({searchValue:null,data:n,rootAddable:(null===(e=r.rootLTmplConfig)||void 0===e||null===(e=e.buttons)||void 0===e?void 0:e.indexOf("dtmplAdd"))>0,loading:!1});case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:(r=(0,a.A)(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.doEditRoot,n=e.ttmplNodeConfig,o=e.showFilterInput,a=this.state,i=a.data,c=a.loading,u=a.expandedKeys,l=a.rootAddable,s=a.searchValue,f=i,p=this.context.translate;return s&&(f=T.A.filterTree(i,s)),(0,D.Y)(h.Fragment,null,(0,D.Y)(w.A,null,(0,D.Y)(b.A,{span:24},(0,D.Y)(A.A,{style:{marginBottom:0,width:"100%"},variant:"borderless",styles:{body:{padding:"0px 2px 0px 8px"}}},(0,D.Y)(w.A,{align:"middle"},(0,D.Y)(b.A,{span:8},l&&r?(0,D.Y)(v.Ay,{type:"link",onClick:function(){return r(n.branchTitle)}},p("${添加}")):null),o?(0,D.Y)(b.A,{span:16},(0,D.Y)(x.A.Search,{value:s,allowClear:!0,placeholder:p("${输入查找内容}"),onChange:function(e){t.setState({searchValue:e.target.value})},onSearch:function(e){t.refresh()},enterButton:(0,D.Y)(j.A,null)})):null)))),(0,D.Y)(w.A,null,(0,D.Y)(b.A,{span:24},(0,D.Y)(A.A,{styles:{body:{padding:"4px 0px 4px 0px",height:"80vh",minWidth:"194px"}},loading:c},0==f.length?p("${没有找到数据}"):(0,D.Y)(I.Ay,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},(0,D.Y)(k.A,{onSelect:function(t,e){console.log("selected",t,e)},checkStrictly:!0,blockNode:!0,showLine:n.showLine,expandedKeys:u,onExpand:this.onExpand,titleRender:function(e){return(0,D.Y)("div",{onClick:function(){return t.onClickNode(e)}},t.packageTitle(e))},treeData:f}))))))}}]);var r,n,N,R}(h.PureComponent);(0,f.A)(M,"defaultProps",{draggable:!1,readOnly:!1,checkable:!0,showFilterInput:!0}),(0,f.A)(M,"contextType",N.U),e.A=M},13050:function(t,e,r){"use strict";r.d(e,{A:function(){return A}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(54839),p=r(677),d=r(68e3),v=r(14103),y=r(84957),g=r(1026),m=r(17437),w=["extra","title","className","initCollapse","showRightNav"];function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var A=function(t){function e(){var t,r,n,o;(0,a.A)(this,e);for(var i=arguments.length,l=new Array(i),p=0;p<i;p++)l[p]=arguments[p];return r=this,n=e,o=[].concat(l),n=(0,u.A)(n),t=(0,c.A)(r,b()?Reflect.construct(n,o||[],(0,u.A)(r).constructor):n.apply(r,o)),(0,s.A)(t,"state",{collapse:!1}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"cardTitle",(function(){var e=t.props,r=e.title,n=e.tip,o=t.state.collapse,a=t.context.translate;if(!r||"null"==r)return null;var i;return i=o?(0,m.Y)(h.Ay,{type:"text",onClick:function(){t.setState({collapse:!1})}},(0,m.Y)(d.A,null),a("${"+r+"}")):(0,m.Y)(h.Ay,{type:"text",onClick:function(){t.setState({collapse:!0})}},(0,m.Y)(v.A,null),"string"==typeof r?a("${"+r+"}"):r),(0,m.Y)(f.Fragment,null,i,(0,m.Y)(y.A,{content:n}))})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:function(){var t=this.props.initCollapse;this.setState({collapse:t})}},{key:"componentDidUpdate",value:function(t){var e=this.props.initCollapse;this.props!=t&&this.setState({collapse:e})}},{key:"render",value:function(){var t=this.state.collapse,e=this.props,r=e.extra,a=(e.title,e.className),i=(e.initCollapse,e.showRightNav),c=(0,o.A)(e,w);return(0,m.Y)(p.A,(0,n.A)({},c,{size:"small",extra:t?"":r,style:{width:i?"90%":"100%"},className:"".concat(a," ").concat(t?"collapse":""),title:this.cardTitle()}),t?null:this.props.children)}}])}(f.PureComponent);(0,s.A)(A,"contextType",g.U)},18015:function(t,e,r){"use strict";r.d(e,{A:function(){return w}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(21102),d=r(92749),v=r(1026),y=r(17437);function g(){g=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var w=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,h=new Array(s),p=0;p<s;p++)h[p]=arguments[p];return r=this,n=e,c=[].concat(h),n=(0,l.A)(n),t=(0,u.A)(r,m()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{treeData:[]}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"loadSchoolLevelUnit",(0,a.A)(g().mark((function t(){var e,r;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],t.next=3,d.A.requestLtmplQueryTop(null,"221036732522497",{});case 3:return null!=(r=t.sent)&&r.entities&&r.entities.forEach((function(t,r){var n={};n.id=t.code,n.level=1,n.pId=0,n.title=t.fieldMap[0xcfc1f06ca002],n.value=n.id+"@R@"+n.title,n.key=n.value,n.selectable=!1,e.push(n)})),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))),(0,f.A)(t,"loadLab",function(){var t=(0,a.A)(g().mark((function t(e){var r,n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.next=3,d.A.requestLtmplQueryTop(null,"228261345665025",{mainCode:e});case 3:return(n=t.sent).entities&&n.entities.forEach((function(t,n){var o={};o.id=t.code,o.level=2,o.pId=e,o.title=t.fieldMap[0xcec62beca003],o.value=o.id+"@R@"+o.title,o.key=o.value,o.selectable=!1,r.push(o)})),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,f.A)(t,"loadRoom",function(){var t=(0,a.A)(g().mark((function t(e){var r,n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.next=3,d.A.requestLtmplQueryTop(null,"228261733638145",{mainCode:e});case 3:return(n=t.sent).entities&&n.entities.forEach((function(t,n){var o={};o.id=t.code,o.level=3,o.pId=e,o.title=t.fieldMap[0xd239b3eca005],o.value=o.id+"@R@"+o.title,o.key=o.value,o.isLeaf=!0,r.push(o)})),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,f.A)(t,"onChange",(function(e){(0,t.props.onChange)(e)})),(0,f.A)(t,"onLoadData",function(){var e=(0,a.A)(g().mark((function e(r){var n,a,i;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.treeData,1!=r.level){e.next=8;break}return e.next=4,t.loadLab(r.id);case 4:a=e.sent,t.setState({treeData:[].concat((0,o.A)(n),(0,o.A)(a))}),e.next=13;break;case 8:if(2!=r.level){e.next=13;break}return e.next=11,t.loadRoom(r.id);case 11:i=e.sent,t.setState({treeData:[].concat((0,o.A)(n),(0,o.A)(i))});case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(r=(0,a.A)(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this,t.next=3,this.loadSchoolLevelUnit();case 3:t.t1=t.sent,t.t2={treeData:t.t1},t.t0.setState.call(t.t0,t.t2);case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this.props,r=(e.id,e.value),n=(e.fieldConfig,e.style,this.state.treeData),o=this.context.translate;return r&&(t=r.split("@R@")[1]),(0,y.Y)(p.A,{treeDataSimpleMode:!0,style:{width:"100%",minWidth:"260px"},value:t,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:o("--${请选择}--"),onChange:this.onChange,loadData:this.onLoadData,treeData:n})}}]);var r}(h.PureComponent);(0,f.A)(w,"defaultProps",{maxSelected:100}),(0,f.A)(w,"contextType",v.U)},19612:function(t,e,r){"use strict";r.d(e,{A:function(){return s}});var n=r(44274),o=r(2532),a=r(15734),i=r.n(a),c=r(69036),u=r(8130),l=r(48287),s=function(){return(0,o.A)((function t(){(0,n.A)(this,t)}),null,[{key:"super",value:function(t,e,r){var n,o,a=t.serverKey;o=null!==(n=t.header)&&void 0!==n&&n.programCode?t.header.programCode:u.A.programCode(a);var s;s=t.header&&t.header.hydrocarbonToken?t.header.hydrocarbonToken:a?u.A.serverHydrocarbonToken(a):u.A.hydrocarbonToken(o)?u.A.hydrocarbonToken(o):u.A.getAnoHydrocarbonToken(),t.data&&!1!==t.data.isShowLoading&&(document.getElementById("ajaxLoading").style.display=r||"block");var f="form";"formdata"===e?f=null:"json"===e&&(f="application/json");var h=t.method?t.method:"POST";return new Promise((function(e,r){var n=t.hydrocarbonServer?t.hydrocarbonServer:u.A.api(a);i()(h,u.A.joinPath(n,t.url)).type(f).set("hydrocarbon-token",s).set("hydrocarbon-program-token",o).query(t.query||"").send(t.data).end((function(n,o){if(o)if(t.data&&!1!==t.data.isShowLoading&&(document.getElementById("ajaxLoading").style.display="none"),200===o.status){var a=o.body;a&&"error"===a.status&&c.Ay.error((0,l.A)("${错误消息}: ")+(0,l.A)("${"+a.message+"}"),5),e(a)}else 201===o.status?e(o):403===o.status?u.A.toLogin():405===o.status||406===o.status?(c.Ay.error((0,l.A)("${权限不足}"),5),e(o)):404===o.status||504===o.status?(console.log((0,l.A)("${没找到服务}(")+t.url+")",5),e(o)):500===o.status?(o.body&&o.body.message?c.Ay.error((0,l.A)("${后台处理错误}(")+(0,l.A)("${"+o.body.message+"}")+")",5):o.text&&c.Ay.error(o.text),console.log(o.text),e(void 0)):(c.Ay.error((0,l.A)("${请求服务失败}(")+t.url+")",5),r(o.body));else c.Ay.error((0,l.A)("${服务器连接失败}")),e(null)}))}))}},{key:"getProramConfig",value:function(){return new Promise((function(t,e){i().get("programConfig.json").end((function(r,n){n?200===n.status?t(n.body):e(n.body):e()}))})).catch((function(t){console.log(t)}))}},{key:"getHeaderObj",value:function(){return{"hydrocarbon-token":u.A.hydrocarbonToken()?u.A.hydrocarbonToken():u.A.getAnoHydrocarbonToken(),"hydrocarbon-program-token":u.A.programCode()}}}])}()},20130:function(t,e,r){"use strict";r(96540);var n=r(94300),o=r(55957),a=r(42652),i=r(677),c=r(74712),u=r(17437);function l(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}e.A=function(t){var e=(0,n.Y)().translate,r=function(e){var r,n=t.columns,o=null;return null==n||n.forEach((function(t){1==t["操作"]&&(o=t)})),null===(r=o)||void 0===r?void 0:r.render(e,e)};return(0,u.Y)(a.A,{split:!1,style:{marginTop:"6px"},dataSource:function(){var e=t.hiddenRowCodes,r=t.dataSource,n=[];if(r){var o,a=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;null!=e&&e.includes(i.code)||n.push(i)}}catch(t){a.e(t)}finally{a.f()}}return n}(),renderItem:function(n){return(0,u.Y)(a.A.Item,{style:{padding:"6px"},key:n.id},(0,u.Y)(i.A,{size:"small",styles:{body:{padding:"4px"}},style:{margin:"1px"},extra:r(n)},(0,u.Y)(o.A,{column:4},(l=n,s=t.columnConfigs,f=t.serverKey,h=[],s.length>0&&s.forEach((function(t,r){if("10000"!=t.id&&"20000"!=t.id&&"操作"!=t.title){var n=t.title,a=l?l[t.id]:void 0;"序号"==n&&(a=l.index),a=a||(t.defaultValue?t.defaultValue:void 0);var i=(0,u.Y)(o.A.Item,{label:e("${"+t.title+"}"),key:r,className:"labelcss"},(0,u.Y)(c.A,{serverKey:f,holderType:"table",value:a,fieldConfig:t}));h.push(i)}})),h))));var l,s,f,h}})}},21426:function(t,e){"use strict";e.A={sort:function(t,e,r){t.dataIndex,t.sorter=!0,r&&(t.defaultSortOrder=r),t.showSorterTooltip=!1}}},22503:function(t,e,r){"use strict";r.d(e,{A:function(){return q}});var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(28073),h=r(54839),p=r(37977),d=r(16044),v=r(42455),y=r(17636),g=r(677),m=r(28392),w=r(47852),b=r(89467),A=r(43455),x=r(17437);function k(){k=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};l(A,i,(function(){return this}));var x=Object.getPrototypeOf,C=x&&x(x(T([])));C&&C!==r&&n.call(C,i)&&(A=C);var L=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==(0,v.A)(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,v.A)(e)+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(C=function(){return!!t})()}var L=function(t){function e(){var t,r,n,a;(0,o.A)(this,e);for(var u=arguments.length,s=new Array(u),f=0;f<u;f++)s[f]=arguments[f];return r=this,n=e,a=[].concat(s),n=(0,c.A)(n),t=(0,i.A)(r,C()?Reflect.construct(n,a||[],(0,c.A)(r).constructor):n.apply(r,a)),(0,l.A)(t,"state",{}),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:(r=(0,y.A)(k().mark((function t(){return k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.formRef,r=t.fields,n=t.value,o=t.onFinish,a=t.onValuesChange,i=t.serverKey;return(0,x.Y)(s.Fragment,null,(0,x.Y)(b.A,{onValuesChange:a,labelWrap:!0,ref:e,name:"control-hooks",onFinish:o},(0,x.Y)(A.A,{serverKey:i,formRef:e,nameAttr:"id",fields:r,valueMap:n})))}}]);var r}(s.PureComponent),E=r(1026);function O(){O=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};l(A,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&n.call(k,i)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==(0,v.A)(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function S(e,r,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError((0,v.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),l(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),l(C,u,"Generator"),l(C,i,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var Y=function(t){function e(){var t,r,n,a;(0,o.A)(this,e);for(var u=arguments.length,s=new Array(u),f=0;f<u;f++)s[f]=arguments[f];return r=this,n=e,a=[].concat(s),n=(0,c.A)(n),t=(0,i.A)(r,S()?Reflect.construct(n,a||[],(0,c.A)(r).constructor):n.apply(r,a)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"reset",(function(){t.props.formRef.current&&t.props.formRef.current.resetFields()})),(0,l.A)(t,"onOk",(function(){t.props.formRef.current.submit()})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:(f=(0,y.A)(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,y.A)(O().mark((function t(){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.reset();case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.title,r=(t.height,t.onOk),o=t.fields,a=t.value,i=t.onCancel,c=t.okButtonType,u=t.needConfirm,l=t.okDanger,f=t.onValuesChange,p=t.serverKey,v=t.formRef;(0,n.A)(this.state);var y=this.context.translate;return(0,x.Y)(g.A,{size:"small",style:{width:1e3},title:e,bodyStyle:{overflow:"auto"},extra:(0,x.Y)(s.Fragment,null,(0,x.Y)(m.A,{size:[8,0]},function(t){return u?l?(0,x.Y)(d.A,{placement:"rightBottom",title:y("${确定要执行提交吗}?"),onConfirm:t,okText:y("${确定}"),cancelText:y("${取消}"),okType:"danger"},(0,x.Y)(h.Ay,{type:c,danger:!0},y("${确定}"))):(0,x.Y)(d.A,{placement:"rightBottom",title:y("${确定要执行提交吗}?"),onConfirm:t,okText:y("${确定}"),cancelText:y("${取消}")},(0,x.Y)(h.Ay,{type:c},y("${确定}"))):(0,x.Y)(h.Ay,{type:c,onClick:t},y("${确定}"))}(this.onOk),(0,x.Y)(h.Ay,{onClick:this.reset},y("${重置}")),i?(0,x.Y)(h.Ay,{onClick:i},(0,x.Y)(w.A,null)):""))},(0,x.Y)(L,{serverKey:p,onValuesChange:f,fields:o,formRef:v,value:a,onFinish:r}))}}]);var r,f}(s.PureComponent);(0,l.A)(Y,"defaultProps",{forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},needConfirm:!1,okButtonType:"primary",okDanger:!1}),(0,l.A)(Y,"contextType",E.U);var j=r(27251),I=r(20922),P=r(26067),T=r(99552),N=r(5813),D=r(70462);function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}var R={FileDoneOutlined:I.A,CheckOutlined:P.A,CloseCircleOutlined:T.A,FileAddOutlined:N.A,ThunderboltOutlined:D.A},F=function(t){function e(){return(0,o.A)(this,e),t=this,r=e,n=arguments,r=(0,c.A)(r),(0,i.A)(t,_()?Reflect.construct(r,n||[],(0,c.A)(t).constructor):r.apply(t,n));var t,r,n}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){var t=this.props.type;return R[t]?s.createElement(R[t]):(0,x.Y)(D.A,null)}}])}(s.PureComponent),G=r(8130);function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function K(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){(0,l.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return $(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)?$(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function $(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 V(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(V=function(){return!!t})()}var q=function(t){function e(){var t,r,n,a;(0,o.A)(this,e);for(var u=arguments.length,v=new Array(u),y=0;y<u;y++)v[y]=arguments[y];return r=this,n=e,a=[].concat(v),n=(0,c.A)(n),t=(0,i.A)(r,V()?Reflect.construct(n,a||[],(0,c.A)(r).constructor):n.apply(r,a)),(0,l.A)(t,"context",void 0),(0,l.A)(t,"state",{popoverOpen:!1,appDtmplConfig:null,formRef:s.createRef()}),(0,l.A)(t,"isShow",(function(){var e=t.props,r=e.actionConfig,n=e.data;return j.A.isShow(null==r?void 0:r.preposes,n,t.getFormRef())})),(0,l.A)(t,"getFormRef",(function(){return t.state.formRef})),(0,l.A)(t,"getValue",(function(){var e,r=t.props,n=r.data,o=r.actionConfig,a=r.formRef,i={},c=n?n[0]:void 0,u=a?a.current:t.getFormRef().current,l=B(o.writes);try{for(l.s();!(e=l.n()).done;){var s=e.value;s&&(u&&u.getFieldValue(s.id)?i[s.id]=j.A.getFormRefValue(u,s.id):c&&(c.fieldMap?i[s.id]=c?c.fieldMap[s.id]:void 0:i[s.id]=c?c[s.id]:void 0))}}catch(t){l.e(t)}finally{l.f()}return console.log("actionValue:",i),i})),(0,l.A)(t,"onOk",(function(e){console.log("action form value:",e);var r=t.props,n=r.actionConfig,o=r.doAction;t.setState({popoverOpen:!1}),o(n.id,t.getCodes(),e)})),(0,l.A)(t,"onCancel",(function(){t.setState({popoverOpen:!1})})),(0,l.A)(t,"onValuesChange",(function(e,r){var n=t.props,o=n.data,a=n.formRef,i=t.state.appDtmplConfig;a&&a.current&&a.current.setFieldsValue(e),null!=i&&i.onValuesChange&&i.onValuesChange(e,{code:o?o[0].code:null,fieldMap:r},t.getFormRef().current)})),(0,l.A)(t,"getButtonType",(function(){var e=t.props,r=e.buttonType,n=e.actionConfig,o=r?"dashed"==r.split("-")[0]?"dashed":"primary":"dashed";return r?o:n.buttonType?n.buttonType:"dashed"})),(0,l.A)(t,"blockButton",(function(){var e=t.props.buttonType;return e&&e.includes("block")})),(0,l.A)(t,"formButton",(function(){var e=t.state.popoverOpen,r=t.props,n=r.actionConfig,o=r.disabled,a=r.hiddenType,i=r.buttonSize,c=r.serverKey,u=r.loading,l=o;if(!t.isShow()){if(!a||"hidden"==a)return null;l=!0}return(0,x.Y)(f.A,{placement:"top",open:e,trigger:"click",content:(0,x.Y)(Y,{formRef:t.getFormRef(),serverKey:c,okDanger:"danger"==n.beforeExeConfirm,needConfirm:!0,title:n.title,onCancel:function(){return t.onCancel()},fields:n.writes,value:t.getValue(),onOk:t.onOk,onValuesChange:t.onValuesChange})},(0,x.Y)(h.Ay,{danger:n.danger,type:t.getButtonType(),shape:n.buttonShape,block:t.blockButton(),size:i,onClick:function(){return t.setState({popoverOpen:!e})},disabled:l,loading:u},t.getTitle()))})),(0,l.A)(t,"getTitle",(function(){var e=t.props,r=e.actionConfig,n=e.iconType,o=t.context.translate,a=null;return a=r.icon?"icon-title"==n?(0,x.Y)(s.Fragment,null,(0,x.Y)(F,{type:r.icon}),o("${"+r.title+"}")):"icon"==n?(0,x.Y)(p.A,{placement:"top",title:o("${"+r.title+"}")},(0,x.Y)(F,{type:r.icon}),""):o("${"+r.title+"}"):o("${"+r.title+"}"),r.tip&&"icon"!=n&&(a=(0,x.Y)(s.Fragment,null,(0,x.Y)(p.A,{title:r.tip},o("${"+r.title+"}")))),a})),(0,l.A)(t,"getCodes",(function(){var e=t.props.data,r=[];if(e&&e instanceof Array){var n,o=B(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;a&&r.push(a.code)}}catch(t){o.e(t)}finally{o.f()}}return r})),(0,l.A)(t,"withoutFormButton",(function(){var e=t.props,r=e.actionConfig,n=e.doAction,o=(e.data,e.loading),a=e.disabled,i=(e.buttonType,e.hiddenType),c=(e.buttonSize,t.context.translate),u=a;if(!t.isShow()){if(!i||"hidden"==i)return null;u=!0}var l=t.getCodes(),s=t.blockButton(),f=t.getButtonType();return r.beforeExeConfirm&&"default"!=r.beforeExeConfirm?"danger"==r.beforeExeConfirm?(0,x.Y)(d.A,{key:r.id,placement:"rightBottom",title:c("${确定要执行}【${"+r.title+"}】?"),onConfirm:function(){n(r.id,l,{})},disabled:u,okText:c("${确定}"),cancelText:c("${取消}"),okType:"danger"},(0,x.Y)(h.Ay,{type:f,block:s,danger:!0,loading:o,shape:r.buttonShape,size:"small",disabled:u},t.getTitle())):(0,x.Y)(h.Ay,{type:f,block:s,size:"small",loading:o,shape:r.buttonShape,danger:r.danger,onClick:function(){return n(r.id,l,{})},disabled:u},t.getTitle()):(0,x.Y)(d.A,{key:r.id,placement:"rightBottom",title:c("${确定要执行}【${"+r.title+"}】?"),onConfirm:function(){n(r.id,l,{})},disabled:u,okText:c("${确定}"),cancelText:c("${取消}")},(0,x.Y)(h.Ay,{size:"small",loading:o,danger:r.danger,type:f,shape:r.buttonShape,block:s,disabled:u},t.getTitle()))})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.data,r=t.actionConfig,n=e&&e[0]?e[0]:null,o=G.A.getAppDtmplConfig({id:r.id,groups:[{fields:r.writes}]},n&&e[0].fieldMap?K({},n):n?{fieldMap:K({},n)}:{},null);this.setState({appDtmplConfig:o})}},{key:"componentDidUpdate",value:function(t){(0,n.A)(this.props),this.props}},{key:"render",value:function(){(0,n.A)(this.state);var t=this.props.actionConfig;return(0,x.Y)(s.Fragment,null,t.writes&&t.writes.length>0?this.formButton():this.withoutFormButton())}}])}(s.PureComponent);(0,l.A)(q,"defaultProps",{hiddenType:"hidden",buttonSize:"small",iconType:"icon-title",loading:!1}),(0,l.A)(q,"contextType",E.U)},22733:function(t,e,r){"use strict";r.d(e,{A:function(){return m}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(37187),f=r(54839),h=r(89467),p=r(33448),d=r(35880),v=r(1026),y=r(17437);function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(g=function(){return!!t})()}var m=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var l=arguments.length,s=new Array(l),f=0;f<l;f++)s[f]=arguments[f];return r=this,o=e,c=[].concat(s),o=(0,i.A)(o),t=(0,a.A)(r,g()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"context",void 0),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.code,r=t.sourceId,n=t.serverKey,o=t.open,a=t.onCancel,i=t.height,c=this.context.translate;return(0,y.Y)(s.A,{open:o,title:c("${查看}"),width:"82vw",centered:!0,wrapClassName:"aaa",bodyStyle:{height:i,overflow:"auto"},onCancel:a,footer:[(0,y.Y)(f.Ay,{key:"back",onClick:a},c("${取消}"))]},(0,y.Y)(d.Ay,{autoHide:!0,autoHideTimeout:1e3},e?(0,y.Y)(p.A,{serverKey:n,showRightNav:!1,sourceId:r,code:e}):""))}}])}(l.PureComponent);(0,u.A)(m,"defaultProps",{showConfirm:!0,height:500,forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},cancelText:"取消",form:h.A.useForm}),(0,u.A)(m,"state",{viewOrEdit:"view"}),(0,u.A)(m,"contextType",v.U)},23170:function(t,e,r){"use strict";r.d(e,{A:function(){return m}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(29029),f=r(54839),h=r(40756),p=r(92749),d=r(80243),v=r(17437);function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}var g=(0,v.Y)(s.A,{tip:"Loading..."}),m=((0,d.Ay)({resolved:{},chunkName:function(){return"react-file-viewer"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return r.e(374).then(r.t.bind(r,29787,23))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 29787}},{fallback:g}),function(t){function e(){return(0,n.A)(this,e),t=this,r=e,o=arguments,r=(0,i.A)(r),(0,a.A)(t,y()?Reflect.construct(r,o||[],(0,i.A)(t).constructor):r.apply(t,o));var t,r,o}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.filePath,r=t.downloadable,n=(t.serverKey,t.title);return(0,v.Y)("span",{className:"labelcss"},(0,v.Y)(f.Ay,{onClick:function(){window.open(e.path,"_blank")},size:"small"},n||e.fileName),r?(0,v.Y)(f.Ay,{type:"text",onClick:function(){p.A.downloadDir(e.path,e.fileName)},size:"small"},(0,v.Y)(h.A,null)):null)}}])}(l.PureComponent));(0,u.A)(m,"defaultProps",{downloadable:!1})},23605:function(t,e,r){"use strict";var n=r(50828),o=(r(96540),r(1004)),a=r(15622),i=(r(16033),r(74353)),c=r.n(i),u=r(46986),l=r.n(u),s=r(21840),f=r.n(s),h=r(8130),p=r(83826),d=r.n(p),v=r(88569),y=r.n(v),g=r(17437);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){(0,n.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}c().locale("zh-cn"),c().extend(d()),c().extend(l()),c().extend(y()),c().extend(f());var b=o.A.RangePicker;e.A=function(t){var e,r=t.id,n=t.value,i=t.itemType,u=t.fieldConfig,l=t.onChange,s=t.style,f=t.min,p=t.max,d=n,v=h.A.getDayjsFormat(i),y=function(t,e){l&&l(t?t.format(v):void 0)},m=function(t,e){l&&(t?2===t.length&&t[0]&&t[1]&&l(t[0].format(v)+"~"+t[1].format(v)):l(t))},A=function(t){return t&&(p&&c()(t.format(v),v)>c()(p,v)||f&&c()(t.format(v),v)<c()(f,v))},x=void 0,k="date";switch(i){case"date-YY":case"date-M1":case"date":e=d?c()(d):void 0,k="date-YY"==i?"year":"date-M1"==i?"month":"date",x=(0,g.Y)(o.A,{id:r,style:w({},s),picker:k,format:v,disabledDate:A,value:e,disabled:u.disabled,onChange:y});break;case"datetime-HH":case"datetime-mm":case"datetime":e=d?c()(d):void 0,x=(0,g.Y)(o.A,{id:r,style:w({},s),disabledDate:A,showTime:{format:h.A.getDateTimeFormat(i)},picker:"date",format:v,value:e,disabled:u.disabled,onChange:y});break;case"daterange-YY":case"daterange-M1":case"daterange":var C=d&&d.indexOf("~")>0?d.split("~")[0]:void 0,L=d&&d.indexOf("~")>0?d.split("~")[1]:void 0;e=[C?c()(C):void 0,L?c()(L):void 0],k="daterange-YY"==i?"year":"daterange-M1"==i?"month":"date",x=(0,g.Y)(b,{id:r,picker:k,style:w({},s),format:v,disabledDate:A,value:e,disabled:u.disabled,onChange:m});break;case"datetimerange-HH":case"datetimerange-mm":case"datetimerange":var E=d&&d.indexOf("~")>0?d.split("~")[0]:void 0,O=d&&d.indexOf("~")>0?d.split("~")[1]:void 0;e=[E?c()(E):void 0,O?c()(O):void 0],x=(0,g.Y)(b,{id:r,showTime:{format:h.A.getDateTimeFormat(i)},format:v,style:w({},s),value:e,disabledDate:A,disabled:u.disabled,onChange:m});break;case"time-HH":e=d?c()(d,"HH"):void 0,x=(0,g.Y)(a.A,{id:r,value:e,style:w({},s),disabled:u.disabled,onChange:y,format:v});break;case"time-mm":e=d?c()(d,"HH:mm"):void 0,x=(0,g.Y)(a.A,{id:r,value:e,style:w({},s),disabled:u.disabled,onChange:y,format:v});break;case"time":e=d?c()(d,"HH:mm:ss"):void 0,x=(0,g.Y)(a.A,{id:r,value:e,style:w({},s),disabled:u.disabled,onChange:y,format:v});break;case"timerange-HH":case"timerange-mm":case"timerange":case"timerange-HH-unorder":case"timerange-mm-unorder":case"timerange-unorder":var S=d&&d.indexOf("~")>0?d.split("~")[0]:void 0,Y=d&&d.indexOf("~")>0?d.split("~")[1]:void 0;e=[S?c()(S):void 0,Y?c()(Y):void 0],x=(0,g.Y)(a.A.RangePicker,{order:!i.includes("unorder"),id:r,value:e,style:w({},s),disabled:u.disabled,onChange:m,format:v})}return x}},24262:function(t,e,r){"use strict";r(96540);var n=r(17355),o=r(8130),a=r(94300),i=r(17437);e.A=function(t){var e,r=t.id,c=t.value,u=(t.itemType,t.fieldConfig),l=t.onChange,s=(t.style,(0,a.Y)().translate),f=o.A.splitValue(c),h=f.valueBegin,p=f.valueEnd,d=u.disabled;return e=(0,i.Y)(n.A.Group,{compact:!0},(0,i.Y)(n.A,{id:r,style:{width:"45%"},disabled:d,min:u.min,max:u.max,placeholder:s("${开始}"),value:h,onChange:function(t){var e=t.target.value;l&&l(o.A.concatValue(e,p))}}),"~",(0,i.Y)(n.A,{style:{width:"45%"},disabled:d,min:u.min,max:u.max,placeholder:s("${结束}"),value:p,onChange:function(t){var e=t.target.value;l&&l(o.A.concatValue(h,e))}})),e}},27251:function(t,e,r){"use strict";r.d(e,{A:function(){return s}});var n=r(44274),o=r(2532),a=r(69036),i=r(78229),c=r(8130);function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function l(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}var s=function(){return(0,o.A)((function t(){(0,n.A)(this,t)}),null,[{key:"isShow",value:function(t,e,r){return!t||t.length<=0||this.isMatch(t,e,null==r?void 0:r.current,null)}},{key:"isMatch",value:function(t,e,r,n){var o=!0;if(r){var a,c=[],l=u(t);try{for(l.s();!(a=l.n()).done;){var s=a.value;if(s){var f=n?i.A.getFieldId(n,s.mstrucId):s.id;if(this.containsField(r,f)){var h=this.getFormRefValue(r,f);if(!this.comparator(s.comparator,h,s.defaultValue)){o=!1;break}}else c.push(s)}}}catch(t){l.e(t)}finally{l.f()}o&&c.length>0&&(o=this.matchDtmplData(c,e,n))}else o=!!e&&this.matchDtmplData(t,e,n);return o}},{key:"matchDtmplData",value:function(t,e,r){var n=!0;if(!e)return!1;var o,a=u(e);try{for(a.s();!(o=a.n()).done;){var c=o.value;if(!c){n=!1;break}var l,s=void 0,f=void 0,h=u(t);try{for(h.s();!(l=h.n()).done;){var p=l.value;if(f=this.transValue(p.defaultValue,p.controlType),c.fieldMap){var d=r?i.A.getFieldId(r,p.mstrucId):p.id;if(s=this.transValue(c.fieldMap[d],p.controlType),!this.comparator(p.comparator,s,f)){n=!1;break}}else if(s=this.transValue(c[p.id],p.controlType),!this.comparator(p.comparator,s,f)){n=!1;break}}}catch(t){h.e(t)}finally{h.f()}}}catch(t){a.e(t)}finally{a.f()}return n}},{key:"transValue",value:function(t,e){return c.A.configParamTrans(t,e)}},{key:"comparator",value:function(t,e,r){var n,o,i=e;if(e&&e.indexOf&&e.indexOf("@R@")>0&&(i=e.split("@R@")[1]),t||(t="equals"),"none1"==t)return!i||""==i;if("none1n"==t)return i&&""!=i;if(!r)return!0;if(!i&&"0"!=i)return!1;switch(t){case"contain":return i.includes(r);case"equal":case"equals":return this.isEqual(i,r);case"exclude":n=this.toArray(r),o=this.toArray(i);for(var c=0;c<n.length;c++)for(var u=0;u<o.length;u++)if(n[c]==o[u])return!1;return!0;case"includeOne":case"include_anyone":n=this.toArray(r),o=this.toArray(i);for(var l=0;l<n.length;l++)for(var s=0;s<o.length;s++)if(n[l]===o[s])return!0;return!1;case"include_all":n=this.toArray(r),o=this.toArray(i);for(var f=0,h=n.length,p=0;p<n.length;p++)for(var d=0;d<o.length;d++)if(n[p]==o[d]){f++;break}return h<=f;case"Greater":case"greater":return isNaN(Number(i))||isNaN(Number(r))?i>r:Number(i)>Number(r);case"Less":case"less":return isNaN(Number(i))||isNaN(Number(r))?i<r:Number(i)<Number(r);case"noGreater":case"nogreater":return isNaN(Number(i))||isNaN(Number(r))?i<=r:Number(i)<=Number(r);case"noLess":case"noless":return isNaN(Number(i))||isNaN(Number(r))?i>=r:Number(i)>=Number(r);case"unequal":case"unequals":return!this.isEqual(i,r);default:return void a.Ay.error("暂不支持的比较关系:"+t+";请联系管理员添加。",5)}}},{key:"isEqual",value:function(t,e){return"是"==e||"否"==e||"true"==e||"false"==e?"true"==t||"是"==t?"是"==e||"true"==e:!("false"!=t&&"否"!=t||"否"!=e&&"false"!=e):isNaN(Number(t))||isNaN(Number(e))?t==e:Number(t)==Number(e)}},{key:"toArray",value:function(t){return"string"==typeof t?t.split(","):Array.isArray(t)?t:[t]}},{key:"getFormRefValue",value:function(t,e){return!!t&&t.getFieldValue(e)}},{key:"containsField",value:function(t,e){return!!t&&!!t.getFieldInstance(e)}}])}()},29494:function(t,e,r){"use strict";r.d(e,{A:function(){return Y}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(33835),d=r(54839),v=r(1849),y=r(92749),g=r(8130),m=r(1026),w=r(677),b=r(76763),A=r(84697),x=r(17437),k=function(t){var e=t.serverKey,r=t.dtmplConfig,n=t.sourceId,o=t.data;return(0,x.Y)(h.Fragment,null,(0,x.Y)(w.A,{styles:{body:{padding:"0px"}},style:{width:o&&o.length>1?500*o.length:"100%"}},(0,x.Y)("div",{style:{whiteSpace:"nowrap",overflowX:"auto"}},(0,x.Y)(b.A,null,o?o.map((function(t){return(0,x.Y)(b.A.Panel,null,(0,x.Y)(w.A,{title:t.userName+":"+g.A.formateDate(t.time),style:{minWidth:"400px"}},(0,x.Y)(A.A,{maxColsOnRow:o&&o.length>1?1:2,serverKey:e,showRightNav:!1,dtmplConfig:r,sourceId:n,code:t.code,versionId:t.versionId})," "))})):null))))};function C(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(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)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(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 E(){E=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}var S=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return r=this,n=e,c=[].concat(h),n=(0,l.A)(n),t=(0,u.A)(r,O()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{list:void 0,loading:!1,currents:[]}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"loadData",(0,a.A)(E().mark((function e(){var r,n,o,a,i,c;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.serverKey,i=t.state.currents,!o){e.next=9;break}return t.setState({loading:!0}),e.next=6,y.A.requestVersionList(a,n,o);case 6:c=e.sent,0==i.length&&c.length>0&&t.onAdd(c[0]),t.setState({list:c,loading:!1});case 9:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"onAdd",(function(e){t.props.showSnapshot;var r=t.state.currents;t.isCurrent(e,r)||t.setState({currents:[].concat((0,o.A)(r),[e])})})),(0,f.A)(t,"onRemove",(function(e){t.props.showSnapshot;var r,n=[],o=C(t.state.currents);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.code!=e.code&&n.push(a)}}catch(t){o.e(t)}finally{o.f()}t.setState({currents:[].concat(n)})})),(0,f.A)(t,"isCurrent",(function(t,e){var r,n=C(e);try{for(n.s();!(r=n.n()).done;)if(r.value.code==t.code)return!0}catch(t){n.e(t)}finally{n.f()}return!1})),(0,f.A)(t,"detailHistory",(function(){var e=t.state,r=e.list,n=e.currents,o=t.context.translate;if(r.length>0)return r.map((function(e,r){var a=t.isCurrent(e,n),i=a?"red":"blue";return(0,x.Y)(p.A.Item,{color:i,key:r},g.A.formateDate(e.time),(0,x.Y)("br",null),""+e.userName,a?(0,x.Y)(d.Ay,{style:{marginLeft:10},size:"small",onClick:function(){return t.onRemove(e)}},o("${取消查看}")):(0,x.Y)(d.Ay,{style:{marginLeft:10},type:"primary",size:"small",onClick:function(){return t.onAdd(e)}},o("${查看}")))}))})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(E().mark((function t(e){var r,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props.open,n=this.state.list,r&&!n&&this.loadData();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.open,r=t.onClose,n=t.dtmplConfig,o=t.sourceId,a=t.code,i=t.serverKey,c=this.state,u=c.list,l=c.currents,s=this.context.translate,f=[];l.sort((function(t,e){return e.time-t.time}));var d,y=C(l);try{for(y.s();!(d=y.n()).done;){var g=d.value;f.push({code:a,versionId:g.code,time:g.time,userName:g.userName})}}catch(t){y.e(t)}finally{y.f()}return(0,x.Y)(h.Fragment,null,(0,x.Y)(v.A,{title:s("${快照列表}"),closable:!0,onClose:r,open:e,width:350},u&&u.length>0?(0,x.Y)(p.A,{mode:"alternate"},this.detailHistory()):s("${暂无历史记录}")),(0,x.Y)(v.A,{key:s("${快照查看}"),placement:"left",title:s("${快照查看}"),closable:!0,mask:!1,onClose:r,open:e,width:"calc(100% - 380px)",styles:{body:{padding:"6px 24px 6px 24px"}},style:{maxWidth:1960}},(0,x.Y)(k,{serverKey:i,dtmplConfig:n,sourceId:o,data:f})))}}]);var r,n}(h.PureComponent);(0,f.A)(S,"defaultProps",{}),(0,f.A)(S,"contextType",m.U);var Y=S},33172:function(t,e,r){"use strict";r.d(e,{A:function(){return C}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(77829),d=r(54839),v=r(77028),y=r(92749),g=r(19612),m=r(8130),w=r(1026),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=b.prototype=m.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(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 k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var C=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,f=new Array(l),p=0;p<l;p++)f[p]=arguments[p];return r=this,n=e,i=[].concat(f),n=(0,u.A)(n),t=(0,c.A)(r,k()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"state",{fileList:null}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"handleRemove",(function(e){var r=t.state.fileList,n=t.props.onChange;if(r&&r.length>1){var o,a=[],i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return x(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)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(r);try{for(i.s();!(o=i.n()).done;){var c=o.value;c.uid!=e.uid&&a.push(c)}}catch(t){i.e(t)}finally{i.f()}n(JSON.stringify(a))}else n(JSON.stringify({valid:"delete"}))})),(0,s.A)(t,"handleChange",function(){var e=(0,o.A)(A().mark((function e(r){var n,o,a;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("file change:",r),n=[],"uploading"==r.file.status?(r.fileList&&r.fileList.forEach((function(t){"done"==t.status&&n.push(t)})),o={valid:"new",uid:r.file.uid,status:r.file.status,fileKey:"",fileName:r.file.originFileObj.name},n.push(o),t.setState({fileList:n})):"done"==r.file.status&&(a={valid:"new",status:r.file.status,uid:r.file.uid,fileKey:r.file.response.fileKey,fileName:r.file.originFileObj.name},n.push(a),r.fileList&&r.fileList.forEach((function(t){t.originFileObj||n.push(t)})),(0,t.props.onChange)(JSON.stringify(n)));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"beforeUpload",(function(e){var r=t.context.translate;return!!(e.size/1024/1024<40)||(h.Ay.error(r("${超过40M限制 不允许上传~}"),5),!1)})),(0,s.A)(t,"transvalue",(function(t){var e=t,r=[];return"string"==typeof e&&((e=JSON.parse(t))instanceof Array?e.forEach((function(t){"new"==t.valid?r.push({valid:"new",url:t.url,fileKey:t.fileKey,status:"done",uid:t.uid,name:t.fileName?t.fileName:t.name}):t.uid?r.push({atRatCode:t.atRatCode,valid:t.valid,uid:t.uid,name:t.name,fileKey:t.base?t.base.bytesInfoVO.code:t.fileKey,status:"done",url:t.url}):r.push({atRatCode:t.atRatCode,valid:t.valid,uid:t.base?t.base.bytesInfoVO.code:t.fileKey,name:t.base.fileName,fileKey:t.base?t.base.bytesInfoVO.code:t.fileKey,status:"done",url:encodeURI(m.A.joinPath(m.A.joinPath(m.A.api(),"/v3/files"),t.base.path))+"?@token=".concat(m.A.hydrocarbonToken(),"&@programToken=").concat(m.A.programCode(),"&disposition=attachment")})})):!0===e.valid&&r.push({atRatCode:e.atRatCode,uid:e.base.bytesInfoVO.code,name:e.base.fileName,fileKey:e.base.bytesInfoVO.code,status:"done",url:encodeURI(m.A.joinPath(m.A.joinPath(m.A.api(),"/v3/files"),e.base.path))+"?@token=".concat(m.A.hydrocarbonToken(),"&@programToken=").concat(m.A.programCode(),"&disposition=attachment")})),r})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:function(){var t=this.props.value,e=this.transvalue(t);this.setState({fileList:e})}},{key:"componentDidUpdate",value:function(t,e,r){var n=t.value,o=this.props.value;if(o&&o!=n){var a=this.transvalue(o);this.setState({fileList:a})}}},{key:"render",value:function(){var t=this.props,e=t.id,r=t.itemType,n=t.disabled,o=(t.value,t.serverKey),a=this.context.translate,i=this.state.fileList,c=this.props.maxCount?this.props.maxCount:1;return(0,b.Y)("div",null,(0,b.Y)(p.A,{id:e,maxCount:c,accept:"picture"===r?".png, .jpg, .jpeg":"video"===r?".mp4":void 0,listType:"picture"==r?"picture":"text",fileList:i||void 0,disabled:n,name:"file",headers:g.A.getHeaderObj(),action:function(t){return y.A.postFileAction(o,t)},beforeUpload:this.beforeUpload,onChange:this.handleChange,onRemove:this.handleRemove},i&&i.length>=c?"":(0,b.Y)(d.Ay,{disabled:n},(0,b.Y)(v.A,null)," ",a(n?"${无需上传}":"${点击上传}"))))}}])}(f.PureComponent);(0,s.A)(C,"contextType",w.U)},33448:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(677),d=r(54839),v=r(37977),y=r(89467),g=r(40261),m=r(33748),w=r(80581),b=r(46704),A=r(29494),x=r(84697),k=r(8130),C=r(84957),L=r(1026),E=r(22503),O=r(92749),S=r(17437);function Y(){Y=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}var I=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,p=new Array(l),d=0;d<l;d++)p[d]=arguments[d];return r=this,n=e,i=[].concat(p),n=(0,u.A)(n),t=(0,c.A)(r,j()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"context",void 0),(0,s.A)(t,"state",{loading:!0,dtmplConfig:void 0,snapshotOpen:!1,premisesTitle:"默认字段",layout:{labelCol:{span:8},wrapperCol:{span:16}},refreshCode:void 0,actionDtmplData:void 0}),(0,s.A)(t,"loadActionDtmplData",function(){var e=(0,o.A)(Y().mark((function e(r){var n,o,a,i,c;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=void 0,o=t.props,a=o.sourceId,i=o.code,c=o.serverKey,!(null!=r&&r.viewActions&&(null==r?void 0:r.viewActions.length)>0)){e.next=6;break}return e.next=5,O.A.requestViewDtmplData(c,a,i,null);case 5:n=e.sent;case 6:t.setState({actionDtmplData:n});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"doRefresh",(0,o.A)(Y().mark((function e(){var r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.state.dtmplConfig,e.next=3,t.loadActionDtmplData(r);case 3:t.setState({refreshCode:k.A.getRandomNum(6)});case 4:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"goEdit",(function(){var e=t.props;(0,e.goDtmpl)(e.code)})),(0,s.A)(t,"showSnapshot",(function(){t.setState({snapshotOpen:!0})})),(0,s.A)(t,"onSnapshotClose",(function(){t.setState({snapshotOpen:!1})})),(0,s.A)(t,"toSnapshot",(function(){})),(0,s.A)(t,"onSubmit",function(){var e=(0,o.A)(Y().mark((function e(r){var n,o,a,i,c;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),n=t.props,o=n.sourceId,a=n.code,i=n.serverKey,a&&(r["唯一编码"]=a),e.next=5,O.A.postDtmplData(i,o,r,h.Ay);case 5:c=e.sent,t.setState({loading:!1}),"success"===c.status&&(t.props.goBackToLtmpl?t.props.goBackToLtmpl():t.doRefresh());case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(Y().mark((function t(){var e,r,n,o;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.sourceId,e.code,n=e.serverKey,t.next=3,b.A.requestViewDtmplConfig(n,r);case 3:return o=t.sent,t.next=6,this.loadActionDtmplData(o);case 6:this.setState({dtmplConfig:o});case 7:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e,r=this,n=this.props,o=n.showRightNav,a=n.rightBarPositionRight,i=n.code,c=n.sourceId,u=n.goDtmpl,l=n.serverKey,s=n.codeSource,f=n.title,h=n.showHeader,b=this.state,k=b.dtmplConfig,L=(b.premisesTitle,b.loading,b.layout,b.snapshotOpen),O=b.refreshCode,Y=b.actionDtmplData,j=this.context.translate,I=k?k.buttons:void 0,P=(k&&k.premises,o);return k&&k.groups.length<4&&(P=!1),(0,S.Y)("div",{className:"detailPage ".concat(P?"showRightNav":"noRightNav")},h?(0,S.Y)(p.A,{variant:"borderless",size:"small",key:"detailTitle",className:"hoverable pageHeader"},(0,S.Y)("h3",null,j("${"+(f||"详情")+"}"),k?(0,S.Y)(C.A,{content:k.tip}):null,(0,S.Y)("div",{className:"fr"},I&&I.includes("dtmplEdit")&&u&&!k.editAction?(0,S.Y)(d.Ay,{size:"small",className:"hoverbig",onClick:this.goEdit},(0,S.Y)(g.A,null)):"",null==k||null===(t=k.viewActions)||void 0===t?void 0:t.map((function(t){return(0,S.Y)(E.A,{serverKey:l,iconType:"icon-title",hiddenType:"disabled",data:[Y],key:t.id,formRef:r.formRef,actionConfig:t,doAction:r.doSubmit})})),I&&I.includes("history")?(0,S.Y)(v.A,{title:j("${数据快照}")},(0,S.Y)(d.Ay,{size:"small",className:"hoverbig",onClick:this.showSnapshot},(0,S.Y)(m.A,null))):"",(0,S.Y)(d.Ay,{className:"hoverbig",title:j("${刷新}"),onClick:this.doRefresh},(0,S.Y)(w.A,null)),(0,S.Y)(A.A,{serverKey:l,dtmplConfig:k,code:i,onClose:this.onSnapshotClose,showSnapshot:this.toSnapshot,sourceId:c,open:L})))):null,(0,S.Y)(x.A,{codeSource:s,serverKey:l,refreshCode:O,showRightNav:P,rightBarPositionRight:a,dtmplConfig:k,sourceId:c,code:i}),(0,S.Y)(y.A,{scrollToFirstError:!0,labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onSubmit},(0,S.Y)(y.A.Item,{hidden:!0,name:"actionId"}),(0,S.Y)(y.A.Item,{hidden:!0,name:"mainCode"}),null==k||null===(e=k.viewActions)||void 0===e?void 0:e.map((function(t){var e;return null===(e=t.writes)||void 0===e?void 0:e.map((function(t){return(0,S.Y)(y.A.Item,{hidden:!0,name:t.id})}))}))))}}]);var r}(f.PureComponent);(0,s.A)(I,"defaultProps",{showRightNav:!0,rightBarPositionRight:15,showHeader:!0}),(0,s.A)(I,"contextType",L.U),e.A=I},36586:function(t,e,r){"use strict";r.d(e,{A:function(){return H}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(36552),d=r(47152),v=r(16370),y=r(28392),g=r(54839),m=r(69036),w=r(67034),b=r(36492),A=r(29029),x=r(13341),k=r(49237),C=r(60149),L=r(47852),E=r(11058),O=r(40261),S=r(42877),Y=r(38221),j=r.n(Y),I=r(92749),P=r(46704),T=r(44920),N=r(46675),D=r(56522),_=r(54774),R=r(1026),F=r(49604),G=r(17437);function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function K(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return $(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)?$(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function $(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 V(){V=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}var H=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,b=new Array(s),A=0;A<s;A++)b[A]=arguments[A];return r=this,n=e,c=[].concat(b),n=(0,l.A)(n),t=(0,u.A)(r,q()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{titleId:void 0,optionCacheKey:void 0,pageNo:1,loading:!1,optionsCache:{},codeLabel:{},ltmplConfig:void 0,showView:!1,showEdit:!1,showTable:!1,drawCode:void 0,preMainCode:void 0,selectOpen:!1,isDoingSomething:!1}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"selectRef",h.createRef()),(0,f.A)(t,"dropdownRender",(function(e){var r=t.props.fieldConfig.actions;return(0,G.Y)(h.Fragment,null,e,(0,G.Y)(h.Fragment,null,(0,G.Y)(p.A,{style:{margin:"8px 0"}}),(0,G.Y)(d.A,{justify:"end"},(0,G.Y)(v.A,null,(0,G.Y)(y.A,{align:"end"},r&&r.indexOf("table")>=0?(0,G.Y)(g.Ay,{icon:(0,G.Y)(x.A,{style:{color:"#0958d9"}}),onClick:function(){return t.showTable()}}):null,r&&r.indexOf("add")>=0?(0,G.Y)(g.Ay,{icon:(0,G.Y)(k.A,{style:{color:"#0958d9"}}),onClick:function(){return t.editItem()}}):null,(0,G.Y)(g.Ay,{icon:(0,G.Y)(C.A,{style:{color:"#0958d9"}}),onClick:function(){return t.initCache()}}),(0,G.Y)(g.Ay,{icon:(0,G.Y)(L.A,null),onClick:function(){t.setState({selectOpen:!1})}}))))))})),(0,f.A)(t,"editItem",function(){var e=(0,a.A)(V().mark((function e(r){var n;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadLtmplConfig();case 2:n=e.sent,t.setState({showEdit:!0,showTable:!1,showView:!1,drawCode:r,ltmplConfig:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"showTable",(0,a.A)(V().mark((function e(){return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({showEdit:!1,showTable:!0,showView:!1,drawCode:void 0});case 1:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"loadLtmplConfig",(0,a.A)(V().mark((function e(){var r,n,o,a,i,c;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.fieldConfig,o=r.serverKey,a=t.state.ltmplConfig,i=a){e.next=16;break}return e.next=6,P.A.requestLtmplConfig(n.serverKey?n.serverKey:o,n.sourceId?n.sourceId:n.id);case 6:if(e.t1=c=e.sent,e.t0=null===e.t1,e.t0){e.next=10;break}e.t0=void 0===c;case 10:if(!e.t0){e.next=14;break}e.t2=void 0,e.next=15;break;case 14:e.t2=c.ltmplConfig;case 15:i=e.t2;case 16:return t.setState({ltmplConfig:i}),e.abrupt("return",i);case 18:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"showItem",function(){var e=(0,a.A)(V().mark((function e(r){var n;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadLtmplConfig();case 2:n=e.sent,t.setState({showEdit:!1,showTable:!1,showView:!0,drawCode:r,ltmplConfig:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"initCache",(function(){t.setState({optionsCache:{},codeLabel:{}})})),(0,f.A)(t,"toOption",(function(e,r,n){var o=t.props,a=o.fieldConfig,i=o.valueOnly,c=a.actions;return t.state.codeLabel[i?r:e]=r,{value:i?r:e,label:(0,G.Y)(h.Fragment,null,r,c&&c.indexOf("detail")>=0?(0,G.Y)(g.Ay,{size:"small",type:"text",onClick:function(r){r.stopPropagation(),t.showItem(e)}},(0,G.Y)(E.A,{style:{color:"#0958d9"}})):null,c&&c.indexOf("edit")>=0?(0,G.Y)(g.Ay,{size:"small",type:"text",onClick:function(r){r.stopPropagation(),t.editItem(e)}},(0,G.Y)(O.A,{style:{color:"#0958d9"}})):null)}})),(0,f.A)(t,"doClose",(function(){t.setState({drawCode:void 0,showEdit:!1,showView:!1,showTable:!1})})),(0,f.A)(t,"drawSubmited",(function(e){t.initCache(),t.doClose(),t.selectRef.current.focus(),j()(t.fetchOptions,100)(void 0)})),(0,f.A)(t,"closeTable",(function(){t.drawSubmited()})),(0,f.A)(t,"toValueArray",(function(e){var r,n=[],o=B(t.toArray(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a)if(t.props.valueOnly)n.push(a);else{var i=a.split("@R@");"null"!=i[1]&&n.push(i[0])}}}catch(t){o.e(t)}finally{o.f()}return n})),(0,f.A)(t,"toArray",(function(t){return t instanceof Array?t:t?t.split("@,@"):[]})),(0,f.A)(t,"toOptions",(function(e,r){var n,o=t.props,a=o.fieldConfig,i=o.valueOnly,c=[],u=B(t.toArray(e));try{for(u.s();!(n=u.n()).done;){var l=n.value;if(l)if(i)c.push(t.toOption(l,l,r));else{var s=l.split("@R@");"null"!=s[1]&&c.push(t.toOption(s[0],s[1],r))}}}catch(t){u.e(t)}finally{u.f()}return a.suppleOptions&&a.suppleOptions.forEach((function(e){var r=!1;c.forEach((function(t){t.value!=e.code||(r=!0)})),r||c.push(t.toOption(e.code,e.title,void 0))})),c})),(0,f.A)(t,"fetchNextPage",(0,a.A)(V().mark((function e(){var r,n,a,i,c,u,l;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.state,n=r.optionCacheKey,a=r.titleId,i=r.optionsCache,c=i[n],u=null==c?void 0:c.pageInfo,!c||c.touchEnd){e.next=10;break}return u.pageNo=u.pageNo+1,e.next=7,t.loadData(c.queryKey.key,K({},u),a);case 7:(l=e.sent)&&(c.options=[].concat((0,o.A)(c.options),(0,o.A)(l.options)),c.touchEnd=l.touchEnd),t.setState({pageNo:u.pageNo});case 10:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"fetchOptions",function(){var e=(0,a.A)(V().mark((function e(r){var n,o,a,i,c,u,l,s,f,h,p,d,v,y,g,w,b,A,x,k,C,L;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.fieldConfig,a=n.mainCode,i=n.baseCriteria,c=n.serverKey,u=t.state,l=u.optionsCache,s=u.ltmplConfig,f=u.preMainCode,h=i||o.baseCriteria,p=a||o.mainCode,f!=p&&(t.setState({preMainCode:p.toString()}),t.initCache()),d="withoutValue",r&&(d=r),v=t.state.titleId,y=l[d]){e.next=40;break}if(t.setState({loading:!0}),g=s){e.next=16;break}return e.next=15,t.loadLtmplConfig();case 15:g=e.sent;case 16:if(g){e.next=19;break}return m.Ay.error("请配置正确查询页面",5),e.abrupt("return");case 19:return w={pageNo:1,pageSize:6,virtualEndPageNo:void 0},v=g.primaryColumn.id,b=g.primaryCriteria,A="undefinedCriteria",b&&(A="c_"+b.id),(x=g.defaultPageSize)&&(w.pageSize=x),k={},h&&(k=K({},h)),k[A]=r,e.next=31,I.A.requestLtmplQueryKey(o.serverKey?o.serverKey:c,o.sourceId,K(K(K({},k),w),{},{mainCode:p}));case 31:return C=e.sent,e.next=34,t.loadData(C.key,w,v);case 34:L=e.sent,y={options:L.options,pageInfo:w,queryKey:C,searchValue:r,touchEnd:L.touchEnd},l[d]=y,t.setState({optionCacheKey:d,titleId:v,optionsCache:K({},l),loading:!1}),e.next=41;break;case 40:t.state.optionCacheKey==d&&"withoutValue"==d?t.setState({loading:!1,optionCacheKey:d}):j()((function(){t.setState({loading:!1,optionCacheKey:d})}),500)();case 41:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"onChange",(function(e){var r,n=t.state.codeLabel,a=t.props,i=a.maxSelected,c=a.valueOnly,u=(0,o.A)(e);e&&e.length>=i&&(t.setState({selectOpen:!1}),null===(r=t.selectRef)||void 0===r||null===(r=r.current)||void 0===r||r.blur()),e&&e.length>i&&u.shift();var l=[];u.forEach((function(t){c?t.indexOf("@R@")>0?l.push(t.split("@R@")[1]):l.push(n[t]):t.indexOf("@R@")>0?l.push(t):l.push(t+"@R@"+n[t])})),t.props.onChange(l.join("@,@"))})),(0,f.A)(t,"tagRender",(function(t){var e=t.label,r=t.closable,n=t.onClose;return(0,G.Y)(w.A,{onMouseDown:function(t){t.preventDefault(),t.stopPropagation()},closable:r,onClose:n,style:{marginRight:3}},e)})),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(V().mark((function e(r,n,o){var a,i,c,u,l,s,f;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.props,i=a.onEntityClick,c=a.baseCriteria,u=a.serverKey,l=a.fieldConfig,c||l.baseCriteria,e.next=4,I.A.requestQueryData(l.serverKey?l.serverKey:u,r,n);case 4:return s=e.sent,f=[],n=s.pageInfo,s.entities&&s.entities.forEach((function(e,r){var n=e.fieldMap[o];if(P.A.cache(e),n){var a=n.split("@R@"),c=a&&a.length>0?a[a.length-1]:n;if("null"!=c){var u=void 0;if(l.optionCodeColId){if(u=e.fieldMap[l.optionCodeColId]){var s=u.split("@R@");u=s&&s.length>0?s[0]:u}}else u=e.code;var h=t.toOption(u,c,i);f.push(h)}}})),e.abrupt("return",{options:f,touchEnd:s.touchEnd});case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"debounceFetcher",(function(){return t.fetchOptions})),(0,f.A)(t,"debounceFetchNextPage",(function(){j()(t.fetchNextPage,200)()})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.baseCriteria,n=e.mainCode,o=e.fieldConfig,a=t.baseCriteria,i=t.mainCode,c=t.fieldConfig,u=r||o.baseCriteria,l=a||c.baseCriteria;(u&&JSON.stringify(u)!=JSON.stringify(l)||n&&n!=i||o&&c&&o.id!=c.id)&&this.initCache()}},{key:"render",value:function(){var t,e=this,r=this.props,n=r.id,a=r.value,i=r.fieldConfig,c=r.disabled,u=r.style,l=r.onEntityClick,s=r.mainCode,f=r.serverKey,p=i.actions,d=this.state,v=d.optionCacheKey,y=d.loading,g=d.optionsCache,m=d.drawCode,w=d.showEdit,x=d.showView,k=d.showTable,C=d.ltmplConfig,L=d.selectOpen,E=(d.isDoingSomething,this.context.translate),O=i.serverKey?i.serverKey:f,Y=this.toOptions(a,l),I=(0,o.A)(Y),P=256;if(v&&g[v]){var R=g[v];R.pageInfo&&R.pageInfo.pageSize<8&&(P=32*R.pageInfo.pageSize-10);var M,$=B(R.options);try{for($.s();!(M=$.n()).done;){var V=M.value;t=!1;var q,H=B(Y);try{for(H.s();!(q=H.n()).done;){var z=q.value;z.value==V.value&&(t=!0,z.label=V.label)}}catch(t){H.e(t)}finally{H.f()}t||I.push(V)}}catch(t){$.e(t)}finally{$.f()}}return c&&a?(0,G.Y)(F.A,this.props):(0,G.Y)(h.Fragment,null,(0,G.Y)(b.A,{disabled:c,defaultActiveFirstOption:!1,id:n,listHeight:P,style:K({},u),onChange:this.onChange,value:this.toValueArray(a),mode:"multiple",placeholder:E("${请选择}${"+i.title+"}"),notFoundContent:y?(0,G.Y)(A.A,{size:"small"}):E("${无数据或手动刷新}"),allowClear:!0,suffixIcon:(0,G.Y)(S.A,null),filterOption:!1,onFocus:function(){e.setState({selectOpen:!0})},open:L,popupRender:this.dropdownRender,tagRender:p&&(p.indexOf("detail")>=0||p.indexOf("edit")>=0)?this.tagRender:void 0,onSearch:this.debounceFetcher(),onClick:c?null:function(){j()(e.fetchOptions,100)(void 0)},ref:this.selectRef,options:y?[]:I,onPopupScroll:function(t){var r=t.target;r.scrollTop+r.offsetHeight+1>=r.scrollHeight&&e.debounceFetchNextPage()}}),x&&m?(0,G.Y)(T.A,{serverKey:O,placement:"left",onClose:this.doClose,open:x,sourceId:i.sourceId,code:m}):null,w&&C?C.customEditPagePath?(0,G.Y)(D.A,{open:w,onOk:function(){e.drawSubmited()},customPath:C.customEditPagePath,sourceId:i.sourceId,mainCode:s,code:m}):(0,G.Y)(N.A,{defaultDtmplData:i.defaultDtmplData,serverKey:O,pageType:"modal",open:w,onCancel:this.doClose,mainCode:s,sourceId:i.sourceId,code:m,onOk:this.drawSubmited}):null,k?(0,G.Y)(_.$h,{serverKey:O,open:k,height:"76vh",onCancel:this.closeTable,sourceId:i.sourceId,mainCode:s}):null)}}])}(h.PureComponent);(0,f.A)(H,"defaultProps",{maxSelected:100,valueOnly:!1}),(0,f.A)(H,"contextType",R.U)},38180:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(33227),i=r(96540),c=r(77053),u=r(46704),l=r(8835),s=r(17437);function f(){f=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=p(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}e.A=function(t){var e=t.fieldConfig,r=t.serverKey,n=(t.value,(0,i.useState)(void 0)),h=(0,a.A)(n,2),p=h[0],d=h[1],v=(0,i.useState)(void 0),y=(0,a.A)(v,2),g=(y[0],y[1],(0,i.useState)([])),m=(0,a.A)(g,2),w=(m[0],m[1]),b=(0,i.useState)(!0),A=(0,a.A)(b,2),x=(A[0],A[1]),k=(0,i.useState)([]),C=(0,a.A)(k,2),L=(C[0],C[1],i.createRef());return(0,i.useEffect)((function(){var t=function(){var t=(0,o.A)(f().mark((function t(){var o,a;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.A.requestTtmplConfig(r,e.id);case 2:return o=t.sent,t.next=5,c.A.initTtmplNodeConfig(o);case 5:a=t.sent,d(a),n(a);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t();var n=function(){var t=(0,o.A)(f().mark((function t(e){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.A.loadRootNodeData(e);case 2:r=t.sent,w(r),x(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),[e]),(0,s.Y)(l.A,{onClickNode:function(r){if(r.isLeaf){var n=r.code;"ltree-entity-select"==e.extControlType?n=r.code+"@R@"+r.name:"ltree-entity-select-value"==e.extControlType&&(n=r.name),t.onChange(n)}},ttmplNodeConfig:p,ref:L})}},39912:function(t,e,r){"use strict";var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(96540),l=r(84976),s=r(47767),f=r(80243),h=r(29029),p=r(54774),d=r(17437);function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var y=(0,d.Y)(h.A,{tip:"Loading..."}),g=(0,f.Ay)({resolved:{},chunkName:function(){return"App"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.resolve().then(r.bind(r,86876))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 86876}},{fallback:y});u.Component},39976:function(t,e,r){"use strict";var n=r(65425),o=r(50828),a=(r(96540),r(6754)),i=r(7142),c=r(94300),u=r(17437);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.A=function(t){var e,r=t.value,o=(t.itemType,t.fieldConfig),l=t.onChange,f=t.style,h=t.viewOrEdit,p=(0,c.Y)().translate;e=r?isNaN(r)?r:r.toString():0;var d,v={placeholder:o.disabled?p("${无需输入}"):p("${请输入}${"+o.title+"}"),disabled:o.disabled,value:r};return d="view"==h||o.disabled?(0,u.Y)(a.A,{width:90,percent:e}):(0,u.Y)(i.A,(0,n.A)({style:s({},f),min:0,max:100},v,{onKeyUp:function(t){t.target.value&&!isNaN(t.target.value)?t.target.value=parseInt(t.target.value):t.target.value=0},onChange:function(t){l&&l(t)}})),d}},43455:function(t,e,r){"use strict";r.d(e,{A:function(){return A}});var n=r(42455),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(89467),h=r(16370),p=r(47152),d=r(97135),v=r(8130),y=r(1026),g=r(54763),m=r(17437);function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=f.A.Item,A=function(t){function e(t){var r,a,u,s;return(0,o.A)(this,e),a=this,u=e,s=[t],u=(0,c.A)(u),r=(0,i.A)(a,w()?Reflect.construct(u,s||[],(0,c.A)(a).constructor):u.apply(a,s)),(0,l.A)(r,"context",void 0),(0,l.A)(r,"isPromise",(function(t){return!!t&&("object"===(0,n.A)(t)||"function"==typeof t)&&"function"==typeof t.then})),(0,l.A)(r,"getMainCode",(function(t,e){var n=r.props.formRef;return t.mainCode?"function"==typeof t.mainCode?t.mainCode(n.current):t.mainCode:e})),(0,l.A)(r,"getFieldConfig",(function(t){var e=r.props.formRef;return t.updateSelf?t.updateSelf(e.current):t})),(0,l.A)(r,"initFormItem",(function(t,e){var n=r.props,o=n.nameAttr,a=n.maxColsOnRow,i=n.mainCode,c=n.serverKey,u=n.dataCode,l=r.context.translate,s=r.getFieldConfig(t),f=s.title;return(0,m.Y)(b,{label:l("${"+s.title+"}"),hidden:s.hidden,name:"field-history"==t.controlType?void 0:s[o],key:s.id,labelCol:1==a||1==s.colSpan?{span:6}:{span:3},wrapperCol:1==a?{span:18}:1==s.colSpan?{span:15}:{span:19},tooltip:s.tip&&""!=s.tip?s.tip:void 0,initialValue:e,style:{margin:4},rules:function(t){var e,r=[];t.required&&r.push({required:!0,message:l("${请输入}${"+f+"}")});var n=null===(e=t.rules[0])||void 0===e?void 0:e.pattern;return n&&r.push({pattern:n,message:l("${"+f+"}${格式有误}")}),r}(s)},(0,m.Y)(d.A,{dataCode:u,serverKey:c,mainCode:r.getMainCode(s,i),value:e,fieldConfig:s}))})),(0,l.A)(r,"initFormList",(function(){var t=r.props,e=t.fields,n=t.valueMap,o=t.nameAttr,a=t.maxColsOnRow,i=t.mainCode,c=t.serverKey,u=[];e&&e.length>0&&e.forEach((function(t,e){var a=n?n[t.id]:void 0;a=a||0==a?a:t.defaultValue?v.A.configParamTrans(t.defaultValue,g.A.getControlType(t,t.defaultValue)):void 0;var l;l="hidden"==t.extControlType?(0,m.Y)(b,{hidden:!0,initialValue:a,name:t[o],key:t.id},(0,m.Y)(d.A,{serverKey:c,mainCode:r.getMainCode(t,i),value:a,fieldConfig:t})):t.shouldUpdate?(0,m.Y)(b,{noStyle:!0,shouldUpdate:t.shouldUpdate},(function(){return r.initFormItem(t,a)})):r.initFormItem(t,a),u.push(l)}));for(var l=[],s=0;s<u.length;s+=1){var f=e[s].colSpan;"hidden"==e[s].extControlType?f=0:a&&1==a&&(f=2);var y=(0,m.Y)(h.A,{key:s,span:12*f},u[s]);l.push(y)}return(0,m.Y)(p.A,{gutter:[16,8],key:1},l)})),r.state={fileList:[]},r}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){return this.initFormList()}}])}(s.PureComponent);(0,l.A)(A,"defaultProps",{nameAttr:"id",maxColsOnRow:2}),(0,l.A)(A,"contextType",y.U)},44601:function(t,e,r){"use strict";r.d(e,{A:function(){return ut}});var n=r(42455),o=r(17636),a=r(38452),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(65425),p=r(96540),d=r(92749),v=r(44485),y=r(1026),g=r(17437);function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var w=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,m()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"context",void 0),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"render",value:function(){var t,e=this.props,r=e.queryTotal,n=e.pageInfo,o=e.total,a=e.pageTo,i=(e.touchEnd,this.context.translate);if(!n)return(0,g.Y)(p.Fragment,null);var c=!0,u="";return o&&o>=0?(t=o,c=!0,o>0&&(u=i("${总共}"+o+"${条}"))):(c=!1,t=n.virtualEndPageNo*n.pageSize+1,u=i("${点击查看总数}")),(0,g.Y)("div",{className:"Pagination"},(0,g.Y)("span",{className:c?"sewTotal":"seeTotal",onClick:r},u),(0,g.Y)(v.A,{style:{display:"inline-block"},showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100","200","500"],defaultCurrent:1,current:parseInt(n.pageNo?n.pageNo.toString():"1"),pageSize:n.pageSize?n.pageSize:10,onChange:function(t,e){a(t,e)},hideOnSinglePage:0===o,total:t}))}}])}(p.PureComponent);(0,f.A)(w,"contextType",y.U);var b,A=w,x=r(61021),k=r(53357),C=100010,L=function(t){return b[t]!==t?b[t]=L(b[t]):b[t]},E=r(20130),O=r(33227),S=r(21745),Y=r(60346),j=r(45806);function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function P(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=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))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}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}var D={summary:function(t){var e=this,r=t.translate,n=t.summaryConfigs,o=t.pageData,a=t.columns,i=t.rowSelection,c=t.groupIColumns;if(!n||0===(null==n?void 0:n.length)||0===o.length)return(0,g.Y)(p.Fragment,null);var u={sum:[],avg:[]};i&&(u.avg.push({value:"",id:"",columnConfig:{align:"center"}}),u.sum.push({value:"",id:"",columnConfig:{align:"center"}})),u.sum.push({value:r("${合计}"),id:"title",columnConfig:{align:"center"}}),u.avg.push({value:r("${均值}"),id:"title",columnConfig:{align:"center"}});for(var l=0,s=0,f=function(){var t,r,i=h,f=a[h].dataIndex;if(0===i)return 0;var p={value:"",id:"",columnConfig:a[h]},d=n.findIndex((function(t){var e=t.id,r=t.title;return e===f||r===f}));if(-1===d)return u.sum.push(p),u.avg.push(p),0;var v=n[d].aggFunc;"sum"===v&&(p.value=null===(t=o.reduce((function(t,r){return t.plus(new Y.g(e.getTableSummaryNumberValue(r[f])))}),new Y.g(0)))||void 0===t?void 0:t.toString()),"avg"===v&&(p.value=null===(r=o.reduce((function(t,r){return t.plus(new Y.g(e.getTableSummaryNumberValue(r[f])).div(o.length))}),new Y.g(0)))||void 0===r?void 0:r.toString());var y=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("-")},g=function(t,e){return y.apply(void 0,(0,S.A)(e.map((function(e){return t[e]}))))};if("groupIsum"===v){var m,w=null==c?void 0:c.map((function(t){return t.id})),b=new Set;p.value=null===(m=o.reduce((function(t,r){return b.has(g(r,w))?t:(b.add(g(r,w)),t.plus(new Y.g(e.getTableSummaryNumberValue(r[f]))))}),new Y.g(0)))||void 0===m?void 0:m.toString()}if("groupIavg"===v){var A,x=new Set,k=0,C=null==c?void 0:c.map((function(t){return t.id}));o.forEach((function(t){x.has(g(t,C))||(x.add(g(t,C)),k++)})),x.clear(),p.value=null===(A=o.reduce((function(t,r){return x.has(g(r,C))?t:(x.add(g(r,C)),t.plus(new Y.g(e.getTableSummaryNumberValue(r[f])).div(k)))}),new Y.g(0)))||void 0===A?void 0:A.toString()}p.id=f,"avg"===v||"groupIavg"===v?(u.avg.push(p),s++):u.avg.push({value:"",id:""}),"sum"===v||"groupIsum"===v?(u.sum.push(p),l++):u.sum.push({value:"",id:""})},h=0;h<a.length;h++)f();return console.log("sumConfigs",u,l,s),(0,g.Y)(p.Fragment,null,0===l?(0,g.Y)(p.Fragment,null):(0,g.Y)(j.A.Summary.Row,null,u.sum.map((function(t,e){t.id;var r=t.value,n=t.columnConfig;return(0,g.Y)(j.A.Summary.Cell,{align:null==n?void 0:n.align,index:e,className:"heji"},r)}))),0===s?(0,g.Y)(p.Fragment,null):(0,g.Y)(j.A.Summary.Row,null,u.avg.map((function(t,e){t.id;var r=t.value,n=t.columnConfig;return(0,g.Y)(j.A.Summary.Cell,{align:null==n?void 0:n.align,index:e,className:"heji"},r)}))))},handleProSummaryTable:function(t){var e,r,n=this,o=t.subtotalXColumn,a=t.columns,i=t.data,c=t.translate,u=t.groupIColumns;if(!Boolean(o))return{proSummaryTableColumns:[],proSummaryTableData:[]};var l,s=a,f=T(s);try{for(f.s();!(l=f.n()).done;)delete l.value.sorter}catch(t){f.e(t)}finally{f.f()}var h,p=T(i);try{for(p.s();!(h=p.n()).done;)for(var d=h.value,v=0,y=Object.entries(d);v<y.length;v++){var g=(0,O.A)(y[v],2),m=g[0],w=g[1];null==w||"null"==w?d[m]="":"string"==typeof w&&null!=w&&w.includes("@R@")&&(d[m]=w.split("@R@")[1])}}catch(t){p.e(t)}finally{p.f()}console.log("data",i),console.log("columns",s);var b,A={dimension:[],fact:[],others:[{dataIndex:"orderInGroup",title:"orderInGroup"}]},x={},k={},C=T(s);try{for(C.s();!(b=C.n()).done;){var L=b.value;x[L.dataIndex]=L.title,k[L.title]=L.dataIndex,void 0!==L.statColType?A[L.statColType].push(this.deepClone(L)):"序号"!==L.title&&A.others.push(this.deepClone(L))}}catch(t){C.e(t)}finally{C.f()}console.log("colIdToNameMp",x),console.log("colNameToIdMp",k),console.log("colMp",A);var E,Y=[],j=0,I=T(i);try{for(I.s();!(E=I.n()).done;){for(var N=E.value,D={},_=function(){var t=(0,O.A)(F[R],2),e=t[0],r=t[1],n=r;A.fact.findIndex((function(t){return t.dataIndex===e}))>-1&&null===r&&(n=0),D[x[e]]=n},R=0,F=Object.entries(N);R<F.length;R++)_();Y.push(P(P({},D),{},{orderInGroup:j++}))}}catch(t){I.e(t)}finally{I.f()}console.log("canReadData",Y);var G,M=[].concat((0,S.A)(this.deepClone(A.dimension)),(0,S.A)(this.deepClone(A.others))),K=[],B=null===(e=A.fact[0])||void 0===e?void 0:e.cal,$=c("sum"===B?"${小计}":"${均值}"),V={};A.fact.forEach((function(t){var e=t.title,r=t.cal;return V[e]=r})),(r=M).push.apply(r,(0,S.A)(A.fact)),this.buildColTag(M);var q,H={},z=[],U=T(M);try{for(U.s();!(q=U.n()).done;){var W=q.value;Array.isArray(W.keys)&&1===W.keys.length&&z.push(W)}}catch(t){U.e(t)}finally{U.f()}console.log("rowKey",z);for(var Q=0,J=Y;Q<J.length;Q++){for(var Z=J[Q],X=H,tt=0;tt<z.length;tt++){var et=z[tt].title;void 0===X[Z[et]]&&(tt!==z.length-1?X[Z[et]]={}:X[Z[et]]=[]),X=X[Z[et]]}Array.isArray(X)&&X.push(Z)}console.log("rowMp",H);var rt,nt=[],ot=this.flatSummaryCol(M),at=T(M);try{for(at.s();!(rt=at.n()).done;){var it=rt.value;"fact"!==it.statColType&&!Array.isArray(it.children)||void 0!==it.TYPE||nt.push(it)}}catch(t){at.e(t)}finally{at.f()}var ct=this.flatSummaryCol(nt),ut=this.flatSummaryCol(z),lt=this.flatSummaryCol(M.filter((function(t){return void 0!==t.TYPE})));if(console.log("colKey",nt),console.log("colKeyTitle",ot),console.log("flatSummaryColTitle",ct),console.log("flatSummaryRowTitle",ut),console.log("flatSummaryCalTitle",lt),K=this.handleColData(H,ut,ct,lt,B),G=this.deepClone(K),console.log("excludeGroupSumData",G),o&&Array.isArray(o)&&o.length){var st=o.map((function(t){var e=t.id;return x[e]})),ft=this.buildRowMp(K,st);console.log("rowSumMp",ft);var ht=[].concat((0,S.A)(lt),(0,S.A)(ct)).map((function(t){return n.buildKeys(t)}));console.log("calRowKeys",ht),K=this.handleRowData(ft,ht,V,$,st[0],[],u)}if("序号"===s[0].title){var pt={dataIndex:"序号",title:"序号",width:60,order:-1};s[0].colWidth&&(pt.width=s[0].colWidth),M.unshift(pt),K.forEach((function(t,e){t["序号"]=e+1}))}return this.stain(M),M.splice(M.findIndex((function(t){return"orderInGroup"===t.dataIndex})),1),K.forEach((function(t){return delete t.orderInGroup})),M=M.sort((function(t,e){return void 0===t.order&&void 0===e.order?0:void 0===t.order?1:void 0===e.order||t.order<e.order?-1:1})),console.log("proSummaryTableColumns",M),console.log("proSummaryTableData",K),{proSummaryTableColumns:M,proSummaryTableData:K}},deepClone:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;try{if("object"!==(0,n.A)(t)||null===t||p.isValidElement(t))return t;if(r.has(t))return t;r.add(t);var o=Array.isArray(t)?[]:{};return Reflect.ownKeys(t).forEach((function(a){var i=t[a];"object"===(0,n.A)(i)&&null!=i?o[a]=e.deepClone(i,r):o[a]=i})),o}catch(e){console.log("deepclone err",e,t)}},flatSummaryCol:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=T(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.children?this.flatSummaryCol(o.children,r):r.push(o.keys)}}catch(t){n.e(t)}finally{n.f()}return r},buildColTag:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=T(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.children?this.buildColTag(o.children,[].concat((0,S.A)(r),[{dataKey:o._type?o._type:o.title,title:o.title}])):(o.dataIndex=this.buildKeys([].concat((0,S.A)(r),[{dataKey:o._type?o._type:o.title,title:o.title}])),void 0===o.keys&&(o.keys=[].concat((0,S.A)(r),[{dataKey:o._type?o._type:o.title,title:o.title}])))}}catch(t){n.e(t)}finally{n.f()}},getCurCalKeys:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=T(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;Array.isArray(o.children)?this.getCurCalKeys(o.children,r):r.push({factIndex:o.keys[o.keys.length-1],dataIndex:o.dataIndex})}}catch(t){n.e(t)}finally{n.f()}return r},setSumColKeys:function(t,e){if(0!==e.length)if(Array.isArray(t.children))this.setSumColKeys(t.children,e);else{var r,n=T(t);try{var o=function(){var t=r.value,n=t.keys[t.keys.length-1].dataKey;t.sumDataIndex=e.filter((function(t){return t.factIndex.dataKey===n})),t.keys[t.keys.length-1].sumDataIndex=t.sumDataIndex.map((function(t){return t.dataIndex}))};for(n.s();!(r=n.n()).done;)o()}catch(t){n.e(t)}finally{n.f()}}},handleColData:function(t,e,r,n,o){var a=this,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[];if(Array.isArray(t)){var l,s=T(r);try{var f=function(){var e,r,n,i=l.value,u=a.buildKeys(i),s=[],f=i.slice(0,i.length-1),h=i.slice(i.length-1)[0].title,p=T(t);try{var d=function(){var t=n.value;f.every((function(e){var r=e.dataKey,n=e.title;return t[r]===n}))&&s.push(t)};for(p.s();!(n=p.n()).done;)d()}catch(t){p.e(t)}finally{p.f()}void 0!==c[u]&&""!=c[u]||(c[u]=(0,Y.g)(0)),"sum"===o&&(c[u]=s.reduce((function(t,e){return t.plus((0,Y.g)(e[h]))}),(0,Y.g)(0))),"avg"===o&&(c[u]=s.reduce((function(t,e){return t.plus((0,Y.g)(e[h]).div(s.length))}),(0,Y.g)(0))),c[u]="NaN"==(null===(e=c[u])||void 0===e?void 0:e.toString())?"0":null===(r=c[u])||void 0===r?void 0:r.toString()};for(s.s();!(l=s.n()).done;)f()}catch(t){s.e(t)}finally{s.f()}var h,p=T(n);try{var d=function(){var t,e=h.value,r=a.buildKeys(e),n=e[e.length-1].sumDataIndex;void 0!==c[r]&&""!=c[r]||(c[r]=(0,Y.g)(0)),"sum"===o&&(c[r]=n.reduce((function(t,e){return t.plus((0,Y.g)(c[e]))}),(0,Y.g)(0))),"avg"===o&&(c[r]=n.reduce((function(t,e){return t.plus((0,Y.g)(c[e]).div(n.length))}),(0,Y.g)(0))),c[r]=null===(t=c[r])||void 0===t?void 0:t.toString()};for(p.s();!(h=p.n()).done;)d()}catch(t){p.e(t)}finally{p.f()}u.push(c)}else for(var v=0,y=Object.entries(t);v<y.length;v++){var g=(0,O.A)(y[v],2),m=g[0],w=g[1],b=e[i][0].dataKey;c[b]=m,this.handleColData(w,e,r,n,o,i+1,this.deepClone(c),u)}return u},buildRowMp:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(r>=e.length)return t;var o,a=e[r],i=T(t);try{for(i.s();!(o=i.n()).done;){var c=o.value;void 0===n[c[a]]&&(n[c[a]]=[]),n[c[a]].push(c)}}catch(t){i.e(t)}finally{i.f()}for(var u=0,l=Object.entries(n);u<l.length;u++){var s=(0,O.A)(l[u],2),f=s[0],h=s[1];n[f]=this.buildRowMp(h,e,r+1)}return n},handleRowData:function(t,e,r,n,o){for(var a=this,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],c=arguments.length>6?arguments[6]:void 0,u=function(){var u=(0,O.A)(s[l],2),h=(u[0],u[1]);if(Array.isArray(h)){var p,d=(0,f.A)((0,f.A)((0,f.A)({},o,n),"_type",r),"_calRange","small"),v=T(e);try{var y=function(){var e,n=p.value;"sum"===r[n]&&(d[n]=h.reduce((function(t,e){return t.plus((0,Y.g)(e[n]))}),(0,Y.g)(0))),"avg"===r[n]&&(d[n]=h.reduce((function(t,e){return t.plus((0,Y.g)(e[n]).div(h.length))}),(0,Y.g)(0)));var o=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.join("-")},i=function(t,e){return o.apply(void 0,(0,S.A)(e.map((function(e){return t[e]}))))};if("groupIsum"===r[n]){var u=null==c?void 0:c.map((function(t){return t.title})),l=new Set;d[n]=h.reduce((function(t,e){return l.has(i(e,u))?t:(l.add(i(e,u)),t.plus(new Y.g(a.getTableSummaryNumberValue(e[n]))))}),new Y.g(0))}if("groupIavg"===r[n]){var s=new Set,f=0,v=null==c?void 0:c.map((function(t){return t.title}));t.forEach((function(t){s.has(i(t,v))||(s.add(i(t,v)),f++)})),s.clear(),d[n]=h.reduce((function(t,e){return s.has(i(e,v))?t:(s.add(i(e,v)),t.plus(new Y.g(a.getTableSummaryNumberValue(e[n])).div(f)))}),new Y.g(0))}d[n]=null===(e=d[n])||void 0===e?void 0:e.toString()};for(v.s();!(p=v.n()).done;)y()}catch(t){v.e(t)}finally{v.f()}h.sort((function(t,e){return Number(t.orderInGroup)<Number(e.orderInGroup)?-1:1})),i.push.apply(i,(0,S.A)(h).concat([d]))}else a.handleRowData(h,e,r,n,o,i,c)},l=0,s=Object.entries(t);l<s.length;l++)u();return i},stain:function(t){var e,r=T(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;Array.isArray(n.children)?this.stain(n.children):n.render=function(t,e,r){var n="";return void 0!==e._type&&(n="small"===e._calRange?"xiaoji":"heji"),(0,g.Y)("div",{className:n},t)}}}catch(t){r.e(t)}finally{r.f()}},getTableSummaryNumberValue:function(t){return null==t?0:Number("string"==typeof t?t:t[0].split("@R@")[1])},buildKeys:function(t){return t.map((function(t){return t.title})).join("-")}},_=r(69036),R=r(54839),F=r(37122),G=r(677),M=r(55957),K=r(8130),B=r(14103),$=r(83853),V=r(42729),q=r(66036),H=["onResize","width"],z=["columns","components"];function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function W(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Q=function(t){var e=t.onResize,r=t.width,n=(0,a.A)(t,H);return r?(0,g.Y)(q.Resizable,{draggableOpts:{enableUserSelectHack:!1},width:r,minConstraints:[40,0],height:0,onResize:e,handle:(0,g.Y)("span",{className:"react-resizable-handle",onClick:function(t){t.stopPropagation()}})},(0,g.Y)("th",n)):(0,g.Y)("th",n)},J=function(t){var e=t.columns,r=t.components,n=(0,a.A)(t,z),o=(0,p.useState)([]),i=(0,O.A)(o,2),c=i[0],u=i[1];(0,p.useEffect)((function(){e.forEach((function(t){return t.onHeaderCell=function(t){return{width:t.width,onResize:l(t.dataIndex)}}})),u(e)}),[e]);var l=function(t){return function(e,r){var n=r.size;u((function(e){return e.map((function(e){return e.dataIndex===t?W(W({},e),{},{width:n.width}):e}))}))}},s=W(W({},r),{},{header:{cell:Q}});return(0,g.Y)(V.A,(0,h.A)({components:s,columns:c},n))},Z=["className","style"];function X(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return tt(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)?tt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function tt(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 et(){et=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ot=function(){return!!t})()}var at=(0,x.Zj)((function(t){return(0,g.Y)("tr",(0,h.A)({className:"sortable-item-hover"},t))})),it=(0,x.q6)((function(t){return(0,g.Y)("tbody",t)})),ct=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,v=new Array(s),y=0;y<s;y++)v[y]=arguments[y];return r=this,n=e,c=[].concat(v),n=(0,l.A)(n),t=(0,u.A)(r,ot()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"defaultAggregateShowSize",7),(0,f.A)(t,"state",{queryDataCache:void 0,virtualEndPageNo:void 0,dataSource:void 0,loading:!0,touchEnd:void 0,aggregateVO:void 0,beforeSelectedRows:void 0,aggregateShowSize:t.defaultAggregateShowSize}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"DraggableContainer",(function(e){return(0,g.Y)(it,(0,h.A)({useDragHandle:!0,disableAutoscroll:!0,helperClass:"row-dragging",onSortEnd:t.onSortEnd},e))})),(0,f.A)(t,"DraggableBodyRow",(function(e){e.className,e.style;var r=(0,a.A)(e,Z),n=t.state.dataSource;if(n){var o=n.findIndex((function(t){return t.key===r["data-row-key"]}));return(0,g.Y)(at,(0,h.A)({key:o,index:o},r))}return(0,g.Y)(p.Fragment,null)})),(0,f.A)(t,"onSortEnd",(function(e){var r=e.oldIndex,n=e.newIndex,o=t.state.dataSource;if(r!==n){var a=(0,k.p)([].concat(o),r,n).filter((function(t){return!!t}));t.setState({dataSource:a})}})),(0,f.A)(t,"loadData",function(){var e=(0,o.A)(et().mark((function e(r,n,o){var a,i,c,u,l,s,f,h,p,v,y,g,m,w,b,A;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setState({loading:!0}),c=t.state.queryDataCache,u=t.props,l=u.serverKey,s=u.tableProps,o||!c?(f=new Map,t.setState({aggregateVO:void 0})):f=c,!f.has((null===(a=n)||void 0===a?void 0:a.pageNo)+"_"+(null===(i=n)||void 0===i?void 0:i.pageSize))){e.next=9;break}v=f.get((null===(h=n)||void 0===h?void 0:h.pageNo)+"_"+(null===(p=n)||void 0===p?void 0:p.pageSize)),t.setState({dataSource:v.dataSource,virtualEndPageNo:v.pageInfo.virtualEndPageNo,loading:!1}),e.next=25;break;case 9:return e.next=11,d.A.requestQueryData(l,r,n);case 11:if((null==(g=e.sent)?void 0:g.key)==(null===(y=t.props.queryKey)||void 0===y?void 0:y.key)){e.next=16;break}return e.abrupt("return");case 16:if(b=[],n=g.pageInfo,g.entities&&g.entities.forEach((function(t,e){var r=nt(nt({key:t.code,code:t.code},t.fieldMap),{},{index:e});b.push(r)})),A=g.touchEnd,f.set((null===(m=n)||void 0===m?void 0:m.pageNo)+"_"+(null===(w=n)||void 0===w?void 0:w.pageSize),{dataSource:b,pageInfo:n}),t.setState({beforeSelectedRows:g.beforeSelectedRows,dataSource:b,virtualEndPageNo:n.virtualEndPageNo,queryDataCache:f,touchEnd:A,loading:!1}),s.clickDisplayTotal){e.next=25;break}return e.next=25,t.queryTotal();case 25:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"pageTo",function(){var e=(0,o.A)(et().mark((function e(r,n){return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,t.props.onChangePage)(r,n);case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"queryTotal",(0,o.A)(et().mark((function e(){var r,n,o,a,i,c;return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.queryKey,o=r.serverKey,a=r.queryTotal,!(i=t.state.aggregateVO)||i.queryKey!=n.key){e.next=6;break}return e.abrupt("return",!1);case 6:if(!a){e.next=12;break}return e.next=9,a();case 9:c=e.sent,e.next=15;break;case 12:return e.next=14,d.A.requestQueryAggregates(o,n.key);case 14:c=e.sent;case 15:t.setState({aggregateVO:c});case 16:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"getRowSelection",(function(){var e,r=t.props,n=r.columns,o=r.onChangeRowSelection,a=r.selectedRows,i=r.maxSelectedRows,c=r.primaryColumn,u=t.state,l=u.dataSource,s=u.beforeSelectedRows,f=[],h=X(a);try{for(h.s();!(e=h.n()).done;){var p=e.value;f.push(p.code)}}catch(t){h.e(t)}finally{h.f()}var d=[];if(l){var v,y=X(l);try{for(y.s();!(v=y.n()).done;){var g=v.value;d.push(g.code)}}catch(t){y.e(t)}finally{y.f()}}var m=i||0;s>0&&(m-=s);var w=t.context.translate;if(m<=-1)return null;if(s>0&&m<=0)return _.Ay.warning(w("${已选超}")),null;var b={fixed:!0,type:1==i?"radio":"checkbox",selectedRowKeys:f,onChange:function(t,e){if(m>0&&t.length>m)_.Ay.error(w("${最多只能选择}")+" : "+m);else{var r=[],a=[],i=null==c?void 0:c.id;i||n.forEach((function(t){"序号"==t.title||null!=i||(i=t.dataIndex)})),e.forEach((function(t){r.push({code:t.code,title:t[i]}),a.push(t)})),o&&o(r,a,d)}}};return b})),(0,f.A)(t,"getUnHidenDataSource",(function(){var e=t.state.dataSource,r=t.props.hiddenRowCodes,n=[];if(e){var o,a=X(e);try{for(a.s();!(o=a.n()).done;){var i=o.value;r.includes(i.code)||n.push(i)}}catch(t){a.e(t)}finally{a.f()}}return n})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(et().mark((function t(){var e,r,n;return et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.props,r=e.queryKey,n=e.pageInfo,!r){t.next=4;break}return t.next=4,this.loadData(r.key,n);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.setState=function(){return!1}}},{key:"componentDidUpdate",value:(r=(0,o.A)(et().mark((function t(e){var r,n,o,a,i;return et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.queryKey,n=e.pageInfo,o=this.props,a=o.queryKey,i=o.pageInfo,o.sourceId,!a){t.next=11;break}if((null==r?void 0:r.key)==a.key){t.next=8;break}return t.next=6,this.loadData(a.key,i,!0);case 6:t.next=11;break;case 8:if((null==n?void 0:n.pageNo)==i.pageNo&&(null==n?void 0:n.pageSize)==i.pageSize){t.next=11;break}return t.next=11,this.loadData(a.key,i,!1);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"mergeRowInCol",value:function(t,e,r,n,o){var a=e*o+r;return void 0!==n[a]?{rowSpan:n[a].length}:{rowSpan:0}}},{key:"onChange",value:function(t,e,r,n){if(console.log("params",t,e,r,n),"sort"===n.action){var o={};JSON.parse(JSON.stringify(this.props.sortColumnData)),"ascend"===r.order?Object.assign(o,{sortColIds:[r.field+"_asc"]}):"descend"===r.order?Object.assign(o,{sortColIds:[r.field+"_desc"]}):Object.assign(o,{sortColIds:[]}),this.props.doSearch(o)}}},{key:"render",value:function(){var t=this,e=this.props,r=e.pageInfo,n=e.queryKey,o=e.columns,a=e.viewModels,i=e.summaryConfigs,c=e.subtotalXColumn,u=e.tableProps,l=e.groupIColumns,s=e.hiddenRowCodes,f=e.columnConfigs,h=e.serverKey,d=this.state,v=d.touchEnd,y=d.aggregateVO,m=d.loading,w=d.virtualEndPageNo,x=d.dataSource,k=d.aggregateShowSize,O=Boolean(c),S=this.context.translate,Y=D.handleProSummaryTable({subtotalXColumn:c,columns:o,data:this.getUnHidenDataSource(),translate:S,groupIColumns:l}),j=Y.proSummaryTableColumns,I=Y.proSummaryTableData,P=O?j:o||[];console.log(P);var T=20;P.forEach((function(t){T+=t.width?t.width:140}));var N=this.getUnHidenDataSource(),_=O?I:N;console.log("%crender data: ","color: red",_),console.log("%crender col: ","color: red",P);var V=_.map((function(t,e){var r={};return P.forEach((function(e){r[e.dataIndex]=t[e.dataIndex]})),r[1]=e,r}));console.log("清洗原始数据: ",V);var q=Array.from({length:V.length}).fill(0).map((function(){return Array.from({length:P.length}).fill(0)}));V.forEach((function(t,e){P.forEach((function(r,n){q[e][n]=t[r.dataIndex]}))})),console.log("dataOf2D: ",q),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;b=Array.from({length:t}).fill(0).map((function(t,e){return e}))}(V.length*P.length+10);for(var H=function(t){var e,r,n=!1;Array.isArray(l)&&l.length>0?l.forEach((function(e){var r=e.title,o=e.sourceId;return void 0!==V[t][r]&&V[t][r]!==V[t-1][r]||void 0!==V[t][o]&&V[t][o]!==V[t-1][o]?n=!0:void 0})):n=!0;for(var o=0;o<q[t].length;o++)"小计"!==q[t][o]&&"合计"!==q[t][o]||(n=!0);for(var a=0;a<q[t-1].length;a++)"小计"!==q[t-1][a]&&"合计"!==q[t-1][a]||(n=!0);if(n)return 1;for(var i=0;i<q[t].length;i++)q[t][i]===q[t-1][i]&&(e=t*q[t].length+i,r=(t-1)*q[t].length+i,b[L(e)]=L(r))},z=1;z<q.length;z++)H(z);var U=function(){for(var t={},e=0;e<C;e++){var r=L(e);void 0===t[r]&&(t[r]=[]),t[r].push(e)}return t}();P.forEach((function(e,r){return e.onCell=function(e,n){return t.mergeRowInCol(e,n,r,U,P.length)}}));var W=[];return y&&y.aggregates&&(k<y.aggregates.length?y.aggregates.forEach((function(e){W.length==k?W.push({key:"opt",label:(0,g.Y)(R.Ay,{icon:(0,g.Y)(B.A,null),type:"link",onClick:function(){t.setState({aggregateShowSize:y.aggregates.length})}},S("${展开}")),children:null}):W.length<k&&W.push({key:e.fieldId,label:(0,g.Y)("div",{style:{fontSize:14}},e.fieldTitle),children:(0,g.Y)(F.A,{valueStyle:{fontSize:16},value:e.value?e.value:0})})})):(y.aggregates.forEach((function(t){W.push({key:t.fieldId,label:(0,g.Y)("div",{style:{fontSize:14}},t.fieldTitle),children:(0,g.Y)(F.A,{valueStyle:{fontSize:16},value:t.value?t.value:0})})})),this.defaultAggregateShowSize<y.aggregates.length&&W.push({key:"opt",label:(0,g.Y)(R.Ay,{icon:(0,g.Y)($.A,null),type:"link",onClick:function(){t.setState({aggregateShowSize:t.defaultAggregateShowSize})}},S("${收起}")),children:null}))),(0,g.Y)(p.Fragment,null,y&&y.aggregates&&y.aggregates.length>0?(0,g.Y)(G.A,{variant:"borderless",styles:{body:{paddingLeft:10,paddingTop:4,paddingBottom:4,paddingRight:10}}},(0,g.Y)(M.A,{column:4,colon:!1,items:W})):null,a.includes("table")?(0,g.Y)(J,{size:u.size?u.size:void 0,rowSelection:this.getRowSelection(),columns:P,dataSource:_,rowKey:"序号",scroll:-1==u.scrollY||0==u.scrollY?null:{y:u.scrollY,x:T},bordered:!0,pagination:!1,style:{display:o?"block":"none"},summary:function(e){return D.summary({translate:S,summaryConfigs:i,pageData:N,columns:o,rowSelection:t.getRowSelection(),groupIColumns:l})},loading:m,components:{body:{wrapper:this.DraggableContainer,row:this.DraggableBodyRow}},onChange:this.onChange.bind(this)}):"",(0,g.Y)(A,{key:n?n.key:K.A.getReactKey(),touchEnd:v,pageInfo:nt(nt({},r),{},{virtualEndPageNo:w}),pageTo:this.pageTo,queryTotal:this.queryTotal,total:null==y?void 0:y.count}),a.includes("verticalList")?(0,g.Y)(E.A,{hiddenRowCodes:s,dataSource:x,columnConfigs:f,serverKey:h,columns:o}):"")}}]);var r,n}(p.PureComponent);(0,f.A)(ct,"defaultProps",{pageInfo:{pageNo:1,pageSize:10,virtualEndPageNo:void 0},tableProps:{size:"small",clickDisplayTotal:!1,scrollY:500},hiddenRowCodes:[],selectedRows:[],viewModels:["table"],summaryConfigs:[]}),(0,f.A)(ct,"contextType",y.U);var ut=ct},44920:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(1849),p=r(28392),d=r(54839),v=r(45705),y=r(17437);function g(){g=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var w=function(t){function e(){var t,r,n,o;(0,a.A)(this,e);for(var i=arguments.length,l=new Array(i),f=0;f<i;f++)l[f]=arguments[f];return r=this,n=e,o=[].concat(l),n=(0,u.A)(n),t=(0,c.A)(r,m()?Reflect.construct(n,o||[],(0,u.A)(r).constructor):n.apply(r,o)),(0,s.A)(t,"state",{}),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.title,r=t.sourceId,n=t.code,o=t.placement,a=t.open,i=t.onClose,c=t.width,u=t.cancelText,l=t.editable,s=t.serverKey,g=t.codeSource;return(0,y.Y)(h.A,{height:"calc(100%)",placement:o,title:(0,y.Y)(f.Fragment,null,e),closable:!0,mask:!1,onClose:i,open:a,width:c,style:{maxWidth:"92vw",border:"2px solid #d9d9d9"},extra:(0,y.Y)(p.A,null,(0,y.Y)(d.Ay,{onClick:function(){return i()}},u))},(0,y.Y)(v.A,{codeSource:g,serverKey:s,editable:l,sourceId:r,code:n}))}}]);var r}(f.PureComponent);(0,s.A)(w,"defaultProps",{height:"82vh",width:"82vw",forceRender:!0,cancelText:"关闭",placement:"left",open:!1,editable:!0}),e.A=w},45666:function(t,e,r){"use strict";r.d(e,{A:function(){return v}});var n=r(65425),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(28392),h=r(78122),p=r(17437);function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}var v=function(t){function e(){return(0,o.A)(this,e),t=this,r=e,n=arguments,r=(0,c.A)(r),(0,i.A)(t,d()?Reflect.construct(r,n||[],(0,c.A)(t).constructor):r.apply(t,n));var t,r,n}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){var t,e=this,r=this.props.value,o=[];return r&&"string"==typeof r&&""!==r&&((t=JSON.parse(r))instanceof Array?o=t:o.push(t)),(0,p.Y)(f.A,{wrap:!0},o.map((function(t){return(0,p.Y)(h.default,(0,n.A)({},e.props,{value:t}))})))}}])}(s.PureComponent);(0,l.A)(v,"defaultProps",{})},45705:function(t,e,r){"use strict";var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(33448),f=r(68455),h=r(17437);function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var d=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var l=arguments.length,s=new Array(l),f=0;f<l;f++)s[f]=arguments[f];return r=this,o=e,c=[].concat(s),o=(0,i.A)(o),t=(0,a.A)(r,p()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"state",{showDtmplEdit:!1}),(0,u.A)(t,"goDtmpl",(function(){t.setState({showDtmplEdit:!0})})),(0,u.A)(t,"handleDtmplEdit",(function(e){t.setState({showDtmplEdit:!1})})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this,e=this.state.showDtmplEdit,r=this.props,n=r.sourceId,o=r.code,a=r.mainCode,i=r.editable,c=r.serverKey,u=r.codeSource,p=r.title,d=r.showHeader,v=r.addTmplId;return(0,h.Y)(l.Fragment,null,(0,h.Y)(s.A,{showHeader:d,title:p,codeSource:u,serverKey:c,goDtmpl:i?this.goDtmpl:null,sourceId:n,code:o,mainCode:a}),e?(0,h.Y)(f.A,{addTmplId:v,codeSource:u,serverKey:c,open:e,onCancel:function(){t.setState({showDtmplEdit:!1})},sourceId:n,code:o,onOk:this.handleDtmplEdit}):null)}}])}(l.PureComponent);(0,u.A)(d,"defaultProps",{editable:!0,showHeader:!0}),e.A=d},45806:function(t,e,r){"use strict";var n=r(65425),o=r(96540),a=r(42729),i=r(17437),c=function(t,e){var r,c=(r=(0,o.useRef)(null),(0,o.useEffect)((function(){var t=r.current.nativeElement.querySelector(".ant-table"),e=!1,n=function(t){3===t.which&&(e=!0)},o=function(t){3===t.which&&(e=!1)},a=function(r){if(e){var n=r.movementX;r.movementY,r.offsetX,r.offsetY,t.scrollBy(5*n,0),r.preventDefault()}},i=function(t){t.preventDefault()};return t&&(t.addEventListener("mousedown",n),t.addEventListener("mousemove",a),t.addEventListener("mouseup",o),t.addEventListener("contextmenu",i)),function(){t&&(t.removeEventListener("mousedown",n),t.removeEventListener("mousemove",a),t.removeEventListener("mouseup",o),t.removeEventListener("contextmenu",i))}}),[]),{table:r}).table;return(0,o.useImperativeHandle)(e,(function(){return{nativeElement:c.current.nativeElement,scrollTo:c.current.scrollTo}}),[]),(0,i.Y)(a.A,(0,n.A)({},t,{ref:c}))},u=(0,o.forwardRef)(c);u.SELECTION_COLUMN=a.A.SELECTION_COLUMN,u.EXPAND_COLUMN=a.A.EXPAND_COLUMN,u.SELECTION_ALL=a.A.SELECTION_ALL,u.SELECTION_INVERT=a.A.SELECTION_INVERT,u.SELECTION_NONE=a.A.SELECTION_NONE,u.Column=a.A.Column,u.ColumnGroup=a.A.ColumnGroup,u.Summary=a.A.Summary,e.A=u},46675:function(t,e,r){"use strict";r.d(e,{A:function(){return S}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(54839),p=r(16044),d=r(37187),v=r(1849),y=r(28392),g=r(677),m=r(70870),w=r(46704),b=r(8130),A=r(92749),x=r(22503),k=r(35880),C=r(1026),L=r(17437);function E(){E=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}var S=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,d=new Array(l),v=0;v<l;v++)d[v]=arguments[v];return r=this,n=e,i=[].concat(d),n=(0,u.A)(n),t=(0,c.A)(r,O()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"autoSaveTimer",-1e15),(0,s.A)(t,"autoSaveInterval",void 0),(0,s.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,s.A)(t,"state",{id:"modelDtmplEdit"+b.A.getRandomNum(6),dtmplConfig:void 0,queryingCode:void 0,loading:!1,serial:1,dtmplData:void 0}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"loadConfigData",(0,o.A)(E().mark((function e(){var r,n,o,a,i,c,u,l,s;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.sourceId,o.open,i=o.code,c=o.serverKey,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!i){e.next=9;break}return e.next=6,w.A.requestDtmplConfig(c,a,i);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,w.A.requestAddDtmplConfig(c,a,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=i){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:i,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:t.setState({dtmplConfig:l,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"loadData",function(){var e=(0,o.A)(E().mark((function e(r){var n,o,a,i,c,u,l,s,f;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.sourceId,a=n.code,i=n.defaultDtmplData,c=n.open,u=n.serverKey,l=n.codeSource,c){e.next=3;break}return e.abrupt("return");case 3:if(r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),(s=a)||!l){e.next=9;break}return e.next=8,A.A.queryCode(o,l,u);case 8:s=e.sent;case 9:if(!s){e.next=18;break}return t.setState({loading:!0,queryingCode:s,dtmplData:void 0}),e.next=13,A.A.getDtmplData(r,u,o,s);case 13:f=e.sent,t.state.queryingCode&&t.state.queryingCode!=f.code||f.sourceId&&t.props.sourceId!=f.sourceId||t.setState({dtmplData:f,id:s}),t.setState({loading:!1}),e.next=19;break;case 18:i?t.setState({dtmplData:i,loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 19:setTimeout((function(){return t.onValuesChange()}),300);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,s.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.setState({loading:!0}),t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),(0,s.A)(t,"getFooter",(function(){var e=t.props,r=e.onCancel,n=e.serverKey,o=t.state,a=(o.dtmplData,o.serial),i=o.loading,c=[],u=t.state.dtmplConfig,l=t.context.translate;return u&&u.buttons&&u.buttons.includes("dtmplSave")&&c.unshift((0,L.Y)(h.Ay,{type:"primary",loading:i,onClick:function(){return t.doSubmit()}},l("${保存}"))),u&&u.actions.forEach((function(e,r){c.unshift((0,L.Y)(x.A,{serverKey:n,iconType:"icon-title",hiddenType:"disabled",serial:a,key:e.id,formRef:t.formRef,actionConfig:e,doAction:t.doSubmit}))})),c.unshift((0,L.Y)(p.A,{key:"back",placement:"topLeft",title:l("${确定要取消本次修改内容吗}?"),onConfirm:r,okText:l("${确定}"),cancelText:l("${取消}")},(0,L.Y)(h.Ay,null,l("${取消}")))),c})),(0,s.A)(t,"onFinish",(function(e){t.setState({loading:!1}),e&&t.props.onOk(e)})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.props.open){t.next=3;break}return t.next=3,this.loadConfigData();case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(E().mark((function t(e){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.dtmplConfig,!e||e==this.props){t.next=9;break}if(e.sourceId==this.props.sourceId&&e.code==this.props.code&&e.addTmplId==this.props.addTmplId&&null!=r){t.next=7;break}return t.next=5,this.loadConfigData();case 5:t.next=9;break;case 7:return t.next=9,this.loadData(r);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.props,e=t.height,r=t.onCancel,n=t.sourceId,o=t.open,a=t.mainCode,i=t.width,c=t.pageType,u=t.placement,l=t.maxColsOnRow,s=t.title,h=t.serverKey,p=this.state,w=p.dtmplConfig,b=p.id,A=p.dtmplData,x=s||(w?w.title:"");return(0,L.Y)(f.Fragment,null," ","modal"==c?(0,L.Y)(d.A,{open:o,width:i,title:x,closable:!1,styles:{body:{height:e,overflow:"auto"}},destroyOnHidden:!0,centered:!0,onCancel:r,footer:this.getFooter()},(0,L.Y)(k.Ay,{autoHide:!0,autoHideTimeout:1e3},(0,L.Y)("div",{onClick:this.onClickBody},(0,L.Y)(m.A,{serverKey:h,mainCode:a,parentId:b,dtmplConfig:w,formRef:this.formRef,sourceId:n,onFinish:this.onFinish,maxColsOnRow:l,showConfirm:!1,dtmplData:A,onValuesChange:this.onValuesChange})))):"drawer"==c?(0,L.Y)(v.A,{onClick:this.onClickBody,title:x,placement:u,closable:!0,mask:!1,onClose:r,open:o,width:i,style:{maxWidth:1960},extra:(0,L.Y)(y.A,null,this.getFooter())},(0,L.Y)(m.A,{serverKey:h,mainCode:a,parentId:b,dtmplConfig:w,formRef:this.formRef,sourceId:n,onFinish:this.onFinish,maxColsOnRow:l,showConfirm:!1,dtmplData:A,onValuesChange:this.onValuesChange})):(0,L.Y)(g.A,{title:x},(0,L.Y)(m.A,{serverKey:h,mainCode:a,parentId:b,dtmplConfig:w,formRef:this.formRef,sourceId:n,onFinish:this.onFinish,maxColsOnRow:l,showConfirm:!1,dtmplData:A,onValuesChange:this.onValuesChange})))}}]);var r,n}(f.PureComponent);(0,s.A)(S,"defaultProps",{showConfirm:!0,height:"76vh",width:"76vw",bodyWidth:"100%",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},okText:"确定",cancelText:"取消",pageType:"modal",placement:"left"}),(0,s.A)(S,"contextType",C.U)},46704:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(92749),i=r(54763),c=r(69036),u=r(48287);function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(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)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function s(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 f(){f=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=p(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var h,p=[],d=!1,v=!1,y=new Map,g=new Map,m=new Map,w=new Map,b=new Map,A=new Map,x=new Map,k=new Map,C=new Map,L=new Map,E=new Map;function O(t){var e=[];return t&&t.forEach((function(t){var r=i.A.getSupportControlType(t);"caselect"!=r&&"select"!=r&&"multiselect"!=r&&"steps"!=r&&"preselect"!=r&&"checkbox"!=r&&"radio"!=r||g.has(t.mstrucId)||e.push(t.mstrucId)})),e}function S(t){var e=[];return t&&t.forEach((function(t){var r=O(t.writes);I(e,r),r=O(t.preposes),I(e,r)})),e}function Y(t,e){return j.apply(this,arguments)}function j(){return(j=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[],!r){t.next=7;break}return r.groups&&r.groups.forEach((function(t){var e=O(t.fields);I(n,e)})),o=S(r.actions),I(n,o),t.next=7,_(e,n);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(t,e){return e&&e.forEach((function(e){t.includes(e)||t.push(e)})),t}function P(t,e){return T.apply(this,arguments)}function T(){return(T=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],o=O(r.columns),I(n,o),o=O(r.criterias),I(n,o),t.next=7,_(e,n);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t,e){return D.apply(this,arguments)}function D(){return(D=(0,o.A)(f().mark((function t(e,r){var n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[],r){t.next=3;break}return t.abrupt("return");case 3:return o=O(r.columns),I(n,o),o=O(r.criterias),I(n,o),o=O(r.drillingParams),I(n,o),o=O(r.reStatParams),I(n,o),o=S(r.actions),I(n,o),o=S(r.rowActions),I(n,o),t.next=17,_(e,n);case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(t,e,r){return R.apply(this,arguments)}function R(){return(R=(0,o.A)(f().mark((function t(e,r,n){var o,i,c,u,s,h;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r&&r.length>0)){t.next=5;break}return t.next=3,a.A.requestEnum(e,r,n);case 3:for(i in o=t.sent){c=o[i],u=l(c);try{for(u.s();!(s=u.n()).done;)(h=s.value).css&&(h.color=h.css.color)}catch(t){u.e(t)}finally{u.f()}g.set(i,c)}case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){}F.loadEnumOfFields=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=O(r),t.next=3,_(e,n);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.loadEnumOfFieldsWithPath=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=O(r),t.next=3,_(e,o,n);case 3:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.getOptions=function(){var t=(0,o.A)(f().mark((function t(e,r){var n,o,i,c;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return",null);case 2:if(g.has(r)){t.next=7;break}return t.next=5,a.A.requestOptions(e,r)[r];case 5:if(null!=(n=t.sent)){o=l(n);try{for(o.s();!(i=o.n()).done;)(c=i.value).css&&(c.color=c.css.color)}catch(t){o.e(t)}finally{o.f()}g.set(r,n)}case 7:return t.abrupt("return",g.get(r));case 8:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestLtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(b.has(r)){t.next=10;break}return t.t0=b,t.t1=r,t.next=5,a.A.requestLtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),n=b.get(r),t.next=10,N(e,null==n?void 0:n.ltmplConfig);case 10:return t.abrupt("return",b.get(r));case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestL2LtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.has(r)){t.next=10;break}return t.t0=A,t.t1=r,t.next=5,a.A.requestL2LtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),n=A.get(r),t.next=10,N(e,null==n?void 0:n.ltmplConfig);case 10:return t.abrupt("return",A.get(r));case 11:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestSelectConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w.has(r)){t.next=9;break}return t.t0=w,t.t1=r,t.next=5,a.A.requestSelectConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=9,P(e,w.get(r));case 9:return t.abrupt("return",w.get(r));case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x.has(r)){t.next=11;break}return t.next=3,a.A.requestDtmplConfig(e,r,n);case 3:if(!(o=t.sent)||o.dynamic){t.next=8;break}x.set(r,o),t.next=9;break;case 8:return t.abrupt("return",o);case 9:return t.next=11,Y(e,o);case 11:return t.abrupt("return",x.get(r));case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.requestTtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.has(r)){t.next=6;break}return t.next=3,a.A.requestTtmplConfig(e,r);case 3:n=t.sent,k.set(r,n),k.set(n.id,n);case 6:return t.abrupt("return",k.get(r));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestViewDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(C.has(r)){t.next=9;break}return t.t0=C,t.t1=r,t.next=5,a.A.requestViewDtmplConfig(e,r);case 5:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=9,Y(e,C.get(r));case 9:return t.abrupt("return",C.get(r));case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.requestAddDtmplConfig=function(){var t=(0,o.A)(f().mark((function t(e,r,n){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=n||r,L.has(o)){t.next=10;break}return t.t0=L,t.t1=o,t.next=6,a.A.requestAddDtmplConfig(e,r,n);case 6:return t.t2=t.sent,t.t0.set.call(t.t0,t.t1,t.t2),t.next=10,Y(e,L.get(o));case 10:return t.abrupt("return",L.get(o));case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),F.getEnums=function(t){return g.get(t)},F.getEnumsValueMap=function(t){var e=m.get(t);if(!e){var r=g.get(t);if(!r)return null;e=new Map,m.set(t,e),r.map((function(t){e.set(t.value,t.value),e.set(t.id,t.value)}))}return e},F.getEnumOption=function(t,e){if(!e)return null;var r=this.getEnums(t),n=void 0;return r&&r.forEach((function(t){t.value!==e||(n=t)})),n},F.getEnumValueColor=function(t,e){var r=F.getEnumOption(t,e);return r?r.color:void 0},F.requestBlocks=function(){var t=(0,o.A)(f().mark((function t(e,r){var n,o,i,c,u;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v){t.next=8;break}return v=!0,t.next=4,a.A.requestBlocks(e||void 0,r||void 0);case 4:if(o=t.sent){i=l(o.blocks);try{for(i.s();!(c=i.n()).done;)u=c.value,p.push(u)}catch(t){i.e(t)}finally{i.f()}h=o.programName,n={blocks:o.blocks,l2MenuId:o.l2MenuId,blockId:o.blockId,programName:o.programName}}t.next=9;break;case 8:n={blocks:p,blockId:r,l2MenuId:e,programName:h};case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),F.initfastMenu=(0,o.A)(f().mark((function t(){var e,r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(y.size<1)){t.next=5;break}return t.next=3,a.A.requestFastMenu();case 3:if(e=t.sent)for(r in e)y.set(r,e[r]);case 5:case"end":return t.stop()}}),t)}))),F.fastMenu=function(){var t=(0,o.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d){t.next=4;break}return d=!0,t.next=4,F.initfastMenu();case 4:return t.abrupt("return",y.get(e));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F.reload=function(){var t=(0,o.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.A.reload();case 2:if("success"==t.sent.status){t.next=5;break}return t.abrupt("return");case 5:this.clear(),c.Ay.success((0,u.A)("${执行成功}"));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),F.cache=function(t){t&&E.set(t.code,t)},F.getCache=function(t){return E.get(t)},F.clear=(0,o.A)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y.clear(),g.clear(),b.clear(),x.clear(),C.clear(),L.clear(),w.clear(),A.clear(),p.splice(0,p.length),v=!1,E.clear();case 11:case"end":return t.stop()}}),t)}))),e.A=F},46935:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(8130),p=r(54638),d=r(46704),v=r(22733),y=r(46675),g=r(1849),m=r(28392),w=r(54839),b=r(56522),A=r(1026),x=r(17437);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(){C=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var E=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,f=new Array(l),p=0;p<l;p++)f[p]=arguments[p];return r=this,n=e,i=[].concat(f),n=(0,u.A)(n),t=(0,c.A)(r,L()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"state",{ltmplConfigRes:void 0,pageNo:void 0,pageSize:void 0,criteriaData:void 0,showDtmplView:!1,showDtmplEdit:!1,showDtmplCustomEdit:!1,selectedCode:void 0,showDraw:!1,ractionId:void 0,collapse:!1,addTmplId:void 0,dtmplSourceId:void 0}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"loadLtmplConfig",(0,o.A)(C().mark((function e(){var r,n,o,a,i,c,u;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.sourceId,o=r.serverKey,e.next=3,d.A.requestLtmplConfig(o,n);case 3:(a=e.sent)&&(u=null===(c=a.ltmplConfig)||void 0===c?void 0:c.defaultCriteriaValue)&&(i=t.toCriteriaData(u)),t.setState({ltmplConfigRes:a,criteriaData:i});case 6:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"toCriteriaData",(function(t){var e={};if(t)for(var r in t)e[r]=h.A.configParamTrans(t[r],null);return e.sequence=h.A.getRandomNum(6),e})),(0,s.A)(t,"showView",(function(e){var r=t.props.sourceId;t.setState({selectedCode:e.code,dtmplSourceId:e.dtmplSourceId?e.dtmplSourceId:r,showDtmplView:!0})})),(0,s.A)(t,"doEdit",(function(e){var r=t.props,n=r.doCustomEdit,o=r.sourceId;e.toCustomPage?n?n(e.code,e.mode,(function(){t.doSearch(t.state.criteriaData)})):t.setState({selectedCode:e.code,dtmplSourceId:e.dtmplSourceId?e.dtmplSourceId:o,showDtmplCustomEdit:!0}):t.setState({selectedCode:e.code,showDtmplEdit:!0})})),(0,s.A)(t,"doRAction",(function(e,r){t.setState({selectedCode:r,showDraw:!0,ractionId:e})})),(0,s.A)(t,"doCreate",(function(e,r){var n=t.props.doCustomCreate;r?n?n((function(){t.doSearch(t.state.criteriaData)})):t.setState({selectedCode:null,showDtmplCustomEdit:!0}):t.setState({selectedCode:null,showDtmplEdit:!0,addTmplId:e})})),(0,s.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),(0,s.A)(t,"doSearch",(function(e){var r=t.props,n=r.sourceId,o=r.mainCode,a=r.collapsible,i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e);o&&(i.mainCode=o),i.sourceId=n,a&&t.setState({collapse:!1}),t.setState({criteriaData:t.toCriteriaData(i)})})),(0,s.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),(0,s.A)(t,"handleDtmplEdit",(function(e){t.doSearch(t.state.criteriaData),t.setState({showDtmplEdit:!1})})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(C().mark((function t(){var e,r,n;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadLtmplConfig(),e=this.props,r=e.collapsible,n=e.initCollapse,r&&this.setState({collapse:n});case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(C().mark((function t(e){var r,n,o;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props,n=r.sourceId,o=r.mainCode,e&&e.sourceId==n?o&&e.mainCode!=o&&this.loadLtmplConfig():this.loadLtmplConfig();case 2:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.ltmplConfigRes,o=r.criteriaData,a=r.pageSize,i=r.pageNo,c=r.showDtmplView,u=r.selectedCode,l=r.showDtmplEdit,s=r.showDtmplCustomEdit,h=r.ractionId,d=r.showDraw,A=r.collapse,k=r.addTmplId,C=r.dtmplSourceId,L=this.props,E=L.sourceId,O=L.mainCode,S=L.showView,Y=L.doSearch,j=L.doRAction,I=L.funcMode,P=L.tip,T=L.title,N=L.collapsible,D=L.initCollapse,_=L.doCustomEdit,R=L.doCustomCreate,F=L.serverKey,G=L.rowOperatable,M=L.readOnly,K=this.context.translate;if(n){var B=n.ltmplConfig,$=B.buttons,V=B.customEditPagePath;return(0,x.Y)(f.Fragment,null,(0,x.Y)(p.A,{operatable:G,readOnly:M,tip:P,serverKey:F,pageSize:a,pageNo:i,onChangePage:this.onChangePage,collapsible:N,initCollapse:D&&A,title:T,funcMode:I,mainCode:O,showView:S||this.showView,doRAction:j||this.doRAction,doSearch:Y||this.doSearch,doEdit:this.doEdit,doCreate:this.doCreate,sourceId:E,criteriaData:o,customEditable:!!_,customCreatable:!!R,ltmplConfig:n.ltmplConfig}),$.includes("detail")&&c?(0,x.Y)(v.A,{serverKey:F,open:c,onCancel:function(){t.setState({showDtmplView:!1})},mainCode:O,sourceId:C||E,code:u}," "):"",($.includes("dtmplEdit")||$.includes("dtmplAdd"))&&l?(0,x.Y)(y.A,{addTmplId:k,serverKey:F,open:l,onCancel:function(){t.setState({showDtmplEdit:!1})},sourceId:C||E,mainCode:O,code:u,onOk:this.handleDtmplEdit}):"",s?(0,x.Y)(b.A,{serverKey:F,open:s,onOk:function(){t.doSearch(t.state.criteriaData),t.setState({showDtmplCustomEdit:!1})},customPath:V,sourceId:E,mainCode:O,code:u}):"",d?(0,x.Y)(g.A,{placement:"left",title:K("${关联查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:d,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,x.Y)(m.A,null,(0,x.Y)(w.Ay,{onClick:this.closeDrawer},K("${关闭}")))},(0,x.Y)(e,{serverKey:F,sourceId:h,mainCode:u})):null)}return(0,x.Y)(f.Fragment,null)}}]);var r,n}(f.PureComponent);(0,s.A)(E,"contextType",A.U),(0,s.A)(E,"defaultProps",{collapsible:!1,initCollapse:!1,readOnly:!1,rowOperatable:!0}),e.A=E},48177:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(33227),i=r(96540),c=r(677),u=r(53515),l=r(8130),s=r(94300),f=r(92749),h=r(17437);function p(){p=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}e.A=function(t){t.value,t.itemType;var e=t.fieldConfig,r=t.dataCode,n=(t.style,t.viewOrEdit,(0,s.Y)().translate,(0,i.useState)(!1)),d=(0,a.A)(n,2),v=(d[0],d[1]),y=(0,i.useState)(void 0),g=(0,a.A)(y,2),m=g[0],w=g[1],b=function(){var t=(0,o.A)(p().mark((function t(){var n,o,a,c,u,s,d;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.sourceId,o=e.serverKey,!r){t.next=8;break}return v(!0),t.next=5,f.A.requestFieldVersionList(o,n,r);case 5:if((a=t.sent)&&a.length>0){for(c=[],u=0;u<a.length;u++)s=a[u],d={title:s.value,description:(0,h.Y)(i.Fragment,null,s.userName,(0,h.Y)("br",null),l.A.formateDate(s.time))},c.push(d);w(c)}v(!1);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,i.useEffect)((function(){b()}),[]),(0,h.Y)(c.A,{style:{width:"100%",overflow:"hidden"}},(0,h.Y)(u.A,{current:m?m.length:0,progressDot:function(t,e){return e.status,e.index,(0,h.Y)(i.Fragment,null,t)},items:m,style:{overflow:"auto"}}))}},48287:function(t,e){"use strict";function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=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))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}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}e.A=function(t){var e=window.localStorage.getItem("locale"),n=JSON.parse(window.localStorage.getItem("langPkg"));if(!e||!n)return function(t){var e,n=[],o="",a="",i=!1,c=r(t);try{for(c.s();!(e=c.n()).done;){var u=e.value;if("$"!==u||i){if(i&&"{"===u)continue;i&&"}"===u?(n.push(a),i=!1,a=""):i?a+=u:o+=u}else i=!0,n.push(o),o=""}}catch(t){c.e(t)}finally{c.f()}return n.push(o),n.join("")}(t);var o,a=[],i=[],c=!1,u="",l="",s=!1,f=r(t);try{for(f.s();!(o=f.n()).done;){var h=o.value;if("$"!==h||s){if(s&&"{"===h)continue;s&&"}"===h?(void 0===(void 0===n[e]?void 0:n[e][l])&&(c=!0),a.push(l),i.push(!0),s=!1,l=""):s?l+=h:u+=h}else s=!0,""!==u&&(a.push(u),u="",i.push(!1))}}catch(t){f.e(t)}finally{f.f()}if(""!==u&&(a.push(u),i.push(!1)),c)return a.join("");for(var p="",d=0;d<a.length;d++)i[d]?p+=(0!==d?" ":"")+n[e][a[d]]:p+=a[d];return p}},49277:function(t,e,r){"use strict";r.d(e,{A:function(){return q}});var n=r(65425),o=r(50828),a=r(33227),i=r(96540),c=r(39356),u=r(89467),l=r(54839),s=r(36492),f=r(677),h=r(47152),p=r(16370),d=r(28392),v=r(16044),y=r(97135),g=r(22503),m=r(1490),w=r(94300),b=r(42877),A=r(50329),x=r(68e3),k=r(54774),C=r(28073),L=r(37977),E=r(62477),O=r(44274),S=r(2532),Y=r(63549),j=r(91985),I=r(11504),P=r(6754),T=r(19612),N=r(8130),D=r(1026),_=r(17437);function R(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(R=function(){return!!t})()}var F=function(t){function e(){var t,r,n,a;(0,O.A)(this,e);for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];return r=this,n=e,a=[].concat(c),n=(0,j.A)(n),t=(0,Y.A)(r,R()?Reflect.construct(n,a||[],(0,j.A)(r).constructor):n.apply(r,a)),(0,o.A)(t,"state",{interrupted:!1,exportId:void 0,percent:0,exportStatus:"ready",exportingMsg:""}),(0,o.A)(t,"context",void 0),(0,o.A)(t,"timerID",void 0),(0,o.A)(t,"setInerval",(function(e){t.timerID&&clearInterval(t.timerID),t.timerID=e})),(0,o.A)(t,"handleStart",(function(){var e=t.props,r=(e.title,e.serverKey),n=e.codes,o=e.fileExport;(0,E.A)(t.state),t.setState({exportStatus:"ready"});var a=t.context.getServiceLangStr;T.A.super({url:"/v3/export/ltmpl-data-filedata",serverKey:r,method:"GET",query:{language:a(),codes:n,sourceId:o.id}}).then((function(e){e.exportId?(t.setState({exportId:e.exportId,exportStatus:"exporting"}),t.statusOut(e.exportId),t.setInerval(setInterval((function(){return t.statusOut(e.exportId)}),2e3))):t.setState({exportStatus:"fail"})}))})),(0,o.A)(t,"statusOut",(function(e){var r=t.props.serverKey,n=t.state.exportStatus;T.A.super({url:"/v3/export/status",serverKey:r,query:{interrupted:"stop"==n,exportId:e},method:"GET"},"","none").then((function(e){"error"==e.status?(clearInterval(t.timerID),console.log(e.statusMsg,t.timerID),t.setState({exportingMsg:e.statusMsg,exportStatus:"stop",percent:0})):e.breaked?(clearInterval(t.timerID),t.setState({exportingMsg:"已终止",exportStatus:"stop",percent:0})):t.setState({exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}),"stop"==n&&clearInterval(t.timerID),!0===e.completed&&(clearInterval(t.timerID),t.setState({exportStatus:"success",exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}))}))})),(0,o.A)(t,"download",(function(){var e=t.props,r=e.title,n=e.serverKey,o=t.state.exportId,a=N.A.hydrocarbonToken();N.A.downloadFile(N.A.joinPath(N.A.api(n),"/v3/export/download?exportId=".concat(o,"&@token=").concat(a,"&@programToken=").concat(N.A.programCode(n))),r)})),(0,o.A)(t,"handleCancel",(function(){t.setState({percent:0,exportStatus:"stop",exportId:void 0})})),t}return(0,I.A)(e,t),(0,S.A)(e,[{key:"componentWillUnmount",value:function(){console.log("销毁")}},{key:"shouldComponentUpdate",value:function(t,e){return t&&t.codes&&this.props.codes&&this.props.codes!=t.codes&&this.setState({exportStatus:"ready",percent:0,exportingMsg:""}),!0}},{key:"render",value:function(){(0,E.A)(this.props);var t=this.state,e=t.exportStatus,r=t.percent,n=t.exportingMsg,o=this.context.translate;return(0,_.Y)("div",{style:{width:"400px"},className:"exportFrame"},(0,_.Y)("div",null,"ready"==e?(0,_.Y)(i.Fragment,null,(0,_.Y)(l.Ay,{type:"primary",onClick:this.handleStart},o("${开始导出}"))):"exporting"==e?(0,_.Y)(l.Ay,{onClick:this.handleCancel},o("${取消导出}")):(0,_.Y)(l.Ay,{onClick:this.handleStart},o("${重新导出}")),"success"==e?(0,_.Y)(l.Ay,{type:"primary",style:{marginLeft:10},disabled:"success"!=e,onClick:this.download},o("${下载文件}")):"",r>0?(0,_.Y)(P.A,{percent:r,size:"small",status:"active"}):"",(0,_.Y)("p",null,o("${"+n+"}"))))}}])}(i.PureComponent);(0,o.A)(F,"defaultProps",{}),(0,o.A)(F,"contextType",D.U);var G=function(t){var e=(0,w.Y)().translate,r=t.serverKey,n=t.codes,o=t.fileExport,a=t.disabled;return t.hiddenType,(0,_.Y)(C.A,{content:(0,_.Y)(F,{serverKey:r,codes:n,fileExport:o}),title:e("${"+o.title+"}"),placement:"bottomRight",trigger:"click"},(0,_.Y)(L.A,{title:e("${"+o.title+"}")},(0,_.Y)(l.Ay,{type:o.buttonType,disabled:a,danger:o.danger},e("${"+o.title+"}"))))};function M(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function K(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?M(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}c.A.Panel;var B=u.A.Item,$=(new Date).getTime(),V=function(t){var e=(0,w.Y)().translate,r=t.ltmplConfig,o=t.doSearch,c=t.doAction,C=t.doCustomButton,L=t.doJump,E=t.doDelete,O=t.selectedRows,S=t.data,Y=t.open,j=(t.loading,t.selectedDatas),I=t.doCQuery,P=t.serverKey,T=u.A.useForm(),N=(0,a.A)(T,1)[0],D=r.buttons,R=r.actions,F=r.customButtons,M=r.fileExports,V=r.jumps,q=r.cQuerys,H=r.criterias,z=r.drillingParams,U=r.columns,W=r.updrillButtonConfigs,Q=r.innerParams,J=r.defShowCriteriaCount,Z={},X=(0,i.useState)(null),tt=(0,a.A)(X,2),et=tt[0],rt=(tt[1],(0,i.useState)(null)),nt=(0,a.A)(rt,2),ot=nt[0],at=(nt[1],(0,i.useState)(!1)),it=(0,a.A)(at,2),ct=it[0],ut=it[1],lt=(0,i.useState)(!1),st=(0,a.A)(lt,2),ft=st[0],ht=st[1],pt=J<=0?H:H.slice(0,J);(0,i.useEffect)((function(){N.resetFields(),pt&&H&&pt.length<H.length&&ut(!0)}));var dt=D.includes("query")&&o,vt=D.includes("batchDelete")&&E,yt=!(O&&O.length>0),gt=function(r){if(r){var n=t.hiddenCriteriaIds,a=t.serverKey;return r.map((function(t){var e="c_"+t.id,r=S?S[e]:void 0;Z[e]=r})),o?r.map((function(r){var o="c_"+r.id,i=S?S[o]:void 0;if("ltree-entity-select"==(null==r?void 0:r.extControlType)||"ltree-entity-select-value"==(null==r?void 0:r.extControlType));else if(!n.includes(r.id))return(0,_.Y)(B,{label:e("${"+r.title+"}"),name:o,key:r.id,tooltip:r.tip,rules:r.required?[{required:!0,message:e("${请选择}"+r.title)}]:void 0},(0,_.Y)(y.A,{serverKey:a,mainCode:t.mainCode,value:i,fieldConfig:r}))})):void 0}};return(0,_.Y)(u.A,{form:N,name:"control-hooks",initialValues:Z,layout:"inline",onFinish:function(t){var e=(new Date).getTime();o&&e-$>3e3&&($=e,o(K(K({},t),{},{serial_number:$}))),o&&o(K(K({},t),{},{serial_number:$}))},onValuesChange:function(e,n){var o=k.vr.getAppCtmplConfig(r,S,t);o.onCriteriaValuesChange&&o.onCriteriaValuesChange(e,S,N)},style:{width:"100%"}},(0,_.Y)(f.A,{size:"small",style:{display:Y?"block":"none",width:"100%"}},(0,_.Y)(h.A,null,(0,_.Y)(p.A,null,(0,_.Y)(d.A,{size:"small",wrap:!0},dt||W&&W.length>0?gt(Q):null,D.includes("drilling")&&Y&&(z.length>0||(U.forEach((function(t){if("dimension"==t.statColType)return!0})),0)||r.showDim)?(0,_.Y)(i.Fragment,null,gt(z),function(){var t="drillingColIds",o=[],a=[];U.forEach((function(t){"dimension"==t.statColType&&(a.push({label:t.title,value:t.id}),o.push(t.id))})),a.push({label:e("${无}"),value:"5"}),Z[t]=S&&S[t]?S[t]:o;var i=S?S[t]:o,c={placeholder:e("${请选择}${维度}"),disabled:!1,value:i,style:{minWidth:220,width:"100%"}};return r.showDim?(0,_.Y)(B,{label:e("${维度}"),name:t,key:t,rules:[{required:!0,message:e("${请选择维度,上钻到顶层请只选[无]}")}]},(0,_.Y)(s.A,(0,n.A)({mode:"multiple"},c,{notFoundContent:e("${暂无选项}"),allowClear:!0,showSearch:!0,showArrow:!0,options:a}))):(0,_.Y)(u.A.Item,{hidden:!0,name:"drillingColIds"})}()):null,dt||W&&W.length>0?gt(ft?H:pt):null,(0,_.Y)(d.A,{className:"btns"},ct?ft?(0,_.Y)(l.Ay,{icon:(0,_.Y)(A.A,null),type:"link",onClick:function(){return ht(!1)}},e("${收起}")):(0,_.Y)(l.Ay,{icon:(0,_.Y)(x.A,null),type:"link",onClick:function(){return ht(!0)}},e("${更多条件}")):"",dt?(0,_.Y)(l.Ay,{type:"primary",htmlType:"submit"},e("${查询}")):"",vt?(0,_.Y)(v.A,{placement:"rightBottom",title:e("${确定要[删除]选中数据吗}?"),onConfirm:function(){E()},okText:e("${确定}"),cancelText:e("${取消}"),okType:"danger"},(0,_.Y)(l.Ay,{danger:!0,disabled:yt},e("${删除选中}"))):"",function(){if(c&&F&&F.length>0)return F.map((function(t){return O&&(O.length>0&&t.multible||O.length),(0,_.Y)(l.Ay,{key:t.id,type:t.buttonType?t.buttonType:"dashed",onClick:function(){return C(t,j)}},e("${"+t.title+"}"))}))}(),function(){if(c&&R&&R.length>0)return R.map((function(t){var e=!0;return O&&(O.length>0&&t.multible||1==O.length)&&(e=!1),(0,_.Y)(g.A,{serverKey:P,hiddenType:"disabled",key:t.id,disabled:e,data:j,actionConfig:t,doAction:c,serial:1})}))}(),function(){if(L&&V&&V.length>0)return V.map((function(t){var e=!0;return O&&1==O.length&&(e=!1),(0,_.Y)(l.Ay,{key:t.id,onClick:function(){return L(t)},disabled:e},t.title)}))}(),function(){var e=t.serverKey;if(I&&q&&q.length>0)return q.map((function(t){var r=!0;return O&&1==O.length&&(r=!1),(0,_.Y)(m.A,{serverKey:e,key:t.id,disabled:r,cQueryConfig:t,mainCode:r?void 0:O[0].code})}))}(),function(){if(W&&W.length>0){var t=0;return W.map((function(r){return t++,(0,_.Y)(i.Fragment,null,1==t?(0,_.Y)(u.A.Item,{hidden:!0,name:"updrillButtonId"}):null,(0,_.Y)(l.Ay,{loading:ot==r.id,disabled:!(!ot||ot==r.id),icon:et==r.id?(0,_.Y)(b.A,null):null,type:r.buttonType,shape:r.buttonShape,htmlType:"submit",onClick:function(){N.setFieldValue("updrillButtonId",r.id),N.setFieldValue("drillingColIds",r.dimensions),N.submit()}},e("${"+r.title+"}")))}))}}(),function(){if(c&&M&&M.length>0)return M.map((function(t){var e=!0;O&&(O.length>0&&t.multible||1==O.length)&&(e=!1);var r=[];return j&&j.forEach((function(t){r.push(t.code)})),(0,_.Y)(G,{serverKey:P,hiddenType:"disabled",codes:r,key:t.id,fileExport:t,disabled:e})}))}()))))))};V.defaultProps={hiddenCriteriaIds:[],open:!0};var q=V},49604:function(t,e,r){"use strict";r.d(e,{A:function(){return A}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(28392),f=r(54839),h=r(28073),p=r(22733),d=r(1026),v=r(78122),y=r(55208),g=r(68455),m=r(17437);function w(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 b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var A=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var l=arguments.length,p=new Array(l),d=0;d<l;d++)p[d]=arguments[d];return r=this,o=e,c=[].concat(p),o=(0,i.A)(o),t=(0,a.A)(r,b()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"state",{showDtmplView:!1,showSelectTable:!1,selectedCodes:void 0,openCode:void 0}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"showRfieldDtmplView",(function(e){t.setState({openCode:e,showDtmplView:!0})})),(0,u.A)(t,"hiddenDtmplView",(function(){t.setState({showDtmplView:!1})})),(0,u.A)(t,"handleRFieldSelect",(function(t){})),(0,u.A)(t,"deleteRFieldValue",(function(t){})),(0,u.A)(t,"showCount",(function(){var e=t.props,r=e.value,n=e.fieldConfig,o=r&&r.indexOf("@,@")>0?r.split("@,@"):r,a="",i=n.ellipsisLength?n.ellipsisLength:64;if(-1==i&&(i=1e3),o instanceof Array){var c,u=0,l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return w(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)?w(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(o);try{for(l.s();!(c=l.n()).done;){var s=c.value;if(u++,(a+=s&&s.indexOf("@R@")>0?s.split("@R@")[1]:s).length>=i)break}}catch(t){l.e(t)}finally{l.f()}return u}if(!(r.indexOf("@,@")>0))return 1})),(0,u.A)(t,"needMore",(function(){var e=t.props.value,r=e&&e.indexOf("@,@")>0?e.split("@,@"):e,n=t.showCount();return(r instanceof Array?r.length:1)>n})),(0,u.A)(t,"getValue",(function(e){var r=t.props,n=r.fieldConfig,o=r.value,a=n.buttons,i=o&&o.indexOf("@,@")>0?o.split("@,@"):o;return i instanceof Array?e&&e>0&&i.length>e&&(i=i.slice(0,e)):i=[o],a&&a.includes("detail")?(0,m.Y)(s.A,{key:e?e+1:1,size:"small",direction:n.itemBreakLine?"vertical":"horizontal",wrap:!0},i.map((function(e,r){var n=!!e&&e.indexOf("@R@")>0,o=n?e.split("@R@")[1]:e,a=e?e.split("@R@")[0]:void 0;return n?(0,m.Y)(f.Ay,{key:r,style:{padding:"0px 0px",height:"100%"},type:"link",title:"",onClick:function(){t.showRfieldDtmplView(a)}},t.showValue(o)):(0,m.Y)("span",{key:r},t.showValue(o))}))):(0,m.Y)(s.A,{key:e?e+2:2,size:"small",direction:n.itemBreakLine?"vertical":"horizontal",wrap:!0},i.map((function(e,r){var n=e&&e.indexOf("@R@")>0?e.split("@R@")[1]:e;return e&&e.split("@R@")[0],(0,m.Y)("span",{key:r},t.showValue(n))})))})),(0,u.A)(t,"showValue",(function(e){var r=t.props.fieldConfig;if(!/^\s*[\[{].*[\]}]\s*$/.test(e))return r.ellipsisLength&&-1!=r.ellipsisLength?(0,m.Y)(y.A,{isHtml:!1,value:e,showMax:r.ellipsisLength}):(0,m.Y)(h.A,{placement:"leftTop",content:e},(0,m.Y)("span",{className:"infoStyle"},e));var n=JSON.parse(e);return n.valid&&n.base?(0,m.Y)("div",{onClick:function(t){t.stopPropagation()}},(0,m.Y)(v.default,{fieldConfig:{id:"1",title:"文件"},value:e})):void 0})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.fieldConfig,r=(t.value,t.itemType,t.serverKey),n=this.state,o=n.showDtmplView,a=n.openCode,i=e.buttons,c=this.context.translate,u=this.getValue(this.showCount());return(0,m.Y)(l.Fragment,null,(0,m.Y)(s.A,{key:3,size:[8,16],wrap:!0,style:{minWidth:"80px"}},u,this.needMore()?(0,m.Y)(h.A,{overlayStyle:{maxWidth:"360px"},placement:"leftBottom",trigger:"click",content:this.getValue()},(0,m.Y)(f.Ay,{key:"more",type:"link",size:"small"},c("${更多}..."))):null,i&&i.includes("dtmplEdit")?(0,m.Y)(g.A,{serverKey:r,key:"dem",open:o,onCancel:this.hiddenDtmplView,onOk:this.hiddenDtmplView,sourceId:e.sourceId,code:a}):i&&i.includes("detail")?(0,m.Y)(p.A,{serverKey:r,key:"mdv",open:o,onCancel:this.hiddenDtmplView,sourceId:e.sourceId,code:a}):""))}}])}(l.PureComponent);(0,u.A)(A,"contextType",d.U)},49814:function(t,e,r){"use strict";r.d(e,{A:function(){return C}});var n=r(42455),o=r(65425),a=r(38452),i=r(17636),c=r(44274),u=r(2532),l=r(63549),s=r(91985),f=r(11504),h=r(50828),p=r(96540),d=r(71057),v=r(46704),y=r(17437),g=["fieldConfig","onChange","value"];function m(){m=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function A(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return x(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)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function x(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 k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var C=function(t){function e(){var t,r,n,o;(0,c.A)(this,e);for(var a=arguments.length,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f];return r=this,n=e,o=[].concat(u),n=(0,s.A)(n),t=(0,l.A)(r,k()?Reflect.construct(n,o||[],(0,s.A)(r).constructor):n.apply(r,o)),(0,h.A)(t,"state",{options:[]}),(0,h.A)(t,"handleChange",(function(e){var r=t.props.onChange,n=void 0;e&&(n=e.join("->")),r&&r(n)})),(0,h.A)(t,"getOptions",(0,i.A)(m().mark((function e(){var r,n,o,a,i,c,u,l,s;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.fieldConfig,o=r.baseValue,a=r.serverKey,e.next=3,v.A.getOptions(a,n.mstrucId);case 3:return i=e.sent,c=[],l=i,s=u=[],o.length>0?o.map((function(t,e){if(e>0&&(s[0].subOptions=[],s=s[0].subOptions),l){var r,n=A(l);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.title==t&&(s.push(b({},o)),l=o.subOptions)}}catch(t){n.e(t)}finally{n.f()}}})):u=i,t.buildOptions(u,c),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e)})))),(0,h.A)(t,"buildOptions",(function(e,r){e.forEach((function(e){var n={};if(n.value=e.title,n.label=e.title,n.key=e.id,r.push(n),e.subOptions){var o=[];n.children=o,t.buildOptions(e.subOptions,o)}else n.isLeaf=!0}))})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(r=(0,i.A)(m().mark((function t(){var e;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getOptions();case 2:e=t.sent,this.setState({options:e});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.options,e=this.props,r=(e.fieldConfig,e.onChange,e.value),n=(0,a.A)(e,g);return(0,y.Y)(d.A,(0,o.A)({displayRender:function(t){return t.join("->")},options:t,value:r?r.split("->"):void 0,onChange:this.handleChange},n))}}]);var r}(p.PureComponent);(0,h.A)(C,"defaultProps",{baseValue:[]})},50477:function(){},54040:function(t,e,r){"use strict";r.d(e,{A:function(){return d}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(76945),f=r(1026),h=r(17437);function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var d=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var l=arguments.length,s=new Array(l),f=0;f<l;f++)s[f]=arguments[f];return r=this,o=e,c=[].concat(s),o=(0,i.A)(o),t=(0,a.A)(r,p()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"context",void 0),(0,u.A)(t,"scrollToAnchor",(function(e){if(e){var r=document.getElementById(t.props.parentId+e.id);r&&r.scrollIntoView({behavior:"smooth",block:"end"})}})),(0,u.A)(t,"scroll",(function(t){t.preventDefault(),t.stopPropagation();var e=document.getElementsByClassName("rightBar")[0];e&&(e.getElementsByTagName("ul")[0].style.marginTop="")})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this,e=this.props,r=e.dtmplConfig,n=e.positionRight,o=[],a=this.context.translate;return r&&r.groups.forEach((function(t){o.push({title:t.title,id:t.id})})),r&&r.premises&&r.premises.length>0&&o.push({id:r.premises[0].id,title:a("${默认字段}")}),o&&o.length>3?(0,h.Y)(s.A,{style:{position:"absolute",top:60,right:n},offsetTop:80},(0,h.Y)("div",{className:"rightBar",onScroll:this.scroll},(0,h.Y)("ul",null,o?o.map((function(e,r){return(0,h.Y)("li",{onClick:function(){return t.scrollToAnchor(e)},key:r},e.title)})):""))):""}}])}(l.PureComponent);(0,u.A)(d,"defaultProps",{positionRight:15}),(0,u.A)(d,"contextType",f.U)},54638:function(t,e,r){"use strict";r.d(e,{A:function(){return de}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(45448),d=r(69036),v=r(677),y=r(54839),g=r(1849),m=r(37187),w=r(28073),b=r(37977),A=r(28392),x=r(91196),k=r(47152),C=r(16370),L=r(42729),E=r(36552),O=r(40756),S=r(42877),Y=r(49237),j=r(39822),I=r(77028),P=r(71822),T=r(25668),N=r(13341),D=r(80581),_=r(92749),R=r(44601),F=r(49277),G=r(8130),M=r(29197),K=r(61021),B=r(53357),$=r(94300),V=r(17437);function q(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return H(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)?H(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function H(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 z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(z=function(){return!!t})()}var U=(0,K.Zj)((function(t){var e=t.value,r=t.index,n=t.disabledColIds,o=(0,$.Y)().translate;return(0,V.Y)(C.A,{key:r,span:24},(0,V.Y)(x.A,{disabled:n.includes(e.id),value:e.id},(0,V.Y)(W,null)," ",o("${"+e.title+"}")))})),W=(0,K.D)((function(){return(0,V.Y)(M.A,{style:{cursor:"grab",color:"#999"}})})),Q=(0,K.q6)((function(t){var e=t.items,r=t.selected,n=t.onChange,o=t.disabledColIds;return(0,V.Y)(x.A.Group,{value:r,onChange:n},(0,V.Y)(k.A,{style:{width:"148px"}},e.map((function(t,e){return(0,V.Y)(U,{key:"item-".concat(t.id),index:e,value:t,disabledColIds:o})}))))})),J=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,z()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"onChange",(function(e){var r,n=t.props,o=n.onChangeHiddenCols,a=n.columns,i=n.ignoredColIds,c=[],u=q(a);try{for(u.s();!(r=u.n()).done;){var l=r.value;0==e.length||e.includes(l.id)||i.includes(l.id)||c.push(l.id)}}catch(t){u.e(t)}finally{u.f()}o(c)})),(0,f.A)(t,"onSortEnd",(function(e){var r=e.oldIndex,n=e.newIndex,o=t.props,a=o.columns,i=o.onChangeColSort;r!==n&&i((0,B.p)([].concat(a),r,n).filter((function(t){return!!t})))})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"render",value:function(){var t=this.props,e=t.hiddenColIds,r=t.columns,n=t.disabledColIds,o=[];if(r){var a,i=q(r);try{for(i.s();!(a=i.n()).done;){var c=a.value;e&&e.includes(c.id)||o.push(c.id)}}catch(t){i.e(t)}finally{i.f()}}return(0,V.Y)(Q,{disabledColIds:n,helperClass:"row-dragging",items:r,selected:o,onChange:this.onChange,onSortEnd:this.onSortEnd})}}])}(h.PureComponent);(0,f.A)(J,"defaultProps",{ignoredColIds:[]});var Z=J,X=r(50770),tt=r(7142),et=r(6754),rt=r(19612),nt=r(1026);function ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ot=function(){return!!t})()}var at=X.Ay.Group,it=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,ot()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"state",{interrupted:!1,disabledPageNoInput:!1,disabledCurrentPageRadio:!1,disabledAllPageRadio:!1,exportId:void 0,startPageNo:1,endPageNo:10,exportMode:"all",percent:0,exportStatus:"ready",exportingMsg:""}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"onChangeRadio",(function(e){t.setState({exportMode:e.target.value,startPageNo:1,endPageNo:10})})),(0,f.A)(t,"timerID",void 0),(0,f.A)(t,"setInerval",(function(e){t.timerID&&clearInterval(t.timerID),t.timerID=e})),(0,f.A)(t,"handleStart",(function(){var e=t.props,r=e.queryKey,n=e.currentPage,o=(e.title,e.serverKey),a=e.type,i=e.sourceId,c=t.state,u=c.startPageNo,l=c.endPageNo,s=c.exportMode;t.setState({exportStatus:"ready"});var f=t.context.getServiceLangStr;rt.A.super({url:"/v3/export/".concat(a),serverKey:o,method:"GET",query:{sourceId:i,language:f(),scope:s,withDetail:!1,queryKey:r.key,startPageNo:"page"==s?u:null==n?void 0:n.pageNo,endPageNo:"page"==s?l:null==n?void 0:n.pageNo}}).then((function(e){e.exportId?(t.setState({exportId:e.exportId,exportStatus:"exporting"}),t.statusOut(e.exportId),t.setInerval(setInterval((function(){return t.statusOut(e.exportId)}),2e3))):t.setState({exportStatus:"fail"})}))})),(0,f.A)(t,"statusOut",(function(e){var r=t.props.serverKey,n=t.state.exportStatus;rt.A.super({url:"/v3/export/status",serverKey:r,query:{interrupted:"stop"==n,exportId:e},method:"GET"},"","none").then((function(e){"error"==e.status?(clearInterval(t.timerID),console.log(e.statusMsg,t.timerID),t.setState({exportingMsg:e.statusMsg,exportStatus:"stop",percent:0})):e.breaked?(clearInterval(t.timerID),t.setState({exportingMsg:"已终止",exportStatus:"stop",percent:0})):t.setState({exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}),"stop"==n&&clearInterval(t.timerID),!0===e.completed&&(clearInterval(t.timerID),t.setState({exportStatus:"success",exportingMsg:e.statusMsg,percent:Math.floor(e.current/e.totalCount*100)}))}))})),(0,f.A)(t,"download",(function(){var e=t.props,r=e.title,n=e.serverKey,o=t.state.exportId,a=G.A.hydrocarbonToken();G.A.downloadFile(G.A.joinPath(G.A.api(n),"/v3/export/download?exportId=".concat(o,"&@token=").concat(a,"&@programToken=").concat(G.A.programCode(n))),r)})),(0,f.A)(t,"handleCancel",(function(){t.setState({percent:0,exportStatus:"stop",exportId:void 0})})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentWillUnmount",value:function(){console.log("销毁")}},{key:"shouldComponentUpdate",value:function(t,e){var r,n;return t&&t.queryKey&&this.props.queryKey&&(null===(r=this.props.queryKey)||void 0===r?void 0:r.key)!=(null===(n=t.queryKey)||void 0===n?void 0:n.key)&&this.setState({exportStatus:"ready",percent:0,exportingMsg:"",exportMode:"all"}),!0}},{key:"render",value:function(){var t=this,e=this.props,r=e.defaultExportMode,n=(e.currentPage,e.exportModes),o=this.state,a=o.startPageNo,i=o.endPageNo,c=o.disabledPageNoInput,u=o.exportMode,l=o.exportStatus,s=o.percent,f=o.exportingMsg,p=this.context.translate;return(0,V.Y)("div",{style:{width:"400px"},className:"exportFrame"},(0,V.Y)(h.Fragment,null,(0,V.Y)(at,{onChange:this.onChangeRadio,value:u,defaultValue:r},n.includes("current")?(0,V.Y)(X.Ay,{value:"current",disabled:"exporting"==l},p("${当前页}")):null,n.includes("page")?(0,V.Y)(X.Ay,{value:"page",disabled:"exporting"==l},p("${多页}")):null,n.includes("all")?(0,V.Y)(X.Ay,{value:"all",disabled:"exporting"==l},p("${全部}")):null),(0,V.Y)(E.A,null)),"page"==u?(0,V.Y)("div",null,p("${页号}:"),(0,V.Y)(tt.A,{min:1,value:a,placeholder:p("${开始页号}"),onChange:function(e){return t.setState({startPageNo:e})},disabled:c}),"-",(0,V.Y)(tt.A,{min:1,value:i,placeholder:p("${结束页号}"),onChange:function(e){return t.setState({endPageNo:e})},disabled:c}),(0,V.Y)(E.A,null)):"",(0,V.Y)("div",null,"ready"==l?(0,V.Y)(h.Fragment,null,(0,V.Y)(y.Ay,{type:"primary",onClick:this.handleStart},p("${开始导出}"))):"exporting"==l?(0,V.Y)(y.Ay,{onClick:this.handleCancel},p("${取消导出}")):(0,V.Y)(y.Ay,{onClick:this.handleStart},p("${重新导出}")),"success"==l?(0,V.Y)(y.Ay,{type:"primary",style:{marginLeft:10},disabled:"success"!=l,onClick:this.download},p("${下载文件}")):"",s>0?(0,V.Y)(et.A,{percent:s,size:"small",status:"active"}):"",(0,V.Y)("p",null,p("${"+f+"}"))))}}])}(h.PureComponent);(0,f.A)(it,"defaultProps",{defaultExportMode:"all",type:"ltmpl-data-excel",exportModes:["current","page","all"]}),(0,f.A)(it,"contextType",nt.U);var ct=r(62477),ut=r(46704);function lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ft(){ft=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ht(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ht=function(){return!!t})()}var pt=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var c=arguments.length,s=new Array(c),h=0;h<c;h++)s[h]=arguments[h];return r=this,n=e,o=[].concat(s),n=(0,l.A)(n),t=(0,u.A)(r,ht()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"state",{pageNo:void 0,pageSize:void 0,ltmplConfigRes:void 0,criteriaData:{}}),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(ft().mark((function e(r){var n,o,a,i;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.serverKey,e.next=3,ut.A.requestL2LtmplConfig(a,o);case 3:i=e.sent,t.setState({ltmplConfigRes:i,criteriaData:r});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"doSearch",(function(e){var r=t.props,n=r.sourceId,o=r.innerQueryKey,a=st({},e);(0,ct.A)(t.state),a.innerQueryKey=o,a.sourceId=n,t.setState({criteriaData:a})})),(0,f.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(ft().mark((function t(){var e,r,n,o;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.state.criteriaData,r=this.props,n=r.sourceId,o=r.innerQueryKey,e.innerQueryKey=o,e.sourceId=n,this.loadData(e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(ft().mark((function t(e){var r,n,o,a,i,c,u,l;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props,n=r.sourceId,o=r.innerQueryKey,a=e.sourceId,i=e.innerQueryKey,c=this.state.criteriaData,n&&n!=a?((u={}).innerQueryKey=o,u.sourceId=n,this.loadData(u)):o!=i&&((l=st({},c)).innerQueryKey=o,this.setState({criteriaData:l}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state,e=t.ltmplConfigRes,r=t.criteriaData,n=t.pageNo,o=t.pageSize,a=this.props,i=a.sourceId,c=a.serverKey;return e?(0,V.Y)(de,{serverKey:c,pageSize:o,pageNo:n,onChangePage:this.onChangePage,doSearch:this.doSearch,level:"l2",criteriaData:r,sourceId:i,ltmplConfig:e.ltmplConfig}):""}}]);var r,n}(h.PureComponent),dt=pt,vt=r(89467),yt=r(47852),gt=r(56679),mt=r(43455);function wt(){wt=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bt=function(){return!!t})()}var At=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var c=arguments.length,s=new Array(c),p=0;p<c;p++)s[p]=arguments[p];return r=this,n=e,o=[].concat(s),n=(0,l.A)(n),t=(0,u.A)(r,bt()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"state",{popoverOpen:!1,loading:!1}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"formRef",h.createRef()),(0,f.A)(t,"onRestat",function(){var e=(0,a.A)(wt().mark((function e(r){var n,o,a,i;return wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.onfinish,i=n.serverKey,t.setState({loading:!0}),e.next=4,_.A.increCalc(i,o,r);case 4:t.setState({loading:!1}),a(r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"render",value:function(){var t=this,e=this.state,r=e.popoverOpen,n=e.loading,o=this.props,a=o.fields,i=o.value,c=o.serverKey,u=this.context.translate;return(0,V.Y)(w.A,{open:r,content:(0,V.Y)(v.A,{loading:n,style:{width:1e3},title:u("${重新统计}"),bodyStyle:{overflow:"auto"},extra:(0,V.Y)(h.Fragment,null,(0,V.Y)(A.A,{size:[8,0]},(0,V.Y)(y.Ay,{type:"primary",onClick:function(){t.formRef.current.submit()}},u("${确定}")),(0,V.Y)(y.Ay,{onClick:function(){t.setState({popoverOpen:!1})}},(0,V.Y)(yt.A,null))))},(0,V.Y)(vt.A,{labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onRestat},(0,V.Y)(mt.A,{serverKey:c,nameAttr:"id",fields:a,valueMap:i}))),placement:"bottomLeft",trigger:"click"},(0,V.Y)(b.A,{title:u("${重新统计}")},(0,V.Y)(y.Ay,{onClick:function(){t.setState({popoverOpen:!r})}},(0,V.Y)(gt.A,null))))}}])}(h.PureComponent);(0,f.A)(At,"defaultProps",{}),(0,f.A)(At,"contextType",nt.U);var xt=At,kt=r(13050),Ct=r(84957),Lt=r(1157),Et=r(57878),Ot=r(33227),St=r(21426),Yt=r(54763),jt=r(16044),It=r(30234),Pt=r(8597),Tt=r(11058),Nt=r(25714),Dt=r(39277),_t=r(57046),Rt=r(93598),Ft=r(52318),Gt=r(27251),Mt=r(92295),Kt=function(t){var e,r=t.showView,n=t.data,o=t.ltmplConfig,a=void 0;return o.classViewConfigs&&o.classViewConfigs.forEach((function(t){!a&&Gt.A.isShow(t.preposes,[n],void 0)&&(a=(0,V.Y)(y.Ay,{size:"small",type:"primary",icon:(0,V.Y)(Mt.A,null),onClick:function(){return r({code:n.code,dtmplSourceId:t.id})}}))})),!a&&Gt.A.isShow(null===(e=o.buttonViewAction)||void 0===e?void 0:e.preposes,[n],void 0)&&(a=(0,V.Y)(y.Ay,{size:"small",type:"primary",icon:(0,V.Y)(Mt.A,null),onClick:function(){return r({code:n.code})}})),a||(0,V.Y)(h.Fragment,null)},Bt=r(40261),$t=function(t){var e,r=t.doEdit,n=t.data,o=t.ltmplConfig,a=void 0;return o.classEditConfigs&&o.classEditConfigs.forEach((function(t){!a&&Gt.A.isShow(t.preposes,[n],void 0)&&(a=(0,V.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,V.Y)(Bt.A,null),onClick:function(){return r({code:n.code,mode:"update",dtmplSourceId:t.id})}}))})),!a&&Gt.A.isShow(null===(e=o.buttonEditAction)||void 0===e?void 0:e.preposes,[n],void 0)&&(a=(0,V.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,V.Y)(Bt.A,null),onClick:function(){return r({code:n.code,mode:"update"})}})),a||(0,V.Y)(h.Fragment,null)},Vt=r(22503),qt=r(1490),Ht=r(54774),zt=r(23170);function Ut(){Ut=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Wt(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}var Qt={buildTableColumns:function(t){var e=this,r=t.ltmplConfig,n=t.hiddenColIds,o=t.hiddenRowCodes,a=t.sortedColConfigs,i=t.unHiden,c=t.onHide,u=t.translate,l=t.sortColumns,s=t.serverKey,f=[],p=0,d=a||r.columns,v=0;return d.forEach((function(a){var d={};if(!n||!n.includes(a.originalId)){f.push(d),d.title=a.title,d.dataIndex=a.id,d.key=a.id,a.colWidth&&(d.width=a.colWidth),a.statColType&&(d.statColType=a.statColType),a.aggFunc&&(d.cal=a.aggFunc),a.order&&(d.order=Number(a.order)),p++;var y=Yt.A.getSupportControlType(a);if(p<12&&"操作"!=a.title&&"序号"!=a.title&&n.includes("10000")){var g=e.handleColumnOrder(d.dataIndex,l);a.sortable&&St.A.sort(d,y,g)}"序号"===a.title?(d.width=a.colWidth?a.colWidth:50,d.title=u("${序号}"),d.align=a.valueAlign?a.valueAlign:"center",d.render=function(t,e,r){return(0,V.Y)("label",null,r+1)},a.sorter=void 0):"10000"==a.id?e.setSortProps(d,a,u):"20000"==a.id?e.setHiddenRecordOpt(d,o,i,c,u):"操作"===a.title&&t.operatable?(d["操作"]="1",d.fixed="right",d.align="left",d.width=a.colWidth?a.colWidth:160,d.className="opsColumn",d.title=(0,V.Y)(h.Fragment,null,u("${操作}")),d.render=function(r,n){return e.renderAction(t,n)}):(v++,d.className="opsColumn",d.title=u("${"+a.title+"}"),d.width=a.colWidth?a.colWidth:160,d.ellipsis={showTitle:!0},d.align=a.valueAlign?a.valueAlign:"left",r.leftFixedCols&&r.leftFixedCols>=v?d.fixed="left":d.fixed=!!a.colFixed&&("right"==a.colFixed?"right":"left"),d.render=function(t,e){return(0,V.Y)("div",{className:e.dataType?"小计"==e.dataType?"xiaoji":"heji":""},(0,V.Y)(Ht.Zo,{serverKey:s,fieldConfig:a,value:e[a.id],holderType:"table"}))})}})),console.log("columns",f),f},setSortProps:function(t,e,r){t.title=(0,V.Y)(b.A,{title:r("${拖拽排序}")},r("${"+e.title+"}")),t.width=40,t.dataIndex=e.id,t.key=e.id,t.className="drag-visible",t.render=function(){return(0,V.Y)(Jt,null)}},setHiddenRecordOpt:function(t,e,r,n,o){t.align="center",t.width=40,t.title=(0,V.Y)(h.Fragment,null,e.length>0?(0,V.Y)(b.A,{title:o("${取消隐藏}")},(0,V.Y)(y.Ay,{style:{marginRight:"0px"},size:"small",shape:"circle",icon:(0,V.Y)(It.A,null),type:"text",onClick:function(){return r()}})):""),t.render=function(t,e){return(0,V.Y)(b.A,{title:o("${隐藏}")}," ",(0,V.Y)(y.Ay,{style:{marginRight:"0px"},icon:(0,V.Y)(Pt.A,null),type:"dashed",size:"small",onClick:function(){return n(e.code)}}))}},buildReportTableColumns:function(t){var e=this,r=t.columnConfigs,n=t.translate,o=t.leftFixedCols,a=t.hiddenColIds,i=t.hiddenRowCodes,c=t.unHiden,u=t.onHide,l=[],s=0;return r.forEach((function(t){if(!(t.hidden||a&&a.includes(t.originalId))){var r,f={};t.upperColumnTitle?(l.forEach((function(e){e.title==t.upperColumnTitle&&e.children&&(r=e)})),r?r.children.push(f):l.push({title:t.upperColumnTitle,children:[f]})):l.push(f),f.title=t.title,f.dataIndex=t.id,f.key=t.id,t.colWidth&&(f.width=t.colWidth),t.order&&(f.order=Number(t.order)),"序号"===t.title?(f.width=t.colWidth?t.colWidth:50,f.title=n("${序号}"),f.align=t.valueAlign?t.valueAlign:"center",f.render=function(e,r,n){return(0,V.Y)("label",{className:r.dataType?"小计"==r.dataType?"xiaoji":"heji":""},r[t.id])},t.sorter=void 0):"10000"==t.id?e.setSortProps(f,t,n):"20000"==t.id?e.setHiddenRecordOpt(f,i,c,u,n):(s++,f.className="opsColumn",f.title=n("${"+t.title+"}"),f.width=t.colWidth?t.colWidth:160,f.ellipsis={showTitle:!0},f.align=t.valueAlign?t.valueAlign:"left",f.fixed=o&&o>=s?"left":!!t.colFixed&&("right"==t.colFixed?"right":"left"),f.render=function(e,r){return(0,V.Y)("div",{className:r.dataType?"小计"==r.dataType?"xiaoji":"heji":""},(0,V.Y)(Ht.Zo,{fieldConfig:t,value:r[t.id],holderType:"table"}))})}})),console.log("columns",l),l},handleColumnOrder:function(t,e){if(Array.isArray(e)){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Wt(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)?Wt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(e);try{for(n.s();!(r=n.n()).done;){var o=r.value.split("_"),a=(0,Ot.A)(o,2),i=a[0],c=a[1];if(i!==t);else{if("asc"===c)return"ascend";if("desc"===c)return"descend"}}}catch(t){n.e(t)}finally{n.f()}}},renderAction:function(t,e){var r,n,o,i,c=t.ltmplConfig,u=t.showView,l=t.doEdit,s=t.doRAction,f=t.customEditable,h=t.serverKey,p=t.readOnly,d=t.sourceId,v=t.translate,g=t.doCustomButton,m=t.doRowJump,x=t.blockMenuTreeDrawerOpen,k=t.doRowAction,C=t.doDeleteByCode,L=c.buttons,E=c.builtInButtons,O=c.defShowRowActionCount,S=[];L.includes("detail")&&u&&Gt.A.isShow(null===(r=c.buttonViewAction)||void 0===r?void 0:r.preposes,[e],void 0)&&S.push((0,V.Y)(Kt,{showView:u,data:e,ltmplConfig:c})),L.includes("customDetail")&&u&&Gt.A.isShow(null===(n=c.buttonViewAction)||void 0===n?void 0:n.preposes,[e],void 0)&&S.push((0,V.Y)(y.Ay,{size:"small",type:"primary",icon:(0,V.Y)(Tt.A,null),onClick:function(){return u({code:e.code})}})),L.includes("dtmplEdit")&&l&&!p&&S.push((0,V.Y)($t,{doEdit:l,data:e,ltmplConfig:c})),null!=E&&E.includes("blockAuthMenuTree")&&!p&&S.push((0,V.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,V.Y)(Nt.A,{rotate:180,style:{color:"#f5222d",marginRight:"4px"}}),onClick:function(){return x(e)}})),(L.includes("dtmplCustomEdit")||f)&&l&&!p&&Gt.A.isShow(null===(o=c.buttonEditAction)||void 0===o?void 0:o.preposes,[e],void 0)&&S.push((0,V.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,V.Y)(Dt.A,null),onClick:function(){return l({code:e.code,mode:"update",toCustomPage:!0})}})),L.includes("copy")&&l&&!p&&S.push((0,V.Y)(b.A,{title:v("${复制}")},(0,V.Y)(y.Ay,{size:"small",type:"dashed",icon:(0,V.Y)(_t.A,null),onClick:(0,a.A)(Ut().mark((function t(){var r,n;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,(L.includes("dtmplCustomEdit")||f)&&(r=!0),t.next=4,_.A.doCopy(h,d,e.code);case 4:(n=t.sent)&&l({code:n,mode:"update",toCustomPage:r});case 6:case"end":return t.stop()}}),t)})))}))),c.rowCustomButtons&&c.rowCustomButtons.map((function(t){Gt.A.isShow(t.preposes,[e],void 0)&&S.push((0,V.Y)(y.Ay,{key:t.id,size:"small",type:t.buttonType?t.buttonType:"dashed",onClick:function(){return g(t,[e])}},v("${"+t.title+"}")))})),c.ractions&&!p&&c.ractions.map((function(t){S.push(Gt.A.isShow(null==t?void 0:t.preposes,[e],void 0)?(0,V.Y)(y.Ay,{key:t.id,size:"small",type:"dashed",onClick:function(){return s(t.id,e.code)}},v("${"+t.title+"}")):"")})),c.rowActions&&!p&&c.rowActions.length>0&&c.rowActions.map((function(t){S.push((0,V.Y)(Vt.A,{serverKey:h,iconType:"icon",key:t.id,data:[e],actionConfig:t,doAction:k,buttonSize:"small",serial:1}))})),c.rowJumps&&c.rowJumps.length>0&&!p&&c.rowJumps.map((function(t){Gt.A.isShow(t.preposes,[e],void 0)&&S.push((0,V.Y)(y.Ay,{key:t.id,size:"small",type:"dashed",onClick:function(){return m(t,e)}},v("${"+t.title+"}")))})),c.rowCQuerys&&c.rowCQuerys.length>0&&!p&&c.rowCQuerys.map((function(t){Gt.A.isShow(t.preposes,[e],void 0)&&S.push((0,V.Y)(qt.A,{serverKey:h,key:t.id,size:"small",pageType:"drawer",cQueryConfig:t,mainCode:t.mainCodeColId?e[t.mainCodeColId]:e.code}))})),c.rowFileButtons&&c.rowFileButtons.length>0&&c.rowFileButtons.map((function(t){var r=e[t.fieldId];r&&(r instanceof Array&&(r=r[0]),r.includes("@R@")>0&&(r=r.split("@R@")[1]),S.push((0,V.Y)(zt.A,{title:t.title,filePath:_.A.toFilePath(r,h),serverKey:h,key:t.id})))})),L.includes("singleDelete")&&!p&&Gt.A.isShow(null===(i=c.buttonDeleteAction)||void 0===i?void 0:i.preposes,[e],void 0)&&S.push((0,V.Y)(jt.A,{placement:"rightBottom",title:v("${确定要[删除]此数据吗}?"),onConfirm:function(){C(e.code)},okText:v("${确定}"),cancelText:v("${取消}"),okType:"danger"},(0,V.Y)(y.Ay,{size:"small",type:"dashed",danger:!0},(0,V.Y)(Rt.A,null))));var Y=[];return O<=0||O>=S.length?Y=S:(Y=S.slice(0,O)).push((0,V.Y)(w.A,{content:(0,V.Y)(A.A,{wrap:!0},S.slice(O,S.length)),title:"更多操作",trigger:"hover"},(0,V.Y)(y.Ay,{size:"small",icon:(0,V.Y)(Ft.A,null),shape:"circle"}))),(0,V.Y)(A.A,{size:[0,4],wrap:!0},Y)}},Jt=(0,K.D)((function(){return(0,V.Y)(M.A,{style:{cursor:"grab",color:"#999"}})}));function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function te(){te=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}var ee=function(t){var e=(0,h.useState)(!1),r=(0,Ot.A)(e,2),n=r[0],i=r[1],c=(0,h.useState)(void 0),u=(0,Ot.A)(c,2),l=u[0],s=u[1],f=(0,h.useState)(void 0),p=(0,Ot.A)(f,2),d=p[0],v=p[1],y=(0,$.Y)(),g=y.getServiceLangStr,m=y.translate,w=t.tableProps,b=t.columns,A=t.queryKey,x=t.serverKey,k=t.leftFixedCols,C=t.hiddenColIds;(0,h.useEffect)((function(){var t=function(){var t=(0,a.A)(te().mark((function t(){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!A){t.next=3;break}return t.next=3,E(A.key,x);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[null==A?void 0:A.key]);var E=function(){var t=(0,a.A)(te().mark((function t(e,r){var n,o;return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i(!0),t.next=3,_.A.requestQueryReportData(r,e,g());case 3:if((null==(n=t.sent)?void 0:n.key)==e){t.next=8;break}return t.abrupt("return");case 8:o=[],n.entities&&n.entities.forEach((function(t,e){if(t){var r=Xt(Xt({key:t.code,code:t.code},t.fieldMap),{},{index:e});o.push(r)}})),s(o),v(n),i(!1);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),O=null!=d&&d.columnConfigs?Qt.buildReportTableColumns({columnConfigs:(0,o.A)(d.columnConfigs),translate:m,leftFixedCols:k,hiddenColIds:C}):b,S=20;return O.forEach((function(t){S+=t.width?t.width:140})),function(t){if(d){var e=d.rowGrids;t.forEach((function(t){e&&(t.onCell=function(r,n){var o=e[r.code];if(o&&o.cellMap)return o.cellMap[t.dataIndex]?Xt({},o.cellMap[t.dataIndex]):{colSpan:1,rowSpan:1}})}))}}(O),(0,V.Y)(L.A,{size:null!=w&&w.size?w.size:void 0,loading:n,columns:O,dataSource:l,scroll:-1==(null==w?void 0:w.scrollY)||0==(null==w?void 0:w.scrollY)?null:{y:null==w?void 0:w.scrollY,x:S},bordered:!0,pagination:!1,style:{display:b?"block":"none"}})},re=r(97135);function ne(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return oe(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)?oe(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function oe(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 ae(){ae=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ie(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ce(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ue=function(){return!!t})()}var le=p.A.Content,se=p.A.Sider,fe=["20000","10000"],he=(new Date).getTime(),pe=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,M=new Array(s),K=0;K<s;K++)M[K]=arguments[K];return r=this,n=e,c=[].concat(M),n=(0,l.A)(n),t=(0,u.A)(r,ue()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{sortedColConfigs:void 0,queryKey:void 0,loading:!0,disableCols:void 0,hiddenColIds:fe,selectedRows:[],selectedDatas:[],hiddenRowCodes:[],viewModels:[],drillingColIds:void 0,disabledColIds:void 0,showL2ActTable:!1,showL2Chart:!1,recordCode:void 0,blockMenuTreeDrawerOpen:!1,showCustomCard:!1,customButtonData:void 0,customButton:void 0,showRatmplSelector:!1,aggregateVO:void 0,restatParams:void 0,pageInfo:{pageNo:1,pageSize:10},ltreeData:{}}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(ae().mark((function e(r,n,a){var i,c,u,l,s,f,h,p,d,v,y,g,m,w,b;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.props,c=i.sourceId,u=i.criteriaData,l=i.ltmplConfig,s=i.mainCode,f=i.level,h=i.pageNo,p=i.pageSize,d=i.serverKey,t.isSameSourceQuery(c,u)){e.next=3;break}return e.abrupt("return");case 3:if(l){e.next=5;break}return e.abrupt("return");case 5:if(t.setState({loading:!0}),v=[],y=(0,o.A)(r),u&&u.drillingColIds&&(g=(0,o.A)(u.drillingColIds),l.columns.forEach((function(t){"dimension"!=t.statColType||g.includes(t.id)||y.includes(t.id)||(y.push(t.id),v.push(t.id)),"dimension"!=t.statColType||g.includes(t.id)||v.includes(t.id)||v.push(t.id)})),y=y.filter((function(t){return!g.includes(t)}))),l.columns.forEach((function(t){t.hidden&&y.push(t.id)})),m=l.defaultPageSize,w={pageNo:h||1,pageSize:p||m||10,virtualEndPageNo:void 0},!f||"l2"!=f){e.next=18;break}return e.next=15,_.A.requestL2LtmplQueryKey(d,c,ce(ce(ce({},u),w),{},{mainCode:s}));case 15:b=e.sent,e.next=21;break;case 18:return e.next=20,_.A.requestLtmplQueryKey(d,c,ce(ce(ce({},u),w),{},{mainCode:s}));case 20:b=e.sent;case 21:b.sourceId&&b.sourceId!=t.props.sourceId||t.setState({pageInfo:w,disabledColIds:v,hiddenColIds:y,hiddenRowCodes:n,sortedColConfigs:a,queryKey:b,showL2Chart:!1,selectedRows:[],selectedDatas:[],viewModels:t.state.viewModels.length>0?t.state.viewModels:["table"]}),t.setState({loading:!1});case 23:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doCustomButton",function(){var e=(0,a.A)(ae().mark((function e(r,n){var o,a,i,c,u;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.buttonClickable()){e.next=2;break}return e.abrupt("return");case 2:if(o=t.props,a=o.serverKey,o.sourceId,i=r.doType,c=G.A.getCustomButtonConfig(r.id),"request_refresh"!=i){e.next=29;break}if(!c||!c.doAction){e.next=11;break}return e.next=9,c.doAction(r,n);case 9:e.next=26;break;case 11:if(!c||!c.getRequestUrl){e.next=19;break}return e.next=14,c.getRequestUrl(r,n);case 14:return u=e.sent,e.next=17,_.A.doPostRequest(a,u);case 17:e.next=26;break;case 19:if(!r.path){e.next=24;break}return e.next=22,_.A.doPostRequest(a,r.path);case 22:e.next=26;break;case 24:return d.Ay.error("Button Config Error"),e.abrupt("return");case 26:t.doSearchDirect(null),e.next=30;break;case 29:"show_window"==i?t.setState({showCustomCard:!0,customButton:r,customButtonData:n}):d.Ay.error("Unsuport Button dotype "+i);case 30:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"renderAboveCustomPage",(function(){return t.renderCustomPage("above-table")})),(0,f.A)(t,"renderOhterCustomPage",(function(){return(0,V.Y)(h.Fragment,null,t.renderCustomPage("under-table"),t.renderCustomPage("modal-window"),t.renderCustomPage("left-drawer"),t.renderCustomPage("right-drawer"))})),(0,f.A)(t,"renderCustomPage",(function(e){var r=t.context.translate,n=t.state,o=n.customButton,a=n.customButtonData;if(!o)return"";if(e&&e!=o.windowPosition)return"";var i,c={customButton:o,data:a},u=G.A.getCustomButtonConfig(o.id);if(u&&u.getCurrentPage&&(i=u.getCurrentPage(o,a)),i||(i=G.A.getCustomPage(o.id)),!i)return d.Ay.error("Not found CustomButton Page"),void t.setState({customButton:void 0});var l=h.createElement(i,c);return"under-table"==o.windowPosition||"above-table"==o.windowPosition?(0,V.Y)(v.A,{id:"CustomCard"+o.id,size:"small",style:{marginTop:"6px"},extra:(0,V.Y)(y.Ay,{size:"small",danger:!0,onClick:function(){t.setState({customButton:void 0})}}," ",r("${关闭}"))},l):"left-drawer"==o.windowPosition||"right-drawer"==o.windowPosition?(0,V.Y)(g.A,{open:!0,id:"CustomCard"+o.id,placement:"right-drawer"==o.windowPosition?"right":"left",width:o.windowWidth,onClose:function(){t.setState({customButton:void 0})}},l):"modal-window"==o.windowPosition?(0,V.Y)(m.A,{open:!0,closable:!0,width:o.windowWidth,style:{height:o.windowHeight},onCancel:function(){t.setState({customButton:void 0})}},l):void 0})),(0,f.A)(t,"isSameSourceQuery",(function(t,e){return!(t&&e&&e.sourceId&&e.sourceId!=t||e.menuId&&e.menuId!=t)})),(0,f.A)(t,"handleShowChart",(function(){t.setState({showL2Chart:!t.state.showL2Chart})})),(0,f.A)(t,"handleDataAnalysis",(function(){t.setState({showL2ActTable:!t.state.showL2ActTable})})),(0,f.A)(t,"unHiden",(function(){t.props.ltmplConfig;var e=t.state;e.hiddenColIds,e.sortedColConfigs,t.setState({hiddenRowCodes:[]})})),(0,f.A)(t,"onHide",(function(e){var r=t.state.hiddenRowCodes,n=[].concat((0,o.A)(r),[e]);t.setState({hiddenRowCodes:n})})),(0,f.A)(t,"changeViewModel",(function(e){t.setState({viewModels:e})})),(0,f.A)(t,"changeHiddenColumns",(function(e){t.setState({showL2Chart:!1,hiddenColIds:e})})),(0,f.A)(t,"doSelectedAction",function(){var e=(0,a.A)(ae().mark((function e(r,n,o){var a;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.state.selectedRows,t.doAction(r,a,o);case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doAction",function(){var e=(0,a.A)(ae().mark((function e(r,n,o){var a,i,c,u,l;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.props.serverKey,i=t.state,c=i.hiddenColIds,u=i.hiddenRowCodes,l=i.sortedColConfigs,t.setState({loading:!0}),e.next=5,_.A.postActions(a,r,n,o);case 5:e.sent?t.loadData(c,u,l):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doRowAction",function(){var e=(0,a.A)(ae().mark((function e(r,n,o){return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.doAction(r,[{title:void 0,code:n[0]}],o);case 1:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doDelete",(0,a.A)(ae().mark((function e(){var r,n,o,a,i,c,u,l,s;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props,n=r.sourceId,o=r.serverKey,a=r.mainCode,i=t.state,c=i.selectedRows,u=i.hiddenColIds,l=i.hiddenRowCodes,s=i.sortedColConfigs,t.setState({loading:!0}),e.next=5,_.A.deleteData(o,n,c,a);case 5:e.sent?t.loadData(u,l,s):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"doDeleteByCode",function(){var e=(0,a.A)(ae().mark((function e(r){var n,o,a,i,c,u,l,s;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,o=n.sourceId,a=n.serverKey,i=n.mainCode,c=t.state,u=c.hiddenColIds,l=c.hiddenRowCodes,s=c.sortedColConfigs,t.setState({loading:!0}),e.next=5,_.A.deleteByCode(a,o,[r],i);case 5:e.sent?t.loadData(u,l,s):t.setState({loading:!1});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"doSelectedCQuery",function(){var t=(0,a.A)(ae().mark((function t(e){return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,f.A)(t,"doJump",function(){var t=(0,a.A)(ae().mark((function t(e,r){var n,o,a,i,c,u,l,s,f,h,p,d,v,y,g,m,w;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=r.fieldMap?r.fieldMap:r,o=null,(a=e.path)||(a="/"),0==a.indexOf("#")||0==o.indexOf("/#")?o="":0==a.indexOf("http://")||0==a.indexOf("HTTP://")||0==a.indexOf("https://")||0==a.indexOf("HTTPS://")?(o=a.split("//")[0]+"//",a=a.split("//")[1]):o=new URL(window.location.href).pathname,i=a.split("/"),!(c=e.routeParams)){t.next=37;break}u=0;case 9:if(!(u<i.length)){t.next=34;break}if(0!=i[u].indexOf(":")){t.next=31;break}l=i[u].substring(1),s=ne(c),t.prev=13,s.s();case 15:if((f=s.n()).done){t.next=23;break}if(!(h=f.value)||l!=h.title){t.next=21;break}return p=n[h.id]?n[h.id]:h.defaultValue,i[u]=p,t.abrupt("break",23);case 21:t.next=15;break;case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(13),s.e(t.t0);case 28:return t.prev=28,s.f(),t.finish(28);case 31:u++,t.next=9;break;case 34:o=G.A.joinPath(o,i.join("/")),t.next=38;break;case 37:o=G.A.joinPath(o,a);case 38:if(d=e.searchParams,v=[],e.tokenName&&(v[0]=e.tokenName+"="+G.A.hydrocarbonToken()),d)for(y=v.length,g=0;g<d.length;g++)m=d[g],(w=n[m.id]?n[m.id]:m.defaultValue)||"code"!=m.title||(w=r.code),v[y+g]=m.title+"="+w;v.length>0&&(o.indexOf("?")!=o.length-1&&(o+="?"),o+=v.join("&")),0==o.indexOf("#")||0==o.indexOf("/#")||0==o.indexOf("//#")?window.location.hash=o.substring(o.indexOf("#")+1):window.open(o);case 44:case"end":return t.stop()}}),t,null,[[13,25,28,31]])})));return function(e,r){return t.apply(this,arguments)}}()),(0,f.A)(t,"blockMenuTreeDrawerOpen",(function(e){t.setState({blockMenuTreeDrawerOpen:!0,recordCode:e.code})})),(0,f.A)(t,"doRowJump",function(){var e=(0,a.A)(ae().mark((function e(r,n){return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.doJump(r,n);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"renderExportButton",(function(e,r,n){var o=t.props,a=o.pageNo,i=o.pageSize,c=o.serverKey,u=o.ltmplConfig,l=o.tableType,s=t.state.queryKey,f=t.context.translate,h="report"==l?["all"]:["current","page","all"];return(0,V.Y)(w.A,{content:(0,V.Y)(it,{currentPage:{pageNo:a||1,pageSize:i||u.defaultPageSize},exportModes:h,type:r,serverKey:c,queryKey:s,sourceId:n,title:f("${"+u.title+"}-${"+e+"}")}),title:f("${"+e+"}"),placement:"bottomRight",trigger:"click"},(0,V.Y)(b.A,{title:f("${"+e+"}")},(0,V.Y)(y.Ay,{style:{marginLeft:"5px"}},"ltmpl-data-excel"==r?(0,V.Y)(O.A,null):e)))})),(0,f.A)(t,"renderFileExportButton",(function(){var e=t.props.ltmplConfig,r=null==e?void 0:e.topFileExports;return r?r.map((function(e){return t.renderExportButton(e.title,"ltmpl-data-filedata",e.id)})):(0,V.Y)(h.Fragment,null)})),(0,f.A)(t,"doSelectedJump",function(){var e=(0,a.A)(ae().mark((function e(r){var n;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:1==(n=t.state.selectedDatas).length&&t.doJump(r,n[0]);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"changeRowSelection",(function(e,r){t.setState({selectedRows:e,selectedDatas:r})})),(0,f.A)(t,"onChangeColSort",(function(e){t.setState({sortedColConfigs:e})})),(0,f.A)(t,"getAddTmplButton",(function(e){var r=t.context.translate;return e&&e.length<1?r("${没有分类添加按钮}"):e.map((function(e){return(0,V.Y)("p",null,(0,V.Y)(y.Ay,{size:"small",type:"text",onClick:function(){return t.props.doCreate(e.id,!1)}},e.title))}))})),(0,f.A)(t,"renderHeaderButtons",(function(){var e=t.state,r=e.hiddenColIds,n=e.viewModels,o=e.sortedColConfigs,a=e.disabledColIds,i=(e.showL2Chart,e.showL2ActTable),c=e.restatParams,u=t.props,l=u.ltmplConfig,s=u.sourceId,f=u.doCreate,p=u.doSearch,d=u.menuId,v=u.funcMode,g=u.customCreatable,m=u.serverKey,L=u.readOnly,E=t.context.translate,O=l.buttons;return(0,V.Y)(h.Fragment,null,(0,V.Y)(A.A,null,"common"==v&&t.criteriaFormUseful()?(0,V.Y)(w.A,{trigger:"click",content:t.renderCriteriaForm()},(0,V.Y)(y.Ay,null,(0,V.Y)(S.A,null))):null,O.includes("ratmplSelect")&&!L?(0,V.Y)(y.Ay,{onClick:function(){return t.setState({showRatmplSelector:!0})}},E("${选择}")):"",O.includes("dtmplAdd")&&f&&!L?l.classAddConfigs&&l.classAddConfigs.length>0?(0,V.Y)(w.A,{arrow:!1,content:t.getAddTmplButton(l.classAddConfigs),placement:"bottomRight"},(0,V.Y)(b.A,null,(0,V.Y)(y.Ay,null,(0,V.Y)(Y.A,null)))):(0,V.Y)(b.A,{title:E("${创建}")},(0,V.Y)(y.Ay,{onClick:function(){return f(null,!1)}},(0,V.Y)(Y.A,null))," "):"",(O.includes("dtmplCustomAdd")||g)&&f&&!L?(0,V.Y)(b.A,{title:E("${创建}")},(0,V.Y)(y.Ay,{onClick:function(){return f(null,!0)}},(0,V.Y)(j.A,null))):"",O.includes("importLtmplExcel")&&!L?(0,V.Y)(b.A,{title:E("${导入}")}," ",(0,V.Y)(y.Ay,{href:"#".concat("v2"===localStorage.getItem("version")?"/v2":"","/").concat(s,"/importer?menuId=").concat(d),target:"_blank"},(0,V.Y)(I.A,null))):"",O.includes("exportLtmplExcel")&&!L?t.renderExportButton("导出","ltmpl-data-excel"):"",t.renderFileExportButton(),"",O.includes("analysis")?(0,V.Y)(b.A,{title:E(i?"${隐藏}${数据分析}":"${展示}${数据分析}")},(0,V.Y)(y.Ay,{onClick:t.handleDataAnalysis},(0,V.Y)(P.A,null))):"",O.includes("reStat")&&!L?(0,V.Y)(xt,{value:c,serverKey:m,fields:l.reStatParams,sourceId:s,onfinish:function(e){t.actTableDoSearch(null),t.setState({restatParams:e})}}):"",(0,V.Y)(w.A,{content:(0,V.Y)(x.A.Group,{value:n,onChange:t.changeViewModel},(0,V.Y)(k.A,{style:{width:"120px"}},(0,V.Y)(C.A,{span:24},(0,V.Y)(x.A,{value:"table"},E("${表格}"))),(0,V.Y)(C.A,{span:24},(0,V.Y)(x.A,{value:"verticalList"},E("${纵向列表}"))))),title:E("${视图}"),placement:"bottomRight",trigger:"click"},(0,V.Y)(b.A,{title:E("${选择视图}")},(0,V.Y)(y.Ay,null,(0,V.Y)(T.A,null)))),(0,V.Y)(w.A,{content:(0,V.Y)(Z,{columns:o,disabledColIds:a,hiddenColIds:r,onChangeColSort:t.onChangeColSort,onChangeHiddenCols:t.changeHiddenColumns}),title:E("${排序和选择列}"),placement:"bottomRight",trigger:"click"},(0,V.Y)(b.A,{title:E("${点击排序和选择列}")},(0,V.Y)(y.Ay,null,(0,V.Y)(N.A,null)))),p?(0,V.Y)(y.Ay,{className:"hoverbig",title:E("${刷新}"),onClick:function(){t.actTableDoSearch(null)}},(0,V.Y)(D.A,null)):""))})),(0,f.A)(t,"criteriaFormUseful",(function(){var e=t.props.ltmplConfig,r=e.buttons,n=e.criterias,o=e.updrillButtonConfigs;return!!((r.includes("query")||o&&o.length>0)&&(n&&n.length>0||r.includes("drilling"))||t.checkBoxUseful())})),(0,f.A)(t,"checkBoxUseful",(function(){var e=t.props.ltmplConfig,r=e.buttons,n=e.jumps,o=e.actions,a=e.fileExports;return!!(r.includes("batchDelete")||o&&o.length>0||n&&n.length>0||a&&a.length>0)})),(0,f.A)(t,"actTableDoSearch",(function(e){var r=t.state.ltreeData;t.doSearch_(e,r)})),(0,f.A)(t,"doSearch_",function(){var e=(0,a.A)(ae().mark((function e(r,n){var o,a;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props.doSearch,a=(new Date).getTime(),!(o&&a-he>2e3)){e.next=6;break}return he=a,e.next=6,o(ce(ce({},r),{},{serial_number:he},n));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"ltreeValueChange",function(){var e=(0,a.A)(ae().mark((function e(r){var n,o,a,i;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.getLtreeEntitySelectCriteria(),o=t.state.ltreeData,a=t.props.criteriaData,!o||o["c_"+n.id]==r){e.next=9;break}return(i={})["c_"+n.id]=r,e.next=8,t.doSearch_(a,i);case 8:t.setState({ltreeData:i});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"doSearchDirect",(function(e){var r=t.props.doSearch;r&&r(ce(ce({},e),{},{serial_number:he}))})),(0,f.A)(t,"buttonClickable",(function(){var t=(new Date).getTime();return t-he>1500&&(he=t,!0)})),(0,f.A)(t,"renderCriteriaForm",(function(){var e=t.state,r=e.loading,n=e.selectedRows,o=e.selectedDatas,a=t.props,i=a.ltmplConfig,c=a.criteriaData,u=a.serverKey,l=a.sourceId;return(0,V.Y)(F.A,{key:l,serverKey:u,loading:r,selectedDatas:o,selectedRows:n,doCustomButton:t.doCustomButton,ltmplConfig:i,data:c,doCQuery:t.doSelectedCQuery,doAction:t.doSelectedAction,doDelete:t.doDelete,doJump:t.doSelectedJump,doSearch:t.actTableDoSearch})})),(0,f.A)(t,"getLtreeEntitySelectCriteria",(function(){var e=t.props.ltmplConfig;if(e&&e.criterias){var r,n=ne(e.criterias);try{for(n.s();!(r=n.n()).done;){var o=r.value;if("ltree-entity-select"==(null==o?void 0:o.extControlType)||"ltree-entity-select-value"==(null==o?void 0:o.extControlType))return o}}catch(t){n.e(t)}finally{n.f()}}})),(0,f.A)(t,"renderContent",(function(){var e=t.state,r=e.queryKey,n=e.loading,a=e.selectedRows,i=e.hiddenRowCodes,c=e.viewModels,u=e.sortedColConfigs,l=e.hiddenColIds,s=e.showL2ActTable,f=e.pageInfo,d=t.props,y=d.sourceId,g=d.ltmplConfig,m=d.funcMode,w=d.operatable,b=d.title,A=d.collapsible,x=d.onChangePage,O=d.serverKey,S=d.criteriaData,Y=d.showView,j=d.doEdit,I=d.doRAction,P=d.customEditable,T=d.readOnly,N=d.tableType,D=t.context.translate;if(!g||!y)return(0,V.Y)(h.Fragment,null,(0,V.Y)(v.A,{loading:n}),(0,V.Y)(L.A,{loading:n}));var _=Qt.buildTableColumns({ltmplConfig:g,operatable:w,hiddenColIds:l,hiddenRowCodes:i,sortedColConfigs:u,showView:Y,doEdit:j,doRAction:I,customEditable:P,serverKey:O,readOnly:T,sourceId:y,translate:D,unHiden:t.unHiden,onHide:t.onHide,doCustomButton:t.doCustomButton,doRowJump:t.doRowJump,blockMenuTreeDrawerOpen:t.blockMenuTreeDrawerOpen,doRowAction:t.doRowAction,doDeleteByCode:t.doDeleteByCode,sortColumns:S.sortColIds}),F=g.buttons,G=!1;"simple"==m||"common"==m?G=!1:t.criteriaFormUseful()&&(G=!0);var M=[];if(u){var K,B=ne(u);try{for(B.s();!(K=B.n()).done;){var $=K.value;l.includes($.id)||M.push($)}}catch(t){B.e(t)}finally{B.f()}}var q=[];Array.isArray(S.sortColIds)&&q.push.apply(q,(0,o.A)(S.sortColIds));var H=t.getLtreeEntitySelectCriteria();return(0,V.Y)(h.Fragment,null,F.includes("analysis")&&s?(0,V.Y)("div",null,(0,V.Y)(dt,{serverKey:O,innerQueryKey:r.key,sourceId:y}),(0,V.Y)(E.A,{dashed:!0,style:{borderTopColor:"#40a9ff"},plain:!0})):"",(0,V.Y)("div",{className:"actTable"},(0,V.Y)(k.A,null,(0,V.Y)(C.A,{span:24},"complete"==m||"common"==m?A?null:(0,V.Y)("span",null,g.header?(0,V.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:g.header}}):null,(0,V.Y)("h3",null," ",(0,V.Y)("p",{style:{position:"relative",float:"left",marginBottom:"4px"}}," ",b?"string"==typeof b?D("${"+b+"}"):b:D("${"+g.title+"}")),(0,V.Y)("p",{className:"fr",style:{marginBottom:"4px"}},t.renderHeaderButtons()))):null)),(0,V.Y)(k.A,null,(0,V.Y)(C.A,{span:24},(0,V.Y)(p.A,{hasSider:!0,style:{backgroundColor:"#fff"}},(0,V.Y)(se,{width:H?260:0,theme:"light",style:{paddingRight:H?"10px":"0px"}},H?(0,V.Y)(re.A,{style:{width:"300px"},onChange:t.ltreeValueChange,fieldConfig:H}):null),(0,V.Y)(p.A,{style:{backgroundColor:"#fff"}},(0,V.Y)(le,{style:{overflow:"initial"}},G?t.renderCriteriaForm():null,n?(0,V.Y)(L.A,{loading:n}):"report"==N?(0,V.Y)(ee,{tableProps:{scrollY:g.scrollY,clickDisplayTotal:!g.directShowTotal},serverKey:O,hiddenColIds:l,maxSelectedRows:t.checkBoxUseful()?1e3:-1,columns:_,selectedRows:a,queryKey:r,onChangeRowSelection:t.changeRowSelection,leftFixedCols:g.leftFixedCols}):(0,V.Y)(R.A,{key:y,sourceId:y,tableProps:{scrollY:g.scrollY,clickDisplayTotal:!g.directShowTotal},serverKey:O,onChangePage:x,viewModels:c,primaryColumn:g.primaryColumn,columnConfigs:M,summaryConfigs:g.totalColumnConfigs,maxSelectedRows:t.checkBoxUseful()?1e4:-1,selectedRows:a,columns:_,hiddenRowCodes:i,pageInfo:f,queryKey:r,onChangeRowSelection:t.changeRowSelection,subtotalXColumn:null==g.subtotalXColumn||g.subtotalXColumn.length<=0?null:g.subtotalXColumn,groupIColumns:g.groupIColumns,doSearch:t.actTableDoSearch,sortColumnData:q})))))),g.footer?(0,V.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:g.footer}}):null))})),(0,f.A)(t,"saveRatmplSelect",function(){var e=(0,a.A)(ae().mark((function e(r){var n,o,a,i,c,u,l,s;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setState({showRatmplSelector:!1}),n=t.props,o=n.serverKey,a=n.sourceId,i=n.mainCode,n.doSearch,r&&!(r.length<=0)){e.next=4;break}return e.abrupt("return");case 4:c=[],u=ne(r);try{for(u.s();!(l=u.n()).done;)s=l.value,c.push(s.code)}catch(t){u.e(t)}finally{u.f()}return e.next=9,_.A.saveRatmplSelectCodes(o,a,i,c);case 9:t.actTableDoSearch(null);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(ae().mark((function t(){var e,r,n,a,i;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.props,r=e.ltmplConfig,n=e.tableType,a=this.context.translate,i=void 0,r&&(i="report"==n?r.columns:[{id:"10000",title:a("${排序}"),originalId:"10000"},{id:"20000",title:a("${隐藏}"),originalId:"20000"}].concat((0,o.A)(r.columns))),this.loadData(fe,[],i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(ae().mark((function t(e){var r,n,a,i,c,u,l,s,f,h,p,d,v,y,g,m,w,b,A;return ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props,n=r.sourceId,a=r.criteriaData,i=r.ltmplConfig,c=r.tableType,u=r.pageSize,l=r.pageNo,s=this.context.translate,f=e.ltmplConfig,h=e.criteriaData,p=e.sourceId,d=e.pageSize,v=e.pageNo,this.isSameSourceQuery(n,a)){t.next=5;break}return t.abrupt("return",!1);case 5:if(d==u&&l==v||this.setState({pageInfo:{pageNo:l,pageSize:u}}),y=this.state,g=y.hiddenColIds,m=y.sortedColConfigs,w=G.A.transQueryParamsToStr(a,!1,["pageSize","pageNo"]),b=G.A.transQueryParamsToStr(h,!1,["pageSize","pageNo"]),!(n&&p!=n||i&&(!f||i.id!=f.id))&&(w==b||a.menuId&&h.menuId!=a.menuId)){t.next=20;break}if(!f||i.id!=f.id){t.next=15;break}return t.next=13,this.loadData(g,[],m);case 13:t.next=20;break;case 15:return A=void 0,i&&(A="report"==c?i.columns:[{id:"10000",title:s("${排序}"),originalId:"10000"},{id:"20000",title:s("${隐藏}"),originalId:"20000"}].concat((0,o.A)(i.columns))),this.setState({viewModels:["table"]}),t.next=20,this.loadData(fe,[],A);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state,r=e.queryKey,n=e.loading,o=e.blockMenuTreeDrawerOpen,a=e.recordCode,i=e.showRatmplSelector,c=this.props,u=c.sourceId,l=c.ltmplConfig,s=c.title,f=c.collapsible,p=c.initCollapse,d=c.tip,y=c.serverKey,g=c.mainCode;return l&&u?(0,V.Y)(h.Fragment,null,this.renderAboveCustomPage(),f?(0,V.Y)(kt.A,{initCollapse:p,title:(0,V.Y)(h.Fragment,null,s||l.title,(0,V.Y)(Ct.A,{content:d||(l?l.tip:null)})),id:r+l.id,className:"hoverable",styles:{header:{background:"#f2f4f5"},body:{padding:"6px"}},loading:n,extra:this.renderHeaderButtons()},this.renderContent()):(0,V.Y)(h.Fragment,null,this.renderContent()),this.renderOhterCustomPage(),(0,V.Y)(Lt.A,{onOk:function(){t.setState({blockMenuTreeDrawerOpen:!1})},onCancel:function(){t.setState({blockMenuTreeDrawerOpen:!1})},open:o,roleCode:a}),i?(0,V.Y)(Et.A,{serverKey:y,open:i,onOK:this.saveRatmplSelect,onCancel:function(){t.setState({showRatmplSelector:!1})},mainCode:g,sourceId:u,existRelation:"false"}):""):(0,V.Y)(h.Fragment,null,(0,V.Y)(v.A,{loading:n}),(0,V.Y)(L.A,{loading:n}))}}]);var r,n}(h.PureComponent);(0,f.A)(pe,"contextType",nt.U),(0,f.A)(pe,"defaultProps",{criteriaData:{},funcMode:"complete",collapsible:!1,initCollapse:!1,readOnly:!1,operatable:!0});var de=pe},54763:function(t,e,r){"use strict";var n=r(54774),o=new Set;function a(){}o.add("date-YY"),o.add("daterange-YY"),o.add("date-M1"),o.add("daterange-M1"),o.add("date"),o.add("daterange"),o.add("datetime-HH"),o.add("datetimerange-HH"),o.add("datetime-mm"),o.add("datetimerange-mm"),o.add("datetime"),o.add("datetimerange"),o.add("timestamp"),o.add("time-HH"),o.add("timerange-HH"),o.add("time-mm"),o.add("timerange-mm"),o.add("time"),o.add("timerange"),o.add("timerange-HH-unorder"),o.add("timerange-mm-unorder"),o.add("timerange-unorder"),o.add("text"),o.add("textarea"),o.add("html"),o.add("steps"),o.add("progress"),o.add("password"),o.add("preselect"),o.add("select"),o.add("multiselect"),o.add("checkbox"),o.add("radio"),o.add("yes-no-select"),o.add("yes-no-radio"),o.add("yes-no-switch"),o.add("caselect"),o.add("relation"),o.add("file"),o.add("picture"),o.add("chemstruc"),o.add("sql-code-editor"),o.add("video"),o.add("takeVideo"),o.add("signature"),o.add("non-download-file"),o.add("decimal"),o.add("float"),o.add("double"),o.add("int"),o.add("relselect"),o.add("relselectvalue"),o.add("entity-select-value"),o.add("refselect"),o.add("field-history"),o.add("range"),o.add("intrange"),o.add("decimalrange"),o.add("texttags"),o.add("entity-select"),o.add("table-entity-select"),o.add("modal-entity-select"),o.add("color"),o.add("url"),o.add("hidden"),o.add("lab-tree-select"),o.add("tree-entity-select-value"),o.add("tree-entity-select"),o.add("ltree-entity-select-value"),o.add("ltree-entity-select"),o.add("field-history"),o.add("relfile"),a.isSupport=function(t){return!!t&&(!!n.vr.getCustomViewControl(t)||o.has(t))},a.getSupportControlType=function(t){return this.isSupport(t.extControlType)?t.extControlType:this.isSupport(t.controlType)?t.controlType:"text"},a.getControlType=function(t,e){var r;return r=this.getSupportControlType(t),e&&"string"==typeof e&&-1===e.indexOf("@R@")&&"relselect"===r&&-1!=e.indexOf("download-files/")&&(r="file"),r},e.A=a},54774:function(t,e,r){"use strict";r.d(e,{hn:function(){return Mo},L:function(){return wr},at:function(){return Mn},L9:function(){return ln},F9:function(){return hn.A},Q0:function(){return Ue},rV:function(){return tr},O4:function(){return Wn},Fj:function(){return o.A},YO:function(){return x.Y},rN:function(){return qo},$h:function(){return Hn},RW:function(){return xn},Hu:function(){return Le},vr:function(){return n.A},n9:function(){return pr},Sh:function(){return to.A},Rm:function(){return Dn},Zo:function(){return zn.A},bs:function(){return eo.bs},Ym:function(){return Jt.Y}});var n=r(8130),o=r(92749),a=r(42455),i=r(65425),c=r(38452),u=r(17636),l=r(44274),s=r(2532),f=r(63549),h=r(91985),p=r(11504),d=r(50828),v=r(96540),y=r(52120),g=r(54839),m=r(677),w=r(28392),b=r(8554),A=(r(71436),r(46704)),x=r(1026),k=r(17437),C=["title"];function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function E(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return O(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)?O(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function O(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 S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var Y=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,S()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{l2Menus:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"intervals",[]),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(L().mark((function t(){var e,r,n,a,i=this;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickQueryBar");case 2:if(!(e=t.sent)){t.next=23;break}r=E(e),t.prev=5,a=L().mark((function t(){var e,r,a;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:if(1!=e.displayTotal){t.next=11;break}return r=setInterval((0,u.A)(L().mark((function t(){var r;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,e.count=r,i.setState({});case 5:case"end":return t.stop()}}),t)}))),18e4),i.intervals.push(r),t.next=8,o.A.requestLtmplCount(null,e.id);case 8:a=t.sent,e.count=a,i.setState({});case 11:case"end":return t.stop()}}),t)})),r.s();case 8:if((n=r.n()).done){t.next=14;break}return t.delegateYield(a(),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("continue",12);case 12:t.next=8;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(5),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:this.setState({l2Menus:e});case 23:case"end":return t.stop()}}),t,this,[[5,16,19,22]])}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){if(this.intervals.length>0){var t,e=E(this.intervals);try{for(e.s();!(t=e.n()).done;){var r=t.value;clearInterval(r)}}catch(t){e.e(t)}finally{e.f()}}this.intervals=[]}},{key:"render",value:function(){var t=this.props,e=(t.title,(0,c.A)(t,C)),r=this.state.l2Menus,n=this.context.translate,o=[];return r&&r.forEach((function(t){if(t.disabled)return null;var e=(0,k.Y)(y.A,{key:t.id,count:t.count},(0,k.Y)(g.Ay,{shape:"round",icon:(0,k.Y)(b.A,null),href:"#/".concat(t.id,"/act-table?menuId=").concat(t.id),size:"large"},t.title));o.push(e)})),(0,k.Y)(m.A,(0,i.A)({size:"small"},e,{title:n("${快速访问}")}),(0,k.Y)(w.A,{size:[16,16],wrap:!0},o))}}]);var r}(v.PureComponent);(0,d.A)(Y,"contextType",x.U);var j=Y,I=r(37122),P=r(82626),T=["title"];function N(){N=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function _(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 R(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(R=function(){return!!t})()}var F=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,R()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{l2Menus:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"intervals",[]),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(N().mark((function t(){var e,r,n,a,i=this;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickPanel");case 2:if(!(e=t.sent)){t.next=23;break}r=D(e),t.prev=5,a=N().mark((function t(){var e,r,a;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=n.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:return r=setInterval((0,u.A)(N().mark((function t(){var r;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,e.count=r,i.setState({});case 5:case"end":return t.stop()}}),t)}))),18e4),i.intervals.push(r),t.next=7,o.A.requestLtmplCount(null,e.id);case 7:a=t.sent,e.count=a,i.setState({});case 10:case"end":return t.stop()}}),t)})),r.s();case 8:if((n=r.n()).done){t.next=14;break}return t.delegateYield(a(),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("continue",12);case 12:t.next=8;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(5),r.e(t.t1);case 19:return t.prev=19,r.f(),t.finish(19);case 22:this.setState({l2Menus:e});case 23:case"end":return t.stop()}}),t,this,[[5,16,19,22]])}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){if(this.intervals.length>0){var t,e=D(this.intervals);try{for(e.s();!(t=e.n()).done;){var r=t.value;console.log("workbanch移除定时任务"),clearInterval(r)}}catch(t){e.e(t)}finally{e.f()}}this.intervals=[]}},{key:"render",value:function(){var t=this.props,e=t.title,r=(0,c.A)(t,T),n=this.state.l2Menus,o=this.context.translate,a=[];return n&&n.forEach((function(t){if(t.disabled)return null;var e=(0,k.Y)(m.A,{size:"small",key:t.id},(0,k.Y)(I.A,{prefix:(0,k.Y)(P.A,null),title:t.title,value:t.count}),(0,k.Y)(g.Ay,{style:{marginTop:12},href:"#/".concat(t.id,"/act-table?menuId=").concat(t.id)},o("${查看}")));a.push(e)})),(0,k.Y)(m.A,(0,i.A)({size:"small"},r,{title:e||o("${工作台}")}),(0,k.Y)(w.A,{size:[16,16],wrap:!0},a))}}]);var r}(v.PureComponent);(0,d.A)(F,"contextType",x.U);var G=F,M=(r(59090),r(19612)),K=r(45448);function B(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(B=function(){return!!t})()}var $=K.A.Footer,V=function(t){function e(){return(0,l.A)(this,e),t=this,r=e,n=arguments,r=(0,h.A)(r),(0,f.A)(t,B()?Reflect.construct(r,n||[],(0,h.A)(t).constructor):r.apply(t,n));var t,r,n}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){return this.props.content,(0,k.Y)($,{style:{textAlign:"center"}},(0,k.Y)("div",{className:"footer"}))}}])}(v.Component),q=r(5131),H=r(47152),z=r(16370),U=r(71371),W=r(76157),Q=r(31201),J=r(87206),Z=r(37977),X=r(84976),tt=r(48287);function et(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return rt(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)?rt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function rt(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}var nt={getMenu:function(t,e){return t.l1Menus?this.toL1Menu(t.l1Menus,e,""):this.toSubMenu(t.items,e,"")},toL1Menu:function(t,e){var r,n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=[];return t&&t.map((function(t){r={key:t.id};var i=t.l2Menus;i&&(r.label=(0,tt.A)("${"+t.title+"}"),r.title=(0,tt.A)("${"+t.title+"}"),r.children=n.toSubMenu(i,e,o)),a.push(r)})),a},toSubMenu:function(t,e){var r,n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=[];return t&&t.map((function(t){r={key:t.id,title:(0,tt.A)("${"+t.title+"}")};var i=t.items;if(i)r.label=(0,tt.A)("${"+t.title+"}"),r.children=n.toSubMenu(i,e,o);else{var c=t;c.disabled?c.hiddenOnDisabled?r=null:(r.disabled=c.disabled,c.tip?r.label=(0,k.Y)(Z.A,{placement:"top",title:(0,tt.A)("${"+c.tip+"}")},(0,tt.A)("${"+c.title+"}")):r.label=(0,tt.A)("${"+c.title+"}")):(r.label=n.toL2MenuTitle(c,e,o),r.path=c.path)}r&&a.push(r)})),a},getRoutePath:function(t,e,r){if(t){var n="act-table",o="";switch(t.pageType){case"列表":n="act-table";break;case"树":n="act-tree";break;case"添加":n="detail-edit",o="&codeSource=new";break;case"编辑":n="detail-edit",o="&codeSource=listop";break;case"编辑或添加":n="detail-edit",o="&codeSource=listop-new";break;case"详情":n="detail-view",o="&codeSource=listop";break;case"导入":n="importer";break;case"报表":n="report-table"}return"".concat(e,"/").concat(t.id,"/").concat(n,"?menuId=").concat(t.id).concat(o).concat(r)}return null},toL2MenuTitle:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!t)return null;var o="/",a=t.customPath;a&&(a.startsWith("/")||a.startsWith("\\"))&&(o="");var i="";t.defaultCriteriaValue&&(i="&"+n.A.transQueryParamsToStr(t.defaultCriteriaValue));var c=a?"".concat(r,"/page/").concat(t.id).concat(o).concat(a,"?menuId=").concat(t.id):this.getRoutePath(t,r,i);return t.path=c,(0,k.Y)(X.k2,{to:c,target:t.linkTarget?t.linkTarget:e},(0,tt.A)("${"+t.title+"}"))},findOpenId:function(t,e){var r=void 0;if(t.l1Menus){var n,o=et(t.l1Menus);try{for(o.s();!(n=o.n()).done;){var a,i=n.value,c=et(i.l2Menus);try{for(c.s();!(a=c.n()).done;)if(a.value.id==e)return r=i.id}catch(t){c.e(t)}finally{c.f()}}}catch(t){o.e(t)}finally{o.f()}}else{var u,l=et(t.items);try{for(l.s();!(u=l.n()).done;){var s=u.value;if(s.items){var f,h=et(s.items);try{for(h.s();!(f=h.n()).done;)if(f.value.id==e)return r=s.id}catch(t){h.e(t)}finally{h.f()}}else if(s.id==e)return r=s.id}}catch(t){l.e(t)}finally{l.f()}}return r}};function ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return at(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)?at(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function at(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 it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}var ct=function(t){function e(t){var r,n,o,a;return(0,l.A)(this,e),n=this,o=e,a=[t],o=(0,h.A)(o),r=(0,f.A)(n,it()?Reflect.construct(o,a||[],(0,h.A)(n).constructor):o.apply(n,a)),(0,d.A)(r,"context",void 0),(0,d.A)(r,"getSubMenu",(function(t){return nt.getMenu(t,null)})),(0,d.A)(r,"findBlockId",(function(t,e){var r,n=void 0,o=ot(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.l1Menus){var i,c=ot(a.l1Menus);try{for(c.s();!(i=c.n()).done;){var u,l=ot(i.value.l2Menus);try{for(l.s();!(u=l.n()).done;)if(u.value.id===e)return n=a.id}catch(t){l.e(t)}finally{l.f()}}}catch(t){c.e(t)}finally{c.f()}}else{var s,f=ot(a.items);try{for(f.s();!(s=f.n()).done;){var h,p=ot(s.value.items);try{for(p.s();!(h=p.n()).done;)if(h.value.id===e)return n=a.id}catch(t){p.e(t)}finally{p.f()}}}catch(t){f.e(t)}finally{f.f()}}}}catch(t){o.e(t)}finally{o.f()}return n})),r}return(0,p.A)(e,t),(0,s.A)(e,[{key:"computedBlocks",get:function(){var t=this.context.translate,e=JSON.parse(JSON.stringify(this.props.blocks));return e&&Array.isArray(e)&&e.forEach((function(e){e.title=t("${"+e.title+"}");var r=e.items;r&&Array.isArray(r)&&r.forEach((function(e){e.title=t("${"+e.title+"}")}))})),e}},{key:"menuItems",get:function(){var t=this,e=this.computedBlocks,r=[];return console.log(r),e.forEach((function(e){var n={className:"menu-item",key:e.id,children:t.getSubMenu(e)};n.label=(0,k.Y)(X.k2,{to:t.getDefaultIndexPath(e),style:{color:"inherit",width:"100%",height:"100%",display:"block"}},e.title),r.push(n)})),r}},{key:"getDefaultIndexPath",value:function(t){return t.items?this.getDefaultIndexPath(t.items[0]):t.path}},{key:"render",value:function(){var t=this.props,e=t.currentBlockId,r=t.blocks,n=t.currentL2MenuId;if(t.activeColor,!r||r.length<1)return(0,k.Y)(v.Fragment,null);var o=e;return n&&!o&&(o=this.findBlockId(r,n)),o||(o=r.at(0).id),(0,k.Y)(J.A,{mode:"horizontal",defaultSelectedKeys:[e,n],items:this.menuItems,selectedKeys:[e,n],style:{flex:1,minWidth:0},className:"block"})}}])}(v.PureComponent);(0,d.A)(ct,"contextType",x.U);var ut=ct,lt=r(30761),st=r(40562);function ft(){ft=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ht(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return pt(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)?pt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function pt(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 dt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dt=function(){return!!t})()}var vt=function(t){function e(){var t,r,o,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];return r=this,o=e,a=[].concat(c),o=(0,h.A)(o),t=(0,f.A)(r,dt()?Reflect.construct(o,a||[],(0,h.A)(r).constructor):o.apply(r,a)),(0,d.A)(t,"state",{messageBars:void 0,anyState:!1}),(0,d.A)(t,"renderMessageBar",(function(e){var r=t.props.backgroudColor,o=0,a={"--message-bar-backgroupd":r},i=(0,k.Y)(J.A,{key:1},e.map((function(t,e){t.count&&(o+=t.count);var r="";return t.l2Menu.defaultCriteriaValue&&(r="&"+n.A.transQueryParamsToStr(t.l2Menu.defaultCriteriaValue)),(0,k.Y)(J.A.Item,{key:e},(0,k.Y)(X.k2,{to:"/".concat(t.l2Menu.id,"/act-table?menuId=").concat(t.l2Menu.id).concat(r)},t.l2Menu.title,(0,k.Y)(y.A,{count:t.count,overflowCount:99,offset:[2,-2],size:"small"})))})));if(e&&0!=e.length){if(1==e.length){var c=e[0],u=c.l2Menu,l="";return u.defaultCriteriaValue&&(l="&"+n.A.transQueryParamsToStr(u.defaultCriteriaValue)),(0,k.Y)("div",{className:"message-bar",style:a},(0,k.Y)("a",{href:u.customPath?"/page/".concat(u.id).concat(u.customPath,"?menuId=").concat(u.id):"#/".concat(u.id,"/act-table?menuId=").concat(u.id).concat(l),className:"head-example"},(0,k.Y)(y.A,{count:c.count,overflowCount:99,offset:[8,-2]},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(st.A,null)))))}return(0,k.Y)(lt.A,{overlay:i,placement:"bottomCenter"},(0,k.Y)("div",{className:"message-bar",style:a},(0,k.Y)(y.A,{count:o,size:"small",overflowCount:99,offset:[6,0]},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(st.A,null)))))}})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(ft().mark((function t(){var e,r,n,a,i,c=this;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("MessageBar");case 2:if(e=t.sent,r=[],!e){t.next=23;break}n=ht(e),t.prev=6,i=ft().mark((function t(){var e,n,i;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=a.value).disabled){t.next=3;break}return t.abrupt("return",1);case 3:return n={l2Menu:e,count:0},setInterval((0,u.A)(ft().mark((function t(){var r;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestLtmplCount(null,e.id);case 2:r=t.sent,n.count=r,c.setState({anyState:!c.state.anyState});case 5:case"end":return t.stop()}}),t)}))),18e4),t.next=8,o.A.requestLtmplCount(null,e.id);case 8:i=t.sent,n.count=i,r.push(n);case 11:case"end":return t.stop()}}),t)})),n.s();case 9:if((a=n.n()).done){t.next=15;break}return t.delegateYield(i(),"t0",11);case 11:if(!t.t0){t.next=13;break}return t.abrupt("continue",13);case 13:t.next=9;break;case 15:t.next=20;break;case 17:t.prev=17,t.t1=t.catch(6),n.e(t.t1);case 20:return t.prev=20,n.f(),t.finish(20);case 23:this.setState({messageBars:r});case 24:case"end":return t.stop()}}),t,this,[[6,17,20,23]])}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.messageBars;return(0,k.Y)(v.Fragment,null,t?this.renderMessageBar(t):"")}}]);var r}(v.PureComponent);(0,d.A)(vt,"defaultProps",{backgroudColor:"#4a5f74"});var yt=vt,gt=r(1849),mt=r(1372),wt=r(46935);function bt(){bt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function At(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return xt(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)?xt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function xt(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 kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kt=function(){return!!t})()}var Ct=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,kt()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{quickBars:void 0,anyState:!1,currentId:void 0,showDraw:!1}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"showDraw",(function(e){t.setState({currentId:e,showDraw:!0})})),(0,d.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),(0,d.A)(t,"renderQuickBar",(function(e){var r={"--message-bar-backgroupd":t.props.backgroudColor},n=(0,k.Y)(J.A,{key:1},e.map((function(e,r){return e.count&&e.count,(0,k.Y)(J.A.Item,{key:r},(0,k.Y)("span",{onClick:function(){return t.showDraw(e.l2Menu.id)}},e.l2Menu.title))})));if(e&&0!=e.length){if(1==e.length){var o=e[0];return o.l2Menu,(0,k.Y)("div",{className:"message-bar",style:r,onClick:function(){return t.showDraw(o.l2Menu.id)}},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(mt.A,null)))}return(0,k.Y)(lt.A,{overlay:n,placement:"bottomCenter"},(0,k.Y)("div",{className:"message-bar",style:r},(0,k.Y)("span",{style:{fontSize:"20px",color:"#08c"}},(0,k.Y)(mt.A,null))))}})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(bt().mark((function t(){var e,r,n,o,a,i;return bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.A.fastMenu("QuickQueryBar");case 2:if(e=t.sent,r=[],!e){t.next=25;break}n=At(e),t.prev=6,n.s();case 8:if((o=n.n()).done){t.next=17;break}if(!(a=o.value).disabled){t.next=12;break}return t.abrupt("continue",15);case 12:i={l2Menu:a,count:0},r.push(i);case 15:t.next=8;break;case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(6),n.e(t.t0);case 22:return t.prev=22,n.f(),t.finish(22);case 25:this.setState({quickBars:r});case 26:case"end":return t.stop()}}),t,this,[[6,19,22,25]])}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state,e=t.quickBars,r=t.showDraw,n=t.currentId,o=this.context.translate;return(0,k.Y)(v.Fragment,null,e?this.renderQuickBar(e):"",(0,k.Y)(gt.A,{placement:"left",title:o("${快捷查询}"),closable:!0,mask:!1,onClose:this.closeDrawer,open:r,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{onClick:this.closeDrawer},"关闭"))},(0,k.Y)(wt.A,{serverKey:null,sourceId:n})))}}]);var r}(v.PureComponent);(0,d.A)(Ct,"defaultProps",{backgroudColor:"#4a5f74"}),(0,d.A)(Ct,"contextType",x.U);var Lt=Ct,Et=r(81427),Ot=r(74336),St=r(26555),Yt=r(87450),jt=r(44920);function It(){It=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pt=function(){return!!t})()}var Tt=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Pt()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{showDraw:!1}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"showDraw",(function(){t.setState({showDraw:!0})})),(0,d.A)(t,"closeDrawer",(function(){t.setState({showDraw:!1})})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.state.showDraw,e=this.props,r=e.gtmplSourceId,n=e.userCode,o=e.editable,a=this.context.translate;return(0,k.Y)(v.Fragment,null,n?(0,k.Y)(v.Fragment,null,(0,k.Y)("span",{onClick:this.showDraw},a("${个人信息}")),t?(0,k.Y)(jt.A,{serverKey:null,editable:o,title:a("${个人信息}"),sourceId:r,open:t,code:n,onClose:this.closeDrawer}):null):null," ")}}]);var r}(v.PureComponent);(0,d.A)(Tt,"contextType",x.U),(0,d.A)(Tt,"defaultProps",{editable:!1});var Nt=Tt,Dt=r(69036),_t=r(89467),Rt=r(17355),Ft=r(28073),Gt=r(75763);function Mt(){Mt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}var Bt=function(t){function e(){var t,r,n,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return r=this,n=e,a=[].concat(c),n=(0,h.A)(n),t=(0,f.A)(r,Kt()?Reflect.construct(n,a||[],(0,h.A)(r).constructor):n.apply(r,a)),(0,d.A)(t,"state",{showPopover:!1,pubkey:void 0,loading:!1}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"handleSubmit",function(){var e=(0,u.A)(Mt().mark((function e(r){var n,a,i,c,u,l;return Mt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.context.translate,t.setState({loading:!0}),a=t.state.pubkey,i=t.props,c=i.serverKey,u=i.showUserName,l=null,!u){e.next=11;break}return e.next=8,o.A.resetPassword2(c,r.userName,r.oldPassword,r.newPassword,a);case 8:l=e.sent,e.next=14;break;case 11:return e.next=13,o.A.resetPassword(c,r.oldPassword,r.newPassword,a);case 13:l=e.sent;case 14:"success"==l.status&&(Dt.Ay.info(n("${密码已重置,请重新登录}")),o.A.logout(),t.setState({showPopover:!1})),t.setState({loading:!1});case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"handleBlurCapture",(function(){var e=t.context.translate,r=t.formRef.current.getFieldValue("newPassword"),n=t.formRef.current.getFieldValue("reNewPassword");r&&n&&r!=n?t.formRef.current.setFields([{name:"reNewPassword",value:n,errors:[e("${两次密码输入不一致}!")]}]):t.formRef.current.setFields([{name:"reNewPassword",value:n,errors:[]}])})),(0,d.A)(t,"getForm",(function(){var e=t.state.loading,r=t.props.showUserName,n=t.context.translate;return(0,k.Y)(H.A,{justify:"center",align:"middle"},(0,k.Y)(z.A,null,(0,k.Y)(_t.A,{style:{width:350},ref:t.formRef,name:"normal_login",className:"login-form",onFinish:t.handleSubmit},r?(0,k.Y)(_t.A.Item,{label:n("${用户名}"),name:"userName",rules:[{required:!0,message:n("${请输入}${用户名}")}]},(0,k.Y)(Rt.A,{placeholder:n("${用户名}"),prefix:(0,k.Y)(Yt.A,{className:"site-form-item-icon"})})):"",(0,k.Y)(_t.A.Item,{label:n("${原密码}"),name:"oldPassword",rules:[{required:!0,message:n("${请输入}${原密码}")}]},(0,k.Y)(Rt.A.Password,{placeholder:n("${密码}"),prefix:(0,k.Y)(Gt.A,{className:"site-form-item-icon"})})),(0,k.Y)(_t.A.Item,{label:n("${新设密码}"),name:"newPassword",rules:[{required:!0,message:n("${请输入}${新密码}!")}]},(0,k.Y)(Rt.A.Password,{placeholder:n("${新设密码}"),onBlurCapture:t.handleBlurCapture,prefix:(0,k.Y)(Gt.A,{className:"site-form-item-icon"})})),(0,k.Y)(_t.A.Item,{label:n("${确认密码}"),name:"reNewPassword",rules:[{required:!0,message:n("${请输入}${确认密码}")},function(t){var e=t.getFieldValue;return{validator:function(t,r){return r&&e("newPassword")!==r?Promise.reject(new Error(n("${两次密码输入不一致}!"))):Promise.resolve()}}}]},(0,k.Y)(Rt.A.Password,{placeholder:n("${确认密码}"),prefix:(0,k.Y)(Gt.A,{className:"site-form-item-icon"})})),(0,k.Y)(_t.A.Item,null,(0,k.Y)(H.A,{align:"middle",gutter:32},(0,k.Y)(z.A,{span:12},(0,k.Y)(g.Ay,{style:{width:"100%"},type:"primary",loading:e,onClick:function(){return t.formRef.current.submit()}},n("${确定}"))),(0,k.Y)(z.A,{span:12},(0,k.Y)(g.Ay,{style:{width:"100%"},onClick:function(){t.setState({showPopover:!1})}},n("${取消}"))))))))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Mt().mark((function t(){var e,r;return Mt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props.serverKey,t.next=3,o.A.getRasPubkey(e);case 3:r=t.sent,this.setState({pubkey:r});case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state,r=e.showPopover,n=(e.loading,this.context.translate);return(0,k.Y)(v.Fragment,null,(0,k.Y)(Ft.A,{destroyTooltipOnHide:!0,open:r,overlayStyle:{maxWidth:"400px"},title:n("${修改密码}"),placement:"leftBottom",trigger:"click",content:this.getForm()},(0,k.Y)(g.Ay,{type:"link",onClick:function(){t.setState({showPopover:!r})}},n("${修改密码}"))))}}]);var r}(v.PureComponent);(0,d.A)(Bt,"contextType",x.U);var $t=Bt;function Vt(){Vt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}var Ut=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,zt()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{id:void 0,name:void 0,roles:[],context:void 0,cleanCachable:!1,gtmplSourceId:void 0,changePasswordable:void 0,changePersonalInfoable:void 0,viewPersonalInfoable:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"cleanCache",(function(){var e=t.state.roles,r=document.getElementById("ajaxLoading");r.style.display="block",A.A.reload(e),r.style.display="none"})),(0,d.A)(t,"getContext",(function(){var e=t.state.context,r=t.context.translate;return e?(console.log("context",e),(0,k.Y)(v.Fragment,null,e.map((function(t){return(0,k.Y)(H.A,null,(0,k.Y)(z.A,null,t.label," : ",t.content))})))):r("${无}")})),(0,d.A)(t,"toSetContext",(function(){window.location.hash="#/context-setter"})),(0,d.A)(t,"getTitle",(function(){var e=t.state,r=e.name,n=e.context;return(0,k.Y)(v.Fragment,null,(0,k.Y)("p",null,r),n?n.map((function(t){return(0,k.Y)("p",null,t.label," : ",t.content)})):null)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Vt().mark((function t(){var e,r;return Vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getUser();case 2:return e=t.sent,t.next=5,o.A.getContextSourceValue();case 5:r=t.sent,this.setState(Ht({context:r},e));case 7:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.backgroudColor,r=t.showUserInfo,n=t.showChangePassword,a=t.menu,i=this.state,c=i.name,u=i.context,l=i.cleanCachable,s=i.gtmplSourceId,f=i.changePasswordable,h=i.changePersonalInfoable,p=i.viewPersonalInfoable,d=i.id,y=this.context,g=y.translate,m=y.changeLocale,w=y.locale,b=y.availableLang,A={"--message-bar-backgroupd":e},x=[],C=b.map((function(t){return{label:(0,k.Y)("span",{onClick:function(){return m(t)},style:w===t?{color:e}:{}},t),key:t}}));return C.unshift({label:(0,k.Y)("span",{onClick:function(){return m("zh")},style:"zh"===w?{color:e}:{}},"中文"),key:"zh"}),x.push({key:"locale",label:g("${切换语言}"),children:C}),c?(r&&p&&x.push({key:"1",label:(0,k.Y)(Nt,{gtmplSourceId:s,editable:h,userCode:d})}),u&&u.length>0&&x.push({key:"2",label:(0,k.Y)("span",{onClick:this.toSetContext},g("${全局配置}"))}),n&&f&&x.push({key:"3",label:(0,k.Y)($t,null)}),l&&x.push({key:"4",label:(0,k.Y)("span",{onClick:this.cleanCache},g("${清空缓存}"))}),x.push({key:"5",label:(0,k.Y)("span",{onClick:o.A.logout},(0,k.Y)(Ot.A,null)," ",g("${退出}"))})):x.push({key:"2",label:(0,k.Y)("span",{onClick:o.A.logout},(0,k.Y)(St.A,null)," ",g("${登录}"))}),(0,k.Y)(v.Fragment,null,(0,k.Y)(lt.A,{menu:a||{items:x},placement:"bottomRight",trigger:["click"]},(0,k.Y)("div",{className:"userLogin",style:Ht(Ht(Ht({},A),{display:"flex",justifyContent:"center",alignItems:"center"}),{},{height:55})},(0,k.Y)(Z.A,{placement:"left",title:this.getTitle()},(0,k.Y)(Et.A,{className:"loginAvatar",icon:(0,k.Y)(Yt.A,null),size:"large"})))))}}]);var r}(v.PureComponent);(0,d.A)(Ut,"contextType",x.U),(0,d.A)(Ut,"defaultProps",{backgroudColor:"#4a5f74",showUserInfo:!0,showChangePassword:!0});var Wt=Ut,Qt=r(82441),Jt=r(94300),Zt=q.A.useToken,Xt=function(t){var e=Zt().token,r=(0,Jt.Y)(),n=r.getLocale,o=r.setLocale,a=r.availableLang;console.log(a);var c=a.map((function(t){return{label:(0,k.Y)("span",{style:n()===t?{color:e.colorPrimary}:{}},t),key:t}}));return c.unshift({label:(0,k.Y)("span",{style:"zh"===n()?{color:e.colorPrimary}:{}},"中文"),key:"zh"}),(0,k.Y)(lt.A,{overlayClassName:"localeButton",menu:{items:c,onClick:function(t){var e=t.key;o(e)}}},(0,k.Y)(g.Ay,(0,i.A)({type:"primary",shape:"circle",icon:(0,k.Y)(Qt.A,null)},t)))},te=K.A.Header,ee=q.A.useToken,re=function(t){var e=ee().token,r=t.collapsed,n={"--antd-color-primary":e.colorPrimary};return(0,k.Y)(te,{style:{position:"sticky",top:0,zIndex:100,width:"100%",padding:0,height:"auto",minWidth:"760px"}},(0,k.Y)(H.A,{className:"header-top",style:n,wrap:!1,justify:"space-between"},(0,k.Y)(z.A,{className:"header-col",style:{flex:1}},(0,k.Y)("div",{style:{float:"left"}},v.createElement(r?W.A:Q.A,{className:"trigger",onClick:function(){t.toggle()}})),(0,k.Y)("div",{className:"header-menu"},(0,k.Y)(ut,(0,i.A)({},t,{activeColor:e.colorPrimary})))),(0,k.Y)(z.A,{style:{display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)("div",{className:"right-block"},(0,k.Y)(Lt,{backgroudColor:e.colorPrimary})),(0,k.Y)("div",{className:"right-block"},(0,k.Y)(yt,{backgroudColor:e.colorPrimary})),(0,k.Y)("div",{className:"right-block"},(0,k.Y)(U.Ay,{theme:{components:{Button:{colorText:"rgb(0, 136, 204)",colorBgTextHover:"var(--antd-color-primary)"}}}},(0,k.Y)(Xt,{shape:"default",size:"large",type:"text",style:{width:"100%",height:"100%",boxSizing:"border-box",padding:"0 10px",borderRadius:0}}))),(0,k.Y)("div",{className:"right-block",style:{width:80}},(0,k.Y)(Wt,{backgroudColor:e.colorPrimary})))))},ne=["blockMenu","collapsed","currentL2MenuId","basePath"];function oe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oe=function(){return!!t})()}var ae=function(t){function e(t){var r,n,o,a;return(0,l.A)(this,e),n=this,o=e,a=[t],o=(0,h.A)(o),r=(0,f.A)(n,oe()?Reflect.construct(o,a||[],(0,h.A)(n).constructor):o.apply(n,a)),(0,d.A)(r,"context",void 0),(0,d.A)(r,"handleOpen",(function(t){t&&t.length>1&&t.splice(0,1),r.setState({openKeys:t})})),r.state={openKeys:[]},r}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.currentL2MenuId,r=t.blockMenu,n=(t.collapsed,this.state.openKeys),o=r?nt.findOpenId(r,e):void 0;o&&n.length<1&&this.setState({openKeys:[o.toString()]})}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.currentL2MenuId,n=e.blockMenu,o=(e.collapsed,t.currentL2MenuId),a=t.blockMenu;if(this.state.openKeys,a&&n&&n.id==a.id){var i=n?nt.findOpenId(n,r):void 0,c=n?nt.findOpenId(a,o):void 0;(!c&&i||i&&i!=c)&&this.setState({openKeys:[i]})}else{var u=n?nt.findOpenId(n,r):void 0;u&&this.setState({openKeys:[u]})}}},{key:"computedBlockMenu",get:function(){var t=this.context.translate,e=JSON.parse(JSON.stringify(this.props.blockMenu));return e&&Array.isArray(e.items)&&e.items.forEach((function(e){return e.title=t("${"+e.title+"}"),e})),e}},{key:"render",value:function(){var t=this.props,e=t.blockMenu,r=t.collapsed,n=t.currentL2MenuId,o=t.basePath,a=(0,c.A)(t,ne),u=this.state.openKeys,l=e?nt.getMenu(this.computedBlockMenu,void 0,o):[];return a.title="",(0,k.Y)(J.A,(0,i.A)({},a,{onOpenChange:this.handleOpen,selectedKeys:n?[n.toString()]:void 0,openKeys:r?void 0:u,items:l}))}}])}(v.PureComponent);(0,d.A)(ae,"contextType",x.U);var ie=ae,ce=r(35880),ue=r(62070),le=q.A.useToken,se=function(t){var e=(0,Jt.Y)().translate,r={"--logo-blue-background":le().token.colorPrimary},o=t.collapsed,a=t.header,c=t.collapsedHeader,u=t.title||n.A.programName_NavLeft();return u=e("${"+u+"}"),(0,k.Y)("div",null,(0,k.Y)(ce.Ay,{style:{height:"calc(100vh)"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)("div",{className:o?"logonly":"logo-blue",style:r},(0,k.Y)("a",{href:"#/home"},o?c?(0,k.Y)("div",{style:{overflow:"hidden",height:"56px",padding:"2px"}},c):t.logo?(0,k.Y)(ue.A,{src:t.logo}):(0,k.Y)("h1",{style:{overflow:"hidden",height:"56px",paddingLeft:"-20px"}},"M"):a?(0,k.Y)("div",{style:{overflow:"hidden",height:"56px",padding:"2px"}},a):(0,k.Y)(v.Fragment,null,(0,k.Y)("h1",{style:{overflow:"hidden",height:"56px",paddingLeft:"-20px"}},(0,k.Y)(v.Fragment,null,t.logo?(0,k.Y)(ue.A,{width:"30px",src:t.logo}):(0,k.Y)(v.Fragment,null),u))))),(0,k.Y)(ie,(0,i.A)({mode:"inline",theme:"light"},t))))},fe=r(38093),he=r.n(fe),pe=r(33227),de=r(47767),ve=function(t){return function(e){var r=(0,de.zy)(),n=(0,de.Zp)(),o=(0,X.ok)(),a=(0,pe.A)(o,2),c=a[0],u=(a[1],r.pathname,(0,de.g)().sourceId);return(0,k.Y)(t,(0,i.A)({},e,{location:r,navigate:n,params:{sourceId:u},searchParams:c}))}},ye=function(t){for(var e=0;e<t.length;e++){var r=t[e];document.documentElement.style.setProperty("--color-".concat(e),r)}},ge=r(45748);function me(){me=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function we(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return be(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)?be(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function be(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 Ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ae=function(){return!!t})()}var xe=K.A.Content,ke=K.A.Sider,Ce=function(t){function e(){var t,r,o,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];return r=this,o=e,a=[].concat(c),o=(0,h.A)(o),t=(0,f.A)(r,Ae()?Reflect.construct(o,a||[],(0,h.A)(r).constructor):o.apply(r,a)),(0,d.A)(t,"scrollbarRef",v.createRef()),(0,d.A)(t,"state",{collapsed:!1,blocks:[],currentL2MenuId:void 0,currentBlockId:void 0,isImporter:!1,sideBartitle:void 0,programDocumentTitle:n.A.programName()?n.A.programName():"HYDROCARBON"}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"findBlockTitle",(function(e){var r,n=t.state,o=n.blocks,a=n.programDocumentTitle;if(e){var i,c=we(o);try{for(c.s();!(i=c.n()).done;){var u=i.value;if(u.id==e){r=u.title;break}}}catch(t){c.e(t)}finally{c.f()}}return(r?r+"-":"")+a})),(0,d.A)(t,"findBlockIdOfL2Menu",(function(e){var r=void 0,n=t.state.blocks;if(e){var o,a=we(n);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.l1Menus){var c,u=we(i.l1Menus);try{for(u.s();!(c=u.n()).done;){var l,s=we(c.value.l2Menus);try{for(s.s();!(l=s.n()).done;)if(l.value.id==e){r=i.id;break}}catch(t){s.e(t)}finally{s.f()}}}catch(t){u.e(t)}finally{u.f()}}else{var f,h=we(i.items);try{for(h.s();!(f=h.n()).done;){var p=f.value;if(p.items){var d,v=we(p.items);try{for(v.s();!(d=v.n()).done;)if(d.value.id==e){r=i.id;break}}catch(t){v.e(t)}finally{v.f()}}else if(p.id==e){r=i.id;break}}}catch(t){h.e(t)}finally{h.f()}}}}catch(t){a.e(t)}finally{a.f()}}return r})),(0,d.A)(t,"findCurrentBlock",(function(){var e=t.state,r=e.blocks,n=e.currentL2MenuId,o=e.currentBlockId,a=void 0;if(n){var i,c=we(r);try{for(c.s();!(i=c.n()).done;){var u=i.value;if(u.l1Menus){var l,s=we(u.l1Menus);try{for(s.s();!(l=s.n()).done;){var f,h=we(l.value.l2Menus);try{for(h.s();!(f=h.n()).done;)if(f.value.id==n){a=u;break}}catch(t){h.e(t)}finally{h.f()}}}catch(t){s.e(t)}finally{s.f()}}else{var p,d=we(u.items);try{for(d.s();!(p=d.n()).done;){var v=p.value;if(v.items){var y,g=we(v.items);try{for(g.s();!(y=g.n()).done;)if(y.value.id==n){a=u;break}}catch(t){g.e(t)}finally{g.f()}}else if(v.id==n){a=u;break}}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){c.e(t)}finally{c.f()}}if(o&&!a){var m,w=we(r);try{for(w.s();!(m=w.n()).done;){var b=m.value;if(b.id===o){a=b;break}}}catch(t){w.e(t)}finally{w.f()}}return a||(a=r.at(0)),a})),(0,d.A)(t,"toggle",(function(){t.setState((function(e){return{collapsed:!t.state.collapsed}}))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(o=(0,u.A)(me().mark((function t(){var e,r,n,o,a,i,c,u,l,s;return me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ye((0,ge.cM)("rgb(22, 119, 255)")),localStorage.setItem("version","v1"),e=new URL(window.location.href),r=window.location.href.split("?")[1],n=new URLSearchParams("?"+r),o=n.get("blockId"),(a=n.get("menuId"))||(i=e.hash.match(/[\w]+\-[\d]+/))&&"menu"===(c=i[0].split("-"))[0]&&(a=c[1]),u=this.props.sideBartitle,l=this.state.programDocumentTitle,t.next=12,A.A.requestBlocks(a||void 0,o||void 0);case 12:s=t.sent,this.setState((function(t){return{isImporter:e.hash.indexOf("/importer")>0,blocks:s&&s.blocks?s.blocks:[],currentL2MenuId:s?s.l2MenuId:null,currentBlockId:s?s.blockId:null,programDocumentTitle:null!=s&&s.programName?s.programName:l,sideBartitle:u||(s?s.programName:null)}}));case 14:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(me().mark((function t(e,r){var n,o,a,i,c,u,l,s,f,h,p;return me().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new URL(window.location.href),o=window.location.href.split("?")[1],a=new URLSearchParams("?"+o),i=a.get("blockId"),c=a.get("menuId"),u=n.hash.indexOf("/importer")>0,r.isImporter!=u&&this.setState((function(t){return{isImporter:u}})),c||(l=n.hash.match(/[\w]+\-[\d]+/))&&"menu"===(s=l[0].split("-"))[0]&&(c=s[1]),f=this.state,h=f.currentL2MenuId,p=f.currentBlockId,c&&h!=c&&this.setState((function(t){return{currentL2MenuId:c}})),i||(i=this.findBlockIdOfL2Menu(c)),i&&p!=i&&this.setState((function(t){return{currentBlockId:i}}));case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this.props,r=e.footer,n=e.sideBarLogo,o=e.leftHeader,a=e.leftCollapsedHeader,c=this.state,u=c.collapsed,l=c.currentL2MenuId,s=c.currentBlockId,f=c.isImporter,h=c.sideBartitle,p=this.context.translate;return null===(t=this.scrollbarRef)||void 0===t||null===(t=t.current)||void 0===t||t.scrollToTop(),(0,k.Y)(ce.Ay,{ref:this.scrollbarRef,style:{height:"calc(100vh)"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(he(),{title:(f?p("${导入}-"):"")+this.findBlockTitle(s)},(0,k.Y)(K.A,null,(0,k.Y)(ke,{theme:"light",style:{overflow:"auto",height:"100vh",position:"fixed",left:0,top:0,bottom:0},collapsed:u},(0,k.Y)(se,{header:o,collapsedHeader:a,title:h,logo:n,blockMenu:this.findCurrentBlock(),currentL2MenuId:l,collapsed:u})),(0,k.Y)(K.A,{style:u?{background:"#fff",marginLeft:80}:{background:"#fff",marginLeft:200}},(0,k.Y)(re,(0,i.A)({toggle:this.toggle},this.state)),(0,k.Y)(xe,{style:{margin:"12px 16px 0",overflow:"initial",minHeight:"calc(100vh)",minWidth:760,paddingBottom:"8px"}},this.props.children),(0,k.Y)(V,{content:r})))))}}]);var r,o}(v.PureComponent);(0,d.A)(Ce,"contextType",x.U);var Le=ve(Ce),Ee=r(21745),Oe=r(91196),Se=r(75475),Ye=r(7142),je=r(77829),Ie=r(6754),Pe=r(42652),Te=r(80581),Ne=r(77028),De=r(40756),_e=r(78602);function Re(){Re=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Fe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ge(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)?Ge(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Ge(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 Me(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Me=function(){return!!t})()}var Ke=Oe.A.Group,Be=["INFO","SUC","ERROR","WARN"],$e=Se.A.Text,Ve=function(t){function e(){var t,r,o,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];return r=this,o=e,a=[].concat(c),o=(0,h.A)(o),t=(0,f.A)(r,Me()?Reflect.construct(o,a||[],(0,h.A)(r).constructor):o.apply(r,a)),(0,d.A)(t,"state",{maxMsgCount:100,inputMaxMsgCount:100,importStatus:"waitingFile",importFile:void 0,logs:[],percent:0,statusMsg:void 0,logSetterOpen:!1,showLogLevelList:[].concat(Be),logSerialId:void 0,ltmplConfig:void 0,msgIndex:0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"timerId",void 0),(0,d.A)(t,"handleUpload",(function(){var e=t.props,r=e.sourceId,n=e.serverKey,o=t.state.importFile,a=t.context.translate,i=new FormData;i.append("file",o),i.append("sourceId",r.toString()),M.A.super({url:"/v3/ltmpl/importer",serverKey:n,method:"POST",data:i},"formdata").then((function(e){"success"===e.status?(t.setState({importStatus:"importing"}),t.timerId=setInterval((function(){return t.handleStatus(e.importId)}),500)):(Dt.Ay.error(a("${失败}!"),5),t.setState({importStatus:"fail"}))}))})),(0,d.A)(t,"handleStopImport",(function(){t.setState({importStatus:"stop"})})),(0,d.A)(t,"handleStatus",(function(e){var r=t.props.serverKey,o=t.state,a=o.maxMsgCount,i=o.importStatus,c=o.logs,u=o.msgIndex,l=t.context.translate;M.A.super({url:"/v3/importer/status",serverKey:r,method:"GET",query:{importId:e,msgIndex:u,maxMsgCount:a,interrupted:"stop"==i}},"","none").then((function(e){var r=[];if("error"===e.status)clearInterval(t.timerId);else{var o,s;if(e.messageSequence.messages){var f,h=Fe(e.messageSequence.messages);try{for(h.s();!(f=h.n()).done;){var p=f.value,d="",v="",y=n.A.formateDate(p.createTime);"SUC"===p.type?(d="green",v=l("${成功}")):"INFO"===p.type?(d="black",v=l("${常规}")):"ERROR"===p.type?(d="red",v=l("${错误}")):"WARN"===p.type&&(d="rgb(250, 225, 4)",v=l("${警告}"));var g=(0,k.Y)("div",null,(0,k.Y)("p",null,y),(0,k.Y)("p",{style:{color:d}},"【".concat(v,"】")+p.text));r.push({level:p.type,msg:g})}}catch(t){h.e(t)}finally{h.f()}}var m=Math.floor(e.current/e.totalCount*100);1==e.completed&&(t.timerId&&(clearInterval(t.timerId),t.timerId=void 0,Dt.Ay.success(l("${导入完成}!")),t.setState({})),m=100),"stop"==i&&clearInterval(t.timerId);var w=[].concat((0,Ee.A)(c),r);w=w.length>a?w.slice(c.length-a):w,t.setState({statusMsg:e.message,msgIndex:null!==(o=e.messageSequence)&&void 0!==o&&null!==(o=o.messages)&&void 0!==o&&o.length?u+(null===(s=e.messageSequence)||void 0===s?void 0:s.messages.length):u,percent:m,importStatus:100==m?"success":"importing",logs:w})}}))})),(0,d.A)(t,"onChangeShowLogLevelList",(function(e){t.setState({showLogLevelList:e})})),(0,d.A)(t,"fresh",(function(){})),(0,d.A)(t,"handleLogSetter",(function(){var e=t.state.inputMaxMsgCount,r=t.context.translate;t.setState({maxMsgCount:e,logSetterOpen:!1}),Dt.Ay.success(r("${设置成功}!"))})),(0,d.A)(t,"changeLogSetterOpen",(function(e){t.setState({logSetterOpen:e})})),(0,d.A)(t,"download",(function(){var e=t.props,r=e.sourceId,o=e.serverKey,a=n.A.hydrocarbonToken();n.A.downloadFile(n.A.joinPath(n.A.api(o),"/v3/ltmpl/importer/template?sourceId=".concat(r,"&@token=").concat(a,"&@programToken=").concat(n.A.programCode(o))),"导入模板")})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(Re().mark((function t(){var e,r,n,o;return Re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.sourceId,n=e.serverKey,t.next=3,A.A.requestLtmplConfig(n,r);case 3:o=t.sent,this.setState({ltmplConfig:o.ltmplConfig});case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.timerId&&clearInterval(this.timerId)}},{key:"render",value:function(){var t,e=this,r=this.state,n=r.ltmplConfig,o=r.importFile,a=r.maxMsgCount,i=r.percent,c=r.importStatus,u=r.showLogLevelList,l=r.logSetterOpen,s=[],f=Fe(r.logs);try{for(f.s();!(t=f.n()).done;){var h=t.value;u.includes(h.level)&&s.push(h.msg)}}catch(t){f.e(t)}finally{f.f()}var p={accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/vnd.ms-excel",onChange:function(){},onRemove:function(t){e.setState({importFile:void 0,importStatus:"waitingFile",percent:0})},beforeUpload:function(t){return e.setState({percent:0,importFile:t,importStatus:"fileSelected"}),!1},fileList:o?[o]:void 0},d=this.context.translate,v=(0,k.Y)("div",null,(0,k.Y)("label",null,d("${日志消息数上限}: ")),(0,k.Y)(Ye.A,{defaultValue:a,onChange:function(t){return e.setState({inputMaxMsgCount:t})}}),(0,k.Y)(g.Ay,{type:"primary",style:{marginLeft:"10px"},onClick:this.handleLogSetter},d("${确定}: ")));return(0,k.Y)("div",{className:"importData"},(0,k.Y)("h3",null,d("${导入} -> "),n?n.title:"",(0,k.Y)("p",{className:"fr"},(0,k.Y)(g.Ay,{className:"hoverbig",title:d("${刷新}"),onClick:this.fresh},(0,k.Y)(Te.A,null)))),(0,k.Y)(H.A,null,(0,k.Y)(z.A,{span:14,offset:5},(0,k.Y)(m.A,{size:"small",style:{minWidth:600}},(0,k.Y)(w.A,null,(0,k.Y)(je.A,p,(0,k.Y)(g.Ay,{type:"primary"},(0,k.Y)(Ne.A,null),d("${选择导入文件}"))),(0,k.Y)(g.Ay,{onClick:this.download},(0,k.Y)(De.A,null),d("${下载导入模板}"))),(0,k.Y)(Ie.A,{percent:i,size:"small",status:"active"}),(0,k.Y)("div",{className:"importBtns"},(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{type:"primary",onClick:this.handleUpload,disabled:!["fileSelected","stop"].includes(c),loading:"importing"==c},d("importing"==c?"${正在导入}":"stop"==c?"${重新导入}":"${开始导入}")),(0,k.Y)(g.Ay,{onClick:this.handleStopImport,disabled:"importing"!=c},d("${停止导入}")))),(0,k.Y)(Pe.A,{header:(0,k.Y)("div",{className:"listHeader"},(0,k.Y)("h4",null,d("${导入日志}")),(0,k.Y)("div",{className:"checks"},(0,k.Y)(Ke,{value:u,onChange:this.onChangeShowLogLevelList},(0,k.Y)(Oe.A,{value:"INFO",className:"infoColor"},d("${常规}")),(0,k.Y)(Oe.A,{value:"SUC",className:"sucColor"},d("${成功}")),(0,k.Y)(Oe.A,{value:"ERROR",className:"errorColor"},d("${错误}")),(0,k.Y)(Oe.A,{value:"WARN",className:"warnColor"},d("${警告}"))),(0,k.Y)("div",{className:"btns"},(0,k.Y)(Ft.A,{content:v,title:d("${日志设置}"),trigger:"click",placement:"top",open:l,overlayStyle:{width:350},onOpenChange:this.changeLogSetterOpen},(0,k.Y)(g.Ay,{title:d("${日志设置}"),type:"primary",size:"small"},(0,k.Y)(_e.A,null)))))),footer:(0,k.Y)($e,{type:"fail"==c||"stop"==c?"danger":"success"},c),bordered:!0,dataSource:s,renderItem:function(t){return(0,k.Y)(Pe.A.Item,null,t)},className:"importList"})))))}}]);var r}(v.PureComponent);function qe(){qe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function He(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(He=function(){return!!t})()}(0,d.A)(Ve,"contextType",x.U);var ze=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,He()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(qe().mark((function t(){return qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"computedLayoutPath",get:function(){var t=this.props.layoutRootPath;return void 0!==t?"/".concat(t):""}},{key:"render",value:function(){var t=this.props,e=t.params,r=t.serverKey,n=e.sourceId;return(0,k.Y)(Ve,{key:n,serverKey:r,sourceId:n})}}]);var r}(v.PureComponent),Ue=ve(ze),We=r(88133);function Qe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Je(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qe(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ze(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ze=function(){return!!t})()}var Xe=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Ze()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"goBackToLtmpl",(function(){var e=t.props.match.params.sourceId,r=t.props.basePath,n="".concat(r?r+"/":"","/").concat(e,"/act-table?menuId=").concat(t.getMenuId()),o=t.getMainCode();o&&(n+="&mainCode=".concat(o)),t.props.navigate(n)})),(0,d.A)(t,"getMainCode",(function(){return t.props.searchParams.get("mainCode")})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props.params.pageName,e=this.props.location.search,r=n.A.transQueryStrToParams(e,null),o=n.A.getCustomPage("/"+t)||We.A;return v.createElement(o,Je(Je({},this.props.params),{},{goBack:this.goBackToLtmpl},r))}}])}(v.PureComponent),tr=ve(Xe),er=r(54638),rr=(r(65560),r(27025));function nr(t,e){return Math.round(Math.random()*(e-t)+t)}function or(t,e){return t+e}function ar(t){return t*t}var ir=(0,v.memo)((function(t){var e=t.width,r=void 0===e?320:e,n=t.height,o=void 0===n?160:n,a=t.l,i=void 0===a?42:a,c=t.r,u=void 0===c?9:c,l=t.imgUrl,s=t.text,f=t.refreshIcon,h=void 0===f?"http://cdn.dooring.cn/dr/icon12.png":f,p=t.visible,d=void 0===p||p,y=t.onDraw,g=t.onCustomVertify,m=t.onSuccess,w=t.onFail,b=t.onRefresh,A=(0,Jt.Y)().translate,x=(0,v.useState)(!1),C=(0,pe.A)(x,2),L=C[0],E=C[1],O=(0,v.useState)(0),S=(0,pe.A)(O,2),Y=S[0],j=S[1],I=(0,v.useState)("sliderContainer"),P=(0,pe.A)(I,2),T=P[0],N=P[1],D=(0,v.useState)(s),_=(0,pe.A)(D,2),R=_[0],F=_[1],G=(0,v.useRef)(null),M=(0,v.useRef)(null),K=(0,v.useRef)(null),B=(0,v.useRef)(!1),$=(0,v.useRef)([]),V=(0,v.useRef)(0),q=(0,v.useRef)(0),H=(0,v.useRef)(0),z=(0,v.useRef)(0),U=Math.PI,W=i+2*u+3,Q=function(t,e,r,n){t.beginPath(),t.moveTo(e,r),t.arc(e+i/2,r-u+2,u,.72*U,2.26*U),t.lineTo(e+i,r),t.arc(e+i+u-2,r+i/2,u,1.21*U,2.78*U),t.lineTo(e+i,r+i),t.lineTo(e,r+i),t.arc(e+u-2,r+i/2,u+.4,2.76*U,1.24*U,!0),t.lineTo(e,r),t.lineWidth=2,t.fillStyle="rgba(255, 255, 255, 0.7)",t.strokeStyle="rgba(255, 255, 255, 0.7)",t.stroke(),t.globalCompositeOperation="destination-over","fill"===n?t.fill():t.clip()},J=function(){return l||"https://picsum.photos/id/".concat(nr(0,1084),"/").concat(r,"/").concat(o)},Z=function(){var t=G.current.getContext("2d"),e=M.current.getContext("2d");j(0),N("sliderContainer"),M.current.width=r,M.current.style.left="0px",t.clearRect(0,0,r,o),e.clearRect(0,0,r,o),E(!0),K.current.setSrc(J())},X=function(){var t=$.current,e=t.reduce(or)/t.length,r=t.map((function(t){return t-e})),n=Math.sqrt(r.map(ar).reduce(or)/t.length),o=parseInt(M.current.style.left);return{spliced:Math.abs(o-H.current)<10,verified:0!==n,left:o,destX:H.current}},tt=function(t){V.current=t.clientX||t.touches[0].clientX,q.current=t.clientY||t.touches[0].clientY,B.current=!0},et=function(t){if(!B.current)return!1;t.preventDefault();var e=t.clientX||t.touches[0].clientX,n=t.clientY||t.touches[0].clientY,o=e-V.current,a=n-q.current;if(o<0||o+38>=r)return!1;j(o);var i=(r-40-20)/(r-40)*o;M.current.style.left=i+"px",N("sliderContainer sliderContainer_active"),$.current.push(a),y&&y(i)},rt=function(t){if(!B.current)return!1;if(B.current=!1,(t.clientX||t.changedTouches[0].clientX)===V.current)return!1;N("sliderContainer");var e=g?g(X()):X(),r=e.spliced,n=e.verified;r?n?(N("sliderContainer sliderContainer_success"),"function"==typeof m&&m()):(N("sliderContainer sliderContainer_fail"),F(A("${请再试一次}")),Z()):(N("sliderContainer sliderContainer_fail"),"function"==typeof w&&w(),setTimeout(Z.bind(void 0),1e3))};return(0,v.useEffect)((function(){d&&(K.current?Z():function(){E(!0);var t=function(t){var e=new Image;return e.crossOrigin="Anonymous",e.onload=t,e.onerror=function(){e.setSrc(J())},e.setSrc=function(t){if(window.navigator.userAgent.indexOf("Trident")>-1){var r=new XMLHttpRequest;r.onloadend=function(t){var r=new FileReader;r.readAsDataURL(t.target.response),r.onloadend=function(t){var r;e.src=null==t||null===(r=t.target)||void 0===r?void 0:r.result}},r.open("GET",t),r.responseType="blob",r.send()}else e.src=t},e.setSrc(J()),e}((function(){E(!1),function(t){var e=G.current.getContext("2d"),n=M.current.getContext("2d");H.current=nr(W+10,r-(W+10)),z.current=nr(10+2*u,o-(W+10)),Q(e,H.current,z.current,"fill"),Q(n,H.current,z.current,"clip"),e.drawImage(t,0,0,r,o),n.drawImage(t,0,0,r,o);var a=z.current-2*u-1,i=n.getImageData(H.current-3,a,W,W);M.current.width=W,n.putImageData(i,0,a)}(t)}));K.current=t}())}),[d]),(0,k.Y)("div",{className:"vertifyWrap",style:{width:r+"px",margin:"0 auto",display:d?"":"none",background:"white"},onMouseMove:et,onMouseUp:rt,onTouchMove:et,onTouchEnd:rt},(0,k.Y)("div",{className:"canvasArea"},(0,k.Y)("canvas",{ref:G,width:r,height:o}),(0,k.Y)("canvas",{ref:M,className:"block",width:r,height:o,onMouseDown:tt,onTouchStart:tt})),(0,k.Y)("div",{className:T,style:{pointerEvents:L?"none":"auto",width:r+"px"}},(0,k.Y)("div",{className:"sliderMask",style:{width:Y+"px"}},(0,k.Y)("div",{className:"slider",style:{left:Y+"px"},onMouseDown:tt,onTouchStart:tt},(0,k.Y)("div",{className:"sliderIcon"},"→"))),(0,k.Y)("div",{className:"sliderText"},R)),(0,k.Y)("div",{className:"refreshIcon",onClick:function(){Z(),"function"==typeof b&&b()},style:{backgroundImage:"url(".concat(h,")")}}),(0,k.Y)("div",{className:"loadingContainer",style:{width:r+"px",height:o+"px",display:L?"":"none"}},(0,k.Y)("div",{className:"loadingIcon"})))}));function cr(){cr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ur(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ur=function(){return!!t})()}var lr=function(t){function e(){var t,r,a,i;(0,l.A)(this,e);for(var c=arguments.length,s=new Array(c),p=0;p<c;p++)s[p]=arguments[p];return r=this,a=e,i=[].concat(s),a=(0,h.A)(a),t=(0,f.A)(r,ur()?Reflect.construct(a,i||[],(0,h.A)(r).constructor):a.apply(r,i)),(0,d.A)(t,"state",{loading:!0,needKaptcha:!1,kaptchaImg:null,kaptchaToken:null,pubkey:void 0,vertify:!1,showSlideVertify:!1}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"componentDidMount",(0,u.A)(cr().mark((function e(){var r,a;return cr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.programCode,localStorage.setItem("version","v1"),r&&n.A.setProgramCode(r),window.removeEventListener("keydown",t.handleKeyDown),e.next=6,o.A.getRasPubkey(null,r);case 6:a=e.sent,t.setState({pubkey:a,loading:!1});case 8:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"getKaptchaToken",(0,u.A)(cr().mark((function e(){var r,n,a;return cr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.programCode,e.next=3,o.A.getKaptchaToken(r);case 3:(n=e.sent)&&(a=n.img&&0==n.img.indexOf("data:")?n.img:"data:image/png;base64,".concat(n.img),t.setState({kaptchaImg:a,kaptchaToken:n.kaptchaToken,needKaptcha:!0}));case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"handleSubmit",(0,u.A)(cr().mark((function e(){var r,n,a;return cr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),r=t.state,n=r.kaptchaToken,a=r.pubkey,r.needKaptcha,r.vertify,e.next=4,t.formRef.current.validateFields().then(function(){var e=(0,u.A)(cr().mark((function e(r){var i,c,u;return cr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.props.programCode,c={username:r.username,password:r.password},e.next=4,o.A.login(c,n,r.kaptchaText,a,i);case 4:if("success"!==(u=e.sent).status){e.next=9;break}t.props.onFinish(u.token),e.next=13;break;case 9:if("error"!==u.status){e.next=13;break}return t.setState({needKaptcha:!0,vertify:!1}),e.next=13,t.getKaptchaToken();case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(t){}));case 4:t.setState({loading:!1});case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"handleKeyDown",(function(e){13===e.keyCode&&t.handleSubmit()})),(0,d.A)(t,"changeKaptcha",function(){var e=(0,u.A)(cr().mark((function e(r){return cr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getKaptchaToken();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this,e=this.state,r=e.loading,n=e.needKaptcha,o=e.kaptchaImg,a=e.showSlideVertify,i=this.props.autoSaveUser,c=void 0===i||i,u=this.context.translate;return(0,k.Y)(v.Fragment,null,(0,k.Y)(_t.A,{style:{width:350},ref:this.formRef,name:"normal_login",initialValues:{remember:!0}},this.props.title,(0,k.Y)(_t.A.Item,{name:"username",rules:[{required:!0,message:u("${请输入}${用户名}!")},{max:30,min:0,message:u("${请输入}${0-30个字符}!")}]},(0,k.Y)(Rt.A,{prefix:(0,k.Y)(Yt.A,{className:"site-form-item-icon"}),placeholder:u("${用户名}"),autoComplete:c?"on":"off"})),(0,k.Y)(_t.A.Item,{name:"password",rules:[{required:!0,message:u("${请输入}${密码}!")}]},(0,k.Y)(Rt.A,{style:c?{}:{"-webkit-text-security":"disc"},type:c?"password":"text",placeholder:u("${密码}"),onKeyDown:this.handleKeyDown,autoComplete:c?"on":"off",prefix:(0,k.Y)(Gt.A,{className:"site-form-item-icon"})})),n?(0,k.Y)(H.A,{gutter:8},(0,k.Y)(z.A,{span:12},(0,k.Y)(_t.A.Item,{name:"kaptchaText",rules:[{required:!0,message:u("${请输入}${验证码}!")}]},(0,k.Y)(Rt.A,{prefix:(0,k.Y)(rr.A,{className:"site-form-item-icon"}),placeholder:u("${验证码}"),onKeyDown:this.handleKeyDown}))),(0,k.Y)(z.A,{span:12},(0,k.Y)("img",{style:{cursor:"pointer"},height:30,width:90,title:u("${点击刷新}"),onClick:this.changeKaptcha,src:o}))):"",(0,k.Y)(_t.A.Item,null,(0,k.Y)(g.Ay,{type:"primary",style:{width:"100%"},loading:r,onClick:this.handleSubmit},u("${登录}"))),(0,k.Y)(_t.A.Item,{style:{marginBottom:0}},(0,k.Y)(H.A,{gutter:8},(0,k.Y)(z.A,{span:6,offset:18},(0,k.Y)($t,{showUserName:!0}))))),a?(0,k.Y)("div",{style:{width:"100%",height:"100%",background:"white"}},(0,k.Y)(ir,{onSuccess:function(){return t.setState({vertify:!0,showSlideVertify:!1},(function(){return t.handleSubmit()}))},onFail:function(){return t.setState({vertify:!1,showSlideVertify:!0})}})):(0,k.Y)(v.Fragment,null))}}])}(v.PureComponent);(0,d.A)(lr,"contextType",x.U);var sr=lr,fr=q.A.useToken,hr=function(t){var e=fr().token,r=t.params,o=t.autoSaveUser,a=t.centerStyle,i=t.themePosition,c=t.theme,u=(0,Jt.Y)().translate;n.A.setProgramCode4RoutePath(r);var l=function(){return(0,k.Y)(sr,{onFinish:function(t){A.A.clear(),window.location.hash="#/context-setter",n.A.setHydrocarbonToken(t)},title:(0,k.Y)("h3",null,u("${欢迎登录}")),autoSaveUser:o})};return(0,k.Y)(H.A,{justify:"center",align:"middle",className:"login-blue",style:"center"==i?a:{background:e.colorPrimary}},i?"left"==i?(0,k.Y)(v.Fragment,null,(0,k.Y)(z.A,{span:12},c),(0,k.Y)(z.A,{span:12},l()," ")):"center"==i?(0,k.Y)(v.Fragment,null,(0,k.Y)(z.A,{span:24},l()," ")):void 0:(0,k.Y)(v.Fragment,null,(0,k.Y)(z.A,null,l())))},pr=ve((function(t){return(0,k.Y)("div",{style:{position:"relative",width:"100%",height:"100%"}},(0,k.Y)("div",{style:{position:"absolute",top:"10px",right:"10px",zIndex:"10000"}},(0,k.Y)(Xt,{size:"large"})),(0,k.Y)(hr,t))})),dr=r(37187),vr=r(97135);function yr(){yr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function gr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gr=function(){return!!t})()}var mr=function(t){function e(){var t,r,n,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return r=this,n=e,a=[].concat(c),n=(0,h.A)(n),t=(0,f.A)(r,gr()?Reflect.construct(n,a||[],(0,h.A)(r).constructor):n.apply(r,a)),(0,d.A)(t,"state",{loading:!1,config:null,context:null}),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"handleSubmit",(0,u.A)(yr().mark((function e(){var r;return yr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),r=t.state.config,e.next=4,t.formRef.current.validateFields().then(function(){var t=(0,u.A)(yr().mark((function t(e){var n;return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},r.forEach((function(t){n[t.id]=e[t.id]})),t.next=4,o.A.setContext(n);case 4:t.sent;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){}));case 4:t.setState({loading:!1});case 5:case"end":return e.stop()}}),e)})))),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(yr().mark((function t(){var e,r;return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getContextSourceConfig();case 2:return e=t.sent,t.next=5,o.A.getContextSourceValue();case 5:if(r=t.sent,e&&0!=e.length){t.next=10;break}return e=[],window.location.hash="#/home",t.abrupt("return");case 10:this.setState({config:e,context:r,loading:!1});case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(yr().mark((function t(e){return yr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.context.translate,e=this.state,r=e.config,n=e.loading,o=e.context,a=this.props.serverKey;return(0,k.Y)(dr.A,{title:t("${全局配置}"),closable:!1,open:!0,footer:[]},(0,k.Y)(H.A,{justify:"center",align:"middle"},(0,k.Y)(z.A,null,(0,k.Y)(_t.A,{style:{width:350},ref:this.formRef,name:"normal_login",className:"login-form",initialValues:{remember:!0}},r?r.map((function(t){var e=null;return o&&o.forEach((function(r){r.moduleName==t.moduleName&&(e=r.selectedValues)})),(0,k.Y)(_t.A.Item,{name:t.id,initialValue:e,rules:[{required:!0,message:"请选择"+t.title}]},(0,k.Y)(vr.A,{serverKey:a,id:"14",fieldConfig:{id:t.groupId,title:t.title,controlType:"entity-select",max:"1",required:!0,sourceId:t.groupId,suppleOptions:t.canNotSet?[{code:"all",title:"不设置"}]:void 0}}))})):null,(0,k.Y)(_t.A.Item,null,(0,k.Y)(g.Ay,{type:"primary",style:{width:"100%"},loading:n,onClick:this.handleSubmit,className:"login-form-button"},t("${确定}")))))))}}]);var r,n}(v.PureComponent);(0,d.A)(mr,"defaultProps",{}),(0,d.A)(mr,"contextType",x.U);var wr=ve(mr),br=r(17308),Ar=r(70870),xr=r(14378),kr=["resultStatus"],Cr=function(t){var e=t.resultStatus,r=void 0===e?"success":e,n=(0,c.A)(t,kr),o=n.title,a=n.open,i=n.subtitle,u=n.goAdd,l=n.goEdit,s=n.goList,f=n.jumpTypes,h=n.addOrUpdate,p=(0,Jt.Y)().translate;return(0,k.Y)(dr.A,{title:o||p("${保存提示}"),open:a,closable:!1,destroyOnClose:!0,footer:[],bodyStyle:{height:430,overflow:"auto"},width:560,maskClosable:!0},(0,k.Y)(xr.Ay,{status:r,title:p("success"===r?"${保存成功}":"${保存失败}"),subTitle:i,extra:[u&&f&&f.includes("add")?(0,k.Y)(g.Ay,{key:"goOnAdd",onClick:function(){return u()}},p("update"===h?"${转添加}":"${继续添加}")):void 0,l&&f&&f.includes("edit")?(0,k.Y)(g.Ay,{type:"primary",key:"goOnEdit",onClick:function(){return l()}},p("update"===h?"${继续编辑}":"${编辑实体}")):"",s&&f&&f.includes("list")?(0,k.Y)(g.Ay,{type:"primary",key:"onBackList",onClick:function(){return s()}},p("${返回列表}")):""]}))},Lr=r(54040),Er=r(62477),Or=r(76945),Sr=r(43903),Yr=r(50329),jr=r(22503);function Ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ir=function(){return!!t})()}var Pr=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Ir()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"calcOffsetBottom",(function(t,e){var r=0;return e&&(r+=e.length),t&&t.includes("dtmplSave")&&(r+=1),r>=3?120:2==r?86:80})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){(0,Er.A)(this.state);var t,e=this.props,r=e.dtmplConfig,n=e.formRef,o=e.doSubmit,a=e.loading,i=e.serial,c=e.serverKey,u=e.dtmplData,l=r.buttons,s=r.actions,f=[],h=this.context.translate;return r.premises&&r.premises.length>0&&f.push({id:"1",title:h("${默认字段}")}),r.groups.forEach((function(t){f.push({title:t.title,id:t.id})})),s&&s.length>1&&(t=(0,k.Y)("div",{className:"btns"},s.map((function(t,e){if(e>1)return(0,k.Y)(jr.A,{serverKey:c,data:[u],iconType:"icon-title",hiddenType:"disabled",buttonType:"primary",serial:i,key:t.id,formRef:n,actionConfig:t,doAction:o})})))),(0,k.Y)(Or.A,{style:{position:"absolute",bottom:60,right:15},offsetBottom:this.calcOffsetBottom(l,s)},(0,k.Y)("div",{className:"submitButtonBar"},(0,k.Y)("ul",null,l.includes("dtmplSave")?(0,k.Y)("li",{key:100},(0,k.Y)(g.Ay,{loading:a,onClick:function(){return o()},type:"primary",icon:(0,k.Y)(Sr.A,null),key:"btn",block:!0},h("${保存}"))):"",s?s.map((function(t,e){if(e<2)return(0,k.Y)("li",{key:e},(0,k.Y)(jr.A,{loading:a,data:[u],serverKey:c,hiddenType:"disabled",buttonType:"primary-block",serial:i,key:t.id,formRef:n,actionConfig:t,doAction:o}))})):"",s&&s.length>2?(0,k.Y)(Ft.A,{placement:"leftTop",content:t,trigger:"hover"},(0,k.Y)(g.Ay,{block:!0},(0,k.Y)(Yr.A,null),h("${更多}"))):"")))}}])}(v.PureComponent);(0,d.A)(Pr,"contextType",x.U);var Tr=Pr;function Nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nr=function(){return!!t})()}var Dr=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Nr()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){(0,Er.A)(this.state);var t=this.props,e=t.dtmplConfig,r=t.position,n=t.doSubmit,o=t.formRef,a=t.serial,i=t.serverKey,c=t.dtmplData,u=t.loading,l=e.buttons,s=e.actions,f=this.context.translate;return(0,k.Y)(m.A,{variant:"borderless"},(0,k.Y)(H.A,{align:"middle",justify:"bottomLeft"==r?"start":"bottomRight"==r?"end":"center"},(0,k.Y)(w.A,null,l.includes("dtmplSave")?(0,k.Y)(z.A,null,(0,k.Y)(g.Ay,{onClick:function(){return n()},type:"primary",loading:u,icon:(0,k.Y)(Sr.A,null),key:"btn",block:!0},f("${保存}"))):null,s?s.map((function(t,e){return(0,k.Y)(z.A,null,(0,k.Y)(jr.A,{loading:u,serverKey:i,serial:a,key:t.id,data:[c],formRef:o,actionConfig:t,doAction:n}))})):"")))}}])}(v.PureComponent);(0,d.A)(Dr,"contextType",x.U);var _r=Dr;function Rr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Rr=function(){return!!t})()}var Fr=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Rr()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.position,r=t.doSubmit,n=t.serial,o=t.dtmplConfig,a=t.formRef,i=t.dtmplData,c=t.loading,u=e||(o.buttonPosition?o.buttonPosition:void 0);return(0,k.Y)(v.Fragment,null,u&&"fixedBottomRight"!=u?(0,k.Y)(_r,{loading:c,position:u,doSubmit:r,serial:n,dtmplConfig:o,formRef:a,dtmplData:i}):(0,k.Y)(Tr,{loading:c,doSubmit:r,serial:n,dtmplConfig:o,formRef:a,dtmplData:i}))}}])}(v.PureComponent);(0,d.A)(Fr,"defaultProps",{loading:!1});var Gr=Fr,Mr=r(97823);function Kr(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 Br(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Br(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Br(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vr(){Vr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function qr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qr=function(){return!!t})()}var Hr=function(t){function e(){var t,r,a,i;(0,l.A)(this,e);for(var c=arguments.length,s=new Array(c),p=0;p<c;p++)s[p]=arguments[p];return r=this,a=e,i=[].concat(s),a=(0,h.A)(a),t=(0,f.A)(r,qr()?Reflect.construct(a,i||[],(0,h.A)(r).constructor):a.apply(r,i)),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"newCode",void 0),(0,d.A)(t,"state",{id:"dtmplEdit"+n.A.getRandomNum(6),showPostResult:!1,dtmplConfig:void 0,loading:!0,serial:1,dtmplData:void 0}),(0,d.A)(t,"autoSaveTimer",-1e15),(0,d.A)(t,"autoSaveInterval",void 0),(0,d.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,d.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,d.A)(t,"loadConfigData",(0,u.A)(Vr().mark((function e(){var r,n,o,a,i,c,u,l,s;return Vr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.sourceId,i=o.code,c=o.serverKey,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!i){e.next=9;break}return e.next=6,A.A.requestDtmplConfig(c,a,i);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,A.A.requestAddDtmplConfig(c,a,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=i){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:i,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:return t.setState({dtmplConfig:l,loading:!1}),e.abrupt("return",l);case 22:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadData",function(){var e=(0,u.A)(Vr().mark((function e(r){var n,a,i,c,u,l,s,f;return Vr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,a=n.sourceId,i=n.code,c=n.addOrUpdate,u=n.serverKey,l=n.codeSource,(s=i)||!l){e.next=6;break}return e.next=5,o.A.queryCode(a,l,u);case 5:s=e.sent;case 6:if(r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),!s){e.next=16;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=11,o.A.getDtmplData(r,u,a,s);case 11:f=e.sent,t.props.code!=f.code||f.sourceId&&t.props.sourceId!=f.sourceId||("copy"==c&&f&&(f.code=void 0),t.setState({dtmplData:f,id:s})),t.setState({loading:!1}),e.next=17;break;case 16:t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 17:setTimeout((function(){return t.onValuesChange()}),300);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"doSubmit",function(){var e=(0,u.A)(Vr().mark((function e(r){var n;return Vr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({loading:!0}),n=t.props.mainCode,t.formRef.current.setFieldsValue({actionId:r}),n&&t.formRef.current.setFieldsValue({mainCode:n}),t.formRef.current.submit();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"onFinish",(function(e){if(t.setState({loading:!1}),e){t.newCode=e;var r=t.state.dtmplConfig,n=r.saveJumpTo?r.saveJumpTo:[];n.length>1?t.setState({showPostResult:!0}):n.includes("edit")?t.goEdit():n.includes("add")?t.goAdd():n.includes("nothing")||t.goList()}})),(0,d.A)(t,"goList",(function(){t.newCode=void 0,t.props.goBackToLtmpl&&t.props.goBackToLtmpl()})),(0,d.A)(t,"goEdit",(function(){var e=t.newCode,r=t.props,n=r.goDtmpl;r.code,t.newCode=void 0,n(e),t.setState((function(t){return{showPostResult:!1}}))})),(0,d.A)(t,"goAdd",(function(){t.newCode=void 0;var e=t.state.dtmplData,r=t.props,n=r.goDtmpl;r.code&&n(),t.setState((function(t){return{showPostResult:!1,dtmplData:$r($r({},e),{},{arrayMap:{}})}}))})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:function(){this.loadConfigData()}},{key:"componentDidUpdate",value:(r=(0,u.A)(Vr().mark((function t(e,r,n){return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e==this.props){t.next=7;break}return t.t0=this,t.next=4,this.loadConfigData();case 4:return t.t1=t.sent,t.next=7,t.t0.loadData.call(t.t0,t.t1);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.state,e=t.dtmplConfig,r=t.showPostResult,n=t.loading,o=t.id,a=t.serial,i=t.dtmplData,c=this.props,u=c.sourceId,l=c.showRightNav,s=c.code,f=c.addOrUpdate,h=c.maxColsOnRow,p=c.mainCode,d=c.serverKey,v=[];if(!e)return(0,k.Y)(m.A,{loading:n});var y=e.actions;if(y){var g,w=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Kr(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)?Kr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(y);try{for(w.s();!(g=w.n()).done;){var b=g.value;b.writes&&b.writes.forEach((function(t){v.push({id:t.id,value:t.value})}))}}catch(t){w.e(t)}finally{w.f()}e.hiddenFields=v}return(0,k.Y)("div",{className:"detailPage ",onClick:this.onClickBody},(0,k.Y)(Ar.A,{showRightNav:l,serverKey:d,mainCode:p,parentId:o,dtmplConfig:e,formRef:this.formRef,sourceId:u,onFinish:this.onFinish,maxColsOnRow:h,showConfirm:!0,dtmplData:i,onValuesChange:this.onValuesChange}),l?(0,k.Y)(Lr.A,{parentId:o,dtmplConfig:e}):"",(0,k.Y)(Gr,{loading:n,dtmplData:i,serverKey:d,serial:a,dtmplConfig:e,doSubmit:this.doSubmit,formRef:this.formRef}),(0,k.Y)(Mr.A,{serverKey:d,dtmplConfig:e,mainCode:s}),(0,k.Y)(Cr,{open:r,addOrUpdate:"copy"==f?"add":f,resultStatus:"success",goList:this.goList,goEdit:this.goEdit,goAdd:this.goAdd,jumpTypes:e.saveJumpTo}))}}]);var r}(v.PureComponent);(0,d.A)(Hr,"defaultProps",{showRightNav:!0});var zr=r(22395),Ur=r(84145),Wr=r(40261),Qr=r(33748),Jr=r(29494),Zr=r(84697),Xr=r(84957),tn=r(27251);function en(){en=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function rn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rn=function(){return!!t})()}var nn=function(t){function e(){var t,r,a,i;(0,l.A)(this,e);for(var c=arguments.length,s=new Array(c),p=0;p<c;p++)s[p]=arguments[p];return r=this,a=e,i=[].concat(s),a=(0,h.A)(a),t=(0,f.A)(r,rn()?Reflect.construct(a,i||[],(0,h.A)(r).constructor):a.apply(r,i)),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"context",void 0),(0,d.A)(t,"state",{loading:!0,dtmplConfig:void 0,snapshotOpen:!1,premisesTitle:"默认字段",layout:{labelCol:{span:8},wrapperCol:{span:16}},refreshCode:void 0,actionDtmplData:void 0}),(0,d.A)(t,"loadActionDtmplData",function(){var e=(0,u.A)(en().mark((function e(r){var n,a,i,c,u;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=void 0,a=t.props,i=a.sourceId,c=a.code,u=a.serverKey,!(null!=r&&r.viewActions&&(null==r?void 0:r.viewActions.length)>0)){e.next=6;break}return e.next=5,o.A.requestViewDtmplData(u,i,c,null);case 5:n=e.sent;case 6:t.setState({actionDtmplData:n});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"doRefresh",(0,u.A)(en().mark((function e(){var r;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.state.dtmplConfig,e.next=3,t.loadActionDtmplData(r);case 3:t.setState({refreshCode:n.A.getRandomNum(6)});case 4:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"goEdit",(function(){var e=t.props;(0,e.goDtmpl)(e.code)})),(0,d.A)(t,"showSnapshot",(function(){t.setState({snapshotOpen:!0})})),(0,d.A)(t,"onSnapshotClose",(function(){t.setState({snapshotOpen:!1})})),(0,d.A)(t,"toSnapshot",(function(){})),(0,d.A)(t,"onSubmit",function(){var e=(0,u.A)(en().mark((function e(r){var n,a,i,c,u;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),n=t.props,a=n.sourceId,i=n.code,c=n.serverKey,i&&(r["唯一编码"]=i),e.next=5,o.A.postDtmplData(c,a,r,Dt.Ay);case 5:u=e.sent,t.setState({loading:!1}),"success"===u.status&&(t.props.goBackToLtmpl?t.props.goBackToLtmpl():t.doRefresh());case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(en().mark((function t(){var e,r,n,o;return en().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.sourceId,e.code,n=e.serverKey,t.next=3,A.A.requestViewDtmplConfig(n,r);case 3:return o=t.sent,t.next=6,this.loadActionDtmplData(o);case 6:this.setState({dtmplConfig:o});case 7:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e=this,r=this.props,n=r.showRightNav,o=r.rightBarPositionRight,a=r.code,i=r.sourceId,c=r.goDtmpl,u=r.serverKey,l=r.codeSource,s=r.title,f=(r.showHeader,this.state),h=f.dtmplConfig,p=f.snapshotOpen,d=f.refreshCode,v=f.actionDtmplData,y=this.context.translate,m=h?h.buttons:void 0,w=n;h&&h.groups.length<4&&(w=!1);var b=[];return b.push({label:(0,k.Y)(Ur.A,{size:50}),key:"main",children:(0,k.Y)(Zr.A,{codeSource:l,serverKey:u,refreshCode:d,showRightNav:w,rightBarPositionRight:o,dtmplConfig:h,sourceId:i,code:a})}),a&&null!=h&&h.viewRactions&&h.viewRactions.forEach((function(t){tn.A.isShow(null==t?void 0:t.preposes,[v],void 0)&&b.push({label:t.title,key:t.id,children:(0,k.Y)(wt.A,{readOnly:!0,serverKey:null,sourceId:t.id,mainCode:a})})})),(0,k.Y)("div",{className:"detailPage ".concat(w?"showRightNav":"noRightNav")},(0,k.Y)(zr.A,{type:"card",defaultActiveKey:"main",style:{marginBottom:32},tabBarExtraContent:{left:(0,k.Y)("h3",{style:{marginRight:20,marginLeft:10}},y("${"+(s||"详情")+"}"),h?(0,k.Y)(Xr.A,{content:h.tip}):null),right:(0,k.Y)("div",{className:"fr"},m&&m.includes("dtmplEdit")&&c&&!h.editAction?(0,k.Y)(g.Ay,{className:"hoverbig",onClick:this.goEdit},(0,k.Y)(Wr.A,null)):"",null==h||null===(t=h.viewActions)||void 0===t?void 0:t.map((function(t){return(0,k.Y)(jr.A,{serverKey:u,iconType:"icon-title",hiddenType:"disabled",data:[v],key:t.id,formRef:e.formRef,actionConfig:t,doAction:e.doSubmit})})),m&&m.includes("history")?(0,k.Y)(Z.A,{title:y("${数据快照}")},(0,k.Y)(g.Ay,{className:"hoverbig",onClick:this.showSnapshot},(0,k.Y)(Qr.A,null))):"",(0,k.Y)(g.Ay,{className:"hoverbig",title:y("${刷新}"),onClick:this.doRefresh},(0,k.Y)(Te.A,null)),(0,k.Y)(Jr.A,{serverKey:u,dtmplConfig:h,code:a,onClose:this.onSnapshotClose,showSnapshot:this.toSnapshot,sourceId:i,open:p}))},items:b}),(0,k.Y)(_t.A,{scrollToFirstError:!0,labelWrap:!0,ref:this.formRef,name:"control-hooks",onFinish:this.onSubmit},(0,k.Y)(_t.A.Item,{hidden:!0,name:"actionId"}),(0,k.Y)(_t.A.Item,{hidden:!0,name:"mainCode"})))}}]);var r}(v.PureComponent);(0,d.A)(nn,"defaultProps",{showRightNav:!0,rightBarPositionRight:15,showHeader:!0}),(0,d.A)(nn,"contextType",x.U);var on=nn;function an(){an=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cn=function(){return!!t})()}var un=function(t){function e(){var t,r,n,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return r=this,n=e,a=[].concat(c),n=(0,h.A)(n),t=(0,f.A)(r,cn()?Reflect.construct(n,a||[],(0,h.A)(r).constructor):n.apply(r,a)),(0,d.A)(t,"state",{codeSource:void 0,queriedCode:void 0}),(0,d.A)(t,"queryCode",(0,u.A)(an().mark((function e(){var r,n,a,i;return an().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,a=t.getCodeSource(),e.next=5,o.A.queryCode(n,a);case 5:i=e.sent,t.setState({codeSource:a,queriedCode:i});case 7:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"getCodeSource",(function(){return t.props.searchParams.get("codeSource")})),(0,d.A)(t,"goBackToLtmpl",(function(){t.props.navigate(-1)})),(0,d.A)(t,"goNavigatel",(function(){t.props.navigate(window.location.hash)})),(0,d.A)(t,"goDtmpl",(function(e){var r=t.props.params.sourceId,n=t.props.basePath,o="".concat(n).concat(t.computedLayoutPath,"/").concat(r,"/detail-edit?menuId=").concat(t.getMenuId());e&&(o+="&code=".concat(e));var a=t.getMainCode();a&&(o+="&mainCode=".concat(a)),t.props.navigate(o)})),(0,d.A)(t,"getMainCode",(function(){return t.props.searchParams.get("mainCode")})),(0,d.A)(t,"getCode",(function(){var e=t.state,r=e.codeSource,n=e.queriedCode,o=t.props.searchParams;return r?n:o.get("code")})),(0,d.A)(t,"getMode",(function(){var e=t.props.searchParams;return t.getCode()?e.get("mode"):"add"})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(an().mark((function t(){return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.queryCode();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"computedLayoutPath",get:function(){var t=this.props.layoutRootPath;return void 0!==t?"/".concat(t):""}},{key:"shouldComponentUpdate",value:function(t,e){return t&&t==this.props||this.setState({codeSource:void 0,queriedCode:void 0}),!0}},{key:"componentDidUpdate",value:(r=(0,u.A)(an().mark((function t(e,r,n){return an().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e==this.props){t.next=3;break}return t.next=3,this.queryCode();case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.location,r=t.params,n=t.searchParams,o=r.sourceId,a=this.state.codeSource;if(!e)return(0,k.Y)(v.Fragment,null);var i=this.getCode();if(i&&"bad-code"==i)return(0,k.Y)(br.A,null);var c=r.versionId;return e.pathname.endsWith("detail-view")?(0,k.Y)(on,{key:o+i+c,serverKey:null,goBackToLtmpl:a?void 0:this.goBackToLtmpl,goDtmpl:this.goDtmpl,sourceId:o,versionId:c,code:i,mainCode:this.getMainCode()}):(0,k.Y)(Hr,{key:o+i+c,addTmplId:n.get("addTmplId"),serverKey:null,addOrUpdate:this.getMode(),sourceId:o,code:i,mainCode:this.getMainCode(),goBackToLtmpl:a?this.goNavigatel:this.goBackToLtmpl,goDtmpl:this.goDtmpl})}}]);var r,n}(v.Component);(0,d.A)(un,"defaultProps",{basePath:"",codeSource:void 0,queriedCode:void 0});var ln=ve(un),sn=r(56522),fn=r(46675),hn=r(45705);function pn(){pn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dn=function(){return!!t})()}var vn=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,dn()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(r=(0,u.A)(pn().mark((function t(){return pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.title,r=t.sourceId,n=t.code,o=t.open,a=t.onClose,i=t.width,c=t.height,u=t.serverKey,l=t.codeSource;return(0,k.Y)(dr.A,{open:o,width:i,title:e,styles:{body:{height:c,overflow:"auto"}},destroyOnHidden:!0,centered:!0,onCancel:a},(0,k.Y)(ce.Ay,{autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(hn.A,{codeSource:l,serverKey:u,sourceId:r,code:n})))}}]);var r}(v.PureComponent);(0,d.A)(vn,"defaultProps",{height:"82vh",width:"82vw",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},open:!1});var yn=vn;function gn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gn(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wn(){wn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bn=function(){return!!t})()}var An=function(t){function e(){var t,r,o,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return r=this,o=e,a=[].concat(c),o=(0,h.A)(o),t=(0,f.A)(r,bn()?Reflect.construct(o,a||[],(0,h.A)(r).constructor):o.apply(r,a)),(0,d.A)(t,"context",void 0),(0,d.A)(t,"state",{ltmplConfigRes:void 0,pageNo:void 0,pageSize:void 0,selectedCode:void 0,showDraw:!1,ractionId:void 0,showViewDrawer:!1,showViewModal:!1,showEdit:!1,showWindowType:"modal",routeMode:"multiple",viewSourceId:void 0,editSourceId:void 0}),(0,d.A)(t,"Z",void 0),(0,d.A)(t,"onRoute",(function(e){t.props.navigate(e)})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"doClose",(function(){t.setState({showDraw:!1,showViewDrawer:!1,showViewModal:!1,showWindowType:void 0,showEdit:!1,selectedCode:void 0})})),(0,d.A)(t,"loadData",(0,u.A)(wn().mark((function e(){var r,n,o;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,e.next=4,A.A.requestLtmplConfig(null,n);case 4:o=e.sent,t.setState({ltmplConfigRes:o});case 6:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"showView",(function(e){var r=t.props.basePath,n=t.props.params.sourceId,o=t.state.ltmplConfigRes.ltmplConfig,a=o.buttonViewConfig?o.buttonViewConfig.showType:"drawer",i=e.dtmplSourceId?e.dtmplSourceId:n,c="".concat(r).concat(t.computedLayoutPath,"/").concat(i,"/detail-view?code=").concat(e.code,"&menuId=").concat(t.getMenuId());e.toCustomPage&&o.customViewPagePath&&(c="".concat(r).concat(t.computedLayoutPath).concat(o.customViewPagePath,"?menuId=").concat(t.getMenuId(),"&sourceId=").concat(n)),"routing"==a?t.onRoute(c):"blank"==a?window.open("#"+c,"_blank"):t.setState({showViewModal:"modal"==a,showViewDrawer:"drawer"==a,selectedCode:e.code,viewSourceId:i})})),(0,d.A)(t,"doEdit",(function(e){var r,n=t.props.basePath,o=t.props.params.sourceId,a=t.state.ltmplConfigRes,i=t.getMainCode(),c=a.ltmplConfig;r=c.buttonEditConfig?c.buttonEditConfig.showType:"modal";var u=e.dtmplSourceId?e.dtmplSourceId:o,l="".concat(n).concat(t.computedLayoutPath,"/").concat(u,"/detail-edit?code=").concat(e.code,"&menuId=").concat(t.getMenuId(),"&mode=").concat(e.mode);e.toCustomPage&&c.customEditPagePath&&(l="".concat(n).concat(t.computedLayoutPath,"/page/").concat(u).concat(c.customEditPagePath,"?code=").concat(e.code,"&menuId=").concat(t.getMenuId())),i&&(l+="&mainCode=".concat(i)),"routing"==r?t.onRoute(l):"blank"==r?window.open("#"+l,"_blank"):t.setState({showEdit:!0,showWindowType:r,selectedCode:e.code,editSourceId:u})})),(0,d.A)(t,"getMainCode",(function(){var e=void 0,r=t.props.searchParams.get("mainCode");return r&&(e=r),e})),(0,d.A)(t,"doCreate",(function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.props.basePath,o=t.props.params.sourceId,a=t.state.ltmplConfigRes.ltmplConfig,i=a.buttonAddConfig?a.buttonAddConfig.showType:"modal",c="".concat(n).concat(t.computedLayoutPath,"/").concat(o,"/detail-edit?menuId=").concat(t.getMenuId(),"&addTmplId=").concat(e||"");r&&a.customEditPagePath&&(c="".concat(n).concat(t.computedLayoutPath,"/page/").concat(o).concat(a.customEditPagePath,"?menuId=").concat(t.getMenuId()));var u=t.getMainCode();u&&(c+="&mainCode=".concat(u)),"routing"==i?t.onRoute(c):"blank"==i?window.open("#"+c,"_blank"):t.setState({showWindowType:i,showEdit:!0})})),(0,d.A)(t,"doRAction",(function(e,r){t.setState({selectedCode:r,showDraw:!0,ractionId:e})})),(0,d.A)(t,"pathMark",(function(){var e=t.props.tableType;return e&&"report"==e?"report-table":"act-table"})),(0,d.A)(t,"doSearch",(function(e){var r,o=t.props.basePath,a=t.props.params.sourceId,i=mn(mn({},n.A.transQueryStrToParams(t.props.location.search,null===(r=t.state.ltmplConfigRes)||void 0===r?void 0:r.ltmplConfig)),e),c=n.A.transQueryParamsToStr(mn({},i));t.props.navigate("".concat(o).concat(t.computedLayoutPath,"/").concat(a,"/").concat(t.pathMark(),"?").concat(c),{replace:!0})})),(0,d.A)(t,"onChangeSearch",(function(e){var r=mn({},e),n=t.props.searchParams.get("mainCode");n&&(r.mainCode=n);var o=t.state,a=o.pageSize;o.pageNo,r.pageNo=1,a&&(r.pageSize=a),r.menuId=t.getMenuId(),r.sourceId=t.getMenuId(),t.doSearch(r)})),(0,d.A)(t,"doSubmited",(function(){t.onChangeSearch({serial_number:n.A.getReactKey()}),t.doClose()})),(0,d.A)(t,"onChangePage",(function(e,r){var o=t.props.location.search,a=n.A.transQueryStrToParams(o,null);a.pageNo=e,a.pageSize=r,t.doSearch(a)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(o=(0,u.A)(wn().mark((function t(){return wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadData();case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"computedLayoutPath",get:function(){var t=this.props.layoutRootPath;return void 0!==t?"/".concat(t):""}},{key:"componentDidUpdate",value:(r=(0,u.A)(wn().mark((function t(e){var r,n,o,a,i,c;return wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props,n=r.location,o=r.params,a=o.sourceId,i=e.params.sourceId,c=e.location,!(!a||!i&&this.state.ltmplConfigRes||n.pathname==c.pathname&&n.search==c.search)){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,this.loadData();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t,e,r,o,a=this,i=this.state,c=i.ltmplConfigRes,u=i.showDraw,l=i.showWindowType,s=i.ractionId,f=i.selectedCode,h=i.showViewDrawer,p=i.showViewModal,d=i.showEdit,y=i.editSourceId,m=i.viewSourceId,b=this.props,A=b.location,x=b.params,C=b.tableType,L=b.rowOperatable,E=x.sourceId,O=this.context.translate,S=void 0,Y=A.search,j=n.A.transQueryStrToParams(Y,null==c?void 0:c.ltmplConfig),I=j.pageSize,P=j.pageNo;Y.indexOf("mainCode")>0&&(S=j.mainCode);var T=c?c.ltmplConfig:null,N=null==T||null===(t=T.buttonViewConfig)||void 0===t?void 0:t.windowWidth;N=N&&N>0?N:1280;var D=null==T||null===(e=T.buttonViewConfig)||void 0===e?void 0:e.windowHeight;D=D&&D>0?D:"80vh";var _=null==T||null===(r=T.buttonEditConfig)||void 0===r?void 0:r.windowWidth;_=_&&_>0?_:1280;var R=null==T||null===(o=T.buttonEditConfig)||void 0===o?void 0:o.windowHeight;return R=R&&R>0?R:"80vh",T?(0,k.Y)(v.Fragment,null,(0,k.Y)(er.A,{key:E,tableType:C,serverKey:null,pageSize:I,pageNo:P,onChangePage:this.onChangePage,menuId:this.getMenuId(),operatable:L,mainCode:S,showView:this.showView,doSearch:this.onChangeSearch,doEdit:this.doEdit,doCreate:this.doCreate,sourceId:E,criteriaData:j,ltmplConfig:T,doRAction:this.doRAction}),u?(0,k.Y)(gt.A,{placement:"left",title:O("${关联查询}"),closable:!0,mask:!1,onClose:this.doClose,open:u,width:"calc(100% - 280px)",style:{maxWidth:1960},extra:(0,k.Y)(w.A,null,(0,k.Y)(g.Ay,{onClick:this.doClose},O("${关闭}")))},(0,k.Y)(wt.A,{serverKey:null,sourceId:s,mainCode:f})):null,h&&f?(0,k.Y)(jt.A,{serverKey:null,placement:T.buttonViewConfig.windowPosition,width:N,onClose:this.doClose,open:h,sourceId:m||E,code:f}):null,p&&f?(0,k.Y)(yn,{serverKey:null,width:N,height:D,onClose:this.doClose,open:p,sourceId:m||E,code:f}):null,d&&T?T.customEditPagePath?(0,k.Y)(sn.A,{open:d,onOk:function(){a.doSubmited()},customPath:T.customEditPagePath,sourceId:E,mainCode:S,code:f}):(0,k.Y)(fn.A,{defaultDtmplData:T.defaultDtmplData,serverKey:null,pageType:"modal"==l?"modal":"drawer",open:d,width:_,height:R,onCancel:this.doClose,mainCode:S,sourceId:y||E,code:f,onOk:this.doSubmited}):null):(0,k.Y)(v.Fragment,null)}}]);var r,o}(v.PureComponent);(0,d.A)(An,"contextType",x.U),(0,d.A)(An,"defaultProps",{basePath:"",tableType:"common",rowOperatable:!0});var xn=ve(An),kn=r(8835),Cn=r(77053);function Ln(){Ln=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function En(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(En=function(){return!!t})()}var On=K.A.Content,Sn=K.A.Sider,Yn=(Se.A.Text,Se.A.Title,function(t){function e(){var t,r,n,a;(0,l.A)(this,e);for(var i=arguments.length,c=new Array(i),s=0;s<i;s++)c[s]=arguments[s];return r=this,n=e,a=[].concat(c),n=(0,h.A)(n),t=(0,f.A)(r,En()?Reflect.construct(n,a||[],(0,h.A)(r).constructor):n.apply(r,a)),(0,d.A)(t,"state",{ttmplNodeConfig:void 0,recordCode:void 0,showEdit:!1,showView:!1,mainCode:void 0,sourceId:void 0,cardtitle:void 0,addTmplId:void 0}),(0,d.A)(t,"context",void 0),(0,d.A)(t,"refTmplTree",v.createRef()),(0,d.A)(t,"loadData",(0,u.A)(Ln().mark((function e(){var r,n;return Ln().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.ttmplConfig,e.next=3,Cn.A.initTtmplNodeConfig(r);case 3:n=e.sent,t.setState({ttmplNodeConfig:n,showEdit:!1,showView:!1});case 5:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"onEditRoot",(function(e,r){var n=t.props.ttmplConfig;t.showCard(e,n.rootGtmplId,null,r,!0,!1)})),(0,d.A)(t,"showCard",(function(e,r,n,o,a,i,c){t.setState({mainCode:n,cardtitle:e,recordCode:o,showEdit:a,showView:i,sourceId:r,addTmplId:c})})),(0,d.A)(t,"onViewRoot",(function(e,r){var n=t.props.ttmplConfig;t.showCard(e,n.rootGtmplId,null,r,!1,!0,null)})),(0,d.A)(t,"onEditSub",(function(e,r,n,o){t.showCard(e,r,n,o,!0,!1,null)})),(0,d.A)(t,"onViewSub",(function(e,r,n,o){t.showCard(e,r,n,o,!1,!0,null)})),(0,d.A)(t,"onDelete",function(){var t=(0,u.A)(Ln().mark((function t(e,r){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.deleteByCode(null,e,[r]);case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),(0,d.A)(t,"onAddSub",(function(e,r,n,o){t.showCard(e,r,n,null,!0,!1,o)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(Ln().mark((function t(){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Ln().mark((function t(e){var r,n;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.ttmplConfig,!(n=this.props.ttmplConfig)||!r||n.id!=r.id){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this.loadData();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props.top,r=this.context,n=r.translate,o=r.siderCollapsed,a=this.state,i=a.ttmplNodeConfig,c=a.showView,u=a.showEdit,l=a.recordCode,s=a.mainCode,f=a.sourceId,h=a.cardtitle,p=a.addTmplId;return i?(0,k.Y)(K.A,{hasSider:!0,style:{backgroundColor:"#fff"}},(0,k.Y)(Sn,{width:300,theme:"light",style:{height:"90vh",position:"fixed",left:0,top:e,bottom:0,marginLeft:o?10:210}},(0,k.Y)(kn.A,{doEditRoot:this.onEditRoot,doEditSub:this.onEditSub,doDelete:this.onDelete,doViewRoot:this.onViewRoot,doViewSub:this.onViewSub,doAddSub:this.onAddSub,ttmplNodeConfig:i,ref:this.refTmplTree})),(0,k.Y)(K.A,{style:{marginLeft:322,backgroundColor:"#fff"}},(0,k.Y)(On,{style:{overflow:"initial"}},u?(0,k.Y)(Mn,{addTmplId:p,title:(0,k.Y)(v.Fragment,null,l?(0,k.Y)(v.Fragment,null,n("${编辑}")," ",h||""):(0,k.Y)(v.Fragment,null,n("${添加}")," ",h||"")," "),mainCode:s,sourceId:f,code:l,onOk:function(e){var r;null===(r=t.refTmplTree.current)||void 0===r||r.reloadData(s),t.setState({recordCode:e})}}):null,c?(0,k.Y)(hn.A,{mainCode:s,sourceId:f,code:l}):null))):(0,k.Y)(m.A,{loading:!0})}}]);var r,n}(v.PureComponent));function jn(){jn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function In(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?In(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):In(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}(0,d.A)(Yn,"defaultProps",{top:66}),(0,d.A)(Yn,"contextType",x.U);var Nn=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Tn()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{ttmplConfig:void 0}),(0,d.A)(t,"onRoute",(function(e){t.props.navigate(e)})),(0,d.A)(t,"getMenuId",(function(){return t.props.searchParams.get("menuId")})),(0,d.A)(t,"loadData",(0,u.A)(jn().mark((function e(){var r,n,o;return jn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.props.params,n=r.sourceId,e.next=4,A.A.requestTtmplConfig(null,n);case 4:"1M"==(o=e.sent).type?t.props.navigate("".concat(t.computedLayoutPath,"/").concat(o.id,"/act-table")):t.setState({ttmplConfig:Pn({},o)});case 6:case"end":return e.stop()}}),e)})))),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(n=(0,u.A)(jn().mark((function t(){return jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.loadData();case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"computedLayoutPath",get:function(){var t=this.props.layoutRootPath;return void 0!==t?"/".concat(t):""}},{key:"componentDidUpdate",value:(r=(0,u.A)(jn().mark((function t(e){var r,n,o,a;return jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).location,n=r.params,o=n.sourceId,a=e.params.sourceId,e.location,!o||!a||o!=a){t.next=6;break}return t.abrupt("return");case 6:return t.next=8,this.loadData();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props.treeTop,e=this.state.ttmplConfig;return e?(0,k.Y)(v.Fragment,null,(0,k.Y)(Yn,{key:e.sourceId,top:t,ttmplConfig:e})):(0,k.Y)(m.A,{loading:!0})}}]);var r,n}(v.PureComponent);(0,d.A)(Nn,"defaultProps",{basePath:""});var Dn=ve(Nn);function _n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Rn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_n(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Fn(){Fn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Gn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gn=function(){return!!t})()}v.PureComponent,r(68455);var Mn=function(t){function e(){var t,r,a,i;(0,l.A)(this,e);for(var c=arguments.length,s=new Array(c),p=0;p<c;p++)s[p]=arguments[p];return r=this,a=e,i=[].concat(s),a=(0,h.A)(a),t=(0,f.A)(r,Gn()?Reflect.construct(a,i||[],(0,h.A)(r).constructor):a.apply(r,i)),(0,d.A)(t,"formRef",v.createRef()),(0,d.A)(t,"autoSaveTimer",-1e15),(0,d.A)(t,"autoSaveInterval",void 0),(0,d.A)(t,"context",void 0),(0,d.A)(t,"onClickBody",(function(e){t.autoSaveTimer=0})),(0,d.A)(t,"state",{id:"dtmplEditCard"+n.A.getRandomNum(6),queryingCode:void 0,dtmplConfig:void 0,loading:!0,serial:1,dtmplData:void 0}),(0,d.A)(t,"loadConfigData",(0,u.A)(Fn().mark((function e(){var r,n,o,a,i,c,u;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.serverKey,i=r.addTmplId,t.setState({loading:!0}),c=void 0,!o){e.next=9;break}return e.next=6,A.A.requestDtmplConfig(a,n,o);case 6:c=e.sent,e.next=12;break;case 9:return e.next=11,A.A.requestAddDtmplConfig(a,n,i);case 11:c=e.sent;case 12:if(!c.entity){e.next=18;break}u=c.entity,c.entity=void 0,t.setState({queryingCode:o,dtmplData:u,dtmplConfig:c,loading:!1}),e.next=21;break;case 18:return e.next=20,t.loadData(c);case 20:t.setState({dtmplConfig:c,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadData",function(){var e=(0,u.A)(Fn().mark((function e(r){var n,a,i,c,u,l;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,a=n.sourceId,i=n.serverKey,c=n.code,u=n.codeSource,(l=c)||!u){e.next=6;break}return e.next=5,o.A.queryCode(a,u,i);case 5:l=e.sent;case 6:return e.next=8,t.loadCodeData(r,l);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,d.A)(t,"reloadData",(0,u.A)(Fn().mark((function e(){var r,n,a,i,c,u,l,s,f;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.state,n=r.queryingCode,a=r.dtmplConfig,i=t.props,c=i.sourceId,u=i.serverKey,l=i.code,s=i.codeSource,(f=l||n)||!s){e.next=7;break}return e.next=6,o.A.queryCode(c,s,u);case 6:f=e.sent;case 7:return e.next=9,t.loadCodeData(a,f);case 9:case"end":return e.stop()}}),e)})))),(0,d.A)(t,"loadCodeData",function(){var e=(0,u.A)(Fn().mark((function e(r,n){var a,i,c,u,l;return Fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props,i=a.sourceId,c=a.defaultDtmplData,u=a.serverKey,r.autoSaveInterval&&r.autoSaveInterval>0&&(t.autoSaveInterval&&clearInterval(t.autoSaveInterval),t.autoSaveInterval=setInterval((function(){t.autoSaveTimer>=r.autoSaveInterval?(t.autoSaveTimer=-1e15,t.doSubmit(void 0)):t.autoSaveTimer=t.autoSaveTimer+1}),1e3)),!n){e.next=11;break}return t.setState({loading:!0,queryingCode:n,dtmplData:void 0}),e.next=6,o.A.getDtmplData(r,u,i,n);case 6:l=e.sent,t.state.queryingCode&&n!=l.code||l.sourceId&&t.props.sourceId!=l.sourceId||t.setState({dtmplData:l,id:n}),t.setState({loading:!1}),e.next=12;break;case 11:c?t.setState({dtmplData:Rn({},c),loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 12:setTimeout((function(){return t.onValuesChange()}),300);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,d.A)(t,"onValuesChange",(function(){t.setState({serial:t.state.serial+1})})),(0,d.A)(t,"doSubmit",(function(e,r,n){var o=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),o&&t.formRef.current.setFieldsValue({mainCode:o}),n&&t.formRef.current.setFieldsValue(n),t.formRef.current.submit()})),(0,d.A)(t,"getFooter",(function(){var e=t.props.serverKey,r=t.state,n=(r.dtmplData,r.serial),o=t.context.translate,a=[];a.unshift((0,k.Y)(g.Ay,{onClick:function(){return t.reloadData()}},o("${刷新}"))),a.unshift((0,k.Y)(g.Ay,{onClick:function(){return t.doSubmit()},type:"primary"},o("${保存}")));var i=t.state.dtmplConfig;return i&&i.actions.forEach((function(r,o){a.unshift((0,k.Y)(jr.A,{serverKey:e,iconType:"icon-title",hiddenType:"disabled",serial:n,key:r.id,formRef:t.formRef,actionConfig:r,doAction:t.doSubmit}))})),a})),(0,d.A)(t,"onFinish",(function(e){t.setState({loading:!1}),e&&t.props.onOk(e)})),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"componentDidMount",value:(a=(0,u.A)(Fn().mark((function t(){return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadConfigData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,u.A)(Fn().mark((function t(e){var r,n,o,a,i;return Fn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state,n=r.dtmplConfig,o=r.dtmplData,a=r.queryingCode,!e||e==this.props){t.next=16;break}if(i=this.props.code?this.props.code:a,e.sourceId==this.props.sourceId&&null!=n&&(this.props.code||!e.code)){t.next=8;break}return t.next=6,this.loadConfigData();case 6:case 12:t.next=16;break;case 8:if(e.sourceId==this.props.sourceId&&a==i&&o){t.next=16;break}if(!i){t.next=14;break}return t.next=12,this.loadCodeData(n,i);case 14:return t.next=16,this.loadData(n);case 16:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}},{key:"render",value:function(){var t=this.props,e=t.sourceId,r=t.mainCode,n=t.style,o=t.maxColsOnRow,a=t.title,i=t.serverKey,c=this.state,u=c.dtmplConfig,l=c.id,s=c.dtmplData;return(0,k.Y)(v.Fragment,null,(0,k.Y)(m.A,{onClick:this.onClickBody,styles:{body:{padding:"6px"},header:{alignItems:"center"}},title:a,style:Rn({minWidth:1==o?"360px":"720px"},n),extra:(0,k.Y)(w.A,null,this.getFooter())},(0,k.Y)(Ar.A,{serverKey:i,showHeader:!1,mainCode:r,parentId:l,dtmplConfig:u,formRef:this.formRef,sourceId:e,onFinish:this.onFinish,maxColsOnRow:o,showConfirm:!1,dtmplData:s,onValuesChange:this.onValuesChange})))}}]);var r,a}(v.PureComponent);(0,d.A)(Mn,"contextType",x.U),(0,d.A)(Mn,"defaultProps",{showConfirm:!1,okText:"确定"});var Kn=["title","placement","width","onCancel","open"];function Bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bn=function(){return!!t})()}var $n=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,Bn()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.title,r=t.placement,n=t.width,o=t.onCancel,a=t.open,i=(0,c.A)(t,Kn);return(0,k.Y)(gt.A,{title:e,placement:r,closable:!0,mask:!1,onClose:o,open:a,width:n,style:{maxWidth:"92vw"}},(0,k.Y)(wt.A,i))}}])}(v.PureComponent);(0,d.A)($n,"defaultProps",{showConfirm:!0,width:"76vw",forceRender:!0,style:{maxWidth:"92vw",maxHeight:"92vh"},okText:"确定",cancelText:"取消",placement:"left"});var Vn=["title","height","width","onCancel","open"];function qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qn=function(){return!!t})()}var Hn=function(t){function e(){var t,r,n,o;(0,l.A)(this,e);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return r=this,n=e,o=[].concat(i),n=(0,h.A)(n),t=(0,f.A)(r,qn()?Reflect.construct(n,o||[],(0,h.A)(r).constructor):n.apply(r,o)),(0,d.A)(t,"state",{}),(0,d.A)(t,"context",void 0),t}return(0,p.A)(e,t),(0,s.A)(e,[{key:"render",value:function(){var t=this.props,e=t.title,r=t.height,n=t.width,o=t.onCancel,a=t.open,i=(0,c.A)(t,Vn),u=this.context.translate;return(0,k.Y)(dr.A,{open:a,width:n,title:e,closable:!1,bodyStyle:{height:r,overflow:"auto",padding:"6 0 6 6"},destroyOnClose:!0,centered:!0,onOk:o,onCancel:o,footer:[(0,k.Y)(g.Ay,{onClick:o},u("${关闭}"))]},(0,k.Y)(ce.Ay,{autoHide:!0,autoHideTimeout:1e3},(0,k.Y)(m.A,{bordered:!1,bodyStyle:{padding:"4px 10px 0 0"}},(0,k.Y)(wt.A,i))))}}])}(v.PureComponent);(0,d.A)(Hn,"defaultProps",{showConfirm:!0,height:"82vh",width:"82vw",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)",padding:10},okText:"确定",cancelText:"取消"}),(0,d.A)(Hn,"contextType",x.U);var zn=r(74712),Un=(r(68144),r(1157),r.p+"images/welcome-8bf57aea.png"),Wn=ve((function(){var t=(0,de.g)().programCode;return t&&n.A.setProgramCode(t),(0,k.Y)(v.Fragment,null,(0,k.Y)("div",{style:{width:"100%",display:"flex",flexDirection:"row"}},(0,k.Y)("div",{style:{width:"50%",boxSizing:"border-box",padding:10}},(0,k.Y)(G,null)),(0,k.Y)("div",{style:{width:"50%",boxSizing:"border-box",padding:10}},(0,k.Y)(j,null))),(0,k.Y)("img",{src:Un,alt:"",width:"100%",height:"100%"}))}));function Qn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Zn(){Zn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}r(23605);var Xn=function(){return(0,s.A)((function t(){(0,l.A)(this,t)}),null,[{key:"post",value:(r=(0,u.A)(Zn().mark((function t(e,r,n){var o,a,i;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(o=new FormData).append("sourceId",e),o.append("jsonEntity",JSON.stringify(r)),t.next=5,M.A.super({url:this.url,serverKey:n,data:o,method:"POST"},"formdata",null);case 5:return a=t.sent,i=null,a?"success"===a.status&&(Dt.Ay&&(a.message?Dt.Ay.warning((0,tt.A)("${保存成功}!")+a.message,4):Dt.Ay.success((0,tt.A)("${保存成功}!"),1)),i=a.entityCode?a.entityCode:a.code):Dt.Ay&&Dt.Ay.error((0,tt.A)("${保存失败}!"),5),t.abrupt("return",{code:i,status:a?a.status:"error"});case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"get",value:(e=(0,u.A)(Zn().mark((function t(e,r,n){var o;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M.A.super({url:this.url,serverKey:n,query:Jn({pageSize:1e3,sourceId:e},r),method:"GET"},null,null);case 2:return(o=t.sent)?"success"===o.status?(Dt.Ay&&o.message&&Dt.Ay.warning((0,tt.A)("${查询成功}!")+o.message,4),o.entityCode?o.entityCode:o.code):o.message&&Dt.Ay.error((0,tt.A)("${查询失败}!")+o.message,5):Dt.Ay&&Dt.Ay.error((0,tt.A)("${查询失败}!"),5),t.abrupt("return",o||{status:"error"});case 6:case"end":return t.stop()}}),t,this)}))),function(t,r,n){return e.apply(this,arguments)})},{key:"delete",value:(t=(0,u.A)(Zn().mark((function t(e,r,n){var o;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M.A.super({url:this.url,serverKey:n,query:{sourceId:e,codes:r},method:"DELETE"},null,null);case 2:return(o=t.sent)?"success"===o.status?(Dt.Ay&&o.message&&Dt.Ay.warning((0,tt.A)("${删除成功}!")+o.message,4),o.entityCode?o.entityCode:o.code):o.message&&Dt.Ay.error((0,tt.A)("${删除失败}!")+o.message,5):Dt.Ay&&Dt.Ay.error((0,tt.A)("${删除失败}!"),5),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(e,r,n){return t.apply(this,arguments)})}]);var t,e,r}();(0,d.A)(Xn,"url","/v3/mstruc/data");var to=r(78229),eo=r(95424),ro=r(74046),no=r(67345),oo=r(44297),ao=r(19930);function io(){io=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}var co=function(t){var e=(0,Jt.Y)(),r=e.translate,n=e.changeSiderCollapsed,a=e.getSiderCollapsed,c=(0,ao.A)("keepAliveTabs",{defaultValue:[]}),l=(0,pe.A)(c,2),s=(l[0],l[1]),f=(0,de.Zp)(),h=(0,v.useState)({id:void 0,name:void 0}),p=(0,pe.A)(h,2),d=p[0],y=p[1],m=function(){var t=(0,u.A)(io().mark((function t(){var e;return io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getUser();case 2:e=t.sent,y(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,v.useEffect)((function(){}),[d]);var w=(0,v.useState)(),b=(0,pe.A)(w,2),x=b[0],C=b[1],L=function(){var t=(0,u.A)(io().mark((function t(){var e;return io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getContextSourceValue();case 2:e=t.sent,C(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,v.useEffect)((function(){L()}),[]);var E=(0,v.useState)(!1),O=(0,pe.A)(E,2),S=O[0],Y=O[1];(0,v.useEffect)((function(){void 0!==(null==d?void 0:d.name)&&null!==(null==d?void 0:d.name)?Y(!0):Y(!1)}),[d]),(0,v.useEffect)((function(){m()}),[]);var j=function(){var t=(0,u.A)(io().mark((function t(){return io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s([]),t.next=3,o.A.logout2();case 3:f("/login2");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=[{label:(0,k.Y)(X.k2,{to:"/login2"},r("${登录}")),key:"login",icon:(0,k.Y)(St.A,null),show:function(){return!S}},{label:(0,k.Y)(Nt,{gtmplSourceId:null==d?void 0:d.gtmplSourceId,editable:null==d?void 0:d.changePersonalInfoable,userCode:null==d?void 0:d.id}),key:"userInfo",icon:(0,k.Y)(Yt.A,null),show:function(){return S&&(null==d?void 0:d.viewPersonalInfoable)}},{label:(0,k.Y)(X.k2,{to:"/context-setter"},r("${全局配置}")),key:"globalContext",icon:(0,k.Y)(_e.A,null),show:function(){return S&&Array.isArray(x)&&x.length>0}},{label:(0,k.Y)($t,null),key:"resetPwd",icon:(0,k.Y)(ro.A,null),show:function(){return S&&d.changePasswordable}},{label:(0,k.Y)("span",{onClick:function(){return A.A.reload([])}},r("${清空缓存}")),key:"cleanCache",icon:(0,k.Y)(no.A,null),show:function(){return S&&d.cleanCachable}},{label:(0,k.Y)("span",{onClick:function(){return n()}},a()?r("${显示侧边栏}"):r("${隐藏侧边栏}")),key:"collapseSider",icon:(0,k.Y)("span",null,a()?(0,k.Y)(W.A,null):(0,k.Y)(Q.A,null)),show:function(){return S}},{label:(0,k.Y)("span",{onClick:j},r("${退出}")),key:"logout",icon:(0,k.Y)(Ot.A,null),show:function(){return S}}].filter((function(t){return!t.show||t.show()})).map((function(t){return{label:t.label,key:t.key,icon:t.icon}}));return(0,k.Y)(lt.A,{overlayClassName:"localeButton",menu:{items:I,onClick:function(t){t.key}}},(0,k.Y)(g.Ay,(0,i.A)({type:"text",icon:(0,k.Y)(oo.A,null),style:{width:"100%",height:"100%",borderRadius:0,color:"#fff"}},t),S?null==d?void 0:d.name:r("${请登录}")))};function uo(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return lo(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)?lo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function lo(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}var so=function(t){if(Array.isArray(t.children)&&t.children.length){var e,r=uo(t.children);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(!n.disabled)return so(n)}}catch(t){r.e(t)}finally{r.f()}}return t.disabled||Array.isArray(t.children)&&(!Array.isArray(t.children)||0!==t.children.length)?{target:"_self",path:null}:{target:t.linkTarget,path:t.url}},fo=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;try{var o,a=[],i=uo(t);try{for(i.s();!(o=i.n()).done;){var c=o.value,u=c.id,l=(c.label,c.disabled),s=(c.url,c.linkTarget,c.children),f={label:e(c,n),key:u,disabled:l,className:r,children:Array.isArray(s)&&s.length?fo(s,e,r,n+1):null};a.push(f)}}catch(t){i.e(t)}finally{i.f()}return a}catch(e){console.log("handlePropsMenuToAntdMenu",e,"menu: ".concat(t))}},ho=function(t,e,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=0;o<t.length;o++){var a=t[o];e?Array.isArray(a.children)&&ho(a.children,!1,o,n):(n[a.id]=r,Array.isArray(a.children)&&ho(a.children,!1,r,n))}return n},po=(0,v.createContext)({menuItemIdToFirstFloorIdxMap:{},updateMenuItemIdToFirstFloorIdxMap:function(t){},documentTitle:"",setDocumentTitle:function(t){}}),vo=function(t){var e=t.children,r=n.A.programName()?n.A.programName():"HYDROCARBON",o=(0,v.useState)(),a=(0,pe.A)(o,2),i=a[0],c=a[1],u=(0,v.useState)({}),l=(0,pe.A)(u,2),s=l[0],f=l[1];return(0,k.Y)(po.Provider,{value:{documentTitle:i,setDocumentTitle:function(t){c("".concat(t," - ").concat(r))},menuItemIdToFirstFloorIdxMap:s,updateMenuItemIdToFirstFloorIdxMap:function(t){f(ho(t,!0))}}},e)},yo=function(){var t=(0,v.useContext)(po);return{documentTitle:t.documentTitle,setDocumentTitle:t.setDocumentTitle,menuItemIdToFirstFloorIdxMap:t.menuItemIdToFirstFloorIdxMap,updateMenuItemIdToFirstFloorIdxMap:t.updateMenuItemIdToFirstFloorIdxMap}};function go(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?go(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):go(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var wo=q.A.useToken,bo=function(t){var e=t.systemName,r=t.menuList,o=t.style,a=yo(),i=a.setDocumentTitle,c=a.menuItemIdToFirstFloorIdxMap,u=wo().token.colorPrimary,l=(0,ge.cM)(u);console.log("header",l);var s=(0,Jt.Y)(),f=s.translate,h=s.getLocale,p=(0,v.useState)([]),d=(0,pe.A)(p,2),y=d[0],g=d[1];(0,v.useEffect)((function(){g(fo(r,(function(t,e){var r=t.disabled,o=t.label,a=t.children,i=t.id;if(r)return(0,k.Y)("div",{style:{color:"inherit",width:"100%",height:"100%",display:"block"}},(0,k.Y)(w.A,{size:"small"},n.A.mapMenuIcon(i),f("${"+o+"}")));var c=so(t),u=c.path,l=c.target;return 0===e?null===u?(0,k.Y)("div",{style:{color:"inherit",width:"100%",height:"100%",display:"block"}},f("${"+o+"}")):(0,k.Y)(X.k2,{to:"/".concat(u),target:l,style:{color:"inherit",width:"100%",height:"100%",display:"block"}},(0,k.Y)(w.A,{size:"small"},n.A.mapMenuIcon(i),f("${"+o+"}"))):Array.isArray(a)&&!a.length?(0,k.Y)(X.k2,{to:"/".concat(u),target:l,style:{color:"inherit",width:"100%",height:"100%",display:"block"}},f("${"+o+"}")):(0,k.Y)(w.A,{size:"small"},n.A.mapMenuIcon(i),f("${"+o+"}"))}),"layout2-header-menu-item"))}),[r,h()]);var m=(0,v.useState)([]),b=(0,pe.A)(m,2),A=b[0],x=b[1],C=(0,de.g)().sourceId,L=(0,X.ok)(),E=(0,pe.A)(L,2),O=E[0],S=(E[1],O.get("menuId"));(0,v.useEffect)((function(){void 0!==C&&x([C]),void 0!==S&&x([S])}),[C,S]),(0,v.useEffect)((function(){if(void 0===C)void 0!==r[0]&&x([r[0].id]),i("");else{var t,e=null===(t=r[c[C]])||void 0===t?void 0:t.label;i(f("${"+e+"}"))}}),[r,C]);var Y=f("${"+e+"}");return(0,k.Y)(K.A.Header,{style:mo({padding:0,display:"flex",flexDirection:"row",background:u,color:"#FFFFFF"},o)},(0,k.Y)(X.k2,{style:{width:"200px",minWidth:"200px",height:"100%",display:"flex",paddingLeft:"10px",alignItems:"center",fontSize:"18px",userSelect:"none",color:"inherit"},to:"/v2/home"},(0,k.Y)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ2MCwgMjAyMC8wNS8xMi0xNjowNDoxNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTQ1MDQ2Nzk4OTJFMTFFRjhGNDU5NURFREJDMzM3OUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTQ1MDQ2N0E4OTJFMTFFRjhGNDU5NURFREJDMzM3OUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNDUwNDY3Nzg5MkUxMUVGOEY0NTk1REVEQkMzMzc5RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNDUwNDY3ODg5MkUxMUVGOEY0NTk1REVEQkMzMzc5RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmwXnh8AAA83SURBVHja7J3ZbxvHHcdn9iC5PCRRMiXqsGRLPqPERZPAsYPYSZPmAFoUTV+KvBToQwu0QJt/oM996VvzUKDoS4oWaYEiKYoUTdwCge2gdRI4QmwriS3LliVRJ3VLvPaY/obi0svhzHJpy6Ys7gDjXVHcXfn32e9vfjM781v8q1//EdVRcI2fa32+1wvx+DnxekKlTii8fVwnvGaBQxxbXAc8z4BqwWD33YDhJgNibwnnZ/YY7AZKqQFHBEFiPsMuoPaymogAkKhaAlhClSl1wpFqbGuB2suQRECcW8yAYuFUQVJqwJEYOG5VBGqvqohVgAgMr2LHd4jjsypIigc4LAi5VCVmixlYzaAinnosh/HN0r7J7GMHJKtkMy4kkYJ4cOTS92VHVRhgPDU1i4JY1dhADAcgs2QXgzkXD1KFglhDYo5ibCCqY1/hQBOpaC9BEkVsFqMYswTDcIDSHbYwGUhOOMV9hQOGB0hxwHFWhalOt2efY6+7ONa98eDoji174xJOyI3cXBxPPTacgKOqsagW/u6rJ7/V09XxfCQcHFYUuQNjrKAmLhYhWUM305lsfiw1t3T+n+c+/WhjM5spwZE4EIhgv+ziRMqRGOVQKEF7+8Pvn/320UO9P1dVpRf5pVwkjLVAQNlPa1tr5MUjgz0/vT6e+t1f37vwb47LFwUZ5e/IZ196nQfI6dYCDjjBYEAN/+zH33lzcCD5pixLLT4S90Jt1Lmv7cXhYwPRL67dHjFNy/LYsS1Ha073JgmCg7KCfvKj137RlWh7wzd9fYXajNrO4YVUQXBV4QYljwFCMSh44wfPv+LDuT9I1IZMkCWKfDES9FV40ZtCA4IjQ72/9M18fwVs+Ca1JaebIvF4eFWQ8r3XTr0CUVrCN/H9FbDhPrDlqy5wqhTkqYPa3RU/65t3Z0pPsv2Mhw6+pzaorKKwFjzmm3ZnihYKHOOop6aCkIubk0Gacd+0O+bm2j0OjXFdHFdJGGPVN+3OlNJoi5tyKlwcdlGRE5JfdnjQAbk/P3ON4tgnqNi3584LCbk/jea2QW4q8svOK8hNPUgEqNmnTz1sFbnamhck8L7sQ3qwcLCIg1TjYB/MwwPl2cXVkqFfHpyLuydAfmlwJOEXH5Bf7rU80hM8CCGGYZgrumEuWRbR6Sdl546xrCpKOx1DlCQc8gE1oFAw6+uZa6nZ9MhWJr9hWpZZanlxKBTQers7noi3Rodhf9AH9DDB6MYihbOYXrs8MbUw+p/zI9dQ5WSLYl/i9NPHFo4M9c51dcbXggE1qQaUTrw9guwDelAFVLK5tp65upBe/XLs1szo7PzyInycRXdnddqApLHbMxOZXGFraCu70t3V/lhHe8tpVZE7fEAPBsxGLleY3NzKTVy/OX3x40ujV7K5AgVjT6m1GAVJ6aX1HNTVL67dmjhzanh6+NhAviUWHtK0wIAiPxrPtx4JQBAMmNlsYSI1u/Tx/OLKzRs3U2MAZx3dnVLLBYQc08ZujKduyrJkgbu709e979lYTHtclqSoD+g+VaPr5urGZuarhcXVqxcvjV4ESEslMLoHQPbsWGN+cZXWdU0Ljr36rSc3e5Lt8xBAfENR5TZQU5sP6B4KqObO8srGtVt35i4tpldnAc4CfFxg4HgCZNdsNm9+PTY1srS8PntosGe5Ix4bbmmJPLVbgwdlF7ozPV8wZqG9SUH4fOnLG1OXr4zenoRf5UtwChw4JqpcVogcgAwGEgCaTkFdnJpJz3/ziaGZ/r7EVlgL9oWCgT7oM2k+INcQ2lxKL619Orew8uWtibmvbk/Oz5WitIKjGhz1iABJDMTyEpHJ6YX5UFAdyef1TFdn22GI9J7TQoFDPiBWNWAsQzdWMtn8rdW1rbEvRm9f+Gzkxhj8KldSTr6Ga7M4/SDkCBTYdTvF4yyLWKCkaahp6C/dfuapo4VER+tcJBI6RGfeSBgHfEDU0oa5traRuXpnauES9GsmoX8zWYKT8+jaCK+jisSLeC0W7GRqcTYaCf23KxFPDR3sXm9rjZyAzm1fUwOCOzhT0A06IvC/ian5K+c++nykBCXroh6T47J4SSJsSLzFvYQFC20e+fzK+C3Yn3nu1PDGkcGeRQjJT9MRiEYus2koIB3gQHvzycjV8YugnGUHkDwDp8AJqS2BekSAeCuxEXNc8Zix8dTEViaXPXH8QCHZFX8mGtFONCcgw1gZn5i9DO3NHQcIVjFsf8fp1pyhNeE3bxVrQXkwqwBBf2kFam59PZM5c3pYDqhqQlWLyzsfepvU0OdBhCACbs42GAukVlDgBQ5C/NXXBud6OhMp6msbW3SoaDqby09BpznTCBs1/IGdBAVVroRm951gTJc2p0agKFwqb4iAQcifg3B/AdzdjGWSTNO5uKJPwUW3YjDG4gUCbmBwHaCQo/2xs34YjpDcCexeboa9A4jCoYXTR/EapXmBQ1wg2deWUHV+AzOgKpaqyDJ9OosaNLup8QoSJx0iAji4xpbXBrm1U6IMISYd/YYOK2puQBhbNcJmEZya85qReHm7WxKkcpUkTOSigLDUqNmBjR9JwMJUXoQJk1k4vKRNWACA7aDWCiJKW8yG8k07WEo8tDOYMwgqyqyFXJSBOPB5xxBoHS1/LM5TM1UEQJA4bx1viQwvNZiJKpPpoVruEePGqWe3ARIN1fCUw1shzbZFFgPIQJUpwIgHSLSN9AEJVIMZ9WBUmX2LTYMmHRrsaVGhUf9qbGoN3c146ITjhOhFRch3cbUhOZdp2nmDilXTgsHho/1dgwPJg9FIKBkMqnSmjvTsyeNrm5ncXGp2aeLGzdT8Qnp1i2mnRBEi9gF5B4Mc6kGIkx7t8MHu5GNH+092JdpeUFUlCWFxuGh1i+QM00zT5zuyJH0GgMYQPz+15WjbfAXVAYYHqpzYKdkZbwF31vv4sYGX21ojJyPh0CneCaEPsw9+1xcKqv8avT45Pj2TXuV0fomH/pQPSODaCKrOYaeCS0seO9x3pqO95WVVkXtEJwoG1IOyLLUOHezO5fJ6DgBtuoztcUckCCENhbZbpc0mFywHB6CIYH9f4ui+9pbnQRnHKQDhf07C0YCq9MfbYmcP7O880d3VHgNoKhLnaBNl2m96QKI8QVW5U9vj0Vg4HErKdUw2pKDC4eD+/b37OqPRkIaq00ljASxMCGpyBRHXrPYV6tFCgQCooRVU0ClhHKmDfigUDHR3xFs6QYEa4qeTZhUlgXuTaF+1qdugbSNUAbEYdRUBgWqCiiIH4agAqc9w9LsqdDq10mNrFfHfq1ABzDQtybJK1yHNCohjGFQ9SKpsGxipEEKrpkmo66lnnMwyLQtDVeDMdipK50M7J6CyugCOpOsGsbYXhpGmBGRHxA7DWIz7tZUFYCy1oBuSRay67mlSFCqxwNgY+kd2JmPC9LWcHeHi3wLfxbphWnR1BUKNGThVGuveEDGhODqfpsNoFqsguJMV+Lp6b560eC0JINvXIo6xOVZBxZEKAFp8GFR8HtSg9rrRCgKjFd2H7GgXMAOorCByN51xvQ339oN1VHwyaqdFts9tMv2tcq5wSZJoYELbvRAcLzcdIAh/1Vg0bM/aDDB3MgtIyed1eSG9tgHbTbrCu46GztB1M7u+mdlcWd00S5Cc1yGMqy0OJUEHN9Hf13kYIr9+SZbCTQhI0tpaI4l4WzQEhsuVDCejyuUkzrYBLa9s5HK5wgZdpuI5QgCY4K4yS8vrm/mCbpZuBnu6l8UZsSheq6+7o6cjHjsMYX0vhPWhpgOkqnK8K9H25CsvPJmdmlmcmEotpgsFw6ANs0STcKJtxwTNR3GCowxEZVnCgYCqlSZyeI2xJRqed+5ra6ErGjLZvG6fnz41pVEA/IPoDB4V/kl2xtt6ku3dgwPdz7XEtGG4Zqwp+0F0jShd6tHfl8CxqJZojUVuZHP5LERqBdowS6WWgxqQ2hBspwSDgVBLLNwNx2p1uNKQFgomBvo6D7S2hJe3MvkMhQ2fS+z5oUOrdSfbB+Ot0UPwNx0HsK1N21GliWrpamsw+NPBoNoNBumH0DYDdzOdeiuV5swVY2S0PcuGfj+kacH9siJ5Nhx0cKPRSGjoQH9XSDc6Ng3DzNAboBSdOc+vyJKsRcLBg8FQoG83LIvcNaPZ4FoSsVg4VGz8SSmaq3yCQweFqFFl+twHdoKebwTwivT80NBHgYYOOEzh+SlPRY7uljWruwYQXc0mPaAkE9TYAAnAyo9czh4/29UeAER8Mz3IoUjvgESvPfbLw4FEvCiIeNj3y86rh/dWY6GLI76La5iLI17bINFb3P2yc8VC4nWzVYBEbyJs+AqzPa4eIgBVtrkkkJloybpfdlZBtVREJA9gipPPLYtkfZvukHS2H5VYLpCIWxTHeze1ZZjmkm/anSmGYS4j8Tpc4qUNqlq6kc3mb/mm3ZmSzRW+RrWzphBeR1W0oNaYnV+54Jt2Z8rM3PJFJE43wHVxIgWVcxf844NL50Cai75579u9pd8/9+k55J5STRjFceHQurGZzdwYT73lm/j+Ctjwt2vrW1uoMnkHC6kqiquloGJqlHfePf/hQnr1Hd/M91ao7agNUWXKmZoK4qmHbYPsREP537/9wVvp5fV3fXPXV8Bm71HbocpsXm4pb4pFPvvS68I3EPK2JvSIPrl8/RLNPx1vjRxtZLK7R6HoupG6fnP6N3/404dvg+1yqDL/ne7wUtwgQRG0QTYke/Gtjpi8a3959/wHsah2gb6EvSfZflYLBY4qqtKBH/EXduzA+A2dlrQEofR1iNYu0OCKtt+oMt2ZCE6Vm1M4HVXkgORUDxuKm3Bh489/++jvsP8+4r/ZXeKcY6+NpyFUuVKiKsBC/HRntRLjlhXEXsypJITuzpd2ArL9poxqv9V9L75NkghGX7h9SEc7bjLKMWuNySmOi2COSkRDQPbsTzthOG85oYT29qs+eTe0KNAyBNDccuERVkFOUBaqnMAu6ifZudZEysFN4uLcuinslgVjMYJwdXFYAIn3B0gOQDXf6t4ECnIbz3TN2c2BQ3iARJB4+adZNyZ5CNVRk6mIdXu8rSiHHRIB4kFiM3MgAUA3MHvdxdUCxVNKTTgiQEgAhw0kRDkFfEBiCG5AuNMKFA8Xx4j/WLxWztBme8U0cXF9bjBc53so93BhN5U1KxwvtkJeoTjL/wUYAIcmDxThel7fAAAAAElFTkSuQmCC",alt:"home",width:35,height:35,style:{marginRight:5}}),(0,k.Y)(Z.A,{title:Y},(0,k.Y)("span",{style:{width:"100%",height:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},f(Y)))),(0,k.Y)("div",{style:{display:"flex",flexDirection:"row",width:"calc(100% - 200px)",justifyContent:"space-between"}},(0,k.Y)(U.Ay,{theme:{components:{Menu:{itemBg:"transparent",popupBg:l[4],subMenuItemBg:l[4],itemHoverColor:"#fff",itemColor:"#fff",itemSelectedBg:l[2],subMenuItemSelectedColor:l[0],itemSelectedColor:"#fff !important",groupTitleColor:"#fff",horizontalItemHoverColor:"#fff",horizontalItemSelectedColor:"#fff",horizontalItemSelectedBg:l[6],fontSize:16}}}},(0,k.Y)(J.A,{mode:"horizontal",items:y,selectedKeys:A,style:{userSelect:"none",minWidth:0,flex:"auto"},className:"layout2-header-menu"})),(0,k.Y)("div",{style:{height:"100%",display:"flex",flexDirection:"row"}},(0,k.Y)("div",{style:{width:"64px",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)(Lt,null)),(0,k.Y)("div",{style:{width:"64px",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)(yt,null)),(0,k.Y)("div",{style:{width:"64px",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)(Xt,{shape:"default",size:"large",type:"text",style:{width:"100%",height:"100%",boxSizing:"border-box",padding:"0 10px",borderRadius:0,color:"#fff"}})),(0,k.Y)("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},(0,k.Y)(co,null)))))},Ao=q.A.useToken,xo=function(t){var e=t.menuList,r=t.collapsed,o=yo(),a=o.setDocumentTitle,i=o.menuItemIdToFirstFloorIdxMap,c=Ao().token.colorPrimary,u=(0,ge.cM)(c),l=(0,Jt.Y)(),s=l.translate,f=l.getLocale,h=(0,v.useRef)([]);(0,v.useEffect)((function(){h.current=function(t){for(var e=Array.from({length:t.length}).map((function(){return Array.from({length:0})})),r=0;r<t.length;r++){var n=t[r];Array.isArray(n.children)&&(e[r]=n.children)}return e}(e)}),[e]);var p=(0,v.useState)([]),d=(0,pe.A)(p,2),y=d[0],g=d[1],m=function(t){return fo(t,(function(t,e){var r=t.disabled,o=t.label,a=t.children,i=t.id;if(r)return(0,k.Y)("div",{style:{color:"inherit",width:"100%",height:"100%",display:"block"}},s("${"+o+"}"));var c=so(t),u=c.path,l=c.target;return Array.isArray(a)&&!a.length?(0,k.Y)(Z.A,{title:s("${"+o+"}")},(0,k.Y)(X.k2,{to:"/".concat(u),target:l,style:{color:"inherit",width:"100%",height:"100%",display:"block",textOverflow:"ellipsis",overflow:"hidden"}},(0,k.Y)(w.A,{size:"small"},n.A.mapMenuIcon(i),s("${"+o+"}")))):(0,k.Y)(w.A,{size:"small"},n.A.mapMenuIcon(i),s("${"+o+"}"))}))},b=(0,v.useState)([]),A=(0,pe.A)(b,2),x=A[0],C=A[1],L=(0,de.g)().sourceId,E=(0,X.ok)(),O=(0,pe.A)(E,2),S=O[0],Y=(O[1],S.get("menuId"));return(0,v.useEffect)((function(){if(e.length){var t=void 0!==Y?Y:void 0!==L?L:null;if(t){var r=h.current[i[t]];r&&(g(m(r)),C(function(t,e){var r=[],n=function(t){if(r.push(t.id),t.id===e)return!0;var o,a=!1,i=uo(t.children);try{for(i.s();!(o=i.n()).done;){var c=o.value;if(a)break;a=n(c)}}catch(t){i.e(t)}finally{i.f()}return!!a||(r.pop(),!1)};return n({id:"",label:"",disabled:!1,url:"",children:t}),r.shift(),r}(r,t)))}}else g([])}),[L,Y,e,f()]),(0,v.useEffect)((function(){if(void 0===L)void 0!==h.current[0]&&(g(m(h.current[0])),C([])),a("");else{var t,r=null===(t=e[i[L]])||void 0===t?void 0:t.label;a(s("${"+r+"}"))}}),[e,L,f()]),(0,k.Y)(K.A.Sider,{collapsed:r,collapsedWidth:0,style:{background:u[0],borderInlineEnd:"1px solid rgba(5, 5, 5, 0.06)",overflowY:"auto"}},(0,k.Y)(U.Ay,{theme:{components:{Menu:{itemBg:"transparent",itemHoverColor:"#222",itemColor:"#222",itemSelectedBg:u[1],groupTitleColor:"#222",fontSize:14}}}},(0,k.Y)(J.A,{mode:"inline",items:y,selectedKeys:x,openKeys:x,inlineCollapsed:!1,style:{userSelect:"none",borderInlineEnd:"none"},onOpenChange:function(t){C((0,Ee.A)(t))}})))},ko={refreshTab:function(){},closeTab:function(){},closeOtherTab:function(){}},Co=(0,v.createContext)(ko),Lo=r(97109),Eo=r(16933),Oo=function(t){var e=(0,Jt.Y)().translate,r=(0,Lo.u)(),o=r.activeTabRoutePath,a=r.tabs,i=void 0===a?[]:a,c=r.closeTab,u=r.refreshTab,l=r.closeOtherTab,s=(r.setTabs,(0,v.useMemo)((function(){return[i.length<=1?null:{label:e("${关闭}"),key:"close"},i.length<=1?null:{label:e("${关闭其他}"),key:"other"}].filter((function(t){return null!==t}))}),[i])),f=(0,v.useCallback)((function(t,e){var r=t.key;t.domEvent.stopPropagation(),"refresh"===r?u(e.routePath):"close"===r?c(e.routePath):"other"===r&&l(e.routePath)}),[l,c,u]),h=(0,v.useCallback)((function(t){var r,o=n.A.mapMenu(t.title)?n.A.mapMenu(t.title):t.title;return o=e("${"+o+"}"),(0,k.Y)(lt.A,{menu:{items:s,onClick:function(e){return f(e,t)}},trigger:["contextMenu"],onOpenChange:function(e){e&&d(t.pathname)}},(0,k.Y)("div",{className:"flex gap-[6px]",style:{margin:"-12px 0",padding:"12px 0"}},(r=t.icon)&&Eo.A[r]&&v.createElement(Eo.A[r]),o))}),[s]),p=(0,v.useMemo)((function(){return i.map((function(t){return{key:t.routePath,label:h(t),children:(0,k.Y)("div",{key:t.key,className:"overflow-y-auto"},t.children),closable:i.length>1}}))}),[i]),d=(0,de.Zp)(),y=(0,v.useCallback)((function(t){i.forEach((function(e){e.routePath==t&&d(e.pathname)}))}),[i]),g=(0,v.useMemo)((function(){return{closeTab:c,closeOtherTab:l,refreshTab:u}}),[c,l,u]);return(0,k.Y)(Co.Provider,{value:g},(0,k.Y)(zr.A,{tabBarStyle:{marginBottom:"4px"},activeKey:o,items:p,type:"editable-card",onChange:y,hideAdd:!0,onEdit:function(t,e){!function(t,e){"remove"===e&&c(t)}(t.toString(),e)},size:"small"}))};function So(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Yo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?So(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var jo=function(t){var e=t.style,r=t.children;return(0,k.Y)(K.A.Content,{style:Yo({background:"#fff",overflow:"auto"},e)},(0,k.Y)("div",{style:{width:"100%",height:"100%",overflow:"auto",padding:10}},r||(0,k.Y)(Oo,null)))};function Io(){Io=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Po(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 To(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var No=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;if(n)return"v2/page/".concat(t,"/").concat(n,"?menuId=").concat(t);var o=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?To(Object(r),!0).forEach((function(e){(0,d.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):To(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r);o.menuId=t;var a="",i="";switch(e){case"列表":a="act-table";break;case"树":a="act-tree";break;case"添加":a="detail-edit",i="new";break;case"编辑":a="detail-edit",i="listop";break;case"编辑或添加":a="detail-edit",i="listop-new";break;case"详情":a="detail-view",i="listop";break;case"导入":a="importer";break;case"报表":a="report-table";break;default:a=""}return""!==i&&(o.codeSource=i),"v2/".concat(t,"/").concat(a,"?").concat(Object.entries(o).map((function(t){var e=(0,pe.A)(t,2),r=e[0],n=e[1];return"".concat(r,"=").concat(n)})).join("&"))},Do=function(t){var e=[];t.sort((function(t,e){var r=Number(t.order),n=Number(e.order);return r<n?-1:r>n?1:0}));var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Po(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)?Po(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=o.id,i=o.title,c=o.disabled,u=o.hiddenOnDisabled,l=o.customPath,s=o.pageType,f=o.linkTarget,h=o.defaultCriteriaValue,p=o.items;if(!0!==u||!0!==c){var d={id:a,label:i,disabled:void 0!==c&&c,url:No(a,s,h,l),linkTarget:f,children:null!=p&&p.length?Do(p):[]};e.push(d)}}}catch(t){n.e(t)}finally{n.f()}return e},_o=function(){var t=(0,u.A)(Io().mark((function t(){var e,r,a;return Io().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.requestBlocks("","");case 2:return e=t.sent,r=[],null!=e&&e.blocks&&(r=Do(e.blocks)),a={},r.forEach((function(t){Ro(t,a)})),n.A.setMenuMap(a),t.abrupt("return",{menu:r,systemName:null==e?void 0:e.programName});case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ro=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(r[t.id]=t.label,null===(e=t.children)||void 0===e||e.forEach((function(t){Ro(t,r)})))},Fo=q.A.useToken,Go=function(t){var e=(0,ao.A)("keepAliveTabs",{defaultValue:[]}),r=(0,pe.A)(e,2),o=(r[0],r[1]);window.addEventListener("beforeunload",(function(){o([])}));var a=yo(),i=a.documentTitle,c=a.updateMenuItemIdToFirstFloorIdxMap,u=(0,Jt.Y)().getSiderCollapsed,l=Fo().token.colorPrimary;(0,v.useEffect)((function(){localStorage.setItem("version","v2")}),[]);var s=(0,v.useState)(""),f=(0,pe.A)(s,2),h=f[0],p=f[1],d=(0,v.useState)([]),y=(0,pe.A)(d,2),g=y[0],m=y[1];(0,v.useEffect)((function(){_o().then((function(t){var e=t.menu,r=t.systemName;p(r),m(e),c(e)}))}),[]);var w=(0,v.useRef)(void 0);return(0,v.useEffect)((function(){ye((0,ge.cM)(l))}),[]),(0,k.Y)(he(),{title:i},(0,k.Y)("div",{ref:w,style:{width:"100%",height:"100%",position:"absolute"}},(0,k.Y)(K.A,{style:{height:"100%"}},(0,k.Y)(bo,{systemName:h||n.A.programName_NavLeft(),menuList:g}),(0,k.Y)(K.A,null,(0,k.Y)(xo,{menuList:g,collapsed:u()}),(0,k.Y)(jo,null,t.children)))))},Mo=function(t){return(0,k.Y)(vo,null,(0,k.Y)(Go,null,t.children))};function Ko(){Ko=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&n.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,c,u){var l=h(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,a.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(e)+" is not iterable")}return w.prototype=b,o(C,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}var Bo=function(t){var e=(0,Jt.Y)().translate,r=(0,ao.A)("keepAliveTabs",{defaultValue:[]}),a=(0,pe.A)(r,2),i=(a[0],a[1]);(0,v.useEffect)((function(){localStorage.setItem("version","v2")}),[]);var c=(0,de.g)().programCode;(0,v.useEffect)((function(){void 0!==c&&n.A.setProgramCode(c)}),[c]);var l=(0,v.useState)(!1),s=(0,pe.A)(l,2),f=s[0],h=s[1],p=(0,v.useState)(!1),d=(0,pe.A)(p,2),y=d[0],m=d[1],w=(0,v.useState)(null),b=(0,pe.A)(w,2),A=b[0],x=b[1],C=(0,v.useState)(null),L=(0,pe.A)(C,2),E=L[0],O=L[1],S=_t.A.useForm(),Y=(0,pe.A)(S,1)[0],j=function(){var e=(0,u.A)(Ko().mark((function e(){var r,n,a,u,l,s,f,p;return Ko().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i([]),e.prev=1,e.next=4,Y.validateFields();case 4:return r=e.sent,n=r.username,a=r.password,u=r.kaptchaText,h(!0),l=t.programCode,s=t.onFinish,e.next=12,o.A.getRasPubkey(null,l||c);case 12:return f=e.sent,e.next=15,o.A.login({username:n,password:a},E,u,f,l||c);case 15:if("success"!==(p=e.sent).status){e.next=20;break}s(p.token),e.next=24;break;case 20:if("error"!==p.status){e.next=24;break}return m(!0),e.next=24,P();case 24:h(!1),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(1),console.error(e.t0);case 30:case"end":return e.stop()}}),e,null,[[1,27]])})));return function(){return e.apply(this,arguments)}}(),I=function(t){13===t.keyCode&&j()},P=function(){var t=(0,u.A)(Ko().mark((function t(){var e,r;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.A.getKaptchaToken(c);case 2:(e=t.sent)&&(r=e.img&&0==e.img.indexOf("data:")?e.img:"data:image/png;base64,".concat(e.img),x(r),O(e.kaptchaToken));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,k.Y)(_t.A,{name:"login",form:Y,wrapperCol:{span:24},initialValues:{remember:!0},autoComplete:"off"},(0,k.Y)(_t.A.Item,{name:"username",rules:[{required:!0,message:e("请输入用户名")}]},(0,k.Y)(Rt.A,{placeholder:e("请输入用户名"),style:{borderRadius:"50px",background:"#EEF3FB",height:"50px",fontSize:"15px",lineHeight:"15px"}})),(0,k.Y)(_t.A.Item,{name:"password",rules:[{required:!0,message:e("请输入密码")}]},(0,k.Y)(Rt.A.Password,{placeholder:e("请输入密码"),onKeyDown:I,style:{borderRadius:"50px",background:"#EEF3FB",height:"50px",fontSize:"15px",lineHeight:"15px"}})),y?(0,k.Y)(H.A,{gutter:8},(0,k.Y)(z.A,{span:16},(0,k.Y)(_t.A.Item,{style:{borderRadius:"50px",background:"#EEF3FB",height:"50px",fontSize:"15px",lineHeight:"15px"},name:"kaptchaText",rules:[{required:!0,message:e("${请输入}${验证码}!")}]},(0,k.Y)(Rt.A,{style:{borderRadius:"50px",background:"#EEF3FB",height:"50px",fontSize:"15px",lineHeight:"15px"},onKeyDown:I,prefix:(0,k.Y)(rr.A,{className:"site-form-item-icon"}),placeholder:e("${验证码}")}))),(0,k.Y)(z.A,{span:8},(0,k.Y)("img",{style:{borderRadius:"30px",background:"#EEF3FB",height:"50px",fontSize:"15px",lineHeight:"15px",cursor:"pointer"},width:110,title:e("${点击刷新}"),onClick:P,src:A}))):"",(0,k.Y)(_t.A.Item,{wrapperCol:{span:24}},(0,k.Y)(g.Ay,{type:"primary",onClick:j,shape:"round",loading:f,style:{width:"100%",height:"50px",fontSize:"15px",lineHeight:"15px"}},e("登录"))))},$o=r.p+"images/login-bg-027de94b.png",Vo=r(86989),qo=function(t){var e=(0,Jt.Y)().translate;return(0,k.Y)("div",{style:{width:"100%",height:"100%",position:"absolute",background:"url(".concat($o,")"),backgroundSize:"cover",display:"flex",flexDirection:"row-reverse",justifyContent:"flex-start",alignItems:"center"}},(0,k.Y)("div",{style:{width:"500px",background:"linear-gradient(0deg, #FFFFFF 65%, #DFEDFF)",boxShadow:"0px 10px 15px -3px rgba(0,0,0,0.1)",marginRight:"10%",padding:"60px",aspectRatio:"1/1"}},(0,k.Y)("div",{style:{fontWeight:600,fontSize:"30px",color:"#222222",marginBottom:10}},e("${欢迎,登录}")),(0,k.Y)("div",{style:{fontWeight:600,fontSize:"24px",color:"#222222",marginBottom:40}},"Aldehyde"==t.programName?"":(0,k.Y)(v.Fragment,null,(0,k.Y)(Vo.A,null),t.programName?e("${"+t.programName+"}"):e("${"+n.A.programName()+"}"))),(0,k.Y)(Bo,{onFinish:function(t){A.A.clear(),window.location.hash="/v2/home",n.A.setHydrocarbonToken(t)}}),(0,k.Y)(H.A,null,(0,k.Y)(z.A,{span:6,offset:18},(0,k.Y)($t,{showUserName:!0}))),(0,k.Y)("div",{style:{fontWeight:600,fontSize:"14px",color:"#999",marginTop:40}},(0,k.Y)(H.A,null,(0,k.Y)(z.A,null,"Copyright ◎ 2025"+(t.copyright?t.copyright:"浙江恩赫控股集团有限公司"))))))}},55208:function(t,e,r){"use strict";r.d(e,{A:function(){return y}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(8130),f=r(28073),h=r(37977),p=r(1026),d=r(17437);function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var y=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var s=arguments.length,h=new Array(s),p=0;p<s;p++)h[p]=arguments[p];return r=this,o=e,c=[].concat(h),o=(0,i.A)(o),t=(0,a.A)(r,v()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"state",{}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"toString",(function(t){return t?t.toString():t})),(0,u.A)(t,"viewButton",(function(e){var r=t.props,n=r.value,o=r.isHtml;return(0,d.Y)(l.Fragment,null,(0,d.Y)(f.A,{overlayStyle:{maxWidth:360},placement:"leftBottom",content:(0,d.Y)(l.Fragment,null,o?(0,d.Y)("div",{style:{padding:"6px"},dangerouslySetInnerHTML:{__html:n}}):(0,d.Y)("div",{style:{padding:"6px"}},n))},e))})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.value,r=t.isHtml,n=t.showMax,o=this.toString(e);if(r){var a=new RegExp("<[^<>]+>","g");o=null==e?void 0:e.replace(a,"")}var i=s.A.getLongTextStyle(o&&o.substring?o.substring(0,n):null);return(0,d.Y)(l.Fragment,null,o?o.length<=n||n<=0?(0,d.Y)(h.A,{placement:"leftTop",title:o},(0,d.Y)("span",{className:"infoStyle",style:i},o)):(0,d.Y)("span",{className:"infoStyle",style:i},this.viewButton(o.substring(0,n)+"...")):(0,d.Y)(l.Fragment,null))}}])}(l.PureComponent);(0,u.A)(y,"contextType",p.U),(0,u.A)(y,"defaultProps",{isHtml:!1,showMax:30})},56522:function(t,e,r){"use strict";r.d(e,{A:function(){return g}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(54839),f=r(37187),h=r(88133),p=r(54774),d=r(1026),v=r(17437);function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}var g=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var f=arguments.length,d=new Array(f),g=0;g<f;g++)d[g]=arguments[g];return r=this,o=e,c=[].concat(d),o=(0,i.A)(o),t=(0,a.A)(r,y()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"state",{}),(0,u.A)(t,"context",void 0),(0,u.A)(t,"getFooter",(function(){var e=t.props.onOk,r=t.context.translate,n=[];return n.unshift((0,v.Y)(s.Ay,{onClick:e,type:"primary"},r("${关闭}"))),n})),(0,u.A)(t,"customPage",(function(){var e=t.props,r=e.code,n=e.sourceId,o=e.open,a=e.mainCode,i=e.customPath,c=e.onOk;if(o){var u=p.vr.getCustomPage(i)||h.A;return l.createElement(u,{code:r,sourceId:n,mainCode:a,pageName:i,onOk:c})}})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props,e=t.height,r=t.onOk,n=t.open,o=t.width,a=t.title,i=t.bodyWidth,c=this.context.translate;return(0,v.Y)(f.A,{open:n,width:o,title:a,closable:!1,bodyStyle:{height:e,width:i,overflow:"auto"},destroyOnClose:!0,centered:!0,onCancel:r,footer:[(0,v.Y)(s.Ay,{onClick:function(){return r()}},c("${关闭}"))]},this.customPage())}}])}(l.PureComponent);(0,u.A)(g,"contextType",d.U),(0,u.A)(g,"defaultProps",{height:"82vh",width:"82vw",bodyWidth:"100%",forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"}})},56953:function(t,e,r){"use strict";var n=r(65425),o=(r(96540),r(17355)),a=r(1062),i=r(46704),c=r(94300),u=r(17437),l=o.A.TextArea;e.A=function(t){var e=t.id,r=t.value,o=(t.itemType,t.fieldConfig),s=t.onChange,f=(0,c.Y)().translate,h={id:e,placeholder:o.disabled?f("${无需输入}"):f("${请输入}${"+o.title+"}"),disabled:o.disabled};return(0,u.Y)(a.A,{allowClear:!0,dropdownMatchSelectWidth:!0,options:function(){var t=i.A.getEnums(o.mstrucId);if(!t)return[];var e=[];return t.map((function(t){var r={value:"@@"+t.value,label:t.title};return e.push(r),!1})),e}(),onChange:function(t){if(s){var e;if(void 0===t)return"";e=t.startsWith("@@")?(r||"")+t.substring(2,t.length):t,s(e)}},value:f("${"+r+"}")},(0,u.Y)(l,(0,n.A)({style:{height:150}},h)))}},57878:function(t,e,r){"use strict";r.d(e,{A:function(){return _}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(37187),d=r(21426),v=r(54763),y=r(46704),g=r(92749),m=r(44601),w=r(49277),b=r(74712),A=r(67034),x=r(1026),k=r(17437);function C(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 L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var E=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,L()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"context",void 0),(0,f.A)(t,"handleClose",(function(e){var r=t.props,n=r.onChange,o=r.value;if(n){var a,i=[],c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return C(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)?C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(o);try{for(c.s();!(a=c.n()).done;){var u=a.value;u.code!=e.code&&i.push(u)}}catch(t){c.e(t)}finally{c.f()}n(i)}})),(0,f.A)(t,"renderTag",(function(){var e=t.props.value,r=[];return e?(e.forEach((function(e,n){var o=e.title instanceof Array?e.title[0]:e.title;r.push((0,k.Y)(A.A,{key:n,style:{fontSize:14},color:"geekblue",closable:!0,onClose:function(r){r.preventDefault(),t.handleClose(e)}},o&&o.includes("@R@")?o.split("@R@")[1]:e.title))})),r):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"render",value:function(){var t=this.context.translate;return(0,k.Y)("div",null,(0,k.Y)("h3",null,t("${查询点选}:"),this.renderTag(),this.props.message))}}])}(h.PureComponent);(0,f.A)(E,"contextType",x.U);var O=E,S=r(35880);function Y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return j(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)?j(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function j(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 I(){I=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(N=function(){return!!t})()}var D=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,h=new Array(s),p=0;p<s;p++)h[p]=arguments[p];return r=this,n=e,c=[].concat(h),n=(0,l.A)(n),t=(0,u.A)(r,N()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"context",void 0),(0,f.A)(t,"state",{selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,pageNo:void 0,pageSize:void 0,disableCols:void 0,selectedRows:[]}),(0,f.A)(t,"loadData",function(){var e=(0,a.A)(I().mark((function e(r,n){var o,a,i,c,u,l,s,f,h,p,d,v;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),o=t.state,a=o.pageNo,i=o.pageSize,c=r.defaultPageSize,u={pageNo:a,pageSize:i||c,virtualEndPageNo:void 0},l=t.props,s=l.sourceId,f=l.exceptCodes,h=l.serverKey,p=l.mainCode,d=l.existRelation,e.next=7,g.A.requestLtmplQueryKey(h,s,T(T(T({exceptCodes:f},n),u),{},{mainCode:p,existRelation:d}));case 7:v=e.sent,t.setState({queryKey:v,criteriaData:n,loading:!1});case 9:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),(0,f.A)(t,"loadConfig",(0,a.A)(I().mark((function e(){var r,n,o,a,i,c,u,l,s;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.context.translate,n=t.props,o=n.sourceId,n.exceptCodes,a=n.serverKey,i=n.defaultCriteriaValue,t.setState({loading:!0}),e.next=5,y.A.requestSelectConfig(a,o);case 5:return c=e.sent,u=[],l=0,c.columns.forEach((function(t){var e={};"操作"!=t.title&&u.push(e),e.title=r("${"+t.title+"}"),e.width=t.colWidth?t.colWidth:160,e.align=t.valueAlign?t.valueAlign:"left",e.dataIndex=t.id,l++;var n=v.A.getSupportControlType(t);l<12&&t.sortable&&d.A.sort(e,n),"序号"===t.title?(e.width=t.colWidth?t.colWidth:50,e.align=t.valueAlign?t.valueAlign:"center",e.render=function(t,e,r){return(0,k.Y)("label",null,r+1)},t.sorter=void 0):e.render=function(e,r){return(0,k.Y)(b.A,{serverKey:a,fieldConfig:t,value:r[t.id],holderType:"table"})}})),s=T(T({},c.defaultCriteriaValue),i),t.setState({columns:u,selectConfig:c,loading:!1,criteriaData:s}),e.abrupt("return",{selectConfig:c,criteriaData:s});case 12:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"doSearch",function(){var e=(0,a.A)(I().mark((function e(r){var n,o;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state.selectConfig,o=T({},r),e.next=4,t.loadData(n,o);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),(0,f.A)(t,"handleOk",(function(){t.props.onOK(t.state.selectedRows),t.setState({selectedRows:[],queryKey:void 0})})),(0,f.A)(t,"handleCancel",(function(){t.setState({queryKey:void 0}),t.props.onCancel()})),(0,f.A)(t,"changeRowSelection",(function(e,r,n){var a=t.props.maxSelectedRows;if(n){var i=t.state.selectedRows,c=[],u=[];1!=a&&u.push.apply(u,(0,o.A)(i));var l,s=!1,f=Y(e);try{for(f.s();!(l=f.n()).done;){var h=l.value;s=!1;var p,d=Y(u);try{for(d.s();!(p=d.n()).done;){var v=p.value;h.code==v.code&&(s=!0)}}catch(t){d.e(t)}finally{d.f()}s||u.push(h),c.push(h.code)}}catch(t){f.e(t)}finally{f.f()}var y=[];y.push.apply(y,u);for(var g=0,m=u;g<m.length;g++){var w=m[g];if(n.includes(w.code)&&!c.includes(w.code))for(var b in y)y[b].code==w.code&&y.splice(Number(b),1)}t.setState({selectedRows:y})}else t.setState({selectedRows:e})})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(I().mark((function t(){var e,r,n,o;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.props,r=e.sourceId,n=e.open,e.defaultCriteriaValue,!r||!n){t.next=7;break}return t.next=4,this.loadConfig();case 4:return o=t.sent,t.next=7,this.loadData(o.selectConfig,o.criteriaData);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(I().mark((function t(e){var r,n,o,a,i,c,u,l,s,f,h;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).exceptCodes,n=r.open,o=r.defaultCriteriaValue,a=this.state,i=a.selectConfig,c=a.criteriaData,u=a.queryKey,l=a.loading,e.exceptCodes,e.open,s=i,f=c,!n){t.next=15;break}if(s){t.next=12;break}return t.next=9,this.loadConfig();case 9:h=t.sent,s=h.selectConfig,f=h.criteriaData;case 12:if(u||l){t.next=15;break}return t.next=15,this.loadData(s,T(T({},f),o));case 15:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.open,r=t.maxSelectedRows,n=t.serverKey,o=this.state,a=o.queryKey,i=o.columns,c=o.selectConfig,u=o.criteriaData,l=o.loading,s=o.selectedRows,f=o.pageSize,d=o.pageNo;if(!c)return(0,k.Y)(h.Fragment,null);var v=c.buttons,y=c.criterias,g=c.jumps,b=c.actions;return v.includes("batchDelete")||v.includes("query")&&y&&y.length>0||b&&b.length>0||g&&g.length,(0,k.Y)(p.A,{open:e,title:(0,k.Y)(O,{value:s,onChange:this.changeRowSelection}),width:1150,destroyOnClose:!0,centered:!0,bodyStyle:{height:"80vh",overflow:"auto"},onCancel:this.handleCancel,onOk:this.handleOk},(0,k.Y)(S.Ay,{style:{height:"80vh"},autoHide:!0,autoHideTimeout:1e3},(0,k.Y)("div",{className:"actTable"},(0,k.Y)(w.A,{serverKey:n,selectedRows:s,ltmplConfig:c,data:u,doSearch:this.doSearch,loading:l}),(0,k.Y)(m.A,{serverKey:n,pageInfo:{pageNo:d||1,pageSize:f||c.defaultPageSize},onChangePage:this.onChangePage,maxSelectedRows:r||c.maxSelectedRows,selectedRows:s,primaryColumn:c.primaryColumn,columns:i,queryKey:a,onChangeRowSelection:this.changeRowSelection}))," "))}}]);var r,n}(h.PureComponent);(0,f.A)(D,"contextType",x.U),(0,f.A)(D,"defaultProps",{defaultCriteriaValue:{}});var _=D},59090:function(t,e,r){"use strict";r.d(e,{A:function(){return k}});var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(54839),h=r(28073),p=r(36492),d=r(42877),v=r(65560),y=r(1026),g=r(17437);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){(0,l.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return A(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)?A(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function A(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 x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k=function(t){function e(){var t,r,n,a;(0,o.A)(this,e);for(var u=arguments.length,s=new Array(u),f=0;f<u;f++)s[f]=arguments[f];return r=this,n=e,a=[].concat(s),n=(0,c.A)(n),t=(0,i.A)(r,x()?Reflect.construct(n,a||[],(0,c.A)(r).constructor):n.apply(r,a)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"onClick",(function(){t.setState({showSelectTable:!0})})),(0,l.A)(t,"onSelect",(function(e){var r=t.props,n=(r.value,r.onChange),o=[];if(e){var a,i=b(e);try{for(i.s();!(a=i.n()).done;){var c=a.value,u=null;if(u=c.title instanceof Array?c.title[0]:c.title,c.title&&c.title.includes("@R@")){var l=u.split("@R@");u=l[l.length-1]}o.push(c.code+"@R@"+u)}}catch(t){i.e(t)}finally{i.f()}}n(o.join("@,@"))})),(0,l.A)(t,"toArray",(function(t){return t instanceof Array?t:t?t.split("@,@"):[]})),(0,l.A)(t,"toValueArray",(function(e){var r,n=[],o=b(t.toArray(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a){var i=a.split("@R@");"null"!=i[1]&&n.push(i[0])}}}catch(t){o.e(t)}finally{o.f()}return n})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){var t=this.props,e=t.id,r=t.value,o=(t.itemType,t.fieldConfig),a=t.onChange,i=t.style,c=t.maxSelected,u=t.onEntityClick,l=t.mainCode,y=t.serverKey;(0,n.A)(this.state);var m=this.context.translate,b=[],A=[],x=this.toArray(r);return x.forEach((function(t){if(t.indexOf("@R@")>0){var e=t.split("@R@");b.push({code:e[0],title:e[1]}),A.push({value:e[0],label:u?(0,g.Y)(f.Ay,{size:"small",style:{padding:"0px"},type:"link",title:"",onClick:function(t){t.stopPropagation(),u(e[0])}},e[1]):e[1]})}})),(0,g.Y)(s.Fragment,null,(0,g.Y)(h.A,{placement:"bottom",color:"#f0f0f0",styles:{root:{maxWidth:"calc(100vw - 20vw)",maxHeight:"calc(100vh - 50px)"},body:{padding:"1px"}},content:(0,g.Y)("div",{style:{height:350,backgroundColor:"#fafafa",overflow:"auto",borderStyle:"solid",borderRadius:"6px",borderWidth:"2px",borderColor:"#d9d9d9"}},(0,g.Y)(v.A,{serverKey:y,mainCode:l,maxSelectedRows:c,selectedRows:b,sourceId:o.sourceId,onChange:this.onSelect})),trigger:"click"},(0,g.Y)(p.A,{id:e,style:w({},i),value:this.toValueArray(x),mode:"multiple",placeholder:m("${请选择}${"+o.title+"}"),notFoundContent:m("${请选择}"),allowClear:!0,suffixIcon:(0,g.Y)(d.A,null),dropdownStyle:{display:"none"},onChange:function(t){a(t.join("@,@"))},options:A})))}}])}(s.PureComponent);(0,l.A)(k,"defaultProps",{maxSelected:100}),(0,l.A)(k,"contextType",y.U)},65560:function(t,e,r){"use strict";var n=r(42455),o=r(62477),a=r(21745),i=r(17636),c=r(44274),u=r(2532),l=r(63549),s=r(91985),f=r(11504),h=r(50828),p=r(96540),d=r(21426),v=r(54763),y=r(46704),g=r(92749),m=r(44601),w=r(49277),b=r(74712),A=r(1026),x=r(17437);function k(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return C(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)?C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function C(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 L(){L=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){(0,h.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var Y=function(t){function e(){var t,r,n,o;(0,c.A)(this,e);for(var u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];return r=this,n=e,o=[].concat(f),n=(0,s.A)(n),t=(0,l.A)(r,S()?Reflect.construct(n,o||[],(0,s.A)(r).constructor):n.apply(r,o)),(0,h.A)(t,"context",void 0),(0,h.A)(t,"state",{selectConfig:void 0,columns:void 0,queryKey:void 0,loading:!0,criteriaData:void 0,disableCols:void 0,pageNo:1,pageSize:void 0}),(0,h.A)(t,"loadData",function(){var e=(0,i.A)(L().mark((function e(r,n,o){var a,i,c,u,l,s,f,h,p,d,v;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),a=t.props,i=a.mainCode,c=a.serverKey,u=a.sourceId,l=t.state,s=l.pageNo,f=l.pageSize,h=r.defaultPageSize,d={pageNo:p=o||s,pageSize:f||h||10,virtualEndPageNo:void 0},e.next=8,g.A.requestLtmplQueryKey(c,u,O(O(O({},n),d),{},{mainCode:i}));case 8:v=e.sent,t.setState({pageNo:p,queryKey:v,criteriaData:n,loading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,h.A)(t,"loadConfig",(0,i.A)(L().mark((function e(){var r,n,o,a,i,c,u;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.context.translate,n=t.props,o=n.sourceId,a=n.serverKey,n.showActions,t.setState({loading:!0}),e.next=5,y.A.requestSelectConfig(a,o);case 5:return i=e.sent,c=[],u=0,i.columns.forEach((function(t){var e={};t.title,c.push(e),e.dataIndex=t.id,e.title=r("${"+t.title+"}"),e.width=t.colWidth?t.colWidth:160,e.align=t.valueAlign?t.valueAlign:"left",u++;var n=v.A.getSupportControlType(t);u<12&&t.sortable&&d.A.sort(e,n),"序号"===t.title?(e.width=t.colWidth?t.colWidth:50,e.align=t.valueAlign?t.valueAlign:"center",e.render=function(t,e,r){return(0,x.Y)("label",null,r+1)},t.sorter=void 0):e.render=function(e,r){return(0,x.Y)(b.A,{serverKey:a,holderType:"table",fieldConfig:t,value:r[t.id]})}})),t.setState({columns:c,selectConfig:i,loading:!1}),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))),(0,h.A)(t,"doSearch",function(){var e=(0,i.A)(L().mark((function e(r){var n,o;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state.selectConfig,o=O({},r),e.next=4,t.loadData(n,o,1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,h.A)(t,"changeRowSelection",(function(e,r,n){var o,i=[],c=t.props,u=c.selectedRows,l=c.selectedDatas,s=c.onChange,f=c.maxSelectedRows;if(n){var h=[],p=[];1!=f&&p.push.apply(p,(0,a.A)(u));var d,v=!1,y=k(e);try{for(y.s();!(d=y.n()).done;){var g=d.value;v=!1;var m,w=k(p);try{for(w.s();!(m=w.n()).done;){var b=m.value;g.code==b.code&&(v=!0)}}catch(t){w.e(t)}finally{w.f()}v||p.push(g),h.push(g.code)}}catch(t){y.e(t)}finally{y.f()}var A=[];A.push.apply(A,p);for(var x=0,C=p;x<C.length;x++){var L=C[x];if(n.includes(L.code)&&!h.includes(L.code))for(var E in A)A[E].code==L.code&&A.splice(Number(E),1)}o=A}else o=e;var O,S=[].concat((0,a.A)(l),(0,a.A)(r)),Y=k(o);try{for(Y.s();!(O=Y.n()).done;){var j,I=O.value,P=k(S);try{for(P.s();!(j=P.n()).done;){var T=j.value;T.code==I.code&&i.push(T)}}catch(t){P.e(t)}finally{P.f()}}}catch(t){Y.e(t)}finally{Y.f()}s(o,i)})),(0,h.A)(t,"onChangePage",(function(e,r){t.setState({pageNo:e,pageSize:r})})),t}return(0,f.A)(e,t),(0,u.A)(e,[{key:"componentDidMount",value:(n=(0,i.A)(L().mark((function t(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this,t.next=3,this.loadConfig();case 3:return t.t1=t.sent,t.t2={},t.next=7,t.t0.loadData.call(t.t0,t.t1,t.t2);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,i.A)(L().mark((function t(e){var r,n,a,i,c,u;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((0,o.A)(this.props),r=this.state,n=r.selectConfig,a=r.criteriaData,i=r.queryKey,c=r.loading,e.exceptCodes,e.open,u=n){t.next=8;break}return t.next=7,this.loadConfig();case 7:u=t.sent;case 8:if(i||c){t.next=11;break}return t.next=11,this.loadData(u,a);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.maxSelectedRows,r=t.selectedRows,n=t.selectedDatas,o=t.serverKey,a=t.sourceId,i=this.state,c=i.queryKey,u=i.columns,l=i.selectConfig,s=i.criteriaData,f=i.loading,h=i.pageNo,d=i.pageSize;if(!l)return(0,x.Y)(p.Fragment,null);var v=l.buttons,y=l.criterias,g=l.jumps,b=l.actions,A=l.fileExports;return v.includes("batchDelete")||v.includes("query")&&y&&y.length>0||b&&b.length>0||g&&g.length>0||A&&A.length,(0,x.Y)("div",{className:"actTable"},(0,x.Y)(w.A,{key:a,serverKey:o,selectedRows:r,selectedDatas:n,ltmplConfig:l,data:s,doSearch:this.doSearch,loading:f}),(0,x.Y)(m.A,{key:a,serverKey:o,maxSelectedRows:e||l.maxSelectedRows,selectedRows:r,primaryColumn:l.primaryColumn,columns:u,pageInfo:{pageNo:h,pageSize:d||l.defaultPageSize},onChangePage:this.onChangePage,queryKey:c,onChangeRowSelection:this.changeRowSelection}))}}]);var r,n}(p.PureComponent);(0,h.A)(Y,"contextType",A.U),(0,h.A)(Y,"defaultProps",{maxSelectedRows:1e3,selectedDatas:[],showActions:!1}),e.A=Y},66480:function(t,e,r){"use strict";r.d(e,{A:function(){return x}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(29029),f=r(54839),h=r(1849),p=r(28392),d=r(40756),v=r(47852),y=r(92749),g=r(80243),m=r(17437);function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=(0,m.Y)(s.A,{tip:"Loading..."}),A=(0,g.Ay)({resolved:{},chunkName:function(){return"react-file-viewer"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return r.e(374).then(r.t.bind(r,29787,23))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 29787}},{fallback:b}),x=function(t){function e(){var t,r,o,c;(0,n.A)(this,e);for(var l=arguments.length,s=new Array(l),f=0;f<l;f++)s[f]=arguments[f];return r=this,o=e,c=[].concat(s),o=(0,i.A)(o),t=(0,a.A)(r,w()?Reflect.construct(o,c||[],(0,i.A)(r).constructor):o.apply(r,c)),(0,u.A)(t,"state",{drawerOpen:!1}),(0,u.A)(t,"onClose",(function(){t.setState({drawerOpen:!1})})),t}return(0,c.A)(e,t),(0,o.A)(e,[{key:"onError",value:function(t){console.log(t,"error in file-viewer")}},{key:"render",value:function(){var t=this,e=this.props,r=e.filePath,n=e.downloadable,o=(e.serverKey,this.state.drawerOpen);return(0,m.Y)("span",{className:"labelcss"},(0,m.Y)(f.Ay,{type:"link",onClick:function(){t.setState({drawerOpen:!0})},size:"small",style:{margin:0}},r.fileName),n?(0,m.Y)(f.Ay,{type:"text",onClick:function(){y.A.downloadDir(r.path,r.fileName)},size:"small"},(0,m.Y)(d.A,null)):null,o?(0,m.Y)(h.A,{title:r.fileName,placement:"left",closable:!1,onClose:this.onClose,width:"1200px",open:o,extra:(0,m.Y)(p.A,null,n?(0,m.Y)(f.Ay,{onClick:function(){y.A.downloadDir(r.path,r.fileName)}},(0,m.Y)(d.A,null)):null,(0,m.Y)(f.Ay,{onClick:this.onClose},(0,m.Y)(v.A,null)))},(0,m.Y)(A,{style:{width:"100%"},fileType:r.contentType,filePath:r.path,errorComponent:void 0,onError:this.onError})):null)}}])}(l.PureComponent);(0,u.A)(x,"defaultProps",{downloadable:!0})},66941:function(t,e,r){"use strict";r.d(e,{A:function(){return k}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(77829),d=r(54839),v=r(77028),y=r(92749),g=r(19612),m=r(8130),w=r(1026),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=b.prototype=m.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,f=new Array(l),p=0;p<l;p++)f[p]=arguments[p];return r=this,n=e,i=[].concat(f),n=(0,u.A)(n),t=(0,c.A)(r,x()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"state",{}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"handleRemove",(function(e){t.props.onChange(JSON.stringify({valid:"delete"}))})),(0,s.A)(t,"handleChange",function(){var e=(0,o.A)(A().mark((function e(r){var n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("file change:",r),"done"==r.file.status&&(n={valid:"new",fileKey:r.file.response.fileKey,fileName:r.file.originFileObj.name},(0,t.props.onChange)(JSON.stringify(n)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"beforeUpload",(function(e){var r=t.context.translate;return!!(e.size/1024/1024<40)||(h.Ay.error(r("${超过40M限制 不允许上传~}"),5),!1)})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this.props,e=t.id,r=t.itemType,n=t.disabled,o=t.value,a=t.serverKey,i=this.context.translate,c=[];if(o){var u=o;"string"==typeof u&&(u=JSON.parse(o)),!0===u.valid?c.push({uid:"-1",name:u.base.fileName,status:"done",url:encodeURI(m.A.joinPath(m.A.joinPath(m.A.api(),"/v3/files"),u.base.path))+"?@token=".concat(m.A.hydrocarbonToken(),"&@programToken=").concat(m.A.programCode(),"&disposition=attachment")}):"new"==u.valid&&c.push({uid:"-2",name:u.fileName})}return(0,b.Y)("div",null,(0,b.Y)(p.A,{id:e,maxCount:1,accept:"picture"===r?".png, .jpg, .jpeg":"video"===r?".mp4":void 0,listType:"picture"==r?"picture":"text",fileList:0==c.length?void 0:c,disabled:n,name:"file",headers:g.A.getHeaderObj(),action:function(t){return y.A.postFileAction(a,t)},beforeUpload:this.beforeUpload,onChange:this.handleChange,onRemove:this.handleRemove},c&&c.length>=1?"":(0,b.Y)(d.Ay,{disabled:n},(0,b.Y)(v.A,null)," ",i(n?"${无需上传}":"${点击上传}"))))}}])}(f.PureComponent);(0,s.A)(k,"contextType",w.U)},68144:function(t,e,r){"use strict";var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(677),d=r(47152),v=r(16370),y=r(28392),g=r(87937),m=r(92749),w=r(25714),b=r(17437);function A(){A=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=b.prototype=m.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}var k=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,h=new Array(s),g=0;g<s;g++)h[g]=arguments[g];return r=this,n=e,c=[].concat(h),n=(0,l.A)(n),t=(0,u.A)(r,x()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"treekeyAuthId",{}),(0,f.A)(t,"authIdtreekeys",{}),(0,f.A)(t,"state",{treeData:void 0,loading:!1}),(0,f.A)(t,"initData",(0,a.A)(A().mark((function e(){var r,n;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),e.next=3,m.A.requestBlockMenuAuths();case 3:r=e.sent,n=[],r&&(n=t.toTreeNode(r),console.log("treeData",n)),t.setState({treeData:n,loading:!1});case 7:case"end":return e.stop()}}),e)})))),(0,f.A)(t,"toTreeNode",(function(e){var r=[];return e&&e.forEach((function(e){var n={key:e.id,title:e.title};r.push(n);var a=[];n.children=a,a.push.apply(a,(0,o.A)(t.toTreeNode(e.items))),e.programAuths&&e.programAuths.forEach((function(e){var r=n.key+e.id;t.treekeyAuthId[r]=e.id,t.authIdtreekeys[e.id]||(t.authIdtreekeys[e.id]=[]),t.authIdtreekeys[e.id].push(r);var o={key:r,title:e.title,isLeaf:!0};o.code=e.id,a.push(o)}))})),r})),(0,f.A)(t,"onCheck",(function(e){var r=[];e&&e.forEach((function(e){t.treekeyAuthId[e]&&r.push(t.treekeyAuthId[e])})),t.props.onChange(r)})),(0,f.A)(t,"renderTitle",(function(t){return(0,b.Y)(p.A,{bordered:!1,style:{width:"100%",minWidth:"180px",marginBottom:2},bodyStyle:{padding:"2px"}},(0,b.Y)(d.A,null,(0,b.Y)(v.A,{span:24},(0,b.Y)(y.A,null,t.isLeaf?(0,b.Y)(w.A,{rotate:180,style:{color:"#f5222d",marginRight:"4px"}}):null,t.title))))})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(k=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.refresh();case 2:case"end":return t.stop()}}),t,this)}))),function(){return k.apply(this,arguments)})},{key:"componentDidUpdate",value:(h=(0,a.A)(A().mark((function t(e,r){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)})},{key:"componentWillUnmount",value:(n=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"refresh",value:(r=(0,a.A)(A().mark((function t(){return A().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.setState({loading:!0}),t.next=3,this.initData();case 3:this.setState({loading:!1});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.checks,n=(e.onChange,this.state),a=n.loading,i=n.treeData,c=[];return r.forEach((function(e){t.authIdtreekeys[e]&&c.push.apply(c,(0,o.A)(t.authIdtreekeys[e]))})),console.log("treeData",i),console.log("checkedKeys",c),(0,b.Y)(p.A,{bodyStyle:{padding:"2px",overflowY:"scroll",height:"calc(78vh)",minWidth:"420px"},loading:a},(0,b.Y)(g.A,{checkable:!0,defaultExpandAll:!0,checkedKeys:c,showLine:{showLeafIcon:!1},selectable:!1,onCheck:function(e){return t.onCheck(e)},titleRender:function(e){return t.renderTitle(e)},treeData:i}))}}]);var r,n,h,k}(h.PureComponent);(0,f.A)(k,"defaultProps",{checkeds:[]}),e.A=k},68455:function(t,e,r){"use strict";r.d(e,{A:function(){return h}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(96540),l=r(46675),s=r(17437);function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}var h=function(t){function e(){return(0,n.A)(this,e),t=this,r=e,o=arguments,r=(0,i.A)(r),(0,a.A)(t,f()?Reflect.construct(r,o||[],(0,i.A)(t).constructor):r.apply(t,o));var t,r,o}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){return(0,s.Y)(l.A,this.props)}}])}(u.PureComponent)},68876:function(t,e,r){"use strict";var n=r(65425),o=r(50828),a=(r(96540),r(7142)),i=r(28392),c=r(8130),u=r(94300),l=r(17437);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){(0,o.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.A=function(t){var e=t.id,r=t.value,o=t.itemType,s=t.fieldConfig,h=t.onChange,p=t.style,d=t.min,v=t.max,y=(0,u.Y)().translate,g=void 0,m=function(t){h&&h(t)},w=c.A.splitValue(r),b=w.valueBegin,A=w.valueEnd,x=r||0==r?r:null,k=function(t){h&&h(c.A.concatValue(t,A))},C=function(t){h&&h(c.A.concatValue(b,t))},L=function(t){(!t.target.value&&0!=t.target.value||isNaN(t.target.value))&&(t.target.value=null)},E=s.disabled?y("${无需输入}"):y("${请输入}${"+s.title+"}"),O=s.disabled,S={id:e,placeholder:E,disabled:O,value:r};switch(o){case"int":g=(0,l.Y)(a.A,(0,n.A)({style:f({},p),min:d,max:v,stringMode:!0,precision:0},S,{value:x,onChange:m}));break;case"decimal":case"float":case"double":g=(0,l.Y)(a.A,(0,n.A)({style:f({},p)},S,{value:x,min:d,max:v,step:.1,onChange:m}));break;case"intrange":g=(0,l.Y)(i.A,null,(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${开始}"),value:b,precision:0,onKeyUp:L,onChange:k,disabled:O}),"~",(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${结束}"),value:A,precision:0,onKeyUp:L,onChange:C,disabled:O}));break;case"decimalrange":g=(0,l.Y)(i.A,null,(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${开始}"),value:b,onChange:k,step:.1,disabled:O}),"~",(0,l.Y)(a.A,{min:d,max:v,placeholder:y("${结束}"),value:A,step:.1,onChange:C,disabled:O}))}return g}},69068:function(t,e,r){"use strict";r.d(e,{A:function(){return v}});var n=r(44274),o=r(2532),a=r(63549),i=r(91985),c=r(11504),u=r(50828),l=r(96540),s=r(55957),f=r(74712),h=r(1026),p=r(17437);function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}var v=function(t){function e(t){var r,o,c,l;return(0,n.A)(this,e),o=this,c=e,l=[t],c=(0,i.A)(c),r=(0,a.A)(o,d()?Reflect.construct(c,l||[],(0,i.A)(o).constructor):c.apply(o,l)),(0,u.A)(r,"context",void 0),(0,u.A)(r,"initViewList",(function(){var t=r.props,e=t.fields,n=t.valueMap,o=t.serverKey,a=t.dataCode,i=r.context.translate,c=[];return e.length>0&&e.forEach((function(t,e){t.title;var r=n?n[t.id]:void 0;if(r=r||(t.defaultValue?t.defaultValue:void 0),t.id,Math.random(),"hidden"!=t.extControlType&&!t.hidden){var u=(0,p.Y)(s.A.Item,{label:i("${"+t.title+"}"),span:t.colSpan,key:e,className:"labelcss"},(0,p.Y)("div",{className:"description-content",style:{width:"100%"}},(0,p.Y)(f.A,{dataCode:a,serverKey:o,holderType:"descriptions",value:r,fieldConfig:t})));c.push(u)}})),c})),r.state={fileList:[]},r}return(0,c.A)(e,t),(0,o.A)(e,[{key:"render",value:function(){var t=this.props.column;return(0,p.Y)(s.A,{column:t},this.initViewList())}}])}(l.PureComponent);(0,u.A)(v,"defaultProps",{column:2}),(0,u.A)(v,"contextType",h.U)},70686:function(t,e,r){"use strict";r.d(e,{A:function(){return S}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(91196),p=r(50770),d=r(36492),v=r(17355),y=r(1026),g=r(46704),m=r(48287),w=r(4283),b=r(17437),A=["itemType","id","fieldConfig","style","disabled","onChange"];function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return C(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)?C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function C(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 L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var E=h.A.Group,O=p.Ay.Group,S=function(t){function e(){var t,r,i,l;(0,a.A)(this,e);for(var h=arguments.length,p=new Array(h),y=0;y<h;y++)p[y]=arguments[y];return r=this,i=e,l=[].concat(p),i=(0,u.A)(i),t=(0,c.A)(r,L()?Reflect.construct(i,l||[],(0,u.A)(r).constructor):i.apply(r,l)),(0,s.A)(t,"state",{}),(0,s.A)(t,"context",void 0),(0,s.A)(t,"getValue",(function(){var e=t.props,r=e.value,n=e.fieldConfig,o=r&&""!=r?"string"==typeof r?r.indexOf("@,@")>0?r.split("@,@"):r.split(","):r:void 0,a=[];if(o&&Array.isArray(o)){var i,c=k(o);try{for(c.s();!(i=c.n()).done;){var u=i.value;u.includes("@E@")?a.push(u[1]):a.push(u)}}catch(t){c.e(t)}finally{c.f()}}else a=o;var l=[];if(a){var s=g.A.getEnumsValueMap(n.mstrucId);if(s){var f,h=k(a);try{for(h.s();!(f=h.n()).done;){var p=f.value,d=s.get(p);d?l.push(d):l.push(p)}}catch(t){h.e(t)}finally{h.f()}}}else l=a;return l})),(0,s.A)(t,"getOptions",(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[],o=g.A.getEnums(t);return o&&o.map((function(t){var o=t.order&&parseInt(t.order)>0&&parseInt(t.order)<1e3?t.order+".":"",a=(0,m.A)("${"+t.title+"}");n.push({label:e?o+a:a,value:r?t.id:t.value})})),n})),(0,s.A)(t,"render",(function(){var e,r=t.props,a=r.itemType,i=r.id,c=r.fieldConfig,u=r.style,l=r.disabled,h=r.onChange,p=(0,o.A)(r,A),y=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({id:i,placeholder:c.disabled?(0,m.A)("${无需输入}"):(0,m.A)("${请输入}${"+c.title+"}"),disabled:l,onChange:h,style:u},p);switch(a){case"select":e=(0,b.Y)(d.A,(0,n.A)({},y,{value:t.getValue(),notFoundContent:(0,m.A)("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:t.getOptions(c.mstrucId,!0)}));break;case"multiselect":case"texttags":e=(0,b.Y)(d.A,(0,n.A)({mode:"multiple"},y,{value:t.getValue(),notFoundContent:(0,m.A)("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:t.getOptions(c.mstrucId,!0)}));break;case"checkbox":e=(0,b.Y)(E,(0,n.A)({},y,{options:t.getOptions(c.mstrucId,!0),value:t.getValue()}));break;case"radio":e=(0,b.Y)(O,(0,n.A)({},y,{options:t.getOptions(c.mstrucId,!0),value:t.getValue()?t.getValue()[0]:void 0}));break;case"steps":e=(0,b.Y)(w.A,(0,n.A)({},t.props,{options:t.getOptions(c.mstrucId,!0)}));break;default:e=(0,b.Y)(v.A,{type:"text",placeholder:(0,m.A)("${暂未实现}-${"+a+"}"),disabled:!0})}return(0,b.Y)(f.Fragment,null,e)})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidUpdate",value:function(t){}}])}(f.PureComponent);(0,s.A)(S,"defaultProps",{maxSelected:100,valueOnly:!1}),(0,s.A)(S,"contextType",y.U)},70870:function(t,e,r){"use strict";r.d(e,{A:function(){return K}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(69036),p=r(89467),d=r(677),v=r(15039),y=r(54839),g=r(92749),m=r(43455),w=r(80581),b=r(69068),A=r(86767),x=r(13050),k=r(54774),C=r(84957),L=r(46704),E=r(8130),O=r(17437);function S(){S=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Y=function(){return!!t})()}var j=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,h=new Array(l),p=0;p<l;p++)h[p]=arguments[p];return r=this,n=e,i=[].concat(h),n=(0,u.A)(n),t=(0,c.A)(r,Y()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"formRef",f.createRef()),(0,s.A)(t,"state",{id:"EmbedDtmplEditPage"+E.A.getRandomNum(6),dtmplConfig:void 0,loading:!0,dtmplData:void 0}),(0,s.A)(t,"doSubmit",(function(e){var r=t.props.mainCode;t.formRef.current.setFieldsValue({actionId:e}),r&&t.formRef.current.setFieldsValue({mainCode:r}),t.formRef.current.submit()})),(0,s.A)(t,"loadConfigData",(0,o.A)(S().mark((function e(){var r,n,o,a,i,c,u,l,s;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.code,i=o.sourceId,c=o.serverKey,o.group,u=o.addTmplId,t.setState({loading:!0}),l=void 0,!a){e.next=9;break}return e.next=6,L.A.requestDtmplConfig(c,i,a);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,L.A.requestAddDtmplConfig(c,i,u);case 11:l=e.sent;case 12:if(null===(r=l)||void 0===r||!r.entity||(null===(n=l)||void 0===n||null===(n=n.entity)||void 0===n?void 0:n.code)!=a){e.next=18;break}s=l.entity,l.entity=void 0,t.setState({dtmplData:s,id:a,loading:!1}),e.next=20;break;case 18:return e.next=20,t.loadData(l);case 20:t.setState({dtmplConfig:l,loading:!1});case 21:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"loadData",function(){var e=(0,o.A)(S().mark((function e(r){var n,o,a,i,c,u,l,s;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.sourceId,a=n.code,i=n.defaultDtmplData,c=n.serverKey,u=n.codeSource,(l=a)||!u){e.next=6;break}return e.next=5,g.A.queryCode(o,u,c);case 5:l=e.sent;case 6:if(!l){e.next=14;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=10,g.A.getDtmplData(r,c,o,l);case 10:s=e.sent,t.setState({dtmplData:s,id:l,loading:!1}),e.next=15;break;case 14:i?t.setState({dtmplData:i,loading:!1}):t.setState({dtmplData:{code:void 0,title:void 0,fieldMap:{},arrayMap:{}},loading:!1});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(r=(0,o.A)(S().mark((function t(){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadConfigData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){var t=this.props,e=t.sourceId,r=t.serverKey,n=t.mainCode,o=t.onFinish,a=this.state,i=a.dtmplConfig,c=a.id,u=a.dtmplData;return(0,O.Y)(K,{serverKey:r,mainCode:n,parentId:c,dtmplConfig:i,formRef:this.formRef,onFinish:o,sourceId:e,dtmplData:u})}}]);var r}(f.PureComponent);(0,s.A)(j,"defaultProps",{});var I=r(46935),P=r(78229),T=r(45705),N=r(1026);function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _(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)?_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function _(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 R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){(0,s.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function G(){G=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function M(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(M=function(){return!!t})()}var K=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,v=new Array(l),y=0;y<l;y++)v[y]=arguments[y];return r=this,n=e,i=[].concat(v),n=(0,u.A)(n),t=(0,c.A)(r,M()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"fuseMode",!1),(0,s.A)(t,"premisestitle","默认字段"),(0,s.A)(t,"context",void 0),(0,s.A)(t,"state",{loading:!0,currentDtmplData:void 0,appDtmplConfig:void 0,embedForm:{},embedRefValue:{}}),(0,s.A)(t,"loadData",(0,o.A)(G().mark((function e(){var r,n,o,a,i,c,u,l,s;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.formRef,i=r.dtmplData,c=r.dtmplConfig,u=r.serverKey,!o){e.next=8;break}return t.setState({loading:!0}),e.next=5,g.A.requestDtmplData(u,n,o,null);case 5:l=e.sent,e.next=9;break;case 8:l=i||{code:void 0,title:void 0,fieldMap:{},arrayMap:{}};case 9:s=k.vr.getAppDtmplConfig(c,i,t.props),t.setState({appDtmplConfig:s,currentDtmplData:l,loading:!1,embedRefValue:{}}),setTimeout((function(){return a.current?a.current.resetFields():void 0}),200);case 12:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"doRefresh",(0,o.A)(G().mark((function e(){var r;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadData();case 2:r=t.context.translate,h.Ay.info(r("${已刷新}!"));case 4:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"onGroupChange",(function(e,r){var n=t.state.currentDtmplData;n.arrayMap[e.id]=r;var o=F({},n);t.setState({currentDtmplData:o})})),(0,s.A)(t,"changeFuseMode",(function(e){t.fuseMode=!e})),(0,s.A)(t,"postForm",function(){var e=(0,o.A)(G().mark((function e(r){var n,o,a,i,c,u;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({loading:!0}),n=t.props,o=n.sourceId,a=n.code,i=n.dtmplData,c=n.serverKey,a?r["唯一编码"]=a:i&&i.code&&(r["唯一编码"]=i.code),e.next=5,g.A.postDtmplData(c,o,r,h.Ay);case 5:u=e.sent,t.setState({loading:!1}),"success"===u.status?t.props.onFinish(u.code):t.props.onFinish(!1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onSubmit",function(){var e=(0,o.A)(G().mark((function e(r){var n,o,a,i,c,u,l,s,f,h,p,d,v;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.props,o=n.dtmplConfig,a=n.dtmplData,i=t.state,c=i.currentDtmplData,u=i.appDtmplConfig,l=i.embedForm,s=i.embedRefValue,a.fieldMap=F({},r),f=r,h=D(o.groups),e.prev=6,d=G().mark((function t(){var e,r,n;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("embed"!=(e=p.value).type||"列表"==e.embedType){t.next=11;break}if(s[e.id]){t.next=7;break}return l[e.id].current.doSubmit(),t.abrupt("return",{v:void 0});case 7:r=P.A.getFieldId(u,e.codeSourceFieldMstrucId),f[r]=s[e.id];case 9:t.next=12;break;case 11:"relation"!=e.type||e.readOnly||(f["".concat(e.id,".$$flag$$")]=!0,(n=c.arrayMap[e.id])&&n.forEach((function(t,r){if(f["".concat(e.id,"[").concat(r,"].$$relation$$")]=t.relationLabel,t.editStatus&&"new"==t.editStatus){var n,o=D(e.fields);try{for(o.s();!(n=o.n()).done;){var a=n.value;f["".concat(e.id,"[").concat(r,"].").concat(a.id)]=t.fieldMap[a.id]}}catch(t){o.e(t)}finally{o.f()}}else if(t.editStatus&&"changed"==t.editStatus){f["".concat(e.id,"[").concat(r,"].唯一编码")]=t.code;var i,c=D(e.fields);try{for(c.s();!(i=c.n()).done;){var u=i.value;f["".concat(e.id,"[").concat(r,"].").concat(u.id)]=t.fieldMap[u.id]}}catch(t){c.e(t)}finally{c.f()}}else f["".concat(e.id,"[").concat(r,"].唯一编码")]=t.code})));case 12:case"end":return t.stop()}}),t)})),h.s();case 9:if((p=h.n()).done){e.next=16;break}return e.delegateYield(d(),"t0",11);case 11:if(!(v=e.t0)){e.next=14;break}return e.abrupt("return",v.v);case 14:e.next=9;break;case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(6),h.e(e.t1);case 21:return e.prev=21,h.f(),e.finish(21);case 24:return e.next=26,t.postForm(f);case 26:e.sent;case 27:case"end":return e.stop()}}),e,null,[[6,18,21,24]])})));return function(t){return e.apply(this,arguments)}}()),(0,s.A)(t,"onEmbedPageFinish",(function(e,r){t.state.embedRefValue[e.id]=r,t.props.formRef.current.submit()})),(0,s.A)(t,"addHiddenItem",(function(t){if(t)return t.map((function(t){return(0,O.Y)(p.A.Item,{hidden:!0,name:t.id,initialValue:t.value})}))})),(0,s.A)(t,"fieldGroupList",(function(e,r){var n=t.props,o=n.parentId,a=n.maxColsOnRow,i=n.mainCode,c=n.formRef,u=n.serverKey,l=n.showRightNav,s=t.state,h=s.loading,p=s.embedForm,v=[];return e&&(v=e.groups),v.map((function(n){if("embed"==n.type){var s=void 0,v=P.A.getFieldValueCodeOfMstrucId(e,r.fieldMap,n.codeSourceFieldMstrucId),y=P.A.getFieldValueCodeOfMstrucId(e,r.fieldMap,n.pageSourceFieldMstrucId);if(!(y=y||n.pointSourceId))return null;if("列表"==n.embedType)return(0,O.Y)(d.A,{bodyStyle:{padding:0},bordered:!1,style:{width:l?"90%":"100%"}},(0,O.Y)(I.A,{serverKey:null,collapsible:!0,initCollapse:!1,title:n.title,mainCode:i,funcMode:"common",sourceId:y}));if("详情"==n.embedType)return s="listop",(0,O.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,O.Y)(T.A,{showHeader:!1,codeSource:s,code:v,sourceId:y})," ");switch(p[n.id]=f.createRef(),n.embedType){case"编辑":s="listop";break;case"编辑或添加":s="new"}return(0,O.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,O.Y)(j,{ref:p[n.id],onFinish:function(e){t.onEmbedPageFinish(n,e)},codeSource:s,code:v,sourceId:y})," ")}if("relation"!=n.type)return(0,O.Y)(x.A,{showRightNav:l,tip:n.tip,title:n.title,key:n.id,id:o+n.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:h,bodyStyle:{padding:"6px"}},(0,O.Y)(m.A,{serverKey:u,formRef:c,mainCode:i,maxColsOnRow:a,fields:n?n.fields:void 0,dataCode:r?r.code:void 0,valueMap:r?r.fieldMap:void 0}));if(n.fields){var g=void 0;return r&&(g=r.arrayMap[n.id]),(0,O.Y)(A.A,{showRightNav:l,serverKey:u,mainCode:i||o,loading:h,parentId:o,key:n.id,fieldGroupConfig:n,value:g,viewOrEdit:n.readOnly?"view":"edit",onChange:t.onGroupChange})}}))})),(0,s.A)(t,"onValuesChange",(function(e,r){var n=t.props,o=n.onValuesChange,a=n.formRef,i=n.code,c=(n.dtmplData,t.state),u=c.appDtmplConfig,l=c.currentDtmplData;u.onValuesChange&&u.onValuesChange(e,{code:i,fieldMap:r,arrayMap:l.arrayMap},a.current),o&&o()})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(G().mark((function t(e){var r;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).code,r.formRef,e.code,e==this.props){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.formRef,n=e.dtmplConfig,o=e.code,a=e.parentId,i=e.showHeader,c=e.serverKey,u=e.dtmplData,l=this.state,s=l.currentDtmplData,h=l.appDtmplConfig,g=this.context.translate;if(!n||!u)return(0,O.Y)(d.A,{loading:!0},g("${加载中}"),"... ...");var m=h||{buttons:void 0,premises:void 0},A=m.buttons,k=m.premises;return(0,O.Y)(f.Fragment,null,i?(0,O.Y)(d.A,{variant:"borderless",key:"detailTitle",className:"hoverable pageHeader"},(0,O.Y)("h3",null,o||s&&s.code?g("[${编辑}]"):g("[${新增}]"),n?(0,O.Y)(C.A,{content:n.tip}):null,(0,O.Y)("div",{className:"fr"},A&&A.includes("fusionMode")?(0,O.Y)(v.A,{checkedChildren:g("${开}"),unCheckedChildren:g("${关}"),style:{marginRight:10},title:g("${融合模式}"),onChange:this.changeFuseMode}):"",(0,O.Y)(y.Ay,{className:"hoverbig",title:g("${刷新}"),onClick:this.doRefresh},(0,O.Y)(w.A,null))))):null,(0,O.Y)(p.A,{scrollToFirstError:!0,labelWrap:!0,ref:r,name:"control-hooks",onValuesChange:this.onValuesChange,onFinishFailed:function(){return t.props.onFinish(!1)},onFinish:this.onSubmit},(0,O.Y)(p.A.Item,{hidden:!0,name:"actionId"}),(0,O.Y)(p.A.Item,{hidden:!0,name:"mainCode"}),this.addHiddenItem(n.hiddenFields),this.fieldGroupList(h,s)),k&&k.length>0?(0,O.Y)(x.A,{title:this.premisestitle,key:this.premisestitle,id:a+k[0].id,className:"hoverable",styles:{header:{background:"#f2f4f5"}}},(0,O.Y)(b.A,{serverKey:c,fields:k})):"")}}]);var r,n}(f.PureComponent);(0,s.A)(K,"contextType",N.U),(0,s.A)(K,"defaultPorps",{maxCols:2,showHeader:!0,showRightNav:!1})},74712:function(t,e,r){"use strict";var n=r(38452),o=r(65425),a=r(50828),i=r(96540),c=r(52120),u=r(37977),l=r(17355),s=r(80243),f=r(54763),h=r(78550),p=r(75283),d=r(4283),v=r(8130),y=r(49604),g=r(74353),m=r.n(g),w=r(39976),b=r(55208),A=r(54774),x=r(48177),k=r(45666),C=r(17437),L=["fieldConfig","value","holderType"];function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var O=(0,C.Y)(i.Fragment,null,"loading"),S=(0,s.Ay)({resolved:{},chunkName:function(){return"signature"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(87)]).then(r.bind(r,4556))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 4556}},{fallback:O}),Y=(0,s.Ay)({resolved:{},chunkName:function(){return"chemstruc-graph"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(824),r.e(495),r.e(469),r.e(613),r.e(361),r.e(641),r.e(543),r.e(426),r.e(944),r.e(473),r.e(670)]).then(r.bind(r,85998))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 85998}},{fallback:O}),j=(0,s.Ay)({resolved:{},chunkName:function(){return"code-editor-sql-code-editor"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(112),r.e(695),r.e(557)]).then(r.bind(r,74025))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 74025}},{fallback:O}),I=(0,s.Ay)({resolved:{},chunkName:function(){return"color-picker"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(671)]).then(r.bind(r,33442))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 33442}},{fallback:O}),P=(0,s.Ay)({resolved:{},chunkName:function(){return"controls-file-view"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.resolve().then(r.bind(r,78122))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 78122}},{fallback:O});function T(t,e,r,n,s){var g=(0,A.Ym)().translate,L=f.A.getControlType(t,e),O=r;O||(O="descriptions");t.colSpan;var T=void 0,N=(t.disabled?g("${无需输入}"):g("${请输入}${"+t.title+"}"),t.disabled,e||0==e?e:t.defaultValue&&!v.A.isConfigDefaultValue(t.defaultValue)?t.defaultValue:""),D=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({fieldConfig:t,itemType:L,value:N,viewOrEdit:"view"},s);if(A.vr.getCustomEditControl(L))return i.createElement(A.vr.getCustomViewControl(L),D);var _=(0,C.Y)("span",{className:"infoStyle"},g("${暂未完成}-${"+L+"}"));if(0==N||N&&"null"!=N&&!N.toString().includes("@R@null"))switch(L){case"int":case"decimal":case"float":case"double":case"intrange":case"decimalrange":case"range":case"daterange-YY":case"daterange-M1":case"daterange":case"datetimerange-HH":case"datetimerange-mm":case"datetimerange":case"timerange-HH":case"timerange-mm":case"timerange":case"caselect":T=(0,C.Y)("span",{className:"infoStyle"},N);break;case"date-YY":case"date-M1":case"date":case"datetime-HH":case"datetime-mm":case"datetime":case"time-HH":case"time-mm":case"time":T=(0,C.Y)("span",{className:"infoStyle"},N?"Invalid Date"==m()(N).format(v.A.getDayjsFormat(L))?N:m()(N).format(v.A.getDayjsFormat(L)):void 0);break;case"text":case"textarea":case"preselect":T="table"==O?(0,C.Y)(b.A,{isHtml:!1,value:N,showMax:t.ellipsisLength?t.ellipsisLength:28}):(0,C.Y)("span",{className:"infoStyle"},N);break;case"select":case"radio":case"yes-no-switch":T=(0,C.Y)(p.A,D);break;case"yes-no-radio":T=(0,C.Y)("span",{className:"infoStyle"},N?(0,C.Y)(c.A,{color:"是"==N||1==N?"green":"red",text:g("${"+(0==N?"否":N)+"}")}):null);break;case"multiselect":case"checkbox":T=(0,C.Y)(h.A,D);break;case"html":T="table"==O?(0,C.Y)(b.A,{isHtml:!0,value:N}):(0,C.Y)("div",{dangerouslySetInnerHTML:{__html:N}});break;case"steps":T=(0,C.Y)(d.A,D);break;case"password":T=N?(0,C.Y)(u.A,(0,o.A)({title:N,color:"#fff1b8"},D),(0,C.Y)("span",{className:"infoStyle"},"********")):null;break;case"relation":default:T=_;break;case"file":case"picture":case"video":T=(0,C.Y)(P,D);break;case"relfile":T=(0,C.Y)(k.A,D);break;case"non-download-file":T=(0,C.Y)(P,(0,o.A)({},D,{downloadable:!1}));break;case"chemstruc":T=(0,C.Y)(Y,D);break;case"sql-code-editor":T=(0,C.Y)(j,(0,o.A)({viewOrEdit:"view"},D));break;case"relselect":case"refselect":case"entity-select":case"table-entity-select":T=(0,C.Y)(y.A,D);break;case"progress":T=(0,C.Y)(w.A,D);break;case"signature":T=(0,C.Y)(S,D);break;case"color":T=(0,C.Y)(I,D);break;case"url":T=(0,C.Y)("a",{target:"_blank",href:N},g("${网址}"));break;case"hidden":T=(0,C.Y)(l.A,{type:"hidden",value:e,disabled:!0});break;case"field-history":T=(0,C.Y)(x.A,D)}else T=(0,C.Y)(i.Fragment,null);return T}e.A=function(t){return T(t.fieldConfig,t.value,t.holderType,0,(0,n.A)(t,L))}},75283:function(t,e,r){"use strict";r(96540);var n=r(52120),o=r(46704),a=r(94300),i=r(17437);e.A=function(t){var e=(0,a.Y)().translate,r=t.value,c=(t.itemType,t.fieldConfig),u=o.A.getEnumValueColor(c.mstrucId,r);return(0,i.Y)("span",{className:"infoStyle"},r?(0,i.Y)(n.A,{color:u||"green",text:e("${"+r+"}")}):null)}},77053:function(t,e,r){"use strict";r.d(e,{A:function(){return w}});var n,o=r(42455),a=r(21745),i=r(17636),c=r(44274),u=r(2532),l=r(50828),s=r(96540),f=r(54774),h=r(46704),p=r(17437);function d(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return v(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)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function v(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 y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&n.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,o.A)(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,o.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){(0,l.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var w=function(){return(0,u.A)((function t(){(0,c.A)(this,t)}),null,[{key:"getNodeKeys",value:function(t,e){var r;r=Array.isArray(t)?this.getNodesOfArrayNode(t,e):this.getNodes(t,e);var n=[];return r.forEach((function(t){n.push(t.key)})),n}}])}();n=w,(0,l.A)(w,"initTtmplNodeConfig",function(){var t=(0,i.A)(y().mark((function t(e){var r,n,o,a,i,c,u;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",null);case 2:if(!(r=m({},e)).rootGtmplId){t.next=10;break}return t.next=6,h.A.requestLtmplConfig(null,r.rootGtmplId);case 6:n=t.sent,o=n.ltmplConfig,r.rootLTmplConfig=o,r.rootTitleId=o.primaryColumn.id;case 10:if(!r.branchRatmplId){t.next=17;break}return t.next=13,h.A.requestLtmplConfig(null,r.branchRatmplId);case 13:a=t.sent,i=a.ltmplConfig,r.branchLTmplConfig=i,r.branchTitleId=i.primaryColumn.id;case 17:if(!r.leafRatmplId){t.next=24;break}return t.next=20,h.A.requestLtmplConfig(null,r.leafRatmplId);case 20:c=t.sent,u=c.ltmplConfig,r.leafLTmplConfig=u,r.leafTitleId=u.primaryColumn.id;case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,l.A)(w,"mergeRootData",(function(t,e){if(e&&t){var r,n=d(e);try{for(n.s();!(r=n.n()).done;){var o,a=r.value,i=d(t);try{for(i.s();!(o=i.n()).done;){var c=o.value;if(a.code==c.code){a.children=c.children;break}}}catch(t){i.e(t)}finally{i.f()}}}catch(t){n.e(t)}finally{n.f()}}})),(0,l.A)(w,"reloadData",function(){var t=(0,i.A)(y().mark((function t(e,r,o,i){var c,u,l,s,f,h;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=8;break}return t.next=3,n.loadRootNodeData(r);case 3:return c=t.sent,n.mergeRootData(o,c),t.abrupt("return",{data:c});case 8:return u=[],n.searchNode(o,e,u),t.next=12,n.pushSameCodeNodeData(u,r);case 12:for(l=[],s=0,f=u;s<f.length;s++)h=f[s],l.push(h.key);return i&&l.push.apply(l,(0,a.A)(i)),t.abrupt("return",{expandedKeys:[].concat(l),data:(0,a.A)(o)});case 17:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}()),(0,l.A)(w,"searchNode",(function(t,e,r){if(t){var o,a=d(t);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(i.code==e){r.push(i);break}i.children.length>0&&n.searchNode(i.children,e,r)}}catch(t){a.e(t)}finally{a.f()}}})),(0,l.A)(w,"loadRootNodeData",function(){var t=(0,i.A)(y().mark((function t(e){var r,o;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.Fj.requestTtmplRootData(null,e.id,{});case 2:return r=t.sent,o=[],null!=r&&r.entities&&r.entities.forEach((function(t,r){o.push(n.toTreeNodeData(t,e.rootTitleId,null,!1,"R"))})),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,l.A)(w,"pushNodeData",(function(t,e,r,o){t.children.splice(0,t.children.length),r&&r.forEach((function(r,o){t.children.push(n.toBanchTreeNodeData(r,e,t))})),o&&o.forEach((function(r,o){t.children.push(n.toLeafTreeNodeData(r,e,t))}))})),(0,l.A)(w,"pushSameCodeNodeData",function(){var t=(0,i.A)(y().mark((function t(e,r){var o,a,i,c,u,l,s;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.length>0)){t.next=13;break}if(!r.branchRatmplId){t.next=6;break}return t.next=4,f.Fj.requestLtmplQueryTop(null,r.branchRatmplId,{mainCode:e[0].code});case 4:a=t.sent,o=a.entities;case 6:if(!r.leafRatmplId){t.next=11;break}return t.next=9,f.Fj.requestLtmplQueryTop(null,r.leafRatmplId,{mainCode:e[0].code});case 9:c=t.sent,i=c.entities;case 11:u=d(e);try{for(u.s();!(l=u.n()).done;)s=l.value,n.pushNodeData(s,r,o,i)}catch(t){u.e(t)}finally{u.f()}case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),(0,l.A)(w,"toLeafTreeNodeData",(function(t,e,r){return n.toTreeNodeData(t,e.leafTitleId,r,!0,"B")})),(0,l.A)(w,"toBanchTreeNodeData",(function(t,e,r){return n.toTreeNodeData(t,e.branchTitleId,r,!1,"L")})),(0,l.A)(w,"toTreeNodeData",(function(t,e,r,n,o){var a=t.fieldMap[e];return{code:t.code,key:o+(null==r?void 0:r.code)+t.code,value:o+(null==r?void 0:r.code)+t.code,name:a,title:(0,p.Y)(s.Fragment,null,(0,p.Y)("span",null,a||t.code)),children:[],isLeaf:n,selectable:n,parent:r}})),(0,l.A)(w,"filterNode",(function(t,e){var r=(0,a.A)(t.children),o=[],i=[];return r.forEach((function(t){var r=m({},t);if((r.searchValue?r.searchValue:r.name).indexOf(e)>=0&&o.push(r),r.children&&r.children.length>0){var a=n.filterNode(r,e);a.length>0?(r.children=a,(r.searchValue?r.searchValue:r.name).indexOf(e)<0&&o.push(r)):(r.children=[],i.push(r))}})),t.children=o,o})),(0,l.A)(w,"getNodesOfArrayNode",(function(t,e){var r=[];return e&&0!=e.length&&t?(t.forEach((function(t){var o=m({},t),i=t.code,c=t.name;if((e.includes(i)||e.includes(c))&&r.push(o),o.children&&o.children.length>0){var u=n.getNodes(o,e);u&&u.length>0?r.push.apply(r,(0,a.A)(u)):o.children=[]}})),r):r})),(0,l.A)(w,"getNodes",(function(t,e){var r=void 0;return t.children&&(r=(0,a.A)(t.children)),n.getNodesOfArrayNode(r,e)})),(0,l.A)(w,"getNodesOfKey",(function(t,e){var r=(0,a.A)(t.children),o=[];return e&&0!=e.length?(r.forEach((function(t){var r=m({},t),i=t.key;if(e.includes(i)&&o.push(r),r.children&&r.children.length>0){var c=n.getNodesOfKey(r,e);c&&c.length>0?o.push.apply(o,(0,a.A)(c)):r.children=[]}})),o):o})),(0,l.A)(w,"filterTree",(function(t,e){var r={code:"",config:void 0,key:void 0,children:(0,a.A)(t)};return n.filterNode(r,e),r.children}))},78122:function(t,e,r){"use strict";r.r(e),r.d(e,{default:function(){return L}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(62070),p=r(47152),d=r(16370),v=r(54839),y=r(28392),g=r(66480),m=r(40756),w=r(92749),b=r(77004),A=r(17437);function x(){x=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(A=C);var L=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}var C=b.Ay,L=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,b=new Array(l),L=0;L<l;L++)b[L]=arguments[L];return r=this,n=e,i=[].concat(b),n=(0,u.A)(n),t=(0,c.A)(r,k()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"state",{urlData:void 0,filePath:void 0}),(0,s.A)(t,"loadData",(0,o.A)(x().mark((function e(){var r,n,o,a,i,c,u,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.props,a=o.value,i=o.serverKey,c=void 0,c=w.A.toFilePath(a,i),null===(r=c)||void 0===r||!r.baseType||!/^image\/\w+;base64/.test(null===(n=c)||void 0===n?void 0:n.baseType)){e.next=7;break}return e.next=6,w.A.loadFileTxt(i,null===(l=c)||void 0===l?void 0:l.basePath);case 6:u=e.sent;case 7:a&&t.setState({filePath:c,urlData:u});case 8:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"packFile2Show",(function(){var e=t.state,r=e.urlData,n=e.filePath,a=t.props,i=a.downloadable,c=a.serverKey;if(n){if("new"==n.valid)return n.fileName;if("delete"==n.valid)return;if(["png","jpg","jpeg","gif","PNG","JPG","JPEG","GIF","svg","SVG"].includes(n.contentType))return(0,A.Y)(h.A,{width:90,src:n.iconPath?n.iconPath:n.path,preview:{src:n.path}});if(r)return(0,A.Y)(h.A,{width:90,src:r,preview:{src:r}});if(["mp4","MP4","mov","MOV","avi","AVI","WMV","wmv","wav","WAV"].includes(n.contentType)){var u={ld:{play_url:n.path}};return(0,A.Y)(p.A,{align:"middle"},(0,A.Y)(d.A,{style:{height:"60px",width:"300px"}},(0,A.Y)(C,{locale:"zh-Hans",sources:u,id:n.fileName})))}return["xlsx","docx","csv","webm","bmp"].includes(n.contentType)?(0,A.Y)(g.A,{serverKey:c,filePath:n,downloadable:i}):["pdf","txt"].includes(n.contentType)?(0,A.Y)("span",{className:"labelcss"},(0,A.Y)(v.Ay,{type:"link",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.openfileDir(n.path,n.fileName,i?"":"#toolbar=0");case 2:case"end":return t.stop()}}),t)}))),size:"small",style:{margin:0}},n.fileName),i?(0,A.Y)(v.Ay,{type:"text",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.downloadDir(n.path,n.fileName);case 2:case"end":return t.stop()}}),t)}))),size:"small"},(0,A.Y)(m.A,null)):null):(0,A.Y)(y.A,{className:"labelcss",size:1},i?(0,A.Y)(f.Fragment,null,(0,A.Y)(v.Ay,{type:"link",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.download(c,n.path);case 2:case"end":return t.stop()}}),t)}))),size:"small",style:{margin:0}},n.fileName),(0,A.Y)(v.Ay,{type:"text",onClick:(0,o.A)(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w.A.downloadDir(n.path,n.fileName);case 2:case"end":return t.stop()}}),t)}))),size:"small",icon:(0,A.Y)(m.A,null)})):(0,A.Y)(v.Ay,{type:"text",size:"small"},n.fileName))}})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:function(){this.loadData()}},{key:"componentDidUpdate",value:function(t,e,r){this.props.value!=this.props.value&&this.loadData()}},{key:"render",value:function(){return(0,A.Y)(f.Fragment,null,this.packFile2Show())}}])}(f.PureComponent);(0,s.A)(L,"defaultProps",{downloadable:!0})},78229:function(t,e,r){"use strict";var n=r(74353),o=r.n(n),a=r(27251);function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function c(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 u(){}u.current=function(t,e){var r=e;if(r||(r="YYYY-MM-DD HH:mm:ss SSS"),!t)return null;var n=[t];t.includes("~")&&(n=t.split("~"));var o=[];for(var a in n){var i=this.currentL1(n[a],r);o[a]=i||""}return 1==n.length?o[0]:o[0]+"~"+o[1]},u.currentL1=function(t,e){if(!t)return null;var r=new RegExp("current([D,M,Y,m,s,h]?):?([-,+]?)([0-9]*)([D,M,Y,m,s,h]?)").exec(t);if(r){var n=r[4],a=o()();if(""!=n){var i=r[2];""==i&&(i="+");var c=r[3];""==c&&(c="1");var u=parseInt(c),l="days";switch(n){case"D":l="days";break;case"M":l="months";break;case"Y":l="years";break;case"W":l="weeks";break;case"h":l="hours";break;case"m":l="minutes";break;case"s":l="seconds"}a="-"==i?a.subtract(u,l):a.add(u,l)}switch(r[1]){case"D":return(a=a.startOf("day")).format("YYYY-MM-DD");case"M":return(a=a.startOf("month")).format("YYYY-MM");case"Y":return(a=a.startOf("year")).format("YYYY");case"h":return(a=a.startOf("hour")).format("YYYY-MM-DD HH");case"m":return(a=a.startOf("minute")).format("YYYY-MM-DD HH:mm");case"s":return(a=a.startOf("second")).format("YYYY-MM-DD HH:mm:ss")}return a.format(e)}return null},u.getFieldValueTitleOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];if("null"!=a&&a){if(Array.isArray(a)){var i="";a.forEach((function(t){i=t.indexOf("@R@")>0?t.split("@R@")[1]+",":t+","})),a=i.substring(0,i.lastIndexOf(","))}}else a=null;return a?a=a.indexOf("@R@")>0?a.split("@R@")[1]:a:n},u.getFieldValueCodeOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];if(!a)return n;if(a instanceof Array){var i=[];a.forEach((function(t){i.push(t.indexOf("@R@")>0?t.split("@R@")[0]:t)})),a=i.toString()}else a=a.indexOf("@R@")>0?a.split("@R@")[0]:a;return a},u.getFieldValueOfMstrucId=function(t,e,r,n){var o=u.getFieldId(t,r),a=e&&e[o];return a?a=a instanceof Array?a.toString():e[o]:n},u.getFieldId=function(t,e){var r=void 0,n=t.groups;if(null!=n){var o,a=i(n);try{for(a.s();!(o=a.n()).done;){var c,u=i(o.value.fields);try{for(u.s();!(c=u.n()).done;){var l=c.value;if(l.mstrucId==e){r=l.id;break}}}catch(t){u.e(t)}finally{u.f()}if(r)break}}catch(t){a.e(t)}finally{a.f()}}else{var s=t.columns;if(null!=s){var f,h=i(s);try{for(h.s();!(f=h.n()).done;){var p=f.value;if(p.mstrucId==e){r=p.id;break}}}catch(t){h.e(t)}finally{h.f()}}}return r},u.getRelMstrucFieldId=function(t,e,r){var n=u.getFieldId(t,r);return e&&e[n]?e[n].split("@R@")[0]:void 0},u.buildInDtmplConfig=function(t,e,r){if(!t.buildInFuncFields){var n,o=[],c=i(t.groups);try{for(c.s();!(n=c.n()).done;){var u,l=i(n.value.fields);try{for(l.s();!(u=l.n()).done;){var s=u.value;(s.requiredRuleCriterias&&s.requiredRuleCriterias.length>0||s.usableRuleCriterias&&s.usableRuleCriterias.length>0)&&(s.shouldUpdate=!0,o.push(s))}}catch(t){l.e(t)}finally{l.f()}}}catch(t){c.e(t)}finally{c.f()}t.buildInFuncFields=o}if(t.buildInFuncFields.length>0){var f=function(e,r,n){var o,c=i(t.buildInFuncFields);try{for(c.s();!(o=c.n()).done;){var u=o.value;null!=u.requiredRuleCriterias&&u.requiredRuleCriterias.length>0&&(a.A.isMatch(u.requiredRuleCriterias,[r],n,t)?u.required=!0:u.required=!1),null!=u.usableRuleCriterias&&u.usableRuleCriterias.length>0&&(a.A.isMatch(u.usableRuleCriterias,[r],n,t)?u.disabled=!1:u.disabled=!0)}}catch(t){c.e(t)}finally{c.f()}};return f(0,e,null),t.onValuesChange=function(t,e,r){f(0,e,r)},t}return t},e.A=u},78550:function(t,e,r){"use strict";r(96540);var n=r(67034),o=r(28392),a=r(46704),i=r(94300),c=r(17437);e.A=function(t){var e=(0,i.Y)().translate,r=t.value,u=(t.itemType,t.fieldConfig),l=[];if(r){var s=r;r instanceof Array||(s=r.indexOf("@,@")>0?r.split("@,@"):r.split(",")),s.forEach((function(t){var o=a.A.getEnumValueColor(u.mstrucId,r);l.push((0,c.Y)(n.A,{key:t,color:o||"blue"},e("${"+t+"}")))}))}return(0,c.Y)(o.A,{size:[8,8],wrap:!0},l)}},84697:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(86767),p=r(69068),d=r(92749),v=r(54040),y=r(8130),g=r(13050),m=r(97823),w=r(78229),b=r(677),A=r(46935),x=r(45705),k=r(17437);function C(){C=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var L=b.prototype=m.prototype=Object.create(A);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(L,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function L(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(L=function(){return!!t})()}var E=function(t){function e(){var t,r,n,i;(0,a.A)(this,e);for(var l=arguments.length,f=new Array(l),v=0;v<l;v++)f[v]=arguments[v];return r=this,n=e,i=[].concat(f),n=(0,u.A)(n),t=(0,c.A)(r,L()?Reflect.construct(n,i||[],(0,u.A)(r).constructor):n.apply(r,i)),(0,s.A)(t,"state",{loading:!0,id:"dtmplView"+y.A.getRandomNum(6),snapshotOpen:!1,dtmplData:void 0,premisesTitle:"默认字段",layout:{labelCol:{span:8},wrapperCol:{span:16}}}),(0,s.A)(t,"loadData",(0,o.A)(C().mark((function e(){var r,n,o,a,i,c,u,l;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.props,n=r.sourceId,o=r.code,a=r.versionId,i=r.serverKey,c=r.codeSource,(u=o)||!c){e.next=6;break}return e.next=5,d.A.queryCode(n,c,i);case 5:u=e.sent;case 6:if(!u){e.next=14;break}return t.setState({loading:!0,dtmplData:void 0}),e.next=10,d.A.requestViewDtmplData(i,n,u,a);case 10:l=e.sent,t.setState({dtmplData:l,loading:!1}),e.next=15;break;case 14:t.setState({loading:!1});case 15:case"end":return e.stop()}}),e)})))),(0,s.A)(t,"fieldGroupList",(function(){var e=t.props,r=e.dtmplConfig,n=e.serverKey,o=e.mainCode,a=e.showRightNav,i=e.parentId,c=e.maxColsOnRow,u=t.state,l=u.dtmplData,s=u.loading,f=u.id,d=[];return r&&(d=r.groups),d.map((function(t){if("embed"==t.type){if(!l)return;var e=void 0,u=w.A.getFieldValueCodeOfMstrucId(r,l.fieldMap,t.codeSourceFieldMstrucId),d=w.A.getFieldValueCodeOfMstrucId(r,l.fieldMap,t.pageSourceFieldMstrucId);if(!(d=d||t.pointSourceId))return null;if("列表"==t.embedType)return(0,k.Y)(b.A,{bodyStyle:{padding:0},bordered:!1,style:{width:a?"90%":"100%"}},(0,k.Y)(A.A,{readOnly:!0,serverKey:null,collapsible:!0,initCollapse:!1,title:t.title,mainCode:o,funcMode:"common",sourceId:d}));if("详情"==t.embedType)return e="listop",(0,k.Y)(g.A,{showRightNav:a,tip:t.tip,title:t.title,key:t.id,id:i+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:s,bodyStyle:{padding:"6px"}},(0,k.Y)(x.A,{showHeader:!1,codeSource:e,code:u,sourceId:d})," ");switch(t.embedType){case"编辑":e="listop";break;case"编辑或添加":e="new"}return(0,k.Y)(g.A,{showRightNav:a,tip:t.tip,title:t.title,key:t.id,id:i+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:s,bodyStyle:{padding:"6px"}},(0,k.Y)(x.A,{showHeader:!1,codeSource:e,code:u,sourceId:d})," ")}if("relation"!=t.type)return(0,k.Y)(g.A,{tip:t.tip,title:t.title,key:t.id,id:f+t.id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:s},(0,k.Y)(p.A,{column:c,dataCode:l?l.code:null,serverKey:n,fields:t.fields,valueMap:l?l.fieldMap:void 0,width:220}));if(t.fields){var v=void 0;return l&&(v=l.arrayMap[t.id]),(0,k.Y)(h.A,{serverKey:n,initCollapse:l&&(!v||v.length<=0),loading:s,parentId:f,key:t.id,fieldGroupConfig:t,value:v,viewOrEdit:"view"})}}))})),t}return(0,l.A)(e,t),(0,i.A)(e,[{key:"componentDidMount",value:(n=(0,o.A)(C().mark((function t(){return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadData();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,o.A)(C().mark((function t(e){var r,n,o,a,i,c;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=this.props).sourceId,n=r.code,o=r.versionId,a=r.refreshCode,i=e.code,e.versionId,c=e.refreshCode,!(n!=i||o&&o!=e.versionId||a&&a!=c)){t.next=5;break}return t.next=5,this.loadData();case 5:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.showRightNav,r=t.rightBarPositionRight,n=t.code,o=(t.sourceId,t.dtmplConfig),a=t.serverKey,i=t.maxColsOnRow,c=this.state,u=c.premisesTitle,l=c.loading,s=c.dtmplData,f=(c.layout,c.snapshotOpen,c.id),h=o?o.premises:void 0;return o&&s?(0,k.Y)("div",null,this.fieldGroupList(),h&&h.length>0?(0,k.Y)(g.A,{title:u,key:u,id:f+h[0].id,className:"hoverable",headStyle:{background:"#f2f4f5"},loading:l},(0,k.Y)(p.A,{column:i,serverKey:a,fields:h})):"",e?(0,k.Y)(v.A,{parentId:f,positionRight:r,dtmplConfig:o}):"",(0,k.Y)(m.A,{serverKey:a,dtmplConfig:o,mainCode:n})):(0,k.Y)(b.A,{loading:!0})}}]);var r,n}(f.PureComponent);(0,s.A)(E,"defaultProps",{showRightNav:!0,maxColsOnRow:2}),e.A=E},84957:function(t,e,r){"use strict";r.d(e,{A:function(){return m}});var n=r(65425),o=r(38452),a=r(44274),i=r(2532),c=r(63549),u=r(91985),l=r(11504),s=r(50828),f=r(96540),h=r(21348),p=r(28073),d=r(54839),v=r(17437),y=["placement","icon","content"];function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(g=function(){return!!t})()}var m=function(t){function e(){return(0,a.A)(this,e),t=this,r=e,n=arguments,r=(0,u.A)(r),(0,c.A)(t,g()?Reflect.construct(r,n||[],(0,u.A)(t).constructor):r.apply(t,n));var t,r,n}return(0,l.A)(e,t),(0,i.A)(e,[{key:"render",value:function(){var t=this.props,e=t.placement,r=t.icon,a=t.content,i=(0,o.A)(t,y);return a?(0,v.Y)(p.A,{placement:e,content:(0,v.Y)("div",{dangerouslySetInnerHTML:{__html:a}})},(0,v.Y)(d.Ay,(0,n.A)({},i,{icon:r||(0,v.Y)(h.A,null)}))):null}}])}(f.PureComponent);(0,s.A)(m,"defaultProps",{placement:"right",size:"small",type:"text"})},86767:function(t,e,r){"use strict";r.d(e,{A:function(){return pt}});var n=r(42455),o=r(21745),a=r(17636),i=r(44274),c=r(2532),u=r(63549),l=r(91985),s=r(11504),f=r(50828),h=r(96540),p=r(89467),d=r(75475),v=r(54839),y=r(16044),g=r(37977),m=r(69036),w=r(47152),b=r(16370),A=r(28392),x=r(28073),k=r(45806),C=r(11058),L=r(39277),E=r(40261),O=r(93598),S=r(55140),Y=r(56798),j=r(54763),I=r(21426),P=r(74712),T=r(22733),N=r(46675),D=r(57878),_=r(92749),R=r(13050),F=r(677),G=r(47852),M=r(50770),K=r(43455),B=r(8130),$=r(1026),V=r(17437);function q(){q=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(H=function(){return!!t})()}var z=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,H()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"state",{}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"onSubmit",(function(e){var r=t.props,n=r.dtmplData,o=r.fieldGroupConfig,a={code:n?n.code:"new"+B.A.getRandomNum(6),editStatus:n&&n.code&&!n.code.startsWith("new")?"changed":"new",relationLabel:e.relationLabel?e.relationLabel:o.relationNames[0],fieldMap:e};t.props.onFinish(a)})),(0,f.A)(t,"selectRelation",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.dtmplData,o=t.context.translate;return r.relationNames.length>1?(0,V.Y)(p.A.Item,{name:"relationLabel",initialValue:n?n.relationLabel:void 0,rules:[{required:!0,message:o("${请选择}${关系}")}],label:o("${关系}")},(0,V.Y)(M.Ay.Group,null,r.relationNames.map((function(t){return(0,V.Y)(M.Ay,{value:"item"},t)})))):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(r=(0,a.A)(q().mark((function t(){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=t.formRef,r=t.fieldGroupConfig,n=t.dtmplData,o=t.serverKey;return(0,V.Y)(h.Fragment,null,(0,V.Y)(p.A,{labelWrap:!0,ref:e,name:"control-hooks",onFinish:this.onSubmit},this.selectRelation(),(0,V.Y)(K.A,{dataCode:n?n.code:void 0,serverKey:o,formRef:e,nameAttr:"id",fields:r?r.fields:void 0,valueMap:n?n.fieldMap:{}})))}}]);var r}(h.PureComponent);function U(){U=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}(0,f.A)(z,"contextType",$.U);var Q=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,W()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"formRef",h.createRef()),(0,f.A)(t,"state",{isAdded:!1}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"reset",(function(){})),(0,f.A)(t,"onOk",(function(){t.setState({isAdded:!1}),t.formRef.current.submit()})),(0,f.A)(t,"add",(function(){t.setState({isAdded:!0}),t.formRef.current.submit()})),(0,f.A)(t,"getTitle",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.dtmplData,o=t.context.translate;return r.title+o(n?"[${行编辑}]":"[${新建一行}]")})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this.props,e=(t.height,t.onOk),r=t.fieldGroupConfig,n=t.dtmplData,o=t.onCancel,a=t.okButtonType,i=t.needConfirm,c=t.okDanger,u=t.serverKey,l=this.state.isAdded,s=this.context.translate;return(0,V.Y)(F.A,{style:{width:1e3},title:this.getTitle(),bodyStyle:{overflow:"auto"},extra:(0,V.Y)(h.Fragment,null,(0,V.Y)(A.A,{size:[8,0]},function(t){return i?c?(0,V.Y)(y.A,{placement:"rightBottom",title:s("${确定要执行提交吗}?"),onConfirm:t,okText:s("${确定}"),cancelText:s("${取消}"),okType:"danger"},(0,V.Y)(v.Ay,{type:a,danger:!0,size:"small"},"确定")):(0,V.Y)(y.A,{placement:"rightBottom",title:s("${确定要执行提交吗}?"),onConfirm:t,okText:s("${确定}"),cancelText:s("${取消}")},(0,V.Y)(v.Ay,{size:"small",type:a},s("${确定}"))):(0,V.Y)(v.Ay,{type:a,size:"small",onClick:t},s("${确定}"))}(this.onOk),o?(0,V.Y)(v.Ay,{onClick:o},(0,V.Y)(G.A,null)):""))},(0,V.Y)(z,{serverKey:u,fieldGroupConfig:r,formRef:this.formRef,onFinish:function(t){return e(t,!l)},dtmplData:n}))}}]);var r,n}(h.PureComponent);function J(){J=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}(0,f.A)(Q,"defaultProps",{forceRender:!0,style:{maxWidth:"calc(100vw - 60px)",maxHeight:"calc(100vh - 50px)"},needConfirm:!1,okButtonType:"primary",okDanger:!1}),(0,f.A)(Q,"contextType",$.U);var X=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,Z()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"formRef",h.createRef()),(0,f.A)(t,"state",{popoverOpen:!1}),(0,f.A)(t,"onOk",(function(e){(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.setState({popoverOpen:!1}),t.props.onOk(e)})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(J().mark((function t(){return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(J().mark((function t(){return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.state.popoverOpen,r=this.props,n=r.disabled,o=r.buttonIcon,a=r.buttonTitle,i=r.tooltipTitle,c=r.fieldGroupConfig,u=r.dtmplData,l=r.buttonStyle,s=r.serverKey;return(0,V.Y)(x.A,{destroyTooltipOnHide:!0,placement:"leftBottom",open:e,content:(0,V.Y)(Q,{serverKey:s,fieldGroupConfig:c,dtmplData:u,onCancel:function(){t.setState({popoverOpen:!1})},onOk:this.onOk}),trigger:"click"},(0,V.Y)(g.A,{placement:"left",title:i},(0,V.Y)(v.Ay,{disabled:n,style:l,icon:o,size:"small",onClick:function(){t.setState({popoverOpen:!e})}},a||"")))}}]);var r,n}(h.PureComponent);(0,f.A)(X,"defaultProps",{buttonIcon:void 0,disabled:!1});var tt=r(22503),et=r(62477);function rt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rt=function(){return!!t})()}var nt=function(t){function e(){var t,r,n,o;(0,i.A)(this,e);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return r=this,n=e,o=[].concat(c),n=(0,l.A)(n),t=(0,u.A)(r,rt()?Reflect.construct(n,o||[],(0,l.A)(r).constructor):n.apply(r,o)),(0,f.A)(t,"refreshTime",(new Date).getTime()),(0,f.A)(t,"onChange",(function(e){var r=(new Date).getTime();if(e||r-t.refreshTime>10){var n=t.props,o=n.count,a=n.onChange,i=n.min;t.refreshTime=r,a((o||0==o)&&o>=Number(i)?1:null)}})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:function(){(0,et.A)(this.props),this.onChange(!0)}},{key:"componentDidUpdate",value:function(t){var e=this.props.count;!e&&0!=e||t.count==e||this.onChange(!1)}},{key:"render",value:function(){var t=this.props;return t.count,t.min,t.value,(0,V.Y)(h.Fragment,null)}}])}(h.PureComponent);(0,f.A)(nt,"defaultProps",{min:0});var ot=r(20130);function at(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return it(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)?it(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function it(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 ct(){ct=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(P([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function Y(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Y,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),s(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),j(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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lt=function(){return!!t})()}var st=p.A.Item,ft=d.A.Text,ht=function(t){function e(){var t,r,n,c;(0,i.A)(this,e);for(var s=arguments.length,h=new Array(s),p=0;p<s;p++)h[p]=arguments[p];return r=this,n=e,c=[].concat(h),n=(0,l.A)(n),t=(0,u.A)(r,lt()?Reflect.construct(n,c||[],(0,l.A)(r).constructor):n.apply(r,c)),(0,f.A)(t,"state",{showDtmplView:!1,selectedCode:void 0,showSelectTable:!1,showDtmplEdit:!1,tableLoading:!1,showRowEdit:!1,selectedDtmplData:void 0,filterStr:void 0,pageSize:10,addTmplId:void 0}),(0,f.A)(t,"context",void 0),(0,f.A)(t,"buildDataSource",(function(){var e=t.state.filterStr,r=t.props.value,n=void 0;return r&&(n=[],r.forEach((function(t,r){var o=!0;if(e){o=!1;for(var a=0,i=Object.values(t.fieldMap);a<i.length;a++){var c=i[a];c&&c.toString().indexOf(e)>=0&&(o=!0)}}if(o){var u=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach((function(e){(0,f.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({key:r,relationLabel:t.relationLabel,code:t.code},t.fieldMap);n.push(u)}}))),n})),(0,f.A)(t,"buildColumns",(function(){var e=t.props,r=e.viewOrEdit,n=e.fieldGroupConfig,o=e.serverKey,a=n.buttons,i=n.fields,c=n.showRelationName,u=n.relationNames,l=n.disabled,s=n.deleteData,f=t.context.translate,h=[],p=0;if(i.forEach((function(t){var e={};h.push(e),e.title=f("${"+t.title+"}"),e.dataIndex=t.id,p++;var r=j.A.getControlType(t,null);p<12&&t.sortable&&I.A.sort(e,r),e.render=function(e,r){return(0,V.Y)(P.A,{serverKey:o,holderType:"table",fieldConfig:t,value:r[t.id]})}})),c){var d={dataIndex:"relationLabel",name:"relation",title:f("${关系}"),type:"relation",editable:!0,fieldAvailable:!0,id:"10000",options:u};h.unshift(d)}var m=a.includes("detail"),w=a.includes("rowEdit"),b=a.includes("dtmplEdit"),A=a.includes("singleDelete");if("edit"==r&&(m||w||b||A)){var x={};h.push(x),x["操作"]=1,x.title=f("${操作}"),x.fixed="right",x.key="action",x.render=function(e){return(0,V.Y)("div",{className:"actionbtn"},m?(0,V.Y)(v.Ay,{disabled:l,title:f("${当前实体}"),type:"primary",icon:(0,V.Y)(C.A,null),size:"small",onClick:function(){return t.showEntityView(e)}}):"",b?(0,V.Y)(v.Ay,{disabled:l,title:f("${编辑}${当前实体}"),icon:(0,V.Y)(L.A,null),size:"small",onClick:function(){return t.showEditDtmplModel(e)}}):"",n.rowActions&&n.rowActions.length>0?n.rowActions.map((function(r){return(0,V.Y)(tt.A,{serverKey:o,disabled:l,key:r.id,data:[e],actionConfig:r,doAction:t.doRowAction,buttonSize:"small"})})):"",w?(0,V.Y)(X,{serverKey:o,disabled:l,buttonIcon:(0,V.Y)(E.A,null),dtmplData:t.getRowEditData(e.code),fieldGroupConfig:n,onOk:t.handleRowEdit,tooltipTitle:f("${编辑}${当前行}")}):"",A?s?(0,V.Y)(y.A,{placement:"leftBottom",title:f("${确定要[删除]选中数据吗}?"),onConfirm:function(){t.delete(e)},okText:f("${确定}"),cancelText:f("${取消}"),okType:"danger"}," ",(0,V.Y)(v.Ay,{disabled:l,danger:!0,type:"primary",icon:(0,V.Y)(O.A,null),size:"small"})):(0,V.Y)(g.A,{placement:"right",title:f("${删除}${当前行}")},(0,V.Y)(v.Ay,{disabled:l,danger:!0,type:"primary",icon:(0,V.Y)(O.A,null),size:"small",onClick:function(){return t.delete(e)}})):"")}}else if("view"==r&&m){var k={};h.push(k),k["操作"]=1,k.title=f("${操作}"),k.fixed="right",k.key="action",k.render=function(e){return(0,V.Y)("div",{className:"actionbtn"},m?(0,V.Y)(v.Ay,{disabled:l,title:f("${当前实体}"),type:"primary",icon:(0,V.Y)(C.A,null),size:"small",onClick:function(){return t.showEntityView(e)}}):"")}}return h})),(0,f.A)(t,"doRowAction",function(){var e=(0,a.A)(ct().mark((function e(r,n,o){return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.doAction(r,[{title:void 0,code:n[0]}],o);case 2:t.handleDtmplEdit(n[0]);case 3:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"doAction",function(){var e=(0,a.A)(ct().mark((function e(r,n,o){var a;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({tableLoading:!0}),a=t.props.serverKey,e.next=4,_.A.postActions(a,r,n,o);case 4:e.sent,t.setState({tableLoading:!1});case 6:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),(0,f.A)(t,"showEntityView",(function(e){t.setState({selectedCode:e.code,showDtmplView:!0})})),(0,f.A)(t,"hiddenEntityView",(function(){t.setState({showDtmplView:!1})})),(0,f.A)(t,"hiddenEntityEdit",(function(){t.setState({showDtmplEdit:!1})})),(0,f.A)(t,"editRow",(function(t){})),(0,f.A)(t,"delete",function(){var e=(0,a.A)(ct().mark((function e(r){var n,o,a,i,c,u,l,s,f,h;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.props,o=n.value,a=n.fieldGroupConfig,i=n.onChange,c=n.serverKey,u=[],l=[],o){s=at(o);try{for(s.s();!(f=s.n()).done;)(h=f.value).code!=r.code&&(u.push(h),l.push(h.code))}catch(t){s.e(t)}finally{s.f()}}if(!a.deleteData){e.next=8;break}return e.next=7,_.A.deleteByCode(c,a.id,[r.code]);case 7:e.sent;case 8:i(a,u);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"searchValue",(function(e){t.setState({filterStr:e})})),(0,f.A)(t,"tabChange",(function(e){t.setState({pageSize:e.pageSize})})),(0,f.A)(t,"showSelect",(function(){t.setState({showSelectTable:!0})})),(0,f.A)(t,"select",function(){var e=(0,a.A)(ct().mark((function e(r){var n,o,a,i;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.setState({showSelectTable:!1}),r&&!(r.length<=0)){e.next=3;break}return e.abrupt("return");case 3:n=[],o=at(r);try{for(o.s();!(a=o.n()).done;)i=a.value,n.push(i.code)}catch(t){o.e(t)}finally{o.f()}return e.next=8,t.add(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"add",function(){var e=(0,a.A)(ct().mark((function e(r){var n,a,i,c,u,l,s,f,h;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,a=n.value,i=n.fieldGroupConfig,c=n.onChange,u=n.serverKey,l=i.relationNames,t.setState({tableLoading:!0}),e.next=5,_.A.requestSelectedData(u,i.id,r);case 5:if(s=e.sent){f=at(s);try{for(f.s();!(h=f.n()).done;)h.value.relationLabel=l[0]}catch(t){f.e(t)}finally{f.f()}}a&&s.unshift.apply(s,(0,o.A)(a)),c(i,s),t.setState({tableLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"getRowEditData",(function(e){var r=t.props.value,n=void 0;if(e){var o,a=at(r);try{for(a.s();!(o=a.n()).done;){var i=o.value;if(e==i.code){n=i;break}}}catch(t){a.e(t)}finally{a.f()}}return n})),(0,f.A)(t,"handleDtmplAdd",function(){var e=(0,a.A)(ct().mark((function e(r){return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({showDtmplEdit:!1}),e.next=3,t.add([r]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"handleDtmplEdit",function(){var e=(0,a.A)(ct().mark((function e(r){var n,a,i,c,u,l,s,f,h,p;return ct().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.props,a=n.value,i=n.fieldGroupConfig,c=n.onChange,u=i.serverKey,t.setState({tableLoading:!0,showDtmplEdit:!1}),e.next=5,_.A.requestSelectedData(u,i.id,[r]);case 5:if(l=e.sent[0],(s=(0,o.A)(a))&&l){f=at(s);try{for(f.s();!(h=f.n()).done;)(p=h.value).code==l.code&&(p.fieldMap=l.fieldMap)}catch(t){f.e(t)}finally{f.f()}}c(i,s),t.setState({tableLoading:!1});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,f.A)(t,"handleRowEdit",(function(e){var r=t.props,n=r.value,a=r.fieldGroupConfig,i=r.onChange,c=t.context.translate,u=[];n&&(u=(0,o.A)(n));var l,s=!0,f=at(u);try{for(f.s();!(l=f.n()).done;){var h=l.value;if(h.code==e.code){s=!1,h.editStatus=e.editStatus,h.fieldMap=e.fieldMap,h.relationLabel=e.relationLabel;break}}}catch(t){f.e(t)}finally{f.f()}s&&u.unshift(e),i(a,u),s?m.Ay.success(c("${已添加}")):m.Ay.success(c("${已修改}"))})),(0,f.A)(t,"showAddDtmplModel",(function(e){t.setState({showDtmplEdit:!0,addTmplId:e,selectedCode:void 0})})),(0,f.A)(t,"showEditDtmplModel",(function(e){t.setState({showDtmplEdit:!0,addTmplId:void 0,selectedCode:e.code})})),(0,f.A)(t,"getAddTmplButton",(function(e){var r=t.context.translate;return e&&e.length<1?r("${没有分类添加按钮}"):e.map((function(e){return(0,V.Y)("p",null,(0,V.Y)(v.Ay,{size:"small",type:"text",onClick:function(){return t.showAddDtmplModel(e.id)}},e.title))}))})),(0,f.A)(t,"buildButtons",(function(){var e=t.props,r=e.fieldGroupConfig,n=e.viewOrEdit,o=e.value,a=e.serverKey,i=t.context.translate,c=r.buttons,u=r.disabled,l=(t.state.showRowEdit,u||!!r.max&&r.max<=(o?o.length:0));return"edit"==n?(0,V.Y)(w.A,null,(0,V.Y)(b.A,{span:20},(0,V.Y)(A.A,null,c.includes("rowAdd")?(0,V.Y)(X,{serverKey:a,disabled:l,buttonStyle:{marginBottom:10},buttonTitle:i("${新建一行}"),fieldGroupConfig:r,onOk:t.handleRowEdit}):"",c.includes("dtmplAdd")?r.classAddConfigs&&r.classAddConfigs.length>0?(0,V.Y)(x.A,{arrow:!1,content:t.getAddTmplButton(r.classAddConfigs),placement:"bottomRight"},(0,V.Y)(g.A,null,(0,V.Y)(v.Ay,{icon:(0,V.Y)(S.A,null)},i("${新增}")))):(0,V.Y)(v.Ay,{disabled:l,icon:(0,V.Y)(S.A,null),size:"small",onClick:function(){return t.showAddDtmplModel()},style:{marginBottom:10}},i("${新增}")):"",c.includes("selectAdd")?(0,V.Y)(v.Ay,{disabled:l,type:"primary",icon:(0,V.Y)(Y.A,null),size:"small",onClick:t.showSelect,style:{marginBottom:10}},i("${选择}")):"",r.min&&(!o||o.length<=0)?(0,V.Y)(ft,{style:{color:"red"}},i("${请选择或添加}"),i("${"+r.title+"}")):null,(0,V.Y)(st,{name:"$virtual"+r.id,style:{margin:0,maxHeight:"32px"},rules:r.min?[{required:!0,message:""}]:null},(0,V.Y)(nt,{min:r.min+"",style:{marginBottom:10},count:o?o.length:0,value:o}))))):""})),t}return(0,s.A)(e,t),(0,c.A)(e,[{key:"componentDidMount",value:(n=(0,a.A)(ct().mark((function t(){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"componentDidUpdate",value:(r=(0,a.A)(ct().mark((function t(e){var r,n;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.props.fieldGroupConfig,n=e.fieldGroupConfig,r.disabled==n.disabled&&r.mainCode==n.mainCode||this.setState({filterStr:""});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,e=this.props,r=e.fieldGroupConfig,n=e.value,o=e.parentId,a=e.loading,i=e.initCollapse,c=e.mainCode,u=e.serverKey,l=e.showRightNav,s=this.state,f=s.pageSize,p=s.selectedCode,d=s.showDtmplView,v=s.showSelectTable,y=s.showDtmplEdit,g=s.addTmplId,m=s.tableLoading,w=this.context.translate,b=r.buttons,A=r.viewModel,x=r.mainCode?r.mainCode:c||o,C={pageSize:f,hideOnSinglePage:!0,defaultCurrent:1,total:n?n.length:void 0,showTotal:function(t){return w("${总共}"+t+"${条}")}},L=[];if(n){var E,O=at(n);try{for(O.s();!(E=O.n()).done;){var S=E.value;L.push(S.code)}}catch(t){O.e(t)}finally{O.f()}}return r.displayConfig.includes("nonDataNonDisplayed")&&(!n||n.length<=0)?"":(0,V.Y)(h.Fragment,null,(0,V.Y)(R.A,{showRightNav:l,initCollapse:i||r.displayConfig.includes("folded"),title:r.title,tip:r.tip,id:o+r.id,className:"hoverable",styles:{header:{background:"#f2f4f5"},body:{padding:"6px"}},loading:a},(0,V.Y)("div",{className:"editTableList"},this.buildButtons(),A&&"verticalList"==A?(0,V.Y)(ot.A,{dataSource:this.buildDataSource(),columnConfigs:null==r?void 0:r.fields,serverKey:u,columns:this.buildColumns()}):(0,V.Y)(k.A,{size:"small",locale:{emptyText:(0,V.Y)("div",{style:{textAlign:"center",width:"100%"}},(0,V.Y)(ft,{disabled:!0},w("${暂无数据}...")))},bordered:!0,loading:m,dataSource:this.buildDataSource(),columns:this.buildColumns(),pagination:C,onChange:this.tabChange}))),b.includes("detail")?(0,V.Y)(T.A,{serverKey:u,mainCode:x,open:d,onCancel:this.hiddenEntityView,sourceId:r.id,code:p}," "):"",b.includes("dtmplEdit")||b.includes("dtmplAdd")?(0,V.Y)(N.A,{addTmplId:g,serverKey:u,mainCode:x,open:y,onCancel:this.hiddenEntityEdit,sourceId:r.id,code:p,onOk:p?this.handleDtmplEdit:this.handleDtmplAdd}):"",b.includes("selectAdd")?(0,V.Y)(D.A,{serverKey:u,defaultCriteriaValue:r.defaultCriteriaValue,maxSelectedRows:r.max,open:v,onOK:this.select,onCancel:function(){t.setState({showSelectTable:!1})},exceptCodes:L,mainCode:x,sourceId:r.id}):"")}}]);var r,n}(h.PureComponent);(0,f.A)(ht,"contextType",$.U),(0,f.A)(ht,"defaultProps",{});var pt=ht},86876:function(t,e,r){"use strict";r.r(e),r(96540);var n=r(71371),o=r(54774),a=r(17437),i=function(t){var e=(0,o.Ym)().getLocale;return(0,a.Y)(n.Ay,{locale:o.bs[e()],componentSize:"middle",theme:{cssVar:!0,token:{colorPrimary:"#1677ff"},components:{}}},t.children)};e.default=function(t){return(0,a.Y)(o.YO,null,(0,a.Y)(i,null,t.children))}},88133:function(t,e,r){"use strict";r(96540);var n=r(75475),o=r(94300),a=r(17437),i=n.A.Title;e.A=function(t){var e=(0,o.Y)().translate;return(0,a.Y)(n.A,null,(0,a.Y)(i,null,e("${没有找到自定义页面}")),(0,a.Y)(i,{level:5},"url:/",t.pageName),(0,a.Y)(i,{level:5},e("${请确认配置}")))}},92749:function(t,e,r){"use strict";r.d(e,{A:function(){return O}});var n=r(42455),o=r(17636),a=r(44274),i=r(2532),c=r(50828),u=r(8130),l=r(19612),s=r(69036),f=r(21396),h=r.n(f),p=r(34572),d=function(){return(0,i.A)((function t(){(0,a.A)(this,t)}),null,[{key:"aesEncrypt",value:function(t,e){e=e||"kuangkie";var r=h().enc.Utf8.parse(e),n=h().enc.Utf8.parse(t);return h().AES.encrypt(n,r,{mode:h().mode.ECB,padding:h().pad.Pkcs7}).toString()}},{key:"aesDecrypt",value:function(t,e){var r=e||"kuangkie",n=h().enc.Utf8.parse(r),o=h().AES.decrypt(t,n,{mode:h().mode.ECB,padding:h().pad.Pkcs7});return h().enc.Utf8.stringify(o).toString()}},{key:"rsaEncrypt",value:function(t,e){var r=new p.A;return r.setPublicKey(e),r.encrypt(t)}},{key:"rsaDecrypt",value:function(t,e){var r=new p.A;return r.setPrivateKey(e),r.decrypt(t)}}])}(),v=(r(65826),r(74353)),y=r.n(v),g=r(83826),m=r.n(g),w=r(88569),b=r.n(w),A=r(54774),x=r(48287);function k(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 C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach((function(e){(0,c.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(){E=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function m(){}function w(){}function b(){}var A={};s(A,c,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==r&&o.call(k,c)&&(A=k);var C=b.prototype=m.prototype=Object.create(A);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return w.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(C),s(C,l,"Generator"),s(C,c,(function(){return this})),s(C,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}y().extend(m()),y().extend(b());var O=function(){return(0,i.A)((function t(){(0,a.A)(this,t)}),null,[{key:"requestEnum",value:(kt=(0,o.A)(E().mark((function t(e,r,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=6;break}return t.next=3,this.requestEnumWithPath(e,r,"/enum");case 3:case 8:return t.abrupt("return",t.sent);case 6:return t.next=8,this.requestEnumWithPath(e,r,n);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return kt.apply(this,arguments)})},{key:"toFilePath",value:function(t,e){if(!t)return null;var r={};if("string"==typeof t)if(t.toLowerCase().startsWith("http"))r.path=t,r.fileName=this.getFileNameFrom(t),r.contentType=this.getFileSuffixFrom(r.fileName);else if(t.toLowerCase().startsWith("/"))r.path=this.getFileUrl(e,t),r.fileName=this.getFileNameFrom(t),r.contentType=this.getFileSuffixFrom(r.fileName);else{var n=this.getJsonValue(t);r=this.toFilePathObject(n,e)}else t.base&&(r=this.toFilePathObject(t,e));return r}},{key:"toFilePathObject",value:function(t,e){var r,n,o,a,i,c,u={};return t?(u.path=this.getFileUrl(e,null===(r=t.base)||void 0===r?void 0:r.path),u.iconPath=null!==(n=t.icon)&&void 0!==n&&n.path?this.getFileUrl(e,null===(o=t.icon)||void 0===o?void 0:o.path):null,u.fileName=t.fileName?t.fileName:this.getFileNameFrom(null===(a=t.base)||void 0===a?void 0:a.path),u.contentType=this.getFileSuffixFrom(u.fileName),u.valid=t.valid,u.baseType=null===(i=t.base)||void 0===i?void 0:i.type,u.basePath=null===(c=t.base)||void 0===c?void 0:c.path,u):null}},{key:"requestEnumWithPath",value:(xt=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r.length>0)){t.next=7;break}return t.next=3,l.A.super({url:u.A.joinPath("/v3",n),serverKey:e,data:{mstrucIds:r}});case 3:return o=t.sent,t.abrupt("return",o.enumMap);case 7:return t.abrupt("return",{});case 8:case"end":return t.stop()}}),t)}))),function(t,e,r){return xt.apply(this,arguments)})},{key:"requestOptions",value:(At=(0,o.A)(E().mark((function t(e,r){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestEnum(e,[r],null);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return At.apply(this,arguments)})},{key:"requestDtmplConfig",value:(bt=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r,code:n}});case 3:return o=t.sent,t.abrupt("return",o.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return bt.apply(this,arguments)})},{key:"requestTtmplConfig",value:(wt=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ttmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.ttmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return wt.apply(this,arguments)})},{key:"requestViewDtmplConfig",value:(mt=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/view-dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return mt.apply(this,arguments)})},{key:"requestAddDtmplConfig",value:(gt=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/add-dtmpl/config",serverKey:e,method:"GET",query:{sourceId:r,addTmplId:n}});case 3:return o=t.sent,t.abrupt("return",o.dtmplConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return gt.apply(this,arguments)})},{key:"requestSelectConfig",value:(yt=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/select/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n.selectConfig);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return yt.apply(this,arguments)})},{key:"requestLtmplConfig",value:(vt=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return vt.apply(this,arguments)})},{key:"requestL2LtmplConfig",value:(dt=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/l2/ltmpl/config",serverKey:e,method:"GET",query:{sourceId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return dt.apply(this,arguments)})},{key:"requestLtmplQueryKey",value:(pt=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/query/key",serverKey:e,method:"GET",query:L(L({},n),{},{sourceId:r})});case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return pt.apply(this,arguments)})},{key:"requestLtmplQueryTop",value:(ht=(0,o.A)(E().mark((function t(e,r,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/ltmpl/top-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return ht.apply(this,arguments)})},{key:"requestQueryReportData",value:(ft=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/report-data",serverKey:e,method:"GET",query:{queryKey:r,language:n}});case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return ft.apply(this,arguments)})},{key:"requestTtmplRootData",value:(st=(0,o.A)(E().mark((function t(e,r,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/ttmpl/root-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return st.apply(this,arguments)})},{key:"requestMstrucLtmplQueryTop",value:(lt=(0,o.A)(E().mark((function t(e,r,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonLtmplQueryTop(e,r,n,"/v3/mstruc/ltmpl/top-data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return lt.apply(this,arguments)})},{key:"queryTop1",value:(ut=(0,o.A)(E().mark((function t(e,r){var n,o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestMstrucLtmplQueryTop(e,r,{top:1});case 2:return n=t.sent,o=null,n&&n.entities&&n.entities[0]&&(o=n.entities[0].code),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return ut.apply(this,arguments)})},{key:"requestCommonLtmplQueryTop",value:(ct=(0,o.A)(E().mark((function t(e,r,n,o){var a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}s.Ay.error("SourceId is undefined!",5),t.next=8;break;case 4:return t.next=6,l.A.super({url:o,serverKey:e,method:"GET",query:L(L({},n),{},{sourceId:r})});case 6:return a=t.sent,t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return ct.apply(this,arguments)})},{key:"requestSelectedData",value:(it=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=3;break}return s.Ay.warning((0,x.A)("${没有选择实体}")),t.abrupt("return",null);case 3:return t.next=6,l.A.super({url:"/v3/field-group/data/selected",serverKey:e,query:{codes:n,sourceId:r},method:"GET"});case 6:if("success"!==(o=t.sent).status){t.next=11;break}return t.abrupt("return",o.entities);case 11:return s.Ay.error((0,x.A)("${没有找到实体}!"),5),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)}))),function(t,e,r){return it.apply(this,arguments)})},{key:"requestVersionList",value:(at=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/dtmpl/data/versions",serverKey:e,query:{pageNo:1,sourceId:r,code:n},method:"GET"});case 2:return o=t.sent,t.abrupt("return",o.versions);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return at.apply(this,arguments)})},{key:"requestFieldVersionList",value:(ot=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/dtmpl/field-data/versions",serverKey:e,query:{pageNo:1,sourceId:r,code:n},method:"GET"});case 2:return o=t.sent,t.abrupt("return",o.versions);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return ot.apply(this,arguments)})},{key:"requestCommonDtmplData",value:(nt=(0,o.A)(E().mark((function t(e,r,n,o,a){var i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:a,serverKey:e,query:{code:n,versionId:o,sourceId:r},method:"GET"});case 2:if("success"!==(i=t.sent).status){t.next=7;break}return t.abrupt("return",L({sourceId:r},i.entity));case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return nt.apply(this,arguments)})},{key:"requestDtmplData",value:(rt=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return rt.apply(this,arguments)})},{key:"getDtmplData",value:(et=(0,o.A)(E().mark((function t(e,r,n,o){var a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&e.dynamic&&(a=e.entity),a){t.next=5;break}return t.next=4,this.requestDtmplData(r,n,o,null);case 4:a=t.sent;case 5:return t.abrupt("return",a);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return et.apply(this,arguments)})},{key:"requestMstrucDtmplData",value:(tt=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/mstruc/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return tt.apply(this,arguments)})},{key:"requestViewDtmplData",value:(X=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/view-dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return X.apply(this,arguments)})},{key:"requestMstrucViewDtmplData",value:(Z=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.requestCommonDtmplData(e,r,n,o,"/v3/mstruc/view-dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return Z.apply(this,arguments)})},{key:"postCommonDtmplData",value:(J=(0,o.A)(E().mark((function t(e,r,n,o,a){var i,c,u,s;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in i=new FormData,n)c.startsWith("$virtual")||i.append(c,n[c]||0==n[c]?n[c]:"");return i.append("sourceId",r.toString()),t.next=5,l.A.super({url:a,serverKey:e,data:i,method:"POST"},"formdata");case 5:return u=t.sent,s=null,u?"success"===u.status&&(o&&(u.message?o.warning((0,x.A)("${保存成功}!")+u.message,4):o.success((0,x.A)("${保存成功}!"),1)),s=u.entityCode?u.entityCode:u.code):o&&o.error((0,x.A)("${保存失败}!"),5),t.abrupt("return",{code:s,status:u?u.status:"error"});case 9:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return J.apply(this,arguments)})},{key:"postDtmplData",value:(Q=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.postCommonDtmplData(e,r,n,o,"/v3/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return Q.apply(this,arguments)})},{key:"postMstrucDtmplData",value:(W=(0,o.A)(E().mark((function t(e,r,n,o){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.postCommonDtmplData(e,r,n,o,"/v3/mstruc/dtmpl/data");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return W.apply(this,arguments)})},{key:"postFileAction",value:function(t,e){return u.A.joinPath(u.A.api(t),"/v3/upload")}},{key:"requestL2LtmplQueryKey",value:(U=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"v3/l2/ltmpl/query/key",serverKey:e,method:"GET",query:L(L({},n),{},{sourceId:r})});case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return U.apply(this,arguments)})},{key:"requestLtmplCount",value:(z=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/ltmpl/data/count",serverKey:e,query:{sourceId:r},method:"GET"});case 3:return n=t.sent,t.abrupt("return",n.count);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return z.apply(this,arguments)})},{key:"requestQueryData",value:(H=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/query/data",serverKey:e,method:"GET",query:L({queryKey:r},n)});case 2:return o=t.sent,t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return H.apply(this,arguments)})},{key:"getCodesOfSelectedRows",value:function(t){var e=[];if(t&&!(t.length<1)){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.code?e.push(o.code):s.Ay.error((0,x.A)("${没找到所选数据的Code}!!"),5)}}catch(t){n.e(t)}finally{n.f()}return e.length<1&&s.Ay.error((0,x.A)("${没找到所选数据的Code}!!"),5),e}}},{key:"deleteData",value:(q=(0,o.A)(E().mark((function t(e,r,n,o){var a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=this.getCodesOfSelectedRows(n),t.next=3,this.deleteByCode(e,r,a,o);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return q.apply(this,arguments)})},{key:"deleteByCode",value:(V=(0,o.A)(E().mark((function t(e,r,n,o){var a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/data",serverKey:e,data:{codes:n,sourceId:r,mainCode:o},method:"DELETE"});case 2:if(!(a=t.sent)||"success"!=a.status){t.next=8;break}return s.Ay.success((0,x.A)("${删除成功}"),1),t.abrupt("return",!0);case 8:return s.Ay.error((0,x.A)("${删除失败}"),3),t.abrupt("return",!1);case 10:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return V.apply(this,arguments)})},{key:"requestQueryAggregates",value:($=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ltmpl/query/count",serverKey:e,method:"GET",query:{queryKey:r}});case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return $.apply(this,arguments)})},{key:"doPostRequest",value:(B=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:r,serverKey:e,method:"POST",data:L({},n)});case 2:return o=t.sent,t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return B.apply(this,arguments)})},{key:"doGetRequest",value:(K=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:r,serverKey:e,method:"GET",query:L({},n)});case 2:return o=t.sent,t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,r){return K.apply(this,arguments)})},{key:"postActions",value:(M=(0,o.A)(E().mark((function t(e,r,n,o){var a,i,c,u;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(c in a=this.getCodesOfSelectedRows(n),i=new FormData,o)i.append(c,o[c]?o[c]:"");return i.append("sourceId",r.toString()),i.append("codes",a.join(",")),t.next=7,l.A.super({url:"/v3/action",serverKey:e,data:i,method:"POST"},"formdata",null);case 7:return u=t.sent,t.abrupt("return",u);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,n){return M.apply(this,arguments)})},{key:"increCalc",value:(G=(0,o.A)(E().mark((function t(e,r){var n,o,a=arguments;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},t.next=3,l.A.super({url:"/v3/stat/increcalc",serverKey:e,method:"POST",data:L(L({},n),{},{sourceId:r})});case 3:return(o=t.sent)&&"success"===o.status?s.Ay.success((0,x.A)("${统计成功}"),1):s.Ay.error((0,x.A)("${统计失败}")),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t)}))),function(t,e){return G.apply(this,arguments)})},{key:"saveRatmplSelectCodes",value:(F=(0,o.A)(E().mark((function t(e,r,n,o){var a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/ratmpl-select/data",serverKey:e,method:"POST",data:{codes:o,mainCode:n,sourceId:r}});case 2:return(a=t.sent)&&"success"!=a.status&&s.Ay.error((0,x.A)("${"+a.message+"}")),t.abrupt("return",a);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return F.apply(this,arguments)})},{key:"doCopy",value:(R=(0,o.A)(E().mark((function t(e,r,n,o,a){var i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/mstruc/copy-data",serverKey:e,method:"POST",query:{sourceId:r,code:n,copyRelation:o,copyOpp2One:a}},null,null);case 2:return(i=t.sent)&&"success"==i.status&&i.message&&s.Ay.info(i.message,4),t.abrupt("return",i.entityCode);case 5:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return R.apply(this,arguments)})},{key:"queryCode",value:(_=(0,o.A)(E().mark((function t(e,r,n){var o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=void 0,!r){t.next=16;break}if("listop"!=r){t.next=9;break}return t.next=5,this.queryTop1(n,e);case 5:(o=t.sent)||(o="bad-code"),t.next=16;break;case 9:if("listop-new"!=r){t.next=15;break}return t.next=12,this.queryTop1(n,e);case 12:o=t.sent,t.next=16;break;case 15:"new"==r&&(o=null);case 16:return t.abrupt("return",o);case 17:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return _.apply(this,arguments)})},{key:"download",value:function(t,e){var r=e.split("/"),n=r[r.length-1];this.downloadDir(this.getFileUrl(t,e),n)}},{key:"downloadDir",value:function(t,e){u.A.downloadFile(t+"&disposition=attachment",e)}},{key:"openfile",value:function(t,e,r){var n=e.split("/"),o=n[n.length-1];this.openfileDir(o,this.getFileUrl(t,e),r)}},{key:"getFileNameFrom",value:function(t){if(t){var e=t.split("/");return e[e.length-1]}}},{key:"getFileSuffixFrom",value:function(t){if(t){var e=t.split(".");return e.length>1?e.pop():void 0}}},{key:"openfileDir",value:function(t,e,r){u.A.openFile(t,e,r)}},{key:"getFileUrl",value:function(t,e){var r,n,o=u.A.hydrocarbonToken(u.A.programCode(t));return null!=e&&e.startsWith("http")||null!=e&&e.startsWith("HTTP")?(r=e,n=e.indexOf("?")>0?r+"&@token=".concat(o,"&@programToken=").concat(u.A.programCode()):r+"?@token=".concat(o,"&@programToken=").concat(u.A.programCode())):n=(r=u.A.joinPath(u.A.api(t),u.A.joinPath("/v3/files",e)))+"?@token=".concat(o,"&@programToken=").concat(u.A.programCode()),encodeURI(n)}},{key:"loadFileTxt",value:(D=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:encodeURI(u.A.joinPath("/v3/files/text",r)),serverKey:e,method:"GET"});case 2:return n=t.sent,t.abrupt("return",n.text);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return D.apply(this,arguments)})},{key:"requestBlocks",value:(N=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/blocks",method:"GET",query:{l2MenuId:e,blockId:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return N.apply(this,arguments)})},{key:"requestBlockMenuAuths",value:(T=(0,o.A)(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/block-menu-auths",method:"GET",query:{}});case 3:return e=t.sent,t.abrupt("return",null==e?void 0:e.blocks);case 5:case"end":return t.stop()}}),t)}))),function(){return T.apply(this,arguments)})},{key:"requestRoleAuths",value:(P=(0,o.A)(E().mark((function t(e){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/auth/role-auths",method:"GET",query:{roleCode:e}});case 3:return r=t.sent,t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)}))),function(t){return P.apply(this,arguments)})},{key:"postRoleAuths",value:(I=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/auth/role-auths",method:"POST",query:{roleCode:e,auths:r}});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))),function(t,e){return I.apply(this,arguments)})},{key:"logout",value:(j=(0,o.A)(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.A.super({url:"/v3/auth/token",method:"DELETE"}).then((function(t){u.A.toLogin()}));case 1:case"end":return t.stop()}}),t)}))),function(){return j.apply(this,arguments)})},{key:"logout2",value:(Y=(0,o.A)(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l.A.super({url:"/v3/auth/token",method:"DELETE"}));case 1:case"end":return t.stop()}}),t)}))),function(){return Y.apply(this,arguments)})},{key:"resetPassword",value:(S=(0,o.A)(E().mark((function t(e,r,n,o){var a,i,c;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=d.rsaEncrypt(r,o),i=d.rsaEncrypt(n,o),t.next=4,l.A.super({url:"/v3/auth/password",serverKey:e,query:{oldPassword:a,newPassword:i},method:"POST"});case 4:return c=t.sent,t.abrupt("return",c);case 6:case"end":return t.stop()}}),t)}))),function(t,e,r,n){return S.apply(this,arguments)})},{key:"resetPassword2",value:(O=(0,o.A)(E().mark((function t(e,r,n,o,a){var i,c,u;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=d.rsaEncrypt(n,a),c=d.rsaEncrypt(o,a),t.next=4,l.A.super({url:"/v3/auth/password2",serverKey:e,query:{userName:r,oldPassword:i,newPassword:c},method:"POST"});case 4:return u=t.sent,t.abrupt("return",u);case 6:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o){return O.apply(this,arguments)})},{key:"getContextSourceConfig",value:(C=(0,o.A)(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/context-source-config",method:"GET"});case 2:if(!(e=t.sent)){t.next=7;break}return t.abrupt("return",e.config);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(){return C.apply(this,arguments)})},{key:"getContextSourceValue",value:(b=(0,o.A)(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/context-source-value",method:"GET"});case 2:return e=t.sent,t.abrupt("return",e?e.value:null);case 4:case"end":return t.stop()}}),t)}))),function(){return b.apply(this,arguments)})},{key:"loginServer",value:(w=(0,o.A)(E().mark((function t(e,r,n){var o,a,i;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRasPubkey(e);case 2:if(!(o=t.sent)){t.next=16;break}return a={username:r,password:n},t.next=7,this.login(a,null,null,o,null,e);case 7:if("success"!=(i=t.sent).status){t.next=13;break}return u.A.setServerHydrocarbonToken(e,i.token),t.abrupt("return",i);case 13:case 16:return t.abrupt("return",{status:"error",message:"登陆失败"});case 14:t.next=17;break;case 17:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return w.apply(this,arguments)})},{key:"login",value:(m=(0,o.A)(E().mark((function t(e,r,n,o,a,i){var c,u,f;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=y()(new Date).tz("Europe/London").format("YYYY-MM-DD HH:mm:ss"),e.datetime=c,u=d.rsaEncrypt(JSON.stringify(e),o),t.next=5,l.A.super({url:"/v3/auth/hctoken",serverKey:i,header:{programCode:a},query:{userInfo:u,kaptchaToken:r,kaptchaText:n},method:"GET"});case 5:return(f=t.sent).passwordState&&("expiry"==f.passwordState?s.Ay.warning((0,x.A)("${"+f.message+"}"),10):"expiried"==f.passwordState?s.Ay.error((0,x.A)("${"+f.message+"}"),10):"restricted"==f.passwordState&&s.Ay.error((0,x.A)("${"+f.message+"}"),15)),t.abrupt("return",{status:f.status,token:f.token});case 8:case"end":return t.stop()}}),t)}))),function(t,e,r,n,o,a){return m.apply(this,arguments)})},{key:"setContext",value:(g=(0,o.A)(E().mark((function t(e){var r,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new FormData).append("context",JSON.stringify(e)),t.next=4,l.A.super({url:"/v3/auth/context",data:r,method:"POST"},"formdata");case 4:return(n=t.sent)&&"success"===n.status&&(window.location.hash="#/home"),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)}))),function(t){return g.apply(this,arguments)})},{key:"getKaptchaToken",value:(v=(0,o.A)(E().mark((function t(e){var r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/kaptcha",header:{programCode:e},method:"POST"});case 2:if(!(r=t.sent)||"success"!==r.status){t.next=7;break}return t.abrupt("return",r);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t){return v.apply(this,arguments)})},{key:"getRasPubkey",value:(p=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({url:"/v3/auth/ras-pubkey",header:{programCode:r},serverKey:e,method:"GET"});case 2:if(!(n=t.sent)||"success"!==n.status){t.next=7;break}return t.abrupt("return",n.rasPubkey);case 7:return t.abrupt("return",null);case 8:case"end":return t.stop()}}),t)}))),function(t,e){return p.apply(this,arguments)})},{key:"getUser",value:(h=(0,o.A)(E().mark((function t(e,r){var n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.A.super({header:{programCode:e,hydrocarbonToken:r},url:"/v3/current-user"});case 2:return n=t.sent,t.abrupt("return",n?n.user:null);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)})},{key:"requestFastMenu",value:(f=(0,o.A)(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/menu/fast-menu",method:"GET"});case 3:return e=t.sent,t.abrupt("return",e?e.fastMenu:null);case 5:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"reload",value:(c=(0,o.A)(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,l.A.super({url:"/v3/tmpl/reload",method:"GET"});case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"getAllLang",value:(r=(0,o.A)(E().mark((function t(e){var r,n;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={url:"/v3/languages",method:"GET"},void 0!==e&&(r.serverKey=e),t.next=5,l.A.super(r);case 5:return n=t.sent,t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"getLocale",value:(e=(0,o.A)(E().mark((function t(e,r){var n,o;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={url:"".concat("/v3/multilingual","?language=").concat(e),method:"GET"},void 0!==r&&(n.serverKey=r),t.next=5,l.A.super(n);case 5:return o=t.sent,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),function(t,r){return e.apply(this,arguments)})},{key:"initProgramConfig",value:(t=(0,o.A)(E().mark((function t(e){var r,o,a;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.programCode&&A.vr.setProgramCode(e.programCode),e.hydrocarbonServer&&A.vr.setHydrocarbonServer(e.hydrocarbonServer),e.extendServer&&(r=e.extendServer,"object"==(0,n.A)(r)&&(o=[],Array.isArray(r)?o=r:o.push(r),A.vr.putExtendServers(o))),A.vr.setProgramName(e.programName),A.vr.setProgramName_sub(e.programName_sub),A.vr.setProgramName_NavLeft(e.programName_NavLeft),A.vr.setProgramName_Logo(e.programName_Logo),t.next=9,l.A.getProramConfig();case 9:(a=t.sent)&&(A.vr.setProgramCode(a.programCode),A.vr.setHydrocarbonServer(a.hydrocarbonServer),A.vr.setProgramName(a.programName),A.vr.setProgramName_sub(a.programName_NavLeft),A.vr.setProgramName_NavLeft(a.programName_NavLeft),A.vr.setProgramName_Logo(a.programName_Logo));case 11:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t,e,r,c,f,h,p,v,g,m,w,b,C,O,S,Y,j,I,P,T,N,D,_,R,F,G,M,K,B,$,V,q,H,z,U,W,Q,J,Z,X,tt,et,rt,nt,ot,at,it,ct,ut,lt,st,ft,ht,pt,dt,vt,yt,gt,mt,wt,bt,At,xt,kt}();(0,c.A)(O,"getJsonValue",(function(t){var e=t;if(t)return"string"==typeof t&&(e=JSON.parse(t)),e}))},94300:function(t,e,r){"use strict";r.d(e,{Y:function(){return c},t:function(){return i}});var n=r(33227),o=r(96540),a=r(1026),i=function(){var t,e=null===(t=window)||void 0===t?void 0:t.navigator,r=Boolean(e&&"language"in e),a=(0,o.useState)(null==e?void 0:e.language),i=(0,n.A)(a,2),c=i[0],u=i[1];return window.addEventListener("languagechange",(function(){e&&u(e.language)})),{isSupported:r,navigatorLanguage:c}},c=function(){var t=(0,o.useContext)(a.U),e=t.locale,r=t.changeLocale,n=t.siderCollapsed,i=t.changeSiderCollapsed;return{getLocale:function(){return e},setLocale:function(t){r(t)},getSiderCollapsed:function(){return n},changeSiderCollapsed:function(){i()},t:t.t,translate:t.translate,availableLang:t.availableLang,getServiceLangStr:t.getServiceLangStr}}},94362:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=r(33227),i=r(96540),c=r(21102),u=r(29029),l=r(17308),s=r(77053),f=r(46704),h=r(17437);function p(){p=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=d;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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,m):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),m},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),I(r),m}},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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}e.A=function(t){var e=t.fieldConfig,r=t.serverKey,n=t.value,d=t.treeOpen,v=t.valueOnly,y=t.multiple,g=t.width,m=(0,i.useState)(void 0),w=(0,a.A)(m,2),b=w[0],A=w[1],x=(0,i.useState)(void 0),k=(0,a.A)(x,2),C=k[0],L=k[1],E=(0,i.useState)([]),O=(0,a.A)(E,2),S=O[0],Y=O[1],j=(0,i.useState)(!0),I=(0,a.A)(j,2),P=I[0],T=I[1],N=(0,i.useState)([]),D=(0,a.A)(N,2);D[0],D[1],(0,i.useEffect)((function(){var t=function(){var t=(0,o.A)(p().mark((function t(){var o,a;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.A.requestTtmplConfig(r,e.id);case 2:return o=t.sent,t.next=5,s.A.initTtmplNodeConfig(o);case 5:a=t.sent,A(a),n(a);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t();var n=function(){var t=(0,o.A)(p().mark((function t(e){var r;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.A.loadRootNodeData(e);case 2:r=t.sent,Y(r),T(!1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),[e]);var _=function(){var t=(0,o.A)(p().mark((function t(e){var r;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.A.reloadData(e.code,b,S,C);case 2:r=t.sent,Y(r.data),T(!1),L(r.expandedKeys);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),R=function(){var t=(0,o.A)(p().mark((function t(e){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F=function(){var e=(0,o.A)(p().mark((function e(r,n,o){var a,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Array.isArray(r),a=s.A.getNodesOfKey({children:S},r),i=[],a&&a.forEach((function(t){v?i.push(t.name):i.push(t.code+"@R@"+t.name)})),t.onChange&&t.onChange(i),console.log(a);case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();return(0,h.Y)(c.A,{open:d,allowClear:!0,value:function(){if(n){var t=[],e=[];n.forEach((function(r){t.push(r.split("@R@")[0]),e.push(r.split("@R@")[1])}));var r=s.A.getNodeKeys(S,t);return r&&0!=r.length?r:e}return n}(),onChange:F,multiple:y,defaultOpen:d,style:{width:g||200},treeExpandedKeys:C,treeData:S,loadData:_,notFoundContent:P?(0,h.Y)(u.A,{size:"small"}):(0,h.Y)(l.A,null),onTreeExpand:R})}},95424:function(t,e,r){"use strict";r.d(e,{EV:function(){return h},bs:function(){return p},oK:function(){return f}});var n=r(33227),o=r(99536),a=r(92187),i=r(13173),c=r(73148),u=r(22658),l={fr:["fra","fr-FR"],zh:["zh","zh-CN"],en:["en"],pt:["pt"],ru:["ru"]},s={fra:["fr","fr-FR"],zh:["zh","zh-CN"],en:["en"],pt:["pt"],ru:["ru"]},f=function(t){for(var e=0,r=Object.entries(l);e<r.length;e++){var o=(0,n.A)(r[e],2),a=o[0];if(o[1].findIndex((function(e){return e===t}))>-1)return a}return"zh"},h=function(t){for(var e=0,r=Object.entries(s);e<r.length;e++){var o=(0,n.A)(r[e],2),a=o[0];if(o[1].findIndex((function(e){return e===t}))>-1)return a}return"zh"},p={zh:a.A,fr:o.A,en:i.A,pt:c.A,ru:u.A}},96749:function(t,e,r){"use strict";var n=r(42455),o=r(17636),a=(r(18128),r(96540)),i=r(5338),c=(r(39912),r(71436),r(80243)),u=r(54774),l=JSON.parse('{"hydrocarbonServer1":"http://121.196.184.205:208/hydrogen","hydrocarbonServer":"http://localhost:8383/hydrogen","programName_NavLeft":"HYDROCARBON","programName":"恩赫行业应用平台","programName_sub":"CARBON","programName_Logo":"logo.png","programCode1":"71164104967856221","extendServer":[{"key":"carbonthinking","programCode":"253564453860974594","hydrocarbonServer":"https://carbonthinking.kuangkie.com/"}]}'),s=r(84976),f=r(47767),h=r(86876),p=r(17437),d=(0,s.Ge)([{path:"/login",Component:u.rN},{path:"/login/:programCode",Component:u.rN},{path:"/login2",Component:u.rN,element:(0,p.Y)(u.rN,null)},{path:"/login2/:programCode",Component:u.rN,element:(0,p.Y)(u.rN,null)},{path:"/",element:(0,p.Y)(f.C5,{to:"/v2/home",replace:!0})},{path:"/home",element:(0,p.Y)(f.C5,{to:"/v2/home",replace:!0})},{path:"/home/:programCode",element:(0,p.Y)(f.C5,{to:"/v2/home/:programCode",replace:!0})},{path:"/v2",element:(0,p.Y)(u.hn,null),children:[{path:"home",element:u.vr.getCustomPage(u.vr.programCode())?a.createElement(u.vr.getCustomPage(u.vr.programCode())):(0,p.Y)(u.O4,null)},{path:"home/:programCode",element:u.vr.getCustomPage(u.vr.programCode())?a.createElement(u.vr.getCustomPage(u.vr.programCode())):(0,p.Y)(u.O4,null)},{path:":sourceId/act-table",element:(0,p.Y)(u.RW,{layoutRootPath:"v2"})},{path:":sourceId/act-tree",element:(0,p.Y)(u.Rm,{treeTop:120,layoutRootPath:"v2"})},{path:":sourceId/detail-view",element:(0,p.Y)(u.L9,{layoutRootPath:"v2"})},{path:":sourceId/detail-edit",element:(0,p.Y)(u.L9,{layoutRootPath:"v2"})},{path:":sourceId/importer",element:(0,p.Y)(u.Q0,{layoutRootPath:"v2"})},{path:"page/:sourceId/:pageName",element:(0,p.Y)(u.rV,null)},{path:":sourceId/report-table",element:(0,p.Y)(u.RW,{tableType:"report",layoutRootPath:"v2"})}]},{path:"*",Component:u.O4}]);function v(){return(0,p.Y)(h.default,null,(0,p.Y)(s.pg,{router:d}))}function y(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 g(){}function m(){m=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function w(){}function b(){}function A(){}var x={};s(x,c,(function(){return this}));var k=Object.getPrototypeOf,C=k&&k(k(T([])));C&&C!==r&&o.call(C,c)&&(x=C);var L=A.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(a,i,c,u){var l=h(t[a],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==(0,n.A)(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return r("throw",t,c,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=p;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=Y(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===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function Y(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(o.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError((0,n.A)(e)+" is not iterable")}return b.prototype=A,a(L,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:b,configurable:!0}),b.displayName=s(A,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},E(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.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}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),l=o.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&&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),I(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;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function w(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return b(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)?b(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function b(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}r(97109),g.addDTmpl={name:"聚类添加",sourceId:"437960377121939459",type:"dtmpl"},g.addDTmpl_clusterType={name:"聚类类型",sourceId:"437965647046811651",key:"d1f40165e4d81d30a07e59f8ea8f103b",type:"rfield"},g.addDTmpl_device={name:"设备",sourceId:"438525904055738371",key:"cacf6a30691fbab95d272799e0637813",type:"rfield"},g.addDTmpl_monit={name:"监测点",sourceId:"437965640604360707",key:"a9bd305f63d96f13e3e59277ee794ec8",type:"rfield"},g.addDTmpl_deviceType={name:"设备类型",sourceId:"437965468805668867",key:"c691325969adf5b38cf613bc8dca763e",type:"rfield"},g.completeDtmplConfig=function(t,e){function r(e,r,n){var o,a=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return y(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)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(t.groups[0].fields);try{for(a.s();!(o=a.n()).done;){var i=o.value,c=u.Sh.getFieldValueOfMstrucId(t,e,g.addDTmpl_device.key,""),l=u.Sh.getFieldValueOfMstrucId(t,e,g.addDTmpl_deviceType.key,""),s=u.Sh.getFieldValueOfMstrucId(t,e,g.addDTmpl_clusterType.key,"");g.addDTmpl_monit.key==i.mstrucId&&(""!=c&&"设备类型聚类"!=s?(i.baseCriteria={c_437970012881068034:c},i.disabled=!1,i.required=!0):(i.disabled=!0,i.required=!1),i.shouldUpdate=!0,r&&r.hasOwnProperty(g.addDTmpl_device.sourceId)&&n.setFieldValue(g.addDTmpl_monit.sourceId,null)),g.addDTmpl_device.key==i.mstrucId&&("设备类型聚类"==s&&(i.baseCriteria={c_438525225450905602:l}),i.required=!0,i.shouldUpdate=!0,r&&r.hasOwnProperty(g.addDTmpl_deviceType.sourceId)&&n.setFieldValue(g.addDTmpl_device.sourceId,null)),g.addDTmpl_deviceType.key==i.mstrucId&&("设备类型聚类"==s?(i.disabled=!1,i.required=!0):(i.disabled=!0,i.required=!1),i.shouldUpdate=!0,r&&r.hasOwnProperty(g.addDTmpl_clusterType.sourceId)&&n.setFieldValue(g.addDTmpl_deviceType.sourceId,null))}}catch(t){a.e(t)}finally{a.f()}}return r(e?e.fieldMap:null,null),t.onValuesChange=function(t,e,n){r(e.fieldMap,t,n)},t},(0,c.ai)((0,o.A)(m().mark((function t(){var e;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,i.H)(document.getElementById("root")),u.vr.setAppDtmplConfigFunc("229650889220097",(function(t,e){var r=t.groups[0].fields[0];return r.shouldUpdate=function(t,e){return!0},r.mainCode=function(t){return console.log("调用了 update",r.title),t.getFieldValue(r.id),t.getFieldInstance(r.id),r.id},r.updateSelf=function(t){return"11"==t.getFieldValue(0xd0ddc3aca007)?r.required=!0:r.required=!1,r},t.onValuesChange=function(t,e,r){"22"==t[0xd0ddc3aca007]&&r.setFieldValue("229650889220101",e.fieldMap[0xd0ddc3aca005]+23)},t})),u.vr.setAppDtmplConfigFunc("281357880958977",(function(t,e){var r,n=t.groups[0],o=t.groups[1],a=e?e.fieldMap[0xffe4d9aca005]:void 0,i=w(n.fields);try{for(i.s();!(r=i.n()).done;){var c=r.value;if("bf3977ff49f1946ff35366e6b3e9bd16"==c.mstrucId)if(c.shouldUpdate=function(t,e){return!0},a&&a.length>0){var u=a.split("@R@")[0];c.disabled=!1,c.mainCode=u,o.disabled=!1,o.mainCode=u}else c.disabled=!0,o.disabled=!0;else"281358369595397"==c.id&&(c.shouldUpdate=function(t,e){return!0})}}catch(t){i.e(t)}finally{i.f()}return t.onValuesChange=function(e,r,n){var o="281358369595397",a="281358369595399",i=e[o],c=t.groups[0],u=t.groups[1];if(null!=i){var l,s=w(c.fields);try{for(s.s();!(l=s.n()).done;){var f=l.value;if(f.id==a)if(n.isFieldTouched(a),n.setFieldValue(a,[]),n.setFieldValue("$virtual281358369595402",1),i&&i.length>0){var h=i[0].split("@R@")[0];f.disabled=!1,f.mainCode=h,u.disabled=!1,u.mainCode=h}else f.disabled=!0,u.disabled=!0}}catch(t){s.e(t)}finally{s.f()}}else if(e.hasOwnProperty("$virtual281358369595402"))if(e.$virtual281358369595402>0){var p,d=w(c.fields);try{for(d.s();!(p=d.n()).done;){var v=p.value;v.id==o&&(v.disabled=!0)}}catch(t){d.e(t)}finally{d.f()}}else{var y,g=w(c.fields);try{for(g.s();!(y=g.n()).done;){var m=y.value;m.id==o&&(m.disabled=!1)}}catch(t){g.e(t)}finally{g.f()}}},t})),t.next=5,u.Fj.initProgramConfig(l);case 5:e.render((0,p.Y)(v,null));case 6:case"end":return t.stop()}}),t)}))))},97109:function(t,e,r){"use strict";r.d(e,{u:function(){return l}});var n=r(21745),o=r(33227),a=r(96540),i=r(47767),c=r(19930),u=r(75787);function l(){var t=(0,c.A)("keepAliveTabs",{defaultValue:[],serializer:function(t){return JSON.stringify(t.map((function(t){return(0,u.A)(t,["children"])})))}}),e=(0,o.A)(t,2),r=e[0],l=e[1],s=(0,a.useState)(""),f=(0,o.A)(s,2),h=f[0],p=f[1],d=function(){var t=(0,i.P1)(),e=((0,i.FE)(),(0,i.zy)()),r=e.pathname,n=e.search,c=(0,i.g)().sourceId,u=r+n,l=(0,a.useState)(),s=(0,o.A)(l,2),f=s[0],h=s[1];return(0,a.useEffect)((function(){var e=c;r.indexOf("/home")>0&&(e="home"),h({title:e||"其他",pathname:u,children:t,routePath:r})}),[u]),f}(),v=(0,i.Zp)(),y=(0,a.useCallback)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h||"";if(null!=r&&r.length){var e=(r||[]).findIndex((function(e){return e.routePath===t}));r[e].routePath===h&&r.length>1&&v(e>0?r[e-1].pathname:r[e+1].pathname),r.splice(e,1),l((0,n.A)(r))}}),[h]),g=(0,a.useCallback)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h||"";null!=r&&r.length&&(r.find((function(e){return e.routePath===t})),l(r.filter((function(e){return e.routePath===t}))))}),[h]),m=(0,a.useCallback)((function(){}),[h]);return(0,a.useEffect)((function(){if(d){var t=(r||[]).find((function(t){return t.routePath===(null==d?void 0:d.routePath)}));t?t.pathname!==d.pathname?l((function(t){var e=(t||[]).findIndex((function(t){return t.routePath===d.routePath}));return e>=0&&t&&(t[e].key=d.routePath,t[e].pathname=d.pathname,t[e].children=d.children),(0,n.A)(t||[])})):t.children||l((function(t){var e=(t||[]).findIndex((function(t){return t.routePath===d.routePath}));return e>=0&&t&&(t[e].key=d.routePath,t[e].children=d.children),(0,n.A)(t||[])})):l([].concat((0,n.A)(r||[]),[{title:d.title,key:d.routePath,routePath:d.routePath,pathname:d.pathname,children:d.children,icon:d.icon}])),p(d.routePath)}}),[d]),{tabs:r,activeTabRoutePath:h,closeTab:y,closeOtherTab:g,refreshTab:m,setTabs:l}}},97135:function(t,e,r){"use strict";var n=r(38452),o=r(65425),a=r(50828),i=r(96540),c=r(50770),u=r(17355),l=r(36492),s=r(15039),f=r(54763),h=r(68876),p=r(24262),d=r(56953),v=r(80243),y=r(66941),g=r(39976),m=r(49814),w=r(36586),b=r(59090),A=r(18015),x=r(8130),k=r(54774),C=r(75763),L=r(23605),E=r(70686),O=r(48177),S=r(94362),Y=r(78122),j=r(33172),I=r(38180),P=r(17437),T=["value","onChange","style"],N=["value"],D=["fieldConfig","value","onChange","id","mainCode"];function _(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_(Object(r),!0).forEach((function(e){(0,a.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var F=c.Ay.Group,G=(0,P.Y)(i.Fragment,null,"loading"),M=(0,v.Ay)({resolved:{},chunkName:function(){return"signature"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(87)]).then(r.bind(r,4556))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 4556}},{fallback:G}),K=(0,v.Ay)({resolved:{},chunkName:function(){return"chemstruc-graph"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(824),r.e(495),r.e(469),r.e(613),r.e(361),r.e(641),r.e(543),r.e(426),r.e(944),r.e(473),r.e(670)]).then(r.bind(r,85998))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 85998}},{fallback:G}),B=(0,v.Ay)({resolved:{},chunkName:function(){return"html-editor-draft"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(689),r.e(651),r.e(900)]).then(r.bind(r,12536))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 12536}},{fallback:G}),$=(0,v.Ay)({resolved:{},chunkName:function(){return"code-editor-sql-code-editor"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(112),r.e(695),r.e(557)]).then(r.bind(r,74025))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 74025}},{fallback:G}),V=(0,v.Ay)({resolved:{},chunkName:function(){return"color-picker"},isReady:function(t){var e=this.resolve(t);return!0===this.resolved[e]&&!!r.m[e]},importAsync:function(){return Promise.all([r.e(76),r.e(671)]).then(r.bind(r,33442))},requireAsync:function(t){var e=this,r=this.resolve(t);return this.resolved[r]=!1,this.importAsync(t).then((function(t){return e.resolved[r]=!0,t}))},requireSync:function(t){var e=this.resolve(t);return r(e)},resolve:function(){return 33442}},{fallback:G}),q=u.A.TextArea;e.A=function(t){var e=t.fieldConfig,r=t.value,a=t.onChange;return function(t,e,r,a,v,D,_){var G=(0,k.Ym)().translate,H=f.A.getControlType(r,a),z=void 0,U=r.disabled?G("${无需输入}"):G("${请输入}${"+r.title+"}"),W=r.disabled,Q=r.min,J=Q||"0"==Q?x.A.configParamTrans(Q,H):void 0,Z=(Q=r.max)||"0"==Q?x.A.configParamTrans(Q,H):void 0,X=R({id:t,mainCode:e,fieldConfig:r,min:J,max:Z,itemType:H,viewOrEdit:"edit",onChange:v,disabled:W,value:a,style:{minWidth:220,width:"100%"}},_),tt=R({id:t,placeholder:U,disabled:W,value:a,onChange:v,style:{minWidth:220,width:"100%"}},_),et=(0,P.Y)(u.A,{type:"text",placeholder:G("${暂未实现}-${"+H+"}"),disabled:!0});if(k.vr.getCustomEditControl(H))return i.createElement(k.vr.getCustomEditControl(H),X);switch(H){case"int":case"decimal":case"float":case"double":case"intrange":case"decimalrange":z=(0,P.Y)(h.A,X);break;case"text":z=(0,P.Y)(u.A,(0,o.A)({allowClear:!0,type:"text"},tt));break;case"range":z=(0,P.Y)(p.A,X);break;case"yes-no-select":z=(0,P.Y)(l.A,(0,o.A)({},tt,{notFoundContent:G("${暂无选项}"),allowClear:!0,showSearch:!0,optionFilterProp:"label",options:[{value:"是",label:"是"},{value:"否",label:"否"}]}));break;case"select":case"multiselect":case"texttags":case"checkbox":case"radio":case"steps":z=(0,P.Y)(E.A,X);break;case"yes-no-switch":var rt=tt.value,nt=tt.onChange,ot=(tt.style,(0,n.A)(tt,T));z=(0,P.Y)(s.A,(0,o.A)({style:{width:"60px"},checkedChildren:G("${是}"),unCheckedChildren:G("${否}"),checked:"是"==rt,onChange:function(t){nt(t?"是":"否")}},ot));break;case"yes-no-radio":var at=tt.value,it=(0,n.A)(tt,N);z=(0,P.Y)(F,(0,o.A)({value:at?"是"==at?"是":"否":null},it),(0,P.Y)(c.Ay,{value:"是"},G("${是}")),(0,P.Y)(c.Ay,{value:"否"},G("${否}")));break;case"date-YY":case"daterange-YY":case"date-M1":case"daterange-M1":case"date":case"daterange":case"datetime-HH":case"datetimerange-HH":case"datetime-mm":case"datetimerange-mm":case"datetime":case"datetimerange":case"time-HH":case"timerange-HH":case"time-mm":case"timerange-mm":case"time":case"timerange":case"timerange-HH-unorder":case"timerange-mm-unorder":case"timerange-unorder":z=(0,P.Y)(L.A,X);break;case"textarea":case"url":z=(0,P.Y)(q,(0,o.A)({rows:3,allowClear:!0},tt));break;case"html":z=(0,P.Y)(B,(0,o.A)({viewOrEdit:"edit"},X));break;case"password":z=(0,P.Y)(u.A.Password,(0,o.A)({},tt,{autoComplete:"new-password",prefix:(0,P.Y)(C.A,{className:"site-form-item-icon"})}));break;case"preselect":z=(0,P.Y)(d.A,X);break;case"caselect":z=(0,P.Y)(m.A,X);break;case"relation":default:z=et;break;case"file":case"video":case"picture":case"non-download-file":z=(0,P.Y)(y.A,X);break;case"relfile":z=W?(0,P.Y)(Y.default,X):(0,P.Y)(j.A,(0,o.A)({},X,{maxCount:parseInt(r.max)}));break;case"chemstruc":z=(0,P.Y)(K,(0,o.A)({viewOrEdit:"edit"},X));break;case"sql-code-editor":z=(0,P.Y)($,(0,o.A)({viewOrEdit:"edit"},X));break;case"relselect":case"refselect":case"entity-select":z=(0,P.Y)(w.A,(0,o.A)({baseCriteria:r.baseCriteria,maxSelected:Z?parseInt(Z):void 0},X));break;case"relselectvalue":case"entity-select-value":z=(0,P.Y)(w.A,(0,o.A)({valueOnly:!0,baseCriteria:r.baseCriteria,maxSelected:Z?parseInt(Z):void 0},X));break;case"table-entity-select":z=(0,P.Y)(b.A,(0,o.A)({maxSelected:Z?parseInt(Z):void 0},X));break;case"lab-tree-select":z=(0,P.Y)(A.A,(0,o.A)({maxSelected:Z?parseInt(Z):void 0},X));break;case"tree-entity-select":z=(0,P.Y)(S.A,(0,o.A)({baseCriteria:r.baseCriteria,maxSelected:Z?parseInt(Z):void 0},X));break;case"ltree-entity-select":case"ltree-entity-select-value":z=(0,P.Y)(I.A,X);break;case"tree-entity-select-value":z=(0,P.Y)(S.A,(0,o.A)({valueOnly:!0,baseCriteria:r.baseCriteria,maxSelected:Z?parseInt(Z):void 0},X));break;case"progress":z=(0,P.Y)(g.A,X);break;case"signature":z=(0,P.Y)(M,X);break;case"color":z=(0,P.Y)(V,X);break;case"hidden":z=(0,P.Y)(u.A,{type:"hidden",value:a,disabled:!0});break;case"field-history":z=(0,P.Y)(O.A,X)}return z}(t.id,t.mainCode,e,r,a,0,(0,n.A)(t,D))}},97823:function(t,e,r){"use strict";var n=r(62477),o=r(44274),a=r(2532),i=r(63549),c=r(91985),u=r(11504),l=r(50828),s=r(96540),f=r(28392),h=r(76945),p=r(28073),d=r(54839),v=r(50329),y=r(1490),g=r(1026),m=r(17437);function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var b=function(t){function e(){var t,r,n,a;(0,o.A)(this,e);for(var u=arguments.length,s=new Array(u),f=0;f<u;f++)s[f]=arguments[f];return r=this,n=e,a=[].concat(s),n=(0,c.A)(n),t=(0,i.A)(r,w()?Reflect.construct(n,a||[],(0,c.A)(r).constructor):n.apply(r,a)),(0,l.A)(t,"state",{}),(0,l.A)(t,"context",void 0),(0,l.A)(t,"calcOffsetBottom",(function(t){return t.length>=3?120:2==t.length?86:80})),t}return(0,u.A)(e,t),(0,a.A)(e,[{key:"render",value:function(){(0,n.A)(this.state);var t=this.props,e=t.dtmplConfig,r=t.mainCode,o=t.serverKey,a=this.context.translate;if(!e)return null;e.buttons;var i,c=e.cQuerys;return c&&c.length>3&&(i=(0,m.Y)("div",{style:{width:"100px"},className:"btns"},(0,m.Y)(f.A,{direction:"vertical"},c.map((function(t,e){if(e>2)return(0,m.Y)(y.A,{serverKey:o,block:!0,key:t.id,mainCode:r,cQueryConfig:t})}))))),c&&c.length>0&&r?(0,m.Y)(h.A,{style:{position:"absolute",top:180,right:10,maxHeight:90},offsetTop:300},(0,m.Y)("div",{className:"submitButtonBar"},(0,m.Y)("ul",null,c?c.map((function(t,e){if(e<3)return(0,m.Y)("li",{key:e},(0,m.Y)(y.A,{serverKey:o,type:"text",block:!0,key:t.id,mainCode:r,cQueryConfig:t}))})):"",c&&c.length>2?(0,m.Y)(p.A,{placement:"leftTop",content:i,trigger:"hover"},(0,m.Y)(d.Ay,{block:!0},(0,m.Y)(v.A,null),a("${更多}"))):""))):""}}])}(s.PureComponent);(0,l.A)(b,"contextType",g.U),e.A=b}},i={};function c(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={id:t,loaded:!1,exports:{}};return a[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=a,c.amdO={},t=[],c.O=function(e,r,n,o){if(!r){var a=1/0;for(s=0;s<t.length;s++){r=t[s][0],n=t[s][1],o=t[s][2];for(var i=!0,u=0;u<r.length;u++)(!1&o||a>=o)&&Object.keys(c.O).every((function(t){return c.O[t](r[u])}))?r.splice(u--,1):(i=!1,o<a&&(a=o));if(i){t.splice(s--,1);var l=n();void 0!==l&&(e=l)}}return e}o=o||0;for(var s=t.length;s>0&&t[s-1][2]>o;s--)t[s]=t[s-1];t[s]=[r,n,o]},c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},r=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},c.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);c.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((function(e){a[e]=function(){return t[e]}}));return a.default=function(){return t},c.d(o,a),o},c.d=function(t,e){for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.f={},c.e=function(t){return Promise.all(Object.keys(c.f).reduce((function(e,r){return c.f[r](t,e),e}),[]))},c.u=function(t){return"bundle."+{16:"874b3f088098a51fe779",76:"4e74b367562f2fcc557e",87:"866fb447979af51deaf0",112:"7dda8c43f58b4e01000d",361:"118048608e8ab47050ab",374:"8fba396651ab9131e760",426:"8f008042855b35daf44f",469:"3b6c5fe034cbb723c7f3",473:"420a3c4b880bec7c9395",495:"5ae6eceb7934e46e6d45",537:"5d22c4c1586e95424e26",543:"df15389f0df80bb5c1f8",557:"22564bca4d0f6fbabf69",613:"f6fe12d30504559f5f27",641:"0ba97fb9aed3256959a1",651:"84924d3443cdf0ef3a08",670:"e9df92a889fa6911eb3a",671:"54b2a31d011f6c769e7c",689:"c987651cbacb95e92e9a",695:"0cdb895a99048cda0139",824:"51b107a74d3e9e38daaa",864:"04a76d4f726f7257b62e",900:"a26a56462550fc7dcb76",944:"d67ab9f0b5662beefec1"}[t]+".js"},c.miniCssF=function(t){return"css/"+{76:"common",670:"chemstruc-graph",900:"html-editor-draft"}[t]+"-"+{76:"4fdc190a7145b69314ce",670:"3996ceb0836a84cd2d4f",900:"5e8e152675ab7d201c00"}[t]+".css"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},o="aldehyde:",c.l=function(t,e,r,a){if(n[t])n[t].push(e);else{var i,u;if(void 0!==r)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==o+r){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",o+r),i.src=t),n[t]=[e];var h=function(e,r){i.onerror=i.onload=null,clearTimeout(p);var o=n[t];if(delete n[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((function(t){return t(r)})),e)return e(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),u&&document.head.appendChild(i)}},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}(),function(){if("undefined"!=typeof document){var t={792:0};c.f.miniCss=function(e,r){t[e]?r.push(t[e]):0!==t[e]&&{76:1,670:1,900:1}[e]&&r.push(t[e]=function(t){return new Promise((function(e,r){var n=c.miniCssF(t),o=c.p+n;if(function(t,e){for(var r=document.getElementsByTagName("link"),n=0;n<r.length;n++){var o=(i=r[n]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(o===t||o===e))return i}var a=document.getElementsByTagName("style");for(n=0;n<a.length;n++){var i;if((o=(i=a[n]).getAttribute("data-href"))===t||o===e)return i}}(n,o))return e();!function(t,e,r,n,o){var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",c.nc&&(a.nonce=c.nc),a.onerror=a.onload=function(r){if(a.onerror=a.onload=null,"load"===r.type)n();else{var i=r&&r.type,c=r&&r.target&&r.target.href||e,u=new Error("Loading CSS chunk "+t+" failed.\n("+i+": "+c+")");u.name="ChunkLoadError",u.code="CSS_CHUNK_LOAD_FAILED",u.type=i,u.request=c,a.parentNode&&a.parentNode.removeChild(a),o(u)}},a.href=e,document.head.appendChild(a)}(t,o,0,e,r)}))}(e).then((function(){t[e]=0}),(function(r){throw delete t[e],r})))}}}(),function(){var t={792:0};c.f.j=function(e,r){var n=c.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=t[e]=[r,o]}));r.push(n[2]=o);var a=c.p+c.u(e),i=new Error;c.l(a,(function(r){if(c.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+e,e)}},c.O.j=function(e){return 0===t[e]};var e=function(e,r){var n,o,a=r[0],i=r[1],u=r[2],l=0;if(a.some((function(e){return 0!==t[e]}))){for(n in i)c.o(i,n)&&(c.m[n]=i[n]);if(u)var s=u(c)}for(e&&e(r);l<a.length;l++)o=a[l],c.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return c.O(s)},r=self.webpackChunkaldehyde=self.webpackChunkaldehyde||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}(),c.nc=void 0;var u=c.O(void 0,[649,800,270,855,698,368,462,56,360,768,749,587,772,516,875,74],(function(){return c(96749)}));u=c.O(u)}();
|