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