index-2a8c0b19.js 75 KB

12
  1. var Ri=Object.defineProperty,Ni=Object.defineProperties;var Pi=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var ji=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable;var Tt=(M,N,z)=>N in M?Ri(M,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):M[N]=z,ce=(M,N)=>{for(var z in N||(N={}))ji.call(N,z)&&Tt(M,z,N[z]);if(xt)for(var z of xt(N))$i.call(N,z)&&Tt(M,z,N[z]);return M},ke=(M,N)=>Ni(M,Pi(N));var D=(M,N,z)=>new Promise((Oe,De)=>{var ze=q=>{try{re(z.next(q))}catch(J){De(J)}},me=q=>{try{re(z.throw(q))}catch(J){De(J)}},re=q=>q.done?Oe(q.value):Promise.resolve(q.value).then(ze,me);re((z=z.apply(M,N)).next())});import{F as Y,d as E,$ as Ne,aG as I,r as w,a9 as Pe,aN as L,A as je,a6 as we,j as B,a4 as se,u as C,K as Se,aP as xe,aQ as F,aO as fe,ao as Ce,aH as ge,_ as pe,y as O,o as A,c as j,w as k,l as $,O as $e,N as Ue,P as Te,b as Z,t as Q,a1 as Mt,aF as _e,b6 as Ge,e as T,ap as W,a as ee,g as It,bW as Ui,n as Me,p as Ye,H as Ae,aK as Gi,b5 as Ft,aL as X,bX as Yi,as as Ie,ai as Ot,I as qi,b1 as zt,ax as oe,Y as Vi,bY as Hi,b4 as Ki,bb as Zi,aq as Xi,ar as Ji,q as Qi,bZ as Et,__tla as Wi}from"./index-b5895273.js";import{g as Fe,__tla as ea}from"./index-f35bbafa.js";import{g as ta,a as ia,__tla as aa}from"./index-7fb58e79.js";import{g as na,__tla as ra}from"./index-7914b44e.js";import{g as qe,__tla as la}from"./index-bbe22d68.js";import{m as Lt,a as Rt,b as Nt,__tla as sa}from"./min-03eb9ce8.js";import{s as Pt,__tla as oa}from"./sum-f551e4a9.js";import{u as ua,B as da,__tla as ca}from"./index-5eb30ce0.js";import{u as fa,__tla as ga}from"./useScript-ab5d4580.js";import{Q as pa,__tla as _a}from"./index-83eefeb2.js";let jt,$t,Ut,Gt,Yt,qt,Vt,Ht,Kt,Zt,Xt,he,Jt,Qt,Wt,ei,ti,ii,ai,ni,ri,li,si,oi,ui,di,ci,fi,te,ha=Promise.all([(()=>{try{return Wi}catch(M){}})(),(()=>{try{return ea}catch(M){}})(),(()=>{try{return aa}catch(M){}})(),(()=>{try{return ra}catch(M){}})(),(()=>{try{return la}catch(M){}})(),(()=>{try{return sa}catch(M){}})(),(()=>{try{return oa}catch(M){}})(),(()=>{try{return ca}catch(M){}})(),(()=>{try{return ga}catch(M){}})(),(()=>{try{return _a}catch(M){}})()]).then(()=>D(void 0,null,function*(){fi=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/datasource/list",params:i},{errorMessageMode:e})})},ci=function(i,e="modal"){return D(this,null,function*(){return Y.post({url:"/system/datasource",data:i},{errorMessageMode:e})})},he=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/datasource/data",params:{id:i}},{errorMessageMode:e})})},qt=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/datasource/data/page",params:i},{errorMessageMode:e})})},di=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/datasource/column",params:{id:i}},{errorMessageMode:e})})};const M=E({name:"ApiRadioGroup",components:{RadioGroup:Ne.Group,RadioButton:Ne.Button,Radio:Ne},props:{api:{type:Function,default:null},params:{type:[Object,String],default:()=>({})},value:{type:[String,Number,Boolean]},isBtn:{type:[Boolean],default:!1},numberToString:I.bool,resultField:I.string.def(""),labelField:I.string.def("label"),valueField:I.string.def("value"),immediate:I.bool.def(!0),datasourceType:String,optionType:I.string.def("default"),staticOptions:{type:Array,default:()=>[]},apiConfig:Object,mainKey:String,index:Number},emits:["options-change","change","update:value"],setup(i,{emit:e}){const t=w([]),a=w(!1),r=Pe(),{t:n}=se(),l=L("formModel",null),o=L("isCustomForm",!1),u=w(""),d=je(()=>{const{labelField:p,valueField:m,numberToString:g}=i;return C(t).reduce((v,h)=>{if(h){const b=h[m];v.push(ce({label:h[p],value:g?parseInt(b):`${b}`},Se(h,[p,m])))}return v},[])});we(()=>{var p;i.datasourceType==="api"&&((p=i.apiConfig)!=null&&p.apiParams)&&(i.apiConfig.apiParams.forEach(m=>{var g;(g=m.tableInfo)==null||g.forEach(v=>{if(v.bindType=="data"){let h=xe(v.value),b="";if(h&&h.bindTable){let y=o?h.bindTable+"List":F(h.bindTable+"_List");b=o?h.bindField:F(h.bindField),l&&l[y][i.index||0]&&l[y][i.index||0][b]}else h&&h.bindField&&(b=o?h.bindField:F(h.bindField),l&&l[b])}})}),c())}),B(()=>[i.params,i.datasourceType,i.apiConfig],()=>{c()},{deep:!0,immediate:!0}),B(()=>i.value,p=>{u.value=p},{immediate:!0});function c(){return D(this,null,function*(){let p;if(i.datasourceType?(i.datasourceType==="dic"&&(p=Fe),i.datasourceType==="datasource"&&(p=he),i.datasourceType==="staticData"&&(t.value=i.staticOptions),i.datasourceType==="api"&&(t.value=yield fe(i.apiConfig,o,l,i.index))):p=i.api,!(!p||!Ce(p))){t.value=[];try{if(!i.params)return;a.value=!0;const m=yield p(i.params);if(Array.isArray(m)){t.value=m,_();return}i.resultField&&(t.value=ge(m,i.resultField)||[]),_()}catch(m){}finally{a.value=!1}}})}function _(){e("options-change",C(d))}function f({target:p}){e("update:value",p.value),e("change")}return{checked:u,getOptions:d,attrs:r,loading:a,t:n,handleChange:f,props:i}}});function N(i,e,t,a,r,n){const l=O("RadioButton"),o=O("Radio"),u=O("RadioGroup");return A(),j(u,Te(i.attrs,{value:i.checked,"onUpdate:value":e[0]||(e[0]=d=>i.checked=d),optionType:i.optionType,"button-style":"solid",onChange:i.handleChange}),{default:k(()=>[(A(!0),$(Ue,null,$e(i.getOptions,d=>(A(),$(Ue,{key:`${d.value}`},[i.optionType==="button"?(A(),j(l,{key:0,value:d.value,disabled:d.disabled},{default:k(()=>[Z(Q(d.label),1)]),_:2},1032,["value","disabled"])):(A(),j(o,{key:1,value:d.value,disabled:d.disabled},{default:k(()=>[Z(Q(d.label),1)]),_:2},1032,["value","disabled"]))],64))),128))]),_:1},16,["value","optionType","onChange"])}let z;Ht=pe(M,[["render",N]]),z=E({name:"ApiCheckboxGroup",components:{CheckboxGroup:Mt.Group,Checkbox:Mt},props:{api:{type:Function,default:null},params:{type:[Object,String],default:()=>({})},value:{type:[Array,String]},isBtn:{type:[Boolean],default:!1},numberToString:I.bool,resultField:I.string.def(""),labelField:I.string.def("label"),valueField:I.string.def("value"),immediate:I.bool.def(!0),datasourceType:String,staticOptions:{type:Array,default:()=>[]},apiConfig:{type:Object,default:()=>{}},mainKey:String,index:Number},emits:["options-change","change","update:value"],setup(i,{emit:e}){const t=w([]),a=w(!1),r=Pe(),{t:n}=se(),l=L("formModel",null),o=L("isCustomForm",!1),u=w([]),d=je(()=>{const{labelField:p,valueField:m,numberToString:g}=i;return C(t).reduce((v,h)=>{if(h){const b=h[m];v.push(ce({label:h[p],value:g?`${b}`:b},Se(h,[p,m])))}return v},[])});we(()=>{var p;i.datasourceType==="api"&&((p=i.apiConfig)!=null&&p.apiParams)&&(i.apiConfig.apiParams.forEach(m=>{var g;(g=m.tableInfo)==null||g.forEach(v=>{if(v.bindType=="data"){let h=xe(v.value),b="";if(h&&h.bindTable){let y=o?h.bindTable+"List":F(h.bindTable+"_List");b=o?h.bindField:F(h.bindField),l&&l[y][i.index||0]&&l[y][i.index||0][b]}else h&&h.bindField&&(b=o?h.bindField:F(h.bindField),l&&l[b])}})}),c())}),B(()=>[i.datasourceType,i.params,i.apiConfig],()=>{c()},{immediate:!0,deep:!0}),B(()=>i.value,p=>{u.value=typeof p=="string"?p==null?void 0:p.split(","):p},{immediate:!0});function c(){return D(this,null,function*(){let p;if(i.datasourceType&&(i.datasourceType==="dic"&&(p=Fe),i.datasourceType==="datasource"&&(p=he),i.datasourceType==="staticData"&&(t.value=i.staticOptions),i.datasourceType==="api"&&(t.value=yield fe(i.apiConfig,o,l,i.index))),!(!p||!Ce(p))){t.value=[];try{if(!i.params)return;a.value=!0;const m=yield p(i.params);if(Array.isArray(m)){t.value=m,_();return}i.resultField&&(t.value=ge(m,i.resultField)||[]),_()}catch(m){}finally{a.value=!1}}})}function _(){e("options-change",C(d))}function f(p){e("update:value",p.toString()),e("change"),u.value=i.value===void 0||i.value===null?p:i.value.split(",")}return{checked:u,getOptions:d,attrs:r,loading:a,t:n,handleChange:f,props:i}}});function Oe(i,e,t,a,r,n){const l=O("Checkbox"),o=O("CheckboxGroup");return A(),j(o,Te(i.attrs,{value:i.checked,"onUpdate:value":e[0]||(e[0]=u=>i.checked=u),"button-style":"solid",onChange:i.handleChange}),{default:k(()=>[(A(!0),$(Ue,null,$e(i.getOptions,u=>(A(),j(l,{key:`${u.value}`,value:u.value,disabled:u.disabled},{default:k(()=>[Z(Q(u.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},16,["value","onChange"])}Kt=pe(z,[["render",Oe]]);const De=E({name:"ApiCascader",components:{LoadingOutlined:_e,[Ge.name]:Ge},props:{value:{type:[Array,String]},api:{type:Function,default:null},numberToString:I.bool,resultField:I.string.def(""),labelField:I.string.def("label"),valueField:I.string.def("value"),childrenField:I.string.def("children"),asyncFetchParamKey:I.string.def("parentCode"),immediate:I.bool.def(!0),isLeaf:{type:Function,default:null},displayRenderArray:{type:Array},placeholder:String,separator:String,showFormat:String,selectedConfig:String,allowClear:Boolean,disabled:Boolean,apiConfig:{type:Object,default:()=>{}},size:String},emits:["change","defaultChange","update:value","blur"],setup(i,{emit:e}){const t=w([]),a=w([]),r=w(!1),{t:n}=se(),l=L("formModel",null),o=L("isCustomForm",!1),u=w();B(t,m=>{const g=d(m);a.value=g},{deep:!0}),B(()=>i.value,m=>{u.value=Array.isArray(m)?m:m?m.toString().split(","):[]},{deep:!0,immediate:!0});function d(m){const{labelField:g,valueField:v,numberToString:h,childrenField:b,isLeaf:y}=i;return m.reduce((S,x)=>{if(x){const K=x[v],U=ke(ce({},Se(x,[g,v])),{label:x[g],value:h?`${K}`:K,isLeaf:y&&typeof y=="function"?y(x):!1}),ie=Reflect.get(x,b);ie&&Reflect.set(U,b,d(ie)),S.push(U)}return S},[])}function c(m){return D(this,null,function*(){const g=m[m.length-1];g.loading=!0;const v=i.api;if(!(!v||!Ce(v)))try{const h=yield v({[i.asyncFetchParamKey]:Reflect.get(g,"value")});if(Array.isArray(h)){const b=d(h);g.children=b;return}if(i.resultField){const b=d(ge(h,i.resultField)||[]);g.children=b}}catch(h){}finally{g.loading=!1}})}B(()=>i.apiConfig,()=>D(this,null,function*(){a.value=yield fe(i.apiConfig,o,l)}),{immediate:!0,deep:!0});function _(m,g){e("defaultChange",m,g),e("update:value",m==null?void 0:m.join(",")),e("change",m==null?void 0:m.join(","))}function f(){e("blur")}function p({labels:m,selectedOptions:g}){var v;return u.value.length===g.length?i.showFormat==="all"?m.join(` ${i.separator} `):m[m.length-1]:i.displayRenderArray&&((v=i.displayRenderArray)!=null&&v.length)?i.displayRenderArray.join(` ${i.separator} `):""}return{selected:u,options:a,loading:r,t:n,handleChange:_,handleBlur:f,loadData:c,handleRenderDisplay:p}}});function ze(i,e,t,a,r,n){const l=O("LoadingOutlined"),o=O("a-cascader");return A(),$("div",null,[T(o,{value:i.selected,"onUpdate:value":e[0]||(e[0]=u=>i.selected=u),options:i.options,"load-data":i.loadData,"change-on-select":i.selectedConfig==="any",onChange:i.handleChange,displayRender:i.handleRenderDisplay,allowClear:i.allowClear,placeholder:i.placeholder,disabled:i.disabled,size:i.size,onBlur:i.handleBlur},W({_:2},[i.loading?{name:"suffixIcon",fn:k(()=>[T(l,{spin:""})]),key:"0"}:void 0,i.loading?{name:"notFoundContent",fn:k(()=>[ee("span",null,[T(l,{spin:"",class:"mr-1"}),Z(" "+Q(i.t("component.form.apiSelectNotFound")),1)])]),key:"1"}:void 0]),1032,["value","options","load-data","change-on-select","onChange","displayRender","allowClear","placeholder","disabled","size","onBlur"])])}let me,re,q,J,Ve;Xt=pe(De,[["render",ze]]),Jt=E({__name:"SelectDepartment",props:{value:String,multiple:Number,autoSelected:Boolean,loadAgain:Boolean},emits:["options-change","update:value"],setup(i,{emit:e}){const t=i,a=w([]),r=It().getUserInfo,n=w(void 0),l=Ui();Me(()=>{if(o(),l.currentRoute.value.fullPath.includes("form-design"))return n.value=void 0,!1;Ye(()=>{let d=t.value,c=r.departments.length?r.departments[0].id:"";c===d?n.value=d:t.loadAgain?n.value=c:d?n.value=d:n.value=c,u(n.value)})}),B(()=>t.value,d=>{t.multiple===2?d&&d.length?n.value=d.split(","):n.value=void 0:d&&(n.value=d),u(n.value)},{immediate:!0});function o(){return D(this,null,function*(){a.value=(yield ta())||[],e("options-change",a.value)})}function u(d){e("update:value",t.multiple===2?d.join(","):d)}return(d,c)=>{const _=O("a-tag");return A(),j(C(Gi),{"show-search":"",value:n.value,"onUpdate:value":c[0]||(c[0]=f=>n.value=f),treeNodeFilterProp:"name",style:{width:"100%"},"dropdown-style":{maxHeight:"400px",overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9","allow-clear":"","tree-checkable":i.multiple===2,"tree-default-expand-all":"","tree-data":a.value,"field-names":{children:"children",label:"name",value:"id"},onChange:u},{title:k(({name:f,departmentType:p})=>[p===1?(A(),j(_,{key:0,color:"processing"},{default:k(()=>[Z("\u516C\u53F8")]),_:1})):p===0?(A(),j(_,{key:1,color:"warning"},{default:k(()=>[Z("\u90E8\u95E8")]),_:1})):Ae("",!0),Z(" "+Q(f),1)]),_:1},8,["value","tree-checkable","tree-data"])}}}),Qt=E({__name:"CommonInfo",props:{value:String,size:String,infoType:Number,bordered:{type:Boolean,default:!0},loadAgain:{type:Boolean,default:!1}},emits:["update:value"],setup(i,{emit:e}){const t=i,a=It(),r=w();return we(()=>D(this,null,function*(){if(t&&t.value){if(t.infoType===0)if(t.value===a.getUserInfo.id||t.loadAgain)r.value=a.getUserInfo.name,e("update:value",a.getUserInfo.id);else{const n=yield na(t.value);r.value=n.name}if(t.infoType===1)if(t.value===a.getUserInfo.departmentId||t.loadAgain)r.value=a.getUserInfo.departmentName,e("update:value",a.getUserInfo.departmentId);else{const n=yield ia(t.value);r.value=n.name}t.infoType===2&&(r.value=t.loadAgain?Ft(new Date).format("YYYY-MM-DD HH:mm:ss"):t.value,e("update:value",r.value))}else t.infoType===0&&(r.value=a.getUserInfo.name,e("update:value",a.getUserInfo.id)),t.infoType===1&&(r.value=a.getUserInfo.departmentName,e("update:value",a.getUserInfo.departmentId)),t.infoType===2&&(r.value=Ft(new Date).format("YYYY-MM-DD HH:mm:ss"),e("update:value",r.value))})),(n,l)=>{const o=O("a-input");return A(),$("div",null,[T(o,{disabled:"",value:r.value,size:i.size,bordered:i.bordered},null,8,["value","size","bordered"])])}}}),me="name",re="id",q="children",J="data",Ve="id",Wt=E({__name:"SelectArea",props:{value:String},emits:["change","defaultChange","update:value"],setup(i,{emit:e}){const t=i,a=w([]),r=w([]),n=w(!1),l=w([]),o=w(!1),{t:u}=se();B(()=>t.value,(g,v)=>D(this,null,function*(){if(!g&&v&&g!==v){l.value=[];return}o.value||(g?l.value=g.split(","):l.value=[],yield c())}),{immediate:!0}),B(a,g=>{r.value=d(g),l.value.length>1&&f(l.value,r.value)},{deep:!0});function d(g){return g.reduce((v,h)=>{if(h){const b=h[re],y=ke(ce({},Se(h,[me,re])),{label:h[me],value:`${b}`,isLeaf:!1}),S=Reflect.get(h,q);S&&Reflect.set(y,q,d(S)),v.push(y)}return v},[])}function c(){return D(this,null,function*(){a.value=[],n.value=!0;try{const g=yield qe({id:"0"});if(Array.isArray(g)){a.value=g;return}J&&(a.value=ge(g,J)||[])}catch(g){}finally{n.value=!1}})}function _(g){return D(this,null,function*(){const v=g[g.length-1];v.loading=!0;try{const h=yield qe({[Ve]:Reflect.get(v,"value")});if(Array.isArray(h)){const b=d(h);v.children=b;return}if(J){const b=d(ge(h,J)||[]);v.children=b}}catch(h){}finally{v.loading=!1}})}function f(g,v){g.forEach(h=>{v.forEach(b=>D(this,null,function*(){if(b.value===h){b.children=[];const y=yield qe({id:h});b.children=y.map(S=>({label:S.name,value:S.id,isLeaf:!1})),f(g,b.children)}}))})}function p(g){if(o.value=!0,!g){e("change",g);return}e("change",g.join(",")),e("update:value",g==null?void 0:g.join(",")),l.value=t.value===void 0?g:l.value}function m({labels:g,selectedOptions:v}){if(C(l).length===v.length)return g.join(" / ")}return(g,v)=>(A(),j(C(Ge),{value:l.value,"onUpdate:value":v[0]||(v[0]=h=>l.value=h),options:r.value,"load-data":_,"change-on-select":"",onChange:p,displayRender:m},W({_:2},[n.value?{name:"suffixIcon",fn:k(()=>[T(C(_e),{spin:""})]),key:"0"}:void 0,n.value?{name:"notFoundContent",fn:k(()=>[ee("span",null,[T(C(_e),{spin:"",class:"mr-1"}),Z(" "+Q(C(u)("component.form.apiSelectNotFound")),1)])]),key:"1"}:void 0]),1032,["value","options"]))}}),ui=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/code-rule/list",params:i},{errorMessageMode:e})})},si=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/code-rule/page",params:i},{errorMessageMode:e})})},oi=function(i,e="modal"){return D(this,null,function*(){return Y.delete({url:"/system/code-rule",data:i},{errorMessageMode:e})})},ri=function(i,e="modal"){return D(this,null,function*(){return Y.post({url:"/system/code-rule",data:i},{errorMessageMode:e})})},li=function(i,e="modal"){return D(this,null,function*(){return Y.put({url:"/system/code-rule",data:i},{errorMessageMode:e})})},ni=function(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/code-rule/info",params:{id:i}},{errorMessageMode:e})})};function gi(i,e="modal"){return D(this,null,function*(){return Y.get({url:"/system/code-rule/generate",params:{encode:i}},{errorMessageMode:e})})}Yt=E({__name:"AutoCodeRule",props:{value:String,size:String,placeholder:String,addonBefore:String,addonAfter:String,prefix:String,suffix:String,autoCodeRule:String,disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(i,{emit:e}){const t=i,a=w("");return B(()=>t.autoCodeRule,r=>D(this,null,function*(){r&&(a.value=yield gi(r),e("update:value",a.value))}),{immediate:!0}),B(()=>t.value,r=>{a.value=r||""},{immediate:!0}),(r,n)=>{const l=O("a-input");return A(),$("div",null,[T(l,{size:i.size,value:a.value,"onUpdate:value":n[0]||(n[0]=o=>a.value=o),placeholder:i.placeholder,addonBefore:i.addonBefore,addonAfter:i.addonAfter,disabled:i.disabled,readonly:""},W({_:2},[i.prefix?{name:"prefix",fn:k(()=>[T(C(X),{icon:i.prefix},null,8,["icon"])]),key:"0"}:void 0,i.suffix?{name:"suffix",fn:k(()=>[T(C(X),{icon:i.suffix},null,8,["icon"])]),key:"1"}:void 0]),1032,["size","value","placeholder","addonBefore","addonAfter","disabled"])])}}});var V={},He=/^([+-])?0*(\d+)(\.(\d+))?$/,Ke=/^([+-])?0*(\d+)(\.(\d+))?e(([+-])?(\d+))$/i,pi=V.e2ten=function(i){var e=Ke.exec(i.toString());if(!e)return i;var t=e[2],a=e[4]||"",r=e[5]?+e[5]:0;if(r>0){var n=a.substr(0,r);n=n.length<r?n+new Array(r-n.length+1).join("0"):n,a=a.substr(r),t+=n}else{r=-r;var l=t.length-r;l=l<0?0:l;var o=t.substr(l,r);o=o.length<r?new Array(r-o.length+1).join("0")+o:o,t=t.substring(0,l),a=o+a}return t=t==""?"0":t,(e[1]=="-"?"-":"")+t+(a?"."+a:"")};V.getNumbResult=function(i){var e=He.exec(i.toString());if(!e&&Ke.test(i.toString())&&(e=He.exec(pi(i.toString()))),e)return{int:e[2],decimal:e[4],minus:e[1]=="-",num:e.slice(1,3).join("")}},V.centerArray=function i(e,t){if(e.splice.apply(e,[0,t.length].concat(t.splice(0,t.length))),arguments.length>2){var a=[].slice.call(arguments,2);a.unshift(e),i.apply(null,a)}return e};var _i=V.hasAttr=function(i,e){return Object.prototype.hasOwnProperty.call(i,e)};V.extend=function(i){for(var e,t=arguments[0]||{},a=Array.prototype.slice.call(arguments,1),r=0;r<a.length;r++){var n=a[r];for(e in n)_i(n,e)&&(t[e]=n[e])}return t},V.getDigit=function(i){return i>=5?(i-4)*4+4:i},V.unshiftZero=function(i,e){if(e==null&&(e=1),!(e<=0))for(;e--;)i.unshift(0)},V.clearZero=function(i,e,t){if(i==null)return"";var a=~"*.?+$^[](){}|\\/".indexOf(e)?"\\"+e:e,r=new RegExp("^"+a+"+"),n=new RegExp(a+"+$"),l=new RegExp(a+"{2}","g");return i=i.toString(),t=="^"&&(i=i.replace(r,"")),(!t||t=="$")&&(i=i.replace(n,"")),(!t||t=="nto1")&&(i=i.replace(l,e)),i};var P=V;function ve(i,e){var t=P.getNumbResult(i);if(!t)return i;e=e||{};var a=this.ch,r=this.ch_u,n=this.ch_f||"",l=this.ch_d||".",o=a.charAt(0),u=t.int,d=t.decimal,c=t.minus,_="",f="",p=c?n:"",m=function y(S,x,K){S=P.getNumbResult(S).int;var U="",ie=arguments.length>1?arguments[1]:e.tenMin,ue=S.length;if(ue==1)return a.charAt(+S);if(ue<=4)for(var ye=0,R=ue;R--;){var G=+S.charAt(ye);U+=ie&&ue==2&&ye==0&&G==1?"":a.charAt(G),U+=G&&R?r.charAt(R):"",ye++}else{for(var ae=S.length/4>>0,le=S.length%4;le==0||!r.charAt(3+ae);)le+=4,ae--;var ne=S.substr(0,le),de=S.substr(le);U=y(ne,ie)+r.charAt(3+ae)+(de.charAt(0)=="0"?o:"")+y(de,de.length>4?ie:!1)}return U=P.clearZero(U,o),U};if(d){d=P.clearZero(d,"0","$");for(var g=0;g<d.length;g++)f+=a.charAt(+d.charAt(g));f=f?l+f:""}if(_=m(u),e.ww&&r.length>5){var v=r.charAt(4),h=r.charAt(5),b=_.lastIndexOf(h);~b&&(_=_.substring(0,b).replace(new RegExp(h,"g"),v+v)+_.substring(b))}return p+_+f}function hi(i){i=i.toString();var e=i.split(this.ch_d),t=e[0].replace(this.ch_f,""),a=e[1],r=!!~e[0].indexOf(this.ch_f),n=this.ch_u.charAt(1),l=this.ch_u.charAt(4),o=this.ch_u.charAt(5);t=t.replace(new RegExp(l+"{2}","g"),o);for(var u=t.split(""),d=0,c=0,_=[],f=[],p=[],m=0;m<u.length;m++){var g=u[m],v=0,h=0;if(~(v=this.ch.indexOf(g)))v>0&&p.unshift(v);else if(~(h=this.ch_u.indexOf(g))){var b=P.getDigit(h);d>h?(P.unshiftZero(p,b),P.centerArray(f,p)):h>=c?(m==0&&(p=[1]),P.centerArray(_,f,p),_.length>0&&P.unshiftZero(_,b),c=h):(p.length==0&&n==g&&(p=[1]),P.centerArray(f,p),P.unshiftZero(f,P.getDigit(h)),d=h)}}P.centerArray(_,f,p).reverse(),_.length==0&&_.push(0);var y=0;if(a){_.push("."),y="0.";for(var m=0;m<a.length;m++)y+=this.ch.indexOf(a.charAt(m)),_.push(this.ch.indexOf(a.charAt(m)));y=+y}return r&&_.unshift("-"),parseFloat(_.join(""))}function mi(i,e){var t={ww:!0,complete:!1,outSymbol:!0,unOmitYuan:!1,forceZheng:!1},a=P.getNumbResult(i),r=this.ch.charAt(0);if(e=typeof e=="object"?e:{},!a)return i;e=P.extend(t,e);var n=a.int,l=a.decimal||"",o=e.outSymbol?this.m_t:"",u=a.minus?this.ch_f:"",d="";if(e.complete){for(var c=1;c<this.m_u.length;c++)d+=ve.call(this,l.charAt(c-1)||"0")+this.m_u.charAt(c);u+=ve.call(this,n,e)+this.m_u.charAt(0)}else{var _=e.unOmitYuan||n!=="0";if(l=l.substr(0,this.m_u.length-1),l=P.clearZero(l,"0","$"),l)for(var f,c=0;c<this.m_u.length-1;c++)l.charAt(c)&&l.charAt(c)!="0"&&(d+=ve.call(this,l.charAt(c))+this.m_u.charAt(c+1),f=!1),l.charAt(c)==="0"&&!f&&((c!=0||n!=="0")&&(d+=r),f=!0);(_||!d)&&(u+=ve.call(this,n,e)+this.m_u.charAt(0)),e.forceZheng?(d==""||d.charAt(d.length-1)!==this.m_u[2])&&(d+=this.m_z):u+=a.decimal?"":this.m_z,e.forceZheng}return o+u+d}var vi={CL:ve,unCL:hi,toMoney:mi},be=vi,Ee=V;function bi(i,e){return{encodeS:function(t,a){return a=Ee.extend({ww:!0,tenMin:!0},a),be.CL.call(i,t,a)},encodeB:function(t,a){return a=Ee.extend({ww:!0},a),be.CL.call(e,t,a)},decodeS:function(){return be.unCL.apply(i,arguments)},decodeB:function(){return be.unCL.apply(e,arguments)},toMoney:function(t,a){return a=Ee.extend({ww:!0},a),be.toMoney.call(e,t,a)}}}var yi=bi,wi={ch:"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ch_u:"\u4E2A\u5341\u767E\u5343\u4E07\u4EBF",ch_f:"\u8D1F",ch_d:"\u70B9"},Si={ch:"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",ch_u:"\u4E2A\u62FE\u4F70\u4EDF\u4E07\u4EBF",ch_f:"\u8D1F",ch_d:"\u70B9",m_t:"\u4EBA\u6C11\u5E01",m_z:"\u6574",m_u:"\u5143\u89D2\u5206"},Ci=yi,Ze={s:wi,b:Si},Ai=Ci(Ze.s,Ze.b);te=Yi(Ai);class s extends Array{constructor(e,t){if(super(e),this.sign=t,Object.setPrototypeOf(this,s.prototype),e>s.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Math.floor,a=Number.isFinite;if(typeof e=="number"){if(e===0)return s.__zero();if(s.__isOneDigitInt(e))return 0>e?s.__oneDigit(-e,!0):s.__oneDigit(e,!1);if(!a(e)||t(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return s.__fromDouble(e)}if(typeof e=="string"){const r=s.__fromString(e);if(r===null)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return r}if(typeof e=="boolean")return e===!0?s.__oneDigit(1,!1):s.__zero();if(typeof e=="object"){if(e.constructor===s)return e;const r=s.__toPrimitive(e);return s.BigInt(r)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){const e=["BigInt["];for(const t of this)e.push((t&&(t>>>0).toString(16))+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":e&e-1?s.__toStringGeneric(this,e,!1):s.__toStringBasePowerOfTwo(this,e)}valueOf(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}static toNumber(e){const t=e.length;if(t===0)return 0;if(t===1){const v=e.__unsignedDigit(0);return e.sign?-v:v}const a=e.__digit(t-1),r=s.__clz30(a),n=30*t-r;if(1024<n)return e.sign?-1/0:1/0;let l=n-1,o=a,u=t-1;const d=r+3;let c=d===32?0:o<<d;c>>>=12;const _=d-12;let f=12<=d?0:o<<20+d,p=20+d;for(0<_&&0<u&&(u--,o=e.__digit(u),c|=o>>>30-_,f=o<<_+2,p=_+2);0<p&&0<u;)u--,o=e.__digit(u),f|=30<=p?o<<p-30:o>>>30-p,p-=30;const m=s.__decideRounding(e,p,u,o);if((m===1||m===0&&(1&f)==1)&&(f=f+1>>>0,f===0&&(c++,c>>>20!=0&&(c=0,l++,1023<l))))return e.sign?-1/0:1/0;const g=e.sign?-2147483648:0;return l=l+1023<<20,s.__kBitConversionInts[1]=g|l|c,s.__kBitConversionInts[0]=f,s.__kBitConversionDouble[0]}static unaryMinus(e){if(e.length===0)return e;const t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?s.__absoluteSubOne(e).__trim():s.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(t.length===0)return s.__oneDigit(1,!1);if(e.length===0)return e;if(e.length===1&&e.__digit(0)===1)return e.sign&&!(1&t.__digit(0))?s.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");let a=t.__unsignedDigit(0);if(a===1)return e;if(a>=s.__kMaxLengthBits)throw new RangeError("BigInt too big");if(e.length===1&&e.__digit(0)===2){const l=1+(0|a/30),o=e.sign&&(1&a)!=0,u=new s(l,o);u.__initializeDigits();const d=1<<a%30;return u.__setDigit(l-1,d),u}let r=null,n=e;for(1&a&&(r=e),a>>=1;a!==0;a>>=1)n=s.multiply(n,n),1&a&&(r===null?r=n:r=s.multiply(r,n));return r}static multiply(e,t){if(e.length===0)return e;if(t.length===0)return t;let a=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&a--;const r=new s(a,e.sign!==t.sign);r.__initializeDigits();for(let n=0;n<e.length;n++)s.__multiplyAccumulate(t,e.__digit(n),r,n);return r.__trim()}static divide(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return s.__zero();const a=e.sign!==t.sign,r=t.__unsignedDigit(0);let n;if(t.length===1&&32767>=r){if(r===1)return a===e.sign?e:s.unaryMinus(e);n=s.__absoluteDivSmall(e,r,null)}else n=s.__absoluteDivLarge(e,t,!0,!1);return n.sign=a,n.__trim()}static remainder(e,t){if(t.length===0)throw new RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return e;const a=t.__unsignedDigit(0);if(t.length===1&&32767>=a){if(a===1)return s.__zero();const n=s.__absoluteModSmall(e,a);return n===0?s.__zero():s.__oneDigit(n,e.sign)}const r=s.__absoluteDivLarge(e,t,!1,!0);return r.sign=e.sign,r.__trim()}static add(e,t){const a=e.sign;return a===t.sign?s.__absoluteAdd(e,t,a):0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,a):s.__absoluteSub(t,e,!a)}static subtract(e,t){const a=e.sign;return a===t.sign?0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,a):s.__absoluteSub(t,e,!a):s.__absoluteAdd(e,t,a)}static leftShift(e,t){return t.length===0||e.length===0?e:t.sign?s.__rightShiftByAbsolute(e,t):s.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return t.length===0||e.length===0?e:t.sign?s.__leftShiftByAbsolute(e,t):s.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>s.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=s.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<s.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=s.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e.__digit(a)!==t.__digit(a))return!1;return!0}static notEqual(e,t){return!s.equal(e,t)}static bitwiseAnd(e,t){var a=Math.max;if(!e.sign&&!t.sign)return s.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){const r=a(e.length,t.length)+1;let n=s.__absoluteSubOne(e,r);const l=s.__absoluteSubOne(t);return n=s.__absoluteOr(n,l,n),s.__absoluteAddOne(n,!0,n).__trim()}return e.sign&&([e,t]=[t,e]),s.__absoluteAndNot(e,s.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){var a=Math.max;if(!e.sign&&!t.sign)return s.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){const l=a(e.length,t.length),o=s.__absoluteSubOne(e,l),u=s.__absoluteSubOne(t);return s.__absoluteXor(o,u,o).__trim()}const r=a(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let n=s.__absoluteSubOne(t,r);return n=s.__absoluteXor(n,e,n),s.__absoluteAddOne(n,!0,n).__trim()}static bitwiseOr(e,t){var a=Math.max;const r=a(e.length,t.length);if(!e.sign&&!t.sign)return s.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let l=s.__absoluteSubOne(e,r);const o=s.__absoluteSubOne(t);return l=s.__absoluteAnd(l,o,l),s.__absoluteAddOne(l,!0,l).__trim()}e.sign&&([e,t]=[t,e]);let n=s.__absoluteSubOne(t,r);return n=s.__absoluteAndNot(n,e,n),s.__absoluteAddOne(n,!0,n).__trim()}static asIntN(e,t){var a=Math.floor;if(t.length===0)return t;if(e=a(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return s.__zero();if(e>=s.__kMaxLengthBits)return t;const r=0|(e+29)/30;if(t.length<r)return t;const n=t.__unsignedDigit(r-1),l=1<<(e-1)%30;if(t.length===r&&n<l)return t;if((n&l)!==l)return s.__truncateToNBits(e,t);if(!t.sign)return s.__truncateAndSubFromPowerOfTwo(e,t,!0);if(!(n&l-1)){for(let o=r-2;0<=o;o--)if(t.__digit(o)!==0)return s.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===r&&n===l?t:s.__truncateToNBits(e,t)}return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){var a=Math.floor;if(t.length===0)return t;if(e=a(e),0>e)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(e===0)return s.__zero();if(t.sign){if(e>s.__kMaxLengthBits)throw new RangeError("BigInt too big");return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=s.__kMaxLengthBits)return t;const r=0|(e+29)/30;if(t.length<r)return t;const n=e%30;return t.length==r&&(n===0||!(t.__digit(r-1)>>>n))?t:s.__truncateToNBits(e,t)}static ADD(e,t){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),typeof e=="string")return typeof t!="string"&&(t=t.toString()),e+t;if(typeof t=="string")return e.toString()+t;if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)&&s.__isBigInt(t))return s.add(e,t);if(typeof e=="number"&&typeof t=="number")return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return s.__compare(e,t,0)}static LE(e,t){return s.__compare(e,t,1)}static GT(e,t){return s.__compare(e,t,2)}static GE(e,t){return s.__compare(e,t,3)}static EQ(e,t){for(;;){if(s.__isBigInt(e))return s.__isBigInt(t)?s.equal(e,t):s.EQ(t,e);if(typeof e=="number"){if(s.__isBigInt(t))return s.__equalToNumber(t,e);if(typeof t!="object")return e==t;t=s.__toPrimitive(t)}else if(typeof e=="string"){if(s.__isBigInt(t))return e=s.__fromString(e),e!==null&&s.equal(e,t);if(typeof t!="object")return e==t;t=s.__toPrimitive(t)}else if(typeof e=="boolean"){if(s.__isBigInt(t))return s.__equalToNumber(t,+e);if(typeof t!="object")return e==t;t=s.__toPrimitive(t)}else if(typeof e=="symbol"){if(s.__isBigInt(t))return!1;if(typeof t!="object")return e==t;t=s.__toPrimitive(t)}else if(typeof e=="object"){if(typeof t=="object"&&t.constructor!==s)return e==t;e=s.__toPrimitive(e)}else return e==t}}static NE(e,t){return!s.EQ(e,t)}static __zero(){return new s(0,!1)}static __oneDigit(e,t){const a=new s(1,t);return a.__setDigit(0,e),a}__copy(){const e=new s(this.length,this.sign);for(let t=0;t<this.length;t++)e[t]=this[t];return e}__trim(){let e=this.length,t=this[e-1];for(;t===0;)e--,t=this[e-1],this.pop();return e===0&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,a,r){if(0<t)return-1;let n;if(0>t)n=-t-1;else{if(a===0)return-1;a--,r=e.__digit(a),n=29}let l=1<<n;if(!(r&l))return-1;if(l-=1,(r&l)!=0)return 1;for(;0<a;)if(a--,e.__digit(a)!==0)return 1;return 0}static __fromDouble(e){s.__kBitConversionDouble[0]=e;const t=2047&s.__kBitConversionInts[1]>>>20,a=t-1023,r=(0|a/30)+1,n=new s(r,0>e);let l=1048575&s.__kBitConversionInts[1]|1048576,o=s.__kBitConversionInts[0];const u=20,d=a%30;let c,_=0;if(d<20){const f=u-d;_=f+32,c=l>>>f,l=l<<32-f|o>>>f,o<<=32-f}else if(d===20)_=32,c=l,l=o,o=0;else{const f=d-u;_=32-f,c=l<<f|o>>>32-f,l=o<<f,o=0}n.__setDigit(r-1,c);for(let f=r-2;0<=f;f--)0<_?(_-=30,c=l>>>2,l=l<<30|o>>>2,o<<=30):c=0,n.__setDigit(f,c);return n.__trim()}static __isWhitespace(e){return 13>=e&&9<=e||(159>=e?e==32:131071>=e?e==160||e==5760:196607>=e?(e&=131071,10>=e||e==40||e==41||e==47||e==95||e==4096):e==65279)}static __fromString(e,t=0){let a=0;const r=e.length;let n=0;if(n===r)return s.__zero();let l=e.charCodeAt(n);for(;s.__isWhitespace(l);){if(++n===r)return s.__zero();l=e.charCodeAt(n)}if(l===43){if(++n===r)return null;l=e.charCodeAt(n),a=1}else if(l===45){if(++n===r)return null;l=e.charCodeAt(n),a=-1}if(t===0){if(t=10,l===48){if(++n===r)return s.__zero();if(l=e.charCodeAt(n),l===88||l===120){if(t=16,++n===r)return null;l=e.charCodeAt(n)}else if(l===79||l===111){if(t=8,++n===r)return null;l=e.charCodeAt(n)}else if(l===66||l===98){if(t=2,++n===r)return null;l=e.charCodeAt(n)}}}else if(t===16&&l===48){if(++n===r)return s.__zero();if(l=e.charCodeAt(n),l===88||l===120){if(++n===r)return null;l=e.charCodeAt(n)}}if(a!=0&&t!==10)return null;for(;l===48;){if(++n===r)return s.__zero();l=e.charCodeAt(n)}const o=r-n;let u=s.__kMaxBitsPerChar[t],d=s.__kBitsPerCharTableMultiplier-1;if(o>1073741824/u)return null;const c=u*o+d>>>s.__kBitsPerCharTableShift,_=new s(0|(c+29)/30,!1),f=10>t?t:10,p=10<t?t-10:0;if(t&t-1){_.__initializeDigits();let m=!1,g=0;do{let v=0,h=1;for(;;){let y;if(l-48>>>0<f)y=l-48;else if((32|l)-97>>>0<p)y=(32|l)-87;else{m=!0;break}const S=h*t;if(1073741823<S)break;if(h=S,v=v*t+y,g++,++n===r){m=!0;break}l=e.charCodeAt(n)}d=30*s.__kBitsPerCharTableMultiplier-1;const b=0|(u*g+d>>>s.__kBitsPerCharTableShift)/30;_.__inplaceMultiplyAdd(h,v,b)}while(!m)}else{u>>=s.__kBitsPerCharTableShift;const m=[],g=[];let v=!1;do{let h=0,b=0;for(;;){let y;if(l-48>>>0<f)y=l-48;else if((32|l)-97>>>0<p)y=(32|l)-87;else{v=!0;break}if(b+=u,h=h<<u|y,++n===r){v=!0;break}if(l=e.charCodeAt(n),30<b+u)break}m.push(h),g.push(b)}while(!v);s.__fillFromParts(_,m,g)}if(n!==r){if(!s.__isWhitespace(l))return null;for(n++;n<r;n++)if(l=e.charCodeAt(n),!s.__isWhitespace(l))return null}return _.sign=a==-1,_.__trim()}static __fillFromParts(e,t,a){let r=0,n=0,l=0;for(let o=t.length-1;0<=o;o--){const u=t[o],d=a[o];n|=u<<l,l+=d,l===30?(e.__setDigit(r++,n),l=0,n=0):30<l&&(e.__setDigit(r++,1073741823&n),l-=30,n=u>>>d-l)}if(n!==0){if(r>=e.length)throw new Error("implementation bug");e.__setDigit(r++,n)}for(;r<e.length;r++)e.__setDigit(r,0)}static __toStringBasePowerOfTwo(e,t){const a=e.length;let r=t-1;r=(85&r>>>1)+(85&r),r=(51&r>>>2)+(51&r),r=(15&r>>>4)+(15&r);const n=r,l=t-1,o=e.__digit(a-1),u=s.__clz30(o);let d=0|(30*a-u+n-1)/n;if(e.sign&&d++,268435456<d)throw new Error("string too long");const c=Array(d);let _=d-1,f=0,p=0;for(let g=0;g<a-1;g++){const v=e.__digit(g),h=(f|v<<p)&l;c[_--]=s.__kConversionChars[h];const b=n-p;for(f=v>>>b,p=30-b;p>=n;)c[_--]=s.__kConversionChars[f&l],f>>>=n,p-=n}const m=(f|o<<p)&l;for(c[_--]=s.__kConversionChars[m],f=o>>>n-p;f!==0;)c[_--]=s.__kConversionChars[f&l],f>>>=n;if(e.sign&&(c[_--]="-"),_!=-1)throw new Error("implementation bug");return c.join("")}static __toStringGeneric(e,t,a){const r=e.length;if(r===0)return"";if(r===1){let g=e.__unsignedDigit(0).toString(t);return a===!1&&e.sign&&(g="-"+g),g}const n=30*r-s.__clz30(e.__digit(r-1)),l=s.__kMaxBitsPerChar[t],o=l-1;let u=n*s.__kBitsPerCharTableMultiplier;u+=o-1,u=0|u/o;const d=u+1>>1,c=s.exponentiate(s.__oneDigit(t,!1),s.__oneDigit(d,!1));let _,f;const p=c.__unsignedDigit(0);if(c.length===1&&32767>=p){_=new s(e.length,!1),_.__initializeDigits();let g=0;for(let v=2*e.length-1;0<=v;v--){const h=g<<15|e.__halfDigit(v);_.__setHalfDigit(v,0|h/p),g=0|h%p}f=g.toString(t)}else{const g=s.__absoluteDivLarge(e,c,!0,!0);_=g.quotient;const v=g.remainder.__trim();f=s.__toStringGeneric(v,t,!0)}_.__trim();let m=s.__toStringGeneric(_,t,!0);for(;f.length<d;)f="0"+f;return a===!1&&e.sign&&(m="-"+m),m+f}static __unequalSign(e){return e?-1:1}static __absoluteGreater(e){return e?-1:1}static __absoluteLess(e){return e?1:-1}static __compareToBigInt(e,t){const a=e.sign;if(a!==t.sign)return s.__unequalSign(a);const r=s.__absoluteCompare(e,t);return 0<r?s.__absoluteGreater(a):0>r?s.__absoluteLess(a):0}static __compareToNumber(e,t){if(s.__isOneDigitInt(t)){const a=e.sign,r=0>t;if(a!==r)return s.__unequalSign(a);if(e.length===0){if(r)throw new Error("implementation bug");return t===0?0:-1}if(1<e.length)return s.__absoluteGreater(a);const n=Math.abs(t),l=e.__unsignedDigit(0);return l>n?s.__absoluteGreater(a):l<n?s.__absoluteLess(a):0}return s.__compareToDouble(e,t)}static __compareToDouble(e,t){if(t!==t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;const a=e.sign;if(a!==0>t)return s.__unequalSign(a);if(t===0)throw new Error("implementation bug: should be handled elsewhere");if(e.length===0)return-1;s.__kBitConversionDouble[0]=t;const r=2047&s.__kBitConversionInts[1]>>>20;if(r==2047)throw new Error("implementation bug: handled elsewhere");const n=r-1023;if(0>n)return s.__absoluteGreater(a);const l=e.length;let o=e.__digit(l-1);const u=s.__clz30(o),d=30*l-u,c=n+1;if(d<c)return s.__absoluteLess(a);if(d>c)return s.__absoluteGreater(a);let _=1048576|1048575&s.__kBitConversionInts[1],f=s.__kBitConversionInts[0];const p=20,m=29-u;if(m!==(0|(d-1)%30))throw new Error("implementation bug");let g,v=0;if(20>m){const h=p-m;v=h+32,g=_>>>h,_=_<<32-h|f>>>h,f<<=32-h}else if(m===20)v=32,g=_,_=f,f=0;else{const h=m-p;v=32-h,g=_<<h|f>>>32-h,_=f<<h,f=0}if(o>>>=0,g>>>=0,o>g)return s.__absoluteGreater(a);if(o<g)return s.__absoluteLess(a);for(let h=l-2;0<=h;h--){0<v?(v-=30,g=_>>>2,_=_<<30|f>>>2,f<<=30):g=0;const b=e.__unsignedDigit(h);if(b>g)return s.__absoluteGreater(a);if(b<g)return s.__absoluteLess(a)}if(_!==0||f!==0){if(v===0)throw new Error("implementation bug");return s.__absoluteLess(a)}return 0}static __equalToNumber(e,t){var a=Math.abs;return s.__isOneDigitInt(t)?t===0?e.length===0:e.length===1&&e.sign===0>t&&e.__unsignedDigit(0)===a(t):s.__compareToDouble(e,t)===0}static __comparisonResultToBool(e,t){return t===0?0>e:t===1?0>=e:t===2?0<e:t===3?0<=e:void 0}static __compare(e,t,a){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),typeof e=="string"&&typeof t=="string")switch(a){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(s.__isBigInt(e)&&typeof t=="string")return t=s.__fromString(t),t!==null&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),a);if(typeof e=="string"&&s.__isBigInt(t))return e=s.__fromString(e),e!==null&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),a);if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)){if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToBigInt(e,t),a);if(typeof t!="number")throw new Error("implementation bug");return s.__comparisonResultToBool(s.__compareToNumber(e,t),a)}if(typeof e!="number")throw new Error("implementation bug");if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToNumber(t,e),2^a);if(typeof t!="number")throw new Error("implementation bug");return a===0?e<t:a===1?e<=t:a===2?e>t:a===3?e>=t:void 0}__clzmsd(){return s.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,a){if(e.length<t.length)return s.__absoluteAdd(t,e,a);if(e.length===0)return e;if(t.length===0)return e.sign===a?e:s.unaryMinus(e);let r=e.length;(e.__clzmsd()===0||t.length===e.length&&t.__clzmsd()===0)&&r++;const n=new s(r,a);let l=0,o=0;for(;o<t.length;o++){const u=e.__digit(o)+t.__digit(o)+l;l=u>>>30,n.__setDigit(o,1073741823&u)}for(;o<e.length;o++){const u=e.__digit(o)+l;l=u>>>30,n.__setDigit(o,1073741823&u)}return o<n.length&&n.__setDigit(o,l),n.__trim()}static __absoluteSub(e,t,a){if(e.length===0)return e;if(t.length===0)return e.sign===a?e:s.unaryMinus(e);const r=new s(e.length,a);let n=0,l=0;for(;l<t.length;l++){const o=e.__digit(l)-t.__digit(l)-n;n=1&o>>>30,r.__setDigit(l,1073741823&o)}for(;l<e.length;l++){const o=e.__digit(l)-n;n=1&o>>>30,r.__setDigit(l,1073741823&o)}return r.__trim()}static __absoluteAddOne(e,t,a=null){const r=e.length;a===null?a=new s(r,t):a.sign=t;let n=1;for(let l=0;l<r;l++){const o=e.__digit(l)+n;n=o>>>30,a.__setDigit(l,1073741823&o)}return n!=0&&a.__setDigitGrow(r,1),a}static __absoluteSubOne(e,t){const a=e.length;t=t||a;const r=new s(t,!1);let n=1;for(let l=0;l<a;l++){const o=e.__digit(l)-n;n=1&o>>>30,r.__setDigit(l,1073741823&o)}if(n!=0)throw new Error("implementation bug");for(let l=a;l<t;l++)r.__setDigit(l,0);return r}static __absoluteAnd(e,t,a=null){let r=e.length,n=t.length,l=n;if(r<n){l=r;const d=e,c=r;e=t,r=n,t=d,n=c}let o=l;a===null?a=new s(o,!1):o=a.length;let u=0;for(;u<l;u++)a.__setDigit(u,e.__digit(u)&t.__digit(u));for(;u<o;u++)a.__setDigit(u,0);return a}static __absoluteAndNot(e,t,a=null){const r=e.length,n=t.length;let l=n;r<n&&(l=r);let o=r;a===null?a=new s(o,!1):o=a.length;let u=0;for(;u<l;u++)a.__setDigit(u,e.__digit(u)&~t.__digit(u));for(;u<r;u++)a.__setDigit(u,e.__digit(u));for(;u<o;u++)a.__setDigit(u,0);return a}static __absoluteOr(e,t,a=null){let r=e.length,n=t.length,l=n;if(r<n){l=r;const d=e,c=r;e=t,r=n,t=d,n=c}let o=r;a===null?a=new s(o,!1):o=a.length;let u=0;for(;u<l;u++)a.__setDigit(u,e.__digit(u)|t.__digit(u));for(;u<r;u++)a.__setDigit(u,e.__digit(u));for(;u<o;u++)a.__setDigit(u,0);return a}static __absoluteXor(e,t,a=null){let r=e.length,n=t.length,l=n;if(r<n){l=r;const d=e,c=r;e=t,r=n,t=d,n=c}let o=r;a===null?a=new s(o,!1):o=a.length;let u=0;for(;u<l;u++)a.__setDigit(u,e.__digit(u)^t.__digit(u));for(;u<r;u++)a.__setDigit(u,e.__digit(u));for(;u<o;u++)a.__setDigit(u,0);return a}static __absoluteCompare(e,t){const a=e.length-t.length;if(a!=0)return a;let r=e.length-1;for(;0<=r&&e.__digit(r)===t.__digit(r);)r--;return 0>r?0:e.__unsignedDigit(r)>t.__unsignedDigit(r)?1:-1}static __multiplyAccumulate(e,t,a,r){if(t===0)return;const n=32767&t,l=t>>>15;let o=0,u=0;for(let d,c=0;c<e.length;c++,r++){d=a.__digit(r);const _=e.__digit(c),f=32767&_,p=_>>>15,m=s.__imul(f,n),g=s.__imul(f,l),v=s.__imul(p,n),h=s.__imul(p,l);d+=u+m+o,o=d>>>30,d&=1073741823,d+=((32767&g)<<15)+((32767&v)<<15),o+=d>>>30,u=h+(g>>>15)+(v>>>15),a.__setDigit(r,1073741823&d)}for(;o!=0||u!==0;r++){let d=a.__digit(r);d+=o+u,u=0,o=d>>>30,a.__setDigit(r,1073741823&d)}}static __internalMultiplyAdd(e,t,a,r,n){let l=a,o=0;for(let u=0;u<r;u++){const d=e.__digit(u),c=s.__imul(32767&d,t),_=s.__imul(d>>>15,t),f=c+((32767&_)<<15)+o+l;l=f>>>30,o=_>>>15,n.__setDigit(u,1073741823&f)}if(n.length>r)for(n.__setDigit(r++,l+o);r<n.length;)n.__setDigit(r++,0);else if(l+o!==0)throw new Error("implementation bug")}__inplaceMultiplyAdd(e,t,a){a>this.length&&(a=this.length);const r=32767&e,n=e>>>15;let l=0,o=t;for(let u=0;u<a;u++){const d=this.__digit(u),c=32767&d,_=d>>>15,f=s.__imul(c,r),p=s.__imul(c,n),m=s.__imul(_,r),g=s.__imul(_,n);let v=o+f+l;l=v>>>30,v&=1073741823,v+=((32767&p)<<15)+((32767&m)<<15),l+=v>>>30,o=g+(p>>>15)+(m>>>15),this.__setDigit(u,1073741823&v)}if(l!=0||o!==0)throw new Error("implementation bug")}static __absoluteDivSmall(e,t,a=null){a===null&&(a=new s(e.length,!1));let r=0;for(let n,l=2*e.length-1;0<=l;l-=2){n=(r<<15|e.__halfDigit(l))>>>0;const o=0|n/t;r=0|n%t,n=(r<<15|e.__halfDigit(l-1))>>>0;const u=0|n/t;r=0|n%t,a.__setDigit(l>>>1,o<<15|u)}return a}static __absoluteModSmall(e,t){let a=0;for(let r=2*e.length-1;0<=r;r--)a=0|((a<<15|e.__halfDigit(r))>>>0)%t;return a}static __absoluteDivLarge(e,t,a,r){const n=t.__halfDigitLength(),l=t.length,o=e.__halfDigitLength()-n;let u=null;a&&(u=new s(o+2>>>1,!1),u.__initializeDigits());const d=new s(n+2>>>1,!1);d.__initializeDigits();const c=s.__clz15(t.__halfDigit(n-1));0<c&&(t=s.__specialLeftShift(t,c,0));const _=s.__specialLeftShift(e,c,1),f=t.__halfDigit(n-1);let p=0;for(let m,g=o;0<=g;g--){m=32767;const v=_.__halfDigit(g+n);if(v!==f){const b=(v<<15|_.__halfDigit(g+n-1))>>>0;m=0|b/f;let y=0|b%f;const S=t.__halfDigit(n-2),x=_.__halfDigit(g+n-2);for(;s.__imul(m,S)>>>0>(y<<16|x)>>>0&&(m--,y+=f,!(32767<y)););}s.__internalMultiplyAdd(t,m,0,l,d);let h=_.__inplaceSub(d,g,n+1);h!==0&&(h=_.__inplaceAdd(t,g,n),_.__setHalfDigit(g+n,32767&_.__halfDigit(g+n)+h),m--),a&&(1&g?p=m<<15:u.__setDigit(g>>>1,p|m))}if(r)return _.__inplaceRightShift(c),a?{quotient:u,remainder:_}:_;if(a)return u;throw new Error("unreachable")}static __clz15(e){return s.__clz30(e)-15}__inplaceAdd(e,t,a){let r=0;for(let n=0;n<a;n++){const l=this.__halfDigit(t+n)+e.__halfDigit(n)+r;r=l>>>15,this.__setHalfDigit(t+n,32767&l)}return r}__inplaceSub(e,t,a){let r=0;if(1&t){t>>=1;let n=this.__digit(t),l=32767&n,o=0;for(;o<a-1>>>1;o++){const c=e.__digit(o),_=(n>>>15)-(32767&c)-r;r=1&_>>>15,this.__setDigit(t+o,(32767&_)<<15|32767&l),n=this.__digit(t+o+1),l=(32767&n)-(c>>>15)-r,r=1&l>>>15}const u=e.__digit(o),d=(n>>>15)-(32767&u)-r;if(r=1&d>>>15,this.__setDigit(t+o,(32767&d)<<15|32767&l),t+o+1>=this.length)throw new RangeError("out of bounds");!(1&a)&&(n=this.__digit(t+o+1),l=(32767&n)-(u>>>15)-r,r=1&l>>>15,this.__setDigit(t+e.length,1073709056&n|32767&l))}else{t>>=1;let n=0;for(;n<e.length-1;n++){const c=this.__digit(t+n),_=e.__digit(n),f=(32767&c)-(32767&_)-r;r=1&f>>>15;const p=(c>>>15)-(_>>>15)-r;r=1&p>>>15,this.__setDigit(t+n,(32767&p)<<15|32767&f)}const l=this.__digit(t+n),o=e.__digit(n),u=(32767&l)-(32767&o)-r;r=1&u>>>15;let d=0;!(1&a)&&(d=(l>>>15)-(o>>>15)-r,r=1&d>>>15),this.__setDigit(t+n,(32767&d)<<15|32767&u)}return r}__inplaceRightShift(e){if(e===0)return;let t=this.__digit(0)>>>e;const a=this.length-1;for(let r=0;r<a;r++){const n=this.__digit(r+1);this.__setDigit(r,1073741823&n<<30-e|t),t=n>>>e}this.__setDigit(a,t)}static __specialLeftShift(e,t,a){const r=e.length,n=new s(r+a,!1);if(t===0){for(let o=0;o<r;o++)n.__setDigit(o,e.__digit(o));return 0<a&&n.__setDigit(r,0),n}let l=0;for(let o=0;o<r;o++){const u=e.__digit(o);n.__setDigit(o,1073741823&u<<t|l),l=u>>>30-t}return 0<a&&n.__setDigit(r,l),n}static __leftShiftByAbsolute(e,t){const a=s.__toShiftAmount(t);if(0>a)throw new RangeError("BigInt too big");const r=0|a/30,n=a%30,l=e.length,o=n!==0&&e.__digit(l-1)>>>30-n!=0,u=l+r+(o?1:0),d=new s(u,e.sign);if(n===0){let c=0;for(;c<r;c++)d.__setDigit(c,0);for(;c<u;c++)d.__setDigit(c,e.__digit(c-r))}else{let c=0;for(let _=0;_<r;_++)d.__setDigit(_,0);for(let _=0;_<l;_++){const f=e.__digit(_);d.__setDigit(_+r,1073741823&f<<n|c),c=f>>>30-n}if(o)d.__setDigit(l+r,c);else if(c!==0)throw new Error("implementation bug")}return d.__trim()}static __rightShiftByAbsolute(e,t){const a=e.length,r=e.sign,n=s.__toShiftAmount(t);if(0>n)return s.__rightShiftByMaximum(r);const l=0|n/30,o=n%30;let u=a-l;if(0>=u)return s.__rightShiftByMaximum(r);let d=!1;if(r){if(e.__digit(l)&(1<<o)-1)d=!0;else for(let _=0;_<l;_++)if(e.__digit(_)!==0){d=!0;break}}d&&o===0&&!~e.__digit(a-1)&&u++;let c=new s(u,r);if(o===0){c.__setDigit(u-1,0);for(let _=l;_<a;_++)c.__setDigit(_-l,e.__digit(_))}else{let _=e.__digit(l)>>>o;const f=a-l-1;for(let p=0;p<f;p++){const m=e.__digit(p+l+1);c.__setDigit(p,1073741823&m<<30-o|_),_=m>>>o}c.__setDigit(f,_)}return d&&(c=s.__absoluteAddOne(c,!0,c)),c.__trim()}static __rightShiftByMaximum(e){return e?s.__oneDigit(1,!0):s.__zero()}static __toShiftAmount(e){if(1<e.length)return-1;const t=e.__unsignedDigit(0);return t>s.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if(typeof e!="object"||e.constructor===s)return e;if(typeof Symbol<"u"&&typeof Symbol.toPrimitive=="symbol"){const n=e[Symbol.toPrimitive];if(n){const l=n(t);if(typeof l!="object")return l;throw new TypeError("Cannot convert object to primitive value")}}const a=e.valueOf;if(a){const n=a.call(e);if(typeof n!="object")return n}const r=e.toString;if(r){const n=r.call(e);if(typeof n!="object")return n}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return s.__isBigInt(e)?e:+e}static __isBigInt(e){return typeof e=="object"&&e!==null&&e.constructor===s}static __truncateToNBits(e,t){const a=0|(e+29)/30,r=new s(a,t.sign),n=a-1;for(let o=0;o<n;o++)r.__setDigit(o,t.__digit(o));let l=t.__digit(n);if(e%30!=0){const o=32-e%30;l=l<<o>>>o}return r.__setDigit(n,l),r.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,a){var r=Math.min;const n=0|(e+29)/30,l=new s(n,a);let o=0;const u=n-1;let d=0;for(const p=r(u,t.length);o<p;o++){const m=0-t.__digit(o)-d;d=1&m>>>30,l.__setDigit(o,1073741823&m)}for(;o<u;o++)l.__setDigit(o,0|1073741823&-d);let c=u<t.length?t.__digit(u):0;const _=e%30;let f;if(_==0)f=0-c-d,f&=1073741823;else{const p=32-_;c=c<<p>>>p;const m=1<<32-p;f=m-c-d,f&=m-1}return l.__setDigit(u,f),l.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){const e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){const a=e>>>1,r=this.__digit(a),n=1&e?32767&r|t<<15:1073709056&r|32767&t;this.__setDigit(a,n)}static __digitPow(e,t){let a=1;for(;0<t;)1&t&&(a*=e),t>>>=1,e*=e;return a}static __isOneDigitInt(e){return(1073741823&e)===e}}s.__kMaxLength=33554432,s.__kMaxLengthBits=s.__kMaxLength<<5,s.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],s.__kBitsPerCharTableShift=5,s.__kBitsPerCharTableMultiplier=1<<s.__kBitsPerCharTableShift,s.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],s.__kBitConversionBuffer=new ArrayBuffer(8),s.__kBitConversionDouble=new Float64Array(s.__kBitConversionBuffer),s.__kBitConversionInts=new Int32Array(s.__kBitConversionBuffer),s.__clz30=Math.clz32?function(i){return Math.clz32(i)-2}:function(i){return i===0?30:0|29-(0|Math.log(i>>>0)/Math.LN2)},s.__imul=Math.imul||function(i,e){return 0|i*e};function Di(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Xe(i,e){for(var t,a=0;a<e.length;a++)t=e[a],t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}function Bi(i,e,t){return e&&Xe(i.prototype,e),t&&Xe(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function Le(){return Le=Object.assign?Object.assign.bind():function(i){for(var e,t=1;t<arguments.length;t++)for(var a in e=arguments[t],e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a]);return i},Le.apply(this,arguments)}function ki(i,e){return xi(i)||Ti(i,e)||Mi(i,e)||Ii()}function xi(i){if(Array.isArray(i))return i}function Ti(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var a,r,n=[],l=!0,o=!1;try{for(t=t.call(i);!(l=(a=t.next()).done)&&(n.push(a.value),!(e&&n.length===e));l=!0);}catch(u){o=!0,r=u}finally{try{l||t.return==null||t.return()}finally{if(o)throw r}}return n}}function Mi(i,e){if(i){if(typeof i=="string")return Je(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Je(i,e):void 0}}function Je(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,a=Array(e);t<e;t++)a[t]=i[t];return a}function Ii(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  2. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}String.prototype.repeat||(String.prototype.repeat=function(i){var e=Math.floor;if(this==null)throw new TypeError("can't convert "+this+" to object");var t=""+this;if(i=+i,i!=i&&(i=0),0>i)throw new RangeError("repeat count must be non-negative");if(i==1/0)throw new RangeError("repeat count must be less than infinity");if(i=e(i),t.length==0||i==0)return"";if(268435456<=t.length*i)throw new RangeError("repeat count must not overflow maximum string size");for(var a="";(1&i)==1&&(a+=t),i>>>=1,i!=0;)t+=t;return a}),String.prototype.padStart||(String.prototype.padStart=function(i,e){return i>>=0,e=(typeof e>"u"?" ":e)+"",this.length>i||e===""?this+"":(i-=this.length,i>e.length&&(e+=e.repeat(i/e.length)),e.slice(0,i)+(this+""))}),String.prototype.padEnd||(String.prototype.padEnd=function(i,e){return i>>=0,e=(typeof e>"u"?" ":e)+"",this.length>i||e===""?this+"":(i-=this.length,i>e.length&&(e+=e.repeat(i/e.length)),this+""+e.slice(0,i))});var H=function(){function i(e){if(Di(this,i),this._n=s.BigInt(0),e instanceof i)return e;var t=(e+"").split(".").concat(""),a=ki(t,2),r=a[0],n=a[1];this._n=s.add(s.BigInt(r+n.padEnd(i.DECIMALS,"0").slice(0,i.DECIMALS)),s.BigInt(i.ROUNDED&&"5"<=n[i.DECIMALS]))}return Bi(i,[{key:"add",value:function(e){return i.fromJSBIBigInt(s.add(this._n,new i(e)._n))}},{key:"subtract",value:function(e){return i.fromJSBIBigInt(s.subtract(this._n,new i(e)._n))}},{key:"multiply",value:function(e){return i._divRound(s.multiply(this._n,new i(e)._n),i.SHIFT)}},{key:"divide",value:function(e){return i._divRound(s.multiply(this._n,i.SHIFT),new i(e)._n)}},{key:"toString",value:function(){var e=this._n.toString(),t=e.startsWith("-");e=t?e.slice(1).padStart(i.DECIMALS+1,"0"):e.padStart(i.DECIMALS+1,"0");var a=e.slice(0,-i.DECIMALS)+"."+e.slice(-i.DECIMALS).replace(/\.?0+$/,"");return t&&(a="-"+a),a.slice(-1)==="."?a.slice(0,-1):a}}],[{key:"fromJSBIBigInt",value:function(e){return Le(Object.create(i.prototype),{_n:e})}},{key:"_divRound",value:function(e,t){return i.fromJSBIBigInt(s.add(s.divide(e,t),i.ROUNDED?s.remainder(s.divide(s.multiply(e,s.BigInt(2)),t),s.BigInt(2)):s.BigInt(0)))}},{key:"sqrt",value:function(e){var t=Math.abs;if(new i(e).toString()==="0")return new i("0");if(new i(e).toString().startsWith("-"))return NaN;var a=new i(e),r="0";do a=new i(a).add(new i(e).divide(new i(a))).divide(new i("2")),r=new i(a).subtract(new i(new i(a).add(new i(e).divide(new i(a))).divide(new i("2"))));while(1e-18<t(+r.toString()));return a}}]),i}();H.DECIMALS=18,H.ROUNDED=!0,H.SHIFT=s.BigInt("1"+"0".repeat(H.DECIMALS));function Fi(i){return We(et(Qe(i)))}function Qe(i){var e;try{var t=new Function("return ("+i+") || 0");t(),e=!0}catch(n){throw e=!1,new Error("The expression is not accurate")}if(e){var a=["(",")","+","-","*","/"],r=i.split("").reduce(function(){var n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],l=1<arguments.length?arguments[1]:void 0,o=l.trim();return o==="("||o===")"||o==="+"||o==="-"||o==="*"||o==="/"?n.push(o):2<=n.length&&n[n.length-1]==="-"&&n[n.length-2]==="("?n[n.length-1]+=o:-1<a.indexOf(n[n.length-1])&&o?n.push(o):n.length!==0&&n[n.length-1]?n[n.length-1]+=o:n.push(o),n},[]);return r}return[]}function We(i){var e=[];return i.forEach(function(t){switch(t){case"+":{var a=e.pop(),r=e.pop();a&&r&&e.push(new H(r).add(a));break}case"-":{var n=e.pop(),l=e.pop();n&&l&&e.push(new H(l).subtract(n));break}case"*":{var o=e.pop(),u=e.pop();o&&u&&e.push(new H(u).multiply(o));break}case"/":{var d=e.pop(),c=e.pop();d&&c&&e.push(new H(c).divide(d));break}default:e.push(new H(t))}}),e.pop()+""}function et(i){var e=[],t=[],a=Oi(i);return Array.isArray(a)&&a.forEach(function(r){if(tt(r.value)||it(r.value))e.push(r);else if(at(r.value)){for(;0<t.length&&r.associativity&&r.precedence&&(r.associativity()==="left"&&r.precedence()<=Be(t).precedence()||r.associativity()==="right"&&r.precedence()<Be(t).precedence()||r.type==="Left Parenthesis");)e.push(t.pop());t.push(r)}else if(nt(r.value))t.push(r);else if(rt(r.value)){for(;0<t.length&&Be(t).type==="Operator";)e.push(t.pop());0<t.length&&Be(t).type==="Left Parenthesis"&&t.pop()}}),e.concat(t.reverse()).map(function(r){return r.value})}function Be(i){return Array.isArray(i)&&0<i.length?i.slice(-1)[0]:void 0}function Oi(i){var e=[],t={"^":"right","*":"left","/":"left","+":"left","-":"left"},a={"^":4,"*":3,"/":3,"+":2,"-":2},r=function(n,l){this.type=n,this.value=l};return r.prototype.precedence=function(){return a[this.value]},r.prototype.associativity=function(){return t[this.value]},Array.isArray(i)&&i.forEach(function(n){tt(n)?e.push(new r("Literal",n)):it(n)?e.push(new r("Variable",n)):at(n)?e.push(new r("Operator",n)):nt(n)?e.push(new r("Left Parenthesis",n)):rt(n)?e.push(new r("Right Parenthesis",n)):zi(n)&&e.push(new r("Function Argument Seperator",n))}),e}function zi(i){return i===","}function tt(i){return/\d/.test(i)}function it(i){return/[a-z]/i.test(i)}function at(i){return/\+|-|\*|\/|\^/.test(i)}function nt(i){return i==="("}function rt(i){return i===")"}var lt={calculator:Fi,arrayizeExpression:Qe,jsbiCal:We,rpnParse:et,BigDecimal:H};let st,ot,ut,dt,ct,ft,gt,pt,_t,ht,mt;Vt=E({__name:"MoneyChineseInput",props:{value:{type:[Number,String],default:0},maxlength:{type:[String,Number]},placeholder:{type:String},addonBefore:{type:String},addonAfter:{type:String},prefix:{type:String},suffix:{type:String},disabled:{type:Boolean},computationalConfig:{type:Array},computationalConfigValue:{type:String},index:{type:Number},size:{type:String},bordered:{type:Boolean,default:!0}},emits:["update:value","change","blur"],setup(i,{emit:e}){const t=i,a=w(),r=w(0),n=w(`${te.encodeB(r.value)}\u5143`),l=w(!1),o=L("formModel",null),u=L("isCustomForm",!1),{calculator:d}=lt;B(()=>t.value,p=>{r.value=Number(p)},{immediate:!0}),B(()=>r.value,p=>{if(p||p===0){const m=p.toString().split("."),g=m.length>1?m[1].split(""):[];g.length>1?n.value=`${te.encodeB(m[0])}\u5143${te.encodeB(g[0])}\u89D2${te.encodeB(g[1])}\u5206`:g.length?n.value=`${te.encodeB(m[0])}\u5143${te.encodeB(g[0])}\u89D2`:n.value=`${te.encodeB(m[0])}\u5143`}else n.value="";e("update:value",p)},{immediate:!0}),B(()=>o,()=>{var m;if(!((m=Ie(t))!=null&&m.computationalConfig))return;let p="";for(let g of Ie(t).computationalConfig){const v=u?`${g.bindTable}List`:`${F(g.bindTable)}List`,h=u?g.bindField:F(g.bindField);if(g.type==="computational"||g.type==="money-chinese")if(g.isMainForm)p+=o[h]||0;else{if(!o[v])return;if(g.computationalMethod){const b=o[v].map(y=>y[h]||0);switch(g.computationalMethod){case"sum":p+=`${Pt(b)}`;break;case"mean":p+=`${Nt(b)}`;break;case"min":p+=`${Rt(b)}`;break;case"max":p+=`${Lt(b)}`;break}}else p+=o[v][t.index]&&o[v][t.index][h]||0}else p+=`${g.label}`}if(t.computationalConfig.length>0)try{r.value=d(`(${p})`)==="undefined"?0:Number(d(`(${p})`)),e("update:value",r.value)}catch(g){}},{deep:!0,immediate:!0});const c=()=>{l.value=!l.value,Ye(()=>{a.value.focus()})},_=()=>{l.value=!l.value,e("blur")},f=()=>{e("change")};return(p,m)=>{const g=O("a-input"),v=O("a-input-number");return A(),$("div",null,[l.value?Ae("",!0):(A(),j(g,{key:0,readonly:"",value:n.value,"onUpdate:value":m[0]||(m[0]=h=>n.value=h),placeholder:i.placeholder,maxlength:parseInt(i.maxlength),addonBefore:i.addonBefore,addonAfter:i.addonAfter,disabled:i.disabled,onClick:c,onChange:f,size:i.size,bordered:i.bordered},W({_:2},[i.prefix?{name:"prefix",fn:k(()=>[T(C(X),{icon:i.prefix},null,8,["icon"])]),key:"0"}:void 0,i.suffix?{name:"suffix",fn:k(()=>[T(C(X),{icon:i.suffix},null,8,["icon"])]),key:"1"}:void 0]),1032,["value","placeholder","maxlength","addonBefore","addonAfter","disabled","size","bordered"])),l.value?(A(),j(v,{key:1,ref_key:"inputNumRef",ref:a,value:r.value,"onUpdate:value":m[1]||(m[1]=h=>r.value=h),placeholder:i.placeholder,maxlength:parseInt(i.maxlength),addonBefore:i.addonBefore,addonAfter:i.addonAfter,disabled:i.disabled,onBlur:_,onChange:f,style:{width:"100%"},size:i.size,bordered:i.bordered},W({_:2},[i.prefix?{name:"prefix",fn:k(()=>[T(C(X),{icon:i.prefix},null,8,["icon"])]),key:"0"}:void 0,i.suffix?{name:"suffix",fn:k(()=>[T(C(X),{icon:i.suffix},null,8,["icon"])]),key:"1"}:void 0]),1032,["value","placeholder","maxlength","addonBefore","addonAfter","disabled","size","bordered"])):Ae("",!0)])}}}),st={class:"mb-2"},ot="https://webapi.amap.com/maps?v=1.4.15&key=4b3856cde2cd0421211ccc386669b33a",ut=E({__name:"MapModal",props:{value:String},emits:["success","cancel"],setup(i,{emit:e}){const t=i,{t:a}=se(),r=w(),n=w(null),l=w(),o=w(),u=w(),d=w(),c=w(),_=w(),{toPromise:f}=fa({src:ot});var p={input:"tipinput"};const m=w([]),[g,{closeModal:v,openModal:h}]=ua();function b(){return D(this,null,function*(){yield f(),yield Ye(),C(n)&&(l.value=window.AMap,o.value=new l.value.Map("container",{resizeEnable:!0}),o.value.on("click",y),K(),u.value=new l.value.Geocoder({city:"010",radius:1e3}),d.value=new l.value.Marker)})}function y(R){m.value=[R.lnglat.getLng(),R.lnglat.getLat()],o.value.add(d.value),d.value.setPosition(m.value),x()}function S(R){m.value=[R.lnglat.getLng(),R.lnglat.getLat()],x()}function x(){u.value.getAddress(m.value,function(R,G){R==="complete"&&G.regeocode?r.value=G.regeocode.formattedAddress:zt.error(a("\u6839\u636E\u7ECF\u7EAC\u5EA6\u67E5\u8BE2\u5730\u5740\u5931\u8D25"))})}function K(){l.value.plugin(["AMap.PlaceSearch","AMap.Autocomplete","AMap.Geolocation","AMap.Geocoder"],function(){_.value=new l.value.Autocomplete(p),c.value=new l.value.PlaceSearch({map:o.value}),r.value&&U(r.value),_.value.on("select",R);function R(G){c.value.setCity(G.poi.adcode),U(r.value)}})}function U(R){c.value.search(R,function(G,ae){if(G=="complete"){o.value.getAllOverlays("marker").forEach(Li=>{o.value.remove(Li)});for(var le=ae.poiList.pois,ne=0;ne<le.length;ne++){var de=le[ne],Re=[];Re[ne]=new l.value.Marker({position:de.location,title:de.name}),o.value.add(Re[ne]),Re[ne].on("click",S)}o.value.setFitView()}else zt.warning(a("\u672A\u5339\u914D\u5230POI\u4FE1\u606F"))})}function ie(){h(),r.value=t.value,t.value||(r.value=""),b()}function ue(){e("success",{lnglat:m.value,address:r.value}),v()}function ye(){e("cancel"),v()}return(R,G)=>(A(),$("div",{style:{width:"100%"},onClick:G[1]||(G[1]=ae=>ie())},[Ot(R.$slots,"default"),T(C(da),{width:"1000px",onRegister:C(g),onOk:ue,onCancel:ye,"destroy-on-close":"",title:C(a)("\u9009\u62E9\u5730\u5740")},{default:k(()=>[ee("div",st,[T(C(qi),{id:"tipinput",value:r.value,"onUpdate:value":G[0]||(G[0]=ae=>r.value=ae),placeholder:C(a)("\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740")},null,8,["value","placeholder"])]),ee("div",{id:"container",ref_key:"wrapRef",ref:n,style:{width:"100%",height:"500px"}},null,512)]),_:1},8,["onRegister","title"])]))}}),dt=oe(ut),ei=E({__name:"SelectMap",props:{value:String,prefix:String,suffix:String,placeholder:String,readonly:Boolean,disabled:Boolean,size:String,bordered:{type:Boolean,default:!0},address:String,latiAndLong:String,index:Number,mainKey:String},emits:["update:value","change","blur"],setup(i,{emit:e}){const t=i,a=Vi.ItemRest,r=w(),n=L("formModel",null),l=L("isCustomForm",!1);B(()=>t.value,()=>{r.value=t.value,t.value||(r.value="")},{immediate:!0});function o(d){u(d),e("update:value",d.address),e("change",d.address)}function u(d){if(n){if(t.address){const c=l?t.address:F(t.address);t.mainKey&&t.index!==void 0&&t.index!==null?n[t.mainKey][t.index][c]=d.address:n[c]=d.address}if(t.latiAndLong){const c=l?t.latiAndLong:F(t.latiAndLong);t.mainKey&&t.index!=null&&t.index!==null?n[t.mainKey][t.index][c]=d.lnglat.join(","):n[c]=d.lnglat.join(",")}}}return(d,c)=>{const _=O("a-input");return A(),$("div",null,[T(C(a),null,{default:k(()=>[T(C(dt),{value:r.value,"onUpdate:value":c[2]||(c[2]=f=>r.value=f),onSuccess:o},{default:k(()=>[T(_,{readonly:"",disabled:i.disabled,placeholder:i.placeholder,value:r.value,"onUpdate:value":c[0]||(c[0]=f=>r.value=f),size:i.size,bordered:i.bordered,onBlur:c[1]||(c[1]=f=>e("blur"))},W({_:2},[i.prefix?{name:"prefix",fn:k(()=>[T(C(X),{icon:i.prefix},null,8,["icon"])]),key:"0"}:void 0,i.suffix?{name:"suffix",fn:k(()=>[T(C(X),{icon:i.suffix},null,8,["icon"])]),key:"1"}:void 0]),1032,["disabled","placeholder","value","size","bordered"])]),_:1},8,["value"])]),_:1})])}}}),ct={class:"code-image"},ft={key:1,class:"placebox"},gt={key:0},pt={class:"tips"},_t={key:1,class:"flex items-center justify-center p-4"},ht={class:"tips"},mt=E({__name:"QrCode",props:{defaultValue:String,disabled:Boolean,codeType:String,apiConfig:{type:Object}},setup(i){const e=i,{t}=se(),a=w();B(()=>e.defaultValue,l=>{a.value=l});const r=L("formModel",null),n=L("isCustomForm",!1);return Me(()=>D(this,null,function*(){e.codeType=="api"?a.value=yield fe(e.apiConfig,n,r):e.codeType=="fixed"&&(a.value=e.defaultValue)})),(l,o)=>(A(),$("div",ct,[a.value?(A(),j(C(pa),{key:0,value:a.value,width:200},null,8,["value"])):(A(),$("div",ft,[i.codeType=="fixed"?(A(),$("div",gt,[T(C(X),{icon:"el:qrcode",class:"my-6",size:"24",color:"rgba(0, 0, 0, 0.43)"}),ee("div",pt,Q(C(t)("\u8BF7\u5148\u8FDB\u884C\u914D\u7F6E")),1)])):Ae("",!0),i.codeType=="api"?(A(),$("div",_t,[ee("div",ht,Q(C(t)("\u63A5\u53E3\u914D\u7F6E\u7684\u4E8C\u7EF4\u7801\u4F1A\u5728\u9875\u9762\u52A0\u8F7D\u65F6\u663E\u793A")),1)])):Ae("",!0)]))]))}});let vt,bt;ti=pe(mt,[["__scopeId","data-v-165c89ad"]]),vt=Hi(),bt=E({__name:"Switch",props:{size:String,checked:[String,Boolean,Number],disabled:Boolean,checkedChildren:String,unCheckedChildren:String,checkedColor:{type:String,default:vt.getProjectConfig.themeColor},unCheckedColor:{type:String,default:"#bbbdbf"},checkedValue:{type:[String,Number,Boolean],default:1},unCheckedValue:{type:[String,Number,Boolean],default:0}},emits:["update:checked"],setup(i,{emit:e}){const t=i;Ki(r=>({"00796c6c":t.unCheckedColor,da0aee1a:t.checkedColor}));const a=w();return B(()=>t.checked,r=>{a.value=Zi(r)?r:Number(r)},{immediate:!0}),B(()=>a.value,r=>{e("update:checked",r)},{immediate:!0}),(r,n)=>{const l=O("a-switch");return A(),$("div",null,[T(l,Te({size:i.size,checked:a.value,"onUpdate:checked":n[0]||(n[0]=o=>a.value=o),checkedValue:i.checkedValue,unCheckedValue:i.unCheckedValue,disabled:i.disabled,checkedChildren:i.checkedChildren,unCheckedChildren:i.unCheckedChildren},r.$attrs),null,16,["size","checked","checkedValue","unCheckedValue","disabled","checkedChildren","unCheckedChildren"])])}}});let yt,wt;yt=pe(bt,[["__scopeId","data-v-263eb494"]]),Zt=oe(yt),wt=E({name:"ApiSelect",components:{LoadingOutlined:_e},inheritAttrs:!1,props:{value:{type:[Array,Object,String,Number]},numberToString:Boolean,api:{type:Function,default:null},params:{type:[Array,Object,String,Number]},placeholder:String,resultField:I.string.def(""),labelField:I.string.def("label"),valueField:I.string.def("value"),immediate:I.bool.def(!0),alwaysLoad:I.bool.def(!1),datasourceType:String,staticOptions:Array,apiConfig:Object,mode:String,multiple:String,mainKey:String,index:Number},emits:["options-change","change","update:value"],setup(i,{emit:e}){const t=w([]),a=w(!1),r=w(!0),n=w([]),l=Pe(),{t:o}=se(),u=L("formModel",null),d=L("isCustomForm",!1),c=w(void 0),_=je(()=>{const{labelField:h,valueField:b}=i;return C(t).reduce((y,S)=>{if(S){const x=S[b];y.push(ke(ce({},Se(S,[h,b])),{label:S[h],value:i.datasourceType==="staticData"?typeof i.value=="string"?`${x}`:typeof i.value=="number"?Number(x):x:x}))}return y},[])});we(()=>{var h;i.datasourceType==="api"&&((h=i.apiConfig)!=null&&h.apiParams)&&(i.apiConfig.apiParams.forEach(b=>{var y;(y=b.tableInfo)==null||y.forEach(S=>{if(S.bindType=="data"){let x=xe(S.value),K="";if(x&&x.bindTable){let U=d?x.bindTable+"List":F(x.bindTable+"_List");K=d?x.bindField:F(x.bindField),u&&u[U][i.index||0]&&u[U][i.index||0][K]}else x&&x.bindField&&(K=d?x.bindField:F(x.bindField),u&&u[K])}})}),f())}),B(()=>[i.params,i.apiConfig],()=>{C(r)&&f()},{deep:!0}),B(()=>i.datasourceType,h=>{f(),c.value=i.value&&h==="staticData"?i.value.toString:void 0}),B(()=>i.value,()=>{var h;c.value=(typeof i.value=="string"&&i.value?(h=i.value)==null?void 0:h.split(","):i.value)||void 0},{immediate:!0}),Me(()=>{var h;f(),c.value=(typeof i.value=="string"&&i.value?(h=i.value)==null?void 0:h.split(","):i.value)||void 0});function f(){return D(this,null,function*(){t.value=[];let h;if(i.datasourceType?(i.datasourceType==="staticData"&&(t.value=i.staticOptions,g()),i.datasourceType==="dic"&&(h=Fe),i.datasourceType==="datasource"&&(h=he),i.datasourceType==="api"&&(t.value=yield fe(i.apiConfig,d,u,i.index))):h=i.api,!(!h||!Ce(h))){t.value=[];try{if(!i.params)return;a.value=!0;const b=yield h(i.params);if(r.value=!1,Array.isArray(b)){t.value=b,g();return}i.resultField&&(t.value=ge(b,i.resultField)||[]),g()}catch(b){}finally{a.value=!1}}})}const p=(h,b)=>(b.label||b.name).toLowerCase().includes(h.toLowerCase());function m(h){return D(this,null,function*(){h&&(i.alwaysLoad?yield f():!i.immediate&&C(r)&&(yield f(),r.value=!1))})}function g(){e("options-change",C(_))}function v(h,...b){var S;const y=Array.isArray(h)?h.join(","):h;n.value=b,e("update:value",y),e("change",y),c.value=i.value===void 0?y:(typeof i.value=="string"&&i.value?(S=i.value)==null?void 0:S.split(","):i.value)||void 0}return{selectedValue:c,attrs:l,getOptions:_,loading:a,t:o,handleFetch:m,handleChange:v,handleFilterOption:p}}});function Ei(i,e,t,a,r,n){const l=O("LoadingOutlined"),o=O("a-select");return A(),j(o,Te({onDropdownVisibleChange:i.handleFetch},i.$attrs,{onChange:i.handleChange,options:i.getOptions,value:i.selectedValue,"onUpdate:value":e[0]||(e[0]=u=>i.selectedValue=u),placeholder:i.placeholder,mode:i.multiple,"filter-option":i.handleFilterOption,allowClear:""}),W({_:2},[$e(Object.keys(i.$slots),u=>({name:u,fn:k(d=>[Ot(i.$slots,u,Xi(Ji(d||{})))])})),i.loading?{name:"suffixIcon",fn:k(()=>[T(l,{spin:""})]),key:"0"}:void 0,i.loading?{name:"notFoundContent",fn:k(()=>[ee("span",null,[T(l,{spin:"",class:"mr-1"}),Z(" "+Q(i.t("component.form.apiSelectNotFound")),1)])]),key:"1"}:void 0]),1040,["onDropdownVisibleChange","onChange","options","value","placeholder","mode","filter-option"])}let St,Ct,At,Dt,Bt,kt;jt=pe(wt,[["render",Ei]]),St=["value"],Ct=E({__name:"ColorPicker",props:{size:String,value:String,defaultValue:String,disabled:{type:Boolean,default:!1}},emits:["update:value","change"],setup(i,{emit:e}){const t=i,a=w("#ffffff");B(()=>t.value,n=>{a.value=n||"#ffffff"},{immediate:!0}),B(()=>t.defaultValue,n=>{n&&e("update:value",n)},{immediate:!0});const r=({target:n})=>{e("update:value",n.value),e("change",n.value)};return(n,l)=>(A(),$("div",null,[ee("input",{type:"color",value:a.value,onChange:r,style:Qi({"pointer-events":i.disabled?"none":"auto"})},null,44,St)]))}}),ai=oe(Ct),At=E({__name:"AssociateSelect",props:{placeholder:{type:String},value:{type:[String,Number]},labelField:{type:String},valueField:{type:String},showSearch:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},params:{type:[Array,Object,String,Number]},immediate:{type:Boolean,default:!0},dataSourceOptions:{type:Array},dicOptions:{type:Array},datasourceType:String,api:{type:Function,default:null},apiConfig:Object,mainKey:String,index:Number},emits:["update:value","change"],setup(i,{emit:e}){const t=i,a=w(void 0),r=w(!1),n=w([]),l=L("formModel",null),o=L("isCustomForm",!1);Me(()=>D(this,null,function*(){t.value&&t.datasourceType==="dic"&&(yield _(),c(t.value))})),B(()=>t.value,f=>{a.value=f||void 0},{immediate:!0});const u=(f,p)=>(p.label||p.name).toLowerCase().includes(f.toLowerCase()),d=f=>{e("update:value",f),e("change",f),a.value=t.value===void 0?f:t.value,c(f)};function c(f){var m;let p=t.datasourceType==="dic"?t.dicOptions:(m=t.apiConfig)==null?void 0:m.outputParams;l&&(p==null||p.map(g=>{if(g.bindField){const v=n.value.findIndex(S=>S[t.valueField]===f);let h=o?g.bindField:F(g.bindField),b="";g.bindTable&&(b=o?g.bindTable+"List":F(g.bindTable+"_List"));let y=v===-1?"":n.value[v][g.name];t.mainKey?g.bindTable?l[t.mainKey][t.index][h]=y:l[h]=y:g.bindTable?l[b][0][h]=y:l[h]=y}}))}const _=()=>D(this,null,function*(){var p;let f;if(t.datasourceType){if(t.datasourceType==="dic")f=Fe;else if(t.datasourceType==="datasource")f=he;else if(t.datasourceType==="api"&&((p=t.apiConfig)!=null&&p.path)){n.value=yield fe(t.apiConfig,o,l,t.index);return}}else f=t.api;if(n.value=[],!(!f||!Ce(f)))try{if(!t.params)return;r.value=!0;const m=yield f(t.params);if(Array.isArray(m)){n.value=m;return}}catch(m){}finally{r.value=!1}});return we(()=>{var f;t.datasourceType==="api"&&((f=t.apiConfig)!=null&&f.apiParams)&&(t.apiConfig.apiParams.forEach(p=>{var m;(m=p.tableInfo)==null||m.forEach(g=>{if(g.bindType=="data"){let v=xe(g.value),h="";if(v&&v.bindTable){let b=o?v.bindTable+"List":F(v.bindTable+"_List");h=o?v.bindField:F(v.bindField),l&&l[b][t.index||0]&&l[b][t.index||0][h]}else v&&v.bindField&&(h=o?v.bindField:F(v.bindField),l&&l[h])}})}),_())}),B(()=>[t.params,t.apiConfig],()=>{_()},{immediate:!0,deep:!0}),B(()=>t.datasourceType,(f,p)=>{_(),(!t.value||f!==p&&p)&&(a.value=void 0)}),(f,p)=>{const m=O("a-select");return A(),j(m,{value:a.value,"onUpdate:value":p[0]||(p[0]=g=>a.value=g),placeholder:i.placeholder,disabled:i.disabled,readonly:i.readonly,"show-search":i.showSearch,onChange:d,options:n.value,"field-names":{label:i.labelField,value:i.valueField},"filter-option":u,allowClear:""},W({_:2},[r.value?{name:"suffixIcon",fn:k(()=>[T(C(_e),{spin:""})]),key:"0"}:void 0,r.value?{name:"notFoundContent",fn:k(()=>[ee("span",null,[T(C(_e),{spin:"",class:"mr-1"}),Z(" \u8BF7\u7B49\u5F85\u6570\u636E\u52A0\u8F7D\u5B8C\u6210... ")])]),key:"1"}:void 0]),1032,["value","placeholder","disabled","readonly","show-search","options","field-names"])}}}),ii=oe(At),Dt=E({__name:"Computation",props:{value:Number,width:String,maxlength:[String,Number],placeholder:String,addonBefore:String,addonAfter:String,prefix:String,disabled:Boolean,computationalConfig:Array,index:Number,size:String},emits:["update:value","change","blur"],setup(i,{emit:e}){const t=i,{calculator:a}=lt,r=L("formModel",null),n=L("isCustomForm",!1),l=w(0);B(()=>t.value,u=>{l.value=u},{immediate:!0}),B(()=>r,()=>{var d;if(!((d=Ie(t))!=null&&d.computationalConfig))return;let u="";for(let c of Ie(t).computationalConfig){const _=n?`${c.bindTable}List`:`${F(c.bindTable)}List`,f=n?c.bindField:F(c.bindField);if(c.type==="computational"||c.type==="money-chinese")if(c.isMainForm)u+=r[f]||0;else{if(!r[_])return;if(c.computationalMethod){const p=r[_].map(m=>m[f]||0);switch(c.computationalMethod){case"sum":u+=`${Pt(p)}`;break;case"mean":u+=`${Nt(p)}`;break;case"min":u+=`${Rt(p)}`;break;case"max":u+=`${Lt(p)}`;break}}else u+=r[_][t.index]&&r[_][t.index][f]||0}else u+=`${c.label}`}if(t.computationalConfig.length>0)try{l.value=a(`(${u})`)==="undefined"?0:Number(a(`(${u})`)),e("update:value",l.value)}catch(c){}},{deep:!0,immediate:!0});const o=u=>{e("change"),e("update:value",u)};return(u,d)=>{const c=O("a-input-number");return A(),$("div",null,[T(c,{placeholder:i.placeholder,maxlength:parseInt(i.maxlength),addonBefore:i.addonBefore,addonAfter:i.addonAfter,disabled:i.disabled,size:i.size,value:l.value,"onUpdate:value":d[0]||(d[0]=_=>l.value=_),style:{width:"100%"},onChange:o,onBlur:d[1]||(d[1]=_=>e("blur"))},W({_:2},[i.prefix?{name:"prefix",fn:k(()=>[T(C(X),{icon:i.prefix},null,8,["icon"])]),key:"0"}:void 0]),1032,["placeholder","maxlength","addonBefore","addonAfter","disabled","size","value"])])}}}),$t=oe(Dt),Bt=E({__name:"TimePicker",props:{value:[Et,String,Object],size:String,placeholder:String,format:String,allowClear:Boolean,disabled:Boolean},emits:["update:value","change"],setup(i,{emit:e}){const t=i,a=w();B(()=>t.value,n=>{n&&typeof n!="string"?a.value=n==null?void 0:n.format(t.format):a.value=n||""},{immediate:!0});const r=n=>{e("update:value",n),e("change")};return(n,l)=>{const o=O("a-time-picker");return A(),j(o,{size:i.size,value:a.value,"onUpdate:value":l[0]||(l[0]=u=>a.value=u),placeholder:i.placeholder,format:i.format,valueFormat:i.format,allowClear:i.allowClear,disabled:i.disabled,onChange:r},null,8,["size","value","placeholder","format","valueFormat","allowClear","disabled"])}}}),Ut=oe(Bt),kt=E({__name:"DatePicker",props:{value:[Et,String,Object],size:String,placeholder:String,format:String,allowClear:Boolean,disabled:Boolean},emits:["update:value"],setup(i,{emit:e}){const t=i,a=w(""),r=w();B(()=>t.value,l=>{if(t.format)switch(t.format){case"YYYY":a.value="year";break;case"YYYY-MM":a.value="month";break}l&&typeof l!="string"?r.value=l==null?void 0:l.format(t.format):r.value=l||""},{immediate:!0});const n=l=>{e("update:value",l)};return(l,o)=>{const u=O("a-date-picker");return A(),j(u,{size:i.size,value:r.value,"onUpdate:value":o[0]||(o[0]=d=>r.value=d),placeholder:i.placeholder,format:i.format,picker:a.value,valueFormat:i.format,allowClear:i.allowClear,disabled:i.disabled,showTime:i.format==="YYYY-MM-DD HH:mm:ss",onChange:n},null,8,["size","value","placeholder","format","picker","valueFormat","allowClear","disabled","showTime"])}}}),Gt=oe(kt)}));export{jt as A,$t as C,Ut as T,Gt as X,Yt as _,ha as __tla,qt as a,Vt as b,Ht as c,Kt as d,Zt as e,Xt as f,he as g,Jt as h,Qt as i,Wt as j,ei as k,ti as l,ii as m,ai as n,ni as o,ri as p,li as q,si as r,oi as s,ui as t,di as u,ci as v,fi as w,te as x};