@byteluck-fe/model-driven-engine 1.7.5 → 1.7.14

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,28 +1,28 @@
1
- var N1=Object.defineProperty,I1=Object.defineProperties;var x1=Object.getOwnPropertyDescriptors;var so=Object.getOwnPropertySymbols,O1=Object.getPrototypeOf,R1=Object.prototype.hasOwnProperty,$1=Object.prototype.propertyIsEnumerable,P1=Reflect.get;var $n=Math.pow,co=(Z,ee,ne)=>ee in Z?N1(Z,ee,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Z[ee]=ne,oe=(Z,ee)=>{for(var ne in ee||(ee={}))R1.call(ee,ne)&&co(Z,ne,ee[ne]);if(so)for(var ne of so(ee))$1.call(ee,ne)&&co(Z,ne,ee[ne]);return Z},Zr=(Z,ee)=>I1(Z,x1(ee));var fo=(Z,ee,ne)=>P1(O1(Z),ne,ee);var We=(Z,ee,ne)=>new Promise((Pn,Gt)=>{var Tn=Ze=>{try{Nt(ne.next(Ze))}catch(It){Gt(It)}},Ln=Ze=>{try{Nt(ne.throw(Ze))}catch(It){Gt(It)}},Nt=Ze=>Ze.done?Pn(Ze.value):Promise.resolve(Ze.value).then(Tn,Ln);Nt((ne=ne.apply(Z,ee)).next())});(function(Z,ee){typeof exports=="object"&&typeof module!="undefined"?ee(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],ee):(Z=typeof globalThis!="undefined"?globalThis:Z||self,ee(Z.modelDrivenEngine={},Z.require$$0))})(this,function(Z,ee){"use strict";function ne(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Pn=ne(ee),Gt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Tn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Ln="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",Nt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",Ze="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",It="{caption}\u5FC5\u586B",lo="\u8BF7\u8F93\u5165\u6807\u9898",ho="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",po="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Do="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",go="\u8BF7\u7ED1\u5B9A\u8868\u5355",vo="\u8BF7\u7ED1\u5B9A\u5217\u8868",mo="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",yo="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Eo="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Ao="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Co="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Fo="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",wo="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Bo="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",bo="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",So="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",_o="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Mo="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",No="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Io="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",xo="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Oo="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Ro="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",$o="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",Po="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",To="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",Lo="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",jo="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",qo="\u8BF7\u7ED1\u5B9A\u670D\u52A1",ko="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Vo="\u8BF7\u9009\u62E9\u7701",Uo="\u8BF7\u9009\u62E9\u5E02",Ho="\u8BF7\u9009\u62E9\u533A",zo="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Wo="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",Zo="\u8BF7\u8F93\u5165\u5217\u5BBD",Xo="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Go="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Jo="\u8BF7\u9009\u62E9\u63A7\u4EF6",Ko="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Qo="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",Yo="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ea="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",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",ua="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",ia="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",oa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",aa="\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",fa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",la="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ha="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",da="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",pa="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Da="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ga="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",va="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",ma={isNotNumber:Gt,isNotString:Tn,isNotObject:Ln,isNotArray:Nt,isNotBoolean:Ze,runtimeRequired:It,pleaseEnterCaption:lo,pleaseEnterCaptionTip:ho,pleaseEnterPlaceholder:po,pleaseEnterFieldCode:Do,pleaseEnterForm:go,pleaseEnterList:vo,pleaseEnterProcess:mo,pleaseEnterLabel:yo,pleaseEnterValue:Eo,bizKeyNotBindFiled:Ao,pleaseEnterNumberRange:Co,pleaseEnterAValueGreaterThanMin:Fo,pleaseEnterAValueLessThanMax:wo,numberRangeSetError:Bo,stringRangeError:bo,attachmentMaxSize:So,pleaseEnterTotalScoreSetting:_o,theTotalScoreMustNotBeLessThan1:Mo,scoreDefaultValueRange:No,attachmentLimitError:Io,PleaseReselectTheOptionalQuantity:xo,TheMaximumLengthIsGreaterThanTheMinimumLength:Oo,TheMinimumLengthIsGreaterThanTheMaximumLength:Ro,PleaseSelectTheCorrectOptionSettings:$o,optionIdIsRepeat:Po,optionIsRequired:To,pleaseEnterDataCode:Lo,pleaseEnterValueFieldCode:jo,pleaseEnterSvcCode:qo,pleaseBindAtLeastOneDisplayValue:ko,pleaseSelectProvince:Vo,pleaseSelectCity:Uo,pleaseSelectDistrict:Ho,limitRowsCannotBeLessThan0:zo,TheNumberOfRowsCannotBeLessThanMinRows:Wo,pleaseEnterColumnWidth:Zo,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Xo,pleaseCompleteAllRulesAndConditions:Go,pleaseSelectControl:Jo,pleaseSelectAtLeastOneColumn:Ko,pleaseSelectFillBackMode:Qo,pleaseSelectDashboard:Yo,rootNodeIsRequired:ea,theViewNameCannotBeEmpty:ta,pleaseSelectOcrType:na,pleaseSelectAtLeastOneFieldToFillIn:ra,pleaseChooseAtLeastOne:ua,pleaseEnterButtonContent:ia,pleaseEnterDataCodeInDataSetting:oa,pleaseEnterValueFieldCodeInDataSetting:aa,pleaseEnterSvcCodeInDataSetting:sa,pleaseBindAtLeastOneDisplayValueInDataSetting:ca,rootNodeIsRequiredInDataSetting:fa,pleaseEnterMaxHeight:la,pleaseEnter:ha,pleaseEnterWatermark:da,pleaseEnterFileName:pa,pleaseUploadAtLeastOnePrintTemplate:Da,pleaseAssignBusiness:ga,pleaseAssignExternal:va},ya="Please enter a number",Ea="Please enter a string",Aa="Please enter an object",Ca="Please enter an array",Fa="Please enter a boolean",wa="{caption} Required",Ba="Please enter the title",ba="Please enter the bubble prompt",Sa="Please enter the prompt text",_a="Please bind data items",Ma="Please bind the form",Na="Please bind the list",Ia="Please bind the process",xa="Please enter the displayed value",Oa="Please enter the stored value",Ra="The document number is not bound to the data item",$a="Please enter a value greater than or equal to {min} and less than or equal to {max}",Pa="Please enter a value greater than or equal to {min}",Ta="Please enter a value less than or equal to {max}",La="The value range is set incorrectly",ja="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",qa="The attachment size must be between 0MB and 1000MB",ka="Please fill in the total score setting",Va="The total score cannot be less than 1",Ua="The default value must be between {min} and {max}",Ha="The number of attachments uploaded must be between {min} and {max}",za="Please re-select the optional quantity",Wa="The maximum length of the control must be greater than the minimum length",Za="The minimum length of the control must be less than the maximum length",Xa="Please select the correct option setting",Ga="Option ID cannot be repeated",Ja="Please enter at least one option",Ka="Please bind the data source",Qa="Please bind the stored value",Ya="Please bind the service",es="At least one display value must be bound",ts="Please select a province",ns="Please select a city",rs="Please select a district",us="The minimum number of lines to fill in cannot be less than 0",is="The number of rows cannot be less than {min} rows",os="Please enter the column width",as="Please set the logical relationship of all rule conditions",ss="Please complete all rules and conditions",cs="please select control",fs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ls="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",hs="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ds="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ps="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Ds="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",gs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",vs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ms="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",ys="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Es="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",As="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Cs="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Fs="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ws="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Bs="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",bs="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ss="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",_s={isNotNumber:ya,isNotString:Ea,isNotObject:Aa,isNotArray:Ca,isNotBoolean:Fa,runtimeRequired:wa,pleaseEnterCaption:Ba,pleaseEnterCaptionTip:ba,pleaseEnterPlaceholder:Sa,pleaseEnterFieldCode:_a,pleaseEnterForm:Ma,pleaseEnterList:Na,pleaseEnterProcess:Ia,pleaseEnterLabel:xa,pleaseEnterValue:Oa,bizKeyNotBindFiled:Ra,pleaseEnterNumberRange:$a,pleaseEnterAValueGreaterThanMin:Pa,pleaseEnterAValueLessThanMax:Ta,numberRangeSetError:La,stringRangeError:ja,attachmentMaxSize:qa,pleaseEnterTotalScoreSetting:ka,theTotalScoreMustNotBeLessThan1:Va,scoreDefaultValueRange:Ua,attachmentLimitError:Ha,PleaseReselectTheOptionalQuantity:za,TheMaximumLengthIsGreaterThanTheMinimumLength:Wa,TheMinimumLengthIsGreaterThanTheMaximumLength:Za,PleaseSelectTheCorrectOptionSettings:Xa,optionIdIsRepeat:Ga,optionIsRequired:Ja,pleaseEnterDataCode:Ka,pleaseEnterValueFieldCode:Qa,pleaseEnterSvcCode:Ya,pleaseBindAtLeastOneDisplayValue:es,pleaseSelectProvince:ts,pleaseSelectCity:ns,pleaseSelectDistrict:rs,limitRowsCannotBeLessThan0:us,TheNumberOfRowsCannotBeLessThanMinRows:is,pleaseEnterColumnWidth:os,pleaseSetTheLogicalRelationshipOfAllRuleConditions:as,pleaseCompleteAllRulesAndConditions:ss,pleaseSelectControl:cs,pleaseSelectDashboard:fs,theViewNameCannotBeEmpty:ls,pleaseSelectOcrType:hs,pleaseSelectAtLeastOneFieldToFillIn:ds,pleaseChooseAtLeastOne:ps,pleaseEnterButtonContent:Ds,pleaseEnterDataCodeInDataSetting:gs,pleaseEnterValueFieldCodeInDataSetting:vs,pleaseEnterSvcCodeInDataSetting:ms,pleaseBindAtLeastOneDisplayValueInDataSetting:ys,rootNodeIsRequiredInDataSetting:Es,pleaseEnterMaxHeight:As,pleaseEnter:Cs,pleaseEnterWatermark:Fs,pleaseEnterFileName:ws,pleaseUploadAtLeastOnePrintTemplate:Bs,pleaseAssignBusiness:bs,pleaseAssignExternal:Ss},Ms="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ns="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Is="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",xs="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Os="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Rs="{caption}\u5FC5\u9808",$s="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ps="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ts="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ls="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",js="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",qs="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ks="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Vs="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Us="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Hs="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",zs="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ws="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Zs="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Xs="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Gs="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Js="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ks="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Qs="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ys="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",ec="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",tc="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",nc="\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",rc="\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",uc="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ic="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",oc="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",ac="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",sc="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",cc="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",fc="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",lc="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",hc="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",dc="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",pc="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Dc="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",gc="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",vc="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",mc="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",yc="please select control",Ec="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Ac="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Cc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Fc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",wc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Bc="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",bc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Sc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",_c="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Mc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Nc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Ic="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",xc="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Oc="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Rc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",$c="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Pc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Tc="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Lc={isNotNumber:Ms,isNotString:Ns,isNotObject:Is,isNotArray:xs,isNotBoolean:Os,runtimeRequired:Rs,pleaseEnterCaption:$s,pleaseEnterCaptionTip:Ps,pleaseEnterPlaceholder:Ts,pleaseEnterFieldCode:Ls,pleaseEnterForm:js,pleaseEnterList:qs,pleaseEnterProcess:ks,pleaseEnterLabel:Vs,pleaseEnterValue:Us,bizKeyNotBindFiled:Hs,pleaseEnterNumberRange:zs,pleaseEnterAValueGreaterThanMin:Ws,pleaseEnterAValueLessThanMax:Zs,numberRangeSetError:Xs,stringRangeError:Gs,attachmentMaxSize:Js,pleaseEnterTotalScoreSetting:Ks,theTotalScoreMustNotBeLessThan1:Qs,scoreDefaultValueRange:Ys,attachmentLimitError:ec,PleaseReselectTheOptionalQuantity:tc,TheMaximumLengthIsGreaterThanTheMinimumLength:nc,TheMinimumLengthIsGreaterThanTheMaximumLength:rc,PleaseSelectTheCorrectOptionSettings:uc,optionIdIsRepeat:ic,optionIsRequired:oc,pleaseEnterDataCode:ac,pleaseEnterValueFieldCode:sc,pleaseEnterSvcCode:cc,pleaseBindAtLeastOneDisplayValue:fc,pleaseSelectProvince:lc,pleaseSelectCity:hc,pleaseSelectDistrict:dc,limitRowsCannotBeLessThan0:pc,TheNumberOfRowsCannotBeLessThanMinRows:Dc,pleaseEnterColumnWidth:gc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:vc,pleaseCompleteAllRulesAndConditions:mc,pleaseSelectControl:yc,pleaseSelectDashboard:Ec,theViewNameCannotBeEmpty:Ac,pleaseSelectOcrType:Cc,pleaseSelectAtLeastOneFieldToFillIn:Fc,pleaseChooseAtLeastOne:wc,pleaseEnterButtonContent:Bc,pleaseEnterDataCodeInDataSetting:bc,pleaseEnterValueFieldCodeInDataSetting:Sc,pleaseEnterSvcCodeInDataSetting:_c,pleaseBindAtLeastOneDisplayValueInDataSetting:Mc,rootNodeIsRequiredInDataSetting:Nc,pleaseEnterMaxHeight:Ic,pleaseEnter:xc,pleaseEnterWatermark:Oc,pleaseEnterFileName:Rc,pleaseUploadAtLeastOnePrintTemplate:$c,pleaseAssignBusiness:Pc,pleaseAssignExternal:Tc},jc={zhCN:ma,enUS:_s,jaJP:Lc},xe;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(xe||(xe={}));var pt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(pt||(pt={}));var Xr="zh-CN";function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(Le||(Le={}));var X;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(X||(X={}));var H;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(H||(H={}));var De;De={},we(De,H.ARRAY,X.ARRAY_COLUMN),we(De,H.AUTO_NUMBER,X.AUTO_NUMBER_COLUMN),we(De,H.DECIMAL,X.DECIMAL_COLUMN),we(De,H.DEPARTMENTS,X.DEPARTMENT_COLUMN),we(De,H.FILE,X.FILE_COLUMN),we(De,H.IMAGE,X.IMAGE_COLUMN),we(De,H.ADDRESS,X.LOCATION_COLUMN),we(De,H.EMPLOYEES,X.EMPLOYEE_COLUMN),we(De,H.TEXT,X.TEXT_COLUMN),we(De,H.TIMESCOPE,X.TIMESCOPE_COLUMN),we(De,H.TIMESTAMP,X.TIMESTAMP_COLUMN),we(De,H.VARCHAR,X.VARCHAR_COLUMN),we(De,H.RELATION,X.VARCHAR_COLUMN);var Gr;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(Gr||(Gr={}));var Jr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",qc=Jr+"0123456789";function jn(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?Jr:qc,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function qn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kc(e){if(Array.isArray(e))return qn(e)}function Vc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Jt(e,t,n){return Uc()?Jt=Reflect.construct:Jt=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&Ot(l,o.prototype),l},Jt.apply(null,arguments)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xt(e)}function Qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ot(e,t)}function Hc(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function zc(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wc(){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 Zc(e,t){return t&&(Xc(t)==="object"||typeof t=="function")?t:Vc(e)}function Ot(e,t){return Ot=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ot(e,t)}function Yr(e){return kc(e)||zc(e)||Gc(e)||Wc()}var Xc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Gc(e,t){if(!!e){if(typeof e=="string")return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(e,t)}}function kn(e){var t=typeof Map=="function"?new Map:void 0;return kn=function(r){if(r===null||!Hc(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return Jt(r,arguments,xt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ot(u,r)},kn(e)}function Jc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function eu(e){var t=Jc();return function(){var r=xt(e),u;if(t){var i=xt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Zc(this,u)}}var Vn=console;function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Vn).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(Yr(u)))}function Un(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Vn).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(Yr(u)))}function Kc(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Hn=function(e){Qr(n,e);var t=eu(n);function n(r){Kr(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?Kc(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(kn(Error)),Qc=function(e){Qr(n,e);var t=eu(n);function n(r){Kr(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Hn);function Xe(e){throw new Hn(e)}function tu(e){throw new Qc(e)}function Kt(e){Vn.error(new Hn(e))}function at(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":at(n==null?void 0:n.children,t);break;case"search":at(n==null?void 0:n.children,t);break;case"form":t(n)}})}var Yc=Object.prototype.toString;function nu(e,t){return Yc.call(e)==="[object "+t+"]"}function ef(e){return nu(e,"String")}function tf(e){return nu(e,"Promise")}var nf=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();tf(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,i,o,c){if(u!==void 0){var s=u[i];if(!(o===c.length-1&&!ef(s)))return s}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var i=n[u];return i!==void 0?String(i):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function rf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Oe=function(){function e(){rf(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr;return new nf({locale:n,messages:jc})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Oe.$i18n=Oe.resetI18n();function ru(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return r.reduce(function(i,o,c,s){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){Ke("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return c===s.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},e),u}var Qe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn={exports:{}};(function(e){(function(t){var n=function(g,E,b){if(!l(E)||a(E)||h(E)||d(E)||s(E))return E;var C,x=0,$=0;if(f(E))for(C=[],$=E.length;x<$;x++)C.push(n(g,E[x],b));else{C={};for(var P in E)Object.prototype.hasOwnProperty.call(E,P)&&(C[g(P,b)]=n(g,E[P],b))}return C},r=function(g,E){E=E||{};var b=E.separator||"_",C=E.split||/(?=[A-Z])/;return g.split(C).join(b)},u=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(E,b){return b?b.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},i=function(g){var E=u(g);return E.substr(0,1).toUpperCase()+E.substr(1)},o=function(g,E){return r(g,E).toLowerCase()},c=Object.prototype.toString,s=function(g){return typeof g=="function"},l=function(g){return g===Object(g)},f=function(g){return c.call(g)=="[object Array]"},a=function(g){return c.call(g)=="[object Date]"},h=function(g){return c.call(g)=="[object RegExp]"},d=function(g){return c.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},D=function(g,E){var b=E&&"process"in E?E.process:E;return typeof b!="function"?g:function(C,x){return b(C,g,x)}},m={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(g,E){return n(D(u,E),g)},decamelizeKeys:function(g,E){return n(D(o,E),g,E)},pascalizeKeys:function(g,E){return n(D(i,E),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=m:t.humps=m})(Qe)})(zn);function G(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function je(e){return Object.prototype.toString.call(e)==="[object Object]"}function uf(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function Dt(e){return Array.isArray(e)}function Be(e){return typeof e=="string"}function Qt(e){return typeof e=="number"}function iu(e){return typeof e=="function"}function of(e){return Dt(e)&&e.every(function(t){return Be(t)})}function af(e){return Dt(e)&&e.every(function(t){return Qt(t)||t===""})}function ou(e){return/^\[.*?]$/.test(e)}function Yt(e){return/^{.*?}$/.test(e)}function Wn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sf(e){if(Array.isArray(e))return Wn(e)}function au(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function cf(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){au(i,r,u,o,c,"next",s)}function c(s){au(i,r,u,o,c,"throw",s)}o(void 0)})}}function ff(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lf(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hf(){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 Zn(e){return sf(e)||lf(e)||df(e)||hf()}function df(e,t){if(!!e){if(typeof e=="string")return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(e,t)}}var pf=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},su=function(){function e(){ff(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,i=new Array(u>1?u-1:0),o=1;o<u;o++)i[o-1]=arguments[o];var c=this;return cf(function(){var s,l,f,a,h,d,p,D,m,g,E,b;return pf(this,function(C){switch(C.label){case 0:if(s=c._events.get(r),l=[],!s)return[3,10];f=s.slice(),a=!0,h=!1,d=void 0,C.label=1;case 1:C.trys.push([1,8,9,10]),p=f[Symbol.iterator](),C.label=2;case 2:if(a=(D=p.next()).done)return[3,7];if(m=D.value,!s.includes(m))return[3,6];C.label=3;case 3:return C.trys.push([3,5,,6]),c.debug&&Un.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Zn(i))),[4,m.apply(null,Zn(i))];case 4:return g=C.sent(),c.debug&&Un.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Zn(i),[g])),l.push(g),g===!1?[3,7]:[3,6];case 5:return E=C.sent(),Kt(String(E)),[3,6];case 6:return a=!0,[3,2];case 7:return[3,10];case 8:return b=C.sent(),h=!0,d=b,[3,10];case 9:try{!a&&p.return!=null&&p.return()}finally{if(h)throw d}return[7];case 10:return[2,l]}})})()},t.on=function(r,u){if(this._events.has(r)){var i;(i=this._events.get(r))===null||i===void 0||i.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var i=this._events.get(r),o=i==null?void 0:i.indexOf(u);i==null||i.splice(o,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function Df(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var gf=[{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"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rows-checked"}],cu=function(){function e(){Df(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return e.events.filter(function(i){return u.includes(i.key)})},e}();cu.events=gf;function vf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var fu=[],en=function(){function e(n){vf(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var t=e.prototype;return t.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},t.getControlConfig=function(r){return this.controlConfigMap.get(r)},t.getControls=function(){return this._controls},t.register=function(r){r.__is_control__||Xe("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===r.controlType});return u>-1&&(Ke("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},t.isLayoutControl=function(r){return r.controlType===Le.LAYOUT},t.isFormControl=function(r){return r.controlType===Le.FORM},t.isListControl=function(r){return r.controlType===Le.LIST},t.isColumnControl=function(r){return r.controlType===Le.COLUMN},t.createControl=function(r,u){var i=this;if(Array.isArray(r))return r.map(function(f){return i.createControl(f,u)});r.children&&(r.children=r.children.map(function(f){return i.createControl(f,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(f){return i.createControl(f,u)}));var o=this.getControlFormType(r.type);if(o){var c=r;if(typeof u=="function"){var s=u(c);s&&(c=s)}var l=new o(c);return l}else Xe("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(r,u){var i=this.getControlFormType(r);if(i)return new i(u)},t.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},t._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(i){u.register(i[r])})},e.register=function(r){var u=r.Designer,i=r.Runtime;(!u||!i||!u.__is_control__||!i.__is_control__)&&Xe("".concat(r," is can't register as a Control"));var o=this.staticControls.findIndex(function(c){return c.Designer.controlType===u.controlType});return o>-1&&(Ke("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();en.staticControls=fu,en.staticRegisteredTypes=new Set(fu.map(function(e){return e.Designer.controlType})),en.staticRegisteredConfigs=new Map;function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Rt=function e(t){st(this,e);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},qe=function e(){st(this,e)},tn=function e(t){st(this,e);var n;this.amount=(n=t==null?void 0:t.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=t==null?void 0:t.currency)!==null&&r!==void 0?r:Xn.CNY},nn=function e(t){st(this,e);var n;this.min=(n=t==null?void 0:t.min)!==null&&n!==void 0?n:"";var r;this.max=(r=t==null?void 0:t.max)!==null&&r!==void 0?r:""},rn=function e(t){st(this,e);var n;this.city=(n=t==null?void 0:t.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=t==null?void 0:t.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=t==null?void 0:t.district)!==null&&u!==void 0?u:"";var i;this.districtDisplay=(i=t==null?void 0:t.districtDisplay)!==null&&i!==void 0?i:"";var o;this.province=(o=t==null?void 0:t.province)!==null&&o!==void 0?o:"";var c;this.provinceDisplay=(c=t==null?void 0:t.provinceDisplay)!==null&&c!==void 0?c:""},un=function e(t){st(this,e);var n;this.result=(n=t==null?void 0:t.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=t==null?void 0:t.unit)!==null&&r!==void 0?r:""},Xn;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(Xn||(Xn={}));var lu;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(lu||(lu={}));var Gn;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Gn||(Gn={}));var mf=function e(t){st(this,e);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var i;this.heightConfig=(i=t==null?void 0:t.heightConfig)!==null&&i!==void 0?i:"fill"};function yf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ef(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function on(e,t,n){return Ef()?on=Reflect.construct:on=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&Pt(l,o.prototype),l},on.apply(null,arguments)}function $t(e){return $t=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$t(e)}function Af(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pt(e,t)}function Cf(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ff(e,t){return t&&(wf(t)==="object"||typeof t=="function")?t:yf(e)}function Pt(e,t){return Pt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Pt(e,t)}var wf=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Kn(e){var t=typeof Map=="function"?new Map:void 0;return Kn=function(r){if(r===null||!Cf(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return on(r,arguments,$t(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Pt(u,r)},Kn(e)}function Bf(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function bf(e){var t=Bf();return function(){var r=$t(e),u;if(t){var i=$t(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Ff(this,u)}}var hu=function e(t){Jn(this,e),this.isHide={type:"boolean"}},du=function(e){Af(n,e);var t=bf(n);function n(r){return Jn(this,n),t.call(this)}return n}(Kn(Array)),ct=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Jn(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new mf(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};ct.Rules=hu,ct.RuntimeRules=du;function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}function Sf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Qn(e){return Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(e)}function an(e,t){return an=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},an(e,t)}function _f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function sn(e,t,n){return _f()?sn=Reflect.construct:sn=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&an(l,o.prototype),l},sn.apply(null,arguments)}function Mf(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Yn(e){var t=typeof Map=="function"?new Map:void 0;return Yn=function(r){if(r===null||!Mf(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return sn(r,arguments,Qn(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),an(u,r)},Yn(e)}var Nf=/%[sdj%]/g,pu=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(pu=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function er(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],i=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var o=String(u).replace(Nf,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(s){return"[Circular]"}break;default:return c}});return o}return u}function If(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function re(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||If(t)&&typeof e=="string"&&!e)}function xf(e,t,n){var r=[],u=0,i=e.length;function o(c){r.push.apply(r,c),u++,u===i&&n(r)}e.forEach(function(c){t(c,o)})}function Du(e,t,n){var r=0,u=e.length;function i(o){if(o&&o.length){n(o);return}var c=r;r=r+1,c<u?t(e[c],i):n([])}i([])}function Of(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var gu=function(e){Sf(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(Yn(Error));function Rf(e,t,n,r){if(t.first){var u=new Promise(function(a,h){var d=function(m){return r(m),m.length?h(new gu(m,er(m))):a()},p=Of(e);Du(p,n,d)});return u.catch(function(a){return a}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),c=o.length,s=0,l=[],f=new Promise(function(a,h){var d=function(D){if(l.push.apply(l,D),s++,s===c)return r(l),l.length?h(new gu(l,er(l))):a()};o.length||(r(l),a()),o.forEach(function(p){var D=e[p];i.indexOf(p)!==-1?Du(D,n,d):xf(D,n,d)})});return f.catch(function(a){return a}),f}function vu(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function mu(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=ke(ke({},e[n]),r):e[n]=r}}return e}function yu(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||re(t,i||e.type))&&r.push(be(u.messages.required,e.fullField))}function $f(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(be(u.messages.whitespace,e.fullField))}var tr={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},Tt={integer:function(t){return Tt.number(t)&&parseInt(t,10)===t},float:function(t){return Tt.number(t)&&!Tt.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Tt.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(tr.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(tr.url)},hex:function(t){return typeof t=="string"&&!!t.match(tr.hex)}};function Pf(e,t,n,r,u){if(e.required&&t===void 0){yu(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?Tt[o](t)||r.push(be(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(be(u.messages.types[o],e.fullField,e.type))}function Tf(e,t,n,r,u){var i=typeof e.len=="number",o=typeof e.min=="number",c=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,a=typeof t=="number",h=typeof t=="string",d=Array.isArray(t);if(a?f="number":h?f="string":d&&(f="array"),!f)return!1;d&&(l=t.length),h&&(l=t.replace(s,"_").length),i?l!==e.len&&r.push(be(u.messages[f].len,e.fullField,e.len)):o&&!c&&l<e.min?r.push(be(u.messages[f].min,e.fullField,e.min)):c&&!o&&l>e.max?r.push(be(u.messages[f].max,e.fullField,e.max)):o&&c&&(l<e.min||l>e.max)&&r.push(be(u.messages[f].range,e.fullField,e.min,e.max))}var gt="enum";function Lf(e,t,n,r,u){e[gt]=Array.isArray(e[gt])?e[gt]:[],e[gt].indexOf(t)===-1&&r.push(be(u.messages[gt],e.fullField,e[gt].join(", ")))}function jf(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(be(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var i=new RegExp(e.pattern);i.test(t)||r.push(be(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var U={required:yu,whitespace:$f,type:Pf,range:Tf,enum:Lf,pattern:jf};function qf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"string")&&!e.required)return n();U.required(e,t,r,i,u,"string"),re(t,"string")||(U.type(e,t,r,i,u),U.range(e,t,r,i,u),U.pattern(e,t,r,i,u),e.whitespace===!0&&U.whitespace(e,t,r,i,u))}n(i)}function kf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}function Vf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Uf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}function Hf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),re(t)||U.type(e,t,r,i,u)}n(i)}function zf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Wf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Zf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return n();U.required(e,t,r,i,u,"array"),t!=null&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Xf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}var Gf="enum";function Jf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U[Gf](e,t,r,i,u)}n(i)}function Kf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"string")&&!e.required)return n();U.required(e,t,r,i,u),re(t,"string")||U.pattern(e,t,r,i,u)}n(i)}function Qf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"date")&&!e.required)return n();if(U.required(e,t,r,i,u),!re(t,"date")){var c;t instanceof Date?c=t:c=new Date(t),U.type(e,c,r,i,u),c&&U.range(e,c.getTime(),r,i,u)}}n(i)}function Yf(e,t,n,r,u){var i=[],o=Array.isArray(t)?"array":typeof t;U.required(e,t,r,i,u,o),n(i)}function nr(e,t,n,r,u){var i=e.type,o=[],c=e.required||!e.required&&r.hasOwnProperty(e.field);if(c){if(re(t,i)&&!e.required)return n();U.required(e,t,r,o,u,i),re(t,i)||U.type(e,t,r,o,u)}n(o)}function el(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u)}n(i)}var Lt={string:qf,method:kf,number:Vf,boolean:Uf,regexp:Hf,integer:zf,float:Wf,array:Zf,object:Xf,enum:Jf,pattern:Kf,date:Qf,url:nr,hex:nr,email:nr,required:Yf,any:el};function rr(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ur=rr();function Ye(e){this.rules=null,this._messages=ur,this.define(e)}Ye.prototype={messages:function(t){return t&&(this._messages=mu(rr(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var i=t,o=n,c=r;if(typeof o=="function"&&(c=o,o={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(),Promise.resolve();function s(D){var m,g=[],E={};function b(C){if(Array.isArray(C)){var x;g=(x=g).concat.apply(x,C)}else g.push(C)}for(m=0;m<D.length;m++)b(D[m]);g.length?E=er(g):(g=null,E=null),c(g,E)}if(o.messages){var l=this.messages();l===ur&&(l=rr()),mu(l,o.messages),o.messages=l}else o.messages=this.messages();var f,a,h={},d=o.keys||Object.keys(this.rules);d.forEach(function(D){f=u.rules[D],a=i[D],f.forEach(function(m){var g=m;typeof g.transform=="function"&&(i===t&&(i=ke({},i)),a=i[D]=g.transform(a)),typeof g=="function"?g={validator:g}:g=ke({},g),g.validator=u.getValidationMethod(g),g.field=D,g.fullField=g.fullField||D,g.type=u.getType(g),g.validator&&(h[D]=h[D]||[],h[D].push({rule:g,value:a,source:i,field:D}))})});var p={};return Rf(h,o,function(D,m){var g=D.rule,E=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");E=E&&(g.required||!g.required&&D.value),g.field=D.field;function b($,P){return ke(ke({},P),{},{fullField:g.fullField+"."+$})}function C($){$===void 0&&($=[]);var P=$;if(Array.isArray(P)||(P=[P]),!o.suppressWarning&&P.length&&Ye.warning("async-validator:",P),P.length&&g.message!==void 0&&(P=[].concat(g.message)),P=P.map(vu(g)),o.first&&P.length)return p[g.field]=1,m(P);if(!E)m(P);else{if(g.required&&!D.value)return g.message!==void 0?P=[].concat(g.message).map(vu(g)):o.error&&(P=[o.error(g,be(o.messages.required,g.field))]),m(P);var M={};if(g.defaultField)for(var R in D.value)D.value.hasOwnProperty(R)&&(M[R]=g.defaultField);M=ke(ke({},M),D.rule.fields);for(var W in M)if(M.hasOwnProperty(W)){var k=Array.isArray(M[W])?M[W]:[M[W]];M[W]=k.map(b.bind(null,W))}var Q=new Ye(M);Q.messages(o.messages),D.rule.options&&(D.rule.options.messages=o.messages,D.rule.options.error=o.error),Q.validate(D.value,D.rule.options||o,function(K){var te=[];P&&P.length&&te.push.apply(te,P),K&&K.length&&te.push.apply(te,K),m(te.length?te:null)})}}var x;g.asyncValidator?x=g.asyncValidator(g,D.value,C,D.source,o):g.validator&&(x=g.validator(g,D.value,C,D.source,o),x===!0?C():x===!1?C(g.message||g.field+" fails"):x instanceof Array?C(x):x instanceof Error&&C(x.message)),x&&x.then&&x.then(function(){return C()},function($){return C($)})},function(D){s(D)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Lt.hasOwnProperty(t.type))throw new Error(be("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?Lt.required:Lt[this.getType(t)]||!1}},Ye.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Lt[t]=n},Ye.warning=pu,Ye.messages=ur,Ye.validators=Lt;var tl={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 nl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Ye(e);return n.messages(Object.assign(tl,t)),n}var rl=new su;function ir(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ul(e){if(Array.isArray(e))return e}function il(e){if(Array.isArray(e))return ir(e)}function Eu(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function Au(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){Eu(i,r,u,o,c,"next",s)}function c(s){Eu(i,r,u,o,c,"throw",s)}o(void 0)})}}function ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function al(e,t,n){return t&&Cu(e.prototype,t),n&&Cu(e,n),e}function sl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fu(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function wu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cl(){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 fl(){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 Bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){sl(e,u,n[u])})}return e}function ll(e){return ul(e)||wu(e)||bu(e)||cl()}function or(e){return il(e)||wu(e)||bu(e)||fl()}function bu(e,t){if(!!e){if(typeof e=="string")return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ir(e,t)}}var Su=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ve=function(){function t(r){var u=this;ol(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Mu,this.removeSetting=_u,this._callControlHooks("preInstance",r);var i=Fu(this,t)?this.constructor:void 0,o=i.controlName,c=i.controlIcon,s=i.controlType,l=i.controlFieldType,f=i.controlEventKeys,a=i.controlCustomEvents,h=i.name,d=i.setting;o&&c&&s||tu("The ".concat(h," controlName,controlIcon,controlType is not define"));var p;this.id=(p=r==null?void 0:r.id)!==null&&p!==void 0?p:jn(10),this.name=o,this.icon=c;var D;this.type=(D=r==null?void 0:r.type)!==null&&D!==void 0?D:s,this.props=new ct(r==null?void 0:r.props,(Fu(this,t)?this.constructor:void 0).controlName);var m;this.controlType=(m=r==null?void 0:r.controlType)!==null&&m!==void 0?m:"base",this.setting=G(d);var g;this.fieldType=(g=r==null?void 0:r.fieldType)!==null&&g!==void 0?g:l,this.eventKeys=G(f),this.customEvents=G(a),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=t.prototype;return n._callControlHooks=function(){for(var u=arguments.length,i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];var c,s=ll(i),l=s[0],f=s.slice(1);return(c=rl).emit.apply(c,[l,this].concat(or(f)))},n.preUpdate=function(u,i){this._callControlHooks("preUpdateProps",u,i)},n.postUpdate=function(u,i){this._callControlHooks("postUpdateProps",u,i)},n.updateProps=function(u,i){this.preUpdate(u,i),ru(this.props,u,i),this.postUpdate(u,i)},n.preValidate=function(){var u=this;return Au(function(){var i,o,c;return Su(this,function(s){switch(s.label){case 0:return i=Bu({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return o=s.sent(),c=o[o.length-1],[2,c===!1?void 0:c]}})})()},n.validate=function(u,i){var o=this;return Au(function(){var c,s,l,f;return Su(this,function(a){switch(a.label){case 0:return[4,o.preValidate()];case 1:c=a.sent(),s=c!==void 0?c:Bu({},o.rules),Array.isArray(i)&&i.forEach(function(h){s.hasOwnProperty(h)&&delete s[h]}),l=nl(s,u),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l.validate(o.props)];case 3:return a.sent(),[2,!0];case 4:throw f=a.sent(),f.control||(f.control=o),f;case 5:return[2]}})})()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,o=this.id,c=this.type,s=this.props,l=s.dataBind,f=s.datasourceBind,a=s.optionConfig,h=s.caption,d=s.required,p=s.maxLength,D=s.options,m=s.encrypted,g=s.encryptedMode;if(!(!i&&!l&&!f)){var E={parentId:u,fieldType:i,controlId:o,caption:h,type:c,props:{}};switch(l&&(E.dataBind=l),a){case"datasource":case void 0:f&&(E.datasourceBind=f);break;case"custom":E.props.options=D;break}return d!==void 0&&(E.required=d),p!==void 0&&(E.maxLength=p),m!==void 0&&(E.encrypted=m),g!==void 0&&(E.encryptedMode=g),E}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:G(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var o;(o=this.setting).push.apply(o,or(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},al(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();Ve.controlName="\u63A7\u4EF6",Ve.controlIcon="icon",Ve.controlType="control",Ve.controlEventKeys=[],Ve.controlCustomEvents=[],Ve.setting=[],Ve.__is_control__=!0,Ve.removeSettingItem=_u,Ve.updateSettingItem=Mu;function _u(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(s){return s.key===(u?r.key:r)});if(i!==-1){var o,c;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(s){return!r.hideItems.includes(s)}):t.setting.splice(i,1),u&&!(!((c=t.setting[i].showItems)===null||c===void 0)&&c.length)&&t.setting.splice(i,1)}})}function Mu(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var i=n.setting.find(function(l){return l.key===u});if(i){if(typeof t=="boolean")i.visible=t;else if(typeof t=="object"){var o,c=(o=t.type)!==null&&o!==void 0?o:"replace";if(c==="replace")i.showItems=t.showItems;else{var s;(s=i.showItems).push.apply(s,or(t.showItems))}}}})}function hl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dl(e,t,n){return t&&Nu(e.prototype,t),n&&Nu(e,n),e}function pl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var vt=function(){function t(n){hl(this,t),this.customEvents=[],this.parent=null;var r=pl(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,o=r.name,c=r.controlCustomEvents;u||tu("The ".concat(o," controlType is not define"));var s;this.id=(s=n==null?void 0:n.id)!==null&&s!==void 0?s:jn(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new ct(n==null?void 0:n.props),this.customEvents=c;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var a;this.fieldType=(a=n==null?void 0:n.fieldType)!==null&&a!==void 0?a:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:Gn.UNKNOWN}return dl(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();vt.controlType="control",vt.__is_control__=!0,vt.controlCustomEvents=[];function Dl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ar(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},cn(e)}function sr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cr(e,t)}function gl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function vl(e,t){return t&&(ml(t)==="object"||typeof t=="function")?t:Dl(e)}function cr(e,t){return cr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},cr(e,t)}var ml=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function yl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function fr(e){var t=yl();return function(){var r=cn(e),u;if(t){var i=cn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return vl(this,u)}}var El=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;u=t.call(this,r),u.dataBind={},u.caption={type:"string",required:!0,message:Oe.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:Oe.getMessage("pleaseEnterCaptionTip")};var i={fieldCode:{type:"string",required:!0,message:Oe.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:Oe.getMessage("pleaseEnterFieldCode")}};if(gl(r.dataBind,Rt))u.dataBind={type:"object",required:!0,fields:G(i),message:Oe.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:Oe.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(c){o.fields[c]={type:"object",required:!0,fields:G(i),message:Oe.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(hu),Al=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;return u=t.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:Oe.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(du),lr=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;u=t.call(this,r);var i;u.caption=(i=r==null?void 0:r.caption)!==null&&i!==void 0?i:"";var o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var c;u.isShowCaptionTip=(c=r==null?void 0:r.isShowCaptionTip)!==null&&c!==void 0?c:!1;var s;u.captionTip=(s=r==null?void 0:r.captionTip)!==null&&s!==void 0?s:"";var l;u.defaultState=(l=r==null?void 0:r.defaultState)!==null&&l!==void 0?l:"default";var f;u.labelPosition=(f=r==null?void 0:r.labelPosition)!==null&&f!==void 0?f:"top";var a;u.placeholder=(a=r==null?void 0:r.placeholder)!==null&&a!==void 0?a:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var d;u.requiredMessage=(d=r==null?void 0:r.requiredMessage)!==null&&d!==void 0?d:"",u.dataBind=new Rt(r==null?void 0:r.dataBind);var p;return u.defaultValue=(p=r==null?void 0:r.defaultValue)!==null&&p!==void 0?p:"",u}return n}(ct);lr.Rules=El,lr.RuntimeRules=Al;function Cl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(e)}function wl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hr(e,t)}function Bl(e,t){return t&&(bl(t)==="object"||typeof t=="function")?t:Cl(e)}function hr(e,t){return hr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},hr(e,t)}var bl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Sl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _l(e){var t=Sl();return function(){var r=fn(e),u;if(t){var i=fn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Bl(this,u)}}var Ue=function(e){wl(n,e);var t=_l(n);function n(r){Fl(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new lr(r==null?void 0:r.props),u}return n}(vt);function Ml(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ln(e)}function Il(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}function xl(e,t){return t&&(Ol(t)==="object"||typeof t=="function")?t:Ml(e)}function dr(e,t){return dr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},dr(e,t)}var Ol=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Rl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function $l(e){var t=Rl();return function(){var r=ln(e),u;if(t){var i=ln(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return xl(this,u)}}var Iu=function(e){Il(n,e);var t=$l(n);function n(r){return Nl(this,n),t.call(this,r)}return n}(ct);function pr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pl(e){if(Array.isArray(e))return pr(e)}function Tl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ll(){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 xu(e){return Pl(e)||Tl(e)||jl(e)||Ll()}function jl(e,t){if(!!e){if(typeof e=="string")return pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pr(e,t)}}function ql(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Ou(e,t){e.parent=t,ql(e,"parent")}function kl(e,t){e.forEach(function(n){Ou(n,t)})}var Ru=Symbol("targetKey");function $u(e){var t;return(t=e[Ru])!==null&&t!==void 0?t:e}function Pu(e,t){return kl(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),c=2;c<i;c++)o[c-2]=arguments[c];var s;return u===Ru?r:(s=Reflect).get.apply(s,[r,u].concat(xu(o)))},set:function(r,u,i){for(var o=arguments.length,c=new Array(o>3?o-3:0),s=3;s<o;s++)c[s-3]=arguments[s];var l;if(Dt(e)&&u==="length"&&i===e.length)return!0;var f=(l=Reflect).set.apply(l,[r,u,i].concat(xu(c)));return je(i)&&Ou(i,t),f}})}function hn(e,t,n,r){var u=r!=null?r:e,i=Pu($u(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(c){i=Pu($u(c),u)},enumerable:!0})}function Dr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vl(e){if(Array.isArray(e))return Dr(e)}function Tu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lu(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function Ul(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){Lu(i,r,u,o,c,"next",s)}function c(s){Lu(i,r,u,o,c,"throw",s)}o(void 0)})}}function Hl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?mt=Reflect.get:mt=function(u,i,o){var c=e0(u,i);if(!!c){var s=Object.getOwnPropertyDescriptor(c,i);return s.get?s.get.call(o):s.value}},mt(e,t,n||e)}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},et(e)}function Wl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gr(e,t)}function Zl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Xl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gl(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){zl(e,u,n[u])})}return e}function Kl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Ql(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Yl(e,t){return t&&(t0(t)==="object"||typeof t=="function")?t:Tu(e)}function gr(e,t){return gr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},gr(e,t)}function e0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=et(e),e!==null););return e}function ju(e){return Vl(e)||Xl(e)||n0(e)||Gl()}var t0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function n0(e,t){if(!!e){if(typeof e=="string")return Dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(e,t)}}function r0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function u0(e){var t=r0();return function(){var r=et(e),u;if(t){var i=et(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Yl(this,u)}}var i0=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},o0=1e4,qu=function(t){Wl(r,t);var n=u0(r);function r(i){Hl(this,r);var o;o=n.call(this,i),o.controlType="layout";var c=Zl(this,r)?this.constructor:void 0,s=c.excludes,l=c.childrenMaxLength;return o.props=new Iu(i==null?void 0:i.props),hn(Tu(o),"children",i==null?void 0:i.children),o.excludes=G(s),o.childrenMaxLength=l,o}var u=r.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var c=this.judgeExcludesChildren(o);return c&&this.childrenMaxLength>this.children.length},u.validate=function(o,c){var s=this,l=this,f=function(){return mt(et(r.prototype),"validate",s)};return Ul(function(){return i0(this,function(a){switch(a.label){case 0:return[4,f().call(l,o,c)];case 1:return a.sent(),[4,Promise.all(l.children.map(function(h){return h.validate(o,c)}))];case 2:return a.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,c=mt(et(r.prototype),"toDataBindModel",this).call(this),s=c?[c]:[];return this.children.reduce(function(l,f){var a=f.toDataBindModel(o);if(Array.isArray(a)){var h=a.filter(function(d){return!!d});return ju(l).concat(ju(h))}return a&&l.push(a),l},s)},u.toSchema=function(){var o=mt(et(r.prototype),"toSchema",this).call(this),c=this.children.map(function(s){var l=s.toSchema();return l});return Ql(Jl({},o),{children:c})},r}(Ve);qu.excludes=!1,qu.childrenMaxLength=o0;function ku(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(e)}function s0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}function c0(e,t){return t&&(f0(t)==="object"||typeof t=="function")?t:ku(e)}function vr(e,t){return vr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},vr(e,t)}var f0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function l0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function h0(e){var t=l0();return function(){var r=dn(e),u;if(t){var i=dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return c0(this,u)}}var d0=function(e){s0(n,e);var t=h0(n);function n(r){a0(this,n);var u;return u=t.call(this,r),u.controlType="layout",u.props=new Iu(r==null?void 0:r.props),hn(ku(u),"children",r==null?void 0:r.children),u}return n}(vt);function Vu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e){return pn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(e)}function D0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mr(e,t)}function g0(e,t){return t&&(v0(t)==="object"||typeof t=="function")?t:Vu(e)}function mr(e,t){return mr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},mr(e,t)}var v0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function m0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function y0(e){var t=m0();return function(){var r=pn(e),u;if(t){var i=pn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return g0(this,u)}}var E0=function(e){D0(n,e);var t=y0(n);function n(r,u){p0(this,n);var i;return i=t.call(this,u),hn(Vu(i),"headers",u==null?void 0:u.headers,r),i}return n}(ct);H.LIST;function yr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C0(e,t,n){return t&&Uu(e.prototype,t),n&&Uu(e,n),e}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(e)}function F0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Er(e,t)}function w0(e,t){return t&&(B0(t)==="object"||typeof t=="function")?t:yr(e)}function Er(e,t){return Er=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Er(e,t)}var B0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function b0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function S0(e){var t=b0();return function(){var r=Dn(e),u;if(t){var i=Dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return w0(this,u)}}var gn=function(e){F0(n,e);var t=S0(n);function n(r){A0(this,n);var u;return u=t.call(this,r),u.controlType="list",u.props=new E0(yr(u),r==null?void 0:r.props),hn(yr(u),"children",r==null?void 0:r.children),u}return C0(n,[{key:"length",get:function(){return this.children.length}}]),n}(vt);function vn(e){return e.controlType===Le.LAYOUT||e.controlType===Le.WRAP||e.controlType===Le.LIST||e.controlType===Le.SEARCH}function jt(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===X.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else vn(n)?jt(n==null?void 0:n.children,t):n instanceof Ue&&t(n)})}function qt(e,t){Array.isArray(e)&&e.map(n=>{n.type===X.DATA_VIEW||n.type===X.SIMPLE_SEARCH?t(n):vn(n)&&qt(n==null?void 0:n.children,t)})}class Ar extends en{constructor(t){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=t;this._schema=n,this._instance=this.createControl(n,t.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const t=[],n={};return Hu(this._instance,r=>{t.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r)}),this._flatInstances=t,this._instanceMap=n,this._flatInstances}get schema(){return this._schema}get instance(){return this._instance}get flatInstances(){return this._flatInstances}get instanceMap(){return this._instanceMap}get rules(){let t={};return qt(this._instance,n=>{t[n.id]=n.rules[0],jt(n.children,r=>{(r instanceof Ue||r instanceof gn)&&_0(t[n.id].fields,r)})}),t}get antdRules(){let t={};return qt(this._instance,n=>{t[n.id]=n.rules[0],jt(n.children,r=>{(r instanceof Ue||r instanceof gn)&&M0(t[n.id].fields,r)})}),t}}function Hu(e,t){Array.isArray(e)?e.map(n=>{t(n),vn(n)&&Hu(n.children,t)}):t(e)}function Cr(e){return e.props.isHide?!0:e.parent===null?!1:Cr(e.parent)}function _0(e,t){if(!Cr(t)){if(t instanceof Ue)e[t.id]=t.rules;else if(t.type===X.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{at(r.children,i=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[i.id]=i.rules)})}),e[t.id].push(n)}}}function M0(e,t){Cr(t)||(t instanceof Ue?e[t.id]=t.rules:t.type===X.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};at(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class N0{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i,fieldCodeState:o}=I0(t.instance);this.emptyState=r,this.state=n,this.fieldCodeState=o,this.dataBindMapping=u,this.controlIdMapping=i}setState(t,n,r){const u=this.controlIdMapping[t];u!==void 0?this.state[u.dataView][t]=n:r!==void 0?Object.keys(this.controlIdMapping).map(i=>{const o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(this.state[o][i][r][t]=n)})}):this.state[t]=n}getState(t,n){if(this.state[t]!==void 0)return this.state[t];{const u=this.controlIdMapping[t];if(u!==void 0)return this.state[u.dataView][t];if(n!==void 0){let i;return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{var f;l===t&&(i=(f=this.state[c][o][n])==null?void 0:f[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{l===t&&this.state[c][o].map(f=>{i.push(f[t])})})}),i}}}getFieldCodeState(t){if(this.fieldCodeState[t]!==void 0)return this.fieldCodeState[t];{const r=this.controlIdMapping[t];if(r.dataBind.dataCode,r!==void 0){if(r.dataView===t)return this.fieldCodeState[t];{const u=r.dataBind.dataCode;return this.fieldCodeState[r.dataView][u]||this.fieldCodeState[r.dataView]}}}}getEmptyState(t){if(this.emptyState[t]!==void 0)return this.emptyState[t];{const r=this.controlIdMapping[t];if(r!==void 0)return this.emptyState[r.dataView][t];{let u;return Object.keys(this.controlIdMapping).map(i=>{const o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(u=this.emptyState[o][i][t])})}),u}}}getDataBind(t){let n=this.controlIdMapping[t];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let i in u.children)if(i===t){n=u.children[i];break e}}}return n==null?void 0:n.dataBind}}function I0(e){let t={},n={},r={},u={},i={},o={};return qt(e,c=>{const s=c.id,l={},f={},a={},h={};jt([c],(d,p)=>{x0(l,f,a,h,d),O0(i,s,d),R0(o,s,d)}),t[s]=l,n[s]=f,r[s]=a,u[s]=h}),{state:t,emptyState:n,databindMapping:i,controlidMapping:o,fieldCodeState:r,fieldCodeEmptyState:u}}function x0(e,t,n,r,u){var i,o;if(u instanceof Ue)if(e[u.id]=G(u.props.defaultValue),t[u.id]=G(u.props.defaultValue),u.props.dataBind instanceof qe)Object.keys(u.props.dataBind).forEach(function(c){const s=u.props.dataBind,l=u.props.defaultValue;let f=s[c].fieldCode;n[f]=G(l[c]),r[f]=G(l[c])});else{let c=u.props.dataBind.fieldCode;n[c]=G(u.props.defaultValue),r[c]=G(u.props.defaultValue)}else{const c={},s={};at(u.props.headers,f=>{c[f.id]=G(f.props.defaultValue);const a=f.props.dataBind.fieldCode;f.props.dataBind instanceof qe?Object.keys(f.props.dataBind).forEach(function(h){s[f.props.dataBind[h].fieldCode]=G(f.props.defaultValue[h])}):s[a]=G(f.props.defaultValue)}),e[u.id]=new Array((i=u.props.defaultRows)!=null?i:1).fill(0).map(()=>G(c)),t[u.id]=c;const l=u.props.datasourceBind.dataCode;n[l]=new Array((o=u.props.defaultRows)!=null?o:1).fill(0).map(()=>G(s)),r[l]=s}}function O0(e,t,n){if(n instanceof Ue)n.props.dataBind instanceof qe?Object.keys(n.props.dataBind).map(r=>{const u=n.props.dataBind,i=u[r].dataCode;i!==void 0&&(e[i]===void 0&&(e[i]={controlId:n.id,fields:[],dataViewId:t}),e[i].fields.push({fieldCode:u[r].fieldCode,controlId:n.id,dataBind:u,dataViewId:[t]}))}):(e[n.props.dataBind.dataCode]===void 0&&(e[n.props.dataBind.dataCode]={controlId:t,fields:[],dataViewId:t}),e[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[t]}));else{if(n.props.datasourceBind.dataCode===""){Ke(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}e[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:t};const r=n.id;at(n.props.headers,u=>{u.props.dataBind instanceof qe?Object.keys(u.props.dataBind).map(i=>{const o=u.props.dataBind,c=o[i].dataCode;e[c].fields.push({fieldCode:o[i].fieldCode,controlId:u.id,dataBind:o,dataViewId:[t,r]})}):e[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[t,r]})})}}function R0(e,t,n){n instanceof Ue?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===X.SUBTABLE&&(e[n.id]={dataBind:new Rt({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},at(n.props.headers,r=>{var u,i;Object.assign((i=(u=e[n.id])==null?void 0:u.children)!=null?i:{},{[r.id]:{dataBind:r.props.dataBind}})}))}const zu=["splice","push","shift","pop","unshift","reverse"],Fr=Symbol("__engineProxy__"),wr=Symbol("__engineTarget__"),Wu=Symbol("__engineArrayBeforeSetCallbackFlag__"),Zu=Symbol("__engineProxyThisKey__"),Re={type:"",args:[],callback:Xu};function Xu(){}j0();function $0(e,t,n,r,u){if(Re.type){Re.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){Xe(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${zu.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const c=n,s=e.length;if(c>e.length){Xe("Do not directly modify the length of the array data, please add new rows");return}return c===e.length?void 0:()=>u.call(null,e,r,"splice",[c,s-c])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function P0(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===Fr?!0:u===wr?r:Array.isArray(r)&&u===Wu?n:u===Zu?e:Reflect.get(r,u,i)},set(r,u,i,o){var h;let c=i;const s=r[u],l=e===""?u:e+"."+u;function f(d){if(typeof d=="object"&&d!==null)return d[Fr]!==!0?mn(d,t,n,l):mn(d[wr],t,n,l)}c=(h=f(i))!=null?h:c;let a;if(Array.isArray(r)){const d=$0(r,u,i,e,t);a=Reflect.set(r,u,c,o),d&&d()}else{try{let d=c;if(c=n.call(null,r,l,c,s),d!==c){const p=f(c);p!==void 0&&(c=p)}}catch(d){return Kt(`${l} set error ${d}`),!0}a=Reflect.set(r,u,c,o),t.call(null,r,l,i,s)}return a}}}function mn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,o=e[u];typeof o=="object"&&o!==null&&(e[u]=mn(o,t,n,i))}return new Proxy(e,P0(r,t,n))}function Gu(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...Gu(n.children))}),t}function Br(e,t){if(t==="")return;const n=t.split(".");if(n.length===0)return;const r=n[0],u=n.slice(1),i=e.find(o=>o.id===r);return u.length===0?i:u.reduce((o,c)=>{var f,a;const s=Number(c);if(Number.isNaN(s)){const h=o!=null&&o.children?Gu(o.children):void 0,d=h==null?void 0:h.find(p=>p.id===c);return d||(o instanceof Ue?o:void 0)}else return(a=(f=o==null?void 0:o.children)==null?void 0:f[s])!=null?a:o},i)}function T0(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function L0(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function j0(){zu.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[Fr]){let u;const i=T0(e,n);if(i.length){const o=(r=this[Wu])==null?void 0:r.call(this,this[wr],this[Zu],i),c=L0(e,n,o);Re.type=e,Re.args=c,u=t.apply(this,c)}else Re.type=e,Re.args=n,u=t.apply(this,n);return typeof Re.callback=="function"&&Re.callback(e,n,u),Re.type="",Re.args=[],Re.callback=Xu,u}else return t.apply(this,n)}})}class q0{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return We(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){Kt(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&Xe("duplicated action key");const r=new k0(t,n);this.actionMap.set(t,r)}}class k0{constructor(t,n){this.id="",this.id=t,this.func=n}}class V0{constructor(t){this._dataStore=new Map,this.executer=t}add(t,n){this._dataStore.set(t,n)}get(t){let n=this._dataStore.get(t);return G(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return We(this,null,function*(){return this.executer===void 0?(Kt("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class tt{}class kt extends tt{validate(t){return Be(t)}transform(t){if(t==null)return"";if(!je(t)&&!iu(t))return String(t);if(uf(t))return JSON.stringify(t);throw`${t} is not a string`}}class br extends tt{validate(t){return Qt(t)||t===""}transform(t){if(t==null)return"";const n=!je(t)&&!iu(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class U0 extends tt{validate(t){return of(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Dt(t))return n(t);if(Be(t)&&ou(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class H0 extends tt{validate(t){return af(t)}transform(t){if(t==null)return[];function n(u){return u.map(i=>!i&&i!==0?"":Number(i)).filter(i=>i===""||!Number.isNaN(i))}if(Dt(t))return n(t);if(Be(t)&&ou(t))try{const u=JSON.parse(t);if(Dt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class z0 extends tt{validate(t){return t instanceof tn||je(t)&&"amount"in t&&Qt(t.amount)&&"currency"in t&&Be(t.currency)}transform(t,n){if(t==null||t==="")return new tn({currency:n==null?void 0:n.currency});let r;if(je(t)&&(r=new tn(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new tn(oe(oe({},n),u))}catch(u){}if(r){const u=new br,i=new kt;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),i.validate(r.currency)||(r.currency=i.transform(r.currency)),r}throw`${t} is not a { amount: number, currency: string } object`}}class W0 extends tt{validate(t){return t instanceof nn||je(t)&&"min"in t&&Be(t.min)&&"max"in t&&Be(t.max)}transform(t,n){if(t==null||t==="")return new nn;let r;if(je(t)&&(r=new nn(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new nn(oe(oe({},n),u))}catch(u){}if(r){const u=new kt;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${t} is not a { min: string, max: string } object`}}class Z0 extends tt{validate(t){return t instanceof un||je(t)&&"result"in t&&Qt(t.result)&&"unit"in t&&Be(t.unit)}transform(t,n){if(t==null||t==="")return new un({unit:n==null?void 0:n.unit});let r;if(je(t)&&(r=new un(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new un(oe(oe({},n),u))}catch(u){}if(r){const u=new br,i=new kt;return u.validate(r.result)||(r.result=u.transform(r.result)),i.validate(r.unit)||(r.unit=i.transform(r.unit)),r}throw`${t} is not a { result: string, unit: string } object`}}class X0 extends tt{validate(t){return t instanceof rn}transform(t,n){if(t==null||t==="")return new rn;let r;if(je(t)&&(r=new rn(oe(oe({},n),zn.exports.camelizeKeys(t)))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new rn(oe(oe({},n),zn.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new kt;return u.validate(r.city)||(r.city=u.transform(r.city)),u.validate(r.district)||(r.district=u.transform(r.district)),u.validate(r.province)||(r.province=u.transform(r.province)),r}throw`${t} is not a { city: string, district: string, province: string } object`}}class G0{static getValueChecker(t){let n;switch(t){case H.VARCHAR:case H.TIMESTAMP:case H.TEXT:case H.RELATION:case H.AUTO_NUMBER:n=new kt;break;case H.DECIMAL:n=new br;break;case H.EMPLOYEES:case H.DEPARTMENTS:case H.IMAGE:case H.FILE:case H.ARRAY:n=new U0;break;case H.MONEY:n=new z0;break;case H.TIMESCOPE:n=new W0;break;case H.CALC:n=new Z0;break;case H.DECIMAL_RANGE:n=new H0;break;case H.ADDRESS:n=new X0;break}return n}}function J0(e){if(["min","max","currency","unit"].includes(e))return H.VARCHAR;if(["result","amount"].includes(e))return H.DECIMAL}function Ju(e,t,n,r){var o;let u=(o=J0(t))!=null?o:e,i=G0.getValueChecker(u);if(!i||i.validate(n))return n;try{const c=i.transform(n,r);return c!==void 0?c:n}catch(c){throw`${t} ${c}`}}function K0(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const o=t[u];return r[u]=Ju(i,u,o,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let yt=null,Vt="";class Sr extends su{constructor(t){super(),this.isMounted=!1,this.id=jn(8),this.__pluginsApplied=!1,this.actionManager=new q0,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:o=Xr,debug:c=!1}=this.$options;Oe.setLocale(o),this.debug=c,this.runtime=new Ar({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new N0({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Un(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return Ar.register(...t)}static judgeControlIsRegistered(t){return Ar.staticRegisteredTypes.has(t.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:t=[]}=this.$options;this._handlerProxyState(),this.__plugins=t,this.applyPlugins(),this.setStates(this.getState()),this.debugLog("engine\u7684mount\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F"),this.debug&&typeof window!="undefined"&&(window.engines[this.id]=this)}destroy(){this.debug&&typeof window!="undefined"&&delete window.engines[this.id]}_handlerProxyState(){this.store.state=mn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=Br(this.runtime.flatInstances,n);if(!i)return r;if(this.assertInstance(i,X.SUBTABLE)){const s=i.props.headers.reduce((l,f)=>{const a=f.children[0];return a&&a instanceof Ue&&(l[a.id]=a.fieldType),l},{});return r===null?[]:r.map(l=>K0(s,l,this.getEmptyState(i.id)))}const o=n.split("."),c=o[o.length-1];try{return Ju(i.fieldType,c,r,u)}catch(s){throw Ke(`the id=${i.id}'s instance setState error, %o ${s}.`,r),s}}_proxyStateCallback(t,n,r,u,i){Array.isArray(t)?this._handlerArrayUpdate(t,n,r,u,i):this._handlerObjectUpdate(t,n,r,u)}_handlerArrayUpdate(t,n,r,u,i){const o=Br(this.runtime.flatInstances,n);if(!(o instanceof gn))return;const c=h=>{const d=[];for(let p=0;p<h;p++){const D=this.listControlCreateRow(o,"subtable-row");D&&d.push(D)}return d},s=yt;let l=[],f=[],a=[];if(r&&u){switch(r){case"push":case"unshift":const h=u.length;l=c(h),f=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const d=u.length-2,p=u.slice(2);l=c(d),f=p;const D=u[0],m=u[1];o.children[r](D,m,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?a=i:["pop","shift"].includes(r)&&(a=[i]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},s,{changed:l,data:f,deleted:a!=null?a:[]})}),yt=null}}_handlerObjectUpdate(t,n,r,u){const i=Br(this.runtime.flatInstances,n);if(!i)return;const o=this.getInstanceRowIndex(i),c=yt||{};if(i instanceof gn){i.children.length=0;const s=r;let l=[];for(let f=0;f<s.length;f++){const a=this.listControlCreateRow(i,"subtable-row");a&&l.push(a)}i.children.push(...l),this.runtime.getFlatInstances(),this.emit("list-change",{instance:i,value:r,options:Zr(oe({},c),{changed:l,data:s,deleted:u!=null?u:[]})})}else this.emit("change",{instance:i,value:this.getState(i.id,o),rowIndex:o,options:Zr(oe({},c),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Vt=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){Xe(`${Vt} Plugin apply Error
2
- ${r}`)}finally{Vt=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r instanceof d0){const u=G(t.props.headers),i=this.createControl(u);r.children.push(...i)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return We(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return Ke("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let r,u;this.isMounted||(u=new Promise(o=>{r=o}),this._jobTasks.push(u));const i=yield fo(Sr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Vt&&(n.applyingPluginName=Vt),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getFieldCodeState(t){return t===void 0?this.store.fieldCodeState:this.store.getFieldCodeState(t)}getEmptyState(t){return G(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){yt=t}setState(t,n,r,u){yt=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),yt=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const s=u[i][o];s!==void 0&&this.setState(o,s,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const s=this.getDataBindMapping(t);if(s){const{controlId:l}=s;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof qe?Object.entries(i).reduce((s,[l,f])=>f.fieldCode===n?s[l]:s,c):c}getData(t){if(t){const n=this.getDataBindMapping(t);if(n){const{controlId:r}=n;return this.getFieldCodeState(r)}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:s}=o;if(c instanceof qe){const f=(l=G(this.getState(s,u)))!=null?l:this.getEmptyState(s),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),f);this.setState(s,a,u,i)}else this.setState(s,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:s,controlId:l,fieldCode:f}=c;if(!o.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(s instanceof qe){const h=(a=G(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(s).reduce((p,[D,m])=>{o.push(m.fieldCode);const g=n[m.fieldCode];return g!==void 0&&(p[D]=g),p},h);this.setState(c.controlId,d,r,u)}else this.setState(l,n[f],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const i={};return r.fields.forEach(o=>{const{dataBind:c,controlId:s,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof qe){const f=this.getEmptyState(s);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},f)}else i[s]=n[l]}),i}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r={};Object.keys(t).map(u=>{const i=t[u];if(Array.isArray(i))i.map(o=>{const c=this.getDataBindMapping(u);if(!c)return;let s=G(this.store.emptyState[c.dataViewId][c.controlId]),l=[];Object.keys(o).map(f=>{var h,d,p;if(l.includes(f))return;const a=(d=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:d.find(D=>D.fieldCode===f);if(a){if(a.dataBind instanceof Rt&&o[f]!==void 0)s[a.controlId]=o[f];else if(a.dataBind instanceof qe){let D=G((p=this.getEmptyState(a.controlId))!=null?p:{});Object.keys(a.dataBind).map(m=>{const g=a.dataBind[m];o[g.fieldCode]!==void 0&&(D[m]=o[g.fieldCode]),l.push(g.fieldCode)}),s[a.controlId]=D}}}),r[c.dataViewId]||(r[c.dataViewId]={}),r[c.dataViewId][c.controlId]||(r[c.dataViewId][c.controlId]=[]),r[c.dataViewId][c.controlId].push(s)});else if(i){let o=[];Object.keys(i).map(c=>{var l;if(o.includes(c))return;const s=this.getDataBindMapping(u,c);if(s){if(r[s.dataViewId[0]]||(r[s.dataViewId[0]]={}),s.dataBind instanceof Rt&&i[c]!==void 0)r[s.dataViewId[0]][s.controlId]=i[c];else if(s.dataBind instanceof qe){let f=G((l=this.getEmptyState(s.controlId))!=null?l:{});Object.keys(s.dataBind).map(a=>{const h=s.dataBind[a];i[h.fieldCode]!==void 0&&(f[a]=i[h.fieldCode]),o.push(h.fieldCode)}),r[s.dataViewId[0]][s.controlId]=f}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r),this.setStates(r,void 0,n),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){var u;if(t===void 0)return this.runtime.flatInstances;const r=this.runtime.flatInstances.filter(i=>i.id===t);if(n)if(r.length){const i=r[0];if(this.getInstanceRowIndex(i)!==void 0){const o=this.getInstanceInSubtableHeader(i);o&&r.unshift(o)}}else{const i=this.getControlIdMapping(),[o]=(u=Object.entries(i).find(([c,s])=>s.children&&t in s.children))!=null?u:[];if(o){const s=this.getInstance(o).props.headers.find(l=>l.children.find(f=>f.id===t));if(s){const l=s.children.find(f=>f.id===t);l&&r.unshift(l)}}}return r}setInstance(t,n,r,u){try{let i;if(typeof t=="string"?i=this.getInstance(t,u):i=t,!i)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",i.id,i,n,r),ru(i.props,n,r),this.schemaEvent("schema-change",{instance:i,props:n,value:r})}catch(i){throw i}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){Ke(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){Ke(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new V0(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Be(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,X.SUBTABLE))if(this.assertInstance(t,X.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,X.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,X.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,X.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}}class Q0{}class Y0{constructor(t){this.config=t}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ku(n,t);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function Ku(e,t){if(!e.module||!e.module.compiled)return;const n=e.module.compiled,r={exports:{ctx:t,utils:t.getAction().actionUtils}};try{new Function("module","exports",n).call(r,r,r.exports)}catch(o){Xe(o.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Xe("fail to parse the module")}const u={},i={};for(const[o,c]of Object.entries(r.exports))typeof c=="function"?u[o]=c:i[o]=c;return{funcMap:u,variables:i}}const eh={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class th{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(eh).forEach(([n,r])=>{t.on(n,u=>We(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return We(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>We(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class nh{constructor(t){this.config=t}apply(t){this.engine=t,cu.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>We(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return We(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(i=>We(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}var Qu={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function ge(e){return typeof e=="number"}function nt(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Yu(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function ei(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function ti(e){return e&&e.constructor.prototype.isUnit===!0||!1}function yn(e){return typeof e=="string"}var Se=Array.isArray;function Ut(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Mr(e){return Array.isArray(e)||Ut(e)}function rh(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function uh(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ih(e){return e&&e.constructor.prototype.isRange===!0||!1}function ni(e){return e&&e.constructor.prototype.isIndex===!0||!1}function oh(e){return typeof e=="boolean"}function ah(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function sh(e){return e&&e.constructor.prototype.isHelp===!0||!1}function ch(e){return typeof e=="function"}function fh(e){return e instanceof Date}function lh(e){return e instanceof RegExp}function hh(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Yu(e)&&!ei(e))}function dh(e){return e===null}function ph(e){return e===void 0}function Dh(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function gh(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function vh(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function mh(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function yh(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Eh(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ah(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ch(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fh(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function wh(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bh(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function bh(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Sh(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function _h(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Mh(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nh(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ih(e){return e&&e.constructor.prototype.isChain===!0||!1}function Nr(e){var t=typeof e;return t==="object"?e===null?"null":nt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function ft(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return ft(n)});if(e instanceof Date)return new Date(e.valueOf());if(nt(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return xh(e,ft)}function xh(e,t){var n={};for(var r in e)En(e,r)&&(n[r]=t(e[r]));return n}function Ir(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Ir(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Ir(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function En(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Oh(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],i=e[u];i!==void 0&&(n[u]=i)}return n}var Rh=["Matrix","Array"],$h=["number","BigNumber","Fraction"],ri=function(t){if(t)throw new Error(`The global config is readonly.
1
+ var O1=Object.defineProperty,R1=Object.defineProperties;var $1=Object.getOwnPropertyDescriptors;var so=Object.getOwnPropertySymbols,P1=Object.getPrototypeOf,T1=Object.prototype.hasOwnProperty,L1=Object.prototype.propertyIsEnumerable,j1=Reflect.get;var $n=Math.pow,co=(Z,Y,ne)=>Y in Z?O1(Z,Y,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Z[Y]=ne,oe=(Z,Y)=>{for(var ne in Y||(Y={}))T1.call(Y,ne)&&co(Z,ne,Y[ne]);if(so)for(var ne of so(Y))L1.call(Y,ne)&&co(Z,ne,Y[ne]);return Z},Zr=(Z,Y)=>R1(Z,$1(Y));var fo=(Z,Y,ne)=>j1(P1(Z),ne,Y);var ze=(Z,Y,ne)=>new Promise((Pn,Gt)=>{var Tn=We=>{try{Nt(ne.next(We))}catch(It){Gt(It)}},Ln=We=>{try{Nt(ne.throw(We))}catch(It){Gt(It)}},Nt=We=>We.done?Pn(We.value):Promise.resolve(We.value).then(Tn,Ln);Nt((ne=ne.apply(Z,Y)).next())});(function(Z,Y){typeof exports=="object"&&typeof module!="undefined"?Y(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],Y):(Z=typeof globalThis!="undefined"?globalThis:Z||self,Y(Z.modelDrivenEngine={},Z.require$$0))})(this,function(Z,Y){"use strict";function ne(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Pn=ne(Y),Gt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Tn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Ln="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",Nt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",We="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",It="{caption}\u5FC5\u586B",lo="\u8BF7\u8F93\u5165\u6807\u9898",ho="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",po="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Do="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",go="\u8BF7\u7ED1\u5B9A\u8868\u5355",vo="\u8BF7\u7ED1\u5B9A\u5217\u8868",mo="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",yo="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Eo="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Ao="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",Co="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",Fo="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",wo="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Bo="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",bo="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",So="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",_o="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Mo="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",No="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Io="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",xo="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Oo="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Ro="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",$o="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Po="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",To="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",Lo="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",jo="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ko="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",qo="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Vo="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Uo="\u8BF7\u9009\u62E9\u7701",Ho="\u8BF7\u9009\u62E9\u5E02",zo="\u8BF7\u9009\u62E9\u533A",Wo="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Zo="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",Xo="\u8BF7\u8F93\u5165\u5217\u5BBD",Go="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Jo="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Ko="\u8BF7\u9009\u62E9\u63A7\u4EF6",Qo="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Yo="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",ea="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ta="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",na="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ra="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ua="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ia="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",oa="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",aa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",sa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ca="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",fa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",la="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",ha="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",da="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",pa="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Da="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ga="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",va="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ma="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",ya={isNotNumber:Gt,isNotString:Tn,isNotObject:Ln,isNotArray:Nt,isNotBoolean:We,runtimeRequired:It,pleaseEnterCaption:lo,pleaseEnterCaptionTip:ho,pleaseEnterPlaceholder:po,pleaseEnterFieldCode:Do,pleaseEnterForm:go,pleaseEnterList:vo,pleaseEnterProcess:mo,pleaseEnterLabel:yo,pleaseEnterValue:Eo,bizKeyNotBindFiled:Ao,pleaseSelectOneField:Co,pleaseEnterNumberRange:Fo,pleaseEnterAValueGreaterThanMin:wo,pleaseEnterAValueLessThanMax:Bo,numberRangeSetError:bo,stringRangeError:So,attachmentMaxSize:_o,pleaseEnterTotalScoreSetting:Mo,theTotalScoreMustNotBeLessThan1:No,scoreDefaultValueRange:Io,attachmentLimitError:xo,PleaseReselectTheOptionalQuantity:Oo,TheMaximumLengthIsGreaterThanTheMinimumLength:Ro,TheMinimumLengthIsGreaterThanTheMaximumLength:$o,PleaseSelectTheCorrectOptionSettings:Po,optionIdIsRepeat:To,optionIsRequired:Lo,pleaseEnterDataCode:jo,pleaseEnterValueFieldCode:ko,pleaseEnterSvcCode:qo,pleaseBindAtLeastOneDisplayValue:Vo,pleaseSelectProvince:Uo,pleaseSelectCity:Ho,pleaseSelectDistrict:zo,limitRowsCannotBeLessThan0:Wo,TheNumberOfRowsCannotBeLessThanMinRows:Zo,pleaseEnterColumnWidth:Xo,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Go,pleaseCompleteAllRulesAndConditions:Jo,pleaseSelectControl:Ko,pleaseSelectAtLeastOneColumn:Qo,pleaseSelectFillBackMode:Yo,pleaseSelectDashboard:ea,rootNodeIsRequired:ta,theViewNameCannotBeEmpty:na,pleaseSelectOcrType:ra,pleaseSelectAtLeastOneFieldToFillIn:ua,pleaseChooseAtLeastOne:ia,pleaseEnterButtonContent:oa,pleaseEnterDataCodeInDataSetting:aa,pleaseEnterValueFieldCodeInDataSetting:sa,pleaseEnterSvcCodeInDataSetting:ca,pleaseBindAtLeastOneDisplayValueInDataSetting:fa,rootNodeIsRequiredInDataSetting:la,pleaseEnterMaxHeight:ha,pleaseEnter:da,pleaseEnterWatermark:pa,pleaseEnterFileName:Da,pleaseUploadAtLeastOnePrintTemplate:ga,pleaseAssignBusiness:va,pleaseAssignExternal:ma},Ea="Please enter a number",Aa="Please enter a string",Ca="Please enter an object",Fa="Please enter an array",wa="Please enter a boolean",Ba="{caption} Required",ba="Please enter the title",Sa="Please enter the bubble prompt",_a="Please enter the prompt text",Ma="Please bind data items",Na="Please bind the form",Ia="Please bind the list",xa="Please bind the process",Oa="Please enter the displayed value",Ra="Please enter the stored value",$a="The document number is not bound to the data item",Pa="Please select at least one display field",Ta="Please enter a value greater than or equal to {min} and less than or equal to {max}",La="Please enter a value greater than or equal to {min}",ja="Please enter a value less than or equal to {max}",ka="The value range is set incorrectly",qa="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",Va="The attachment size must be between 0MB and 1000MB",Ua="Please fill in the total score setting",Ha="The total score cannot be less than 1",za="The default value must be between {min} and {max}",Wa="The number of attachments uploaded must be between {min} and {max}",Za="Please re-select the optional quantity",Xa="The maximum length of the control must be greater than the minimum length",Ga="The minimum length of the control must be less than the maximum length",Ja="Please select the correct option setting",Ka="Option ID cannot be repeated",Qa="Please enter at least one option",Ya="Please bind the data source",es="Please bind the stored value",ts="Please bind the service",ns="At least one display value must be bound",rs="Please select a province",us="Please select a city",is="Please select a district",os="The minimum number of lines to fill in cannot be less than 0",as="The number of rows cannot be less than {min} rows",ss="Please enter the column width",cs="Please set the logical relationship of all rule conditions",fs="Please complete all rules and conditions",ls="please select control",hs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ds="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ps="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Ds="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",gs="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",vs="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",ms="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ys="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Es="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",As="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Cs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Fs="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ws="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Bs="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",bs="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ss="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",_s="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ms="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ns={isNotNumber:Ea,isNotString:Aa,isNotObject:Ca,isNotArray:Fa,isNotBoolean:wa,runtimeRequired:Ba,pleaseEnterCaption:ba,pleaseEnterCaptionTip:Sa,pleaseEnterPlaceholder:_a,pleaseEnterFieldCode:Ma,pleaseEnterForm:Na,pleaseEnterList:Ia,pleaseEnterProcess:xa,pleaseEnterLabel:Oa,pleaseEnterValue:Ra,bizKeyNotBindFiled:$a,pleaseSelectOneField:Pa,pleaseEnterNumberRange:Ta,pleaseEnterAValueGreaterThanMin:La,pleaseEnterAValueLessThanMax:ja,numberRangeSetError:ka,stringRangeError:qa,attachmentMaxSize:Va,pleaseEnterTotalScoreSetting:Ua,theTotalScoreMustNotBeLessThan1:Ha,scoreDefaultValueRange:za,attachmentLimitError:Wa,PleaseReselectTheOptionalQuantity:Za,TheMaximumLengthIsGreaterThanTheMinimumLength:Xa,TheMinimumLengthIsGreaterThanTheMaximumLength:Ga,PleaseSelectTheCorrectOptionSettings:Ja,optionIdIsRepeat:Ka,optionIsRequired:Qa,pleaseEnterDataCode:Ya,pleaseEnterValueFieldCode:es,pleaseEnterSvcCode:ts,pleaseBindAtLeastOneDisplayValue:ns,pleaseSelectProvince:rs,pleaseSelectCity:us,pleaseSelectDistrict:is,limitRowsCannotBeLessThan0:os,TheNumberOfRowsCannotBeLessThanMinRows:as,pleaseEnterColumnWidth:ss,pleaseSetTheLogicalRelationshipOfAllRuleConditions:cs,pleaseCompleteAllRulesAndConditions:fs,pleaseSelectControl:ls,pleaseSelectDashboard:hs,theViewNameCannotBeEmpty:ds,pleaseSelectOcrType:ps,pleaseSelectAtLeastOneFieldToFillIn:Ds,pleaseChooseAtLeastOne:gs,pleaseEnterButtonContent:vs,pleaseEnterDataCodeInDataSetting:ms,pleaseEnterValueFieldCodeInDataSetting:ys,pleaseEnterSvcCodeInDataSetting:Es,pleaseBindAtLeastOneDisplayValueInDataSetting:As,rootNodeIsRequiredInDataSetting:Cs,pleaseEnterMaxHeight:Fs,pleaseEnter:ws,pleaseEnterWatermark:Bs,pleaseEnterFileName:bs,pleaseUploadAtLeastOnePrintTemplate:Ss,pleaseAssignBusiness:_s,pleaseAssignExternal:Ms},Is="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",xs="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Os="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Rs="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",$s="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ps="{caption}\u5FC5\u9808",Ts="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ls="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",js="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ks="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",qs="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Vs="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Us="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Hs="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",zs="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ws="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Zs="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",Xs="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Gs="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Js="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ks="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Qs="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ys="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",ec="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",tc="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",nc="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",rc="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",uc="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ic="\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",oc="\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",ac="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",sc="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",cc="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",fc="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",lc="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",hc="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",dc="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",pc="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Dc="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",gc="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",vc="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",mc="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",yc="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ec="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ac="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",Cc="please select control",Fc="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",wc="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Bc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",bc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Sc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",_c="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Mc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Nc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Ic="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",xc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Oc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Rc="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",$c="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Pc="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Tc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Lc="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",jc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",kc="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",qc={isNotNumber:Is,isNotString:xs,isNotObject:Os,isNotArray:Rs,isNotBoolean:$s,runtimeRequired:Ps,pleaseEnterCaption:Ts,pleaseEnterCaptionTip:Ls,pleaseEnterPlaceholder:js,pleaseEnterFieldCode:ks,pleaseEnterForm:qs,pleaseEnterList:Vs,pleaseEnterProcess:Us,pleaseEnterLabel:Hs,pleaseEnterValue:zs,bizKeyNotBindFiled:Ws,pleaseSelectOneField:Zs,pleaseEnterNumberRange:Xs,pleaseEnterAValueGreaterThanMin:Gs,pleaseEnterAValueLessThanMax:Js,numberRangeSetError:Ks,stringRangeError:Qs,attachmentMaxSize:Ys,pleaseEnterTotalScoreSetting:ec,theTotalScoreMustNotBeLessThan1:tc,scoreDefaultValueRange:nc,attachmentLimitError:rc,PleaseReselectTheOptionalQuantity:uc,TheMaximumLengthIsGreaterThanTheMinimumLength:ic,TheMinimumLengthIsGreaterThanTheMaximumLength:oc,PleaseSelectTheCorrectOptionSettings:ac,optionIdIsRepeat:sc,optionIsRequired:cc,pleaseEnterDataCode:fc,pleaseEnterValueFieldCode:lc,pleaseEnterSvcCode:hc,pleaseBindAtLeastOneDisplayValue:dc,pleaseSelectProvince:pc,pleaseSelectCity:Dc,pleaseSelectDistrict:gc,limitRowsCannotBeLessThan0:vc,TheNumberOfRowsCannotBeLessThanMinRows:mc,pleaseEnterColumnWidth:yc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ec,pleaseCompleteAllRulesAndConditions:Ac,pleaseSelectControl:Cc,pleaseSelectDashboard:Fc,theViewNameCannotBeEmpty:wc,pleaseSelectOcrType:Bc,pleaseSelectAtLeastOneFieldToFillIn:bc,pleaseChooseAtLeastOne:Sc,pleaseEnterButtonContent:_c,pleaseEnterDataCodeInDataSetting:Mc,pleaseEnterValueFieldCodeInDataSetting:Nc,pleaseEnterSvcCodeInDataSetting:Ic,pleaseBindAtLeastOneDisplayValueInDataSetting:xc,rootNodeIsRequiredInDataSetting:Oc,pleaseEnterMaxHeight:Rc,pleaseEnter:$c,pleaseEnterWatermark:Pc,pleaseEnterFileName:Tc,pleaseUploadAtLeastOnePrintTemplate:Lc,pleaseAssignBusiness:jc,pleaseAssignExternal:kc},Vc={zhCN:ya,enUS:Ns,jaJP:qc},xe;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(xe||(xe={}));var pt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(pt||(pt={}));var Xr="zh-CN";function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(Le||(Le={}));var X;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(X||(X={}));var H;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(H||(H={}));var De;De={},we(De,H.ARRAY,X.ARRAY_COLUMN),we(De,H.AUTO_NUMBER,X.AUTO_NUMBER_COLUMN),we(De,H.DECIMAL,X.DECIMAL_COLUMN),we(De,H.DEPARTMENTS,X.DEPARTMENT_COLUMN),we(De,H.FILE,X.FILE_COLUMN),we(De,H.IMAGE,X.IMAGE_COLUMN),we(De,H.ADDRESS,X.LOCATION_COLUMN),we(De,H.EMPLOYEES,X.EMPLOYEE_COLUMN),we(De,H.TEXT,X.TEXT_COLUMN),we(De,H.TIMESCOPE,X.TIMESCOPE_COLUMN),we(De,H.TIMESTAMP,X.TIMESTAMP_COLUMN),we(De,H.VARCHAR,X.VARCHAR_COLUMN),we(De,H.RELATION,X.VARCHAR_COLUMN);var Gr;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(Gr||(Gr={}));var Jr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",Uc=Jr+"0123456789";function jn(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?Jr:Uc,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hc(e){if(Array.isArray(e))return kn(e)}function zc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Jt(e,t,n){return Wc()?Jt=Reflect.construct:Jt=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&Ot(l,o.prototype),l},Jt.apply(null,arguments)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xt(e)}function Qr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ot(e,t)}function Zc(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Xc(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gc(){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 Jc(e,t){return t&&(Kc(t)==="object"||typeof t=="function")?t:zc(e)}function Ot(e,t){return Ot=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ot(e,t)}function Yr(e){return Hc(e)||Xc(e)||Qc(e)||Gc()}var Kc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Qc(e,t){if(!!e){if(typeof e=="string")return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}}function qn(e){var t=typeof Map=="function"?new Map:void 0;return qn=function(r){if(r===null||!Zc(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return Jt(r,arguments,xt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ot(u,r)},qn(e)}function Yc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function eu(e){var t=Yc();return function(){var r=xt(e),u;if(t){var i=xt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Jc(this,u)}}var Vn=console;function Je(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Vn).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(Yr(u)))}function Un(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Vn).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(Yr(u)))}function ef(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Hn=function(e){Qr(n,e);var t=eu(n);function n(r){Kr(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?ef(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(qn(Error)),tf=function(e){Qr(n,e);var t=eu(n);function n(r){Kr(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Hn);function Ze(e){throw new Hn(e)}function tu(e){throw new tf(e)}function Kt(e){Vn.error(new Hn(e))}function at(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":at(n==null?void 0:n.children,t);break;case"search":at(n==null?void 0:n.children,t);break;case"form":t(n)}})}var nf=Object.prototype.toString;function nu(e,t){return nf.call(e)==="[object "+t+"]"}function rf(e){return nu(e,"String")}function uf(e){return nu(e,"Promise")}var of=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();uf(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,i,o,c){if(u!==void 0){var s=u[i];if(!(o===c.length-1&&!rf(s)))return s}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var i=n[u];return i!==void 0?String(i):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Oe=function(){function e(){af(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr;return new of({locale:n,messages:Vc})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Oe.$i18n=Oe.resetI18n();function ru(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return r.reduce(function(i,o,c,s){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){Je("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return c===s.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},e),u}var Ke=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn={exports:{}};(function(e){(function(t){var n=function(g,E,b){if(!l(E)||a(E)||h(E)||d(E)||s(E))return E;var C,M=0,O=0;if(f(E))for(C=[],O=E.length;M<O;M++)C.push(n(g,E[M],b));else{C={};for(var P in E)Object.prototype.hasOwnProperty.call(E,P)&&(C[g(P,b)]=n(g,E[P],b))}return C},r=function(g,E){E=E||{};var b=E.separator||"_",C=E.split||/(?=[A-Z])/;return g.split(C).join(b)},u=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(E,b){return b?b.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},i=function(g){var E=u(g);return E.substr(0,1).toUpperCase()+E.substr(1)},o=function(g,E){return r(g,E).toLowerCase()},c=Object.prototype.toString,s=function(g){return typeof g=="function"},l=function(g){return g===Object(g)},f=function(g){return c.call(g)=="[object Array]"},a=function(g){return c.call(g)=="[object Date]"},h=function(g){return c.call(g)=="[object RegExp]"},d=function(g){return c.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},D=function(g,E){var b=E&&"process"in E?E.process:E;return typeof b!="function"?g:function(C,M){return b(C,g,M)}},v={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(g,E){return n(D(u,E),g)},decamelizeKeys:function(g,E){return n(D(o,E),g,E)},pascalizeKeys:function(g,E){return n(D(i,E),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=v:t.humps=v})(Ke)})(zn);function te(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function je(e){return Object.prototype.toString.call(e)==="[object Object]"}function sf(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function Dt(e){return Array.isArray(e)}function Be(e){return typeof e=="string"}function Qt(e){return typeof e=="number"}function iu(e){return typeof e=="function"}function cf(e){return Dt(e)&&e.every(function(t){return Be(t)})}function ff(e){return Dt(e)&&e.every(function(t){return Qt(t)||t===""})}function ou(e){return/^\[.*?]$/.test(e)}function Yt(e){return/^{.*?}$/.test(e)}function Wn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lf(e){if(Array.isArray(e))return Wn(e)}function au(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function hf(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){au(i,r,u,o,c,"next",s)}function c(s){au(i,r,u,o,c,"throw",s)}o(void 0)})}}function df(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pf(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Df(){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 Zn(e){return lf(e)||pf(e)||gf(e)||Df()}function gf(e,t){if(!!e){if(typeof e=="string")return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(e,t)}}var vf=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},su=function(){function e(){df(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,i=new Array(u>1?u-1:0),o=1;o<u;o++)i[o-1]=arguments[o];var c=this;return hf(function(){var s,l,f,a,h,d,p,D,v,g,E,b;return vf(this,function(C){switch(C.label){case 0:if(s=c._events.get(r),l=[],!s)return[3,10];f=s.slice(),a=!0,h=!1,d=void 0,C.label=1;case 1:C.trys.push([1,8,9,10]),p=f[Symbol.iterator](),C.label=2;case 2:if(a=(D=p.next()).done)return[3,7];if(v=D.value,!s.includes(v))return[3,6];C.label=3;case 3:return C.trys.push([3,5,,6]),c.debug&&Un.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Zn(i))),[4,v.apply(null,Zn(i))];case 4:return g=C.sent(),c.debug&&Un.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Zn(i),[g])),l.push(g),g===!1?[3,7]:[3,6];case 5:return E=C.sent(),Kt(String(E)),[3,6];case 6:return a=!0,[3,2];case 7:return[3,10];case 8:return b=C.sent(),h=!0,d=b,[3,10];case 9:try{!a&&p.return!=null&&p.return()}finally{if(h)throw d}return[7];case 10:return[2,l]}})})()},t.on=function(r,u){if(this._events.has(r)){var i;(i=this._events.get(r))===null||i===void 0||i.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var i=this._events.get(r),o=i==null?void 0:i.indexOf(u);i==null||i.splice(o,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function mf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var yf=[{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"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rows-checked"}],cu=function(){function e(){mf(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return e.events.filter(function(i){return u.includes(i.key)})},e}();cu.events=yf;function Ef(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var fu=[],en=function(){function e(n){Ef(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var t=e.prototype;return t.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},t.getControlConfig=function(r){return this.controlConfigMap.get(r)},t.getControls=function(){return this._controls},t.register=function(r){r.__is_control__||Ze("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===r.controlType});return u>-1&&(Je("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},t.isLayoutControl=function(r){return r.controlType===Le.LAYOUT},t.isFormControl=function(r){return r.controlType===Le.FORM},t.isListControl=function(r){return r.controlType===Le.LIST},t.isColumnControl=function(r){return r.controlType===Le.COLUMN},t.createControl=function(r,u){var i=this;if(Array.isArray(r))return r.map(function(f){return i.createControl(f,u)});r.children&&(r.children=r.children.map(function(f){return i.createControl(f,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(f){return i.createControl(f,u)}));var o=this.getControlFormType(r.type);if(o){var c=r;if(typeof u=="function"){var s=u(c);s&&(c=s)}var l=new o(c);return l}else Ze("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(r,u){var i=this.getControlFormType(r);if(i)return new i(u)},t.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},t._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(i){u.register(i[r])})},e.register=function(r){var u=r.Designer,i=r.Runtime;(!u||!i||!u.__is_control__||!i.__is_control__)&&Ze("".concat(r," is can't register as a Control"));var o=this.staticControls.findIndex(function(c){return c.Designer.controlType===u.controlType});return o>-1&&(Je("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();en.staticControls=fu,en.staticRegisteredTypes=new Set(fu.map(function(e){return e.Designer.controlType})),en.staticRegisteredConfigs=new Map;function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Rt=function e(t){st(this,e);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},Qe=function e(){st(this,e)},tn=function e(t){st(this,e);var n;this.amount=(n=t==null?void 0:t.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=t==null?void 0:t.currency)!==null&&r!==void 0?r:Xn.CNY},nn=function e(t){st(this,e);var n;this.min=(n=t==null?void 0:t.min)!==null&&n!==void 0?n:"";var r;this.max=(r=t==null?void 0:t.max)!==null&&r!==void 0?r:""},rn=function e(t){st(this,e);var n;this.city=(n=t==null?void 0:t.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=t==null?void 0:t.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=t==null?void 0:t.district)!==null&&u!==void 0?u:"";var i;this.districtDisplay=(i=t==null?void 0:t.districtDisplay)!==null&&i!==void 0?i:"";var o;this.province=(o=t==null?void 0:t.province)!==null&&o!==void 0?o:"";var c;this.provinceDisplay=(c=t==null?void 0:t.provinceDisplay)!==null&&c!==void 0?c:""},un=function e(t){st(this,e);var n;this.result=(n=t==null?void 0:t.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=t==null?void 0:t.unit)!==null&&r!==void 0?r:""},Xn;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(Xn||(Xn={}));var lu;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(lu||(lu={}));var Gn;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Gn||(Gn={}));var Af=function e(t){st(this,e);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var i;this.heightConfig=(i=t==null?void 0:t.heightConfig)!==null&&i!==void 0?i:"fill"};function Cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function on(e,t,n){return Ff()?on=Reflect.construct:on=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&Pt(l,o.prototype),l},on.apply(null,arguments)}function $t(e){return $t=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$t(e)}function wf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pt(e,t)}function Bf(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function bf(e,t){return t&&(Sf(t)==="object"||typeof t=="function")?t:Cf(e)}function Pt(e,t){return Pt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Pt(e,t)}var Sf=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Kn(e){var t=typeof Map=="function"?new Map:void 0;return Kn=function(r){if(r===null||!Bf(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return on(r,arguments,$t(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Pt(u,r)},Kn(e)}function _f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Mf(e){var t=_f();return function(){var r=$t(e),u;if(t){var i=$t(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return bf(this,u)}}var hu=function e(t){Jn(this,e),this.isHide={type:"boolean"}},du=function(e){wf(n,e);var t=Mf(n);function n(r){return Jn(this,n),t.call(this)}return n}(Kn(Array)),ct=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Jn(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new Af(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};ct.Rules=hu,ct.RuntimeRules=du;function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}function Nf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Qn(e){return Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(e)}function an(e,t){return an=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},an(e,t)}function If(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function sn(e,t,n){return If()?sn=Reflect.construct:sn=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&an(l,o.prototype),l},sn.apply(null,arguments)}function xf(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Yn(e){var t=typeof Map=="function"?new Map:void 0;return Yn=function(r){if(r===null||!xf(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return sn(r,arguments,Qn(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),an(u,r)},Yn(e)}var Of=/%[sdj%]/g,pu=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(pu=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function er(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],i=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var o=String(u).replace(Of,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(s){return"[Circular]"}break;default:return c}});return o}return u}function Rf(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function re(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Rf(t)&&typeof e=="string"&&!e)}function $f(e,t,n){var r=[],u=0,i=e.length;function o(c){r.push.apply(r,c),u++,u===i&&n(r)}e.forEach(function(c){t(c,o)})}function Du(e,t,n){var r=0,u=e.length;function i(o){if(o&&o.length){n(o);return}var c=r;r=r+1,c<u?t(e[c],i):n([])}i([])}function Pf(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var gu=function(e){Nf(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(Yn(Error));function Tf(e,t,n,r){if(t.first){var u=new Promise(function(a,h){var d=function(v){return r(v),v.length?h(new gu(v,er(v))):a()},p=Pf(e);Du(p,n,d)});return u.catch(function(a){return a}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),c=o.length,s=0,l=[],f=new Promise(function(a,h){var d=function(D){if(l.push.apply(l,D),s++,s===c)return r(l),l.length?h(new gu(l,er(l))):a()};o.length||(r(l),a()),o.forEach(function(p){var D=e[p];i.indexOf(p)!==-1?Du(D,n,d):$f(D,n,d)})});return f.catch(function(a){return a}),f}function vu(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function mu(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=ke(ke({},e[n]),r):e[n]=r}}return e}function yu(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||re(t,i||e.type))&&r.push(be(u.messages.required,e.fullField))}function Lf(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(be(u.messages.whitespace,e.fullField))}var tr={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},Tt={integer:function(t){return Tt.number(t)&&parseInt(t,10)===t},float:function(t){return Tt.number(t)&&!Tt.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Tt.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(tr.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(tr.url)},hex:function(t){return typeof t=="string"&&!!t.match(tr.hex)}};function jf(e,t,n,r,u){if(e.required&&t===void 0){yu(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?Tt[o](t)||r.push(be(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(be(u.messages.types[o],e.fullField,e.type))}function kf(e,t,n,r,u){var i=typeof e.len=="number",o=typeof e.min=="number",c=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,a=typeof t=="number",h=typeof t=="string",d=Array.isArray(t);if(a?f="number":h?f="string":d&&(f="array"),!f)return!1;d&&(l=t.length),h&&(l=t.replace(s,"_").length),i?l!==e.len&&r.push(be(u.messages[f].len,e.fullField,e.len)):o&&!c&&l<e.min?r.push(be(u.messages[f].min,e.fullField,e.min)):c&&!o&&l>e.max?r.push(be(u.messages[f].max,e.fullField,e.max)):o&&c&&(l<e.min||l>e.max)&&r.push(be(u.messages[f].range,e.fullField,e.min,e.max))}var gt="enum";function qf(e,t,n,r,u){e[gt]=Array.isArray(e[gt])?e[gt]:[],e[gt].indexOf(t)===-1&&r.push(be(u.messages[gt],e.fullField,e[gt].join(", ")))}function Vf(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(be(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var i=new RegExp(e.pattern);i.test(t)||r.push(be(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var U={required:yu,whitespace:Lf,type:jf,range:kf,enum:qf,pattern:Vf};function Uf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"string")&&!e.required)return n();U.required(e,t,r,i,u,"string"),re(t,"string")||(U.type(e,t,r,i,u),U.range(e,t,r,i,u),U.pattern(e,t,r,i,u),e.whitespace===!0&&U.whitespace(e,t,r,i,u))}n(i)}function Hf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}function zf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Wf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}function Zf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),re(t)||U.type(e,t,r,i,u)}n(i)}function Xf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Gf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Jf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return n();U.required(e,t,r,i,u,"array"),t!=null&&(U.type(e,t,r,i,u),U.range(e,t,r,i,u))}n(i)}function Kf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U.type(e,t,r,i,u)}n(i)}var Qf="enum";function Yf(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u),t!==void 0&&U[Qf](e,t,r,i,u)}n(i)}function el(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"string")&&!e.required)return n();U.required(e,t,r,i,u),re(t,"string")||U.pattern(e,t,r,i,u)}n(i)}function tl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t,"date")&&!e.required)return n();if(U.required(e,t,r,i,u),!re(t,"date")){var c;t instanceof Date?c=t:c=new Date(t),U.type(e,c,r,i,u),c&&U.range(e,c.getTime(),r,i,u)}}n(i)}function nl(e,t,n,r,u){var i=[],o=Array.isArray(t)?"array":typeof t;U.required(e,t,r,i,u,o),n(i)}function nr(e,t,n,r,u){var i=e.type,o=[],c=e.required||!e.required&&r.hasOwnProperty(e.field);if(c){if(re(t,i)&&!e.required)return n();U.required(e,t,r,o,u,i),re(t,i)||U.type(e,t,r,o,u)}n(o)}function rl(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(re(t)&&!e.required)return n();U.required(e,t,r,i,u)}n(i)}var Lt={string:Uf,method:Hf,number:zf,boolean:Wf,regexp:Zf,integer:Xf,float:Gf,array:Jf,object:Kf,enum:Yf,pattern:el,date:tl,url:nr,hex:nr,email:nr,required:nl,any:rl};function rr(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ur=rr();function Ye(e){this.rules=null,this._messages=ur,this.define(e)}Ye.prototype={messages:function(t){return t&&(this._messages=mu(rr(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var i=t,o=n,c=r;if(typeof o=="function"&&(c=o,o={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(),Promise.resolve();function s(D){var v,g=[],E={};function b(C){if(Array.isArray(C)){var M;g=(M=g).concat.apply(M,C)}else g.push(C)}for(v=0;v<D.length;v++)b(D[v]);g.length?E=er(g):(g=null,E=null),c(g,E)}if(o.messages){var l=this.messages();l===ur&&(l=rr()),mu(l,o.messages),o.messages=l}else o.messages=this.messages();var f,a,h={},d=o.keys||Object.keys(this.rules);d.forEach(function(D){f=u.rules[D],a=i[D],f.forEach(function(v){var g=v;typeof g.transform=="function"&&(i===t&&(i=ke({},i)),a=i[D]=g.transform(a)),typeof g=="function"?g={validator:g}:g=ke({},g),g.validator=u.getValidationMethod(g),g.field=D,g.fullField=g.fullField||D,g.type=u.getType(g),g.validator&&(h[D]=h[D]||[],h[D].push({rule:g,value:a,source:i,field:D}))})});var p={};return Tf(h,o,function(D,v){var g=D.rule,E=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");E=E&&(g.required||!g.required&&D.value),g.field=D.field;function b(O,P){return ke(ke({},P),{},{fullField:g.fullField+"."+O})}function C(O){O===void 0&&(O=[]);var P=O;if(Array.isArray(P)||(P=[P]),!o.suppressWarning&&P.length&&Ye.warning("async-validator:",P),P.length&&g.message!==void 0&&(P=[].concat(g.message)),P=P.map(vu(g)),o.first&&P.length)return p[g.field]=1,v(P);if(!E)v(P);else{if(g.required&&!D.value)return g.message!==void 0?P=[].concat(g.message).map(vu(g)):o.error&&(P=[o.error(g,be(o.messages.required,g.field))]),v(P);var S={};if(g.defaultField)for(var $ in D.value)D.value.hasOwnProperty($)&&(S[$]=g.defaultField);S=ke(ke({},S),D.rule.fields);for(var W in S)if(S.hasOwnProperty(W)){var q=Array.isArray(S[W])?S[W]:[S[W]];S[W]=q.map(b.bind(null,W))}var K=new Ye(S);K.messages(o.messages),D.rule.options&&(D.rule.options.messages=o.messages,D.rule.options.error=o.error),K.validate(D.value,D.rule.options||o,function(J){var ee=[];P&&P.length&&ee.push.apply(ee,P),J&&J.length&&ee.push.apply(ee,J),v(ee.length?ee:null)})}}var M;g.asyncValidator?M=g.asyncValidator(g,D.value,C,D.source,o):g.validator&&(M=g.validator(g,D.value,C,D.source,o),M===!0?C():M===!1?C(g.message||g.field+" fails"):M instanceof Array?C(M):M instanceof Error&&C(M.message)),M&&M.then&&M.then(function(){return C()},function(O){return C(O)})},function(D){s(D)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Lt.hasOwnProperty(t.type))throw new Error(be("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?Lt.required:Lt[this.getType(t)]||!1}},Ye.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Lt[t]=n},Ye.warning=pu,Ye.messages=ur,Ye.validators=Lt;var ul={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 il(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Ye(e);return n.messages(Object.assign(ul,t)),n}var ol=new su;function ir(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function al(e){if(Array.isArray(e))return e}function sl(e){if(Array.isArray(e))return ir(e)}function Eu(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function Au(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){Eu(i,r,u,o,c,"next",s)}function c(s){Eu(i,r,u,o,c,"throw",s)}o(void 0)})}}function cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fl(e,t,n){return t&&Cu(e.prototype,t),n&&Cu(e,n),e}function ll(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fu(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function wu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hl(){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 dl(){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 Bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){ll(e,u,n[u])})}return e}function pl(e){return al(e)||wu(e)||bu(e)||hl()}function or(e){return sl(e)||wu(e)||bu(e)||dl()}function bu(e,t){if(!!e){if(typeof e=="string")return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ir(e,t)}}var Su=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},qe=function(){function t(r){var u=this;cl(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Mu,this.removeSetting=_u,this._callControlHooks("preInstance",r);var i=Fu(this,t)?this.constructor:void 0,o=i.controlName,c=i.controlIcon,s=i.controlType,l=i.controlFieldType,f=i.controlEventKeys,a=i.controlCustomEvents,h=i.name,d=i.setting;o&&c&&s||tu("The ".concat(h," controlName,controlIcon,controlType is not define"));var p;this.id=(p=r==null?void 0:r.id)!==null&&p!==void 0?p:jn(10),this.name=o,this.icon=c;var D;this.type=(D=r==null?void 0:r.type)!==null&&D!==void 0?D:s,this.props=new ct(r==null?void 0:r.props,(Fu(this,t)?this.constructor:void 0).controlName);var v;this.controlType=(v=r==null?void 0:r.controlType)!==null&&v!==void 0?v:"base",this.setting=te(d);var g;this.fieldType=(g=r==null?void 0:r.fieldType)!==null&&g!==void 0?g:l,this.eventKeys=te(f),this.customEvents=te(a),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=t.prototype;return n._callControlHooks=function(){for(var u=arguments.length,i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];var c,s=pl(i),l=s[0],f=s.slice(1);return(c=ol).emit.apply(c,[l,this].concat(or(f)))},n.preUpdate=function(u,i){this._callControlHooks("preUpdateProps",u,i)},n.postUpdate=function(u,i){this._callControlHooks("postUpdateProps",u,i)},n.updateProps=function(u,i){this.preUpdate(u,i),ru(this.props,u,i),this.postUpdate(u,i)},n.preValidate=function(){var u=this;return Au(function(){var i,o,c;return Su(this,function(s){switch(s.label){case 0:return i=Bu({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return o=s.sent(),c=o[o.length-1],[2,c===!1?void 0:c]}})})()},n.validate=function(u,i){var o=this;return Au(function(){var c,s,l,f;return Su(this,function(a){switch(a.label){case 0:return[4,o.preValidate()];case 1:c=a.sent(),s=c!==void 0?c:Bu({},o.rules),Array.isArray(i)&&i.forEach(function(h){s.hasOwnProperty(h)&&delete s[h]}),l=il(s,u),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l.validate(o.props)];case 3:return a.sent(),[2,!0];case 4:throw f=a.sent(),f.control||(f.control=o),f;case 5:return[2]}})})()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,o=this.id,c=this.type,s=this.props,l=s.dataBind,f=s.datasourceBind,a=s.optionConfig,h=s.caption,d=s.required,p=s.maxLength,D=s.options,v=s.encrypted,g=s.encryptedMode;if(!(!i&&!l&&!f)){var E={parentId:u,fieldType:i,controlId:o,caption:h,type:c,props:{}};switch(l&&(E.dataBind=l),a){case"datasource":case void 0:f&&(E.datasourceBind=f);break;case"custom":E.props.options=D;break}return d!==void 0&&(E.required=d),p!==void 0&&(E.maxLength=p),v!==void 0&&(E.encrypted=v),g!==void 0&&(E.encryptedMode=g),E}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:te(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var o;(o=this.setting).push.apply(o,or(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},fl(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();qe.controlName="\u63A7\u4EF6",qe.controlIcon="icon",qe.controlType="control",qe.controlEventKeys=[],qe.controlCustomEvents=[],qe.setting=[],qe.__is_control__=!0,qe.removeSettingItem=_u,qe.updateSettingItem=Mu;function _u(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(s){return s.key===(u?r.key:r)});if(i!==-1){var o,c;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(s){return!r.hideItems.includes(s)}):t.setting.splice(i,1),u&&!(!((c=t.setting[i].showItems)===null||c===void 0)&&c.length)&&t.setting.splice(i,1)}})}function Mu(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var i=n.setting.find(function(l){return l.key===u});if(i){if(typeof t=="boolean")i.visible=t;else if(typeof t=="object"){var o,c=(o=t.type)!==null&&o!==void 0?o:"replace";if(c==="replace")i.showItems=t.showItems;else{var s;(s=i.showItems).push.apply(s,or(t.showItems))}}}})}function Dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gl(e,t,n){return t&&Nu(e.prototype,t),n&&Nu(e,n),e}function vl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var vt=function(){function t(n){Dl(this,t),this.customEvents=[],this.parent=null;var r=vl(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,o=r.name,c=r.controlCustomEvents;u||tu("The ".concat(o," controlType is not define"));var s;this.id=(s=n==null?void 0:n.id)!==null&&s!==void 0?s:jn(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new ct(n==null?void 0:n.props),this.customEvents=c;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var a;this.fieldType=(a=n==null?void 0:n.fieldType)!==null&&a!==void 0?a:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:Gn.UNKNOWN}return gl(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();vt.controlType="control",vt.__is_control__=!0,vt.controlCustomEvents=[];function ml(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ar(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},cn(e)}function sr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cr(e,t)}function yl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function El(e,t){return t&&(Al(t)==="object"||typeof t=="function")?t:ml(e)}function cr(e,t){return cr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},cr(e,t)}var Al=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Cl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function fr(e){var t=Cl();return function(){var r=cn(e),u;if(t){var i=cn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return El(this,u)}}var Fl=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;u=t.call(this,r),u.dataBind={},u.caption={type:"string",required:!0,message:Oe.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:Oe.getMessage("pleaseEnterCaptionTip")};var i={fieldCode:{type:"string",required:!0,message:Oe.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:Oe.getMessage("pleaseEnterFieldCode")}};if(yl(r.dataBind,Rt))u.dataBind={type:"object",required:!0,fields:te(i),message:Oe.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:Oe.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(c){o.fields[c]={type:"object",required:!0,fields:te(i),message:Oe.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(hu),wl=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;return u=t.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:Oe.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(du),lr=function(e){sr(n,e);var t=fr(n);function n(r){ar(this,n);var u;u=t.call(this,r);var i;u.caption=(i=r==null?void 0:r.caption)!==null&&i!==void 0?i:"";var o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var c;u.isShowCaptionTip=(c=r==null?void 0:r.isShowCaptionTip)!==null&&c!==void 0?c:!1;var s;u.captionTip=(s=r==null?void 0:r.captionTip)!==null&&s!==void 0?s:"";var l;u.defaultState=(l=r==null?void 0:r.defaultState)!==null&&l!==void 0?l:"default";var f;u.labelPosition=(f=r==null?void 0:r.labelPosition)!==null&&f!==void 0?f:"top";var a;u.placeholder=(a=r==null?void 0:r.placeholder)!==null&&a!==void 0?a:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var d;u.requiredMessage=(d=r==null?void 0:r.requiredMessage)!==null&&d!==void 0?d:"",u.dataBind=new Rt(r==null?void 0:r.dataBind);var p;return u.defaultValue=(p=r==null?void 0:r.defaultValue)!==null&&p!==void 0?p:"",u}return n}(ct);lr.Rules=Fl,lr.RuntimeRules=wl;function Bl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fn(e){return fn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(e)}function Sl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hr(e,t)}function _l(e,t){return t&&(Ml(t)==="object"||typeof t=="function")?t:Bl(e)}function hr(e,t){return hr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},hr(e,t)}var Ml=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Nl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Il(e){var t=Nl();return function(){var r=fn(e),u;if(t){var i=fn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return _l(this,u)}}var Ve=function(e){Sl(n,e);var t=Il(n);function n(r){bl(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new lr(r==null?void 0:r.props),u}return n}(vt);function xl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ln(e)}function Rl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}function $l(e,t){return t&&(Pl(t)==="object"||typeof t=="function")?t:xl(e)}function dr(e,t){return dr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},dr(e,t)}var Pl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Tl(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ll(e){var t=Tl();return function(){var r=ln(e),u;if(t){var i=ln(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return $l(this,u)}}var Iu=function(e){Rl(n,e);var t=Ll(n);function n(r){return Ol(this,n),t.call(this,r)}return n}(ct);function pr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jl(e){if(Array.isArray(e))return pr(e)}function kl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ql(){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 xu(e){return jl(e)||kl(e)||Vl(e)||ql()}function Vl(e,t){if(!!e){if(typeof e=="string")return pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pr(e,t)}}function Ul(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Ou(e,t){e.parent=t,Ul(e,"parent")}function Hl(e,t){e.forEach(function(n){Ou(n,t)})}var Ru=Symbol("targetKey");function $u(e){var t;return(t=e[Ru])!==null&&t!==void 0?t:e}function Pu(e,t){return Hl(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),c=2;c<i;c++)o[c-2]=arguments[c];var s;return u===Ru?r:(s=Reflect).get.apply(s,[r,u].concat(xu(o)))},set:function(r,u,i){for(var o=arguments.length,c=new Array(o>3?o-3:0),s=3;s<o;s++)c[s-3]=arguments[s];var l;if(Dt(e)&&u==="length"&&i===e.length)return!0;var f=(l=Reflect).set.apply(l,[r,u,i].concat(xu(c)));return je(i)&&Ou(i,t),f}})}function hn(e,t,n,r){var u=r!=null?r:e,i=Pu($u(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(c){i=Pu($u(c),u)},enumerable:!0})}function Dr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zl(e){if(Array.isArray(e))return Dr(e)}function Tu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lu(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function Wl(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){Lu(i,r,u,o,c,"next",s)}function c(s){Lu(i,r,u,o,c,"throw",s)}o(void 0)})}}function Zl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?mt=Reflect.get:mt=function(u,i,o){var c=r0(u,i);if(!!c){var s=Object.getOwnPropertyDescriptor(c,i);return s.get?s.get.call(o):s.value}},mt(e,t,n||e)}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},et(e)}function Gl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gr(e,t)}function Jl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Kl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ql(){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 Yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){Xl(e,u,n[u])})}return e}function e0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function t0(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function n0(e,t){return t&&(u0(t)==="object"||typeof t=="function")?t:Tu(e)}function gr(e,t){return gr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},gr(e,t)}function r0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=et(e),e!==null););return e}function ju(e){return zl(e)||Kl(e)||i0(e)||Ql()}var u0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function i0(e,t){if(!!e){if(typeof e=="string")return Dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(e,t)}}function o0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function a0(e){var t=o0();return function(){var r=et(e),u;if(t){var i=et(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return n0(this,u)}}var s0=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},c0=1e4,ku=function(t){Gl(r,t);var n=a0(r);function r(i){Zl(this,r);var o;o=n.call(this,i),o.controlType="layout";var c=Jl(this,r)?this.constructor:void 0,s=c.excludes,l=c.childrenMaxLength;return o.props=new Iu(i==null?void 0:i.props),hn(Tu(o),"children",i==null?void 0:i.children),o.excludes=te(s),o.childrenMaxLength=l,o}var u=r.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var c=this.judgeExcludesChildren(o);return c&&this.childrenMaxLength>this.children.length},u.validate=function(o,c){var s=this,l=this,f=function(){return mt(et(r.prototype),"validate",s)};return Wl(function(){return s0(this,function(a){switch(a.label){case 0:return[4,f().call(l,o,c)];case 1:return a.sent(),[4,Promise.all(l.children.map(function(h){return h.validate(o,c)}))];case 2:return a.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,c=mt(et(r.prototype),"toDataBindModel",this).call(this),s=c?[c]:[];return this.children.reduce(function(l,f){var a=f.toDataBindModel(o);if(Array.isArray(a)){var h=a.filter(function(d){return!!d});return ju(l).concat(ju(h))}return a&&l.push(a),l},s)},u.toSchema=function(){var o=mt(et(r.prototype),"toSchema",this).call(this),c=this.children.map(function(s){var l=s.toSchema();return l});return t0(Yl({},o),{children:c})},r}(qe);ku.excludes=!1,ku.childrenMaxLength=c0;function qu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(e)}function l0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}function h0(e,t){return t&&(d0(t)==="object"||typeof t=="function")?t:qu(e)}function vr(e,t){return vr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},vr(e,t)}var d0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function p0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function D0(e){var t=p0();return function(){var r=dn(e),u;if(t){var i=dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return h0(this,u)}}var g0=function(e){l0(n,e);var t=D0(n);function n(r){f0(this,n);var u;return u=t.call(this,r),u.controlType="layout",u.props=new Iu(r==null?void 0:r.props),hn(qu(u),"children",r==null?void 0:r.children),u}return n}(vt);function Vu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e){return pn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(e)}function m0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mr(e,t)}function y0(e,t){return t&&(E0(t)==="object"||typeof t=="function")?t:Vu(e)}function mr(e,t){return mr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},mr(e,t)}var E0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function A0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function C0(e){var t=A0();return function(){var r=pn(e),u;if(t){var i=pn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return y0(this,u)}}var F0=function(e){m0(n,e);var t=C0(n);function n(r,u){v0(this,n);var i;return i=t.call(this,u),hn(Vu(i),"headers",u==null?void 0:u.headers,r),i}return n}(ct);H.LIST;function yr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B0(e,t,n){return t&&Uu(e.prototype,t),n&&Uu(e,n),e}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(e)}function b0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Er(e,t)}function S0(e,t){return t&&(_0(t)==="object"||typeof t=="function")?t:yr(e)}function Er(e,t){return Er=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Er(e,t)}var _0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function M0(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function N0(e){var t=M0();return function(){var r=Dn(e),u;if(t){var i=Dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return S0(this,u)}}var gn=function(e){b0(n,e);var t=N0(n);function n(r){w0(this,n);var u;return u=t.call(this,r),u.controlType="list",u.props=new F0(yr(u),r==null?void 0:r.props),hn(yr(u),"children",r==null?void 0:r.children),u}return B0(n,[{key:"length",get:function(){return this.children.length}}]),n}(vt);function vn(e){return e.controlType===Le.LAYOUT||e.controlType===Le.WRAP||e.controlType===Le.LIST||e.controlType===Le.SEARCH}function jt(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===X.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else vn(n)?jt(n==null?void 0:n.children,t):n instanceof Ve&&t(n)})}function kt(e,t){Array.isArray(e)&&e.map(n=>{n.type===X.DATA_VIEW||n.type===X.SIMPLE_SEARCH?t(n):vn(n)&&kt(n==null?void 0:n.children,t)})}class Ar extends en{constructor(t){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=t;this._schema=n,this._instance=this.createControl(n,t.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const t=[],n={};return Hu(this._instance,r=>{t.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r)}),this._flatInstances=t,this._instanceMap=n,this._flatInstances}get schema(){return this._schema}get instance(){return this._instance}get flatInstances(){return this._flatInstances}get instanceMap(){return this._instanceMap}get rules(){let t={};return kt(this._instance,n=>{t[n.id]=n.rules[0],jt(n.children,r=>{(r instanceof Ve||r instanceof gn)&&I0(t[n.id].fields,r)})}),t}get antdRules(){let t={};return kt(this._instance,n=>{t[n.id]=n.rules[0],jt(n.children,r=>{(r instanceof Ve||r instanceof gn)&&x0(t[n.id].fields,r)})}),t}}function Hu(e,t){Array.isArray(e)?e.map(n=>{t(n),vn(n)&&Hu(n.children,t)}):t(e)}function Cr(e){return e.props.isHide?!0:e.parent===null?!1:Cr(e.parent)}function I0(e,t){if(!Cr(t)){if(t instanceof Ve)e[t.id]=t.rules;else if(t.type===X.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{at(r.children,i=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[i.id]=i.rules)})}),e[t.id].push(n)}}}function x0(e,t){Cr(t)||(t instanceof Ve?e[t.id]=t.rules:t.type===X.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};at(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class O0{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i}=R0(t.instance);this.emptyState=r,this.state=n,this.dataBindMapping=u,this.controlIdMapping=i}setState(t,n,r){const u=this.controlIdMapping[t];u!==void 0?this.state[u.dataView][t]=n:r!==void 0?Object.keys(this.controlIdMapping).map(i=>{const o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(this.state[o][i][r][t]=n)})}):this.state[t]=n}getState(t,n){if(this.state[t]!==void 0)return this.state[t];{const u=this.controlIdMapping[t];if(u!==void 0)return this.state[u.dataView][t];if(n!==void 0){let i;return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{var f;l===t&&(i=(f=this.state[c][o][n])==null?void 0:f[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{l===t&&this.state[c][o].map(f=>{i.push(f[t])})})}),i}}}getEmptyState(t){if(this.emptyState[t]!==void 0)return this.emptyState[t];{const r=this.controlIdMapping[t];if(r!==void 0)return this.emptyState[r.dataView][t];{let u;return Object.keys(this.controlIdMapping).map(i=>{const o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(u=this.emptyState[o][i][t])})}),u}}}getDataBind(t){let n=this.controlIdMapping[t];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let i in u.children)if(i===t){n=u.children[i];break e}}}return n==null?void 0:n.dataBind}}function R0(e){let t={},n={},r={},u={};return kt(e,i=>{const o=i.id,c={},s={};jt([i],(l,f)=>{$0(c,s,l),P0(r,o,l),T0(u,o,l)}),t[o]=c,n[o]=s}),{state:t,emptyState:n,databindMapping:r,controlidMapping:u}}function $0(e,t,n){var r;if(n instanceof Ve)e[n.id]=te(n.props.defaultValue),t[n.id]=te(n.props.defaultValue);else{const u={};at(n.props.headers,i=>{u[i.id]=te(i.props.defaultValue)}),e[n.id]=new Array((r=n.props.defaultRows)!=null?r:1).fill(0).map(()=>te(u)),t[n.id]=u}}function P0(e,t,n){if(n instanceof Ve)n.props.dataBind instanceof Qe?Object.keys(n.props.dataBind).map(r=>{const u=n.props.dataBind,i=u[r].dataCode;i!==void 0&&(e[i]===void 0&&(e[i]={controlId:n.id,fields:[],dataViewId:t}),e[i].fields.push({fieldCode:u[r].fieldCode,controlId:n.id,dataBind:u,dataViewId:[t]}))}):(e[n.props.dataBind.dataCode]===void 0&&(e[n.props.dataBind.dataCode]={controlId:t,fields:[],dataViewId:t}),e[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[t]}));else{if(n.props.datasourceBind.dataCode===""){Je(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}e[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:t};const r=n.id;at(n.props.headers,u=>{u.props.dataBind instanceof Qe?Object.keys(u.props.dataBind).map(i=>{const o=u.props.dataBind,c=o[i].dataCode;e[c].fields.push({fieldCode:o[i].fieldCode,controlId:u.id,dataBind:o,dataViewId:[t,r]})}):e[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[t,r]})})}}function T0(e,t,n){n instanceof Ve?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===X.SUBTABLE&&(e[n.id]={dataBind:new Rt({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},at(n.props.headers,r=>{var u,i;Object.assign((i=(u=e[n.id])==null?void 0:u.children)!=null?i:{},{[r.id]:{dataBind:r.props.dataBind}})}))}const zu=["splice","push","shift","pop","unshift","reverse"],Fr=Symbol("__engineProxy__"),wr=Symbol("__engineTarget__"),Wu=Symbol("__engineArrayBeforeSetCallbackFlag__"),Zu=Symbol("__engineProxyThisKey__"),Re={type:"",args:[],callback:Xu};function Xu(){}V0();function L0(e,t,n,r,u){if(Re.type){Re.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){Ze(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${zu.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const c=n,s=e.length;if(c>e.length){Ze("Do not directly modify the length of the array data, please add new rows");return}return c===e.length?void 0:()=>u.call(null,e,r,"splice",[c,s-c])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function j0(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===Fr?!0:u===wr?r:Array.isArray(r)&&u===Wu?n:u===Zu?e:Reflect.get(r,u,i)},set(r,u,i,o){var h;let c=i;const s=r[u],l=e===""?u:e+"."+u;function f(d){if(typeof d=="object"&&d!==null)return d[Fr]!==!0?mn(d,t,n,l):mn(d[wr],t,n,l)}c=(h=f(i))!=null?h:c;let a;if(Array.isArray(r)){const d=L0(r,u,i,e,t);a=Reflect.set(r,u,c,o),d&&d()}else{try{let d=c;if(c=n.call(null,r,l,c,s),d!==c){const p=f(c);p!==void 0&&(c=p)}}catch(d){return Kt(`${l} set error ${d}`),!0}a=Reflect.set(r,u,c,o),t.call(null,r,l,i,s)}return a}}}function mn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,o=e[u];typeof o=="object"&&o!==null&&(e[u]=mn(o,t,n,i))}return new Proxy(e,j0(r,t,n))}function Gu(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...Gu(n.children))}),t}function Br(e,t){if(t==="")return;const n=t.split(".");if(n.length===0)return;const r=n[0],u=n.slice(1),i=e.find(o=>o.id===r);return u.length===0?i:u.reduce((o,c)=>{var f,a;const s=Number(c);if(Number.isNaN(s)){const h=o!=null&&o.children?Gu(o.children):void 0,d=h==null?void 0:h.find(p=>p.id===c);return d||(o instanceof Ve?o:void 0)}else return(a=(f=o==null?void 0:o.children)==null?void 0:f[s])!=null?a:o},i)}function k0(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function q0(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function V0(){zu.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[Fr]){let u;const i=k0(e,n);if(i.length){const o=(r=this[Wu])==null?void 0:r.call(this,this[wr],this[Zu],i),c=q0(e,n,o);Re.type=e,Re.args=c,u=t.apply(this,c)}else Re.type=e,Re.args=n,u=t.apply(this,n);return typeof Re.callback=="function"&&Re.callback(e,n,u),Re.type="",Re.args=[],Re.callback=Xu,u}else return t.apply(this,n)}})}class U0{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return ze(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){Kt(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&Ze("duplicated action key");const r=new H0(t,n);this.actionMap.set(t,r)}}class H0{constructor(t,n){this.id="",this.id=t,this.func=n}}class z0{constructor(t){this._dataStore=new Map,this.executer=t}add(t,n){this._dataStore.set(t,n)}get(t){let n=this._dataStore.get(t);return te(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return ze(this,null,function*(){return this.executer===void 0?(Kt("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class tt{}class qt extends tt{validate(t){return Be(t)}transform(t){if(t==null)return"";if(!je(t)&&!iu(t))return String(t);if(sf(t))return JSON.stringify(t);throw`${t} is not a string`}}class br extends tt{validate(t){return Qt(t)||t===""}transform(t){if(t==null)return"";const n=!je(t)&&!iu(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class W0 extends tt{validate(t){return cf(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Dt(t))return n(t);if(Be(t)&&ou(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class Z0 extends tt{validate(t){return ff(t)}transform(t){if(t==null)return[];function n(u){return u.map(i=>!i&&i!==0?"":Number(i)).filter(i=>i===""||!Number.isNaN(i))}if(Dt(t))return n(t);if(Be(t)&&ou(t))try{const u=JSON.parse(t);if(Dt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class X0 extends tt{validate(t){return t instanceof tn||je(t)&&"amount"in t&&Qt(t.amount)&&"currency"in t&&Be(t.currency)}transform(t,n){if(t==null||t==="")return new tn({currency:n==null?void 0:n.currency});let r;if(je(t)&&(r=new tn(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new tn(oe(oe({},n),u))}catch(u){}if(r){const u=new br,i=new qt;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),i.validate(r.currency)||(r.currency=i.transform(r.currency)),r}throw`${t} is not a { amount: number, currency: string } object`}}class G0 extends tt{validate(t){return t instanceof nn||je(t)&&"min"in t&&Be(t.min)&&"max"in t&&Be(t.max)}transform(t,n){if(t==null||t==="")return new nn;let r;if(je(t)&&(r=new nn(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new nn(oe(oe({},n),u))}catch(u){}if(r){const u=new qt;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${t} is not a { min: string, max: string } object`}}class J0 extends tt{validate(t){return t instanceof un||je(t)&&"result"in t&&Qt(t.result)&&"unit"in t&&Be(t.unit)}transform(t,n){if(t==null||t==="")return new un({unit:n==null?void 0:n.unit});let r;if(je(t)&&(r=new un(oe(oe({},n),t))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new un(oe(oe({},n),u))}catch(u){}if(r){const u=new br,i=new qt;return u.validate(r.result)||(r.result=u.transform(r.result)),i.validate(r.unit)||(r.unit=i.transform(r.unit)),r}throw`${t} is not a { result: string, unit: string } object`}}class K0 extends tt{validate(t){return t instanceof rn}transform(t,n){if(t==null||t==="")return new rn;let r;if(je(t)&&(r=new rn(oe(oe({},n),zn.exports.camelizeKeys(t)))),Be(t)&&Yt(t))try{const u=JSON.parse(t);r=new rn(oe(oe({},n),zn.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new qt;return u.validate(r.city)||(r.city=u.transform(r.city)),u.validate(r.district)||(r.district=u.transform(r.district)),u.validate(r.province)||(r.province=u.transform(r.province)),r}throw`${t} is not a { city: string, district: string, province: string } object`}}class Q0{static getValueChecker(t){let n;switch(t){case H.VARCHAR:case H.TIMESTAMP:case H.TEXT:case H.RELATION:case H.AUTO_NUMBER:n=new qt;break;case H.DECIMAL:n=new br;break;case H.EMPLOYEES:case H.DEPARTMENTS:case H.IMAGE:case H.FILE:case H.ARRAY:n=new W0;break;case H.MONEY:n=new X0;break;case H.TIMESCOPE:n=new G0;break;case H.CALC:n=new J0;break;case H.DECIMAL_RANGE:n=new Z0;break;case H.ADDRESS:n=new K0;break}return n}}function Y0(e){if(["min","max","currency","unit"].includes(e))return H.VARCHAR;if(["result","amount"].includes(e))return H.DECIMAL}function Ju(e,t,n,r){var o;let u=(o=Y0(t))!=null?o:e,i=Q0.getValueChecker(u);if(!i||i.validate(n))return n;try{const c=i.transform(n,r);return c!==void 0?c:n}catch(c){throw`${t} ${c}`}}function eh(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const o=t[u];return r[u]=Ju(i,u,o,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let yt=null,Vt="";class Sr extends su{constructor(t){super(),this.isMounted=!1,this.id=jn(8),this.__pluginsApplied=!1,this.actionManager=new U0,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:o=Xr,debug:c=!1}=this.$options;Oe.setLocale(o),this.debug=c,this.runtime=new Ar({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new O0({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Un(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return Ar.register(...t)}static judgeControlIsRegistered(t){return Ar.staticRegisteredTypes.has(t.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:t=[]}=this.$options;this._handlerProxyState(),this.__plugins=t,this.applyPlugins(),this.setStates(this.getState()),this.debugLog("engine\u7684mount\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F"),this.debug&&typeof window!="undefined"&&(window.engines[this.id]=this)}destroy(){this.debug&&typeof window!="undefined"&&delete window.engines[this.id]}_handlerProxyState(){this.store.state=mn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=Br(this.runtime.flatInstances,n);if(!i)return r;if(this.assertInstance(i,X.SUBTABLE)){const s=i.props.headers.reduce((l,f)=>{const a=f.children[0];return a&&a instanceof Ve&&(l[a.id]=a.fieldType),l},{});return r===null?[]:r.map(l=>eh(s,l,this.getEmptyState(i.id)))}const o=n.split("."),c=o[o.length-1];try{return Ju(i.fieldType,c,r,u)}catch(s){throw Je(`the id=${i.id}'s instance setState error, %o ${s}.`,r),s}}_proxyStateCallback(t,n,r,u,i){Array.isArray(t)?this._handlerArrayUpdate(t,n,r,u,i):this._handlerObjectUpdate(t,n,r,u)}_handlerArrayUpdate(t,n,r,u,i){const o=Br(this.runtime.flatInstances,n);if(!(o instanceof gn))return;const c=h=>{const d=[];for(let p=0;p<h;p++){const D=this.listControlCreateRow(o,"subtable-row");D&&d.push(D)}return d},s=yt;let l=[],f=[],a=[];if(r&&u){switch(r){case"push":case"unshift":const h=u.length;l=c(h),f=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const d=u.length-2,p=u.slice(2);l=c(d),f=p;const D=u[0],v=u[1];o.children[r](D,v,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?a=i:["pop","shift"].includes(r)&&(a=[i]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},s,{changed:l,data:f,deleted:a!=null?a:[]})}),yt=null}}_handlerObjectUpdate(t,n,r,u){const i=Br(this.runtime.flatInstances,n);if(!i)return;const o=this.getInstanceRowIndex(i),c=yt||{};if(i instanceof gn){i.children.length=0;const s=r;let l=[];for(let f=0;f<s.length;f++){const a=this.listControlCreateRow(i,"subtable-row");a&&l.push(a)}i.children.push(...l),this.runtime.getFlatInstances(),this.emit("list-change",{instance:i,value:r,options:Zr(oe({},c),{changed:l,data:s,deleted:u!=null?u:[]})})}else this.emit("change",{instance:i,value:this.getState(i.id,o),rowIndex:o,options:Zr(oe({},c),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Vt=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){Ze(`${Vt} Plugin apply Error
2
+ ${r}`)}finally{Vt=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r instanceof g0){const u=te(t.props.headers),i=this.createControl(u);r.children.push(...i)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return ze(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return Je("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let r,u;this.isMounted||(u=new Promise(o=>{r=o}),this._jobTasks.push(u));const i=yield fo(Sr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Vt&&(n.applyingPluginName=Vt),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getEmptyState(t){return te(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){yt=t}setState(t,n,r,u){yt=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),yt=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const s=u[i][o];s!==void 0&&this.setState(o,s,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const s=this.getDataBindMapping(t);if(s){const{controlId:l}=s;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof Qe?Object.entries(i).reduce((s,[l,f])=>f.fieldCode===n?s[l]:s,c):c}getData(t){var u,i,o,c,s,l,f,a;if(!t)return;let n=this.getDataBindMapping(t),r=this.getControlIdMapping();if(n){const{controlId:h}=n,d=this.getField(t);if(Array.isArray(d))return d.map(D=>{var g,E,b,C,M,O,P;let v={};for(let S in D)if((b=(E=(g=r[h])==null?void 0:g.children[S])==null?void 0:E.dataBind)!=null&&b.fieldCode)v[(C=r[h].children[S])==null?void 0:C.dataBind.fieldCode]=D[S];else if((M=r[h])!=null&&M.children[S])for(let $ in D[S])v[(P=(O=r[h])==null?void 0:O.children[S])==null?void 0:P.dataBind[$].fieldCode]=D[S][$];return v});{let p={};for(let D in d)if((i=(u=r[D])==null?void 0:u.dataBind)!=null&&i.fieldCode)p[(o=r[D])==null?void 0:o.dataBind.fieldCode]=d[D];else if((s=(c=r[D])==null?void 0:c.dataBind)!=null&&s.dataCode)p[(l=r[D])==null?void 0:l.dataBind.dataCode]=d[D].map(v=>{var E,b,C;let g={};for(let M in v)if((E=r[D].children[M])!=null&&E.dataBind.fieldCode)g[(b=r[D].children[M])==null?void 0:b.dataBind.fieldCode]=v[M];else for(let O in v[M])g[(C=r[D].children[M])==null?void 0:C.dataBind[O].fieldCode]=v[M][O];return g});else if(r[D])for(let v in d[D])p[(a=(f=r[D])==null?void 0:f.dataBind[v])==null?void 0:a.fieldCode]=d[D][v];return p}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:s}=o;if(c instanceof Qe){const f=(l=te(this.getState(s,u)))!=null?l:this.getEmptyState(s),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),f);this.setState(s,a,u,i)}else this.setState(s,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:s,controlId:l,fieldCode:f}=c;if(!o.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(s instanceof Qe){const h=(a=te(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(s).reduce((p,[D,v])=>{o.push(v.fieldCode);const g=n[v.fieldCode];return g!==void 0&&(p[D]=g),p},h);this.setState(c.controlId,d,r,u)}else this.setState(l,n[f],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const i={};return r.fields.forEach(o=>{const{dataBind:c,controlId:s,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof Qe){const f=this.getEmptyState(s);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},f)}else i[s]=n[l]}),i}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r={};Object.keys(t).map(u=>{const i=t[u];if(Array.isArray(i))i.map(o=>{const c=this.getDataBindMapping(u);if(!c)return;let s=te(this.store.emptyState[c.dataViewId][c.controlId]),l=[];Object.keys(o).map(f=>{var h,d,p;if(l.includes(f))return;const a=(d=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:d.find(D=>D.fieldCode===f);if(a){if(a.dataBind instanceof Rt&&o[f]!==void 0)s[a.controlId]=o[f];else if(a.dataBind instanceof Qe){let D=te((p=this.getEmptyState(a.controlId))!=null?p:{});Object.keys(a.dataBind).map(v=>{const g=a.dataBind[v];o[g.fieldCode]!==void 0&&(D[v]=o[g.fieldCode]),l.push(g.fieldCode)}),s[a.controlId]=D}}}),r[c.dataViewId]||(r[c.dataViewId]={}),r[c.dataViewId][c.controlId]||(r[c.dataViewId][c.controlId]=[]),r[c.dataViewId][c.controlId].push(s)});else if(i){let o=[];Object.keys(i).map(c=>{var l;if(o.includes(c))return;const s=this.getDataBindMapping(u,c);if(s){if(r[s.dataViewId[0]]||(r[s.dataViewId[0]]={}),s.dataBind instanceof Rt&&i[c]!==void 0)r[s.dataViewId[0]][s.controlId]=i[c];else if(s.dataBind instanceof Qe){let f=te((l=this.getEmptyState(s.controlId))!=null?l:{});Object.keys(s.dataBind).map(a=>{const h=s.dataBind[a];i[h.fieldCode]!==void 0&&(f[a]=i[h.fieldCode]),o.push(h.fieldCode)}),r[s.dataViewId[0]][s.controlId]=f}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r),this.setStates(r,void 0,n),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){var u;if(t===void 0)return this.runtime.flatInstances;const r=this.runtime.flatInstances.filter(i=>i.id===t);if(n)if(r.length){const i=r[0];if(this.getInstanceRowIndex(i)!==void 0){const o=this.getInstanceInSubtableHeader(i);o&&r.unshift(o)}}else{const i=this.getControlIdMapping(),[o]=(u=Object.entries(i).find(([c,s])=>s.children&&t in s.children))!=null?u:[];if(o){const s=this.getInstance(o).props.headers.find(l=>l.children.find(f=>f.id===t));if(s){const l=s.children.find(f=>f.id===t);l&&r.unshift(l)}}}return r}setInstance(t,n,r,u){try{let i;if(typeof t=="string"?i=this.getInstance(t,u):i=t,!i)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",i.id,i,n,r),ru(i.props,n,r),this.schemaEvent("schema-change",{instance:i,props:n,value:r})}catch(i){throw i}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){Je(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){Je(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new z0(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Be(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,X.SUBTABLE))if(this.assertInstance(t,X.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,X.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,X.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,X.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}}class th{}class nh{constructor(t){this.config=t}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ku(n,t);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function Ku(e,t){if(!e.module||!e.module.compiled)return;const n=e.module.compiled,r={exports:{ctx:t,utils:t.getAction().actionUtils}};try{new Function("module","exports",n).call(r,r,r.exports)}catch(o){Ze(o.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Ze("fail to parse the module")}const u={},i={};for(const[o,c]of Object.entries(r.exports))typeof c=="function"?u[o]=c:i[o]=c;return{funcMap:u,variables:i}}const rh={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class uh{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(rh).forEach(([n,r])=>{t.on(n,u=>ze(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return ze(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>ze(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class ih{constructor(t){this.config=t}apply(t){this.engine=t,cu.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>ze(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return ze(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(i=>ze(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}var Qu={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function ge(e){return typeof e=="number"}function nt(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Yu(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function ei(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function ti(e){return e&&e.constructor.prototype.isUnit===!0||!1}function yn(e){return typeof e=="string"}var Se=Array.isArray;function Ut(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Mr(e){return Array.isArray(e)||Ut(e)}function oh(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ah(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function sh(e){return e&&e.constructor.prototype.isRange===!0||!1}function ni(e){return e&&e.constructor.prototype.isIndex===!0||!1}function ch(e){return typeof e=="boolean"}function fh(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function lh(e){return e&&e.constructor.prototype.isHelp===!0||!1}function hh(e){return typeof e=="function"}function dh(e){return e instanceof Date}function ph(e){return e instanceof RegExp}function Dh(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Yu(e)&&!ei(e))}function gh(e){return e===null}function vh(e){return e===void 0}function mh(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function yh(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function Eh(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ah(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ch(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fh(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function wh(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bh(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function bh(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Sh(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function _h(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Mh(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nh(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ih(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function xh(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Oh(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rh(e){return e&&e.constructor.prototype.isChain===!0||!1}function Nr(e){var t=typeof e;return t==="object"?e===null?"null":nt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function ft(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return ft(n)});if(e instanceof Date)return new Date(e.valueOf());if(nt(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return $h(e,ft)}function $h(e,t){var n={};for(var r in e)En(e,r)&&(n[r]=t(e[r]));return n}function Ir(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Ir(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Ir(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function En(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Ph(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],i=e[u];i!==void 0&&(n[u]=i)}return n}var Th=["Matrix","Array"],Lh=["number","BigNumber","Fraction"],ri=function(t){if(t)throw new Error(`The global config is readonly.
3
3
  Please create a mathjs instance if you want to change the default configuration.
4
4
  Example:
5
5
 
6
6
  import { create, all } from 'mathjs';
7
7
  const mathjs = create(all);
8
8
  mathjs.config({ number: 'BigNumber' });
9
- `);return Object.freeze(Qu)};_r(ri,Qu,{MATRIX_OPTIONS:Rh,NUMBER_OPTIONS:$h});function $e(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ph(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){o=!0,c=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function Ph(e,t){if(!!e){if(typeof e=="string")return ui(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ui(e,t)}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Et(e){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(e)}function ii(){return!0}function Me(){return!1}function At(){}var oi="Argument is not a typed-function.";function ai(){function e(v){return Et(v)==="object"&&v!==null&&v.constructor===Object}var t=[{name:"number",test:function(y){return typeof y=="number"}},{name:"string",test:function(y){return typeof y=="string"}},{name:"boolean",test:function(y){return typeof y=="boolean"}},{name:"Function",test:function(y){return typeof y=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(y){return y instanceof Date}},{name:"RegExp",test:function(y){return y instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(y){return y===null}},{name:"undefined",test:function(y){return y===void 0}}],n={name:"any",test:ii,isAny:!0},r,u,i=0,o={createCount:0};function c(v){var y=r.get(v);if(y)return y;var A='Unknown type "'+v+'"',F=v.toLowerCase(),S,_=$e(u),I;try{for(_.s();!(I=_.n()).done;)if(S=I.value,S.toLowerCase()===F){A+='. Did you mean "'+S+'" ?';break}}catch(B){_.e(B)}finally{_.f()}throw new TypeError(A)}function s(v){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",A=y?c(y).index:u.length,F=[],S=0;S<v.length;++S){if(!v[S]||typeof v[S].name!="string"||typeof v[S].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var _=v[S].name;if(r.has(_))throw new TypeError('Duplicate type name "'+_+'"');F.push(_),r.set(_,{name:_,test:v[S].test,isAny:v[S].isAny,index:A+S,conversionsTo:[]})}var I=u.slice(A);u=u.slice(0,A).concat(F).concat(I);for(var B=A+F.length;B<u.length;++B)r.get(u[B]).index=B}function l(){r=new Map,u=[],i=0,s([n],!1)}l(),s(t);function f(){var v,y=$e(u),A;try{for(y.s();!(A=y.n()).done;)v=A.value,r.get(v).conversionsTo=[]}catch(F){y.e(F)}finally{y.f()}i=0}function a(v){var y=u.filter(function(A){var F=r.get(A);return!F.isAny&&F.test(v)});return y.length?y:["any"]}function h(v){return v&&typeof v=="function"&&"_typedFunctionData"in v}function d(v,y,A){if(!h(v))throw new TypeError(oi);var F=A&&A.exact,S=Array.isArray(y)?y.join(","):y,_=C(S),I=m(_);if(!F||I in v.signatures){var B=v._typedFunctionData.signatureMap.get(I);if(B)return B}var N=_.length,L;if(F){L=[];var V;for(V in v.signatures)L.push(v._typedFunctionData.signatureMap.get(V))}else L=v._typedFunctionData.signatures;for(var O=0;O<N;++O){var ve=_[O],le=[],pe=void 0,ie=$e(L),Ce;try{for(ie.s();!(Ce=ie.n()).done;){pe=Ce.value;var se=M(pe.params,O);if(!(!se||ve.restParam&&!se.restParam)){if(!se.hasAny){var Ie=function(){var Fe=b(se);if(ve.types.some(function(dt){return!Fe.has(dt.name)}))return"continue"}();if(Ie==="continue")continue}le.push(pe)}}}catch(Fe){ie.e(Fe)}finally{ie.f()}if(L=le,L.length===0)break}var me,ye=$e(L),ht;try{for(ye.s();!(ht=ye.n()).done;)if(me=ht.value,me.params.length<=N)return me}catch(Fe){ye.e(Fe)}finally{ye.f()}throw new TypeError("Signature not found (signature: "+(v.name||"unnamed")+"("+m(_,", ")+"))")}function p(v,y,A){return d(v,y,A).implementation}function D(v,y){var A=c(y);if(A.test(v))return v;var F=A.conversionsTo;if(F.length===0)throw new Error("There are no conversions to "+y+" defined.");for(var S=0;S<F.length;S++){var _=c(F[S].from);if(_.test(v))return F[S].convert(v)}throw new Error("Cannot convert "+v+" to "+y)}function m(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return v.map(function(A){return A.name}).join(y)}function g(v){var y=v.indexOf("...")===0,A=y?v.length>3?v.slice(3):"any":v,F=A.split("|").map(function(B){return c(B.trim())}),S=!1,_=y?"...":"",I=F.map(function(B){return S=B.isAny||S,_+=B.name+"|",{name:B.name,typeIndex:B.index,test:B.test,isAny:B.isAny,conversion:null,conversionIndex:-1}});return{types:I,name:_.slice(0,-1),hasAny:S,hasConversion:!1,restParam:y}}function E(v){var y=v.types.map(function(I){return I.name}),A=kp(y),F=v.hasAny,S=v.name,_=A.map(function(I){var B=c(I.from);return F=B.isAny||F,S+="|"+I.from,{name:I.from,typeIndex:B.index,test:B.test,isAny:B.isAny,conversion:I,conversionIndex:I.index}});return{types:v.types.concat(_),name:S,hasAny:F,hasConversion:_.length>0,restParam:v.restParam}}function b(v){return v.typeSet||(v.typeSet=new Set,v.types.forEach(function(y){return v.typeSet.add(y.name)})),v.typeSet}function C(v){var y=[];if(typeof v!="string")throw new TypeError("Signatures must be strings");var A=v.trim();if(A==="")return y;for(var F=A.split(","),S=0;S<F.length;++S){var _=g(F[S].trim());if(_.restParam&&S!==F.length-1)throw new SyntaxError('Unexpected rest parameter "'+F[S]+'": only allowed for the last parameter');if(_.types.length===0)return null;y.push(_)}return y}function x(v){var y=_t(v);return y?y.restParam:!1}function $(v){if(!v||v.types.length===0)return ii;if(v.types.length===1)return c(v.types[0].name).test;if(v.types.length===2){var y=c(v.types[0].name).test,A=c(v.types[1].name).test;return function(_){return y(_)||A(_)}}else{var F=v.types.map(function(S){return c(S.name).test});return function(_){for(var I=0;I<F.length;I++)if(F[I](_))return!0;return!1}}}function P(v){var y,A,F;if(x(v)){y=Qi(v).map($);var S=y.length,_=$(_t(v)),I=function(N){for(var L=S;L<N.length;L++)if(!_(N[L]))return!1;return!0};return function(N){for(var L=0;L<y.length;L++)if(!y[L](N[L]))return!1;return I(N)&&N.length>=S+1}}else return v.length===0?function(N){return N.length===0}:v.length===1?(A=$(v[0]),function(N){return A(N[0])&&N.length===1}):v.length===2?(A=$(v[0]),F=$(v[1]),function(N){return A(N[0])&&F(N[1])&&N.length===2}):(y=v.map($),function(N){for(var L=0;L<y.length;L++)if(!y[L](N[L]))return!1;return N.length===y.length})}function M(v,y){return y<v.length?v[y]:x(v)?_t(v):null}function R(v,y){var A=M(v,y);return A?b(A):new Set}function W(v){return v.conversion===null||v.conversion===void 0}function k(v,y){var A=new Set;return v.forEach(function(F){var S=R(F.params,y),_,I=$e(S),B;try{for(I.s();!(B=I.n()).done;)_=B.value,A.add(_)}catch(N){I.e(N)}finally{I.f()}}),A.has("any")?["any"]:Array.from(A)}function Q(v,y,A){var F,S,_=v||"unnamed",I=A,B,N=function(){var ie=[];if(I.forEach(function(se){var Ie=M(se.params,B),me=$(Ie);(B<se.params.length||x(se.params))&&me(y[B])&&ie.push(se)}),ie.length===0){if(S=k(I,B),S.length>0){var Ce=a(y[B]);return F=new TypeError("Unexpected type of argument in function "+_+" (expected: "+S.join(" or ")+", actual: "+Ce.join(" | ")+", index: "+B+")"),F.data={category:"wrongType",fn:_,index:B,actual:Ce,expected:S},{v:F}}}else I=ie};for(B=0;B<y.length;B++){var L=N();if(Et(L)==="object")return L.v}var V=I.map(function(pe){return x(pe.params)?1/0:pe.params.length});if(y.length<Math.min.apply(null,V))return S=k(I,B),F=new TypeError("Too few arguments in function "+_+" (expected: "+S.join(" or ")+", index: "+y.length+")"),F.data={category:"tooFewArgs",fn:_,index:y.length,expected:S},F;var O=Math.max.apply(null,V);if(y.length>O)return F=new TypeError("Too many arguments in function "+_+" (expected: "+O+", actual: "+y.length+")"),F.data={category:"tooManyArgs",fn:_,index:y.length,expectedLength:O},F;for(var ve=[],le=0;le<y.length;++le)ve.push(a(y[le]).join("|"));return F=new TypeError('Arguments of type "'+ve.join(", ")+'" do not match any of the defined signatures of function '+_+"."),F.data={category:"mismatch",actual:ve},F}function K(v){for(var y=u.length+1,A=0;A<v.types.length;A++)W(v.types[A])&&(y=Math.min(y,v.types[A].typeIndex));return y}function te(v){for(var y=i+1,A=0;A<v.types.length;A++)W(v.types[A])||(y=Math.min(y,v.types[A].conversionIndex));return y}function Y(v,y){if(v.hasAny){if(!y.hasAny)return 1}else if(y.hasAny)return-1;if(v.restParam){if(!y.restParam)return 1}else if(y.restParam)return-1;if(v.hasConversion){if(!y.hasConversion)return 1}else if(y.hasConversion)return-1;var A=K(v)-K(y);if(A<0)return-1;if(A>0)return 1;var F=te(v)-te(y);return F<0?-1:F>0?1:0}function z(v,y){var A=v.params,F=y.params,S=_t(A),_=_t(F),I=x(A),B=x(F);if(I&&S.hasAny){if(!B||!_.hasAny)return 1}else if(B&&_.hasAny)return-1;var N=0,L=0,V,O=$e(A),ve;try{for(O.s();!(ve=O.n()).done;)V=ve.value,V.hasAny&&++N,V.hasConversion&&++L}catch(Wt){O.e(Wt)}finally{O.f()}var le=0,pe=0,ie=$e(F),Ce;try{for(ie.s();!(Ce=ie.n()).done;)V=Ce.value,V.hasAny&&++le,V.hasConversion&&++pe}catch(Wt){ie.e(Wt)}finally{ie.f()}if(N!==le)return N-le;if(I&&S.hasConversion){if(!B||!_.hasConversion)return 1}else if(B&&_.hasConversion)return-1;if(L!==pe)return L-pe;if(I){if(!B)return 1}else if(B)return-1;var se=(A.length-F.length)*(I?-1:1);if(se!==0)return se;for(var Ie=[],me=0,ye=0;ye<A.length;++ye){var ht=Y(A[ye],F[ye]);Ie.push(ht),me+=ht}if(me!==0)return me;for(var Fe,dt=0,xn=Ie;dt<xn.length;dt++)if(Fe=xn[dt],Fe!==0)return Fe;return 0}function kp(v){if(v.length===0)return[];var y=v.map(c);v.length>1&&y.sort(function(N,L){return N.index-L.index});var A=y[0].conversionsTo;if(v.length===1)return A;A=A.concat([]);for(var F=new Set(v),S=1;S<y.length;++S){var _=void 0,I=$e(y[S].conversionsTo),B;try{for(I.s();!(B=I.n()).done;)_=B.value,F.has(_.from)||(A.push(_),F.add(_.from))}catch(N){I.e(N)}finally{I.f()}}return A}function Vp(v,y){var A=y;if(v.some(function(B){return B.hasConversion})){var F=x(v),S=v.map(Up);A=function(){for(var N=[],L=F?arguments.length-1:arguments.length,V=0;V<L;V++)N[V]=S[V](arguments[V]);return F&&(N[L]=arguments[L].map(S[L])),y.apply(this,N)}}var _=A;if(x(v)){var I=v.length-1;_=function(){return A.apply(this,Wr(arguments,0,I).concat([Wr(arguments,I)]))}}return _}function Up(v){var y,A,F,S,_=[],I=[];switch(v.types.forEach(function(B){B.conversion&&(_.push(c(B.conversion.from).test),I.push(B.conversion.convert))}),I.length){case 0:return function(N){return N};case 1:return y=_[0],F=I[0],function(N){return y(N)?F(N):N};case 2:return y=_[0],A=_[1],F=I[0],S=I[1],function(N){return y(N)?F(N):A(N)?S(N):N};default:return function(N){for(var L=0;L<I.length;L++)if(_[L](N))return I[L](N);return N}}}function Hp(v){function y(A,F,S){if(F<A.length){var _=A[F],I=[];if(_.restParam){var B=_.types.filter(W);B.length<_.types.length&&I.push({types:B,name:"..."+B.map(function(N){return N.name}).join("|"),hasAny:B.some(function(N){return N.isAny}),hasConversion:!1,restParam:!0}),I.push(_)}else I=_.types.map(function(N){return{types:[N],name:N.name,hasAny:N.isAny,hasConversion:N.conversion,restParam:!1}});return Qp(I,function(N){return y(A,F+1,S.concat([N]))})}else return[S]}return y(v,0,[])}function zp(v,y){for(var A=Math.max(v.length,y.length),F=0;F<A;F++){var S=R(v,F),_=R(y,F),I=!1,B=void 0,N=$e(_),L;try{for(N.s();!(L=N.n()).done;)if(B=L.value,S.has(B)){I=!0;break}}catch(pe){N.e(pe)}finally{N.f()}if(!I)return!1}var V=v.length,O=y.length,ve=x(v),le=x(y);return ve?le?V===O:O>=V:le?V>=O:V===O}function Wp(v){return v.map(function(y){return no(y)?eo(y.referToSelf.callback):to(y)?Yi(y.referTo.references,y.referTo.callback):y})}function Zp(v,y,A){var F=[],S,_=$e(v),I;try{for(_.s();!(I=_.n()).done;){S=I.value;var B=A[S];if(typeof B!="number")throw new TypeError('No definition for referenced signature "'+S+'"');if(B=y[B],typeof B!="function")return!1;F.push(B)}}catch(N){_.e(N)}finally{_.f()}return F}function Xp(v,y,A){for(var F=Wp(v),S=new Array(F.length).fill(!1),_=!0;_;){_=!1;for(var I=!0,B=0;B<F.length;++B)if(!S[B]){var N=F[B];if(no(N))F[B]=N.referToSelf.callback(A),F[B].referToSelf=N.referToSelf,S[B]=!0,I=!1;else if(to(N)){var L=Zp(N.referTo.references,F,y);L?(F[B]=N.referTo.callback.apply(this,L),F[B].referTo=N.referTo,S[B]=!0,I=!1):_=!0}}if(I&&_)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return F}function Gp(v){var y=/\bthis(\(|\.signatures\b)/;Object.keys(v).forEach(function(A){var F=v[A];if(y.test(F.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Jp(v,y){if(o.createCount++,Object.keys(y).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&Gp(y);var A=[],F=[],S={},_=[],I,B=function(){if(!Object.prototype.hasOwnProperty.call(y,I))return"continue";var he=C(I);if(!he)return"continue";A.forEach(function(Mt){if(zp(Mt,he))throw new TypeError('Conflicting signatures "'+m(Mt)+'" and "'+m(he)+'".')}),A.push(he);var io=F.length;F.push(y[I]);var M1=he.map(E),On=void 0,Rn=$e(Hp(M1)),oo;try{for(Rn.s();!(oo=Rn.n()).done;){On=oo.value;var ao=m(On);_.push({params:On,name:ao,fn:io}),On.every(function(Mt){return!Mt.hasConversion})&&(S[ao]=io)}}catch(Mt){Rn.e(Mt)}finally{Rn.f()}};for(I in y)var N=B();_.sort(z);var L=Xp(F,S,Xt),V;for(V in S)Object.prototype.hasOwnProperty.call(S,V)&&(S[V]=L[S[V]]);for(var O=[],ve=new Map,le=0,pe=_;le<pe.length;le++)V=pe[le],ve.has(V.name)||(V.fn=L[V.fn],O.push(V),ve.set(V.name,V));for(var ie=O[0]&&O[0].params.length<=2&&!x(O[0].params),Ce=O[1]&&O[1].params.length<=2&&!x(O[1].params),se=O[2]&&O[2].params.length<=2&&!x(O[2].params),Ie=O[3]&&O[3].params.length<=2&&!x(O[3].params),me=O[4]&&O[4].params.length<=2&&!x(O[4].params),ye=O[5]&&O[5].params.length<=2&&!x(O[5].params),ht=ie&&Ce&&se&&Ie&&me&&ye,Fe=0;Fe<O.length;++Fe)O[Fe].test=P(O[Fe].params);for(var dt=ie?$(O[0].params[0]):Me,xn=Ce?$(O[1].params[0]):Me,Wt=se?$(O[2].params[0]):Me,r1=Ie?$(O[3].params[0]):Me,u1=me?$(O[4].params[0]):Me,i1=ye?$(O[5].params[0]):Me,o1=ie?$(O[0].params[1]):Me,a1=Ce?$(O[1].params[1]):Me,s1=se?$(O[2].params[1]):Me,c1=Ie?$(O[3].params[1]):Me,f1=me?$(O[4].params[1]):Me,l1=ye?$(O[5].params[1]):Me,Zt=0;Zt<O.length;++Zt)O[Zt].implementation=Vp(O[Zt].params,O[Zt].fn);var h1=ie?O[0].implementation:At,d1=Ce?O[1].implementation:At,p1=se?O[2].implementation:At,D1=Ie?O[3].implementation:At,g1=me?O[4].implementation:At,v1=ye?O[5].implementation:At,m1=ie?O[0].params.length:-1,y1=Ce?O[1].params.length:-1,E1=se?O[2].params.length:-1,A1=Ie?O[3].params.length:-1,C1=me?O[4].params.length:-1,F1=ye?O[5].params.length:-1,w1=ht?6:0,B1=O.length,b1=O.map(function(_e){return _e.test}),S1=O.map(function(_e){return _e.implementation}),_1=function(){for(var he=w1;he<B1;he++)if(b1[he](arguments))return S1[he].apply(this,arguments);return o.onMismatch(v,arguments,O)};function Xt(_e,he){return arguments.length===m1&&dt(_e)&&o1(he)?h1.apply(this,arguments):arguments.length===y1&&xn(_e)&&a1(he)?d1.apply(this,arguments):arguments.length===E1&&Wt(_e)&&s1(he)?p1.apply(this,arguments):arguments.length===A1&&r1(_e)&&c1(he)?D1.apply(this,arguments):arguments.length===C1&&u1(_e)&&f1(he)?g1.apply(this,arguments):arguments.length===F1&&i1(_e)&&l1(he)?v1.apply(this,arguments):_1.apply(this,arguments)}try{Object.defineProperty(Xt,"name",{value:v})}catch(_e){}return Xt.signatures=S,Xt._typedFunctionData={signatures:O,signatureMap:ve},Xt}function Ki(v,y,A){throw Q(v,y,A)}function Qi(v){return Wr(v,0,v.length-1)}function _t(v){return v[v.length-1]}function Wr(v,y,A){return Array.prototype.slice.call(v,y,A)}function Kp(v,y){for(var A=0;A<v.length;A++)if(y(v[A]))return v[A]}function Qp(v,y){return Array.prototype.concat.apply([],v.map(y))}function Yp(){var v=Qi(arguments).map(function(A){return m(C(A))}),y=_t(arguments);if(typeof y!="function")throw new TypeError("Callback function expected as last argument");return Yi(v,y)}function Yi(v,y){return{referTo:{references:v,callback:y}}}function eo(v){if(typeof v!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:v}}}function to(v){return v&&Et(v.referTo)==="object"&&Array.isArray(v.referTo.references)&&typeof v.referTo.callback=="function"}function no(v){return v&&Et(v.referToSelf)==="object"&&typeof v.referToSelf.callback=="function"}function ro(v,y){if(!v)return y;if(y&&y!==v){var A=new Error("Function names do not match (expected: "+v+", actual: "+y+")");throw A.data={actual:y,expected:v},A}return v}function e1(v){var y;for(var A in v)Object.prototype.hasOwnProperty.call(v,A)&&(h(v[A])||typeof v[A].signature=="string")&&(y=ro(y,v[A].name));return y}function t1(v,y){var A;for(A in y)if(Object.prototype.hasOwnProperty.call(y,A)){if(A in v&&y[A]!==v[A]){var F=new Error('Signature "'+A+'" is defined twice');throw F.data={signature:A,sourceFunction:y[A],destFunction:v[A]},F}v[A]=y[A]}}var n1=o;o=function(y){for(var A=typeof y=="string",F=A?1:0,S=A?y:"",_={},I=F;I<arguments.length;++I){var B=arguments[I],N={},L=void 0;if(typeof B=="function"?(L=B.name,typeof B.signature=="string"?N[B.signature]=B:h(B)&&(N=B.signatures)):e(B)&&(N=B,A||(L=e1(B))),Object.keys(N).length===0){var V=new TypeError("Argument to 'typed' at index "+I+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw V.data={index:I,argument:B},V}A||(S=ro(S,L)),t1(_,N)}return Jp(S||"",_)},o.create=ai,o.createCount=n1.createCount,o.onMismatch=Ki,o.throwMismatchError=Ki,o.createError=Q,o.clear=l,o.clearConversions=f,o.addTypes=s,o._findType=c,o.referTo=Yp,o.referToSelf=eo,o.convert=D,o.findSignature=d,o.find=p,o.isTypedFunction=h,o.warnAgainstDeprecatedThis=!0,o.addType=function(v,y){var A="any";y!==!1&&r.has("Object")&&(A="Object"),o.addTypes([v],A)};function uo(v){if(!v||typeof v.from!="string"||typeof v.to!="string"||typeof v.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(v.to===v.from)throw new SyntaxError('Illegal to define conversion from "'+v.from+'" to itself.')}return o.addConversion=function(v){uo(v);var y=c(v.to);if(y.conversionsTo.every(function(A){return A.from!==v.from}))y.conversionsTo.push({from:v.from,convert:v.convert,index:i++});else throw new Error('There is already a conversion from "'+v.from+'" to "'+y.name+'"')},o.addConversions=function(v){v.forEach(o.addConversion)},o.removeConversion=function(v){uo(v);var y=c(v.to),A=Kp(y.conversionsTo,function(S){return S.from===v.from});if(!A)throw new Error("Attempt to remove nonexistent conversion from "+v.from+" to "+v.to);if(A.convert!==v.convert)throw new Error("Conversion to remove does not match existing conversion");var F=y.conversionsTo.indexOf(A);y.conversionsTo.splice(F,1)},o.resolve=function(v,y){if(!h(v))throw new TypeError(oi);for(var A=v._typedFunctionData.signatures,F=0;F<A.length;++F)if(A[F].test(y))return A[F];return null},o}var si=ai();function He(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function xr(e,t,n){var r={2:"0b",8:"0o",16:"0x"},u=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!He(n))throw new Error("size must be an integer");if(e>$n(2,n-1)-1||e<-$n(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!He(e))throw new Error("Value must be an integer");e<0&&(e=e+$n(2,n)),i="i".concat(n)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(u).concat(e.toString(t)).concat(i)}function Or(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n="auto",r,u;if(t&&(t.notation&&(n=t.notation),ge(t)?r=t:ge(t.precision)&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return Lh(e,r);case"exponential":return ci(e,r);case"engineering":return Th(e,r);case"bin":return xr(e,2,u);case"oct":return xr(e,8,u);case"hex":return xr(e,16,u);case"auto":return jh(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function An(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],u=parseFloat(t[4]||"0"),i=r.indexOf(".");u+=i!==-1?i-1:r.length-1;var o=r.replace(".","").replace(/^0*/,function(c){return u-=c.length,""}).replace(/0*$/,"").split("").map(function(c){return parseInt(c)});return o.length===0&&(o.push(0),u++),{sign:n,coefficients:o,exponent:u}}function Th(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=Cn(n,t),u=r.exponent,i=r.coefficients,o=u%3===0?u:u<0?u-3-u%3:u-u%3;if(ge(t))for(;t>i.length||u-o+1>i.length;)i.push(0);else for(var c=Math.abs(u-o)-(i.length-1),s=0;s<c;s++)i.push(0);for(var l=Math.abs(u-o),f=1;l>0;)f++,l--;var a=i.slice(f).join(""),h=ge(t)&&a.length||a.match(/[1-9]/)?"."+a:"",d=i.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+o.toString();return r.sign+d}function Lh(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=typeof t=="number"?Cn(n,n.exponent+1+t):n,u=r.coefficients,i=r.exponent+1,o=i+(t||0);return u.length<o&&(u=u.concat(Ct(o-u.length))),i<0&&(u=Ct(-i+1).concat(u),i=1),i<u.length&&u.splice(i,0,i===0?"0.":"."),r.sign+u.join("")}function ci(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=t?Cn(n,t):n,u=r.coefficients,i=r.exponent;u.length<t&&(u=u.concat(Ct(t-u.length)));var o=u.shift();return r.sign+o+(u.length>0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function jh(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,u=n&&n.upperExp!==void 0?n.upperExp:5,i=An(e),o=t?Cn(i,t):i;if(o.exponent<r||o.exponent>=u)return ci(e,t);var c=o.coefficients,s=o.exponent;c.length<t&&(c=c.concat(Ct(t-c.length))),c=c.concat(Ct(s-c.length+1+(c.length<t?t-c.length:0))),c=Ct(-s).concat(c);var l=s>0?s:0;return l<c.length-1&&c.splice(l+1,0,"."),o.sign+c.join("")}function Cn(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t){var u=r.splice(t,r.length-t);if(u[0]>=5){var i=t-1;for(r[i]++;r[i]===10;)r.pop(),i===0&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function Ct(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function qh(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var kh=Number.EPSILON||2220446049250313e-31;function Vh(e,t,n){if(n==null)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<kh?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function Rr(e,t,n){var r=e.constructor,u=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!He(n))throw new Error("size must be an integer");if(e.greaterThan(u.pow(n-1).sub(1))||e.lessThan(u.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(u.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function Uh(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto",r,u;if(t!==void 0&&(t.notation&&(n=t.notation),typeof t=="number"?r=t:t.precision&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return zh(e,r);case"exponential":return fi(e,r);case"engineering":return Hh(e,r);case"bin":return Rr(e,2,u);case"oct":return Rr(e,8,u);case"hex":return Rr(e,16,u);case"auto":{var i=t&&t.lowerExp!==void 0?t.lowerExp:-3,o=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var c,s=e.toSignificantDigits(r),l=s.e;return l>=i&&l<o?c=s.toFixed():c=fi(e,r),c.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],a=arguments[4];return f!=="."?f+a:a})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Hh(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,u=e.mul(Math.pow(10,-r)),i=u.toPrecision(t);return i.indexOf("e")!==-1&&(i=u.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function fi(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function zh(e,t){return e.toFixed(t)}function lt(e,t){var n=Wh(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Wh(e,t){if(typeof e=="number")return Or(e,t);if(nt(e))return Uh(e,t);if(Zh(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return li(e,t);if(yn(e))return'"'+e+'"';if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(r=>'"'+r+'": '+lt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function li(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=li(e[u],t);return n+="]",n}else return lt(e,t)}function Zh(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function ae(e,t,n){if(!(this instanceof ae))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}ae.prototype=new RangeError,ae.prototype.constructor=RangeError,ae.prototype.name="DimensionError",ae.prototype.isDimensionError=!0;function Ft(e,t,n){if(!(this instanceof Ft))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Ft.prototype=new RangeError,Ft.prototype.constructor=RangeError,Ft.prototype.name="IndexError",Ft.prototype.isIndexError=!0;function $r(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function hi(e,t,n){var r,u=e.length;if(u!==t[n])throw new ae(u,t[n]);if(n<t.length-1){var i=n+1;for(r=0;r<u;r++){var o=e[r];if(!Array.isArray(o))throw new ae(t.length-1,t.length,"<");hi(e[r],t,i)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new ae(t.length+1,t.length,">")}function di(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new ae(e.length,0)}else hi(e,t,0)}function Ne(e,t){if(!ge(e)||!He(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Ft(e,t)}function pi(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(u){if(!ge(u)||!He(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+lt(t)+")")});var r=n!==void 0?n:0;return Pr(e,t,0,r),e}function Pr(e,t,n,r){var u,i,o=e.length,c=t[n],s=Math.min(o,c);if(e.length=c,n<t.length-1){var l=n+1;for(u=0;u<s;u++)i=e[u],Array.isArray(i)||(i=[i],e[u]=i),Pr(i,t,l,r);for(u=s;u<c;u++)i=[],e[u]=i,Pr(i,t,l,r)}else{for(u=0;u<s;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=s;u<c;u++)e[u]=r}}function Xh(e,t){var n=Kh(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new ae(0,r,"!=");t=Di(t,r);var u=gi(t);if(r!==u)throw new ae(u,r,"!=");try{return Gh(n,t)}catch(i){throw i instanceof ae?new ae(u,r,"!="):i}}function Di(e,t){var n=gi(e),r=e.slice(),u=-1,i=e.indexOf(u),o=e.indexOf(u,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var c=i>=0,s=t%n===0;if(c)if(s)r[i]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function gi(e){return e.reduce((t,n)=>t*n,1)}function Gh(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var i=t[u];r=[];for(var o=n.length/i,c=0;c<o;c++)r.push(n.slice(c*i,(c+1)*i));n=r}return n}function Jh(e,t,n,r){var u=r||$r(e);if(n)for(var i=0;i<n;i++)e=[e],u.unshift(1);for(e=vi(e,t,0);u.length<t;)u.push(1);return e}function vi(e,t,n){var r,u;if(Array.isArray(e)){var i=n+1;for(r=0,u=e.length;r<u;r++)e[r]=vi(e[r],t,i)}else for(var o=n;o<t;o++)e=[e];return e}function Kh(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function n(r){Array.isArray(r)?r.forEach(n):t.push(r)}),t}function Tr(e,t){for(var n,r=0,u=0;u<e.length;u++){var i=e[u],o=Array.isArray(i);if(u===0&&o&&(r=i.length),o&&i.length!==r)return;var c=o?Tr(i,t):t(i);if(n===void 0)n=c;else if(n!==c)return"mixed"}return n}function Ee(e,t,n,r){function u(i){var o=Oh(i,t.map(ed));return Qh(e,t,i),n(o)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function Qh(e,t,n){var r=t.filter(i=>!Yh(i)).every(i=>n[i]!==void 0);if(!r){var u=t.filter(i=>n[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(u.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function Yh(e){return e&&e[0]==="?"}function ed(e){return e&&e[0]==="?"?e.slice(1):e}function td(e,t){if(yi(e)&&mi(e,t))return e[t];throw typeof e[t]=="function"&&ud(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function nd(e,t,n){if(yi(e)&&mi(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function rd(e,t){return t in e}function mi(e,t){return!e||typeof e!="object"?!1:En(id,t)?!0:!(t in Object.prototype||t in Function.prototype)}function ud(e,t){return e==null||typeof e[t]!="function"||En(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:En(od,t)?!0:!(t in Object.prototype||t in Function.prototype)}function yi(e){return typeof e=="object"&&e&&e.constructor===Object}var id={length:!0,name:!0},od={toString:!0,valueOf:!0,toLocaleString:!0};class ad{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return td(this.wrappedObject,t)}set(t,n){return nd(this.wrappedObject,t,n),this}has(t){return rd(this.wrappedObject,t)}}function sd(e){return e?e instanceof Map||e instanceof ad||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Ei=function(){return Ei=si.create,si},cd=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],fd=Ee("typed",cd,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:i}=t,o=Ei();return o.clear(),o.addTypes([{name:"number",test:ge},{name:"Complex",test:Yu},{name:"BigNumber",test:nt},{name:"Fraction",test:ei},{name:"Unit",test:ti},{name:"identifier",test:c=>yn&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(c)},{name:"string",test:yn},{name:"Chain",test:Ih},{name:"Array",test:Se},{name:"Matrix",test:Ut},{name:"DenseMatrix",test:rh},{name:"SparseMatrix",test:uh},{name:"Range",test:ih},{name:"Index",test:ni},{name:"boolean",test:oh},{name:"ResultSet",test:ah},{name:"Help",test:sh},{name:"function",test:ch},{name:"Date",test:fh},{name:"RegExp",test:lh},{name:"null",test:dh},{name:"undefined",test:ph},{name:"AccessorNode",test:Dh},{name:"ArrayNode",test:gh},{name:"AssignmentNode",test:vh},{name:"BlockNode",test:mh},{name:"ConditionalNode",test:yh},{name:"ConstantNode",test:Eh},{name:"FunctionNode",test:Ch},{name:"FunctionAssignmentNode",test:Ah},{name:"IndexNode",test:Fh},{name:"Node",test:wh},{name:"ObjectNode",test:Bh},{name:"OperatorNode",test:bh},{name:"ParenthesisNode",test:Sh},{name:"RangeNode",test:_h},{name:"RelationalNode",test:Mh},{name:"SymbolNode",test:Nh},{name:"Map",test:sd},{name:"Object",test:hh}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(s){if(n||Lr(s),qh(s)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+s+"). Use function bignumber(x) to convert to BigNumber.");return new n(s)}},{from:"number",to:"Complex",convert:function(s){return r||Fn(s),new r(s,0)}},{from:"BigNumber",to:"Complex",convert:function(s){return r||Fn(s),new r(s.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(s){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(s){return r||Fn(s),new r(s.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(s){i||jr(s);var l=new i(s);if(l.valueOf()!==s)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+s+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(s){var l=Number(s);if(isNaN(l))throw new Error('Cannot convert "'+s+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(s){n||Lr(s);try{return new n(s)}catch(l){throw new Error('Cannot convert "'+s+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(s){i||jr(s);try{return new i(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(s){r||Fn(s);try{return new r(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Complex')}}},{from:"boolean",to:"number",convert:function(s){return+s}},{from:"boolean",to:"BigNumber",convert:function(s){return n||Lr(s),new n(+s)}},{from:"boolean",to:"Fraction",convert:function(s){return i||jr(s),new i(+s)}},{from:"boolean",to:"string",convert:function(s){return String(s)}},{from:"Array",to:"Matrix",convert:function(s){return u||ld(),new u(s)}},{from:"Matrix",to:"Array",convert:function(s){return s.valueOf()}}]),o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&Mr(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&Mr(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o});function Lr(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Fn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function ld(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function jr(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
11
- * decimal.js v10.4.2
9
+ `);return Object.freeze(Qu)};_r(ri,Qu,{MATRIX_OPTIONS:Th,NUMBER_OPTIONS:Lh});function $e(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=jh(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){o=!0,c=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function jh(e,t){if(!!e){if(typeof e=="string")return ui(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ui(e,t)}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Et(e){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(e)}function ii(){return!0}function Me(){return!1}function At(){}var oi="Argument is not a typed-function.";function ai(){function e(m){return Et(m)==="object"&&m!==null&&m.constructor===Object}var t=[{name:"number",test:function(y){return typeof y=="number"}},{name:"string",test:function(y){return typeof y=="string"}},{name:"boolean",test:function(y){return typeof y=="boolean"}},{name:"Function",test:function(y){return typeof y=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(y){return y instanceof Date}},{name:"RegExp",test:function(y){return y instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(y){return y===null}},{name:"undefined",test:function(y){return y===void 0}}],n={name:"any",test:ii,isAny:!0},r,u,i=0,o={createCount:0};function c(m){var y=r.get(m);if(y)return y;var A='Unknown type "'+m+'"',F=m.toLowerCase(),_,N=$e(u),x;try{for(N.s();!(x=N.n()).done;)if(_=x.value,_.toLowerCase()===F){A+='. Did you mean "'+_+'" ?';break}}catch(B){N.e(B)}finally{N.f()}throw new TypeError(A)}function s(m){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",A=y?c(y).index:u.length,F=[],_=0;_<m.length;++_){if(!m[_]||typeof m[_].name!="string"||typeof m[_].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var N=m[_].name;if(r.has(N))throw new TypeError('Duplicate type name "'+N+'"');F.push(N),r.set(N,{name:N,test:m[_].test,isAny:m[_].isAny,index:A+_,conversionsTo:[]})}var x=u.slice(A);u=u.slice(0,A).concat(F).concat(x);for(var B=A+F.length;B<u.length;++B)r.get(u[B]).index=B}function l(){r=new Map,u=[],i=0,s([n],!1)}l(),s(t);function f(){var m,y=$e(u),A;try{for(y.s();!(A=y.n()).done;)m=A.value,r.get(m).conversionsTo=[]}catch(F){y.e(F)}finally{y.f()}i=0}function a(m){var y=u.filter(function(A){var F=r.get(A);return!F.isAny&&F.test(m)});return y.length?y:["any"]}function h(m){return m&&typeof m=="function"&&"_typedFunctionData"in m}function d(m,y,A){if(!h(m))throw new TypeError(oi);var F=A&&A.exact,_=Array.isArray(y)?y.join(","):y,N=C(_),x=v(N);if(!F||x in m.signatures){var B=m._typedFunctionData.signatureMap.get(x);if(B)return B}var I=N.length,L;if(F){L=[];var V;for(V in m.signatures)L.push(m._typedFunctionData.signatureMap.get(V))}else L=m._typedFunctionData.signatures;for(var R=0;R<I;++R){var ve=N[R],le=[],pe=void 0,ie=$e(L),Ce;try{for(ie.s();!(Ce=ie.n()).done;){pe=Ce.value;var se=S(pe.params,R);if(!(!se||ve.restParam&&!se.restParam)){if(!se.hasAny){var Ie=function(){var Fe=b(se);if(ve.types.some(function(dt){return!Fe.has(dt.name)}))return"continue"}();if(Ie==="continue")continue}le.push(pe)}}}catch(Fe){ie.e(Fe)}finally{ie.f()}if(L=le,L.length===0)break}var me,ye=$e(L),ht;try{for(ye.s();!(ht=ye.n()).done;)if(me=ht.value,me.params.length<=I)return me}catch(Fe){ye.e(Fe)}finally{ye.f()}throw new TypeError("Signature not found (signature: "+(m.name||"unnamed")+"("+v(N,", ")+"))")}function p(m,y,A){return d(m,y,A).implementation}function D(m,y){var A=c(y);if(A.test(m))return m;var F=A.conversionsTo;if(F.length===0)throw new Error("There are no conversions to "+y+" defined.");for(var _=0;_<F.length;_++){var N=c(F[_].from);if(N.test(m))return F[_].convert(m)}throw new Error("Cannot convert "+m+" to "+y)}function v(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return m.map(function(A){return A.name}).join(y)}function g(m){var y=m.indexOf("...")===0,A=y?m.length>3?m.slice(3):"any":m,F=A.split("|").map(function(B){return c(B.trim())}),_=!1,N=y?"...":"",x=F.map(function(B){return _=B.isAny||_,N+=B.name+"|",{name:B.name,typeIndex:B.index,test:B.test,isAny:B.isAny,conversion:null,conversionIndex:-1}});return{types:x,name:N.slice(0,-1),hasAny:_,hasConversion:!1,restParam:y}}function E(m){var y=m.types.map(function(x){return x.name}),A=Hp(y),F=m.hasAny,_=m.name,N=A.map(function(x){var B=c(x.from);return F=B.isAny||F,_+="|"+x.from,{name:x.from,typeIndex:B.index,test:B.test,isAny:B.isAny,conversion:x,conversionIndex:x.index}});return{types:m.types.concat(N),name:_,hasAny:F,hasConversion:N.length>0,restParam:m.restParam}}function b(m){return m.typeSet||(m.typeSet=new Set,m.types.forEach(function(y){return m.typeSet.add(y.name)})),m.typeSet}function C(m){var y=[];if(typeof m!="string")throw new TypeError("Signatures must be strings");var A=m.trim();if(A==="")return y;for(var F=A.split(","),_=0;_<F.length;++_){var N=g(F[_].trim());if(N.restParam&&_!==F.length-1)throw new SyntaxError('Unexpected rest parameter "'+F[_]+'": only allowed for the last parameter');if(N.types.length===0)return null;y.push(N)}return y}function M(m){var y=_t(m);return y?y.restParam:!1}function O(m){if(!m||m.types.length===0)return ii;if(m.types.length===1)return c(m.types[0].name).test;if(m.types.length===2){var y=c(m.types[0].name).test,A=c(m.types[1].name).test;return function(N){return y(N)||A(N)}}else{var F=m.types.map(function(_){return c(_.name).test});return function(N){for(var x=0;x<F.length;x++)if(F[x](N))return!0;return!1}}}function P(m){var y,A,F;if(M(m)){y=Qi(m).map(O);var _=y.length,N=O(_t(m)),x=function(I){for(var L=_;L<I.length;L++)if(!N(I[L]))return!1;return!0};return function(I){for(var L=0;L<y.length;L++)if(!y[L](I[L]))return!1;return x(I)&&I.length>=_+1}}else return m.length===0?function(I){return I.length===0}:m.length===1?(A=O(m[0]),function(I){return A(I[0])&&I.length===1}):m.length===2?(A=O(m[0]),F=O(m[1]),function(I){return A(I[0])&&F(I[1])&&I.length===2}):(y=m.map(O),function(I){for(var L=0;L<y.length;L++)if(!y[L](I[L]))return!1;return I.length===y.length})}function S(m,y){return y<m.length?m[y]:M(m)?_t(m):null}function $(m,y){var A=S(m,y);return A?b(A):new Set}function W(m){return m.conversion===null||m.conversion===void 0}function q(m,y){var A=new Set;return m.forEach(function(F){var _=$(F.params,y),N,x=$e(_),B;try{for(x.s();!(B=x.n()).done;)N=B.value,A.add(N)}catch(I){x.e(I)}finally{x.f()}}),A.has("any")?["any"]:Array.from(A)}function K(m,y,A){var F,_,N=m||"unnamed",x=A,B,I=function(){var ie=[];if(x.forEach(function(se){var Ie=S(se.params,B),me=O(Ie);(B<se.params.length||M(se.params))&&me(y[B])&&ie.push(se)}),ie.length===0){if(_=q(x,B),_.length>0){var Ce=a(y[B]);return F=new TypeError("Unexpected type of argument in function "+N+" (expected: "+_.join(" or ")+", actual: "+Ce.join(" | ")+", index: "+B+")"),F.data={category:"wrongType",fn:N,index:B,actual:Ce,expected:_},{v:F}}}else x=ie};for(B=0;B<y.length;B++){var L=I();if(Et(L)==="object")return L.v}var V=x.map(function(pe){return M(pe.params)?1/0:pe.params.length});if(y.length<Math.min.apply(null,V))return _=q(x,B),F=new TypeError("Too few arguments in function "+N+" (expected: "+_.join(" or ")+", index: "+y.length+")"),F.data={category:"tooFewArgs",fn:N,index:y.length,expected:_},F;var R=Math.max.apply(null,V);if(y.length>R)return F=new TypeError("Too many arguments in function "+N+" (expected: "+R+", actual: "+y.length+")"),F.data={category:"tooManyArgs",fn:N,index:y.length,expectedLength:R},F;for(var ve=[],le=0;le<y.length;++le)ve.push(a(y[le]).join("|"));return F=new TypeError('Arguments of type "'+ve.join(", ")+'" do not match any of the defined signatures of function '+N+"."),F.data={category:"mismatch",actual:ve},F}function J(m){for(var y=u.length+1,A=0;A<m.types.length;A++)W(m.types[A])&&(y=Math.min(y,m.types[A].typeIndex));return y}function ee(m){for(var y=i+1,A=0;A<m.types.length;A++)W(m.types[A])||(y=Math.min(y,m.types[A].conversionIndex));return y}function Q(m,y){if(m.hasAny){if(!y.hasAny)return 1}else if(y.hasAny)return-1;if(m.restParam){if(!y.restParam)return 1}else if(y.restParam)return-1;if(m.hasConversion){if(!y.hasConversion)return 1}else if(y.hasConversion)return-1;var A=J(m)-J(y);if(A<0)return-1;if(A>0)return 1;var F=ee(m)-ee(y);return F<0?-1:F>0?1:0}function z(m,y){var A=m.params,F=y.params,_=_t(A),N=_t(F),x=M(A),B=M(F);if(x&&_.hasAny){if(!B||!N.hasAny)return 1}else if(B&&N.hasAny)return-1;var I=0,L=0,V,R=$e(A),ve;try{for(R.s();!(ve=R.n()).done;)V=ve.value,V.hasAny&&++I,V.hasConversion&&++L}catch(Wt){R.e(Wt)}finally{R.f()}var le=0,pe=0,ie=$e(F),Ce;try{for(ie.s();!(Ce=ie.n()).done;)V=Ce.value,V.hasAny&&++le,V.hasConversion&&++pe}catch(Wt){ie.e(Wt)}finally{ie.f()}if(I!==le)return I-le;if(x&&_.hasConversion){if(!B||!N.hasConversion)return 1}else if(B&&N.hasConversion)return-1;if(L!==pe)return L-pe;if(x){if(!B)return 1}else if(B)return-1;var se=(A.length-F.length)*(x?-1:1);if(se!==0)return se;for(var Ie=[],me=0,ye=0;ye<A.length;++ye){var ht=Q(A[ye],F[ye]);Ie.push(ht),me+=ht}if(me!==0)return me;for(var Fe,dt=0,xn=Ie;dt<xn.length;dt++)if(Fe=xn[dt],Fe!==0)return Fe;return 0}function Hp(m){if(m.length===0)return[];var y=m.map(c);m.length>1&&y.sort(function(I,L){return I.index-L.index});var A=y[0].conversionsTo;if(m.length===1)return A;A=A.concat([]);for(var F=new Set(m),_=1;_<y.length;++_){var N=void 0,x=$e(y[_].conversionsTo),B;try{for(x.s();!(B=x.n()).done;)N=B.value,F.has(N.from)||(A.push(N),F.add(N.from))}catch(I){x.e(I)}finally{x.f()}}return A}function zp(m,y){var A=y;if(m.some(function(B){return B.hasConversion})){var F=M(m),_=m.map(Wp);A=function(){for(var I=[],L=F?arguments.length-1:arguments.length,V=0;V<L;V++)I[V]=_[V](arguments[V]);return F&&(I[L]=arguments[L].map(_[L])),y.apply(this,I)}}var N=A;if(M(m)){var x=m.length-1;N=function(){return A.apply(this,Wr(arguments,0,x).concat([Wr(arguments,x)]))}}return N}function Wp(m){var y,A,F,_,N=[],x=[];switch(m.types.forEach(function(B){B.conversion&&(N.push(c(B.conversion.from).test),x.push(B.conversion.convert))}),x.length){case 0:return function(I){return I};case 1:return y=N[0],F=x[0],function(I){return y(I)?F(I):I};case 2:return y=N[0],A=N[1],F=x[0],_=x[1],function(I){return y(I)?F(I):A(I)?_(I):I};default:return function(I){for(var L=0;L<x.length;L++)if(N[L](I))return x[L](I);return I}}}function Zp(m){function y(A,F,_){if(F<A.length){var N=A[F],x=[];if(N.restParam){var B=N.types.filter(W);B.length<N.types.length&&x.push({types:B,name:"..."+B.map(function(I){return I.name}).join("|"),hasAny:B.some(function(I){return I.isAny}),hasConversion:!1,restParam:!0}),x.push(N)}else x=N.types.map(function(I){return{types:[I],name:I.name,hasAny:I.isAny,hasConversion:I.conversion,restParam:!1}});return t1(x,function(I){return y(A,F+1,_.concat([I]))})}else return[_]}return y(m,0,[])}function Xp(m,y){for(var A=Math.max(m.length,y.length),F=0;F<A;F++){var _=$(m,F),N=$(y,F),x=!1,B=void 0,I=$e(N),L;try{for(I.s();!(L=I.n()).done;)if(B=L.value,_.has(B)){x=!0;break}}catch(pe){I.e(pe)}finally{I.f()}if(!x)return!1}var V=m.length,R=y.length,ve=M(m),le=M(y);return ve?le?V===R:R>=V:le?V>=R:V===R}function Gp(m){return m.map(function(y){return no(y)?eo(y.referToSelf.callback):to(y)?Yi(y.referTo.references,y.referTo.callback):y})}function Jp(m,y,A){var F=[],_,N=$e(m),x;try{for(N.s();!(x=N.n()).done;){_=x.value;var B=A[_];if(typeof B!="number")throw new TypeError('No definition for referenced signature "'+_+'"');if(B=y[B],typeof B!="function")return!1;F.push(B)}}catch(I){N.e(I)}finally{N.f()}return F}function Kp(m,y,A){for(var F=Gp(m),_=new Array(F.length).fill(!1),N=!0;N;){N=!1;for(var x=!0,B=0;B<F.length;++B)if(!_[B]){var I=F[B];if(no(I))F[B]=I.referToSelf.callback(A),F[B].referToSelf=I.referToSelf,_[B]=!0,x=!1;else if(to(I)){var L=Jp(I.referTo.references,F,y);L?(F[B]=I.referTo.callback.apply(this,L),F[B].referTo=I.referTo,_[B]=!0,x=!1):N=!0}}if(x&&N)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return F}function Qp(m){var y=/\bthis(\(|\.signatures\b)/;Object.keys(m).forEach(function(A){var F=m[A];if(y.test(F.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Yp(m,y){if(o.createCount++,Object.keys(y).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&Qp(y);var A=[],F=[],_={},N=[],x,B=function(){if(!Object.prototype.hasOwnProperty.call(y,x))return"continue";var he=C(x);if(!he)return"continue";A.forEach(function(Mt){if(Xp(Mt,he))throw new TypeError('Conflicting signatures "'+v(Mt)+'" and "'+v(he)+'".')}),A.push(he);var io=F.length;F.push(y[x]);var x1=he.map(E),On=void 0,Rn=$e(Zp(x1)),oo;try{for(Rn.s();!(oo=Rn.n()).done;){On=oo.value;var ao=v(On);N.push({params:On,name:ao,fn:io}),On.every(function(Mt){return!Mt.hasConversion})&&(_[ao]=io)}}catch(Mt){Rn.e(Mt)}finally{Rn.f()}};for(x in y)var I=B();N.sort(z);var L=Kp(F,_,Xt),V;for(V in _)Object.prototype.hasOwnProperty.call(_,V)&&(_[V]=L[_[V]]);for(var R=[],ve=new Map,le=0,pe=N;le<pe.length;le++)V=pe[le],ve.has(V.name)||(V.fn=L[V.fn],R.push(V),ve.set(V.name,V));for(var ie=R[0]&&R[0].params.length<=2&&!M(R[0].params),Ce=R[1]&&R[1].params.length<=2&&!M(R[1].params),se=R[2]&&R[2].params.length<=2&&!M(R[2].params),Ie=R[3]&&R[3].params.length<=2&&!M(R[3].params),me=R[4]&&R[4].params.length<=2&&!M(R[4].params),ye=R[5]&&R[5].params.length<=2&&!M(R[5].params),ht=ie&&Ce&&se&&Ie&&me&&ye,Fe=0;Fe<R.length;++Fe)R[Fe].test=P(R[Fe].params);for(var dt=ie?O(R[0].params[0]):Me,xn=Ce?O(R[1].params[0]):Me,Wt=se?O(R[2].params[0]):Me,o1=Ie?O(R[3].params[0]):Me,a1=me?O(R[4].params[0]):Me,s1=ye?O(R[5].params[0]):Me,c1=ie?O(R[0].params[1]):Me,f1=Ce?O(R[1].params[1]):Me,l1=se?O(R[2].params[1]):Me,h1=Ie?O(R[3].params[1]):Me,d1=me?O(R[4].params[1]):Me,p1=ye?O(R[5].params[1]):Me,Zt=0;Zt<R.length;++Zt)R[Zt].implementation=zp(R[Zt].params,R[Zt].fn);var D1=ie?R[0].implementation:At,g1=Ce?R[1].implementation:At,v1=se?R[2].implementation:At,m1=Ie?R[3].implementation:At,y1=me?R[4].implementation:At,E1=ye?R[5].implementation:At,A1=ie?R[0].params.length:-1,C1=Ce?R[1].params.length:-1,F1=se?R[2].params.length:-1,w1=Ie?R[3].params.length:-1,B1=me?R[4].params.length:-1,b1=ye?R[5].params.length:-1,S1=ht?6:0,_1=R.length,M1=R.map(function(_e){return _e.test}),N1=R.map(function(_e){return _e.implementation}),I1=function(){for(var he=S1;he<_1;he++)if(M1[he](arguments))return N1[he].apply(this,arguments);return o.onMismatch(m,arguments,R)};function Xt(_e,he){return arguments.length===A1&&dt(_e)&&c1(he)?D1.apply(this,arguments):arguments.length===C1&&xn(_e)&&f1(he)?g1.apply(this,arguments):arguments.length===F1&&Wt(_e)&&l1(he)?v1.apply(this,arguments):arguments.length===w1&&o1(_e)&&h1(he)?m1.apply(this,arguments):arguments.length===B1&&a1(_e)&&d1(he)?y1.apply(this,arguments):arguments.length===b1&&s1(_e)&&p1(he)?E1.apply(this,arguments):I1.apply(this,arguments)}try{Object.defineProperty(Xt,"name",{value:m})}catch(_e){}return Xt.signatures=_,Xt._typedFunctionData={signatures:R,signatureMap:ve},Xt}function Ki(m,y,A){throw K(m,y,A)}function Qi(m){return Wr(m,0,m.length-1)}function _t(m){return m[m.length-1]}function Wr(m,y,A){return Array.prototype.slice.call(m,y,A)}function e1(m,y){for(var A=0;A<m.length;A++)if(y(m[A]))return m[A]}function t1(m,y){return Array.prototype.concat.apply([],m.map(y))}function n1(){var m=Qi(arguments).map(function(A){return v(C(A))}),y=_t(arguments);if(typeof y!="function")throw new TypeError("Callback function expected as last argument");return Yi(m,y)}function Yi(m,y){return{referTo:{references:m,callback:y}}}function eo(m){if(typeof m!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:m}}}function to(m){return m&&Et(m.referTo)==="object"&&Array.isArray(m.referTo.references)&&typeof m.referTo.callback=="function"}function no(m){return m&&Et(m.referToSelf)==="object"&&typeof m.referToSelf.callback=="function"}function ro(m,y){if(!m)return y;if(y&&y!==m){var A=new Error("Function names do not match (expected: "+m+", actual: "+y+")");throw A.data={actual:y,expected:m},A}return m}function r1(m){var y;for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(h(m[A])||typeof m[A].signature=="string")&&(y=ro(y,m[A].name));return y}function u1(m,y){var A;for(A in y)if(Object.prototype.hasOwnProperty.call(y,A)){if(A in m&&y[A]!==m[A]){var F=new Error('Signature "'+A+'" is defined twice');throw F.data={signature:A,sourceFunction:y[A],destFunction:m[A]},F}m[A]=y[A]}}var i1=o;o=function(y){for(var A=typeof y=="string",F=A?1:0,_=A?y:"",N={},x=F;x<arguments.length;++x){var B=arguments[x],I={},L=void 0;if(typeof B=="function"?(L=B.name,typeof B.signature=="string"?I[B.signature]=B:h(B)&&(I=B.signatures)):e(B)&&(I=B,A||(L=r1(B))),Object.keys(I).length===0){var V=new TypeError("Argument to 'typed' at index "+x+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw V.data={index:x,argument:B},V}A||(_=ro(_,L)),u1(N,I)}return Yp(_||"",N)},o.create=ai,o.createCount=i1.createCount,o.onMismatch=Ki,o.throwMismatchError=Ki,o.createError=K,o.clear=l,o.clearConversions=f,o.addTypes=s,o._findType=c,o.referTo=n1,o.referToSelf=eo,o.convert=D,o.findSignature=d,o.find=p,o.isTypedFunction=h,o.warnAgainstDeprecatedThis=!0,o.addType=function(m,y){var A="any";y!==!1&&r.has("Object")&&(A="Object"),o.addTypes([m],A)};function uo(m){if(!m||typeof m.from!="string"||typeof m.to!="string"||typeof m.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(m.to===m.from)throw new SyntaxError('Illegal to define conversion from "'+m.from+'" to itself.')}return o.addConversion=function(m){uo(m);var y=c(m.to);if(y.conversionsTo.every(function(A){return A.from!==m.from}))y.conversionsTo.push({from:m.from,convert:m.convert,index:i++});else throw new Error('There is already a conversion from "'+m.from+'" to "'+y.name+'"')},o.addConversions=function(m){m.forEach(o.addConversion)},o.removeConversion=function(m){uo(m);var y=c(m.to),A=e1(y.conversionsTo,function(_){return _.from===m.from});if(!A)throw new Error("Attempt to remove nonexistent conversion from "+m.from+" to "+m.to);if(A.convert!==m.convert)throw new Error("Conversion to remove does not match existing conversion");var F=y.conversionsTo.indexOf(A);y.conversionsTo.splice(F,1)},o.resolve=function(m,y){if(!h(m))throw new TypeError(oi);for(var A=m._typedFunctionData.signatures,F=0;F<A.length;++F)if(A[F].test(y))return A[F];return null},o}var si=ai();function Ue(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function xr(e,t,n){var r={2:"0b",8:"0o",16:"0x"},u=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!Ue(n))throw new Error("size must be an integer");if(e>$n(2,n-1)-1||e<-$n(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!Ue(e))throw new Error("Value must be an integer");e<0&&(e=e+$n(2,n)),i="i".concat(n)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(u).concat(e.toString(t)).concat(i)}function Or(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n="auto",r,u;if(t&&(t.notation&&(n=t.notation),ge(t)?r=t:ge(t.precision)&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return qh(e,r);case"exponential":return ci(e,r);case"engineering":return kh(e,r);case"bin":return xr(e,2,u);case"oct":return xr(e,8,u);case"hex":return xr(e,16,u);case"auto":return Vh(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function An(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],u=parseFloat(t[4]||"0"),i=r.indexOf(".");u+=i!==-1?i-1:r.length-1;var o=r.replace(".","").replace(/^0*/,function(c){return u-=c.length,""}).replace(/0*$/,"").split("").map(function(c){return parseInt(c)});return o.length===0&&(o.push(0),u++),{sign:n,coefficients:o,exponent:u}}function kh(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=Cn(n,t),u=r.exponent,i=r.coefficients,o=u%3===0?u:u<0?u-3-u%3:u-u%3;if(ge(t))for(;t>i.length||u-o+1>i.length;)i.push(0);else for(var c=Math.abs(u-o)-(i.length-1),s=0;s<c;s++)i.push(0);for(var l=Math.abs(u-o),f=1;l>0;)f++,l--;var a=i.slice(f).join(""),h=ge(t)&&a.length||a.match(/[1-9]/)?"."+a:"",d=i.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+o.toString();return r.sign+d}function qh(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=typeof t=="number"?Cn(n,n.exponent+1+t):n,u=r.coefficients,i=r.exponent+1,o=i+(t||0);return u.length<o&&(u=u.concat(Ct(o-u.length))),i<0&&(u=Ct(-i+1).concat(u),i=1),i<u.length&&u.splice(i,0,i===0?"0.":"."),r.sign+u.join("")}function ci(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=An(e),r=t?Cn(n,t):n,u=r.coefficients,i=r.exponent;u.length<t&&(u=u.concat(Ct(t-u.length)));var o=u.shift();return r.sign+o+(u.length>0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function Vh(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,u=n&&n.upperExp!==void 0?n.upperExp:5,i=An(e),o=t?Cn(i,t):i;if(o.exponent<r||o.exponent>=u)return ci(e,t);var c=o.coefficients,s=o.exponent;c.length<t&&(c=c.concat(Ct(t-c.length))),c=c.concat(Ct(s-c.length+1+(c.length<t?t-c.length:0))),c=Ct(-s).concat(c);var l=s>0?s:0;return l<c.length-1&&c.splice(l+1,0,"."),o.sign+c.join("")}function Cn(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t){var u=r.splice(t,r.length-t);if(u[0]>=5){var i=t-1;for(r[i]++;r[i]===10;)r.pop(),i===0&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function Ct(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function Uh(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var Hh=Number.EPSILON||2220446049250313e-31;function zh(e,t,n){if(n==null)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<Hh?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function Rr(e,t,n){var r=e.constructor,u=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!Ue(n))throw new Error("size must be an integer");if(e.greaterThan(u.pow(n-1).sub(1))||e.lessThan(u.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(u.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function Wh(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto",r,u;if(t!==void 0&&(t.notation&&(n=t.notation),typeof t=="number"?r=t:t.precision&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return Xh(e,r);case"exponential":return fi(e,r);case"engineering":return Zh(e,r);case"bin":return Rr(e,2,u);case"oct":return Rr(e,8,u);case"hex":return Rr(e,16,u);case"auto":{var i=t&&t.lowerExp!==void 0?t.lowerExp:-3,o=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var c,s=e.toSignificantDigits(r),l=s.e;return l>=i&&l<o?c=s.toFixed():c=fi(e,r),c.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],a=arguments[4];return f!=="."?f+a:a})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Zh(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,u=e.mul(Math.pow(10,-r)),i=u.toPrecision(t);return i.indexOf("e")!==-1&&(i=u.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function fi(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function Xh(e,t){return e.toFixed(t)}function lt(e,t){var n=Gh(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Gh(e,t){if(typeof e=="number")return Or(e,t);if(nt(e))return Wh(e,t);if(Jh(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return li(e,t);if(yn(e))return'"'+e+'"';if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(r=>'"'+r+'": '+lt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function li(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=li(e[u],t);return n+="]",n}else return lt(e,t)}function Jh(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function ae(e,t,n){if(!(this instanceof ae))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}ae.prototype=new RangeError,ae.prototype.constructor=RangeError,ae.prototype.name="DimensionError",ae.prototype.isDimensionError=!0;function Ft(e,t,n){if(!(this instanceof Ft))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Ft.prototype=new RangeError,Ft.prototype.constructor=RangeError,Ft.prototype.name="IndexError",Ft.prototype.isIndexError=!0;function $r(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function hi(e,t,n){var r,u=e.length;if(u!==t[n])throw new ae(u,t[n]);if(n<t.length-1){var i=n+1;for(r=0;r<u;r++){var o=e[r];if(!Array.isArray(o))throw new ae(t.length-1,t.length,"<");hi(e[r],t,i)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new ae(t.length+1,t.length,">")}function di(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new ae(e.length,0)}else hi(e,t,0)}function Ne(e,t){if(!ge(e)||!Ue(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Ft(e,t)}function pi(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(u){if(!ge(u)||!Ue(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+lt(t)+")")});var r=n!==void 0?n:0;return Pr(e,t,0,r),e}function Pr(e,t,n,r){var u,i,o=e.length,c=t[n],s=Math.min(o,c);if(e.length=c,n<t.length-1){var l=n+1;for(u=0;u<s;u++)i=e[u],Array.isArray(i)||(i=[i],e[u]=i),Pr(i,t,l,r);for(u=s;u<c;u++)i=[],e[u]=i,Pr(i,t,l,r)}else{for(u=0;u<s;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=s;u<c;u++)e[u]=r}}function Kh(e,t){var n=ed(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new ae(0,r,"!=");t=Di(t,r);var u=gi(t);if(r!==u)throw new ae(u,r,"!=");try{return Qh(n,t)}catch(i){throw i instanceof ae?new ae(u,r,"!="):i}}function Di(e,t){var n=gi(e),r=e.slice(),u=-1,i=e.indexOf(u),o=e.indexOf(u,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var c=i>=0,s=t%n===0;if(c)if(s)r[i]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function gi(e){return e.reduce((t,n)=>t*n,1)}function Qh(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var i=t[u];r=[];for(var o=n.length/i,c=0;c<o;c++)r.push(n.slice(c*i,(c+1)*i));n=r}return n}function Yh(e,t,n,r){var u=r||$r(e);if(n)for(var i=0;i<n;i++)e=[e],u.unshift(1);for(e=vi(e,t,0);u.length<t;)u.push(1);return e}function vi(e,t,n){var r,u;if(Array.isArray(e)){var i=n+1;for(r=0,u=e.length;r<u;r++)e[r]=vi(e[r],t,i)}else for(var o=n;o<t;o++)e=[e];return e}function ed(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function n(r){Array.isArray(r)?r.forEach(n):t.push(r)}),t}function Tr(e,t){for(var n,r=0,u=0;u<e.length;u++){var i=e[u],o=Array.isArray(i);if(u===0&&o&&(r=i.length),o&&i.length!==r)return;var c=o?Tr(i,t):t(i);if(n===void 0)n=c;else if(n!==c)return"mixed"}return n}function Ee(e,t,n,r){function u(i){var o=Ph(i,t.map(rd));return td(e,t,i),n(o)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function td(e,t,n){var r=t.filter(i=>!nd(i)).every(i=>n[i]!==void 0);if(!r){var u=t.filter(i=>n[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(u.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function nd(e){return e&&e[0]==="?"}function rd(e){return e&&e[0]==="?"?e.slice(1):e}function ud(e,t){if(yi(e)&&mi(e,t))return e[t];throw typeof e[t]=="function"&&ad(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function id(e,t,n){if(yi(e)&&mi(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function od(e,t){return t in e}function mi(e,t){return!e||typeof e!="object"?!1:En(sd,t)?!0:!(t in Object.prototype||t in Function.prototype)}function ad(e,t){return e==null||typeof e[t]!="function"||En(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:En(cd,t)?!0:!(t in Object.prototype||t in Function.prototype)}function yi(e){return typeof e=="object"&&e&&e.constructor===Object}var sd={length:!0,name:!0},cd={toString:!0,valueOf:!0,toLocaleString:!0};class fd{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return ud(this.wrappedObject,t)}set(t,n){return id(this.wrappedObject,t,n),this}has(t){return od(this.wrappedObject,t)}}function ld(e){return e?e instanceof Map||e instanceof fd||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Ei=function(){return Ei=si.create,si},hd=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],dd=Ee("typed",hd,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:i}=t,o=Ei();return o.clear(),o.addTypes([{name:"number",test:ge},{name:"Complex",test:Yu},{name:"BigNumber",test:nt},{name:"Fraction",test:ei},{name:"Unit",test:ti},{name:"identifier",test:c=>yn&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(c)},{name:"string",test:yn},{name:"Chain",test:Rh},{name:"Array",test:Se},{name:"Matrix",test:Ut},{name:"DenseMatrix",test:oh},{name:"SparseMatrix",test:ah},{name:"Range",test:sh},{name:"Index",test:ni},{name:"boolean",test:ch},{name:"ResultSet",test:fh},{name:"Help",test:lh},{name:"function",test:hh},{name:"Date",test:dh},{name:"RegExp",test:ph},{name:"null",test:gh},{name:"undefined",test:vh},{name:"AccessorNode",test:mh},{name:"ArrayNode",test:yh},{name:"AssignmentNode",test:Eh},{name:"BlockNode",test:Ah},{name:"ConditionalNode",test:Ch},{name:"ConstantNode",test:Fh},{name:"FunctionNode",test:Bh},{name:"FunctionAssignmentNode",test:wh},{name:"IndexNode",test:bh},{name:"Node",test:Sh},{name:"ObjectNode",test:_h},{name:"OperatorNode",test:Mh},{name:"ParenthesisNode",test:Nh},{name:"RangeNode",test:Ih},{name:"RelationalNode",test:xh},{name:"SymbolNode",test:Oh},{name:"Map",test:ld},{name:"Object",test:Dh}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(s){if(n||Lr(s),Uh(s)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+s+"). Use function bignumber(x) to convert to BigNumber.");return new n(s)}},{from:"number",to:"Complex",convert:function(s){return r||Fn(s),new r(s,0)}},{from:"BigNumber",to:"Complex",convert:function(s){return r||Fn(s),new r(s.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(s){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(s){return r||Fn(s),new r(s.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(s){i||jr(s);var l=new i(s);if(l.valueOf()!==s)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+s+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(s){var l=Number(s);if(isNaN(l))throw new Error('Cannot convert "'+s+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(s){n||Lr(s);try{return new n(s)}catch(l){throw new Error('Cannot convert "'+s+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(s){i||jr(s);try{return new i(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(s){r||Fn(s);try{return new r(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Complex')}}},{from:"boolean",to:"number",convert:function(s){return+s}},{from:"boolean",to:"BigNumber",convert:function(s){return n||Lr(s),new n(+s)}},{from:"boolean",to:"Fraction",convert:function(s){return i||jr(s),new i(+s)}},{from:"boolean",to:"string",convert:function(s){return String(s)}},{from:"Array",to:"Matrix",convert:function(s){return u||pd(),new u(s)}},{from:"Matrix",to:"Array",convert:function(s){return s.valueOf()}}]),o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&Mr(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&Mr(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o});function Lr(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Fn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function pd(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function jr(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
11
+ * decimal.js v10.4.3
12
12
  * An arbitrary-precision Decimal type for JavaScript.
13
13
  * https://github.com/MikeMcl/decimal.js
14
14
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
15
15
  * MIT Licence
16
- */var wt=9e15,rt=1e9,qr="0123456789abcdef",wn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Bn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",kr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-wt,maxE:wt,crypto:!1},Ai,Ge,q=!0,bn="[DecimalError] ",ut=bn+"Invalid argument: ",Ci=bn+"Precision limit exceeded",Fi=bn+"crypto unavailable",wi="[object Decimal]",de=Math.floor,ue=Math.pow,hd=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dd=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,pd=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Bi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pe=1e7,j=7,Dd=9007199254740991,gd=wn.length-1,Vr=Bn.length-1,w={toStringTag:wi};w.absoluteValue=w.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},w.ceil=function(){return T(new this.constructor(this),this.e+1,2)},w.clampedTo=w.clamp=function(e,t){var n,r=this,u=r.constructor;if(e=new u(e),t=new u(t),!e.s||!t.s)return new u(NaN);if(e.gt(t))throw Error(ut+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},w.comparedTo=w.cmp=function(e){var t,n,r,u,i=this,o=i.d,c=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!c)return!s||!l?NaN:s!==l?s:o===c?0:!o^s<0?1:-1;if(!o[0]||!c[0])return o[0]?s:c[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(r=o.length,u=c.length,t=0,n=r<u?r:u;t<n;++t)if(o[t]!==c[t])return o[t]>c[t]^s<0?1:-1;return r===u?0:r>u^s<0?1:-1},w.cosine=w.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=vd(r,Ii(r,n)),r.precision=e,r.rounding=t,T(Ge==2||Ge==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},w.cubeRoot=w.cbrt=function(){var e,t,n,r,u,i,o,c,s,l,f=this,a=f.constructor;if(!f.isFinite()||f.isZero())return new a(f);for(q=!1,i=f.s*ue(f.s*f,1/3),!i||Math.abs(i)==1/0?(n=ce(f.d),e=f.e,(i=(e-n.length+1)%3)&&(n+=i==1||i==-2?"0":"00"),i=ue(n,1/3),e=de((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?n="5e"+e:(n=i.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new a(n),r.s=f.s):r=new a(i.toString()),o=(e=a.precision)+3;;)if(c=r,s=c.times(c).times(c),l=s.plus(f),r=J(l.plus(f).times(c),l.plus(s),o+2,1),ce(c.d).slice(0,o)===(n=ce(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!u&&n=="4999"){if(!u&&(T(c,e+1,0),c.times(c).times(c).eq(f))){r=c;break}o+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(T(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return q=!0,T(r,e,a.rounding,t)},w.decimalPlaces=w.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-de(this.e/j))*j,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},w.dividedBy=w.div=function(e){return J(this,new this.constructor(e))},w.dividedToIntegerBy=w.divToInt=function(e){var t=this,n=t.constructor;return T(J(t,new n(e),0,1,1),n.precision,n.rounding)},w.equals=w.eq=function(e){return this.cmp(e)===0},w.floor=function(){return T(new this.constructor(this),this.e+1,3)},w.greaterThan=w.gt=function(e){return this.cmp(e)>0},w.greaterThanOrEqualTo=w.gte=function(e){var t=this.cmp(e);return t==1||t===0},w.hyperbolicCosine=w.cosh=function(){var e,t,n,r,u,i=this,o=i.constructor,c=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return c;n=o.precision,r=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,u=i.d.length,u<32?(e=Math.ceil(u/3),t=(1/Nn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Bt(o,1,i.times(t),new o(1),!0);for(var s,l=e,f=new o(8);l--;)s=i.times(i),i=c.minus(s.times(f.minus(s.times(f))));return T(i,o.precision=n,o.rounding=r,!0)},w.hyperbolicSine=w.sinh=function(){var e,t,n,r,u=this,i=u.constructor;if(!u.isFinite()||u.isZero())return new i(u);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(u.e,u.sd())+4,i.rounding=1,r=u.d.length,r<3)u=Bt(i,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/Nn(5,e)),u=Bt(i,2,u,u,!0);for(var o,c=new i(5),s=new i(16),l=new i(20);e--;)o=u.times(u),u=u.times(c.plus(o.times(s.times(o).plus(l))))}return i.precision=t,i.rounding=n,T(u,t,n,!0)},w.hyperbolicTangent=w.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,J(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},w.inverseCosine=w.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),u=n.precision,i=n.rounding;return r!==-1?r===0?t.isNeg()?Te(n,u,i):new n(0):new n(NaN):t.isZero()?Te(n,u+4,i).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=Te(n,u+4,i).times(.5),n.precision=u,n.rounding=i,e.minus(t))},w.inverseHyperbolicCosine=w.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,q=!1,n=n.times(n).minus(1).sqrt().plus(n),q=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},w.inverseHyperbolicSine=w.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,q=!1,n=n.times(n).plus(1).sqrt().plus(n),q=!0,r.precision=e,r.rounding=t,n.ln())},w.inverseHyperbolicTangent=w.atanh=function(){var e,t,n,r,u=this,i=u.constructor;return u.isFinite()?u.e>=0?new i(u.abs().eq(1)?u.s/0:u.isZero()?u:NaN):(e=i.precision,t=i.rounding,r=u.sd(),Math.max(r,e)<2*-u.e-1?T(new i(u),e,t,!0):(i.precision=n=r-u.e,u=J(u.plus(1),new i(1).minus(u),n+e,1),i.precision=e+4,i.rounding=1,u=u.ln(),i.precision=e,i.rounding=t,u.times(.5))):new i(NaN)},w.inverseSine=w.asin=function(){var e,t,n,r,u=this,i=u.constructor;return u.isZero()?new i(u):(t=u.abs().cmp(1),n=i.precision,r=i.rounding,t!==-1?t===0?(e=Te(i,n+4,r).times(.5),e.s=u.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,u=u.div(new i(1).minus(u.times(u)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,u.times(2)))},w.inverseTangent=w.atan=function(){var e,t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&a+4<=Vr)return o=Te(f,a+4,h).times(.25),o.s=l.s,o}else{if(!l.s)return new f(NaN);if(a+4<=Vr)return o=Te(f,a+4,h).times(.5),o.s=l.s,o}for(f.precision=c=a+10,f.rounding=1,n=Math.min(28,c/j+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(q=!1,t=Math.ceil(c/j),r=1,s=l.times(l),o=new f(l),u=l;e!==-1;)if(u=u.times(s),i=o.minus(u.div(r+=2)),u=u.times(s),o=i.plus(u.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),q=!0,T(o,f.precision=a,f.rounding=h,!0)},w.isFinite=function(){return!!this.d},w.isInteger=w.isInt=function(){return!!this.d&&de(this.e/j)>this.d.length-2},w.isNaN=function(){return!this.s},w.isNegative=w.isNeg=function(){return this.s<0},w.isPositive=w.isPos=function(){return this.s>0},w.isZero=function(){return!!this.d&&this.d[0]===0},w.lessThan=w.lt=function(e){return this.cmp(e)<0},w.lessThanOrEqualTo=w.lte=function(e){return this.cmp(e)<1},w.logarithm=w.log=function(e){var t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding,d=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new f(n&&!n[0]?-1/0:l.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(u=n[0];u%10===0;)u/=10;i=u!==1}if(q=!1,c=a+d,o=ot(l,c),r=t?Mn(f,c+10):ot(e,c),s=J(o,r,c,1),Ht(s.d,u=a,h))do if(c+=10,o=ot(l,c),r=t?Mn(f,c+10):ot(e,c),s=J(o,r,c,1),!i){+ce(s.d).slice(u+1,u+15)+1==1e14&&(s=T(s,a+1,0));break}while(Ht(s.d,u+=10,h));return q=!0,T(s,a,h)},w.minus=w.sub=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return!d.s||!e.s?e=new p(NaN):d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,h=e.d,c=p.precision,s=p.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else if(l[0])e=new p(d);else return new p(s===3?-0:0);return q?T(e,c,s):e}if(n=de(e.e/j),f=de(d.e/j),l=l.slice(),i=f-n,i){for(a=i<0,a?(t=l,i=-i,o=h.length):(t=h,n=f,o=l.length),r=Math.max(Math.ceil(c/j),o)+2,i>r&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=h.length,a=r<o,a&&(o=r),r=0;r<o;r++)if(l[r]!=h[r]){a=l[r]<h[r];break}i=0}for(a&&(t=l,l=h,h=t,e.s=-e.s),o=l.length,r=h.length-o;r>0;--r)l[o++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(u=r;u&&l[--u]===0;)l[u]=Pe-1;--l[u],l[r]+=Pe}l[r]-=h[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=_n(l,n),q?T(e,c,s):e):new p(s===3?-0:0)},w.modulo=w.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?T(new r(n),r.precision,r.rounding):(q=!1,r.modulo==9?(t=J(n,e.abs(),0,3,1),t.s*=e.s):t=J(n,e,0,r.modulo,1),t=t.times(e),q=!0,n.minus(t))},w.naturalExponential=w.exp=function(){return Ur(this)},w.naturalLogarithm=w.ln=function(){return ot(this)},w.negated=w.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},w.plus=w.add=function(e){var t,n,r,u,i,o,c,s,l,f,a=this,h=a.constructor;if(e=new h(e),!a.d||!e.d)return!a.s||!e.s?e=new h(NaN):a.d||(e=new h(e.d||a.s===e.s?a:NaN)),e;if(a.s!=e.s)return e.s=-e.s,a.minus(e);if(l=a.d,f=e.d,c=h.precision,s=h.rounding,!l[0]||!f[0])return f[0]||(e=new h(a)),q?T(e,c,s):e;if(i=de(a.e/j),r=de(e.e/j),l=l.slice(),u=i-r,u){for(u<0?(n=l,u=-u,o=f.length):(n=f,r=i,o=l.length),i=Math.ceil(c/j),o=i>o?i+1:o+1,u>o&&(u=o,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(o=l.length,u=f.length,o-u<0&&(u=o,n=f,f=l,l=n),t=0;u;)t=(l[--u]=l[u]+f[u]+t)/Pe|0,l[u]%=Pe;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=_n(l,r),q?T(e,c,s):e},w.precision=w.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ut+e);return n.d?(t=bi(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},w.round=function(){var e=this,t=e.constructor;return T(new t(e),e.e+1,t.rounding)},w.sine=w.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=yd(r,Ii(r,n)),r.precision=e,r.rounding=t,T(Ge>2?n.neg():n,e,t,!0)):new r(NaN)},w.squareRoot=w.sqrt=function(){var e,t,n,r,u,i,o=this,c=o.d,s=o.e,l=o.s,f=o.constructor;if(l!==1||!c||!c[0])return new f(!l||l<0&&(!c||c[0])?NaN:c?o:1/0);for(q=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=ce(c),(t.length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=de((s+1)/2)-(s<0||s%2),l==1/0?t="5e"+s:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),r=new f(t)):r=new f(l.toString()),n=(s=f.precision)+3;;)if(i=r,r=i.plus(J(o,i,n+2,1)).times(.5),ce(i.d).slice(0,n)===(t=ce(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(T(i,s+1,0),i.times(i).eq(o))){r=i;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(T(r,s+1,1),e=!r.times(r).eq(o));break}return q=!0,T(r,s,f.rounding,e)},w.tangent=w.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=J(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,T(Ge==2||Ge==4?n.neg():n,e,t,!0)):new r(NaN)},w.times=w.mul=function(e){var t,n,r,u,i,o,c,s,l,f=this,a=f.constructor,h=f.d,d=(e=new a(e)).d;if(e.s*=f.s,!h||!h[0]||!d||!d[0])return new a(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(n=de(f.e/j)+de(e.e/j),s=h.length,l=d.length,s<l&&(i=h,h=d,d=i,o=s,s=l,l=o),i=[],o=s+l,r=o;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,u=s+r;u>r;)c=i[u]+d[r]*h[u-r-1]+t,i[u--]=c%Pe|0,t=c/Pe|0;i[u]=(i[u]+t)%Pe|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=_n(i,n),q?T(e,a.precision,a.rounding):e},w.toBinary=function(e,t){return zr(this,2,e,t)},w.toDecimalPlaces=w.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ae(e,0,rt),t===void 0?t=r.rounding:Ae(t,0,8),T(n,e+n.e+1,t))},w.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=ze(r,!0):(Ae(e,0,rt),t===void 0?t=u.rounding:Ae(t,0,8),r=T(new u(r),e+1,t),n=ze(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},w.toFixed=function(e,t){var n,r,u=this,i=u.constructor;return e===void 0?n=ze(u):(Ae(e,0,rt),t===void 0?t=i.rounding:Ae(t,0,8),r=T(new i(u),e+u.e+1,t),n=ze(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},w.toFraction=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.d,D=d.constructor;if(!p)return new D(d);if(l=n=new D(1),r=s=new D(0),t=new D(r),i=t.e=bi(p)-d.e-1,o=i%j,t.d[0]=ue(10,o<0?j+o:o),e==null)e=i>0?t:l;else{if(c=new D(e),!c.isInt()||c.lt(l))throw Error(ut+c);e=c.gt(t)?i>0?t:l:c}for(q=!1,c=new D(ce(p)),f=D.precision,D.precision=i=p.length*j*2;a=J(c,t,0,1,1),u=n.plus(a.times(r)),u.cmp(e)!=1;)n=r,r=u,u=l,l=s.plus(a.times(u)),s=u,u=t,t=c.minus(a.times(u)),c=u;return u=J(e.minus(n),r,0,1,1),s=s.plus(u.times(l)),n=n.plus(u.times(r)),s.s=l.s=d.s,h=J(l,r,i,1).minus(d).abs().cmp(J(s,n,i,1).minus(d).abs())<1?[l,r]:[s,n],D.precision=f,q=!0,h},w.toHexadecimal=w.toHex=function(e,t){return zr(this,16,e,t)},w.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:Ae(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(q=!1,n=J(n,e,0,t,1).times(e),q=!0,T(n)):(e.s=n.s,n=e),n},w.toNumber=function(){return+this},w.toOctal=function(e,t){return zr(this,8,e,t)},w.toPower=w.pow=function(e){var t,n,r,u,i,o,c=this,s=c.constructor,l=+(e=new s(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new s(ue(+c,l));if(c=new s(c),c.eq(1))return c;if(r=s.precision,i=s.rounding,e.eq(1))return T(c,r,i);if(t=de(e.e/j),t>=e.d.length-1&&(n=l<0?-l:l)<=Dd)return u=Si(s,c,n,r),e.s<0?new s(1).div(u):T(u,r,i);if(o=c.s,o<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(o=1),c.e==0&&c.d[0]==1&&c.d.length==1)return c.s=o,c}return n=ue(+c,l),t=n==0||!isFinite(n)?de(l*(Math.log("0."+ce(c.d))/Math.LN10+c.e+1)):new s(n+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?o/0:0):(q=!1,s.rounding=c.s=1,n=Math.min(12,(t+"").length),u=Ur(e.times(ot(c,r+n)),r),u.d&&(u=T(u,r+5,1),Ht(u.d,r,i)&&(t=r+10,u=T(Ur(e.times(ot(c,t+n)),t),t+5,1),+ce(u.d).slice(r+1,r+15)+1==1e14&&(u=T(u,r+1,0)))),u.s=o,q=!0,s.rounding=i,T(u,r,i))},w.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=ze(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(Ae(e,1,rt),t===void 0?t=u.rounding:Ae(t,0,8),r=T(new u(r),e,t),n=ze(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},w.toSignificantDigits=w.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ae(e,1,rt),t===void 0?t=r.rounding:Ae(t,0,8)),T(new r(n),e,t)},w.toString=function(){var e=this,t=e.constructor,n=ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},w.truncated=w.trunc=function(){return T(new this.constructor(this),this.e+1,1)},w.valueOf=w.toJSON=function(){var e=this,t=e.constructor,n=ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function ce(e){var t,n,r,u=e.length-1,i="",o=e[0];if(u>0){for(i+=o,t=1;t<u;t++)r=e[t]+"",n=j-r.length,n&&(i+=it(n)),i+=r;o=e[t],r=o+"",n=j-r.length,n&&(i+=it(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function Ae(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ut+e)}function Ht(e,t,n,r){var u,i,o,c;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=j,u=0):(u=Math.ceil((t+1)/j),t%=j),i=ue(10,j-t),c=e[u]%i|0,r==null?t<3?(t==0?c=c/100|0:t==1&&(c=c/10|0),o=n<4&&c==99999||n>3&&c==49999||c==5e4||c==0):o=(n<4&&c+1==i||n>3&&c+1==i/2)&&(e[u+1]/i/100|0)==ue(10,t-2)-1||(c==i/2||c==0)&&(e[u+1]/i/100|0)==0:t<4?(t==0?c=c/1e3|0:t==1?c=c/100|0:t==2&&(c=c/10|0),o=(r||n<4)&&c==9999||!r&&n>3&&c==4999):o=((r||n<4)&&c+1==i||!r&&n>3&&c+1==i/2)&&(e[u+1]/i/1e3|0)==ue(10,t-3)-1,o}function Sn(e,t,n){for(var r,u=[0],i,o=0,c=e.length;o<c;){for(i=u.length;i--;)u[i]*=t;for(u[0]+=qr.indexOf(e.charAt(o++)),r=0;r<u.length;r++)u[r]>n-1&&(u[r+1]===void 0&&(u[r+1]=0),u[r+1]+=u[r]/n|0,u[r]%=n)}return u.reverse()}function vd(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/Nn(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=Bt(e,1,t.times(u),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var J=function(){function e(r,u,i){var o,c=0,s=r.length;for(r=r.slice();s--;)o=r[s]*u+c,r[s]=o%i|0,c=o/i|0;return c&&r.unshift(c),r}function t(r,u,i,o){var c,s;if(i!=o)s=i>o?1:-1;else for(c=s=0;c<i;c++)if(r[c]!=u[c]){s=r[c]>u[c]?1:-1;break}return s}function n(r,u,i,o){for(var c=0;i--;)r[i]-=c,c=r[i]<u[i]?1:0,r[i]=c*o+r[i]-u[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,i,o,c,s){var l,f,a,h,d,p,D,m,g,E,b,C,x,$,P,M,R,W,k,Q,K=r.constructor,te=r.s==u.s?1:-1,Y=r.d,z=u.d;if(!Y||!Y[0]||!z||!z[0])return new K(!r.s||!u.s||(Y?z&&Y[0]==z[0]:!z)?NaN:Y&&Y[0]==0||!z?te*0:te/0);for(s?(d=1,f=r.e-u.e):(s=Pe,d=j,f=de(r.e/d)-de(u.e/d)),k=z.length,R=Y.length,g=new K(te),E=g.d=[],a=0;z[a]==(Y[a]||0);a++);if(z[a]>(Y[a]||0)&&f--,i==null?($=i=K.precision,o=K.rounding):c?$=i+(r.e-u.e)+1:$=i,$<0)E.push(1),p=!0;else{if($=$/d+2|0,a=0,k==1){for(h=0,z=z[0],$++;(a<R||h)&&$--;a++)P=h*s+(Y[a]||0),E[a]=P/z|0,h=P%z|0;p=h||a<R}else{for(h=s/(z[0]+1)|0,h>1&&(z=e(z,h,s),Y=e(Y,h,s),k=z.length,R=Y.length),M=k,b=Y.slice(0,k),C=b.length;C<k;)b[C++]=0;Q=z.slice(),Q.unshift(0),W=z[0],z[1]>=s/2&&++W;do h=0,l=t(z,b,k,C),l<0?(x=b[0],k!=C&&(x=x*s+(b[1]||0)),h=x/W|0,h>1?(h>=s&&(h=s-1),D=e(z,h,s),m=D.length,C=b.length,l=t(D,b,m,C),l==1&&(h--,n(D,k<m?Q:z,m,s))):(h==0&&(l=h=1),D=z.slice()),m=D.length,m<C&&D.unshift(0),n(b,D,C,s),l==-1&&(C=b.length,l=t(z,b,k,C),l<1&&(h++,n(b,k<C?Q:z,C,s))),C=b.length):l===0&&(h++,b=[0]),E[a++]=h,l&&b[0]?b[C++]=Y[M]||0:(b=[Y[M]],C=1);while((M++<R||b[0]!==void 0)&&$--);p=b[0]!==void 0}E[0]||E.shift()}if(d==1)g.e=f,Ai=p;else{for(a=1,h=E[0];h>=10;h/=10)a++;g.e=a+f*d-1,T(g,c?i+g.e+1:i,o,p)}return g}}();function T(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor;e:if(t!=null){if(a=e.d,!a)return e;for(u=1,c=a[0];c>=10;c/=10)u++;if(i=t-u,i<0)i+=j,o=t,f=a[h=0],s=f/ue(10,u-o-1)%10|0;else if(h=Math.ceil((i+1)/j),c=a.length,h>=c)if(r){for(;c++<=h;)a.push(0);f=s=0,u=1,i%=j,o=i-j+1}else break e;else{for(f=c=a[h],u=1;c>=10;c/=10)u++;i%=j,o=i-j+u,s=o<0?0:f/ue(10,u-o-1)%10|0}if(r=r||t<0||a[h+1]!==void 0||(o<0?f:f%ue(10,u-o-1)),l=n<4?(s||r)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||r||n==6&&(i>0?o>0?f/ue(10,u-o):0:a[h-1])%10&1||n==(e.s<0?8:7)),t<1||!a[0])return a.length=0,l?(t-=e.e+1,a[0]=ue(10,(j-t%j)%j),e.e=-t||0):a[0]=e.e=0,e;if(i==0?(a.length=h,c=1,h--):(a.length=h+1,c=ue(10,j-i),a[h]=o>0?(f/ue(10,u-o)%ue(10,o)|0)*c:0),l)for(;;)if(h==0){for(i=1,o=a[0];o>=10;o/=10)i++;for(o=a[0]+=c,c=1;o>=10;o/=10)c++;i!=c&&(e.e++,a[0]==Pe&&(a[0]=1));break}else{if(a[h]+=c,a[h]!=Pe)break;a[h--]=0,c=1}for(i=a.length;a[--i]===0;)a.pop()}return q&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function ze(e,t,n){if(!e.isFinite())return Ni(e);var r,u=e.e,i=ce(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+it(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):u<0?(i="0."+it(-u-1)+i,n&&(r=n-o)>0&&(i+=it(r))):u>=o?(i+=it(u+1-o),n&&(r=n-u-1)>0&&(i=i+"."+it(r))):((r=u+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(u+1===o&&(i+="."),i+=it(r))),i}function _n(e,t){var n=e[0];for(t*=j;n>=10;n/=10)t++;return t}function Mn(e,t,n){if(t>gd)throw q=!0,n&&(e.precision=n),Error(Ci);return T(new e(wn),t,1,!0)}function Te(e,t,n){if(t>Vr)throw Error(Ci);return T(new e(Bn),t,n,!0)}function bi(e){var t=e.length-1,n=t*j+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function it(e){for(var t="";e--;)t+="0";return t}function Si(e,t,n,r){var u,i=new e(1),o=Math.ceil(r/j+4);for(q=!1;;){if(n%2&&(i=i.times(t),xi(i.d,o)&&(u=!0)),n=de(n/2),n===0){n=i.d.length-1,u&&i.d[n]===0&&++i.d[n];break}t=t.times(t),xi(t.d,o)}return q=!0,i}function _i(e){return e.d[e.d.length-1]&1}function Mi(e,t,n){for(var r,u=new e(t[0]),i=0;++i<t.length;)if(r=new e(t[i]),r.s)u[n](r)&&(u=r);else{u=r;break}return u}function Ur(e,t){var n,r,u,i,o,c,s,l=0,f=0,a=0,h=e.constructor,d=h.rounding,p=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(q=!1,s=p):s=t,c=new h(.03125);e.e>-2;)e=e.times(c),a+=5;for(r=Math.log(ue(2,a))/Math.LN10*2+5|0,s+=r,n=i=o=new h(1),h.precision=s;;){if(i=T(i.times(e),s,1),n=n.times(++f),c=o.plus(J(i,n,s,1)),ce(c.d).slice(0,s)===ce(o.d).slice(0,s)){for(u=a;u--;)o=T(o.times(o),s,1);if(t==null)if(l<3&&Ht(o.d,s-r,d,l))h.precision=s+=10,n=i=c=new h(1),f=0,l++;else return T(o,h.precision=p,d,q=!0);else return h.precision=p,o}o=c}}function ot(e,t){var n,r,u,i,o,c,s,l,f,a,h,d=1,p=10,D=e,m=D.d,g=D.constructor,E=g.rounding,b=g.precision;if(D.s<0||!m||!m[0]||!D.e&&m[0]==1&&m.length==1)return new g(m&&!m[0]?-1/0:D.s!=1?NaN:m?0:D);if(t==null?(q=!1,f=b):f=t,g.precision=f+=p,n=ce(m),r=n.charAt(0),Math.abs(i=D.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)D=D.times(e),n=ce(D.d),r=n.charAt(0),d++;i=D.e,r>1?(D=new g("0."+n),i++):D=new g(r+"."+n.slice(1))}else return l=Mn(g,f+2,b).times(i+""),D=ot(new g(r+"."+n.slice(1)),f-p).plus(l),g.precision=b,t==null?T(D,b,E,q=!0):D;for(a=D,s=o=D=J(D.minus(1),D.plus(1),f,1),h=T(D.times(D),f,1),u=3;;){if(o=T(o.times(h),f,1),l=s.plus(J(o,new g(u),f,1)),ce(l.d).slice(0,f)===ce(s.d).slice(0,f))if(s=s.times(2),i!==0&&(s=s.plus(Mn(g,f+2,b).times(i+""))),s=J(s,new g(d),f,1),t==null)if(Ht(s.d,f-p,E,c))g.precision=f+=p,l=o=D=J(a.minus(1),a.plus(1),f,1),h=T(D.times(D),f,1),u=c=1;else return T(s,g.precision=b,E,q=!0);else return g.precision=b,s;s=l,u+=2}}function Ni(e){return String(e.s*e.s/0)}function Hr(e,t){var n,r,u;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(u=t.length;t.charCodeAt(u-1)===48;--u);if(t=t.slice(r,u),t){if(u-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%j,n<0&&(r+=j),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=j;r<u;)e.d.push(+t.slice(r,r+=j));t=t.slice(r),r=j-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),q&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function md(e,t){var n,r,u,i,o,c,s,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Bi.test(t))return Hr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(dd.test(t))n=16,t=t.toLowerCase();else if(hd.test(t))n=2;else if(pd.test(t))n=8;else throw Error(ut+t);for(i=t.search(/p/i),i>0?(s=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,r=e.constructor,o&&(t=t.replace(".",""),c=t.length,i=c-i,u=Si(r,new r(n),i,i*2)),l=Sn(t,n,Pe),f=l.length-1,i=f;l[i]===0;--i)l.pop();return i<0?new r(e.s*0):(e.e=_n(l,f),e.d=l,q=!1,o&&(e=J(e,u,c*4)),s&&(e=e.times(Math.abs(s)<54?ue(2,s):bt.pow(2,s))),q=!0,e)}function yd(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Bt(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/Nn(5,n)),t=Bt(e,2,t,t);for(var u,i=new e(5),o=new e(16),c=new e(20);n--;)u=t.times(t),t=t.times(i.plus(u.times(o.times(u).minus(c))));return t}function Bt(e,t,n,r,u){var i,o,c,s,l=e.precision,f=Math.ceil(l/j);for(q=!1,s=n.times(n),c=new e(r);;){if(o=J(c.times(s),new e(t++*t++),l,1),c=u?r.plus(o):r.minus(o),r=J(o.times(s),new e(t++*t++),l,1),o=c.plus(r),o.d[f]!==void 0){for(i=f;o.d[i]===c.d[i]&&i--;);if(i==-1)break}i=c,c=r,r=o,o=i}return q=!0,o.d.length=f+1,o}function Nn(e,t){for(var n=e;--t;)n*=e;return n}function Ii(e,t){var n,r=t.s<0,u=Te(e,e.precision,1),i=u.times(.5);if(t=t.abs(),t.lte(i))return Ge=r?4:1,t;if(n=t.divToInt(u),n.isZero())Ge=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(i))return Ge=_i(n)?r?2:3:r?4:1,t;Ge=_i(n)?r?1:4:r?3:2}return t.minus(u).abs()}function zr(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor,p=n!==void 0;if(p?(Ae(n,1,rt),r===void 0?r=d.rounding:Ae(r,0,8)):(n=d.precision,r=d.rounding),!e.isFinite())f=Ni(e);else{for(f=ze(e),o=f.indexOf("."),p?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,o>=0&&(f=f.replace(".",""),h=new d(1),h.e=f.length-o,h.d=Sn(ze(h),10,u),h.e=h.d.length),a=Sn(f,10,u),i=s=a.length;a[--s]==0;)a.pop();if(!a[0])f=p?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=a,e.e=i,e=J(e,h,n,r,0,u),a=e.d,i=e.e,l=Ai),o=a[n],c=u/2,l=l||a[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>c||o===c&&(r===4||l||r===6&&a[n-1]&1||r===(e.s<0?8:7)),a.length=n,l)for(;++a[--n]>u-1;)a[n]=0,n||(++i,a.unshift(1));for(s=a.length;!a[s-1];--s);for(o=0,f="";o<s;o++)f+=qr.charAt(a[o]);if(p){if(s>1)if(t==16||t==8){for(o=t==16?4:3,--s;s%o;s++)f+="0";for(a=Sn(f,u,t),s=a.length;!a[s-1];--s);for(o=1,f="1.";o<s;o++)f+=qr.charAt(a[o])}else f=f.charAt(0)+"."+f.slice(1);f=f+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)f="0"+f;f="0."+f}else if(++i>s)for(i-=s;i--;)f+="0";else i<s&&(f=f.slice(0,i)+"."+f.slice(i))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function xi(e,t){if(e.length>t)return e.length=t,!0}function Ed(e){return new this(e).abs()}function Ad(e){return new this(e).acos()}function Cd(e){return new this(e).acosh()}function Fd(e,t){return new this(e).plus(t)}function wd(e){return new this(e).asin()}function Bd(e){return new this(e).asinh()}function bd(e){return new this(e).atan()}function Sd(e){return new this(e).atanh()}function _d(e,t){e=new this(e),t=new this(t);var n,r=this.precision,u=this.rounding,i=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Te(this,i,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Te(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Te(this,i,1).times(.5),n.s=e.s):t.s<0?(this.precision=i,this.rounding=1,n=this.atan(J(e,t,i,1)),t=Te(this,i,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(J(e,t,i,1)),n}function Md(e){return new this(e).cbrt()}function Nd(e){return T(e=new this(e),e.e+1,2)}function Id(e,t,n){return new this(e).clamp(t,n)}function xd(e){if(!e||typeof e!="object")throw Error(bn+"Object expected");var t,n,r,u=e.defaults===!0,i=["precision",1,rt,"rounding",0,8,"toExpNeg",-wt,0,"toExpPos",0,wt,"maxE",0,wt,"minE",-wt,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],u&&(this[n]=kr[n]),(r=e[n])!==void 0)if(de(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(ut+n+": "+r);if(n="crypto",u&&(this[n]=kr[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(Fi);else this[n]=!1;else throw Error(ut+n+": "+r);return this}function Od(e){return new this(e).cos()}function Rd(e){return new this(e).cosh()}function Oi(e){var t,n,r;function u(i){var o,c,s,l=this;if(!(l instanceof u))return new u(i);if(l.constructor=u,Ri(i)){l.s=i.s,q?!i.d||i.e>u.maxE?(l.e=NaN,l.d=null):i.e<u.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(s=typeof i,s==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,c=i;c>=10;c/=10)o++;q?o>u.maxE?(l.e=NaN,l.d=null):o<u.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Hr(l,i.toString())}else if(s!=="string")throw Error(ut+i);return(c=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(c===43&&(i=i.slice(1)),l.s=1),Bi.test(i)?Hr(l,i):md(l,i)}if(u.prototype=w,u.ROUND_UP=0,u.ROUND_DOWN=1,u.ROUND_CEIL=2,u.ROUND_FLOOR=3,u.ROUND_HALF_UP=4,u.ROUND_HALF_DOWN=5,u.ROUND_HALF_EVEN=6,u.ROUND_HALF_CEIL=7,u.ROUND_HALF_FLOOR=8,u.EUCLID=9,u.config=u.set=xd,u.clone=Oi,u.isDecimal=Ri,u.abs=Ed,u.acos=Ad,u.acosh=Cd,u.add=Fd,u.asin=wd,u.asinh=Bd,u.atan=bd,u.atanh=Sd,u.atan2=_d,u.cbrt=Md,u.ceil=Nd,u.clamp=Id,u.cos=Od,u.cosh=Rd,u.div=$d,u.exp=Pd,u.floor=Td,u.hypot=Ld,u.ln=jd,u.log=qd,u.log10=Vd,u.log2=kd,u.max=Ud,u.min=Hd,u.mod=zd,u.mul=Wd,u.pow=Zd,u.random=Xd,u.round=Gd,u.sign=Jd,u.sin=Kd,u.sinh=Qd,u.sqrt=Yd,u.sub=ep,u.sum=tp,u.tan=np,u.tanh=rp,u.trunc=up,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return u.config(e),u}function $d(e,t){return new this(e).div(t)}function Pd(e){return new this(e).exp()}function Td(e){return T(e=new this(e),e.e+1,3)}function Ld(){var e,t,n=new this(0);for(q=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return q=!0,new this(1/0);n=t}return q=!0,n.sqrt()}function Ri(e){return e instanceof bt||e&&e.toStringTag===wi||!1}function jd(e){return new this(e).ln()}function qd(e,t){return new this(e).log(t)}function kd(e){return new this(e).log(2)}function Vd(e){return new this(e).log(10)}function Ud(){return Mi(this,arguments,"lt")}function Hd(){return Mi(this,arguments,"gt")}function zd(e,t){return new this(e).mod(t)}function Wd(e,t){return new this(e).mul(t)}function Zd(e,t){return new this(e).pow(t)}function Xd(e){var t,n,r,u,i=0,o=new this(1),c=[];if(e===void 0?e=this.precision:Ae(e,1,rt),r=Math.ceil(e/j),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)u=t[i],u>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:c[i++]=u%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);i<r;)u=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),u>=214e7?crypto.randomBytes(4).copy(t,i):(c.push(u%1e7),i+=4);i=r/4}else throw Error(Fi);else for(;i<r;)c[i++]=Math.random()*1e7|0;for(r=c[--i],e%=j,r&&e&&(u=ue(10,j-e),c[i]=(r/u|0)*u);c[i]===0;i--)c.pop();if(i<0)n=0,c=[0];else{for(n=-1;c[0]===0;n-=j)c.shift();for(r=1,u=c[0];u>=10;u/=10)r++;r<j&&(n-=j-r)}return o.e=n,o.d=c,o}function Gd(e){return T(e=new this(e),e.e+1,this.rounding)}function Jd(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Kd(e){return new this(e).sin()}function Qd(e){return new this(e).sinh()}function Yd(e){return new this(e).sqrt()}function ep(e,t){return new this(e).sub(t)}function tp(){var e=0,t=arguments,n=new this(t[e]);for(q=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return q=!0,T(n,this.precision,this.rounding)}function np(e){return new this(e).tan()}function rp(e){return new this(e).tanh()}function up(e){return T(e=new this(e),e.e+1,1)}w[Symbol.for("nodejs.util.inspect.custom")]=w.toString,w[Symbol.toStringTag]="Decimal";var bt=w.constructor=Oi(kr);wn=new bt(wn),Bn=new bt(Bn);var ip="BigNumber",op=["?on","config"],ap=Ee(ip,op,e=>{var{on:t,config:n}=e,r=bt.clone({precision:n.precision,modulo:bt.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(u){return new r(u.value)},t&&t("config",function(u,i){u.precision!==i.precision&&r.config({precision:u.precision})}),r},{isClass:!0}),$i={exports:{}};/**
16
+ */var wt=9e15,rt=1e9,kr="0123456789abcdef",wn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Bn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-wt,maxE:wt,crypto:!1},Ai,Xe,k=!0,bn="[DecimalError] ",ut=bn+"Invalid argument: ",Ci=bn+"Precision limit exceeded",Fi=bn+"crypto unavailable",wi="[object Decimal]",de=Math.floor,ue=Math.pow,Dd=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,gd=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,vd=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Bi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pe=1e7,j=7,md=9007199254740991,yd=wn.length-1,Vr=Bn.length-1,w={toStringTag:wi};w.absoluteValue=w.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},w.ceil=function(){return T(new this.constructor(this),this.e+1,2)},w.clampedTo=w.clamp=function(e,t){var n,r=this,u=r.constructor;if(e=new u(e),t=new u(t),!e.s||!t.s)return new u(NaN);if(e.gt(t))throw Error(ut+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},w.comparedTo=w.cmp=function(e){var t,n,r,u,i=this,o=i.d,c=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!c)return!s||!l?NaN:s!==l?s:o===c?0:!o^s<0?1:-1;if(!o[0]||!c[0])return o[0]?s:c[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(r=o.length,u=c.length,t=0,n=r<u?r:u;t<n;++t)if(o[t]!==c[t])return o[t]>c[t]^s<0?1:-1;return r===u?0:r>u^s<0?1:-1},w.cosine=w.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=Ed(r,Ii(r,n)),r.precision=e,r.rounding=t,T(Xe==2||Xe==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},w.cubeRoot=w.cbrt=function(){var e,t,n,r,u,i,o,c,s,l,f=this,a=f.constructor;if(!f.isFinite()||f.isZero())return new a(f);for(k=!1,i=f.s*ue(f.s*f,1/3),!i||Math.abs(i)==1/0?(n=ce(f.d),e=f.e,(i=(e-n.length+1)%3)&&(n+=i==1||i==-2?"0":"00"),i=ue(n,1/3),e=de((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?n="5e"+e:(n=i.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new a(n),r.s=f.s):r=new a(i.toString()),o=(e=a.precision)+3;;)if(c=r,s=c.times(c).times(c),l=s.plus(f),r=G(l.plus(f).times(c),l.plus(s),o+2,1),ce(c.d).slice(0,o)===(n=ce(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!u&&n=="4999"){if(!u&&(T(c,e+1,0),c.times(c).times(c).eq(f))){r=c;break}o+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(T(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return k=!0,T(r,e,a.rounding,t)},w.decimalPlaces=w.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-de(this.e/j))*j,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},w.dividedBy=w.div=function(e){return G(this,new this.constructor(e))},w.dividedToIntegerBy=w.divToInt=function(e){var t=this,n=t.constructor;return T(G(t,new n(e),0,1,1),n.precision,n.rounding)},w.equals=w.eq=function(e){return this.cmp(e)===0},w.floor=function(){return T(new this.constructor(this),this.e+1,3)},w.greaterThan=w.gt=function(e){return this.cmp(e)>0},w.greaterThanOrEqualTo=w.gte=function(e){var t=this.cmp(e);return t==1||t===0},w.hyperbolicCosine=w.cosh=function(){var e,t,n,r,u,i=this,o=i.constructor,c=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return c;n=o.precision,r=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,u=i.d.length,u<32?(e=Math.ceil(u/3),t=(1/Nn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Bt(o,1,i.times(t),new o(1),!0);for(var s,l=e,f=new o(8);l--;)s=i.times(i),i=c.minus(s.times(f.minus(s.times(f))));return T(i,o.precision=n,o.rounding=r,!0)},w.hyperbolicSine=w.sinh=function(){var e,t,n,r,u=this,i=u.constructor;if(!u.isFinite()||u.isZero())return new i(u);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(u.e,u.sd())+4,i.rounding=1,r=u.d.length,r<3)u=Bt(i,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/Nn(5,e)),u=Bt(i,2,u,u,!0);for(var o,c=new i(5),s=new i(16),l=new i(20);e--;)o=u.times(u),u=u.times(c.plus(o.times(s.times(o).plus(l))))}return i.precision=t,i.rounding=n,T(u,t,n,!0)},w.hyperbolicTangent=w.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,G(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},w.inverseCosine=w.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),u=n.precision,i=n.rounding;return r!==-1?r===0?t.isNeg()?Te(n,u,i):new n(0):new n(NaN):t.isZero()?Te(n,u+4,i).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=Te(n,u+4,i).times(.5),n.precision=u,n.rounding=i,e.minus(t))},w.inverseHyperbolicCosine=w.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,k=!1,n=n.times(n).minus(1).sqrt().plus(n),k=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},w.inverseHyperbolicSine=w.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,k=!1,n=n.times(n).plus(1).sqrt().plus(n),k=!0,r.precision=e,r.rounding=t,n.ln())},w.inverseHyperbolicTangent=w.atanh=function(){var e,t,n,r,u=this,i=u.constructor;return u.isFinite()?u.e>=0?new i(u.abs().eq(1)?u.s/0:u.isZero()?u:NaN):(e=i.precision,t=i.rounding,r=u.sd(),Math.max(r,e)<2*-u.e-1?T(new i(u),e,t,!0):(i.precision=n=r-u.e,u=G(u.plus(1),new i(1).minus(u),n+e,1),i.precision=e+4,i.rounding=1,u=u.ln(),i.precision=e,i.rounding=t,u.times(.5))):new i(NaN)},w.inverseSine=w.asin=function(){var e,t,n,r,u=this,i=u.constructor;return u.isZero()?new i(u):(t=u.abs().cmp(1),n=i.precision,r=i.rounding,t!==-1?t===0?(e=Te(i,n+4,r).times(.5),e.s=u.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,u=u.div(new i(1).minus(u.times(u)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,u.times(2)))},w.inverseTangent=w.atan=function(){var e,t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&a+4<=Vr)return o=Te(f,a+4,h).times(.25),o.s=l.s,o}else{if(!l.s)return new f(NaN);if(a+4<=Vr)return o=Te(f,a+4,h).times(.5),o.s=l.s,o}for(f.precision=c=a+10,f.rounding=1,n=Math.min(28,c/j+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(k=!1,t=Math.ceil(c/j),r=1,s=l.times(l),o=new f(l),u=l;e!==-1;)if(u=u.times(s),i=o.minus(u.div(r+=2)),u=u.times(s),o=i.plus(u.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),k=!0,T(o,f.precision=a,f.rounding=h,!0)},w.isFinite=function(){return!!this.d},w.isInteger=w.isInt=function(){return!!this.d&&de(this.e/j)>this.d.length-2},w.isNaN=function(){return!this.s},w.isNegative=w.isNeg=function(){return this.s<0},w.isPositive=w.isPos=function(){return this.s>0},w.isZero=function(){return!!this.d&&this.d[0]===0},w.lessThan=w.lt=function(e){return this.cmp(e)<0},w.lessThanOrEqualTo=w.lte=function(e){return this.cmp(e)<1},w.logarithm=w.log=function(e){var t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding,d=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new f(n&&!n[0]?-1/0:l.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(u=n[0];u%10===0;)u/=10;i=u!==1}if(k=!1,c=a+d,o=ot(l,c),r=t?Mn(f,c+10):ot(e,c),s=G(o,r,c,1),Ht(s.d,u=a,h))do if(c+=10,o=ot(l,c),r=t?Mn(f,c+10):ot(e,c),s=G(o,r,c,1),!i){+ce(s.d).slice(u+1,u+15)+1==1e14&&(s=T(s,a+1,0));break}while(Ht(s.d,u+=10,h));return k=!0,T(s,a,h)},w.minus=w.sub=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return!d.s||!e.s?e=new p(NaN):d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,h=e.d,c=p.precision,s=p.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else if(l[0])e=new p(d);else return new p(s===3?-0:0);return k?T(e,c,s):e}if(n=de(e.e/j),f=de(d.e/j),l=l.slice(),i=f-n,i){for(a=i<0,a?(t=l,i=-i,o=h.length):(t=h,n=f,o=l.length),r=Math.max(Math.ceil(c/j),o)+2,i>r&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=h.length,a=r<o,a&&(o=r),r=0;r<o;r++)if(l[r]!=h[r]){a=l[r]<h[r];break}i=0}for(a&&(t=l,l=h,h=t,e.s=-e.s),o=l.length,r=h.length-o;r>0;--r)l[o++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(u=r;u&&l[--u]===0;)l[u]=Pe-1;--l[u],l[r]+=Pe}l[r]-=h[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=_n(l,n),k?T(e,c,s):e):new p(s===3?-0:0)},w.modulo=w.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?T(new r(n),r.precision,r.rounding):(k=!1,r.modulo==9?(t=G(n,e.abs(),0,3,1),t.s*=e.s):t=G(n,e,0,r.modulo,1),t=t.times(e),k=!0,n.minus(t))},w.naturalExponential=w.exp=function(){return Ur(this)},w.naturalLogarithm=w.ln=function(){return ot(this)},w.negated=w.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},w.plus=w.add=function(e){var t,n,r,u,i,o,c,s,l,f,a=this,h=a.constructor;if(e=new h(e),!a.d||!e.d)return!a.s||!e.s?e=new h(NaN):a.d||(e=new h(e.d||a.s===e.s?a:NaN)),e;if(a.s!=e.s)return e.s=-e.s,a.minus(e);if(l=a.d,f=e.d,c=h.precision,s=h.rounding,!l[0]||!f[0])return f[0]||(e=new h(a)),k?T(e,c,s):e;if(i=de(a.e/j),r=de(e.e/j),l=l.slice(),u=i-r,u){for(u<0?(n=l,u=-u,o=f.length):(n=f,r=i,o=l.length),i=Math.ceil(c/j),o=i>o?i+1:o+1,u>o&&(u=o,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(o=l.length,u=f.length,o-u<0&&(u=o,n=f,f=l,l=n),t=0;u;)t=(l[--u]=l[u]+f[u]+t)/Pe|0,l[u]%=Pe;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=_n(l,r),k?T(e,c,s):e},w.precision=w.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ut+e);return n.d?(t=bi(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},w.round=function(){var e=this,t=e.constructor;return T(new t(e),e.e+1,t.rounding)},w.sine=w.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=Cd(r,Ii(r,n)),r.precision=e,r.rounding=t,T(Xe>2?n.neg():n,e,t,!0)):new r(NaN)},w.squareRoot=w.sqrt=function(){var e,t,n,r,u,i,o=this,c=o.d,s=o.e,l=o.s,f=o.constructor;if(l!==1||!c||!c[0])return new f(!l||l<0&&(!c||c[0])?NaN:c?o:1/0);for(k=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=ce(c),(t.length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=de((s+1)/2)-(s<0||s%2),l==1/0?t="5e"+s:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),r=new f(t)):r=new f(l.toString()),n=(s=f.precision)+3;;)if(i=r,r=i.plus(G(o,i,n+2,1)).times(.5),ce(i.d).slice(0,n)===(t=ce(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(T(i,s+1,0),i.times(i).eq(o))){r=i;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(T(r,s+1,1),e=!r.times(r).eq(o));break}return k=!0,T(r,s,f.rounding,e)},w.tangent=w.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=G(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,T(Xe==2||Xe==4?n.neg():n,e,t,!0)):new r(NaN)},w.times=w.mul=function(e){var t,n,r,u,i,o,c,s,l,f=this,a=f.constructor,h=f.d,d=(e=new a(e)).d;if(e.s*=f.s,!h||!h[0]||!d||!d[0])return new a(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(n=de(f.e/j)+de(e.e/j),s=h.length,l=d.length,s<l&&(i=h,h=d,d=i,o=s,s=l,l=o),i=[],o=s+l,r=o;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,u=s+r;u>r;)c=i[u]+d[r]*h[u-r-1]+t,i[u--]=c%Pe|0,t=c/Pe|0;i[u]=(i[u]+t)%Pe|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=_n(i,n),k?T(e,a.precision,a.rounding):e},w.toBinary=function(e,t){return zr(this,2,e,t)},w.toDecimalPlaces=w.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ae(e,0,rt),t===void 0?t=r.rounding:Ae(t,0,8),T(n,e+n.e+1,t))},w.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=He(r,!0):(Ae(e,0,rt),t===void 0?t=u.rounding:Ae(t,0,8),r=T(new u(r),e+1,t),n=He(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},w.toFixed=function(e,t){var n,r,u=this,i=u.constructor;return e===void 0?n=He(u):(Ae(e,0,rt),t===void 0?t=i.rounding:Ae(t,0,8),r=T(new i(u),e+u.e+1,t),n=He(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},w.toFraction=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.d,D=d.constructor;if(!p)return new D(d);if(l=n=new D(1),r=s=new D(0),t=new D(r),i=t.e=bi(p)-d.e-1,o=i%j,t.d[0]=ue(10,o<0?j+o:o),e==null)e=i>0?t:l;else{if(c=new D(e),!c.isInt()||c.lt(l))throw Error(ut+c);e=c.gt(t)?i>0?t:l:c}for(k=!1,c=new D(ce(p)),f=D.precision,D.precision=i=p.length*j*2;a=G(c,t,0,1,1),u=n.plus(a.times(r)),u.cmp(e)!=1;)n=r,r=u,u=l,l=s.plus(a.times(u)),s=u,u=t,t=c.minus(a.times(u)),c=u;return u=G(e.minus(n),r,0,1,1),s=s.plus(u.times(l)),n=n.plus(u.times(r)),s.s=l.s=d.s,h=G(l,r,i,1).minus(d).abs().cmp(G(s,n,i,1).minus(d).abs())<1?[l,r]:[s,n],D.precision=f,k=!0,h},w.toHexadecimal=w.toHex=function(e,t){return zr(this,16,e,t)},w.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:Ae(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(k=!1,n=G(n,e,0,t,1).times(e),k=!0,T(n)):(e.s=n.s,n=e),n},w.toNumber=function(){return+this},w.toOctal=function(e,t){return zr(this,8,e,t)},w.toPower=w.pow=function(e){var t,n,r,u,i,o,c=this,s=c.constructor,l=+(e=new s(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new s(ue(+c,l));if(c=new s(c),c.eq(1))return c;if(r=s.precision,i=s.rounding,e.eq(1))return T(c,r,i);if(t=de(e.e/j),t>=e.d.length-1&&(n=l<0?-l:l)<=md)return u=Si(s,c,n,r),e.s<0?new s(1).div(u):T(u,r,i);if(o=c.s,o<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(o=1),c.e==0&&c.d[0]==1&&c.d.length==1)return c.s=o,c}return n=ue(+c,l),t=n==0||!isFinite(n)?de(l*(Math.log("0."+ce(c.d))/Math.LN10+c.e+1)):new s(n+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?o/0:0):(k=!1,s.rounding=c.s=1,n=Math.min(12,(t+"").length),u=Ur(e.times(ot(c,r+n)),r),u.d&&(u=T(u,r+5,1),Ht(u.d,r,i)&&(t=r+10,u=T(Ur(e.times(ot(c,t+n)),t),t+5,1),+ce(u.d).slice(r+1,r+15)+1==1e14&&(u=T(u,r+1,0)))),u.s=o,k=!0,s.rounding=i,T(u,r,i))},w.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=He(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(Ae(e,1,rt),t===void 0?t=u.rounding:Ae(t,0,8),r=T(new u(r),e,t),n=He(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},w.toSignificantDigits=w.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ae(e,1,rt),t===void 0?t=r.rounding:Ae(t,0,8)),T(new r(n),e,t)},w.toString=function(){var e=this,t=e.constructor,n=He(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},w.truncated=w.trunc=function(){return T(new this.constructor(this),this.e+1,1)},w.valueOf=w.toJSON=function(){var e=this,t=e.constructor,n=He(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function ce(e){var t,n,r,u=e.length-1,i="",o=e[0];if(u>0){for(i+=o,t=1;t<u;t++)r=e[t]+"",n=j-r.length,n&&(i+=it(n)),i+=r;o=e[t],r=o+"",n=j-r.length,n&&(i+=it(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function Ae(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ut+e)}function Ht(e,t,n,r){var u,i,o,c;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=j,u=0):(u=Math.ceil((t+1)/j),t%=j),i=ue(10,j-t),c=e[u]%i|0,r==null?t<3?(t==0?c=c/100|0:t==1&&(c=c/10|0),o=n<4&&c==99999||n>3&&c==49999||c==5e4||c==0):o=(n<4&&c+1==i||n>3&&c+1==i/2)&&(e[u+1]/i/100|0)==ue(10,t-2)-1||(c==i/2||c==0)&&(e[u+1]/i/100|0)==0:t<4?(t==0?c=c/1e3|0:t==1?c=c/100|0:t==2&&(c=c/10|0),o=(r||n<4)&&c==9999||!r&&n>3&&c==4999):o=((r||n<4)&&c+1==i||!r&&n>3&&c+1==i/2)&&(e[u+1]/i/1e3|0)==ue(10,t-3)-1,o}function Sn(e,t,n){for(var r,u=[0],i,o=0,c=e.length;o<c;){for(i=u.length;i--;)u[i]*=t;for(u[0]+=kr.indexOf(e.charAt(o++)),r=0;r<u.length;r++)u[r]>n-1&&(u[r+1]===void 0&&(u[r+1]=0),u[r+1]+=u[r]/n|0,u[r]%=n)}return u.reverse()}function Ed(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/Nn(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=Bt(e,1,t.times(u),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var G=function(){function e(r,u,i){var o,c=0,s=r.length;for(r=r.slice();s--;)o=r[s]*u+c,r[s]=o%i|0,c=o/i|0;return c&&r.unshift(c),r}function t(r,u,i,o){var c,s;if(i!=o)s=i>o?1:-1;else for(c=s=0;c<i;c++)if(r[c]!=u[c]){s=r[c]>u[c]?1:-1;break}return s}function n(r,u,i,o){for(var c=0;i--;)r[i]-=c,c=r[i]<u[i]?1:0,r[i]=c*o+r[i]-u[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,i,o,c,s){var l,f,a,h,d,p,D,v,g,E,b,C,M,O,P,S,$,W,q,K,J=r.constructor,ee=r.s==u.s?1:-1,Q=r.d,z=u.d;if(!Q||!Q[0]||!z||!z[0])return new J(!r.s||!u.s||(Q?z&&Q[0]==z[0]:!z)?NaN:Q&&Q[0]==0||!z?ee*0:ee/0);for(s?(d=1,f=r.e-u.e):(s=Pe,d=j,f=de(r.e/d)-de(u.e/d)),q=z.length,$=Q.length,g=new J(ee),E=g.d=[],a=0;z[a]==(Q[a]||0);a++);if(z[a]>(Q[a]||0)&&f--,i==null?(O=i=J.precision,o=J.rounding):c?O=i+(r.e-u.e)+1:O=i,O<0)E.push(1),p=!0;else{if(O=O/d+2|0,a=0,q==1){for(h=0,z=z[0],O++;(a<$||h)&&O--;a++)P=h*s+(Q[a]||0),E[a]=P/z|0,h=P%z|0;p=h||a<$}else{for(h=s/(z[0]+1)|0,h>1&&(z=e(z,h,s),Q=e(Q,h,s),q=z.length,$=Q.length),S=q,b=Q.slice(0,q),C=b.length;C<q;)b[C++]=0;K=z.slice(),K.unshift(0),W=z[0],z[1]>=s/2&&++W;do h=0,l=t(z,b,q,C),l<0?(M=b[0],q!=C&&(M=M*s+(b[1]||0)),h=M/W|0,h>1?(h>=s&&(h=s-1),D=e(z,h,s),v=D.length,C=b.length,l=t(D,b,v,C),l==1&&(h--,n(D,q<v?K:z,v,s))):(h==0&&(l=h=1),D=z.slice()),v=D.length,v<C&&D.unshift(0),n(b,D,C,s),l==-1&&(C=b.length,l=t(z,b,q,C),l<1&&(h++,n(b,q<C?K:z,C,s))),C=b.length):l===0&&(h++,b=[0]),E[a++]=h,l&&b[0]?b[C++]=Q[S]||0:(b=[Q[S]],C=1);while((S++<$||b[0]!==void 0)&&O--);p=b[0]!==void 0}E[0]||E.shift()}if(d==1)g.e=f,Ai=p;else{for(a=1,h=E[0];h>=10;h/=10)a++;g.e=a+f*d-1,T(g,c?i+g.e+1:i,o,p)}return g}}();function T(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor;e:if(t!=null){if(a=e.d,!a)return e;for(u=1,c=a[0];c>=10;c/=10)u++;if(i=t-u,i<0)i+=j,o=t,f=a[h=0],s=f/ue(10,u-o-1)%10|0;else if(h=Math.ceil((i+1)/j),c=a.length,h>=c)if(r){for(;c++<=h;)a.push(0);f=s=0,u=1,i%=j,o=i-j+1}else break e;else{for(f=c=a[h],u=1;c>=10;c/=10)u++;i%=j,o=i-j+u,s=o<0?0:f/ue(10,u-o-1)%10|0}if(r=r||t<0||a[h+1]!==void 0||(o<0?f:f%ue(10,u-o-1)),l=n<4?(s||r)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||r||n==6&&(i>0?o>0?f/ue(10,u-o):0:a[h-1])%10&1||n==(e.s<0?8:7)),t<1||!a[0])return a.length=0,l?(t-=e.e+1,a[0]=ue(10,(j-t%j)%j),e.e=-t||0):a[0]=e.e=0,e;if(i==0?(a.length=h,c=1,h--):(a.length=h+1,c=ue(10,j-i),a[h]=o>0?(f/ue(10,u-o)%ue(10,o)|0)*c:0),l)for(;;)if(h==0){for(i=1,o=a[0];o>=10;o/=10)i++;for(o=a[0]+=c,c=1;o>=10;o/=10)c++;i!=c&&(e.e++,a[0]==Pe&&(a[0]=1));break}else{if(a[h]+=c,a[h]!=Pe)break;a[h--]=0,c=1}for(i=a.length;a[--i]===0;)a.pop()}return k&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function He(e,t,n){if(!e.isFinite())return Ni(e);var r,u=e.e,i=ce(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+it(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):u<0?(i="0."+it(-u-1)+i,n&&(r=n-o)>0&&(i+=it(r))):u>=o?(i+=it(u+1-o),n&&(r=n-u-1)>0&&(i=i+"."+it(r))):((r=u+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(u+1===o&&(i+="."),i+=it(r))),i}function _n(e,t){var n=e[0];for(t*=j;n>=10;n/=10)t++;return t}function Mn(e,t,n){if(t>yd)throw k=!0,n&&(e.precision=n),Error(Ci);return T(new e(wn),t,1,!0)}function Te(e,t,n){if(t>Vr)throw Error(Ci);return T(new e(Bn),t,n,!0)}function bi(e){var t=e.length-1,n=t*j+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function it(e){for(var t="";e--;)t+="0";return t}function Si(e,t,n,r){var u,i=new e(1),o=Math.ceil(r/j+4);for(k=!1;;){if(n%2&&(i=i.times(t),xi(i.d,o)&&(u=!0)),n=de(n/2),n===0){n=i.d.length-1,u&&i.d[n]===0&&++i.d[n];break}t=t.times(t),xi(t.d,o)}return k=!0,i}function _i(e){return e.d[e.d.length-1]&1}function Mi(e,t,n){for(var r,u=new e(t[0]),i=0;++i<t.length;)if(r=new e(t[i]),r.s)u[n](r)&&(u=r);else{u=r;break}return u}function Ur(e,t){var n,r,u,i,o,c,s,l=0,f=0,a=0,h=e.constructor,d=h.rounding,p=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(k=!1,s=p):s=t,c=new h(.03125);e.e>-2;)e=e.times(c),a+=5;for(r=Math.log(ue(2,a))/Math.LN10*2+5|0,s+=r,n=i=o=new h(1),h.precision=s;;){if(i=T(i.times(e),s,1),n=n.times(++f),c=o.plus(G(i,n,s,1)),ce(c.d).slice(0,s)===ce(o.d).slice(0,s)){for(u=a;u--;)o=T(o.times(o),s,1);if(t==null)if(l<3&&Ht(o.d,s-r,d,l))h.precision=s+=10,n=i=c=new h(1),f=0,l++;else return T(o,h.precision=p,d,k=!0);else return h.precision=p,o}o=c}}function ot(e,t){var n,r,u,i,o,c,s,l,f,a,h,d=1,p=10,D=e,v=D.d,g=D.constructor,E=g.rounding,b=g.precision;if(D.s<0||!v||!v[0]||!D.e&&v[0]==1&&v.length==1)return new g(v&&!v[0]?-1/0:D.s!=1?NaN:v?0:D);if(t==null?(k=!1,f=b):f=t,g.precision=f+=p,n=ce(v),r=n.charAt(0),Math.abs(i=D.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)D=D.times(e),n=ce(D.d),r=n.charAt(0),d++;i=D.e,r>1?(D=new g("0."+n),i++):D=new g(r+"."+n.slice(1))}else return l=Mn(g,f+2,b).times(i+""),D=ot(new g(r+"."+n.slice(1)),f-p).plus(l),g.precision=b,t==null?T(D,b,E,k=!0):D;for(a=D,s=o=D=G(D.minus(1),D.plus(1),f,1),h=T(D.times(D),f,1),u=3;;){if(o=T(o.times(h),f,1),l=s.plus(G(o,new g(u),f,1)),ce(l.d).slice(0,f)===ce(s.d).slice(0,f))if(s=s.times(2),i!==0&&(s=s.plus(Mn(g,f+2,b).times(i+""))),s=G(s,new g(d),f,1),t==null)if(Ht(s.d,f-p,E,c))g.precision=f+=p,l=o=D=G(a.minus(1),a.plus(1),f,1),h=T(D.times(D),f,1),u=c=1;else return T(s,g.precision=b,E,k=!0);else return g.precision=b,s;s=l,u+=2}}function Ni(e){return String(e.s*e.s/0)}function Hr(e,t){var n,r,u;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(u=t.length;t.charCodeAt(u-1)===48;--u);if(t=t.slice(r,u),t){if(u-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%j,n<0&&(r+=j),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=j;r<u;)e.d.push(+t.slice(r,r+=j));t=t.slice(r),r=j-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),k&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Ad(e,t){var n,r,u,i,o,c,s,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Bi.test(t))return Hr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(gd.test(t))n=16,t=t.toLowerCase();else if(Dd.test(t))n=2;else if(vd.test(t))n=8;else throw Error(ut+t);for(i=t.search(/p/i),i>0?(s=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,r=e.constructor,o&&(t=t.replace(".",""),c=t.length,i=c-i,u=Si(r,new r(n),i,i*2)),l=Sn(t,n,Pe),f=l.length-1,i=f;l[i]===0;--i)l.pop();return i<0?new r(e.s*0):(e.e=_n(l,f),e.d=l,k=!1,o&&(e=G(e,u,c*4)),s&&(e=e.times(Math.abs(s)<54?ue(2,s):bt.pow(2,s))),k=!0,e)}function Cd(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Bt(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/Nn(5,n)),t=Bt(e,2,t,t);for(var u,i=new e(5),o=new e(16),c=new e(20);n--;)u=t.times(t),t=t.times(i.plus(u.times(o.times(u).minus(c))));return t}function Bt(e,t,n,r,u){var i,o,c,s,l=e.precision,f=Math.ceil(l/j);for(k=!1,s=n.times(n),c=new e(r);;){if(o=G(c.times(s),new e(t++*t++),l,1),c=u?r.plus(o):r.minus(o),r=G(o.times(s),new e(t++*t++),l,1),o=c.plus(r),o.d[f]!==void 0){for(i=f;o.d[i]===c.d[i]&&i--;);if(i==-1)break}i=c,c=r,r=o,o=i}return k=!0,o.d.length=f+1,o}function Nn(e,t){for(var n=e;--t;)n*=e;return n}function Ii(e,t){var n,r=t.s<0,u=Te(e,e.precision,1),i=u.times(.5);if(t=t.abs(),t.lte(i))return Xe=r?4:1,t;if(n=t.divToInt(u),n.isZero())Xe=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(i))return Xe=_i(n)?r?2:3:r?4:1,t;Xe=_i(n)?r?1:4:r?3:2}return t.minus(u).abs()}function zr(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor,p=n!==void 0;if(p?(Ae(n,1,rt),r===void 0?r=d.rounding:Ae(r,0,8)):(n=d.precision,r=d.rounding),!e.isFinite())f=Ni(e);else{for(f=He(e),o=f.indexOf("."),p?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,o>=0&&(f=f.replace(".",""),h=new d(1),h.e=f.length-o,h.d=Sn(He(h),10,u),h.e=h.d.length),a=Sn(f,10,u),i=s=a.length;a[--s]==0;)a.pop();if(!a[0])f=p?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=a,e.e=i,e=G(e,h,n,r,0,u),a=e.d,i=e.e,l=Ai),o=a[n],c=u/2,l=l||a[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>c||o===c&&(r===4||l||r===6&&a[n-1]&1||r===(e.s<0?8:7)),a.length=n,l)for(;++a[--n]>u-1;)a[n]=0,n||(++i,a.unshift(1));for(s=a.length;!a[s-1];--s);for(o=0,f="";o<s;o++)f+=kr.charAt(a[o]);if(p){if(s>1)if(t==16||t==8){for(o=t==16?4:3,--s;s%o;s++)f+="0";for(a=Sn(f,u,t),s=a.length;!a[s-1];--s);for(o=1,f="1.";o<s;o++)f+=kr.charAt(a[o])}else f=f.charAt(0)+"."+f.slice(1);f=f+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)f="0"+f;f="0."+f}else if(++i>s)for(i-=s;i--;)f+="0";else i<s&&(f=f.slice(0,i)+"."+f.slice(i))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function xi(e,t){if(e.length>t)return e.length=t,!0}function Fd(e){return new this(e).abs()}function wd(e){return new this(e).acos()}function Bd(e){return new this(e).acosh()}function bd(e,t){return new this(e).plus(t)}function Sd(e){return new this(e).asin()}function _d(e){return new this(e).asinh()}function Md(e){return new this(e).atan()}function Nd(e){return new this(e).atanh()}function Id(e,t){e=new this(e),t=new this(t);var n,r=this.precision,u=this.rounding,i=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Te(this,i,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Te(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Te(this,i,1).times(.5),n.s=e.s):t.s<0?(this.precision=i,this.rounding=1,n=this.atan(G(e,t,i,1)),t=Te(this,i,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(G(e,t,i,1)),n}function xd(e){return new this(e).cbrt()}function Od(e){return T(e=new this(e),e.e+1,2)}function Rd(e,t,n){return new this(e).clamp(t,n)}function $d(e){if(!e||typeof e!="object")throw Error(bn+"Object expected");var t,n,r,u=e.defaults===!0,i=["precision",1,rt,"rounding",0,8,"toExpNeg",-wt,0,"toExpPos",0,wt,"maxE",0,wt,"minE",-wt,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],u&&(this[n]=qr[n]),(r=e[n])!==void 0)if(de(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(ut+n+": "+r);if(n="crypto",u&&(this[n]=qr[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(Fi);else this[n]=!1;else throw Error(ut+n+": "+r);return this}function Pd(e){return new this(e).cos()}function Td(e){return new this(e).cosh()}function Oi(e){var t,n,r;function u(i){var o,c,s,l=this;if(!(l instanceof u))return new u(i);if(l.constructor=u,Ri(i)){l.s=i.s,k?!i.d||i.e>u.maxE?(l.e=NaN,l.d=null):i.e<u.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(s=typeof i,s==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,c=i;c>=10;c/=10)o++;k?o>u.maxE?(l.e=NaN,l.d=null):o<u.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Hr(l,i.toString())}else if(s!=="string")throw Error(ut+i);return(c=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(c===43&&(i=i.slice(1)),l.s=1),Bi.test(i)?Hr(l,i):Ad(l,i)}if(u.prototype=w,u.ROUND_UP=0,u.ROUND_DOWN=1,u.ROUND_CEIL=2,u.ROUND_FLOOR=3,u.ROUND_HALF_UP=4,u.ROUND_HALF_DOWN=5,u.ROUND_HALF_EVEN=6,u.ROUND_HALF_CEIL=7,u.ROUND_HALF_FLOOR=8,u.EUCLID=9,u.config=u.set=$d,u.clone=Oi,u.isDecimal=Ri,u.abs=Fd,u.acos=wd,u.acosh=Bd,u.add=bd,u.asin=Sd,u.asinh=_d,u.atan=Md,u.atanh=Nd,u.atan2=Id,u.cbrt=xd,u.ceil=Od,u.clamp=Rd,u.cos=Pd,u.cosh=Td,u.div=Ld,u.exp=jd,u.floor=kd,u.hypot=qd,u.ln=Vd,u.log=Ud,u.log10=zd,u.log2=Hd,u.max=Wd,u.min=Zd,u.mod=Xd,u.mul=Gd,u.pow=Jd,u.random=Kd,u.round=Qd,u.sign=Yd,u.sin=ep,u.sinh=tp,u.sqrt=np,u.sub=rp,u.sum=up,u.tan=ip,u.tanh=op,u.trunc=ap,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return u.config(e),u}function Ld(e,t){return new this(e).div(t)}function jd(e){return new this(e).exp()}function kd(e){return T(e=new this(e),e.e+1,3)}function qd(){var e,t,n=new this(0);for(k=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return k=!0,new this(1/0);n=t}return k=!0,n.sqrt()}function Ri(e){return e instanceof bt||e&&e.toStringTag===wi||!1}function Vd(e){return new this(e).ln()}function Ud(e,t){return new this(e).log(t)}function Hd(e){return new this(e).log(2)}function zd(e){return new this(e).log(10)}function Wd(){return Mi(this,arguments,"lt")}function Zd(){return Mi(this,arguments,"gt")}function Xd(e,t){return new this(e).mod(t)}function Gd(e,t){return new this(e).mul(t)}function Jd(e,t){return new this(e).pow(t)}function Kd(e){var t,n,r,u,i=0,o=new this(1),c=[];if(e===void 0?e=this.precision:Ae(e,1,rt),r=Math.ceil(e/j),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)u=t[i],u>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:c[i++]=u%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);i<r;)u=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),u>=214e7?crypto.randomBytes(4).copy(t,i):(c.push(u%1e7),i+=4);i=r/4}else throw Error(Fi);else for(;i<r;)c[i++]=Math.random()*1e7|0;for(r=c[--i],e%=j,r&&e&&(u=ue(10,j-e),c[i]=(r/u|0)*u);c[i]===0;i--)c.pop();if(i<0)n=0,c=[0];else{for(n=-1;c[0]===0;n-=j)c.shift();for(r=1,u=c[0];u>=10;u/=10)r++;r<j&&(n-=j-r)}return o.e=n,o.d=c,o}function Qd(e){return T(e=new this(e),e.e+1,this.rounding)}function Yd(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ep(e){return new this(e).sin()}function tp(e){return new this(e).sinh()}function np(e){return new this(e).sqrt()}function rp(e,t){return new this(e).sub(t)}function up(){var e=0,t=arguments,n=new this(t[e]);for(k=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return k=!0,T(n,this.precision,this.rounding)}function ip(e){return new this(e).tan()}function op(e){return new this(e).tanh()}function ap(e){return T(e=new this(e),e.e+1,1)}w[Symbol.for("nodejs.util.inspect.custom")]=w.toString,w[Symbol.toStringTag]="Decimal";var bt=w.constructor=Oi(qr);wn=new bt(wn),Bn=new bt(Bn);var sp="BigNumber",cp=["?on","config"],fp=Ee(sp,cp,e=>{var{on:t,config:n}=e,r=bt.clone({precision:n.precision,modulo:bt.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(u){return new r(u.value)},t&&t("config",function(u,i){u.precision!==i.precision&&r.config({precision:u.precision})}),r},{isClass:!0}),$i={exports:{}};/**
17
17
  * @license Complex.js v2.1.1 12/05/2020
18
18
  *
19
19
  * Copyright (c) 2020, Robert Eisele (robert@xarg.org)
20
20
  * Dual licensed under the MIT or GPL Version 2 licenses.
21
- **/(function(e,t){(function(n){var r=Math.cosh||function(a){return Math.abs(a)<1e-9?1-a:(Math.exp(a)+Math.exp(-a))*.5},u=Math.sinh||function(a){return Math.abs(a)<1e-9?a:(Math.exp(a)-Math.exp(-a))*.5},i=function(a){var h=Math.PI/4;if(-h>a||a>h)return Math.cos(a)-1;var d=a*a;return d*(d*(d*(d*(d*(d*(d*(d/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},o=function(a,h){var d=Math.abs(a),p=Math.abs(h);return d<3e3&&p<3e3?Math.sqrt(d*d+p*p):(d<p?(d=p,p=a/h):p=h/a,d*Math.sqrt(1+p*p))},c=function(){throw SyntaxError("Invalid Param")};function s(a,h){var d=Math.abs(a),p=Math.abs(h);return a===0?Math.log(p):h===0?Math.log(d):d<3e3&&p<3e3?Math.log(a*a+h*h)*.5:(a=a/2,h=h/2,.5*Math.log(a*a+h*h)+Math.LN2)}var l=function(a,h){var d={re:0,im:0};if(a==null)d.re=d.im=0;else if(h!==void 0)d.re=a,d.im=h;else switch(typeof a){case"object":if("im"in a&&"re"in a)d.re=a.re,d.im=a.im;else if("abs"in a&&"arg"in a){if(!Number.isFinite(a.abs)&&Number.isFinite(a.arg))return f.INFINITY;d.re=a.abs*Math.cos(a.arg),d.im=a.abs*Math.sin(a.arg)}else if("r"in a&&"phi"in a){if(!Number.isFinite(a.r)&&Number.isFinite(a.phi))return f.INFINITY;d.re=a.r*Math.cos(a.phi),d.im=a.r*Math.sin(a.phi)}else a.length===2?(d.re=a[0],d.im=a[1]):c();break;case"string":d.im=d.re=0;var p=a.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),D=1,m=0;p===null&&c();for(var g=0;g<p.length;g++){var E=p[g];E===" "||E===" "||E===`
22
- `||(E==="+"?D++:E==="-"?m++:E==="i"||E==="I"?(D+m===0&&c(),p[g+1]!==" "&&!isNaN(p[g+1])?(d.im+=parseFloat((m%2?"-":"")+p[g+1]),g++):d.im+=parseFloat((m%2?"-":"")+"1"),D=m=0):((D+m===0||isNaN(E))&&c(),p[g+1]==="i"||p[g+1]==="I"?(d.im+=parseFloat((m%2?"-":"")+E),g++):d.re+=parseFloat((m%2?"-":"")+E),D=m=0))}D+m>0&&c();break;case"number":d.im=0,d.re=a;break;default:c()}return isNaN(d.re)||isNaN(d.im),d};function f(a,h){if(!(this instanceof f))return new f(a,h);var d=l(a,h);this.re=d.re,this.im=d.im}f.prototype={re:0,im:0,sign:function(){var a=this.abs();return new f(this.re/a,this.im/a)},add:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re+d.re,this.im+d.im)},sub:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re-d.re,this.im-d.im)},mul:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isZero()||this.isZero()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:d.im===0&&this.im===0?new f(this.re*d.re,0):new f(this.re*d.re-this.im*d.im,this.re*d.im+this.im*d.re)},div:function(a,h){var d=new f(a,h);if(this.isZero()&&d.isZero()||this.isInfinite()&&d.isInfinite())return f.NAN;if(this.isInfinite()||d.isZero())return f.INFINITY;if(this.isZero()||d.isInfinite())return f.ZERO;a=this.re,h=this.im;var p=d.re,D=d.im,m,g;return D===0?new f(a/p,h/p):Math.abs(p)<Math.abs(D)?(g=p/D,m=p*g+D,new f((a*g+h)/m,(h*g-a)/m)):(g=D/p,m=D*g+p,new f((a+h*g)/m,(h-a*g)/m))},pow:function(a,h){var d=new f(a,h);if(a=this.re,h=this.im,d.isZero())return f.ONE;if(d.im===0){if(h===0&&a>0)return new f(Math.pow(a,d.re),0);if(a===0)switch((d.re%4+4)%4){case 0:return new f(Math.pow(h,d.re),0);case 1:return new f(0,Math.pow(h,d.re));case 2:return new f(-Math.pow(h,d.re),0);case 3:return new f(0,-Math.pow(h,d.re))}}if(a===0&&h===0&&d.re>0&&d.im>=0)return f.ZERO;var p=Math.atan2(h,a),D=s(a,h);return a=Math.exp(d.re*D-d.im*p),h=d.im*D+d.re*p,new f(a*Math.cos(h),a*Math.sin(h))},sqrt:function(){var a=this.re,h=this.im,d=this.abs(),p,D;if(a>=0){if(h===0)return new f(Math.sqrt(a),0);p=.5*Math.sqrt(2*(d+a))}else p=Math.abs(h)/Math.sqrt(2*(d-a));return a<=0?D=.5*Math.sqrt(2*(d-a)):D=Math.abs(h)/Math.sqrt(2*(d+a)),new f(p,h<0?-D:D)},exp:function(){var a=Math.exp(this.re);return this.im,new f(a*Math.cos(this.im),a*Math.sin(this.im))},expm1:function(){var a=this.re,h=this.im;return new f(Math.expm1(a)*Math.cos(h)+i(h),Math.exp(a)*Math.sin(h))},log:function(){var a=this.re,h=this.im;return new f(s(a,h),Math.atan2(h,a))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var a=this.re,h=this.im;return new f(Math.sin(a)*r(h),Math.cos(a)*u(h))},cos:function(){var a=this.re,h=this.im;return new f(Math.cos(a)*r(h),-Math.sin(a)*u(h))},tan:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)+r(h);return new f(Math.sin(a)/d,u(h)/d)},cot:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)-r(h);return new f(-Math.sin(a)/d,u(h)/d)},sec:function(){var a=this.re,h=this.im,d=.5*r(2*h)+.5*Math.cos(2*a);return new f(Math.cos(a)*r(h)/d,Math.sin(a)*u(h)/d)},csc:function(){var a=this.re,h=this.im,d=.5*r(2*h)-.5*Math.cos(2*a);return new f(Math.sin(a)*r(h)/d,-Math.cos(a)*u(h)/d)},asin:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(p.im,-p.re)},acos:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(Math.PI/2-p.im,p.re)},atan:function(){var a=this.re,h=this.im;if(a===0){if(h===1)return new f(0,1/0);if(h===-1)return new f(0,-1/0)}var d=a*a+(1-h)*(1-h),p=new f((1-h*h-a*a)/d,-2*a/d).log();return new f(-.5*p.im,.5*p.re)},acot:function(){var a=this.re,h=this.im;if(h===0)return new f(Math.atan2(1,a),0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atan():new f(a!==0?a/0:0,h!==0?-h/0:0).atan()},asec:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acos():new f(a!==0?a/0:0,h!==0?-h/0:0).acos()},acsc:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(Math.PI/2,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asin():new f(a!==0?a/0:0,h!==0?-h/0:0).asin()},sinh:function(){var a=this.re,h=this.im;return new f(u(a)*Math.cos(h),r(a)*Math.sin(h))},cosh:function(){var a=this.re,h=this.im;return new f(r(a)*Math.cos(h),u(a)*Math.sin(h))},tanh:function(){var a=2*this.re,h=2*this.im,d=r(a)+Math.cos(h);return new f(u(a)/d,Math.sin(h)/d)},coth:function(){var a=2*this.re,h=2*this.im,d=r(a)-Math.cos(h);return new f(u(a)/d,-Math.sin(h)/d)},csch:function(){var a=this.re,h=this.im,d=Math.cos(2*h)-r(2*a);return new f(-2*u(a)*Math.cos(h)/d,2*r(a)*Math.sin(h)/d)},sech:function(){var a=this.re,h=this.im,d=Math.cos(2*h)+r(2*a);return new f(2*r(a)*Math.cos(h)/d,-2*u(a)*Math.sin(h)/d)},asinh:function(){var a=this.im;this.im=-this.re,this.re=a;var h=this.asin();return this.re=-this.im,this.im=a,a=h.re,h.re=-h.im,h.im=a,h},acosh:function(){var a=this.acos();if(a.im<=0){var h=a.re;a.re=-a.im,a.im=h}else{var h=a.im;a.im=-a.re,a.re=h}return a},atanh:function(){var a=this.re,h=this.im,d=a>1&&h===0,p=1-a,D=1+a,m=p*p+h*h,g=m!==0?new f((D*p-h*h)/m,(h*p+D*h)/m):new f(a!==-1?a/0:0,h!==0?h/0:0),E=g.re;return g.re=s(g.re,g.im)/2,g.im=Math.atan2(g.im,E)/2,d&&(g.im=-g.im),g},acoth:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,Math.PI/2);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atanh():new f(a!==0?a/0:0,h!==0?-h/0:0).atanh()},acsch:function(){var a=this.re,h=this.im;if(h===0)return new f(a!==0?Math.log(a+Math.sqrt(a*a+1)):1/0,0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asinh():new f(a!==0?a/0:0,h!==0?-h/0:0).asinh()},asech:function(){var a=this.re,h=this.im;if(this.isZero())return f.INFINITY;var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acosh():new f(a!==0?a/0:0,h!==0?-h/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var a=this.re,h=this.im,d=a*a+h*h;return new f(a/d,-h/d)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(a){return a=Math.pow(10,a||0),new f(Math.ceil(this.re*a)/a,Math.ceil(this.im*a)/a)},floor:function(a){return a=Math.pow(10,a||0),new f(Math.floor(this.re*a)/a,Math.floor(this.im*a)/a)},round:function(a){return a=Math.pow(10,a||0),new f(Math.round(this.re*a)/a,Math.round(this.im*a)/a)},equals:function(a,h){var d=new f(a,h);return Math.abs(d.re-this.re)<=f.EPSILON&&Math.abs(d.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var a=this.re,h=this.im,d="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(a)<f.EPSILON&&(a=0),Math.abs(h)<f.EPSILON&&(h=0),h===0?d+a:(a!==0?(d+=a,d+=" ",h<0?(h=-h,d+="-"):d+="+",d+=" "):h<0&&(h=-h,d+="-"),h!==1&&(d+=h),d+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},f.ZERO=new f(0,0),f.ONE=new f(1,0),f.I=new f(0,1),f.PI=new f(Math.PI,0),f.E=new f(Math.E,0),f.INFINITY=new f(1/0,1/0),f.NAN=new f(NaN,NaN),f.EPSILON=1e-15,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.Complex=f,e.exports=f})()})($i);var fe=uu($i.exports),sp="Complex",cp=[],fp=Ee(sp,cp,()=>(Object.defineProperty(fe,"name",{value:"Complex"}),fe.prototype.constructor=fe,fe.prototype.type="Complex",fe.prototype.isComplex=!0,fe.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},fe.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},fe.prototype.format=function(e){var t="",n=this.im,r=this.re,u=Or(this.re,e),i=Or(this.im,e),o=ge(e)?e:e?e.precision:null;if(o!==null){var c=Math.pow(10,-o);Math.abs(r/n)<c&&(r=0),Math.abs(n/r)<c&&(n=0)}return n===0?t=u:r===0?n===1?t="i":n===-1?t="-i":t=i+"i":n<0?n===-1?t=u+" - i":t=u+" - "+i.substring(1)+"i":n===1?t=u+" + i":t=u+" + "+i+"i",t},fe.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return fe(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var n=arguments[0],r=arguments[1];if(ge(n)){if(ti(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),ge(r))return new fe({r:n,phi:r});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},fe.prototype.valueOf=fe.prototype.toString,fe.fromJSON=function(e){return new fe(e)},fe.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},fe),{isClass:!0}),Pi={exports:{}};/**
21
+ **/(function(e,t){(function(n){var r=Math.cosh||function(a){return Math.abs(a)<1e-9?1-a:(Math.exp(a)+Math.exp(-a))*.5},u=Math.sinh||function(a){return Math.abs(a)<1e-9?a:(Math.exp(a)-Math.exp(-a))*.5},i=function(a){var h=Math.PI/4;if(-h>a||a>h)return Math.cos(a)-1;var d=a*a;return d*(d*(d*(d*(d*(d*(d*(d/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},o=function(a,h){var d=Math.abs(a),p=Math.abs(h);return d<3e3&&p<3e3?Math.sqrt(d*d+p*p):(d<p?(d=p,p=a/h):p=h/a,d*Math.sqrt(1+p*p))},c=function(){throw SyntaxError("Invalid Param")};function s(a,h){var d=Math.abs(a),p=Math.abs(h);return a===0?Math.log(p):h===0?Math.log(d):d<3e3&&p<3e3?Math.log(a*a+h*h)*.5:(a=a/2,h=h/2,.5*Math.log(a*a+h*h)+Math.LN2)}var l=function(a,h){var d={re:0,im:0};if(a==null)d.re=d.im=0;else if(h!==void 0)d.re=a,d.im=h;else switch(typeof a){case"object":if("im"in a&&"re"in a)d.re=a.re,d.im=a.im;else if("abs"in a&&"arg"in a){if(!Number.isFinite(a.abs)&&Number.isFinite(a.arg))return f.INFINITY;d.re=a.abs*Math.cos(a.arg),d.im=a.abs*Math.sin(a.arg)}else if("r"in a&&"phi"in a){if(!Number.isFinite(a.r)&&Number.isFinite(a.phi))return f.INFINITY;d.re=a.r*Math.cos(a.phi),d.im=a.r*Math.sin(a.phi)}else a.length===2?(d.re=a[0],d.im=a[1]):c();break;case"string":d.im=d.re=0;var p=a.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),D=1,v=0;p===null&&c();for(var g=0;g<p.length;g++){var E=p[g];E===" "||E===" "||E===`
22
+ `||(E==="+"?D++:E==="-"?v++:E==="i"||E==="I"?(D+v===0&&c(),p[g+1]!==" "&&!isNaN(p[g+1])?(d.im+=parseFloat((v%2?"-":"")+p[g+1]),g++):d.im+=parseFloat((v%2?"-":"")+"1"),D=v=0):((D+v===0||isNaN(E))&&c(),p[g+1]==="i"||p[g+1]==="I"?(d.im+=parseFloat((v%2?"-":"")+E),g++):d.re+=parseFloat((v%2?"-":"")+E),D=v=0))}D+v>0&&c();break;case"number":d.im=0,d.re=a;break;default:c()}return isNaN(d.re)||isNaN(d.im),d};function f(a,h){if(!(this instanceof f))return new f(a,h);var d=l(a,h);this.re=d.re,this.im=d.im}f.prototype={re:0,im:0,sign:function(){var a=this.abs();return new f(this.re/a,this.im/a)},add:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re+d.re,this.im+d.im)},sub:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re-d.re,this.im-d.im)},mul:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isZero()||this.isZero()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:d.im===0&&this.im===0?new f(this.re*d.re,0):new f(this.re*d.re-this.im*d.im,this.re*d.im+this.im*d.re)},div:function(a,h){var d=new f(a,h);if(this.isZero()&&d.isZero()||this.isInfinite()&&d.isInfinite())return f.NAN;if(this.isInfinite()||d.isZero())return f.INFINITY;if(this.isZero()||d.isInfinite())return f.ZERO;a=this.re,h=this.im;var p=d.re,D=d.im,v,g;return D===0?new f(a/p,h/p):Math.abs(p)<Math.abs(D)?(g=p/D,v=p*g+D,new f((a*g+h)/v,(h*g-a)/v)):(g=D/p,v=D*g+p,new f((a+h*g)/v,(h-a*g)/v))},pow:function(a,h){var d=new f(a,h);if(a=this.re,h=this.im,d.isZero())return f.ONE;if(d.im===0){if(h===0&&a>0)return new f(Math.pow(a,d.re),0);if(a===0)switch((d.re%4+4)%4){case 0:return new f(Math.pow(h,d.re),0);case 1:return new f(0,Math.pow(h,d.re));case 2:return new f(-Math.pow(h,d.re),0);case 3:return new f(0,-Math.pow(h,d.re))}}if(a===0&&h===0&&d.re>0&&d.im>=0)return f.ZERO;var p=Math.atan2(h,a),D=s(a,h);return a=Math.exp(d.re*D-d.im*p),h=d.im*D+d.re*p,new f(a*Math.cos(h),a*Math.sin(h))},sqrt:function(){var a=this.re,h=this.im,d=this.abs(),p,D;if(a>=0){if(h===0)return new f(Math.sqrt(a),0);p=.5*Math.sqrt(2*(d+a))}else p=Math.abs(h)/Math.sqrt(2*(d-a));return a<=0?D=.5*Math.sqrt(2*(d-a)):D=Math.abs(h)/Math.sqrt(2*(d+a)),new f(p,h<0?-D:D)},exp:function(){var a=Math.exp(this.re);return this.im,new f(a*Math.cos(this.im),a*Math.sin(this.im))},expm1:function(){var a=this.re,h=this.im;return new f(Math.expm1(a)*Math.cos(h)+i(h),Math.exp(a)*Math.sin(h))},log:function(){var a=this.re,h=this.im;return new f(s(a,h),Math.atan2(h,a))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var a=this.re,h=this.im;return new f(Math.sin(a)*r(h),Math.cos(a)*u(h))},cos:function(){var a=this.re,h=this.im;return new f(Math.cos(a)*r(h),-Math.sin(a)*u(h))},tan:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)+r(h);return new f(Math.sin(a)/d,u(h)/d)},cot:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)-r(h);return new f(-Math.sin(a)/d,u(h)/d)},sec:function(){var a=this.re,h=this.im,d=.5*r(2*h)+.5*Math.cos(2*a);return new f(Math.cos(a)*r(h)/d,Math.sin(a)*u(h)/d)},csc:function(){var a=this.re,h=this.im,d=.5*r(2*h)-.5*Math.cos(2*a);return new f(Math.sin(a)*r(h)/d,-Math.cos(a)*u(h)/d)},asin:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(p.im,-p.re)},acos:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(Math.PI/2-p.im,p.re)},atan:function(){var a=this.re,h=this.im;if(a===0){if(h===1)return new f(0,1/0);if(h===-1)return new f(0,-1/0)}var d=a*a+(1-h)*(1-h),p=new f((1-h*h-a*a)/d,-2*a/d).log();return new f(-.5*p.im,.5*p.re)},acot:function(){var a=this.re,h=this.im;if(h===0)return new f(Math.atan2(1,a),0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atan():new f(a!==0?a/0:0,h!==0?-h/0:0).atan()},asec:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acos():new f(a!==0?a/0:0,h!==0?-h/0:0).acos()},acsc:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(Math.PI/2,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asin():new f(a!==0?a/0:0,h!==0?-h/0:0).asin()},sinh:function(){var a=this.re,h=this.im;return new f(u(a)*Math.cos(h),r(a)*Math.sin(h))},cosh:function(){var a=this.re,h=this.im;return new f(r(a)*Math.cos(h),u(a)*Math.sin(h))},tanh:function(){var a=2*this.re,h=2*this.im,d=r(a)+Math.cos(h);return new f(u(a)/d,Math.sin(h)/d)},coth:function(){var a=2*this.re,h=2*this.im,d=r(a)-Math.cos(h);return new f(u(a)/d,-Math.sin(h)/d)},csch:function(){var a=this.re,h=this.im,d=Math.cos(2*h)-r(2*a);return new f(-2*u(a)*Math.cos(h)/d,2*r(a)*Math.sin(h)/d)},sech:function(){var a=this.re,h=this.im,d=Math.cos(2*h)+r(2*a);return new f(2*r(a)*Math.cos(h)/d,-2*u(a)*Math.sin(h)/d)},asinh:function(){var a=this.im;this.im=-this.re,this.re=a;var h=this.asin();return this.re=-this.im,this.im=a,a=h.re,h.re=-h.im,h.im=a,h},acosh:function(){var a=this.acos();if(a.im<=0){var h=a.re;a.re=-a.im,a.im=h}else{var h=a.im;a.im=-a.re,a.re=h}return a},atanh:function(){var a=this.re,h=this.im,d=a>1&&h===0,p=1-a,D=1+a,v=p*p+h*h,g=v!==0?new f((D*p-h*h)/v,(h*p+D*h)/v):new f(a!==-1?a/0:0,h!==0?h/0:0),E=g.re;return g.re=s(g.re,g.im)/2,g.im=Math.atan2(g.im,E)/2,d&&(g.im=-g.im),g},acoth:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,Math.PI/2);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atanh():new f(a!==0?a/0:0,h!==0?-h/0:0).atanh()},acsch:function(){var a=this.re,h=this.im;if(h===0)return new f(a!==0?Math.log(a+Math.sqrt(a*a+1)):1/0,0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asinh():new f(a!==0?a/0:0,h!==0?-h/0:0).asinh()},asech:function(){var a=this.re,h=this.im;if(this.isZero())return f.INFINITY;var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acosh():new f(a!==0?a/0:0,h!==0?-h/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var a=this.re,h=this.im,d=a*a+h*h;return new f(a/d,-h/d)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(a){return a=Math.pow(10,a||0),new f(Math.ceil(this.re*a)/a,Math.ceil(this.im*a)/a)},floor:function(a){return a=Math.pow(10,a||0),new f(Math.floor(this.re*a)/a,Math.floor(this.im*a)/a)},round:function(a){return a=Math.pow(10,a||0),new f(Math.round(this.re*a)/a,Math.round(this.im*a)/a)},equals:function(a,h){var d=new f(a,h);return Math.abs(d.re-this.re)<=f.EPSILON&&Math.abs(d.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var a=this.re,h=this.im,d="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(a)<f.EPSILON&&(a=0),Math.abs(h)<f.EPSILON&&(h=0),h===0?d+a:(a!==0?(d+=a,d+=" ",h<0?(h=-h,d+="-"):d+="+",d+=" "):h<0&&(h=-h,d+="-"),h!==1&&(d+=h),d+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},f.ZERO=new f(0,0),f.ONE=new f(1,0),f.I=new f(0,1),f.PI=new f(Math.PI,0),f.E=new f(Math.E,0),f.INFINITY=new f(1/0,1/0),f.NAN=new f(NaN,NaN),f.EPSILON=1e-15,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.Complex=f,e.exports=f})()})($i);var fe=uu($i.exports),lp="Complex",hp=[],dp=Ee(lp,hp,()=>(Object.defineProperty(fe,"name",{value:"Complex"}),fe.prototype.constructor=fe,fe.prototype.type="Complex",fe.prototype.isComplex=!0,fe.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},fe.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},fe.prototype.format=function(e){var t="",n=this.im,r=this.re,u=Or(this.re,e),i=Or(this.im,e),o=ge(e)?e:e?e.precision:null;if(o!==null){var c=Math.pow(10,-o);Math.abs(r/n)<c&&(r=0),Math.abs(n/r)<c&&(n=0)}return n===0?t=u:r===0?n===1?t="i":n===-1?t="-i":t=i+"i":n<0?n===-1?t=u+" - i":t=u+" - "+i.substring(1)+"i":n===1?t=u+" + i":t=u+" + "+i+"i",t},fe.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return fe(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var n=arguments[0],r=arguments[1];if(ge(n)){if(ti(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),ge(r))return new fe({r:n,phi:r});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},fe.prototype.valueOf=fe.prototype.toString,fe.fromJSON=function(e){return new fe(e)},fe.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},fe),{isClass:!0}),Pi={exports:{}};/**
23
23
  * @license Fraction.js v4.2.0 05/03/2022
24
24
  * https://www.xarg.org/2014/03/rational-numbers-in-javascript/
25
25
  *
26
26
  * Copyright (c) 2021, Robert Eisele (robert@xarg.org)
27
27
  * Dual licensed under the MIT or GPL Version 2 licenses.
28
- **/(function(e,t){(function(n){var r=2e3,u={s:1,n:0,d:1};function i(p,D){if(isNaN(p=parseInt(p,10)))throw d.InvalidParameter;return p*D}function o(p,D){if(D===0)throw d.DivisionByZero;var m=Object.create(d.prototype);m.s=p<0?-1:1,p=p<0?-p:p;var g=h(p,D);return m.n=p/g,m.d=D/g,m}function c(p){for(var D={},m=p,g=2,E=4;E<=m;){for(;m%g===0;)m/=g,D[g]=(D[g]||0)+1;E+=1+2*g++}return m!==p?m>1&&(D[m]=(D[m]||0)+1):D[p]=(D[p]||0)+1,D}var s=function(p,D){var m=0,g=1,E=1,b=0,C=0,x=0,$=1,P=1,M=0,R=1,W=1,k=1,Q=1e7,K;if(p!=null)if(D!==void 0){if(m=p,g=D,E=m*g,m%1!==0||g%1!==0)throw d.NonIntegerParameter}else switch(typeof p){case"object":{if("d"in p&&"n"in p)m=p.n,g=p.d,"s"in p&&(m*=p.s);else if(0 in p)m=p[0],1 in p&&(g=p[1]);else throw d.InvalidParameter;E=m*g;break}case"number":{if(p<0&&(E=p,p=-p),p%1===0)m=p;else if(p>0){for(p>=1&&(P=Math.pow(10,Math.floor(1+Math.log(p)/Math.LN10)),p/=P);R<=Q&&k<=Q;)if(K=(M+W)/(R+k),p===K){R+k<=Q?(m=M+W,g=R+k):k>R?(m=W,g=k):(m=M,g=R);break}else p>K?(M+=W,R+=k):(W+=M,k+=R),R>Q?(m=W,g=k):(m=M,g=R);m*=P}else(isNaN(p)||isNaN(D))&&(g=m=NaN);break}case"string":{if(R=p.match(/\d+|./g),R===null)throw d.InvalidParameter;if(R[M]==="-"?(E=-1,M++):R[M]==="+"&&M++,R.length===M+1?C=i(R[M++],E):R[M+1]==="."||R[M]==="."?(R[M]!=="."&&(b=i(R[M++],E)),M++,(M+1===R.length||R[M+1]==="("&&R[M+3]===")"||R[M+1]==="'"&&R[M+3]==="'")&&(C=i(R[M],E),$=Math.pow(10,R[M].length),M++),(R[M]==="("&&R[M+2]===")"||R[M]==="'"&&R[M+2]==="'")&&(x=i(R[M+1],E),P=Math.pow(10,R[M+1].length)-1,M+=3)):R[M+1]==="/"||R[M+1]===":"?(C=i(R[M],E),$=i(R[M+2],1),M+=3):R[M+3]==="/"&&R[M+1]===" "&&(b=i(R[M],E),C=i(R[M+2],E),$=i(R[M+4],1),M+=5),R.length<=M){g=$*P,E=m=x+g*b+P*C;break}}default:throw d.InvalidParameter}if(g===0)throw d.DivisionByZero;u.s=E<0?-1:1,u.n=Math.abs(m),u.d=Math.abs(g)};function l(p,D,m){for(var g=1;D>0;p=p*p%m,D>>=1)D&1&&(g=g*p%m);return g}function f(p,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var m=10%D,g=1;m!==1;g++)if(m=m*10%D,g>r)return 0;return g}function a(p,D,m){for(var g=1,E=l(10,m,D),b=0;b<300;b++){if(g===E)return b;g=g*10%D,E=E*10%D}return 0}function h(p,D){if(!p)return D;if(!D)return p;for(;;){if(p%=D,!p)return D;if(D%=p,!D)return p}}function d(p,D){if(s(p,D),this instanceof d)p=h(u.d,u.n),this.s=u.s,this.n=u.n/p,this.d=u.d/p;else return o(u.s*u.n,u.d)}d.DivisionByZero=new Error("Division by Zero"),d.InvalidParameter=new Error("Invalid argument"),d.NonIntegerParameter=new Error("Parameters must be integer"),d.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(p,D){return s(p,D),o(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(p,D){return s(p,D),o(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(p,D){if(isNaN(this.n)||isNaN(this.d))return new d(NaN);if(p===void 0)return o(this.s*this.n%this.d,1);if(s(p,D),u.n===0&&this.d===0)throw d.DivisionByZero;return o(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(p,D){return s(p,D),o(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(p,D){return s(p,D),u.n===0&&this.n===0?o(0,1):o(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.ceil(p*this.s*this.n/this.d),p)},floor:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.floor(p*this.s*this.n/this.d),p)},round:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.round(p*this.s*this.n/this.d),p)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(p,D){if(s(p,D),u.d===1)return u.s<0?o(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):o(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var m=c(this.n),g=c(this.d),E=1,b=1;for(var C in m)if(C!=="1"){if(C==="0"){E=0;break}if(m[C]*=u.n,m[C]%u.d===0)m[C]/=u.d;else return null;E*=Math.pow(C,m[C])}for(var C in g)if(C!=="1"){if(g[C]*=u.n,g[C]%u.d===0)g[C]/=u.d;else return null;b*=Math.pow(C,g[C])}return u.s<0?o(b,E):o(E,b)},equals:function(p,D){return s(p,D),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(p,D){s(p,D);var m=this.s*this.n*u.d-u.s*u.n*this.d;return(0<m)-(m<0)},simplify:function(p){if(isNaN(this.n)||isNaN(this.d))return this;p=p||.001;for(var D=this.abs(),m=D.toContinued(),g=1;g<m.length;g++){for(var E=o(m[g-1],1),b=g-2;b>=0;b--)E=E.inverse().add(m[b]);if(E.sub(D).abs().valueOf()<p)return E.mul(this.s)}return this},divisible:function(p,D){return s(p,D),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(p){var D,m="",g=this.n,E=this.d;return this.s<0&&(m+="-"),E===1?m+=g:(p&&(D=Math.floor(g/E))>0&&(m+=D,m+=" ",g%=E),m+=g,m+="/",m+=E),m},toLatex:function(p){var D,m="",g=this.n,E=this.d;return this.s<0&&(m+="-"),E===1?m+=g:(p&&(D=Math.floor(g/E))>0&&(m+=D,g%=E),m+="\\frac{",m+=g,m+="}{",m+=E,m+="}"),m},toContinued:function(){var p,D=this.n,m=this.d,g=[];if(isNaN(D)||isNaN(m))return g;do g.push(Math.floor(D/m)),p=D%m,D=m,m=p;while(D!==1);return g},toString:function(p){var D=this.n,m=this.d;if(isNaN(D)||isNaN(m))return"NaN";p=p||15;var g=f(D,m),E=a(D,m,g),b=this.s<0?"-":"";if(b+=D/m|0,D%=m,D*=10,D&&(b+="."),g){for(var C=E;C--;)b+=D/m|0,D%=m,D*=10;b+="(";for(var C=g;C--;)b+=D/m|0,D%=m,D*=10;b+=")"}else for(var C=p;D&&C--;)b+=D/m|0,D%=m,D*=10;return b}},Object.defineProperty(d,"__esModule",{value:!0}),d.default=d,d.Fraction=d,e.exports=d})()})(Pi);var Je=uu(Pi.exports),lp="Fraction",hp=[],dp=Ee(lp,hp,()=>(Object.defineProperty(Je,"name",{value:"Fraction"}),Je.prototype.constructor=Je,Je.prototype.type="Fraction",Je.prototype.isFraction=!0,Je.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Je.fromJSON=function(e){return new Je(e)},Je),{isClass:!0}),pp="Matrix",Dp=[],gp=Ee(pp,Dp,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,n){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,n,r){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,n){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,n){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,n){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function vp(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var mp="DenseMatrix",yp=["Matrix"],Ep=Ee(mp,yp,e=>{var{Matrix:t}=e;function n(f,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!yn(a))throw new Error("Invalid datatype: "+a);if(Ut(f))f.type==="DenseMatrix"?(this._data=ft(f._data),this._size=ft(f._size),this._datatype=a||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=a||f._datatype);else if(f&&Se(f.data)&&Se(f.size))this._data=f.data,this._size=f.size,di(this._data,this._size),this._datatype=a||f.datatype;else if(Se(f))this._data=l(f),this._size=$r(this._data),di(this._data,this._size),this._datatype=a;else{if(f)throw new TypeError("Unsupported type of data ("+Nr(f)+")");this._data=[],this._size=[0],this._datatype=a}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,a){return new n(f,a)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Tr(this._data,Nr)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,a){return new n(f,a)},n.prototype.subset=function(f,a,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return i(this,f,a,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!Se(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new ae(f.length,this._size.length);for(var a=0;a<f.length;a++)Ne(f[a],this._size[a]);for(var h=this._data,d=0,p=f.length;d<p;d++){var D=f[d];Ne(D,h.length),h=h[D]}return h},n.prototype.set=function(f,a,h){if(!Se(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new ae(f.length,this._size.length,"<");var d,p,D,m=f.map(function(E){return E+1});s(this,m,h);var g=this._data;for(d=0,p=f.length-1;d<p;d++)D=f[d],Ne(D,g.length),g=g[D];return D=f[f.length-1],Ne(D,g.length),g[D]=a,this};function r(f,a){if(!ni(a))throw new TypeError("Invalid index");var h=a.isScalar();if(h)return f.get(a.min());var d=a.size();if(d.length!==f._size.length)throw new ae(d.length,f._size.length);for(var p=a.min(),D=a.max(),m=0,g=f._size.length;m<g;m++)Ne(p[m],f._size[m]),Ne(D[m],f._size[m]);return new n(u(f._data,a,d.length,0),f._datatype)}function u(f,a,h,d){var p=d===h-1,D=a.dimension(d);return p?D.map(function(m){return Ne(m,f.length),f[m]}).valueOf():D.map(function(m){Ne(m,f.length);var g=f[m];return u(g,a,h,d+1)}).valueOf()}function i(f,a,h,d){if(!a||a.isIndex!==!0)throw new TypeError("Invalid index");var p=a.size(),D=a.isScalar(),m;if(Ut(h)?(m=h.size(),h=h.valueOf()):m=$r(h),D){if(m.length!==0)throw new TypeError("Scalar expected");f.set(a.min(),h,d)}else{if(p.length<f._size.length)throw new ae(p.length,f._size.length,"<");if(m.length<p.length){for(var g=0,E=0;p[g]===1&&m[g]===1;)g++;for(;p[g]===1;)E++,g++;h=Jh(h,p.length,E,m)}if(!Ir(p,m))throw new ae(p,m,">");var b=a.max().map(function($){return $+1});s(f,b,d);var C=p.length,x=0;o(f._data,a,h,C,x)}return f}function o(f,a,h,d,p){var D=p===d-1,m=a.dimension(p);D?m.forEach(function(g,E){Ne(g),f[g]=h[E[0]]}):m.forEach(function(g,E){Ne(g),o(f[g],a,h[E[0]],d,p+1)})}n.prototype.resize=function(f,a,h){if(!Mr(f))throw new TypeError("Array or Matrix expected");var d=f.valueOf().map(D=>Array.isArray(D)&&D.length===1?D[0]:D),p=h?this.clone():this;return c(p,d,a)};function c(f,a,h){if(a.length===0){for(var d=f._data;Se(d);)d=d[0];return d}return f._size=a.slice(0),f._data=pi(f._data,f._size,h),f}n.prototype.reshape=function(f,a){var h=a?this.clone():this;h._data=Xh(h._data,f);var d=h._size.reduce((p,D)=>p*D);return h._size=Di(f,d),h};function s(f,a,h){for(var d=f._size.slice(0),p=!1;d.length<a.length;)d.push(0),p=!0;for(var D=0,m=a.length;D<m;D++)a[D]>d[D]&&(d[D]=a[D],p=!0);p&&c(f,d,h)}n.prototype.clone=function(){var f=new n({data:ft(this._data),size:ft(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var a=this,h=vp(f),d=function m(g,E){return Se(g)?g.map(function(b,C){return m(b,E.concat(C))}):h===1?f(g):h===2?f(g,E):f(g,E,a)},p=d(this._data,[]),D=this._datatype!==void 0?Tr(p,Nr):void 0;return new n(p,D)},n.prototype.forEach=function(f){var a=this,h=function d(p,D){Se(p)?p.forEach(function(m,g){d(m,D.concat(g))}):f(p,D,a)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*a(h,d){if(Se(h))for(var p=0;p<h.length;p++)yield*a(h[p],d.concat(p));else yield{value:h,index:d}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],a=this.size();if(a.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var d of h)f.push(new n([d],this._datatype));return f},n.prototype.columns=function(){var f=this,a=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,p=function(g){var E=d.map(b=>[b[g]]);a.push(new n(E,f._datatype))},D=0;D<h[1];D++)p(D);return a},n.prototype.toArray=function(){return ft(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return lt(this._data,f)},n.prototype.toString=function(){return lt(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(nt(f)&&(f=f.toNumber()),!ge(f)||!He(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var a=f>0?f:0,h=f<0?-f:0,d=this._size[0],p=this._size[1],D=Math.min(d-h,p-a),m=[],g=0;g<D;g++)m[g]=this._data[g+h][g+a];return new n({data:m,size:[D],datatype:this._datatype})},n.diagonal=function(f,a,h,d){if(!Se(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(P){if(nt(P)&&(P=P.toNumber()),!ge(P)||!He(P)||P<1)throw new Error("Size values must be positive integers");return P}),h){if(nt(h)&&(h=h.toNumber()),!ge(h)||!He(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var p=h>0?h:0,D=h<0?-h:0,m=f[0],g=f[1],E=Math.min(m-D,g-p),b;if(Se(a)){if(a.length!==E)throw new Error("Invalid value array length");b=function(M){return a[M]}}else if(Ut(a)){var C=a.size();if(C.length!==1||C[0]!==E)throw new Error("Invalid matrix length");b=function(M){return a.get([M])}}else b=function(){return a};d||(d=nt(b(0))?b(0).mul(0):0);var x=[];if(f.length>0){x=pi(x,f,d);for(var $=0;$<E;$++)x[$+D][$+p]=b($)}return new n({data:x,size:[m,g]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,a){if(!ge(f)||!He(f)||!ge(a)||!He(a))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Ne(f,this._size[0]),Ne(a,this._size[0]),n._swapRows(f,a,this._data),this},n._swapRows=function(f,a,h){var d=h[f];h[f]=h[a],h[a]=d};function l(f){for(var a=0,h=f.length;a<h;a++){var d=f[a];Se(d)?f[a]=l(d):d&&d.isMatrix===!0&&(f[a]=l(d.valueOf()))}return f}return n},{isClass:!0}),Ti="equalScalar";Ee(Ti,["typed","config"],e=>{var{typed:t,config:n}=e;return t(Ti,{"number, number":function(u,i){return Vh(u,i,n.epsilon)}})});function zt(e,t,n,r){if(!(this instanceof zt))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(r!=null?"-"+r:"")+" expected)",this.stack=new Error().stack}zt.prototype=new Error,zt.prototype.constructor=Error,zt.prototype.name="ArgumentsError",zt.prototype.isArgumentsError=!0;var Li="format",Ap=["typed"],Cp=Ee(Li,Ap,e=>{var{typed:t}=e;return t(Li,{any:lt,"any, Object | function | number":lt})}),ji="bin",Fp=["typed","format"];Ee(ji,Fp,e=>{var{typed:t,format:n}=e;return t(ji,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"bin",wordSize:i})}})});var qi="oct",wp=["typed","format"];Ee(qi,wp,e=>{var{typed:t,format:n}=e;return t(qi,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"oct",wordSize:i})}})});var ki="hex",Bp=["typed","format"];Ee(ki,Bp,e=>{var{typed:t,format:n}=e;return t(ki,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"hex",wordSize:i})}})});var Vi="equal";Ee(Vi,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Vi,{"any, any":function(u,i){return u===null?i===null:i===null?u===null:u===void 0?i===void 0:i===void 0?u===void 0:n(u,i)}})});var Ui="unequal";Ee(Ui,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Ui,{"any, any":function(u,i){return u===null?i!==null:i===null?u!==null:u===void 0?i!==void 0:i===void 0?u!==void 0:!n(u,i)}})});var Hi={exports:{}};(function(e){(function(t,n,r){function u(s){var l=this,f=c();l.next=function(){var a=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=a-(l.c=a|0)},l.c=1,l.s0=f(" "),l.s1=f(" "),l.s2=f(" "),l.s0-=f(s),l.s0<0&&(l.s0+=1),l.s1-=f(s),l.s1<0&&(l.s1+=1),l.s2-=f(s),l.s2<0&&(l.s2+=1),f=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function o(s,l){var f=new u(s),a=l&&l.state,h=f.next;return h.int32=function(){return f.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,a&&(typeof a=="object"&&i(a,f),h.state=function(){return i(f,{})}),h}function c(){var s=4022871197,l=function(f){f=String(f);for(var a=0;a<f.length;a++){s+=f.charCodeAt(a);var h=.02519603282416938*s;s=h>>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return l}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(Qe,e,!1)})(Hi);var zi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var a=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^a^a>>>8},c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(Qe,e,!1)})(zi);var Wi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(a^a<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,f==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s.v=c.v,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(Qe,e,!1)})(Wi);var Zi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.x,a=s.i,h,d;return h=f[a],h^=h>>>7,d=h^h<<24,h=f[a+1&7],d^=h^h>>>10,h=f[a+3&7],d^=h^h>>>3,h=f[a+4&7],d^=h^h<<7,h=f[a+7&7],h=h^h<<13,d^=h^h<<9,f[a]=d,s.i=a+1&7,d};function l(f,a){var h,d=[];if(a===(a|0))d[0]=a;else for(a=""+a,h=0;h<a.length;++h)d[h&7]=d[h&7]<<15^a.charCodeAt(h)+d[h+1&7]<<13;for(;d.length<8;)d.push(0);for(h=0;h<8&&d[h]===0;++h);for(h==8?d[7]=-1:d[h],f.x=d,f.i=0,h=256;h>0;--h)f.next()}l(s,c)}function i(c,s){return s.x=c.x.slice(),s.i=c.i,s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.x&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(Qe,e,!1)})(Zi);var Xi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.w,a=s.X,h=s.i,d,p;return s.w=f=f+1640531527|0,p=a[h+34&127],d=a[h=h+1&127],p^=p<<13,d^=d<<17,p^=p>>>15,d^=d>>>12,p=a[h]=p^d,s.i=h,p+(f^f>>>16)|0};function l(f,a){var h,d,p,D,m,g=[],E=128;for(a===(a|0)?(d=a,a=null):(a=a+"\0",d=0,E=Math.max(E,a.length)),p=0,D=-32;D<E;++D)a&&(d^=a.charCodeAt((D+32)%a.length)),D===0&&(m=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,D>=0&&(m=m+1640531527|0,h=g[D&127]^=d+m,p=h==0?p+1:0);for(p>=128&&(g[(a&&a.length||0)&127]=-1),p=127,D=4*128;D>0;--D)d=g[p+34&127],h=g[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,g[p]=d^h;f.w=m,f.X=g,f.i=p}l(s,c)}function i(c,s){return s.i=c.i,s.w=c.w,s.X=c.X.slice(),s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.X&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(Qe,e,!1)})(Xi);var Gi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.b,h=s.c,d=s.d,p=s.a;return a=a<<25^a>>>7^h,h=h-d|0,d=d<<24^d>>>8^p,p=p-a|0,s.b=a=a<<20^a>>>12^h,s.c=h=h-d|0,s.d=d<<16^h>>>16^p,s.a=p-a|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,c===Math.floor(c)?(s.a=c/4294967296|0,s.b=c|0):l+=c;for(var f=0;f<l.length+20;f++)s.b^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.a=c.a,s.b=c.b,s.c=c.c,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(Qe,e,!1)})(Gi);var Ji={exports:{}};(function(e){(function(t,n,r){var u=256,i=6,o=52,c="random",s=r.pow(u,i),l=r.pow(2,o),f=l*2,a=u-1,h;function d(C,x,$){var P=[];x=x==!0?{entropy:!0}:x||{};var M=g(m(x.entropy?[C,b(n)]:C==null?E():C,3),P),R=new p(P),W=function(){for(var k=R.g(i),Q=s,K=0;k<l;)k=(k+K)*u,Q*=u,K=R.g(1);for(;k>=f;)k/=2,Q/=2,K>>>=1;return(k+K)/Q};return W.int32=function(){return R.g(4)|0},W.quick=function(){return R.g(4)/4294967296},W.double=W,g(b(R.S),n),(x.pass||$||function(k,Q,K,te){return te&&(te.S&&D(te,R),k.state=function(){return D(R,{})}),K?(r[c]=k,Q):k})(W,M,"global"in x?x.global:this==r,x.state)}function p(C){var x,$=C.length,P=this,M=0,R=P.i=P.j=0,W=P.S=[];for($||(C=[$++]);M<u;)W[M]=M++;for(M=0;M<u;M++)W[M]=W[R=a&R+C[M%$]+(x=W[M])],W[R]=x;(P.g=function(k){for(var Q,K=0,te=P.i,Y=P.j,z=P.S;k--;)Q=z[te=a&te+1],K=K*u+z[a&(z[te]=z[Y=a&Y+Q])+(z[Y]=Q)];return P.i=te,P.j=Y,K})(u)}function D(C,x){return x.i=C.i,x.j=C.j,x.S=C.S.slice(),x}function m(C,x){var $=[],P=typeof C,M;if(x&&P=="object")for(M in C)try{$.push(m(C[M],x-1))}catch(R){}return $.length?$:P=="string"?C:C+"\0"}function g(C,x){for(var $=C+"",P,M=0;M<$.length;)x[a&M]=a&(P^=x[a&M]*19)+$.charCodeAt(M++);return b(x)}function E(){try{var C;return h&&(C=h.randomBytes)?C=C(u):(C=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(C)),b(C)}catch(P){var x=t.navigator,$=x&&x.plugins;return[+new Date,t,$,t.screen,b(n)]}}function b(C){return String.fromCharCode.apply(0,C)}if(g(r.random(),n),e.exports){e.exports=d;try{h=Pn.default}catch(C){}}else r["seed"+c]=d})(typeof self!="undefined"?self:Qe,[],Math)})(Ji);var bp=Hi.exports,Sp=zi.exports,_p=Wi.exports,Mp=Zi.exports,Np=Xi.exports,Ip=Gi.exports,St=Ji.exports;St.alea=bp,St.xor128=Sp,St.xorwow=_p,St.xorshift7=Mp,St.xor4096=Np,St.tychei=Ip,In("fineStructure",.0072973525693),In("weakMixingAngle",.2229),In("efimovFactor",22.7),In("sackurTetrode",-1.16487052358);function In(e,t){var n=["config","BigNumber"];return Ee(e,n,r=>{var{config:u,BigNumber:i}=r;return u.number==="BigNumber"?new i(t):t})}var xp=ap({config:ri}),Op=fp({}),Rp=dp({}),$p=gp({}),Pp=Ep({Matrix:$p}),Tp=fd({BigNumber:xp,Complex:Op,DenseMatrix:Pp,Fraction:Rp}),Lp=Cp({typed:Tp});class jp{constructor(t){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=t,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var t;!((t=this.options)!=null&&t.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((n,r)=>(r.is_remember||n.push(...r.hide_controls),n),[]))}getDontHasPermissionControlIds(){var t;!((t=this.options)!=null&&t.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((n,r)=>(r.ctrlBehavior===1&&n.push(r.ctrlId),n),[]))}controlNeedComputedValue(t){if(!t)return!1;const n=this.getControlIsHide(t);return!(this.dontHasPermissionControlIds.includes(t.id)&&n||this.hideNotRememberControlIds.includes(t.id)&&n)}getControlIsHide(t){return t.props.isHide?!0:t.parent===null?!1:this.getControlIsHide(t.parent)}apply(t){this.engine=t,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(t=>this.computedCalcValue(t))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(t=>t.type===X.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===xe.VariableInMainTable||r.type===xe.VariableInCurrentSubTable||r.type===xe.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===xe.VariableInOtherSubTable&&r.subTableId&&this.setDependenciesTriggerMapItem(r.subTableId,t)})})}setDependenciesTriggerMapItem(t,n){this.dependenciesTriggerMap.has(t)||this.dependenciesTriggerMap.set(t,[]);const r=this.dependenciesTriggerMap.get(t);r.includes(n)||r.push(n)}getCalcControlsFromSubtableRows(t){return t.reduce((n,r)=>(r.children.forEach(u=>{const i=u.children[0];i&&this.engine.assertInstance(i,X.CALC)&&n.push(i)}),n),[])}watchSchemaHideChange(){this.engine.on("schema-change",t=>{var n;t.props==="isHide"&&((n=this.dependenciesTriggerMap.get(t.instance.id))!=null?n:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",t=>{var i,o,c;this.resetDependencies();const n=(o=(i=t.options)==null?void 0:i.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(n).forEach(s=>{this.computedCalcValue(s)}),((c=this.dependenciesTriggerMap.get(t.instance.id))!=null?c:[]).forEach(s=>{this.computedCalcValue(s)})})}watchControlChange(){this.engine.on("change",t=>{var u;const{instance:n}=t;if(!this.dependenciesTriggerMap.has(n.id))return;const r=(u=this.dependenciesTriggerMap.get(n.id))!=null?u:[];t.rowIndex!==void 0&&t.rowIndex>-1?r.forEach(i=>{this.controlInSubtable(i)&&this.engine.getInstanceRowIndex(i)!==t.rowIndex||this.computedCalcValue(i)}):r.forEach(i=>{this.computedCalcValue(i)})})}controlInSubtable(t){var n;return((n=t.parent)==null?void 0:n.type)===X.SUBTABLE_COLUMN}computedCalcValue(t){var s;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,f)=>{if(f.type===xe.Operator||f.type===xe.Number)return l+f.name;let a=0,h;switch(f.type){case xe.VariableInMainTable:{const d=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),a=Number(d);break}case xe.VariableInCurrentSubTable:{const d=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,d);const p=this.engine.getState(f.id,d),D=this.getNumberValue(p);a=Number(D);break}case xe.VariableInOtherSubTable:{const d=this.engine.getState(f.id),p=Array.isArray(d)?d.map(m=>this.getNumberValue(m)):[],D=this.getAggregateTypeValue(p,f.aggregateType);h=this.engine.getInstance(f.subTableId),a=Number(D);break}}return!Number.isNaN(a)&&this.controlNeedComputedValue(h)?l+=`(${a})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(Lp(new Function(`return ${r}`)(),{precision:16})),this.cacheComputedResult[r]=u);let i;if(this.controlInSubtable(t)&&(i=this.engine.getInstanceRowIndex(t),i===void 0))return;const o=this.engine.getState(t.id,i),c=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));c!==(o==null?void 0:o.result)&&this.engine.setState(t.id,{result:c,unit:(s=o==null?void 0:o.unit)!=null?s:""},i)}getNumberValue(t){if(typeof t=="object"&&t){if("result"in t)return t.result;if("amount"in t)return t.amount}return typeof t=="number"?t:0}getAggregateTypeValue(t,n){if(!n||!t||!t.length)return 0;switch(n){case pt.MAX:return Math.max(...t);case pt.MIN:return Math.min(...t);case pt.SUM:return t.reduce((r,u)=>r+u);case pt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class qp{constructor(t){this.config=t}apply(t){var i,o;this.engine=t;const n=(o=(i=this.config)==null?void 0:i.source)!=null?o:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}Z.CalcPlugin=jp,Z.ControlsEventPlugin=nh,Z.ES6ModulePlugin=Y0,Z.Engine=Sr,Z.LifecycleEventPlugin=th,Z.Plugin=Q0,Z.StylePlugin=qp,Z.hasChildrenControl=vn,Z.loopDataViewControl=qt,Z.loopFormControl=jt,Z.parseModule=Ku,Object.defineProperty(Z,"__esModule",{value:!0})});
28
+ **/(function(e,t){(function(n){var r=2e3,u={s:1,n:0,d:1};function i(p,D){if(isNaN(p=parseInt(p,10)))throw d.InvalidParameter;return p*D}function o(p,D){if(D===0)throw d.DivisionByZero;var v=Object.create(d.prototype);v.s=p<0?-1:1,p=p<0?-p:p;var g=h(p,D);return v.n=p/g,v.d=D/g,v}function c(p){for(var D={},v=p,g=2,E=4;E<=v;){for(;v%g===0;)v/=g,D[g]=(D[g]||0)+1;E+=1+2*g++}return v!==p?v>1&&(D[v]=(D[v]||0)+1):D[p]=(D[p]||0)+1,D}var s=function(p,D){var v=0,g=1,E=1,b=0,C=0,M=0,O=1,P=1,S=0,$=1,W=1,q=1,K=1e7,J;if(p!=null)if(D!==void 0){if(v=p,g=D,E=v*g,v%1!==0||g%1!==0)throw d.NonIntegerParameter}else switch(typeof p){case"object":{if("d"in p&&"n"in p)v=p.n,g=p.d,"s"in p&&(v*=p.s);else if(0 in p)v=p[0],1 in p&&(g=p[1]);else throw d.InvalidParameter;E=v*g;break}case"number":{if(p<0&&(E=p,p=-p),p%1===0)v=p;else if(p>0){for(p>=1&&(P=Math.pow(10,Math.floor(1+Math.log(p)/Math.LN10)),p/=P);$<=K&&q<=K;)if(J=(S+W)/($+q),p===J){$+q<=K?(v=S+W,g=$+q):q>$?(v=W,g=q):(v=S,g=$);break}else p>J?(S+=W,$+=q):(W+=S,q+=$),$>K?(v=W,g=q):(v=S,g=$);v*=P}else(isNaN(p)||isNaN(D))&&(g=v=NaN);break}case"string":{if($=p.match(/\d+|./g),$===null)throw d.InvalidParameter;if($[S]==="-"?(E=-1,S++):$[S]==="+"&&S++,$.length===S+1?C=i($[S++],E):$[S+1]==="."||$[S]==="."?($[S]!=="."&&(b=i($[S++],E)),S++,(S+1===$.length||$[S+1]==="("&&$[S+3]===")"||$[S+1]==="'"&&$[S+3]==="'")&&(C=i($[S],E),O=Math.pow(10,$[S].length),S++),($[S]==="("&&$[S+2]===")"||$[S]==="'"&&$[S+2]==="'")&&(M=i($[S+1],E),P=Math.pow(10,$[S+1].length)-1,S+=3)):$[S+1]==="/"||$[S+1]===":"?(C=i($[S],E),O=i($[S+2],1),S+=3):$[S+3]==="/"&&$[S+1]===" "&&(b=i($[S],E),C=i($[S+2],E),O=i($[S+4],1),S+=5),$.length<=S){g=O*P,E=v=M+g*b+P*C;break}}default:throw d.InvalidParameter}if(g===0)throw d.DivisionByZero;u.s=E<0?-1:1,u.n=Math.abs(v),u.d=Math.abs(g)};function l(p,D,v){for(var g=1;D>0;p=p*p%v,D>>=1)D&1&&(g=g*p%v);return g}function f(p,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var v=10%D,g=1;v!==1;g++)if(v=v*10%D,g>r)return 0;return g}function a(p,D,v){for(var g=1,E=l(10,v,D),b=0;b<300;b++){if(g===E)return b;g=g*10%D,E=E*10%D}return 0}function h(p,D){if(!p)return D;if(!D)return p;for(;;){if(p%=D,!p)return D;if(D%=p,!D)return p}}function d(p,D){if(s(p,D),this instanceof d)p=h(u.d,u.n),this.s=u.s,this.n=u.n/p,this.d=u.d/p;else return o(u.s*u.n,u.d)}d.DivisionByZero=new Error("Division by Zero"),d.InvalidParameter=new Error("Invalid argument"),d.NonIntegerParameter=new Error("Parameters must be integer"),d.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(p,D){return s(p,D),o(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(p,D){return s(p,D),o(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(p,D){if(isNaN(this.n)||isNaN(this.d))return new d(NaN);if(p===void 0)return o(this.s*this.n%this.d,1);if(s(p,D),u.n===0&&this.d===0)throw d.DivisionByZero;return o(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(p,D){return s(p,D),o(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(p,D){return s(p,D),u.n===0&&this.n===0?o(0,1):o(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.ceil(p*this.s*this.n/this.d),p)},floor:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.floor(p*this.s*this.n/this.d),p)},round:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.round(p*this.s*this.n/this.d),p)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(p,D){if(s(p,D),u.d===1)return u.s<0?o(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):o(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var v=c(this.n),g=c(this.d),E=1,b=1;for(var C in v)if(C!=="1"){if(C==="0"){E=0;break}if(v[C]*=u.n,v[C]%u.d===0)v[C]/=u.d;else return null;E*=Math.pow(C,v[C])}for(var C in g)if(C!=="1"){if(g[C]*=u.n,g[C]%u.d===0)g[C]/=u.d;else return null;b*=Math.pow(C,g[C])}return u.s<0?o(b,E):o(E,b)},equals:function(p,D){return s(p,D),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(p,D){s(p,D);var v=this.s*this.n*u.d-u.s*u.n*this.d;return(0<v)-(v<0)},simplify:function(p){if(isNaN(this.n)||isNaN(this.d))return this;p=p||.001;for(var D=this.abs(),v=D.toContinued(),g=1;g<v.length;g++){for(var E=o(v[g-1],1),b=g-2;b>=0;b--)E=E.inverse().add(v[b]);if(E.sub(D).abs().valueOf()<p)return E.mul(this.s)}return this},divisible:function(p,D){return s(p,D),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(p){var D,v="",g=this.n,E=this.d;return this.s<0&&(v+="-"),E===1?v+=g:(p&&(D=Math.floor(g/E))>0&&(v+=D,v+=" ",g%=E),v+=g,v+="/",v+=E),v},toLatex:function(p){var D,v="",g=this.n,E=this.d;return this.s<0&&(v+="-"),E===1?v+=g:(p&&(D=Math.floor(g/E))>0&&(v+=D,g%=E),v+="\\frac{",v+=g,v+="}{",v+=E,v+="}"),v},toContinued:function(){var p,D=this.n,v=this.d,g=[];if(isNaN(D)||isNaN(v))return g;do g.push(Math.floor(D/v)),p=D%v,D=v,v=p;while(D!==1);return g},toString:function(p){var D=this.n,v=this.d;if(isNaN(D)||isNaN(v))return"NaN";p=p||15;var g=f(D,v),E=a(D,v,g),b=this.s<0?"-":"";if(b+=D/v|0,D%=v,D*=10,D&&(b+="."),g){for(var C=E;C--;)b+=D/v|0,D%=v,D*=10;b+="(";for(var C=g;C--;)b+=D/v|0,D%=v,D*=10;b+=")"}else for(var C=p;D&&C--;)b+=D/v|0,D%=v,D*=10;return b}},Object.defineProperty(d,"__esModule",{value:!0}),d.default=d,d.Fraction=d,e.exports=d})()})(Pi);var Ge=uu(Pi.exports),pp="Fraction",Dp=[],gp=Ee(pp,Dp,()=>(Object.defineProperty(Ge,"name",{value:"Fraction"}),Ge.prototype.constructor=Ge,Ge.prototype.type="Fraction",Ge.prototype.isFraction=!0,Ge.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Ge.fromJSON=function(e){return new Ge(e)},Ge),{isClass:!0}),vp="Matrix",mp=[],yp=Ee(vp,mp,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,n){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,n,r){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,n){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,n){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,n){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function Ep(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var Ap="DenseMatrix",Cp=["Matrix"],Fp=Ee(Ap,Cp,e=>{var{Matrix:t}=e;function n(f,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!yn(a))throw new Error("Invalid datatype: "+a);if(Ut(f))f.type==="DenseMatrix"?(this._data=ft(f._data),this._size=ft(f._size),this._datatype=a||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=a||f._datatype);else if(f&&Se(f.data)&&Se(f.size))this._data=f.data,this._size=f.size,di(this._data,this._size),this._datatype=a||f.datatype;else if(Se(f))this._data=l(f),this._size=$r(this._data),di(this._data,this._size),this._datatype=a;else{if(f)throw new TypeError("Unsupported type of data ("+Nr(f)+")");this._data=[],this._size=[0],this._datatype=a}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,a){return new n(f,a)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Tr(this._data,Nr)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,a){return new n(f,a)},n.prototype.subset=function(f,a,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return i(this,f,a,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!Se(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new ae(f.length,this._size.length);for(var a=0;a<f.length;a++)Ne(f[a],this._size[a]);for(var h=this._data,d=0,p=f.length;d<p;d++){var D=f[d];Ne(D,h.length),h=h[D]}return h},n.prototype.set=function(f,a,h){if(!Se(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new ae(f.length,this._size.length,"<");var d,p,D,v=f.map(function(E){return E+1});s(this,v,h);var g=this._data;for(d=0,p=f.length-1;d<p;d++)D=f[d],Ne(D,g.length),g=g[D];return D=f[f.length-1],Ne(D,g.length),g[D]=a,this};function r(f,a){if(!ni(a))throw new TypeError("Invalid index");var h=a.isScalar();if(h)return f.get(a.min());var d=a.size();if(d.length!==f._size.length)throw new ae(d.length,f._size.length);for(var p=a.min(),D=a.max(),v=0,g=f._size.length;v<g;v++)Ne(p[v],f._size[v]),Ne(D[v],f._size[v]);return new n(u(f._data,a,d.length,0),f._datatype)}function u(f,a,h,d){var p=d===h-1,D=a.dimension(d);return p?D.map(function(v){return Ne(v,f.length),f[v]}).valueOf():D.map(function(v){Ne(v,f.length);var g=f[v];return u(g,a,h,d+1)}).valueOf()}function i(f,a,h,d){if(!a||a.isIndex!==!0)throw new TypeError("Invalid index");var p=a.size(),D=a.isScalar(),v;if(Ut(h)?(v=h.size(),h=h.valueOf()):v=$r(h),D){if(v.length!==0)throw new TypeError("Scalar expected");f.set(a.min(),h,d)}else{if(p.length<f._size.length)throw new ae(p.length,f._size.length,"<");if(v.length<p.length){for(var g=0,E=0;p[g]===1&&v[g]===1;)g++;for(;p[g]===1;)E++,g++;h=Yh(h,p.length,E,v)}if(!Ir(p,v))throw new ae(p,v,">");var b=a.max().map(function(O){return O+1});s(f,b,d);var C=p.length,M=0;o(f._data,a,h,C,M)}return f}function o(f,a,h,d,p){var D=p===d-1,v=a.dimension(p);D?v.forEach(function(g,E){Ne(g),f[g]=h[E[0]]}):v.forEach(function(g,E){Ne(g),o(f[g],a,h[E[0]],d,p+1)})}n.prototype.resize=function(f,a,h){if(!Mr(f))throw new TypeError("Array or Matrix expected");var d=f.valueOf().map(D=>Array.isArray(D)&&D.length===1?D[0]:D),p=h?this.clone():this;return c(p,d,a)};function c(f,a,h){if(a.length===0){for(var d=f._data;Se(d);)d=d[0];return d}return f._size=a.slice(0),f._data=pi(f._data,f._size,h),f}n.prototype.reshape=function(f,a){var h=a?this.clone():this;h._data=Kh(h._data,f);var d=h._size.reduce((p,D)=>p*D);return h._size=Di(f,d),h};function s(f,a,h){for(var d=f._size.slice(0),p=!1;d.length<a.length;)d.push(0),p=!0;for(var D=0,v=a.length;D<v;D++)a[D]>d[D]&&(d[D]=a[D],p=!0);p&&c(f,d,h)}n.prototype.clone=function(){var f=new n({data:ft(this._data),size:ft(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var a=this,h=Ep(f),d=function v(g,E){return Se(g)?g.map(function(b,C){return v(b,E.concat(C))}):h===1?f(g):h===2?f(g,E):f(g,E,a)},p=d(this._data,[]),D=this._datatype!==void 0?Tr(p,Nr):void 0;return new n(p,D)},n.prototype.forEach=function(f){var a=this,h=function d(p,D){Se(p)?p.forEach(function(v,g){d(v,D.concat(g))}):f(p,D,a)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*a(h,d){if(Se(h))for(var p=0;p<h.length;p++)yield*a(h[p],d.concat(p));else yield{value:h,index:d}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],a=this.size();if(a.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var d of h)f.push(new n([d],this._datatype));return f},n.prototype.columns=function(){var f=this,a=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,p=function(g){var E=d.map(b=>[b[g]]);a.push(new n(E,f._datatype))},D=0;D<h[1];D++)p(D);return a},n.prototype.toArray=function(){return ft(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return lt(this._data,f)},n.prototype.toString=function(){return lt(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(nt(f)&&(f=f.toNumber()),!ge(f)||!Ue(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var a=f>0?f:0,h=f<0?-f:0,d=this._size[0],p=this._size[1],D=Math.min(d-h,p-a),v=[],g=0;g<D;g++)v[g]=this._data[g+h][g+a];return new n({data:v,size:[D],datatype:this._datatype})},n.diagonal=function(f,a,h,d){if(!Se(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(P){if(nt(P)&&(P=P.toNumber()),!ge(P)||!Ue(P)||P<1)throw new Error("Size values must be positive integers");return P}),h){if(nt(h)&&(h=h.toNumber()),!ge(h)||!Ue(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var p=h>0?h:0,D=h<0?-h:0,v=f[0],g=f[1],E=Math.min(v-D,g-p),b;if(Se(a)){if(a.length!==E)throw new Error("Invalid value array length");b=function(S){return a[S]}}else if(Ut(a)){var C=a.size();if(C.length!==1||C[0]!==E)throw new Error("Invalid matrix length");b=function(S){return a.get([S])}}else b=function(){return a};d||(d=nt(b(0))?b(0).mul(0):0);var M=[];if(f.length>0){M=pi(M,f,d);for(var O=0;O<E;O++)M[O+D][O+p]=b(O)}return new n({data:M,size:[v,g]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,a){if(!ge(f)||!Ue(f)||!ge(a)||!Ue(a))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Ne(f,this._size[0]),Ne(a,this._size[0]),n._swapRows(f,a,this._data),this},n._swapRows=function(f,a,h){var d=h[f];h[f]=h[a],h[a]=d};function l(f){for(var a=0,h=f.length;a<h;a++){var d=f[a];Se(d)?f[a]=l(d):d&&d.isMatrix===!0&&(f[a]=l(d.valueOf()))}return f}return n},{isClass:!0}),Ti="equalScalar";Ee(Ti,["typed","config"],e=>{var{typed:t,config:n}=e;return t(Ti,{"number, number":function(u,i){return zh(u,i,n.epsilon)}})});function zt(e,t,n,r){if(!(this instanceof zt))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(r!=null?"-"+r:"")+" expected)",this.stack=new Error().stack}zt.prototype=new Error,zt.prototype.constructor=Error,zt.prototype.name="ArgumentsError",zt.prototype.isArgumentsError=!0;var Li="format",wp=["typed"],Bp=Ee(Li,wp,e=>{var{typed:t}=e;return t(Li,{any:lt,"any, Object | function | number":lt})}),ji="bin",bp=["typed","format"];Ee(ji,bp,e=>{var{typed:t,format:n}=e;return t(ji,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"bin",wordSize:i})}})});var ki="oct",Sp=["typed","format"];Ee(ki,Sp,e=>{var{typed:t,format:n}=e;return t(ki,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"oct",wordSize:i})}})});var qi="hex",_p=["typed","format"];Ee(qi,_p,e=>{var{typed:t,format:n}=e;return t(qi,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"hex",wordSize:i})}})});var Vi="equal";Ee(Vi,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Vi,{"any, any":function(u,i){return u===null?i===null:i===null?u===null:u===void 0?i===void 0:i===void 0?u===void 0:n(u,i)}})});var Ui="unequal";Ee(Ui,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Ui,{"any, any":function(u,i){return u===null?i!==null:i===null?u!==null:u===void 0?i!==void 0:i===void 0?u!==void 0:!n(u,i)}})});var Hi={exports:{}};(function(e){(function(t,n,r){function u(s){var l=this,f=c();l.next=function(){var a=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=a-(l.c=a|0)},l.c=1,l.s0=f(" "),l.s1=f(" "),l.s2=f(" "),l.s0-=f(s),l.s0<0&&(l.s0+=1),l.s1-=f(s),l.s1<0&&(l.s1+=1),l.s2-=f(s),l.s2<0&&(l.s2+=1),f=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function o(s,l){var f=new u(s),a=l&&l.state,h=f.next;return h.int32=function(){return f.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,a&&(typeof a=="object"&&i(a,f),h.state=function(){return i(f,{})}),h}function c(){var s=4022871197,l=function(f){f=String(f);for(var a=0;a<f.length;a++){s+=f.charCodeAt(a);var h=.02519603282416938*s;s=h>>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return l}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(Ke,e,!1)})(Hi);var zi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var a=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^a^a>>>8},c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(Ke,e,!1)})(zi);var Wi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(a^a<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,f==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s.v=c.v,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(Ke,e,!1)})(Wi);var Zi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.x,a=s.i,h,d;return h=f[a],h^=h>>>7,d=h^h<<24,h=f[a+1&7],d^=h^h>>>10,h=f[a+3&7],d^=h^h>>>3,h=f[a+4&7],d^=h^h<<7,h=f[a+7&7],h=h^h<<13,d^=h^h<<9,f[a]=d,s.i=a+1&7,d};function l(f,a){var h,d=[];if(a===(a|0))d[0]=a;else for(a=""+a,h=0;h<a.length;++h)d[h&7]=d[h&7]<<15^a.charCodeAt(h)+d[h+1&7]<<13;for(;d.length<8;)d.push(0);for(h=0;h<8&&d[h]===0;++h);for(h==8?d[7]=-1:d[h],f.x=d,f.i=0,h=256;h>0;--h)f.next()}l(s,c)}function i(c,s){return s.x=c.x.slice(),s.i=c.i,s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.x&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(Ke,e,!1)})(Zi);var Xi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.w,a=s.X,h=s.i,d,p;return s.w=f=f+1640531527|0,p=a[h+34&127],d=a[h=h+1&127],p^=p<<13,d^=d<<17,p^=p>>>15,d^=d>>>12,p=a[h]=p^d,s.i=h,p+(f^f>>>16)|0};function l(f,a){var h,d,p,D,v,g=[],E=128;for(a===(a|0)?(d=a,a=null):(a=a+"\0",d=0,E=Math.max(E,a.length)),p=0,D=-32;D<E;++D)a&&(d^=a.charCodeAt((D+32)%a.length)),D===0&&(v=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,D>=0&&(v=v+1640531527|0,h=g[D&127]^=d+v,p=h==0?p+1:0);for(p>=128&&(g[(a&&a.length||0)&127]=-1),p=127,D=4*128;D>0;--D)d=g[p+34&127],h=g[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,g[p]=d^h;f.w=v,f.X=g,f.i=p}l(s,c)}function i(c,s){return s.i=c.i,s.w=c.w,s.X=c.X.slice(),s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.X&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(Ke,e,!1)})(Xi);var Gi={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.b,h=s.c,d=s.d,p=s.a;return a=a<<25^a>>>7^h,h=h-d|0,d=d<<24^d>>>8^p,p=p-a|0,s.b=a=a<<20^a>>>12^h,s.c=h=h-d|0,s.d=d<<16^h>>>16^p,s.a=p-a|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,c===Math.floor(c)?(s.a=c/4294967296|0,s.b=c|0):l+=c;for(var f=0;f<l.length+20;f++)s.b^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.a=c.a,s.b=c.b,s.c=c.c,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(Ke,e,!1)})(Gi);var Ji={exports:{}};(function(e){(function(t,n,r){var u=256,i=6,o=52,c="random",s=r.pow(u,i),l=r.pow(2,o),f=l*2,a=u-1,h;function d(C,M,O){var P=[];M=M==!0?{entropy:!0}:M||{};var S=g(v(M.entropy?[C,b(n)]:C==null?E():C,3),P),$=new p(P),W=function(){for(var q=$.g(i),K=s,J=0;q<l;)q=(q+J)*u,K*=u,J=$.g(1);for(;q>=f;)q/=2,K/=2,J>>>=1;return(q+J)/K};return W.int32=function(){return $.g(4)|0},W.quick=function(){return $.g(4)/4294967296},W.double=W,g(b($.S),n),(M.pass||O||function(q,K,J,ee){return ee&&(ee.S&&D(ee,$),q.state=function(){return D($,{})}),J?(r[c]=q,K):q})(W,S,"global"in M?M.global:this==r,M.state)}function p(C){var M,O=C.length,P=this,S=0,$=P.i=P.j=0,W=P.S=[];for(O||(C=[O++]);S<u;)W[S]=S++;for(S=0;S<u;S++)W[S]=W[$=a&$+C[S%O]+(M=W[S])],W[$]=M;(P.g=function(q){for(var K,J=0,ee=P.i,Q=P.j,z=P.S;q--;)K=z[ee=a&ee+1],J=J*u+z[a&(z[ee]=z[Q=a&Q+K])+(z[Q]=K)];return P.i=ee,P.j=Q,J})(u)}function D(C,M){return M.i=C.i,M.j=C.j,M.S=C.S.slice(),M}function v(C,M){var O=[],P=typeof C,S;if(M&&P=="object")for(S in C)try{O.push(v(C[S],M-1))}catch($){}return O.length?O:P=="string"?C:C+"\0"}function g(C,M){for(var O=C+"",P,S=0;S<O.length;)M[a&S]=a&(P^=M[a&S]*19)+O.charCodeAt(S++);return b(M)}function E(){try{var C;return h&&(C=h.randomBytes)?C=C(u):(C=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(C)),b(C)}catch(P){var M=t.navigator,O=M&&M.plugins;return[+new Date,t,O,t.screen,b(n)]}}function b(C){return String.fromCharCode.apply(0,C)}if(g(r.random(),n),e.exports){e.exports=d;try{h=Pn.default}catch(C){}}else r["seed"+c]=d})(typeof self!="undefined"?self:Ke,[],Math)})(Ji);var Mp=Hi.exports,Np=zi.exports,Ip=Wi.exports,xp=Zi.exports,Op=Xi.exports,Rp=Gi.exports,St=Ji.exports;St.alea=Mp,St.xor128=Np,St.xorwow=Ip,St.xorshift7=xp,St.xor4096=Op,St.tychei=Rp,In("fineStructure",.0072973525693),In("weakMixingAngle",.2229),In("efimovFactor",22.7),In("sackurTetrode",-1.16487052358);function In(e,t){var n=["config","BigNumber"];return Ee(e,n,r=>{var{config:u,BigNumber:i}=r;return u.number==="BigNumber"?new i(t):t})}var $p=fp({config:ri}),Pp=dp({}),Tp=gp({}),Lp=yp({}),jp=Fp({Matrix:Lp}),kp=dd({BigNumber:$p,Complex:Pp,DenseMatrix:jp,Fraction:Tp}),qp=Bp({typed:kp});class Vp{constructor(t){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=t,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var t;!((t=this.options)!=null&&t.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((n,r)=>(r.is_remember||n.push(...r.hide_controls),n),[]))}getDontHasPermissionControlIds(){var t;!((t=this.options)!=null&&t.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((n,r)=>(r.ctrlBehavior===1&&n.push(r.ctrlId),n),[]))}controlNeedComputedValue(t){if(!t)return!1;const n=this.getControlIsHide(t);return!(this.dontHasPermissionControlIds.includes(t.id)&&n||this.hideNotRememberControlIds.includes(t.id)&&n)}getControlIsHide(t){return t.props.isHide?!0:t.parent===null?!1:this.getControlIsHide(t.parent)}apply(t){this.engine=t,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(t=>this.computedCalcValue(t))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(t=>t.type===X.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===xe.VariableInMainTable||r.type===xe.VariableInCurrentSubTable||r.type===xe.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===xe.VariableInOtherSubTable&&r.subTableId&&this.setDependenciesTriggerMapItem(r.subTableId,t)})})}setDependenciesTriggerMapItem(t,n){this.dependenciesTriggerMap.has(t)||this.dependenciesTriggerMap.set(t,[]);const r=this.dependenciesTriggerMap.get(t);r.includes(n)||r.push(n)}getCalcControlsFromSubtableRows(t){return t.reduce((n,r)=>(r.children.forEach(u=>{const i=u.children[0];i&&this.engine.assertInstance(i,X.CALC)&&n.push(i)}),n),[])}watchSchemaHideChange(){this.engine.on("schema-change",t=>{var n;t.props==="isHide"&&((n=this.dependenciesTriggerMap.get(t.instance.id))!=null?n:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",t=>{var i,o,c;this.resetDependencies();const n=(o=(i=t.options)==null?void 0:i.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(n).forEach(s=>{this.computedCalcValue(s)}),((c=this.dependenciesTriggerMap.get(t.instance.id))!=null?c:[]).forEach(s=>{this.computedCalcValue(s)})})}watchControlChange(){this.engine.on("change",t=>{var u;const{instance:n}=t;if(!this.dependenciesTriggerMap.has(n.id))return;const r=(u=this.dependenciesTriggerMap.get(n.id))!=null?u:[];t.rowIndex!==void 0&&t.rowIndex>-1?r.forEach(i=>{this.controlInSubtable(i)&&this.engine.getInstanceRowIndex(i)!==t.rowIndex||this.computedCalcValue(i)}):r.forEach(i=>{this.computedCalcValue(i)})})}controlInSubtable(t){var n;return((n=t.parent)==null?void 0:n.type)===X.SUBTABLE_COLUMN}computedCalcValue(t){var s;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,f)=>{if(f.type===xe.Operator||f.type===xe.Number)return l+f.name;let a=0,h;switch(f.type){case xe.VariableInMainTable:{const d=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),a=Number(d);break}case xe.VariableInCurrentSubTable:{const d=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,d);const p=this.engine.getState(f.id,d),D=this.getNumberValue(p);a=Number(D);break}case xe.VariableInOtherSubTable:{const d=this.engine.getState(f.id),p=Array.isArray(d)?d.map(v=>this.getNumberValue(v)):[],D=this.getAggregateTypeValue(p,f.aggregateType);h=this.engine.getInstance(f.subTableId),a=Number(D);break}}return!Number.isNaN(a)&&this.controlNeedComputedValue(h)?l+=`(${a})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(qp(new Function(`return ${r}`)(),{precision:16})),this.cacheComputedResult[r]=u);let i;if(this.controlInSubtable(t)&&(i=this.engine.getInstanceRowIndex(t),i===void 0))return;const o=this.engine.getState(t.id,i),c=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));c!==(o==null?void 0:o.result)&&this.engine.setState(t.id,{result:c,unit:(s=o==null?void 0:o.unit)!=null?s:""},i)}getNumberValue(t){if(typeof t=="object"&&t){if("result"in t)return t.result;if("amount"in t)return t.amount}return typeof t=="number"?t:0}getAggregateTypeValue(t,n){if(!n||!t||!t.length)return 0;switch(n){case pt.MAX:return Math.max(...t);case pt.MIN:return Math.min(...t);case pt.SUM:return t.reduce((r,u)=>r+u);case pt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class Up{constructor(t){this.config=t}apply(t){var i,o;this.engine=t;const n=(o=(i=this.config)==null?void 0:i.source)!=null?o:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}Z.CalcPlugin=Vp,Z.ControlsEventPlugin=ih,Z.ES6ModulePlugin=nh,Z.Engine=Sr,Z.LifecycleEventPlugin=uh,Z.Plugin=th,Z.StylePlugin=Up,Z.hasChildrenControl=vn,Z.loopDataViewControl=kt,Z.loopFormControl=jt,Z.parseModule=Ku,Object.defineProperty(Z,"__esModule",{value:!0})});