@byteluck-fe/model-driven-engine 2.5.6 → 2.5.7

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.
@@ -1230,8 +1230,6 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1230
1230
  if (fieldMapping) {
1231
1231
  if (_instanceof(fieldMapping.dataBind, DataBind) && row[fieldCode] !== undefined) {
1232
1232
  newRow[fieldMapping.controlId] = row[fieldCode];
1233
- } else if (fieldCode === "uid" && row.uid !== undefined) {
1234
- newRow.uid = row.uid;
1235
1233
  } else if (_instanceof(fieldMapping.dataBind, ObjectDataBind)) {
1236
1234
  var _this_getEmptyState;
1237
1235
  var objValue = JSONCopy((_this_getEmptyState = _this.getEmptyState(fieldMapping.controlId)) !== null && _this_getEmptyState !== void 0 ? _this_getEmptyState : {});
@@ -1245,6 +1243,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1245
1243
  newRow[fieldMapping.controlId] = objValue;
1246
1244
  }
1247
1245
  }
1246
+ if (fieldCode === "uid" && row.uid !== undefined) {
1247
+ newRow.uid = row.uid;
1248
+ }
1248
1249
  });
1249
1250
  newState[mapping.dataViewId][mapping.controlId].push(newRow);
1250
1251
  });
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var PD=Object.defineProperty,TD=Object.defineProperties;var jD=Object.getOwnPropertyDescriptors;var Lo=Object.getOwnPropertySymbols,LD=Object.getPrototypeOf,kD=Object.prototype.hasOwnProperty,qD=Object.prototype.propertyIsEnumerable,VD=Reflect.get;var zn=Math.pow,ko=(V,ee,fe)=>ee in V?PD(V,ee,{enumerable:!0,configurable:!0,writable:!0,value:fe}):V[ee]=fe,ce=(V,ee)=>{for(var fe in ee||(ee={}))kD.call(ee,fe)&&ko(V,fe,ee[fe]);if(Lo)for(var fe of Lo(ee))qD.call(ee,fe)&&ko(V,fe,ee[fe]);return V},lu=(V,ee)=>TD(V,jD(ee));var qo=(V,ee,fe)=>VD(LD(V),fe,ee);var Je=(V,ee,fe)=>new Promise((Wn,un)=>{var Zn=Ge=>{try{qt(fe.next(Ge))}catch(Vt){un(Vt)}},Xn=Ge=>{try{qt(fe.throw(Ge))}catch(Vt){un(Vt)}},qt=Ge=>Ge.done?Wn(Ge.value):Promise.resolve(Ge.value).then(Zn,Xn);qt((fe=fe.apply(V,ee)).next())});(function(V,ee){typeof exports=="object"&&typeof module!="undefined"?ee(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],ee):(V=typeof globalThis!="undefined"?globalThis:V||self,ee(V.modelDrivenEngine={},V.require$$0))})(this,function(V,ee){"use strict";function fe(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Wn=fe(ee),un="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Zn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Xn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",qt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",Ge="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Vt="{caption}\u5FC5\u586B",Vo="\u8BF7\u8F93\u5165\u6807\u9898",Uo="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Ho="\u8BF7\u8F93\u5165\u884C\u6807\u9898",zo="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Wo="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",Zo="\u8BF7\u7ED1\u5B9A\u8868\u5355",Xo="\u8BF7\u7ED1\u5B9A\u5217\u8868",Jo="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",Go="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Ko="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Qo="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Yo="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",ea="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ta="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",na="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ra="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",ua="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",ia="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",oa="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",aa="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",sa="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",ca="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",fa="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",la="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",ha="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",da="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",pa="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",Da="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",ga="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ma="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",va="\u8BF7\u7ED1\u5B9A\u670D\u52A1",ya="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Ea="\u8BF7\u9009\u62E9\u7701",Aa="\u8BF7\u9009\u62E9\u5E02",wa="\u8BF7\u9009\u62E9\u533A",Fa="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Ca="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",ba="\u8BF7\u8F93\u5165\u5217\u5BBD",Ba="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",_a="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Sa="\u8BF7\u9009\u62E9\u63A7\u4EF6",Ma="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Na="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",Ia="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Oa="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",xa="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ra="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",$a="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Pa="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Ta="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",ja="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",La="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ka="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",qa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Va="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Ua="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Ha="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",za="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Wa="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Za="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Xa="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ja="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ga={isNotNumber:un,isNotString:Zn,isNotObject:Xn,isNotArray:qt,isNotBoolean:Ge,runtimeRequired:Vt,pleaseEnterCaption:Vo,pleaseEnterCaptionTip:Uo,pleaseEnterRowCaption:Ho,pleaseEnterPlaceholder:zo,pleaseEnterFieldCode:Wo,pleaseEnterForm:Zo,pleaseEnterList:Xo,pleaseEnterProcess:Jo,pleaseEnterLabel:Go,pleaseEnterValue:Ko,bizKeyNotBindFiled:Qo,pleaseSelectOneField:Yo,pleaseEnterNumberRange:ea,pleaseEnterAValueGreaterThanMin:ta,pleaseEnterAValueLessThanMax:na,numberRangeSetError:ra,stringRangeError:ua,attachmentMaxSize:ia,pleaseEnterTotalScoreSetting:oa,theTotalScoreMustNotBeLessThan1:aa,scoreDefaultValueRange:sa,attachmentLimitError:ca,PleaseReselectTheOptionalQuantity:fa,TheMaximumLengthIsGreaterThanTheMinimumLength:la,TheMinimumLengthIsGreaterThanTheMaximumLength:ha,PleaseSelectTheCorrectOptionSettings:da,optionIdIsRepeat:pa,optionIsRequired:Da,pleaseEnterDataCode:ga,pleaseEnterValueFieldCode:ma,pleaseEnterSvcCode:va,pleaseBindAtLeastOneDisplayValue:ya,pleaseSelectProvince:Ea,pleaseSelectCity:Aa,pleaseSelectDistrict:wa,limitRowsCannotBeLessThan0:Fa,TheNumberOfRowsCannotBeLessThanMinRows:Ca,pleaseEnterColumnWidth:ba,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ba,pleaseCompleteAllRulesAndConditions:_a,pleaseSelectControl:Sa,pleaseSelectAtLeastOneColumn:Ma,pleaseSelectFillBackMode:Na,pleaseSelectDashboard:Ia,rootNodeIsRequired:Oa,theViewNameCannotBeEmpty:xa,pleaseSelectOcrType:Ra,pleaseSelectAtLeastOneFieldToFillIn:$a,pleaseChooseAtLeastOne:Pa,pleaseEnterButtonContent:Ta,pleaseEnterDataCodeInDataSetting:ja,pleaseEnterValueFieldCodeInDataSetting:La,pleaseEnterSvcCodeInDataSetting:ka,pleaseBindAtLeastOneDisplayValueInDataSetting:qa,rootNodeIsRequiredInDataSetting:Va,pleaseEnterMaxHeight:Ua,pleaseEnter:Ha,pleaseEnterWatermark:za,pleaseEnterFileName:Wa,pleaseUploadAtLeastOnePrintTemplate:Za,pleaseAssignBusiness:Xa,pleaseAssignExternal:Ja},Ka="Please enter a number",Qa="Please enter a string",Ya="Please enter an object",es="Please enter an array",ts="Please enter a boolean",ns="{caption} Required",rs="Please enter the title",us="Please enter the bubble prompt",is="Please enter the row title",os="Please enter the prompt text",as="Please bind data items",ss="Please bind the form",cs="Please bind the list",fs="Please bind the process",ls="Please enter the displayed value",hs="Please enter the stored value",ds="The document number is not bound to the data item",ps="Please select at least one display field",Ds="Please enter a value greater than or equal to {min} and less than or equal to {max}",gs="Please enter a value greater than or equal to {min}",ms="Please enter a value less than or equal to {max}",vs="The value range is set incorrectly",ys="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",Es="The attachment size must be between 0MB and 1000MB",As="Please fill in the total score setting",ws="The total score cannot be less than 1",Fs="The default value must be between {min} and {max}",Cs="The number of attachments uploaded must be between {min} and {max}",bs="Please re-select the optional quantity",Bs="The maximum length of the control must be greater than the minimum length",_s="The minimum length of the control must be less than the maximum length",Ss="Please select the correct option setting",Ms="Option ID cannot be repeated",Ns="Please enter at least one option",Is="Please bind the data source",Os="Please bind the stored value",xs="Please bind the service",Rs="At least one display value must be bound",$s="Please select a province",Ps="Please select a city",Ts="Please select a district",js="The minimum number of lines to fill in cannot be less than 0",Ls="The number of rows cannot be less than {min} rows",ks="Please enter the column width",qs="Please set the logical relationship of all rule conditions",Vs="Please complete all rules and conditions",Us="please select control",Hs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",zs="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ws="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Zs="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Xs="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Js="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Gs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Ks="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Qs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Ys="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",ec="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",tc="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",nc="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",rc="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",uc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ic="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",oc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ac="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",sc={isNotNumber:Ka,isNotString:Qa,isNotObject:Ya,isNotArray:es,isNotBoolean:ts,runtimeRequired:ns,pleaseEnterCaption:rs,pleaseEnterCaptionTip:us,pleaseEnterRowCaption:is,pleaseEnterPlaceholder:os,pleaseEnterFieldCode:as,pleaseEnterForm:ss,pleaseEnterList:cs,pleaseEnterProcess:fs,pleaseEnterLabel:ls,pleaseEnterValue:hs,bizKeyNotBindFiled:ds,pleaseSelectOneField:ps,pleaseEnterNumberRange:Ds,pleaseEnterAValueGreaterThanMin:gs,pleaseEnterAValueLessThanMax:ms,numberRangeSetError:vs,stringRangeError:ys,attachmentMaxSize:Es,pleaseEnterTotalScoreSetting:As,theTotalScoreMustNotBeLessThan1:ws,scoreDefaultValueRange:Fs,attachmentLimitError:Cs,PleaseReselectTheOptionalQuantity:bs,TheMaximumLengthIsGreaterThanTheMinimumLength:Bs,TheMinimumLengthIsGreaterThanTheMaximumLength:_s,PleaseSelectTheCorrectOptionSettings:Ss,optionIdIsRepeat:Ms,optionIsRequired:Ns,pleaseEnterDataCode:Is,pleaseEnterValueFieldCode:Os,pleaseEnterSvcCode:xs,pleaseBindAtLeastOneDisplayValue:Rs,pleaseSelectProvince:$s,pleaseSelectCity:Ps,pleaseSelectDistrict:Ts,limitRowsCannotBeLessThan0:js,TheNumberOfRowsCannotBeLessThanMinRows:Ls,pleaseEnterColumnWidth:ks,pleaseSetTheLogicalRelationshipOfAllRuleConditions:qs,pleaseCompleteAllRulesAndConditions:Vs,pleaseSelectControl:Us,pleaseSelectDashboard:Hs,theViewNameCannotBeEmpty:zs,pleaseSelectOcrType:Ws,pleaseSelectAtLeastOneFieldToFillIn:Zs,pleaseChooseAtLeastOne:Xs,pleaseEnterButtonContent:Js,pleaseEnterDataCodeInDataSetting:Gs,pleaseEnterValueFieldCodeInDataSetting:Ks,pleaseEnterSvcCodeInDataSetting:Qs,pleaseBindAtLeastOneDisplayValueInDataSetting:Ys,rootNodeIsRequiredInDataSetting:ec,pleaseEnterMaxHeight:tc,pleaseEnter:nc,pleaseEnterWatermark:rc,pleaseEnterFileName:uc,pleaseUploadAtLeastOnePrintTemplate:ic,pleaseAssignBusiness:oc,pleaseAssignExternal:ac},cc="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",fc="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",lc="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",hc="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",dc="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",pc="{caption}\u5FC5\u9808",Dc="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",gc="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",mc="\u884C\u30D8\u30C3\u30C0\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",vc="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",yc="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Ec="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Ac="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",wc="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Fc="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Cc="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",bc="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Bc="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",_c="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Sc="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Mc="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Nc="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ic="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Oc="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",xc="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Rc="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",$c="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Pc="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Tc="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",jc="\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",Lc="\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",kc="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",qc="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Vc="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Uc="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Hc="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",zc="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Wc="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",Zc="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Xc="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Jc="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Gc="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Kc="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Qc="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Yc="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",ef="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",tf="please select control",nf="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",rf="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",uf="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",of="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",af="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",sf="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",cf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ff="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",lf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",hf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",df="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",pf="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Df="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",gf="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",mf="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",vf="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",yf="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ef="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Af={isNotNumber:cc,isNotString:fc,isNotObject:lc,isNotArray:hc,isNotBoolean:dc,runtimeRequired:pc,pleaseEnterCaption:Dc,pleaseEnterCaptionTip:gc,pleaseEnterRowCaption:mc,pleaseEnterPlaceholder:vc,pleaseEnterFieldCode:yc,pleaseEnterForm:Ec,pleaseEnterList:Ac,pleaseEnterProcess:wc,pleaseEnterLabel:Fc,pleaseEnterValue:Cc,bizKeyNotBindFiled:bc,pleaseSelectOneField:Bc,pleaseEnterNumberRange:_c,pleaseEnterAValueGreaterThanMin:Sc,pleaseEnterAValueLessThanMax:Mc,numberRangeSetError:Nc,stringRangeError:Ic,attachmentMaxSize:Oc,pleaseEnterTotalScoreSetting:xc,theTotalScoreMustNotBeLessThan1:Rc,scoreDefaultValueRange:$c,attachmentLimitError:Pc,PleaseReselectTheOptionalQuantity:Tc,TheMaximumLengthIsGreaterThanTheMinimumLength:jc,TheMinimumLengthIsGreaterThanTheMaximumLength:Lc,PleaseSelectTheCorrectOptionSettings:kc,optionIdIsRepeat:qc,optionIsRequired:Vc,pleaseEnterDataCode:Uc,pleaseEnterValueFieldCode:Hc,pleaseEnterSvcCode:zc,pleaseBindAtLeastOneDisplayValue:Wc,pleaseSelectProvince:Zc,pleaseSelectCity:Xc,pleaseSelectDistrict:Jc,limitRowsCannotBeLessThan0:Gc,TheNumberOfRowsCannotBeLessThanMinRows:Kc,pleaseEnterColumnWidth:Qc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Yc,pleaseCompleteAllRulesAndConditions:ef,pleaseSelectControl:tf,pleaseSelectDashboard:nf,theViewNameCannotBeEmpty:rf,pleaseSelectOcrType:uf,pleaseSelectAtLeastOneFieldToFillIn:of,pleaseChooseAtLeastOne:af,pleaseEnterButtonContent:sf,pleaseEnterDataCodeInDataSetting:cf,pleaseEnterValueFieldCodeInDataSetting:ff,pleaseEnterSvcCodeInDataSetting:lf,pleaseBindAtLeastOneDisplayValueInDataSetting:hf,rootNodeIsRequiredInDataSetting:df,pleaseEnterMaxHeight:pf,pleaseEnter:Df,pleaseEnterWatermark:gf,pleaseEnterFileName:mf,pleaseUploadAtLeastOnePrintTemplate:vf,pleaseAssignBusiness:yf,pleaseAssignExternal:Ef},wf={zhCN:Ga,enUS:sc,jaJP:Af},Le;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(Le||(Le={}));var At;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(At||(At={}));var hu="zh-CN";function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(X||(X={}));var pe;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.ORGANIZATION_SELECTION="organization-selection",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(pe||(pe={}));var ie;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(ie||(ie={}));var Ee;Ee={},_e(Ee,"array","array-column"),_e(Ee,"auto_number","auto-number-column"),_e(Ee,"decimal","decimal-column"),_e(Ee,"department","department-column"),_e(Ee,"file","file-column"),_e(Ee,"image","image-column"),_e(Ee,"location","location-column"),_e(Ee,"people","employee-column"),_e(Ee,"text","text-column"),_e(Ee,"timescope","timescope-column"),_e(Ee,"timestamp","timestamp-column"),_e(Ee,"varchar","varchar-column"),_e(Ee,"relation","varchar-column");var du;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATEHOUR="datehour",e.DATEMIN="datemin",e.DATETIME="datetime"})(du||(du={}));var pu="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",Ff=pu+"0123456789";function Jn(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?pu:Ff,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function Gn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cf(e){if(Array.isArray(e))return Gn(e)}function bf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function on(e,t,n){return vu()?on=Reflect.construct:on=function(u,i,o){var c=[null];c.push.apply(c,i);var f=Function.bind.apply(u,c),l=new f;return o&&Ht(l,o.prototype),l},on.apply(null,arguments)}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ut(e)}function gu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ht(e,t)}function Bf(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _f(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sf(){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 Mf(e,t){return t&&(Nf(t)==="object"||typeof t=="function")?t:bf(e)}function Ht(e,t){return Ht=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ht(e,t)}function mu(e){return Cf(e)||_f(e)||If(e)||Sf()}function Nf(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function If(e,t){if(!!e){if(typeof e=="string")return Gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gn(e,t)}}function Kn(e){var t=typeof Map=="function"?new Map:void 0;return Kn=function(r){if(r===null||!Bf(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return on(r,arguments,Ut(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ht(u,r)},Kn(e)}function vu(){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(e){return!1}}function yu(e){var t=vu();return function(){var r=Ut(e),u;if(t){var i=Ut(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Mf(this,u)}}var Qn=console;function et(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Qn).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(mu(u)))}function Yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Qn).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(mu(u)))}function Of(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var er=function(e){gu(n,e);var t=yu(n);function n(r){Du(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?Of(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Kn(Error)),xf=function(e){gu(n,e);var t=yu(n);function n(r){Du(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(er);function Ke(e){throw new er(e)}function Eu(e){throw new xf(e)}function an(e){Qn.error(new er(e))}function Dt(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":Dt(n==null?void 0:n.children,t);break;case"search":Dt(n==null?void 0:n.children,t);break;case"form":t(n)}})}var Rf=Object.prototype.toString;function Au(e,t){return Rf.call(e)==="[object "+t+"]"}function $f(e){return Au(e,"String")}function Pf(e){return Au(e,"Promise")}var Tf=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();Pf(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,i,o,c){if(u!==void 0){var f=u[i];if(!(o===c.length-1&&!$f(f)))return f}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var i=n[u];return i!==void 0?String(i):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function jf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lf(e,t,n){return t&&wu(e.prototype,t),n&&wu(e,n),e}function kf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Se=function(){function e(){jf(this,e)}return Lf(e,null,[{key:"getMessage",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)}},{key:"resetI18n",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hu;return new Tf({locale:n,messages:wf})}},{key:"setLocale",value:function(n){return this.$i18n.setLocale(n)}}]),e}();kf(Se,"$i18n",Se.resetI18n());function tr(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return r.reduce(function(i,o,c,f){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){et("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return c===f.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},e),u}var tt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function qf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nr={exports:{}};(function(e){(function(t){var n=function(m,A,N){if(!l(A)||a(A)||h(A)||d(A)||f(A))return A;var B,M=0,R=0;if(s(A))for(B=[],R=A.length;M<R;M++)B.push(n(m,A[M],N));else{B={};for(var x in A)Object.prototype.hasOwnProperty.call(A,x)&&(B[m(x,N)]=n(m,A[x],N))}return B},r=function(m,A){A=A||{};var N=A.separator||"_",B=A.split||/(?=[A-Z])/;return m.split(B).join(N)},u=function(m){return p(m)?m:(m=m.replace(/[\-_\s]+(.)?/g,function(A,N){return N?N.toUpperCase():""}),m.substr(0,1).toLowerCase()+m.substr(1))},i=function(m){var A=u(m);return A.substr(0,1).toUpperCase()+A.substr(1)},o=function(m,A){return r(m,A).toLowerCase()},c=Object.prototype.toString,f=function(m){return typeof m=="function"},l=function(m){return m===Object(m)},s=function(m){return c.call(m)=="[object Array]"},a=function(m){return c.call(m)=="[object Date]"},h=function(m){return c.call(m)=="[object RegExp]"},d=function(m){return c.call(m)=="[object Boolean]"},p=function(m){return m=m-0,m===m},g=function(m,A){var N=A&&"process"in A?A.process:A;return typeof N!="function"?m:function(B,M){return N(B,m,M)}},y={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(m,A){return n(g(u,A),m)},decamelizeKeys:function(m,A){return n(g(o,A),m,A)},pascalizeKeys:function(m,A){return n(g(i,A),m)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=y:t.humps=y})(tt)})(nr);var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});function rr(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(t=>typeof t!="object"||t===null?t:rr(t));{const t={};for(const n in e){const r=e[n];t[n]=typeof r!="object"||r===null?r:rr(r)}return t}}var Vf=Fu.default=rr;function te(e){if(e!==void 0)return typeof e=="object"?Vf(e):e}function ze(e){return Object.prototype.toString.call(e)==="[object Object]"}function Uf(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function wt(e){return Array.isArray(e)}function Me(e){return typeof e=="string"}function sn(e){return typeof e=="number"}function Cu(e){return typeof e=="function"}function Hf(e){return wt(e)&&e.every(function(t){return Me(t)})}function zf(e){return wt(e)&&e.every(function(t){return sn(t)||t===""})}function bu(e){return/^\[.*?]$/.test(e)}function cn(e){return/^{.*?}$/.test(e)}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wf(e){if(Array.isArray(e))return ur(e)}function Bu(e,t,n,r,u,i,o){try{var c=e[i](o),f=c.value}catch(l){n(l);return}c.done?t(f):Promise.resolve(f).then(r,u)}function Zf(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(f){Bu(i,r,u,o,c,"next",f)}function c(f){Bu(i,r,u,o,c,"throw",f)}o(void 0)})}}function Xf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jf(e,t,n){return t&&_u(e.prototype,t),n&&_u(e,n),e}function Su(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kf(){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 ir(e){return Wf(e)||Gf(e)||Qf(e)||Kf()}function Qf(e,t){if(!!e){if(typeof e=="string")return ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(e,t)}}function Yf(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(s){return f([l,s])}}function f(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(s){l=[6,s],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Mu=function(){function e(){Xf(this,e),Su(this,"_events",new Map),Su(this,"debug",!1)}return Jf(e,[{key:"emit",value:function(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),i=1;i<r;i++)u[i-1]=arguments[i];var o=this;return Zf(function(){var c,f,l,s,a,h,d,p,g,y,m,A;return Yf(this,function(N){switch(N.label){case 0:if(c=o._events.get(n),f=[],!c)return[3,10];l=c.slice(),s=!0,a=!1,h=void 0,N.label=1;case 1:N.trys.push([1,8,9,10]),d=l[Symbol.iterator](),N.label=2;case 2:if(s=(p=d.next()).done)return[3,7];if(g=p.value,!c.includes(g))return[3,6];N.label=3;case 3:return N.trys.push([3,5,,6]),o.debug&&Yn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(g.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+g.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(u.map(function(){return"%o"}).join(","),"\u3002")].concat(ir(u))),[4,g.apply(null,ir(u))];case 4:return y=N.sent(),o.debug&&Yn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(g.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+g.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(u.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(ir(u),[y])),f.push(y),y===!1?[3,7]:[3,6];case 5:return m=N.sent(),an(String(m)+":"+String(m.stack)),[3,6];case 6:return s=!0,[3,2];case 7:return[3,10];case 8:return A=N.sent(),a=!0,h=A,[3,10];case 9:try{!s&&d.return!=null&&d.return()}finally{if(a)throw h}return[7];case 10:return[2,f]}})})()}},{key:"on",value:function(n,r){if(this._events.has(n)){var u;(u=this._events.get(n))===null||u===void 0||u.push(r)}else this._events.set(n,[r])}},{key:"off",value:function(n,r){if(this._events.has(n)){var u=this._events.get(n),i=u==null?void 0:u.indexOf(r);u==null||u.splice(i,1)}}},{key:"delete",value:function(n){this._events.has(n)&&this._events.delete(n)}},{key:"clear",value:function(){this._events=new Map}}]),e}();function el(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tl(e,t,n){return t&&Nu(e.prototype,t),n&&Nu(e,n),e}function nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rl=[{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_list_before_insert",name:"\u5217\u8868\u6570\u636E\u63D2\u5165\u524D",code:"list-before-insert"},{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_render_operation",name:"\u64CD\u4F5C\u5217\u6E32\u67D3\u65F6",code:"list-render-operation"},{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"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rows-checked"},{key:"on_change_tab",name:"\u6807\u7B7E\u9875\u5207\u6362\u65F6",code:"change-tab"},{key:"on_modal_ok",name:"\u5F39\u7A97\u786E\u8BA4\u65F6",code:"modal-ok"}],Iu=function(){function e(){el(this,e)}return tl(e,[{key:"getEventsFromKeys",value:function(n){var r=typeof n=="string"?[n]:n;return e.events.filter(function(u){return r.includes(u.key)})}}]),e}();nl(Iu,"events",rl);function ul(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ou(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function il(e,t,n){return t&&Ou(e.prototype,t),n&&Ou(e,n),e}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xu=[],fn=function(){function e(t){ul(this,e),gt(this,"registeredControlTypes",new Set),gt(this,"controlConfigMap",new Map),gt(this,"_controls",[]),gt(this,"_type",void 0),this._type=t,this._initControls(t)}return il(e,[{key:"registerControlConfig",value:function(n,r){return this.controlConfigMap.set(n,r),this}},{key:"getControlConfig",value:function(n){return this.controlConfigMap.get(n)}},{key:"getControls",value:function(){return this._controls}},{key:"register",value:function(n){n.__is_control__||Ke("".concat(n.name," is not a Control"));var r=this._controls.findIndex(function(u){return u.controlType===n.controlType});return r>-1&&(et("The ".concat(n.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(r,1)),this.registeredControlTypes.add(n.controlType),this._controls.push(n),this}},{key:"isLayoutControl",value:function(n){return n.controlType===X.LAYOUT}},{key:"isFormControl",value:function(n){return n.controlType===X.FORM}},{key:"isListControl",value:function(n){return n.controlType===X.LIST}},{key:"isColumnControl",value:function(n){return n.controlType===X.COLUMN}},{key:"createControl",value:function(n,r){var u=this;if(Array.isArray(n))return n.map(function(l){return u.createControl(l,r)});n.children&&(n.children=n.children.map(function(l){return u.createControl(l,r)})),this.isListControl(n)&&n.props.headers&&(n.props.headers=n.props.headers.map(function(l){return u.createControl(l,r)}));var i=this.getControlFormType(n.type);if(i){var o=n;if(typeof r=="function"){var c=r(o);c&&(o=c)}var f=new i(o);return f}else Ke("The constructor of ".concat(n.type," could not be found, please confirm that the constructor has been registered"))}},{key:"createControlInstance",value:function(n,r){var u=this.getControlFormType(n);if(u)return new u(r)}},{key:"getControlFormType",value:function(n){return this._controls.find(function(r){return r.controlType===n})}},{key:"_initControls",value:function(n){var r=this;this.constructor.staticControls.forEach(function(u){r.register(u[n])})}}],[{key:"register",value:function(n){var r=n.Designer,u=n.Runtime;(!r||!u||!r.__is_control__||!u.__is_control__)&&Ke("".concat(n," is can't register as a Control"));var i=this.staticControls.findIndex(function(o){return o.Designer.controlType===r.controlType});return i>-1&&(et("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(i,1)),this.staticRegisteredTypes.add(r.controlType),this.staticControls.push(n),this}}]),e}();gt(fn,"staticControls",xu),gt(fn,"staticRegisteredTypes",new Set(xu.map(function(e){return e.Designer.controlType}))),gt(fn,"staticRegisteredConfigs",new Map);function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=function e(t){nt(this,e),ne(this,"dataCode",void 0),ne(this,"fieldCode",void 0),ne(this,"fieldType",void 0);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},ol=function e(t){nt(this,e),ne(this,"minWidth",void 0),ne(this,"maxWidth",void 0),ne(this,"flex",void 0);var n;this.minWidth=(n=t==null?void 0:t.minWidth)!==null&&n!==void 0?n:150,this.maxWidth=t==null?void 0:t.maxWidth;var r;this.flex=(r=t==null?void 0:t.flex)!==null&&r!==void 0?r:1},rt=function e(){nt(this,e)},ln=function e(t){nt(this,e),ne(this,"amount",void 0),ne(this,"currency",void 0);var n;this.amount=(n=t==null?void 0:t.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=t==null?void 0:t.currency)!==null&&r!==void 0?r:"CNY"},hn=function e(t){nt(this,e),ne(this,"min",void 0),ne(this,"max",void 0);var n;this.min=(n=t==null?void 0:t.min)!==null&&n!==void 0?n:"";var r;this.max=(r=t==null?void 0:t.max)!==null&&r!==void 0?r:""},dn=function e(t){nt(this,e),ne(this,"city",void 0),ne(this,"cityDisplay",void 0),ne(this,"district",void 0),ne(this,"districtDisplay",void 0),ne(this,"province",void 0),ne(this,"provinceDisplay",void 0);var n;this.city=(n=t==null?void 0:t.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=t==null?void 0:t.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=t==null?void 0:t.district)!==null&&u!==void 0?u:"";var i;this.districtDisplay=(i=t==null?void 0:t.districtDisplay)!==null&&i!==void 0?i:"";var o;this.province=(o=t==null?void 0:t.province)!==null&&o!==void 0?o:"";var c;this.provinceDisplay=(c=t==null?void 0:t.provinceDisplay)!==null&&c!==void 0?c:""},pn=function e(t){nt(this,e),ne(this,"result",void 0),ne(this,"unit",void 0);var n;this.result=(n=t==null?void 0:t.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=t==null?void 0:t.unit)!==null&&r!==void 0?r:""},Ru;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(Ru||(Ru={}));var $u;(function(e){e.DEFAULT_DISPLAY="defaultDisplay",e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.VIEW_FORM_MODEL_TYPE="viewFormModelType",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions",e.IS_PASTE="isPaste"})($u||($u={}));var or;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(or||(or={}));var al=function e(t){nt(this,e),ne(this,"width",void 0),ne(this,"height",void 0),ne(this,"widthConfig",void 0),ne(this,"heightConfig",void 0);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var i;this.heightConfig=(i=t==null?void 0:t.heightConfig)!==null&&i!==void 0?i:"fill"};function sl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ar(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e,t,n){return Pu()?Dn=Reflect.construct:Dn=function(u,i,o){var c=[null];c.push.apply(c,i);var f=Function.bind.apply(u,c),l=new f;return o&&Wt(l,o.prototype),l},Dn.apply(null,arguments)}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zt(e){return zt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zt(e)}function cl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wt(e,t)}function fl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ll(e,t){return t&&(hl(t)==="object"||typeof t=="function")?t:sl(e)}function Wt(e,t){return Wt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Wt(e,t)}function hl(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function sr(e){var t=typeof Map=="function"?new Map:void 0;return sr=function(r){if(r===null||!fl(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return Dn(r,arguments,zt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Wt(u,r)},sr(e)}function Pu(){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(e){return!1}}function dl(e){var t=Pu();return function(){var r=zt(e),u;if(t){var i=zt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return ll(this,u)}}var cr=function e(t){ar(this,e),mt(this,"isHide",{type:"boolean"})},Tu=function(e){cl(n,e);var t=dl(n);function n(r){return ar(this,n),t.call(this)}return n}(sr(Array)),ut=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ar(this,e),mt(this,"isHide",void 0),mt(this,"className",void 0),mt(this,"style",void 0),mt(this,"caption",void 0);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new al(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};mt(ut,"Rules",cr),mt(ut,"RuntimeRules",Tu);function We(){return We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},We.apply(this,arguments)}function pl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function fr(e){return fr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fr(e)}function gn(e,t){return gn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},gn(e,t)}function Dl(){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(e){return!1}}function mn(e,t,n){return Dl()?mn=Reflect.construct:mn=function(u,i,o){var c=[null];c.push.apply(c,i);var f=Function.bind.apply(u,c),l=new f;return o&&gn(l,o.prototype),l},mn.apply(null,arguments)}function gl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function lr(e){var t=typeof Map=="function"?new Map:void 0;return lr=function(r){if(r===null||!gl(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return mn(r,arguments,fr(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),gn(u,r)},lr(e)}var ml=/%[sdj%]/g,ju=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(ju=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function hr(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Ne(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],i=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var o=String(u).replace(ml,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(f){return"[Circular]"}break;default:return c}});return o}return u}function vl(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function le(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||vl(t)&&typeof e=="string"&&!e)}function yl(e,t,n){var r=[],u=0,i=e.length;function o(c){r.push.apply(r,c),u++,u===i&&n(r)}e.forEach(function(c){t(c,o)})}function Lu(e,t,n){var r=0,u=e.length;function i(o){if(o&&o.length){n(o);return}var c=r;r=r+1,c<u?t(e[c],i):n([])}i([])}function El(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var ku=function(e){pl(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(lr(Error));function Al(e,t,n,r){if(t.first){var u=new Promise(function(a,h){var d=function(y){return r(y),y.length?h(new ku(y,hr(y))):a()},p=El(e);Lu(p,n,d)});return u.catch(function(a){return a}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),c=o.length,f=0,l=[],s=new Promise(function(a,h){var d=function(g){if(l.push.apply(l,g),f++,f===c)return r(l),l.length?h(new ku(l,hr(l))):a()};o.length||(r(l),a()),o.forEach(function(p){var g=e[p];i.indexOf(p)!==-1?Lu(g,n,d):yl(g,n,d)})});return s.catch(function(a){return a}),s}function qu(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function Vu(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=We(We({},e[n]),r):e[n]=r}}return e}function Uu(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||le(t,i||e.type))&&r.push(Ne(u.messages.required,e.fullField))}function wl(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(Ne(u.messages.whitespace,e.fullField))}var dr={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},Zt={integer:function(t){return Zt.number(t)&&parseInt(t,10)===t},float:function(t){return Zt.number(t)&&!Zt.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Zt.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(dr.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(dr.url)},hex:function(t){return typeof t=="string"&&!!t.match(dr.hex)}};function Fl(e,t,n,r,u){if(e.required&&t===void 0){Uu(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?Zt[o](t)||r.push(Ne(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(Ne(u.messages.types[o],e.fullField,e.type))}function Cl(e,t,n,r,u){var i=typeof e.len=="number",o=typeof e.min=="number",c=typeof e.max=="number",f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,s=null,a=typeof t=="number",h=typeof t=="string",d=Array.isArray(t);if(a?s="number":h?s="string":d&&(s="array"),!s)return!1;d&&(l=t.length),h&&(l=t.replace(f,"_").length),i?l!==e.len&&r.push(Ne(u.messages[s].len,e.fullField,e.len)):o&&!c&&l<e.min?r.push(Ne(u.messages[s].min,e.fullField,e.min)):c&&!o&&l>e.max?r.push(Ne(u.messages[s].max,e.fullField,e.max)):o&&c&&(l<e.min||l>e.max)&&r.push(Ne(u.messages[s].range,e.fullField,e.min,e.max))}var Ct="enum";function bl(e,t,n,r,u){e[Ct]=Array.isArray(e[Ct])?e[Ct]:[],e[Ct].indexOf(t)===-1&&r.push(Ne(u.messages[Ct],e.fullField,e[Ct].join(", ")))}function Bl(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Ne(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var i=new RegExp(e.pattern);i.test(t)||r.push(Ne(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var k={required:Uu,whitespace:wl,type:Fl,range:Cl,enum:bl,pattern:Bl};function _l(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t,"string")&&!e.required)return n();k.required(e,t,r,i,u,"string"),le(t,"string")||(k.type(e,t,r,i,u),k.range(e,t,r,i,u),k.pattern(e,t,r,i,u),e.whitespace===!0&&k.whitespace(e,t,r,i,u))}n(i)}function Sl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}function Ml(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function Nl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}function Il(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),le(t)||k.type(e,t,r,i,u)}n(i)}function Ol(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function xl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function Rl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return n();k.required(e,t,r,i,u,"array"),t!=null&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function $l(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}var Pl="enum";function Tl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k[Pl](e,t,r,i,u)}n(i)}function jl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t,"string")&&!e.required)return n();k.required(e,t,r,i,u),le(t,"string")||k.pattern(e,t,r,i,u)}n(i)}function Ll(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t,"date")&&!e.required)return n();if(k.required(e,t,r,i,u),!le(t,"date")){var c;t instanceof Date?c=t:c=new Date(t),k.type(e,c,r,i,u),c&&k.range(e,c.getTime(),r,i,u)}}n(i)}function kl(e,t,n,r,u){var i=[],o=Array.isArray(t)?"array":typeof t;k.required(e,t,r,i,u,o),n(i)}function pr(e,t,n,r,u){var i=e.type,o=[],c=e.required||!e.required&&r.hasOwnProperty(e.field);if(c){if(le(t,i)&&!e.required)return n();k.required(e,t,r,o,u,i),le(t,i)||k.type(e,t,r,o,u)}n(o)}function ql(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(le(t)&&!e.required)return n();k.required(e,t,r,i,u)}n(i)}var Xt={string:_l,method:Sl,number:Ml,boolean:Nl,regexp:Il,integer:Ol,float:xl,array:Rl,object:$l,enum:Tl,pattern:jl,date:Ll,url:pr,hex:pr,email:pr,required:kl,any:ql};function Dr(){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 t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var gr=Dr();function it(e){this.rules=null,this._messages=gr,this.define(e)}it.prototype={messages:function(t){return t&&(this._messages=Vu(Dr(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var i=t,o=n,c=r;if(typeof o=="function"&&(c=o,o={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(),Promise.resolve();function f(g){var y,m=[],A={};function N(B){if(Array.isArray(B)){var M;m=(M=m).concat.apply(M,B)}else m.push(B)}for(y=0;y<g.length;y++)N(g[y]);m.length?A=hr(m):(m=null,A=null),c(m,A)}if(o.messages){var l=this.messages();l===gr&&(l=Dr()),Vu(l,o.messages),o.messages=l}else o.messages=this.messages();var s,a,h={},d=o.keys||Object.keys(this.rules);d.forEach(function(g){s=u.rules[g],a=i[g],s.forEach(function(y){var m=y;typeof m.transform=="function"&&(i===t&&(i=We({},i)),a=i[g]=m.transform(a)),typeof m=="function"?m={validator:m}:m=We({},m),m.validator=u.getValidationMethod(m),m.field=g,m.fullField=m.fullField||g,m.type=u.getType(m),m.validator&&(h[g]=h[g]||[],h[g].push({rule:m,value:a,source:i,field:g}))})});var p={};return Al(h,o,function(g,y){var m=g.rule,A=(m.type==="object"||m.type==="array")&&(typeof m.fields=="object"||typeof m.defaultField=="object");A=A&&(m.required||!m.required&&g.value),m.field=g.field;function N(R,x){return We(We({},x),{},{fullField:m.fullField+"."+R})}function B(R){R===void 0&&(R=[]);var x=R;if(Array.isArray(x)||(x=[x]),!o.suppressWarning&&x.length&&it.warning("async-validator:",x),x.length&&m.message!==void 0&&(x=[].concat(m.message)),x=x.map(qu(m)),o.first&&x.length)return p[m.field]=1,y(x);if(!A)y(x);else{if(m.required&&!g.value)return m.message!==void 0?x=[].concat(m.message).map(qu(m)):o.error&&(x=[o.error(m,Ne(o.messages.required,m.field))]),y(x);var j={};if(m.defaultField)for(var z in g.value)g.value.hasOwnProperty(z)&&(j[z]=m.defaultField);j=We(We({},j),g.rule.fields);for(var J in j)if(j.hasOwnProperty(J)){var U=Array.isArray(j[J])?j[J]:[j[J]];j[J]=U.map(N.bind(null,J))}var ae=new it(j);ae.messages(o.messages),g.rule.options&&(g.rule.options.messages=o.messages,g.rule.options.error=o.error),ae.validate(g.value,g.rule.options||o,function(re){var ue=[];x&&x.length&&ue.push.apply(ue,x),re&&re.length&&ue.push.apply(ue,re),y(ue.length?ue:null)})}}var M;m.asyncValidator?M=m.asyncValidator(m,g.value,B,g.source,o):m.validator&&(M=m.validator(m,g.value,B,g.source,o),M===!0?B():M===!1?B(m.message||m.field+" fails"):M instanceof Array?B(M):M instanceof Error&&B(M.message)),M&&M.then&&M.then(function(){return B()},function(R){return B(R)})},function(g){f(g)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Xt.hasOwnProperty(t.type))throw new Error(Ne("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?Xt.required:Xt[this.getType(t)]||!1}},it.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Xt[t]=n},it.warning=ju,it.messages=gr,it.validators=Xt;var Vl={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 Ul(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new it(e);return n.messages(Object.assign(Vl,t)),n}var Hl=new Mu;function mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zl(e){if(Array.isArray(e))return e}function Wl(e){if(Array.isArray(e))return mr(e)}function Hu(e,t,n,r,u,i,o){try{var c=e[i](o),f=c.value}catch(l){n(l);return}c.done?t(f):Promise.resolve(f).then(r,u)}function zu(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(f){Hu(i,r,u,o,c,"next",f)}function c(f){Hu(i,r,u,o,c,"throw",f)}o(void 0)})}}function Zl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xl(e,t,n){return t&&Wu(e.prototype,t),n&&Wu(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zu(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Xu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jl(){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 Gl(){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 Ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},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){K(e,u,n[u])})}return e}function Kl(e){return zl(e)||Xu(e)||Gu(e)||Jl()}function vr(e){return Wl(e)||Xu(e)||Gu(e)||Gl()}function Gu(e,t){if(!!e){if(typeof e=="string")return mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mr(e,t)}}function Ku(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(s){return f([l,s])}}function f(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(s){l=[6,s],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Ie=function(){function t(n){var r=this;Zl(this,t),K(this,"id",void 0),K(this,"name",void 0),K(this,"icon",void 0),K(this,"type",void 0),K(this,"controlType",void 0),K(this,"props",void 0),K(this,"setting",[]),K(this,"fieldType",void 0),K(this,"eventKeys",[]),K(this,"customEvents",[]),K(this,"parent",null),K(this,"updateSetting",Yu),K(this,"removeSetting",Qu),this._callControlHooks("preInstance",n);var u=Zu(this,t)?this.constructor:void 0,i=u.controlName,o=u.controlIcon,c=u.controlType,f=u.controlFieldType,l=u.controlEventKeys,s=u.controlCustomEvents,a=u.name,h=u.setting;i&&o&&c||Eu("The ".concat(a," controlName,controlIcon,controlType is not define"));var d;this.id=(d=n==null?void 0:n.id)!==null&&d!==void 0?d:Jn(10),this.name=i,this.icon=o;var p;this.type=(p=n==null?void 0:n.type)!==null&&p!==void 0?p:c,this.props=new ut(n==null?void 0:n.props,(Zu(this,t)?this.constructor:void 0).controlName);var g;this.controlType=(g=n==null?void 0:n.controlType)!==null&&g!==void 0?g:"base",this.setting=te(h);var y;this.fieldType=(y=n==null?void 0:n.fieldType)!==null&&y!==void 0?y:f,this.eventKeys=te(l),this.customEvents=te(s),Promise.resolve().then(function(){r._callControlHooks("postInstance",n)})}return Xl(t,[{key:"rules",get:function(){var r=this.props.constructor.Rules;return r?new r(this.props):{}}},{key:"_callControlHooks",value:function(){for(var r=arguments.length,u=new Array(r),i=0;i<r;i++)u[i]=arguments[i];var o,c=Kl(u),f=c[0],l=c.slice(1);return(o=Hl).emit.apply(o,[f,this].concat(vr(l)))}},{key:"preUpdate",value:function(r,u){this._callControlHooks("preUpdateProps",r,u)}},{key:"postUpdate",value:function(r,u){this._callControlHooks("postUpdateProps",r,u)}},{key:"updateProps",value:function(r,u){this.preUpdate(r,u),tr(this.props,r,u),this.postUpdate(r,u)}},{key:"preValidate",value:function(){var r=this;return zu(function(){var u,i,o;return Ku(this,function(c){switch(c.label){case 0:return u=Ju({},r.rules),[4,r._callControlHooks("preValidate",u)];case 1:return i=c.sent(),o=i[i.length-1],[2,o===!1?void 0:o]}})})()}},{key:"validate",value:function(r,u){var i=this;return zu(function(){var o,c,f,l;return Ku(this,function(s){switch(s.label){case 0:return[4,i.preValidate()];case 1:o=s.sent(),c=o!==void 0?o:Ju({},i.rules),Array.isArray(u)&&u.forEach(function(a){c.hasOwnProperty(a)&&delete c[a]}),f=Ul(c,r),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,f.validate(i.props)];case 3:return s.sent(),[2,!0];case 4:throw l=s.sent(),l.control||(l.control=i),l;case 5:return[2]}})})()}},{key:"toDataBindModel",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,u=this.fieldType,i=this.id,o=this.type,c=this.props,f=c.dataBind,l=c.datasourceBind,s=c.optionConfig,a=c.caption,h=c.required,d=c.maxLength,p=c.options,g=c.encrypted,y=c.encryptedMode;if(!(!u&&!f&&!l)){var m={parentId:r,fieldType:u,controlId:i,caption:a,type:o,props:{}};switch(f&&(m.dataBind=f),s){case"datasource":case void 0:l&&(m.datasourceBind=l);break;case"custom":m.props.options=p;break}return h!==void 0&&(m.required=h),d!==void 0&&(m.maxLength=d),g!==void 0&&(m.encrypted=g),y!==void 0&&(m.encryptedMode=y),m}}},{key:"preToSchema",value:function(){this._callControlHooks("preToSchema",this)}},{key:"toSchema",value:function(){return this.preToSchema(),{id:this.id,type:this.type,props:te(this.props),fieldType:this.fieldType,controlType:this.controlType}}}],[{key:"updateBasicControl",value:function(r,u){if(r==="setting"){if(u.add){var i;(i=this.setting).push.apply(i,vr(u.add))}u.remove&&this.removeSettingItem(u.remove),u.update}}}]),t}();K(Ie,"controlName","\u63A7\u4EF6"),K(Ie,"controlIcon","icon"),K(Ie,"controlType","control"),K(Ie,"controlFieldType",void 0),K(Ie,"controlEventKeys",[]),K(Ie,"controlCustomEvents",[]),K(Ie,"setting",[]),K(Ie,"__is_control__",!0),K(Ie,"removeSettingItem",Qu),K(Ie,"updateSettingItem",Yu);function Qu(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(f){return f.key===(u?r.key:r)});if(i!==-1){var o,c;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(f){return!r.hideItems.includes(f)}):t.setting.splice(i,1),u&&!(!((c=t.setting[i].showItems)===null||c===void 0)&&c.length)&&t.setting.splice(i,1)}})}function Yu(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var i=n.setting.find(function(l){return l.key===u});if(i){if(typeof t=="boolean")i.visible=t;else if(typeof t=="object"){var o,c=(o=t.type)!==null&&o!==void 0?o:"replace";if(c==="replace")i.showItems=t.showItems;else{var f;(f=i.showItems).push.apply(f,vr(t.showItems))}}}})}function Ql(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yl(e,t,n){return t&&ei(e.prototype,t),n&&ei(e,n),e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var Jt=function(){function t(n){Ql(this,t),Pe(this,"id",void 0),Pe(this,"type",void 0),Pe(this,"controlType",void 0),Pe(this,"props",void 0),Pe(this,"fieldType",void 0),Pe(this,"customEvents",[]),Pe(this,"pageStatus",void 0),Pe(this,"parent",null);var r=e0(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,o=r.name,c=r.controlCustomEvents;u||Eu("The ".concat(o," controlType is not define"));var f;this.id=(f=n==null?void 0:n.id)!==null&&f!==void 0?f:Jn(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new ut(n==null?void 0:n.props),this.customEvents=c;var s;this.controlType=(s=n==null?void 0:n.controlType)!==null&&s!==void 0?s:"base";var a;this.fieldType=(a=n==null?void 0:n.fieldType)!==null&&a!==void 0?a:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:or.UNKNOWN}return Yl(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();Pe(Jt,"controlType","control"),Pe(Jt,"controlFieldType",void 0),Pe(Jt,"__is_control__",!0),Pe(Jt,"controlCustomEvents",[]);function he(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e){return vn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vn(e)}function Er(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ar(e,t)}function t0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function n0(e,t){return t&&(r0(t)==="object"||typeof t=="function")?t:he(e)}function Ar(e,t){return Ar=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ar(e,t)}function r0(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u0(){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(e){return!1}}function wr(e){var t=u0();return function(){var r=vn(e),u;if(t){var i=vn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return n0(this,u)}}var i0=function(e){Er(n,e);var t=wr(n);function n(r){yr(this,n);var u;u=t.call(this,r),oe(he(u),"dataBind",{}),oe(he(u),"caption",{type:"string",required:!0,message:Se.getMessage("pleaseEnterCaption")}),oe(he(u),"isHideCaption",{type:"boolean"}),oe(he(u),"labelPosition",{type:"enum",enum:["top","left"]}),oe(he(u),"defaultState",{type:"enum",enum:["default","readonly"]}),oe(he(u),"required",{type:"boolean"}),oe(he(u),"captionTip",{type:"string",required:!1,message:Se.getMessage("pleaseEnterCaptionTip")});var i={fieldCode:{type:"string",required:!0,message:Se.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:Se.getMessage("pleaseEnterFieldCode")}};if(t0(r.dataBind,Ft))u.dataBind={type:"object",required:!0,fields:te(i),message:Se.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:Se.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(c){o.fields[c]={type:"object",required:!0,fields:te(i),message:Se.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(cr),o0=function(e){Er(n,e);var t=wr(n);function n(r){yr(this,n);var u;return u=t.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:Se.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(Tu),Fr=function(e){Er(n,e);var t=wr(n);function n(r){yr(this,n);var u;u=t.call(this,r),oe(he(u),"caption",void 0),oe(he(u),"isHideCaption",void 0),oe(he(u),"isShowCaptionTip",void 0),oe(he(u),"captionTip",void 0),oe(he(u),"labelPosition",void 0),oe(he(u),"dataBind",void 0),oe(he(u),"defaultValue",void 0),oe(he(u),"placeholder",void 0),oe(he(u),"defaultState",void 0),oe(he(u),"required",void 0),oe(he(u),"requiredMessage",void 0);var i;u.caption=(i=r==null?void 0:r.caption)!==null&&i!==void 0?i:"";var o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var c;u.isShowCaptionTip=(c=r==null?void 0:r.isShowCaptionTip)!==null&&c!==void 0?c:!1;var f;u.captionTip=(f=r==null?void 0:r.captionTip)!==null&&f!==void 0?f:"";var l;u.defaultState=(l=r==null?void 0:r.defaultState)!==null&&l!==void 0?l:"default";var s;u.labelPosition=(s=r==null?void 0:r.labelPosition)!==null&&s!==void 0?s:"top";var a;u.placeholder=(a=r==null?void 0:r.placeholder)!==null&&a!==void 0?a:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var d;u.requiredMessage=(d=r==null?void 0:r.requiredMessage)!==null&&d!==void 0?d:"",u.dataBind=new Ft(r==null?void 0:r.dataBind);var p;return u.defaultValue=(p=r==null?void 0:r.defaultValue)!==null&&p!==void 0?p:"",u}return n}(ut);oe(Fr,"Rules",i0),oe(Fr,"RuntimeRules",o0);function Cr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},En(e)}function s0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&br(e,t)}function c0(e,t){return t&&(f0(t)==="object"||typeof t=="function")?t:Cr(e)}function br(e,t){return br=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},br(e,t)}function f0(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l0(){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(e){return!1}}function h0(e){var t=l0();return function(){var r=En(e),u;if(t){var i=En(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return c0(this,u)}}var ti=function(e){s0(n,e);var t=h0(n);function n(r){a0(this,n);var u;return u=t.call(this,r),yn(Cr(u),"controlType","form"),yn(Cr(u),"props",void 0),u.props=new Fr(r==null?void 0:r.props),u}return n}(Ie);yn(ti,"controlEventKeys",["on_change","on_focus","on_blur"]),yn(ti,"controlCustomAttributes",void 0);function d0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},An(e)}function D0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Br(e,t)}function g0(e,t){return t&&(m0(t)==="object"||typeof t=="function")?t:d0(e)}function Br(e,t){return Br=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Br(e,t)}function m0(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function v0(){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(e){return!1}}function y0(e){var t=v0();return function(){var r=An(e),u;if(t){var i=An(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return g0(this,u)}}var E0=function(e){D0(n,e);var t=y0(n);function n(r){return p0(this,n),t.call(this,r)}return n}(ut);function _r(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A0(e){if(Array.isArray(e))return _r(e)}function w0(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F0(){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 ni(e){return A0(e)||w0(e)||C0(e)||F0()}function C0(e,t){if(!!e){if(typeof e=="string")return _r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _r(e,t)}}function b0(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function ri(e,t){e.parent=t,b0(e,"parent")}function B0(e,t){e.forEach(function(n){ri(n,t)})}var ui=Symbol("targetKey");function ii(e){var t;return(t=e[ui])!==null&&t!==void 0?t:e}function oi(e,t){return B0(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),c=2;c<i;c++)o[c-2]=arguments[c];var f;return u===ui?r:(f=Reflect).get.apply(f,[r,u].concat(ni(o)))},set:function(r,u,i){for(var o=arguments.length,c=new Array(o>3?o-3:0),f=3;f<o;f++)c[f-3]=arguments[f];var l;if(wt(e)&&u==="length"&&i===e.length)return!0;var s=(l=Reflect).set.apply(l,[r,u,i].concat(ni(c)));return ze(i)&&ri(i,t),s}})}function Sr(e,t,n,r){var u=r!=null?r:e,i=oi(ii(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(c){i=oi(ii(c),u)},enumerable:!0})}function Mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _0(e){if(Array.isArray(e))return Mr(e)}function vt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ai(e,t,n,r,u,i,o){try{var c=e[i](o),f=c.value}catch(l){n(l);return}c.done?t(f):Promise.resolve(f).then(r,u)}function S0(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(f){ai(i,r,u,o,c,"next",f)}function c(f){ai(i,r,u,o,c,"throw",f)}o(void 0)})}}function M0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N0(e,t,n){return t&&si(e.prototype,t),n&&si(e,n),e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?bt=Reflect.get:bt=function(u,i,o){var c=L0(u,i);if(!!c){var f=Object.getOwnPropertyDescriptor(c,i);return f.get?f.get.call(o||u):f.value}},bt(e,t,n||e)}function at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},at(e)}function I0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nr(e,t)}function O0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function x0(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R0(){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 $0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},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){ot(e,u,n[u])})}return e}function P0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function T0(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function j0(e,t){return t&&(k0(t)==="object"||typeof t=="function")?t:vt(e)}function Nr(e,t){return Nr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Nr(e,t)}function L0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=at(e),e!==null););return e}function ci(e){return _0(e)||x0(e)||q0(e)||R0()}function k0(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function q0(e,t){if(!!e){if(typeof e=="string")return Mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mr(e,t)}}function V0(){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(e){return!1}}function U0(e){var t=V0();return function(){var r=at(e),u;if(t){var i=at(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return j0(this,u)}}function H0(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(s){return f([l,s])}}function f(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(s){l=[6,s],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var z0=1e4,fi=function(t){I0(r,t);var n=U0(r);function r(u){M0(this,r);var i;i=n.call(this,u),ot(vt(i),"controlType","layout"),ot(vt(i),"children",void 0),ot(vt(i),"excludes",void 0),ot(vt(i),"childrenMaxLength",void 0),ot(vt(i),"props",void 0);var o=O0(this,r)?this.constructor:void 0,c=o.excludes,f=o.childrenMaxLength;return i.props=new E0(u==null?void 0:u.props),Sr(vt(i),"children",u==null?void 0:u.children),i.excludes=te(c),i.childrenMaxLength=f,i}return N0(r,[{key:"judgeExcludesChildren",value:function(i){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(i)}},{key:"judgeJoinChildren",value:function(i){var o=this.judgeExcludesChildren(i);return o&&this.childrenMaxLength>this.children.length}},{key:"validate",value:function(i,o){var c=this,f=this,l=function(){return bt(at(r.prototype),"validate",c)};return S0(function(){return H0(this,function(s){switch(s.label){case 0:return[4,l().call(f,i,o)];case 1:return s.sent(),[4,Promise.all(f.children.map(function(a){return a.validate(i,o)}))];case 2:return s.sent(),[2,!0]}})})()}},{key:"toDataBindModel",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=bt(at(r.prototype),"toDataBindModel",this).call(this),c=o?[o]:[];return this.children.reduce(function(f,l){var s=l.toDataBindModel(i);if(Array.isArray(s)){var a=s.filter(function(h){return!!h});return ci(f).concat(ci(a))}return s&&f.push(s),f},c)}},{key:"toSchema",value:function(){var i=bt(at(r.prototype),"toSchema",this).call(this),o=this.children.map(function(c){var f=c.toSchema();return f});return T0($0({},i),{children:o})}}]),r}(Ie);ot(fi,"excludes",!1),ot(fi,"childrenMaxLength",z0);function Ir(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e){return wn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},wn(e)}function X0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Or(e,t)}function J0(e,t){return t&&(G0(t)==="object"||typeof t=="function")?t:Ir(e)}function Or(e,t){return Or=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Or(e,t)}function G0(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function K0(){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(e){return!1}}function Q0(e){var t=K0();return function(){var r=wn(e),u;if(t){var i=wn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return J0(this,u)}}var li=function(e){X0(n,e);var t=Q0(n);function n(r,u){W0(this,n);var i;return i=t.call(this,u),Z0(Ir(i),"headers",void 0),Sr(Ir(i),"headers",u==null?void 0:u.headers,r),i}return n}(ut);function xr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y0(e){if(Array.isArray(e))return xr(e)}function Fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hi(e,t,n,r,u,i,o){try{var c=e[i](o),f=c.value}catch(l){n(l);return}c.done?t(f):Promise.resolve(f).then(r,u)}function eh(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(f){hi(i,r,u,o,c,"next",f)}function c(f){hi(i,r,u,o,c,"throw",f)}o(void 0)})}}function th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function di(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nh(e,t,n){return t&&di(e.prototype,t),n&&di(e,n),e}function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?Bt=Reflect.get:Bt=function(u,i,o){var c=sh(u,i);if(!!c){var f=Object.getOwnPropertyDescriptor(c,i);return f.get?f.get.call(o||u):f.value}},Bt(e,t,n||e)}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},st(e)}function rh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rr(e,t)}function uh(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ih(){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 pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},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){Cn(e,u,n[u])})}return e}function oh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Di(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function ah(e,t){return t&&(ch(t)==="object"||typeof t=="function")?t:Fn(e)}function Rr(e,t){return Rr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Rr(e,t)}function sh(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=st(e),e!==null););return e}function gi(e){return Y0(e)||uh(e)||fh(e)||ih()}function ch(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function fh(e,t){if(!!e){if(typeof e=="string")return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xr(e,t)}}function lh(){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(e){return!1}}function hh(e){var t=lh();return function(){var r=st(e),u;if(t){var i=st(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return ah(this,u)}}function dh(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(s){return f([l,s])}}function f(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(s){l=[6,s],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var ph=function(e){rh(n,e);var t=hh(n);function n(r){th(this,n);var u;return u=t.call(this,r),Cn(Fn(u),"controlType","list"),Cn(Fn(u),"props",void 0),u.props=new li(Fn(u),r==null?void 0:r.props),u}return nh(n,[{key:"validate",value:function(u,i){var o=this,c=this,f=function(){return Bt(st(n.prototype),"validate",o)};return eh(function(){return dh(this,function(l){switch(l.label){case 0:return[4,f().call(c,u)];case 1:return l.sent(),[4,Promise.all(c.props.headers.map(function(s){return s.validate(u,i)}))];case 2:return l.sent(),[2,!0]}})})()}},{key:"toDataBindModel",value:function(){var u=Bt(st(n.prototype),"toDataBindModel",this).call(this),i=u?[u]:[],o=this.id;return this.props.headers.reduce(function(c,f){var l=f.toDataBindModel(o);if(Array.isArray(l)){var s=l.filter(function(a){return!!a});return gi(c).concat(gi(s))}return l&&c.push(l),c},i)}},{key:"toSchema",value:function(){var u=Bt(st(n.prototype),"toSchema",this).call(this),i=this.props.headers.map(function(o){return o.toSchema()});return Di(pi({},u),{props:Di(pi({},this.props),{headers:i})})}}]),n}(Ie);Cn(ph,"controlFieldType",ie.LIST);function _t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gh(e,t,n){return t&&mi(e.prototype,t),n&&mi(e,n),e}function $r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bn(e){return bn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bn(e)}function mh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pr(e,t)}function vh(e,t){return t&&(yh(t)==="object"||typeof t=="function")?t:_t(e)}function Pr(e,t){return Pr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Pr(e,t)}function yh(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function Eh(){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(e){return!1}}function Ah(e){var t=Eh();return function(){var r=bn(e),u;if(t){var i=bn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return vh(this,u)}}var wh=function(e){mh(n,e);var t=Ah(n);function n(r){Dh(this,n);var u;return u=t.call(this,r),$r(_t(u),"controlType","list"),$r(_t(u),"children",void 0),$r(_t(u),"props",void 0),u.props=new li(_t(u),r==null?void 0:r.props),Sr(_t(u),"children",r==null?void 0:r.children),u}return gh(n,[{key:"length",get:function(){return this.children.length}}]),n}(Jt);function Oe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(e){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bn(e)}function yi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tr(e,t)}function Fh(e,t){return t&&(Ch(t)==="object"||typeof t=="function")?t:Oe(e)}function Tr(e,t){return Tr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Tr(e,t)}function Ch(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function bh(){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(e){return!1}}function Ei(e){var t=bh();return function(){var r=Bn(e),u;if(t){var i=Bn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Fh(this,u)}}var Bh=function(e){yi(n,e);var t=Ei(n);function n(r){vi(this,n);var u;return u=t.call(this,r),xe(Oe(u),"caption",{type:"string",required:!0,message:Se.getMessage("pleaseEnterCaption")}),xe(Oe(u),"width",{type:"number",required:!1,message:Se.getMessage("pleaseEnterColumnWidth")}),u.width.required=r.widthType==="px",u}return n}(cr),_h=function(e){yi(n,e);var t=Ei(n);function n(r){vi(this,n);var u;u=t.call(this,r),xe(Oe(u),"widthType",void 0),xe(Oe(u),"width",void 0),xe(Oe(u),"caption",void 0),xe(Oe(u),"dataBind",void 0),xe(Oe(u),"autoWidth",void 0),xe(Oe(u),"fixed",void 0),xe(Oe(u),"sort",void 0),xe(Oe(u),"align",void 0),xe(Oe(u),"colSpan",void 0),xe(Oe(u),"autoHeight",void 0);var i;u.width=(i=r==null?void 0:r.width)!==null&&i!==void 0?i:150,u.widthType=(r==null?void 0:r.widthType)||"auto";var o;u.caption=(o=r==null?void 0:r.caption)!==null&&o!==void 0?o:"";var c;u.fixed=(c=r==null?void 0:r.fixed)!==null&&c!==void 0?c:"none",u.autoWidth=new ol(r==null?void 0:r.autoWidth),u.dataBind=new Ft(r==null?void 0:r.dataBind);var f;u.sort=(f=r==null?void 0:r.sort)!==null&&f!==void 0?f:!0,u.align=r==null?void 0:r.align,u.colSpan=r==null?void 0:r.colSpan;var l;return u.autoHeight=(l=r==null?void 0:r.autoHeight)!==null&&l!==void 0?l:!1,u}return n}(ut);xe(_h,"Rules",Bh);function _n(e){return e.controlType===X.LAYOUT||e.controlType===X.WRAP||e.controlType===X.LIST||e.controlType===X.SEARCH}function St(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===pe.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else _n(n)?St(n==null?void 0:n.children,t):n.controlType===X.FORM&&t(n)})}function Mt(e,t){Array.isArray(e)&&e.map(n=>{n.type===pe.DATA_VIEW||n.type===pe.SIMPLE_SEARCH?t(n):_n(n)&&Mt(n==null?void 0:n.children,t)})}let Ai=0;function Gt(e=""){const t=Date.now(),n=Math.floor(Math.random()*1e9);return Ai++,e+"_"+n+Ai+String(t)}class jr extends fn{constructor(t){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=t;this._schema=n,this._instance=this.createControl(n,t.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const t=[],n={};return wi(this._instance,r=>{r.type==="subtable-row"||r.type==="subtable-column"||(t.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r))}),this._flatInstances=t,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 allRules(){let t={},n={};return Mt(this._instance,r=>{n[r.id]=r.rules[0],t[r.id]=r.rules[0],St(r.children,u=>{(u.controlType===X.FORM||u.controlType===X.LIST)&&(Fi(n[r.id].fields,u),Ci(t[r.id].fields,u))})}),{rules:n,antdRules:t}}get rules(){let t={};return Mt(this._instance,n=>{t[n.id]=n.rules[0],St(n.children,r=>{(r.controlType===X.FORM||r.controlType===X.LIST)&&Fi(t[n.id].fields,r)})}),t}get antdRules(){let t={};return Mt(this._instance,n=>{t[n.id]=n.rules[0],St(n.children,r=>{(r.controlType===X.FORM||r.controlType===X.LIST)&&Ci(t[n.id].fields,r)})}),t}}function wi(e,t){Array.isArray(e)?e.map(n=>{t(n),_n(n)&&wi(n.children,t)}):t(e)}function Lr(e){return e.props.isHide?!0:e.parent===null?!1:Lr(e.parent)}function Fi(e,t){if(!Lr(t)){if(t.controlType===X.FORM)e[t.id]=t.rules;else if(t.type===pe.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{Dt(r.children,i=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[i.id]=i.rules)})}),e[t.id].push(n)}}}function Ci(e,t){Lr(t)||(t.controlType===X.FORM?e[t.id]=t.rules:t.type===pe.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};Dt(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class Sh{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i,defaultState:o,subtableHeadersControlIdMapping:c}=Mh(t.instance);this.emptyState=r,this.state=n,this.dataBindMapping=u,this.controlIdMapping=i,this.defaultState=o,this.subtableHeadersControlIdMapping=c}setState(t,n,r){const u=this.controlIdMapping[t],i=te(n);u!==void 0?(u.children&&n.forEach(o=>{o.uid||Object.assign(o,{uid:"new:"+Gt("uid")})}),this.state[u.dataView][t]=i):r!==void 0?Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,f=this.controlIdMapping[o].children;f!==void 0&&Object.keys(f).map(l=>{l===t&&this.state[c][o][r]&&(this.state[c][o][r][t]=i)})}):this.state[t]=i}getState(t,n){if(this.state[t]!==void 0)return this.state[t];{const u=this.controlIdMapping[t];if(u!==void 0)return this.state[u.dataView][t];if(n!==void 0){let i;return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,f=this.controlIdMapping[o].children;f!==void 0&&Object.keys(f).map(l=>{var s;l===t&&(i=(s=this.state[c][o][n])==null?void 0:s[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,f=this.controlIdMapping[o].children;f!==void 0&&Object.keys(f).map(l=>{l===t&&this.state[c][o].map(s=>{i.push(s[t])})})}),i}}}getEmptyState(t){if(this.emptyState[t]!==void 0)return this.emptyState[t];{const r=this.controlIdMapping[t];if(r!==void 0){const u=this.emptyState[r.dataView][t];return"children"in r&&Object.assign(u,{uid:"new:"+Gt("uid")}),u}else{let u;return Object.keys(this.controlIdMapping).map(i=>{const o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(f=>{f===t&&(u=this.emptyState[o][i][t])})}),u}}}getDataBind(t){let n=this.controlIdMapping[t];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let i in u.children)if(i===t){n=u.children[i];break e}}}return n==null?void 0:n.dataBind}}function Mh(e){let t={},n={},r={},u={},i={},o={};return Mt(e,c=>{const f=c.id,l={},s={};St([c],(a,h)=>{Nh(l,s,a),Ih(r,f,a),Oh(u,f,a),xh(i,a)}),t[f]={},o[f]=l,n[f]=s}),{state:t,defaultState:o,subtableHeadersControlIdMapping:i,emptyState:n,databindMapping:r,controlidMapping:u}}function Nh(e,t,n){var r,u;if(n.controlType===X.FORM)e[n.id]=te(n.props.defaultValue),t[n.id]=te(n.props.defaultValue);else{const i={};Dt(n.props.headers,o=>{i[o.id]=te(o.props.defaultValue)}),e[n.id]=(u=new Array((r=n.props.defaultRows)!=null?r:1).fill(0).map(()=>ce({uid:"new:"+Gt("uid")},te(i))))!=null?u:[],t[n.id]=i}}function Ih(e,t,n){var r,u;if(n.controlType===X.FORM)n.props.dataBind instanceof rt?Object.keys(n.props.dataBind).map(i=>{const o=n.props.dataBind,c=o[i].dataCode;c!==void 0&&(e[c]===void 0&&(e[c]={controlId:n.id,fields:[],dataViewId:t}),e[c].fields.push({fieldCode:o[i].fieldCode,controlId:n.id,dataBind:o,dataViewId:[t]}))}):((u=(r=n.props)==null?void 0:r.dataBind)==null?void 0:u.dataCode)===void 0||(e[n.props.dataBind.dataCode]===void 0&&(e[n.props.dataBind.dataCode]={controlId:t,fields:[],dataViewId:t}),e[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[t]}));else{if(n.props.datasourceBind.dataCode===""){et(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}e[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:t};const i=n.id;Dt(n.props.headers,o=>{o.props.dataBind instanceof rt?Object.keys(o.props.dataBind).map(c=>{const f=o.props.dataBind,l=f[c].dataCode;e[l].fields.push({fieldCode:f[c].fieldCode,controlId:o.id,dataBind:f,dataViewId:[t,i]})}):e[o.props.dataBind.dataCode].fields.push({fieldCode:o.props.dataBind.fieldCode,controlId:o.id,dataBind:o.props.dataBind,dataViewId:[t,i]})})}}function Oh(e,t,n){n.controlType===X.FORM?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===pe.SUBTABLE&&(e[n.id]={dataBind:new Ft({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},Dt(n.props.headers,r=>{var u,i;Object.assign((i=(u=e[n.id])==null?void 0:u.children)!=null?i:{},{[r.id]:{dataBind:r.props.dataBind}})}))}function xh(e,t){if(t.type===pe.SUBTABLE){const n={};t.props.headers.map(r=>{r.children.map(u=>{Object.assign(n,{[u.id]:u})})}),Object.assign(e,{[t.id]:n})}}const bi=["splice","push","shift","pop","unshift","reverse"],kr=Symbol("__engineProxy__"),qr=Symbol("__engineTarget__"),Bi=Symbol("__engineArrayBeforeSetCallbackFlag__"),_i=Symbol("__engineProxyThisKey__"),ke={type:"",args:[],callback:Si};function Si(){}jh();function Rh(e,t,n,r,u){if(ke.type){ke.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){Ke(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${bi.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const c=n,f=e.length;if(c>e.length){Ke("Do not directly modify the length of the array data, please add new rows");return}return c===e.length?void 0:()=>u.call(null,e,r,"splice",[c,f-c])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function $h(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===kr?!0:u===qr?r:Array.isArray(r)&&u===Bi?n:u===_i?e:Reflect.get(r,u,i)},set(r,u,i,o){var h;let c=te(i);const f=r[u],l=e===""?u:e+"."+u;function s(d){if(typeof d=="object"&&d!==null)return d[kr]!==!0?Sn(d,t,n,l):Sn(d[qr],t,n,l)}c=(h=s(c))!=null?h:c;let a;if(Array.isArray(r)){const d=Rh(r,u,c,e,t);a=Reflect.set(r,u,c,o),d&&d()}else{try{let d=c;if(c=n.call(null,r,l,c,f),d!==c){const p=s(c);p!==void 0&&(c=p)}}catch(d){return an(`${l} set error ${d}`),!0}a=Reflect.set(r,u,c,o),t.call(null,r,l,c,f)}return a||!0}}}function Sn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,o=e[u];typeof o=="object"&&o!==null&&(e[u]=Sn(o,t,n,i))}return new Proxy(e,$h(r,t,n))}function Mi(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...Mi(n.children))}),t}function Vr(e,t,n){if(t==="")return;const r=t.split(".");if(r.length===0)return;const u=r[0],i=r.slice(1),o=n[u]?n[u][0]:void 0;return i.length===0?o:i.reduce((c,f)=>{var a,h;const l=Number(f);if(Number.isNaN(l)&&c){const d=c!=null&&c.children?Mi(c.children):void 0,p=d==null?void 0:d.find(g=>g.id===f);return p||(c.controlType===X.FORM?c:void 0)}else return(h=(a=c==null?void 0:c.children)==null?void 0:a[l])!=null?h:c},o)}function Ph(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function Th(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function jh(){bi.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[kr]){let u;const i=Ph(e,n);if(i.length){const o=(r=this[Bi])==null?void 0:r.call(this,this[qr],this[_i],i),c=Th(e,n,o);ke.type=e,ke.args=c,u=t.apply(this,c)}else ke.type=e,ke.args=n,u=t.apply(this,n);return typeof ke.callback=="function"&&ke.callback(e,n,u),ke.type="",ke.args=[],ke.callback=Si,u}else return t.apply(this,n)}})}class Lh{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return Je(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){an(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&Ke("duplicated action key");const r=new kh(t,n);this.actionMap.set(t,r)}}class kh{constructor(t,n){this.id="",this.id=t,this.func=n}}class qh{constructor(t){this._dataStore=new Map,this.executer=t}add(t,n){this._dataStore.set(t,n)}get(t){let n=this._dataStore.get(t);return te(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return Je(this,null,function*(){return this.executer===void 0?(an("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class ct{}class Kt extends ct{validate(t){return Me(t)}transform(t){if(t==null)return"";if(!ze(t)&&!Cu(t))return String(t);if(Uf(t))return JSON.stringify(t);throw`${t} is not a string`}}class Ur extends ct{validate(t){return sn(t)||t===""}transform(t){if(t==null)return"";const n=!ze(t)&&!Cu(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class Vh extends ct{validate(t){return Hf(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(wt(t))return n(t);if(Me(t)&&bu(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class Uh extends ct{validate(t){return zf(t)}transform(t){if(t==null)return[];function n(u){return u.map(i=>!i&&i!==0?"":Number(i)).filter(i=>i===""||!Number.isNaN(i))}if(wt(t))return n(t);if(Me(t)&&bu(t))try{const u=JSON.parse(t);if(wt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class Hh extends ct{validate(t){return t instanceof ln||ze(t)&&"amount"in t&&sn(t.amount)&&"currency"in t&&Me(t.currency)}transform(t,n){if(t==null||t==="")return new ln({currency:n==null?void 0:n.currency});let r;if(ze(t)&&(r=new ln(ce(ce({},n),t))),Me(t)&&cn(t))try{const u=JSON.parse(t);r=new ln(ce(ce({},n),u))}catch(u){}if(r){const u=new Ur,i=new Kt;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),i.validate(r.currency)||(r.currency=i.transform(r.currency)),r}throw`${t} is not a { amount: number, currency: string } object`}}class zh extends ct{validate(t){return t instanceof hn||ze(t)&&"min"in t&&Me(t.min)&&"max"in t&&Me(t.max)}transform(t,n){if(t==null||t==="")return new hn;let r;if(ze(t)&&(r=new hn(ce(ce({},n),t))),Me(t)&&cn(t))try{const u=JSON.parse(t);r=new hn(ce(ce({},n),u))}catch(u){}if(r){const u=new Kt;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${t} is not a { min: string, max: string } object`}}class Wh extends ct{validate(t){return t instanceof pn||ze(t)&&"result"in t&&sn(t.result)&&"unit"in t&&Me(t.unit)}transform(t,n){if(t==null||t==="")return new pn({unit:n==null?void 0:n.unit});let r;if(ze(t)&&(r=new pn(ce(ce({},n),t))),Me(t)&&cn(t))try{const u=JSON.parse(t);r=new pn(ce(ce({},n),u))}catch(u){}if(r){const u=new Ur,i=new Kt;return u.validate(r.result)||(r.result=u.transform(r.result)),i.validate(r.unit)||(r.unit=i.transform(r.unit)),r}throw`${t} is not a { result: string, unit: string } object`}}class Zh extends ct{validate(t){return t instanceof dn}transform(t,n){if(t==null||t==="")return new dn;let r;if(ze(t)&&(r=new dn(ce(ce({},n),nr.exports.camelizeKeys(t)))),Me(t)&&cn(t))try{const u=JSON.parse(t);r=new dn(ce(ce({},n),nr.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new Kt;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`${t} is not a { city: string, district: string, province: string } object`}}class Xh{static getValueChecker(t){let n;switch(t){case ie.VARCHAR:case ie.TIMESTAMP:case ie.TEXT:case ie.RELATION:case ie.AUTO_NUMBER:n=new Kt;break;case ie.DECIMAL:n=new Ur;break;case ie.EMPLOYEES:case ie.DEPARTMENTS:case ie.IMAGE:case ie.FILE:case ie.ARRAY:n=new Vh;break;case ie.MONEY:n=new Hh;break;case ie.TIMESCOPE:n=new zh;break;case ie.CALC:n=new Wh;break;case ie.DECIMAL_RANGE:n=new Uh;break;case ie.ADDRESS:n=new Zh;break}return n}}function Jh(e){if(["min","max","currency","unit"].includes(e))return ie.VARCHAR;if(["result","amount"].includes(e))return ie.DECIMAL}function Ni(e,t,n,r){var o;let u=(o=Jh(t))!=null?o:e,i=Xh.getValueChecker(u);if(!i||i.validate(n))return n;try{const c=i.transform(n,r);return c!==void 0?c:n}catch(c){throw`${t} ${c}`}}function Gh(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const o=t[u];return r[u]=Ni(i,u,o,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let Nt=null,Qt="";class Hr extends Mu{constructor(t){super(),this.rawStore={},this.isMounted=!1,this.id=Jn(8),this.__pluginsApplied=!1,this.actionManager=new Lh,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:o=hu,debug:c=!1}=this.$options;Se.setLocale(o),this.debug=c,this.runtime=new jr({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new Sh({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Yn(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return jr.register(...t)}static judgeControlIsRegistered(t){return jr.staticRegisteredTypes.has(t.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:t=[]}=this.$options;this._handlerProxyState(),this.__plugins=t,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=Sn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=Vr(this.runtime.flatInstances,n,this.runtime.instanceMap);if(!i)return r;if(this.assertInstance(i,pe.SUBTABLE)){if(r===null)return[];const f=i.props.headers.reduce((s,a)=>{const h=a.children[0];return h&&h.controlType===X.FORM&&(s[h.id]=h.fieldType),s},{}),l=this.getEmptyState(i.id);return r==null?void 0:r.map(s=>Gh(f,s,l))}const o=n.split("."),c=o[o.length-1];try{return Ni(i.fieldType,c,r,u)}catch(f){throw et(`the id=${i.id}'s instance setState error, %o ${f}.`,r),f}}_proxyStateCallback(t,n,r,u,i){Array.isArray(t)?this._handlerArrayUpdate(t,n,r,u,i):this._handlerObjectUpdate(t,n,r,u)}_handlerArrayUpdate(t,n,r,u,i){const o=Vr(this.runtime.flatInstances,n,this.runtime.instanceMap);if(!(o instanceof wh))return;const c=h=>{const d=[];for(let p=0;p<h;p++){const g=this.listControlCreateRow(o,"subtable-row");g&&d.push(g)}return d},f=Nt;let l=[],s=[],a=[];if(r&&u){switch(r){case"push":case"unshift":const d=u.length;l=c(d),s=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const p=u.length-2,g=u.slice(2);l=c(p),s=g;const y=u[0],m=u[1];o.children[r](y,m,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?a=i:["pop","shift"].includes(r)&&(a=[i]);const h=this.getState(o.id);this._handlerSubtableUpdateUid(h),this.emit("list-change",{instance:o,value:h,options:Object.assign({},f,{changed:l,data:s,deleted:a!=null?a:[],jsonValue:JSON.stringify(h)})}),Nt=null}}_handlerSubtableUpdateUid(t){t.forEach(n=>{n.uid||Object.assign(n,{uid:"new:"+Gt("uid")})})}_handlerObjectUpdate(t,n,r,u){const i=Vr(this.runtime.flatInstances,n,this.runtime.instanceMap);if(!i)return;const o=this.getInstanceRowIndex(i),c=Nt||{};if(i.controlType===X.LIST){i.children.length=0;const f=r;let l=[];for(let a=0;a<f.length;a++){const h=this.listControlCreateRow(i,"subtable-row");h&&l.push(h)}i.children.push(...l),this.runtime.getFlatInstances();let s=u!=null?u:[];(c==null?void 0:c.setData)===!0&&(s=[]),this._handlerSubtableUpdateUid(f),this.emit("list-change",{instance:i,value:r,options:lu(ce({},c),{changed:l,data:f,deleted:s,type:"push",jsonValue:JSON.stringify(f)})})}else this.emit("change",{instance:i,value:this.getState(i.id,o),rowIndex:o,options:lu(ce({},c),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Qt=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){Ke(`${Qt} Plugin apply Error
2
- ${r}`)}finally{Qt=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r.controlType===X.LAYOUT){const u=r,i=te(t.props.headers),o=this.createControl(i);u.children.push(...o)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return Je(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return et("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 i=yield qo(Hr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Qt&&(n.applyingPluginName=Qt),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getAllRules(t){var r,u;const n=this.runtime.allRules;return t===void 0?n:{rules:(r=n.rules[t])==null?void 0:r.fields,antdRules:(u=n.antdRules[t])==null?void 0:u.fields}}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getEmptyState(t){return te(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){Nt=t}setState(t,n,r,u){Nt=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),Nt=null}setStates(t,n,r){let u=t!=null?t:{};Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const f=u[i][o];f!==void 0&&this.setState(o,f,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const f=this.getDataBindMapping(t);if(f){const{controlId:l}=f;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof rt?Object.entries(i).reduce((f,[l,s])=>s.fieldCode===n?f[l]:f,c):c}getData(t){var u,i,o,c,f,l,s,a;if(!t)return;let n=this.getDataBindMapping(t),r=this.getControlIdMapping();if(n){const{controlId:h}=n,d=this.getField(t);if(Array.isArray(d))return d.map(g=>{var m,A,N,B,M,R;let y={};for(let x in g)if(x==="uid")y[x]=g[x];else{const j=(N=(A=(m=r[h])==null?void 0:m.children[x])==null?void 0:A.dataBind)==null?void 0:N.fieldCode;if(j!==""){if(j)y[j]=g[x];else if((B=r[h])!=null&&B.children[x])for(let z in g[x])y[(R=(M=r[h])==null?void 0:M.children[x])==null?void 0:R.dataBind[z].fieldCode]=g[x][z]}}return y});{let p={};for(let g in d)if((i=(u=r[g])==null?void 0:u.dataBind)!=null&&i.fieldCode)p[(o=r[g])==null?void 0:o.dataBind.fieldCode]=d[g];else if((f=(c=r[g])==null?void 0:c.dataBind)!=null&&f.dataCode)p[(l=r[g])==null?void 0:l.dataBind.dataCode]=d[g].map(y=>{var A,N;let m={};for(let B in y)if(B==="uid")m[B]=y[B];else{const M=(A=r[g].children[B])==null?void 0:A.dataBind.fieldCode;if(M!=="")if(M)m[M]=y[B];else for(let R in y[B])m[(N=r[g].children[B])==null?void 0:N.dataBind[R].fieldCode]=y[B][R]}return m});else if(r[g])for(let y in d[g])p[(a=(s=r[g])==null?void 0:s.dataBind[y])==null?void 0:a.fieldCode]=d[g][y];return p}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:f}=o;if(c instanceof rt){const s=(l=te(this.getState(f,u)))!=null?l:this.getEmptyState(f),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),s);this.setState(f,a,u,i)}else this.setState(f,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:f,controlId:l,fieldCode:s}=c;if(!o.includes(s)&&!!Object.hasOwnProperty.call(n,s))if(f instanceof rt){const h=(a=te(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(f).reduce((p,[g,y])=>{o.push(y.fieldCode);const m=n[y.fieldCode];return m!==void 0&&(p[g]=m),p},h);this.setState(c.controlId,d,r,u)}else this.setState(l,n[s],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const i={};return r.fields.forEach(o=>{const{dataBind:c,controlId:f,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof rt){const s=this.getEmptyState(f);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},s)}else i[f]=n[l]}),i}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r=this.store.defaultState;Object.keys(t).map(u=>{var o,c,f,l;const i=t[u];if(Array.isArray(i)){const s=this.getDataBindMapping(u);if(!s)return;r[s.dataViewId]||(r[s.dataViewId]={}),i.length?r[s.dataViewId][s.controlId]=[]:r[s.dataViewId][s.controlId]=(o=r[s.dataViewId][s.controlId])!=null?o:[],i.map(a=>{let h=te(this.store.emptyState[s.dataViewId][s.controlId]),d=[];Object.keys(a).map(p=>{var y,m,A;if(d.includes(p))return;const g=(m=(y=this.store.dataBindMapping[u])==null?void 0:y.fields)==null?void 0:m.find(N=>N.fieldCode===p);if(g){if(g.dataBind instanceof Ft&&a[p]!==void 0)h[g.controlId]=a[p];else if(p==="uid"&&a.uid!==void 0)h.uid=a.uid;else if(g.dataBind instanceof rt){let N=te((A=this.getEmptyState(g.controlId))!=null?A:{});Object.keys(g.dataBind).map(B=>{const M=g.dataBind[B];a[M.fieldCode]!==void 0&&(N[B]=a[M.fieldCode]),d.push(M.fieldCode)}),h[g.controlId]=N}}}),r[s.dataViewId][s.controlId].push(h)})}else if(i){let s=[];const a=te(this.store.emptyState);(c=Object.keys(i))!=null&&c.length&&Object.keys(i).map(d=>{var g;if(s.includes(d))return;const p=this.getDataBindMapping(u,d);if(p){if(r[p.dataViewId[0]]||(r[p.dataViewId[0]]={}),p.dataBind instanceof Ft&&i[d]!==void 0)r[p.dataViewId[0]][p.controlId]=i[d]!==void 0?i[d]:a[p.dataViewId[0]][p.controlId];else if(p.dataBind instanceof rt){let y=(g=this.getEmptyState(p.controlId))!=null?g:{};Object.keys(p.dataBind).map(m=>{const A=p.dataBind[m];i[A.fieldCode]!==void 0&&(y[m]=i[A.fieldCode]),s.push(A.fieldCode)}),r[p.dataViewId[0]][p.controlId]=y}}});const h=this.getDataBindMapping(u);if(h){const d=(f=h==null?void 0:h.fields)==null?void 0:f.map(y=>y==null?void 0:y.controlId),p=this.getEmptyState(h==null?void 0:h.controlId),g=Object.keys((l=r==null?void 0:r[h==null?void 0:h.controlId])!=null?l:{});d==null||d.forEach(y=>{!g.includes(y)&&y!=="uid"&&r[h==null?void 0:h.controlId]&&(Object.keys(r).length?Object.assign(r[h==null?void 0:h.controlId],{[y]:p[y]}):Object.assign(r,{[h.controlId]:{[y]:p[y]}}))}),this.debugLog("engine setData\u65B9\u6CD5\u9ED8\u8BA4\u503C\u53CA\u8868\u5355\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r)}}}),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(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){if(t===void 0)return this.runtime.flatInstances;const r=Array.from(this.runtime.instanceMap[t]||[]);if(n&&r.length){const u=r[0],i=this.findSubtableHeadersControl(u.id);i!==void 0&&r.unshift(i)}return r}setInstance(t,n,r,u){try{if(typeof t=="string"&&u===-1)this.getInstances(t,u===-1).map(o=>{o&&(this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",o.id,o,n,r),tr(o.props,n,r),this.schemaEvent("schema-change",{instance:o,props:n,value:r,rowIndex:u}))});else{let i;if(typeof t=="string"?i=this.getInstance(t,u):i=t,!i)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",i.id,i,n,r),tr(i.props,n,r),this.schemaEvent("schema-change",{instance:i,props:n,value:r,rowIndex:u})}}catch(i){throw i}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){et(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){et(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new qh(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Me(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,pe.SUBTABLE))if(this.assertInstance(t,pe.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,pe.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,pe.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,pe.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}inList(t){const n=this.store.subtableHeadersControlIdMapping;let r;for(const u in n)if(t in n[u]){r=u;break}return r}findSubtableHeadersControl(t){const n=this.store.subtableHeadersControlIdMapping;let r;for(const u in n)if(t in n[u]){r=n[u][t];break}return r}}class Kh{}class Qh{constructor(t,n){this.config=t,this.env=n}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ii(n,t,this.env);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function Ii(e,t,n){if(!e.module||!e.module.compiled)return;const r=e.module.compiled,u={exports:{ctx:t,utils:t.getAction().actionUtils,env:n}};try{new Function("module","exports",r).call(u,u,u.exports)}catch(c){Ke(c.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Ke("fail to parse the module")}const i={},o={};for(const[c,f]of Object.entries(u.exports))typeof f=="function"?i[c]=f:o[c]=f;return{funcMap:i,variables:o}}const Yh={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class ed{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(Yh).forEach(([n,r])=>{t.on(n,u=>Je(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return Je(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>Je(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class td{constructor(t){this.config=t}apply(t){this.engine=t,Iu.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>Je(this,null,function*(){if(!((t==="change"||t==="list-change")&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return Je(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(i=>Je(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}var Oi={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Ae(e){return typeof e=="number"}function ft(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function xi(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function Ri(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $i(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Mn(e){return typeof e=="string"}var Re=Array.isArray;function Yt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Wr(e){return Array.isArray(e)||Yt(e)}function nd(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function rd(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ud(e){return e&&e.constructor.prototype.isRange===!0||!1}function Pi(e){return e&&e.constructor.prototype.isIndex===!0||!1}function id(e){return typeof e=="boolean"}function od(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function ad(e){return e&&e.constructor.prototype.isHelp===!0||!1}function sd(e){return typeof e=="function"}function cd(e){return e instanceof Date}function fd(e){return e instanceof RegExp}function ld(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!xi(e)&&!Ri(e))}function hd(e){return e===null}function dd(e){return e===void 0}function pd(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Dd(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function gd(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function md(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function vd(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function yd(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ed(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ad(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function wd(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fd(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Cd(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function bd(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bd(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function _d(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Sd(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Md(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nd(e){return e&&e.constructor.prototype.isChain===!0||!1}function Zr(e){var t=typeof e;return t==="object"?e===null?"null":ft(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function yt(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return yt(n)});if(e instanceof Date)return new Date(e.valueOf());if(ft(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return Id(e,yt)}function Id(e,t){var n={};for(var r in e)Nn(e,r)&&(n[r]=t(e[r]));return n}function Xr(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Xr(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Xr(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function Nn(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Od(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],i=e[u];i!==void 0&&(n[u]=i)}return n}var xd=["Matrix","Array"],Rd=["number","BigNumber","Fraction"],Ti=function(t){if(t)throw new Error(`The global config is readonly.
2
+ ${r}`)}finally{Qt=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r.controlType===X.LAYOUT){const u=r,i=te(t.props.headers),o=this.createControl(i);u.children.push(...o)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return Je(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return et("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 i=yield qo(Hr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Qt&&(n.applyingPluginName=Qt),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getAllRules(t){var r,u;const n=this.runtime.allRules;return t===void 0?n:{rules:(r=n.rules[t])==null?void 0:r.fields,antdRules:(u=n.antdRules[t])==null?void 0:u.fields}}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getEmptyState(t){return te(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){Nt=t}setState(t,n,r,u){Nt=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),Nt=null}setStates(t,n,r){let u=t!=null?t:{};Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const f=u[i][o];f!==void 0&&this.setState(o,f,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const f=this.getDataBindMapping(t);if(f){const{controlId:l}=f;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof rt?Object.entries(i).reduce((f,[l,s])=>s.fieldCode===n?f[l]:f,c):c}getData(t){var u,i,o,c,f,l,s,a;if(!t)return;let n=this.getDataBindMapping(t),r=this.getControlIdMapping();if(n){const{controlId:h}=n,d=this.getField(t);if(Array.isArray(d))return d.map(g=>{var m,A,N,B,M,R;let y={};for(let x in g)if(x==="uid")y[x]=g[x];else{const j=(N=(A=(m=r[h])==null?void 0:m.children[x])==null?void 0:A.dataBind)==null?void 0:N.fieldCode;if(j!==""){if(j)y[j]=g[x];else if((B=r[h])!=null&&B.children[x])for(let z in g[x])y[(R=(M=r[h])==null?void 0:M.children[x])==null?void 0:R.dataBind[z].fieldCode]=g[x][z]}}return y});{let p={};for(let g in d)if((i=(u=r[g])==null?void 0:u.dataBind)!=null&&i.fieldCode)p[(o=r[g])==null?void 0:o.dataBind.fieldCode]=d[g];else if((f=(c=r[g])==null?void 0:c.dataBind)!=null&&f.dataCode)p[(l=r[g])==null?void 0:l.dataBind.dataCode]=d[g].map(y=>{var A,N;let m={};for(let B in y)if(B==="uid")m[B]=y[B];else{const M=(A=r[g].children[B])==null?void 0:A.dataBind.fieldCode;if(M!=="")if(M)m[M]=y[B];else for(let R in y[B])m[(N=r[g].children[B])==null?void 0:N.dataBind[R].fieldCode]=y[B][R]}return m});else if(r[g])for(let y in d[g])p[(a=(s=r[g])==null?void 0:s.dataBind[y])==null?void 0:a.fieldCode]=d[g][y];return p}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:f}=o;if(c instanceof rt){const s=(l=te(this.getState(f,u)))!=null?l:this.getEmptyState(f),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),s);this.setState(f,a,u,i)}else this.setState(f,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:f,controlId:l,fieldCode:s}=c;if(!o.includes(s)&&!!Object.hasOwnProperty.call(n,s))if(f instanceof rt){const h=(a=te(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(f).reduce((p,[g,y])=>{o.push(y.fieldCode);const m=n[y.fieldCode];return m!==void 0&&(p[g]=m),p},h);this.setState(c.controlId,d,r,u)}else this.setState(l,n[s],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const i={};return r.fields.forEach(o=>{const{dataBind:c,controlId:f,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof rt){const s=this.getEmptyState(f);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},s)}else i[f]=n[l]}),i}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r=this.store.defaultState;Object.keys(t).map(u=>{var o,c,f,l;const i=t[u];if(Array.isArray(i)){const s=this.getDataBindMapping(u);if(!s)return;r[s.dataViewId]||(r[s.dataViewId]={}),i.length?r[s.dataViewId][s.controlId]=[]:r[s.dataViewId][s.controlId]=(o=r[s.dataViewId][s.controlId])!=null?o:[],i.map(a=>{let h=te(this.store.emptyState[s.dataViewId][s.controlId]),d=[];Object.keys(a).map(p=>{var y,m,A;if(d.includes(p))return;const g=(m=(y=this.store.dataBindMapping[u])==null?void 0:y.fields)==null?void 0:m.find(N=>N.fieldCode===p);if(g){if(g.dataBind instanceof Ft&&a[p]!==void 0)h[g.controlId]=a[p];else if(g.dataBind instanceof rt){let N=te((A=this.getEmptyState(g.controlId))!=null?A:{});Object.keys(g.dataBind).map(B=>{const M=g.dataBind[B];a[M.fieldCode]!==void 0&&(N[B]=a[M.fieldCode]),d.push(M.fieldCode)}),h[g.controlId]=N}}p==="uid"&&a.uid!==void 0&&(h.uid=a.uid)}),r[s.dataViewId][s.controlId].push(h)})}else if(i){let s=[];const a=te(this.store.emptyState);(c=Object.keys(i))!=null&&c.length&&Object.keys(i).map(d=>{var g;if(s.includes(d))return;const p=this.getDataBindMapping(u,d);if(p){if(r[p.dataViewId[0]]||(r[p.dataViewId[0]]={}),p.dataBind instanceof Ft&&i[d]!==void 0)r[p.dataViewId[0]][p.controlId]=i[d]!==void 0?i[d]:a[p.dataViewId[0]][p.controlId];else if(p.dataBind instanceof rt){let y=(g=this.getEmptyState(p.controlId))!=null?g:{};Object.keys(p.dataBind).map(m=>{const A=p.dataBind[m];i[A.fieldCode]!==void 0&&(y[m]=i[A.fieldCode]),s.push(A.fieldCode)}),r[p.dataViewId[0]][p.controlId]=y}}});const h=this.getDataBindMapping(u);if(h){const d=(f=h==null?void 0:h.fields)==null?void 0:f.map(y=>y==null?void 0:y.controlId),p=this.getEmptyState(h==null?void 0:h.controlId),g=Object.keys((l=r==null?void 0:r[h==null?void 0:h.controlId])!=null?l:{});d==null||d.forEach(y=>{!g.includes(y)&&y!=="uid"&&r[h==null?void 0:h.controlId]&&(Object.keys(r).length?Object.assign(r[h==null?void 0:h.controlId],{[y]:p[y]}):Object.assign(r,{[h.controlId]:{[y]:p[y]}}))}),this.debugLog("engine setData\u65B9\u6CD5\u9ED8\u8BA4\u503C\u53CA\u8868\u5355\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r)}}}),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(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){if(t===void 0)return this.runtime.flatInstances;const r=Array.from(this.runtime.instanceMap[t]||[]);if(n&&r.length){const u=r[0],i=this.findSubtableHeadersControl(u.id);i!==void 0&&r.unshift(i)}return r}setInstance(t,n,r,u){try{if(typeof t=="string"&&u===-1)this.getInstances(t,u===-1).map(o=>{o&&(this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",o.id,o,n,r),tr(o.props,n,r),this.schemaEvent("schema-change",{instance:o,props:n,value:r,rowIndex:u}))});else{let i;if(typeof t=="string"?i=this.getInstance(t,u):i=t,!i)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",i.id,i,n,r),tr(i.props,n,r),this.schemaEvent("schema-change",{instance:i,props:n,value:r,rowIndex:u})}}catch(i){throw i}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){et(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){et(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new qh(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Me(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,pe.SUBTABLE))if(this.assertInstance(t,pe.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,pe.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,pe.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,pe.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}inList(t){const n=this.store.subtableHeadersControlIdMapping;let r;for(const u in n)if(t in n[u]){r=u;break}return r}findSubtableHeadersControl(t){const n=this.store.subtableHeadersControlIdMapping;let r;for(const u in n)if(t in n[u]){r=n[u][t];break}return r}}class Kh{}class Qh{constructor(t,n){this.config=t,this.env=n}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ii(n,t,this.env);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function Ii(e,t,n){if(!e.module||!e.module.compiled)return;const r=e.module.compiled,u={exports:{ctx:t,utils:t.getAction().actionUtils,env:n}};try{new Function("module","exports",r).call(u,u,u.exports)}catch(c){Ke(c.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Ke("fail to parse the module")}const i={},o={};for(const[c,f]of Object.entries(u.exports))typeof f=="function"?i[c]=f:o[c]=f;return{funcMap:i,variables:o}}const Yh={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class ed{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(Yh).forEach(([n,r])=>{t.on(n,u=>Je(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return Je(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>Je(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class td{constructor(t){this.config=t}apply(t){this.engine=t,Iu.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>Je(this,null,function*(){if(!((t==="change"||t==="list-change")&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return Je(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(i=>Je(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}var Oi={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Ae(e){return typeof e=="number"}function ft(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function xi(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function Ri(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function $i(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Mn(e){return typeof e=="string"}var Re=Array.isArray;function Yt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Wr(e){return Array.isArray(e)||Yt(e)}function nd(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function rd(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ud(e){return e&&e.constructor.prototype.isRange===!0||!1}function Pi(e){return e&&e.constructor.prototype.isIndex===!0||!1}function id(e){return typeof e=="boolean"}function od(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function ad(e){return e&&e.constructor.prototype.isHelp===!0||!1}function sd(e){return typeof e=="function"}function cd(e){return e instanceof Date}function fd(e){return e instanceof RegExp}function ld(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!xi(e)&&!Ri(e))}function hd(e){return e===null}function dd(e){return e===void 0}function pd(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Dd(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function gd(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function md(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function vd(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function yd(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ed(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ad(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function wd(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fd(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Cd(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function bd(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bd(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function _d(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Sd(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Md(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nd(e){return e&&e.constructor.prototype.isChain===!0||!1}function Zr(e){var t=typeof e;return t==="object"?e===null?"null":ft(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function yt(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return yt(n)});if(e instanceof Date)return new Date(e.valueOf());if(ft(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return Id(e,yt)}function Id(e,t){var n={};for(var r in e)Nn(e,r)&&(n[r]=t(e[r]));return n}function Xr(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Xr(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Xr(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function Nn(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Od(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],i=e[u];i!==void 0&&(n[u]=i)}return n}var xd=["Matrix","Array"],Rd=["number","BigNumber","Fraction"],Ti=function(t){if(t)throw new Error(`The global config is readonly.
3
3
  Please create a mathjs instance if you want to change the default configuration.
4
4
  Example:
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-engine",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@types/node": "~18.0.6"
36
36
  },
37
- "gitHead": "301012b0450a226892025655db4f9ceb16f7af6e"
37
+ "gitHead": "e0b4839d12d55ac8daa8da92ac87f99a8b4e4a37"
38
38
  }