@byteluck-fe/model-driven-engine 1.3.0-beta.25
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/README.md +30 -0
- package/dist/esm/common/ActionManager.js +135 -0
- package/dist/esm/common/DataManager.js +77 -0
- package/dist/esm/common/Engine.js +1161 -0
- package/dist/esm/common/OkWorker.js +89 -0
- package/dist/esm/common/Plugin.js +10 -0
- package/dist/esm/common/Runtime.js +257 -0
- package/dist/esm/common/Store.js +331 -0
- package/dist/esm/common/checkerValue.js +547 -0
- package/dist/esm/common/index.js +2 -0
- package/dist/esm/common/proxyState.js +316 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/plugins/CalcPlugin.js +394 -0
- package/dist/esm/plugins/ControlsEventPlugin.js +168 -0
- package/dist/esm/plugins/ES6ModulePlugin.js +145 -0
- package/dist/esm/plugins/LifecycleEventPlugin.js +180 -0
- package/dist/esm/plugins/StylePlugin.js +26 -0
- package/dist/esm/plugins/index.js +5 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/runtimeUtils.js +48 -0
- package/dist/index.umd.js +2 -0
- package/dist/types/common/ActionManager.d.ts +14 -0
- package/dist/types/common/DataManager.d.ts +10 -0
- package/dist/types/common/Engine.d.ts +165 -0
- package/dist/types/common/OkWorker.d.ts +13 -0
- package/dist/types/common/Plugin.d.ts +6 -0
- package/dist/types/common/Runtime.d.ts +22 -0
- package/dist/types/common/Store.d.ts +49 -0
- package/dist/types/common/checkerValue.d.ts +3 -0
- package/dist/types/common/index.d.ts +2 -0
- package/dist/types/common/proxyState.d.ts +29 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/plugins/CalcPlugin.d.ts +121 -0
- package/dist/types/plugins/ControlsEventPlugin.d.ts +15 -0
- package/dist/types/plugins/ES6ModulePlugin.d.ts +25 -0
- package/dist/types/plugins/LifecycleEventPlugin.d.ts +14 -0
- package/dist/types/plugins/StylePlugin.d.ts +12 -0
- package/dist/types/plugins/index.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/runtimeUtils.d.ts +4 -0
- package/package.json +32 -0
- package/src/index.ts +3 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Zc=Object.defineProperty,Yc=Object.defineProperties;var el=Object.getOwnPropertyDescriptors;var lr=Object.getOwnPropertySymbols,tl=Object.getPrototypeOf,nl=Object.prototype.hasOwnProperty,rl=Object.prototype.propertyIsEnumerable,il=Reflect.get;var fr=(D,$,P)=>$ in D?Zc(D,$,{enumerable:!0,configurable:!0,writable:!0,value:P}):D[$]=P,x=(D,$)=>{for(var P in $||($={}))nl.call($,P)&&fr(D,P,$[P]);if(lr)for(var P of lr($))rl.call($,P)&&fr(D,P,$[P]);return D},an=(D,$)=>Yc(D,el($));var dr=(D,$,P)=>il(tl(D),P,$);var ae=(D,$,P)=>new Promise((Y,qe)=>{var lt=oe=>{try{we(P.next(oe))}catch(Se){qe(Se)}},ft=oe=>{try{we(P.throw(oe))}catch(Se){qe(Se)}},we=oe=>oe.done?Y(oe.value):Promise.resolve(oe.value).then(lt,ft);we((P=P.apply(D,$)).next())});(function(D,$){typeof exports=="object"&&typeof module!="undefined"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(D=typeof globalThis!="undefined"?globalThis:D||self,$(D.modelDrivenEngine={}))})(this,function(D){"use strict";var $=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},P={exports:{}};(function(t){var e=function(n){var r=Object.prototype,u=r.hasOwnProperty,a,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function d(g,h,E){return Object.defineProperty(g,h,{value:E,enumerable:!0,configurable:!0,writable:!0}),g[h]}try{d({},"")}catch(g){d=function(h,E,S){return h[E]=S}}function p(g,h,E,S){var B=h&&h.prototype instanceof A?h:A,N=Object.create(B.prototype),U=new nn(S||[]);return N._invoke=tn(g,E,U),N}n.wrap=p;function y(g,h,E){try{return{type:"normal",arg:g.call(h,E)}}catch(S){return{type:"throw",arg:S}}}var v="suspendedStart",C="suspendedYield",m="executing",w="completed",f={};function A(){}function O(){}function b(){}var M={};d(M,s,function(){return this});var q=Object.getPrototypeOf,R=q&&q(q(rn([])));R&&R!==r&&u.call(R,s)&&(M=R);var T=b.prototype=A.prototype=Object.create(M);O.prototype=b,d(T,"constructor",b),d(b,"constructor",O),O.displayName=d(b,l,"GeneratorFunction");function je(g){["next","throw","return"].forEach(function(h){d(g,h,function(E){return this._invoke(h,E)})})}n.isGeneratorFunction=function(g){var h=typeof g=="function"&&g.constructor;return h?h===O||(h.displayName||h.name)==="GeneratorFunction":!1},n.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,b):(g.__proto__=b,d(g,l,"GeneratorFunction")),g.prototype=Object.create(T),g},n.awrap=function(g){return{__await:g}};function Z(g,h){function E(N,U,k,K){var H=y(g[N],g,U);if(H.type==="throw")K(H.arg);else{var un=H.arg,Ve=un.value;return Ve&&typeof Ve=="object"&&u.call(Ve,"__await")?h.resolve(Ve.__await).then(function(ve){E("next",ve,k,K)},function(ve){E("throw",ve,k,K)}):h.resolve(Ve).then(function(ve){un.value=ve,k(un)},function(ve){return E("throw",ve,k,K)})}}var S;function B(N,U){function k(){return new h(function(K,H){E(N,U,K,H)})}return S=S?S.then(k,k):k()}this._invoke=B}je(Z.prototype),d(Z.prototype,c,function(){return this}),n.AsyncIterator=Z,n.async=function(g,h,E,S,B){B===void 0&&(B=Promise);var N=new Z(p(g,h,E,S),B);return n.isGeneratorFunction(h)?N:N.next().then(function(U){return U.done?U.value:N.next()})};function tn(g,h,E){var S=v;return function(N,U){if(S===m)throw new Error("Generator is already running");if(S===w){if(N==="throw")throw U;return cr()}for(E.method=N,E.arg=U;;){var k=E.delegate;if(k){var K=xe(k,E);if(K){if(K===f)continue;return K}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(S===v)throw S=w,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);S=m;var H=y(g,h,E);if(H.type==="normal"){if(S=E.done?w:C,H.arg===f)continue;return{value:H.arg,done:E.done}}else H.type==="throw"&&(S=w,E.method="throw",E.arg=H.arg)}}}function xe(g,h){var E=g.iterator[h.method];if(E===a){if(h.delegate=null,h.method==="throw"){if(g.iterator.return&&(h.method="return",h.arg=a,xe(g,h),h.method==="throw"))return f;h.method="throw",h.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var S=y(E,g.iterator,h.arg);if(S.type==="throw")return h.method="throw",h.arg=S.arg,h.delegate=null,f;var B=S.arg;if(!B)return h.method="throw",h.arg=new TypeError("iterator result is not an object"),h.delegate=null,f;if(B.done)h[g.resultName]=B.value,h.next=g.nextLoc,h.method!=="return"&&(h.method="next",h.arg=a);else return B;return h.delegate=null,f}je(T),d(T,l,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"});function Te(g){var h={tryLoc:g[0]};1 in g&&(h.catchLoc=g[1]),2 in g&&(h.finallyLoc=g[2],h.afterLoc=g[3]),this.tryEntries.push(h)}function ue(g){var h=g.completion||{};h.type="normal",delete h.arg,g.completion=h}function nn(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(Te,this),this.reset(!0)}n.keys=function(g){var h=[];for(var E in g)h.push(E);return h.reverse(),function S(){for(;h.length;){var B=h.pop();if(B in g)return S.value=B,S.done=!1,S}return S.done=!0,S}};function rn(g){if(g){var h=g[s];if(h)return h.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var E=-1,S=function B(){for(;++E<g.length;)if(u.call(g,E))return B.value=g[E],B.done=!1,B;return B.value=a,B.done=!0,B};return S.next=S}}return{next:cr}}n.values=rn;function cr(){return{value:a,done:!0}}return nn.prototype={constructor:nn,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(ue),!g)for(var h in this)h.charAt(0)==="t"&&u.call(this,h)&&!isNaN(+h.slice(1))&&(this[h]=a)},stop:function(){this.done=!0;var g=this.tryEntries[0],h=g.completion;if(h.type==="throw")throw h.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var h=this;function E(K,H){return N.type="throw",N.arg=g,h.next=K,H&&(h.method="next",h.arg=a),!!H}for(var S=this.tryEntries.length-1;S>=0;--S){var B=this.tryEntries[S],N=B.completion;if(B.tryLoc==="root")return E("end");if(B.tryLoc<=this.prev){var U=u.call(B,"catchLoc"),k=u.call(B,"finallyLoc");if(U&&k){if(this.prev<B.catchLoc)return E(B.catchLoc,!0);if(this.prev<B.finallyLoc)return E(B.finallyLoc)}else if(U){if(this.prev<B.catchLoc)return E(B.catchLoc,!0)}else if(k){if(this.prev<B.finallyLoc)return E(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(g,h){for(var E=this.tryEntries.length-1;E>=0;--E){var S=this.tryEntries[E];if(S.tryLoc<=this.prev&&u.call(S,"finallyLoc")&&this.prev<S.finallyLoc){var B=S;break}}B&&(g==="break"||g==="continue")&&B.tryLoc<=h&&h<=B.finallyLoc&&(B=null);var N=B?B.completion:{};return N.type=g,N.arg=h,B?(this.method="next",this.next=B.finallyLoc,f):this.complete(N)},complete:function(g,h){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&h&&(this.next=h),f},finish:function(g){for(var h=this.tryEntries.length-1;h>=0;--h){var E=this.tryEntries[h];if(E.finallyLoc===g)return this.complete(E.completion,E.afterLoc),ue(E),f}},catch:function(g){for(var h=this.tryEntries.length-1;h>=0;--h){var E=this.tryEntries[h];if(E.tryLoc===g){var S=E.completion;if(S.type==="throw"){var B=S.arg;ue(E)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(g,h,E){return this.delegate={iterator:rn(g),resultName:h,nextLoc:E},this.method==="next"&&(this.arg=a),f}},n}(t.exports);try{regeneratorRuntime=e}catch(n){typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(P);var Y=P.exports,qe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",lt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",ft="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",we="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",oe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Se="{caption}\u5FC5\u586B",hr="\u8BF7\u8F93\u5165\u6807\u9898",pr="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",gr="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",yr="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",vr="\u8BF7\u7ED1\u5B9A\u8868\u5355",mr="\u8BF7\u7ED1\u5B9A\u5217\u8868",Er="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",br="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Ar="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Cr="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Br="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",wr="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Sr="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Fr="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",_r="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E{min}\u4E14\u5C0F\u4E8E{max}\u7684\u503C",Dr="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Ir="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Rr="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Mr="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",$r="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Or="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Pr="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Lr="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Nr="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",jr="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",xr="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",Tr="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Vr="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",qr="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Ur="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",kr="\u8BF7\u9009\u62E9\u7701",Hr="\u8BF7\u9009\u62E9\u5E02",Wr="\u8BF7\u9009\u62E9\u533A",zr="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Gr="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",Kr="\u8BF7\u8F93\u5165\u5217\u5BBD",Jr="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Xr="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Qr="\u8BF7\u9009\u62E9\u63A7\u4EF6",Zr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Yr="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",ei="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ti="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",ni="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ri="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ii="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ui="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",ai="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",oi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",si="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ci="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",li="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",fi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",di="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",hi="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",pi="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",gi="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",yi="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",vi={isNotNumber:qe,isNotString:lt,isNotObject:ft,isNotArray:we,isNotBoolean:oe,runtimeRequired:Se,pleaseEnterCaption:hr,pleaseEnterCaptionTip:pr,pleaseEnterPlaceholder:gr,pleaseEnterFieldCode:yr,pleaseEnterForm:vr,pleaseEnterList:mr,pleaseEnterProcess:Er,pleaseEnterLabel:br,pleaseEnterValue:Ar,bizKeyNotBindFiled:Cr,pleaseEnterNumberRange:Br,pleaseEnterAValueGreaterThanMin:wr,pleaseEnterAValueLessThanMax:Sr,numberRangeSetError:Fr,stringRangeError:_r,attachmentMaxSize:Dr,pleaseEnterTotalScoreSetting:Ir,theTotalScoreMustNotBeLessThan1:Rr,scoreDefaultValueRange:Mr,attachmentLimitError:$r,PleaseReselectTheOptionalQuantity:Or,TheMaximumLengthIsGreaterThanTheMinimumLength:Pr,TheMinimumLengthIsGreaterThanTheMaximumLength:Lr,PleaseSelectTheCorrectOptionSettings:Nr,optionIdIsRepeat:jr,optionIsRequired:xr,pleaseEnterDataCode:Tr,pleaseEnterValueFieldCode:Vr,pleaseEnterSvcCode:qr,pleaseBindAtLeastOneDisplayValue:Ur,pleaseSelectProvince:kr,pleaseSelectCity:Hr,pleaseSelectDistrict:Wr,limitRowsCannotBeLessThan0:zr,TheNumberOfRowsCannotBeLessThanMinRows:Gr,pleaseEnterColumnWidth:Kr,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Jr,pleaseCompleteAllRulesAndConditions:Xr,pleaseSelectControl:Qr,pleaseSelectAtLeastOneColumn:Zr,pleaseSelectFillBackMode:Yr,pleaseSelectDashboard:ei,rootNodeIsRequired:ti,theViewNameCannotBeEmpty:ni,pleaseSelectOcrType:ri,pleaseSelectAtLeastOneFieldToFillIn:ii,pleaseChooseAtLeastOne:ui,pleaseEnterButtonContent:ai,pleaseEnterDataCodeInDataSetting:oi,pleaseEnterValueFieldCodeInDataSetting:si,pleaseEnterSvcCodeInDataSetting:ci,pleaseBindAtLeastOneDisplayValueInDataSetting:li,rootNodeIsRequiredInDataSetting:fi,pleaseEnterMaxHeight:di,pleaseEnter:hi,pleaseEnterWatermark:pi,pleaseEnterFileName:gi,pleaseUploadAtLeastOnePrintTemplate:yi},mi="Please enter a number",Ei="Please enter a string",bi="Please enter an object",Ai="Please enter an array",Ci="Please enter a boolean",Bi="{caption} Required",wi="Please enter the title",Si="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Fi="Please enter the prompt text",_i="Please bind data items",Di="Please bind the form",Ii="Please bind the list",Ri="Please bind the process",Mi="Please enter the displayed value",$i="Please enter the stored value",Oi="The document number is not bound to the data item",Pi="Please enter a value greater than or equal to {min} and less than or equal to {max}",Li="Please enter a value greater than or equal to {min}",Ni="Please enter a value less than or equal to {max}",ji="The value range is set incorrectly",xi="Please enter a value longer than {min} and less than {max}",Ti="The attachment size must be between 0MB and 1000MB",Vi="Please fill in the total score setting",qi="The total score cannot be less than 1",Ui="The default value must be between {min} and {max}",ki="The number of attachments uploaded must be between {min} and {max}",Hi="Please re-select the optional quantity",Wi="The maximum length of the control must be greater than the minimum length",zi="The minimum length of the control must be less than the maximum length",Gi="Please select the correct option setting",Ki="Option ID cannot be repeated",Ji="Please enter at least one option",Xi="Please bind the data source",Qi="Please bind the stored value",Zi="Please bind the service",Yi="At least one display value must be bound",eu="Please select a province",tu="Please select a city",nu="Please select a district",ru="The minimum number of lines to fill in cannot be less than 0",iu="The number of rows cannot be less than {min} rows",uu="Please enter the column width",au="Please set the logical relationship of all rule conditions",ou="Please complete all rules and conditions",su="please select control",cu="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",lu="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",fu="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",du="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",hu="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",pu="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",gu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",yu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",vu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",mu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Eu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",bu="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Au="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Cu="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Bu="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",wu="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Su={isNotNumber:mi,isNotString:Ei,isNotObject:bi,isNotArray:Ai,isNotBoolean:Ci,runtimeRequired:Bi,pleaseEnterCaption:wi,pleaseEnterCaptionTip:Si,pleaseEnterPlaceholder:Fi,pleaseEnterFieldCode:_i,pleaseEnterForm:Di,pleaseEnterList:Ii,pleaseEnterProcess:Ri,pleaseEnterLabel:Mi,pleaseEnterValue:$i,bizKeyNotBindFiled:Oi,pleaseEnterNumberRange:Pi,pleaseEnterAValueGreaterThanMin:Li,pleaseEnterAValueLessThanMax:Ni,numberRangeSetError:ji,stringRangeError:xi,attachmentMaxSize:Ti,pleaseEnterTotalScoreSetting:Vi,theTotalScoreMustNotBeLessThan1:qi,scoreDefaultValueRange:Ui,attachmentLimitError:ki,PleaseReselectTheOptionalQuantity:Hi,TheMaximumLengthIsGreaterThanTheMinimumLength:Wi,TheMinimumLengthIsGreaterThanTheMaximumLength:zi,PleaseSelectTheCorrectOptionSettings:Gi,optionIdIsRepeat:Ki,optionIsRequired:Ji,pleaseEnterDataCode:Xi,pleaseEnterValueFieldCode:Qi,pleaseEnterSvcCode:Zi,pleaseBindAtLeastOneDisplayValue:Yi,pleaseSelectProvince:eu,pleaseSelectCity:tu,pleaseSelectDistrict:nu,limitRowsCannotBeLessThan0:ru,TheNumberOfRowsCannotBeLessThanMinRows:iu,pleaseEnterColumnWidth:uu,pleaseSetTheLogicalRelationshipOfAllRuleConditions:au,pleaseCompleteAllRulesAndConditions:ou,pleaseSelectControl:su,pleaseSelectDashboard:cu,theViewNameCannotBeEmpty:lu,pleaseSelectOcrType:fu,pleaseSelectAtLeastOneFieldToFillIn:du,pleaseChooseAtLeastOne:hu,pleaseEnterButtonContent:pu,pleaseEnterDataCodeInDataSetting:gu,pleaseEnterValueFieldCodeInDataSetting:yu,pleaseEnterSvcCodeInDataSetting:vu,pleaseBindAtLeastOneDisplayValueInDataSetting:mu,rootNodeIsRequiredInDataSetting:Eu,pleaseEnterMaxHeight:bu,pleaseEnter:Au,pleaseEnterWatermark:Cu,pleaseEnterFileName:Bu,pleaseUploadAtLeastOnePrintTemplate:wu},Fu="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",_u="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Du="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Iu="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ru="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Mu="{caption}\u5FC5\u9808",$u="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ou="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Pu="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Lu="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Nu="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ju="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",xu="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Tu="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Vu="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",qu="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Uu="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",ku="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Hu="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Wu="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",zu="\u6587\u5B57\u6570{min}\u3088\u308A\u5927\u304D\u304F\u3001{max}\u3088\u308A\u5C0F\u3055\u3044\u6570\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Gu="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ku="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ju="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Xu="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Qu="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Zu="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Yu="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5927\u5024\u306F\u6700\u5C0F\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",ea="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u5024\u306F\u6700\u5927\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",ta="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",na="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",ra="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",ia="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ua="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",aa="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",oa="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",sa="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ca="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",la="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",fa="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",da="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",ha="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",pa="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",ga="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",ya="please select control",va="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ma="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ea="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ba="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Aa="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Ca="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Ba="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",wa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Sa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Fa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",_a="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Da="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Ia="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Ra="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Ma="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",$a="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Oa={isNotNumber:Fu,isNotString:_u,isNotObject:Du,isNotArray:Iu,isNotBoolean:Ru,runtimeRequired:Mu,pleaseEnterCaption:$u,pleaseEnterCaptionTip:Ou,pleaseEnterPlaceholder:Pu,pleaseEnterFieldCode:Lu,pleaseEnterForm:Nu,pleaseEnterList:ju,pleaseEnterProcess:xu,pleaseEnterLabel:Tu,pleaseEnterValue:Vu,bizKeyNotBindFiled:qu,pleaseEnterNumberRange:Uu,pleaseEnterAValueGreaterThanMin:ku,pleaseEnterAValueLessThanMax:Hu,numberRangeSetError:Wu,stringRangeError:zu,attachmentMaxSize:Gu,pleaseEnterTotalScoreSetting:Ku,theTotalScoreMustNotBeLessThan1:Ju,scoreDefaultValueRange:Xu,attachmentLimitError:Qu,PleaseReselectTheOptionalQuantity:Zu,TheMaximumLengthIsGreaterThanTheMinimumLength:Yu,TheMinimumLengthIsGreaterThanTheMaximumLength:ea,PleaseSelectTheCorrectOptionSettings:ta,optionIdIsRepeat:na,optionIsRequired:ra,pleaseEnterDataCode:ia,pleaseEnterValueFieldCode:ua,pleaseEnterSvcCode:aa,pleaseBindAtLeastOneDisplayValue:oa,pleaseSelectProvince:sa,pleaseSelectCity:ca,pleaseSelectDistrict:la,limitRowsCannotBeLessThan0:fa,TheNumberOfRowsCannotBeLessThanMinRows:da,pleaseEnterColumnWidth:ha,pleaseSetTheLogicalRelationshipOfAllRuleConditions:pa,pleaseCompleteAllRulesAndConditions:ga,pleaseSelectControl:ya,pleaseSelectDashboard:va,theViewNameCannotBeEmpty:ma,pleaseSelectOcrType:Ea,pleaseSelectAtLeastOneFieldToFillIn:ba,pleaseChooseAtLeastOne:Aa,pleaseEnterButtonContent:Ca,pleaseEnterDataCodeInDataSetting:Ba,pleaseEnterValueFieldCodeInDataSetting:wa,pleaseEnterSvcCodeInDataSetting:Sa,pleaseBindAtLeastOneDisplayValueInDataSetting:Fa,rootNodeIsRequiredInDataSetting:_a,pleaseEnterMaxHeight:Da,pleaseEnter:Ia,pleaseEnterWatermark:Ra,pleaseEnterFileName:Ma,pleaseUploadAtLeastOnePrintTemplate:$a},Pa={zhCN:vi,enUS:Su,jaJP:Oa},J;(function(t){t.Number="Number",t.Operator="Operator",t.VariableInMainTable="VariableInMainTable",t.VariableInCurrentSubTable="VariableInCurrentSubTable",t.VariableInOtherSubTable="VariableInOtherSubTable",t.UndefinedVariable="UndefinedVariable"})(J||(J={}));var me;(function(t){t.SUM="SUM",t.AVG="AVG",t.MAX="MAX",t.MIN="MIN"})(me||(me={}));var on="zh-CN";function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ee;(function(t){t.BASE="base",t.FORM="form",t.LAYOUT="layout",t.WRAP="wrap",t.COLUMN="column",t.LIST="list",t.SEARCH="search"})(ee||(ee={}));var I;(function(t){t.TITLE="title",t.LINK="link",t.BUTTON="button",t.DIVIDER="divider",t.TEXT="text",t.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",t.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",t.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",t.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",t.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",t.EXPORT_LIST_BUTTON="list-page-btn-export-list",t.LIST_SELECT_BUTTON="list-select-button",t.FORM_SELECT_BUTTON="form-select-button",t.LIST_VIEW_SELECT="list-view-select",t.TEXT_OCR_BUTTON="text-ocr-button",t.INVOICE_CHECK_BUTTON="invoice-check-button",t.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",t.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",t.VARCHAR_COLUMN="varchar-column",t.TEXT_COLUMN="text-column",t.DECIMAL_COLUMN="decimal-column",t.TIMESCOPE_COLUMN="timescope-column",t.TIMESTAMP_COLUMN="timestamp-column",t.ARRAY_COLUMN="array-column",t.DEPARTMENT_COLUMN="department-column",t.AUTO_NUMBER_COLUMN="auto-number-column",t.FILE_COLUMN="file-column",t.IMAGE_COLUMN="image-column",t.PEOPLE_COLUMN="people-column",t.LOCATION_COLUMN="location-column",t.CUSTOM_COLUMN="custom-column",t.ORDER_COLUMN="order-column",t.OPERATION_COLUMN="operation-column",t.EMPLOYEE_COLUMN="employee-column",t.ADDRESS="address",t.AMOUNT="amount",t.ATTACHMENT="attachment",t.AUTO_NUMBER="auto-number",t.CALC="calc",t.CHECKBOX="checkbox",t.DATE_PICKER="date-picker",t.DATE_RANGE="date-range",t.DEPARTMENT="department",t.EMPLOYEE="employee",t.IMAGE="image",t.INPUT="input",t.NUMBER="number",t.RADIO="radio",t.RICH_TEXT="rich-text",t.SCORE="score",t.SEARCH_DATE_RANGE="search-date-range",t.SEARCH_NUMBER_RANGE="search-number-range",t.SEARCH_INPUT="search-input",t.SELECT="select",t.SELECT_MULTIPLE="select-multiple",t.SELECT_RELATION="select-relation",t.VUE_FORM_ITEM="vue-form-item",t.TEXTAREA="textarea",t.EMAIL="email",t.FOOTER="footer",t.HEADER="header",t.ID_CARD="id-card",t.MOBILE="mobile",t.PHONE="phone",t.RADIO_IMAGE="radio-image",t.ELECTRONIC_SIGNATURE="electronic-signature",t.WPS="wps",t.CARD_GROUP="card-group",t.COL="col",t.GRID="grid",t.GRID_ROW="grid-row",t.GRID_TABLE_COLUMN="grid-table-column",t.ROW="row",t.TWO_COLUMNS="two-columns",t.SUBTABLE_COLUMN="subtable-column",t.SUBTABLE_ROW="subtable-row",t.TAB="tab",t.TAB_PANE="tab-pane",t.TOOLBOX="toolbox",t.DATA_VIEW="data-view",t.LIST_VIEW="list-view",t.SUBTABLE="subtable",t.GRID_TABLE="grid-table",t.SIMPLE_SEARCH="simple-search",t.PAGINATION="pagination",t.CHECKBOX_IMAGE="checkbox-image",t.DASHBOARD="dashboard",t.TREE="tree",t.EMPLOYEE2="employee2"})(I||(I={}));var _;(function(t){t.VARCHAR="varchar",t.TEXT="text",t.ARRAY="array",t.ADDRESS="location",t.DECIMAL="decimal",t.DECIMAL_RANGE="decimal_range",t.TIMESTAMP="timestamp",t.EMPLOYEES="people",t.DEPARTMENTS="department",t.MONEY="money",t.TIMESCOPE="timescope",t.FILE="file",t.IMAGE="image",t.AUTO_NUMBER="auto_number",t.CALC="calc",t.RELATION="relation",t.LIST="list",t.RELATION_FIELD="relation-field",t.REFERENCE_FIELD="reference-field",t.CALC_FIELD="calc",t.JSON="json",t.BIGINT="bigint",t.ANY="ANY",t.ENCRYPTED_FIELD="encrypted_field"})(_||(_={}));var V;V={},W(V,_.ARRAY,I.ARRAY_COLUMN),W(V,_.AUTO_NUMBER,I.AUTO_NUMBER_COLUMN),W(V,_.DECIMAL,I.DECIMAL_COLUMN),W(V,_.DEPARTMENTS,I.DEPARTMENT_COLUMN),W(V,_.FILE,I.FILE_COLUMN),W(V,_.IMAGE,I.IMAGE_COLUMN),W(V,_.ADDRESS,I.LOCATION_COLUMN),W(V,_.EMPLOYEES,I.EMPLOYEE_COLUMN),W(V,_.TEXT,I.TEXT_COLUMN),W(V,_.TIMESCOPE,I.TIMESCOPE_COLUMN),W(V,_.TIMESTAMP,I.TIMESTAMP_COLUMN),W(V,_.VARCHAR,I.VARCHAR_COLUMN),W(V,_.RELATION,I.VARCHAR_COLUMN);var sn;(function(t){t.YEAR="year",t.MONTH="month",t.DATE="date",t.DATETIME="datetime"})(sn||(sn={}));var cn="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",La=cn+"0123456789";function dt(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,e="",n=0;n<t;n++){var r=n===0?cn:La,u=Math.random()*r.length;e+=r[parseInt(String(u),10)]}return e}function ht(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Na(t){if(Array.isArray(t))return ht(t)}function ja(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Ue(t,e,n){return xa()?Ue=Reflect.construct:Ue=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&_e(l,o.prototype),l},Ue.apply(null,arguments)}function Fe(t){return Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fe(t)}function fn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_e(t,e)}function Ta(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Va(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function qa(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ua(t,e){return e&&(ka(e)==="object"||typeof e=="function")?e:ja(t)}function _e(t,e){return _e=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},_e(t,e)}function dn(t){return Na(t)||Va(t)||Ha(t)||qa()}var ka=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ha(t,e){if(!!t){if(typeof t=="string")return ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ht(t,e)}}function pt(t){var e=typeof Map=="function"?new Map:void 0;return pt=function(r){if(r===null||!Ta(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,u)}function u(){return Ue(r,arguments,Fe(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),_e(u,r)},pt(t)}function Wa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function hn(t){var e=Wa();return function(){var r=Fe(t),u;if(e){var a=Fe(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return Ua(this,u)}}var gt=console;function ce(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,u=e.slice(1);(r=gt).warn.apply(r,["\u{1F9D0} Driven Warning:"+e[0]].concat(dn(u)))}function yt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,u=e.slice(1);(r=gt).log.apply(r,["\u{1F680} Driven Log:"+e[0]].concat(dn(u)))}function za(t){return t+" \u{1F41B}\u{1F41B}\u{1F41B}"}var vt=function(t){fn(n,t);var e=hn(n);function n(r){ln(this,n);var u;return u=e.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?za(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(pt(Error)),Ga=function(t){fn(n,t);var e=hn(n);function n(r){ln(this,n);var u;return u=e.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(vt);function se(t){throw new vt(t)}function pn(t){throw new Ga(t)}function ke(t){gt.error(new vt(t))}function pe(t,e){Array.isArray(t)&&t.map(function(n){switch(n.controlType){case"layout":pe(n==null?void 0:n.children,e);break;case"search":pe(n==null?void 0:n.children,e);break;case"form":e(n)}})}var Ka=Object.prototype.toString;function gn(t,e){return Ka.call(t)==="[object "+e+"]"}function Ja(t){return gn(t,"String")}function Xa(t){return gn(t,"Promise")}var Qa=function(){function t(e){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=e.messages)!==null&&n!==void 0?n:this.getPreImport(e.locale))!==null&&r!==void 0?r:{}),e.variableRegExp&&(this.variableRegExp=e.variableRegExp),this.setLocale(e.locale)}return t.prototype.setLocale=function(e){var n=this;this.locale=e,this._messageCache.clear();var r=this.getMessageData();Xa(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},t.prototype.getMessageData=function(){var e=this._messages[this.localeInMessageKey];return typeof e=="function"?e():e},t.prototype.translate=function(e,n,r){var u=this.getMessage(e);return u?this.formatMessage(u,r):this.formatMessage(n,r)},t.prototype.getMessage=function(e){if(this._messageCache.has(e))return this._messageCache.get(e);var n=this.getPathArray(e),r=n.reduce(function(u,a,o,s){if(u!==void 0){var c=u[a];if(!(o===s.length-1&&!Ja(c)))return c}},this.message);return this._messageCache.set(e,r),r},t.prototype.formatMessage=function(e,n){return n?e.replace(this.variableRegExp,function(r,u){var a=n[u];return a!==void 0?String(a):r}):e},t.prototype.getPreImport=function(e){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(e);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},t.prototype.getPathArray=function(e){return e.split(".")},t.prototype.getLocaleInMessageKey=function(e){return e.replace(/-/g,"")},Object.defineProperty(t.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var e;return(e=this.messages[this.localeInMessageKey])!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t}();function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var X=function(){function t(){Za(this,t)}return t.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},t.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:on;return new Qa({locale:n,messages:Pa})},t.setLocale=function(n){return this.$i18n.setLocale(n)},t}();X.$i18n=X.resetI18n();function yn(t,e,n){var r=e.replace(/\[(\d)]/g,function(a,o){return"."+o}).split("."),u=!1;return r.reduce(function(a,o,s,c){var l=a;if(!!a){if(!Object.prototype.hasOwnProperty.call(a,o)){ce("Can not set ".concat(e,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),a,a);return}return s===c.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},t),u}var mt={exports:{}};(function(t){(function(e){var n=function(f,A,O){if(!l(A)||p(A)||y(A)||v(A)||c(A))return A;var b,M=0,q=0;if(d(A))for(b=[],q=A.length;M<q;M++)b.push(n(f,A[M],O));else{b={};for(var R in A)Object.prototype.hasOwnProperty.call(A,R)&&(b[f(R,O)]=n(f,A[R],O))}return b},r=function(f,A){A=A||{};var O=A.separator||"_",b=A.split||/(?=[A-Z])/;return f.split(b).join(O)},u=function(f){return C(f)?f:(f=f.replace(/[\-_\s]+(.)?/g,function(A,O){return O?O.toUpperCase():""}),f.substr(0,1).toLowerCase()+f.substr(1))},a=function(f){var A=u(f);return A.substr(0,1).toUpperCase()+A.substr(1)},o=function(f,A){return r(f,A).toLowerCase()},s=Object.prototype.toString,c=function(f){return typeof f=="function"},l=function(f){return f===Object(f)},d=function(f){return s.call(f)=="[object Array]"},p=function(f){return s.call(f)=="[object Date]"},y=function(f){return s.call(f)=="[object RegExp]"},v=function(f){return s.call(f)=="[object Boolean]"},C=function(f){return f=f-0,f===f},m=function(f,A){var O=A&&"process"in A?A.process:A;return typeof O!="function"?f:function(b,M){return O(b,f,M)}},w={camelize:u,decamelize:o,pascalize:a,depascalize:o,camelizeKeys:function(f,A){return n(m(u,A),f)},decamelizeKeys:function(f,A){return n(m(o,A),f,A)},pascalizeKeys:function(f,A){return n(m(a,A),f)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};t.exports?t.exports=w:e.humps=w})($)})(mt);function L(t){if(t!==void 0)return typeof t=="object"?JSON.parse(JSON.stringify(t)):t}function te(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ya(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}function Ee(t){return Array.isArray(t)}function z(t){return typeof t=="string"}function He(t){return typeof t=="number"}function vn(t){return typeof t=="function"}function eo(t){return Ee(t)&&t.every(function(e){return z(e)})}function to(t){return Ee(t)&&t.every(function(e){return He(e)||e===""})}function mn(t){return/^\[.*?]$/.test(t)}function We(t){return/^{.*?}$/.test(t)}function Et(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function no(t){if(Array.isArray(t))return Et(t)}function En(t,e,n,r,u,a,o){try{var s=t[a](o),c=s.value}catch(l){n(l);return}s.done?e(c):Promise.resolve(c).then(r,u)}function ro(t){return function(){var e=this,n=arguments;return new Promise(function(r,u){var a=t.apply(e,n);function o(c){En(a,r,u,o,s,"next",c)}function s(c){En(a,r,u,o,s,"throw",c)}o(void 0)})}}function io(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uo(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ao(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bt(t){return no(t)||uo(t)||oo(t)||ao()}function oo(t,e){if(!!t){if(typeof t=="string")return Et(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Et(t,e)}}var bn=function(){function t(){io(this,t),this._events=new Map,this.debug=!1}var e=t.prototype;return e.emit=function(r){for(var u=arguments.length,a=new Array(u>1?u-1:0),o=1;o<u;o++)a[o-1]=arguments[o];var s=this;return ro(Y.mark(function c(){var l,d,p,y,v,C,m,w,f,A;return Y.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(l=s._events.get(r),d=[],!l){b.next=42;break}p=l.slice(),y=!0,v=!1,C=void 0,b.prev=5,m=p[Symbol.iterator]();case 7:if(y=(w=m.next()).done){b.next=28;break}if(f=w.value,l.includes(f)){b.next=11;break}return b.abrupt("continue",25);case 11:return b.prev=11,s.debug&&yt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(f.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+f.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(a.map(function(){return"%o"}).join(","),"\u3002")].concat(bt(a))),b.next=15,f.apply(null,bt(a));case 15:if(A=b.sent,s.debug&&yt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(f.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+f.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(a.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(bt(a),[A])),d.push(A),A!==!1){b.next=20;break}return b.abrupt("break",28);case 20:b.next=25;break;case 22:b.prev=22,b.t0=b.catch(11),ke(String(b.t0));case 25:y=!0,b.next=7;break;case 28:b.next=34;break;case 30:b.prev=30,b.t1=b.catch(5),v=!0,C=b.t1;case 34:b.prev=34,b.prev=35,!y&&m.return!=null&&m.return();case 37:if(b.prev=37,!v){b.next=40;break}throw C;case 40:return b.finish(37);case 41:return b.finish(34);case 42:return b.abrupt("return",d);case 43:case"end":return b.stop()}},c,null,[[5,30,34,42],[11,22],[35,,37,41]])}))()},e.on=function(r,u){if(this._events.has(r)){var a;(a=this._events.get(r))===null||a===void 0||a.push(u)}else this._events.set(r,[u])},e.off=function(r,u){if(this._events.has(r)){var a=this._events.get(r),o=a==null?void 0:a.indexOf(u);a==null||a.splice(o,1)}},e.delete=function(r){this._events.has(r)&&this._events.delete(r)},e.clear=function(){this._events=new Map},t}();function so(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var co=[{key:"on_click",name:"\u70B9\u51FB\u65F6",code:"click"},{key:"on_click_finish",name:"\u6267\u884C\u5B8C\u6210\u65F6",code:"click-finish"},{key:"on_change",name:"\u503C\u53D1\u751F\u53D8\u5316\u65F6",code:"change"},{key:"on_search",name:"\u641C\u7D22\u65F6",code:"search"},{key:"on_list_change",name:"\u5217\u8868\u6570\u636E\u53D8\u5316\u65F6",code:"list-change"},{key:"on_list_search",name:"\u5217\u8868\u6570\u636E\u67E5\u8BE2\u6784\u5EFA\u65F6",code:"list-search"},{key:"on_list_mounted",name:"\u5217\u8868\u6570\u636E\u8FD4\u56DE\u65F6",code:"list-mounted"},{key:"on_list_delete",name:"\u5217\u8868\u6570\u636E\u5220\u9664\u65F6",code:"list-delete"},{key:"on_input",name:"\u7528\u6237\u8F93\u5165\u65F6",code:"input"},{key:"on_blur",name:"\u5931\u53BB\u7126\u70B9\u65F6",code:"blur"},{key:"on_focus",name:"\u83B7\u53D6\u7126\u70B9\u65F6",code:"focus"},{key:"on_wps_open",name:"\u6253\u5F00\u6587\u4EF6\u65F6",code:"wps-open"},{key:"on_wps_save",name:"\u4FDD\u5B58\u6587\u4EF6\u65F6",code:"wps-save"},{key:"on_wps_rename",name:"\u91CD\u547D\u540D\u65F6",code:"wps-rename"},{key:"on_list_actions",name:"\u70B9\u51FB\u64CD\u4F5C\u6309\u94AE\u65F6",code:"list-actions"},{key:"on_list_rowclick",name:"\u884C\u70B9\u51FB\u65F6",code:"list-rowclick"},{key:"on_list_before_rowdelete",name:"\u884C\u5220\u9664\u524D",code:"list-before-rowdelete"},{key:"on_list_before_import",name:"\u5217\u8868\u6570\u636E\u5BFC\u5165\u524D",code:"list-before-import"}],An=function(){function t(){so(this,t)}var e=t.prototype;return e.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return t.events.filter(function(a){return u.includes(a.key)})},t}();An.events=co;function lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Cn=[],ze=function(){function t(n){lo(this,t),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var e=t.prototype;return e.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},e.getControlConfig=function(r){return this.controlConfigMap.get(r)},e.getControls=function(){return this._controls},e.register=function(r){r.__is_control__||se("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(a){return a.controlType===r.controlType});return u>-1&&(ce("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},e.isLayoutControl=function(r){return r.controlType===ee.LAYOUT},e.isFormControl=function(r){return r.controlType===ee.FORM},e.isListControl=function(r){return r.controlType===ee.LIST},e.isColumnControl=function(r){return r.controlType===ee.COLUMN},e.createControl=function(r,u){var a=this;if(Array.isArray(r))return r.map(function(d){return a.createControl(d,u)});r.children&&(r.children=r.children.map(function(d){return a.createControl(d,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(d){return a.createControl(d,u)}));var o=this.getControlFormType(r.type);if(o){var s=r;if(typeof u=="function"){var c=u(s);c&&(s=c)}var l=new o(s);return l}else se("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},e.createControlInstance=function(r,u){var a=this.getControlFormType(r);if(a)return new a(u)},e.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},e._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(a){u.register(a[r])})},t.register=function(r){var u=r.Designer,a=r.Runtime;(!u||!a||!u.__is_control__||!a.__is_control__)&&se("".concat(r," is can't register as a Control"));var o=this.staticControls.findIndex(function(s){return s.Designer.controlType===u.controlType});return o>-1&&(ce("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},t}();ze.staticControls=Cn,ze.staticRegisteredTypes=new Set(Cn.map(function(t){return t.Designer.controlType})),ze.staticRegisteredConfigs=new Map;function ge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var De=function t(e){ge(this,t);var n;this.dataCode=(n=e==null?void 0:e.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=e==null?void 0:e.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=e==null?void 0:e.fieldType)!==null&&u!==void 0?u:""},le=function t(){ge(this,t)},Ge=function t(e){ge(this,t);var n;this.amount=(n=e==null?void 0:e.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=e==null?void 0:e.currency)!==null&&r!==void 0?r:At.CNY},Ke=function t(e){ge(this,t);var n;this.min=(n=e==null?void 0:e.min)!==null&&n!==void 0?n:"";var r;this.max=(r=e==null?void 0:e.max)!==null&&r!==void 0?r:""},Je=function t(e){ge(this,t);var n;this.city=(n=e==null?void 0:e.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=e==null?void 0:e.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=e==null?void 0:e.district)!==null&&u!==void 0?u:"";var a;this.districtDisplay=(a=e==null?void 0:e.districtDisplay)!==null&&a!==void 0?a:"";var o;this.province=(o=e==null?void 0:e.province)!==null&&o!==void 0?o:"";var s;this.provinceDisplay=(s=e==null?void 0:e.provinceDisplay)!==null&&s!==void 0?s:""},Xe=function t(e){ge(this,t);var n;this.result=(n=e==null?void 0:e.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=e==null?void 0:e.unit)!==null&&r!==void 0?r:""},At;(function(t){t.CNY="CNY",t.USD="USD",t.JPY="JPY",t.EUR="EUR",t.INR="INR",t.IDR="IDR",t.BRL="BRL",t.AED="AED",t.AUD="AUD",t.CAD="CAD",t.EGP="EGP",t.GBP="GBP",t.ZAR="ZAR",t.KRW="KRW",t.MAD="MAD",t.MXN="MXN",t.MYR="MYR",t.PHP="PHP",t.PLN="PLN",t.RUB="RUB",t.SGD="SGD",t.THB="THB",t.TRY="TRY",t.TWD="TWD",t.VND="VND",t.HKD="HKD",t.IEP="IEP"})(At||(At={}));var Bn;(function(t){t.REQUIRED="required",t.IS_HIDE="isHide",t.IS_SHOW_UNIT="isShowUnit",t.IMD_SEARCH="immediatelySearch",t.MULTIPLE="multiple",t.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",t.CAPTION="caption",t.IS_HIDE_CAPTION="isHideCaption",t.DEFAULT_SHOW_OPTIONS="defaultShowOptions",t.CAN_SEARCH="canSearch",t.CAN_CHECK="canCheck",t.CAN_EDIT="canEdit",t.CAN_DELETE="canDelete",t.SHOW_UPPER_CASE="showUpperCase",t.MICROMETER="micrometer",t.PRECISION="precision",t.PERCENTAGE="percentage",t.OPTIONAL_LEVEL="optionalLevel",t.CONTAINS_SUB_NODE="containsSubNode",t.DEFAULT_COLLAPSE="defaultCollapse",t.CAN_VIEW_FORM="canViewForm",t.SERVER_PAGINATION="serverPagination",t.IS_SHOW_CAPTION_TIP="isShowCaptionTip",t.ENCRYPTED="encrypted"})(Bn||(Bn={}));var Ct;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.READONLY=1]="READONLY",t[t.EDITABLE=2]="EDITABLE",t[t.PRINT=5]="PRINT"})(Ct||(Ct={}));var fo=function t(e){ge(this,t);var n;this.width=(n=e==null?void 0:e.width)!==null&&n!==void 0?n:"";var r;this.height=(r=e==null?void 0:e.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=e==null?void 0:e.widthConfig)!==null&&u!==void 0?u:"fill";var a;this.heightConfig=(a=e==null?void 0:e.heightConfig)!==null&&a!==void 0?a:"fill"};function ho(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function po(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Qe(t,e,n){return po()?Qe=Reflect.construct:Qe=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&Re(l,o.prototype),l},Qe.apply(null,arguments)}function Ie(t){return Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ie(t)}function go(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Re(t,e)}function yo(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function vo(t,e){return e&&(mo(e)==="object"||typeof e=="function")?e:ho(t)}function Re(t,e){return Re=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Re(t,e)}var mo=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function wt(t){var e=typeof Map=="function"?new Map:void 0;return wt=function(r){if(r===null||!yo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,u)}function u(){return Qe(r,arguments,Ie(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Re(u,r)},wt(t)}function Eo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function bo(t){var e=Eo();return function(){var r=Ie(t),u;if(e){var a=Ie(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return vo(this,u)}}var wn=function t(e){Bt(this,t),this.isHide={type:"boolean"}},Sn=function(t){go(n,t);var e=bo(n);function n(r){return Bt(this,n),e.call(this)}return n}(wt(Array)),ye=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Bt(this,t);var r;this.isHide=(r=e==null?void 0:e.isHide)!==null&&r!==void 0?r:!1,this.style=new fo(e==null?void 0:e.style);var u;this.caption=(u=e==null?void 0:e.caption)!==null&&u!==void 0?u:n};ye.Rules=wn,ye.RuntimeRules=Sn;function ne(){return ne=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ne.apply(this,arguments)}function Ao(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},St(t)}function Ze(t,e){return Ze=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ze(t,e)}function Co(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Ye(t,e,n){return Co()?Ye=Reflect.construct:Ye=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&Ze(l,o.prototype),l},Ye.apply(null,arguments)}function Bo(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ft(t){var e=typeof Map=="function"?new Map:void 0;return Ft=function(r){if(r===null||!Bo(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(r))return e.get(r);e.set(r,u)}function u(){return Ye(r,arguments,St(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ze(u,r)},Ft(t)}var wo=/%[sdj%]/g,Fn=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Fn=function(e,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function _t(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=1,u=e[0],a=e.length;if(typeof u=="function")return u.apply(null,e.slice(1));if(typeof u=="string"){var o=String(u).replace(wo,function(s){if(s==="%%")return"%";if(r>=a)return s;switch(s){case"%s":return String(e[r++]);case"%d":return Number(e[r++]);case"%j":try{return JSON.stringify(e[r++])}catch(c){return"[Circular]"}break;default:return s}});return o}return u}function So(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function j(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||So(e)&&typeof t=="string"&&!t)}function Fo(t,e,n){var r=[],u=0,a=t.length;function o(s){r.push.apply(r,s),u++,u===a&&n(r)}t.forEach(function(s){e(s,o)})}function _n(t,e,n){var r=0,u=t.length;function a(o){if(o&&o.length){n(o);return}var s=r;r=r+1,s<u?e(t[s],a):n([])}a([])}function _o(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n])}),e}var Dn=function(t){Ao(e,t);function e(n,r){var u;return u=t.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return e}(Ft(Error));function Do(t,e,n,r){if(e.first){var u=new Promise(function(p,y){var v=function(w){return r(w),w.length?y(new Dn(w,_t(w))):p()},C=_o(t);_n(C,n,v)});return u.catch(function(p){return p}),u}var a=e.firstFields||[];a===!0&&(a=Object.keys(t));var o=Object.keys(t),s=o.length,c=0,l=[],d=new Promise(function(p,y){var v=function(m){if(l.push.apply(l,m),c++,c===s)return r(l),l.length?y(new Dn(l,_t(l))):p()};o.length||(r(l),p()),o.forEach(function(C){var m=t[C];a.indexOf(C)!==-1?_n(m,n,v):Fo(m,n,v)})});return d.catch(function(p){return p}),d}function In(t){return function(e){return e&&e.message?(e.field=e.field||t.fullField,e):{message:typeof e=="function"?e():e,field:e.field||t.fullField}}}function Rn(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];typeof r=="object"&&typeof t[n]=="object"?t[n]=ne(ne({},t[n]),r):t[n]=r}}return t}function Mn(t,e,n,r,u,a){t.required&&(!n.hasOwnProperty(t.field)||j(e,a||t.type))&&r.push(G(u.messages.required,t.fullField))}function Io(t,e,n,r,u){(/^\s+$/.test(e)||e==="")&&r.push(G(u.messages.whitespace,t.fullField))}var Dt={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Me={integer:function(e){return Me.number(e)&&parseInt(e,10)===e},float:function(e){return Me.number(e)&&!Me.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(n){return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!Me.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&!!e.match(Dt.email)&&e.length<255},url:function(e){return typeof e=="string"&&!!e.match(Dt.url)},hex:function(e){return typeof e=="string"&&!!e.match(Dt.hex)}};function Ro(t,e,n,r,u){if(t.required&&e===void 0){Mn(t,e,n,r,u);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=t.type;a.indexOf(o)>-1?Me[o](e)||r.push(G(u.messages.types[o],t.fullField,t.type)):o&&typeof e!==t.type&&r.push(G(u.messages.types[o],t.fullField,t.type))}function Mo(t,e,n,r,u){var a=typeof t.len=="number",o=typeof t.min=="number",s=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=e,d=null,p=typeof e=="number",y=typeof e=="string",v=Array.isArray(e);if(p?d="number":y?d="string":v&&(d="array"),!d)return!1;v&&(l=e.length),y&&(l=e.replace(c,"_").length),a?l!==t.len&&r.push(G(u.messages[d].len,t.fullField,t.len)):o&&!s&&l<t.min?r.push(G(u.messages[d].min,t.fullField,t.min)):s&&!o&&l>t.max?r.push(G(u.messages[d].max,t.fullField,t.max)):o&&s&&(l<t.min||l>t.max)&&r.push(G(u.messages[d].range,t.fullField,t.min,t.max))}var be="enum";function $o(t,e,n,r,u){t[be]=Array.isArray(t[be])?t[be]:[],t[be].indexOf(e)===-1&&r.push(G(u.messages[be],t.fullField,t[be].join(", ")))}function Oo(t,e,n,r,u){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||r.push(G(u.messages.pattern.mismatch,t.fullField,e,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(e)||r.push(G(u.messages.pattern.mismatch,t.fullField,e,t.pattern))}}}var F={required:Mn,whitespace:Io,type:Ro,range:Mo,enum:$o,pattern:Oo};function Po(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e,"string")&&!t.required)return n();F.required(t,e,r,a,u,"string"),j(e,"string")||(F.type(t,e,r,a,u),F.range(t,e,r,a,u),F.pattern(t,e,r,a,u),t.whitespace===!0&&F.whitespace(t,e,r,a,u))}n(a)}function Lo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&F.type(t,e,r,a,u)}n(a)}function No(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(e===""&&(e=void 0),j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&(F.type(t,e,r,a,u),F.range(t,e,r,a,u))}n(a)}function jo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&F.type(t,e,r,a,u)}n(a)}function xo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),j(e)||F.type(t,e,r,a,u)}n(a)}function To(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&(F.type(t,e,r,a,u),F.range(t,e,r,a,u))}n(a)}function Vo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&(F.type(t,e,r,a,u),F.range(t,e,r,a,u))}n(a)}function qo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(e==null&&!t.required)return n();F.required(t,e,r,a,u,"array"),e!=null&&(F.type(t,e,r,a,u),F.range(t,e,r,a,u))}n(a)}function Uo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&F.type(t,e,r,a,u)}n(a)}var ko="enum";function Ho(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u),e!==void 0&&F[ko](t,e,r,a,u)}n(a)}function Wo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e,"string")&&!t.required)return n();F.required(t,e,r,a,u),j(e,"string")||F.pattern(t,e,r,a,u)}n(a)}function zo(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e,"date")&&!t.required)return n();if(F.required(t,e,r,a,u),!j(e,"date")){var s;e instanceof Date?s=e:s=new Date(e),F.type(t,s,r,a,u),s&&F.range(t,s.getTime(),r,a,u)}}n(a)}function Go(t,e,n,r,u){var a=[],o=Array.isArray(e)?"array":typeof e;F.required(t,e,r,a,u,o),n(a)}function It(t,e,n,r,u){var a=t.type,o=[],s=t.required||!t.required&&r.hasOwnProperty(t.field);if(s){if(j(e,a)&&!t.required)return n();F.required(t,e,r,o,u,a),j(e,a)||F.type(t,e,r,o,u)}n(o)}function Ko(t,e,n,r,u){var a=[],o=t.required||!t.required&&r.hasOwnProperty(t.field);if(o){if(j(e)&&!t.required)return n();F.required(t,e,r,a,u)}n(a)}var $e={string:Po,method:Lo,number:No,boolean:jo,regexp:xo,integer:To,float:Vo,array:qo,object:Uo,enum:Ho,pattern:Wo,date:zo,url:It,hex:It,email:It,required:Go,any:Ko};function Rt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Mt=Rt();function fe(t){this.rules=null,this._messages=Mt,this.define(t)}fe.prototype={messages:function(e){return e&&(this._messages=Rn(Rt(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if(typeof e!="object"||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in e)e.hasOwnProperty(n)&&(r=e[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(e,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var a=e,o=n,s=r;if(typeof o=="function"&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(),Promise.resolve();function c(m){var w,f=[],A={};function O(b){if(Array.isArray(b)){var M;f=(M=f).concat.apply(M,b)}else f.push(b)}for(w=0;w<m.length;w++)O(m[w]);f.length?A=_t(f):(f=null,A=null),s(f,A)}if(o.messages){var l=this.messages();l===Mt&&(l=Rt()),Rn(l,o.messages),o.messages=l}else o.messages=this.messages();var d,p,y={},v=o.keys||Object.keys(this.rules);v.forEach(function(m){d=u.rules[m],p=a[m],d.forEach(function(w){var f=w;typeof f.transform=="function"&&(a===e&&(a=ne({},a)),p=a[m]=f.transform(p)),typeof f=="function"?f={validator:f}:f=ne({},f),f.validator=u.getValidationMethod(f),f.field=m,f.fullField=f.fullField||m,f.type=u.getType(f),f.validator&&(y[m]=y[m]||[],y[m].push({rule:f,value:p,source:a,field:m}))})});var C={};return Do(y,o,function(m,w){var f=m.rule,A=(f.type==="object"||f.type==="array")&&(typeof f.fields=="object"||typeof f.defaultField=="object");A=A&&(f.required||!f.required&&m.value),f.field=m.field;function O(q,R){return ne(ne({},R),{},{fullField:f.fullField+"."+q})}function b(q){q===void 0&&(q=[]);var R=q;if(Array.isArray(R)||(R=[R]),!o.suppressWarning&&R.length&&fe.warning("async-validator:",R),R.length&&f.message!==void 0&&(R=[].concat(f.message)),R=R.map(In(f)),o.first&&R.length)return C[f.field]=1,w(R);if(!A)w(R);else{if(f.required&&!m.value)return f.message!==void 0?R=[].concat(f.message).map(In(f)):o.error&&(R=[o.error(f,G(o.messages.required,f.field))]),w(R);var T={};if(f.defaultField)for(var je in m.value)m.value.hasOwnProperty(je)&&(T[je]=f.defaultField);T=ne(ne({},T),m.rule.fields);for(var Z in T)if(T.hasOwnProperty(Z)){var tn=Array.isArray(T[Z])?T[Z]:[T[Z]];T[Z]=tn.map(O.bind(null,Z))}var xe=new fe(T);xe.messages(o.messages),m.rule.options&&(m.rule.options.messages=o.messages,m.rule.options.error=o.error),xe.validate(m.value,m.rule.options||o,function(Te){var ue=[];R&&R.length&&ue.push.apply(ue,R),Te&&Te.length&&ue.push.apply(ue,Te),w(ue.length?ue:null)})}}var M;f.asyncValidator?M=f.asyncValidator(f,m.value,b,m.source,o):f.validator&&(M=f.validator(f,m.value,b,m.source,o),M===!0?b():M===!1?b(f.message||f.field+" fails"):M instanceof Array?b(M):M instanceof Error&&b(M.message)),M&&M.then&&M.then(function(){return b()},function(q){return b(q)})},function(m){c(m)})},getType:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type="pattern"),typeof e.validator!="function"&&e.type&&!$e.hasOwnProperty(e.type))throw new Error(G("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if(typeof e.validator=="function")return e.validator;var n=Object.keys(e),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?$e.required:$e[this.getType(e)]||!1}},fe.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");$e[e]=n},fe.warning=Fn,fe.messages=Mt,fe.validators=$e;var Jo={required:"%s \u5FC5\u586B",maxLength:"%s \u8D85\u51FA\u6700\u5927\u957F\u5EA6\u9650\u5236",minLength:"%s \u5C0F\u4E8E\u6700\u5C0F\u957F\u5EA6\u9650\u5236",string:{range:"%s \u4E0D\u5728\u6307\u5B9A\u957F\u5EA6\u5185"}};function Xo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new fe(t);return n.messages(Object.assign(Jo,e)),n}var Qo=new bn;function $t(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zo(t){if(Array.isArray(t))return t}function Yo(t){if(Array.isArray(t))return $t(t)}function $n(t,e,n,r,u,a,o){try{var s=t[a](o),c=s.value}catch(l){n(l);return}s.done?e(c):Promise.resolve(c).then(r,u)}function On(t){return function(){var e=this,n=arguments;return new Promise(function(r,u){var a=t.apply(e,n);function o(c){$n(a,r,u,o,s,"next",c)}function s(c){$n(a,r,u,o,s,"throw",c)}o(void 0)})}}function es(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ts(t,e,n){return e&&Pn(t.prototype,e),n&&Pn(t,n),t}function ns(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ln(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Nn(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rs(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function is(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function jn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){ns(t,u,n[u])})}return t}function us(t){return Zo(t)||Nn(t)||xn(t,i)||rs()}function Ot(t){return Yo(t)||Nn(t)||xn(t)||is()}function xn(t,e){if(!!t){if(typeof t=="string")return $t(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(t,e)}}var re=function(){function e(r){var u=this;es(this,e),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Vn,this.removeSetting=Tn,this._callControlHooks("preInstance",r);var a=Ln(this,e)?this.constructor:void 0,o=a.controlName,s=a.controlIcon,c=a.controlType,l=a.controlFieldType,d=a.controlEventKeys,p=a.controlCustomEvents,y=a.name,v=a.setting;o&&s&&c||pn("The ".concat(y," controlName,controlIcon,controlType is not define"));var C;this.id=(C=r==null?void 0:r.id)!==null&&C!==void 0?C:dt(10),this.name=o,this.icon=s;var m;this.type=(m=r==null?void 0:r.type)!==null&&m!==void 0?m:c,this.props=new ye(r==null?void 0:r.props,(Ln(this,e)?this.constructor:void 0).controlName);var w;this.controlType=(w=r==null?void 0:r.controlType)!==null&&w!==void 0?w:"base",this.setting=L(v);var f;this.fieldType=(f=r==null?void 0:r.fieldType)!==null&&f!==void 0?f:l,this.eventKeys=L(d),this.customEvents=L(p),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=e.prototype;return n._callControlHooks=function(){for(var u=arguments.length,a=new Array(u),o=0;o<u;o++)a[o]=arguments[o];var s,c=us(a),l=c[0],d=c.slice(1);return(s=Qo).emit.apply(s,[l,this].concat(Ot(d)))},n.preUpdate=function(u,a){this._callControlHooks("preUpdateProps",u,a)},n.postUpdate=function(u,a){this._callControlHooks("postUpdateProps",u,a)},n.updateProps=function(u,a){this.preUpdate(u,a),yn(this.props,u,a),this.postUpdate(u,a)},n.preValidate=function(){var u=this;return On(Y.mark(function a(){var o,s,c;return Y.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return o=jn({},u.rules),d.next=3,u._callControlHooks("preValidate",o);case 3:return s=d.sent,c=s[s.length-1],d.abrupt("return",c===!1?void 0:c);case 6:case"end":return d.stop()}},a)}))()},n.validate=function(u,a){var o=this;return On(Y.mark(function s(){var c,l,d;return Y.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,o.preValidate();case 2:return c=y.sent,l=c!==void 0?c:jn({},o.rules),Array.isArray(a)&&a.forEach(function(v){l.hasOwnProperty(v)&&delete l[v]}),d=Xo(l,u),y.prev=6,y.next=9,d.validate(o.props);case 9:return y.abrupt("return",!0);case 12:throw y.prev=12,y.t0=y.catch(6),y.t0.control||(y.t0.control=o),y.t0;case 16:case"end":return y.stop()}},s,null,[[6,12]])}))()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,a=this.fieldType,o=this.id,s=this.type,c=this.props,l=c.dataBind,d=c.datasourceBind,p=c.optionConfig,y=c.caption,v=c.required,C=c.maxLength,m=c.options,w=c.encrypted,f=c.encryptedMode;if(!(!a&&!l&&!d)){var A={parentId:u,fieldType:a,controlId:o,caption:y,type:s,props:{}};switch(l&&(A.dataBind=l),p){case"datasource":case void 0:d&&(A.datasourceBind=d);break;case"custom":A.props.options=m;break}return v!==void 0&&(A.required=v),C!==void 0&&(A.maxLength=C),w!==void 0&&(A.encrypted=w),f!==void 0&&(A.encryptedMode=f),A}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:L(this.props),fieldType:this.fieldType,controlType:this.controlType}},e.updateBasicControl=function(u,a){if(u==="setting"){if(a.add){var o;(o=this.setting).push.apply(o,Ot(a.add))}a.remove&&this.removeSettingItem(a.remove),a.update}},ts(e,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),e}();re.controlName="\u63A7\u4EF6",re.controlIcon="icon",re.controlType="control",re.controlEventKeys=[],re.controlCustomEvents=[],re.setting=[],re.__is_control__=!0,re.removeSettingItem=Tn,re.updateSettingItem=Vn;function Tn(t){var e=this,n=Array.isArray(t)?t:[t];n.forEach(function(r){var u=typeof r!="string",a=e.setting.findIndex(function(c){return c.key===(u?r.key:r)});if(a!==-1){var o,s;u?e.setting[a].showItems=(o=e.setting[a].showItems)===null||o===void 0?void 0:o.filter(function(c){return!r.hideItems.includes(c)}):e.setting.splice(a,1),u&&!(!((s=e.setting[a].showItems)===null||s===void 0)&&s.length)&&e.setting.splice(a,1)}})}function Vn(t,e){var n=this,r=typeof t=="string"?[t]:t;r.forEach(function(u){var a=n.setting.find(function(l){return l.key===u});if(a){if(typeof e=="boolean")a.visible=e;else if(typeof e=="object"){var o,s=(o=e.type)!==null&&o!==void 0?o:"replace";if(s==="replace")a.showItems=e.showItems;else{var c;(c=a.showItems).push.apply(c,Ot(e.showItems))}}}})}function as(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function os(t,e,n){return e&&qn(t.prototype,e),n&&qn(t,n),t}function ss(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var Ae=function(){function e(n){as(this,e),this.customEvents=[],this.parent=null;var r=ss(this,e)?this.constructor:void 0,u=r.controlType,a=r.controlFieldType,o=r.name,s=r.controlCustomEvents;u||pn("The ".concat(o," controlType is not define"));var c;this.id=(c=n==null?void 0:n.id)!==null&&c!==void 0?c:dt(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new ye(n==null?void 0:n.props),this.customEvents=s;var d;this.controlType=(d=n==null?void 0:n.controlType)!==null&&d!==void 0?d:"base";var p;this.fieldType=(p=n==null?void 0:n.fieldType)!==null&&p!==void 0?p:a;var y;this.pageStatus=(y=n==null?void 0:n.pageStatus)!==null&&y!==void 0?y:Ct.UNKNOWN}return os(e,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),e}();Ae.controlType="control",Ae.__is_control__=!0,Ae.controlCustomEvents=[];function cs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},et(t)}function Lt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nt(t,e)}function ls(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function fs(t,e){return e&&(ds(e)==="object"||typeof e=="function")?e:cs(t)}function Nt(t,e){return Nt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Nt(t,e)}var ds=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function hs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function jt(t){var e=hs();return function(){var r=et(t),u;if(e){var a=et(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return fs(this,u)}}var ps=function(t){Lt(n,t);var e=jt(n);function n(r){Pt(this,n);var u;u=e.call(this,r),u.dataBind={},u.caption={type:"string",required:!0,message:X.getMessage("pleaseEnterCaption")},u.isHideCaption={type:"boolean"},u.labelPosition={type:"enum",enum:["top","left"]},u.defaultState={type:"enum",enum:["default","readonly"]},u.required={type:"boolean"},u.captionTip={type:"string",required:!1,message:X.getMessage("pleaseEnterCaptionTip")};var a={fieldCode:{type:"string",required:!0,message:X.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:X.getMessage("pleaseEnterFieldCode")}};if(ls(r.dataBind,De))u.dataBind={type:"object",required:!0,fields:L(a),message:X.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:X.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(s){o.fields[s]={type:"object",required:!0,fields:L(a),message:X.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(wn),gs=function(t){Lt(n,t);var e=jt(n);function n(r){Pt(this,n);var u;return u=e.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:X.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(Sn),xt=function(t){Lt(n,t);var e=jt(n);function n(r){Pt(this,n);var u;u=e.call(this,r);var a;u.caption=(a=r==null?void 0:r.caption)!==null&&a!==void 0?a:"";var o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var s;u.isShowCaptionTip=(s=r==null?void 0:r.isShowCaptionTip)!==null&&s!==void 0?s:!1;var c;u.captionTip=(c=r==null?void 0:r.captionTip)!==null&&c!==void 0?c:"";var l;u.defaultState=(l=r==null?void 0:r.defaultState)!==null&&l!==void 0?l:"default";var d;u.labelPosition=(d=r==null?void 0:r.labelPosition)!==null&&d!==void 0?d:"top";var p;u.placeholder=(p=r==null?void 0:r.placeholder)!==null&&p!==void 0?p:"";var y;u.required=(y=r==null?void 0:r.required)!==null&&y!==void 0?y:!1;var v;u.requiredMessage=(v=r==null?void 0:r.requiredMessage)!==null&&v!==void 0?v:"",u.dataBind=new De(r==null?void 0:r.dataBind);var C;return u.defaultValue=(C=r==null?void 0:r.defaultValue)!==null&&C!==void 0?C:"",u}return n}(ye);xt.Rules=ps,xt.RuntimeRules=gs;function ys(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t){return tt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},tt(t)}function ms(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tt(t,e)}function Es(t,e){return e&&(bs(e)==="object"||typeof e=="function")?e:ys(t)}function Tt(t,e){return Tt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Tt(t,e)}var bs=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function As(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Cs(t){var e=As();return function(){var r=tt(t),u;if(e){var a=tt(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return Es(this,u)}}var ie=function(t){ms(n,t);var e=Cs(n);function n(r){vs(this,n);var u;return u=e.call(this,r),u.controlType="form",u.props=new xt(r==null?void 0:r.props),u}return n}(Ae);function Bs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ws(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},nt(t)}function Ss(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vt(t,e)}function Fs(t,e){return e&&(_s(e)==="object"||typeof e=="function")?e:Bs(t)}function Vt(t,e){return Vt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Vt(t,e)}var _s=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ds(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Is(t){var e=Ds();return function(){var r=nt(t),u;if(e){var a=nt(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return Fs(this,u)}}var Un=function(t){Ss(n,t);var e=Is(n);function n(r){return ws(this,n),e.call(this,r)}return n}(ye);function qt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Rs(t){if(Array.isArray(t))return qt(t)}function Ms(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function kn(t){return Rs(t)||Ms(t)||Os(t)||$s()}function Os(t,e){if(!!t){if(typeof t=="string")return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}}function Ps(t,e){var n;!((n=Object.getOwnPropertyDescriptors(t)[e])===null||n===void 0)&&n.enumerable&&Object.defineProperty(t,e,{enumerable:!1})}function Hn(t,e){t.parent=e,Ps(t,"parent")}function Ls(t,e){t.forEach(function(n){Hn(n,e)})}var Wn=Symbol("targetKey");function zn(t){var e;return(e=t[Wn])!==null&&e!==void 0?e:t}function Gn(t,e){return Ls(t,e),new Proxy(t,{get:function(r,u){for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var c;return u===Wn?r:(c=Reflect).get.apply(c,[r,u].concat(kn(o)))},set:function(r,u,a){for(var o=arguments.length,s=new Array(o>3?o-3:0),c=3;c<o;c++)s[c-3]=arguments[c];var l;if(Ee(t)&&u==="length"&&a===t.length)return!0;var d=(l=Reflect).set.apply(l,[r,u,a].concat(kn(s)));return te(a)&&Hn(a,e),d}})}function rt(t,e,n,r){var u=r!=null?r:t,a=Gn(zn(n!=null?n:[]),u);Object.defineProperty(t,e,{get:function(){return a},set:function(s){a=Gn(zn(s),u)},enumerable:!0})}function Ut(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ns(t){if(Array.isArray(t))return Ut(t)}function Kn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jn(t,e,n,r,u,a,o){try{var s=t[a](o),c=s.value}catch(l){n(l);return}s.done?e(c):Promise.resolve(c).then(r,u)}function js(t){return function(){var e=this,n=arguments;return new Promise(function(r,u){var a=t.apply(e,n);function o(c){Jn(a,r,u,o,s,"next",c)}function s(c){Jn(a,r,u,o,s,"throw",c)}o(void 0)})}}function xs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ts(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ce(t,e,n){return typeof Reflect!="undefined"&&Reflect.get?Ce=Reflect.get:Ce=function(u,a,o){var s=Ks(u,a);if(!!s){var c=Object.getOwnPropertyDescriptor(s,a);return c.get?c.get.call(o):c.value}},Ce(t,e,n||t)}function de(t){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},de(t)}function Vs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}function qs(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Us(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ks(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){Ts(t,u,n[u])})}return t}function Ws(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function zs(t,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ws(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function Gs(t,e){return e&&(Js(e)==="object"||typeof e=="function")?e:Kn(t)}function kt(t,e){return kt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},kt(t,e)}function Ks(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=de(t),t!==null););return t}function Xn(t){return Ns(t)||Us(t)||Xs(t)||ks()}var Js=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Xs(t,e){if(!!t){if(typeof t=="string")return Ut(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ut(t,e)}}function Qs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Zs(t){var e=Qs();return function(){var r=de(t),u;if(e){var a=de(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return Gs(this,u)}}var Ys=1e4,Qn=function(e){Vs(r,e);var n=Zs(r);function r(a){xs(this,r);var o;o=n.call(this,a),o.controlType="layout";var s=qs(this,r)?this.constructor:void 0,c=s.excludes,l=s.childrenMaxLength;return o.props=new Un(a==null?void 0:a.props),rt(Kn(o),"children",a==null?void 0:a.children),o.excludes=L(c),o.childrenMaxLength=l,o}var u=r.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var s=this.judgeExcludesChildren(o);return s&&this.childrenMaxLength>this.children.length},u.validate=function(o,s){var c=this,l=this,d=function(){return Ce(de(r.prototype),"validate",c)};return js(Y.mark(function p(){return Y.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,d().call(l,o,s);case 2:return v.next=4,Promise.all(l.children.map(function(C){return C.validate(o,s)}));case 4:return v.abrupt("return",!0);case 5:case"end":return v.stop()}},p)}))()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=Ce(de(r.prototype),"toDataBindModel",this).call(this),c=s?[s]:[];return this.children.reduce(function(l,d){var p=d.toDataBindModel(o);if(Array.isArray(p)){var y=p.filter(function(v){return!!v});return Xn(l).concat(Xn(y))}return p&&l.push(p),l},c)},u.toSchema=function(){var o=Ce(de(r.prototype),"toSchema",this).call(this),s=this.children.map(function(c){var l=c.toSchema();return l});return zs(Hs({},o),{children:s})},r}(re);Qn.excludes=!1,Qn.childrenMaxLength=Ys;function Zn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ec(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function it(t){return it=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},it(t)}function tc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ht(t,e)}function nc(t,e){return e&&(rc(e)==="object"||typeof e=="function")?e:Zn(t)}function Ht(t,e){return Ht=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ht(t,e)}var rc=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function ic(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function uc(t){var e=ic();return function(){var r=it(t),u;if(e){var a=it(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return nc(this,u)}}var ac=function(t){tc(n,t);var e=uc(n);function n(r){ec(this,n);var u;return u=e.call(this,r),u.controlType="layout",u.props=new Un(r==null?void 0:r.props),rt(Zn(u),"children",r==null?void 0:r.children),u}return n}(Ae);function Yn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ut(t)}function sc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wt(t,e)}function cc(t,e){return e&&(lc(e)==="object"||typeof e=="function")?e:Yn(t)}function Wt(t,e){return Wt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Wt(t,e)}var lc=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function fc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function dc(t){var e=fc();return function(){var r=ut(t),u;if(e){var a=ut(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return cc(this,u)}}var hc=function(t){sc(n,t);var e=dc(n);function n(r,u){oc(this,n);var a;return a=e.call(this,u),rt(Yn(a),"headers",u==null?void 0:u.headers,r),a}return n}(ye);_.LIST;function zt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gc(t,e,n){return e&&er(t.prototype,e),n&&er(t,n),t}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},at(t)}function yc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gt(t,e)}function vc(t,e){return e&&(mc(e)==="object"||typeof e=="function")?e:zt(t)}function Gt(t,e){return Gt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Gt(t,e)}var mc=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ec(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function bc(t){var e=Ec();return function(){var r=at(t),u;if(e){var a=at(this).constructor;u=Reflect.construct(r,arguments,a)}else u=r.apply(this,arguments);return vc(this,u)}}var ot=function(t){yc(n,t);var e=bc(n);function n(r){pc(this,n);var u;return u=e.call(this,r),u.controlType="list",u.props=new hc(zt(u),r==null?void 0:r.props),rt(zt(u),"children",r==null?void 0:r.children),u}return gc(n,[{key:"length",get:function(){return this.children.length}}]),n}(Ae);function st(t){return t.controlType===ee.LAYOUT||t.controlType===ee.WRAP||t.controlType===ee.LIST||t.controlType===ee.SEARCH}function Oe(t,e){Array.isArray(t)&&t.map(n=>{if(n.type===I.SUBTABLE){const r=n.getChildrenFormControl();e(n,r)}else st(n)?Oe(n==null?void 0:n.children,e):n instanceof ie&&e(n)})}function Pe(t,e){Array.isArray(t)&&t.map(n=>{n.type===I.DATA_VIEW||n.type===I.SIMPLE_SEARCH?e(n):st(n)&&Pe(n==null?void 0:n.children,e)})}class Kt extends ze{constructor(e){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=e;this._schema=n,this._instance=this.createControl(n,e.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const e=[],n={};return tr(this._instance,r=>{e.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r)}),this._flatInstances=e,this._instanceMap=n,this._flatInstances}get schema(){return this._schema}get instance(){return this._instance}get flatInstances(){return this._flatInstances}get instanceMap(){return this._instanceMap}get rules(){let e={};return Pe(this._instance,n=>{e[n.id]=n.rules[0],Oe(n.children,r=>{(r instanceof ie||r instanceof ot)&&Ac(e[n.id].fields,r)})}),e}get antdRules(){let e={};return Pe(this._instance,n=>{e[n.id]=n.rules[0],Oe(n.children,r=>{(r instanceof ie||r instanceof ot)&&Cc(e[n.id].fields,r)})}),e}}function tr(t,e){Array.isArray(t)?t.map(n=>{e(n),st(n)&&tr(n.children,e)}):e(t)}function Jt(t){return t.props.isHide?!0:t.parent===null?!1:Jt(t.parent)}function Ac(t,e){if(!Jt(e)){if(e instanceof ie)t[e.id]=e.rules;else if(e.type===I.SUBTABLE){t[e.id]=e.rules;const n={type:"array",fields:{}};e.children.forEach((r,u)=>{pe(r.children,a=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[a.id]=a.rules)})}),t[e.id].push(n)}}}function Cc(t,e){Jt(e)||(e instanceof ie?t[e.id]=e.rules:e.type===I.SUBTABLE&&e.children.length&&(t[e.id]=[],e.children.forEach(n=>{let r={};pe(n.children,u=>{r[u.id]=u.rules}),t[e.id].push(r)})))}class Bc{constructor(e){const{state:n,emptyState:r,databindMapping:u,controlidMapping:a}=wc(e.instance);this.emptyState=r,this.state=n,this.dataBindMapping=u,this.controlIdMapping=a}setState(e,n,r){const u=this.controlIdMapping[e];u!==void 0?this.state[u.dataView][e]=n:r!==void 0?Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,s=this.controlIdMapping[a].children;s!==void 0&&Object.keys(s).map(c=>{c===e&&(this.state[o][a][r][e]=n)})}):this.state[e]=n}getState(e,n){if(this.state[e]!==void 0)return this.state[e];{const u=this.controlIdMapping[e];if(u!==void 0)return this.state[u.dataView][e];if(n!==void 0){let a;return Object.keys(this.controlIdMapping).map(o=>{const s=this.controlIdMapping[o].dataView,c=this.controlIdMapping[o].children;c!==void 0&&Object.keys(c).map(l=>{var d;l===e&&(a=(d=this.state[s][o][n])==null?void 0:d[e])})}),a}else{let a=[];return Object.keys(this.controlIdMapping).map(o=>{const s=this.controlIdMapping[o].dataView,c=this.controlIdMapping[o].children;c!==void 0&&Object.keys(c).map(l=>{l===e&&this.state[s][o].map(d=>{a.push(d[e])})})}),a}}}getEmptyState(e){if(this.emptyState[e]!==void 0)return this.emptyState[e];{const r=this.controlIdMapping[e];if(r!==void 0)return this.emptyState[r.dataView][e];{let u;return Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,s=this.controlIdMapping[a].children;s!==void 0&&Object.keys(s).map(c=>{c===e&&(u=this.emptyState[o][a][e])})}),u}}}getDataBind(e){let n=this.controlIdMapping[e];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let a in u.children)if(a===e){n=u.children[a];break e}}}return n==null?void 0:n.dataBind}}function wc(t){let e={},n={},r={},u={};return Pe(t,a=>{const o=a.id,s={},c={};Oe([a],(l,d)=>{Sc(s,c,l),Fc(r,o,l),_c(u,o,l)}),e[o]=s,n[o]=c}),{state:e,emptyState:n,databindMapping:r,controlidMapping:u}}function Sc(t,e,n){var r;if(n instanceof ie)t[n.id]=L(n.props.defaultValue),e[n.id]=L(n.props.defaultValue);else{const u={};pe(n.props.headers,a=>{u[a.id]=L(a.props.defaultValue)}),t[n.id]=new Array((r=n.props.defaultRows)!=null?r:1).fill(0).map(()=>L(u)),e[n.id]=u}}function Fc(t,e,n){if(n instanceof ie)n.props.dataBind instanceof le?Object.keys(n.props.dataBind).map(r=>{const u=n.props.dataBind,a=u[r].dataCode;a!==void 0&&(t[a]===void 0&&(t[a]={controlId:n.id,fields:[],dataViewId:e}),t[a].fields.push({fieldCode:u[r].fieldCode,controlId:n.id,dataBind:u,dataViewId:[e]}))}):(t[n.props.dataBind.dataCode]===void 0&&(t[n.props.dataBind.dataCode]={controlId:e,fields:[],dataViewId:e}),t[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[e]}));else{if(n.props.datasourceBind.dataCode===""){ce(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}t[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:e};const r=n.id;pe(n.props.headers,u=>{u.props.dataBind instanceof le?Object.keys(u.props.dataBind).map(a=>{const o=u.props.dataBind,s=o[a].dataCode;t[s].fields.push({fieldCode:o[a].fieldCode,controlId:u.id,dataBind:o,dataViewId:[e,r]})}):t[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[e,r]})})}}function _c(t,e,n){n instanceof ie?t[n.id]={dataBind:n.props.dataBind,options:[],dataView:e}:n.type===I.SUBTABLE&&(t[n.id]={dataBind:new De({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:e,children:{},options:[]},pe(n.props.headers,r=>{var u,a;Object.assign((a=(u=t[n.id])==null?void 0:u.children)!=null?a:{},{[r.id]:{dataBind:r.props.dataBind}})}))}const nr=["splice","push","shift","pop","unshift","reverse"],Xt=Symbol("__engineProxy__"),Qt=Symbol("__engineTarget__"),rr=Symbol("__engineArrayBeforeSetCallbackFlag__"),ir=Symbol("__engineProxyThisKey__"),Q={type:"",args:[],callback:ur};function ur(){}$c();function Dc(t,e,n,r,u){if(Q.type){Q.callback=u.bind(null,t,r);return}const a=Number(e);if(a>t.length){se(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${nr.join(",")} for array operations`);return}if(!(Number.isNaN(a)&&e!=="length"))if(e==="length"){const s=n,c=t.length;if(s>t.length){se("Do not directly modify the length of the array data, please add new rows");return}return s===t.length?void 0:()=>u.call(null,t,r,"splice",[s,c-s])}else return a===t.length?()=>u.call(null,t,r,"push",[n]):()=>u.call(null,t,r,"splice",[a,1,n])}function Ic(t,e,n){return{__engineProxy__:!0,get(r,u,a){return u===Xt?!0:u===Qt?r:Array.isArray(r)&&u===rr?n:u===ir?t:Reflect.get(r,u,a)},set(r,u,a,o){var y;let s=a;const c=r[u],l=t===""?u:t+"."+u;function d(v){if(typeof v=="object"&&v!==null)return v[Xt]!==!0?ct(v,e,n,l):ct(v[Qt],e,n,l)}s=(y=d(a))!=null?y:s;let p;if(Array.isArray(r)){const v=Dc(r,u,a,t,e);p=Reflect.set(r,u,s,o),v&&v()}else{try{let v=s;if(s=n.call(null,r,l,s,c),v!==s){const C=d(s);C!==void 0&&(s=C)}}catch(v){return ke(`${l} set error ${v}`),!0}p=Reflect.set(r,u,s,o),e.call(null,r,l,a,c)}return p}}}function ct(t,e,n,r=""){if(Object.isFrozen(t))return t;for(let u in t){const a=r===""?u:r+"."+u,o=t[u];typeof o=="object"&&o!==null&&(t[u]=ct(o,e,n,a))}return new Proxy(t,Ic(r,e,n))}function ar(t){const e=[];return t.forEach(n=>{e.push(n),n.controlType==="layout"&&e.push(...ar(n.children))}),e}function Zt(t,e){if(e==="")return;const n=e.split(".");if(n.length===0)return;const r=n[0],u=n.slice(1),a=t.find(o=>o.id===r);return u.length===0?a:u.reduce((o,s)=>{var d,p;const c=Number(s);if(Number.isNaN(c)){const y=o!=null&&o.children?ar(o.children):void 0,v=y==null?void 0:y.find(C=>C.id===s);return v||(o instanceof ie?o:void 0)}else return(p=(d=o==null?void 0:o.children)==null?void 0:d[c])!=null?p:o},a)}function Rc(t,e){return["push","unshift"].includes(t)?e:t==="splice"?e.slice(2):[]}function Mc(t,e,n){if(["push","unshift"].includes(t))return n;if(t==="splice")return e.slice(0,2).concat(n)}function $c(){nr.forEach(t=>{const e=Array.prototype[t];Array.prototype[t]=function(...n){var r;if(this[Xt]){let u;const a=Rc(t,n);if(a.length){const o=(r=this[rr])==null?void 0:r.call(this,this[Qt],this[ir],a),s=Mc(t,n,o);Q.type=t,Q.args=s,u=e.apply(this,s)}else Q.type=t,Q.args=n,u=e.apply(this,n);return typeof Q.callback=="function"&&Q.callback(t,n,u),Q.type="",Q.args=[],Q.callback=ur,u}else return e.apply(this,n)}})}class Oc{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(e,n,...r){return ae(this,null,function*(){const u=this.actionMap.get(e);if(!!u)try{return yield u.func.call(null,n,...r)}catch(a){ke(`${u.id} Exception during calling action: ${a}`)}})}addAction(e,n){this.actionMap.has(e)&&se("duplicated action key");const r=new Pc(e,n);this.actionMap.set(e,r)}}class Pc{constructor(e,n){this.id="",this.id=e,this.func=n}}class Lc{constructor(e){this._dataStore=new Map,this.executer=e}add(e,n){this._dataStore.set(e,n)}get(e){let n=this._dataStore.get(e);return L(n)}remove(e){this._dataStore.delete(e)}getRemoteData(e){return ae(this,null,function*(){return this.executer===void 0?(ke("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(e)})}}class he{}class Le extends he{validate(e){return z(e)}transform(e){if(e==null)return"";if(!te(e)&&!vn(e))return String(e);if(Ya(e))return JSON.stringify(e);throw`${e} is not a string`}}class Yt extends he{validate(e){return He(e)||e===""}transform(e){if(e==null)return"";const n=!te(e)&&!vn(e)?Number(e):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${e} is not a number`}}class Nc extends he{validate(e){return eo(e)}transform(e){if(e==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Ee(e))return n(e);if(z(e)&&mn(e))try{const r=JSON.parse(e);if(Array.isArray(r))return n(r)}catch(r){}return[String(e)]}}class jc extends he{validate(e){return to(e)}transform(e){if(e==null)return[];function n(u){return u.map(a=>!a&&a!==0?"":Number(a)).filter(a=>a===""||!Number.isNaN(a))}if(Ee(e))return n(e);if(z(e)&&mn(e))try{const u=JSON.parse(e);if(Ee(u))return n(u)}catch(u){}const r=Number(e);if(Number.isNaN(r))throw`${e} is not a number array`;return[r]}}class xc extends he{validate(e){return e instanceof Ge||te(e)&&"amount"in e&&He(e.amount)&&"currency"in e&&z(e.currency)}transform(e,n){if(e==null||e==="")return new Ge({currency:n==null?void 0:n.currency});let r;if(te(e)&&(r=new Ge(x(x({},n),e))),z(e)&&We(e))try{const u=JSON.parse(e);r=new Ge(x(x({},n),u))}catch(u){}if(r){const u=new Yt,a=new Le;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),a.validate(r.currency)||(r.currency=a.transform(r.currency)),r}throw`${e} is not a { amount: number, currency: string } object`}}class Tc extends he{validate(e){return e instanceof Ke||te(e)&&"min"in e&&z(e.min)&&"max"in e&&z(e.max)}transform(e,n){if(e==null||e==="")return new Ke;let r;if(te(e)&&(r=new Ke(x(x({},n),e))),z(e)&&We(e))try{const u=JSON.parse(e);r=new Ke(x(x({},n),u))}catch(u){}if(r){const u=new Le;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${e} is not a { min: string, max: string } object`}}class Vc extends he{validate(e){return e instanceof Xe||te(e)&&"result"in e&&He(e.result)&&"unit"in e&&z(e.unit)}transform(e,n){if(e==null||e==="")return new Xe({unit:n==null?void 0:n.unit});let r;if(te(e)&&(r=new Xe(x(x({},n),e))),z(e)&&We(e))try{const u=JSON.parse(e);r=new Xe(x(x({},n),u))}catch(u){}if(r){const u=new Yt,a=new Le;return u.validate(r.result)||(r.result=u.transform(r.result)),a.validate(r.unit)||(r.unit=a.transform(r.unit)),r}throw`${e} is not a { result: string, unit: string } object`}}class qc extends he{validate(e){return e instanceof Je}transform(e,n){if(e==null||e==="")return new Je;let r;if(te(e)&&(r=new Je(x(x({},n),mt.exports.camelizeKeys(e)))),z(e)&&We(e))try{const u=JSON.parse(e);r=new Je(x(x({},n),mt.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new Le;return u.validate(r.city)||(r.city=u.transform(r.city)),u.validate(r.district)||(r.district=u.transform(r.district)),u.validate(r.province)||(r.province=u.transform(r.province)),r}throw`${e} is not a { city: string, district: string, province: string } object`}}class Uc{static getValueChecker(e){let n;switch(e){case _.VARCHAR:case _.TIMESTAMP:case _.TEXT:case _.RELATION:case _.AUTO_NUMBER:n=new Le;break;case _.DECIMAL:n=new Yt;break;case _.EMPLOYEES:case _.DEPARTMENTS:case _.IMAGE:case _.FILE:case _.ARRAY:n=new Nc;break;case _.MONEY:n=new xc;break;case _.TIMESCOPE:n=new Tc;break;case _.CALC:n=new Vc;break;case _.DECIMAL_RANGE:n=new jc;break;case _.ADDRESS:n=new qc;break}return n}}function kc(t){if(["min","max","currency","unit"].includes(t))return _.VARCHAR;if(["result","amount"].includes(t))return _.DECIMAL}function or(t,e,n,r){var o;let u=(o=kc(e))!=null?o:t,a=Uc.getValueChecker(u);if(!a||a.validate(n))return n;try{const s=a.transform(n,r);return s!==void 0?s:n}catch(s){throw`${e} ${s}`}}function Hc(t,e,n){return Object.entries(t).reduce((r,[u,a])=>{const o=e[u];return r[u]=or(a,u,o,n[u]),r},Object.assign({},e))}typeof window!="undefined"&&(window.engines={});let Be=null,Ne="";class en extends bn{constructor(e){super(),this.isMounted=!1,this.id=dt(8),this.__pluginsApplied=!1,this.actionManager=new Oc,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(e);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:a,language:o=on,debug:s=!1}=this.$options;X.setLocale(o),this.debug=s,this.runtime=new Kt({schema:r,beforeCreateInstance:u}),this.externalParams=a,this.store=new Bc({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...e){this.debug&&yt(...e)}use(e){return this.__pluginsApplied||this.__plugins.push(e),this}registerControl(...e){return this.runtime.register(...e),this}static register(...e){return Kt.register(...e)}static judgeControlIsRegistered(e){return Kt.staticRegisteredTypes.has(e.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:e=[]}=this.$options;this._handlerProxyState(),this.__plugins=e,this.applyPlugins(),this.setStates(this.getState()),this.debugLog("engine\u7684mount\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F"),this.debug&&typeof window!="undefined"&&(window.engines[this.id]=this)}destroy(){this.debug&&typeof window!="undefined"&&delete window.engines[this.id]}_handlerProxyState(){this.store.state=ct(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(e,n,r,u){const a=Zt(this.runtime.flatInstances,n);if(!a)return r;if(this.assertInstance(a,I.SUBTABLE)){const c=a.props.headers.reduce((l,d)=>{const p=d.children[0];return p&&p instanceof ie&&(l[p.id]=p.fieldType),l},{});return r===null?[]:r.map(l=>Hc(c,l,this.getEmptyState(a.id)))}const o=n.split("."),s=o[o.length-1];try{return or(a.fieldType,s,r,u)}catch(c){throw ce(`the id=${a.id}'s instance setState error, %o ${c}.`,r),c}}_proxyStateCallback(e,n,r,u,a){Array.isArray(e)?this._handlerArrayUpdate(e,n,r,u,a):this._handlerObjectUpdate(e,n,r,u)}_handlerArrayUpdate(e,n,r,u,a){const o=Zt(this.runtime.flatInstances,n);if(!(o instanceof ot))return;const s=y=>{const v=[];for(let C=0;C<y;C++){const m=this.listControlCreateRow(o,"subtable-row");m&&v.push(m)}return v},c=Be;let l=[],d=[],p=[];if(r&&u){switch(r){case"push":case"unshift":const y=u.length;l=s(y),d=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const v=u.length-2,C=u.slice(2);l=s(v),d=C;const m=u[0],w=u[1];o.children[r](m,w,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?p=a:["pop","shift"].includes(r)&&(p=[a]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},c,{changed:l,data:d,deleted:p!=null?p:[]})}),Be=null}}_handlerObjectUpdate(e,n,r,u){const a=Zt(this.runtime.flatInstances,n);if(!a)return;const o=this.getInstanceRowIndex(a),s=Be||{};if(a instanceof ot){a.children.length=0;const c=r;let l=[];for(let d=0;d<c.length;d++){const p=this.listControlCreateRow(a,"subtable-row");p&&l.push(p)}a.children.push(...l),this.runtime.getFlatInstances(),this.emit("list-change",{instance:a,value:r,options:an(x({},s),{changed:l,data:c,deleted:u!=null?u:[]})})}else this.emit("change",{instance:a,value:this.getState(a.id,o),rowIndex:o,options:an(x({},s),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(e=>{var n;try{Ne=(n=e.pluginName)!=null?n:e.constructor.name,e.apply(this)}catch(r){se(`${Ne} Plugin apply Error
|
|
2
|
+
${r}`)}finally{Ne=""}}),this.__pluginsApplied=!0)}listControlCreateRow(e,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r instanceof ac){const u=L(e.props.headers),a=this.createControl(u);r.children.push(...a)}return r}}listControlAddRow(e,n="subtable-row"){const r=this.listControlCreateRow(e,n);!r||e.children.push(r)}emit(e,n){return ae(this,null,function*(){if(e==="engine-mounted"){if(this.isMounted)return ce("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let r,u;this.isMounted||(u=new Promise(o=>{r=o}),this._jobTasks.push(u));const a=yield dr(en.prototype,this,"emit").call(this,e,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),a})}on(e,n){return Ne&&(n.applyingPluginName=Ne),super.on(e,n)}createControl(...e){return this.runtime.createControl(...e)}createInstance(e,n){return this.runtime.createControlInstance(e,n)}schemaEvent(e,n){this.emit(e,n)}updateInstanceProps(e,n,r,u){return this.setInstance(e,n,r,u)}getRules(e){var n;return e===void 0?this.runtime.rules:(n=this.runtime.rules[e])==null?void 0:n.fields}getAntdRules(e){var n;return e===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[e])==null?void 0:n.fields}getState(e,n){return e===void 0?this.store.state:this.store.getState(e,n)}getEmptyState(e){return L(e===void 0?this.store.emptyState:this.store.getEmptyState(e))}setPayloadOptions(e){Be=e}setState(e,n,r,u){Be=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",e,n,r,u),this.store.setState(e,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",e,n,r),Be=null}setStates(e,n,r){let u=e;Object.keys(u).forEach(a=>{Object.entries(this.store.controlIdMapping).forEach(([o,s])=>{if(s.dataView===a){const c=u[a][o];c!==void 0&&this.setState(o,c,n,r)}else(o===a||s.children&&s.children[a])&&u[a]!==void 0&&this.setState(a,u[a],n,r)})})}getField(e,n,r){if(!n){const c=this.getDataBindMapping(e);if(c){const{controlId:l}=c;return this.getState(l)}return}const u=this.getDataBindMapping(e,n);if(!u)return;const{dataBind:a,controlId:o}=u,s=this.getState(o,r);return a instanceof le?Object.entries(a).reduce((c,[l,d])=>d.fieldCode===n?c[l]:c,s):s}setField(e,n,r,u,a){var l;const o=this.getDataBindMapping(e,n);if(!o)return;const{dataBind:s,controlId:c}=o;if(s instanceof le){const d=(l=L(this.getState(c,u)))!=null?l:this.getEmptyState(c),p=Object.entries(s).reduce((y,[v,C])=>(C.fieldCode===n&&(y[v]=r),y),d);this.setState(c,p,u,a)}else this.setState(c,r,u,a)}setFields(e,n,r,u){const a=this.getDataBindMapping(e);if(!a)return;let o=[];a.fields.forEach(s=>{var p;const{dataBind:c,controlId:l,fieldCode:d}=s;if(!o.includes(d)&&!!Object.hasOwnProperty.call(n,d))if(c instanceof le){const y=(p=L(this.getState(l,r)))!=null?p:this.getEmptyState(l),v=Object.entries(c).reduce((C,[m,w])=>{o.push(w.fieldCode);const f=n[w.fieldCode];return f!==void 0&&(C[m]=f),C},y);this.setState(s.controlId,v,r,u)}else this.setState(l,n[d],r,u)})}buildFields(e,n){const r=this.getDataBindMapping(e);if(!r)return;let u=[];const a={};return r.fields.forEach(o=>{const{dataBind:s,controlId:c,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(s instanceof le){const d=this.getEmptyState(c);a[o.controlId]=Object.entries(s).reduce((p,[y,v])=>{u.push(v.fieldCode);const C=n[v.fieldCode];return C!==void 0&&(p[y]=C),p},d)}else a[c]=n[l]}),a}setData(e,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",e,n);let r={};Object.keys(e).map(u=>{const a=e[u];if(Array.isArray(a))a.map(o=>{const s=this.getDataBindMapping(u);if(!s)return;let c=L(this.store.emptyState[s.dataViewId][s.controlId]),l=[];Object.keys(o).map(d=>{var y,v,C;if(l.includes(d))return;const p=(v=(y=this.store.dataBindMapping[u])==null?void 0:y.fields)==null?void 0:v.find(m=>m.fieldCode===d);if(p){if(p.dataBind instanceof De&&o[d]!==void 0)c[p.controlId]=o[d];else if(p.dataBind instanceof le){let m=L((C=this.getEmptyState(p.controlId))!=null?C:{});Object.keys(p.dataBind).map(w=>{const f=p.dataBind[w];o[f.fieldCode]!==void 0&&(m[w]=o[f.fieldCode]),l.push(f.fieldCode)}),c[p.controlId]=m}}}),r[s.dataViewId]||(r[s.dataViewId]={}),r[s.dataViewId][s.controlId]||(r[s.dataViewId][s.controlId]=[]),r[s.dataViewId][s.controlId].push(c)});else if(a){let o=[];Object.keys(a).map(s=>{var l;if(o.includes(s))return;const c=this.getDataBindMapping(u,s);if(c){if(r[c.dataViewId[0]]||(r[c.dataViewId[0]]={}),c.dataBind instanceof De&&a[s]!==void 0)r[c.dataViewId[0]][c.controlId]=a[s];else if(c.dataBind instanceof le){let d=L((l=this.getEmptyState(c.controlId))!=null?l:{});Object.keys(c.dataBind).map(p=>{const y=c.dataBind[p];a[y.fieldCode]!==void 0&&(d[p]=a[y.fieldCode]),o.push(y.fieldCode)}),r[c.dataViewId[0]][c.controlId]=d}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r),this.setStates(r,void 0,n),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(e){return this.store.getDataBind(e)}getInstance(e,n){const r=this.getInstances(e,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(e,n=!1){var u;if(e===void 0)return this.runtime.flatInstances;const r=this.runtime.flatInstances.filter(a=>a.id===e);if(n)if(r.length){const a=r[0];if(this.getInstanceRowIndex(a)!==void 0){const o=this.getInstanceInSubtableHeader(a);o&&r.unshift(o)}}else{const a=this.getControlIdMapping(),[o]=(u=Object.entries(a).find(([s,c])=>c.children&&e in c.children))!=null?u:[];if(o){const c=this.getInstance(o).props.headers.find(l=>l.children.find(d=>d.id===e));if(c){const l=c.children.find(d=>d.id===e);l&&r.unshift(l)}}}return r}setInstance(e,n,r,u){try{let a;if(typeof e=="string"?a=this.getInstance(e,u):a=e,!a)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",a.id,a,n,r),yn(a.props,n,r),this.schemaEvent("schema-change",{instance:a,props:n,value:r})}catch(a){throw a}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(e,n){if(!e&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[e];if(!r){ce(`No corresponding dataCode=${e} was found`);return}if(!n)return r;const u=r.fields.find(a=>a.fieldCode===n);if(!u){ce(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(e){this.dataManager=new Lc(e)}getDataManager(){return this.dataManager}assertInstance(e,n){return z(n)?e.type===n:n.includes(e.type)}getInstanceRowIndex(e){if(!e.parent)return;let n;if(this.assertInstance(e.parent,I.SUBTABLE))if(this.assertInstance(e,I.SUBTABLE_COLUMN))n=-1;else{const r=e.parent.children.findIndex(u=>u===e);r>-1&&(n=r)}else n=this.getInstanceRowIndex(e.parent);return n}getInstanceParentControl(e,n){if(!!e.parent)return this.assertInstance(e.parent,n)?e.parent:this.getInstanceParentControl(e.parent,n)}getInstanceInSubtableHeader(e){const n=this.getInstanceRowIndex(e);if(n===void 0)return;if(n===-1)return e;const r=this.assertInstance(e,I.SUBTABLE_COLUMN)?e:this.getInstanceParentControl(e,I.SUBTABLE_COLUMN);if(!r)return;const a=this.getInstanceParentControl(e,I.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!a)return a.children.find(o=>o.id===e.id)}setControlConfig(...e){return this.runtime.registerControlConfig(...e)}getControlConfig(e){return this.runtime.getControlConfig(e)}}class Wc{}class zc{constructor(e){this.config=e}apply(e){this.engine=e;const n=this.config;if(!n)return;const r=sr(n,e);if(!r)return;const u=e.getAction();for(let[a,o]of Object.entries(r.funcMap))u.addAction(a,o)}}function sr(t,e){if(!t.module||!t.module.compiled)return;const n=t.module.compiled,r={exports:{ctx:e,utils:e.getAction().actionUtils}};try{new Function("module","exports",n).call(r,r,r.exports)}catch(o){se(o.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&se("fail to parse the module")}const u={},a={};for(const[o,s]of Object.entries(r.exports))typeof s=="function"?u[o]=s:a[o]=s;return{funcMap:u,variables:a}}const Gc={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class Kc{constructor(e){this.config=e}apply(e){this.engine=e,Object.entries(Gc).forEach(([n,r])=>{e.on(n,u=>ae(this,null,function*(){const a=yield this.callLifecycleEvent(r,u);return a.includes(!1)?!1:a}))})}callLifecycleEvent(e,n){return ae(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[e])?[]:yield Promise.all(r[e].map(a=>ae(this,null,function*(){return yield this.engine.getAction().execAction(a,n)})))})}}class Jc{constructor(e){this.config=e}apply(e){this.engine=e,An.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(e,n){this.engine.on(e,r=>ae(this,null,function*(){if(!(e==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(e,n){return ae(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[e]))return[];const u=yield Promise.all(r[e].map(a=>ae(this,null,function*(){return yield this.engine.getAction().execAction(a,n)})));return u.includes(!1)?!1:u})}}class Xc{constructor(e){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=e,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var e;!((e=this.options)!=null&&e.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((n,r)=>(r.is_remember||n.push(...r.hide_controls),n),[]))}getDontHasPermissionControlIds(){var e;!((e=this.options)!=null&&e.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((n,r)=>(r.ctrlBehavior===1&&n.push(r.ctrlId),n),[]))}controlNeedComputedValue(e){if(!e)return!1;const n=this.getControlIsHide(e);return!(this.dontHasPermissionControlIds.includes(e.id)&&n||this.hideNotRememberControlIds.includes(e.id)&&n)}getControlIsHide(e){return e.props.isHide?!0:e.parent===null?!1:this.getControlIsHide(e.parent)}apply(e){this.engine=e,this.resetDependencies(),this.watchControlChange(),this.watchSubtableChange(),this.watchSchemaHideChange(),this.engine.on("engine-mounted",()=>{this.allCalcControlComputed()})}resetDependencies(){this.calcControls=[],this.dependenciesTriggerMap.clear(),this.getAllCalcControl(),this.getCalcDependencies()}allCalcControlComputed(){this.calcControls.forEach(e=>this.computedCalcValue(e))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(e=>e.type===I.CALC)}getCalcDependencies(){this.calcControls.forEach(e=>{const{scriptEcho:n}=e.props;n.forEach(r=>{(r.type===J.VariableInMainTable||r.type===J.VariableInCurrentSubTable||r.type===J.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,e),r.type===J.VariableInOtherSubTable&&r.subTableId&&this.setDependenciesTriggerMapItem(r.subTableId,e)})})}setDependenciesTriggerMapItem(e,n){this.dependenciesTriggerMap.has(e)||this.dependenciesTriggerMap.set(e,[]);const r=this.dependenciesTriggerMap.get(e);r.includes(n)||r.push(n)}getCalcControlsFromSubtableRows(e){return e.reduce((n,r)=>(r.children.forEach(u=>{const a=u.children[0];a&&this.engine.assertInstance(a,I.CALC)&&n.push(a)}),n),[])}watchSchemaHideChange(){this.engine.on("schema-change",e=>{var n;e.props==="isHide"&&((n=this.dependenciesTriggerMap.get(e.instance.id))!=null?n:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",e=>{var a,o,s;this.resetDependencies();const n=(o=(a=e.options)==null?void 0:a.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(n).forEach(c=>{this.computedCalcValue(c)}),((s=this.dependenciesTriggerMap.get(e.instance.id))!=null?s:[]).forEach(c=>{this.computedCalcValue(c)})})}watchControlChange(){this.engine.on("change",e=>{var u;const{instance:n}=e;if(!this.dependenciesTriggerMap.has(n.id))return;const r=(u=this.dependenciesTriggerMap.get(n.id))!=null?u:[];e.rowIndex!==void 0&&e.rowIndex>-1?r.forEach(a=>{this.controlInSubtable(a)&&this.engine.getInstanceRowIndex(a)!==e.rowIndex||this.computedCalcValue(a)}):r.forEach(a=>{this.computedCalcValue(a)})})}controlInSubtable(e){var n;return((n=e.parent)==null?void 0:n.type)===I.SUBTABLE_COLUMN}computedCalcValue(e){var c;const n=e.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,d)=>{if(d.type===J.Operator||d.type===J.Number)return l+d.name;let p=0,y;switch(d.type){case J.VariableInMainTable:{const v=this.getNumberValue(this.engine.getState(d.id));y=this.engine.getInstance(d.id),p=Number(v);break}case J.VariableInCurrentSubTable:{const v=this.engine.getInstanceRowIndex(e);y=this.engine.getInstance(d.id,v);const C=this.engine.getState(d.id,v),m=this.getNumberValue(C);p=Number(m);break}case J.VariableInOtherSubTable:{const v=this.engine.getState(d.id),C=Array.isArray(v)?v.map(w=>this.getNumberValue(w)):[],m=this.getAggregateTypeValue(C,d.aggregateType);y=this.engine.getInstance(d.subTableId),p=Number(m);break}}return!Number.isNaN(p)&&this.controlNeedComputedValue(y)?l+=`(${p})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=new Function(`return ${r}`)(),this.cacheComputedResult[r]=u);let a;if(this.controlInSubtable(e)&&(a=this.engine.getInstanceRowIndex(e),a===void 0))return;const o=this.engine.getState(e.id,a),s=!u||u===1/0||u===-1/0?0:e.props.precision===""?u:Number(u.toFixed(e.props.precision));s!==(o==null?void 0:o.result)&&this.engine.setState(e.id,{result:s,unit:(c=o==null?void 0:o.unit)!=null?c:""},a)}getNumberValue(e){if(typeof e=="object"&&e){if("result"in e)return e.result;if("amount"in e)return e.amount}return typeof e=="number"?e:0}getAggregateTypeValue(e,n){if(!n||!e||!e.length)return 0;switch(n){case me.MAX:return Math.max(...e);case me.MIN:return Math.min(...e);case me.SUM:return e.reduce((r,u)=>r+u);case me.AVG:return e.reduce((r,u)=>r+u)/e.length}}}class Qc{constructor(e){this.config=e}apply(e){var a,o;this.engine=e;const n=(o=(a=this.config)==null?void 0:a.source)!=null?o:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}D.CalcPlugin=Xc,D.ControlsEventPlugin=Jc,D.ES6ModulePlugin=zc,D.Engine=en,D.LifecycleEventPlugin=Kc,D.Plugin=Wc,D.StylePlugin=Qc,D.hasChildrenControl=st,D.loopDataViewControl=Pe,D.loopFormControl=Oe,D.parseModule=sr,Object.defineProperty(D,"__esModule",{value:!0})});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class ActionManager {
|
|
2
|
+
private actionMap;
|
|
3
|
+
private buildinActions;
|
|
4
|
+
/**
|
|
5
|
+
* 执行action的时候,作为第二个参数传递给方法,可以通过外部挂载
|
|
6
|
+
*/
|
|
7
|
+
actionUtils: {};
|
|
8
|
+
/**
|
|
9
|
+
* 用于存储es module解析出来的源码,CustomVueControlPlugin
|
|
10
|
+
*/
|
|
11
|
+
sources: {};
|
|
12
|
+
execAction(name: string, context: any, ...args: any[]): Promise<any>;
|
|
13
|
+
addAction(name: string, func: Function): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventPayload } from './Engine';
|
|
2
|
+
export declare class DataManager {
|
|
3
|
+
private _dataStore;
|
|
4
|
+
private executer?;
|
|
5
|
+
constructor(callbackExecuter: (payload: EventPayload) => Promise<any>);
|
|
6
|
+
add(key: string, data: any): void;
|
|
7
|
+
get(key: string): any;
|
|
8
|
+
remove(key: string): void;
|
|
9
|
+
getRemoteData(payload: EventPayload): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { ControlRuntimeInstance, ControlsInstance, ControlsKeys, DataBind, DeepPartial, LayoutControls, ObjectDataBind, RuntimeControl, RuntimeListControl, Schema } from '@byteluck-fe/model-driven-core';
|
|
2
|
+
import { Callback, Watcher } from '@byteluck-fe/model-driven-shared';
|
|
3
|
+
import { Plugin } from './Plugin';
|
|
4
|
+
import { Runtime, RuntimeProps } from './Runtime';
|
|
5
|
+
import { DataBindMappingFieldItem, dataBindMappingType, DataBindMappingTypeItem, StatesType, StateType } from './Store';
|
|
6
|
+
import { ActionManager } from './ActionManager';
|
|
7
|
+
import { DataManager } from './DataManager';
|
|
8
|
+
declare type dataSetType = {
|
|
9
|
+
[dataCode: string]: Record<string, unknown> | Record<string, unknown>[];
|
|
10
|
+
};
|
|
11
|
+
declare type FieldSetType = {
|
|
12
|
+
[fieldCode: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
interface EventPayload {
|
|
15
|
+
instance?: RuntimeControl;
|
|
16
|
+
value?: unknown;
|
|
17
|
+
rowIndex?: number;
|
|
18
|
+
options?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface SchemaEventPayload {
|
|
23
|
+
instance: RuntimeControl;
|
|
24
|
+
value: unknown;
|
|
25
|
+
props: string;
|
|
26
|
+
}
|
|
27
|
+
declare type EngineProps<T extends keyof LayoutControls = keyof LayoutControls> = {
|
|
28
|
+
schema: RuntimeProps['schema'];
|
|
29
|
+
beforeCreateInstance?: RuntimeProps['beforeCreateInstance'];
|
|
30
|
+
plugins?: Plugin[];
|
|
31
|
+
language?: string;
|
|
32
|
+
autoMount?: boolean;
|
|
33
|
+
debug?: boolean;
|
|
34
|
+
externalParams?: Record<string, unknown>;
|
|
35
|
+
};
|
|
36
|
+
declare type EventKeys = 'click' | 'click-finish' | 'wps-open' | 'wps-save' | 'wps-rename' | 'change' | 'schema-change' | 'search' | 'checked' | 'input' | 'focus' | 'blur' | 'list-change' | 'list-splice' | 'list-delete' | 'list-search' | 'list-mounted' | 'list-actions' | 'engine-mounted' | 'engine-submit' | 'engine-submit-params' | 'engine-submitted' | string;
|
|
37
|
+
declare class Engine extends Watcher<EventKeys> {
|
|
38
|
+
private store;
|
|
39
|
+
parent?: Engine;
|
|
40
|
+
runtime: Runtime;
|
|
41
|
+
isMounted: boolean;
|
|
42
|
+
id: string;
|
|
43
|
+
readonly externalParams?: Record<string, any>;
|
|
44
|
+
private __plugins;
|
|
45
|
+
private __pluginsApplied;
|
|
46
|
+
private readonly $options;
|
|
47
|
+
private actionManager;
|
|
48
|
+
private dataManager?;
|
|
49
|
+
private _jobTasks;
|
|
50
|
+
constructor(props: EngineProps);
|
|
51
|
+
private debugLog;
|
|
52
|
+
use(plugin: Plugin): this;
|
|
53
|
+
registerControl(...arg: Parameters<Runtime['register']>): this;
|
|
54
|
+
static register(...arg: Parameters<typeof Runtime['register']>): typeof import("@byteluck-fe/model-driven-core").RegisterControls;
|
|
55
|
+
static judgeControlIsRegistered(control: Parameters<typeof Runtime['register']>[0]): boolean;
|
|
56
|
+
mount(): void;
|
|
57
|
+
destroy(): void;
|
|
58
|
+
private _handlerProxyState;
|
|
59
|
+
private _proxyStateBeforeSetCallback;
|
|
60
|
+
private _proxyStateCallback;
|
|
61
|
+
private _handlerArrayUpdate;
|
|
62
|
+
private _handlerObjectUpdate;
|
|
63
|
+
private applyPlugins;
|
|
64
|
+
listControlCreateRow<RowType extends ControlsKeys>(instance: RuntimeListControl, rowType: RowType): InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<RowType, "Runtime">> | undefined;
|
|
65
|
+
listControlAddRow(instance: RuntimeListControl, rowType?: ControlsKeys): void;
|
|
66
|
+
emit(eventKey: EventKeys, payload: EventPayload): Promise<unknown[]>;
|
|
67
|
+
on(key: EventKeys, callback: Callback): void;
|
|
68
|
+
createControl(...args: Parameters<Runtime['createControl']>): never[];
|
|
69
|
+
createInstance<T extends ControlsKeys>(type: T, initSchema?: DeepPartial<Schema<T>>): ControlsInstance<T, 'Runtime'> | undefined;
|
|
70
|
+
createControlInstance: <T extends never>(type: T, initSchema?: DeepPartial<Schema<T, InstanceType<import("@byteluck-fe/model-driven-core").Controls[T]["Property"]>>> | undefined) => InstanceType<import("@byteluck-fe/model-driven-core").ControlsConstructor<T, "Runtime">> | undefined;
|
|
71
|
+
schemaEvent(eventKey: 'schema-change', payload: SchemaEventPayload): void;
|
|
72
|
+
updateInstanceProps(instance: SchemaEventPayload['instance'] | string, props: string, value: unknown, rowIndex?: number): void;
|
|
73
|
+
getRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
74
|
+
getAntdRules(controlId?: string): import("async-validator").Rules | undefined;
|
|
75
|
+
getState(controlId?: string, rowIndex?: number): unknown;
|
|
76
|
+
getEmptyState(controlId?: string): any;
|
|
77
|
+
/**
|
|
78
|
+
* 设置payload的options,提供在不是使用标准api修改state的时候可以传递options,会在本次任务执行完成之后清空
|
|
79
|
+
* @param options 需要携带的options
|
|
80
|
+
* */
|
|
81
|
+
setPayloadOptions(options: object | null): void;
|
|
82
|
+
setState(controlId: string, value: unknown, rowIndex?: number, options?: any): void;
|
|
83
|
+
/**
|
|
84
|
+
* 向Store设置一组值,明细表必须全量赋值,并触发事件(触发事件是根据组件在页面中的顺序逐个触发)
|
|
85
|
+
* @param states
|
|
86
|
+
*/
|
|
87
|
+
setStates(states: StatesType | StateType, rowIndex?: number, options?: any): void;
|
|
88
|
+
/**
|
|
89
|
+
* 通过dataCode和fieldCode来获取控件的值
|
|
90
|
+
* @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
|
|
91
|
+
* @param fieldCode 字段编码 - 控件绑定的数据项的编码
|
|
92
|
+
* @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
|
|
93
|
+
* */
|
|
94
|
+
getField(dataCode: string, fieldCode?: string, rowIndex?: number): unknown;
|
|
95
|
+
/**
|
|
96
|
+
* 通过dataCode和fieldCode来设置控件的值
|
|
97
|
+
* @param dataCode 模型编码 - 如果是主表的话就是主表的模型编码,明细子表的话就是子表的模型编码
|
|
98
|
+
* @param fieldCode 字段编码 - 控件绑定的数据项的编码
|
|
99
|
+
* @param value 修改的值
|
|
100
|
+
* @param rowIndex 行下标 - 如果是明细子表中的控件需要提供
|
|
101
|
+
* @param options 触发事件携带的参数
|
|
102
|
+
* */
|
|
103
|
+
setField(dataCode: string, fieldCode: string, value: unknown, rowIndex?: number, options?: EventPayload['options']): void;
|
|
104
|
+
/**
|
|
105
|
+
* 通过dataCode和 state来给一组控件赋值,并触发事件携带options
|
|
106
|
+
* @param dataCode 需要赋值的目标模型
|
|
107
|
+
* @param state 赋值对象,以fieldCode为key组成的对象
|
|
108
|
+
* @param rowIndex 行下标,给明细子表赋值时指定赋值某行
|
|
109
|
+
* @param options 触发事件携带的参数
|
|
110
|
+
* */
|
|
111
|
+
setFields(dataCode: string, state: FieldSetType, rowIndex?: number, options?: EventPayload['options']): void;
|
|
112
|
+
/**
|
|
113
|
+
* 通过dataCode来将state转化为标准的state结构
|
|
114
|
+
* @param dataCode 需要转换的目标模型code
|
|
115
|
+
* @param state 值对象,以fieldCode为key组成的对象
|
|
116
|
+
* */
|
|
117
|
+
buildFields(dataCode: string, state: FieldSetType): StateType | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* 向Store设置一组值,并触发事件携带options
|
|
120
|
+
* @param dataSet
|
|
121
|
+
* @options 传递给关联事件中 EventPayload中的options,一般在plugin中监听使用
|
|
122
|
+
*/
|
|
123
|
+
setData(dataSet: dataSetType, options?: any): void;
|
|
124
|
+
/**
|
|
125
|
+
* 获取控件的dataBind
|
|
126
|
+
* @param controlId
|
|
127
|
+
* */
|
|
128
|
+
getDataBind(controlId: string): DataBind | ObjectDataBind | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* 获取组件实例,传入rowIndex代表获取明细表内的控件实例,rowIndex传入-1代表获取表头内的实例
|
|
131
|
+
* @param controlId
|
|
132
|
+
* @param rowIndex
|
|
133
|
+
*/
|
|
134
|
+
getInstance(controlId: string, rowIndex?: number): ControlRuntimeInstance<ControlsKeys> | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* 获取组件实例,明细表中的组件将会得到数组, 第二个参数为(false/不传入)则获取到的是明细表内不包含表头内实例的所有控件实例,传入true则获取到包含表头内实例的所有控件实例,表头内实例永远在下标0的位置
|
|
137
|
+
* @param controlId
|
|
138
|
+
* @param header 明细表内是否获取表头的控件
|
|
139
|
+
*/
|
|
140
|
+
getInstances(controlId?: string, header?: boolean): ControlRuntimeInstance<ControlsKeys>[];
|
|
141
|
+
setInstance(instance: SchemaEventPayload['instance'] | string, props: string, value: unknown, rowIndex?: number): void;
|
|
142
|
+
getControlIdMapping(): import("./Store").controlIdMappingType;
|
|
143
|
+
getDataBindMapping(): dataBindMappingType;
|
|
144
|
+
getDataBindMapping(dataCode: string): DataBindMappingTypeItem | undefined;
|
|
145
|
+
getDataBindMapping(dataCode: string, fieldCode: string): DataBindMappingFieldItem | undefined;
|
|
146
|
+
getAction(): ActionManager;
|
|
147
|
+
initDataManager(callbackExecuter: (payload: EventPayload) => Promise<any>): void;
|
|
148
|
+
getDataManager(): DataManager | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* 判断控件的类型,返回当前控件的正确类型
|
|
151
|
+
* */
|
|
152
|
+
assertInstance<T extends ControlsKeys>(instance: ControlRuntimeInstance<ControlsKeys> | RuntimeControl, types: T | T[]): instance is ControlRuntimeInstance<T>;
|
|
153
|
+
/**
|
|
154
|
+
* 获取控件在明细子表中的行下标,
|
|
155
|
+
* 如果控件在表头内,则返回-1
|
|
156
|
+
* 如果控件在表内,则返回行下标
|
|
157
|
+
* 如果控件不在明细表内,则返回undefined
|
|
158
|
+
* */
|
|
159
|
+
getInstanceRowIndex(instance: ControlRuntimeInstance<ControlsKeys> | RuntimeControl): number | undefined;
|
|
160
|
+
getInstanceParentControl<T extends ControlsKeys>(instance: ControlRuntimeInstance<ControlsKeys> | RuntimeControl, controlType: T): ControlRuntimeInstance<T> | undefined;
|
|
161
|
+
getInstanceInSubtableHeader<T extends ControlsKeys>(instance: ControlRuntimeInstance<T> | RuntimeControl): ControlRuntimeInstance<T> | undefined;
|
|
162
|
+
setControlConfig(...args: Parameters<Runtime['registerControlConfig']>): Runtime;
|
|
163
|
+
getControlConfig(control: ControlsKeys): Readonly<Record<string, unknown>> | undefined;
|
|
164
|
+
}
|
|
165
|
+
export { Engine, EventPayload, SchemaEventPayload, EngineProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface WorkerMessage {
|
|
2
|
+
action: string;
|
|
3
|
+
payload: unknown;
|
|
4
|
+
}
|
|
5
|
+
declare class OkWorker {
|
|
6
|
+
worker?: Worker;
|
|
7
|
+
run(initState: any): void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
postMessage(message: WorkerMessage): void;
|
|
10
|
+
private static createWorker;
|
|
11
|
+
private static createWorkerFunction;
|
|
12
|
+
}
|
|
13
|
+
export { OkWorker };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RuleItem } from 'async-validator';
|
|
2
|
+
import { ControlRuntimeInstance, Schema, ControlsKeys, RegisterControls, BeforeCreateInstance } from '@byteluck-fe/model-driven-core';
|
|
3
|
+
declare type SchemaBaseType = Schema<ControlsKeys>;
|
|
4
|
+
export interface RuntimeProps {
|
|
5
|
+
schema: SchemaBaseType | SchemaBaseType[];
|
|
6
|
+
beforeCreateInstance?: BeforeCreateInstance;
|
|
7
|
+
}
|
|
8
|
+
export declare class Runtime extends RegisterControls<'Runtime'> {
|
|
9
|
+
private _schema;
|
|
10
|
+
private _instance;
|
|
11
|
+
private _flatInstances;
|
|
12
|
+
private _instanceMap;
|
|
13
|
+
constructor(props: RuntimeProps);
|
|
14
|
+
getFlatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
15
|
+
get schema(): SchemaBaseType | SchemaBaseType[];
|
|
16
|
+
get instance(): ControlRuntimeInstance<ControlsKeys>[];
|
|
17
|
+
get flatInstances(): ControlRuntimeInstance<ControlsKeys>[];
|
|
18
|
+
get instanceMap(): Record<string, ControlRuntimeInstance<ControlsKeys>[]>;
|
|
19
|
+
get rules(): Record<string, RuleItem>;
|
|
20
|
+
get antdRules(): Record<string, RuleItem>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RuntimeControl, DataBind, ObjectDataBind, OptionSetting } from '@byteluck-fe/model-driven-core';
|
|
2
|
+
export declare type StateType = {
|
|
3
|
+
[controlId: string]: unknown;
|
|
4
|
+
};
|
|
5
|
+
export declare type StatesType = {
|
|
6
|
+
[dataViewId: string]: StateType;
|
|
7
|
+
};
|
|
8
|
+
export declare type controlIdMappingType = {
|
|
9
|
+
[controlId: string]: {
|
|
10
|
+
dataBind: DataBind | ObjectDataBind;
|
|
11
|
+
dataView: string;
|
|
12
|
+
children?: controlIdMappingType;
|
|
13
|
+
options: Array<OptionSetting>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export interface DataBindMappingTypeItem {
|
|
17
|
+
controlId: string;
|
|
18
|
+
dataViewId: string;
|
|
19
|
+
fields: Array<DataBindMappingFieldItem>;
|
|
20
|
+
}
|
|
21
|
+
export interface DataBindMappingFieldItem {
|
|
22
|
+
fieldCode: string;
|
|
23
|
+
controlId: string;
|
|
24
|
+
dataBind: DataBind | ObjectDataBind;
|
|
25
|
+
dataViewId: string[];
|
|
26
|
+
}
|
|
27
|
+
export declare type dataBindMappingType = {
|
|
28
|
+
[dataCode: string]: DataBindMappingTypeItem;
|
|
29
|
+
};
|
|
30
|
+
declare type StoreProps = {
|
|
31
|
+
instance: RuntimeControl[];
|
|
32
|
+
};
|
|
33
|
+
declare class Store {
|
|
34
|
+
readonly emptyState: StatesType;
|
|
35
|
+
state: StatesType;
|
|
36
|
+
dataBindMapping: dataBindMappingType;
|
|
37
|
+
controlIdMapping: controlIdMappingType;
|
|
38
|
+
constructor(props: StoreProps);
|
|
39
|
+
/**
|
|
40
|
+
* 使用该方法仅改变数据,不会表单触发事件。明细表可全量赋值也可根据rowIndex进行单独设置
|
|
41
|
+
* @param controlId 组件ID
|
|
42
|
+
* @param value
|
|
43
|
+
*/
|
|
44
|
+
setState(controlId: string, value: unknown, rowIndex?: number): void;
|
|
45
|
+
getState(controlId: string, rowIndex?: number): unknown;
|
|
46
|
+
getEmptyState(controlId: string): unknown;
|
|
47
|
+
getDataBind(controlId: string): DataBind | ObjectDataBind | undefined;
|
|
48
|
+
}
|
|
49
|
+
export { Store };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
2
|
+
export declare function checkerValue(fieldType: FieldTypes, key: string, value: unknown, oldValue: unknown): unknown;
|
|
3
|
+
export declare function checkerSubtableValue(fieldTypeMap: Record<string, FieldTypes>, value: Record<string, any>, emptyValue: Record<string, any>): Record<string, any>;
|