@arcblock/payment-service 1.29.9 → 1.29.10
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/cf.js +51 -51
- package/dist/index.js +195 -43
- package/package.json +3 -3
- package/web/assets/{account-Clbqiiw3.js → account-DrsnH5wP.js} +1 -1
- package/web/assets/{action-DENqSeOa.js → action-C2c0yWuW.js} +1 -1
- package/web/assets/{actions-CDsj5j8l.js → actions--FNKSNIs.js} +1 -1
- package/web/assets/{actions-BJDN6Op2.js → actions-BEUwbsq1.js} +1 -1
- package/web/assets/{actions-CSpJGOX7.js → actions-C9AfME83.js} +1 -1
- package/web/assets/{actions-BD9BAp3M.js → actions-D2-s31n3.js} +1 -1
- package/web/assets/{actions-BSNy5bOd.js → actions-DXMceTgd.js} +1 -1
- package/web/assets/{actions-0iWP2mcx.js → actions-DeCPtfTK.js} +1 -1
- package/web/assets/{actions-DGQs8fFF.js → actions-DtNZGZWf.js} +1 -1
- package/web/assets/{actions-D3tJgrUn.js → actions-JHsqbHpB.js} +1 -1
- package/web/assets/{actions-CZL47E9r.js → actions-izdZ2Mn4.js} +1 -1
- package/web/assets/{add-price-BpnICuHO.js → add-price-TdXAR3NW.js} +1 -1
- package/web/assets/{admin-CD8ViZ7D.js → admin-BpFv3eF5.js} +1 -1
- package/web/assets/{assign-0vMUDW_C.js → assign-DKRfmN7W.js} +1 -1
- package/web/assets/{attempts-CKlxkJuE.js → attempts-BfbYfiJa.js} +1 -1
- package/web/assets/browser-DF2vfpBa.js +1 -0
- package/web/assets/{change-payment-gAlRmJpv.js → change-payment-j5UC8_h0.js} +1 -1
- package/web/assets/{change-plan-C47wfWH8.js → change-plan-CtXvsIDw.js} +1 -1
- package/web/assets/{click-boundary-CafubiPp.js → click-boundary-Bi28Y0Fq.js} +1 -1
- package/web/assets/{connect-BHHzrwLA.js → connect-CXek4LAE.js} +1 -1
- package/web/assets/{copyable-QrCyyiou.js → copyable-CprMHdhV.js} +1 -1
- package/web/assets/{create-ke4FrPx1.js → create-B-Ubepl_.js} +1 -1
- package/web/assets/{create-DNar5UQD.js → create-BVt_sQ_7.js} +1 -1
- package/web/assets/{create-0PUtkJZY.js → create-BWviSWbC.js} +1 -1
- package/web/assets/{create-BJ1asdcy.js → create-C6jihslA.js} +1 -1
- package/web/assets/{create-C7GOgZZM.js → create-IaalYGmm.js} +1 -1
- package/web/assets/{create-Bgv5ux17.js → create-jzl1m8ZK.js} +1 -1
- package/web/assets/{credit-grant-item-list-CeDAM3qV.js → credit-grant-item-list-DQcvdSRs.js} +1 -1
- package/web/assets/{credit-overview-4zh0H02x.js → credit-overview-CPId2vzk.js} +1 -1
- package/web/assets/{currency-restrictions-BcEm8W45.js → currency-restrictions-Dsupz2ce.js} +1 -1
- package/web/assets/{currency-select-B4ieQBvv.js → currency-select-C8j7QQMP.js} +1 -1
- package/web/assets/{dayjs-DUTDpcNU.js → dayjs-DUNWtvju.js} +1 -1
- package/web/assets/{description-SnR5WxWT.js → description-BHxdy5I3.js} +1 -1
- package/web/assets/{detail-DNcp_u5S.js → detail-B17BN6kU.js} +1 -1
- package/web/assets/detail-BJ-hl5PK.js +10 -0
- package/web/assets/{detail-46aLUdJj.js → detail-BJEqTXDS.js} +1 -1
- package/web/assets/{detail-BQpDGZJQ.js → detail-BdC9VIc6.js} +1 -1
- package/web/assets/{detail-DbU3p040.js → detail-BkRkrKyw.js} +1 -1
- package/web/assets/{detail-DACnmls3.js → detail-BvcI9cB_.js} +1 -1
- package/web/assets/detail-C--ATvwm.js +24 -0
- package/web/assets/{detail-Cg505nKX.js → detail-CHJqYZ0W.js} +1 -1
- package/web/assets/{detail-B0IHl4MI.js → detail-CfvKZ7IV.js} +1 -1
- package/web/assets/{detail-Ct5QNBqu.js → detail-CmIweOLE.js} +1 -1
- package/web/assets/{detail-BXTsnQny.js → detail-D729Bgs6.js} +1 -1
- package/web/assets/{detail-C_Zdfa0y.js → detail-DD1YBtex.js} +1 -1
- package/web/assets/detail-DOcm4Kqg.js +15 -0
- package/web/assets/{detail-Bfnkg0A1.js → detail-DQj1mbhA.js} +1 -1
- package/web/assets/detail-DTXDMIR9.js +15 -0
- package/web/assets/{detail-CsGZMimg.js → detail-DUAJzKsu.js} +1 -1
- package/web/assets/{detail-BwH0DwAi.js → detail-De8PyTyx.js} +1 -1
- package/web/assets/{detail-B_lpOomD.js → detail-DqfxOHky.js} +1 -1
- package/web/assets/{detail-CMBRd4Ct.js → detail-Dzt5tfyZ.js} +1 -1
- package/web/assets/{detail-Tn2R5C8i.js → detail-H0dkKVyS.js} +1 -1
- package/web/assets/{detail-CyMhK5K_.js → detail-MgdgGj5J.js} +1 -1
- package/web/assets/{detail-DCTb8R7F.js → detail-WAmPM6yq.js} +1 -1
- package/web/assets/{detail-B-ceWfZr.js → detail-g6el9Fxj.js} +1 -1
- package/web/assets/did-Bqcz-NjH.js +1 -0
- package/web/assets/{drawer-form-DspWWj3x.js → drawer-form-CQjNFFWk.js} +1 -1
- package/web/assets/{edit-Bkj-OTJh.js → edit-DAU8AWzT.js} +1 -1
- package/web/assets/{editor-AmthipP2.js → editor-vZvxDUTl.js} +1 -1
- package/web/assets/{embed-rRKjDoHi.js → embed-ClYNqZbf.js} +1 -1
- package/web/assets/{filter-toolbar-DXGSTq57.js → filter-toolbar-VvmMATj0.js} +1 -1
- package/web/assets/{form-BmQlJZ84.js → form-4_MzglPj.js} +1 -1
- package/web/assets/{form-cX026J4G.js → form-AFzUvoFE.js} +1 -1
- package/web/assets/{form-B5WW-lS5.js → form-Bro99BjK.js} +1 -1
- package/web/assets/{form-CAPjlw7l.js → form-CnrBCyTJ.js} +1 -1
- package/web/assets/form-Cuvruf4H.js +16 -0
- package/web/assets/{gas-nyR96dB0.js → gas-kw2KMH1u.js} +1 -1
- package/web/assets/{generateCategoricalChart-BadryV3H.js → generateCategoricalChart-BCpuUeC_.js} +1 -1
- package/web/assets/{home-_eX1aim8.js → home-ZNJREzbw.js} +1 -1
- package/web/assets/{index-CbSXdD6E.js → index-ASk8vU2H.js} +1 -1
- package/web/assets/{index-ajD9Iotk.js → index-B4n6PvPu.js} +1 -1
- package/web/assets/{index-BarN7DfU.js → index-B4yaPb7B.js} +5 -5
- package/web/assets/{index-DSe7Dot_.js → index-BHwID_s4.js} +1 -1
- package/web/assets/index-BMcnd_jZ.js +1 -0
- package/web/assets/{index-BTfJ08JU.js → index-BRmN8ViQ.js} +1 -1
- package/web/assets/index-BdbLl6St.js +1 -0
- package/web/assets/{index-CCVDDX0c.js → index-BjKRyxNQ.js} +1 -1
- package/web/assets/index-BjLJQRKY.js +1 -0
- package/web/assets/index-BkNCPnTn.js +1 -0
- package/web/assets/index-BlAwTTmu.js +1 -0
- package/web/assets/{index-C136x0O2.js → index-BtWfmATr.js} +1 -1
- package/web/assets/{index-DNGmCIRP.js → index-C-5n472s.js} +1 -1
- package/web/assets/{index-CW8VfoJO.js → index-C3AP4jq0.js} +1 -1
- package/web/assets/{index-C-RT84yb.js → index-C3Rh1SaB.js} +1 -1
- package/web/assets/index-CDyxbCzc.js +1 -0
- package/web/assets/{index-SOzRg0yJ.js → index-CH_k9MVv.js} +1 -1
- package/web/assets/{index-XaFn2ySq.js → index-CKPfOW6M.js} +1 -1
- package/web/assets/{index-BQjlhCSt.js → index-CPFlZhA2.js} +1 -1
- package/web/assets/{index-Du0Ieh1F.js → index-CPyGjEd3.js} +2 -2
- package/web/assets/index-ChC-jsE2.js +1 -0
- package/web/assets/{index-D-bx9Kam.js → index-CiWvs3j9.js} +1 -1
- package/web/assets/{index-mn5Zdrtn.js → index-D6gv9jHh.js} +1 -1
- package/web/assets/{index-Cd_BD9TM.js → index-D7pWd60Z.js} +1 -1
- package/web/assets/{index-YG5oc8O3.js → index-DAen2-cr.js} +1 -1
- package/web/assets/{index-BRENdB5m.js → index-DNobX-Tr.js} +1 -1
- package/web/assets/{index-Kd_qCyRG.js → index-DY-g0BPU.js} +1 -1
- package/web/assets/{index-D0mynT6_.js → index-DZkpxY-C.js} +1 -1
- package/web/assets/{index-DcddP3R9.js → index-Dh9agU9O.js} +1 -1
- package/web/assets/{index-BBHMsIxJ.js → index-Dju8k6mq.js} +1 -1
- package/web/assets/{index-DeK5Pqjv.js → index-DwDNPqjF.js} +1 -1
- package/web/assets/{index-DEiuhiEo.js → index-Dze0CpfQ.js} +1 -1
- package/web/assets/{index-UYeD8rTJ.js → index-eDERHpkr.js} +1 -1
- package/web/assets/{index-BzABukCz.js → index-mgPU1lyd.js} +1 -1
- package/web/assets/{index-W2uZUlFs.js → index-olGOY5KB.js} +1 -1
- package/web/assets/{index-DoX0A-rP.js → index-oy7LrXGT.js} +1 -1
- package/web/assets/{index-qulrJQ4J.js → index-x7sBb6oM.js} +1 -1
- package/web/assets/{index.es-C8dcCHdW.js → index.es-C2Q6Owow.js} +1 -1
- package/web/assets/{info-card-BvIMFQo5.js → info-card-C9dRgztS.js} +1 -1
- package/web/assets/{info-metric-Dl4ZDm0Z.js → info-metric-ukWq8INi.js} +1 -1
- package/web/assets/{info-row-jI0h_hv4.js → info-row-CaPaNF4L.js} +1 -1
- package/web/assets/{info-row-group-CFuMWJf1.js → info-row-group-Cxo-4Gk5.js} +1 -1
- package/web/assets/{libphonenumber-Qs8PCdM-.js → libphonenumber-CTvobi0D.js} +1 -1
- package/web/assets/{link-CmPoIweR.js → link-DsltSF2Q.js} +1 -1
- package/web/assets/{list-CkHExntK.js → list-B2b-s8wM.js} +1 -1
- package/web/assets/{list-DLB_hd0Q.js → list-BzgF4i3i.js} +1 -1
- package/web/assets/{list-BdSkPjIa.js → list-Cd1O-aDi.js} +1 -1
- package/web/assets/{list-DaK9287Y.js → list-CvM46TsP.js} +1 -1
- package/web/assets/{list-CWMEf-_C.js → list-DtEjqlED.js} +1 -1
- package/web/assets/{list-DVFJwd_I.js → list-O_uCSLFq.js} +1 -1
- package/web/assets/{list-DghnUOc4.js → list-YNWVqjwW.js} +1 -1
- package/web/assets/{list-eFkvVlp5.js → list-ZaBapEXW.js} +1 -1
- package/web/assets/{metadata-BmQTVFku.js → metadata-_hV0ZaVh.js} +1 -1
- package/web/assets/{meter-event-B1JIhVpb.js → meter-event-CPVBpekF.js} +1 -1
- package/web/assets/{metrics-UvxyQbUF.js → metrics-DVPdwpyf.js} +1 -1
- package/web/assets/{overview-Cxc6WKba.js → overview-CGdVIJrJ.js} +1 -1
- package/web/assets/{overview-DrMaIptb.js → overview-CN59I5Sc.js} +1 -1
- package/web/assets/{past-due-CUXkxns0.js → past-due-C3PtU8uo.js} +1 -1
- package/web/assets/pay-XVdSNq__.js +4 -0
- package/web/assets/{payment-method-info-Bsf89VxV.js → payment-method-info-D_qR04xC.js} +1 -1
- package/web/assets/{preview-C-H8pGVw.js → preview-Bdtbh-xk.js} +1 -1
- package/web/assets/{preview-BifsgUGT.js → preview-F3lma170.js} +1 -1
- package/web/assets/{pricing-table-BUJdtkMq.js → pricing-table-Bt2WljzE.js} +1 -1
- package/web/assets/{pricing-table-B3QOaAB5.js → pricing-table-D9FGYBVa.js} +1 -1
- package/web/assets/{product-select-ChEyoJqJ.js → product-select-_72p-5lF.js} +1 -1
- package/web/assets/{recharge-BVT4USAO.js → recharge-CSlKshbU.js} +1 -1
- package/web/assets/{related-credit-grants-JV2ICsR5.js → related-credit-grants-DnKdAit6.js} +3 -3
- package/web/assets/{safe-did-address-CiG_V6Gy.js → safe-did-address-CRTPYo34.js} +1 -1
- package/web/assets/{source-data-viewer-i1q9wNIG.js → source-data-viewer-D1GShrs5.js} +1 -1
- package/web/assets/{status-CUVYrUIG.js → status-3Swm2gK5.js} +1 -1
- package/web/assets/subscription-BX00k6FU.js +1 -0
- package/web/assets/{subscription-DrnSPIfs.js → subscription-Bzeblscr.js} +1 -1
- package/web/assets/table-BN3WBnr3.js +1 -0
- package/web/assets/{tax-code-select-TS07I0rB.js → tax-code-select-j2arPbaE.js} +1 -1
- package/web/assets/{tax-utils-bPjALcVG.js → tax-utils-B8J0Kfnz.js} +1 -1
- package/web/assets/{uploader-CsQNHG4I.js → uploader-BLdAbLR6.js} +1 -1
- package/web/assets/{usage-records-DAUQMJAW.js → usage-records-BAwNs1y8.js} +1 -1
- package/web/assets/{util-DxXTXkeY.js → util-B8B3fsMa.js} +1 -1
- package/web/assets/{vendor-arcblock-BTCAQSUK.js → vendor-arcblock-D1drrE7q.js} +1 -1
- package/web/assets/{vendor-blocklet-DcLR2Cyf.js → vendor-blocklet-B67R14so.js} +2 -2
- package/web/index.html +1 -1
- package/web/assets/browser-DDv4_sgY.js +0 -1
- package/web/assets/detail-B8eOBVSQ.js +0 -15
- package/web/assets/detail-BO3zglCn.js +0 -15
- package/web/assets/detail-C1FupF1D.js +0 -24
- package/web/assets/detail-wU4wNf4s.js +0 -10
- package/web/assets/form-DD-EiA7W.js +0 -16
- package/web/assets/index-BhcoukR2.js +0 -1
- package/web/assets/index-BturOfxo.js +0 -1
- package/web/assets/index-CDVogp6E.js +0 -1
- package/web/assets/index-DcrGSDby.js +0 -1
- package/web/assets/index-Dybqd298.js +0 -1
- package/web/assets/index-EXZPddtw.js +0 -1
- package/web/assets/index-brUCsnBA.js +0 -1
- package/web/assets/pay-omLYkqRA.js +0 -4
- package/web/assets/subscription-BYz_k9dq.js +0 -1
- package/web/assets/table-BrtHemkA.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as nc}from"./vendor-mui-BXZut9Pz.js";import{as as Xu}from"./vendor-blocklet-DcLR2Cyf.js";import"./vendor-react-BPknnnEA.js";var Je;(function(t){t.NUMBER="NUMBER_NUMBER",t.HEX="NUMBER_HEX",t.STR="NUMBER_STR",t.BIGINT="NUMBER_BIGINT"})(Je||(Je={}));var At;(function(t){t.HEX="BYTES_HEX",t.UINT8ARRAY="BYTES_UINT8ARRAY"})(At||(At={}));const Ne={number:Je.BIGINT,bytes:At.HEX},W={number:Je.HEX,bytes:At.HEX};var it;(function(t){t.EARLIEST="earliest",t.LATEST="latest",t.PENDING="pending",t.SAFE="safe",t.FINALIZED="finalized",t.COMMITTED="committed"})(it||(it={}));var ar;(function(t){t.chainstart="chainstart",t.frontier="frontier",t.homestead="homestead",t.dao="dao",t.tangerineWhistle="tangerineWhistle",t.spuriousDragon="spuriousDragon",t.byzantium="byzantium",t.constantinople="constantinople",t.petersburg="petersburg",t.istanbul="istanbul",t.muirGlacier="muirGlacier",t.berlin="berlin",t.london="london",t.altair="altair",t.arrowGlacier="arrowGlacier",t.grayGlacier="grayGlacier",t.bellatrix="bellatrix",t.merge="merge",t.capella="capella",t.shanghai="shanghai"})(ar||(ar={}));const ao=Object.getPrototypeOf(Uint8Array);var ed=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(l){o(l)}}function d(c){try{u(r.throw(c))}catch(l){o(l)}}function u(c){c.done?s(c.value):i(c.value).then(a,d)}u((r=r.apply(t,e||[])).next())})};const td=Symbol.for("web3/base-provider");class Br{static isWeb3Provider(e){return e instanceof Br||!!(e&&e[td])}get[td](){return!0}send(e,n){this.request(e).then(r=>{n(null,r)}).catch(r=>{n(r)})}sendAsync(e){return ed(this,void 0,void 0,function*(){return this.request(e)})}asEIP1193Provider(){const e=Object.create(this),n=e.request;return e.request=function(i){return ed(this,void 0,void 0,function*(){return(yield n(i)).result})},e.asEIP1193Provider=void 0,e}}class Wd extends Array{constructor(e){super(),this._accountProvider=e}}const TI=Object.freeze(Object.defineProperty({__proto__:null,get BlockTags(){return it},DEFAULT_RETURN_FORMAT:Ne,ETH_DATA_FORMAT:W,get FMT_BYTES(){return At},get FMT_NUMBER(){return Je},get HardforksOrdered(){return ar},TypedArray:ao,Web3BaseProvider:Br,Web3BaseWallet:Wd},Symbol.toStringTag,{value:"Module"})),Kd=100,Zd=101,Yd=200,Xd=201,el=202,tl=203,nl=204,rl=205,il=206,sl=207,ol=208,al=300,cl=301,ul=302,dl=303,ll=304,fl=305,hl=306,ml=307,pl=308,gl=309,yl=310,vl=311,bl=400,Al=401,wl=402,_l=403,El=404,xl=405,Il=406,Tl=407,Sl=408,Rl=409,kl=410,Bl=411,Pl=412,Cl=413,Nl=414,Ol=415,Ml=416,Ll=417,Fl=418,Dl=419,jl=420,Hl=421,Ul=422,Gl=423,ql=424,$l=425,Ql=426,Vl=427,zl=428,Jl=429,Wl=430,Kl=431,Zl=432,Yl=433,Xl=434,ef=435,tf=436,nf=437,rf=438,sf=439,of=440,af=441,cf=500,uf=501,df=502,lf=503,ff=504,hf=505,mf=506,pf=507,gf=600,yf=601,vf=602,bf=603,Af=604,wf=701,_f=702,Ef=703,xf=704,If=705,Tf=706,Sf=707,jy=708,Rf=709,kf=801,Bf=802,Hy="0x0",Pf=4001,Cf=4100,Nf=4200,Of=4900,Mf=4901,Lf=901,Ff=902,Df=903,jf=1001,Hf=1002,Uf=1003,Gf=1004,qf=1005,$f=1006,Qf=1007,Vf=1008,zf=1009,Jf=1010,Wf=1011,Kf=1012,Zf=1013,Yf=1014,Xf=1015,eh=1100,rc=1101,Uy=1102,th=1200,zr=-32700,Jr=-32600,Wr=-32601,Kr=-32602,Zr=-32603,Yr=-32e3,Xr=-32001,ei=-32002,ti=-32003,ni=-32004,ri=-32005,ii=-32006;class j extends Error{get innerError(){return this.cause instanceof cr?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new cr(e):this.cause=e}constructor(e,n){super(e),Array.isArray(n)?this.cause=new cr(n):this.cause=n,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(e,n=!1){if(e==null)return"undefined";const r=JSON.stringify(e,(i,s)=>typeof s=="bigint"?s.toString():s);return n&&["bigint","string"].includes(typeof e)?r.replace(/['\\"]+/g,""):r}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}class cr extends j{constructor(e){super(`Multiple errors occurred: [${e.map(n=>n.message).join("], [")}]`),this.code=ol,this.errors=e}}class Y extends j{constructor(e,n){super(`Invalid value given "${j.convertToString(e,!0)}". Error: ${n}.`),this.name=this.constructor.name}}class la extends j{constructor(){super("Private key must be 32 bytes."),this.code=wf}}class nh extends j{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=_f}}class rh extends j{constructor(e){super(`"${e}"`),this.code=Bf}}class ic extends j{constructor(){super("Invalid key derivation function"),this.code=Ef}}class ih extends j{constructor(){super("Key derivation failed - possibly wrong password"),this.code=xf}}class sh extends j{constructor(){super("Unsupported key store version"),this.code=If}}class oh extends j{constructor(){super("Password cannot be empty"),this.code=Tf}}class ah extends j{constructor(){super("Initialization vector must be 16 bytes"),this.code=Sf}}class ch extends j{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=Rf}}class Ht extends j{constructor(e,n){super(e),this.code=cf,n&&(this.errorCode=n.code,this.errorReason=n.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class Gy extends Ht{constructor(e,n){super(`CONNECTION ERROR: Couldn't connect to node ${e}.`,n),this.host=e,this.code=uf}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{host:this.host})}}class qy extends Ht{constructor(e){super(`CONNECTION TIMEOUT: timeout of ${e}ms achieved`),this.duration=e,this.code=df}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{duration:this.duration})}}class As extends Ht{constructor(e){super("Connection not open",e),this.code=lf}}class $y extends Ht{constructor(e){var n,r;super(`CONNECTION ERROR: The connection got closed with the close code ${(n=e?.code)!==null&&n!==void 0?n:""} and the following reason string ${(r=e?.reason)!==null&&r!==void 0?r:""}`,e),this.code=ff}}class uh extends Ht{constructor(e){super(`Maximum number of reconnect attempts reached! (${e})`),this.code=hf}}class dh extends Ht{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=mf}}class lh extends Ht{constructor(e){super(`Request already sent with following id: ${e}`),this.code=pf}}class Oe extends j{constructor(e,n){super(e),this.code=al,this.receipt=n}}class fa extends j{constructor(e,n){super(`The resolver at ${e} does not implement requested method: "${n}".`),this.address=e,this.name=n,this.code=cl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class Qy extends j{constructor(){super("You must provide the json interface of the contract when instantiating a contract object."),this.code=ul}}class Vy extends j{constructor(){super("Once requires a callback as the second parameter."),this.code=dl}}class zy extends j{constructor(e){super(`Event "${e}" doesn't exist in this contract.`),this.eventName=e,this.code=ll}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{eventName:this.eventName})}}class Jy extends j{constructor(e){super(`Event "${e}" doesn't exist in this contract.`),this.type=e,this.code=fl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}class Wy extends j{constructor(){super('No "data" specified in neither the given options, nor the default options.'),this.code=hl}}class Ky extends j{constructor(){super("This contract object doesn't have address set yet, please set an address first."),this.code=ml}}class Zy extends j{constructor(){super('No "from" address specified in neither the given options, nor the default options.'),this.code=pl}}class Yy extends j{constructor(){super(...arguments),this.code=gl}}class Ui extends Oe{constructor(e){if(super(e.message||"Error"),this.name="name"in e&&e.name||this.constructor.name,this.stack="stack"in e&&e.stack||void 0,this.code=e.code,typeof e.data=="object"){let n;e.data&&"originalError"in e.data?n=e.data.originalError:n=e.data,this.data=n.data,this.cause=new Ui(n)}else this.data=e.data}setDecodedProperties(e,n,r){this.errorName=e,this.errorSignature=n,this.errorArgs=r}toJSON(){let e=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(e=Object.assign(Object.assign({},e),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),e}}class en extends Oe{constructor(e){super("Error happened while trying to execute a function inside a smart contract"),this.code=yl,this.cause=new Ui(e)}}class fh extends Y{constructor(e){var n,r;super(`data: ${(n=e.data)!==null&&n!==void 0?n:"undefined"}, input: ${(r=e.input)!==null&&r!==void 0?r:"undefined"}`,`You can't have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.`),this.code=vl}}class Xy extends j{constructor(e){super(`ENS resolver check interface support error. "${e}"`),this.code=Lf}}class hh extends j{constructor(e){super(`ENS is not supported on network ${e}`),this.code=Ff}}class mh extends j{constructor(){super("Network not synced"),this.code=Df}}class ev extends j{constructor(e,n,r){super(`Invalid number of parameters for "${r}". Got "${e}" expected "${n}"!`),this.got=e,this.expected=n,this.method=r,this.code=Yd}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{got:this.got,expected:this.expected,method:this.method})}}class si extends j{constructor(e){super(`Invalid parameters passed. "${typeof e<"u"?e:""}"`),this.hint=e,this.code=sl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class Ft extends j{constructor(){super(...arguments),this.code=Xd}}class ft extends j{constructor(){super("The method you're trying to call is not implemented."),this.code=el}}class sc extends j{constructor(){super(...arguments),this.code=tl}}class ph extends j{constructor(){super(...arguments),this.code=nl}}class ee extends j{constructor(e,n){super(e),this.code=rl,this.props=n??{}}}class gh extends j{constructor(e){super(`A plugin with the namespace: ${e} has already been registered.`),this.code=il}}class qr extends j{constructor(){super(...arguments),this.code=gf}}class tv extends j{constructor(e){super(`Provider with url "${e}" is not set or invalid`),this.clientUrl=e,this.code=yf}}class ws extends j{constructor(e){super(`Client URL "${e}" is invalid.`),this.code=vf}}class ht extends j{constructor(){super(...arguments),this.code=bf}}class yh extends j{constructor(){super(...arguments),this.code=Af}}class vh extends Y{constructor(){super(...arguments),this.code=kf}}class Gn extends j{constructor(e,n){super(e),this.receipt=n,this.code=bl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class nv extends j{constructor(e,n){super(`Your request got reverted with the following reason string: ${e}`),this.reason=e,this.signature=n,this.code=Al}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature})}}class oi extends j{constructor(e,n,r,i){super(`Transaction has been reverted by the EVM${r===void 0?"":`:
|
|
1
|
+
import{g as nc}from"./vendor-mui-BXZut9Pz.js";import{as as Xu}from"./vendor-blocklet-B67R14so.js";import"./vendor-react-BPknnnEA.js";var Je;(function(t){t.NUMBER="NUMBER_NUMBER",t.HEX="NUMBER_HEX",t.STR="NUMBER_STR",t.BIGINT="NUMBER_BIGINT"})(Je||(Je={}));var At;(function(t){t.HEX="BYTES_HEX",t.UINT8ARRAY="BYTES_UINT8ARRAY"})(At||(At={}));const Ne={number:Je.BIGINT,bytes:At.HEX},W={number:Je.HEX,bytes:At.HEX};var it;(function(t){t.EARLIEST="earliest",t.LATEST="latest",t.PENDING="pending",t.SAFE="safe",t.FINALIZED="finalized",t.COMMITTED="committed"})(it||(it={}));var ar;(function(t){t.chainstart="chainstart",t.frontier="frontier",t.homestead="homestead",t.dao="dao",t.tangerineWhistle="tangerineWhistle",t.spuriousDragon="spuriousDragon",t.byzantium="byzantium",t.constantinople="constantinople",t.petersburg="petersburg",t.istanbul="istanbul",t.muirGlacier="muirGlacier",t.berlin="berlin",t.london="london",t.altair="altair",t.arrowGlacier="arrowGlacier",t.grayGlacier="grayGlacier",t.bellatrix="bellatrix",t.merge="merge",t.capella="capella",t.shanghai="shanghai"})(ar||(ar={}));const ao=Object.getPrototypeOf(Uint8Array);var ed=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(l){o(l)}}function d(c){try{u(r.throw(c))}catch(l){o(l)}}function u(c){c.done?s(c.value):i(c.value).then(a,d)}u((r=r.apply(t,e||[])).next())})};const td=Symbol.for("web3/base-provider");class Br{static isWeb3Provider(e){return e instanceof Br||!!(e&&e[td])}get[td](){return!0}send(e,n){this.request(e).then(r=>{n(null,r)}).catch(r=>{n(r)})}sendAsync(e){return ed(this,void 0,void 0,function*(){return this.request(e)})}asEIP1193Provider(){const e=Object.create(this),n=e.request;return e.request=function(i){return ed(this,void 0,void 0,function*(){return(yield n(i)).result})},e.asEIP1193Provider=void 0,e}}class Wd extends Array{constructor(e){super(),this._accountProvider=e}}const TI=Object.freeze(Object.defineProperty({__proto__:null,get BlockTags(){return it},DEFAULT_RETURN_FORMAT:Ne,ETH_DATA_FORMAT:W,get FMT_BYTES(){return At},get FMT_NUMBER(){return Je},get HardforksOrdered(){return ar},TypedArray:ao,Web3BaseProvider:Br,Web3BaseWallet:Wd},Symbol.toStringTag,{value:"Module"})),Kd=100,Zd=101,Yd=200,Xd=201,el=202,tl=203,nl=204,rl=205,il=206,sl=207,ol=208,al=300,cl=301,ul=302,dl=303,ll=304,fl=305,hl=306,ml=307,pl=308,gl=309,yl=310,vl=311,bl=400,Al=401,wl=402,_l=403,El=404,xl=405,Il=406,Tl=407,Sl=408,Rl=409,kl=410,Bl=411,Pl=412,Cl=413,Nl=414,Ol=415,Ml=416,Ll=417,Fl=418,Dl=419,jl=420,Hl=421,Ul=422,Gl=423,ql=424,$l=425,Ql=426,Vl=427,zl=428,Jl=429,Wl=430,Kl=431,Zl=432,Yl=433,Xl=434,ef=435,tf=436,nf=437,rf=438,sf=439,of=440,af=441,cf=500,uf=501,df=502,lf=503,ff=504,hf=505,mf=506,pf=507,gf=600,yf=601,vf=602,bf=603,Af=604,wf=701,_f=702,Ef=703,xf=704,If=705,Tf=706,Sf=707,jy=708,Rf=709,kf=801,Bf=802,Hy="0x0",Pf=4001,Cf=4100,Nf=4200,Of=4900,Mf=4901,Lf=901,Ff=902,Df=903,jf=1001,Hf=1002,Uf=1003,Gf=1004,qf=1005,$f=1006,Qf=1007,Vf=1008,zf=1009,Jf=1010,Wf=1011,Kf=1012,Zf=1013,Yf=1014,Xf=1015,eh=1100,rc=1101,Uy=1102,th=1200,zr=-32700,Jr=-32600,Wr=-32601,Kr=-32602,Zr=-32603,Yr=-32e3,Xr=-32001,ei=-32002,ti=-32003,ni=-32004,ri=-32005,ii=-32006;class j extends Error{get innerError(){return this.cause instanceof cr?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new cr(e):this.cause=e}constructor(e,n){super(e),Array.isArray(n)?this.cause=new cr(n):this.cause=n,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(e,n=!1){if(e==null)return"undefined";const r=JSON.stringify(e,(i,s)=>typeof s=="bigint"?s.toString():s);return n&&["bigint","string"].includes(typeof e)?r.replace(/['\\"]+/g,""):r}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}class cr extends j{constructor(e){super(`Multiple errors occurred: [${e.map(n=>n.message).join("], [")}]`),this.code=ol,this.errors=e}}class Y extends j{constructor(e,n){super(`Invalid value given "${j.convertToString(e,!0)}". Error: ${n}.`),this.name=this.constructor.name}}class la extends j{constructor(){super("Private key must be 32 bytes."),this.code=wf}}class nh extends j{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=_f}}class rh extends j{constructor(e){super(`"${e}"`),this.code=Bf}}class ic extends j{constructor(){super("Invalid key derivation function"),this.code=Ef}}class ih extends j{constructor(){super("Key derivation failed - possibly wrong password"),this.code=xf}}class sh extends j{constructor(){super("Unsupported key store version"),this.code=If}}class oh extends j{constructor(){super("Password cannot be empty"),this.code=Tf}}class ah extends j{constructor(){super("Initialization vector must be 16 bytes"),this.code=Sf}}class ch extends j{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=Rf}}class Ht extends j{constructor(e,n){super(e),this.code=cf,n&&(this.errorCode=n.code,this.errorReason=n.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class Gy extends Ht{constructor(e,n){super(`CONNECTION ERROR: Couldn't connect to node ${e}.`,n),this.host=e,this.code=uf}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{host:this.host})}}class qy extends Ht{constructor(e){super(`CONNECTION TIMEOUT: timeout of ${e}ms achieved`),this.duration=e,this.code=df}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{duration:this.duration})}}class As extends Ht{constructor(e){super("Connection not open",e),this.code=lf}}class $y extends Ht{constructor(e){var n,r;super(`CONNECTION ERROR: The connection got closed with the close code ${(n=e?.code)!==null&&n!==void 0?n:""} and the following reason string ${(r=e?.reason)!==null&&r!==void 0?r:""}`,e),this.code=ff}}class uh extends Ht{constructor(e){super(`Maximum number of reconnect attempts reached! (${e})`),this.code=hf}}class dh extends Ht{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=mf}}class lh extends Ht{constructor(e){super(`Request already sent with following id: ${e}`),this.code=pf}}class Oe extends j{constructor(e,n){super(e),this.code=al,this.receipt=n}}class fa extends j{constructor(e,n){super(`The resolver at ${e} does not implement requested method: "${n}".`),this.address=e,this.name=n,this.code=cl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class Qy extends j{constructor(){super("You must provide the json interface of the contract when instantiating a contract object."),this.code=ul}}class Vy extends j{constructor(){super("Once requires a callback as the second parameter."),this.code=dl}}class zy extends j{constructor(e){super(`Event "${e}" doesn't exist in this contract.`),this.eventName=e,this.code=ll}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{eventName:this.eventName})}}class Jy extends j{constructor(e){super(`Event "${e}" doesn't exist in this contract.`),this.type=e,this.code=fl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}class Wy extends j{constructor(){super('No "data" specified in neither the given options, nor the default options.'),this.code=hl}}class Ky extends j{constructor(){super("This contract object doesn't have address set yet, please set an address first."),this.code=ml}}class Zy extends j{constructor(){super('No "from" address specified in neither the given options, nor the default options.'),this.code=pl}}class Yy extends j{constructor(){super(...arguments),this.code=gl}}class Ui extends Oe{constructor(e){if(super(e.message||"Error"),this.name="name"in e&&e.name||this.constructor.name,this.stack="stack"in e&&e.stack||void 0,this.code=e.code,typeof e.data=="object"){let n;e.data&&"originalError"in e.data?n=e.data.originalError:n=e.data,this.data=n.data,this.cause=new Ui(n)}else this.data=e.data}setDecodedProperties(e,n,r){this.errorName=e,this.errorSignature=n,this.errorArgs=r}toJSON(){let e=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(e=Object.assign(Object.assign({},e),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),e}}class en extends Oe{constructor(e){super("Error happened while trying to execute a function inside a smart contract"),this.code=yl,this.cause=new Ui(e)}}class fh extends Y{constructor(e){var n,r;super(`data: ${(n=e.data)!==null&&n!==void 0?n:"undefined"}, input: ${(r=e.input)!==null&&r!==void 0?r:"undefined"}`,`You can't have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.`),this.code=vl}}class Xy extends j{constructor(e){super(`ENS resolver check interface support error. "${e}"`),this.code=Lf}}class hh extends j{constructor(e){super(`ENS is not supported on network ${e}`),this.code=Ff}}class mh extends j{constructor(){super("Network not synced"),this.code=Df}}class ev extends j{constructor(e,n,r){super(`Invalid number of parameters for "${r}". Got "${e}" expected "${n}"!`),this.got=e,this.expected=n,this.method=r,this.code=Yd}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{got:this.got,expected:this.expected,method:this.method})}}class si extends j{constructor(e){super(`Invalid parameters passed. "${typeof e<"u"?e:""}"`),this.hint=e,this.code=sl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class Ft extends j{constructor(){super(...arguments),this.code=Xd}}class ft extends j{constructor(){super("The method you're trying to call is not implemented."),this.code=el}}class sc extends j{constructor(){super(...arguments),this.code=tl}}class ph extends j{constructor(){super(...arguments),this.code=nl}}class ee extends j{constructor(e,n){super(e),this.code=rl,this.props=n??{}}}class gh extends j{constructor(e){super(`A plugin with the namespace: ${e} has already been registered.`),this.code=il}}class qr extends j{constructor(){super(...arguments),this.code=gf}}class tv extends j{constructor(e){super(`Provider with url "${e}" is not set or invalid`),this.clientUrl=e,this.code=yf}}class ws extends j{constructor(e){super(`Client URL "${e}" is invalid.`),this.code=vf}}class ht extends j{constructor(){super(...arguments),this.code=bf}}class yh extends j{constructor(){super(...arguments),this.code=Af}}class vh extends Y{constructor(){super(...arguments),this.code=kf}}class Gn extends j{constructor(e,n){super(e),this.receipt=n,this.code=bl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class nv extends j{constructor(e,n){super(`Your request got reverted with the following reason string: ${e}`),this.reason=e,this.signature=n,this.code=Al}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature})}}class oi extends j{constructor(e,n,r,i){super(`Transaction has been reverted by the EVM${r===void 0?"":`:
|
|
2
2
|
${j.convertToString(r)}`}`),this.reason=e,this.signature=n,this.receipt=r,this.data=i,this.code=wl}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature,receipt:this.receipt,data:this.data})}}class oc extends oi{constructor(e,n,r,i,s,o,a){super(e),this.reason=e,this.customErrorName=n,this.customErrorDecodedSignature=r,this.customErrorArguments=i,this.signature=s,this.receipt=o,this.data=a,this.code=rf}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,customErrorName:this.customErrorName,customErrorDecodedSignature:this.customErrorDecodedSignature,customErrorArguments:this.customErrorArguments,signature:this.signature,receipt:this.receipt,data:this.data})}}class rv extends Gn{constructor(e){super("The transaction receipt didn't contain a contract address.",e),this.code=_l}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class iv extends Gn{constructor(e){super("The contract code couldn't be stored, please check your gas limit.",e),this.code=El}}class ac extends Gn{constructor(e){super(`Transaction has been reverted by the EVM${e===void 0?"":`:
|
|
3
3
|
${j.convertToString(e)}`}`,e),this.code=xl}}class sv extends Gn{constructor(e){super(`Transaction ran out of gas. Please provide more gas:
|
|
4
4
|
${JSON.stringify(e,void 0,2)}`,e),this.code=Il}}class bh extends Gn{constructor(){super("Raw transaction undefined"),this.code=Tl}}class ha extends Gn{constructor(){super("Transaction not found"),this.code=Wl}}class cc extends Y{constructor(e){super(e,"invalid transaction with invalid sender"),this.code=Sl}}class Ah extends Y{constructor(e){super(e,"invalid transaction with invalid receiver"),this.code=nf}}class wh extends Y{constructor(e){super(e,"invalid transaction call"),this.code=Rl}}class _h extends Y{constructor(){super("MissingCustomChainError","If tx.common is provided it must have tx.common.customChain"),this.code=kl}}class Eh extends Y{constructor(){super("MissingCustomChainIdError","If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId"),this.code=Bl}}class xh extends Y{constructor(e){super(JSON.stringify(e),"Chain Id doesnt match in tx.chainId tx.common.customChain.chainId"),this.code=Pl}}class Ih extends Y{constructor(e){super(JSON.stringify(e),"Chain doesnt match in tx.chain tx.common.basechain"),this.code=ef}}class Th extends Y{constructor(e){super(JSON.stringify(e),"hardfork doesnt match in tx.hardfork tx.common.hardfork"),this.code=tf}}class Sh extends Y{constructor(){super("CommonOrChainAndHardforkError","Please provide the common object or the chain and hardfork property but not all together."),this.code=Cl}}class Rh extends Y{constructor(e){var n,r;super("MissingChainOrHardforkError",`When specifying chain and hardfork, both values must be defined. Received "chain": ${(n=e.chain)!==null&&n!==void 0?n:"undefined"}, "hardfork": ${(r=e.hardfork)!==null&&r!==void 0?r:"undefined"}`),this.code=Nl}}class kh extends j{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'),this.code=of}}class Bh extends Y{constructor(e){var n,r,i,s;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}, maxPriorityFeePerGas: ${(i=e.maxPriorityFeePerGas)!==null&&i!==void 0?i:"undefined"}, maxFeePerGas: ${(s=e.maxFeePerGas)!==null&&s!==void 0?s:"undefined"}`,'"gas" is missing'),this.code=Ol,this.cause=new kh}}class Ph extends j{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'),this.code=af}}class Ch extends Y{constructor(e){var n,r,i,s;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}, maxPriorityFeePerGas: ${(i=e.maxPriorityFeePerGas)!==null&&i!==void 0?i:"undefined"}, maxFeePerGas: ${(s=e.maxFeePerGas)!==null&&s!==void 0?s:"undefined"}`,"transaction must specify legacy or fee market gas properties, not both"),this.code=Xl,this.cause=new Ph}}class Nh extends Y{constructor(e){var n,r;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}`,"Gas or gasPrice is lower than 0"),this.code=Ml}}class Oh extends Y{constructor(e){var n,r;super(`maxPriorityFeePerGas: ${(n=e.maxPriorityFeePerGas)!==null&&n!==void 0?n:"undefined"}, maxFeePerGas: ${(r=e.maxFeePerGas)!==null&&r!==void 0?r:"undefined"}`,"maxPriorityFeePerGas or maxFeePerGas is lower than 0"),this.code=Ll}}class Mh extends Y{constructor(e){super(e,"eip-1559 transactions don't support gasPrice"),this.code=Fl}}class uc extends Y{constructor(e){var n,r;super(`maxPriorityFeePerGas: ${(n=e.maxPriorityFeePerGas)!==null&&n!==void 0?n:"undefined"}, maxFeePerGas: ${(r=e.maxFeePerGas)!==null&&r!==void 0?r:"undefined"}`,"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas"),this.code=Dl}}class Lh extends Y{constructor(e){super(e,"invalid transaction object"),this.code=jl}}class Fh extends Y{constructor(e){var n,r;super(`nonce: ${(n=e.nonce)!==null&&n!==void 0?n:"undefined"}, chainId: ${(r=e.chainId)!==null&&r!==void 0?r:"undefined"}`,"Nonce or chainId is lower than 0"),this.code=Hl}}class Dh extends Y{constructor(){super("UnableToPopulateNonceError","unable to populate nonce, no from address available"),this.code=Ul}}class jh extends Y{constructor(){super("Eip1559NotSupportedError","Network doesn't support eip-1559"),this.code=Gl}}class ma extends Y{constructor(e){super(e,"unsupported transaction type"),this.code=ql}}class dc extends Y{constructor(e){var n,r;super(`data: ${(n=e.data)!==null&&n!==void 0?n:"undefined"}, input: ${(r=e.input)!==null&&r!==void 0?r:"undefined"}`,`You can't have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.`),this.code=$l}}class Hh extends j{constructor(e){super(`The connected Ethereum Node did not respond within ${e.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as K,j as e,a3 as p,A as E,a2 as _,aQ as D,aS as L,aT as A,ad as h,aR as B,q as g,ai as $,x as j,w as G,O as Y,I,cA as Q,cB as V}from"./vendor-mui-BXZut9Pz.js";import{V as F,Y as M,$ as N,Z as f,P as Z}from"./vendor-blocklet-DcLR2Cyf.js";import{e as y,k as P,n as w,j as J,S as X,T as ee,I as ae}from"./index-BarN7DfU.js";import{b as te}from"./vendor-react-BPknnnEA.js";const U={"token-data":"https://token-data.arcblock.io",coingecko:"https://api.coingecko.com/api/v3",coinmarketcap:"https://pro-api.coinmarketcap.com/v1"},ne={coinmarketcap:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",coingecko:"CG-xxxxxxxxxxxxxxxxxxxxxxxx"},W={"token-data":"Token Data",coingecko:"CoinGecko",coinmarketcap:"CoinMarketCap"};function re({provider:a,isCreate:d=!1,open:b,onClose:l,onSave:c}){const{t:r}=F(),[t,i]=M({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",loading:!1,error:null,testing:!1,testResult:null,apiKeyTouched:!1});K.useEffect(()=>{i({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",error:null,apiKeyTouched:!1})},[a,b]);const R=async()=>{if(d&&!t.name.trim()){i({error:r("admin.exchangeRateProvider.edit.nameRequired")});return}try{i({loading:!0,error:null});const s={name:t.name.trim(),type:t.type,priority:t.priority,status:t.status,config:{...t.base_url&&{base_url:t.base_url}}};(d||t.apiKeyTouched)&&(s.config.api_key=t.api_key),t.status==="paused"&&t.paused_reason?s.paused_reason=t.paused_reason:t.status!=="paused"&&(s.paused_reason=null),d?await y.post("/api/exchange-rate-providers",s):await y.put(`/api/exchange-rate-providers/${a.id}`,s),c()}catch(s){i({error:P(s)}),f.error(P(s))}finally{i({loading:!1})}},k=()=>{i({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",error:null,testing:!1,testResult:null,apiKeyTouched:!1}),l()},C=async()=>{i({testing:!0,testResult:null});try{const s=await y.post("/api/exchange-rate-providers/test-connection",{type:t.type,provider_id:d?void 0:a.id,config:{...t.base_url&&{base_url:t.base_url},...t.apiKeyTouched&&{api_key:t.api_key}}});i({testResult:s.data})}catch(s){i({testResult:{success:!1,error:P(s)}})}finally{i({testing:!1})}};return e.jsx(N,{open:b,onClose:k,maxWidth:"sm",fullWidth:!0,title:d?r("admin.exchangeRateProvider.create.title"):r("admin.exchangeRateProvider.edit.title",{name:a.name}),PaperProps:{sx:{borderRadius:2}},actions:e.jsxs(p,{direction:"row",spacing:2,children:[e.jsx(j,{variant:"outlined",onClick:k,disabled:t.loading,children:r("common.cancel")}),e.jsx(j,{variant:"contained",onClick:R,disabled:t.loading,children:t.loading?r("common.saving"):r("common.save")})]}),children:e.jsxs(p,{spacing:3,children:[t.error&&e.jsx(E,{severity:"error",onClose:()=>i({error:null}),children:t.error}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.name"),value:t.name,onChange:s=>i({name:s.target.value}),helperText:r("admin.exchangeRateProvider.edit.nameHelp"),fullWidth:!0,required:!0,disabled:!1}),e.jsxs(D,{fullWidth:!0,required:!0,children:[e.jsx(L,{children:r("admin.exchangeRateProvider.edit.type")}),e.jsxs(A,{value:t.type,label:r("admin.exchangeRateProvider.edit.type"),onChange:s=>{const m=s.target.value;i(v=>{const T=d&&(!v.name||v.name===W[v.type]);return{type:m,name:T?W[m]:v.name}})},disabled:!d,children:[e.jsx(h,{value:"token-data",children:"Token Data (ArcBlock)"}),e.jsx(h,{value:"coingecko",children:"CoinGecko"}),e.jsx(h,{value:"coinmarketcap",children:"CoinMarketCap"})]}),e.jsx(B,{children:r("admin.exchangeRateProvider.edit.typeHelp")})]}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.baseUrl"),value:t.base_url,onChange:s=>i({base_url:s.target.value}),helperText:r("admin.exchangeRateProvider.edit.baseUrlHelp",{defaultUrl:U[t.type]||""}),placeholder:U[t.type]||"",fullWidth:!0}),t.type==="coinmarketcap"&&e.jsxs(p,{spacing:1,children:[e.jsx(_,{label:r("admin.exchangeRateProvider.edit.apiKey"),value:t.api_key,onChange:s=>i({api_key:s.target.value,apiKeyTouched:!0}),helperText:r("admin.exchangeRateProvider.edit.apiKeyHelp"),placeholder:ne[t.type]||"",type:"password",fullWidth:!0}),e.jsxs(g,{variant:"caption",color:"text.secondary",children:[r("admin.exchangeRateProvider.edit.apiKeyLinkText")," ",e.jsx($,{href:"https://pro.coinmarketcap.com/account",target:"_blank",rel:"noreferrer",children:r("admin.exchangeRateProvider.edit.apiKeyLinkAction")})]})]}),e.jsx(p,{direction:"row",spacing:2,alignItems:"flex-start",children:e.jsx(j,{variant:"outlined",onClick:C,disabled:t.testing,startIcon:t.testing?e.jsx(G,{size:16}):void 0,children:t.testing?r("admin.exchangeRateProvider.edit.testing"):r("admin.exchangeRateProvider.edit.testConnection")})}),t.testResult&&e.jsx(E,{severity:t.testResult.success?"success":"error",onClose:()=>i({testResult:null}),children:t.testResult.success?r("admin.exchangeRateProvider.edit.testSuccess",{time:t.testResult.responseTime,rate:t.testResult.rate,symbol:t.testResult.symbol,timestamp:t.testResult.timestamp}):r("admin.exchangeRateProvider.edit.testFailed",{error:t.testResult.error})}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.priority"),type:"number",value:t.priority,onChange:s=>{const m=parseInt(s.target.value,10);i({priority:Number.isNaN(m)?1:Math.max(1,m)})},helperText:r("admin.exchangeRateProvider.edit.priorityHelp"),fullWidth:!0,inputProps:{min:1}}),e.jsxs(D,{fullWidth:!0,children:[e.jsx(L,{children:r("admin.exchangeRateProvider.edit.status")}),e.jsxs(A,{value:t.status,label:r("admin.exchangeRateProvider.edit.status"),onChange:s=>i({status:s.target.value}),children:[e.jsx(h,{value:"active",children:r("admin.exchangeRateProvider.status.active")}),e.jsx(h,{value:"degraded",children:r("admin.exchangeRateProvider.status.degraded")}),e.jsx(h,{value:"paused",children:r("admin.exchangeRateProvider.status.paused")}),e.jsx(h,{value:"inactive",children:r("admin.exchangeRateProvider.status.inactive")})]}),e.jsx(B,{children:r("admin.exchangeRateProvider.edit.statusHelp")})]}),t.status==="paused"&&e.jsx(_,{label:r("admin.exchangeRateProvider.edit.pausedReason"),value:t.paused_reason,onChange:s=>i({paused_reason:s.target.value}),multiline:!0,rows:3,fullWidth:!0,helperText:r("admin.exchangeRateProvider.edit.pausedReasonHelp")})]})})}const ie={"token-data":"https://token-data.arcblock.io",coingecko:"https://api.coingecko.com/api/v3",coinmarketcap:"https://pro-api.coinmarketcap.com/v1"},se=()=>y.get("/api/exchange-rate-providers").then(a=>a.data),H=a=>{switch(a){case"active":return"success";case"degraded":return"warning";case"paused":return"default";case"inactive":return"error";default:return"default"}};function ue(){const{t:a}=F(),[d,b]=te(),[l,c]=M({editingProvider:null,isCreating:!1,deletingProvider:null,updatingProviderId:null,confirmDisableProvider:null}),{loading:r,error:t,data:i,refresh:R}=Z(se),k=o=>{c({editingProvider:o,isCreating:!1})},C=()=>{if(c({editingProvider:null,isCreating:!1}),d.get("create")==="1"){const o=new URLSearchParams(d);o.delete("create"),b(o)}},s=async()=>{if(await R(),C(),f.success(a("common.saved")),d.get("create")==="1"){const o=new URLSearchParams(d);o.delete("create"),b(o)}},m=()=>{c({editingProvider:{id:"",name:"Token Data",type:"token-data",enabled:!0,priority:(i?.data?.length||0)+1,status:"active",paused_reason:"",config:{base_url:""},last_failure_at:null,last_success_at:null,failure_count:0,created_at:"",updated_at:""},isCreating:!0})};K.useEffect(()=>{d.get("create")==="1"&&!l.isCreating&&!l.editingProvider&&m()},[d,l.isCreating,l.editingProvider,i?.data]);const v=async()=>{if(l.deletingProvider)try{await y.delete(`/api/exchange-rate-providers/${l.deletingProvider.id}`),f.success(a("common.deleted")),await R(),c({deletingProvider:null})}catch(o){f.error(P(o))}},T=async(o,u)=>{c({updatingProviderId:o.id});try{await y.put(`/api/exchange-rate-providers/${o.id}`,{enabled:u}),f.success(a("common.saved")),await R()}catch(n){f.error(P(n))}finally{c({updatingProviderId:null})}};if(t)return e.jsx(E,{severity:"error",children:P(t)});const z=[{label:a("admin.exchangeRateProvider.table.name"),name:"name",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.config?.base_url||ie[n.type];return e.jsxs(p,{direction:"column",spacing:.5,children:[e.jsx(g,{variant:"body2",fontWeight:500,children:n.name}),x&&e.jsx(g,{variant:"caption",color:"text.secondary",children:x})]})}}},{label:a("admin.exchangeRateProvider.table.participation"),name:"participation",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.enabled&&n.status!=="paused"&&n.status!=="inactive";return e.jsx(w,{label:a(x?"admin.exchangeRateProvider.participation.included":"admin.exchangeRateProvider.participation.excluded"),color:x?"success":"default"})}}},{label:a("admin.exchangeRateProvider.table.health"),name:"health",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=a(`admin.exchangeRateProvider.health.${n.status}`);return n.paused_reason?e.jsx(Y,{title:n.paused_reason,arrow:!0,children:e.jsx("span",{children:e.jsx(w,{label:x,color:H(n.status)})})}):e.jsx(w,{label:x,color:H(n.status)})}}},{label:a("admin.exchangeRateProvider.table.recentActivity"),name:"recent_activity",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.last_success_at||n.last_failure_at,S=x?J(x):"-",q=1440*60*1e3,O=n.last_failure_at&&Date.now()-new Date(n.last_failure_at).getTime()<=q?n.failure_count:0;return e.jsxs(p,{direction:"column",spacing:.25,children:[e.jsx(g,{variant:"caption",color:"text.secondary",children:a("admin.exchangeRateProvider.table.lastUpdate",{time:S})}),e.jsx(g,{variant:"caption",color:"text.secondary",children:a("admin.exchangeRateProvider.table.failures24h",{count:O})})]})}}},{label:a("admin.exchangeRateProvider.table.enabled"),name:"enabled",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];return n?e.jsx(X,{checked:n.enabled,onChange:x=>{const S=x.target.checked;if(!S){c({confirmDisableProvider:n});return}T(n,S)},disabled:l.updatingProviderId===n.id,size:"small"}):null}}},{label:a("common.actions"),name:"id",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];return n?e.jsxs(p,{direction:"row",spacing:.5,children:[e.jsx(I,{size:"small",onClick:()=>k(n),children:e.jsx(Q,{fontSize:"small"})}),e.jsx(I,{size:"small",onClick:()=>c({deletingProvider:n}),color:"error",children:e.jsx(V,{fontSize:"small"})})]}):null}}}];return e.jsxs(e.Fragment,{children:[e.jsx(g,{variant:"subtitle1",sx:{color:"text.secondary",whiteSpace:"break-spaces",mt:3,mb:2},children:a("admin.exchangeRateProvider.medianStrategyNote")}),e.jsx(ee,{data:i?.data||[],columns:z,loading:r,toolbar:!1,footer:!1,options:{count:i?.data?.length||0,page:0,rowsPerPage:100},emptyNodeText:a("common.noData")}),l.confirmDisableProvider&&e.jsx(ae,{title:a("admin.exchangeRateProvider.disableConfirmTitle"),message:a("admin.exchangeRateProvider.disableConfirmMessage"),onConfirm:()=>{const o=l.confirmDisableProvider;c({confirmDisableProvider:null}),T(o,!1)},onCancel:()=>c({confirmDisableProvider:null})}),l.editingProvider&&e.jsx(re,{provider:l.editingProvider,isCreate:l.isCreating,open:!!l.editingProvider,onClose:C,onSave:s}),l.deletingProvider&&e.jsx(N,{open:!!l.deletingProvider,onClose:()=>c({deletingProvider:null}),maxWidth:"sm",title:a("admin.exchangeRateProvider.delete.title"),PaperProps:{sx:{borderRadius:2}},actions:e.jsxs(p,{direction:"row",spacing:2,children:[e.jsx(j,{variant:"outlined",onClick:()=>c({deletingProvider:null}),children:a("common.cancel")}),e.jsx(j,{variant:"contained",color:"error",onClick:v,children:a("common.delete")})]}),children:e.jsx(g,{children:a("admin.exchangeRateProvider.delete.confirm",{name:l.deletingProvider.name})})})]})}export{ue as default};
|
|
1
|
+
import{r as K,j as e,a3 as p,A as E,a2 as _,aQ as D,aS as L,aT as A,ad as h,aR as B,q as g,ai as $,x as j,w as G,O as Y,I,cA as Q,cB as V}from"./vendor-mui-BXZut9Pz.js";import{V as F,Y as M,$ as N,Z as f,P as Z}from"./vendor-blocklet-B67R14so.js";import{e as y,k as P,n as w,j as J,S as X,T as ee,I as ae}from"./index-B4yaPb7B.js";import{b as te}from"./vendor-react-BPknnnEA.js";const U={"token-data":"https://token-data.arcblock.io",coingecko:"https://api.coingecko.com/api/v3",coinmarketcap:"https://pro-api.coinmarketcap.com/v1"},ne={coinmarketcap:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",coingecko:"CG-xxxxxxxxxxxxxxxxxxxxxxxx"},W={"token-data":"Token Data",coingecko:"CoinGecko",coinmarketcap:"CoinMarketCap"};function re({provider:a,isCreate:d=!1,open:b,onClose:l,onSave:c}){const{t:r}=F(),[t,i]=M({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",loading:!1,error:null,testing:!1,testResult:null,apiKeyTouched:!1});K.useEffect(()=>{i({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",error:null,apiKeyTouched:!1})},[a,b]);const R=async()=>{if(d&&!t.name.trim()){i({error:r("admin.exchangeRateProvider.edit.nameRequired")});return}try{i({loading:!0,error:null});const s={name:t.name.trim(),type:t.type,priority:t.priority,status:t.status,config:{...t.base_url&&{base_url:t.base_url}}};(d||t.apiKeyTouched)&&(s.config.api_key=t.api_key),t.status==="paused"&&t.paused_reason?s.paused_reason=t.paused_reason:t.status!=="paused"&&(s.paused_reason=null),d?await y.post("/api/exchange-rate-providers",s):await y.put(`/api/exchange-rate-providers/${a.id}`,s),c()}catch(s){i({error:P(s)}),f.error(P(s))}finally{i({loading:!1})}},k=()=>{i({name:a.name||"",type:a.type||"token-data",base_url:a.config?.base_url||"",api_key:a.config?.api_key||"",priority:a.priority,status:a.status,paused_reason:a.paused_reason||"",error:null,testing:!1,testResult:null,apiKeyTouched:!1}),l()},C=async()=>{i({testing:!0,testResult:null});try{const s=await y.post("/api/exchange-rate-providers/test-connection",{type:t.type,provider_id:d?void 0:a.id,config:{...t.base_url&&{base_url:t.base_url},...t.apiKeyTouched&&{api_key:t.api_key}}});i({testResult:s.data})}catch(s){i({testResult:{success:!1,error:P(s)}})}finally{i({testing:!1})}};return e.jsx(N,{open:b,onClose:k,maxWidth:"sm",fullWidth:!0,title:d?r("admin.exchangeRateProvider.create.title"):r("admin.exchangeRateProvider.edit.title",{name:a.name}),PaperProps:{sx:{borderRadius:2}},actions:e.jsxs(p,{direction:"row",spacing:2,children:[e.jsx(j,{variant:"outlined",onClick:k,disabled:t.loading,children:r("common.cancel")}),e.jsx(j,{variant:"contained",onClick:R,disabled:t.loading,children:t.loading?r("common.saving"):r("common.save")})]}),children:e.jsxs(p,{spacing:3,children:[t.error&&e.jsx(E,{severity:"error",onClose:()=>i({error:null}),children:t.error}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.name"),value:t.name,onChange:s=>i({name:s.target.value}),helperText:r("admin.exchangeRateProvider.edit.nameHelp"),fullWidth:!0,required:!0,disabled:!1}),e.jsxs(D,{fullWidth:!0,required:!0,children:[e.jsx(L,{children:r("admin.exchangeRateProvider.edit.type")}),e.jsxs(A,{value:t.type,label:r("admin.exchangeRateProvider.edit.type"),onChange:s=>{const m=s.target.value;i(v=>{const T=d&&(!v.name||v.name===W[v.type]);return{type:m,name:T?W[m]:v.name}})},disabled:!d,children:[e.jsx(h,{value:"token-data",children:"Token Data (ArcBlock)"}),e.jsx(h,{value:"coingecko",children:"CoinGecko"}),e.jsx(h,{value:"coinmarketcap",children:"CoinMarketCap"})]}),e.jsx(B,{children:r("admin.exchangeRateProvider.edit.typeHelp")})]}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.baseUrl"),value:t.base_url,onChange:s=>i({base_url:s.target.value}),helperText:r("admin.exchangeRateProvider.edit.baseUrlHelp",{defaultUrl:U[t.type]||""}),placeholder:U[t.type]||"",fullWidth:!0}),t.type==="coinmarketcap"&&e.jsxs(p,{spacing:1,children:[e.jsx(_,{label:r("admin.exchangeRateProvider.edit.apiKey"),value:t.api_key,onChange:s=>i({api_key:s.target.value,apiKeyTouched:!0}),helperText:r("admin.exchangeRateProvider.edit.apiKeyHelp"),placeholder:ne[t.type]||"",type:"password",fullWidth:!0}),e.jsxs(g,{variant:"caption",color:"text.secondary",children:[r("admin.exchangeRateProvider.edit.apiKeyLinkText")," ",e.jsx($,{href:"https://pro.coinmarketcap.com/account",target:"_blank",rel:"noreferrer",children:r("admin.exchangeRateProvider.edit.apiKeyLinkAction")})]})]}),e.jsx(p,{direction:"row",spacing:2,alignItems:"flex-start",children:e.jsx(j,{variant:"outlined",onClick:C,disabled:t.testing,startIcon:t.testing?e.jsx(G,{size:16}):void 0,children:t.testing?r("admin.exchangeRateProvider.edit.testing"):r("admin.exchangeRateProvider.edit.testConnection")})}),t.testResult&&e.jsx(E,{severity:t.testResult.success?"success":"error",onClose:()=>i({testResult:null}),children:t.testResult.success?r("admin.exchangeRateProvider.edit.testSuccess",{time:t.testResult.responseTime,rate:t.testResult.rate,symbol:t.testResult.symbol,timestamp:t.testResult.timestamp}):r("admin.exchangeRateProvider.edit.testFailed",{error:t.testResult.error})}),e.jsx(_,{label:r("admin.exchangeRateProvider.edit.priority"),type:"number",value:t.priority,onChange:s=>{const m=parseInt(s.target.value,10);i({priority:Number.isNaN(m)?1:Math.max(1,m)})},helperText:r("admin.exchangeRateProvider.edit.priorityHelp"),fullWidth:!0,inputProps:{min:1}}),e.jsxs(D,{fullWidth:!0,children:[e.jsx(L,{children:r("admin.exchangeRateProvider.edit.status")}),e.jsxs(A,{value:t.status,label:r("admin.exchangeRateProvider.edit.status"),onChange:s=>i({status:s.target.value}),children:[e.jsx(h,{value:"active",children:r("admin.exchangeRateProvider.status.active")}),e.jsx(h,{value:"degraded",children:r("admin.exchangeRateProvider.status.degraded")}),e.jsx(h,{value:"paused",children:r("admin.exchangeRateProvider.status.paused")}),e.jsx(h,{value:"inactive",children:r("admin.exchangeRateProvider.status.inactive")})]}),e.jsx(B,{children:r("admin.exchangeRateProvider.edit.statusHelp")})]}),t.status==="paused"&&e.jsx(_,{label:r("admin.exchangeRateProvider.edit.pausedReason"),value:t.paused_reason,onChange:s=>i({paused_reason:s.target.value}),multiline:!0,rows:3,fullWidth:!0,helperText:r("admin.exchangeRateProvider.edit.pausedReasonHelp")})]})})}const ie={"token-data":"https://token-data.arcblock.io",coingecko:"https://api.coingecko.com/api/v3",coinmarketcap:"https://pro-api.coinmarketcap.com/v1"},se=()=>y.get("/api/exchange-rate-providers").then(a=>a.data),H=a=>{switch(a){case"active":return"success";case"degraded":return"warning";case"paused":return"default";case"inactive":return"error";default:return"default"}};function ue(){const{t:a}=F(),[d,b]=te(),[l,c]=M({editingProvider:null,isCreating:!1,deletingProvider:null,updatingProviderId:null,confirmDisableProvider:null}),{loading:r,error:t,data:i,refresh:R}=Z(se),k=o=>{c({editingProvider:o,isCreating:!1})},C=()=>{if(c({editingProvider:null,isCreating:!1}),d.get("create")==="1"){const o=new URLSearchParams(d);o.delete("create"),b(o)}},s=async()=>{if(await R(),C(),f.success(a("common.saved")),d.get("create")==="1"){const o=new URLSearchParams(d);o.delete("create"),b(o)}},m=()=>{c({editingProvider:{id:"",name:"Token Data",type:"token-data",enabled:!0,priority:(i?.data?.length||0)+1,status:"active",paused_reason:"",config:{base_url:""},last_failure_at:null,last_success_at:null,failure_count:0,created_at:"",updated_at:""},isCreating:!0})};K.useEffect(()=>{d.get("create")==="1"&&!l.isCreating&&!l.editingProvider&&m()},[d,l.isCreating,l.editingProvider,i?.data]);const v=async()=>{if(l.deletingProvider)try{await y.delete(`/api/exchange-rate-providers/${l.deletingProvider.id}`),f.success(a("common.deleted")),await R(),c({deletingProvider:null})}catch(o){f.error(P(o))}},T=async(o,u)=>{c({updatingProviderId:o.id});try{await y.put(`/api/exchange-rate-providers/${o.id}`,{enabled:u}),f.success(a("common.saved")),await R()}catch(n){f.error(P(n))}finally{c({updatingProviderId:null})}};if(t)return e.jsx(E,{severity:"error",children:P(t)});const z=[{label:a("admin.exchangeRateProvider.table.name"),name:"name",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.config?.base_url||ie[n.type];return e.jsxs(p,{direction:"column",spacing:.5,children:[e.jsx(g,{variant:"body2",fontWeight:500,children:n.name}),x&&e.jsx(g,{variant:"caption",color:"text.secondary",children:x})]})}}},{label:a("admin.exchangeRateProvider.table.participation"),name:"participation",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.enabled&&n.status!=="paused"&&n.status!=="inactive";return e.jsx(w,{label:a(x?"admin.exchangeRateProvider.participation.included":"admin.exchangeRateProvider.participation.excluded"),color:x?"success":"default"})}}},{label:a("admin.exchangeRateProvider.table.health"),name:"health",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=a(`admin.exchangeRateProvider.health.${n.status}`);return n.paused_reason?e.jsx(Y,{title:n.paused_reason,arrow:!0,children:e.jsx("span",{children:e.jsx(w,{label:x,color:H(n.status)})})}):e.jsx(w,{label:x,color:H(n.status)})}}},{label:a("admin.exchangeRateProvider.table.recentActivity"),name:"recent_activity",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];if(!n)return null;const x=n.last_success_at||n.last_failure_at,S=x?J(x):"-",q=1440*60*1e3,O=n.last_failure_at&&Date.now()-new Date(n.last_failure_at).getTime()<=q?n.failure_count:0;return e.jsxs(p,{direction:"column",spacing:.25,children:[e.jsx(g,{variant:"caption",color:"text.secondary",children:a("admin.exchangeRateProvider.table.lastUpdate",{time:S})}),e.jsx(g,{variant:"caption",color:"text.secondary",children:a("admin.exchangeRateProvider.table.failures24h",{count:O})})]})}}},{label:a("admin.exchangeRateProvider.table.enabled"),name:"enabled",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];return n?e.jsx(X,{checked:n.enabled,onChange:x=>{const S=x.target.checked;if(!S){c({confirmDisableProvider:n});return}T(n,S)},disabled:l.updatingProviderId===n.id,size:"small"}):null}}},{label:a("common.actions"),name:"id",options:{customBodyRenderLite:(o,u)=>{const n=i?.data?.[u];return n?e.jsxs(p,{direction:"row",spacing:.5,children:[e.jsx(I,{size:"small",onClick:()=>k(n),children:e.jsx(Q,{fontSize:"small"})}),e.jsx(I,{size:"small",onClick:()=>c({deletingProvider:n}),color:"error",children:e.jsx(V,{fontSize:"small"})})]}):null}}}];return e.jsxs(e.Fragment,{children:[e.jsx(g,{variant:"subtitle1",sx:{color:"text.secondary",whiteSpace:"break-spaces",mt:3,mb:2},children:a("admin.exchangeRateProvider.medianStrategyNote")}),e.jsx(ee,{data:i?.data||[],columns:z,loading:r,toolbar:!1,footer:!1,options:{count:i?.data?.length||0,page:0,rowsPerPage:100},emptyNodeText:a("common.noData")}),l.confirmDisableProvider&&e.jsx(ae,{title:a("admin.exchangeRateProvider.disableConfirmTitle"),message:a("admin.exchangeRateProvider.disableConfirmMessage"),onConfirm:()=>{const o=l.confirmDisableProvider;c({confirmDisableProvider:null}),T(o,!1)},onCancel:()=>c({confirmDisableProvider:null})}),l.editingProvider&&e.jsx(re,{provider:l.editingProvider,isCreate:l.isCreating,open:!!l.editingProvider,onClose:C,onSave:s}),l.deletingProvider&&e.jsx(N,{open:!!l.deletingProvider,onClose:()=>c({deletingProvider:null}),maxWidth:"sm",title:a("admin.exchangeRateProvider.delete.title"),PaperProps:{sx:{borderRadius:2}},actions:e.jsxs(p,{direction:"row",spacing:2,children:[e.jsx(j,{variant:"outlined",onClick:()=>c({deletingProvider:null}),children:a("common.cancel")}),e.jsx(j,{variant:"contained",color:"error",onClick:v,children:a("common.delete")})]}),children:e.jsx(g,{children:a("admin.exchangeRateProvider.delete.confirm",{name:l.deletingProvider.name})})})]})}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as K,P as Se,aI as we,Y as De,$ as Ee,Z as te,ao as Ie,A as E}from"./vendor-blocklet-DcLR2Cyf.js";import{j as e,a3 as q,B as j,a2 as re,aZ as Y,I as ue,ci as Te,r as k,x as J,aQ as se,aT as ie,ad as R,q as I,Y as le,aX as H,cj as U,a7 as xe,ck as Ae,N as Z,c3 as Oe,bH as N,aJ as Ve,w as ze,e as T}from"./vendor-mui-BXZut9Pz.js";import{a as oe,E as je,b7 as me,C as O,Y as ne,X as Q,aX as z,aW as G,N as he,e as pe,f as Re,b8 as de,h as ge,F as ye,k as ve,b9 as ke,S as Le,b as We}from"./index-BarN7DfU.js";import{I as ae}from"./collapse-CSrlJ0eG.js";import{l as qe}from"./lodash-B4Ozcv0x.js";import{D as Me}from"./drawer-form-DspWWj3x.js";import{C as ce}from"./currency-select-B4ieQBvv.js";import{u as be,P as Pe}from"./product-select-ChEyoJqJ.js";import{D as $e,P as Fe,a as He}from"./form-cX026J4G.js";import{a as Be,e as Xe}from"./vendor-react-BPknnnEA.js";function Ce({prefix:m="",baseCurrencyFieldName:h="currency_id",currencyOptionsFieldName:r="currency_options",unitAmountFieldName:l="amount_off",objectMode:i=!1,showBaseCurrency:_=!0,disabled:p=!1}){const{t:S}=K(),{settings:c}=oe(),{control:w,setValue:f,watch:A,formState:{errors:D},trigger:y}=je(),x=t=>m?`${m}.${t}`:t,g=me({control:w,name:x(r)}),v=A(x(h)),P=A(x(r)),M=()=>!i||!P||typeof P!="object"?[]:Object.entries(P).map(([t,u])=>({currency_id:t,[l]:u[l]||0})),B=t=>{const u=P||{};f(x(r),{...u,[t]:{[l]:0}},{shouldValidate:!0})},V=t=>{const d={...P||{}};delete d[t],f(x(r),d,{shouldValidate:!0})},$=(t,u)=>{const C={...P||{}},F=C[t];delete C[t],C[u]=F,f(x(r),C,{shouldValidate:!0})},L=i?M():g.fields,a=t=>(t?.split(".")).reduce((d,C)=>d?.[C],D),b=t=>Number(t)<=0?S("admin.price.unit_amount.positive"):!0,s=async t=>{i?V(t):(await g.remove(t),y(x(h)))},n=(t,u)=>{if(i)$(t,u);else{const d=t,C={currency_id:u};g?.fields?.[d]?.currency&&(C.currency=ne(c.paymentMethods,u)),g.update(d,{...g.fields[d],...C})}},o=t=>{i?B(t):g.append({currency_id:t,[l.split(".").pop()||"amount_off"]:0})};return e.jsxs(q,{spacing:2,sx:{width:"100%"},children:[_&&e.jsx(j,{sx:{width:"100%"},children:e.jsx(O,{name:x(l),control:w,rules:{required:S("admin.price.unit_amount.required"),validate:t=>b(t)},disabled:p,render:({field:t})=>e.jsx(re,{...t,type:"number",size:"small",fullWidth:!0,disabled:p,error:!!a(x(l)),helperText:a(x(l))?.message,slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(ce,{mode:"selected",hasSelected:u=>g.fields.some(d=>d.currency_id===u.id)||u.id===v,currencyFilter:u=>u.type!=="credit",onSelect:u=>{const d=g.fields.findIndex(C=>C.currency_id===v);d>-1&&n(d,u),f(x("currency"),ne(c.paymentMethods,u),{shouldValidate:!0}),f(x(h),u,{shouldValidate:!0})},value:v,disabled:p,selectSX:{".MuiOutlinedInput-notchedOutline":{border:"none"}}})})}},onChange:u=>{const{value:d}=u.target;if(t.onChange(d),i){const C=P||{};f(x(r),{...C,[v]:{...C[v]||{},[l]:d}})}else{const C=g.fields.findIndex(F=>F.currency_id===v);if(C===-1)return;f(x(`${r}.${C}.${l.split(".").pop()}`),d,{shouldValidate:!0})}}})})}),L.filter(t=>!_||t.currency_id!==v).length>0&&e.jsx(q,{spacing:1.5,sx:{width:"100%"},children:L.map((t,u)=>{if(_&&t.currency_id===v)return null;const d=x(i?`${r}.${t.currency_id}.${l}`:`${r}.${u}.${l.split(".").pop()}`),C=ne(c.paymentMethods,t.currency_id);return e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"start"},children:[e.jsx(j,{sx:{flex:1},children:e.jsx(O,{name:d,control:w,rules:{required:S("admin.price.unit_amount.required"),validate:F=>b(F)},disabled:p,render:({field:F})=>e.jsx(re,{...F,type:"number",size:"small",fullWidth:!0,sx:{minWidth:"300px"},disabled:p,error:!!a(d),helperText:a(d)?.message,onChange:W=>{const{value:X}=W.target;if(F.onChange(X),i){const ee=P||{};f(x(r),{...ee,[t.currency_id]:{...ee[t.currency_id]||{},[l]:parseFloat(X)||0}},{shouldValidate:!0}),y(d)}},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(ce,{mode:"selected",hasSelected:W=>L.some(X=>X.currency_id===W.id)||_&&W.id===v,currencyFilter:W=>W.type!=="credit",onSelect:W=>{if(i)n(t.currency_id,W);else{const X=g.fields.findIndex(ee=>ee.currency_id===C?.id);X>-1&&n(X,W)}},value:C?.id,disabled:p,selectSX:{".MuiOutlinedInput-notchedOutline":{border:"none"}}})})}}})})}),!p&&e.jsx(ue,{size:"small",disabled:p,onClick:()=>s(i?t.currency_id:u),sx:{mt:.5,ml:-1},children:e.jsx(Te,{color:"error",sx:{opacity:.75}})})]},t.currency_id)})}),!p&&e.jsx(j,{sx:{width:"100%"},children:e.jsx(ce,{mode:"waiting",hasSelected:t=>L.some(u=>u.currency_id===t.id)||_&&t.id===v,currencyFilter:t=>t.type!=="credit",onSelect:o,value:"",width:"100%"})})]})}const Ue={code:"",description:"",active:!0,verification_type:"code",limit_number_redemptions:!1,add_expiration_date:!1,restrictions:{first_time_transaction:!1,require_minimum_amount:!1,currency_options:{}},customer_dids:[],nft_addresses:[],nft_tags:[],trusted_issuers:[],trusted_parents:[],min_balance:1,vc_roles:[],vc_trusted_issuers:[]},Ye=()=>pe.get("/api/customers?limit=1000").then(m=>m.data);function Ke({prefix:m="",showCodeInput:h=!1,showExpandedOptions:r=!0,availableCurrencies:l=[]}){const{t:i}=K(),{control:_,setValue:p,watch:S}=je(),c=a=>m?`${m}.${a}`:a,{data:w}=Se(Ye),f=Q({control:_,name:c("verification_type")}),A=Q({control:_,name:c("limit_number_redemptions")}),D=Q({control:_,name:c("add_expiration_date")}),y=Q({control:_,name:c("restrictions.require_minimum_amount")}),x=Q({control:_,name:c("restrictions.currency_options")}),g=w?.list||[];k.useEffect(()=>{if(y&&x&&typeof x=="object"){const a=Object.entries(x);if(a.length>0){const b=a[0];if(b){const[s,n]=b,o=n.minimum_amount||0;p(c("restrictions.minimum_amount"),o,{shouldValidate:!1}),p(c("restrictions.minimum_amount_currency"),s,{shouldValidate:!1})}}}else y||(p(c("restrictions.minimum_amount"),void 0,{shouldValidate:!1}),p(c("restrictions.minimum_amount_currency"),void 0,{shouldValidate:!1}))},[y,x,p,c]);const v=()=>Math.random().toString(36).substring(2,12).toUpperCase(),P=a=>a.name||a.email||a.did||a.id,M=(a,b)=>{const s=S(c(a))||[];if(b.trim()){const n=[...s,b.trim()];p(c(a),n)}},B=(a,b)=>{const n=(S(c(a))||[]).filter((o,t)=>t!==b);p(c(a),n)},V=(a,b,s)=>{const n=S(c(a))||[];return e.jsxs(j,{sx:{position:"relative"},children:[e.jsx(re,{label:b,placeholder:s,fullWidth:!0,size:"small",onKeyPress:o=>{if(o.key==="Enter"){o.preventDefault();const{value:t}=o.target;M(a,t),o.target.value=""}}}),e.jsx(j,{sx:{position:"absolute",top:8,right:12,fontSize:"0.75rem",color:"text.secondary",pointerEvents:"none",zIndex:1},children:"Press Enter"}),n.length>0&&e.jsx(q,{direction:"row",spacing:1,sx:{mt:1,flexWrap:"wrap"},children:n.map((o,t)=>e.jsx(xe,{label:o,onDelete:()=>B(a,t),size:"small"},o))})]})},$=()=>e.jsxs(j,{children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:2},children:i("admin.coupon.minimumAmountHelp")}),e.jsx(Ce,{prefix:c("restrictions"),baseCurrencyFieldName:"minimum_amount_currency",currencyOptionsFieldName:"currency_options",unitAmountFieldName:"minimum_amount",objectMode:!0,showBaseCurrency:!1})]}),L=()=>{const a=S(c("customer_dids"))||[],b=[];return g.forEach(s=>{(a.includes(s.did)||a.includes(s.id))&&b.push(s)}),a.forEach(s=>{g.some(n=>n.did===s||n.id===s)||b.push(s)}),e.jsx(j,{children:e.jsx(Ae,{multiple:!0,options:g,getOptionLabel:P,value:b,onChange:(s,n)=>{const o=n.map(t=>typeof t=="string"?t:t.did||t.id);p(c("customer_dids"),o)},freeSolo:!0,renderInput:s=>e.jsx(re,{...s,label:i("admin.coupon.customerDids"),placeholder:i("admin.coupon.customerDidsPlaceholder"),size:"small",helperText:i("admin.coupon.customerDidsHelp")}),renderOption:(s,n)=>e.jsxs(j,{component:"li",...s,sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Z,{src:he(n.did,n?.updated_at?new Date(n.updated_at).toISOString():void 0),sx:{width:24,height:24},alt:P(n)}),e.jsx(I,{variant:"body2",children:P(n)})]}),renderTags:(s,n)=>s.map((o,t)=>{const u=typeof o=="object",d=u?P(o):o;return k.createElement(xe,{variant:"outlined",label:d,size:"small",color:u?"primary":"default",avatar:u?e.jsx(Z,{src:he(o.did,o?.updated_at?new Date(o.updated_at).toISOString():void 0),sx:{width:20,height:20},alt:P(o)}):void 0,...n({index:t}),key:u?o.id:o})}),filterOptions:(s,n)=>{const o=s.filter(d=>P(d).toLowerCase().includes(n.inputValue.toLowerCase())),{inputValue:t}=n,u=s.some(d=>P(d)===t);return t!==""&&!u&&t.length>10&&o.push(t),o}})})};return e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:3},children:[h&&e.jsx(j,{sx:{display:"flex",gap:2,alignItems:"flex-end"},children:e.jsx(z,{name:c("code"),label:i("admin.coupon.codeOptional"),placeholder:"FRIENDS20",helperText:i("admin.coupon.codeHelp"),InputProps:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(J,{size:"small",onClick:()=>{p(c("code"),v())},children:i("admin.coupon.generate")})})}})}),e.jsx(z,{name:c("description"),label:i("admin.coupon.desc"),placeholder:i("admin.coupon.desc"),multiline:!0,minRows:2,maxRows:4,slotProps:{htmlInput:{maxLength:250}}}),e.jsxs(se,{component:"fieldset",fullWidth:!0,children:[e.jsx(G,{component:"legend",sx:{mb:1,fontSize:"0.875rem",fontWeight:500},children:i("admin.coupon.verificationType")}),e.jsx(O,{name:c("verification_type"),control:_,render:({field:a})=>e.jsxs(ie,{...a,size:"small",displayEmpty:!0,children:[e.jsx(R,{value:"code",children:i("admin.coupon.codeOnly")}),e.jsx(R,{value:"nft",disabled:!0,children:i("admin.coupon.nftVerification")}),e.jsx(R,{value:"vc",disabled:!0,children:i("admin.coupon.vcVerification")}),e.jsx(R,{value:"user_restricted",children:i("admin.coupon.userWhitelist")})]})})]}),f==="nft"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.nftSettings")}),V("nft_addresses",i("admin.coupon.nftAddresses"),i("admin.coupon.nftAddressesPlaceholder")),V("nft_tags",i("admin.coupon.nftTags"),i("admin.coupon.nftTagsPlaceholder")),V("trusted_issuers",i("admin.coupon.trustedIssuers"),i("admin.coupon.trustedIssuersPlaceholder")),V("trusted_parents",i("admin.coupon.trustedParents"),i("admin.coupon.trustedParentsPlaceholder")),e.jsx(z,{name:c("min_balance"),label:i("admin.coupon.minBalance"),type:"number",rules:{min:1}})]}),f==="vc"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.vcSettings")}),V("vc_roles",i("admin.coupon.requiredRoles"),i("admin.coupon.requiredRolesPlaceholder")),V("vc_trusted_issuers",i("admin.coupon.trustedVcIssuers"),i("admin.coupon.trustedVcIssuersPlaceholder"))]}),f==="user_restricted"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.userWhitelistSettings")}),L()]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(le,{}),e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(O,{name:c("restrictions.first_time_transaction"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value||!1}),label:i("admin.coupon.eligibleFirstTime"),sx:{alignItems:"flex-start"}})}),e.jsx(O,{name:c("limit_number_redemptions"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value}),label:i("admin.coupon.limitNumberRedemptions"),sx:{alignItems:"flex-start"}})}),A&&e.jsx(z,{name:c("max_redemptions"),label:i("admin.coupon.maxRedemptions"),type:"number",slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:i("admin.coupon.times")})}}}),e.jsx(O,{name:c("add_expiration_date"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value}),label:i("admin.coupon.addExpirationDate"),sx:{alignItems:"flex-start"}})}),D&&e.jsx(z,{name:c("expires_at"),label:i("admin.coupon.expiresAt"),type:"datetime-local",InputLabelProps:{shrink:!0}}),e.jsx(O,{name:c("restrictions.require_minimum_amount"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value||!1,onChange:b=>{if(a.onChange(b.target.checked),b.target.checked){const s=l[0];s&&p(c("restrictions.currency_options"),{[s.id]:{minimum_amount:0}},{shouldValidate:!0})}else p(c("restrictions.currency_options"),{},{shouldValidate:!0})}}),label:i("admin.coupon.requireMinimumOrder"),sx:{alignItems:"flex-start"}})}),y&&$()]})]})]})}const Ze=(m,h)=>(m.prices=m.prices.filter(r=>{const l=r.active,i=!h(r);return l&&i}),m),Je=(m,h)=>we(m).map(l=>Ze(l,h)).filter(l=>l.prices.length);function Qe({value:m=[],onChange:h,disabled:r=!1}){const{t:l}=K(),{products:i}=be(),{settings:_}=oe(),[p,S]=k.useState(null),[c,w]=k.useState(null),[f,A]=k.useState(!1),[D,y]=k.useState(!1),x=(i||[]).filter(s=>m.includes(s.id)),g=(i||[]).filter(s=>!m.includes(s.id)),v=s=>{if(!s.prices||s.prices.length===0)return null;if(s.prices.length===1){const n=s.prices[0];if(n){const o=ne(_.paymentMethods,n.currency_id??"")||_.baseCurrency;return Re(n,o)}}return l("admin.price.count",{count:s.prices.length})},P=s=>{if(s==="add"){de("product.create.request");return}if(s&&!m.includes(s)){const n=[...m,s];h(n),A(!1),y(!1)}},M=s=>{const n=m.filter(o=>o!==s);h(n),S(null),w(null)},B=(s,n)=>{S(s.currentTarget),w(n)},V=()=>{S(null),w(null)},$=()=>{A(!0),y(!0)},L=()=>{y(!1)},a=()=>{y(!0)},b=()=>{const s=Je(i,()=>!1);return s.length===0?[]:s.map(n=>e.jsx(R,{value:n.id,disabled:m.includes(n.id),children:e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"center",width:"100%"},children:[n.images[0]?e.jsx(Z,{src:n.images[0],alt:n.name,variant:"square",sx:{width:24,height:24}}):e.jsx(Z,{variant:"square",sx:{width:24,height:24,fontSize:"0.75rem"},children:n.name.slice(0,1)}),e.jsx(j,{sx:{flex:1,minWidth:0},children:e.jsx(I,{variant:"body2",noWrap:!0,children:n.name})}),e.jsx(I,{variant:"body2",sx:{color:"text.secondary",ml:"auto",flexShrink:0},children:m.includes(n.id)?"Added":v(n)})]})},`product-${n.id}`))};return e.jsxs(q,{spacing:2,children:[x.map(s=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:2,p:2,border:"1px solid",borderColor:"divider",borderRadius:1,backgroundColor:"background.paper"},children:[s.images[0]?e.jsx(Z,{src:s.images[0],alt:s.name,variant:"square",sx:{width:40,height:40}}):e.jsx(Z,{variant:"square",sx:{width:40,height:40,fontSize:"1rem"},children:s.name.slice(0,1)}),e.jsxs(j,{sx:{flex:1,minWidth:0},children:[e.jsx(I,{variant:"body1",noWrap:!0,sx:{fontWeight:"medium"},children:s.name}),v(s)&&e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:v(s)})]}),e.jsx(ue,{size:"small",disabled:r,onClick:n=>B(n,s.id),sx:{color:"text.secondary"},children:e.jsx(Oe,{})})]},s.id)),!r&&g.length>0&&(m.length===0||f)&&e.jsx(se,{fullWidth:!0,size:"small",children:e.jsxs(ie,{value:"",open:D,onClose:L,onOpen:a,displayEmpty:!0,onChange:s=>P(s.target.value),renderValue:s=>s||e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:l("admin.product.find")}),MenuProps:{style:{maxHeight:480}},children:[e.jsx(R,{value:"add",children:e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(N,{fontSize:"small",color:"primary"}),e.jsx(I,{variant:"body2",sx:{color:"primary.main",fontWeight:"medium"},children:l("admin.product.add")})]})}),b()]})}),!r&&g.length>0&&m.length>0&&!f&&e.jsx(I,{variant:"body2",component:"button",onClick:$,sx:{color:"primary.main",textDecoration:"none",cursor:"pointer",border:"none",background:"none",p:0,textAlign:"left",fontWeight:"normal","&:hover":{textDecoration:"underline"}},children:l("admin.coupon.addProduct")}),e.jsx(Ve,{anchorEl:p,open:!!p,onClose:V,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx(R,{onClick:()=>c&&M(c),children:l("admin.product.remove")})})]})}function Ge({simple:m=!0,onSave:h,onCancel:r}){const{t:l}=K(),{settings:i}=oe(),[_,p]=De({loading:!1}),S=ge({mode:"onChange",defaultValues:{type:"service",name:"",description:"",images:[],statement_descriptor:"",unit_label:"",features:[],prices:[{...$e,currency_id:i.baseCurrency.id}],metadata:[]}}),{control:c,handleSubmit:w,reset:f,formState:{errors:A}}=S,D=me({control:c,name:"prices"}),y=g=>(p({loading:!0}),pe.post("/api/products",g).then(()=>{te.success(l("admin.product.saved"))}).catch(v=>{console.error(v),te.error(ve(v))}).finally(()=>{p({loading:!1})})),x=()=>{Object.keys(A).length>0||w(async g=>{await y(g),await f(),await h(null)})()};return e.jsx(Ee,{open:!0,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"md",onClose:()=>r(null),showCloseButton:!1,title:l("admin.product.add"),actions:e.jsxs(q,{direction:"row",children:[e.jsx(J,{size:"small",sx:{mr:2},onClick:r,children:l("common.cancel")}),e.jsxs(J,{variant:"contained",color:"primary",size:"small",disabled:_.loading,onClick:x,children:[_.loading&&e.jsx(ze,{size:"small"})," ",l("common.save")]})]}),children:e.jsx(ye,{...S,children:e.jsxs(Pe,{children:[e.jsx(Fe,{simple:m}),D.fields.map((g,v)=>e.jsx(He,{prefix:`prices.${v}`,simple:m},g.id))]})})})}function Ne({onClose:m=()=>{},onSubmit:h=()=>{}}){const{t:r}=K(),{settings:l}=oe(),{refresh:i}=be(),[_,p]=k.useState("configuration"),[S,c]=k.useState(!1),w=ge({mode:"onChange",defaultValues:{name:"",description:"",id:"",type:"percentage",percent_off:10,amount_off:"0",currency_id:l.baseCurrency.id,currency_options:[],duration:"once",duration_in_months:void 0,applies_to_products:!1,product_ids:[],limit_date_range:!1,redeem_by:"",limit_total_number:!1,max_redemptions:void 0,use_customer_facing_codes:!1,promotion_codes:[]}}),{control:f,handleSubmit:A,watch:D,formState:{errors:y}}=w,x=me({control:f,name:"promotion_codes"});ke(n=>n.type==="product.create.request",()=>{c(!0)});const g=()=>{c(!1),i()},v=D("type"),P=D("duration"),M=D("use_customer_facing_codes"),B=D("limit_date_range"),V=D("limit_total_number"),$=D("currency_id"),L=D("currency_options")||[],a=()=>{const n=l.paymentMethods?.flatMap(o=>o.payment_currencies)||[];if(v==="fixed_amount"){const o=new Set;return $&&o.add($),L.forEach(t=>{t.currency_id&&o.add(t.currency_id)}),n.filter(t=>o.has(t.id))}return n},s=A(n=>{const o={name:n.name,duration:n.duration,metadata:{}};n.id&&(o.id=n.id),n.description&&(o.description=n.description),n.type==="percentage"?o.percent_off=n.percent_off:(o.amount_off=n.amount_off,o.currency_id=n.currency_id,n.currency_options&&n.currency_options.length>0&&(o.currency_options={},n.currency_options.forEach(t=>{t.currency_id&&t.amount_off&&(o.currency_options[t.currency_id]={amount_off:parseFloat(t.amount_off)||0})}))),n.duration==="repeating"&&(o.duration_in_months=n.duration_in_months||1),n.limit_total_number&&n.max_redemptions&&(o.max_redemptions=n.max_redemptions),n.limit_date_range&&n.redeem_by&&(o.redeem_by=Math.floor(new Date(n.redeem_by).getTime()/1e3)),n.applies_to_products&&n.product_ids&&n.product_ids.length>0&&(o.applies_to={products:n.product_ids}),n.use_customer_facing_codes&&n.promotion_codes.length>0&&(o.promotion_codes=n.promotion_codes.map(t=>{const u={active:t.active,verification_type:t.verification_type,max_redemptions:t.limit_number_redemptions?t.max_redemptions:void 0,expires_at:t.expires_at?Math.floor(new Date(t.expires_at).getTime()/1e3):void 0,restrictions:{},metadata:{}};return t.description&&(u.description=t.description),t.restrictions&&(u.restrictions=t.restrictions),t.code&&t.code.trim()&&(u.code=t.code),t.verification_type==="nft"?u.nft_config={addresses:t.nft_addresses?.filter(d=>d.trim())||[],tags:t.nft_tags?.filter(d=>d.trim())||[],trusted_issuers:t.trusted_issuers?.filter(d=>d.trim())||[],trusted_parents:t.trusted_parents?.filter(d=>d.trim())||[],min_balance:t.min_balance||1}:t.verification_type==="vc"?u.vc_config={roles:t.vc_roles?.filter(d=>d.trim())||[],trusted_issuers:t.vc_trusted_issuers?.filter(d=>d.trim())||[]}:t.verification_type==="user_restricted"&&(u.customer_dids=t.customer_dids?.filter(d=>d.trim())||[]),u})),pe.post("/api/coupons",o).then(()=>{te.success(r("admin.coupon.saved")),de("coupon.created"),w.reset(),de("drawer.submitted"),h&&h(),m&&m()}).catch(t=>{console.error(t),te.error(ve(t))})});return e.jsxs(e.Fragment,{children:[e.jsx(ye,{...w,children:e.jsxs(j,{component:"form",id:"coupon-form",onSubmit:s,children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:3},children:r("admin.coupon.description")}),e.jsx(ae,{expanded:_==="configuration",value:"configuration",card:!0,onChange:(n,o)=>{o&&p("configuration")},trigger:r("admin.coupon.couponConfiguration"),children:e.jsxs(j,{sx:{p:2,display:"flex",flexDirection:"column",gap:2},children:[e.jsx(z,{name:"name",label:r("admin.coupon.name"),required:!0,placeholder:"First purchase discount",helperText:y?.name?.message||r("admin.coupon.nameHelp"),rules:{required:r("common.required")}}),e.jsx(z,{name:"description",label:r("admin.coupon.desc"),placeholder:r("admin.coupon.desc"),multiline:!0,minRows:2,maxRows:4,slotProps:{htmlInput:{maxLength:500}}}),e.jsx(z,{name:"id",label:r("admin.coupon.idOptional"),helperText:r("admin.coupon.idHelp")}),e.jsxs(j,{children:[e.jsx(G,{required:!0,children:r("admin.coupon.type")}),e.jsx(O,{name:"type",control:f,render:({field:n})=>e.jsx(se,{fullWidth:!0,size:"small",children:e.jsxs(ie,{...n,children:[e.jsx(R,{value:"percentage",children:r("admin.coupon.percentageOff")}),e.jsx(R,{value:"fixed_amount",children:r("admin.coupon.fixedAmountOff")})]})})})]}),v==="percentage"?e.jsx(z,{name:"percent_off",label:r("admin.coupon.percentageDiscount"),type:"number",required:!0,rules:{min:0,max:100,validate:n=>!n&&n!==0?r("common.required"):Number(n)<=0||Number(n)>100?r("common.invalid"):!0},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:"%"})},htmlInput:{min:0,max:100,precision:2}}}):e.jsxs(j,{children:[e.jsx(G,{required:!0,children:r("admin.coupon.fixedAmount")}),e.jsx(Ce,{baseCurrencyFieldName:"currency_id",currencyOptionsFieldName:"currency_options",unitAmountFieldName:"amount_off"})]}),e.jsx(j,{sx:{pl:2},children:e.jsx(O,{name:"applies_to_products",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(Le,{...n,checked:n.value}),label:r("admin.coupon.applyToProducts"),slotProps:{typography:{sx:{marginLeft:"8px"}}}})})}),D("applies_to_products")&&e.jsxs(j,{children:[e.jsx(G,{children:r("admin.coupon.selectProducts")}),e.jsx(O,{name:"product_ids",control:f,render:({field:n})=>e.jsx(Qe,{value:n.value||[],onChange:n.onChange})})]}),e.jsxs(j,{children:[e.jsx(O,{name:"duration",control:f,render:({field:n})=>e.jsxs(se,{fullWidth:!0,size:"small",children:[e.jsx(G,{required:!0,children:r("admin.coupon.duration")}),e.jsxs(ie,{...n,children:[e.jsx(R,{value:"once",children:r("admin.coupon.once")}),e.jsx(R,{value:"forever",children:r("admin.coupon.forever")}),e.jsx(R,{value:"repeating",children:r("admin.coupon.repeating")})]})]})}),e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("admin.coupon.durationHelp")})]}),P==="repeating"&&e.jsx(z,{name:"duration_in_months",label:r("admin.coupon.durationInMonths"),type:"number",rules:{required:"Duration in months is required",min:1},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:r("admin.coupon.months")})}}}),e.jsx(le,{}),e.jsx(I,{variant:"h6",children:r("admin.coupon.redemptionLimits")}),e.jsx(O,{name:"limit_date_range",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.limitDateRange")})}),B&&e.jsx(z,{name:"redeem_by",label:"",type:"datetime-local",InputLabelProps:{shrink:!0}}),e.jsx(O,{name:"limit_total_number",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.limitTotalNumber")})}),V&&e.jsx(z,{name:"max_redemptions",label:r("admin.coupon.maxRedemptions"),type:"number",slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:r("admin.coupon.times")})}}})]})}),e.jsx(ae,{expanded:_==="codes",value:"codes",card:!0,onChange:(n,o)=>{o&&p("codes")},trigger:r("admin.coupon.promotionCodes"),style:{marginTop:2},children:e.jsxs(j,{sx:{p:2,display:"flex",flexDirection:"column",gap:3},children:[e.jsx(O,{name:"use_customer_facing_codes",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.useCustomerFacingCodes")})}),M&&e.jsxs(j,{children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:2},children:r("admin.coupon.codeHelp")}),x.fields.map((n,o)=>e.jsxs(k.Fragment,{children:[e.jsx(ae,{expanded:!0,style:{fontWeight:"bold",width:"100%"},addons:e.jsx(ue,{size:"small",onClick:()=>x.remove(o),color:"error",children:e.jsx(N,{style:{transform:"rotate(45deg)"}})}),trigger:`${r("admin.coupon.promotionCodes")} ${o+1}: ${w.watch(`promotion_codes.${o}.code`)||r("admin.coupon.newCode")}`,children:e.jsx(j,{sx:{width:"100%",p:1},children:e.jsx(Ke,{prefix:`promotion_codes.${o}`,showCodeInput:!0,showExpandedOptions:!0,availableCurrencies:a()})})}),e.jsx(le,{sx:{mt:2,mb:2}})]},n.id)),e.jsxs(J,{variant:"outlined",color:"primary",sx:{color:"text.primary",width:"100%"},onClick:()=>{const n=qe.cloneDeep(Ue);x.append(n)},children:[e.jsx(N,{fontSize:"small"})," ",r("admin.coupon.addAnotherCode")]})]}),!M&&e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:r("admin.coupon.promotionCodesHelp")})]})})]})}),S&&e.jsx(Ge,{onCancel:()=>c(!1),onSave:g})]})}function en({open:m=!1,onClose:h=()=>{},onSubmit:r=()=>{}}){const{t:l}=K();return e.jsx(Me,{icon:e.jsx(N,{}),text:l("admin.coupon.create"),open:m,onClose:h,width:640,addons:e.jsx(J,{variant:"contained",size:"small",form:"coupon-form",type:"submit",children:l("admin.coupon.create")}),children:e.jsx(Pe,{children:e.jsx(Ne,{onClose:h,onSubmit:r})})})}const nn=T.lazy(()=>E(()=>import("./create-ke4FrPx1.js"),[])),tn=T.lazy(()=>E(()=>import("./detail-B_lpOomD.js"),[])),rn=T.lazy(()=>E(()=>import("./detail-BXTsnQny.js"),[])),sn=T.lazy(()=>E(()=>import("./create-C7GOgZZM.js"),[])),on=T.lazy(()=>E(()=>import("./detail-DCTb8R7F.js"),[])),an=T.lazy(()=>E(()=>import("./create-DNar5UQD.js"),[])),cn=T.lazy(()=>E(()=>import("./detail-DACnmls3.js"),[])),ln=T.lazy(()=>E(()=>import("./detail-Cg505nKX.js"),[])),_e=T.lazy(()=>E(()=>import("./detail-46aLUdJj.js"),[])),dn=T.lazy(()=>E(()=>import("./create-Bgv5ux17.js"),[])),fe={products:T.lazy(()=>E(()=>import("./index-YG5oc8O3.js"),[])),coupons:T.lazy(()=>E(()=>import("./index-ajD9Iotk.js"),[])),links:T.lazy(()=>E(()=>import("./index-DNGmCIRP.js"),[])),"pricing-tables":T.lazy(()=>E(()=>import("./index-CCVDDX0c.js"),[])),passports:T.lazy(()=>E(()=>import("./index-Cd_BD9TM.js"),[])),vendors:T.lazy(()=>E(()=>import("./index-BTfJ08JU.js"),[])),"exchange-rate-providers":T.lazy(()=>E(()=>import("./index-W2uZUlFs.js"),[]))};function un(){const m=Be(),{t:h}=K(),{page:r="products",id:l,subpage:i}=Xe(),[_,p]=k.useState(!1),[S,c]=k.useState(!1),{startTransition:w}=We(),f=()=>w(()=>m("/admin/products/exchange-rate-providers?create=1"));if(r.startsWith("prod_"))return e.jsx(tn,{id:r});if(r.startsWith("price_"))return e.jsx(rn,{id:r});if(r.startsWith("prctbl_"))return e.jsx(cn,{id:r});if(r.startsWith("plink_"))return e.jsx(on,{id:r});if(r==="coupons"&&i==="promotion-codes"&&l)return e.jsx(_e,{id:l});if(r==="coupons"&&l&&!i)return e.jsx(ln,{id:l});if(r==="promotion-codes"&&l)return e.jsx(_e,{id:l});const A=fe[r]||fe.products;if(r.startsWith("pv_"))return e.jsx(A,{});const D=[{label:h("admin.products"),value:"products"},{label:h("admin.coupons"),value:"coupons"},{label:h("admin.paymentLinks"),value:"links"},{label:h("admin.pricingTables"),value:"pricing-tables"},{label:h("admin.passports"),value:"passports"},{label:h("admin.vendors"),value:"vendors"},{label:h("admin.exchangeRateProvider.title"),value:"exchange-rate-providers"}];let y=null;return r==="products"?y=e.jsx(nn,{open:_,onClose:()=>p(!1)}):r==="links"?y=e.jsx(sn,{}):r==="pricing-tables"?y=e.jsx(an,{}):r==="coupons"?y=e.jsx(en,{open:S,onClose:()=>c(!1)}):r==="vendors"?y=e.jsx(dn,{open:_,onClose:()=>p(!1)}):r==="exchange-rate-providers"&&(y=e.jsx(J,{variant:"contained",startIcon:e.jsx(N,{}),onClick:f,size:"small",children:h("admin.exchangeRateProvider.create.primaryAction")})),e.jsxs(e.Fragment,{children:[e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"flex-start",justifyContent:"end",flexWrap:"wrap"},children:[e.jsx(Ie,{tabs:D,current:r,onChange:x=>w(()=>m(`/admin/products/${x}`)),scrollButtons:"auto",variant:"scrollable",sx:{flex:"1 0 auto",maxWidth:"100%",".MuiTab-root":{color:"text.lighter"},".MuiTabs-indicator":{display:"none"},".Mui-selected":{fontSize:24,color:"text.primary"},".MuiTabs-hideScrollbar":{border:"none !important"},".MuiTouchRipple-root":{display:"none"}}}),e.jsx(j,{children:y})]}),k.isValidElement(A)?A:e.jsx(A,{})]})}const bn=Object.freeze(Object.defineProperty({__proto__:null,default:un},Symbol.toStringTag,{value:"Module"}));export{Ge as C,Ue as D,Ke as P,bn as i};
|
|
1
|
+
import{V as K,P as Se,aI as we,Y as De,$ as Ee,Z as te,ao as Ie,A as E}from"./vendor-blocklet-B67R14so.js";import{j as e,a3 as q,B as j,a2 as re,aZ as Y,I as ue,ci as Te,r as k,x as J,aQ as se,aT as ie,ad as R,q as I,Y as le,aX as H,cj as U,a7 as xe,ck as Ae,N as Z,c3 as Oe,bH as N,aJ as Ve,w as ze,e as T}from"./vendor-mui-BXZut9Pz.js";import{a as oe,E as je,b7 as me,C as O,Y as ne,X as Q,aX as z,aW as G,N as he,e as pe,f as Re,b8 as de,h as ge,F as ye,k as ve,b9 as ke,S as Le,b as We}from"./index-B4yaPb7B.js";import{I as ae}from"./collapse-CSrlJ0eG.js";import{l as qe}from"./lodash-B4Ozcv0x.js";import{D as Me}from"./drawer-form-CQjNFFWk.js";import{C as ce}from"./currency-select-C8j7QQMP.js";import{u as be,P as Pe}from"./product-select-_72p-5lF.js";import{D as $e,P as Fe,a as He}from"./form-AFzUvoFE.js";import{a as Be,e as Xe}from"./vendor-react-BPknnnEA.js";function Ce({prefix:m="",baseCurrencyFieldName:h="currency_id",currencyOptionsFieldName:r="currency_options",unitAmountFieldName:l="amount_off",objectMode:i=!1,showBaseCurrency:_=!0,disabled:p=!1}){const{t:S}=K(),{settings:c}=oe(),{control:w,setValue:f,watch:A,formState:{errors:D},trigger:y}=je(),x=t=>m?`${m}.${t}`:t,g=me({control:w,name:x(r)}),v=A(x(h)),P=A(x(r)),M=()=>!i||!P||typeof P!="object"?[]:Object.entries(P).map(([t,u])=>({currency_id:t,[l]:u[l]||0})),B=t=>{const u=P||{};f(x(r),{...u,[t]:{[l]:0}},{shouldValidate:!0})},V=t=>{const d={...P||{}};delete d[t],f(x(r),d,{shouldValidate:!0})},$=(t,u)=>{const C={...P||{}},F=C[t];delete C[t],C[u]=F,f(x(r),C,{shouldValidate:!0})},L=i?M():g.fields,a=t=>(t?.split(".")).reduce((d,C)=>d?.[C],D),b=t=>Number(t)<=0?S("admin.price.unit_amount.positive"):!0,s=async t=>{i?V(t):(await g.remove(t),y(x(h)))},n=(t,u)=>{if(i)$(t,u);else{const d=t,C={currency_id:u};g?.fields?.[d]?.currency&&(C.currency=ne(c.paymentMethods,u)),g.update(d,{...g.fields[d],...C})}},o=t=>{i?B(t):g.append({currency_id:t,[l.split(".").pop()||"amount_off"]:0})};return e.jsxs(q,{spacing:2,sx:{width:"100%"},children:[_&&e.jsx(j,{sx:{width:"100%"},children:e.jsx(O,{name:x(l),control:w,rules:{required:S("admin.price.unit_amount.required"),validate:t=>b(t)},disabled:p,render:({field:t})=>e.jsx(re,{...t,type:"number",size:"small",fullWidth:!0,disabled:p,error:!!a(x(l)),helperText:a(x(l))?.message,slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(ce,{mode:"selected",hasSelected:u=>g.fields.some(d=>d.currency_id===u.id)||u.id===v,currencyFilter:u=>u.type!=="credit",onSelect:u=>{const d=g.fields.findIndex(C=>C.currency_id===v);d>-1&&n(d,u),f(x("currency"),ne(c.paymentMethods,u),{shouldValidate:!0}),f(x(h),u,{shouldValidate:!0})},value:v,disabled:p,selectSX:{".MuiOutlinedInput-notchedOutline":{border:"none"}}})})}},onChange:u=>{const{value:d}=u.target;if(t.onChange(d),i){const C=P||{};f(x(r),{...C,[v]:{...C[v]||{},[l]:d}})}else{const C=g.fields.findIndex(F=>F.currency_id===v);if(C===-1)return;f(x(`${r}.${C}.${l.split(".").pop()}`),d,{shouldValidate:!0})}}})})}),L.filter(t=>!_||t.currency_id!==v).length>0&&e.jsx(q,{spacing:1.5,sx:{width:"100%"},children:L.map((t,u)=>{if(_&&t.currency_id===v)return null;const d=x(i?`${r}.${t.currency_id}.${l}`:`${r}.${u}.${l.split(".").pop()}`),C=ne(c.paymentMethods,t.currency_id);return e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"start"},children:[e.jsx(j,{sx:{flex:1},children:e.jsx(O,{name:d,control:w,rules:{required:S("admin.price.unit_amount.required"),validate:F=>b(F)},disabled:p,render:({field:F})=>e.jsx(re,{...F,type:"number",size:"small",fullWidth:!0,sx:{minWidth:"300px"},disabled:p,error:!!a(d),helperText:a(d)?.message,onChange:W=>{const{value:X}=W.target;if(F.onChange(X),i){const ee=P||{};f(x(r),{...ee,[t.currency_id]:{...ee[t.currency_id]||{},[l]:parseFloat(X)||0}},{shouldValidate:!0}),y(d)}},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(ce,{mode:"selected",hasSelected:W=>L.some(X=>X.currency_id===W.id)||_&&W.id===v,currencyFilter:W=>W.type!=="credit",onSelect:W=>{if(i)n(t.currency_id,W);else{const X=g.fields.findIndex(ee=>ee.currency_id===C?.id);X>-1&&n(X,W)}},value:C?.id,disabled:p,selectSX:{".MuiOutlinedInput-notchedOutline":{border:"none"}}})})}}})})}),!p&&e.jsx(ue,{size:"small",disabled:p,onClick:()=>s(i?t.currency_id:u),sx:{mt:.5,ml:-1},children:e.jsx(Te,{color:"error",sx:{opacity:.75}})})]},t.currency_id)})}),!p&&e.jsx(j,{sx:{width:"100%"},children:e.jsx(ce,{mode:"waiting",hasSelected:t=>L.some(u=>u.currency_id===t.id)||_&&t.id===v,currencyFilter:t=>t.type!=="credit",onSelect:o,value:"",width:"100%"})})]})}const Ue={code:"",description:"",active:!0,verification_type:"code",limit_number_redemptions:!1,add_expiration_date:!1,restrictions:{first_time_transaction:!1,require_minimum_amount:!1,currency_options:{}},customer_dids:[],nft_addresses:[],nft_tags:[],trusted_issuers:[],trusted_parents:[],min_balance:1,vc_roles:[],vc_trusted_issuers:[]},Ye=()=>pe.get("/api/customers?limit=1000").then(m=>m.data);function Ke({prefix:m="",showCodeInput:h=!1,showExpandedOptions:r=!0,availableCurrencies:l=[]}){const{t:i}=K(),{control:_,setValue:p,watch:S}=je(),c=a=>m?`${m}.${a}`:a,{data:w}=Se(Ye),f=Q({control:_,name:c("verification_type")}),A=Q({control:_,name:c("limit_number_redemptions")}),D=Q({control:_,name:c("add_expiration_date")}),y=Q({control:_,name:c("restrictions.require_minimum_amount")}),x=Q({control:_,name:c("restrictions.currency_options")}),g=w?.list||[];k.useEffect(()=>{if(y&&x&&typeof x=="object"){const a=Object.entries(x);if(a.length>0){const b=a[0];if(b){const[s,n]=b,o=n.minimum_amount||0;p(c("restrictions.minimum_amount"),o,{shouldValidate:!1}),p(c("restrictions.minimum_amount_currency"),s,{shouldValidate:!1})}}}else y||(p(c("restrictions.minimum_amount"),void 0,{shouldValidate:!1}),p(c("restrictions.minimum_amount_currency"),void 0,{shouldValidate:!1}))},[y,x,p,c]);const v=()=>Math.random().toString(36).substring(2,12).toUpperCase(),P=a=>a.name||a.email||a.did||a.id,M=(a,b)=>{const s=S(c(a))||[];if(b.trim()){const n=[...s,b.trim()];p(c(a),n)}},B=(a,b)=>{const n=(S(c(a))||[]).filter((o,t)=>t!==b);p(c(a),n)},V=(a,b,s)=>{const n=S(c(a))||[];return e.jsxs(j,{sx:{position:"relative"},children:[e.jsx(re,{label:b,placeholder:s,fullWidth:!0,size:"small",onKeyPress:o=>{if(o.key==="Enter"){o.preventDefault();const{value:t}=o.target;M(a,t),o.target.value=""}}}),e.jsx(j,{sx:{position:"absolute",top:8,right:12,fontSize:"0.75rem",color:"text.secondary",pointerEvents:"none",zIndex:1},children:"Press Enter"}),n.length>0&&e.jsx(q,{direction:"row",spacing:1,sx:{mt:1,flexWrap:"wrap"},children:n.map((o,t)=>e.jsx(xe,{label:o,onDelete:()=>B(a,t),size:"small"},o))})]})},$=()=>e.jsxs(j,{children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:2},children:i("admin.coupon.minimumAmountHelp")}),e.jsx(Ce,{prefix:c("restrictions"),baseCurrencyFieldName:"minimum_amount_currency",currencyOptionsFieldName:"currency_options",unitAmountFieldName:"minimum_amount",objectMode:!0,showBaseCurrency:!1})]}),L=()=>{const a=S(c("customer_dids"))||[],b=[];return g.forEach(s=>{(a.includes(s.did)||a.includes(s.id))&&b.push(s)}),a.forEach(s=>{g.some(n=>n.did===s||n.id===s)||b.push(s)}),e.jsx(j,{children:e.jsx(Ae,{multiple:!0,options:g,getOptionLabel:P,value:b,onChange:(s,n)=>{const o=n.map(t=>typeof t=="string"?t:t.did||t.id);p(c("customer_dids"),o)},freeSolo:!0,renderInput:s=>e.jsx(re,{...s,label:i("admin.coupon.customerDids"),placeholder:i("admin.coupon.customerDidsPlaceholder"),size:"small",helperText:i("admin.coupon.customerDidsHelp")}),renderOption:(s,n)=>e.jsxs(j,{component:"li",...s,sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Z,{src:he(n.did,n?.updated_at?new Date(n.updated_at).toISOString():void 0),sx:{width:24,height:24},alt:P(n)}),e.jsx(I,{variant:"body2",children:P(n)})]}),renderTags:(s,n)=>s.map((o,t)=>{const u=typeof o=="object",d=u?P(o):o;return k.createElement(xe,{variant:"outlined",label:d,size:"small",color:u?"primary":"default",avatar:u?e.jsx(Z,{src:he(o.did,o?.updated_at?new Date(o.updated_at).toISOString():void 0),sx:{width:20,height:20},alt:P(o)}):void 0,...n({index:t}),key:u?o.id:o})}),filterOptions:(s,n)=>{const o=s.filter(d=>P(d).toLowerCase().includes(n.inputValue.toLowerCase())),{inputValue:t}=n,u=s.some(d=>P(d)===t);return t!==""&&!u&&t.length>10&&o.push(t),o}})})};return e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:3},children:[h&&e.jsx(j,{sx:{display:"flex",gap:2,alignItems:"flex-end"},children:e.jsx(z,{name:c("code"),label:i("admin.coupon.codeOptional"),placeholder:"FRIENDS20",helperText:i("admin.coupon.codeHelp"),InputProps:{endAdornment:e.jsx(Y,{position:"end",children:e.jsx(J,{size:"small",onClick:()=>{p(c("code"),v())},children:i("admin.coupon.generate")})})}})}),e.jsx(z,{name:c("description"),label:i("admin.coupon.desc"),placeholder:i("admin.coupon.desc"),multiline:!0,minRows:2,maxRows:4,slotProps:{htmlInput:{maxLength:250}}}),e.jsxs(se,{component:"fieldset",fullWidth:!0,children:[e.jsx(G,{component:"legend",sx:{mb:1,fontSize:"0.875rem",fontWeight:500},children:i("admin.coupon.verificationType")}),e.jsx(O,{name:c("verification_type"),control:_,render:({field:a})=>e.jsxs(ie,{...a,size:"small",displayEmpty:!0,children:[e.jsx(R,{value:"code",children:i("admin.coupon.codeOnly")}),e.jsx(R,{value:"nft",disabled:!0,children:i("admin.coupon.nftVerification")}),e.jsx(R,{value:"vc",disabled:!0,children:i("admin.coupon.vcVerification")}),e.jsx(R,{value:"user_restricted",children:i("admin.coupon.userWhitelist")})]})})]}),f==="nft"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.nftSettings")}),V("nft_addresses",i("admin.coupon.nftAddresses"),i("admin.coupon.nftAddressesPlaceholder")),V("nft_tags",i("admin.coupon.nftTags"),i("admin.coupon.nftTagsPlaceholder")),V("trusted_issuers",i("admin.coupon.trustedIssuers"),i("admin.coupon.trustedIssuersPlaceholder")),V("trusted_parents",i("admin.coupon.trustedParents"),i("admin.coupon.trustedParentsPlaceholder")),e.jsx(z,{name:c("min_balance"),label:i("admin.coupon.minBalance"),type:"number",rules:{min:1}})]}),f==="vc"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.vcSettings")}),V("vc_roles",i("admin.coupon.requiredRoles"),i("admin.coupon.requiredRolesPlaceholder")),V("vc_trusted_issuers",i("admin.coupon.trustedVcIssuers"),i("admin.coupon.trustedVcIssuersPlaceholder"))]}),f==="user_restricted"&&e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(I,{variant:"h6",children:i("admin.coupon.userWhitelistSettings")}),L()]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(le,{}),e.jsxs(j,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(O,{name:c("restrictions.first_time_transaction"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value||!1}),label:i("admin.coupon.eligibleFirstTime"),sx:{alignItems:"flex-start"}})}),e.jsx(O,{name:c("limit_number_redemptions"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value}),label:i("admin.coupon.limitNumberRedemptions"),sx:{alignItems:"flex-start"}})}),A&&e.jsx(z,{name:c("max_redemptions"),label:i("admin.coupon.maxRedemptions"),type:"number",slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:i("admin.coupon.times")})}}}),e.jsx(O,{name:c("add_expiration_date"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value}),label:i("admin.coupon.addExpirationDate"),sx:{alignItems:"flex-start"}})}),D&&e.jsx(z,{name:c("expires_at"),label:i("admin.coupon.expiresAt"),type:"datetime-local",InputLabelProps:{shrink:!0}}),e.jsx(O,{name:c("restrictions.require_minimum_amount"),control:_,render:({field:a})=>e.jsx(H,{control:e.jsx(U,{...a,checked:a.value||!1,onChange:b=>{if(a.onChange(b.target.checked),b.target.checked){const s=l[0];s&&p(c("restrictions.currency_options"),{[s.id]:{minimum_amount:0}},{shouldValidate:!0})}else p(c("restrictions.currency_options"),{},{shouldValidate:!0})}}),label:i("admin.coupon.requireMinimumOrder"),sx:{alignItems:"flex-start"}})}),y&&$()]})]})]})}const Ze=(m,h)=>(m.prices=m.prices.filter(r=>{const l=r.active,i=!h(r);return l&&i}),m),Je=(m,h)=>we(m).map(l=>Ze(l,h)).filter(l=>l.prices.length);function Qe({value:m=[],onChange:h,disabled:r=!1}){const{t:l}=K(),{products:i}=be(),{settings:_}=oe(),[p,S]=k.useState(null),[c,w]=k.useState(null),[f,A]=k.useState(!1),[D,y]=k.useState(!1),x=(i||[]).filter(s=>m.includes(s.id)),g=(i||[]).filter(s=>!m.includes(s.id)),v=s=>{if(!s.prices||s.prices.length===0)return null;if(s.prices.length===1){const n=s.prices[0];if(n){const o=ne(_.paymentMethods,n.currency_id??"")||_.baseCurrency;return Re(n,o)}}return l("admin.price.count",{count:s.prices.length})},P=s=>{if(s==="add"){de("product.create.request");return}if(s&&!m.includes(s)){const n=[...m,s];h(n),A(!1),y(!1)}},M=s=>{const n=m.filter(o=>o!==s);h(n),S(null),w(null)},B=(s,n)=>{S(s.currentTarget),w(n)},V=()=>{S(null),w(null)},$=()=>{A(!0),y(!0)},L=()=>{y(!1)},a=()=>{y(!0)},b=()=>{const s=Je(i,()=>!1);return s.length===0?[]:s.map(n=>e.jsx(R,{value:n.id,disabled:m.includes(n.id),children:e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"center",width:"100%"},children:[n.images[0]?e.jsx(Z,{src:n.images[0],alt:n.name,variant:"square",sx:{width:24,height:24}}):e.jsx(Z,{variant:"square",sx:{width:24,height:24,fontSize:"0.75rem"},children:n.name.slice(0,1)}),e.jsx(j,{sx:{flex:1,minWidth:0},children:e.jsx(I,{variant:"body2",noWrap:!0,children:n.name})}),e.jsx(I,{variant:"body2",sx:{color:"text.secondary",ml:"auto",flexShrink:0},children:m.includes(n.id)?"Added":v(n)})]})},`product-${n.id}`))};return e.jsxs(q,{spacing:2,children:[x.map(s=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:2,p:2,border:"1px solid",borderColor:"divider",borderRadius:1,backgroundColor:"background.paper"},children:[s.images[0]?e.jsx(Z,{src:s.images[0],alt:s.name,variant:"square",sx:{width:40,height:40}}):e.jsx(Z,{variant:"square",sx:{width:40,height:40,fontSize:"1rem"},children:s.name.slice(0,1)}),e.jsxs(j,{sx:{flex:1,minWidth:0},children:[e.jsx(I,{variant:"body1",noWrap:!0,sx:{fontWeight:"medium"},children:s.name}),v(s)&&e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:v(s)})]}),e.jsx(ue,{size:"small",disabled:r,onClick:n=>B(n,s.id),sx:{color:"text.secondary"},children:e.jsx(Oe,{})})]},s.id)),!r&&g.length>0&&(m.length===0||f)&&e.jsx(se,{fullWidth:!0,size:"small",children:e.jsxs(ie,{value:"",open:D,onClose:L,onOpen:a,displayEmpty:!0,onChange:s=>P(s.target.value),renderValue:s=>s||e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:l("admin.product.find")}),MenuProps:{style:{maxHeight:480}},children:[e.jsx(R,{value:"add",children:e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(N,{fontSize:"small",color:"primary"}),e.jsx(I,{variant:"body2",sx:{color:"primary.main",fontWeight:"medium"},children:l("admin.product.add")})]})}),b()]})}),!r&&g.length>0&&m.length>0&&!f&&e.jsx(I,{variant:"body2",component:"button",onClick:$,sx:{color:"primary.main",textDecoration:"none",cursor:"pointer",border:"none",background:"none",p:0,textAlign:"left",fontWeight:"normal","&:hover":{textDecoration:"underline"}},children:l("admin.coupon.addProduct")}),e.jsx(Ve,{anchorEl:p,open:!!p,onClose:V,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx(R,{onClick:()=>c&&M(c),children:l("admin.product.remove")})})]})}function Ge({simple:m=!0,onSave:h,onCancel:r}){const{t:l}=K(),{settings:i}=oe(),[_,p]=De({loading:!1}),S=ge({mode:"onChange",defaultValues:{type:"service",name:"",description:"",images:[],statement_descriptor:"",unit_label:"",features:[],prices:[{...$e,currency_id:i.baseCurrency.id}],metadata:[]}}),{control:c,handleSubmit:w,reset:f,formState:{errors:A}}=S,D=me({control:c,name:"prices"}),y=g=>(p({loading:!0}),pe.post("/api/products",g).then(()=>{te.success(l("admin.product.saved"))}).catch(v=>{console.error(v),te.error(ve(v))}).finally(()=>{p({loading:!1})})),x=()=>{Object.keys(A).length>0||w(async g=>{await y(g),await f(),await h(null)})()};return e.jsx(Ee,{open:!0,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"md",onClose:()=>r(null),showCloseButton:!1,title:l("admin.product.add"),actions:e.jsxs(q,{direction:"row",children:[e.jsx(J,{size:"small",sx:{mr:2},onClick:r,children:l("common.cancel")}),e.jsxs(J,{variant:"contained",color:"primary",size:"small",disabled:_.loading,onClick:x,children:[_.loading&&e.jsx(ze,{size:"small"})," ",l("common.save")]})]}),children:e.jsx(ye,{...S,children:e.jsxs(Pe,{children:[e.jsx(Fe,{simple:m}),D.fields.map((g,v)=>e.jsx(He,{prefix:`prices.${v}`,simple:m},g.id))]})})})}function Ne({onClose:m=()=>{},onSubmit:h=()=>{}}){const{t:r}=K(),{settings:l}=oe(),{refresh:i}=be(),[_,p]=k.useState("configuration"),[S,c]=k.useState(!1),w=ge({mode:"onChange",defaultValues:{name:"",description:"",id:"",type:"percentage",percent_off:10,amount_off:"0",currency_id:l.baseCurrency.id,currency_options:[],duration:"once",duration_in_months:void 0,applies_to_products:!1,product_ids:[],limit_date_range:!1,redeem_by:"",limit_total_number:!1,max_redemptions:void 0,use_customer_facing_codes:!1,promotion_codes:[]}}),{control:f,handleSubmit:A,watch:D,formState:{errors:y}}=w,x=me({control:f,name:"promotion_codes"});ke(n=>n.type==="product.create.request",()=>{c(!0)});const g=()=>{c(!1),i()},v=D("type"),P=D("duration"),M=D("use_customer_facing_codes"),B=D("limit_date_range"),V=D("limit_total_number"),$=D("currency_id"),L=D("currency_options")||[],a=()=>{const n=l.paymentMethods?.flatMap(o=>o.payment_currencies)||[];if(v==="fixed_amount"){const o=new Set;return $&&o.add($),L.forEach(t=>{t.currency_id&&o.add(t.currency_id)}),n.filter(t=>o.has(t.id))}return n},s=A(n=>{const o={name:n.name,duration:n.duration,metadata:{}};n.id&&(o.id=n.id),n.description&&(o.description=n.description),n.type==="percentage"?o.percent_off=n.percent_off:(o.amount_off=n.amount_off,o.currency_id=n.currency_id,n.currency_options&&n.currency_options.length>0&&(o.currency_options={},n.currency_options.forEach(t=>{t.currency_id&&t.amount_off&&(o.currency_options[t.currency_id]={amount_off:parseFloat(t.amount_off)||0})}))),n.duration==="repeating"&&(o.duration_in_months=n.duration_in_months||1),n.limit_total_number&&n.max_redemptions&&(o.max_redemptions=n.max_redemptions),n.limit_date_range&&n.redeem_by&&(o.redeem_by=Math.floor(new Date(n.redeem_by).getTime()/1e3)),n.applies_to_products&&n.product_ids&&n.product_ids.length>0&&(o.applies_to={products:n.product_ids}),n.use_customer_facing_codes&&n.promotion_codes.length>0&&(o.promotion_codes=n.promotion_codes.map(t=>{const u={active:t.active,verification_type:t.verification_type,max_redemptions:t.limit_number_redemptions?t.max_redemptions:void 0,expires_at:t.expires_at?Math.floor(new Date(t.expires_at).getTime()/1e3):void 0,restrictions:{},metadata:{}};return t.description&&(u.description=t.description),t.restrictions&&(u.restrictions=t.restrictions),t.code&&t.code.trim()&&(u.code=t.code),t.verification_type==="nft"?u.nft_config={addresses:t.nft_addresses?.filter(d=>d.trim())||[],tags:t.nft_tags?.filter(d=>d.trim())||[],trusted_issuers:t.trusted_issuers?.filter(d=>d.trim())||[],trusted_parents:t.trusted_parents?.filter(d=>d.trim())||[],min_balance:t.min_balance||1}:t.verification_type==="vc"?u.vc_config={roles:t.vc_roles?.filter(d=>d.trim())||[],trusted_issuers:t.vc_trusted_issuers?.filter(d=>d.trim())||[]}:t.verification_type==="user_restricted"&&(u.customer_dids=t.customer_dids?.filter(d=>d.trim())||[]),u})),pe.post("/api/coupons",o).then(()=>{te.success(r("admin.coupon.saved")),de("coupon.created"),w.reset(),de("drawer.submitted"),h&&h(),m&&m()}).catch(t=>{console.error(t),te.error(ve(t))})});return e.jsxs(e.Fragment,{children:[e.jsx(ye,{...w,children:e.jsxs(j,{component:"form",id:"coupon-form",onSubmit:s,children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:3},children:r("admin.coupon.description")}),e.jsx(ae,{expanded:_==="configuration",value:"configuration",card:!0,onChange:(n,o)=>{o&&p("configuration")},trigger:r("admin.coupon.couponConfiguration"),children:e.jsxs(j,{sx:{p:2,display:"flex",flexDirection:"column",gap:2},children:[e.jsx(z,{name:"name",label:r("admin.coupon.name"),required:!0,placeholder:"First purchase discount",helperText:y?.name?.message||r("admin.coupon.nameHelp"),rules:{required:r("common.required")}}),e.jsx(z,{name:"description",label:r("admin.coupon.desc"),placeholder:r("admin.coupon.desc"),multiline:!0,minRows:2,maxRows:4,slotProps:{htmlInput:{maxLength:500}}}),e.jsx(z,{name:"id",label:r("admin.coupon.idOptional"),helperText:r("admin.coupon.idHelp")}),e.jsxs(j,{children:[e.jsx(G,{required:!0,children:r("admin.coupon.type")}),e.jsx(O,{name:"type",control:f,render:({field:n})=>e.jsx(se,{fullWidth:!0,size:"small",children:e.jsxs(ie,{...n,children:[e.jsx(R,{value:"percentage",children:r("admin.coupon.percentageOff")}),e.jsx(R,{value:"fixed_amount",children:r("admin.coupon.fixedAmountOff")})]})})})]}),v==="percentage"?e.jsx(z,{name:"percent_off",label:r("admin.coupon.percentageDiscount"),type:"number",required:!0,rules:{min:0,max:100,validate:n=>!n&&n!==0?r("common.required"):Number(n)<=0||Number(n)>100?r("common.invalid"):!0},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:"%"})},htmlInput:{min:0,max:100,precision:2}}}):e.jsxs(j,{children:[e.jsx(G,{required:!0,children:r("admin.coupon.fixedAmount")}),e.jsx(Ce,{baseCurrencyFieldName:"currency_id",currencyOptionsFieldName:"currency_options",unitAmountFieldName:"amount_off"})]}),e.jsx(j,{sx:{pl:2},children:e.jsx(O,{name:"applies_to_products",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(Le,{...n,checked:n.value}),label:r("admin.coupon.applyToProducts"),slotProps:{typography:{sx:{marginLeft:"8px"}}}})})}),D("applies_to_products")&&e.jsxs(j,{children:[e.jsx(G,{children:r("admin.coupon.selectProducts")}),e.jsx(O,{name:"product_ids",control:f,render:({field:n})=>e.jsx(Qe,{value:n.value||[],onChange:n.onChange})})]}),e.jsxs(j,{children:[e.jsx(O,{name:"duration",control:f,render:({field:n})=>e.jsxs(se,{fullWidth:!0,size:"small",children:[e.jsx(G,{required:!0,children:r("admin.coupon.duration")}),e.jsxs(ie,{...n,children:[e.jsx(R,{value:"once",children:r("admin.coupon.once")}),e.jsx(R,{value:"forever",children:r("admin.coupon.forever")}),e.jsx(R,{value:"repeating",children:r("admin.coupon.repeating")})]})]})}),e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("admin.coupon.durationHelp")})]}),P==="repeating"&&e.jsx(z,{name:"duration_in_months",label:r("admin.coupon.durationInMonths"),type:"number",rules:{required:"Duration in months is required",min:1},slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:r("admin.coupon.months")})}}}),e.jsx(le,{}),e.jsx(I,{variant:"h6",children:r("admin.coupon.redemptionLimits")}),e.jsx(O,{name:"limit_date_range",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.limitDateRange")})}),B&&e.jsx(z,{name:"redeem_by",label:"",type:"datetime-local",InputLabelProps:{shrink:!0}}),e.jsx(O,{name:"limit_total_number",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.limitTotalNumber")})}),V&&e.jsx(z,{name:"max_redemptions",label:r("admin.coupon.maxRedemptions"),type:"number",slotProps:{input:{endAdornment:e.jsx(Y,{position:"end",children:r("admin.coupon.times")})}}})]})}),e.jsx(ae,{expanded:_==="codes",value:"codes",card:!0,onChange:(n,o)=>{o&&p("codes")},trigger:r("admin.coupon.promotionCodes"),style:{marginTop:2},children:e.jsxs(j,{sx:{p:2,display:"flex",flexDirection:"column",gap:3},children:[e.jsx(O,{name:"use_customer_facing_codes",control:f,render:({field:n})=>e.jsx(H,{control:e.jsx(U,{...n,checked:n.value}),label:r("admin.coupon.useCustomerFacingCodes")})}),M&&e.jsxs(j,{children:[e.jsx(I,{variant:"body2",sx:{color:"text.secondary",mb:2},children:r("admin.coupon.codeHelp")}),x.fields.map((n,o)=>e.jsxs(k.Fragment,{children:[e.jsx(ae,{expanded:!0,style:{fontWeight:"bold",width:"100%"},addons:e.jsx(ue,{size:"small",onClick:()=>x.remove(o),color:"error",children:e.jsx(N,{style:{transform:"rotate(45deg)"}})}),trigger:`${r("admin.coupon.promotionCodes")} ${o+1}: ${w.watch(`promotion_codes.${o}.code`)||r("admin.coupon.newCode")}`,children:e.jsx(j,{sx:{width:"100%",p:1},children:e.jsx(Ke,{prefix:`promotion_codes.${o}`,showCodeInput:!0,showExpandedOptions:!0,availableCurrencies:a()})})}),e.jsx(le,{sx:{mt:2,mb:2}})]},n.id)),e.jsxs(J,{variant:"outlined",color:"primary",sx:{color:"text.primary",width:"100%"},onClick:()=>{const n=qe.cloneDeep(Ue);x.append(n)},children:[e.jsx(N,{fontSize:"small"})," ",r("admin.coupon.addAnotherCode")]})]}),!M&&e.jsx(I,{variant:"body2",sx:{color:"text.secondary"},children:r("admin.coupon.promotionCodesHelp")})]})})]})}),S&&e.jsx(Ge,{onCancel:()=>c(!1),onSave:g})]})}function en({open:m=!1,onClose:h=()=>{},onSubmit:r=()=>{}}){const{t:l}=K();return e.jsx(Me,{icon:e.jsx(N,{}),text:l("admin.coupon.create"),open:m,onClose:h,width:640,addons:e.jsx(J,{variant:"contained",size:"small",form:"coupon-form",type:"submit",children:l("admin.coupon.create")}),children:e.jsx(Pe,{children:e.jsx(Ne,{onClose:h,onSubmit:r})})})}const nn=T.lazy(()=>E(()=>import("./create-B-Ubepl_.js"),[])),tn=T.lazy(()=>E(()=>import("./detail-DqfxOHky.js"),[])),rn=T.lazy(()=>E(()=>import("./detail-D729Bgs6.js"),[])),sn=T.lazy(()=>E(()=>import("./create-IaalYGmm.js"),[])),on=T.lazy(()=>E(()=>import("./detail-WAmPM6yq.js"),[])),an=T.lazy(()=>E(()=>import("./create-BVt_sQ_7.js"),[])),cn=T.lazy(()=>E(()=>import("./detail-BvcI9cB_.js"),[])),ln=T.lazy(()=>E(()=>import("./detail-CHJqYZ0W.js"),[])),_e=T.lazy(()=>E(()=>import("./detail-BJEqTXDS.js"),[])),dn=T.lazy(()=>E(()=>import("./create-jzl1m8ZK.js"),[])),fe={products:T.lazy(()=>E(()=>import("./index-DAen2-cr.js"),[])),coupons:T.lazy(()=>E(()=>import("./index-B4n6PvPu.js"),[])),links:T.lazy(()=>E(()=>import("./index-C-5n472s.js"),[])),"pricing-tables":T.lazy(()=>E(()=>import("./index-BjKRyxNQ.js"),[])),passports:T.lazy(()=>E(()=>import("./index-D7pWd60Z.js"),[])),vendors:T.lazy(()=>E(()=>import("./index-BRmN8ViQ.js"),[])),"exchange-rate-providers":T.lazy(()=>E(()=>import("./index-olGOY5KB.js"),[]))};function un(){const m=Be(),{t:h}=K(),{page:r="products",id:l,subpage:i}=Xe(),[_,p]=k.useState(!1),[S,c]=k.useState(!1),{startTransition:w}=We(),f=()=>w(()=>m("/admin/products/exchange-rate-providers?create=1"));if(r.startsWith("prod_"))return e.jsx(tn,{id:r});if(r.startsWith("price_"))return e.jsx(rn,{id:r});if(r.startsWith("prctbl_"))return e.jsx(cn,{id:r});if(r.startsWith("plink_"))return e.jsx(on,{id:r});if(r==="coupons"&&i==="promotion-codes"&&l)return e.jsx(_e,{id:l});if(r==="coupons"&&l&&!i)return e.jsx(ln,{id:l});if(r==="promotion-codes"&&l)return e.jsx(_e,{id:l});const A=fe[r]||fe.products;if(r.startsWith("pv_"))return e.jsx(A,{});const D=[{label:h("admin.products"),value:"products"},{label:h("admin.coupons"),value:"coupons"},{label:h("admin.paymentLinks"),value:"links"},{label:h("admin.pricingTables"),value:"pricing-tables"},{label:h("admin.passports"),value:"passports"},{label:h("admin.vendors"),value:"vendors"},{label:h("admin.exchangeRateProvider.title"),value:"exchange-rate-providers"}];let y=null;return r==="products"?y=e.jsx(nn,{open:_,onClose:()=>p(!1)}):r==="links"?y=e.jsx(sn,{}):r==="pricing-tables"?y=e.jsx(an,{}):r==="coupons"?y=e.jsx(en,{open:S,onClose:()=>c(!1)}):r==="vendors"?y=e.jsx(dn,{open:_,onClose:()=>p(!1)}):r==="exchange-rate-providers"&&(y=e.jsx(J,{variant:"contained",startIcon:e.jsx(N,{}),onClick:f,size:"small",children:h("admin.exchangeRateProvider.create.primaryAction")})),e.jsxs(e.Fragment,{children:[e.jsxs(q,{direction:"row",spacing:1,sx:{alignItems:"flex-start",justifyContent:"end",flexWrap:"wrap"},children:[e.jsx(Ie,{tabs:D,current:r,onChange:x=>w(()=>m(`/admin/products/${x}`)),scrollButtons:"auto",variant:"scrollable",sx:{flex:"1 0 auto",maxWidth:"100%",".MuiTab-root":{color:"text.lighter"},".MuiTabs-indicator":{display:"none"},".Mui-selected":{fontSize:24,color:"text.primary"},".MuiTabs-hideScrollbar":{border:"none !important"},".MuiTouchRipple-root":{display:"none"}}}),e.jsx(j,{children:y})]}),k.isValidElement(A)?A:e.jsx(A,{})]})}const bn=Object.freeze(Object.defineProperty({__proto__:null,default:un},Symbol.toStringTag,{value:"Module"}));export{Ge as C,Ue as D,Ke as P,bn as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as p,ao as m,A as e}from"./vendor-blocklet-
|
|
1
|
+
import{V as p,ao as m,A as e}from"./vendor-blocklet-B67R14so.js";import{j as a,r as c,e as o}from"./vendor-mui-BXZut9Pz.js";import{b as y}from"./index-B4yaPb7B.js";import{a as x,e as E}from"./vendor-react-BPknnnEA.js";const T=o.lazy(()=>e(()=>import("./detail-BkRkrKyw.js"),[])),f=o.lazy(()=>e(()=>import("./detail-DQj1mbhA.js"),[])),v=o.lazy(()=>e(()=>import("./detail-CfvKZ7IV.js"),[])),s={intents:o.lazy(()=>e(()=>import("./index-CDyxbCzc.js"),[])),refunds:o.lazy(()=>e(()=>import("./index-BMcnd_jZ.js"),[])),payouts:o.lazy(()=>e(()=>import("./index-BkNCPnTn.js"),[]))};function D(){const r=x(),{t:n}=p(),{page:t="intents"}=E(),{startTransition:l}=y();if(t.startsWith("pi_"))return a.jsx(T,{id:t});if(t.startsWith("po_"))return a.jsx(v,{id:t});if(t.startsWith("re_"))return a.jsx(f,{id:t});const u=d=>{l(()=>{r(`/admin/payments/${d}`)})},i=s[t]||s.intents,_=[{label:n("admin.paymentIntent.list"),value:"intents"},{label:n("admin.refunds"),value:"refunds"},{label:n("admin.payouts"),value:"payouts"}];return a.jsxs("div",{children:[a.jsx(m,{tabs:_,current:t,onChange:u,scrollButtons:"auto",variant:"scrollable",sx:{".MuiTab-root":{color:"text.lighter"},".MuiTabs-indicator":{display:"none"},".Mui-selected":{fontSize:24,color:"text.primary"},".MuiTabs-hideScrollbar":{border:"none !important"},".MuiTouchRipple-root":{display:"none"}}}),c.isValidElement(i)?i:a.jsx(i,{})]})}export{D as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cu as Ba}from"./vendor-blocklet-DcLR2Cyf.js";import{g as rl}from"./vendor-mui-BXZut9Pz.js";import"./vendor-react-BPknnnEA.js";var ln={},hn={},cr,vn;function Q(){if(vn)return cr;vn=1;var n=function(e){return e&&e.Math===Math&&e};return cr=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof globalThis=="object"&&globalThis)||n(typeof cr=="object"&&cr)||(function(){return this})()||Function("return this")(),cr}var Zr={},Jr,cn;function Z(){return cn||(cn=1,Jr=function(n){try{return!!n()}catch{return!0}}),Jr}var et,fn;function we(){if(fn)return et;fn=1;var n=Z();return et=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),et}var rt,gn;function Ar(){if(gn)return rt;gn=1;var n=Z();return rt=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),rt}var tt,dn;function se(){if(dn)return tt;dn=1;var n=Ar(),e=Function.prototype.call;return tt=n?e.bind(e):function(){return e.apply(e,arguments)},tt}var it={},pn;function Hl(){if(pn)return it;pn=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!n.call({1:2},1);return it.f=r?function(i){var a=e(this,i);return!!a&&a.enumerable}:n,it}var at,yn;function Fa(){return yn||(yn=1,at=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),at}var nt,mn;function J(){if(mn)return nt;mn=1;var n=Ar(),e=Function.prototype,r=e.call,t=n&&e.bind.bind(r,r);return nt=n?t:function(i){return function(){return r.apply(i,arguments)}},nt}var st,bn;function er(){if(bn)return st;bn=1;var n=J(),e=n({}.toString),r=n("".slice);return st=function(t){return r(e(t),8,-1)},st}var ot,xn;function tl(){if(xn)return ot;xn=1;var n=J(),e=Z(),r=er(),t=Object,i=n("".split);return ot=e(function(){return!t("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):t(a)}:t,ot}var ut,On;function Ir(){return On||(On=1,ut=function(n){return n==null}),ut}var lt,Tn;function Pe(){if(Tn)return lt;Tn=1;var n=Ir(),e=TypeError;return lt=function(r){if(n(r))throw new e("Can't call method on "+r);return r},lt}var ht,Sn;function dr(){if(Sn)return ht;Sn=1;var n=tl(),e=Pe();return ht=function(r){return n(e(r))},ht}var vt,En;function re(){if(En)return vt;En=1;var n=typeof document=="object"&&document.all;return vt=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},vt}var ct,Rn;function ye(){if(Rn)return ct;Rn=1;var n=re();return ct=function(e){return typeof e=="object"?e!==null:n(e)},ct}var ft,Cn;function rr(){if(Cn)return ft;Cn=1;var n=Q(),e=re(),r=function(t){return e(t)?t:void 0};return ft=function(t,i){return arguments.length<2?r(n[t]):n[t]&&n[t][i]},ft}var gt,wn;function Nr(){if(wn)return gt;wn=1;var n=J();return gt=n({}.isPrototypeOf),gt}var dt,Pn;function pr(){if(Pn)return dt;Pn=1;var n=Q(),e=n.navigator,r=e&&e.userAgent;return dt=r?String(r):"",dt}var pt,An;function Ua(){if(An)return pt;An=1;var n=Q(),e=pr(),r=n.process,t=n.Deno,i=r&&r.versions||t&&t.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),pt=o,pt}var yt,In;function il(){if(In)return yt;In=1;var n=Ua(),e=Z(),r=Q(),t=r.String;return yt=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!t(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),yt}var mt,Nn;function al(){if(Nn)return mt;Nn=1;var n=il();return mt=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mt}var bt,_n;function nl(){if(_n)return bt;_n=1;var n=rr(),e=re(),r=Nr(),t=al(),i=Object;return bt=t?function(a){return typeof a=="symbol"}:function(a){var s=n("Symbol");return e(s)&&r(s.prototype,i(a))},bt}var xt,Mn;function _r(){if(Mn)return xt;Mn=1;var n=String;return xt=function(e){try{return n(e)}catch{return"Object"}},xt}var Ot,qn;function Fe(){if(qn)return Ot;qn=1;var n=re(),e=_r(),r=TypeError;return Ot=function(t){if(n(t))return t;throw new r(e(t)+" is not a function")},Ot}var Tt,Dn;function nr(){if(Dn)return Tt;Dn=1;var n=Fe(),e=Ir();return Tt=function(r,t){var i=r[t];return e(i)?void 0:n(i)},Tt}var St,Vn;function Wl(){if(Vn)return St;Vn=1;var n=se(),e=re(),r=ye(),t=TypeError;return St=function(i,a){var s,o;if(a==="string"&&e(s=i.toString)&&!r(o=n(s,i))||e(s=i.valueOf)&&!r(o=n(s,i))||a!=="string"&&e(s=i.toString)&&!r(o=n(s,i)))return o;throw new t("Can't convert object to primitive value")},St}var Et={exports:{}},Rt,Ln;function Me(){return Ln||(Ln=1,Rt=!1),Rt}var Ct,kn;function Ga(){if(kn)return Ct;kn=1;var n=Q(),e=Object.defineProperty;return Ct=function(r,t){try{e(n,r,{value:t,configurable:!0,writable:!0})}catch{n[r]=t}return t},Ct}var jn;function $a(){if(jn)return Et.exports;jn=1;var n=Me(),e=Q(),r=Ga(),t="__core-js_shared__",i=Et.exports=e[t]||r(t,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Et.exports}var wt,Bn;function za(){if(Bn)return wt;Bn=1;var n=$a();return wt=function(e,r){return n[e]||(n[e]=r||{})},wt}var Pt,Fn;function Mr(){if(Fn)return Pt;Fn=1;var n=Pe(),e=Object;return Pt=function(r){return e(n(r))},Pt}var At,Un;function Ae(){if(Un)return At;Un=1;var n=J(),e=Mr(),r=n({}.hasOwnProperty);return At=Object.hasOwn||function(i,a){return r(e(i),a)},At}var It,Gn;function sl(){if(Gn)return It;Gn=1;var n=J(),e=0,r=Math.random(),t=n(1.1.toString);return It=function(i){return"Symbol("+(i===void 0?"":i)+")_"+t(++e+r,36)},It}var Nt,$n;function ne(){if($n)return Nt;$n=1;var n=Q(),e=za(),r=Ae(),t=sl(),i=il(),a=al(),s=n.Symbol,o=e("wks"),u=a?s.for||s:s&&s.withoutSetter||t;return Nt=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Nt}var _t,zn;function Yl(){if(zn)return _t;zn=1;var n=se(),e=ye(),r=nl(),t=nr(),i=Wl(),a=ne(),s=TypeError,o=a("toPrimitive");return _t=function(u,l){if(!e(u)||r(u))return u;var h=t(u,o),c;if(h){if(l===void 0&&(l="default"),c=n(h,u,l),!e(c)||r(c))return c;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},_t}var Mt,Hn;function ol(){if(Hn)return Mt;Hn=1;var n=Yl(),e=nl();return Mt=function(r){var t=n(r,"string");return e(t)?t:t+""},Mt}var qt,Wn;function qr(){if(Wn)return qt;Wn=1;var n=Q(),e=ye(),r=n.document,t=e(r)&&e(r.createElement);return qt=function(i){return t?r.createElement(i):{}},qt}var Dt,Yn;function ul(){if(Yn)return Dt;Yn=1;var n=we(),e=Z(),r=qr();return Dt=!n&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Dt}var Xn;function Dr(){if(Xn)return Zr;Xn=1;var n=we(),e=se(),r=Hl(),t=Fa(),i=dr(),a=ol(),s=Ae(),o=ul(),u=Object.getOwnPropertyDescriptor;return Zr.f=n?u:function(h,c){if(h=i(h),c=a(c),o)try{return u(h,c)}catch{}if(s(h,c))return t(!e(r.f,h,c),h[c])},Zr}var Vt={},Lt,Kn;function ll(){if(Kn)return Lt;Kn=1;var n=we(),e=Z();return Lt=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Lt}var kt,Qn;function he(){if(Qn)return kt;Qn=1;var n=ye(),e=String,r=TypeError;return kt=function(t){if(n(t))return t;throw new r(e(t)+" is not an object")},kt}var Zn;function Ye(){if(Zn)return Vt;Zn=1;var n=we(),e=ul(),r=ll(),t=he(),i=ol(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",h="writable";return Vt.f=n?r?function(f,v,g){if(t(f),v=i(v),t(g),typeof f=="function"&&v==="prototype"&&"value"in g&&h in g&&!g[h]){var d=o(f,v);d&&d[h]&&(f[v]=g.value,g={configurable:l in g?g[l]:d[l],enumerable:u in g?g[u]:d[u],writable:!1})}return s(f,v,g)}:s:function(f,v,g){if(t(f),v=i(v),t(g),e)try{return s(f,v,g)}catch{}if("get"in g||"set"in g)throw new a("Accessors not supported");return"value"in g&&(f[v]=g.value),f},Vt}var jt,Jn;function yr(){if(Jn)return jt;Jn=1;var n=we(),e=Ye(),r=Fa();return jt=n?function(t,i,a){return e.f(t,i,r(1,a))}:function(t,i,a){return t[i]=a,t},jt}var Bt={exports:{}},Ft,es;function Vr(){if(es)return Ft;es=1;var n=we(),e=Ae(),r=Function.prototype,t=n&&Object.getOwnPropertyDescriptor,i=e(r,"name"),a=i&&(function(){}).name==="something",s=i&&(!n||n&&t(r,"name").configurable);return Ft={EXISTS:i,PROPER:a,CONFIGURABLE:s},Ft}var Ut,rs;function Ha(){if(rs)return Ut;rs=1;var n=J(),e=re(),r=$a(),t=n(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(i){return t(i)}),Ut=r.inspectSource,Ut}var Gt,ts;function Xl(){if(ts)return Gt;ts=1;var n=Q(),e=re(),r=n.WeakMap;return Gt=e(r)&&/native code/.test(String(r)),Gt}var $t,is;function Wa(){if(is)return $t;is=1;var n=za(),e=sl(),r=n("keys");return $t=function(t){return r[t]||(r[t]=e(t))},$t}var zt,as;function Ya(){return as||(as=1,zt={}),zt}var Ht,ns;function Lr(){if(ns)return Ht;ns=1;var n=Xl(),e=Q(),r=ye(),t=yr(),i=Ae(),a=$a(),s=Wa(),o=Ya(),u="Object already initialized",l=e.TypeError,h=e.WeakMap,c,f,v,g=function(m){return v(m)?f(m):c(m,{})},d=function(m){return function(b){var x;if(!r(b)||(x=f(b)).type!==m)throw new l("Incompatible receiver, "+m+" required");return x}};if(n||a.state){var p=a.state||(a.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,c=function(m,b){if(p.has(m))throw new l(u);return b.facade=m,p.set(m,b),b},f=function(m){return p.get(m)||{}},v=function(m){return p.has(m)}}else{var y=s("state");o[y]=!0,c=function(m,b){if(i(m,y))throw new l(u);return b.facade=m,t(m,y,b),b},f=function(m){return i(m,y)?m[y]:{}},v=function(m){return i(m,y)}}return Ht={set:c,get:f,has:v,enforce:g,getterFor:d},Ht}var ss;function hl(){if(ss)return Bt.exports;ss=1;var n=J(),e=Z(),r=re(),t=Ae(),i=we(),a=Vr().CONFIGURABLE,s=Ha(),o=Lr(),u=o.enforce,l=o.get,h=String,c=Object.defineProperty,f=n("".slice),v=n("".replace),g=n([].join),d=i&&!e(function(){return c(function(){},"length",{value:8}).length!==8}),p=String(String).split("String"),y=Bt.exports=function(m,b,x){f(h(b),0,7)==="Symbol("&&(b="["+v(h(b),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),x&&x.getter&&(b="get "+b),x&&x.setter&&(b="set "+b),(!t(m,"name")||a&&m.name!==b)&&(i?c(m,"name",{value:b,configurable:!0}):m.name=b),d&&x&&t(x,"arity")&&m.length!==x.arity&&c(m,"length",{value:x.arity});try{x&&t(x,"constructor")&&x.constructor?i&&c(m,"prototype",{writable:!1}):m.prototype&&(m.prototype=void 0)}catch{}var S=u(m);return t(S,"source")||(S.source=g(p,typeof b=="string"?b:"")),m};return Function.prototype.toString=y(function(){return r(this)&&l(this).source||s(this)},"toString"),Bt.exports}var Wt,os;function tr(){if(os)return Wt;os=1;var n=re(),e=Ye(),r=hl(),t=Ga();return Wt=function(i,a,s,o){o||(o={});var u=o.enumerable,l=o.name!==void 0?o.name:a;if(n(s)&&r(s,l,o),o.global)u?i[a]=s:t(a,s);else{try{o.unsafe?i[a]&&(u=!0):delete i[a]}catch{}u?i[a]=s:e.f(i,a,{value:s,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return i},Wt}var Yt={},Xt,us;function Kl(){if(us)return Xt;us=1;var n=Math.ceil,e=Math.floor;return Xt=Math.trunc||function(t){var i=+t;return(i>0?e:n)(i)},Xt}var Kt,ls;function kr(){if(ls)return Kt;ls=1;var n=Kl();return Kt=function(e){var r=+e;return r!==r||r===0?0:n(r)},Kt}var Qt,hs;function Ql(){if(hs)return Qt;hs=1;var n=kr(),e=Math.max,r=Math.min;return Qt=function(t,i){var a=n(t);return a<0?e(a+i,0):r(a,i)},Qt}var Zt,vs;function sr(){if(vs)return Zt;vs=1;var n=kr(),e=Math.min;return Zt=function(r){var t=n(r);return t>0?e(t,9007199254740991):0},Zt}var Jt,cs;function Xa(){if(cs)return Jt;cs=1;var n=sr();return Jt=function(e){return n(e.length)},Jt}var ei,fs;function vl(){if(fs)return ei;fs=1;var n=dr(),e=Ql(),r=Xa(),t=function(i){return function(a,s,o){var u=n(a),l=r(u);if(l===0)return!i&&-1;var h=e(o,l),c;if(i&&s!==s){for(;l>h;)if(c=u[h++],c!==c)return!0}else for(;l>h;h++)if((i||h in u)&&u[h]===s)return i||h||0;return!i&&-1}};return ei={includes:t(!0),indexOf:t(!1)},ei}var ri,gs;function cl(){if(gs)return ri;gs=1;var n=J(),e=Ae(),r=dr(),t=vl().indexOf,i=Ya(),a=n([].push);return ri=function(s,o){var u=r(s),l=0,h=[],c;for(c in u)!e(i,c)&&e(u,c)&&a(h,c);for(;o.length>l;)e(u,c=o[l++])&&(~t(h,c)||a(h,c));return h},ri}var ti,ds;function Ka(){return ds||(ds=1,ti=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),ti}var ps;function Zl(){if(ps)return Yt;ps=1;var n=cl(),e=Ka(),r=e.concat("length","prototype");return Yt.f=Object.getOwnPropertyNames||function(i){return n(i,r)},Yt}var ii={},ys;function Jl(){return ys||(ys=1,ii.f=Object.getOwnPropertySymbols),ii}var ai,ms;function eh(){if(ms)return ai;ms=1;var n=rr(),e=J(),r=Zl(),t=Jl(),i=he(),a=e([].concat);return ai=n("Reflect","ownKeys")||function(o){var u=r.f(i(o)),l=t.f;return l?a(u,l(o)):u},ai}var ni,bs;function rh(){if(bs)return ni;bs=1;var n=Ae(),e=eh(),r=Dr(),t=Ye();return ni=function(i,a,s){for(var o=e(a),u=t.f,l=r.f,h=0;h<o.length;h++){var c=o[h];!n(i,c)&&!(s&&n(s,c))&&u(i,c,l(a,c))}},ni}var si,xs;function fl(){if(xs)return si;xs=1;var n=Z(),e=re(),r=/#|\.prototype\./,t=function(u,l){var h=a[i(u)];return h===o?!0:h===s?!1:e(l)?n(l):!!l},i=t.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=t.data={},s=t.NATIVE="N",o=t.POLYFILL="P";return si=t,si}var oi,Os;function ve(){if(Os)return oi;Os=1;var n=Q(),e=Dr().f,r=yr(),t=tr(),i=Ga(),a=rh(),s=fl();return oi=function(o,u){var l=o.target,h=o.global,c=o.stat,f,v,g,d,p,y;if(h?v=n:c?v=n[l]||i(l,{}):v=n[l]&&n[l].prototype,v)for(g in u){if(p=u[g],o.dontCallGetSet?(y=e(v,g),d=y&&y.value):d=v[g],f=s(h?g:l+(c?".":"#")+g,o.forced),!f&&d!==void 0){if(typeof p==typeof d)continue;a(p,d)}(o.sham||d&&d.sham)&&r(p,"sham",!0),t(v,g,p,o)}},oi}var ui,Ts;function gl(){if(Ts)return ui;Ts=1;var n=Q(),e=pr(),r=er(),t=function(i){return e.slice(0,i.length)===i};return ui=(function(){return t("Bun/")?"BUN":t("Cloudflare-Workers")?"CLOUDFLARE":t("Deno/")?"DENO":t("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":r(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),ui}var li,Ss;function jr(){if(Ss)return li;Ss=1;var n=gl();return li=n==="NODE",li}var hi,Es;function th(){if(Es)return hi;Es=1;var n=Q();return hi=n,hi}var vi,Rs;function ih(){if(Rs)return vi;Rs=1;var n=J(),e=Fe();return vi=function(r,t,i){try{return n(e(Object.getOwnPropertyDescriptor(r,t)[i]))}catch{}},vi}var ci,Cs;function ah(){if(Cs)return ci;Cs=1;var n=ye();return ci=function(e){return n(e)||e===null},ci}var fi,ws;function nh(){if(ws)return fi;ws=1;var n=ah(),e=String,r=TypeError;return fi=function(t){if(n(t))return t;throw new r("Can't set "+e(t)+" as a prototype")},fi}var gi,Ps;function dl(){if(Ps)return gi;Ps=1;var n=ih(),e=ye(),r=Pe(),t=nh();return gi=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,a={},s;try{s=n(Object.prototype,"__proto__","set"),s(a,[]),i=a instanceof Array}catch{}return function(u,l){return r(u),t(l),e(u)&&(i?s(u,l):u.__proto__=l),u}})():void 0),gi}var di,As;function Br(){if(As)return di;As=1;var n=Ye().f,e=Ae(),r=ne(),t=r("toStringTag");return di=function(i,a,s){i&&!s&&(i=i.prototype),i&&!e(i,t)&&n(i,t,{configurable:!0,value:a})},di}var pi,Is;function sh(){if(Is)return pi;Is=1;var n=hl(),e=Ye();return pi=function(r,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),e.f(r,t,i)},pi}var yi,Ns;function oh(){if(Ns)return yi;Ns=1;var n=rr(),e=sh(),r=ne(),t=we(),i=r("species");return yi=function(a){var s=n(a);t&&s&&!s[i]&&e(s,i,{configurable:!0,get:function(){return this}})},yi}var mi,_s;function uh(){if(_s)return mi;_s=1;var n=Nr(),e=TypeError;return mi=function(r,t){if(n(t,r))return r;throw new e("Incorrect invocation")},mi}var bi,Ms;function lh(){if(Ms)return bi;Ms=1;var n=ne(),e=n("toStringTag"),r={};return r[e]="z",bi=String(r)==="[object z]",bi}var xi,qs;function Qa(){if(qs)return xi;qs=1;var n=lh(),e=re(),r=er(),t=ne(),i=t("toStringTag"),a=Object,s=r((function(){return arguments})())==="Arguments",o=function(u,l){try{return u[l]}catch{}};return xi=n?r:function(u){var l,h,c;return u===void 0?"Undefined":u===null?"Null":typeof(h=o(l=a(u),i))=="string"?h:s?r(l):(c=r(l))==="Object"&&e(l.callee)?"Arguments":c},xi}var Oi,Ds;function hh(){if(Ds)return Oi;Ds=1;var n=J(),e=Z(),r=re(),t=Qa(),i=rr(),a=Ha(),s=function(){},o=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),h=!u.test(s),c=function(g){if(!r(g))return!1;try{return o(s,[],g),!0}catch{return!1}},f=function(g){if(!r(g))return!1;switch(t(g)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!l(u,a(g))}catch{return!0}};return f.sham=!0,Oi=!o||e(function(){var v;return c(c.call)||!c(Object)||!c(function(){v=!0})||v})?f:c,Oi}var Ti,Vs;function vh(){if(Vs)return Ti;Vs=1;var n=hh(),e=_r(),r=TypeError;return Ti=function(t){if(n(t))return t;throw new r(e(t)+" is not a constructor")},Ti}var Si,Ls;function pl(){if(Ls)return Si;Ls=1;var n=he(),e=vh(),r=Ir(),t=ne(),i=t("species");return Si=function(a,s){var o=n(a).constructor,u;return o===void 0||r(u=n(o)[i])?s:e(u)},Si}var Ei,ks;function yl(){if(ks)return Ei;ks=1;var n=Ar(),e=Function.prototype,r=e.apply,t=e.call;return Ei=typeof Reflect=="object"&&Reflect.apply||(n?t.bind(r):function(){return t.apply(r,arguments)}),Ei}var Ri,js;function Fr(){if(js)return Ri;js=1;var n=er(),e=J();return Ri=function(r){if(n(r)==="Function")return e(r)},Ri}var Ci,Bs;function Za(){if(Bs)return Ci;Bs=1;var n=Fr(),e=Fe(),r=Ar(),t=n(n.bind);return Ci=function(i,a){return e(i),a===void 0?i:r?t(i,a):function(){return i.apply(a,arguments)}},Ci}var wi,Fs;function ml(){if(Fs)return wi;Fs=1;var n=rr();return wi=n("document","documentElement"),wi}var Pi,Us;function ch(){if(Us)return Pi;Us=1;var n=J();return Pi=n([].slice),Pi}var Ai,Gs;function fh(){if(Gs)return Ai;Gs=1;var n=TypeError;return Ai=function(e,r){if(e<r)throw new n("Not enough arguments");return e},Ai}var Ii,$s;function bl(){if($s)return Ii;$s=1;var n=pr();return Ii=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n),Ii}var Ni,zs;function xl(){if(zs)return Ni;zs=1;var n=Q(),e=yl(),r=Za(),t=re(),i=Ae(),a=Z(),s=ml(),o=ch(),u=qr(),l=fh(),h=bl(),c=jr(),f=n.setImmediate,v=n.clearImmediate,g=n.process,d=n.Dispatch,p=n.Function,y=n.MessageChannel,m=n.String,b=0,x={},S="onreadystatechange",E,T,R,P;a(function(){E=n.location});var A=function(w){if(i(x,w)){var V=x[w];delete x[w],V()}},D=function(w){return function(){A(w)}},I=function(w){A(w.data)},k=function(w){n.postMessage(m(w),E.protocol+"//"+E.host)};return(!f||!v)&&(f=function(V){l(arguments.length,1);var B=t(V)?V:p(V),N=o(arguments,1);return x[++b]=function(){e(B,void 0,N)},T(b),b},v=function(V){delete x[V]},c?T=function(w){g.nextTick(D(w))}:d&&d.now?T=function(w){d.now(D(w))}:y&&!h?(R=new y,P=R.port2,R.port1.onmessage=I,T=r(P.postMessage,P)):n.addEventListener&&t(n.postMessage)&&!n.importScripts&&E&&E.protocol!=="file:"&&!a(k)?(T=k,n.addEventListener("message",I,!1)):S in u("script")?T=function(w){s.appendChild(u("script"))[S]=function(){s.removeChild(this),A(w)}}:T=function(w){setTimeout(D(w),0)}),Ni={set:f,clear:v},Ni}var _i,Hs;function gh(){if(Hs)return _i;Hs=1;var n=Q(),e=we(),r=Object.getOwnPropertyDescriptor;return _i=function(t){if(!e)return n[t];var i=r(n,t);return i&&i.value},_i}var Mi,Ws;function Ol(){if(Ws)return Mi;Ws=1;var n=function(){this.head=null,this.tail=null};return n.prototype={add:function(e){var r={item:e,next:null},t=this.tail;t?t.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}},Mi=n,Mi}var qi,Ys;function dh(){if(Ys)return qi;Ys=1;var n=pr();return qi=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<"u",qi}var Di,Xs;function ph(){if(Xs)return Di;Xs=1;var n=pr();return Di=/web0s(?!.*chrome)/i.test(n),Di}var Vi,Ks;function yh(){if(Ks)return Vi;Ks=1;var n=Q(),e=gh(),r=Za(),t=xl().set,i=Ol(),a=bl(),s=dh(),o=ph(),u=jr(),l=n.MutationObserver||n.WebKitMutationObserver,h=n.document,c=n.process,f=n.Promise,v=e("queueMicrotask"),g,d,p,y,m;if(!v){var b=new i,x=function(){var S,E;for(u&&(S=c.domain)&&S.exit();E=b.get();)try{E()}catch(T){throw b.head&&g(),T}S&&S.enter()};!a&&!u&&!o&&l&&h?(d=!0,p=h.createTextNode(""),new l(x).observe(p,{characterData:!0}),g=function(){p.data=d=!d}):!s&&f&&f.resolve?(y=f.resolve(void 0),y.constructor=f,m=r(y.then,y),g=function(){m(x)}):u?g=function(){c.nextTick(x)}:(t=r(t,n),g=function(){t(x)}),v=function(S){b.head||g(),b.add(S)}}return Vi=v,Vi}var Li,Qs;function mh(){return Qs||(Qs=1,Li=function(n,e){try{arguments.length===1?console.error(n):console.error(n,e)}catch{}}),Li}var ki,Zs;function Ja(){return Zs||(Zs=1,ki=function(n){try{return{error:!1,value:n()}}catch(e){return{error:!0,value:e}}}),ki}var ji,Js;function mr(){if(Js)return ji;Js=1;var n=Q();return ji=n.Promise,ji}var Bi,eo;function br(){if(eo)return Bi;eo=1;var n=Q(),e=mr(),r=re(),t=fl(),i=Ha(),a=ne(),s=gl(),o=Me(),u=Ua(),l=e&&e.prototype,h=a("species"),c=!1,f=r(n.PromiseRejectionEvent),v=t("Promise",function(){var g=i(e),d=g!==String(e);if(!d&&u===66||o&&!(l.catch&&l.finally))return!0;if(!u||u<51||!/native code/.test(g)){var p=new e(function(b){b(1)}),y=function(b){b(function(){},function(){})},m=p.constructor={};if(m[h]=y,c=p.then(function(){})instanceof y,!c)return!0}return!d&&(s==="BROWSER"||s==="DENO")&&!f});return Bi={CONSTRUCTOR:v,REJECTION_EVENT:f,SUBCLASSING:c},Bi}var Fi={},ro;function xr(){if(ro)return Fi;ro=1;var n=Fe(),e=TypeError,r=function(t){var i,a;this.promise=new t(function(s,o){if(i!==void 0||a!==void 0)throw new e("Bad Promise constructor");i=s,a=o}),this.resolve=n(i),this.reject=n(a)};return Fi.f=function(t){return new r(t)},Fi}var to;function bh(){if(to)return hn;to=1;var n=ve(),e=Me(),r=jr(),t=Q(),i=th(),a=se(),s=tr(),o=dl(),u=Br(),l=oh(),h=Fe(),c=re(),f=ye(),v=uh(),g=pl(),d=xl().set,p=yh(),y=mh(),m=Ja(),b=Ol(),x=Lr(),S=mr(),E=br(),T=xr(),R="Promise",P=E.CONSTRUCTOR,A=E.REJECTION_EVENT,D=E.SUBCLASSING,I=x.getterFor(R),k=x.set,w=S&&S.prototype,V=S,B=w,N=t.TypeError,j=t.document,_=t.process,q=T.f,U=q,L=!!(j&&j.createEvent&&t.dispatchEvent),$="unhandledrejection",X="rejectionhandled",ae=0,oe=1,ue=2,Ue=1,Ge=2,ce,Ne,_e,be,fe=function(C){var F;return f(C)&&c(F=C.then)?F:!1},xe=function(C,F){var z=F.value,H=F.state===oe,W=H?C.ok:C.fail,Te=C.resolve,Le=C.reject,Se=C.domain,Ee,lr,hr;try{W?(H||(F.rejection===Ge&&$e(F),F.rejection=Ue),W===!0?Ee=z:(Se&&Se.enter(),Ee=W(z),Se&&(Se.exit(),hr=!0)),Ee===C.promise?Le(new N("Promise-chain cycle")):(lr=fe(Ee))?a(lr,Ee,Te,Le):Te(Ee)):Le(z)}catch(vr){Se&&!hr&&Se.exit(),Le(vr)}},De=function(C,F){C.notified||(C.notified=!0,p(function(){for(var z=C.reactions,H;H=z.get();)xe(H,C);C.notified=!1,F&&!C.rejection&&Xe(C)}))},Ve=function(C,F,z){var H,W;L?(H=j.createEvent("Event"),H.promise=F,H.reason=z,H.initEvent(C,!1,!0),t.dispatchEvent(H)):H={promise:F,reason:z},!A&&(W=t["on"+C])?W(H):C===$&&y("Unhandled promise rejection",z)},Xe=function(C){a(d,t,function(){var F=C.facade,z=C.value,H=ur(C),W;if(H&&(W=m(function(){r?_.emit("unhandledRejection",z,F):Ve($,F,z)}),C.rejection=r||ur(C)?Ge:Ue,W.error))throw W.value})},ur=function(C){return C.rejection!==Ue&&!C.parent},$e=function(C){a(d,t,function(){var F=C.facade;r?_.emit("rejectionHandled",F):Ve(X,F,C.value)})},ge=function(C,F,z){return function(H){C(F,H,z)}},de=function(C,F,z){C.done||(C.done=!0,z&&(C=z),C.value=F,C.state=ue,De(C,!0))},Oe=function(C,F,z){if(!C.done){C.done=!0,z&&(C=z);try{if(C.facade===F)throw new N("Promise can't be resolved itself");var H=fe(F);H?p(function(){var W={done:!1};try{a(H,F,ge(Oe,W,C),ge(de,W,C))}catch(Te){de(W,Te,C)}}):(C.value=F,C.state=oe,De(C,!1))}catch(W){de({done:!1},W,C)}}};if(P&&(V=function(F){v(this,B),h(F),a(ce,this);var z=I(this);try{F(ge(Oe,z),ge(de,z))}catch(H){de(z,H)}},B=V.prototype,ce=function(F){k(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:ae,value:null})},ce.prototype=s(B,"then",function(F,z){var H=I(this),W=q(g(this,V));return H.parent=!0,W.ok=c(F)?F:!0,W.fail=c(z)&&z,W.domain=r?_.domain:void 0,H.state===ae?H.reactions.add(W):p(function(){xe(W,H)}),W.promise}),Ne=function(){var C=new ce,F=I(C);this.promise=C,this.resolve=ge(Oe,F),this.reject=ge(de,F)},T.f=q=function(C){return C===V||C===_e?new Ne(C):U(C)},!e&&c(S)&&w!==Object.prototype)){be=w.then,D||s(w,"then",function(F,z){var H=this;return new V(function(W,Te){a(be,H,W,Te)}).then(F,z)},{unsafe:!0});try{delete w.constructor}catch{}o&&o(w,B)}return n({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:V}),_e=i.Promise,u(V,R,!1,!0),l(R),hn}var io={},Ui,ao;function Or(){return ao||(ao=1,Ui={}),Ui}var Gi,no;function xh(){if(no)return Gi;no=1;var n=ne(),e=Or(),r=n("iterator"),t=Array.prototype;return Gi=function(i){return i!==void 0&&(e.Array===i||t[r]===i)},Gi}var $i,so;function Tl(){if(so)return $i;so=1;var n=Qa(),e=nr(),r=Ir(),t=Or(),i=ne(),a=i("iterator");return $i=function(s){if(!r(s))return e(s,a)||e(s,"@@iterator")||t[n(s)]},$i}var zi,oo;function Oh(){if(oo)return zi;oo=1;var n=se(),e=Fe(),r=he(),t=_r(),i=Tl(),a=TypeError;return zi=function(s,o){var u=arguments.length<2?i(s):o;if(e(u))return r(n(u,s));throw new a(t(s)+" is not iterable")},zi}var Hi,uo;function Th(){if(uo)return Hi;uo=1;var n=se(),e=he(),r=nr();return Hi=function(t,i,a){var s,o;e(t);try{if(s=r(t,"return"),!s){if(i==="throw")throw a;return a}s=n(s,t)}catch(u){o=!0,s=u}if(i==="throw")throw a;if(o)throw s;return e(s),a},Hi}var Wi,lo;function Sl(){if(lo)return Wi;lo=1;var n=Za(),e=se(),r=he(),t=_r(),i=xh(),a=Xa(),s=Nr(),o=Oh(),u=Tl(),l=Th(),h=TypeError,c=function(v,g){this.stopped=v,this.result=g},f=c.prototype;return Wi=function(v,g,d){var p=d&&d.that,y=!!(d&&d.AS_ENTRIES),m=!!(d&&d.IS_RECORD),b=!!(d&&d.IS_ITERATOR),x=!!(d&&d.INTERRUPTED),S=n(g,p),E,T,R,P,A,D,I,k=function(B){var N=E;return E=void 0,N&&l(N,"normal"),new c(!0,B)},w=function(B){return y?(r(B),x?S(B[0],B[1],k):S(B[0],B[1])):x?S(B,k):S(B)};if(m)E=v.iterator;else if(b)E=v;else{if(T=u(v),!T)throw new h(t(v)+" is not iterable");if(i(T)){for(R=0,P=a(v);P>R;R++)if(A=w(v[R]),A&&s(f,A))return A;return new c(!1)}E=o(v,T)}for(D=m?v.next:E.next;!(I=e(D,E)).done;){var V=I.value;try{A=w(V)}catch(B){if(E)l(E,"throw",B);else throw B}if(typeof A=="object"&&A&&s(f,A))return A}return new c(!1)},Wi}var Yi,ho;function Sh(){if(ho)return Yi;ho=1;var n=ne(),e=n("iterator"),r=!1;try{var t=0,i={next:function(){return{done:!!t++}},return:function(){r=!0}};i[e]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Yi=function(a,s){try{if(!s&&!r)return!1}catch{return!1}var o=!1;try{var u={};u[e]=function(){return{next:function(){return{done:o=!0}}}},a(u)}catch{}return o},Yi}var Xi,vo;function El(){if(vo)return Xi;vo=1;var n=mr(),e=Sh(),r=br().CONSTRUCTOR;return Xi=r||!e(function(t){n.all(t).then(void 0,function(){})}),Xi}var co;function Eh(){if(co)return io;co=1;var n=ve(),e=se(),r=Fe(),t=xr(),i=Ja(),a=Sl(),s=El();return n({target:"Promise",stat:!0,forced:s},{all:function(u){var l=this,h=t.f(l),c=h.resolve,f=h.reject,v=i(function(){var g=r(l.resolve),d=[],p=0,y=1;a(u,function(m){var b=p++,x=!1;y++,e(g,l,m).then(function(S){x||(x=!0,d[b]=S,--y||c(d))},f)}),--y||c(d)});return v.error&&f(v.value),h.promise}}),io}var fo={},go;function Rh(){if(go)return fo;go=1;var n=ve(),e=Me(),r=br().CONSTRUCTOR,t=mr(),i=rr(),a=re(),s=tr(),o=t&&t.prototype;if(n({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&a(t)){var u=i("Promise").prototype.catch;o.catch!==u&&s(o,"catch",u,{unsafe:!0})}return fo}var po={},yo;function Ch(){if(yo)return po;yo=1;var n=ve(),e=se(),r=Fe(),t=xr(),i=Ja(),a=Sl(),s=El();return n({target:"Promise",stat:!0,forced:s},{race:function(u){var l=this,h=t.f(l),c=h.reject,f=i(function(){var v=r(l.resolve);a(u,function(g){e(v,l,g).then(h.resolve,c)})});return f.error&&c(f.value),h.promise}}),po}var mo={},bo;function wh(){if(bo)return mo;bo=1;var n=ve(),e=xr(),r=br().CONSTRUCTOR;return n({target:"Promise",stat:!0,forced:r},{reject:function(i){var a=e.f(this),s=a.reject;return s(i),a.promise}}),mo}var xo={},Ki,Oo;function Ph(){if(Oo)return Ki;Oo=1;var n=he(),e=ye(),r=xr();return Ki=function(t,i){if(n(t),e(i)&&i.constructor===t)return i;var a=r.f(t),s=a.resolve;return s(i),a.promise},Ki}var To;function Ah(){if(To)return xo;To=1;var n=ve(),e=rr(),r=Me(),t=mr(),i=br().CONSTRUCTOR,a=Ph(),s=e("Promise"),o=r&&!i;return n({target:"Promise",stat:!0,forced:r||i},{resolve:function(l){return a(o&&this===s?t:this,l)}}),xo}var So;function Ih(){return So||(So=1,bh(),Eh(),Rh(),Ch(),wh(),Ah()),ln}Ih();function Eo(n,e,r,t,i,a,s){try{var o=n[a](s),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(t,i)}function Be(n){return function(){var e=this,r=arguments;return new Promise(function(t,i){var a=n.apply(e,r);function s(u){Eo(a,t,i,s,o,"next",u)}function o(u){Eo(a,t,i,s,o,"throw",u)}s(void 0)})}}var Ro={},Co={},Qi,wo;function qe(){if(wo)return Qi;wo=1;var n=Qa(),e=String;return Qi=function(r){if(n(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},Qi}var Zi,Po;function Rl(){if(Po)return Zi;Po=1;var n=he();return Zi=function(){var e=n(this),r="";return e.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r},Zi}var Ji,Ao;function Cl(){if(Ao)return Ji;Ao=1;var n=Z(),e=Q(),r=e.RegExp,t=n(function(){var s=r("a","y");return s.lastIndex=2,s.exec("abcd")!==null}),i=t||n(function(){return!r("a","y").sticky}),a=t||n(function(){var s=r("^r","gy");return s.lastIndex=2,s.exec("str")!==null});return Ji={BROKEN_CARET:a,MISSED_STICKY:i,UNSUPPORTED_Y:t},Ji}var ea={},ra,Io;function Nh(){if(Io)return ra;Io=1;var n=cl(),e=Ka();return ra=Object.keys||function(t){return n(t,e)},ra}var No;function _h(){if(No)return ea;No=1;var n=we(),e=ll(),r=Ye(),t=he(),i=dr(),a=Nh();return ea.f=n&&!e?Object.defineProperties:function(o,u){t(o);for(var l=i(u),h=a(u),c=h.length,f=0,v;c>f;)r.f(o,v=h[f++],l[v]);return o},ea}var ta,_o;function Ur(){if(_o)return ta;_o=1;var n=he(),e=_h(),r=Ka(),t=Ya(),i=ml(),a=qr(),s=Wa(),o=">",u="<",l="prototype",h="script",c=s("IE_PROTO"),f=function(){},v=function(m){return u+h+o+m+u+"/"+h+o},g=function(m){m.write(v("")),m.close();var b=m.parentWindow.Object;return m=null,b},d=function(){var m=a("iframe"),b="java"+h+":",x;return m.style.display="none",i.appendChild(m),m.src=String(b),x=m.contentWindow.document,x.open(),x.write(v("document.F=Object")),x.close(),x.F},p,y=function(){try{p=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&p?g(p):d():g(p);for(var m=r.length;m--;)delete y[l][r[m]];return y()};return t[c]=!0,ta=Object.create||function(b,x){var S;return b!==null?(f[l]=n(b),S=new f,f[l]=null,S[c]=b):S=y(),x===void 0?S:e.f(S,x)},ta}var ia,Mo;function Mh(){if(Mo)return ia;Mo=1;var n=Z(),e=Q(),r=e.RegExp;return ia=n(function(){var t=r(".","s");return!(t.dotAll&&t.test(`
|
|
1
|
+
import{cu as Ba}from"./vendor-blocklet-B67R14so.js";import{g as rl}from"./vendor-mui-BXZut9Pz.js";import"./vendor-react-BPknnnEA.js";var ln={},hn={},cr,vn;function Q(){if(vn)return cr;vn=1;var n=function(e){return e&&e.Math===Math&&e};return cr=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof globalThis=="object"&&globalThis)||n(typeof cr=="object"&&cr)||(function(){return this})()||Function("return this")(),cr}var Zr={},Jr,cn;function Z(){return cn||(cn=1,Jr=function(n){try{return!!n()}catch{return!0}}),Jr}var et,fn;function we(){if(fn)return et;fn=1;var n=Z();return et=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),et}var rt,gn;function Ar(){if(gn)return rt;gn=1;var n=Z();return rt=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),rt}var tt,dn;function se(){if(dn)return tt;dn=1;var n=Ar(),e=Function.prototype.call;return tt=n?e.bind(e):function(){return e.apply(e,arguments)},tt}var it={},pn;function Hl(){if(pn)return it;pn=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!n.call({1:2},1);return it.f=r?function(i){var a=e(this,i);return!!a&&a.enumerable}:n,it}var at,yn;function Fa(){return yn||(yn=1,at=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),at}var nt,mn;function J(){if(mn)return nt;mn=1;var n=Ar(),e=Function.prototype,r=e.call,t=n&&e.bind.bind(r,r);return nt=n?t:function(i){return function(){return r.apply(i,arguments)}},nt}var st,bn;function er(){if(bn)return st;bn=1;var n=J(),e=n({}.toString),r=n("".slice);return st=function(t){return r(e(t),8,-1)},st}var ot,xn;function tl(){if(xn)return ot;xn=1;var n=J(),e=Z(),r=er(),t=Object,i=n("".split);return ot=e(function(){return!t("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):t(a)}:t,ot}var ut,On;function Ir(){return On||(On=1,ut=function(n){return n==null}),ut}var lt,Tn;function Pe(){if(Tn)return lt;Tn=1;var n=Ir(),e=TypeError;return lt=function(r){if(n(r))throw new e("Can't call method on "+r);return r},lt}var ht,Sn;function dr(){if(Sn)return ht;Sn=1;var n=tl(),e=Pe();return ht=function(r){return n(e(r))},ht}var vt,En;function re(){if(En)return vt;En=1;var n=typeof document=="object"&&document.all;return vt=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},vt}var ct,Rn;function ye(){if(Rn)return ct;Rn=1;var n=re();return ct=function(e){return typeof e=="object"?e!==null:n(e)},ct}var ft,Cn;function rr(){if(Cn)return ft;Cn=1;var n=Q(),e=re(),r=function(t){return e(t)?t:void 0};return ft=function(t,i){return arguments.length<2?r(n[t]):n[t]&&n[t][i]},ft}var gt,wn;function Nr(){if(wn)return gt;wn=1;var n=J();return gt=n({}.isPrototypeOf),gt}var dt,Pn;function pr(){if(Pn)return dt;Pn=1;var n=Q(),e=n.navigator,r=e&&e.userAgent;return dt=r?String(r):"",dt}var pt,An;function Ua(){if(An)return pt;An=1;var n=Q(),e=pr(),r=n.process,t=n.Deno,i=r&&r.versions||t&&t.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),pt=o,pt}var yt,In;function il(){if(In)return yt;In=1;var n=Ua(),e=Z(),r=Q(),t=r.String;return yt=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!t(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),yt}var mt,Nn;function al(){if(Nn)return mt;Nn=1;var n=il();return mt=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mt}var bt,_n;function nl(){if(_n)return bt;_n=1;var n=rr(),e=re(),r=Nr(),t=al(),i=Object;return bt=t?function(a){return typeof a=="symbol"}:function(a){var s=n("Symbol");return e(s)&&r(s.prototype,i(a))},bt}var xt,Mn;function _r(){if(Mn)return xt;Mn=1;var n=String;return xt=function(e){try{return n(e)}catch{return"Object"}},xt}var Ot,qn;function Fe(){if(qn)return Ot;qn=1;var n=re(),e=_r(),r=TypeError;return Ot=function(t){if(n(t))return t;throw new r(e(t)+" is not a function")},Ot}var Tt,Dn;function nr(){if(Dn)return Tt;Dn=1;var n=Fe(),e=Ir();return Tt=function(r,t){var i=r[t];return e(i)?void 0:n(i)},Tt}var St,Vn;function Wl(){if(Vn)return St;Vn=1;var n=se(),e=re(),r=ye(),t=TypeError;return St=function(i,a){var s,o;if(a==="string"&&e(s=i.toString)&&!r(o=n(s,i))||e(s=i.valueOf)&&!r(o=n(s,i))||a!=="string"&&e(s=i.toString)&&!r(o=n(s,i)))return o;throw new t("Can't convert object to primitive value")},St}var Et={exports:{}},Rt,Ln;function Me(){return Ln||(Ln=1,Rt=!1),Rt}var Ct,kn;function Ga(){if(kn)return Ct;kn=1;var n=Q(),e=Object.defineProperty;return Ct=function(r,t){try{e(n,r,{value:t,configurable:!0,writable:!0})}catch{n[r]=t}return t},Ct}var jn;function $a(){if(jn)return Et.exports;jn=1;var n=Me(),e=Q(),r=Ga(),t="__core-js_shared__",i=Et.exports=e[t]||r(t,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Et.exports}var wt,Bn;function za(){if(Bn)return wt;Bn=1;var n=$a();return wt=function(e,r){return n[e]||(n[e]=r||{})},wt}var Pt,Fn;function Mr(){if(Fn)return Pt;Fn=1;var n=Pe(),e=Object;return Pt=function(r){return e(n(r))},Pt}var At,Un;function Ae(){if(Un)return At;Un=1;var n=J(),e=Mr(),r=n({}.hasOwnProperty);return At=Object.hasOwn||function(i,a){return r(e(i),a)},At}var It,Gn;function sl(){if(Gn)return It;Gn=1;var n=J(),e=0,r=Math.random(),t=n(1.1.toString);return It=function(i){return"Symbol("+(i===void 0?"":i)+")_"+t(++e+r,36)},It}var Nt,$n;function ne(){if($n)return Nt;$n=1;var n=Q(),e=za(),r=Ae(),t=sl(),i=il(),a=al(),s=n.Symbol,o=e("wks"),u=a?s.for||s:s&&s.withoutSetter||t;return Nt=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Nt}var _t,zn;function Yl(){if(zn)return _t;zn=1;var n=se(),e=ye(),r=nl(),t=nr(),i=Wl(),a=ne(),s=TypeError,o=a("toPrimitive");return _t=function(u,l){if(!e(u)||r(u))return u;var h=t(u,o),c;if(h){if(l===void 0&&(l="default"),c=n(h,u,l),!e(c)||r(c))return c;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},_t}var Mt,Hn;function ol(){if(Hn)return Mt;Hn=1;var n=Yl(),e=nl();return Mt=function(r){var t=n(r,"string");return e(t)?t:t+""},Mt}var qt,Wn;function qr(){if(Wn)return qt;Wn=1;var n=Q(),e=ye(),r=n.document,t=e(r)&&e(r.createElement);return qt=function(i){return t?r.createElement(i):{}},qt}var Dt,Yn;function ul(){if(Yn)return Dt;Yn=1;var n=we(),e=Z(),r=qr();return Dt=!n&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Dt}var Xn;function Dr(){if(Xn)return Zr;Xn=1;var n=we(),e=se(),r=Hl(),t=Fa(),i=dr(),a=ol(),s=Ae(),o=ul(),u=Object.getOwnPropertyDescriptor;return Zr.f=n?u:function(h,c){if(h=i(h),c=a(c),o)try{return u(h,c)}catch{}if(s(h,c))return t(!e(r.f,h,c),h[c])},Zr}var Vt={},Lt,Kn;function ll(){if(Kn)return Lt;Kn=1;var n=we(),e=Z();return Lt=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Lt}var kt,Qn;function he(){if(Qn)return kt;Qn=1;var n=ye(),e=String,r=TypeError;return kt=function(t){if(n(t))return t;throw new r(e(t)+" is not an object")},kt}var Zn;function Ye(){if(Zn)return Vt;Zn=1;var n=we(),e=ul(),r=ll(),t=he(),i=ol(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",h="writable";return Vt.f=n?r?function(f,v,g){if(t(f),v=i(v),t(g),typeof f=="function"&&v==="prototype"&&"value"in g&&h in g&&!g[h]){var d=o(f,v);d&&d[h]&&(f[v]=g.value,g={configurable:l in g?g[l]:d[l],enumerable:u in g?g[u]:d[u],writable:!1})}return s(f,v,g)}:s:function(f,v,g){if(t(f),v=i(v),t(g),e)try{return s(f,v,g)}catch{}if("get"in g||"set"in g)throw new a("Accessors not supported");return"value"in g&&(f[v]=g.value),f},Vt}var jt,Jn;function yr(){if(Jn)return jt;Jn=1;var n=we(),e=Ye(),r=Fa();return jt=n?function(t,i,a){return e.f(t,i,r(1,a))}:function(t,i,a){return t[i]=a,t},jt}var Bt={exports:{}},Ft,es;function Vr(){if(es)return Ft;es=1;var n=we(),e=Ae(),r=Function.prototype,t=n&&Object.getOwnPropertyDescriptor,i=e(r,"name"),a=i&&(function(){}).name==="something",s=i&&(!n||n&&t(r,"name").configurable);return Ft={EXISTS:i,PROPER:a,CONFIGURABLE:s},Ft}var Ut,rs;function Ha(){if(rs)return Ut;rs=1;var n=J(),e=re(),r=$a(),t=n(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(i){return t(i)}),Ut=r.inspectSource,Ut}var Gt,ts;function Xl(){if(ts)return Gt;ts=1;var n=Q(),e=re(),r=n.WeakMap;return Gt=e(r)&&/native code/.test(String(r)),Gt}var $t,is;function Wa(){if(is)return $t;is=1;var n=za(),e=sl(),r=n("keys");return $t=function(t){return r[t]||(r[t]=e(t))},$t}var zt,as;function Ya(){return as||(as=1,zt={}),zt}var Ht,ns;function Lr(){if(ns)return Ht;ns=1;var n=Xl(),e=Q(),r=ye(),t=yr(),i=Ae(),a=$a(),s=Wa(),o=Ya(),u="Object already initialized",l=e.TypeError,h=e.WeakMap,c,f,v,g=function(m){return v(m)?f(m):c(m,{})},d=function(m){return function(b){var x;if(!r(b)||(x=f(b)).type!==m)throw new l("Incompatible receiver, "+m+" required");return x}};if(n||a.state){var p=a.state||(a.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,c=function(m,b){if(p.has(m))throw new l(u);return b.facade=m,p.set(m,b),b},f=function(m){return p.get(m)||{}},v=function(m){return p.has(m)}}else{var y=s("state");o[y]=!0,c=function(m,b){if(i(m,y))throw new l(u);return b.facade=m,t(m,y,b),b},f=function(m){return i(m,y)?m[y]:{}},v=function(m){return i(m,y)}}return Ht={set:c,get:f,has:v,enforce:g,getterFor:d},Ht}var ss;function hl(){if(ss)return Bt.exports;ss=1;var n=J(),e=Z(),r=re(),t=Ae(),i=we(),a=Vr().CONFIGURABLE,s=Ha(),o=Lr(),u=o.enforce,l=o.get,h=String,c=Object.defineProperty,f=n("".slice),v=n("".replace),g=n([].join),d=i&&!e(function(){return c(function(){},"length",{value:8}).length!==8}),p=String(String).split("String"),y=Bt.exports=function(m,b,x){f(h(b),0,7)==="Symbol("&&(b="["+v(h(b),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),x&&x.getter&&(b="get "+b),x&&x.setter&&(b="set "+b),(!t(m,"name")||a&&m.name!==b)&&(i?c(m,"name",{value:b,configurable:!0}):m.name=b),d&&x&&t(x,"arity")&&m.length!==x.arity&&c(m,"length",{value:x.arity});try{x&&t(x,"constructor")&&x.constructor?i&&c(m,"prototype",{writable:!1}):m.prototype&&(m.prototype=void 0)}catch{}var S=u(m);return t(S,"source")||(S.source=g(p,typeof b=="string"?b:"")),m};return Function.prototype.toString=y(function(){return r(this)&&l(this).source||s(this)},"toString"),Bt.exports}var Wt,os;function tr(){if(os)return Wt;os=1;var n=re(),e=Ye(),r=hl(),t=Ga();return Wt=function(i,a,s,o){o||(o={});var u=o.enumerable,l=o.name!==void 0?o.name:a;if(n(s)&&r(s,l,o),o.global)u?i[a]=s:t(a,s);else{try{o.unsafe?i[a]&&(u=!0):delete i[a]}catch{}u?i[a]=s:e.f(i,a,{value:s,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return i},Wt}var Yt={},Xt,us;function Kl(){if(us)return Xt;us=1;var n=Math.ceil,e=Math.floor;return Xt=Math.trunc||function(t){var i=+t;return(i>0?e:n)(i)},Xt}var Kt,ls;function kr(){if(ls)return Kt;ls=1;var n=Kl();return Kt=function(e){var r=+e;return r!==r||r===0?0:n(r)},Kt}var Qt,hs;function Ql(){if(hs)return Qt;hs=1;var n=kr(),e=Math.max,r=Math.min;return Qt=function(t,i){var a=n(t);return a<0?e(a+i,0):r(a,i)},Qt}var Zt,vs;function sr(){if(vs)return Zt;vs=1;var n=kr(),e=Math.min;return Zt=function(r){var t=n(r);return t>0?e(t,9007199254740991):0},Zt}var Jt,cs;function Xa(){if(cs)return Jt;cs=1;var n=sr();return Jt=function(e){return n(e.length)},Jt}var ei,fs;function vl(){if(fs)return ei;fs=1;var n=dr(),e=Ql(),r=Xa(),t=function(i){return function(a,s,o){var u=n(a),l=r(u);if(l===0)return!i&&-1;var h=e(o,l),c;if(i&&s!==s){for(;l>h;)if(c=u[h++],c!==c)return!0}else for(;l>h;h++)if((i||h in u)&&u[h]===s)return i||h||0;return!i&&-1}};return ei={includes:t(!0),indexOf:t(!1)},ei}var ri,gs;function cl(){if(gs)return ri;gs=1;var n=J(),e=Ae(),r=dr(),t=vl().indexOf,i=Ya(),a=n([].push);return ri=function(s,o){var u=r(s),l=0,h=[],c;for(c in u)!e(i,c)&&e(u,c)&&a(h,c);for(;o.length>l;)e(u,c=o[l++])&&(~t(h,c)||a(h,c));return h},ri}var ti,ds;function Ka(){return ds||(ds=1,ti=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),ti}var ps;function Zl(){if(ps)return Yt;ps=1;var n=cl(),e=Ka(),r=e.concat("length","prototype");return Yt.f=Object.getOwnPropertyNames||function(i){return n(i,r)},Yt}var ii={},ys;function Jl(){return ys||(ys=1,ii.f=Object.getOwnPropertySymbols),ii}var ai,ms;function eh(){if(ms)return ai;ms=1;var n=rr(),e=J(),r=Zl(),t=Jl(),i=he(),a=e([].concat);return ai=n("Reflect","ownKeys")||function(o){var u=r.f(i(o)),l=t.f;return l?a(u,l(o)):u},ai}var ni,bs;function rh(){if(bs)return ni;bs=1;var n=Ae(),e=eh(),r=Dr(),t=Ye();return ni=function(i,a,s){for(var o=e(a),u=t.f,l=r.f,h=0;h<o.length;h++){var c=o[h];!n(i,c)&&!(s&&n(s,c))&&u(i,c,l(a,c))}},ni}var si,xs;function fl(){if(xs)return si;xs=1;var n=Z(),e=re(),r=/#|\.prototype\./,t=function(u,l){var h=a[i(u)];return h===o?!0:h===s?!1:e(l)?n(l):!!l},i=t.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=t.data={},s=t.NATIVE="N",o=t.POLYFILL="P";return si=t,si}var oi,Os;function ve(){if(Os)return oi;Os=1;var n=Q(),e=Dr().f,r=yr(),t=tr(),i=Ga(),a=rh(),s=fl();return oi=function(o,u){var l=o.target,h=o.global,c=o.stat,f,v,g,d,p,y;if(h?v=n:c?v=n[l]||i(l,{}):v=n[l]&&n[l].prototype,v)for(g in u){if(p=u[g],o.dontCallGetSet?(y=e(v,g),d=y&&y.value):d=v[g],f=s(h?g:l+(c?".":"#")+g,o.forced),!f&&d!==void 0){if(typeof p==typeof d)continue;a(p,d)}(o.sham||d&&d.sham)&&r(p,"sham",!0),t(v,g,p,o)}},oi}var ui,Ts;function gl(){if(Ts)return ui;Ts=1;var n=Q(),e=pr(),r=er(),t=function(i){return e.slice(0,i.length)===i};return ui=(function(){return t("Bun/")?"BUN":t("Cloudflare-Workers")?"CLOUDFLARE":t("Deno/")?"DENO":t("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":r(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),ui}var li,Ss;function jr(){if(Ss)return li;Ss=1;var n=gl();return li=n==="NODE",li}var hi,Es;function th(){if(Es)return hi;Es=1;var n=Q();return hi=n,hi}var vi,Rs;function ih(){if(Rs)return vi;Rs=1;var n=J(),e=Fe();return vi=function(r,t,i){try{return n(e(Object.getOwnPropertyDescriptor(r,t)[i]))}catch{}},vi}var ci,Cs;function ah(){if(Cs)return ci;Cs=1;var n=ye();return ci=function(e){return n(e)||e===null},ci}var fi,ws;function nh(){if(ws)return fi;ws=1;var n=ah(),e=String,r=TypeError;return fi=function(t){if(n(t))return t;throw new r("Can't set "+e(t)+" as a prototype")},fi}var gi,Ps;function dl(){if(Ps)return gi;Ps=1;var n=ih(),e=ye(),r=Pe(),t=nh();return gi=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,a={},s;try{s=n(Object.prototype,"__proto__","set"),s(a,[]),i=a instanceof Array}catch{}return function(u,l){return r(u),t(l),e(u)&&(i?s(u,l):u.__proto__=l),u}})():void 0),gi}var di,As;function Br(){if(As)return di;As=1;var n=Ye().f,e=Ae(),r=ne(),t=r("toStringTag");return di=function(i,a,s){i&&!s&&(i=i.prototype),i&&!e(i,t)&&n(i,t,{configurable:!0,value:a})},di}var pi,Is;function sh(){if(Is)return pi;Is=1;var n=hl(),e=Ye();return pi=function(r,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),e.f(r,t,i)},pi}var yi,Ns;function oh(){if(Ns)return yi;Ns=1;var n=rr(),e=sh(),r=ne(),t=we(),i=r("species");return yi=function(a){var s=n(a);t&&s&&!s[i]&&e(s,i,{configurable:!0,get:function(){return this}})},yi}var mi,_s;function uh(){if(_s)return mi;_s=1;var n=Nr(),e=TypeError;return mi=function(r,t){if(n(t,r))return r;throw new e("Incorrect invocation")},mi}var bi,Ms;function lh(){if(Ms)return bi;Ms=1;var n=ne(),e=n("toStringTag"),r={};return r[e]="z",bi=String(r)==="[object z]",bi}var xi,qs;function Qa(){if(qs)return xi;qs=1;var n=lh(),e=re(),r=er(),t=ne(),i=t("toStringTag"),a=Object,s=r((function(){return arguments})())==="Arguments",o=function(u,l){try{return u[l]}catch{}};return xi=n?r:function(u){var l,h,c;return u===void 0?"Undefined":u===null?"Null":typeof(h=o(l=a(u),i))=="string"?h:s?r(l):(c=r(l))==="Object"&&e(l.callee)?"Arguments":c},xi}var Oi,Ds;function hh(){if(Ds)return Oi;Ds=1;var n=J(),e=Z(),r=re(),t=Qa(),i=rr(),a=Ha(),s=function(){},o=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),h=!u.test(s),c=function(g){if(!r(g))return!1;try{return o(s,[],g),!0}catch{return!1}},f=function(g){if(!r(g))return!1;switch(t(g)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!l(u,a(g))}catch{return!0}};return f.sham=!0,Oi=!o||e(function(){var v;return c(c.call)||!c(Object)||!c(function(){v=!0})||v})?f:c,Oi}var Ti,Vs;function vh(){if(Vs)return Ti;Vs=1;var n=hh(),e=_r(),r=TypeError;return Ti=function(t){if(n(t))return t;throw new r(e(t)+" is not a constructor")},Ti}var Si,Ls;function pl(){if(Ls)return Si;Ls=1;var n=he(),e=vh(),r=Ir(),t=ne(),i=t("species");return Si=function(a,s){var o=n(a).constructor,u;return o===void 0||r(u=n(o)[i])?s:e(u)},Si}var Ei,ks;function yl(){if(ks)return Ei;ks=1;var n=Ar(),e=Function.prototype,r=e.apply,t=e.call;return Ei=typeof Reflect=="object"&&Reflect.apply||(n?t.bind(r):function(){return t.apply(r,arguments)}),Ei}var Ri,js;function Fr(){if(js)return Ri;js=1;var n=er(),e=J();return Ri=function(r){if(n(r)==="Function")return e(r)},Ri}var Ci,Bs;function Za(){if(Bs)return Ci;Bs=1;var n=Fr(),e=Fe(),r=Ar(),t=n(n.bind);return Ci=function(i,a){return e(i),a===void 0?i:r?t(i,a):function(){return i.apply(a,arguments)}},Ci}var wi,Fs;function ml(){if(Fs)return wi;Fs=1;var n=rr();return wi=n("document","documentElement"),wi}var Pi,Us;function ch(){if(Us)return Pi;Us=1;var n=J();return Pi=n([].slice),Pi}var Ai,Gs;function fh(){if(Gs)return Ai;Gs=1;var n=TypeError;return Ai=function(e,r){if(e<r)throw new n("Not enough arguments");return e},Ai}var Ii,$s;function bl(){if($s)return Ii;$s=1;var n=pr();return Ii=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n),Ii}var Ni,zs;function xl(){if(zs)return Ni;zs=1;var n=Q(),e=yl(),r=Za(),t=re(),i=Ae(),a=Z(),s=ml(),o=ch(),u=qr(),l=fh(),h=bl(),c=jr(),f=n.setImmediate,v=n.clearImmediate,g=n.process,d=n.Dispatch,p=n.Function,y=n.MessageChannel,m=n.String,b=0,x={},S="onreadystatechange",E,T,R,P;a(function(){E=n.location});var A=function(w){if(i(x,w)){var V=x[w];delete x[w],V()}},D=function(w){return function(){A(w)}},I=function(w){A(w.data)},k=function(w){n.postMessage(m(w),E.protocol+"//"+E.host)};return(!f||!v)&&(f=function(V){l(arguments.length,1);var B=t(V)?V:p(V),N=o(arguments,1);return x[++b]=function(){e(B,void 0,N)},T(b),b},v=function(V){delete x[V]},c?T=function(w){g.nextTick(D(w))}:d&&d.now?T=function(w){d.now(D(w))}:y&&!h?(R=new y,P=R.port2,R.port1.onmessage=I,T=r(P.postMessage,P)):n.addEventListener&&t(n.postMessage)&&!n.importScripts&&E&&E.protocol!=="file:"&&!a(k)?(T=k,n.addEventListener("message",I,!1)):S in u("script")?T=function(w){s.appendChild(u("script"))[S]=function(){s.removeChild(this),A(w)}}:T=function(w){setTimeout(D(w),0)}),Ni={set:f,clear:v},Ni}var _i,Hs;function gh(){if(Hs)return _i;Hs=1;var n=Q(),e=we(),r=Object.getOwnPropertyDescriptor;return _i=function(t){if(!e)return n[t];var i=r(n,t);return i&&i.value},_i}var Mi,Ws;function Ol(){if(Ws)return Mi;Ws=1;var n=function(){this.head=null,this.tail=null};return n.prototype={add:function(e){var r={item:e,next:null},t=this.tail;t?t.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}},Mi=n,Mi}var qi,Ys;function dh(){if(Ys)return qi;Ys=1;var n=pr();return qi=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<"u",qi}var Di,Xs;function ph(){if(Xs)return Di;Xs=1;var n=pr();return Di=/web0s(?!.*chrome)/i.test(n),Di}var Vi,Ks;function yh(){if(Ks)return Vi;Ks=1;var n=Q(),e=gh(),r=Za(),t=xl().set,i=Ol(),a=bl(),s=dh(),o=ph(),u=jr(),l=n.MutationObserver||n.WebKitMutationObserver,h=n.document,c=n.process,f=n.Promise,v=e("queueMicrotask"),g,d,p,y,m;if(!v){var b=new i,x=function(){var S,E;for(u&&(S=c.domain)&&S.exit();E=b.get();)try{E()}catch(T){throw b.head&&g(),T}S&&S.enter()};!a&&!u&&!o&&l&&h?(d=!0,p=h.createTextNode(""),new l(x).observe(p,{characterData:!0}),g=function(){p.data=d=!d}):!s&&f&&f.resolve?(y=f.resolve(void 0),y.constructor=f,m=r(y.then,y),g=function(){m(x)}):u?g=function(){c.nextTick(x)}:(t=r(t,n),g=function(){t(x)}),v=function(S){b.head||g(),b.add(S)}}return Vi=v,Vi}var Li,Qs;function mh(){return Qs||(Qs=1,Li=function(n,e){try{arguments.length===1?console.error(n):console.error(n,e)}catch{}}),Li}var ki,Zs;function Ja(){return Zs||(Zs=1,ki=function(n){try{return{error:!1,value:n()}}catch(e){return{error:!0,value:e}}}),ki}var ji,Js;function mr(){if(Js)return ji;Js=1;var n=Q();return ji=n.Promise,ji}var Bi,eo;function br(){if(eo)return Bi;eo=1;var n=Q(),e=mr(),r=re(),t=fl(),i=Ha(),a=ne(),s=gl(),o=Me(),u=Ua(),l=e&&e.prototype,h=a("species"),c=!1,f=r(n.PromiseRejectionEvent),v=t("Promise",function(){var g=i(e),d=g!==String(e);if(!d&&u===66||o&&!(l.catch&&l.finally))return!0;if(!u||u<51||!/native code/.test(g)){var p=new e(function(b){b(1)}),y=function(b){b(function(){},function(){})},m=p.constructor={};if(m[h]=y,c=p.then(function(){})instanceof y,!c)return!0}return!d&&(s==="BROWSER"||s==="DENO")&&!f});return Bi={CONSTRUCTOR:v,REJECTION_EVENT:f,SUBCLASSING:c},Bi}var Fi={},ro;function xr(){if(ro)return Fi;ro=1;var n=Fe(),e=TypeError,r=function(t){var i,a;this.promise=new t(function(s,o){if(i!==void 0||a!==void 0)throw new e("Bad Promise constructor");i=s,a=o}),this.resolve=n(i),this.reject=n(a)};return Fi.f=function(t){return new r(t)},Fi}var to;function bh(){if(to)return hn;to=1;var n=ve(),e=Me(),r=jr(),t=Q(),i=th(),a=se(),s=tr(),o=dl(),u=Br(),l=oh(),h=Fe(),c=re(),f=ye(),v=uh(),g=pl(),d=xl().set,p=yh(),y=mh(),m=Ja(),b=Ol(),x=Lr(),S=mr(),E=br(),T=xr(),R="Promise",P=E.CONSTRUCTOR,A=E.REJECTION_EVENT,D=E.SUBCLASSING,I=x.getterFor(R),k=x.set,w=S&&S.prototype,V=S,B=w,N=t.TypeError,j=t.document,_=t.process,q=T.f,U=q,L=!!(j&&j.createEvent&&t.dispatchEvent),$="unhandledrejection",X="rejectionhandled",ae=0,oe=1,ue=2,Ue=1,Ge=2,ce,Ne,_e,be,fe=function(C){var F;return f(C)&&c(F=C.then)?F:!1},xe=function(C,F){var z=F.value,H=F.state===oe,W=H?C.ok:C.fail,Te=C.resolve,Le=C.reject,Se=C.domain,Ee,lr,hr;try{W?(H||(F.rejection===Ge&&$e(F),F.rejection=Ue),W===!0?Ee=z:(Se&&Se.enter(),Ee=W(z),Se&&(Se.exit(),hr=!0)),Ee===C.promise?Le(new N("Promise-chain cycle")):(lr=fe(Ee))?a(lr,Ee,Te,Le):Te(Ee)):Le(z)}catch(vr){Se&&!hr&&Se.exit(),Le(vr)}},De=function(C,F){C.notified||(C.notified=!0,p(function(){for(var z=C.reactions,H;H=z.get();)xe(H,C);C.notified=!1,F&&!C.rejection&&Xe(C)}))},Ve=function(C,F,z){var H,W;L?(H=j.createEvent("Event"),H.promise=F,H.reason=z,H.initEvent(C,!1,!0),t.dispatchEvent(H)):H={promise:F,reason:z},!A&&(W=t["on"+C])?W(H):C===$&&y("Unhandled promise rejection",z)},Xe=function(C){a(d,t,function(){var F=C.facade,z=C.value,H=ur(C),W;if(H&&(W=m(function(){r?_.emit("unhandledRejection",z,F):Ve($,F,z)}),C.rejection=r||ur(C)?Ge:Ue,W.error))throw W.value})},ur=function(C){return C.rejection!==Ue&&!C.parent},$e=function(C){a(d,t,function(){var F=C.facade;r?_.emit("rejectionHandled",F):Ve(X,F,C.value)})},ge=function(C,F,z){return function(H){C(F,H,z)}},de=function(C,F,z){C.done||(C.done=!0,z&&(C=z),C.value=F,C.state=ue,De(C,!0))},Oe=function(C,F,z){if(!C.done){C.done=!0,z&&(C=z);try{if(C.facade===F)throw new N("Promise can't be resolved itself");var H=fe(F);H?p(function(){var W={done:!1};try{a(H,F,ge(Oe,W,C),ge(de,W,C))}catch(Te){de(W,Te,C)}}):(C.value=F,C.state=oe,De(C,!1))}catch(W){de({done:!1},W,C)}}};if(P&&(V=function(F){v(this,B),h(F),a(ce,this);var z=I(this);try{F(ge(Oe,z),ge(de,z))}catch(H){de(z,H)}},B=V.prototype,ce=function(F){k(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new b,rejection:!1,state:ae,value:null})},ce.prototype=s(B,"then",function(F,z){var H=I(this),W=q(g(this,V));return H.parent=!0,W.ok=c(F)?F:!0,W.fail=c(z)&&z,W.domain=r?_.domain:void 0,H.state===ae?H.reactions.add(W):p(function(){xe(W,H)}),W.promise}),Ne=function(){var C=new ce,F=I(C);this.promise=C,this.resolve=ge(Oe,F),this.reject=ge(de,F)},T.f=q=function(C){return C===V||C===_e?new Ne(C):U(C)},!e&&c(S)&&w!==Object.prototype)){be=w.then,D||s(w,"then",function(F,z){var H=this;return new V(function(W,Te){a(be,H,W,Te)}).then(F,z)},{unsafe:!0});try{delete w.constructor}catch{}o&&o(w,B)}return n({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:V}),_e=i.Promise,u(V,R,!1,!0),l(R),hn}var io={},Ui,ao;function Or(){return ao||(ao=1,Ui={}),Ui}var Gi,no;function xh(){if(no)return Gi;no=1;var n=ne(),e=Or(),r=n("iterator"),t=Array.prototype;return Gi=function(i){return i!==void 0&&(e.Array===i||t[r]===i)},Gi}var $i,so;function Tl(){if(so)return $i;so=1;var n=Qa(),e=nr(),r=Ir(),t=Or(),i=ne(),a=i("iterator");return $i=function(s){if(!r(s))return e(s,a)||e(s,"@@iterator")||t[n(s)]},$i}var zi,oo;function Oh(){if(oo)return zi;oo=1;var n=se(),e=Fe(),r=he(),t=_r(),i=Tl(),a=TypeError;return zi=function(s,o){var u=arguments.length<2?i(s):o;if(e(u))return r(n(u,s));throw new a(t(s)+" is not iterable")},zi}var Hi,uo;function Th(){if(uo)return Hi;uo=1;var n=se(),e=he(),r=nr();return Hi=function(t,i,a){var s,o;e(t);try{if(s=r(t,"return"),!s){if(i==="throw")throw a;return a}s=n(s,t)}catch(u){o=!0,s=u}if(i==="throw")throw a;if(o)throw s;return e(s),a},Hi}var Wi,lo;function Sl(){if(lo)return Wi;lo=1;var n=Za(),e=se(),r=he(),t=_r(),i=xh(),a=Xa(),s=Nr(),o=Oh(),u=Tl(),l=Th(),h=TypeError,c=function(v,g){this.stopped=v,this.result=g},f=c.prototype;return Wi=function(v,g,d){var p=d&&d.that,y=!!(d&&d.AS_ENTRIES),m=!!(d&&d.IS_RECORD),b=!!(d&&d.IS_ITERATOR),x=!!(d&&d.INTERRUPTED),S=n(g,p),E,T,R,P,A,D,I,k=function(B){var N=E;return E=void 0,N&&l(N,"normal"),new c(!0,B)},w=function(B){return y?(r(B),x?S(B[0],B[1],k):S(B[0],B[1])):x?S(B,k):S(B)};if(m)E=v.iterator;else if(b)E=v;else{if(T=u(v),!T)throw new h(t(v)+" is not iterable");if(i(T)){for(R=0,P=a(v);P>R;R++)if(A=w(v[R]),A&&s(f,A))return A;return new c(!1)}E=o(v,T)}for(D=m?v.next:E.next;!(I=e(D,E)).done;){var V=I.value;try{A=w(V)}catch(B){if(E)l(E,"throw",B);else throw B}if(typeof A=="object"&&A&&s(f,A))return A}return new c(!1)},Wi}var Yi,ho;function Sh(){if(ho)return Yi;ho=1;var n=ne(),e=n("iterator"),r=!1;try{var t=0,i={next:function(){return{done:!!t++}},return:function(){r=!0}};i[e]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Yi=function(a,s){try{if(!s&&!r)return!1}catch{return!1}var o=!1;try{var u={};u[e]=function(){return{next:function(){return{done:o=!0}}}},a(u)}catch{}return o},Yi}var Xi,vo;function El(){if(vo)return Xi;vo=1;var n=mr(),e=Sh(),r=br().CONSTRUCTOR;return Xi=r||!e(function(t){n.all(t).then(void 0,function(){})}),Xi}var co;function Eh(){if(co)return io;co=1;var n=ve(),e=se(),r=Fe(),t=xr(),i=Ja(),a=Sl(),s=El();return n({target:"Promise",stat:!0,forced:s},{all:function(u){var l=this,h=t.f(l),c=h.resolve,f=h.reject,v=i(function(){var g=r(l.resolve),d=[],p=0,y=1;a(u,function(m){var b=p++,x=!1;y++,e(g,l,m).then(function(S){x||(x=!0,d[b]=S,--y||c(d))},f)}),--y||c(d)});return v.error&&f(v.value),h.promise}}),io}var fo={},go;function Rh(){if(go)return fo;go=1;var n=ve(),e=Me(),r=br().CONSTRUCTOR,t=mr(),i=rr(),a=re(),s=tr(),o=t&&t.prototype;if(n({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&a(t)){var u=i("Promise").prototype.catch;o.catch!==u&&s(o,"catch",u,{unsafe:!0})}return fo}var po={},yo;function Ch(){if(yo)return po;yo=1;var n=ve(),e=se(),r=Fe(),t=xr(),i=Ja(),a=Sl(),s=El();return n({target:"Promise",stat:!0,forced:s},{race:function(u){var l=this,h=t.f(l),c=h.reject,f=i(function(){var v=r(l.resolve);a(u,function(g){e(v,l,g).then(h.resolve,c)})});return f.error&&c(f.value),h.promise}}),po}var mo={},bo;function wh(){if(bo)return mo;bo=1;var n=ve(),e=xr(),r=br().CONSTRUCTOR;return n({target:"Promise",stat:!0,forced:r},{reject:function(i){var a=e.f(this),s=a.reject;return s(i),a.promise}}),mo}var xo={},Ki,Oo;function Ph(){if(Oo)return Ki;Oo=1;var n=he(),e=ye(),r=xr();return Ki=function(t,i){if(n(t),e(i)&&i.constructor===t)return i;var a=r.f(t),s=a.resolve;return s(i),a.promise},Ki}var To;function Ah(){if(To)return xo;To=1;var n=ve(),e=rr(),r=Me(),t=mr(),i=br().CONSTRUCTOR,a=Ph(),s=e("Promise"),o=r&&!i;return n({target:"Promise",stat:!0,forced:r||i},{resolve:function(l){return a(o&&this===s?t:this,l)}}),xo}var So;function Ih(){return So||(So=1,bh(),Eh(),Rh(),Ch(),wh(),Ah()),ln}Ih();function Eo(n,e,r,t,i,a,s){try{var o=n[a](s),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(t,i)}function Be(n){return function(){var e=this,r=arguments;return new Promise(function(t,i){var a=n.apply(e,r);function s(u){Eo(a,t,i,s,o,"next",u)}function o(u){Eo(a,t,i,s,o,"throw",u)}s(void 0)})}}var Ro={},Co={},Qi,wo;function qe(){if(wo)return Qi;wo=1;var n=Qa(),e=String;return Qi=function(r){if(n(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},Qi}var Zi,Po;function Rl(){if(Po)return Zi;Po=1;var n=he();return Zi=function(){var e=n(this),r="";return e.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r},Zi}var Ji,Ao;function Cl(){if(Ao)return Ji;Ao=1;var n=Z(),e=Q(),r=e.RegExp,t=n(function(){var s=r("a","y");return s.lastIndex=2,s.exec("abcd")!==null}),i=t||n(function(){return!r("a","y").sticky}),a=t||n(function(){var s=r("^r","gy");return s.lastIndex=2,s.exec("str")!==null});return Ji={BROKEN_CARET:a,MISSED_STICKY:i,UNSUPPORTED_Y:t},Ji}var ea={},ra,Io;function Nh(){if(Io)return ra;Io=1;var n=cl(),e=Ka();return ra=Object.keys||function(t){return n(t,e)},ra}var No;function _h(){if(No)return ea;No=1;var n=we(),e=ll(),r=Ye(),t=he(),i=dr(),a=Nh();return ea.f=n&&!e?Object.defineProperties:function(o,u){t(o);for(var l=i(u),h=a(u),c=h.length,f=0,v;c>f;)r.f(o,v=h[f++],l[v]);return o},ea}var ta,_o;function Ur(){if(_o)return ta;_o=1;var n=he(),e=_h(),r=Ka(),t=Ya(),i=ml(),a=qr(),s=Wa(),o=">",u="<",l="prototype",h="script",c=s("IE_PROTO"),f=function(){},v=function(m){return u+h+o+m+u+"/"+h+o},g=function(m){m.write(v("")),m.close();var b=m.parentWindow.Object;return m=null,b},d=function(){var m=a("iframe"),b="java"+h+":",x;return m.style.display="none",i.appendChild(m),m.src=String(b),x=m.contentWindow.document,x.open(),x.write(v("document.F=Object")),x.close(),x.F},p,y=function(){try{p=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&p?g(p):d():g(p);for(var m=r.length;m--;)delete y[l][r[m]];return y()};return t[c]=!0,ta=Object.create||function(b,x){var S;return b!==null?(f[l]=n(b),S=new f,f[l]=null,S[c]=b):S=y(),x===void 0?S:e.f(S,x)},ta}var ia,Mo;function Mh(){if(Mo)return ia;Mo=1;var n=Z(),e=Q(),r=e.RegExp;return ia=n(function(){var t=r(".","s");return!(t.dotAll&&t.test(`
|
|
2
2
|
`)&&t.flags==="s")}),ia}var aa,qo;function qh(){if(qo)return aa;qo=1;var n=Z(),e=Q(),r=e.RegExp;return aa=n(function(){var t=r("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),aa}var na,Do;function en(){if(Do)return na;Do=1;var n=se(),e=J(),r=qe(),t=Rl(),i=Cl(),a=za(),s=Ur(),o=Lr().get,u=Mh(),l=qh(),h=a("native-string-replace",String.prototype.replace),c=RegExp.prototype.exec,f=c,v=e("".charAt),g=e("".indexOf),d=e("".replace),p=e("".slice),y=(function(){var E=/a/,T=/b*/g;return n(c,E,"a"),n(c,T,"a"),E.lastIndex!==0||T.lastIndex!==0})(),m=i.BROKEN_CARET,b=/()??/.exec("")[1]!==void 0,x=y||b||m||u||l,S=function(E,T){for(var R=E.groups=s(null),P=0;P<T.length;P++){var A=T[P];R[A[0]]=E[A[1]]}};return x&&(f=function(T){var R=this,P=o(R),A=r(T),D=P.raw,I,k,w;if(D)return D.lastIndex=R.lastIndex,I=n(f,D,A),R.lastIndex=D.lastIndex,I&&P.groups&&S(I,P.groups),I;var V=P.groups,B=m&&R.sticky,N=n(t,R),j=R.source,_=0,q=A;if(B){N=d(N,"y",""),g(N,"g")===-1&&(N+="g"),q=p(A,R.lastIndex);var U=R.lastIndex>0&&v(A,R.lastIndex-1);R.lastIndex>0&&(!R.multiline||R.multiline&&U!==`
|
|
3
3
|
`&&U!=="\r"&&U!=="\u2028"&&U!=="\u2029")&&(j="(?: (?:"+j+"))",q=" "+q,_++),k=new RegExp("^(?:"+j+")",N)}b&&(k=new RegExp("^"+j+"$(?!\\s)",N)),y&&(w=R.lastIndex);var L=n(c,B?k:R,q);return B?L?(L.input=A,L[0]=p(L[0],_),L.index=R.lastIndex,R.lastIndex+=L[0].length):R.lastIndex=0:y&&L&&(R.lastIndex=R.global?L.index+L[0].length:w),b&&L&&L.length>1&&n(h,L[0],k,function(){for(var $=1;$<arguments.length-2;$++)arguments[$]===void 0&&(L[$]=void 0)}),L&&V&&S(L,V),L}),na=f,na}var Vo;function Dh(){if(Vo)return Co;Vo=1;var n=ve(),e=en();return n({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),Co}var sa,Lo;function rn(){if(Lo)return sa;Lo=1,Dh();var n=se(),e=tr(),r=en(),t=Z(),i=ne(),a=yr(),s=i("species"),o=RegExp.prototype;return sa=function(u,l,h,c){var f=i(u),v=!t(function(){var y={};return y[f]=function(){return 7},""[u](y)!==7}),g=v&&!t(function(){var y=!1,m=/a/;if(u==="split"){var b={};b[s]=function(){return m},m={constructor:b,flags:""},m[f]=/./[f]}return m.exec=function(){return y=!0,null},m[f](""),!y});if(!v||!g||h){var d=/./[f],p=l(f,""[u],function(y,m,b,x,S){var E=m.exec;return E===r||E===o.exec?v&&!S?{done:!0,value:n(d,m,b,x)}:{done:!0,value:n(y,b,m,x)}:{done:!1}});e(String.prototype,u,p[0]),e(o,f,p[1])}c&&a(o[f],"sham",!0)},sa}var oa,ko;function Vh(){if(ko)return oa;ko=1;var n=J(),e=kr(),r=qe(),t=Pe(),i=n("".charAt),a=n("".charCodeAt),s=n("".slice),o=function(u){return function(l,h){var c=r(t(l)),f=e(h),v=c.length,g,d;return f<0||f>=v?u?"":void 0:(g=a(c,f),g<55296||g>56319||f+1===v||(d=a(c,f+1))<56320||d>57343?u?i(c,f):g:u?s(c,f,f+2):(g-55296<<10)+(d-56320)+65536)}};return oa={codeAt:o(!1),charAt:o(!0)},oa}var ua,jo;function tn(){if(jo)return ua;jo=1;var n=Vh().charAt;return ua=function(e,r,t){return r+(t&&n(e,r).length||1)},ua}var la,Bo;function Lh(){if(Bo)return la;Bo=1;var n=Q(),e=Z(),r=n.RegExp,t=!e(function(){var i=!0;try{r(".","d")}catch{i=!1}var a={},s="",o=i?"dgimsy":"gimsy",u=function(f,v){Object.defineProperty(a,f,{get:function(){return s+=v,!0}})},l={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(l.hasIndices="d");for(var h in l)u(h,l[h]);var c=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(a);return c!==o||s!==o});return la={correct:t},la}var ha,Fo;function Gr(){if(Fo)return ha;Fo=1;var n=se(),e=Ae(),r=Nr(),t=Lh(),i=Rl(),a=RegExp.prototype;return ha=t.correct?function(s){return s.flags}:function(s){return!t.correct&&r(a,s)&&!e(s,"flags")?n(i,s):s.flags},ha}var va,Uo;function an(){if(Uo)return va;Uo=1;var n=se(),e=he(),r=re(),t=er(),i=en(),a=TypeError;return va=function(s,o){var u=s.exec;if(r(u)){var l=n(u,s,o);return l!==null&&e(l),l}if(t(s)==="RegExp")return n(i,s,o);throw new a("RegExp#exec called on incompatible receiver")},va}var Go;function kh(){if(Go)return Ro;Go=1;var n=se(),e=J(),r=rn(),t=he(),i=ye(),a=sr(),s=qe(),o=Pe(),u=nr(),l=tn(),h=Gr(),c=an(),f=e("".indexOf);return r("match",function(v,g,d){return[function(y){var m=o(this),b=i(y)?u(y,v):void 0;return b?n(b,y,m):new RegExp(y)[v](s(m))},function(p){var y=t(this),m=s(p),b=d(g,y,m);if(b.done)return b.value;var x=s(h(y));if(!~f(x,"g"))return c(y,m);var S=!!~f(x,"u")||!!~f(x,"v");y.lastIndex=0;for(var E=[],T=0,R;(R=c(y,m))!==null;){var P=s(R[0]);E[T]=P,P===""&&(y.lastIndex=l(m,a(y.lastIndex),S)),T++}return T===0?null:E}]}),Ro}kh();var $o={},ca,zo;function jh(){if(zo)return ca;zo=1;var n=J(),e=Mr(),r=Math.floor,t=n("".charAt),i=n("".replace),a=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,o=/\$([$&'`]|\d{1,2})/g;return ca=function(u,l,h,c,f,v){var g=h+u.length,d=c.length,p=o;return f!==void 0&&(f=e(f),p=s),i(v,p,function(y,m){var b;switch(t(m,0)){case"$":return"$";case"&":return u;case"`":return a(l,0,h);case"'":return a(l,g);case"<":b=f[a(m,1,-1)];break;default:var x=+m;if(x===0)return y;if(x>d){var S=r(x/10);return S===0?y:S<=d?c[S-1]===void 0?t(m,1):c[S-1]+t(m,1):y}b=c[x-1]}return b===void 0?"":b})},ca}var Ho;function Bh(){if(Ho)return $o;Ho=1;var n=yl(),e=se(),r=J(),t=rn(),i=Z(),a=he(),s=re(),o=ye(),u=kr(),l=sr(),h=qe(),c=Pe(),f=tn(),v=nr(),g=jh(),d=Gr(),p=an(),y=ne(),m=y("replace"),b=Math.max,x=Math.min,S=r([].concat),E=r([].push),T=r("".indexOf),R=r("".slice),P=function(k){return k===void 0?k:String(k)},A=(function(){return"a".replace(/./,"$0")==="$0"})(),D=(function(){return/./[m]?/./[m]("a","$0")==="":!1})(),I=!i(function(){var k=/./;return k.exec=function(){var w=[];return w.groups={a:"7"},w},"".replace(k,"$<a>")!=="7"});return t("replace",function(k,w,V){var B=D?"$":"$0";return[function(j,_){var q=c(this),U=o(j)?v(j,m):void 0;return U?e(U,j,q,_):e(w,h(q),j,_)},function(N,j){var _=a(this),q=h(N),U=s(j);U||(j=h(j));var L=h(d(_));if(typeof j=="string"&&!~T(j,B)&&!~T(j,"$<")&&!~T(L,"y")){var $=V(w,_,q,j);if($.done)return $.value}var X=!!~T(L,"g"),ae;X&&(ae=!!~T(L,"u")||!!~T(L,"v"),_.lastIndex=0);for(var oe=[],ue;ue=p(_,q),!(ue===null||(E(oe,ue),!X));){var Ue=h(ue[0]);Ue===""&&(_.lastIndex=f(q,l(_.lastIndex),ae))}for(var Ge="",ce=0,Ne=0;Ne<oe.length;Ne++){ue=oe[Ne];for(var _e=h(ue[0]),be=b(x(u(ue.index),q.length),0),fe=[],xe,De=1;De<ue.length;De++)E(fe,P(ue[De]));var Ve=ue.groups;if(U){var Xe=S([_e],fe,be,q);Ve!==void 0&&E(Xe,Ve),xe=h(n(j,void 0,Xe))}else xe=g(_e,q,be,fe,Ve,j);be>=ce&&(Ge+=R(q,ce,be)+xe,ce=be+_e.length)}return Ge+R(q,ce)}]},!I||!A||D),$o}Bh();var Wo={},fa,Yo;function Fh(){if(Yo)return fa;Yo=1;var n=ye(),e=er(),r=ne(),t=r("match");return fa=function(i){var a;return n(i)&&((a=i[t])!==void 0?!!a:e(i)==="RegExp")},fa}var ga,Xo;function nn(){if(Xo)return ga;Xo=1;var n=Fh(),e=TypeError;return ga=function(r){if(n(r))throw new e("The method doesn't accept regular expressions");return r},ga}var da,Ko;function sn(){if(Ko)return da;Ko=1;var n=ne(),e=n("match");return da=function(r){var t=/./;try{"/./"[r](t)}catch{try{return t[e]=!1,"/./"[r](t)}catch{}}return!1},da}var Qo;function Uh(){if(Qo)return Wo;Qo=1;var n=ve(),e=Fr(),r=Dr().f,t=sr(),i=qe(),a=nn(),s=Pe(),o=sn(),u=Me(),l=e("".slice),h=Math.min,c=o("startsWith"),f=!u&&!c&&!!(function(){var v=r(String.prototype,"startsWith");return v&&!v.writable})();return n({target:"String",proto:!0,forced:!f&&!c},{startsWith:function(g){var d=i(s(this));a(g);var p=i(g),y=t(h(arguments.length>1?arguments[1]:void 0,d.length));return l(d,y,y+p.length)===p}}),Wo}Uh();var pa,Zo;function Gh(){if(Zo)return pa;Zo=1;var n=ne(),e=Ur(),r=Ye().f,t=n("unscopables"),i=Array.prototype;return i[t]===void 0&&r(i,t,{configurable:!0,value:e(null)}),pa=function(a){i[t][a]=!0},pa}var ya,Jo;function $h(){if(Jo)return ya;Jo=1;var n=Z();return ya=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ya}var ma,eu;function wl(){if(eu)return ma;eu=1;var n=Ae(),e=re(),r=Mr(),t=Wa(),i=$h(),a=t("IE_PROTO"),s=Object,o=s.prototype;return ma=i?s.getPrototypeOf:function(u){var l=r(u);if(n(l,a))return l[a];var h=l.constructor;return e(h)&&l instanceof h?h.prototype:l instanceof s?o:null},ma}var ba,ru;function Pl(){if(ru)return ba;ru=1;var n=Z(),e=re(),r=ye(),t=Ur(),i=wl(),a=tr(),s=ne(),o=Me(),u=s("iterator"),l=!1,h,c,f;[].keys&&(f=[].keys(),"next"in f?(c=i(i(f)),c!==Object.prototype&&(h=c)):l=!0);var v=!r(h)||n(function(){var g={};return h[u].call(g)!==g});return v?h={}:o&&(h=t(h)),e(h[u])||a(h,u,function(){return this}),ba={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:l},ba}var xa,tu;function zh(){if(tu)return xa;tu=1;var n=Pl().IteratorPrototype,e=Ur(),r=Fa(),t=Br(),i=Or(),a=function(){return this};return xa=function(s,o,u,l){var h=o+" Iterator";return s.prototype=e(n,{next:r(+!l,u)}),t(s,h,!1,!0),i[h]=a,s},xa}var Oa,iu;function Hh(){if(iu)return Oa;iu=1;var n=ve(),e=se(),r=Me(),t=Vr(),i=re(),a=zh(),s=wl(),o=dl(),u=Br(),l=yr(),h=tr(),c=ne(),f=Or(),v=Pl(),g=t.PROPER,d=t.CONFIGURABLE,p=v.IteratorPrototype,y=v.BUGGY_SAFARI_ITERATORS,m=c("iterator"),b="keys",x="values",S="entries",E=function(){return this};return Oa=function(T,R,P,A,D,I,k){a(P,R,A);var w=function(X){if(X===D&&_)return _;if(!y&&X&&X in N)return N[X];switch(X){case b:return function(){return new P(this,X)};case x:return function(){return new P(this,X)};case S:return function(){return new P(this,X)}}return function(){return new P(this)}},V=R+" Iterator",B=!1,N=T.prototype,j=N[m]||N["@@iterator"]||D&&N[D],_=!y&&j||w(D),q=R==="Array"&&N.entries||j,U,L,$;if(q&&(U=s(q.call(new T)),U!==Object.prototype&&U.next&&(!r&&s(U)!==p&&(o?o(U,p):i(U[m])||h(U,m,E)),u(U,V,!0,!0),r&&(f[V]=E))),g&&D===x&&j&&j.name!==x&&(!r&&d?l(N,"name",x):(B=!0,_=function(){return e(j,this)})),D)if(L={values:w(x),keys:I?_:w(b),entries:w(S)},k)for($ in L)(y||B||!($ in N))&&h(N,$,L[$]);else n({target:R,proto:!0,forced:y||B},L);return(!r||k)&&N[m]!==_&&h(N,m,_,{name:D}),f[R]=_,L},Oa}var Ta,au;function Wh(){return au||(au=1,Ta=function(n,e){return{value:n,done:e}}),Ta}var Sa,nu;function Al(){if(nu)return Sa;nu=1;var n=dr(),e=Gh(),r=Or(),t=Lr(),i=Ye().f,a=Hh(),s=Wh(),o=Me(),u=we(),l="Array Iterator",h=t.set,c=t.getterFor(l);Sa=a(Array,"Array",function(v,g){h(this,{type:l,target:n(v),index:0,kind:g})},function(){var v=c(this),g=v.target,d=v.index++;if(!g||d>=g.length)return v.target=null,s(void 0,!0);switch(v.kind){case"keys":return s(d,!1);case"values":return s(g[d],!1)}return s([d,g[d]],!1)},"values");var f=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!o&&u&&f.name!=="values")try{i(f,"name",{value:"values"})}catch{}return Sa}Al();var su={},Ea,ou;function Yh(){return ou||(ou=1,Ea={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Ea}var Ra,uu;function Xh(){if(uu)return Ra;uu=1;var n=qr(),e=n("span").classList,r=e&&e.constructor&&e.constructor.prototype;return Ra=r===Object.prototype?void 0:r,Ra}var lu;function Kh(){if(lu)return su;lu=1;var n=Q(),e=Yh(),r=Xh(),t=Al(),i=yr(),a=Br(),s=ne(),o=s("iterator"),u=t.values,l=function(c,f){if(c){if(c[o]!==u)try{i(c,o,u)}catch{c[o]=u}if(a(c,f,!0),e[f]){for(var v in t)if(c[v]!==t[v])try{i(c,v,t[v])}catch{c[v]=t[v]}}}};for(var h in e)l(n[h]&&n[h].prototype,h);return l(r,"DOMTokenList"),su}Kh();var hu={},Ca,vu;function Qh(){if(vu)return Ca;vu=1;var n=Fe(),e=Mr(),r=tl(),t=Xa(),i=TypeError,a="Reduce of empty array with no initial value",s=function(o){return function(u,l,h,c){var f=e(u),v=r(f),g=t(f);if(n(l),g===0&&h<2)throw new i(a);var d=o?g-1:0,p=o?-1:1;if(h<2)for(;;){if(d in v){c=v[d],d+=p;break}if(d+=p,o?d<0:g<=d)throw new i(a)}for(;o?d>=0:g>d;d+=p)d in v&&(c=l(c,v[d],d,f));return c}};return Ca={left:s(!1),right:s(!0)},Ca}var wa,cu;function Il(){if(cu)return wa;cu=1;var n=Z();return wa=function(e,r){var t=[][e];return!!t&&n(function(){t.call(null,r||function(){return 1},1)})},wa}var fu;function Zh(){if(fu)return hu;fu=1;var n=ve(),e=Qh().left,r=Il(),t=Ua(),i=jr(),a=!i&&t>79&&t<83,s=a||!r("reduce");return n({target:"Array",proto:!0,forced:s},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),hu}Zh();var gu={},du;function Jh(){if(du)return gu;du=1;var n=ve(),e=Fr(),r=Dr().f,t=sr(),i=qe(),a=nn(),s=Pe(),o=sn(),u=Me(),l=e("".slice),h=Math.min,c=o("endsWith"),f=!u&&!c&&!!(function(){var v=r(String.prototype,"endsWith");return v&&!v.writable})();return n({target:"String",proto:!0,forced:!f&&!c},{endsWith:function(g){var d=i(s(this));a(g);var p=i(g),y=arguments.length>1?arguments[1]:void 0,m=d.length,b=y===void 0?m:h(t(y),m);return l(d,b-p.length,b)===p}}),gu}Jh();var pu={},yu;function ev(){if(yu)return pu;yu=1;var n=se(),e=J(),r=rn(),t=he(),i=ye(),a=Pe(),s=pl(),o=tn(),u=sr(),l=qe(),h=nr(),c=Gr(),f=an(),v=Cl(),g=Z(),d=v.UNSUPPORTED_Y,p=4294967295,y=Math.min,m=e([].push),b=e("".slice),x=e("".indexOf),S=!g(function(){var T=/(?:)/,R=T.exec;T.exec=function(){return R.apply(this,arguments)};var P="ab".split(T);return P.length!==2||P[0]!=="a"||P[1]!=="b"}),E="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return r("split",function(T,R,P){var A="0".split(void 0,0).length?function(D,I){return D===void 0&&I===0?[]:n(R,this,D,I)}:R;return[function(I,k){var w=a(this),V=i(I)?h(I,T):void 0;return V?n(V,I,w,k):n(A,l(w),I,k)},function(D,I){var k=t(this),w=l(D);if(!E){var V=P(A,k,w,I,A!==R);if(V.done)return V.value}var B=s(k,RegExp),N=l(c(k)),j=!!~x(N,"u")||!!~x(N,"v");d?~x(N,"g")||(N+="g"):~x(N,"y")||(N+="y");var _=new B(d?"^(?:"+k.source+")":k,N),q=I===void 0?p:I>>>0;if(q===0)return[];if(w.length===0)return f(_,w)===null?[w]:[];for(var U=0,L=0,$=[];L<w.length;){_.lastIndex=d?0:L;var X=f(_,d?b(w,L):w),ae;if(X===null||(ae=y(u(_.lastIndex+(d?L:0)),w.length))===U)L=o(w,L,j);else{if(m($,b(w,U,L)),$.length===q)return $;for(var oe=1;oe<=X.length-1;oe++)if(m($,X[oe]),$.length===q)return $;L=U=ae}}return m($,b(w,U)),$}]},E||!S,d),pu}ev();var fr={exports:{}},Ze={exports:{}},rv=Ze.exports,mu;function tv(){return mu||(mu=1,(function(){var n,e,r,t,i,a;typeof performance<"u"&&performance!==null&&performance.now?Ze.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ze.exports=function(){return(n()-i)/1e6},e=process.hrtime,n=function(){var s;return s=e(),s[0]*1e9+s[1]},t=n(),a=process.uptime()*1e9,i=t-a):Date.now?(Ze.exports=function(){return Date.now()-r},r=Date.now()):(Ze.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(rv)),Ze.exports}var bu;function iv(){if(bu)return fr.exports;bu=1;for(var n=tv(),e=typeof window>"u"?globalThis:window,r=["moz","webkit"],t="AnimationFrame",i=e["request"+t],a=e["cancel"+t]||e["cancelRequest"+t],s=0;!i&&s<r.length;s++)i=e[r[s]+"Request"+t],a=e[r[s]+"Cancel"+t]||e[r[s]+"CancelRequest"+t];if(!i||!a){var o=0,u=0,l=[],h=1e3/60;i=function(c){if(l.length===0){var f=n(),v=Math.max(0,h-(f-o));o=v+f,setTimeout(function(){var g=l.slice(0);l.length=0;for(var d=0;d<g.length;d++)if(!g[d].cancelled)try{g[d].callback(o)}catch(p){setTimeout(function(){throw p},0)}},Math.round(v))}return l.push({handle:++u,callback:c,cancelled:!1}),u},a=function(c){for(var f=0;f<l.length;f++)l[f].handle===c&&(l[f].cancelled=!0)}}return fr.exports=function(c){return i.call(e,c)},fr.exports.cancel=function(){a.apply(e,arguments)},fr.exports.polyfill=function(c){c||(c=e),c.requestAnimationFrame=i,c.cancelAnimationFrame=a},fr.exports}var av=iv();const Pa=rl(av);var xu={},Aa,Ou;function Nl(){return Ou||(Ou=1,Aa=`
|
|
4
4
|
\v\f\r \u2028\u2029\uFEFF`),Aa}var Ia,Tu;function nv(){if(Tu)return Ia;Tu=1;var n=J(),e=Pe(),r=qe(),t=Nl(),i=n("".replace),a=RegExp("^["+t+"]+"),s=RegExp("(^|[^"+t+"])["+t+"]+$"),o=function(u){return function(l){var h=r(e(l));return u&1&&(h=i(h,a,"")),u&2&&(h=i(h,s,"$1")),h}};return Ia={start:o(1),end:o(2),trim:o(3)},Ia}var Na,Su;function sv(){if(Su)return Na;Su=1;var n=Vr().PROPER,e=Z(),r=Nl(),t="
";return Na=function(i){return e(function(){return!!r[i]()||t[i]()!==t||n&&r[i].name!==i})},Na}var Eu;function ov(){if(Eu)return xu;Eu=1;var n=ve(),e=nv().trim,r=sv();return n({target:"String",proto:!0,forced:r("trim")},{trim:function(){return e(this)}}),xu}ov();var _a,Ru;function uv(){return Ru||(Ru=1,_a=function(n){this.ok=!1,this.alpha=1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n=n.replace(/ /g,""),n=n.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};n=e[n]||n;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3]),parseFloat(u[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],t=0;t<r.length;t++){var i=r[t].re,a=r[t].process,s=i.exec(n);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l<r.length;l++)for(var h=r[l].example,c=0;c<h.length;c++)u[u.length]=h[c];for(var f in e)u[u.length]=f;var v=document.createElement("ul");v.setAttribute("id","rgbcolor-examples");for(var l=0;l<u.length;l++)try{var g=document.createElement("li"),d=new RGBColor(u[l]),p=document.createElement("div");p.style.cssText="margin: 3px; border: 1px solid black; background:"+d.toHex()+"; color:"+d.toHex(),p.appendChild(document.createTextNode("test"));var y=document.createTextNode(" "+u[l]+" -> "+d.toRGB()+" -> "+d.toHex());g.appendChild(p),g.appendChild(y),v.appendChild(g)}catch{}return v}}),_a}var lv=uv();const Va=rl(lv);var Cu={},wu;function hv(){if(wu)return Cu;wu=1;var n=ve(),e=Fr(),r=vl().indexOf,t=Il(),i=e([].indexOf),a=!!i&&1/i([1],1,-0)<0,s=a||!t("indexOf");return n({target:"Array",proto:!0,forced:s},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return a?i(this,u,l)||0:r(this,u,l)}}),Cu}hv();var Pu={},Au;function vv(){if(Au)return Pu;Au=1;var n=ve(),e=J(),r=nn(),t=Pe(),i=qe(),a=sn(),s=e("".indexOf);return n({target:"String",proto:!0,forced:!a("includes")},{includes:function(u){return!!~s(i(t(this)),i(r(u)),arguments.length>1?arguments[1]:void 0)}}),Pu}vv();var Iu={},Ma,Nu;function cv(){if(Nu)return Ma;Nu=1;var n=er();return Ma=Array.isArray||function(r){return n(r)==="Array"},Ma}var _u;function fv(){if(_u)return Iu;_u=1;var n=ve(),e=J(),r=cv(),t=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),t(this)}}),Iu}fv();var _l=function(n,e){return(_l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])})(n,e)};function Ml(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}_l(n,e),n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function gv(n){var e="";Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++){var t=n[r];if(t.type===O.CLOSE_PATH)e+="z";else if(t.type===O.HORIZ_LINE_TO)e+=(t.relative?"h":"H")+t.x;else if(t.type===O.VERT_LINE_TO)e+=(t.relative?"v":"V")+t.y;else if(t.type===O.MOVE_TO)e+=(t.relative?"m":"M")+t.x+" "+t.y;else if(t.type===O.LINE_TO)e+=(t.relative?"l":"L")+t.x+" "+t.y;else if(t.type===O.CURVE_TO)e+=(t.relative?"c":"C")+t.x1+" "+t.y1+" "+t.x2+" "+t.y2+" "+t.x+" "+t.y;else if(t.type===O.SMOOTH_CURVE_TO)e+=(t.relative?"s":"S")+t.x2+" "+t.y2+" "+t.x+" "+t.y;else if(t.type===O.QUAD_TO)e+=(t.relative?"q":"Q")+t.x1+" "+t.y1+" "+t.x+" "+t.y;else if(t.type===O.SMOOTH_QUAD_TO)e+=(t.relative?"t":"T")+t.x+" "+t.y;else{if(t.type!==O.ARC)throw new Error('Unexpected command type "'+t.type+'" at index '+r+".");e+=(t.relative?"a":"A")+t.rX+" "+t.rY+" "+t.xRot+" "+ +t.lArcFlag+" "+ +t.sweepFlag+" "+t.x+" "+t.y}}return e}function La(n,e){var r=n[0],t=n[1];return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Ce(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var r=0;r<n.length;r++)if(typeof n[r]!="number")throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof n[r]+" == typeof "+n[r]);return!0}var ze=Math.PI;function qa(n,e,r){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;var t=n.rX,i=n.rY,a=n.x,s=n.y;t=Math.abs(n.rX),i=Math.abs(n.rY);var o=La([(e-a)/2,(r-s)/2],-n.xRot/180*ze),u=o[0],l=o[1],h=Math.pow(u,2)/Math.pow(t,2)+Math.pow(l,2)/Math.pow(i,2);1<h&&(t*=Math.sqrt(h),i*=Math.sqrt(h)),n.rX=t,n.rY=i;var c=Math.pow(t,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(u,2),f=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(t,2)*Math.pow(i,2)-c)/c)),v=t*l/i*f,g=-i*u/t*f,d=La([v,g],n.xRot/180*ze);n.cX=d[0]+(e+a)/2,n.cY=d[1]+(r+s)/2,n.phi1=Math.atan2((l-g)/i,(u-v)/t),n.phi2=Math.atan2((-l-g)/i,(-u-v)/t),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*ze),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*ze),n.phi1*=180/ze,n.phi2*=180/ze}function Mu(n,e,r){Ce(n,e,r);var t=n*n+e*e-r*r;if(0>t)return[];if(t===0)return[[n*r/(n*n+e*e),e*r/(n*n+e*e)]];var i=Math.sqrt(t);return[[(n*r+e*i)/(n*n+e*e),(e*r-n*i)/(n*n+e*e)],[(n*r-e*i)/(n*n+e*e),(e*r+n*i)/(n*n+e*e)]]}var ie,ke=Math.PI/180;function qu(n,e,r){return(1-r)*n+r*e}function Du(n,e,r,t){return n+Math.cos(t/180*ze)*e+Math.sin(t/180*ze)*r}function Vu(n,e,r,t){var i=1e-6,a=e-n,s=r-e,o=3*a+3*(t-r)-6*s,u=6*(s-a),l=3*a;return Math.abs(o)<i?[-l/u]:(function(h,c,f){var v=h*h/4-c;if(v<-f)return[];if(v<=f)return[-h/2];var g=Math.sqrt(v);return[-h/2-g,-h/2+g]})(u/o,l/o,i)}function Lu(n,e,r,t,i){var a=1-i;return n*(a*a*a)+e*(3*a*a*i)+r*(3*a*i*i)+t*(i*i*i)}(function(n){function e(){return i((function(o,u,l){return o.relative&&(o.x1!==void 0&&(o.x1+=u),o.y1!==void 0&&(o.y1+=l),o.x2!==void 0&&(o.x2+=u),o.y2!==void 0&&(o.y2+=l),o.x!==void 0&&(o.x+=u),o.y!==void 0&&(o.y+=l),o.relative=!1),o}))}function r(){var o=NaN,u=NaN,l=NaN,h=NaN;return i((function(c,f,v){return c.type&O.SMOOTH_CURVE_TO&&(c.type=O.CURVE_TO,o=isNaN(o)?f:o,u=isNaN(u)?v:u,c.x1=c.relative?f-o:2*f-o,c.y1=c.relative?v-u:2*v-u),c.type&O.CURVE_TO?(o=c.relative?f+c.x2:c.x2,u=c.relative?v+c.y2:c.y2):(o=NaN,u=NaN),c.type&O.SMOOTH_QUAD_TO&&(c.type=O.QUAD_TO,l=isNaN(l)?f:l,h=isNaN(h)?v:h,c.x1=c.relative?f-l:2*f-l,c.y1=c.relative?v-h:2*v-h),c.type&O.QUAD_TO?(l=c.relative?f+c.x1:c.x1,h=c.relative?v+c.y1:c.y1):(l=NaN,h=NaN),c}))}function t(){var o=NaN,u=NaN;return i((function(l,h,c){if(l.type&O.SMOOTH_QUAD_TO&&(l.type=O.QUAD_TO,o=isNaN(o)?h:o,u=isNaN(u)?c:u,l.x1=l.relative?h-o:2*h-o,l.y1=l.relative?c-u:2*c-u),l.type&O.QUAD_TO){o=l.relative?h+l.x1:l.x1,u=l.relative?c+l.y1:l.y1;var f=l.x1,v=l.y1;l.type=O.CURVE_TO,l.x1=((l.relative?0:h)+2*f)/3,l.y1=((l.relative?0:c)+2*v)/3,l.x2=(l.x+2*f)/3,l.y2=(l.y+2*v)/3}else o=NaN,u=NaN;return l}))}function i(o){var u=0,l=0,h=NaN,c=NaN;return function(f){if(isNaN(h)&&!(f.type&O.MOVE_TO))throw new Error("path must start with moveto");var v=o(f,u,l,h,c);return f.type&O.CLOSE_PATH&&(u=h,l=c),f.x!==void 0&&(u=f.relative?u+f.x:f.x),f.y!==void 0&&(l=f.relative?l+f.y:f.y),f.type&O.MOVE_TO&&(h=u,c=l),v}}function a(o,u,l,h,c,f){return Ce(o,u,l,h,c,f),i((function(v,g,d,p){var y=v.x1,m=v.x2,b=v.relative&&!isNaN(p),x=v.x!==void 0?v.x:b?0:g,S=v.y!==void 0?v.y:b?0:d;function E(L){return L*L}v.type&O.HORIZ_LINE_TO&&u!==0&&(v.type=O.LINE_TO,v.y=v.relative?0:d),v.type&O.VERT_LINE_TO&&l!==0&&(v.type=O.LINE_TO,v.x=v.relative?0:g),v.x!==void 0&&(v.x=v.x*o+S*l+(b?0:c)),v.y!==void 0&&(v.y=x*u+v.y*h+(b?0:f)),v.x1!==void 0&&(v.x1=v.x1*o+v.y1*l+(b?0:c)),v.y1!==void 0&&(v.y1=y*u+v.y1*h+(b?0:f)),v.x2!==void 0&&(v.x2=v.x2*o+v.y2*l+(b?0:c)),v.y2!==void 0&&(v.y2=m*u+v.y2*h+(b?0:f));var T=o*h-u*l;if(v.xRot!==void 0&&(o!==1||u!==0||l!==0||h!==1))if(T===0)delete v.rX,delete v.rY,delete v.xRot,delete v.lArcFlag,delete v.sweepFlag,v.type=O.LINE_TO;else{var R=v.xRot*Math.PI/180,P=Math.sin(R),A=Math.cos(R),D=1/E(v.rX),I=1/E(v.rY),k=E(A)*D+E(P)*I,w=2*P*A*(D-I),V=E(P)*D+E(A)*I,B=k*h*h-w*u*h+V*u*u,N=w*(o*h+u*l)-2*(k*l*h+V*o*u),j=k*l*l-w*o*l+V*o*o,_=(Math.atan2(N,B-j)+Math.PI)%Math.PI/2,q=Math.sin(_),U=Math.cos(_);v.rX=Math.abs(T)/Math.sqrt(B*E(U)+N*q*U+j*E(q)),v.rY=Math.abs(T)/Math.sqrt(B*E(q)-N*q*U+j*E(U)),v.xRot=180*_/Math.PI}return v.sweepFlag!==void 0&&0>T&&(v.sweepFlag=+!v.sweepFlag),v}))}function s(){return function(o){var u={};for(var l in o)u[l]=o[l];return u}}n.ROUND=function(o){function u(l){return Math.round(l*o)/o}return o===void 0&&(o=1e13),Ce(o),function(l){return l.x1!==void 0&&(l.x1=u(l.x1)),l.y1!==void 0&&(l.y1=u(l.y1)),l.x2!==void 0&&(l.x2=u(l.x2)),l.y2!==void 0&&(l.y2=u(l.y2)),l.x!==void 0&&(l.x=u(l.x)),l.y!==void 0&&(l.y=u(l.y)),l.rX!==void 0&&(l.rX=u(l.rX)),l.rY!==void 0&&(l.rY=u(l.rY)),l}},n.TO_ABS=e,n.TO_REL=function(){return i((function(o,u,l){return o.relative||(o.x1!==void 0&&(o.x1-=u),o.y1!==void 0&&(o.y1-=l),o.x2!==void 0&&(o.x2-=u),o.y2!==void 0&&(o.y2-=l),o.x!==void 0&&(o.x-=u),o.y!==void 0&&(o.y-=l),o.relative=!0),o}))},n.NORMALIZE_HVZ=function(o,u,l){return o===void 0&&(o=!0),u===void 0&&(u=!0),l===void 0&&(l=!0),i((function(h,c,f,v,g){if(isNaN(v)&&!(h.type&O.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&O.HORIZ_LINE_TO&&(h.type=O.LINE_TO,h.y=h.relative?0:f),l&&h.type&O.VERT_LINE_TO&&(h.type=O.LINE_TO,h.x=h.relative?0:c),o&&h.type&O.CLOSE_PATH&&(h.type=O.LINE_TO,h.x=h.relative?v-c:v,h.y=h.relative?g-f:g),h.type&O.ARC&&(h.rX===0||h.rY===0)&&(h.type=O.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h}))},n.NORMALIZE_ST=r,n.QT_TO_C=t,n.INFO=i,n.SANITIZE=function(o){o===void 0&&(o=0),Ce(o);var u=NaN,l=NaN,h=NaN,c=NaN;return i((function(f,v,g,d,p){var y=Math.abs,m=!1,b=0,x=0;if(f.type&O.SMOOTH_CURVE_TO&&(b=isNaN(u)?0:v-u,x=isNaN(l)?0:g-l),f.type&(O.CURVE_TO|O.SMOOTH_CURVE_TO)?(u=f.relative?v+f.x2:f.x2,l=f.relative?g+f.y2:f.y2):(u=NaN,l=NaN),f.type&O.SMOOTH_QUAD_TO?(h=isNaN(h)?v:2*v-h,c=isNaN(c)?g:2*g-c):f.type&O.QUAD_TO?(h=f.relative?v+f.x1:f.x1,c=f.relative?g+f.y1:f.y2):(h=NaN,c=NaN),f.type&O.LINE_COMMANDS||f.type&O.ARC&&(f.rX===0||f.rY===0||!f.lArcFlag)||f.type&O.CURVE_TO||f.type&O.SMOOTH_CURVE_TO||f.type&O.QUAD_TO||f.type&O.SMOOTH_QUAD_TO){var S=f.x===void 0?0:f.relative?f.x:f.x-v,E=f.y===void 0?0:f.relative?f.y:f.y-g;b=isNaN(h)?f.x1===void 0?b:f.relative?f.x:f.x1-v:h-v,x=isNaN(c)?f.y1===void 0?x:f.relative?f.y:f.y1-g:c-g;var T=f.x2===void 0?0:f.relative?f.x:f.x2-v,R=f.y2===void 0?0:f.relative?f.y:f.y2-g;y(S)<=o&&y(E)<=o&&y(b)<=o&&y(x)<=o&&y(T)<=o&&y(R)<=o&&(m=!0)}return f.type&O.CLOSE_PATH&&y(v-d)<=o&&y(g-p)<=o&&(m=!0),m?[]:f}))},n.MATRIX=a,n.ROTATE=function(o,u,l){u===void 0&&(u=0),l===void 0&&(l=0),Ce(o,u,l);var h=Math.sin(o),c=Math.cos(o);return a(c,h,-h,c,u-u*c+l*h,l-u*h-l*c)},n.TRANSLATE=function(o,u){return u===void 0&&(u=0),Ce(o,u),a(1,0,0,1,o,u)},n.SCALE=function(o,u){return u===void 0&&(u=o),Ce(o,u),a(o,0,0,u,0,0)},n.SKEW_X=function(o){return Ce(o),a(1,0,Math.atan(o),1,0,0)},n.SKEW_Y=function(o){return Ce(o),a(1,Math.atan(o),0,1,0,0)},n.X_AXIS_SYMMETRY=function(o){return o===void 0&&(o=0),Ce(o),a(-1,0,0,1,o,0)},n.Y_AXIS_SYMMETRY=function(o){return o===void 0&&(o=0),Ce(o),a(1,0,0,-1,0,o)},n.A_TO_C=function(){return i((function(o,u,l){return O.ARC===o.type?(function(h,c,f){var v,g,d,p;h.cX||qa(h,c,f);for(var y=Math.min(h.phi1,h.phi2),m=Math.max(h.phi1,h.phi2)-y,b=Math.ceil(m/90),x=new Array(b),S=c,E=f,T=0;T<b;T++){var R=qu(h.phi1,h.phi2,T/b),P=qu(h.phi1,h.phi2,(T+1)/b),A=P-R,D=4/3*Math.tan(A*ke/4),I=[Math.cos(R*ke)-D*Math.sin(R*ke),Math.sin(R*ke)+D*Math.cos(R*ke)],k=I[0],w=I[1],V=[Math.cos(P*ke),Math.sin(P*ke)],B=V[0],N=V[1],j=[B+D*Math.sin(P*ke),N-D*Math.cos(P*ke)],_=j[0],q=j[1];x[T]={relative:h.relative,type:O.CURVE_TO};var U=function(L,$){var X=La([L*h.rX,$*h.rY],h.xRot),ae=X[0],oe=X[1];return[h.cX+ae,h.cY+oe]};v=U(k,w),x[T].x1=v[0],x[T].y1=v[1],g=U(_,q),x[T].x2=g[0],x[T].y2=g[1],d=U(B,N),x[T].x=d[0],x[T].y=d[1],h.relative&&(x[T].x1-=S,x[T].y1-=E,x[T].x2-=S,x[T].y2-=E,x[T].x-=S,x[T].y-=E),S=(p=[x[T].x,x[T].y])[0],E=p[1]}return x})(o,o.relative?0:u,o.relative?0:l):o}))},n.ANNOTATE_ARCS=function(){return i((function(o,u,l){return o.relative&&(u=0,l=0),O.ARC===o.type&&qa(o,u,l),o}))},n.CLONE=s,n.CALCULATE_BOUNDS=function(){var o=function(f){var v={};for(var g in f)v[g]=f[g];return v},u=e(),l=t(),h=r(),c=i((function(f,v,g){var d=h(l(u(o(f))));function p(q){q>c.maxX&&(c.maxX=q),q<c.minX&&(c.minX=q)}function y(q){q>c.maxY&&(c.maxY=q),q<c.minY&&(c.minY=q)}if(d.type&O.DRAWING_COMMANDS&&(p(v),y(g)),d.type&O.HORIZ_LINE_TO&&p(d.x),d.type&O.VERT_LINE_TO&&y(d.y),d.type&O.LINE_TO&&(p(d.x),y(d.y)),d.type&O.CURVE_TO){p(d.x),y(d.y);for(var m=0,b=Vu(v,d.x1,d.x2,d.x);m<b.length;m++)0<(_=b[m])&&1>_&&p(Lu(v,d.x1,d.x2,d.x,_));for(var x=0,S=Vu(g,d.y1,d.y2,d.y);x<S.length;x++)0<(_=S[x])&&1>_&&y(Lu(g,d.y1,d.y2,d.y,_))}if(d.type&O.ARC){p(d.x),y(d.y),qa(d,v,g);for(var E=d.xRot/180*Math.PI,T=Math.cos(E)*d.rX,R=Math.sin(E)*d.rX,P=-Math.sin(E)*d.rY,A=Math.cos(E)*d.rY,D=d.phi1<d.phi2?[d.phi1,d.phi2]:-180>d.phi2?[d.phi2+360,d.phi1+360]:[d.phi2,d.phi1],I=D[0],k=D[1],w=function(q){var U=q[0],L=q[1],$=180*Math.atan2(L,U)/Math.PI;return $<I?$+360:$},V=0,B=Mu(P,-T,0).map(w);V<B.length;V++)(_=B[V])>I&&_<k&&p(Du(d.cX,T,P,_));for(var N=0,j=Mu(A,-R,0).map(w);N<j.length;N++){var _;(_=j[N])>I&&_<k&&y(Du(d.cY,R,A,_))}}return f}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(ie||(ie={}));var Re,ql=(function(){function n(){}return n.prototype.round=function(e){return this.transform(ie.ROUND(e))},n.prototype.toAbs=function(){return this.transform(ie.TO_ABS())},n.prototype.toRel=function(){return this.transform(ie.TO_REL())},n.prototype.normalizeHVZ=function(e,r,t){return this.transform(ie.NORMALIZE_HVZ(e,r,t))},n.prototype.normalizeST=function(){return this.transform(ie.NORMALIZE_ST())},n.prototype.qtToC=function(){return this.transform(ie.QT_TO_C())},n.prototype.aToC=function(){return this.transform(ie.A_TO_C())},n.prototype.sanitize=function(e){return this.transform(ie.SANITIZE(e))},n.prototype.translate=function(e,r){return this.transform(ie.TRANSLATE(e,r))},n.prototype.scale=function(e,r){return this.transform(ie.SCALE(e,r))},n.prototype.rotate=function(e,r,t){return this.transform(ie.ROTATE(e,r,t))},n.prototype.matrix=function(e,r,t,i,a,s){return this.transform(ie.MATRIX(e,r,t,i,a,s))},n.prototype.skewX=function(e){return this.transform(ie.SKEW_X(e))},n.prototype.skewY=function(e){return this.transform(ie.SKEW_Y(e))},n.prototype.xSymmetry=function(e){return this.transform(ie.X_AXIS_SYMMETRY(e))},n.prototype.ySymmetry=function(e){return this.transform(ie.Y_AXIS_SYMMETRY(e))},n.prototype.annotateArcs=function(){return this.transform(ie.ANNOTATE_ARCS())},n})(),dv=function(n){return n===" "||n===" "||n==="\r"||n===`
|